diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index 67d824af0f7..84a4831c5d1 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -142,8 +142,6 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $setting = new admin_setting_configcheckbox('cachejs', new lang_string('cachejs', 'admin'), new lang_string('cachejs_help', 'admin'), 1); $setting->set_updatedcallback('js_reset_all_caches'); $temp->add($setting); - $temp->add(new admin_setting_configcheckbox('enablecourseajax', new lang_string('enablecourseajax', 'admin'), - new lang_string('enablecourseajax_desc', 'admin'), 1)); $ADMIN->add('appearance', $temp); // link to tag management interface diff --git a/course/lib.php b/course/lib.php index 5b7f13a0b05..262582f4c5c 100644 --- a/course/lib.php +++ b/course/lib.php @@ -4414,8 +4414,7 @@ function include_course_ajax($course, $modules = array(), $config = null) { // Ensure that ajax should be included $courseformatajaxsupport = course_format_ajax_support($course->format); - if (!$CFG->enablecourseajax - || !$PAGE->theme->enablecourseajax + if (!$PAGE->theme->enablecourseajax || !$CFG->enableajax || empty($USER->editing) || !$PAGE->user_is_editing() diff --git a/course/rest.php b/course/rest.php index 1fec1fc51d8..8ec14e6b467 100644 --- a/course/rest.php +++ b/course/rest.php @@ -48,10 +48,6 @@ $PAGE->set_url('/course/rest.php', array('courseId'=>$courseid,'class'=>$class)) //NOTE: when making any changes here please make sure it is using the same access control as course/mod.php !! -if (empty($CFG->enablecourseajax)) { - throw new moodle_exception('Course AJAX not allowed'); -} - $course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST); // Check user is logged in and set contexts if we are dealing with resource if (in_array($class, array('resource'))) { diff --git a/lang/en/admin.php b/lang/en/admin.php index 98b79a0e171..f5f0d595cd3 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -464,8 +464,6 @@ $string['emptysettingvalue'] = 'Empty'; $string['enableajax'] = 'Enable AJAX'; $string['enablecalendarexport'] = 'Enable calendar export'; $string['enablecomments'] = 'Enable comments'; -$string['enablecourseajax'] = 'Enable AJAX course editing'; -$string['enablecourseajax_desc'] = 'Allow AJAX when editing main course pages. Note that the course format and the theme must support AJAX editing and the user has to enable AJAX in their profiles, too.'; $string['enablecourserequests'] = 'Enable course requests'; $string['enablecssoptimiser'] = 'Enable CSS optimiser'; $string['enablecssoptimiser_desc'] = 'When enabled CSS will be run through an optimisation process before being cached. The optimiser processes the CSS removing duplicate rules and styles, as well as white space removeable and reformatting. Please note turning this on at the same time as theme designer mode is aweful for performance but will help theme designers create optimised CSS.'; diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index e930c1955b7..bc48dde9818 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -493,5 +493,13 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2012050400.01); } + if ($oldversion < 2012050400.02) { + + // Clean up removed admin setting. + unset_config('enablecourseajax'); + + upgrade_main_savepoint(true, 2012050400.02); + } + return true; } diff --git a/version.php b/version.php index ba0d7c3b616..db6af01d01b 100644 --- a/version.php +++ b/version.php @@ -30,7 +30,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2012050400.01; // YYYYMMDD = weekly release date of this DEV branch +$version = 2012050400.02; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes