version 1.135, 2002/11/11 22:37:23
|
version 1.136, 2002/11/12 05:05:27
|
Line 138 sub setup_rndseed {
|
Line 138 sub setup_rndseed {
|
$rndseed=time; |
$rndseed=time; |
$ENV{'form.rndseed'}=$rndseed; |
$ENV{'form.rndseed'}=$rndseed; |
} |
} |
|
&Apache::lonxml::debug("Setting rndseed to $rndseed"); |
&Apache::run::run('$external::randomseed='.$rndseed.';',$safeeval); |
&Apache::run::run('$external::randomseed='.$rndseed.';',$safeeval); |
} |
} |
return $rndseed; |
return $rndseed; |
Line 174 sub problem_web_to_edit_header {
|
Line 175 sub problem_web_to_edit_header {
|
<hr />'; |
<hr />'; |
my $numtoanalyze=$ENV{'form.numtoanalyze'}; |
my $numtoanalyze=$ENV{'form.numtoanalyze'}; |
if (!$numtoanalyze) { $numtoanalyze=100; } |
if (!$numtoanalyze) { $numtoanalyze=100; } |
#DISABLED for now. |
$result.= '<input type="submit" name="problemmode" value="Answer Distribution" /> |
#$result.= '<input type="submit" name="problemmode" value="Answer Distribution" /> |
<input type="text" name="numtoanalyze" value="'. |
# <input type="text" name="numtoanalyze" value="'. |
$numtoanalyze.'" size="5" /> <hr />'; |
# $numtoanalyze.'" size="5" /> <hr />'; |
|
return $result; |
return $result; |
} |
} |
|
|
Line 281 sub start_problem {
|
Line 281 sub start_problem {
|
&page_start($target,$token,$tagstack,$parstack,$parser,$safeeval); |
&page_start($target,$token,$tagstack,$parstack,$parser,$safeeval); |
if ($target eq 'tex' and $ENV{'request.symb'} =~ m/\.page_/) { $result = '';} |
if ($target eq 'tex' and $ENV{'request.symb'} =~ m/\.page_/) { $result = '';} |
|
|
|
if ($target eq 'analyze') { my $rndseed=&setup_rndseed($safeeval); } |
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') { |
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') { |
#handle exam checkout |
#handle exam checkout |
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |