IE9 causing issues - want browser compatibility check

IE9 causing issues - want browser compatibility check

by Morgan Walker -
Number of replies: 1

Hello,

We'd like to implement some sort of browser checker on our site.  We've reached out to our Moodle hosting provider, Lambda, and they said they don't have anything that can help us.  I've seen other Moodle users whom have implemented this successfully, e.g.:

http://www.cravencc.edu/distanceeducation/browsercheck.cfm
http://www.kwantlen.ca/online-learning/Moodle_Browser_Check.html
http://www.delhi.edu/cis/moodle/browsercheck.php

http://www.northwestcollege.edu/distance/online/browser-check.dot

 

I read this post, which seem related - https://moodle.org/mod/forum/discuss.php?d=104517.  That was an old post and it pointed me to https://moodle.org/mod/data/view.php?d=13&rid=1578, a browser compatibility block, which I don't have.  So, my question, what are other user's solutions to implementing a browser compatibility check on their moodle site?  What is the best way to implement this?

Thanks,

Morgan

Average of ratings: -
In reply to Morgan Walker

Re: IE9 causing issues - want browser compatibility check

by Jez H -

We dont have a browser check like that, In the past we displayed messages to users of old IE versions in our theme header suggesting they use Chrome instead. We went for Chrome as users can install it without admin rights on the pc, it insalls under the user settings.

To detect the browser in PHP you can use:

$browser = $_SERVER['HTTP_USER_AGENT'];

You can build an array of problematic browser strings:

$rubbish = array('ie 6 string', 'ie 7 string', 'ie 8 string', 'ie 9 string');

then check whether the browser is in the bad list:

if (in_array($browser, $rubbish)) {

    echo "update your browser";

}

To get that working you would need the correct strings for the offending browsers.

Rather than echo we broke out of PHP and rendered a DIV at the top of the page with a more meaningful message and a link to a help page showing them how to install Google Chrome.

Not particularly elegant but it solved the problem, and you can do easily it in the theme without messing with core moodle code.

We moved most of our editing teachers off old versions of IE this way.

As for the other checks, I don't think they are required. If you open flash / Java your browser will tell you, and I would not advocate users simply "turning popups on". If your cookies don't work you cannot log into Moodle at all.

I know that did not answer your question as such, but I hope it is never the less of some use to you, if you just want to get around your IE9 issues this should suffice smile