Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-community-memberships-packages-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-community-memberships-packages-create.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/dotlrn/sql/oracle/dotlrn-community-memberships-packages-create.sql	13 Mar 2002 00:11:35 -0000	1.8
+++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-community-memberships-packages-create.sql	16 Mar 2002 02:02:07 -0000	1.9
@@ -23,6 +23,7 @@
         portal_id in dotlrn_member_rels.portal_id%TYPE default NULL,
         community_id in dotlrn_communities.community_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
     ) return dotlrn_member_rels.rel_id%TYPE;
@@ -44,6 +45,7 @@
         portal_id in dotlrn_member_rels.portal_id%TYPE default NULL,
         community_id in dotlrn_communities.community_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
     ) return dotlrn_member_rels.rel_id%TYPE
@@ -55,6 +57,7 @@
             rel_type => rel_type,
             object_id_one => community_id,
             object_id_two => user_id,
+            member_state => dotlrn_member_rel.new.member_state,
             creation_user => creation_user,
             creation_ip => creation_ip
         );
@@ -92,6 +95,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_admin_rel',
         community_id in dotlrn_communities.community_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE default null,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -113,6 +117,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_admin_rel',
         community_id in dotlrn_communities.community_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE default null,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -125,6 +130,7 @@
             rel_type => rel_type,
             community_id => community_id,
             user_id => user_id,
+            member_state => dotlrn_admin_rel.new.member_state,
             portal_id => portal_id,
             creation_user => creation_user,
             creation_ip => creation_ip
@@ -164,6 +170,7 @@
         portal_id in dotlrn_member_rels.portal_id%TYPE default NULL,
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
     ) return dotlrn_student_rels.rel_id%TYPE;
@@ -185,6 +192,7 @@
         portal_id in dotlrn_member_rels.portal_id%TYPE default NULL,
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
     ) return dotlrn_student_rels.rel_id%TYPE
@@ -197,6 +205,7 @@
             portal_id => portal_id,
             community_id => class_instance_id,
             user_id => user_id,
+            member_state => dotlrn_student_rel.new.member_state,
             creation_user => creation_user,
             creation_ip => creation_ip
         );
@@ -234,6 +243,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_ta_rel',
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -255,6 +265,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_ta_rel',
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -267,6 +278,7 @@
             rel_type => rel_type,
             community_id => class_instance_id,
             user_id => user_id,
+            member_state => dotlrn_ta_rel.new.member_state,
             portal_id => portal_id,
             creation_user => creation_user,
             creation_ip => creation_ip
@@ -305,6 +317,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_ca_rel',
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -326,6 +339,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_ca_rel',
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -338,6 +352,7 @@
             rel_type => rel_type,
             community_id => class_instance_id,
             user_id => user_id,
+            member_state => dotlrn_ca_rel.new.member_state,
             portal_id => portal_id,
             creation_user => creation_user,
             creation_ip => creation_ip
@@ -376,6 +391,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_cadmin_rel',
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -397,6 +413,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_cadmin_rel',
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -409,6 +426,7 @@
             rel_type => rel_type,
             community_id => class_instance_id,
             user_id => user_id,
+            member_state => dotlrn_cadmin_rel.new.member_state,
             portal_id => portal_id,
             creation_user => creation_user,
             creation_ip => creation_ip
@@ -447,6 +465,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_instructor_rel',
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -468,6 +487,7 @@
         rel_type in acs_rels.rel_type%TYPE default 'dotlrn_instructor_rel',
         class_instance_id in dotlrn_class_instances.class_instance_id%TYPE,
         user_id in users.user_id%TYPE,
+        member_state in membership_rels.member_state%TYPE default 'approved',
         portal_id in dotlrn_member_rels.portal_id%TYPE,
         creation_user in acs_objects.creation_user%TYPE default null,
         creation_ip in acs_objects.creation_ip%TYPE default null
@@ -480,6 +500,7 @@
             rel_type => rel_type,
             community_id => class_instance_id,
             user_id => user_id,
+            member_state => dotlrn_instructor_rel.new.member_state,
             portal_id => portal_id,
             creation_user => creation_user,
             creation_ip => creation_ip
