version 1.81, 2003/07/14 18:41:40
|
version 1.82.2.1, 2003/09/23 01:52:57
|
Line 93 sub setrandomnumber {
|
Line 93 sub setrandomnumber {
|
$rndmod+=&Apache::lonnet::numval($Apache::inputtags::response[-1]); |
$rndmod+=&Apache::lonnet::numval($Apache::inputtags::response[-1]); |
} |
} |
if ($rndseed =~/,/) { |
if ($rndseed =~/,/) { |
my ($num1,$num2)=split(/,/,$rndseed); |
{ |
$num1+=$rndmod; |
use integer; |
$num2+=$rndmod; |
my ($num1,$num2)=split(/,/,$rndseed); |
$rndseed="$num1,$num2"; |
$num1+=$rndmod; |
|
$num2+=$rndmod; |
|
$rndseed="$num1,$num2"; |
|
} |
} else { |
} else { |
$rndseed+=$rndmod; |
$rndseed+=$rndmod; |
} |
} |
Line 509 sub whichorder {
|
Line 512 sub whichorder {
|
return @whichopt; |
return @whichopt; |
} |
} |
|
|
|
sub show_answer { |
|
my $part = $Apache::inputtags::part; |
|
my $award = $Apache::lonhomework::history{"resource.$part.solved"}; |
|
my $status = $Apache::inputtags::status[-1]; |
|
return ( ($award =~ /^correct/ |
|
&& lc($Apache::lonhomework::problemstatus) ne 'no') |
|
|| $status eq "SHOW_ANSWER"); |
|
} |
1; |
1; |
__END__ |
__END__ |
|
|