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.9 -r1.10 --- openacs-4/packages/dotlrn/www/communities-chunk-oracle.xql 29 Mar 2002 19:38:26 -0000 1.9 +++ openacs-4/packages/dotlrn/www/communities-chunk-oracle.xql 1 May 2002 01:19:47 -0000 1.10 @@ -6,208 +6,225 @@ select count(*) - from dotlrn_communities_not_closed dotlrn_communities + from dotlrn_communities_not_closed - - - select dotlrn_communities.community_id, - dotlrn_communities.community_type, - dotlrn_communities.pretty_name, - dotlrn_communities.description, - dotlrn_communities.package_id, - dotlrn_community.url(dotlrn_communities.community_id) as url, - 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 - where supertype = 'dotlrn_community' - start with community_type = dotlrn_communities.community_type - connect by community_type = prior supertype) as root_community_type - from dotlrn_active_communities dotlrn_communities, - dotlrn_member_rels_approved - where dotlrn_member_rels_approved.user_id = :user_id - and dotlrn_member_rels_approved.community_id = dotlrn_communities.community_id - order by root_community_type, dotlrn_communities.community_type, dotlrn_communities.pretty_name - - + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + 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 + where supertype = 'dotlrn_community' + start with community_type = dotlrn_communities.community_type + connect by community_type = prior supertype) as root_community_type + from dotlrn_active_communities dotlrn_communities, + dotlrn_member_rels_approved + where dotlrn_member_rels_approved.user_id = :user_id + and dotlrn_member_rels_approved.community_id = dotlrn_communities.community_id + order by root_community_type, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name + + - - - select dotlrn_communities.community_id, - dotlrn_communities.community_type, - dotlrn_communities.pretty_name, - dotlrn_communities.description, - dotlrn_communities.package_id, - dotlrn_community.url(dotlrn_communities.community_id) as url, - 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 - where supertype = 'dotlrn_community' - start with community_type = dotlrn_communities.community_type - connect by community_type = prior supertype) as root_community_type - from dotlrn_communities dotlrn_communities, - dotlrn_member_rels_approved - where dotlrn_member_rels_approved.user_id = :user_id - and dotlrn_member_rels_approved.community_id = dotlrn_communities.community_id - order by root_community_type, dotlrn_communities.community_type, dotlrn_communities.pretty_name - - + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + 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 + where supertype = 'dotlrn_community' + start with community_type = dotlrn_communities.community_type + connect by community_type = prior supertype) as root_community_type + from dotlrn_communities dotlrn_communities, + dotlrn_member_rels_approved + where dotlrn_member_rels_approved.user_id = :user_id + and dotlrn_member_rels_approved.community_id = dotlrn_communities.community_id + order by root_community_type, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name + + - - - select dotlrn_communities.community_id, - dotlrn_communities.community_type, - dotlrn_communities.pretty_name, - dotlrn_communities.description, - dotlrn_communities.package_id, - dotlrn_community.url(dotlrn_communities.community_id) as url, - 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 - where supertype = 'dotlrn_community' - start with community_type = dotlrn_communities.community_type - connect by community_type = prior supertype) as root_community_type - from dotlrn_active_comms_not_closed dotlrn_communities - where 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_communities.community_id) - order by root_community_type, dotlrn_communities.community_type, dotlrn_communities.pretty_name - - + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + 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 + where supertype = 'dotlrn_community' + start with community_type = dotlrn_communities.community_type + connect by community_type = prior supertype) as root_community_type + from dotlrn_active_comms_not_closed dotlrn_communities + where 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_communities.community_id) + order by root_community_type, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name + + - - - select dotlrn_communities.community_id, - dotlrn_communities.community_type, - dotlrn_communities.pretty_name, - dotlrn_communities.description, - dotlrn_communities.package_id, - dotlrn_community.url(dotlrn_communities.community_id) as url, - 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 - where supertype = 'dotlrn_community' - start with community_type = dotlrn_communities.community_type - connect by community_type = prior supertype) as root_community_type - from dotlrn_communities_not_closed dotlrn_communities - where 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_communities.community_id) - and dotlrn_communities.parent_community_id is null - order by root_community_type, dotlrn_communities.community_type, dotlrn_communities.pretty_name - - + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + 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 + where supertype = 'dotlrn_community' + start with community_type = dotlrn_communities.community_type + connect by community_type = prior supertype) as root_community_type + from dotlrn_communities_not_closed dotlrn_communities + where 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_communities.community_id) + and dotlrn_communities.parent_community_id is null + order by root_community_type, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name + + - - - select count(*) - from dotlrn_communities_not_closed dotlrn_communities - where dotlrn_communities.community_type = :community_type - - + + + select count(*) + from dotlrn_communities_not_closed dotlrn_communities + where dotlrn_communities.community_type = :community_type + + - - - select dotlrn_communities.community_id, - dotlrn_communities.community_type, - dotlrn_communities.pretty_name, - dotlrn_communities.description, - dotlrn_communities.package_id, - dotlrn_community.url(dotlrn_communities.community_id) as url, - 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 - where supertype = 'dotlrn_community' - start with community_type = dotlrn_communities.community_type - connect by community_type = prior supertype) as root_community_type - from dotlrn_active_communities dotlrn_communities, - dotlrn_member_rels_approved - where dotlrn_member_rels_approved.user_id = :user_id - and dotlrn_member_rels_approved.community_id = dotlrn_communities.community_id - and dotlrn_communities.community_type = :community_type - order by root_community_type, dotlrn_communities.community_type, dotlrn_communities.pretty_name - - + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + 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 + where supertype = 'dotlrn_community' + start with community_type = dotlrn_communities.community_type + connect by community_type = prior supertype) as root_community_type + from dotlrn_active_communities dotlrn_communities, + dotlrn_member_rels_approved + where dotlrn_member_rels_approved.user_id = :user_id + and dotlrn_member_rels_approved.community_id = dotlrn_communities.community_id + and dotlrn_communities.community_type = :community_type + order by root_community_type, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name + + - - - select dotlrn_communities.community_id, - dotlrn_communities.community_type, - dotlrn_communities.pretty_name, - dotlrn_communities.description, - dotlrn_communities.package_id, - dotlrn_community.url(dotlrn_communities.community_id) as url, - 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 - where supertype = 'dotlrn_community' - start with community_type = dotlrn_communities.community_type - connect by community_type = prior supertype) as root_community_type - from dotlrn_communities dotlrn_communities, - dotlrn_member_rels_approved - where dotlrn_member_rels_approved.user_id = :user_id - and dotlrn_member_rels_approved.community_id = dotlrn_communities.community_id - and dotlrn_communities.community_type = :community_type - order by root_community_type, dotlrn_communities.community_type, dotlrn_communities.pretty_name - - + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + 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 + where supertype = 'dotlrn_community' + start with community_type = dotlrn_communities.community_type + connect by community_type = prior supertype) as root_community_type + from dotlrn_communities dotlrn_communities, + dotlrn_member_rels_approved + where dotlrn_member_rels_approved.user_id = :user_id + and dotlrn_member_rels_approved.community_id = dotlrn_communities.community_id + and dotlrn_communities.community_type = :community_type + order by root_community_type, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name + + - - - select dotlrn_communities.community_id, - dotlrn_communities.community_type, - dotlrn_communities.pretty_name, - dotlrn_communities.description, - dotlrn_communities.package_id, - dotlrn_community.url(dotlrn_communities.community_id) as url, - 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 - where supertype = 'dotlrn_community' - start with community_type = dotlrn_communities.community_type - connect by community_type = prior supertype) as root_community_type - from dotlrn_active_comms_not_closed dotlrn_communities - where 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_communities.community_id) - and dotlrn_communities.community_type = :community_type - order by root_community_type, dotlrn_communities.community_type, dotlrn_communities.pretty_name - - + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + 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 + where supertype = 'dotlrn_community' + start with community_type = dotlrn_communities.community_type + connect by community_type = prior supertype) as root_community_type + from dotlrn_active_comms_not_closed dotlrn_communities + where 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_communities.community_id) + and dotlrn_communities.community_type = :community_type + order by root_community_type, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name + + - - - select dotlrn_communities.community_id, - dotlrn_communities.community_type, - dotlrn_communities.pretty_name, - dotlrn_communities.description, - dotlrn_communities.package_id, - dotlrn_community.url(dotlrn_communities.community_id) as url, - 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 - where supertype = 'dotlrn_community' - start with community_type = dotlrn_communities.community_type - connect by community_type = prior supertype) as root_community_type - from dotlrn_communities_not_closed dotlrn_communities - where 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_communities.community_id) - and dotlrn_communities.community_type = :community_type - order by root_community_type, dotlrn_communities.community_type, dotlrn_communities.pretty_name - - + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + 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 + where supertype = 'dotlrn_community' + start with community_type = dotlrn_communities.community_type + connect by community_type = prior supertype) as root_community_type + from dotlrn_communities_not_closed dotlrn_communities + where 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_communities.community_id) + and dotlrn_communities.community_type = :community_type + order by root_community_type, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name + + +