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@: Feedback