Index: openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql 29 Mar 2002 19:38:26 -0000 1.8 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql 7 Apr 2002 01:16:52 -0000 1.9 @@ -15,30 +15,31 @@ - - select count(*) - from dual - where exists (select 1 - from cc_users - where not exists (select 1 - from dotlrn_users - where dotlrn_users.user_id = cc_users.user_id) - and cc_users.member_state = 'approved' - and upper(substr(cc_users.last_name, 1, 1)) = upper(:dimension)) - + + select count(*) + from acs_rels, + persons + where acs_rels.object_id_one = acs.magic_object_id('registered_users') + and acs_rels.object_id_two = persons.person_id + and not exists (select 1 + from acs_rels a, dotlrn_user_types + where a.object_id_one = dotlrn_user_types.group_id + and a.object_id_two = acs_rels.object_id_two) + and upper(substr(persons.last_name, 1, 1)) = upper(:dimension)) + select count(*) - from dual - where exists (select 1 - from cc_users - where not exists (select 1 - from dotlrn_users - where dotlrn_users.user_id = cc_users.user_id) - and cc_users.member_state = 'banned' - and upper(substr(cc_users.last_name, 1, 1)) = upper(:dimension)) + from persons, + acs_rels, + membership_rels + where acs_rels.object_id_one = acs.magic_object_id('registered_users') + and acs_rels.object_id_two = persons.person_id + and acs_rels.rel_id = membership_rels.rel_id + and membership_rels.member_state = 'banned' + and upper(substr(persons.last_name, 1, 1)) = upper(:section) @@ -63,39 +64,55 @@ - select cc_users.user_id, - cc_users.first_names, - cc_users.last_name, - cc_users.email, + select users.user_id, + persons.first_names, + persons.last_name, + parties.email, 'limited' as access_level, 'f' as read_private_data_p, - acs_permission.permission_p(:root_object_id, cc_users.user_id, 'admin') as site_wide_admin_p - from cc_users - where not exists (select 1 - from dotlrn_users - where dotlrn_users.user_id = cc_users.person_id) - and cc_users.member_state = 'approved' - and upper(substr(cc_users.last_name, 1, 1)) = upper(:section) - order by cc_users.last_name + acs_permission.permission_p(:root_object_id, users.user_id, 'admin') as site_wide_admin_p + from parties, + users, + persons, + acs_rels, + membership_rels + where parties.party_id = users.user_id + and users.user_id = persons.person_id + and persons.person_id = acs_rels.object_id_two + and acs_rels.rel_id = membership_rels.rel_id + and membership_rels.member_state = 'approved' + and not exists (select 1 + from acs_rels a, + dotlrn_user_types + where a.object_id_one = dotlrn_user_types.group_id + and a.object_id_two = acs_rels.object_id_two) + and upper(substr(persons.last_name, 1, 1)) = upper(:section) + order by persons.last_name - select cc_users.user_id, - cc_users.first_names, - cc_users.last_name, - cc_users.email, + select users.user_id, + persons.first_names, + persons.last_name, + parties.email, 'limited' as access_level, 'f' as read_private_data_p, - acs_permission.permission_p(:root_object_id, cc_users.user_id, 'admin') as site_wide_admin_p - from cc_users - where not exists (select 1 - from dotlrn_users - where dotlrn_users.user_id = cc_users.person_id) - and cc_users.member_state = 'banned' - and upper(substr(cc_users.last_name, 1, 1)) = upper(:section) - order by cc_users.last_name + acs_permission.permission_p(:root_object_id, users.user_id, 'admin') as site_wide_admin_p + from parties, + users, + persons, + acs_rels, + membership_rels + where parties.party_id = users.user_id + and users.user_id = persons.person_id + and persons.person_id = acs_rels.object_id_two + and acs_rels.object_id_one = acs.magic_object_id('registered_users') + and acs_rels.rel_id = membership_rels.rel_id + and membership_rels.member_state = 'banned' + and upper(substr(persons.last_name, 1, 1)) = upper(:section) + order by persons.last_name