--- loncom/homework/structuretags.pm 2003/06/20 14:45:19 1.188 +++ loncom/homework/structuretags.pm 2003/06/25 16:47:47 1.190 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.188 2003/06/20 14:45:19 bowersj2 Exp $ +# $Id: structuretags.pm,v 1.190 2003/06/25 16:47:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -149,11 +149,8 @@ sub setup_rndseed { } 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)); - } + srand(time); + $rndseed=int(rand(2100000000)); $ENV{'form.rndseed'}=$rndseed; delete($ENV{'form.resetdata'}); delete($ENV{'form.newrandomization'}); @@ -507,7 +504,8 @@ sub end_problem { } } elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER' || $status eq 'UNCHECKEDOUT' ) { - if ($target ne 'tex') { + if ($target ne 'tex' && + $ENV{'form.answer_output_mode'} ne 'tex') { $result.="\n"; } }