Skip to content
Permalink
Browse files

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
  • Loading branch information...
gustav_delius
gustav_delius committed Sep 26, 2005
1 parent c55355b commit 5c3706b27de3bc853d3afafbe52a76ee53a663b4
Showing with 3 additions and 1 deletion.
  1. +1 −0 lang/en/moodle.php
  2. +2 −1 lib/weblib.php
@@ -616,6 +616,7 @@
$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';
@@ -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 {

0 comments on commit 5c3706b

Please sign in to comment.
You can’t perform that action at this time.