[LON-CAPA-dev] Plot Response and HTML5

Gerd Kortemeyer korte at lite.msu.edu
Wed Jun 19 13:57:32 EDT 2013


Hi,

On Jun 19, 2013, at 11:31 AM, Mark Lucas <lucasm at ohio.edu> wrote:

> How does LON-CAPA check for the functionality and decide which to deliver?
> 
> Is there a particular function that is tested?

No, we had to test each browser. Here's the function that decides:

www		Fri Aug 17 18:02:16 2012 EDT

 Modified files:              
   /loncom/homework	functionplotresponse.pm 
 Log:
 HTML5 compatibility


Index: loncom/homework/functionplotresponse.pm
diff -u loncom/homework/functionplotresponse.pm:1.98 loncom/homework/functionplotresponse.pm:1.99
--- loncom/homework/functionplotresponse.pm:1.98	Fri Aug 17 13:08:11 2012
+++ loncom/homework/functionplotresponse.pm	Fri Aug 17 18:02:15 2012
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# Functionplot responses
#
-# $Id: functionplotresponse.pm,v 1.98 2012/08/17 13:08:11 www Exp $
+# $Id: functionplotresponse.pm,v 1.99 2012/08/17 18:02:15 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -49,7 +49,10 @@
# Return a true value if HTML5 should be used.

sub useHTML5 {
-    return 1;
+    if  ($env{'browser.type'} eq 'chrome') { return 1; }
+    if (($env{'browser.type'} eq 'safari') &&
+        ($env{'browser.os'} eq 'mac')) { return 1; }
+    return 0;
}

#


More information about the LON-CAPA-dev mailing list