version 1.189, 2003/06/23 19:55:18
|
version 1.192, 2003/06/30 20:30:50
|
Line 149 sub setup_rndseed {
|
Line 149 sub setup_rndseed {
|
} |
} |
if ($ENV{'form.resetdata'} eq 'New Problem Variation' || |
if ($ENV{'form.resetdata'} eq 'New Problem Variation' || |
$ENV{'form.newrandomization'} eq 'New Randomization') { |
$ENV{'form.newrandomization'} eq 'New Randomization') { |
$rndseed=time; |
srand(time); |
if ($rndseed eq $ENV{'form.rndseed'}) { |
$rndseed=int(rand(2100000000)); |
srand($rndseed); |
|
$rndseed=int(rand(1000000000)); |
|
} |
|
$ENV{'form.rndseed'}=$rndseed; |
$ENV{'form.rndseed'}=$rndseed; |
delete($ENV{'form.resetdata'}); |
delete($ENV{'form.resetdata'}); |
delete($ENV{'form.newrandomization'}); |
delete($ENV{'form.newrandomization'}); |
Line 409 sub start_problem {
|
Line 406 sub start_problem {
|
} |
} |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
my $startminipage = ''; |
my $startminipage = ''; |
if ($ENV{'form.problem_split'} ne 'yes') { |
if (not $ENV{'form.problem_split'}=~/yes/) { |
$startminipage = '\begin{minipage}{\textwidth}'; |
$startminipage = '\begin{minipage}{\textwidth}'; |
} |
} |
my $name= &Apache::lonxml::get_param('name',$parstack,$safeeval); |
my $name= &Apache::lonxml::get_param('name',$parstack,$safeeval); |
Line 516 sub end_problem {
|
Line 513 sub end_problem {
|
$result.=&Apache::lonxml::xmlend(); |
$result.=&Apache::lonxml::xmlend(); |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
my $endminipage = ''; |
my $endminipage = ''; |
if ($ENV{'form.problem_split'} ne 'yes') { |
if (not $ENV{'form.problem_split'}=~/yes/) { |
$endminipage = '\end{minipage}'; |
$endminipage = '\end{minipage}'; |
} |
} |
$result .= '\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}'; |
$result .= '\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}'; |