$temp = new admin_settingpage('debugging', get_string('debugging', 'admin'));
$temp->add(new admin_setting_special_debug());
$temp->add(new admin_setting_special_perfdebug());
+$temp->add(new admin_setting_configcheckbox('enableajax', get_string('enableajax', 'admin'), get_string('configenableajax', 'admin'), 0));
$ADMIN->add('server', $temp);
if (file_exists($ajaxformatfile)) {
require_once($ajaxformatfile);
- if ($USER->editing && !empty($USER->ajax) && $CFG->ajaxcapable) {
-
+ if ($USER->editing && !empty($USER->ajax) && !empty($CFG->enableajax) && $CFG->ajaxcapable) {
+
if ($meta = require_js(array('yui_yahoo',
'yui_dom',
'yui_event',
// begin {added with admin cleanup}
+
+$string['enableajax'] = 'Enable AJAX';
+$string['configenableajax'] = 'If you enable AJAX features users can disable them in their profile, otherwise AJAX is disabled for everybody.';
$string['autologinguests'] = 'Auto-login guests';
$string['search'] = 'Search';
$string['searchresults'] = 'Search Results';
$string['langedit'] = 'Language editing';
$string['langpacks'] = 'Language packs';
$string['langimportsuccess'] = 'Language pack successfully upgraded';
-$string['langimport'] = 'Language import utility';
$string['langpackremoved'] = 'Language pack was uninstalled';
$string['langpackupdated'] = 'Language pack $a was successfully installed';
$string['langupdatecomplete'] = 'Language pack update completed';
unset($choices);
$choices["0"] = get_string("ajaxno");
$choices["1"] = get_string("ajaxyes");
- choose_from_menu ($choices, 'ajax', $user->ajax, "") ?>
+ choose_from_menu ($choices, 'ajax', $user->ajax, '', '', 0, false, empty($CFG->enableajax)) ?>
</td>
</tr>
<tr>