Index: openacs-4/packages/assessment/www/assessment-consent.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/assessment-consent.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/assessment/www/assessment-consent.tcl 6 May 2005 15:57:13 -0000 1.4 +++ openacs-4/packages/assessment/www/assessment-consent.tcl 9 May 2005 21:58:24 -0000 1.5 @@ -8,6 +8,7 @@ session_id:integer,notnull assessment_id:integer,notnull {password:optional ""} + {next_asm:optional} } -properties { context:onevalue page_title:onevalue Index: openacs-4/packages/assessment/www/assessment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/Attic/assessment.tcl,v diff -u -r1.46 -r1.47 --- openacs-4/packages/assessment/www/assessment.tcl 6 May 2005 16:07:13 -0000 1.46 +++ openacs-4/packages/assessment/www/assessment.tcl 9 May 2005 21:58:24 -0000 1.47 @@ -14,6 +14,7 @@ {item_id ""} {return_url:optional} response_to_item:array,optional,multiple,html + {next_asm:optional} } -properties { context:onevalue page_title:onevalue @@ -27,13 +28,15 @@ set url "" if { [info exists return_url] } { + set url $return_url ns_log notice "$return_url" } set return_url "$url" + # Get the assessment data as::assessment::data -assessment_id $assessment_id permission::require_permission -object_id $assessment_id -privilege read @@ -62,13 +65,13 @@ # set the time when the subject initiated the Assessment db_dml session_start {} } else { - set consent_url [export_vars -base assessment-consent {assessment_id session_id password return_url}] + set consent_url [export_vars -base assessment-consent {assessment_id session_id password return_url next_asm}] } } else { # pick up old session db_1row unfinished_section_order {} if {[empty_string_p $section_order]} { - set consent_url [export_vars -base assessment-consent {assessment_id session_id password return_url}] + set consent_url [export_vars -base assessment-consent {assessment_id session_id password return_url next_asm}] } else { db_1row unfinished_section_id {} db_1row unfinished_item_order {} @@ -227,7 +230,7 @@ # go to next section set section_order $new_section_order set item_order $new_item_order - ad_returnredirect [export_vars -base assessment {assessment_id session_id section_order item_order password return_url}] + ad_returnredirect [export_vars -base assessment {assessment_id session_id section_order item_order password return_url next_asm}] ad_script_abort } else { # calculate session points at end of session @@ -236,7 +239,7 @@ as::assessment::check::eval_aa_checks -session_id $session_id -assessment_id $assessment_id as::assessment::check::eval_m_checks -session_id $session_id -assessment_id $assessment_id if {[empty_string_p $assessment_data(return_url)]} { - ad_returnredirect [export_vars -base finish {session_id assessment_id return_url}] + ad_returnredirect [export_vars -base finish {session_id assessment_id return_url next_asm}] } else { ad_returnredirect $assessment_data(return_url) } @@ -246,7 +249,7 @@ # form for display an assessment with sections and items -ad_form -name show_item_form -action assessment -html {enctype multipart/form-data} -export {assessment_id section_id section_order item_order password return_url} -form { +ad_form -name show_item_form -action assessment -html {enctype multipart/form-data} -export { next_asm assessment_id section_id section_order item_order password return_url} -form { {session_id:text(hidden) {value $session_id}} } @@ -295,7 +298,7 @@ } # create seperate submit form for each item - ad_form -name show_item_form_$as_item_id -mode $mode -action assessment -html {enctype multipart/form-data} -export {assessment_id section_id section_order item_order password return_url} -form { + ad_form -name show_item_form_$as_item_id -mode $mode -action assessment -html {enctype multipart/form-data} -export {assessment_id section_id section_order item_order password return_url next_asm} -form { {session_id:text(hidden) {value $session_id}} {item_id:text(hidden) {value $as_item_id}} } @@ -325,7 +328,7 @@ } }" set after_submit "{ - ad_returnredirect \[export_vars -base assessment {assessment_id session_id section_order item_order password return_url}\] + ad_returnredirect \[export_vars -base assessment {assessment_id session_id section_order item_order password return_url next_asm}\] ad_script_abort }" @@ -416,7 +419,7 @@ } set item_order \$new_item_order - ad_returnredirect \[export_vars -base assessment {assessment_id session_id section_order item_order password return_url}\] + ad_returnredirect \[export_vars -base assessment {assessment_id session_id section_order item_order password return_url next_asm}\] ad_script_abort } else { # calculate session points at end of session @@ -425,7 +428,7 @@ as::assessment::check::eval_aa_checks -session_id $session_id -assessment_id $assessment_id as::assessment::check::eval_m_checks -session_id $session_id -assessment_id $assessment_id if {\[empty_string_p \$assessment_data(return_url)\]} { - ad_returnredirect \[export_vars -base finish {session_id assessment_id return_url}\] + ad_returnredirect \[export_vars -base finish {session_id assessment_id return_url next_asm}\] } else { ad_returnredirect \$assessment_data(return_url) } @@ -462,7 +465,7 @@ # go to next section set section_order $new_section_order set item_order $new_item_order - ad_returnredirect [export_vars -base assessment {assessment_id session_id section_order item_order password return_url}] + ad_returnredirect [export_vars -base assessment {assessment_id session_id section_order item_order password return_url next_asm}] ad_script_abort } else { # calculate session points at end of session @@ -471,7 +474,7 @@ as::assessment::check::eval_aa_checks -session_id $session_id -assessment_id $assessment_id as::assessment::check::eval_m_checks -session_id $session_id -assessment_id $assessment_id if {[empty_string_p $assessment_data(return_url)]} { - ad_returnredirect [export_vars -base finish {session_id assessment_id return_url}] + ad_returnredirect [export_vars -base finish {session_id assessment_id return_url next_asm}] } else { ad_returnredirect $assessment_data(return_url) } Index: openacs-4/packages/assessment/www/finish.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/finish.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/assessment/www/finish.tcl 6 May 2005 16:07:13 -0000 1.5 +++ openacs-4/packages/assessment/www/finish.tcl 9 May 2005 21:58:24 -0000 1.6 @@ -8,15 +8,16 @@ session_id:integer,notnull assessment_id:integer,notnull return_url:optional + next_asm:optional } -properties { context:onevalue page_title:onevalue } set user_id [ad_conn user_id] - if { $user_id != 0} { db_dml update_session {update as_sessions set subject_id=:user_id where session_id=:session_id} + } if {[info exists return_url]} { @@ -28,4 +29,8 @@ set context [list $page_title] +if { [exists_and_not_null next_asm ] } { + ad_returnredirect "assessment?assessment_id=$next_asm" +} + ad_return_template Index: openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp 22 Feb 2005 22:00:56 -0000 1.8 +++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp 9 May 2005 21:59:07 -0000 1.9 @@ -82,7 +82,7 @@ - #dotlrn-catalog.enroll# + #dotlrn-catalog.enroll#
Index: openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl 22 Feb 2005 22:00:56 -0000 1.6 +++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl 9 May 2005 21:59:07 -0000 1.7 @@ -31,12 +31,12 @@ } set category_p [db_string get_category { } -default -1] - set info [ad_html_text_convert -from text/enhanced -to text/plain $info] - +set reg_asm_id [parameter::get -parameter AsmForRegisterId -package_id [ad_conn subsite_id]] set cc_package_id [apm_package_id_from_key "dotlrn-catalog"] set tree_id [db_string get_tree_id { } -default "-1"] + # Get the category name set category_name "[category::get_name [category::get_mapped_categories $course_id]]" @@ -132,8 +132,13 @@ } } +#Send the registration assessment_id +set reg_chunck "assessment_id=$asmid" +if { ![string eq $reg_asm_id 0] } { + set reg_chunck "assessment_id=$reg_asm_id&next_asm=$asmid" +} @@ -147,3 +152,5 @@ + + Index: openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql 21 Feb 2005 19:22:12 -0000 1.4 +++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql 9 May 2005 21:59:07 -0000 1.5 @@ -34,5 +34,7 @@ where community_id in $dotlrn_com order by pretty_name + + \ No newline at end of file