]> git.mjollnir.org Git - moodle.git/commitdiff
Turn AJAX off for now at site level MDL-7254; merged from MOODLE_17_STABLE
authorskodak <skodak>
Fri, 27 Oct 2006 20:34:40 +0000 (20:34 +0000)
committerskodak <skodak>
Fri, 27 Oct 2006 20:34:40 +0000 (20:34 +0000)
admin/settings/server.php
course/view.php
lang/en_utf8/admin.php
user/edit.html

index ea00ad01dc1949f7cd3abf86cdc171ede09acb1e..d2800296b18f3a67db8cc3234568da18343c9afc 100644 (file)
@@ -88,6 +88,7 @@ $ADMIN->add('server', $temp);
 $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);
 
 
index b77ca0277c22253dda7d64baf588a16acc2c8501..0c2f66d8291e71834f169d4ebe087f2fbdaa91b5 100644 (file)
     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',
index c89a09660fcec8e072f79d1525de34dd98015255..4ae9a32545f3447649e109d36fc250f10b0cba16 100644 (file)
@@ -3,6 +3,9 @@
 
 
 // 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';
@@ -367,7 +370,6 @@ $string['lang16notify'] = 'Moodle 1.6 and above allows you to install and update
 $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';
index 136de87dda16126a5a5e378c992e19e423d5fd68..887b296a7eea017fa53ed2aea89a21868a637bc6 100644 (file)
@@ -202,7 +202,7 @@ if (has_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM, SI
     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>