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

 <instance of xowf::test_item::Question_manager[i]> add_seeds \
    [ -obj obj ] [ -seed seed ] [ -number number ]

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

Add property "seed" to the provided object, consisting of a list of the specified number of random values starting with a base seed. This can be used to use e.g. per user different random seeds depending on the position of an item.

Switches:
-obj (optional, object)
-seed (optional, integer)
-number (optional, integer)

Testcases:
No testcase defined.
Source code:
expr {srand($seed * [clock microseconds])}
set seeds {}
for {set i 0} {$i < $number} {incr i} {
  lappend seeds [expr {int(rand() * $seed * [clock microseconds])}]
}
$obj set_property -new 1 seeds $seeds
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: