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.21 -r1.21.4.1 --- openacs-4/packages/assessment/lib/session-items.tcl 1 Dec 2008 16:57:02 -0000 1.21 +++ openacs-4/packages/assessment/lib/session-items.tcl 18 Aug 2014 20:24:59 -0000 1.21.4.1 @@ -1,8 +1,8 @@ -if {![exists_and_not_null edit_p]} { +if {(![info exists edit_p] || $edit_p eq "")} { set edit_p 0 } -if {![exists_and_not_null feedback_only_p] } { +if {(![info exists feedback_only_p] || $feedback_only_p eq "") } { set feedback_only_p 0 } if {![info exists assessment_id]} { @@ -48,26 +48,26 @@ set presentation_type [as::item_form::add_item_to_form -name session_results_$section_id -section_id $section_id -item_id $as_item_id -session_id $session_id -default_value $default_value -show_feedback $show_feedback -random_p $assessment_data(random_p)] - if {$presentation_type == "fitb"} { + if {$presentation_type eq "fitb"} { regsub -all -line -nocase -- {$feedback_wrong" set has_feedback_p 1 @@ -98,17 +98,17 @@ } } else { set correct_p 1 - if {$presentation_type == "rb" || $presentation_type == "cb"} { + if {$presentation_type eq "rb" || $presentation_type eq "cb"} { set user_answers [db_list get_user_choice_answers {}] set correct_answers [db_list get_correct_choice_answers {}] - if { $presentation_type == "rb" } { + if { $presentation_type eq "rb" } { set user_answers [lindex $user_answers 0] if { [lsearch $correct_answers $user_answers] == -1 } { set correct_p 0 - if {$show_feedback != "correct"} { + if {$show_feedback ne "correct"} { if { $feedback_wrong ne "" } { set feedback "$feedback_wrong" set has_feedback_p 1 @@ -117,7 +117,7 @@ } } } else { - if {$show_feedback != "incorrect"} { + if {$show_feedback ne "incorrect"} { if { $feedback_right ne "" } { set feedback "$feedback_right" set has_feedback_p 1 @@ -143,7 +143,7 @@ } if { !$correct_p } { - if {$show_feedback != "correct"} { + if {$show_feedback ne "correct"} { if { $feedback_wrong ne "" } { set feedback "$feedback_wrong" set has_feedback_p 1 @@ -152,7 +152,7 @@ } } } else { - if {$show_feedback != "incorrect"} { + if {$show_feedback ne "incorrect"} { if { $feedback_right ne "" } { set feedback "$feedback_right" set has_feedback_p 1 @@ -182,7 +182,7 @@ } } -if { $feedback_only_p && $feedback_count == 0 && [exists_and_not_null next_url] } { +if { $feedback_only_p && $feedback_count == 0 && ([info exists next_url] && $next_url ne "") } { ad_returnredirect $next_url ad_script_abort }