@@ -1628,6 +1681,9 @@ sub handler {
if ($env{'form.savethisfile'} || $env{'form.viewmode'} || $env{'form.Undo'}) {
my $html_file=&Apache::lonnet::getfile($file);
my $error = &Apache::lonhomework::handle_save_or_undo($request, \$html_file, \$env{'form.filecont'});
+ if ($env{'form.savethisfile'}) {
+ $env{'form.editmode'}='Edit'; #force edit mode
+ }
}
}
my %mystyle;
@@ -1734,7 +1790,8 @@ sub display_title {
$title = $env{'request.filename'};
$title = substr($title, rindex($title, '/') + 1);
}
- $result = "";
+ $result = "";
}
return $result;
}
@@ -1787,8 +1844,10 @@ sub error {
if ( &show_error_warn_msg() ) {
# If printing in construction space, put the error inside
push(@Apache::lonxml::error_messages,
- $Apache::lonxml::warnings_error_header.
- "
ERROR:".join("
\n",@errors)."
\n");
+ $Apache::lonxml::warnings_error_header
+ .'
'
+ .''.&mt('ERROR:').' '.join("
\n",@errors)
+ ."
\n");
$Apache::lonxml::warnings_error_header='';
} else {
my $errormsg;
@@ -1798,7 +1857,9 @@ sub error {
$errormsg=&mt("An error occured while processing this resource. The author has been notified.");
}
my $host=$Apache::lonnet::perlvar{'lonHostID'};
- push(@errors, "The error occurred on host
$host");
+ push(@errors,
+ &mt("The error occurred on host [_1]",
+ "
$host"));
my $msg = join('
', @errors);
@@ -1847,8 +1908,11 @@ sub warning {
if ($env{'form.grade_target'} ne 'tex') {
if ( &show_error_warn_msg() ) {
push(@Apache::lonxml::warning_messages,
- $Apache::lonxml::warnings_error_header.
- "
WARNING
:".join('
',@_)."
\n");
+ $Apache::lonxml::warnings_error_header
+ .'
'
+ .&mt('[_1]W[_2]ARNING','','').": ".join('
',@_)
+ ."
\n"
+ );
$Apache::lonxml::warnings_error_header='';
}
}