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
(defaults to "-1") (optional)
Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc question_objs xowf::test_item::Question_manager instproc question_objs test_create_test_items->xowf::test_item::Question_manager instproc question_objs xowiki::randomized_indices xowiki::randomized_indices (public) xowf::test_item::Question_manager instproc question_objs->xowiki::randomized_indices

Testcases:
create_test_items
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: