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)
-seed
(optional)
-number
(optional)

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

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