Index: openacs-4/packages/xowf/tcl/test-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/test-item-procs.tcl,v diff -u -N -r1.7.2.27 -r1.7.2.28 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 8 Mar 2020 17:21:50 -0000 1.7.2.27 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 18 Mar 2020 17:19:38 -0000 1.7.2.28 @@ -475,6 +475,7 @@ ########################################################### Class create short_text_interaction -superclass TestItemField -parameter { + {nr 15} } short_text_interaction instproc initialize {} { @@ -487,7 +488,7 @@ :create_components [subst { {text {$widget,height=100px,label=#xowf.exercise-text#,plugins=OacsFs}} - {answer {short_text_field,repeat=1..5,label=}} + {answer {short_text_field,repeat=1..${:nr},label=}} }] set :__initialized 1 } @@ -607,6 +608,7 @@ ########################################################### Class create reorder_interaction -superclass TestItemField -parameter { + {nr 15} } reorder_interaction instproc initialize {} { @@ -619,7 +621,7 @@ :create_components [subst { {text {$widget,height=100px,label=#xowf.exercise-text#,plugins=OacsFs}} - {answer {text,repeat=1..10,label=#xowf.reorder_question_elements#}} + {answer {text,repeat=1..${:nr},label=#xowf.reorder_question_elements#}} }] set :__initialized 1 } @@ -680,6 +682,7 @@ ########################################################### Class create mc_interaction2 -superclass TestItemField -parameter { + {nr 15} {multiple true} } @@ -694,7 +697,7 @@ :create_components [subst { {text {$widget,height=100px,label=#xowf.exercise-text#,plugins=OacsFs}} - {answer {mc_field,repeat=1..10,label=}} + {answer {mc_field,repeat=1..${:nr},label=}} }] set :__initialized 1 } @@ -1297,11 +1300,16 @@ # $f make_correct #ns_log notice "FIELD $f [$f name] [$f info class] -> VALUE [$f set value]" - + if {[$f exists correction]} { + set correction [$f set correction] + } else { + set correction "" + ns_log warning "form-field [$f name] of type [$f info class] does not provide variable correction via 'make_correct'" + } lappend answer \ [list name $att \ value $value \ - correction [$f set correction] \ + correction $correction \ evaluated_answer_result [$f set evaluated_answer_result]] } } @@ -1452,6 +1460,16 @@ {-current_question ""} {-extra_text ""} } { + # + # Produce HTML code for an answers panel, containing the number + # of participants of an e-assessment and the number of + # participants, who have already answered. + # + # @param polling when specified, provide live updates + # of the numbers via AJAX calls + # @param extra_text optional extra text for the panel, + # has to be provided with valid HTML markup. + # set answers [xowf::test_item::answer_manager get_answers $wf] set nrParticipants [llength $answers]