// Login as this student and return to course home page.
- $teacher_name = "$USER->firstname $USER->lastname";
+ $teacher_name = fullname($USER, true);
$teacher_id = "$USER->id";
$USER = get_user_info_from_db("id", $user);
$USER->realuser = $teacher_id;
set_moodle_cookie($USER->username);
- $student_name = "$USER->firstname $USER->lastname";
+ $student_name = fullname($USER, true);
add_to_log($course->id, "course", "loginas", "../user/view.php?id=$course->id&user=$user", "$teacher_name -> $student_name");
$strpasswordchanged = get_string("passwordchanged");
if ($course->id) {
+ $fullname = fullname($USER, true);
print_header($strpasswordchanged, $strpasswordchanged,
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->
<A HREF=\"$CFG->wwwroot/user/index.php?id=$course->id\">".get_string("participants")."</A> ->
- <A HREF=\"$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id\">$USER->firstname $USER->lastname</A> -> $strpasswordchanged", $focus);
+ <A HREF=\"$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id\">$fullname</A> -> $strpasswordchanged", $focus);
notice($strpasswordchanged, "$CFG->wwwroot/user/view.php?id=$USER->id&course=$id");
} else {
print_header($strpasswordchanged, $strpasswordchanged, $strpasswordchanged, "");
$strchangepassword = get_string("changepassword");
if (!empty($course->id)) {
+ $fullname = fullname($USER, true);
print_header($strchangepassword, $strchangepassword,
"<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->
<A HREF=\"$CFG->wwwroot/user/index.php?id=$course->id\">".get_string("participants")."</A> ->
- <A HREF=\"$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id\">$USER->firstname $USER->lastname</A> -> $strchangepassword", $focus);
+ <A HREF=\"$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id\">$fullname</A> -> $strchangepassword", $focus);
} else {
print_header($strchangepassword, $strchangepassword, $strchangepassword, $focus);
}