[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 06 Apr 2007 21:21:35 -0000
albertel Fri Apr 6 17:21:35 2007 EDT
Modified files:
/loncom/homework lonhomework.pm
Log:
- css and translation changes
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.265 loncom/homework/lonhomework.pm:1.266
--- loncom/homework/lonhomework.pm:1.265 Tue Mar 6 14:05:58 2007
+++ loncom/homework/lonhomework.pm Fri Apr 6 17:21:34 2007
@@ -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 @@
if ((!$error) && (!copy($filebak,$file))) { $error=1; }
if ((!$error) && (!move($filetmp,$filebak))) { $error=1; }
if (!$error) {
- &Apache::lonxml::info("<p><b>".&mt("Undid changes, Switched")." $filebak ".&mt("and")." $file</b></p>");
+ &Apache::lonxml::info("<p><b>".
+ &mt("Undid changes, Switched [_1] and [_2]",
+ '<span class="LC_filename">'.$filebak.
+ '</span>',
+ '<span class="LC_filename">'.$file.
+ '</span>')."</b></p>");
} else {
- &Apache::lonxml::info("<p><font color=\"red\" size=\"+1\"><b>".&mt("Unable to undo, unable to switch")." $filebak ".&mt("and")." $file</b></font></p>");
+ &Apache::lonxml::info("<p><span class=\"LC_error\">".
+ &mt("Unable to undo, unable to switch [_1] and [_2]",
+ '<span class="LC_filename">'.
+ $filebak.'</span>',
+ '<span class="LC_filename">'.
+ $file.'</span>')."</span></p>");
$error=1;
}
} else {
@@ -672,20 +682,29 @@
my $fs=Apache::File->new(">$filebak");
if (defined($fs)) {
print $fs $$problem;
- &Apache::lonxml::info("<b>".&mt("Making Backup to").
- " $filebak</b>");
+ &Apache::lonxml::info("<b>".&mt("Making Backup to [_1]",
+ '<span class="LC_filename">'.
+ $filebak.'</span>').
+ "</b>");
} else {
- &Apache::lonxml::info("<font color=\"red\" size=\"+1\"><b>".&mt("Unable to make backup")." $filebak</b></font>");
+ &Apache::lonxml::info("<span class=\"LC_error\">".
+ &mt("Unable to make backup [_1]",
+ '<span class="LC_filename">'.
+ $filebak.'</span>')."</span>");
$error=2;
}
my $fh=Apache::File->new(">$file");
if (defined($fh)) {
print $fh $$result;
- &Apache::lonxml::info("<b>".&mt("Saving Modifications to").
- " $file</b>");
+ &Apache::lonxml::info("<b>".&mt("Saving Modifications to [_1]",
+ '<span class="LC_filename">'.
+ $file.'</span>' )."</b>");
} else {
- &Apache::lonxml::info("<font color=\"red\" size=\"+1\"><b>".
- &mt("Unable to write to")." $file</b></font>");
+ &Apache::lonxml::info('<span class="LC_error">'.
+ &mt("Unable to write to [_1]",
+ '<span class="LC_filename">'.
+ $file.'</span>').
+ '</span>');
$error|=4;
}
}
@@ -759,7 +778,7 @@
$answer_part);
my $concatanswer= join("\0",@{ $answer_part });
if (($concatanswer eq '') || ($concatanswer=~/^\@/)) {
- $answer_part = ['<font color="red">'.&mt('Error').'</font>'];
+ $answer_part = ['<span class="LC_error">'.&mt('Error').'</span>'];
}
$seedexample{join("\0",$part,$i,@{$answer_part})}=
$thisseed;
@@ -999,7 +1018,7 @@
my $dest = &Apache::lonnet::filelocation("",$request->uri);
my $errormsg;
if ($env{'form.newfile'}) {
- $errormsg='<p><font color="red">'.&mt('You did not select a template.').'</font></p>'."\n";
+ $errormsg='<p><span class="LC_error">'.&mt('You did not select a template.').'</span></p>'."\n";
}
my $instructions;
my $start_page =