[LON-CAPA-cvs] cvs: loncom /homework chemresponse.pm
raeburn
raeburn at source.lon-capa.org
Mon Mar 9 10:57:04 EDT 2015
raeburn Mon Mar 9 14:57:04 2015 EDT
Modified files:
/loncom/homework chemresponse.pm
Log:
- To support old browser versions use JME instead of JSME
(determination based on user agent).
Index: loncom/homework/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.95 loncom/homework/chemresponse.pm:1.96
--- loncom/homework/chemresponse.pm:1.95 Sat Mar 7 23:04:08 2015
+++ loncom/homework/chemresponse.pm Mon Mar 9 14:57:03 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# chemical equation style response
#
-# $Id: chemresponse.pm,v 1.95 2015/03/07 23:04:08 raeburn Exp $
+# $Id: chemresponse.pm,v 1.96 2015/03/09 14:57:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -87,8 +87,27 @@
}
}
if ($usejsme) {
- if ($env{'browser.type'} eq 'mozilla') {
- if ($env{'browser.version'} < 4) {
+ if ($env{'browser.type'} eq 'safari') {
+ unless ($env{'browser.mobile'}) {
+ if ($env{'browser.version'} < 522) {
+ $usejsme = 0;
+ }
+ }
+ } elsif ($env{'browser.type'} eq 'mozilla') {
+ if ($env{'browser.version'} < 5) {
+ $usejsme = 0;
+ } elsif ($env{'browser.info'} =~ /^firefox\-([\d\.]+)/) {
+ my $firefox = $1;
+ if ($firefox < 12) {
+ $usejsme = 0;
+ }
+ }
+ } elsif ($env{'browser.type'} eq 'explorer') {
+ if ($env{'browser.version'} < 7) {
+ $usejsme = 0;
+ }
+ } elsif ($env{'browser.type'} eq 'opera') {
+ if ($env{'browser.version'} < 15) {
$usejsme = 0;
}
}
More information about the LON-CAPA-cvs
mailing list