Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76419

Enable "not logged in users" to see the site calendar

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-76419-401
    • MDL-76419-master
    • Hide

      This patch is to ensure that "not logged in users" or guests can access the calendar when "Auto-login guests" ($CFG->autologinguests) is set to true.

      Pre-test conditions:

      • Add the upcoming events block to the site frontpage.
      • Add a few site events so that these show up in the upcoming events block.
      • As a logged in user (Admin, student or teacher) you should be able to see these upcoming events.
      • Site should not force users to log in and guest access should be allowed.

       Auto-login guests: Disabled

      1. Log in as site admin and set the following setting:
         - Auto-login guests (autologinguests): Uncheck to disable, if it is not disabled.
      2. Log out so that you are no longer a logged in user.
      3. Visit the site home/frontpage, and expand the block drawer so see the upcoming events block.
      4. Click on an event name/link.
      5. You should be redirected to the login page.
      6. Log in as guest.
      7. You should be able to see the calendar event page, now that you are logged in as a guest user. This is normal expected behaviour.

      Auto-login guests: Enabled

      1. Log in as site admin and set the following setting:
         - Auto-login guests (autologinguests): Check to enable.
      2. Log out so that you are no longer a logged in user.
      3. Visit the site home/frontpage, and expand the block drawer so see the upcoming events block.
      4. Click on an event name/link.
      5. You should be automatically logged in as guest and see the calendar page.
      Show
      This patch is to ensure that "not logged in users" or guests can access the calendar when "Auto-login guests" ($CFG->autologinguests) is set to true. Pre-test conditions: Add the upcoming events block to the site frontpage. Add a few site events so that these show up in the upcoming events block. As a logged in user (Admin, student or teacher) you should be able to see these upcoming events. Site should not force users to log in and guest access should be allowed.   Auto-login guests: Disabled Log in as site admin and set the following setting:  - Auto-login guests (autologinguests): Uncheck to disable, if it is not disabled. Log out so that you are no longer a logged in user. Visit the site home/frontpage, and expand the block drawer so see the upcoming events block. Click on an event name/link. You should be redirected to the login page. Log in as guest. You should be able to see the calendar event page, now that you are logged in as a guest user. This is normal expected behaviour. Auto-login guests: Enabled Log in as site admin and set the following setting:  - Auto-login guests (autologinguests): Check to enable. Log out so that you are no longer a logged in user. Visit the site home/frontpage, and expand the block drawer so see the upcoming events block. Click on an event name/link. You should be automatically logged in as guest and see the calendar page.

      By default the role for visitors is Guest, but there is no Site Calendar view capability, so there's no way to enable 'not logged in users' to see the site calendar, regardless of what we set the Role for visitors to.

      Presumably if we had a new role for notloggedinusers and a capability to enable them to see the calendar, we could work around this issue. But currently the capability is hardcoded into the calendar view page: https://moodle.org/mod/forum/discuss.php?d=359244

      calendar/view.php:
      require_login($course, false);

            rjnl Rajneel Totaram
            jgramp-moodle Jessica Gramp
            Andrew Lyons Andrew Lyons
            Paul Holden Paul Holden
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 46 minutes
                1h 46m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.