mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-27619: Prevent teachers from turning course Outcomes into site-wide ones
Similar to the issue which allowed teachers to create site-wide scales by editing a course-specific scale (MDL-24682), teachers could also promote a course-specific scale to a site-wide (standard) by editing it. As with MDL-24682, removing the course ID check (leaving just the capability check) prevents this unauthorised creation of site-wide (standard) outcomes.
This commit is contained in:
parent
f42c34a38a
commit
11c56e2489
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ class edit_outcome_form extends moodleform {
|
|||
if (empty($courseid)) {
|
||||
$mform->hardFreeze('standard');
|
||||
|
||||
} else if (empty($outcome->courseid) and !has_capability('moodle/grade:manage', context_system::instance())) {
|
||||
} else if (!has_capability('moodle/grade:manage', context_system::instance())) {
|
||||
$mform->hardFreeze('standard');
|
||||
|
||||
} else if ($coursecount and empty($outcome->courseid)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue