--- loncom/homework/structuretags.pm 2003/05/14 16:49:13 1.173
+++ loncom/homework/structuretags.pm 2003/05/15 21:44:23 1.175
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.173 2003/05/14 16:49:13 albertel Exp $
+# $Id: structuretags.pm,v 1.175 2003/05/15 21:44:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -146,8 +146,13 @@ sub setup_rndseed {
$ENV{'form.rndseed'}=$rndseed;
}
}
- if ($ENV{'form.resetdata'} eq 'New Problem Variation') {
+ if ($ENV{'form.resetdata'} eq 'New Problem Variation' ||
+ $ENV{'form.newrandomization'} eq 'New Randomization') {
$rndseed=time;
+ if ($rndseed eq $ENV{'form.rndseed'}) {
+ srand($rndseed);
+ $rndseed=int(rand(1000000000));
+ }
$ENV{'form.rndseed'}=$rndseed;
}
&Apache::lonxml::debug("Setting rndseed to $rndseed");
@@ -177,10 +182,12 @@ sub problem_web_to_edit_header {
my $result.='
- Random Seed:
-
+
+
+
Show All Foils
@@ -493,7 +500,7 @@ sub end_problem {
if ($target eq 'web') {
$result.=&Apache::lonxml::xmlend();
} elsif ($target eq 'tex') {
- $result .= '\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}';
if (not $ENV{'request.symb'} =~ m/\.page_/) {
$result .= '\end{minipage}\end{document} ';
} else {