mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merged changes to use new ajaxenabled for MDL-8417
This commit is contained in:
parent
4309bd17dd
commit
61c1b4b573
@ -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);
|
||||
|
||||
?>
|
@ -125,12 +125,17 @@
|
||||
$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 && has_capability('moodle/course:manageactivities', $context)) {
|
||||
// Course-based switches
|
||||
|
||||
if (ajaxenabled() && has_capability('moodle/course:manageactivities', $context)) {
|
||||
if (ajaxenabled($CFG->ajaxtestedbrowsers)) { // Browser, user and site-based switches
|
||||
|
||||
require_js(array('yui_yahoo',
|
||||
'yui_dom',
|
||||
|
Loading…
x
Reference in New Issue
Block a user