xowf::test_item::Question_manager method question_objs (public)

 <instance of xowf::test_item::Question_manager[i]> question_objs \
    [ -shuffle_id shuffle_id ] obj

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

For the provided assessment object, return the question objects in the right order, depending on the shuffle_id.

Switches:
-shuffle_id (optional, integer, defaults to "-1")
Parameters:
obj (required, object)

Testcases:
No testcase defined.
Source code:
:assert_assessment $obj
set form_objs [:load_question_objs $obj [:question_names $obj]]
#ns_log notice "question_objs from $obj => $form_objs shuffle_id $shuffle_id"

if {$shuffle_id > -1} {
  set result {}
  foreach i [::xowiki::randomized_indices -seed $shuffle_id [llength $form_objs]] {
    lappend result [lindex $form_objs $i]
  }
  set form_objs $result
}

#
# Return at most max items, when specified.
#
return [:max_items [$obj property max_items ""$form_objs]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: