Skip to content

Commit

Permalink
When teacher has "student view" on then the login string changes to "…
Browse files Browse the repository at this point in the history
…"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 committed Sep 26, 2005
1 parent c55355b commit 5c3706b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 2 additions & 1 deletion lib/weblib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5c3706b

Please sign in to comment.