Index: openacs-4/packages/dotlrn/www/one-community-admin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-admin.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/one-community-admin.adp 10 Jan 2002 19:30:18 -0000 1.7 +++ openacs-4/packages/dotlrn/www/one-community-admin.adp 12 Jan 2002 09:27:16 -0000 1.8 @@ -1,5 +1,5 @@ -Admin +Admin: @pretty_name@ @context_bar@

Index: openacs-4/packages/dotlrn/www/one-community-admin.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-admin.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/one-community-admin.tcl 11 Jan 2002 06:33:26 -0000 1.8 +++ openacs-4/packages/dotlrn/www/one-community-admin.tcl 12 Jan 2002 09:27:16 -0000 1.9 @@ -7,6 +7,11 @@ @version $Id$ } -query { } -properties { + community_id:onevalue + community_type:onevalue + pretty_name:onevalue + description:onevalue + portal_template_id:onevalue users:multirow } Index: openacs-4/packages/dotlrn/www/admin/class.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/admin/class.adp 17 Dec 2001 23:02:56 -0000 1.2 +++ openacs-4/packages/dotlrn/www/admin/class.adp 12 Jan 2002 09:27:16 -0000 1.3 @@ -2,7 +2,7 @@ [ - new instance + new instance ] Index: openacs-4/packages/dotlrn/www/admin/class.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/www/admin/class.xql 11 Jan 2002 06:33:26 -0000 1.3 +++ openacs-4/packages/dotlrn/www/admin/class.xql 12 Jan 2002 09:27:16 -0000 1.4 @@ -32,9 +32,11 @@ select count(*) from dotlrn_terms - where dotlrn_terms.term_id not in (select dotlrn_class_instances.term_id - from dotlrn_class_instances - where dotlrn_class_instances.class_key = :class_key) + where dotlrn_terms.end_date > sysdate + and not exists (select 1 + from dotlrn_class_instances + where dotlrn_class_instances.class_key = :class_key + and dotlrn_class_instances.term_id = dotlrn_terms.term_id) Index: openacs-4/packages/dotlrn/www/admin/classes.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/classes.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/admin/classes.adp 11 Jan 2002 06:33:26 -0000 1.6 +++ openacs-4/packages/dotlrn/www/admin/classes.adp 12 Jan 2002 09:27:16 -0000 1.7 @@ -2,7 +2,7 @@ Classes @context_bar@ -[ new class ] +[ new class ]

