Index: openacs-4/packages/dotlrn/tcl/community-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.xql,v diff -u -r1.36 -r1.37 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 14 Mar 2002 23:47:40 -0000 1.36 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 16 Mar 2002 02:02:07 -0000 1.37 @@ -2,6 +2,24 @@ + + + select * + from dotlrn_member_rels_full + where user_id = :user_id + and community_id = :community_id + + + + + + select * + from dotlrn_member_rels_full + where user_id = :user_id + and community_id = :community_id + + + declare @@ -93,9 +111,9 @@ last_name, email from registered_users users, - dotlrn_member_rels_full + dotlrn_member_rels_approved where community_id = :community_id - and users.user_id = dotlrn_member_rels_full.user_id + and users.user_id = dotlrn_member_rels_approved.user_id order by rel_type @@ -110,32 +128,36 @@ last_name, email from registered_users users, - dotlrn_member_rels_full + dotlrn_member_rels_approved where community_id = :community_id - and users.user_id = dotlrn_member_rels_full.user_id + and users.user_id = dotlrn_member_rels_approved.user_id and rel_type = :rel_type + + + select count(*) + from dual + where exists (select 1 + from dotlrn_member_rels_full + where community_id = :community_id + and user_id = :user_id) + + - - -select count(*) from dotlrn_member_rels_full where community_id= :community_id and user_id= :user_id - - + + + select count(*) + from dual + where exists (select 1 + from dotlrn_member_rels_full + where community_id = :community_id + and user_id = :user_id + and member_state = 'needs approval') + + - - - select count(*) - from group_member_map, - membership_rels - where group_member_map.group_id = :community_id - and group_member_map.member_id = :user_id - and group_member_map.rel_id = membership_rels.rel_id - and membership_rels.member_state = 'needs approval' - - - select rel_id, portal_id from dotlrn_member_rels_full where community_id= :community_id and user_id= :user_id @@ -168,9 +190,9 @@ dotlrn_communities.pretty_name, dotlrn_communities.package_id from dotlrn_communities, - dotlrn_member_rels_full - where dotlrn_communities.community_id = dotlrn_member_rels_full.community_id - and dotlrn_member_rels_full.user_id = :user_id + dotlrn_member_rels_approved + where dotlrn_communities.community_id = dotlrn_member_rels_approved.community_id + and dotlrn_member_rels_approved.user_id = :user_id