Changed course formats to use the new ajaxenabled() so that only tested browsers are enabled. MDL-8417
This commit is contained in:
@@ -5,5 +5,6 @@
|
||||
|
||||
|
||||
$CFG->ajaxcapable = true;
|
||||
$CFG->ajaxtestedbrowsers = array('MSIE' => 6.0, 'Gecko' => 20061111);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
|
||||
|
||||
$CFG->ajaxcapable = true;
|
||||
$CFG->ajaxtestedbrowsers = array('MSIE' => 6.0, 'Gecko' => 20061111);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
+9
-5
@@ -121,16 +121,20 @@
|
||||
|
||||
|
||||
// AJAX-capable course format?
|
||||
$CFG->useajax = false;
|
||||
$CFG->useajax = false;
|
||||
$ajaxformatfile = $CFG->dirroot.'/course/format/'.$course->format.'/ajax.php';
|
||||
$bodytags = '';
|
||||
|
||||
if (file_exists($ajaxformatfile)) {
|
||||
if (file_exists($ajaxformatfile)) { // Needs to exist otherwise no AJAX by default
|
||||
|
||||
$CFG->ajaxcapable = false; // May be overridden later by ajaxformatfile
|
||||
$CFG->ajaxtestedbrowsers = array(); // May be overridden later by ajaxformatfile
|
||||
|
||||
require_once($ajaxformatfile);
|
||||
|
||||
if ($USER->editing && !empty($USER->ajax) && !empty($CFG->enableajax) && $CFG->ajaxcapable) {
|
||||
if (!empty($USER->editing) && $CFG->ajaxcapable) { // Course-based switches
|
||||
|
||||
if (ajaxenabled()) {
|
||||
if (ajaxenabled($CFG->ajaxtestedbrowsers)) { // rowser, user and site-based switches
|
||||
|
||||
require_js(array('yui_yahoo',
|
||||
'yui_dom',
|
||||
@@ -216,4 +220,4 @@
|
||||
|
||||
print_footer(NULL, $course);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user