Index: openacs-4/packages/assessment/lib/assessment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/assessment.tcl,v diff -u -r1.18.2.2 -r1.18.2.3 --- openacs-4/packages/assessment/lib/assessment.tcl 2 Feb 2007 17:07:35 -0000 1.18.2.2 +++ openacs-4/packages/assessment/lib/assessment.tcl 5 Feb 2007 14:10:42 -0000 1.18.2.3 @@ -237,6 +237,7 @@ # for sections with a limited number of items per page if {![empty_string_p $display(num_items)] && $page_total > 1} { set progress_bar_list [template::util::number_list $page_total 1] + set total_pages [llength $progress_bar_list] } if {![info exists show_progress]} { set show_progress 0 @@ -245,6 +246,7 @@ if {![info exists progress_bar_list] && [llength $section_list] > 1} { set progress_bar_list [template::util::number_list [llength $section_list] 1] set current_page [expr {[lsearch $section_list $section_id] +1 }] + set total_pages [llength $progress_bar_list] } } } @@ -309,7 +311,7 @@ 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 next_asm section_id item_id_list:multiple single_section_id}] - ad_returnredirect [export_vars -base feedback {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple}] + ad_returnredirect [export_vars -base feedback {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple total_pages current_page}] ad_script_abort } else { # calculate session points at end of session @@ -324,7 +326,7 @@ } else { set return_url $assessment_data(return_url) } - ad_returnredirect [export_vars -base feedback {assessment_id session_id section_id return_url {return_p 1} item_id_list:multiple }] + ad_returnredirect [export_vars -base feedback {assessment_id session_id section_id return_url {return_p 1} item_id_list:multiple total_pages current_page}] ad_script_abort } } @@ -428,7 +430,7 @@ set after_submit "{ \# ad_returnredirect \[export_vars -base assessment {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple single_section_id}\] - ad_returnredirect \[export_vars -base feedback {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple single_section_id}\] + ad_returnredirect \[export_vars -base feedback {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple single_section_id total_pages current_page}\] ad_script_abort }" @@ -530,7 +532,7 @@ } set item_order \$new_item_order \# ad_returnredirect \[export_vars -base assessment {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple single_section_id}\] - ad_returnredirect \[export_vars -base feedback {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple nxt_url}\] + ad_returnredirect \[export_vars -base feedback {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple nxt_url total_pages current_page}\] ad_script_abort } else { # calculate session points at end of session @@ -545,7 +547,7 @@ } else { set return_url \$assessment_data(return_url) } - ad_returnredirect \[export_vars -base feedback {assessment_id session_id section_id return_url {return_p 1} item_id_list:multiple }\] + ad_returnredirect \[export_vars -base feedback {assessment_id session_id section_id return_url {return_p 1} item_id_list:multiple total_pages current_page}\] ad_script_abort } }" @@ -591,7 +593,7 @@ 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 next_asm section_id item_id_list:multiple single_section_id}] - ad_returnredirect [export_vars -base feedback {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple next_url}] + ad_returnredirect [export_vars -base feedback {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple next_url total_pages current_page}] ad_script_abort } else { # calculate session points at end of session @@ -607,12 +609,13 @@ set return_url $assessment_data(return_url) } # ad_returnredirect [export_vars -base assessment {assessment_id session_id section_order item_order password return_url next_asm section_id item_id_list:multiple single_section_id}] - ad_returnredirect [export_vars -base feedback {assessment_id session_id section_id return_url {return_p 1} item_id_list:multiple next_url}] + ad_returnredirect [export_vars -base feedback {assessment_id session_id section_id return_url {return_p 1} item_id_list:multiple next_url total_pages current_page}] ad_script_abort } } } set form_is_submit [template::form::is_submission show_item_form] set form_is_valid [template::form::is_valid show_item_form] -ad_return_template $template \ No newline at end of file +ad_return_template $template + Index: openacs-4/packages/assessment/lib/feedback.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/feedback.adp,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/assessment/lib/feedback.adp 27 Jun 2006 19:11:40 -0000 1.3 +++ openacs-4/packages/assessment/lib/feedback.adp 5 Feb 2007 14:10:42 -0000 1.3.2.1 @@ -1,7 +1,19 @@ +@assessment_data.html_title;noquote@ +@context;noquote@ - @assessment_data.html_title;noquote@ - @context;noquote@ +

@assessment_data.html_title;noquote@: Feedback

+ + + + +
+ @section_title@ + +

- Next \ No newline at end of file + + Next + +

Index: openacs-4/packages/assessment/lib/feedback.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/feedback.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/assessment/lib/feedback.tcl 12 Jul 2006 07:05:04 -0000 1.5 +++ openacs-4/packages/assessment/lib/feedback.tcl 5 Feb 2007 14:10:42 -0000 1.5.2.1 @@ -21,6 +21,8 @@ {item_id_list:multiple,optional {}} {next_url ""} no_complaint:optional + total_pages:optional + current_page:optional } -properties { } -validate { } -errors { @@ -34,6 +36,9 @@ set page_title "[_ assessment.Show_Items]" set context [list $page_title] ns_log notice "feedback.tcl '${next_url}' '${return_url}'" + +set section_title [db_string section_title "select title from cr_revisions where revision_id=:section_id"] + if { $next_url eq "" } { if { $return_p && [exists_and_not_null return_url] } { set next_url $return_url Index: openacs-4/packages/assessment/lib/session-items.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/session-items.adp,v diff -u -r1.12.2.1 -r1.12.2.2 --- openacs-4/packages/assessment/lib/session-items.adp 26 Jan 2007 00:33:57 -0000 1.12.2.1 +++ openacs-4/packages/assessment/lib/session-items.adp 5 Feb 2007 14:10:42 -0000 1.12.2.2 @@ -2,16 +2,20 @@ #assessment.not_answered# -