mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-34471 libraries: Remove unused context calls
This commit is contained in:
parent
0d4d49d18a
commit
2d9c05b930
@ -42,7 +42,6 @@ if (!$course = $DB->get_record('course', array('id'=>$courseid))) {
|
||||
require_login($course);
|
||||
|
||||
$context = context_course::instance($courseid);
|
||||
$systemcontext = context_system::instance();
|
||||
require_capability('moodle/course:managegroups', $context);
|
||||
|
||||
$returnurl = $CFG->wwwroot.'/group/index.php?id='.$course->id;
|
||||
|
@ -61,7 +61,6 @@ if (!$user = $DB->get_record('user', array('id' => $userid))) {
|
||||
|
||||
$systemcontext = context_system::instance();
|
||||
$personalcontext = context_user::instance($user->id);
|
||||
$coursecontext = context_course::instance($course->id);
|
||||
|
||||
$PAGE->set_context($personalcontext);
|
||||
$PAGE->set_pagelayout('course');
|
||||
|
Loading…
x
Reference in New Issue
Block a user