--- loncom/homework/lonhomework.pm 2007/03/06 19:05:58 1.265 +++ loncom/homework/lonhomework.pm 2007/04/06 21:21:34 1.266 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.265 2007/03/06 19:05:58 albertel Exp $ +# $Id: lonhomework.pm,v 1.266 2007/04/06 21:21:34 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -662,9 +662,19 @@ sub handle_save_or_undo { if ((!$error) && (!copy($filebak,$file))) { $error=1; } if ((!$error) && (!move($filetmp,$filebak))) { $error=1; } if (!$error) { - &Apache::lonxml::info("
".&mt("Undid changes, Switched")." $filebak ".&mt("and")." $file
"); + &Apache::lonxml::info("". + &mt("Undid changes, Switched [_1] and [_2]", + ''.$filebak. + '', + ''.$file. + '')."
"); } else { - &Apache::lonxml::info("".&mt("Unable to undo, unable to switch")." $filebak ".&mt("and")." $file
"); + &Apache::lonxml::info("". + &mt("Unable to undo, unable to switch [_1] and [_2]", + ''. + $filebak.'', + ''. + $file.'')."
"); $error=1; } } else { @@ -672,20 +682,29 @@ sub handle_save_or_undo { my $fs=Apache::File->new(">$filebak"); if (defined($fs)) { print $fs $$problem; - &Apache::lonxml::info("".&mt("Making Backup to"). - " $filebak"); + &Apache::lonxml::info("".&mt("Making Backup to [_1]", + ''. + $filebak.''). + ""); } else { - &Apache::lonxml::info("".&mt("Unable to make backup")." $filebak"); + &Apache::lonxml::info("". + &mt("Unable to make backup [_1]", + ''. + $filebak.'').""); $error=2; } my $fh=Apache::File->new(">$file"); if (defined($fh)) { print $fh $$result; - &Apache::lonxml::info("".&mt("Saving Modifications to"). - " $file"); + &Apache::lonxml::info("".&mt("Saving Modifications to [_1]", + ''. + $file.'' ).""); } else { - &Apache::lonxml::info("". - &mt("Unable to write to")." $file"); + &Apache::lonxml::info(''. + &mt("Unable to write to [_1]", + ''. + $file.''). + ''); $error|=4; } } @@ -759,7 +778,7 @@ sub analyze { $answer_part); my $concatanswer= join("\0",@{ $answer_part }); if (($concatanswer eq '') || ($concatanswer=~/^\@/)) { - $answer_part = [''.&mt('Error').'']; + $answer_part = [''.&mt('Error').'']; } $seedexample{join("\0",$part,$i,@{$answer_part})}= $thisseed; @@ -999,7 +1018,7 @@ sub newproblem { my $dest = &Apache::lonnet::filelocation("",$request->uri); my $errormsg; if ($env{'form.newfile'}) { - $errormsg=''.&mt('You did not select a template.').'
'."\n"; + $errormsg=''.&mt('You did not select a template.').'
'."\n"; } my $instructions; my $start_page =