Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 134ede3476937fae584ef028d452a4f584fbdf82 1 parent 5f1d8f2
@pauln pauln authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  grade/edit/outcome/edit_form.php
View
2  grade/edit/outcome/edit_form.php
@@ -121,7 +121,7 @@ function definition_after_data() {
if (empty($courseid)) {
$mform->hardFreeze('standard');
- } 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))) {
$mform->hardFreeze('standard');
} else if ($coursecount and empty($outcome->courseid)) {
Please sign in to comment.
Something went wrong with that request. Please try again.