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
(defaults to"-1"
) (optional)- Parameters:
- obj
position
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
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