Index: openacs-4/packages/assessment/lib/session-items.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/session-items.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/assessment/lib/session-items.tcl 8 Nov 2006 19:15:15 -0000 1.16 +++ openacs-4/packages/assessment/lib/session-items.tcl 15 May 2007 20:14:16 -0000 1.17 @@ -8,6 +8,13 @@ if {![info exists assessment_id]} { set assessment_id $assessment_data(assessment_id) } + +set admin_p [permission::permission_p \ + -party_id [ad_conn user_id] \ + -privilege admin \ + -object_id $assessment_id] + + # if we can tell this is the last section, next button should go to feedback for the entire assessment. set section_list [as::assessment::sections -assessment_id $assessment_id -session_id $session_id -sort_order_type $assessment_data(section_navigation) -random_p $assessment_data(random_p)] @@ -26,8 +33,7 @@ ad_form -name session_results_$section_id -mode display -form { {section_id:text(hidden) {value $section_id}} } -ns_log notice "assessment session-items.tcl show_feedback = '${show_feedback}'" -# todo: display feedback text + set feedback_count 0 db_multirow -extend { presentation_type html result_points feedback answered_p choice_orientation next_title next_pr_type num content has_feedback_p correct_p view} items session_items {} { set default_value [as::item_data::get -subject_id $subject_id -as_item_id $as_item_id -session_id $session_id] @@ -61,7 +67,7 @@ set item_data_id $values(item_data_id) array unset values set answered_p t - +#ns_log notice "points = $points result_points= $result_points" if { $points != 0 } { if {$result_points < $points} { set correct_p 0 @@ -75,7 +81,7 @@ } } else { set correct_p 1 - if {$show_feedback != "incorrect"} { + if {$show_feedback ne "incorrect"} { if { $feedback_right ne "" } { set feedback "$feedback_right" set has_feedback_p 1