Details
Description
see: http://moodle.org/mod/forum/discuss.php?d=59286
1/ add new standard function isguestuser() - use it where we deal with real guest user ( replaces $user->username == 'guest')
2/ review the use of 'moodle/legacy:guest' - replace some with isguestuser(), add needed capabilities or keep as is
3/ remove isguest() - use isguestuser(), add missing capabilities OR in some places use has_capability('moodle/legacy:guest', $context, NULL, false)
There is something that one of my users complained about recently-at least with 1.6 but it might still be relevant. She was confused about having clicked on the enter as guest button, but she was still being redirected to the same login page she had gone through when entering as a guest when she tried to enrol in a course. Perhaps the "login as guest" button should be removed in cases where the person is already in as a guest so that it becomes clear that logging in as a real user is something different from guest.