When teacher has "student view" on then the login string changes to ""Your are logged in as name in student view (Logout)", note the new 'in student view'. Discussed in bug 4113
This commit is contained in:
@@ -616,6 +616,7 @@ $string['includenoneusers'] = 'Include None Users';
|
||||
$string['includeuserfiles'] = 'Include User Files';
|
||||
$string['info'] = 'Information';
|
||||
$string['institution'] = 'Institution';
|
||||
$string['instudentview'] = 'in student view';
|
||||
$string['invalidemail'] = 'Invalid email address';
|
||||
$string['invalidlogin'] = 'Invalid login, please try again';
|
||||
$string['ip_address'] = 'IP Address';
|
||||
|
||||
+2
-1
@@ -2221,11 +2221,12 @@ function user_login_string($course=NULL, $user=NULL) {
|
||||
if (isset($user->id) and $user->id) {
|
||||
$fullname = fullname($user, true);
|
||||
$username = "<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a>";
|
||||
$instudentview = (!empty($USER->studentview)) ? get_string('instudentview') : '';
|
||||
if (isguest($user->id)) {
|
||||
$loggedinas = $realuserinfo.get_string('loggedinasguest').
|
||||
" (<a target=\"{$CFG->framename}\" href=\"$wwwroot/login/index.php\">".get_string('login').'</a>)';
|
||||
} else {
|
||||
$loggedinas = $realuserinfo.get_string('loggedinas', 'moodle', $username).
|
||||
$loggedinas = $realuserinfo.get_string('loggedinas', 'moodle', $username).' '.$instudentview.
|
||||
" (<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/login/logout.php\">".get_string('logout').'</a>)';
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user