Index: openacs-4/packages/dotlrn/dotlrn.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v diff -u -r1.57 -r1.58 --- openacs-4/packages/dotlrn/dotlrn.info 5 Mar 2002 22:43:32 -0000 1.57 +++ openacs-4/packages/dotlrn/dotlrn.info 6 Mar 2002 00:08:02 -0000 1.58 @@ -191,6 +191,8 @@ + + Index: openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql 18 Feb 2002 21:02:51 -0000 1.5 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql 6 Mar 2002 00:08:02 -0000 1.6 @@ -49,4 +49,27 @@ + + + select cc_users.user_id, + cc_users.first_names, + cc_users.last_name, + cc_users.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.user_id) + and cc_users.member_state = 'banned' + and ( + lower(cc_users.last_name) like lower('%' || :search_text || '%') + or lower(cc_users.first_names) like lower('%' || :search_text || '%') + or lower(cc_users.email) like lower('%' || :search_text || '%') + ) + order by cc_users.last_name + + + Index: openacs-4/packages/dotlrn/www/admin/users-chunk-large.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-large.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/admin/users-chunk-large.tcl 20 Feb 2002 20:36:41 -0000 1.5 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-large.tcl 6 Mar 2002 00:08:02 -0000 1.6 @@ -14,7 +14,7 @@ } if {![exists_and_not_null referer]} { - set referer "users" + set referer "/dotlrn/admin/users" } set user_id [ad_conn user_id] @@ -46,7 +46,9 @@ set dotlrn_package_id [dotlrn::get_package_id] set root_object_id [acs_magic_object "security_context_root"] - if {[string equal $type "pending"] == 1} { + if {[string equal $type "deactivated"] == 1} { + db_multirow users select_deactivated_users {} + } elseif {[string equal $type "pending"] == 1} { db_multirow users select_non_dotlrn_users {} } else { db_multirow users select_dotlrn_users {} 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.5 -r1.6 --- openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql 18 Feb 2002 21:02:51 -0000 1.5 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql 6 Mar 2002 00:08:02 -0000 1.6 @@ -28,6 +28,20 @@ + + + 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)) + + + select dotlrn_users.user_id, @@ -66,4 +80,23 @@ + + + select cc_users.user_id, + cc_users.first_names, + cc_users.last_name, + cc_users.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 + + + Index: openacs-4/packages/dotlrn/www/admin/users-chunk-medium.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-medium.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/admin/users-chunk-medium.tcl 20 Feb 2002 20:36:41 -0000 1.4 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-medium.tcl 6 Mar 2002 00:08:02 -0000 1.5 @@ -19,12 +19,14 @@ } if {![exists_and_not_null referer]} { - set referer users + set referer "/dotlrn/admin/users" } set default_section Z foreach dimension {A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} { - if {[string equal $type "pending"] == 1} { + if {[string equal $type "deactivated"] == 1} { + set section_count [db_string select_deactivated_users_count {}] + } elseif {[string equal $type "pending"] == 1} { set section_count [db_string select_non_dotlrn_users_count {}] } else { set section_count [db_string select_dotlrn_users_count {}] @@ -39,7 +41,9 @@ set control_bar [portal::dimensional [list [list section {} $section $dimensions]]] -if {[string equal $type "pending"] == 1} { +if {[string equal $type "deactivated"] == 1} { + db_multirow users select_deactivated_users {} +} elseif {[string equal $type "pending"] == 1} { db_multirow users select_non_dotlrn_users {} } else { db_multirow users select_dotlrn_users {} Index: openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql 18 Feb 2002 21:02:51 -0000 1.5 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql 6 Mar 2002 00:08:02 -0000 1.6 @@ -39,4 +39,22 @@ + + + select cc_users.user_id, + cc_users.first_names, + cc_users.last_name, + cc_users.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.user_id) + and cc_users.member_state = 'banned' + order by cc_users.last_name + + + Index: openacs-4/packages/dotlrn/www/admin/users-chunk-small.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-small.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/admin/users-chunk-small.tcl 20 Feb 2002 20:36:41 -0000 1.4 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-small.tcl 6 Mar 2002 00:08:02 -0000 1.5 @@ -17,11 +17,13 @@ } if {![exists_and_not_null referer]} { - set referer users + set referer "/dotlrn/admin/users" } # Currently, just present a list of dotLRN users -if {[string equal $type "pending"] == 1} { +if {[string equal $type "deactivated"] == 1} { + db_multirow users select_deactivated_users {} +} elseif {[string equal $type "pending"] == 1} { db_multirow users select_non_dotlrn_users {} } else { db_multirow users select_dotlrn_users {} Index: openacs-4/packages/dotlrn/www/admin/users-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/admin/users-chunk.adp 9 Feb 2002 15:31:58 -0000 1.5 +++ openacs-4/packages/dotlrn/www/admin/users-chunk.adp 6 Mar 2002 00:08:02 -0000 1.6 @@ -20,11 +20,16 @@ - - @users.last_name@, @users.first_names@ (@users.email@) + + @users.last_name@, @users.first_names@ (@users.email@) - @users.last_name@, @users.first_names@ (@users.email@) + + @users.last_name@, @users.first_names@ (@users.email@) + + + @users.last_name@, @users.first_names@ (@users.email@) + @users.access_level@ Index: openacs-4/packages/dotlrn/www/admin/users-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/www/admin/users-chunk.tcl 1 Feb 2002 21:58:06 -0000 1.3 +++ openacs-4/packages/dotlrn/www/admin/users-chunk.tcl 6 Mar 2002 00:08:02 -0000 1.4 @@ -11,7 +11,7 @@ set user_id [ad_conn user_id] if {![exists_and_not_null referer]} { - set referer users + set referer "/dotlrn/admin/users" } ad_return_template Index: openacs-4/packages/dotlrn/www/admin/users-deactivate.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-deactivate.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/users-deactivate.adp 6 Mar 2002 00:08:02 -0000 1.1 @@ -0,0 +1,9 @@ + +Deactivate Users +@context_bar@ + +

+ Are you sure you want to deactivate the selected users? +

+ + Index: openacs-4/packages/dotlrn/www/admin/users-deactivate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-deactivate.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/users-deactivate.tcl 6 Mar 2002 00:08:02 -0000 1.1 @@ -0,0 +1,38 @@ +# dotlrn/www/admin/users-deactivate.tcl + +ad_page_contract { + Deactivate a set of users. + + @author yon (yon@openforce.net) + @creation-date 2002-02-14 + @version $Id: users-deactivate.tcl,v 1.1 2002/03/06 00:08:02 yon Exp $ +} -query { + users + {referer "users-search"} +} -properties { + context_bar:onevalue +} + +set context_bar {{users Users} {users-search {User Search}} {Deactivate Users}} + +form create confirm_deactivate + +element create confirm_deactivate users \ + -label " " \ + -datatype text \ + -widget hidden \ + -value $users + +if {[form is_valid confirm_deactivate]} { + form get_values confirm_deactivate \ + users + + foreach user $users { + acs_user::ban -user_id $user + } + + ad_returnredirect $referer + ad_script_abort +} + +ad_return_template Index: openacs-4/packages/dotlrn/www/admin/users-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-delete.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/users-delete.adp 14 Feb 2002 18:03:07 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/users-delete.adp 6 Mar 2002 00:08:02 -0000 1.2 @@ -1,9 +1,9 @@ -Delete Users +Nuke Users @context_bar@

- Are you sure you want to delete the selected users? + Are you sure you want to nuke the selected users?

Index: openacs-4/packages/dotlrn/www/admin/users-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/users-delete.tcl 14 Feb 2002 18:03:07 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/users-delete.tcl 6 Mar 2002 00:08:02 -0000 1.2 @@ -1,7 +1,7 @@ # dotlrn/www/admin/users-delete.tcl ad_page_contract { - Delete a set of users. + Nuke a set of users. @author yon (yon@openforce.net) @creation-date 2002-02-14 @@ -13,7 +13,7 @@ context_bar:onevalue } -set context_bar {{users Users} {users-search {User Search}} {Delete Users}} +set context_bar {{users Users} {users-search {User Search}} {Nuke Users}} form create confirm_delete Index: openacs-4/packages/dotlrn/www/admin/users-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/users-oracle.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/admin/users-oracle.xql 30 Jan 2002 23:32:41 -0000 1.4 +++ openacs-4/packages/dotlrn/www/admin/users-oracle.xql 6 Mar 2002 00:08:02 -0000 1.5 @@ -1,24 +1,33 @@ - oracle8.1.6 + oracle8.1.6 - - select count(*) - from dotlrn_users - where dotlrn_users.type = :type - + + select count(*) + from dotlrn_users + where dotlrn_users.type = :type + - - select count(*) - from persons - where not exists (select 1 - from dotlrn_users - where dotlrn_users.user_id = persons.person_id) - + + select count(*) + from cc_users + where not exists (select 1 + from dotlrn_users + where dotlrn_users.user_id = cc_users.user_id) + and member_state = 'approved' + + + + select count(*) + from cc_users + where member_state = 'banned' + + + Index: openacs-4/packages/dotlrn/www/admin/users-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-search.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/admin/users-search.tcl 16 Feb 2002 17:31:00 -0000 1.7 +++ openacs-4/packages/dotlrn/www/admin/users-search.tcl 6 Mar 2002 00:08:02 -0000 1.8 @@ -37,8 +37,9 @@ -options { {None none} {{Spam ...} spam} - {{Delete ...} delete} {{Add to community ...} add_to_community} + {{Deactivate ...} deactivate} + {{Nuke ...} delete} } \ -value $action @@ -51,12 +52,15 @@ "spam" { ad_returnredirect "users-spam?[export_vars {{users $selected_users}}]" } - "delete" { - ad_returnredirect "users-delete?[export_vars {{users $selected_users}}]" - } "add_to_community" { ad_returnredirect "users-add-to-community?[export_vars {{users $selected_users}}]" } + "deactivate" { + ad_returnredirect "users-deactivate?[export_vars {{users $selected_users}}]" + } + "delete" { + ad_returnredirect "users-delete?[export_vars {{users $selected_users}}]" + } } } Index: openacs-4/packages/dotlrn/www/admin/users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users.adp,v diff -u -r1.15 -r1.16 --- openacs-4/packages/dotlrn/www/admin/users.adp 11 Feb 2002 20:17:00 -0000 1.15 +++ openacs-4/packages/dotlrn/www/admin/users.adp 6 Mar 2002 00:08:02 -0000 1.16 @@ -19,13 +19,13 @@

@control_bar@

- + - + - + Index: openacs-4/packages/dotlrn/www/admin/users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn/www/admin/users.tcl 18 Feb 2002 17:48:12 -0000 1.10 +++ openacs-4/packages/dotlrn/www/admin/users.tcl 6 Mar 2002 00:08:02 -0000 1.11 @@ -23,10 +23,13 @@ }] lappend dotlrn_roles {pending Pending {}} +lappend dotlrn_roles {deactivated Deactivated {}} set control_bar [ad_dimensional [list [list type {User Type:} admin $dotlrn_roles]]] -if {[string equal $type "pending"] == 1} { +if {[string equal $type "deactivated"] == 1} { + set n_users [db_string select_deactivated_users_count {}] +} elseif {[string equal $type "pending"] == 1} { set n_users [db_string select_non_dotlrn_users_count {}] } else { set n_users [db_string select_dotlrn_users_count {}]