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

Fatal error when importing "course" events from ics file

    XMLWordPrintable

Details

    • MOODLE_311_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-74436-311
    • MDL-74436-400
    • Hide
      1. Log in as admin
      2. Create a course
      3. 311
        1. Select Calendar from navigation drawer
        2. Press Manage subscriptions
      4. master
        1. Add the Calendar block to the course
        2. Press Import or export calendars
        3. Press Import calendar
      5. Enter a Calendar name
      6. Import from: Calendar file
      7. Upload icalexport.ics
      8. Type of event: Course (leave the Course field empty)
      9. Submit form
      10. Confirm the Course field shows Select a course error
      11. Change Type of event: Category
      12. Clear the Category field (it should say No selection)
      13. Submit form
      14. Confirm the Category field shows Required error

      Regression test

      1. Now change Type of event: Course and select a course
      2. Submit form
      3. Confirm the events were imported into the selected course
      4. Navigate back to the calendar import page
      5. Upload the same file again
      6. Change Type of event: Category and select a category
      7. Submit form
      8. Confirm the events were imported into the selected category
      Show
      Log in as admin Create a course 311 Select Calendar from navigation drawer Press Manage subscriptions master Add the Calendar block to the course Press Import or export calendars Press Import calendar Enter a Calendar name Import from: Calendar file Upload icalexport.ics Type of event: Course (leave the Course field empty) Submit form Confirm the Course field shows Select a course error Change Type of event: Category Clear the Category field (it should say No selection ) Submit form Confirm the Category field shows Required error Regression test Now change Type of event: Course and select a course Submit form Confirm the events were imported into the selected course Navigate back to the calendar import page Upload the same file again Change Type of event: Category and select a category Submit form Confirm the events were imported into the selected category

    Description

      To replicate:

      1. Add $CFG->calendar_adminseesall = true; to config.php
      2. Create a course and add the calendar block
      3. Click the "Import or export calendars" link on the block
      4. Press the "Import calendar" button
      5. Set "Import from"  to "Calendar file (.ics)
      6. Upload an ics file (there's one attached to this issue that you can use)
      7. Set "Type of event" to "Course"
      8. Press "Import calendar"

      I guess the issue is that the user is expected to select a course when using the "Course" event type, but the UI doesn't indicate that field is required, nor does it appear to do any validation upon submission.

      Attachments

        1. icalexport.ics
          3 kB
          Paul Holden
        2. MDL-74436_regression test 1.png
          73 kB
          Angelia Dela Cruz
        3. MDL-74436_regression test 2.png
          64 kB
          Angelia Dela Cruz
        4. MDL-74436_test 1.png
          75 kB
          Angelia Dela Cruz
        5. MDL-74436_test 2.png
          75 kB
          Angelia Dela Cruz

        Activity

          People

            pholden Paul Holden
            cameron1729 cameron1729
            Simey Lameze Simey Lameze
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9/May/22

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 42 minutes
                2h 42m