[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework structuretags.pm

raeburn raeburn at source.lon-capa.org
Fri Sep 16 18:25:45 EDT 2016


raeburn		Fri Sep 16 22:25:45 2016 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/homework	structuretags.pm 
  Log:
  - For 2.11
    - Backport 1.550.
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.512.2.11 loncom/homework/structuretags.pm:1.512.2.12
--- loncom/homework/structuretags.pm:1.512.2.11	Wed Sep 14 19:36:30 2016
+++ loncom/homework/structuretags.pm	Fri Sep 16 22:25:45 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.512.2.11 2016/09/14 19:36:30 raeburn Exp $
+# $Id: structuretags.pm,v 1.512.2.12 2016/09/16 22:25:45 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -417,9 +417,13 @@
     $extra_head .= &homework_js().
                    &Apache::lonhtmlcommon::dragmath_js("EditMathPopup");
     if (&Apache::lonhtmlcommon::htmlareabrowser()) {
-        my %textarea_args = (
+        my %textarea_args;
+        if (($env{'request.state'} ne 'construct') ||
+            ($env{'environment.nocodemirror'})) {
+            %textarea_args = (
                                 dragmath => 'math',
                               );
+        }
         $extra_head .= &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args);
     }
     my $is_task = ($env{'request.uri'} =~ /\.task$/);
@@ -2933,9 +2937,13 @@
                  .'<td><span class="LC_nobreak">'.&mt('Delete?').' '
                  .&Apache::edit::deletelist($target,$token)
                  .'</span></td>'
-	         .'<td><span id="math_'.$areaid.'">'
-		 .&Apache::lonhtmlcommon::dragmath_button($areaid,1)
-		 .'</span></td>'
+	         .'<td><span id="math_'.$areaid.'">';
+	if ($env{'environment.nocodemirror'}) {
+	    $result.=&Apache::lonhtmlcommon::dragmath_button($areaid,1);
+	} else {
+	    $result.=' ';
+	}
+	$result.='</span></td>'
 		 .'<td>'
 		 .&Apache::edit::insertlist($target,$token)
 		 .'</td>'




More information about the LON-CAPA-cvs mailing list