+ Produce a helpful context bar for .LRN users. The context + bar is intended to aid navigation inside applications mounted + under dotlrn packages (classes, communities, and the .LRN home). + The proc will fetch the context var from the callers scope with upvar. +
+ ++ Disclaimer: so far the proc has only been tested to work under + classes and communities. +
+ + @param community_id The id of the community/class we are at. + + @author Peter Marklund + } { + set community_context [dotlrn_community::navigation_context $community_id] + + upvar context context + + if { [exists_and_not_null context] } { + # The application context doesn't contain the application node itself so we need to prepend that + array set node_array [site_node::get -node_id [ad_conn node_id]] + set application_name $node_array(instance_name) + set application_url $node_array(url) + + if { [string match admin/* [ad_conn extra_url]] } { + set application_admin_context [list [list "${application_url}admin/" "Administration"]] + } else { + set application_admin_context [list] + } + + set application_context [list [list $application_url $application_name]] + + if { [llength $application_admin_context] > 0 } { + set application_context [concat $application_context $application_admin_context] + } + + if { ![empty_string_p $context] } { + set application_context [concat $application_context $context] + } else { + # Make last entry be just the label + set application_context [lreplace $application_context end end [lindex [lindex $application_context end] 1]] + } + } else { + set application_context [list] + } + + if { [llength $application_context] > 0 } { + set context_bar_context [concat $community_context $application_context] + } else { + # We need the last entry in the community context be just the label, so remove + # the URL + set community_context_last [lindex $community_context end] + set community_context_last_label [lindex $community_context_last 1] + + if { [llength $community_context] == 1} { + set context_bar_context [list $community_context_last_label] + } else { + set community_context_before_last [lrange $community_context 0 end-1] + set context_bar_context [concat $community_context_before_last [list $community_context_last_label]] + } + } + + return [dotlrn::raw_navbar $context_bar_context] + } + ad_proc -public navbar { { -community_id "" } { -community_type "" } @@ -100,7 +170,7 @@ } } - return "[join $list_of_links " > "]#dotlrn.lt_Help_and_Personal_Con# | +#dotlrn.lt_Help_and_Personal_Con# | ||||
+ |
|
- + | |||
#dotlrn.lt_JoinDrop_Classes_or_C# | +#dotlrn.lt_JoinDrop_Classes_or_C# | ||||
+ |
- |
- + | |||
- - - | +
+ + + | -@text@ | -- #dotlrn.user_portal_page_home_title# - #dotlrn.help# - #dotlrn.logout# - | ++ @user_name@ + | +|
+ #dotlrn.user_portal_page_home_title# + + #dotlrn.help# + + #dotlrn.logout# + | + + -||||
@navbar@ |
-
+ +
+
+
@navbar@ | ||
+
+ + -@navbar@ | ||
-
- - - - Index: openacs-4/packages/dotlrn/www/dotlrn-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-master.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/dotlrn/www/dotlrn-master.tcl 13 Dec 2002 16:06:33 -0000 1.15 +++ openacs-4/packages/dotlrn/www/dotlrn-master.tcl 29 May 2003 18:05:01 -0000 1.16 @@ -42,13 +42,12 @@ # # $Id$ - set user_id [ad_get_user_id] set community_id [dotlrn_community::get_community_id] set dotlrn_url [dotlrn::get_url] -#Scope Related graphics/css parameters +#Scope Related graphics/css parameters # Set everything for user level scope as default then modify it later as we refine the scope. set scope_name "user" set scope_main_color "#003366" @@ -62,13 +61,13 @@ set header_font_size "medium" set header_font_color "black" set header_logo_item_id "" -set header_img_url "/graphics/logo" +set header_img_url "$dotlrn_url/graphics/logo" +set header_img_file "[acs_root_dir]/packages/dotlrn/www/graphics/logo" set header_img_alt_text "Header Logo" set extra_spaces "" set td_align "align=\"center\" valign=\"top\"" - if {[dotlrn::user_p -user_id $user_id]} { set portal_id [dotlrn::get_portal_id -user_id $user_id] } @@ -101,17 +100,23 @@ set link $return_url } - if {![info exists link_control_panel]} { set link_control_panel 1 } -if {![info exists control_panel_text]} { - set control_panel_text "Control Panel" +if { ![string equal [ad_conn package_key] [dotlrn::package_key]] } { + # Peter M: We are in a package (an application) that may or may not be under a dotlrn instance + # (i.e. in a news instance of a class) + # and we want all links in the navbar to be active so the user can return easily to the class homepage + # or to the My Space page + set link_all 1 } if {$have_comm_id_p} { + # in a community or just under one in a mounted package like /calendar # get this comm's info + set control_panel_text "Administer" + set portal_id [dotlrn_community::get_portal_id -community_id $community_id] set text [dotlrn_community::get_community_header_name $community_id] set link [dotlrn_community::get_community_url $community_id] @@ -130,6 +135,8 @@ set portal_id "" } } elseif {[parameter::get -parameter community_type_level_p] == 1} { + set control_panel_text "Administer" + set extra_td_html "" set link_all 1 set link [dotlrn::get_url] @@ -145,6 +152,7 @@ } } else { # we could be anywhere (maybe under /dotlrn, maybe not) + set control_panel_text "My Account" set link "[dotlrn::get_url]/" set community_id "" set text "" @@ -177,10 +185,10 @@ # Set up some basic stuff set user_id [ad_get_user_id] -set full_name "[dotlrn::get_user_name $user_id]" +set user_name "[dotlrn::get_user_name $user_id]" if {![exists_and_not_null title]} { - set title "SloanSpace" + set title ".LRN" } if {[empty_string_p [dotlrn_community::get_parent_community_id -package_id [ad_conn package_id]]]} { @@ -225,9 +233,18 @@ } } - set header_img_url "$header_img_url-$scope_name.gif" + # DRB: default logo for dotlrn is a JPEG provided by Collaboraid. This can + # be replaced by custom gifs if prefered (as is done by SloanSpace) - # font hack + if { [file exists "$header_img_file-$scope_name.jpg"] } { + set header_img_url "$header_img_url-$scope_name.jpg" + } elseif { [file exists "$header_img_file-$scope_name.gif"] } { + set header_img_url "$header_img_url-$scope_name.gif" + } + + # set header_img_url "$header_img_url-$scope_name.gif" + + # font hack set community_header_font [dotlrn_community::get_attribute \ -community_id $community_id \ -attribute_name header_font @@ -270,17 +287,29 @@ set header_img_alt_text $header_logo_alt_text } - # The header text is the name of the community - set text [dotlrn_community::get_community_header_name $community_id] + set text [dotlrn::user_context_bar -community_id $community_id] + if { [string equal [ad_conn package_key] [dotlrn::package_key]] } { + set text "$text" + } + } elseif {[parameter::get -parameter community_type_level_p] == 1} { - # in a community type + # in a community type (subject) set text \ [dotlrn_community::get_community_type_name [dotlrn_community::get_community_type]] } else { # under /dotlrn - set header_img_url "$header_img_url-$scope_name.gif" - set text $full_name + + # DRB: default logo for dotlrn is a JPEG provided by Collaboraid. This can + # be replaced by custom gifs if prefered (as is done by SloanSpace) + + if { [file exists "$header_img_file-$scope_name.jpg"] } { + set header_img_url "$header_img_url-$scope_name.jpg" + } elseif { [file exists "$header_img_file-$scope_name.gif"] } { + set header_img_url "$header_img_url-$scope_name.gif" + } + + set text "" } if { ![info exists header_stuff] } { @@ -316,7 +345,6 @@ } - H2.portal-page-name { FONT-WEIGHT: bold; FONT-SIZE: medium; COLOR: black; FONT-FAMILY: Arial, Helvetica, sans-serif; margin-top: 5px; margin-left: 5px; } @@ -540,14 +568,22 @@ ALIGN: center; } -.new_flag { - color: #CD0000; -} " +# Focus +multirow create attribute key value + +if { ![template::util::is_nil focus] } { + # Handle elements wohse name contains a dot + regexp {^([^.]*)\.(.*)$} $focus match form_name element_name + + template::multirow append \ + attribute onload "javascript:document.forms\['${form_name}'\].elements\['${element_name}'\].focus()" +} + # Developer-support support set ds_enabled_p [parameter::get_from_package_key \ -package_key acs-developer-support \ @@ -561,6 +597,4 @@ set ds_link {} } -set color_1pixel "/shared/1pixel.tcl?[export_vars { { r 204 } { g 0 } { b 0 }}]" - set change_locale_url "/acs-lang/?[export_vars { { package_id "[ad_conn package_id]" } }]" Index: openacs-4/packages/dotlrn/www/help.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/help.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/help.adp 4 Dec 2002 09:51:04 -0000 1.8 +++ openacs-4/packages/dotlrn/www/help.adp 29 May 2003 18:05:01 -0000 1.9 @@ -30,20 +30,20 @@ your password, correct or change your full name, publish a URL for a your website, and change your login name/email address. If you do not keep this login name the same as your current email address or a forwarding address, you will not - receive group emails and forum alerts from SloanSpace. + receive group emails and forum alerts from .LRN.To Change Password:
-
To change personal information:
-
To join/drop classes and communities:
-
To join/drop subgroups:
Requesting a New Class or Community
The Site Wide Administrator handles class and community requests.
To request a new class or to copy and reuse a class from a previous semester:
@@ -96,12 +96,12 @@
of any persons who will need to be administrators of this community. You will
be notified by email when the community shell has been created.
Bulk Mail
- Class and community administrators can send group emails through the group Control
- Panel page. If enabled, class and community members can send group emails through
- the "Email Members" links on the user Control Panel page.
To send a group email:
-
Modifying Your Forum Email Alerts
You can subscribe and unsubscribe to email alerts for any forum open to you
- through the "Edit My Forum Email Alerts" link on the user Control Panel page.
- Limited Access users can access their Control Panel through the Help icon
+ through the "Edit My Forum Email Alerts" link on the My Account page.
+ Limited Access users can access their My Account page through the Help icon
in the group banner.
Additional Help
- If your specific question is not answered here, consult the User or Admin
- Handbooks located in the file storage area of the STS-Sloanwide community.
- If you still cannot find the answer to your question or problem, email the
- Site Wide Administrator at sloanspace-help@sloan.mit.edu.
#dotlrn.are_you_sure_you_want_to_send# @spam_name@ #dotlrn.Message#?
@@ -56,7 +53,3 @@ @confirm_data@ - - - - Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/spam-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/spam-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dotlrn/www/spam.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/spam.adp,v diff -u -r1.18 -r1.19 --- openacs-4/packages/dotlrn/www/spam.adp 4 Dec 2002 09:51:04 -0000 1.18 +++ openacs-4/packages/dotlrn/www/spam.adp 29 May 2003 18:05:01 -0000 1.19 @@ -26,6 +26,3 @@"
-set list_of_user_ids [list]
+set list_of_user [list]
+set list_of_addresses_and_passwords [list]
# Do the stuff
# We can't do this too generically, so we'll just do the CSV stuff right here
db_transaction {
- set fail_p 0
oacs_util::csv_foreach -file $file_location -array_name row {
+
+ # First make sure the required data is there
+
+ if { ![info exists row(email)] || ![info exists row(first_names)] || ![info exists row(last_name)] } {
+ doc_body_append "
Datafile must include at least the email, first_names and last_name fields
"
+ db_abort_transaction
+ return
+ }
+
# We need to insert the ACS user
set password [ad_generate_random_string]
# Check if this user already exists
set user_id [cc_lookup_email_user $row(email)]
if {![empty_string_p $user_id]} {
doc_body_append [_ dotlrn.user_email_already_exists [list user_email $row(email)]]
- lappend list_of_user_ids $user_id
+ lappend list_of_users $user_id
} else {
set user_id [ad_user_new $row(email) $row(first_names) $row(last_name) $password "" "" "" "t" "approved"]
- lappend list_of_user_ids $user_id
+ lappend list_of_users $user_id
if {![info exists row(type)]} {
set row(type) student
@@ -69,7 +78,13 @@
if {![info exists row(guest)]} {
set row(guest) f
}
+
+ if {![info exists row(id)]} {
+ set row(id) $row(email)
+ }
+ doc_body_append "Creating user $row(email)...."
+
# Now we make them a dotLRN user
switch -exact $row(access_level) {
limited {
@@ -105,13 +120,40 @@
} else {
doc_body_append "[_ dotlrn.email_sent]"
}
+
+ lappend list_of_addresses_and_passwords $row(email) $password
}
doc_body_append "
"
}
+} on_error {
+ doc_body_append "
The database choked while trying to create the last user in the list above!
The transaction has been aborted, no users have been entered, and no e-mail notifications have been sent.
" + ad_script_abort } +set fail_p 0 + +doc_body_append "
Sending email notifications to users...
"
+
+foreach {email password} $list_of_addresses_and_passwords {
+ if { ![string equal $password ""] } {
+ set message "
+You have been added as a user to [ad_system_name] at [ad_parameter -package_id [ad_acs_kernel_id] SystemURL].
+
+Login: $email
+Password: $password
+"
+ # Send note to new user
+ if [catch {ns_sendmail "$email" "$admin_email" "You have been added as a user to [ad_system_name] at [ad_parameter -package_id [ad_acs_kernel_id] SystemURL]" "$message"} errmsg] {
+ doc_body_append "emailing \"$email\" failed!
"
+ set fail_p 1
+ } else {
+ doc_body_append "email sent to \"$email\"
"
+ }
+ }
+}
+
if {$fail_p} {
doc_body_append "
[_ dotlrn.lt_Some_of_the_emails_fa]
" } @@ -121,4 +163,3 @@ [_ dotlrn.lt_You_may_now_choose_to]
"
doc_body_append "[_ dotlrn.or_return_to] [_ dotlrn.User_Management]."
-
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.13 -r1.14
--- openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql 4 Dec 2002 09:51:04 -0000 1.13
+++ openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql 29 May 2003 18:05:01 -0000 1.14
@@ -41,6 +41,7 @@
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 users.email_verified_p = 't'
and not exists (select 1
from acs_rels a,
dotlrn_user_types
Index: openacs-4/packages/dotlrn/www/admin/users-chunk-large-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-large-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/www/admin/users-chunk-large-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.2
+++ openacs-4/packages/dotlrn/www/admin/users-chunk-large-postgresql.xql 29 May 2003 18:05:01 -0000 1.3
@@ -41,6 +41,7 @@
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 users.email_verified_p = 't'
and not exists (select 1
from acs_rels a,
dotlrn_user_types
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.14 -r1.15
--- openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql 4 Dec 2002 09:51:04 -0000 1.14
+++ openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql 29 May 2003 18:05:01 -0000 1.15
@@ -52,6 +52,7 @@
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 users.email_verified_p = 't'
and not exists (select 1
from acs_rels a,
dotlrn_user_types
Index: openacs-4/packages/dotlrn/www/admin/users-chunk-medium-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-medium-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/www/admin/users-chunk-medium-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.2
+++ openacs-4/packages/dotlrn/www/admin/users-chunk-medium-postgresql.xql 29 May 2003 18:05:01 -0000 1.3
@@ -52,6 +52,7 @@
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 users.email_verified_p = 't'
and not exists (select 1
from acs_rels a,
dotlrn_user_types
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.14 -r1.15
--- openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql 4 Dec 2002 09:51:04 -0000 1.14
+++ openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql 29 May 2003 18:05:01 -0000 1.15
@@ -36,6 +36,7 @@
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 users.email_verified_p = 't'
and not exists (select 1
from acs_rels a,
dotlrn_user_types
Index: openacs-4/packages/dotlrn/www/admin/users-chunk-small-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-small-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/www/admin/users-chunk-small-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.2
+++ openacs-4/packages/dotlrn/www/admin/users-chunk-small-postgresql.xql 29 May 2003 18:05:01 -0000 1.3
@@ -37,6 +37,7 @@
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 users.email_verified_p = 't'
and not exists (select 1
from acs_rels a,
dotlrn_user_types
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/doc/dotlrn-install.html'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/graphics/logo-comm.jpg'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/graphics/logo-course.jpg'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/graphics/logo-user.jpg'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/dotlrn-bm/dotlrn-bm.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-bm/dotlrn-bm.info,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn-bm/dotlrn-bm.info 2 Jul 2002 23:01:50 -0000 1.3
+++ openacs-4/packages/dotlrn-bm/dotlrn-bm.info 29 May 2003 18:05:17 -0000 1.4
@@ -18,13 +18,6 @@
-
+
Index: openacs-4/packages/new-portal/www/themes/sloan-theme.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/themes/sloan-theme.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/new-portal/www/themes/sloan-theme.adp 4 Dec 2002 09:54:47 -0000 1.2
+++ openacs-4/packages/new-portal/www/themes/sloan-theme.adp 29 May 2003 18:04:55 -0000 1.3
@@ -25,9 +25,9 @@
|
|||||
+ |
|
- + | |||
-
+