version 1.110, 2004/12/07 16:19:37
|
version 1.111, 2004/12/07 23:23:34
|
Line 132 sub setrandomnumber {
|
Line 132 sub setrandomnumber {
|
} else { |
} else { |
$rndmod=(&Apache::lonnet::numval3($Apache::inputtags::part) << 10); |
$rndmod=(&Apache::lonnet::numval3($Apache::inputtags::part) << 10); |
if (defined($Apache::inputtags::response[-1])) { |
if (defined($Apache::inputtags::response[-1])) { |
$rndmod+=&Apache::lonnet::numval3($Apache::inputtags::response[-1]); |
my $shift=(4*scalar(@Apache::inputtags::response))%20; |
|
$rndmod+=(&Apache::lonnet::numval3($Apache::inputtags::response[-1]) << $shift ); |
} |
} |
} |
} |
if ($rndseed =~/([,:])/) { |
if ($rndseed =~/([,:])/) { |
Line 150 sub setrandomnumber {
|
Line 151 sub setrandomnumber {
|
$rndseed=(($rndseed<<32)>>32); |
$rndseed=(($rndseed<<32)>>32); |
} |
} |
} |
} |
&Apache::lonxml::debug("randseed $rndseed"); |
&Apache::lonxml::debug("randseed $rndmod $rndseed"); |
&Apache::lonnet::setup_random_from_rndseed($rndseed); |
&Apache::lonnet::setup_random_from_rndseed($rndseed); |
return ''; |
return ''; |
} |
} |