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

Front page level calendar requires login when courses parameter included in URL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.5, 2.0
    • Fix Version/s: 1.9.6
    • Component/s: Calendar
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      The 'Go to calendar...' link in the upcoming events block may require the user to login even when forcelogin is set to false.

      When the upcoming calendar block is visible a non-logged in user may see the headings for some upcoming site level calendar items.
      Clicking on calendar item titles or dates allows them to view more information, however clicking on 'Go to calendar...' takes them to a login page.

      It seems that /calendar/view.php treats these two URLs differently

      /calendar/view.php?view=upcoming&course=1 (requires a login before showing site events)

      /calendar/view.php?view=upcoming (does not require a login and shows details of site events)

      To reproduce in 1.9.5 or 2.0:

      1. Set forcelogin to false
      2. Set autologin to false
      3. Show the upcoming events block
      4. Logout and then visit the front page
      5. Click on 'Go to calendar...' in the upcoming events block

      Suggested change:

      /calendar/view.php

      Replace
      if ($courseid) {
      with
      if ($courseid && $courseid != SITEID) {

      Patch attached for 2.0 and 1.9.5

      This allows non-logged in users to view the details of events without logging in, but only when forcelogin has been set to false.

        Attachments

          Activity

            People

            Assignee:
            dougiamas Martin Dougiamas
            Reporter:
            digitalsean Sean Farrell
            Tester:
            Andrew Davis
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              21/Oct/09