Merge branch 'MDL-36611-master' of git://github.com/junpataleta/moodle

This commit is contained in:
Dan Poltawski 2016-10-11 08:53:06 +01:00
commit 988ff9f57f

View File

@ -70,6 +70,7 @@ if ($id) {
$outcome_rec->courseid = $courseid; $outcome_rec->courseid = $courseid;
require_login(); require_login();
require_capability('moodle/grade:manage', $systemcontext); require_capability('moodle/grade:manage', $systemcontext);
$PAGE->set_context($systemcontext);
} }
} else if ($courseid){ } else if ($courseid){
@ -87,6 +88,7 @@ if ($id) {
} else { } else {
require_login(); require_login();
require_capability('moodle/grade:manage', $systemcontext); require_capability('moodle/grade:manage', $systemcontext);
$PAGE->set_context($systemcontext);
/// adding new outcome from admin section /// adding new outcome from admin section
$outcome_rec = new stdClass(); $outcome_rec = new stdClass();