mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
Merge branch 'MDL-32509' of git://github.com/danpoltawski/moodle
This commit is contained in:
commit
bbb0a6eb02
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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'))) {
|
||||
|
@ -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.';
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user