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

Calendar import issues with recurring events

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.6, 3.2.2, 3.3
    • Fix Version/s: 3.2.4
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      1. Login as an admin, make sure debugging is turned on.
      2. Go to Calendar
      3. Click Manage subscriptions
      4. Enter a calendar name (e.g. Jun's awesome public calendar)
      5. Enter the https://calendar.google.com/calendar/ical/moodle.com_gverd91agb5htmi8ervnn6q2j0%40group.calendar.google.com/public/basic.ics into the Calendar URL.
      6. Click Add.
        • Confirm that you can successfully import the calendar.
      7. Manually edit the DB entry of the imported calendar in the "{event_subscriptions}" table.
      8. Set the value for the "pollinterval" column to 1.
      9. Open a terminal and go to your moodle root directory.
      10. Run

        php admin/tool/task/cli/schedule_task.php --execute=\\core\\task\\calendar_cron_task
        

        • Confirm that the cron task successfully completes.
        • Confirm that you don't get any debugging messages.
      11. View the calendar.
        • Confirm that it is being displayed properly.
      12. Click again on Manage subscriptions
      13. Click on the Update button for the imported calendar.
        • Confirm that you don't get any debugging messages.
      14. Go back and view the calendar.
        • Confirm that it is still being displayed properly.
      PHPUnit
      1. Run unit tests for the core_calendar test suite.
        • Confirm that all tests are passing.
      Show
      Login as an admin, make sure debugging is turned on. Go to Calendar Click Manage subscriptions Enter a calendar name (e.g. Jun's awesome public calendar) Enter the https://calendar.google.com/calendar/ical/moodle.com_gverd91agb5htmi8ervnn6q2j0%40group.calendar.google.com/public/basic.ics into the Calendar URL. Click Add. Confirm that you can successfully import the calendar. Manually edit the DB entry of the imported calendar in the "{event_subscriptions}" table. Set the value for the " pollinterval " column to 1. Open a terminal and go to your moodle root directory. Run php admin/tool/task/cli/schedule_task.php --execute=\\core\\task\\calendar_cron_task Confirm that the cron task successfully completes. Confirm that you don't get any debugging messages. View the calendar. Confirm that it is being displayed properly. Click again on Manage subscriptions Click on the Update button for the imported calendar. Confirm that you don't get any debugging messages. Go back and view the calendar. Confirm that it is still being displayed properly. PHPUnit Run unit tests for the core_calendar test suite. Confirm that all tests are passing.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-58810-master

      Description

      Issue 1

      When importing ics file for the calendar with repeating events I get on master:

      Error: mdb->get_record() found more than one record!
       
          line 1570 of /lib/dml/moodle_database.php: call to debugging()
          line 1530 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
          line 1509 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
          line 3062 of /calendar/lib.php: call to moodle_database->get_record()
          line 3206 of /calendar/lib.php: call to calendar_add_icalendar_event()
          line 3256 of /calendar/lib.php: call to calendar_import_icalendar_events()
          line 79 of /calendar/managesubscriptions.php: call to calendar_update_subscription_events()
      

      and on 3.2:

      Error: mdb->get_record() found more than one record!
       
          line 1563 of /lib/dml/moodle_database.php: call to debugging()
          line 1523 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
          line 1502 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
          line 3038 of /calendar/lib.php: call to moodle_database->get_record()
          line 3176 of /calendar/lib.php: call to calendar_add_icalendar_event()
          line 3220 of /calendar/lib.php: call to calendar_import_icalendar_events()
          line 79 of /calendar/managesubscriptions.php: call to calendar_update_subscription_events()
      

      P.S. I used .ics file for Moodle development calendar

      Issue 2

      When updating an imported a Calendar URL that has repeating events, an error is encountered: https://gist.github.com/junpataleta/3ff87e67f8da823444c6aa673351cec3

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Jul/17