xowf::test_item::Question_manager method shuffled_index (public)
<instance of xowf::test_item::Question_manager> shuffled_index \ [ -shuffle_id shuffle_id ] obj position
Defined in packages/xowf/tcl/test-item-procs.tcl
Return the shuffled index position, in case shuffling is turned on.
- Switches:
- -shuffle_id (optional, integer, defaults to
"-1"
)- Parameters:
- obj (required, object)
- position (required)
- Testcases:
- No testcase defined.
Source code: if {$shuffle_id > -1} { # # Take always all questions as the basis for randomization, # also when "max_items" is set. # set shuffled [::xowiki::randomized_indices -seed $shuffle_id [:question_count -all $obj]] set position [lindex $shuffled $position] #ns_log notice "shuffled_index question_count [:question_count $obj] -> <$shuffled> -> position $position" } return $positionXQL Not present: Generic, PostgreSQL, Oracle