mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-41317 Set correct context to send bulk message page
This commit is contained in:
parent
d2aa53be1b
commit
b469e62a77
@ -58,13 +58,12 @@ if ($deluser !== 0) {
|
||||
$url->param('deluser', $deluser);
|
||||
}
|
||||
$PAGE->set_url($url);
|
||||
$PAGE->set_context(context_system::instance());
|
||||
|
||||
if (!$course = $DB->get_record('course', array('id'=>$id))) {
|
||||
print_error('invalidcourseid');
|
||||
}
|
||||
|
||||
require_login();
|
||||
require_login($course);
|
||||
|
||||
$coursecontext = context_course::instance($id); // Course context
|
||||
$systemcontext = context_system::instance(); // SYSTEM context
|
||||
|
Loading…
x
Reference in New Issue
Block a user