mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-36611 outcome: Set page context when editing outcome
This commit is contained in:
parent
0c332af374
commit
e9c915c050
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue