MDL-15262 Applied patch
This commit is contained in:
@@ -71,6 +71,11 @@ class course_edit_form extends moodleform {
|
||||
$mform->setDefault('category', $category->id);
|
||||
$mform->setType('category', PARAM_INT);
|
||||
|
||||
if ($course and !has_capability('moodle/course:changecategory', $coursecontext)) {
|
||||
$mform->hardFreeze('category');
|
||||
$mform->setConstant('category', $category->id);
|
||||
}
|
||||
|
||||
$mform->addElement('text','fullname', get_string('fullname'),'maxlength="254" size="50"');
|
||||
$mform->setHelpButton('fullname', array('coursefullname', get_string('fullname')), true);
|
||||
$mform->setDefault('fullname', get_string('defaultcoursefullname'));
|
||||
@@ -103,6 +108,10 @@ class course_edit_form extends moodleform {
|
||||
$mform->setHelpButton('summary', array('text', get_string('helptext')), true);
|
||||
$mform->setType('summary', PARAM_RAW);
|
||||
|
||||
if ($course and !has_capability('moodle/course:changesummary', $coursecontext)) {
|
||||
$mform->hardFreeze('summary');
|
||||
}
|
||||
|
||||
$courseformats = get_list_of_plugins('course/format');
|
||||
$formcourseformats = array();
|
||||
foreach ($courseformats as $courseformat) {
|
||||
|
||||
@@ -32,6 +32,8 @@ $string['course:bulkmessaging'] = 'Send a message to many people';
|
||||
$string['course:changefullname'] = 'Change course full name';
|
||||
$string['course:changeshortname'] = 'Change course short name';
|
||||
$string['course:changeidnumber'] = 'Change course ID number';
|
||||
$string['course:changecategory'] = 'Change course category';
|
||||
$string['course:changesummary'] = 'Change course summary';
|
||||
$string['course:create'] = 'Create courses';
|
||||
$string['course:delete'] = 'Delete courses';
|
||||
$string['course:manageactivities'] = 'Manage activities';
|
||||
|
||||
@@ -662,6 +662,30 @@ $moodle_capabilities = array(
|
||||
'clonepermissionsfrom' => 'moodle/course:update'
|
||||
),
|
||||
|
||||
'moodle/course:changecategory' => array(
|
||||
'riskbitmask' => RISK_XSS,
|
||||
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_COURSE,
|
||||
'legacy' => array(
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
),
|
||||
'clonepermissionsfrom' => 'moodle/course:update'
|
||||
),
|
||||
|
||||
'moodle/course:changesummary' => array(
|
||||
'riskbitmask' => RISK_XSS,
|
||||
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_COURSE,
|
||||
'legacy' => array(
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'admin' => CAP_ALLOW
|
||||
),
|
||||
'clonepermissionsfrom' => 'moodle/course:update'
|
||||
),
|
||||
|
||||
'moodle/site:viewparticipants' => array(
|
||||
|
||||
'captype' => 'read',
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2007101551; // YYYYMMDD = date of the 1.9 branch (don't change)
|
||||
$version = 2007101552; // YYYYMMDD = date of the 1.9 branch (don't change)
|
||||
// X = release number 1.9.[0,1,2,3,4,5...]
|
||||
// Y.YY = micro-increments between releases
|
||||
|
||||
|
||||
Reference in New Issue
Block a user