@@ -20,5 +20,5 @@ -[ new class ] +[ new class ] Index: openacs-4/packages/dotlrn/www/admin/classes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/classes.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/admin/classes.tcl 11 Jan 2002 06:33:26 -0000 1.4 +++ openacs-4/packages/dotlrn/www/admin/classes.tcl 12 Jan 2002 09:27:16 -0000 1.5 @@ -6,14 +6,14 @@ @creation-date 2001-11-04 @version $Id$ } -query { + {filter "select_current_class_instances"} } -properties { filter_bar:onevalue classes:multirow } set context_bar "Classes" -set filter select_current_class_instances set filter_bar [ad_dimensional { {filter "Term:" select_current_class_instances { Index: openacs-4/packages/dotlrn/www/admin/site-wide-admin-toggle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/site-wide-admin-toggle.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/site-wide-admin-toggle.tcl 12 Jan 2002 09:27:40 -0000 1.1 @@ -0,0 +1,20 @@ +# dotlrn/www/admin/site-wide-admin-toggle.tcl + +ad_page_contract { + @author yon (yon@milliped.com) + @creation-date Jan 12, 2002 + @version $Id: site-wide-admin-toggle.tcl,v 1.1 2002/01/12 09:27:40 yon Exp $ +} -query { + user_id + value + {referer "users"} +} -properties { +} + +if {[string equal $value "grant"] == 1} { + ad_permission_grant $user_id [acs_magic_object "security_context_root"] "admin" +} elseif {[string equal $value "revoke"] == 1} { + ad_permission_revoke $user_id [acs_magic_object "security_context_root"] "admin" +} + +ad_returnredirect $referer Index: openacs-4/packages/dotlrn/www/admin/user-edit-verify.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-edit-verify.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/www/admin/user-edit-verify.adp 11 Jan 2002 06:33:26 -0000 1.3 +++ openacs-4/packages/dotlrn/www/admin/user-edit-verify.adp 12 Jan 2002 09:27:16 -0000 1.4 @@ -3,12 +3,8 @@ @context_bar@ You're editing @first_names@ @last_name@. -

-

-You're asking to change the level of access of this user. This has strong repercussions. Are you user about this? - - +

- - +You're asking to change the level of access of this user. This has strong repercussions. Are you user about this? + Index: openacs-4/packages/dotlrn/www/admin/user-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn/www/admin/user-edit.tcl 10 Jan 2002 19:30:18 -0000 1.3 +++ openacs-4/packages/dotlrn/www/admin/user-edit.tcl 12 Jan 2002 09:27:16 -0000 1.4 @@ -1,12 +1,12 @@ - ad_page_contract { Edit a User - + @author Ben Adida (ben@openforce.net) @author yon (yon@openforce.net) @creation-date 2001-12-10 @version $Id$ -} { +} -query { + {referer "users"} user_id } @@ -24,7 +24,6 @@ element create edit_user read_private_data_p \ -label "Can Access Private Information?" -datatype text -widget select -options {{yes t} {no f}} - # Create a form of hidden vars form create verif_edit_user @@ -39,7 +38,7 @@ # We verified everything, now we make the change if {[form is_valid verif_edit_user]} { template::form get_values verif_edit_user user_id type_id rel_type read_private_data_p - + set rel_id [db_string select_rel_id { select rel_id from dotlrn_users @@ -56,9 +55,9 @@ # Update permissions acs_privacy::set_user_read_private_data -user_id $user_id -object_id [dotlrn::get_package_id] -value $read_private_data_p } - - ad_returnredirect "users" - return + + ad_returnredirect $referer + ad_script_abort } @@ -105,10 +104,10 @@ ad_return_template "user-edit-verify" return } - + # redirect - ad_returnredirect "users" - return + ad_returnredirect $referer + ad_script_abort } db_1row select_user_info {} Index: openacs-4/packages/dotlrn/www/admin/user-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-new-2.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/admin/user-new-2.tcl 10 Jan 2002 21:19:32 -0000 1.8 +++ openacs-4/packages/dotlrn/www/admin/user-new-2.tcl 12 Jan 2002 09:27:16 -0000 1.9 @@ -33,7 +33,7 @@ # redirect ad_returnredirect "users" - return + ad_script_abort } db_1row select_user_info "select first_names,last_name from registered_users where user_id= :user_id" 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.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/users-oracle.xql 10 Dec 2001 23:58:31 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/users-oracle.xql 12 Jan 2002 09:27:16 -0000 1.2 @@ -1,12 +1,21 @@ -oracle8.1.6 + oracle8.1.6 - - -select user_id, first_names, last_name, email, type, case when dotlrn_full_user_rels.rel_id is NULL then 't' else 'f' end as limited_access_p, acs_permission.permission_p(:dotlrn_package_id, user_id, 'read_private_data') as read_private_data_p from dotlrn_users, dotlrn_full_user_rels where dotlrn_users.rel_id= dotlrn_full_user_rels.rel_id(+) order by last_name - - - + + + select user_id, + first_names, + last_name, + email, + type, + case when dotlrn_full_user_rels.rel_id is null then 't' else 'f' end as limited_access_p, + acs_permission.permission_p(:dotlrn_package_id, user_id, 'read_private_data') as read_private_data_p, + acs_permission.permission_p(acs.magic_object_id('security_context_root'), user_id, 'admin') as site_wide_admin_p + from dotlrn_users, dotlrn_full_user_rels + where dotlrn_users.rel_id = dotlrn_full_user_rels.rel_id(+) + order by last_name + + 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.8 -r1.9 --- openacs-4/packages/dotlrn/www/admin/users.adp 11 Jan 2002 06:33:26 -0000 1.8 +++ openacs-4/packages/dotlrn/www/admin/users.adp 12 Jan 2002 09:27:16 -0000 1.9 @@ -3,40 +3,58 @@ @context_bar@

Users

- - - +
+ + + +
+ + + + + + + + -
UserTypeAccessRead Private Data?Site-wide Admin?
- - - - - - - <% set i 0 %> + <% -if {$i == 0} {set bgcolor white} else {set bgcolor #cccccc} -set i [expr 1 - $i] + if {$i == 0} {set bgcolor white} else {set bgcolor #cccccc} + set i [expr 1 - $i] %> - - - - - - + + + + + + + + -
UserTypeAccessRead Private Data?
@users.last_name@, @users.first_names@ (@users.email@)@users.type@limitedfullyesno
@users.last_name@, @users.first_names@ (@users.email@)@users.type@limitedfullyesno + + + yes + + + no + + + yes +
-
+
-

+

-
-Add a new dotLRN user: + + Add a new dotLRN user:
+ +

+ +Create a new user. 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.4 -r1.5 --- openacs-4/packages/dotlrn/www/admin/users.tcl 10 Jan 2002 21:19:32 -0000 1.4 +++ openacs-4/packages/dotlrn/www/admin/users.tcl 12 Jan 2002 09:27:16 -0000 1.5 @@ -3,9 +3,15 @@ @author Ben Adida (ben@openforce.net) @creation-date 2001-11-04 -} { +} -query { +} -properties { + context_bar:onevalue + user_id:onevalue + users:multirow } +set user_id [ad_conn user_id] + set dotlrn_package_id [dotlrn::get_package_id] # Currently, just present a list of dotLRN users Index: openacs-4/packages/dotlrn/www/admin/users.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/admin/users.xql 10 Jan 2002 19:30:18 -0000 1.5 +++ openacs-4/packages/dotlrn/www/admin/users.xql 12 Jan 2002 09:27:16 -0000 1.6 @@ -8,7 +8,8 @@ email, type, case when theme_id is null then 1 else 0 end as limited_access_p, - acs_permission__permission_p(:dotlrn_package_id, user_id, 'read_private_data') as read_private_data_p + acs_permission__permission_p(:dotlrn_package_id, user_id, 'read_private_data') as read_private_data_p, + acs_permission__permission_p(acs__magic_object_id('security_context_root'), user_id, 'admin') as site_wide_admin_p from dotlrn_users left join dotlrn_full_user_rels on dotlrn_users.rel_id = dotlrn_full_user_rels.rel_id order by last_name