[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /xml lonxml.pm

raeburn raeburn@source.lon-capa.org
Thu, 28 Jan 2010 18:46:47 -0000


raeburn		Thu Jan 28 18:46:47 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/xml	lonxml.pm 
  Log:
  - Backport 1.500 (part), 1.504.
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.494.4.2 loncom/xml/lonxml.pm:1.494.4.3
--- loncom/xml/lonxml.pm:1.494.4.2	Sun Oct  4 03:40:13 2009
+++ loncom/xml/lonxml.pm	Thu Jan 28 18:46:47 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.494.4.2 2009/10/04 03:40:13 raeburn Exp $
+# $Id: lonxml.pm,v 1.494.4.3 2010/01/28 18:46:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1546,20 +1546,30 @@
                        = &Apache::loncommon::plainlanguagedescription($_);
         }
     }
-    return
-       '<span class="LC_nobreak">'.
-       &mt('Language:').' '.
-       &Apache::loncommon::select_form($env{'form.languages'},'languages',
-                                                     %langchoices).'
-     </span>
-     <span class="LC_nobreak">'.
+    my $output;
+    unless ($env{'form.forceedit'}) {
+       $output .=
+           '<span class="LC_nobreak">'.
+           &mt('Language:').' '.
+           &Apache::loncommon::select_form(
+               $env{'form.languages'},
+               'languages',
+               &Apache::lonlocal::texthash(%langchoices)).
+           '</span>';
+    }
+    $output .=
+     ' <span class="LC_nobreak">'.
        &mt('Math Rendering:').' '.
-       &Apache::loncommon::select_form($env{'form.texengine'},'texengine',
-                                                     ('' => '',
-                                                      'tth' => 'tth (TeX to HTML)',
-                                                      'jsMath' => 'jsMath',
-                                                      'mimetex' => 'mimetex (Convert to Images)')).'
-     </span>';
+       &Apache::loncommon::select_form(
+           $env{'form.texengine'},
+           'texengine',
+           &Apache::lonlocal::texthash
+               (''        => '',
+                'tth'     => 'tth (TeX to HTML)',
+                'jsMath'  => 'jsMath',
+                'mimetex' => 'mimetex (Convert to Images)')).
+     '</span>';
+    return $output;
 }
 
 sub inserteditinfo {