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...
1 parent e4592b2 commit 8c27cc95349a6cce073651ebbff9b44394d4ecb7 @pauln pauln committed Aug 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 grade/edit/outcome/edit_form.php
@@ -114,7 +114,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 8c27cc9

Please sign in to comment.