[LON-CAPA-cvs] cvs: loncom /homework response.pm

raeburn raeburn at source.lon-capa.org
Mon Mar 9 12:19:55 EDT 2015


raeburn		Mon Mar  9 16:19:55 2015 EDT

  Modified files:              
    /loncom/homework	response.pm 
  Log:
  - To support old browser versions use DragMath pop-up instead of inline
    math preview (javascript); determination based on user agent.
  
  
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.242 loncom/homework/response.pm:1.243
--- loncom/homework/response.pm:1.242	Sat Mar  7 23:05:57 2015
+++ loncom/homework/response.pm	Mon Mar  9 16:19:54 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.242 2015/03/07 23:05:57 raeburn Exp $
+# $Id: response.pm,v 1.243 2015/03/09 16:19:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -586,7 +586,11 @@
                 if (($version < 531) || (($prefix eq '') && ($version < 533))) {
                     $eqneditor = '';
                 }
-            } elsif ($version < 522) {
+            } elsif ($version < 533) {
+                $eqneditor = 'dragmath';
+            }
+        } elsif ($env{'browser.os'} eq 'win') {
+            if ($env{'browser.version'} < 533) {
                 $eqneditor = 'dragmath';
             }
         }
@@ -595,7 +599,7 @@
             $eqneditor = 'dragmath';
         }
     } elsif ($env{'browser.type'} eq 'mozilla') {
-        if ($env{'browser.version'} < 4) {
+        if ($env{'browser.version'} < 5) {
             $eqneditor = 'dragmath';
         } else {
             if ($env{'browser.info'} =~ /^firefox\-([\d\.]+)/) {
@@ -605,6 +609,14 @@
                 }
             }
         }
+    } elsif ($env{'browser.type'} eq 'chrome') {
+        if ($env{'browser.version'} < 5) {
+            $eqneditor = 'dragmath';
+        }
+    } elsif ($env{'browser.type'} eq 'opera') {
+        if ($env{'browser.version'} < 12) {
+            $eqneditor = 'dragmath';
+        }
     }
     if ($eqneditor eq 'lcmath') {
         if (($env{'request.course.id'}) && ($env{'request.state'} ne 'construct')) {




More information about the LON-CAPA-cvs mailing list