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.33 -r1.34 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql 22 Mar 2002 22:23:54 -0000 1.33 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql 22 Mar 2002 23:21:25 -0000 1.34 @@ -376,9 +376,17 @@ party_id in parties.party_id%TYPE ) return char is + v_member_p char(1); begin - -- TODO: a-la aD, implement this for real (bma) - return 't'; + 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 ( 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.42 -r1.43 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 22 Mar 2002 22:55:29 -0000 1.42 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 22 Mar 2002 23:21:25 -0000 1.43 @@ -169,7 +169,7 @@ select count(*) from dual where exists (select 1 - from dotlrn_member_rels_full + from dotlrn_member_rels_approved where community_id = :community_id and user_id = :user_id) Index: openacs-4/packages/dotlrn/www/communities-chunk-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities-chunk-oracle.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/communities-chunk-oracle.xql 16 Mar 2002 02:02:07 -0000 1.6 +++ openacs-4/packages/dotlrn/www/communities-chunk-oracle.xql 22 Mar 2002 23:21:25 -0000 1.7 @@ -18,7 +18,7 @@ dotlrn_communities.description, dotlrn_communities.package_id, dotlrn_community.url(dotlrn_communities.community_id) as url, - 1 member_p, + 1 as member_p, decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p, (select community_type from dotlrn_community_types @@ -41,7 +41,7 @@ dotlrn_communities.description, dotlrn_communities.package_id, dotlrn_community.url(dotlrn_communities.community_id) as url, - 1 member_p, + 1 as member_p, decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p, (select community_type from dotlrn_community_types @@ -64,7 +64,7 @@ dotlrn_communities.description, dotlrn_communities.package_id, dotlrn_community.url(dotlrn_communities.community_id) as url, - 0 member_p, + 0 as member_p, decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p, (select community_type from dotlrn_community_types @@ -88,7 +88,7 @@ dotlrn_communities.description, dotlrn_communities.package_id, dotlrn_community.url(dotlrn_communities.community_id) as url, - 0 member_p, + 0 as member_p, decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p, (select community_type from dotlrn_community_types @@ -121,7 +121,7 @@ dotlrn_communities.description, dotlrn_communities.package_id, dotlrn_community.url(dotlrn_communities.community_id) as url, - 1 member_p, + 1 as member_p, decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p, (select community_type from dotlrn_community_types @@ -145,7 +145,7 @@ dotlrn_communities.description, dotlrn_communities.package_id, dotlrn_community.url(dotlrn_communities.community_id) as url, - 1 member_p, + 1 as member_p, decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p, (select community_type from dotlrn_community_types @@ -169,7 +169,7 @@ dotlrn_communities.description, dotlrn_communities.package_id, dotlrn_community.url(dotlrn_communities.community_id) as url, - 0 member_p, + 0 as member_p, decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p, (select community_type from dotlrn_community_types @@ -194,7 +194,7 @@ dotlrn_communities.description, dotlrn_communities.package_id, dotlrn_community.url(dotlrn_communities.community_id) as url, - 0 member_p, + 0 as member_p, decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p, (select community_type from dotlrn_community_types Index: openacs-4/packages/dotlrn/www/members-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members-chunk.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/dotlrn/www/members-chunk.tcl 22 Mar 2002 22:46:58 -0000 1.9 +++ openacs-4/packages/dotlrn/www/members-chunk.tcl 22 Mar 2002 23:21:25 -0000 1.10 @@ -40,7 +40,7 @@ set user_list [list] foreach user $community_members { - lappend user_list [ns_set get $community_members user_id] + lappend user_list [ns_set get $user user_id] } db_multirow pending_users select_pending_users {