Index: openacs-4/packages/acs-subsite/www/admin/set-reg-assessment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/Attic/set-reg-assessment.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/www/admin/set-reg-assessment.tcl 5 Apr 2005 18:26:35 -0000 1.5 +++ openacs-4/packages/acs-subsite/www/admin/set-reg-assessment.tcl 7 Apr 2005 18:02:28 -0000 1.6 @@ -4,10 +4,15 @@ @author Vivian Hernandez (vivian@viaro.net) Viaro Networks (www.viaro.net) @creation-date 2005-01-20 @cvs-id $Id: +} { + assessment_id:optional } -set value [parameter::get -parameter AsmForRegisterId] -set assessment_id $value + +if {![exists_and_not_null assessment_id]} { + set value [parameter::get -parameter AsmForRegisterId] + set assessment_id $value +} set install_p [apm_package_installed_p "assessment"] set mount_p [site_node::get_package_url -package_key assessment] if {$install_p == 0 || $mount_p == ""} { @@ -18,11 +23,11 @@ set instance_id [ db_list_of_lists get_instance_id {}] set new_url [apm_package_url_from_id [lindex $instance_id 0]] +set instance_name [ad_conn instance_name] +set page_title "$instance_name [_ acs-subsite.set_reg_asm]" -set page_title "[ad_conn instance_name] Set the assessment for registration" +set context [list "[_ acs-subsite.set_reg_asm]"] -set context [list "Set the assessment for registration"] - set subsite_id [ad_conn subsite_id] @@ -38,7 +43,7 @@ {label "[_ acs-subsite.choose_assessment]"} {options $assessments} {help_text "[_ acs-subsite.choose_assessment_help]"} - {value $value}} + {value $assessment_id}} {submit:text(submit) {label " OK "}} {edit:text(submit) @@ -50,11 +55,11 @@ set package_id [db_string package_id {}] set url [apm_package_url_from_id $package_id] } - ad_returnredirect "${url}asm-admin/one-a?assessment_id=$assessment_id" + ad_returnredirect "${url}asm-admin/one-a?assessment_id=$assessment_id®_p=1" } } else { parameter::set_value -package_id [ad_conn package_id] -parameter AsmForRegisterId -value $assessment_id - ad_returnredirect "set-reg-assessment" + ad_returnredirect "" } }