Browse files

MDL-27619: Prevent teachers from turning course Outcomes into site-wi…

…de 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.
  • Loading branch information...
pauln committed Aug 13, 2012
1 parent 5f1d8f2 commit 134ede3476937fae584ef028d452a4f584fbdf82
Showing with 1 addition and 1 deletion.
  1. +1 −1 grade/edit/outcome/edit_form.php
@@ -121,7 +121,7 @@ function definition_after_data() {
if (empty($courseid)) {
} else if (empty($outcome->courseid) and !has_capability('moodle/grade:manage', get_context_instance(CONTEXT_SYSTEM))) {
} else if (!has_capability('moodle/grade:manage', get_context_instance(CONTEXT_SYSTEM))) {
} else if ($coursecount and empty($outcome->courseid)) {

0 comments on commit 134ede3

Please sign in to comment.