Subject: [LON-CAPA-dev] Plot Response and HTML5

From: Mark Lucas <[email-masked]>
Date: Wed, 19 Jun 2013 10:18:28 -0400

Hi,

I was playing around with plotresponse briefly on the test cluster.
Is the release candidate on testdrive using html5 at all for Geogebra?
How would I tell?

Thanks,
Mark

-- 
Mark Lucas 								email: [email-masked]
252D Clippinger Lab						phone: (740)597-2984
Department of Physics and Astronomy		fax: (740)593-0433
Ohio University
Athens, OH 45701

---

From: Gerd Kortemeyer <[email-masked]>
Date: Wed, 19 Jun 2013 10:55:52 -0400

Hi,

It depends on the browser. Not many browsers support HTML5 to the extent that we need. Try with Chrome.

- Gerd.

On Jun 19, 2013, at 10:18 AM, Mark Lucas <[email-masked]> wrote:

> _______________________________________________
> LON-CAPA-dev mailing list
> [email-masked]
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-dev

---

From: Mark Lucas <[email-masked]>
Date: Wed, 19 Jun 2013 11:31:39 -0400

How does LON-CAPA check for the functionality and decide which to deliver?

Is there a particular function that is tested?

Thanks!
Mark

---

From: Gerd Kortemeyer <[email-masked]>
Date: Wed, 19 Jun 2013 13:57:32 -0400

Hi,

> 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;
}

#

---

From: Mark Lucas <[email-masked]>
Date: Thu, 20 Jun 2013 09:28:45 -0400

I'm stuck in the dark ages.

The chrome download worked.

When I downloaded using safari, the image came up but nothing else happened.
I'm still running snow leopard, which means I'm stuck back on Safari 5.1.9.

Is there a way to stick a version check on Safari?
(I guess the same thing would happen with a too-old chrome as well, though I
don't know where that threshold is).

Later,
Mark

---

From: Stuart Raeburn <[email-masked]>
Date: Mon, 22 Jul 2013 09:39:05 -0400

Hi,

> don't know where that threshold is).

The following changes incorporate more comprehensive browser detection  
in functionplotresponse, based on the user agent string provided by  
the browser when a user logs into LON-CAPA. Following authentication,  
the user agent string is decoded and stored in a number of browser.*  
items in %env.

homework/functionplotresponse.pm rev. 1.103
loncom/interface/loncommon.pm rev. 1.1141
loncom/loncapa_apache.conf rev. 1.225

- More comprehensive checking for HTML5 support for Geogebra , based on
   decoding of user agent at log-in.
   - HTML5 used for:
     Chrome: version 14 or later
     Safari: version 536 or later (version 8536 for mobile safari).
     Firefox: version required dependent on os (Windows - 14 or later;  
Mac - 20 or later; Linux - 17 or later).
     IE: version 10 or later

One currently untested scenario, is whether IE9 with Google's Chrome  
Frame plug-in installed will support the GWT-based HTML5 Geogebra  
implementation. In my tests neither standard IE9, nor IE8 with the  
Chrome Frame plugin supported HTML5 Geogebra.  The current logic in  
useHTML5() returns 0 for IE9.

For the future it would be useful to know what set of HTML5  
capabilities GeoGegraWeb requires, so that specific tests could be  
made for the required functionality, in place of the current reliance  
on the user agent string, e.g., see: http://html5test.com/

Stuart Raeburn
LON-CAPA Academic Consortium

Quoting Mark Lucas <[email-masked]>:

>> diff -u loncom/homework/functionplotresponse.pm:1.98   
>> loncom/homework/functionplotresponse.pm:1.99