$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);
+ }
+
$fullname = get_string('defaultcoursefullname');
$shortname = get_string('defaultcourseshortname');
while ($DB->record_exists('course', array('fullname'=>$fullname))
$mform->setHelpButton('summary', array('text2', get_string('helptext')), true);
$mform->setType('summary', PARAM_RAW);
+ if ($course and !has_capability('moodle/course:changesummary', $coursecontext)) {
+ $mform->hardFreeze('summary');
+ }
+
$courseformats = get_plugin_list('format');
$formcourseformats = array();
foreach ($courseformats as $courseformat => $formatdir) {
$string['assignmentcontext'] = 'Assignment context';
$string['assignmentoptions'] = 'Assignment options';
$string['backtoallroles'] = 'Back to the list of all roles';
+$string['blog:associatecourse'] = 'Associate blog entries with courses';
+$string['blog:associatemodule'] = 'Associate blog entries with activity modules';
$string['blog:create'] = 'Create new blog entries';
$string['blog:manageentries'] = 'Edit and manage entries';
+$string['blog:manageexternal'] = 'Edit and manage external blogs';
$string['blog:manageofficialtags'] = 'Manage official tags';
$string['blog:managepersonaltags'] = 'Manage personal tags';
+$string['blog:search'] = 'Search blog entries';
$string['blog:view'] = 'View blog entries';
+$string['blog:viewdrafts'] = 'View draft blog entries';
$string['block:edit'] = 'Edit a block\'s settings';
$string['block:view'] = 'View block';
$string['calendar:manageentries'] = 'Manage any calendar entries';
$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';
),
'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(
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2009091700; // YYYYMMDD = date of the last version bump
+ $version = 2009100200; // YYYYMMDD = date of the last version bump
// XX = daily increments
$release = '2.0 dev (Build: 20091002)'; // Human-friendly version name