--- loncom/homework/lonhomework.pm 2008/09/05 17:43:32 1.297
+++ loncom/homework/lonhomework.pm 2009/03/16 18:20:22 1.306
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.297 2008/09/05 17:43:32 raeburn Exp $
+# $Id: lonhomework.pm,v 1.306 2009/03/16 18:20:22 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -173,7 +173,7 @@ sub setup_vars {
sub createmenu {
my ($which,$request)=@_;
if ($which eq 'grade') {
- $request->print('');
@@ -855,8 +855,12 @@ sub editxmlmode {
my $result;
my $problem=&Apache::lonnet::getfile($file);
if ($problem eq -1) {
- &Apache::lonxml::error(" ".&mt('Unable to find').
- " $file");
+ &Apache::lonxml::error(
+ ' '
+ .&mt('Unable to find [_1]',
+ ''.$file.'')
+ .'');
+
$problem='';
}
if (defined($env{'form.editxmltext'}) || defined($env{'form.Undo'})) {
@@ -871,12 +875,6 @@ sub editxmlmode {
&renderpage($request,$file);
} else {
my ($rows,$cols) = &Apache::edit::textarea_sizes(\$problem);
- my $xml_help = '
'.
- &Apache::loncommon::helpLatexCheatsheet("Problem_Editor_XML_Index",
- "Problem Editing Help").
- ' | '.
- &Apache::loncommon::help_open_menu(undef,undef,5,'Authoring').
- ' |
';
if ($cols > 80) { $cols = 80; }
if ($cols < 70) { $cols = 70; }
if ($rows < 20) { $rows = 20; }
@@ -884,7 +882,7 @@ sub editxmlmode {
&Apache::edit::js_change_detection().
&Apache::loncommon::resize_textarea_js().
&Apache::structuretags::setmode_javascript().
- &Apache::lonhtmlcommon::dragmath_js();
+ &Apache::lonhtmlcommon::dragmath_js("EditMathPopup");
my $only_body = ($env{'environment.remote'} eq 'off')? 0 : 1;
my $dragmath_button =
&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1);
@@ -905,7 +903,7 @@ sub editxmlmode {
@@ -969,7 +967,7 @@ sub renderpage {
my $filename=(split('/',$file))[-1];
my $error =
" ".&mt('Unable to find [_1]',
- ' '.$filename.'')
+ ''.$filename.'')
."";
$result.=
&Apache::loncommon::simple_error_page($request,'Not available',
@@ -1140,7 +1138,7 @@ sub update_construct_style {
&& !defined($env{'form.newrandomization'})) {
if ((!$env{'form.style_file'} && $env{'construct.style'})
||$env{'form.clear_style_file'}) {
- &Apache::lonnet::delenv('construct\\.style');
+ &Apache::lonnet::delenv('construct.style');
} elsif ($env{'form.style_file'}
&& $env{'construct.style'} ne $env{'form.style_file'}) {
&Apache::lonnet::appenv({'construct.style' =>