Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in to Moodle as a student
      2. Go to Navigation > Site pages > Calendar.
      3. Click the button 'Manage subscriptions'.
      4. Try importing a calendar with the URL http://tinyurl.com/at55c97
      5. Make sure it is imported and all events are created (if the linked issue is fixed) else events wont be created.
      Show
      Log in to Moodle as a student Go to Navigation > Site pages > Calendar. Click the button 'Manage subscriptions'. Try importing a calendar with the URL http://tinyurl.com/at55c97 Make sure it is imported and all events are created (if the linked issue is fixed) else events wont be created.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-36525-master

      Description

      When trying to import a calendar using a URL to an ICS file (not a script that generates an iCal data), the import process throws an error.

      1. Log in to Moodle as a student
      2. Go to Navigation > Site pages > Calendar.
      3. Click the button 'Manage subscriptions'.
      4. Try importing a calendar with the URL http://tinyurl.com/at55c97

      Expected result: The file should be used as the basis of a calendar

      Actual result: An error is shown, but the calendar entry is still created.

      The given iCal URL is invalid.
       
      More information about this error
      Debug info:
      Error code: errorinvalidicalurl
      Stack trace:
       
          line 2873 of /calendar/lib.php: moodle_exception thrown
          line 2950 of /calendar/lib.php: call to calendar_get_icalendar()
          line 78 of /calendar/managesubscriptions.php: call to calendar_update_subscription_events()

      I suspect this has something to do with the call to $curl->get() failing at line 2871 of calendar/lib.php. This might be because the URL of the calendar above forces the user to download the file, rather than giving the content as a response. Trying the following URL works. Using the URLs directly in your browser highlights this distinction.

      http://www.mozilla.org/projects/calendar/caldata/AustraliaHolidays.ics

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12