Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-admins-init.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-admins-init.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-admins-init.sql 2 Jul 2002 18:40:08 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-admins-init.sql 3 Jul 2002 19:58:07 -0000 1.4 @@ -32,12 +32,12 @@ PERFORM acs_rel_type__create_type( ''dotlrn_admin_profile_rel'', - ''dotlrn_user_profile_rel'', ''dotLRN Profile Admin'', ''dotLRN Profile Admins'', - ''dotlrn_admin_profile_rel'', + ''dotlrn_user_profile_rel'', ''dotlrn_admin_profile_rels'', ''rel_id'', + ''dotlrn_admin_profile_rel'', ''profiled_group'', null, 0, Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-applet-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-applet-sc-drop.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-applet-sc-drop.sql 2 Jul 2002 19:53:51 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-applet-sc-drop.sql 3 Jul 2002 19:58:07 -0000 1.3 @@ -23,167 +23,175 @@ -- @author dan chak (chak@openforce.net) -- porting to PG on 2002-07-01 +create function inline_0() +returns integer as ' begin - select acs_sc_operation__delete( - 'dotlrn_applet', - 'GetPrettyName' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''GetPrettyName'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.GetPrettyName.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.GetPrettyName.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.GetPrettyName.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.GetPrettyName.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'AddApplet' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''AddApplet'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddApplet.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddApplet.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddApplet.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddApplet.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'RemoveApplet' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''RemoveApplet'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemoveApplet.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemoveApplet.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemoveApplet.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemoveApplet.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'AddAppletToCommunity' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''AddAppletToCommunity'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddAppletToCommunity.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddAppletToCommunity.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddAppletToCommunity.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddAppletToCommunity.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'RemoveAppletFromCommunity' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''RemoveAppletFromCommunity'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemoveAppletFromCommunity.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemoveAppletFromCommunity.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemoveAppletFromCommunity.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemoveAppletFromCommunity.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'AddUser' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''AddUser'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddUser.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddUser.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddUser.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddUser.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'RemoveUser' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''RemoveUser'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemoveUser.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemoveUser.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemoveUser.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemoveUser.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'AddUserToCommunity' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''AddUserToCommunity'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddUserToCommunity.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddUserToCommunity.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddUserToCommunity.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddUserToCommunity.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'RemoveUserFromCommunity' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''RemoveUserFromCommunity'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemoveUserFromCommunity.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemoveUserFromCommunity.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemoveUserFromCommunity.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemoveUserFromCommunity.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'AddPortlet' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''AddPortlet'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddPortlet.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddPortlet.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.AddPortlet.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.AddPortlet.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'RemovePortlet' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''RemovePortlet'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemovePortlet.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemovePortlet.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.RemovePortlet.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.RemovePortlet.OutputType'' ); - select acs_sc_operation__delete( - 'dotlrn_applet', - 'Clone' + perform acs_sc_operation__delete( + ''dotlrn_applet'', + ''Clone'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.Clone.InputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.Clone.InputType'' ); - select acs_sc_msg_type__delete( - 'dotlrn_applet.Clone.OutputType' + perform acs_sc_msg_type__delete( + ''dotlrn_applet.Clone.OutputType'' ); - select acs_sc_contract__delete( - 'dotlrn_applet' + perform acs_sc_contract__delete( + ''dotlrn_applet'' ); -end; + return 0; +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + + Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-class-membership-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-class-membership-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-class-membership-drop.sql 2 Jul 2002 18:40:08 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-class-membership-drop.sql 3 Jul 2002 19:58:07 -0000 1.2 @@ -24,35 +24,42 @@ -- @version $Id$ -- +create function inline_0() +returns integer as ' begin - perform acs_rel_type__drop_type ( - 'dotlrn_student_rel', - 't' + select acs_rel_type__drop_type ( + ''dotlrn_student_rel'', + ''t'' ); - perform acs_rel_type__drop_type ( - 'dotlrn_ta_rel', - 't' + select acs_rel_type__drop_type ( + ''dotlrn_ta_rel'', + ''t'' ); - perform acs_rel_type__drop_type ( - 'dotlrn_ca_rel', - 't' + select acs_rel_type__drop_type ( + ''dotlrn_ca_rel'', + ''t'' ); - perform acs_rel_type__drop_type ( - 'dotlrn_cadmin_rel', - 't' + select acs_rel_type__drop_type ( + ''dotlrn_cadmin_rel'', + ''t'' ); - perform acs_rel_type__drop_type ( - 'dotlrn_instructor_rel', - 't' + select acs_rel_type__drop_type ( + ''dotlrn_instructor_rel'', + ''t'' ); -end; + return 0; + +end;' language 'plpgsql'; +select function inline_0(); +drop function inline_0(); + drop view dotlrn_instructor_rels_full; drop table dotlrn_instructor_rels; drop view dotlrn_cadmin_rels_full; Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-class-memberships-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-class-memberships-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-class-memberships-create.sql 2 Jul 2002 18:40:08 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-class-memberships-create.sql 3 Jul 2002 19:58:07 -0000 1.2 @@ -125,94 +125,101 @@ where dotlrn_admin_rels_full.rel_id = dotlrn_instructor_rels.rel_id; - +create function inline_0() +returns integer as ' begin perform acs_rel_type__create_type ( - 'dotlrn_student_rel', - 'dotlrn_member_rel', - 'dotLRN Student Community Membership', - 'dotLRN Student Community Memberships', - 'dotlrn_student_rel', - 'dotlrn_student_rels', - 'rel_id', - 'dotlrn_class_instance', + ''dotlrn_student_rel'', + ''dotlrn_member_rel'', + ''dotLRN Student Community Membership'', + ''dotLRN Student Community Memberships'', + ''dotlrn_student_rel'', + ''dotlrn_student_rels'', + ''rel_id'', + ''dotlrn_class_instance'', null, 0, null, - 'user', - 'student', + ''user'', + ''student'', 0, null ); perform acs_rel_type__create_type ( - 'dotlrn_ta_rel', - 'dotlrn_admin_rel', - 'dotLRN Teaching Assistant Community Membership', - 'dotLRN Teaching Assistant Community Memberships', - 'dotlrn_ta_rel', - 'dotlrn_ta_rels', - 'rel_id', - 'dotlrn_class_instance', + ''dotlrn_ta_rel'', + ''dotlrn_admin_rel'', + ''dotLRN Teaching Assistant Community Membership'', + ''dotLRN Teaching Assistant Community Memberships'', + ''dotlrn_ta_rel'', + ''dotlrn_ta_rels'', + ''rel_id'', + ''dotlrn_class_instance'', null, 0, null, - 'user' - 'teaching_assistant', + ''user'', + ''teaching_assistant'', 0, null ); perform acs_rel_type__create_type ( - 'dotlrn_ca_rel', - 'dotlrn_admin_rel', - 'dotLRN Course Assitant Community Membership', - 'dotLRN Course Assitant Community Memberships', - 'dotlrn_ca_rel', - 'dotlrn_ca_rels', - 'rel_id', - 'dotlrn_class_instance', role_one => null, + ''dotlrn_ca_rel'', + ''dotlrn_admin_rel'', + ''dotLRN Course Assitant Community Membership'', + ''dotLRN Course Assitant Community Memberships'', + ''dotlrn_ca_rel'', + ''dotlrn_ca_rels'', + ''rel_id'', + ''dotlrn_class_instance'', null, 0, null, - 'user' - 'course_assistant', + ''user'', + ''course_assistant'', 0, null ); perform acs_rel_type__create_type ( - 'dotlrn_cadmin_rel', - 'dotlrn_admin_rel', - 'dotLRN Course Administrator Community Membership', - 'dotLRN Course Administrator Community Memberships', - 'dotlrn_cadmin_rel', - 'dotlrn_cadmin_rels', - 'rel_id', - 'dotlrn_class_instance', + ''dotlrn_cadmin_rel'', + ''dotlrn_admin_rel'', + ''dotLRN Course Administrator Community Membership'', + ''dotLRN Course Administrator Community Memberships'', + ''dotlrn_cadmin_rel'', + ''dotlrn_cadmin_rels'', + ''rel_id'', + ''dotlrn_class_instance'', null, 0, null, - 'user', - 'course_admin', + ''user'', + ''course_admin'', 0, null ); perform acs_rel_type__create_type ( - 'dotlrn_instructor_rel', - 'dotlrn_admin_rel', - 'dotLRN Instructor Community Membership', - 'dotLRN Instructor Community Memberships', - 'dotlrn_instructor_rel', - 'dotlrn_instructor_rels', - 'rel_id', - 'dotlrn_class_instance', role_one => null, + ''dotlrn_instructor_rel'', + ''dotlrn_admin_rel'', + ''dotLRN Instructor Community Membership'', + ''dotLRN Instructor Community Memberships'', + ''dotlrn_instructor_rel'', + ''dotlrn_instructor_rels'', + ''rel_id'', + ''dotlrn_class_instance'', null, 0, null, - 'user', - 'instructor', + ''user'', + ''instructor'', 0, null ); + + return 0; + END; ' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-classes-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-classes-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-classes-create.sql 2 Jul 2002 18:40:08 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-classes-create.sql 3 Jul 2002 19:58:07 -0000 1.4 @@ -103,7 +103,7 @@ create table dotlrn_class_instances ( class_instance_id integer constraint dotlrn_ci_class_instance_id_fk - references dotlrn_communities (community_id) + references dotlrn_communities_all (community_id) constraint dotlrn_class_instances_pk primary key, class_key varchar(100) @@ -127,7 +127,7 @@ dotlrn_terms.term_year, dotlrn_terms.start_date, dotlrn_terms.end_date, - dotlrn_communities.* + dotlrn_communities.*, dotlrn_community__url(dotlrn_communities.community_id) as url, dotlrn_classes_full.pretty_name as class_name, dotlrn_classes_full.url as class_url, Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-clubs-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-clubs-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-clubs-create.sql 2 Jul 2002 18:40:08 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-clubs-create.sql 3 Jul 2002 19:58:07 -0000 1.4 @@ -32,7 +32,7 @@ create table dotlrn_clubs ( club_id integer constraint dotlrn_clubs_club_id_fk - references dotlrn_communities (community_id) + references dotlrn_communities_all (community_id) constraint dotlrn_clubs_pk primary key ); @@ -41,7 +41,7 @@ as select dotlrn_clubs.club_id, dotlrn_communities.*, - dotlrn_community__url(dotlrn_communities.community_id) as url, + dotlrn_community__url(dotlrn_communities.community_id::integer) as url, groups.join_policy from dotlrn_communities, dotlrn_clubs, 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.6 -r1.7 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-create.sql 2 Jul 2002 19:53:51 -0000 1.6 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-create.sql 3 Jul 2002 19:58:07 -0000 1.7 @@ -99,7 +99,7 @@ max_child_sortkey varbit ); -create index dtlrn_com_all_com_par_id_idx on dotlrn_communities_all (community_id, parent_community_id; +create index dtlrn_com_all_com_par_id_idx on dotlrn_communities_all (community_id, parent_community_id); create index dtlrn_com_all_archived_p_idx on dotlrn_communities_all (archived_p); create view dotlrn_communities @@ -157,7 +157,7 @@ constraint dotlrn_ca_community_id_nn not null constraint dotlrn_ca_community_id_fk - references dotlrn_communities (community_id), + references dotlrn_communities_all (community_id), applet_id integer constraint dotlrn_ca_applet_key_nn not null 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 -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-package-create.sql 2 Jul 2002 19:53:51 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-package-create.sql 3 Jul 2002 19:58:07 -0000 1.4 @@ -54,7 +54,7 @@ null, null, null, - null, + null ); END; ' language 'plpgsql'; @@ -75,24 +75,26 @@ 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 + if p_parent_type is null then v_parent_object_type:= ''group''; else - v_parent_object_type:= parent_type; + v_parent_object_type:= p_parent_type; end if; select acs_object_id_seq.nextval into v_unique_name from dual; PERFORM acs_object_type__create_type ( - v_parent_object_type, p_community_type, p_community_type, p_community_type, + v_parent_object_type, v_unique_name, v_unique_name, v_unique_name, + ''f'', + null, ''acs_group.name'' ); @@ -131,7 +133,7 @@ where community_type = p_community_type; PERFORM acs_object_type__drop_type(p_community_type); - return(0); + return 0; END; ' language 'plpgsql'; @@ -254,7 +256,7 @@ where community_id = p_community_id; PERFORM acs_group__delete(p_community_id); - return(0); + return 0; END; ' language 'plpgsql'; @@ -337,16 +339,16 @@ ' language 'plpgsql'; -create dotlrn_community__function has_subcomm_p(integer) +create function dotlrn_community__has_subcomm_p(integer) returns varchar as ' DECLARE p_community_id alias for $1; v_rv char(1); BEGIN select CASE WHEN count(*) = 0 - THEN 'f' - ELSE 't' + THEN ''f'' + ELSE ''t'' END into r_rv from dual Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-tree-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-communities-tree-drop.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-tree-drop.sql 2 Jul 2002 19:53:51 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-communities-tree-drop.sql 3 Jul 2002 19:58:07 -0000 1.3 @@ -17,7 +17,7 @@ -- drop the dotLRN communities tree model -- @author dan chak (chak@openforce.net) ---drop trigger dotlrn_communities_in_tr; ---drop trigger dotlrn_community_types_in_tr; +drop trigger dotlrn_communities_in_tr; +drop trigger dotlrn_community_types_in_tr; drop function dotlrn_communities_in_tr(); drop function dotlrn_community_types_in_tr(); 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.5 -r1.6 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql 2 Jul 2002 18:40:08 -0000 1.5 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql 3 Jul 2002 19:58:07 -0000 1.6 @@ -28,12 +28,13 @@ \i dotlrn-users-create.sql \i dotlrn-portal-types-create.sql \i dotlrn-communities-create.sql +\i dotlrn-community-memberships-create.sql +\i dotlrn-communities-package-create.sql +\i dotlrn-init.sql \i dotlrn-clubs-create.sql \i dotlrn-classes-create.sql +\i dotlrn-class-memberships-create.sql \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 Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/sql/postgresql/dotlrn-dotlrn-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-dotlrn-sanitize.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-dotlrn-sanitize.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-dotlrn-sanitize.sql 2 Jul 2002 19:53:51 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-dotlrn-sanitize.sql 3 Jul 2002 19:58:07 -0000 1.3 @@ -26,153 +26,161 @@ -- @note We remember September 11th, 2001 -- +create function inline_0() +returns integer as ' begin - select acs_rel_type__drop_type( - 'dotlrn_admin_rel', - 't' + perform acs_rel_type__drop_type( + ''dotlrn_admin_rel'', + ''t'' ); -- all rels to communities must have a portal_id - select acs_attribute__drop_attribute( - 'dotlrn_member_rel', - 'portal_id' + perform acs_attribute__drop_attribute( + ''dotlrn_member_rel'', + ''portal_id'' ); -- drop basic rel_types - select acs_rel_type__drop_type( - 'dotlrn_member_rel', - 't' + perform acs_rel_type__drop_type( + ''dotlrn_member_rel'', + ''t'' ); -- drop roles - select acs_rel_type__drop_role( - 'student' + perform acs_rel_type__drop_role( + ''student'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'student_pretty_name' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''student_pretty_name'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'student_pretty_plural' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''student_pretty_plural'' ); - select acs_rel_type__drop_role( - 'course_assistant' + perform acs_rel_type__drop_role( + ''course_assistant'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'course_assistant_pretty_name' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''course_assistant_pretty_name'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'course_assistant_pretty_plural' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''course_assistant_pretty_plural'' ); - select acs_rel_type__drop_role( - 'teaching_assistant' + perform acs_rel_type__drop_role( + ''teaching_assistant'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'teaching_assistant_pretty_name' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''teaching_assistant_pretty_name'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'teaching_assistant_pretty_plural' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''teaching_assistant_pretty_plural'' ); - select acs_rel_type__drop_role( - 'instructor' + perform acs_rel_type__drop_role( + ''instructor'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'instructor_pretty_name' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''instructor_pretty_name'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'instructor_pretty_plural' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''instructor_pretty_plural'' ); - select acs_rel_type__drop_role( - 'course_admin' + perform acs_rel_type__drop_role( + ''course_admin'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'course_admin_pretty_name' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''course_admin_pretty_name'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'course_admin_pretty_plural' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''course_admin_pretty_plural'' ); - select acs_rel_type__drop_role( - 'admin' + perform acs_rel_type__drop_role( + ''admin'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'admin_pretty_name' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''admin_pretty_name'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'admin_pretty_plural' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''admin_pretty_plural'' ); -- drop the dotlrn_club community type - select dotlrn_community_type__delete( - 'dotlrn_club' + perform dotlrn_community_type__delete( + ''dotlrn_club'' ); -- drop the dotlrn_class community type - select dotlrn_community_type__delete( - 'dotlrn_class_instance' + perform dotlrn_community_type__delete( + ''dotlrn_class_instance'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'header_font' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''header_font'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'header_font_size' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''header_font_size'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'header_font_color' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''header_font_color'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'header_logo_item_id' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''header_logo_item_id'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'member_pretty_name' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''member_pretty_name'' ); - select acs_attribute__drop_attribute( - 'dotlrn_community', - 'member_pretty_plural' + perform acs_attribute__drop_attribute( + ''dotlrn_community'', + ''member_pretty_plural'' ); -- drop the base community type - select dotlrn_community_type__delete( - 'dotlrn_community' + perform dotlrn_community_type__delete( + ''dotlrn_community'' ); -end; + return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/dotlrn-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-drop.sql 3 Jul 2002 19:58:07 -0000 1.1 @@ -0,0 +1,38 @@ +-- +-- 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. +-- + +-- +-- drop the dotLRN model +-- +-- @author dan chak (chak@openforce.net) +-- @creation-date 2001-08-18 +-- @version $Id: dotlrn-drop.sql,v 1.1 2002/07/03 19:58:07 chak Exp $ +-- + +\i dotlrn-user-extension-drop.sql +\i dotlrn-security-drop.sql +\i dotlrn-main-portlet-drop.sql +\i dotlrn-community-membership-packages-drop.sql +\i dotlrn-applet-sc-drop.sql +\i dotlrn-class-membership-drop.sql +\i dotlrn-classes-drop.sql +\i dotlrn-clubs-drop.sql +\i dotlrn-dotlrn-sanitize.sql +\i dotlrn-communities-package-drop.sql +\i dotlrn-community-memberships-drop.sql +\i dotlrn-communities-drop.sql +\i dotlrn-portal-types-drop.sql +\i dotlrn-users-drop.sql Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-externals-init.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-externals-init.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-externals-init.sql 2 Jul 2002 18:40:08 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-externals-init.sql 3 Jul 2002 19:58:07 -0000 1.4 @@ -31,12 +31,13 @@ begin PERFORM acs_rel_type__create_type( - ''dotlrn_user_profile_rel'', + ''dotlrn_external_profile_rel'', ''dotLRN Profile External'', ''dotLRN External Externals'', - ''dotlrn_external_profile_rel'', + ''dotlrn_user_profile_rel'', ''dotlrn_external_profile_rels'', ''rel_id'', + ''dotlrn_external_profile_rel'', ''profiled_group'', null, 0, @@ -61,7 +62,7 @@ into dotlrn_user_types (type, pretty_name, group_id) values - (''external'', ''External'', group_id); + (''external'', ''dotLRN Externals'', group_id); foo := rel_segment__new( ''dotLRN Externals'', Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-externals-sanitize.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-externals-sanitize.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-externals-sanitize.sql 2 Jul 2002 18:40:08 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-externals-sanitize.sql 3 Jul 2002 19:58:07 -0000 1.4 @@ -75,7 +75,7 @@ from dotlrn_user_types where group_id = foo; - perform profiled_groupd__delete( + perform profiled_group__delete( foo ); Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-init.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/dotlrn-init.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-init.sql 2 Jul 2002 19:53:51 -0000 1.5 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-init.sql 3 Jul 2002 19:58:07 -0000 1.6 @@ -30,301 +30,353 @@ -- @note We remember September 11th, 2001 -- +create function inline_0() +returns integer as ' begin + -- Create the base community type - select dotlrn_community_type__new( - 'dotlrn_community', + perform dotlrn_community_type__new( + ''dotlrn_community'', null, - 'Community', - 'Communities', - 'Communities - the base community type' + ''Community'', + ''Communities'', + ''Communities - the base community type'' ); -- these are the possible attributes of a community - select acs_attribute__create_attribute( - 'dotlrn_community', - 'header_font', - 'string', - 'Header Font', - 'Header Fonts', + perform acs_attribute__create_attribute( + ''dotlrn_community'', + ''header_font'', + ''string'', + ''Header Font'', + ''Header Fonts'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_attribute( - 'dotlrn_community', - 'header_font_size', - 'string', - 'Header Fon Sizet', - 'Header Fonts Sizes', + perform acs_attribute__create_attribute( + ''dotlrn_community'', + ''header_font_size'', + ''string'', + ''Header Fon Sizet'', + ''Header Fonts Sizes'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_attribute( - 'dotlrn_community', - 'header_font_color', - 'string', - 'Header Font Color', - 'Header Fonts Colors', + perform acs_attribute__create_attribute( + ''dotlrn_community'', + ''header_font_color'', + ''string'', + ''Header Font Color'', + ''Header Fonts Colors'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_attribute( - 'dotlrn_community', - 'header_logo_item_id', - 'integer', - 'Header Logo Item ID', - 'Header Logo Item ID', + perform acs_attribute__create_attribute( + ''dotlrn_community'', + ''header_logo_item_id'', + ''integer'', + ''Header Logo Item ID'', + ''Header Logo Item ID'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_attribute( - 'dotlrn_community', - 'header_logo_alt_text', - 'integer', - 'Header Logo Alt Text', - 'Header Logo Alt Text', + perform acs_attribute__create_attribute( + ''dotlrn_community'', + ''header_logo_alt_text'', + ''integer'', + ''Header Logo Alt Text'', + ''Header Logo Alt Text'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); -- create the dotlrn_class community type - select dotlrn_community_type__new( - 'dotlrn_class_instance', - 'dotlrn_community', - 'Class', - 'Classes', - 'e.g. 6.001' + perform dotlrn_community_type__new( + ''dotlrn_class_instance'', + ''dotlrn_community'', + ''Class'', + ''Classes'', + ''e.g. 6.001'' ); -- create the dotlrn_club community type dotlrn_community_type__new( - 'dotlrn_club', - 'dotlrn_community', - 'Club', - 'Clubs', - 'e.g. Alumni' + ''dotlrn_club'', + ''dotlrn_community'', + ''Club'', + ''Clubs'', + ''e.g. Alumni'' ); - update acs_object_types set table_name = 'dotlrn_community', package_name = 'dotlrn_community' where object_type = 'dotlrn_community'; - update acs_object_types set table_name = 'dotlrn_class_instance', package_name = 'dotlrn_class_instance' where object_type = 'dotlrn_class_instance'; - update acs_object_types set table_name = 'dotlrn_club', package_name = 'dotlrn_club' where object_type = 'dotlrn_club'; + update acs_object_types set table_name = ''dotlrn_community'', package_name = ''dotlrn_community'' where object_type = ''dotlrn_community''; + update acs_object_types set table_name = ''dotlrn_class_instance'', package_name = ''dotlrn_class_instance'' where object_type = ''dotlrn_class_instance''; + update acs_object_types set table_name = ''dotlrn_club'', package_name = ''dotlrn_club'' where object_type = ''dotlrn_club''; - select acs_attribute__create_atribute( - 'dotlrn_community', - 'member_pretty_name', - 'string', - 'Member Pretty Name', - 'Member Pretty Name', + perform acs_attribute__create_atribute( + ''dotlrn_community'', + ''member_pretty_name'', + ''string'', + ''Member Pretty Name'', + ''Member Pretty Name'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute( - 'dotlrn_community', - 'member_pretty_plural', - 'string', - 'Member Pretty Plural', - 'Member Pretty Plural', + perform acs_attribute__create_atribute( + ''dotlrn_community'', + ''member_pretty_plural'', + ''string'', + ''Member Pretty Plural'', + ''Member Pretty Plural'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); -- create roles - select acs_rel_type__create_role('student', 'Student', 'Students'); - select acs_rel_type__create_role('course_assistant', 'Course Assistant', 'Course Assistants'); - select acs_rel_type__create_role('teaching_assistant', 'Teaching Assistant', 'Teaching Assistants'); - select acs_rel_type__create_role('instructor', 'Professor', 'Professors'); - select acs_rel_type__create_role('course_admin', 'Course Administrator', 'Course Administrators'); - select acs_rel_type__create_role('admin', 'Administrator', 'Administrators'); + perform acs_rel_type__create_role(''student'', ''Student'', ''Students''); + perform acs_rel_type__create_role(''course_assistant'', ''Course Assistant'', ''Course Assistants''); + perform acs_rel_type__create_role(''teaching_assistant'', ''Teaching Assistant'', ''Teaching Assistants''); + perform acs_rel_type__create_role(''instructor'', ''Professor'', ''Professors''); + perform acs_rel_type__create_role(''course_admin'', ''Course Administrator'', ''Course Administrators''); + perform acs_rel_type__create_role(''admin'', ''Administrator'', ''Administrators''); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'student_pretty_name', - 'string', - 'Student Pretty Name', - 'Student Pretty Name', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''student_pretty_name'', + ''string'', + ''Student Pretty Name'', + ''Student Pretty Name'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'student_pretty_plural', - 'string', - 'Student Pretty Plural', - 'Student Pretty Plural', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''student_pretty_plural'', + ''string'', + ''Student Pretty Plural'', + ''Student Pretty Plural'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'course_assistant_pretty_name', - 'string', - 'Course Assistant Pretty Name', - 'Course Assistant Pretty Name', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''course_assistant_pretty_name'', + ''string'', + ''Course Assistant Pretty Name'', + ''Course Assistant Pretty Name'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'course_assistant_pretty_plural', - 'string', - 'Course Assistant Pretty Plural', - 'Course Assistant Pretty Plural', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''course_assistant_pretty_plural'', + ''string'', + ''Course Assistant Pretty Plural'', + ''Course Assistant Pretty Plural'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'teaching_assistant_pretty_name', - 'string', - 'Teaching Assistant Pretty Name', - 'Teaching Assistant Pretty Name', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''teaching_assistant_pretty_name'', + ''string'', + ''Teaching Assistant Pretty Name'', + ''Teaching Assistant Pretty Name'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'teaching_assistant_pretty_plural', - 'string', - 'Teaching Assistant Pretty Plural', - 'Teaching Assistant Pretty Plural', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''teaching_assistant_pretty_plural'', + ''string'', + ''Teaching Assistant Pretty Plural'', + ''Teaching Assistant Pretty Plural'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'instructor_pretty_name', - 'string', - 'Professor Pretty Name', - 'Professor Pretty Name', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''instructor_pretty_name'', + ''string'', + ''Professor Pretty Name'', + ''Professor Pretty Name'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'instructor_pretty_plural', - 'string', - 'Professor Pretty Plural', - 'Professor Pretty Plural', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''instructor_pretty_plural'', + ''string'', + ''Professor Pretty Plural'', + ''Professor Pretty Plural'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'course_admin_pretty_name', - 'string', - 'Course Administrator Pretty Name', - 'Course Administrator Pretty Name', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''course_admin_pretty_name'', + ''string'', + ''Course Administrator Pretty Name'', + ''Course Administrator Pretty Name'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'course_admin_pretty_plural', - 'string', - 'Course Administrator Pretty Plural', - 'Course Administrator Pretty Plural', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''course_admin_pretty_plural'', + ''string'', + ''Course Administrator Pretty Plural'', + ''Course Administrator Pretty Plural'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'admin_pretty_name', - 'string', - 'Administrator Pretty Name', - 'Administrator Pretty Name', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''admin_pretty_name'', + ''string'', + ''Administrator Pretty Name'', + ''Administrator Pretty Name'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); - select acs_attribute__create_atribute ( - 'dotlrn_community', - 'admin_pretty_plural', - 'string', - 'Administrator Pretty Plural', - 'Administrator Pretty Plural', + perform acs_attribute__create_atribute ( + ''dotlrn_community'', + ''admin_pretty_plural'', + ''string'', + ''Administrator Pretty Plural'', + ''Administrator Pretty Plural'', + null, null, null, 0, 1, - 'generic' + ''generic'', + ''f'' ); -- create basic rel_types - select acs_rel_type__create_type ( - 'dotlrn_member_rel', - 'membership_rel', - 'dotLRN Community Membership', - 'dotLRN Community Memberships', - 'dotlrn_member_rel', - 'dotlrn_member_rels', - 'red_id', - 'dotlrn_community', + perform acs_rel_type__create_type ( + ''dotlrn_member_rel'', + ''dotLRN Community Membership'', + ''dotLRN Community Memberships'', + ''membership_rel'', + ''dotlrn_member_rels'', + ''red_id'', + ''dotlrn_member_rel'', + ''dotlrn_community'', null, 0, null, - 'user', - 'member', + ''user'', + ''member'', 0, null ); - select acs_rel_type__create_type ( - 'dotlrn_admin_rel', - 'dotlrn_member_rel', - 'dotLRN Admin Community Membership', - 'dotLRN Admin Community Memberships', - 'dotlrn_admin_rel', - 'dotlrn_admin_rels', - 'red_id', - 'dotlrn_community', + perform acs_rel_type__create_type ( + ''dotlrn_admin_rel'', + ''dotLRN Admin Community Membership'', + ''dotLRN Admin Community Memberships'', + ''dotlrn_member_rel'', + ''dotlrn_admin_rels'', + ''red_id'', + ''dotlrn_admin_rel'', + ''dotlrn_community'', null, 0, null, + ''user'', + ''admin'', 0, - 'admin', - 0, null ); -- all rels to communities must have a portal_id - select acs_rel_type__create_type ( - 'dotlrn_member_rel', - 'portal_id', - 'integer', - 'Page ID', - 'Page IDs' + perform acs_attribute__create_atribute ( + ''dotlrn_member_rel'', + ''portal_id'', + ''integer'', + ''Page ID'', + ''Page IDs'' + null, null, null, + 1, + 1, + null, + ''type_specific'', + ''f'' ); -end; + + return 0; +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-main-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-main-portlet-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-main-portlet-create.sql 2 Jul 2002 19:53:51 -0000 1.5 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-main-portlet-create.sql 3 Jul 2002 19:58:07 -0000 1.6 @@ -34,18 +34,24 @@ create function inline_0 () returns integer as ' declare -begin ds_id portal_datasources.datasource_id%TYPE; + foo integer; begin ds_id := portal_datasource__new( + null, ''dotlrn_main_portlet'', - ''Displays the list of communities a user belongs to'' + ''Displays the list of communities a user belongs to'', + ''portal_datasource'', + now(), + null, + null, + null ); -- the standard 4 params -- shadeable_p - perform portal_datasource.set_def_param( + perform portal_datasource__set_def_param( ds_id, ''t'', ''t'', ''shadeable_p'', ''f'' ); Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-main-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-main-portlet-drop.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-main-portlet-drop.sql 2 Jul 2002 19:53:51 -0000 1.4 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-main-portlet-drop.sql 3 Jul 2002 19:58:07 -0000 1.5 @@ -85,21 +85,25 @@ ''dotlrn_main_portlet'' ); - begin + begin select datasource_id into ds_id from portal_datasources where name = ''dotlrn-main-portlet''; - exception when no_data_found then - ds_id := null; - end; +-- cant seem to get the exception working properly.. +-- is it really necessary here? look into it later. -dan chak 2002-07-02 +-- exception when no_data_found then +-- ds_id := null; + end; if ds_id is not null then portal_datasource__delete(ds_id); end if; + + return 0; end; ' language 'plpgsql'; select inline_0(); -delete function inline_0(); +drop function inline_0(); Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-professors-init.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-professors-init.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-professors-init.sql 2 Jul 2002 19:53:51 -0000 1.4 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-professors-init.sql 3 Jul 2002 19:58:07 -0000 1.5 @@ -32,12 +32,12 @@ PERFORM acs_rel_type__create_type( ''dotlrn_professor_profile_rel'', - ''dotlrn_user_profile_rel'', ''dotLRN Professor Profile Professor'', ''dotLRN Professor Profile Professors'', - ''dotlrn_professor_profile_rel'', + ''dotlrn_user_profile_rel'', ''dotlrn_professor_profile_rels'', ''rel_id'', + ''dotlrn_professor_profile_rel'', ''profiled_group'', null, 0, Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-students-init.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-students-init.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-students-init.sql 2 Jul 2002 19:53:51 -0000 1.4 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-students-init.sql 3 Jul 2002 19:58:07 -0000 1.5 @@ -32,13 +32,13 @@ PERFORM acs_rel_type__create_type( ''dotlrn_student_profile_rel'', - ''dotlrn_user_profile_rel'', ''dotLRN Profile Student'', ''dotLRN Profile Students'', + ''dotlrn_user_profile_rel'', ''dotlrn_student_profile_rel'', + ''profiled_group'', ''dotlrn_student_profile_rels'', ''rel_id'', - ''profiled_group'', null, 0, null, Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-user-extension-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-user-extension-drop.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-user-extension-drop.sql 2 Jul 2002 19:53:51 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-user-extension-drop.sql 3 Jul 2002 19:58:07 -0000 1.3 @@ -27,49 +27,54 @@ -- -- - +create function inline_0() +returns integer as ' begin - select acs_sc_binding__delete ( - 'UserData', - 'dotlrn_user_extension' + perform acs_sc_binding__delete ( + ''UserData'', + ''dotlrn_user_extension'' ); - select acs_sc_impl_alias__delete ( - 'UserData', - 'dotlrn_user_extension', - 'UserNew' + perform acs_sc_impl_alias__delete ( + ''UserData'', + ''dotlrn_user_extension'', + ''UserNew'' ); - select acs_sc_impl_alias__delete ( - 'UserData', - 'dotlrn_user_extension', - 'UserApprove' + perform acs_sc_impl_alias__delete ( + ''UserData'', + ''dotlrn_user_extension'', + ''UserApprove'' ); - select acs_sc_impl_alias__delete ( - 'UserData', - 'dotlrn_user_extension', - 'UserDeapprove' + perform acs_sc_impl_alias__delete ( + ''UserData'', + ''dotlrn_user_extension'', + ''UserDeapprove'' ); - select acs_sc_impl_alias__delete ( - 'UserData', - 'dotlrn_user_extension', - 'UserModify' + perform acs_sc_impl_alias__delete ( + ''UserData'', + ''dotlrn_user_extension'', + ''UserModify'' ); - select acs_sc_impl_alias__delete ( - 'UserData', - 'dotlrn_user_extension', - 'UserDelete' + perform acs_sc_impl_alias__delete ( + ''UserData'', + ''dotlrn_user_extension'', + ''UserDelete'' ); -- create the implementation - select acs_sc_impl__delete( - 'UserData', - 'dotlrn_user_extension' + perform acs_sc_impl__delete( + ''UserData'', + ''dotlrn_user_extension'' ); -end; + return 0; +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-users-sanitize.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-users-sanitize.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-users-sanitize.sql 2 Jul 2002 18:40:08 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-users-sanitize.sql 3 Jul 2002 19:58:07 -0000 1.4 @@ -59,7 +59,7 @@ select min(segment_id) into foo from rel_segments - where segment_name = ''dotLRN Profiled Users''; + where segment_name = ''Profiled Users''; perform rel_segment__delete( foo