Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
4c202228
Commit
4c202228
authored
May 10, 2005
by
moodler
Browse files
A quick hack to allow anonymising of all names.
You can make everyone have the name "Bruce" if you want. }-)
parent
74528955
Changes
2
Hide whitespace changes
Inline
Side-by-side
config-dist.php
View file @
4c202228
...
...
@@ -234,6 +234,11 @@ $CFG->admin = 'admin';
// Print to footer (works with the default theme)
// define('MDL_PERFTOFOOT', true);
//
// Force displayed usernames
// A little hack to anonymise user names for all students. If you set these
// then all non-teachers will always see these for every person.
// $CFG->forcefirstname = 'Bruce';
// $CFG->forcelastname = 'Simpson';
//=========================================================================
// ALL DONE! To continue installation, visit your main page with a browser
...
...
lib/moodlelib.php
View file @
4c202228
...
...
@@ -1984,6 +1984,15 @@ function fullname($user, $override=false) {
return
''
;
}
if
(
!
$override
)
{
if
(
!
empty
(
$CFG
->
forcefirstname
))
{
$user
->
firstname
=
$CFG
->
forcefirstname
;
}
if
(
!
empty
(
$CFG
->
forcelastname
))
{
$user
->
lastname
=
$CFG
->
forcelastname
;
}
}
if
(
!
empty
(
$SESSION
->
fullnamedisplay
))
{
$CFG
->
fullnamedisplay
=
$SESSION
->
fullnamedisplay
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment