MDL-32509 course: remove enablecourseajax setting

We just have the single enableajax setting
This commit is contained in:
Dan Poltawski
2012-05-05 10:56:06 +08:00
parent e16e2300c5
commit 7aaed66901
4 changed files with 1 additions and 10 deletions
-2
View File
@@ -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
+1 -2
View File
@@ -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()
-4
View File
@@ -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'))) {
-2
View File
@@ -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.';