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:
gustav_delius
2005-09-26 10:00:14 +00:00
parent c55355b6c8
commit 5c3706b27d
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -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
View File
@@ -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&amp;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 {