--- loncom/homework/structuretags.pm 2007/02/23 01:04:05 1.373 +++ loncom/homework/structuretags.pm 2007/02/24 01:44:14 1.374 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.373 2007/02/23 01:04:05 albertel Exp $ +# $Id: structuretags.pm,v 1.374 2007/02/24 01:44:14 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -88,6 +88,14 @@ sub page_start { $parstack,$parser,$safeeval); } + $extra_head.= ' + +'; + my %body_args; if (defined($found{'html'})) { $body_args{'skip_phases'}{'head'}=1; @@ -213,7 +221,8 @@ sub setup_rndseed { } $env{'form.rndseed'}=$rndseed; } - if ($env{'form.resetdata'} eq &mt('New Problem Variation') || + if ( ($env{'form.resetdata'} eq &mt('New Problem Variation') + && $env{'form.submitted'} eq 'yes') || $env{'form.newrandomization'} eq &mt('New Randomization')) { srand(time); $rndseed=int(rand(2100000000)); @@ -358,7 +367,8 @@ sub initialize_storage { my $namespace = $symb || $env{'request.uri'}; if ($env{'form.resetdata'} eq &mt('Reset Submissions') || - $env{'form.resetdata'} eq &mt('New Problem Variation') || + ($env{'form.resetdata'} eq &mt('New Problem Variation') + && $env{'form.submitted'} eq 'yes') || $env{'form.newrandomization'} eq &mt('New Randomization')) { &Apache::lonnet::tmpreset($namespace,'',$domain,$name); &Apache::lonxml::debug("Attempt reset");