mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-8840 Loginas cleanup, some more improvements; merged from MOODLE_18_STABLE
+ merging of format_string fixes
This commit is contained in:
parent
be78d45dd2
commit
3887fe4acd
4 changed files with 30 additions and 30 deletions
|
@ -27,6 +27,11 @@
|
|||
error("That's an invalid course id");
|
||||
}
|
||||
|
||||
/// do not use when in course login as
|
||||
if (!empty($USER->realuser) and $USER->loginascontext->contextlevel == CONTEXT_COURSE) {
|
||||
print_error('loginasnoenrol', '', $CFG->wwwroot.'/course/view.php?id='.$USER->loginascontext->instanceid);
|
||||
}
|
||||
|
||||
$enrol = enrolment_factory::factory($course->enrol); // do not use if (!$enrol... here, it can not work in PHP4 - see MDL-7529
|
||||
|
||||
/// Refreshing all current role assignments for the current user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue