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

 <instance of xowf::test_item::Answer_manager[i]> render_full_submission_form \
    [ -wf wf ] [ -submission submission ] \
    [ -filter_form_ids filter_form_ids ] [ -with_feedback ] \
    [ -with_correction_notes ]

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

Compute the HTML of the full submission of the user with all form fields instantiated according to randomization.

Switches:
-wf
(optional)
-submission
(optional)
-filter_form_ids
(optional)
used for filtering questions
-with_feedback
(optional)
-with_correction_notes
(optional)
Returns:
HTML of question form object containing all (wanted) questions

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:
#
# Flush all form fields, since their contents depend on
# randomization. In later versions, we should introduce a more
# intelligent caching respecting randomization.
#
foreach f [::xowiki::formfield::FormField info instances -closure] {
  #ns_log notice "FF could DESTROY $f [$f name]"
  if {[string match *_ [$f name]]} {
    #ns_log notice "FF DESTROY $f [$f name]"
    $f destroy
  }
}
$wf form_field_flush_cache

#
# The call to "render_content" calls actually the
# "summary_form" of online/inclass-exam-answer.wf when the submit
# instance is in state "done". We set the __feedback_mode to
# get the auto-correction included.
#
xo::cc eval_as_user -user_id [$submission creation_user] {
  $submission set __feedback_mode 2
  $submission set __form_objs $filter_form_ids
  $submission set __aggregated_form_options  "-with_feedback=$with_feedback -with_correction_notes=$with_correction_notes"
  set question_form [$submission render_content]
}

return $question_form
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: