MDL-15262 Applied patch

This commit is contained in:
nicolasconnault
2009-10-01 07:47:28 +00:00
parent d4d468ad37
commit e9672d50de
4 changed files with 36 additions and 1 deletions
+9
View File
@@ -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) {
+2
View File
@@ -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';
+24
View File
@@ -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
View File
@@ -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