From f3ced0862285a985c050a91ae401aee5f2dd0f33 Mon Sep 17 00:00:00 2001 From: Kirill Astashov Date: Wed, 5 Oct 2016 11:01:46 +0800 Subject: [PATCH] MDL-36611 outcome: Set page context when editing outcome --- grade/edit/outcome/edit.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grade/edit/outcome/edit.php b/grade/edit/outcome/edit.php index 48164e2dfc1..f9132d08f44 100644 --- a/grade/edit/outcome/edit.php +++ b/grade/edit/outcome/edit.php @@ -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();