xowf::test_item::Answer_manager method participant_result (protected)

 <instance of xowf::test_item::Answer_manager[i]> participant_result \
    [ -obj obj ] answerObj form_info form_field_objs

Defined in packages/xowf/tcl/test-item-procs.tcl

Switches:
-obj (optional, object)
Parameters:
answerObj (required, object)
form_info (required)
form_field_objs (required)

Testcases:
No testcase defined.
Source code:
:assert_answer_instance $answerObj
:assert_assessment $obj

set instance_attributes [$answerObj instance_attributes]
set answer [list item $answerObj]

foreach f $form_field_objs {
  set att [$f name]

  if {[dict exists $instance_attributes $att]} {
    set value [dict get $instance_attributes $att]
    #ns_log notice "### '$att' value '$value'"
    $answerObj combine_data_and_form_field_default 1 $f $value
    $f set_feedback 1

    #
    # TODO: world-cloud statistics make mostly sense for the
    # inclass quizzes, but there these require still an
    # interface via "reporting_obj" instead of "add_statistics"
    # (although, for the purposes of the inclass-quiz,
    # randomization is not an issue.
    #
    #$f add_statistics -options {word_statistics word_cloud}

    #
    # Leave the form-field in statistics mode in a state with
    # correct answers.
    #
    $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 $correction  evaluated_answer_result [$f set evaluated_answer_result]]
  }
}
return $answer
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: