Index: openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl,v
diff -u -r1.21.2.7 -r1.21.2.8
--- openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl 23 Jul 2007 18:01:13 -0000 1.21.2.7
+++ openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl 26 Jul 2007 00:13:10 -0000 1.21.2.8
@@ -155,6 +155,11 @@
array set values $default_value
set defaults $values(choice_answer)
}
+ db_1row item_type_data {}
+ ns_log notice "
+render mc
+num_correct_answers '${num_correct_answers}'
+"
if {![empty_string_p $session_id]} {
if {[empty_string_p $show_feedback] || $show_feedback == "none"} {
set choice_list ""
@@ -169,12 +174,12 @@
db_foreach get_sorted_choices_with_feedback {} {
set title [as::assessment::display_content -content_id $content_rev_id -filename $content_filename -content_type $content_type -title $title]
set pos [lsearch -exact -integer $defaults $choice_id]
- if {$pos>-1 && $correct_answer_p == "t" && $show_feedback != "incorrect"} {
+ if {$num_correct_answers > 0 && $pos>-1 && $correct_answer_p == "t" && $show_feedback != "incorrect"} {
lappend choice_list [list "$title
$feedback_text" $choice_id]
- } elseif {$pos>-1 && $correct_answer_p == "f" && $show_feedback != "correct"} {
+ } elseif {$num_correct_answers > 0 && $pos>-1 && $correct_answer_p == "f" && $show_feedback != "correct"} {
lappend choice_list [list "$title
$feedback_text" $choice_id]
} else {
- if {[llength $defaults] && $correct_answer_p == "t" && $show_feedback != "incorrect" && $show_feedback != "correct"} {
+ if {$num_correct_answers > 0 && [llength $defaults] && $correct_answer_p == "t" && $show_feedback != "incorrect" && $show_feedback != "correct"} {
lappend choice_list [list "$title
" $choice_id]
} else {
lappend choice_list [list $title $choice_id]
@@ -188,7 +193,6 @@
}
}
- db_1row item_type_data {}
set display_choices [list]
set correct_choices [list]