xowf::test_item::Answer_manager method answer_form_field_objs (public)

 <instance of xowf::test_item::Answer_manager[i]> answer_form_field_objs \
    [ -clear ] [ -wf wf ] [ -generic ] form_info

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

Instantiate the form_field objects of the provided form based on form_info.

Switches:
-clear (optional)
-wf (optional, object)
-generic (optional)
Parameters:
form_info (required)

Testcases:
No testcase defined.
Source code:
set key ::__test_item_answer_form_fields
if {$clear} {
  #
  # The -clear option is needed, when there are multiple
  # assessments protocols/tables on the same page (currently
  # not).
  #
  unset -nocomplain $key
} else {
  #ns_log notice "### answer_form_field_objs key exists [info exists $key]"
  if {![info exists $key]} {
    #ns_log notice "form_info: $form_info"
    set fc [lsort -unique [dict get $form_info disabled_form_constraints]]
    #ns_log notice "### FC $fc"
    set pc_params [::xo::cc perconnection_parameter_get_all]
    if {$generic} {
      set fc [:replace_in_fc -fc $fc shuffle_kind none]
      set fc [:replace_in_fc -fc $fc show_max ""]
    }
    set $key [$wf create_form_fields_from_form_constraints -lookup $fc]
    ::xo::cc perconnection_parameter_set_all $pc_params
    $wf form_field_index [set $key]
  }
  return [set $key]
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: