Hi.
I have added a user profile field named stealth in my Moodle 1.9.15 site.
Now how on earth do I access this stealth field data in a php file???
I'm trying to modify Andy J. Davis' online users block so that if the stealth field is ticked, then the user's avatar and username will not appear in the online user block. Thus the user will have privacy, especially after midnight....ah, there is method to my madness.
In the block_online_users.php file of the Online Users block, I have tried the below code, but alas, it doesn't work.
/* Somewhere around line 138 */
foreach ($users as $user) {
if ($user->profile_field_stealth == "1")
continue; //i.e., don't display the avatar data, just loop back up
...
}
Any help will be appreciated and if you help me to solve this, your name will be acknowledged in my blog on Moodle 'innovations'. That is if I manage to create a stealth mode for the user on my Moodle 1.9.15 production site.
Many thanks.
Frankie Kam, Malaysia