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

Coding error when attempting to edit an imported event date

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.6.6, 3.7.2, 3.8
    • 3.6.7, 3.7.3
    • Calendar
    • MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • Hide

      Obtain iCal export

      1. Use icalexport.ics (generated from https://moodle.org/calendar/export.php with Time period set to Next month i.e. November 2019)

      Import iCal

      1. Navigate to Calendar
      2. Press Manage Subscriptions
      3. Set the field Import from to Calendar file (.ics)
      4. Upload file to Calendar file (.ics) field
      5. Press Add
      6. Navigate to Calendar
      7. Go to November 2019
      8. Click on MoodleMoot Greece event on November 28
      9. Press Edit
      10. Press Show more...
      11. Set the Date field to be after the Duration (Until) field
      12. Press Save
      13. Confirm you get a validation error informing you that "The date and time you selected for duration until is before the start time of the event. Please correct this before proceeding."
      Show
      Obtain iCal export Use icalexport.ics (generated from https://moodle.org/calendar/export.php with Time period set to Next month i.e. November 2019) Import iCal Navigate to Calendar Press Manage Subscriptions Set the field Import from to Calendar file (.ics) Upload file to Calendar file (.ics) field Press Add Navigate to Calendar Go to November 2019 Click on MoodleMoot Greece event on November 28 Press Edit Press Show more... Set the Date field to be after the Duration (Until) field Press Save Confirm you get a validation error informing you that " The date and time you selected for duration until is before the start time of the event. Please correct this before proceeding. "

    Description

      As discovered by jasmink in MDLQA-13834:

      Steps to reproduce:

      1. Import a calendar event via .ics file e.g. from https://moodle.org/calendar/export.php
      2. Edit the the imported event and change the date so that it is after the duration until date.
      3. Save changes.

      Expected result:

      As for a manually added calendar event, if you attempt to do something which doesn't make sense, you see a message 'The date and time you selected for duration until is before the start time of the event. Please correct this before proceeding.'

      Actual result:

      Error code: codingerror

      line 802 of /lib/moodlelib.php: coding_exception thrown
      line 2020 of /lib/formslib.php: call to clean_param()
      line 2043 of /lib/formslib.php: call to MoodleQuickForm->getCleanedValue()
      line 320 of /lib/formslib.php: call to MoodleQuickForm->updateSubmission()
      line 224 of /lib/formslib.php: call to moodleform->_process_submission()
      line 3591 of /calendar/lib.php: call to moodleform->__construct()
      line 7895 of /lib/moodlelib.php: call to calendar_output_fragment_event_form()
      line 415 of /lib/external/externallib.php: call to component_callback()
      line 244 of /lib/externallib.php: call to core_external::get_fragment()
      line 79 of /lib/ajax/service.php: call to external_api::call_external_function()

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              tsala Helen Foster
              Peter Dias Peter Dias
              Andrew Lyons Andrew Lyons
              Gladys Basiana Gladys Basiana
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Nov/19

                Time Tracking

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