--- loncom/homework/structuretags.pm 2010/12/18 22:49:33 1.479 +++ loncom/homework/structuretags.pm 2011/01/13 18:11:45 1.485 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.479 2010/12/18 22:49:33 raeburn Exp $ +# $Id: structuretags.pm,v 1.485 2011/01/13 18:11:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -128,6 +128,7 @@ sub homework_js { &setmode_javascript(). <<'JS'; JS } @@ -153,49 +154,55 @@ JS sub setmode_javascript { return <<"ENDSCRIPT"; ENDSCRIPT } sub file_delchk_js { - my $delfilewarn = &mt('You have indicated you wish to delete some files previously included for submission.').'\\n'. - &mt('Deleted files will not be graded.').' '. - &mt('Submit Answer?'); + my $delfilewarn = &mt('You have indicated you wish to remove some files previously included in your submission.').'\\n'. + &mt('Continue submission with these files removed?'); return <<"ENDSCRIPT"; ENDSCRIPT } @@ -393,6 +400,7 @@ sub setup_rndseed { if ($tries) { $rndseed += $tries; } + $env{'form.'.$Apache::inputtags::part.'.rndseed'}=$rndseed; } if ( ($env{'form.resetdata'} eq &mt('New Problem Variation') && $env{'form.submitted'} eq 'yes') || @@ -717,13 +725,6 @@ sub finalize_storage { $namespace,'',$domain,$name); &Apache::lonxml::debug('Construct Store return message:'.$result); } else { - if ($Apache::lonhomework::type eq 'randomizetry') { - foreach my $key (keys(%Apache::lonhomework::results)) { - if ($key =~ /^resource\.([^\.]+)\.tries/) { - $Apache::lonhomework::results{'resource.'.$1.'.rndseed'}=$env{'form.'.$1.'.rndseed'}; - } - } - } $result=&Apache::lonnet::cstore(\%Apache::lonhomework::results, $symb,$courseid,$domain,$name); &Apache::lonxml::debug('Store return message:'.$result); @@ -804,12 +805,12 @@ sub store_aggregates { $cdomain,$cname); } if (keys(%anoncounter) > 0) { - &Apache::lonnet::cinc('nohist_anonsurveys',\%anoncounter, - $cdomain,$cname); + &Apache::lonnet::cput('nohist_anonsurveys',\%anoncounter, + $cdomain,$cname); } if (keys(%randtrycounter) > 0) { - &Apache::lonnet::cinc('nohist_randomizetry',\%randtrycounter, - $cdomain,$cname); + &Apache::lonnet::cput('nohist_randomizetry',\%randtrycounter, + $cdomain,$cname); } }