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 f42c34a commit 11c56e24896264883fb9ab3bb2702ed2cfaa5b34
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', context_system::instance())) {
+ } else if (!has_capability('moodle/grade:manage', context_system::instance())) {
} else if ($coursecount and empty($outcome->courseid)) {

0 comments on commit 11c56e2

Please sign in to comment.