Index: openacs-4/packages/dotlrn/www/manage-memberships-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/manage-memberships-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/manage-memberships-postgresql.xql 24 Jul 2004 08:34:10 -0000 1.2 +++ openacs-4/packages/dotlrn/www/manage-memberships-postgresql.xql 8 Aug 2006 21:26:24 -0000 1.3 @@ -23,7 +23,8 @@ dotlrn_member_rels_full where dotlrn_member_rels_full.user_id = :user_id and dotlrn_member_rels_full.community_id = dotlrn_class_instances_full.class_instance_id - order by dotlrn_class_instances_full.pretty_name, + order by dotlrn_class_instances_full.active_start_date, + dotlrn_class_instances_full.pretty_name, dotlrn_class_instances_full.community_key @@ -109,12 +110,15 @@ select dotlrn_class_instances_full.* from dotlrn_class_instances_full where dotlrn_class_instances_full.join_policy <> 'closed' + and active_end_date > (select sysdate from dual) and not exists (select 1 from dotlrn_member_rels_full where dotlrn_member_rels_full.user_id = :user_id and dotlrn_member_rels_full.community_id = dotlrn_class_instances_full.class_instance_id) - order by dotlrn_class_instances_full.pretty_name, + order by dotlrn_class_instances_full.active_start_date, + dotlrn_class_instances_full.pretty_name, dotlrn_class_instances_full.community_key + @@ -124,11 +128,13 @@ from dotlrn_class_instances_full where dotlrn_class_instances_full.department_key = :non_member_department_key and dotlrn_class_instances_full.join_policy <> 'closed' + and active_end_date > (select sysdate from dual) and not exists (select 1 from dotlrn_member_rels_full where dotlrn_member_rels_full.user_id = :user_id and dotlrn_member_rels_full.community_id = dotlrn_class_instances_full.class_instance_id) - order by dotlrn_class_instances_full.pretty_name, + order by dotlrn_class_instances_full.active_start_date, + dotlrn_class_instances_full.pretty_name, dotlrn_class_instances_full.community_key