Moodle

Create isguestuser() function and fix guest related code

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7
  • Fix Version/s: 2.0
  • Component/s: Libraries
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

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)

Issue Links

Activity

Hide
N Hansen added a comment -

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.

Show
N Hansen added a comment - 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.
Hide
Petr Škoda (skodak) added a comment -

guest access completely rewritten, please file new issues if necessary - I know there is a lot of room for improvements, it should be a lot easier now

Show
Petr Škoda (skodak) added a comment - guest access completely rewritten, please file new issues if necessary - I know there is a lot of room for improvements, it should be a lot easier now

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: