Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-communities-create.sql,v diff -u -r1.35 -r1.36 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql 29 Mar 2002 19:14:44 -0000 1.35 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql 29 Mar 2002 20:21:49 -0000 1.36 @@ -140,317 +140,3 @@ constraint dotlrn_ca_active_p_ck check (active_p in ('t','f')) ); - -create or replace package dotlrn_community_type -is - function new ( - community_type in dotlrn_community_types.community_type%TYPE, - parent_type in dotlrn_community_types.supertype%TYPE default 'dotlrn_community', - pretty_name in dotlrn_community_types.pretty_name%TYPE, - pretty_plural in dotlrn_community_types.pretty_name%TYPE default null, - description in dotlrn_community_types.description%TYPE, - package_id in dotlrn_community_types.package_id%TYPE default null, - creation_date in acs_objects.creation_date%TYPE default sysdate, - creation_user in acs_objects.creation_user%TYPE default null, - creation_ip in acs_objects.creation_ip%TYPE default null, - context_id in acs_objects.context_id%TYPE default null - ) return dotlrn_community_types.community_type%TYPE; - - procedure delete ( - community_type in dotlrn_community_types.community_type%TYPE - ); - - function name ( - community_type in dotlrn_community_types.community_type%TYPE - ) return varchar; -end; -/ -show errors - -create or replace package body dotlrn_community_type -is - function new ( - community_type in dotlrn_community_types.community_type%TYPE, - parent_type in dotlrn_community_types.supertype%TYPE default 'dotlrn_community', - pretty_name in dotlrn_community_types.pretty_name%TYPE, - pretty_plural in dotlrn_community_types.pretty_name%TYPE default null, - description in dotlrn_community_types.description%TYPE, - package_id in dotlrn_community_types.package_id%TYPE default null, - creation_date in acs_objects.creation_date%TYPE default sysdate, - creation_user in acs_objects.creation_user%TYPE default null, - creation_ip in acs_objects.creation_ip%TYPE default null, - context_id in acs_objects.context_id%TYPE default null - ) return dotlrn_community_types.community_type%TYPE - is - v_parent_object_type acs_object_types.object_type%TYPE; - v_unique_name acs_objects.object_id%TYPE; - begin - if parent_type is null then - v_parent_object_type:= 'group'; - else - v_parent_object_type:= parent_type; - end if; - - select acs_object_id_seq.nextval - into v_unique_name - from dual; - - acs_object_type.create_type ( - supertype => v_parent_object_type, - object_type => community_type, - pretty_name => community_type, - pretty_plural => community_type, - table_name => v_unique_name, - id_column => v_unique_name, - package_name => v_unique_name, - name_method => 'acs_group.name' - ); - - insert - into group_types - (group_type, default_join_policy) - values - (community_type, 'closed'); - - insert - into dotlrn_community_types - (community_type, pretty_name, description, package_id, supertype) - values - (community_type, pretty_name, description, package_id, parent_type); - - return community_type; - end; - - procedure delete ( - community_type in dotlrn_community_types.community_type%TYPE - ) - is - begin - delete - from dotlrn_community_types - where community_type = community_type; - - acs_object_type.drop_type(community_type); - end; - - function name ( - community_type in dotlrn_community_types.community_type%TYPE - ) return varchar - is - name dotlrn_community_types.pretty_name%TYPE; - begin - select pretty_name into name - from dotlrn_community_types; - - return name; - end; -end; -/ -show errors - -create or replace package dotlrn_community -is - function new ( - community_id in dotlrn_communities.community_id%TYPE default null, - parent_community_id in dotlrn_communities.parent_community_id%TYPE default null, - community_type in dotlrn_communities.community_type%TYPE, - community_key in dotlrn_communities.community_key%TYPE, - pretty_name in dotlrn_communities.pretty_name%TYPE, - description in dotlrn_communities.description%TYPE, - portal_id in dotlrn_communities.portal_id%TYPE default null, - portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, - package_id in dotlrn_communities.package_id%TYPE default null, - join_policy in groups.join_policy%TYPE default null, - creation_date in acs_objects.creation_date%TYPE default sysdate, - creation_user in acs_objects.creation_user%TYPE default null, - creation_ip in acs_objects.creation_ip%TYPE default null, - context_id in acs_objects.context_id%TYPE default null - ) return dotlrn_communities.community_id%TYPE; - - procedure set_active_dates ( - community_id in dotlrn_communities.community_id%TYPE, - start_date in dotlrn_communities.active_start_date%TYPE, - end_date in dotlrn_communities.active_end_date%TYPE - ); - - procedure delete ( - community_id in dotlrn_communities.community_id%TYPE - ); - - function name ( - community_id in dotlrn_communities.community_id%TYPE - ) return varchar; - - function member_p ( - community_id in dotlrn_communities.community_id%TYPE, - party_id in parties.party_id%TYPE - ) return char; - - function admin_p ( - community_id in dotlrn_communities.community_id%TYPE, - party_id in parties.party_id%TYPE - ) return char; - - function url ( - community_id in dotlrn_communities.community_id%TYPE - ) return varchar2; -end dotlrn_community; -/ -show errors - -create or replace package body dotlrn_community -as - function new ( - community_id in dotlrn_communities.community_id%TYPE default null, - parent_community_id in dotlrn_communities.parent_community_id%TYPE default null, - community_type in dotlrn_communities.community_type%TYPE, - community_key in dotlrn_communities.community_key%TYPE, - pretty_name in dotlrn_communities.pretty_name%TYPE, - description in dotlrn_communities.description%TYPE, - portal_id in dotlrn_communities.portal_id%TYPE default null, - portal_template_id in dotlrn_communities.portal_template_id%TYPE default null, - package_id in dotlrn_communities.package_id%TYPE default null, - join_policy in groups.join_policy%TYPE default null, - creation_date in acs_objects.creation_date%TYPE default sysdate, - creation_user in acs_objects.creation_user%TYPE default null, - creation_ip in acs_objects.creation_ip%TYPE default null, - context_id in acs_objects.context_id%TYPE default null - ) return dotlrn_communities.community_id%TYPE - is - c_id integer; - begin - c_id := acs_group.new ( - context_id => context_id, - group_id => community_id, - object_type => community_type, - creation_date => creation_date, - creation_user => creation_user, - creation_ip => creation_ip, - group_name => community_key, - join_policy => join_policy - ); - - insert into dotlrn_communities - (community_id, - parent_community_id, - community_type, - community_key, - pretty_name, - description, - package_id, - portal_id, - portal_template_id) - values - (c_id, - parent_community_id, - community_type, - community_key, - pretty_name, - description, - package_id, - portal_id, - portal_template_id); - - return c_id; - end; - - procedure set_active_dates ( - community_id in dotlrn_communities.community_id%TYPE, - start_date in dotlrn_communities.active_start_date%TYPE, - end_date in dotlrn_communities.active_end_date%TYPE - ) - is - begin - update dotlrn_communities - set active_start_date = start_date, - active_end_date = end_date - where community_id = set_active_dates.community_id; - end; - - procedure delete ( - community_id in dotlrn_communities.community_id%TYPE - ) - is - begin - delete - from dotlrn_communities - where community_id = community_id; - - acs_group.delete(community_id); - end; - - function name ( - community_id in dotlrn_communities.community_id%TYPE - ) return varchar - is - begin - return acs_group.name(community_id); - end; - - function member_p ( - community_id in dotlrn_communities.community_id%TYPE, - party_id in parties.party_id%TYPE - ) return char - is - v_member_p char(1); - begin - select decode(count(*), 0, 'f', 't') - into v_member_p - from dual - where exists (select 1 - from dotlrn_member_rels_approved - where dotlrn_member_rels_approved.user_id = party_id - and dotlrn_member_rels_approved.community_id = community_id); - - return v_member_p; - end; - - function admin_p ( - community_id in dotlrn_communities.community_id%TYPE, - party_id in parties.party_id%TYPE - ) return char - is - v_rv char(1); - begin - select decode( - acs_permission.permission_p(community_id, party_id, 'dotlrn_admin_community'), - 'f', - acs_permission.permission_p(community_id, party_id, 'admin'), - 't' - ) into v_rv - from dual; - - return v_rv; - end; - - function url ( - community_id in dotlrn_communities.community_id%TYPE - ) return varchar2 - is - v_node_id site_nodes.node_id%TYPE; - begin - select site_nodes.node_id into v_node_id - from dotlrn_communities, - site_nodes - where dotlrn_communities.community_id = dotlrn_community.url.community_id - and site_nodes.object_id = dotlrn_communities.package_id; - - return site_node.url(v_node_id); - - exception - when no_data_found then - return ''; - end; -end; -/ -show errors - -create or replace view dotlrn_communities_full -as - select dotlrn_communities.*, - dotlrn_community.url(dotlrn_communities.community_id) as url, - groups.group_name, - groups.join_policy - from dotlrn_communities, - groups - where dotlrn_communities.community_id = groups.group_id; Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-communities-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-create.sql 29 Mar 2002 19:14:44 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-create.sql 29 Mar 2002 20:21:49 -0000 1.3 @@ -141,284 +141,3 @@ constraint dotlrn_ca_active_p_ck check (active_p in ('t','f')) ); - - -select define_function_args ('dotlrn_community_type__new','community_type,parent_type;dotlrn_community,pretty_name,pretty_plural,description,package_id,creation_date,creation_user,creation_ip,context_id'); - -select define_function_args ('dotlrn_community_type__delete','community_type'); - -select define_function_args ('dotlrn_community_type__name','community_type'); - -create function dotlrn_community_type__new (varchar,varchar,varchar,varchar,varchar) -returns varchar as ' -DECLARE - p_community_type alias for $1; - p_parent_type alias for $2; - p_pretty_name alias for $3; - p_pretty_plural alias for $4; - p_description alias for $5; -BEGIN - return dotlrn_community_type__new( - p_community_type, - p_parent_type, - p_pretty_name, - p_pretty_plural, - p_description, - null, - null, - null, - null, - null, - ); -END; -' language 'plpgsql'; - -create function dotlrn_community_type__new (varchar,varchar,varchar,varchar,varchar,integer,timestamp,integer,varchar,integer) -returns varchar as ' -DECLARE - p_community_type alias for $1; - p_parent_type alias for $2; - p_pretty_name alias for $3; - p_pretty_plural alias for $4; - p_description alias for $5; - p_package_id alias for $6; - p_creation_date alias for $7; - p_creation_user alias for $8; - p_creation_ip alias for $9; - p_context_id alias for $10; - v_parent_object_type acs_object_types.object_type%TYPE; - v_unique_name acs_objects.object_id%TYPE; -BEGIN - if parent_type is null then - v_parent_object_type:= ''group''; - else - v_parent_object_type:= parent_type; - end if; - - select acs_object_id_seq.nextval - into v_unique_name - from dual; - - PERFORM acs_object_type__create_type ( - p_community_type, - p_community_type, - p_community_type, - v_parent_object_type, - ''dotlrn_communities'', - ''community_id'', - v_unique_name, - ''acs_group.name'' - ); - - insert - into group_types - (group_type, default_join_policy) - values - (p_community_type, ''closed''); - - insert - into dotlrn_community_types - (community_type, pretty_name, description, package_id, supertype) - values - (p_community_type, p_pretty_name, p_description, p_package_id, p_parent_type); - - return p_community_type; -END; -' language 'plpgsql'; - - -create function dotlrn_community_type__delete(varchar) -returns integer as ' -DECLARE - p_community_type alias for $1; -BEGIN - delete - from dotlrn_community_types - where community_type = p_community_type; - - PERFORM acs_object_type__drop_type(p_community_type); - return(0); -END; -' language 'plpgsql'; - - -create function dotlrn_community_type__name(varchar) -returns varchar as ' -DECLARE - p_community_type alias for $1; -BEGIN - return name from dotlrn_community_types where community_type= p_community_type; -END; -' language 'plpgsql'; - - --- dotlrn_community - -select define_function_args('dotlrn_community__new','community_id,parent_community_id,community_id,community_key,pretty_name,description,portal_id,portal_template_id,package_id,join_policy,creation_date,creation_user,creation_ip,context_id'); - -select define_function_args('dotlrn_community__set_active_dates','community_id,start_date,end_date'); - -select define_function_args('dotlrn_community__delete','community_id'); - -select define_function_args('dotlrn_community__name','community_id'); - -select define_function_args('dotlrn_community__member_p','community_id,party_id'); - -select define_function_args('dotlrn_community__admin_p','community_id,party_id'); - -select define_function_args('dotlrn_community__url','community_id'); - - -create function dotlrn_community__new(integer,integer,varchar,varchar,varchar,varchar,integer,integer,integer,varchar,timestamp,integer,varchar,integer) -returns integer as ' -DECLARE - p_community_id alias for $1; - p_parent_community_id alias for $2; - p_community_type alias for $3; - p_community_key alias for $4; - p_pretty_name alias for $5; - p_description alias for $6; - p_portal_id alias for $7; - p_portal_template_id alias for $8; - p_package_id alias for $9; - p_join_policy alias for $10; - p_creation_date alias for $11; - p_creation_user alias for $12; - p_creation_ip alias for $13; - p_context_id alias for $14; - c_id integer; -BEGIN - c_id := acs_group__new ( - p_community_id, - p_community_type, - p_creation_date, - p_creation_user, - p_creation_ip, - NULL, - NULL, - p_community_key, - p_join_policy - p_context_id, - ); - - insert into dotlrn_communities - (community_id, - parent_community_id, - community_type, - community_key, - pretty_name, - description, - package_id, - portal_id, - portal_template_id) - values - (c_id, - p_parent_community_id, - p_community_type, - p_community_key, - p_pretty_name, - p_description, - p_package_id, - p_portal_id, - p_portal_template_id); - - return c_id; -END; -' language 'plpgsql'; - - -create function dotlrn_community__set_active_dates(integer,date,date) -returns integer as ' -DECLARE - p_community_id alias for $1; - p_start_date alias for $2; - p_end_date alias for $3; -BEGIN - update dotlrn_communities - set active_start_date = p_start_date, - active_end_date = p_end_date - where community_id = p_community_id; - - return p_community_id; -END; -' language 'plpgsql'; - -create function dotlrn_community__delete(integer) -returns integer as ' -DECLARE - p_community_id alias for $1; -BEGIN - delete - from dotlrn_communities - where community_id = p_community_id; - - PERFORM acs_group__delete(p_community_id); - return(0); -END; -' language 'plpgsql'; - - -create function dotlrn_community__name(integer) -returns varchar as ' -DECLARE - p_community_id alias for $1; -BEGIN - return acs_group__name(p_community_id); -END; -' language 'plpgsql'; - - -create function dotlrn_community__member_p(integer,integer) -returns boolean as ' -DECLARE - p_community_id alias for $1; - p_party_id alias for $2; -BEGIN - -- to do (ben) - return ''t''; -END; -' language 'plpgsql'; - - -create function dotlrn_community__admin_p(integer,integer) -returns boolean as ' -DECLARE - p_community_id alias for $1; - p_party_id alias for $2; -BEGIN - IF acs_permission__permission_p(p_community_id, p_party_id, ''dotlrn_admin_community'') = ''t'' - then return ''t''; - end if; - - IF acs_permission__permission_p(p_community_id, p_party_id, ''admin'') = ''t'' - then return ''t''; - end if; - - return ''f''; -END; -' language 'plpgsql'; - - -create function dotlrn_community__url(integer) -returns varchar as ' -DECLARE - p_community_id alias for $1; -BEGIN - return site_node__url(site_nodes.node_id) - from dotlrn_communities, - site_nodes - where dotlrn_communities.community_id = p_community_id - and site_nodes.object_id = dotlrn_communities.package_id; -END; -' language 'plpgsql'; - - -create view dotlrn_communities_full -as - select dotlrn_communities.*, - dotlrn_community__url(dotlrn_communities.community_id) as url, - groups.group_name, - groups.join_policy - from dotlrn_communities, - groups - where dotlrn_communities.community_id = groups.group_id; Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-communities-package-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-package-create.sql 29 Mar 2002 20:21:49 -0000 1.1 @@ -0,0 +1,309 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- The DotLRN communities construct +-- copyright 2001, OpenForce, Inc. +-- distributed under the GNU GPL v2 +-- +-- for PG +-- +-- @author Ben Adida (ben@openforce.net) +-- @author yon (yon@openforce.net +-- @author arjun (arjun@openforce.net) +-- @creation-date September 20th, 2001 (redone) +-- @version $Id: dotlrn-communities-package-create.sql,v 1.1 2002/03/29 20:21:49 yon Exp $ +-- + +select define_function_args ('dotlrn_community_type__new','community_type,parent_type;dotlrn_community,pretty_name,pretty_plural,description,package_id,creation_date,creation_user,creation_ip,context_id'); + +select define_function_args ('dotlrn_community_type__delete','community_type'); + +select define_function_args ('dotlrn_community_type__name','community_type'); + +create function dotlrn_community_type__new (varchar,varchar,varchar,varchar,varchar) +returns varchar as ' +DECLARE + p_community_type alias for $1; + p_parent_type alias for $2; + p_pretty_name alias for $3; + p_pretty_plural alias for $4; + p_description alias for $5; +BEGIN + return dotlrn_community_type__new( + p_community_type, + p_parent_type, + p_pretty_name, + p_pretty_plural, + p_description, + null, + null, + null, + null, + null, + ); +END; +' language 'plpgsql'; + +create function dotlrn_community_type__new (varchar,varchar,varchar,varchar,varchar,integer,timestamp,integer,varchar,integer) +returns varchar as ' +DECLARE + p_community_type alias for $1; + p_parent_type alias for $2; + p_pretty_name alias for $3; + p_pretty_plural alias for $4; + p_description alias for $5; + p_package_id alias for $6; + p_creation_date alias for $7; + p_creation_user alias for $8; + p_creation_ip alias for $9; + p_context_id alias for $10; + v_parent_object_type acs_object_types.object_type%TYPE; + v_unique_name acs_objects.object_id%TYPE; +BEGIN + if parent_type is null then + v_parent_object_type:= ''group''; + else + v_parent_object_type:= parent_type; + end if; + + select acs_object_id_seq.nextval + into v_unique_name + from dual; + + PERFORM acs_object_type__create_type ( + p_community_type, + p_community_type, + p_community_type, + v_parent_object_type, + ''dotlrn_communities'', + ''community_id'', + v_unique_name, + ''acs_group.name'' + ); + + insert + into group_types + (group_type, default_join_policy) + values + (p_community_type, ''closed''); + + insert + into dotlrn_community_types + (community_type, pretty_name, description, package_id, supertype) + values + (p_community_type, p_pretty_name, p_description, p_package_id, p_parent_type); + + return p_community_type; +END; +' language 'plpgsql'; + + +create function dotlrn_community_type__delete(varchar) +returns integer as ' +DECLARE + p_community_type alias for $1; +BEGIN + delete + from dotlrn_community_types + where community_type = p_community_type; + + PERFORM acs_object_type__drop_type(p_community_type); + return(0); +END; +' language 'plpgsql'; + + +create function dotlrn_community_type__name(varchar) +returns varchar as ' +DECLARE + p_community_type alias for $1; +BEGIN + return name from dotlrn_community_types where community_type= p_community_type; +END; +' language 'plpgsql'; + + +-- dotlrn_community + +select define_function_args('dotlrn_community__new','community_id,parent_community_id,community_id,community_key,pretty_name,description,portal_id,portal_template_id,package_id,join_policy,creation_date,creation_user,creation_ip,context_id'); + +select define_function_args('dotlrn_community__set_active_dates','community_id,start_date,end_date'); + +select define_function_args('dotlrn_community__delete','community_id'); + +select define_function_args('dotlrn_community__name','community_id'); + +select define_function_args('dotlrn_community__member_p','community_id,party_id'); + +select define_function_args('dotlrn_community__admin_p','community_id,party_id'); + +select define_function_args('dotlrn_community__url','community_id'); + + +create function dotlrn_community__new(integer,integer,varchar,varchar,varchar,varchar,integer,integer,integer,varchar,timestamp,integer,varchar,integer) +returns integer as ' +DECLARE + p_community_id alias for $1; + p_parent_community_id alias for $2; + p_community_type alias for $3; + p_community_key alias for $4; + p_pretty_name alias for $5; + p_description alias for $6; + p_portal_id alias for $7; + p_portal_template_id alias for $8; + p_package_id alias for $9; + p_join_policy alias for $10; + p_creation_date alias for $11; + p_creation_user alias for $12; + p_creation_ip alias for $13; + p_context_id alias for $14; + c_id integer; +BEGIN + c_id := acs_group__new ( + p_community_id, + p_community_type, + p_creation_date, + p_creation_user, + p_creation_ip, + NULL, + NULL, + p_community_key, + p_join_policy + p_context_id, + ); + + insert into dotlrn_communities + (community_id, + parent_community_id, + community_type, + community_key, + pretty_name, + description, + package_id, + portal_id, + portal_template_id) + values + (c_id, + p_parent_community_id, + p_community_type, + p_community_key, + p_pretty_name, + p_description, + p_package_id, + p_portal_id, + p_portal_template_id); + + return c_id; +END; +' language 'plpgsql'; + + +create function dotlrn_community__set_active_dates(integer,date,date) +returns integer as ' +DECLARE + p_community_id alias for $1; + p_start_date alias for $2; + p_end_date alias for $3; +BEGIN + update dotlrn_communities + set active_start_date = p_start_date, + active_end_date = p_end_date + where community_id = p_community_id; + + return p_community_id; +END; +' language 'plpgsql'; + +create function dotlrn_community__delete(integer) +returns integer as ' +DECLARE + p_community_id alias for $1; +BEGIN + delete + from dotlrn_communities + where community_id = p_community_id; + + PERFORM acs_group__delete(p_community_id); + return(0); +END; +' language 'plpgsql'; + + +create function dotlrn_community__name(integer) +returns varchar as ' +DECLARE + p_community_id alias for $1; +BEGIN + return acs_group__name(p_community_id); +END; +' language 'plpgsql'; + + +create function dotlrn_community__member_p(integer,integer) +returns boolean as ' +DECLARE + p_community_id alias for $1; + p_party_id alias for $2; +BEGIN + -- to do (ben) + return ''t''; +END; +' language 'plpgsql'; + + +create function dotlrn_community__admin_p(integer,integer) +returns boolean as ' +DECLARE + p_community_id alias for $1; + p_party_id alias for $2; +BEGIN + IF acs_permission__permission_p(p_community_id, p_party_id, ''dotlrn_admin_community'') = ''t'' + then return ''t''; + end if; + + IF acs_permission__permission_p(p_community_id, p_party_id, ''admin'') = ''t'' + then return ''t''; + end if; + + return ''f''; +END; +' language 'plpgsql'; + + +create function dotlrn_community__url(integer) +returns varchar as ' +DECLARE + p_community_id alias for $1; +BEGIN + return site_node__url(site_nodes.node_id) + from dotlrn_communities, + site_nodes + where dotlrn_communities.community_id = p_community_id + and site_nodes.object_id = dotlrn_communities.package_id; +END; +' language 'plpgsql'; + + +create view dotlrn_communities_full +as + select dotlrn_communities.*, + dotlrn_community__url(dotlrn_communities.community_id) as url, + groups.group_name, + groups.join_policy + from dotlrn_communities, + groups + where dotlrn_communities.community_id = groups.group_id; Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql 29 Mar 2002 19:14:44 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql 29 Mar 2002 20:21:49 -0000 1.4 @@ -32,6 +32,7 @@ \i dotlrn-applet-sc-create.sql \i dotlrn-init.sql \i dotlrn-community-memberships-create.sql +\i dotlrn-communities-package-create.sql \i dotlrn-community-memberships-packages-create.sql \i dotlrn-main-portlet-create.sql \i dotlrn-security-create.sql