MDL-36611 outcome: Set page context when editing outcome

This commit is contained in:
Kirill Astashov 2016-10-05 11:01:46 +08:00 committed by Jun Pataleta
parent d9520bc04e
commit f3ced08622

View File

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