Index: openacs-4/packages/dotlrn/catalog/dotlrn.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/catalog/dotlrn.en_US.ISO-8859-1.xml,v diff -u -r1.33.2.6.4.18 -r1.33.2.6.4.19 --- openacs-4/packages/dotlrn/catalog/dotlrn.en_US.ISO-8859-1.xml 2 Mar 2005 19:55:43 -0000 1.33.2.6.4.18 +++ openacs-4/packages/dotlrn/catalog/dotlrn.en_US.ISO-8859-1.xml 6 Apr 2005 19:05:41 -0000 1.33.2.6.4.19 @@ -1,5 +1,5 @@ - + A copy of Access @@ -25,6 +25,8 @@ Add users to Add Users to Group Add/Drop Memberships + To visit the community's home page, point your browser at %package%, log in, and click on the %community_name% link in the "Groups" portlet. + You have been added to the "%community_name%" community at %package% Admin admin Control Panel @@ -72,6 +74,7 @@ cannot be removed Change Locale Choose the members of %community_name% to receive this message: + Class key Classes Class Classes @@ -127,14 +130,18 @@ Created CSV File Format Customize Layout + <p>Database error while trying to create the last user in the list above!<br> The transaction has been aborted, no users have been entered, and no e-mail notifications have been sent.<p> + <p>Datafile must include at least the email, first_names, last_name fields.<p> Deactivate ... Deactivate Users Deactivated Delete Delete empty %departments_pretty_name%. Used as title of page for deleting empty department. + Delete empty %pretty_name%. Department + Department key Error: %departments_pretty_name% must be empty to be deleted %departments_pretty_name% Name The name <strong>%department_pretty_name%</strong> is already in use. \n Please select a different name. @@ -184,6 +191,7 @@ Email Members Message email sent + <p>Email sent to %email%. End Date End date: Error sending mail @@ -540,6 +548,7 @@ Subgroups %subcommunities_pretty_name% Memberships Subject + Subject key Teaching Assistant Teaching Assistants teal @@ -603,9 +612,4 @@ Your icon is too large. The publisher of %system_name% has chosen to limit attachments to %max_attachments_bytes% bytes.\n You're editing You've chosen to add - You have been added to the "%community_name%" community at %package% - To visit the community's home page, point your browser at %package%, log in, and click on the %community_name% link in the "Groups" portlet. - <p>Email sent to %email%. - <p>Datafile must include at least the email, first_names, last_name fields.<p> - <p>Database error while trying to create the last user in the list above!<br> The transaction has been aborted, no users have been entered, and no e-mail notifications have been sent.<p> Index: openacs-4/packages/dotlrn/tcl/class-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/class-procs.tcl,v diff -u -r1.47.6.2 -r1.47.6.3 --- openacs-4/packages/dotlrn/tcl/class-procs.tcl 9 Jul 2004 21:19:31 -0000 1.47.6.2 +++ openacs-4/packages/dotlrn/tcl/class-procs.tcl 6 Apr 2005 19:05:41 -0000 1.47.6.3 @@ -83,6 +83,7 @@ } ad_proc -public check_class_key_valid_p { + {-community_type_key ""} {-class_key:required} {-department_key:required} } { @@ -97,7 +98,9 @@ } { - set community_type_key "$department_key.$class_key" + if [empty_string_p $community_type_key] { + set community_type_key "$department_key.$class_key" + } if {[db_0or1row collision_check {}]} { # got a collision @@ -124,17 +127,21 @@ } { if [empty_string_p $class_key] { - set class_key [dotlrn::generate_key -name $pretty_name] - } + set new_class_key $department_key.[dotlrn::generate_key -name $pretty_name] + } else { + set new_class_key $class_key + } # check if the name is already in use, if so, complain loudly if {![check_class_key_valid_p \ - -class_key $class_key \ - -department_key $department_key]} { - ad_return_complaint \ - 1 \ - "[_ dotlrn.The_name] $pretty_name [_ dotlrn.is_already_in_use]. -

[_ dotlrn.lt_Please_select_a_diffe]." + -community_type_key $new_class_key \ + -class_key $class_key \ + -department_key $department_key]} { + return +# ad_return_complaint \ +# 1 \ +# "Duplicate key error. The key $new_class_key already exists. +#

[_ dotlrn.lt_Please_select_a_diffe]." } db_transaction { @@ -184,6 +191,7 @@ ad_proc -public new_instance { {-class_key:required} + {-class_instance_key ""} {-term_id:required} {-pretty_name ""} {-description ""} @@ -205,6 +213,7 @@ } db_transaction { set community_id [dotlrn_community::new \ + -community_key $class_instance_key \ -description $description \ -community_type $class_key \ -object_type [community_type] \ Index: openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl,v diff -u -r1.24.6.1 -r1.24.6.2 --- openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl 25 Aug 2004 15:50:58 -0000 1.24.6.1 +++ openacs-4/packages/dotlrn/www/admin/class-instance-new.tcl 6 Apr 2005 19:05:41 -0000 1.24.6.2 @@ -76,6 +76,14 @@ -options [list [list [_ dotlrn.Yes] 1] [list [_ dotlrn.No] 0]] \ -value 1 +element create add_class_instance class_instance_key \ + -label [_ dotlrn.Class_instance_key] \ + -datatype text \ + -widget text \ + -html {size 60} \ + -value "" \ + -optional + element create add_class_instance referer \ -label [_ dotlrn.Referer] \ -datatype text \ @@ -84,9 +92,10 @@ if {[form is_valid add_class_instance]} { form get_values add_class_instance \ - class_key term pretty_name description join_policy add_instructor referer + class_key term pretty_name description join_policy add_instructor referer class_instance_key set class_instance_id [dotlrn_class::new_instance \ + -class_instance_key $class_instance_key \ -class_key $class_key \ -term_id $term \ -pretty_name $pretty_name \ Index: openacs-4/packages/dotlrn/www/admin/class-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class-new.tcl,v diff -u -r1.15.6.1 -r1.15.6.2 --- openacs-4/packages/dotlrn/www/admin/class-new.tcl 25 Aug 2004 15:50:58 -0000 1.15.6.1 +++ openacs-4/packages/dotlrn/www/admin/class-new.tcl 6 Apr 2005 19:05:41 -0000 1.15.6.2 @@ -59,6 +59,13 @@ -html {rows 5 cols 60 wrap soft} \ -optional +element create add_class subject_key \ + -label [_ dotlrn.Subject_key] \ + -datatype text \ + -widget text \ + -html {size 60 maxlength 100} \ + -optional + element create add_class referer \ -label [_ dotlrn.Referer] \ -datatype text \ @@ -67,9 +74,10 @@ if {[form is_valid add_class]} { form get_values add_class \ - department_key pretty_name description referer + department_key pretty_name description referer subject_key set class_key [dotlrn_class::new \ + -class_key $subject_key \ -department_key $department_key \ -pretty_name $pretty_name \ -description $description] Index: openacs-4/packages/dotlrn/www/admin/department-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/department-new.tcl,v diff -u -r1.8.6.1 -r1.8.6.2 --- openacs-4/packages/dotlrn/www/admin/department-new.tcl 25 Aug 2004 15:50:58 -0000 1.8.6.1 +++ openacs-4/packages/dotlrn/www/admin/department-new.tcl 6 Apr 2005 19:05:41 -0000 1.8.6.2 @@ -55,6 +55,13 @@ -html {size 60} \ -optional +element create add_department department_key \ + -label "[_ dotlrn.Department_key]" \ + -datatype text \ + -widget text \ + -html {size 60} \ + -optional + element create add_department referer \ -label "[_ dotlrn.Referer]" \ -datatype text \ @@ -63,9 +70,10 @@ if {[form is_valid add_department]} { form get_values add_department \ - pretty_name description external_url referer + pretty_name description external_url referer department_key set department_key [dotlrn_department::new \ + -department_key $department_key \ -pretty_name $pretty_name \ -description $description \ -external_url $external_url]