[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /homework lonhomework.pm

raeburn raeburn@source.lon-capa.org
Fri, 20 Mar 2009 20:36:41 -0000


raeburn		Fri Mar 20 20:36:41 2009 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/homework	lonhomework.pm 
  Log:
  - Backport part of 1.301, 1.303, 1.304, 1.305, 1.306.
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.298 loncom/homework/lonhomework.pm:1.298.2.1
--- loncom/homework/lonhomework.pm:1.298	Tue Oct  7 10:13:06 2008
+++ loncom/homework/lonhomework.pm	Fri Mar 20 20:36:41 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.298 2008/10/07 10:13:06 foxr Exp $
+# $Id: lonhomework.pm,v 1.298.2.1 2009/03/20 20:36:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -173,7 +173,7 @@
 sub createmenu {
     my ($which,$request)=@_;
     if ($which eq 'grade') {
-	$request->print('<script language="JavaScript"> 
+	$request->print('<script type="text/javascript" language="JavaScript"> 
           hwkmenu=window.open("/res/adm/pages/homeworkmenu.html","homeworkremote",
                  "height=350,width=150,menubar=no");
           </script>');
@@ -855,8 +855,11 @@
     my $result;
     my $problem=&Apache::lonnet::getfile($file);
     if ($problem eq -1) {
-	&Apache::lonxml::error("<b> ".&mt('Unable to find').
-			       " <i>$file</i></b>");
+        &Apache::lonxml::error(
+            '<b> '
+           .&mt('Unable to find [_1]',
+                '<span class="LC_filename">'.$file.'</span>')
+           .'</b>');
 	$problem='';
     }
     if (defined($env{'form.editxmltext'}) || defined($env{'form.Undo'})) {
@@ -871,12 +874,6 @@
 	&renderpage($request,$file);
     } else {
 	my ($rows,$cols) = &Apache::edit::textarea_sizes(\$problem);
-	my $xml_help = '<table><tr><td>'.
-	    &Apache::loncommon::helpLatexCheatsheet("Problem_Editor_XML_Index",
-						    "Problem Editing Help").
-						    '</td><td>'.
-       &Apache::loncommon::help_open_menu(undef,undef,5,'Authoring').
-                '</td></tr></table>';
 	if ($cols > 80) { $cols = 80; }
 	if ($cols < 70) { $cols = 70; }
 	if ($rows < 20) { $rows = 20; }
@@ -905,7 +902,7 @@
               <table class="LC_edit_problem_header_title"><tr><td>
                '.&mt('Problem Editing').&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index').'
                 </td><td align="right">
-                  '.&Apache::loncommon::helpLatexCheatsheet().'
+                  '.&Apache::loncommon::helpLatexCheatsheet('Problem_LON-CAPA_Functions','Script Functions').'
                 </td></tr>
               </table>
               <div class="LC_edit_problem_discards">
@@ -969,7 +966,7 @@
 	    my $filename=(split('/',$file))[-1];
 	    my $error =
 		"<b> ".&mt('Unable to find [_1]',
-			   ' <span class="LC_filename">'.$filename.'</span>')
+                           '<span class="LC_filename">'.$filename.'</span>')
 		."</b>";
 	    $result.=
 		&Apache::loncommon::simple_error_page($request,'Not available',
@@ -1140,7 +1137,7 @@
 	&& !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' =>