--- loncom/homework/structuretags.pm 2010/12/19 21:12:20 1.480 +++ loncom/homework/structuretags.pm 2011/06/06 17:43:51 1.488 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.480 2010/12/19 21:12:20 raeburn Exp $ +# $Id: structuretags.pm,v 1.488 2011/06/06 17:43:51 www 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 } @@ -404,7 +411,9 @@ sub setup_rndseed { delete($env{'form.resetdata'}); delete($env{'form.newrandomization'}); } - if (defined($rndseed) && $rndseed ne int($rndseed)) { + $rndseed=~s/\,/\:/g; + $rndseed=~s/[^\w\d\:\-]//g; + if ((defined($rndseed)) && ($rndseed!~/^[\d\-]+\:[\d\-]+/)) { $rndseed=join(':',&Apache::lonnet::digest($rndseed)); } if ($Apache::lonhomework::history{'resource.CODE'}) { @@ -457,27 +466,48 @@ sub remember_problem_state { '; } +sub problem_edit_action_button { + my ($name,$action,$accesskey,$text,$flag)=@_; + my $actionscript="setmode(this.form,'$action')"; + return "\n"; +} + sub problem_edit_buttons { - return ' -