mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
course MDL-19794 Fixed up notices on course/loginas.php
This commit is contained in:
parent
5de592b124
commit
555776675e
1 changed files with 6 additions and 1 deletions
|
@ -27,6 +27,12 @@
|
|||
$id = optional_param('id', SITEID, PARAM_INT); // course id
|
||||
$userid = required_param('user', PARAM_INT); // login as this user
|
||||
|
||||
$url = new moodle_url($CFG->wwwroot.'/course/loginas.php', array('user'=>$userid, 'sesskey'=>sesskey()));
|
||||
if ($id !== SITEID) {
|
||||
$url->param('id', $id);
|
||||
}
|
||||
$PAGE->set_url($id);
|
||||
|
||||
if (!confirm_sesskey()) {
|
||||
print_error('confirmsesskeybad');
|
||||
}
|
||||
|
@ -71,7 +77,6 @@
|
|||
|
||||
$PAGE->set_title($strloggedinas);
|
||||
$PAGE->navbar->add($strloggedinas);
|
||||
echo $OUTPUT->header();
|
||||
notice($strloggedinas, "$CFG->wwwroot/course/view.php?id=$course->id");
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue