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

Incorrect error thrown when switching to essay question type inside Lessons for certain cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.15
    • 1.9.13
    • Lesson
    • Any
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Hide

      1. Create a new lesson
      2. Add a new question page
      3. Title the question 'Essay 1' and click save, "not realizing you just saved a multiple choice question type"
      4. "See you're error" and edit the question.
      5. Switch to the 'essay' type by clicking the last tab
      6. Save the essay and receive the following error: Update page: EOB not updated
      7. Go back to the lesson and see that it really was updated.
      8. Apply the patch, repeat steps 1-6 but find no error.

      Show
      1. Create a new lesson 2. Add a new question page 3. Title the question 'Essay 1' and click save, "not realizing you just saved a multiple choice question type" 4. "See you're error" and edit the question. 5. Switch to the 'essay' type by clicking the last tab 6. Save the essay and receive the following error: Update page: EOB not updated 7. Go back to the lesson and see that it really was updated. 8. Apply the patch, repeat steps 1-6 but find no error.

      I realize this is an edge case scenario but we had to address it here due to repeated run-ins with it.
      If a Lesson creator Adds a new Question Page with a MultipleChoice question (the default question type when creating a new question) and clicks save without adding any answers, they will get an incorrect error if they then choose to go back, edit that question, and save it as an essay.

      The error they get is "Update page: EOB not updated". This is not correct. The page updates correctly. The code assumes that it wasn't because update_record() returns false. It returns false because its being told to update a record with and id of 0.

      Testing instructions and forthcoming patch will give more explanation.

            blepoxp Glenn Ansley
            blepoxp Glenn Ansley
            Sam Hemelryk Sam Hemelryk
            Sam Hemelryk Sam Hemelryk
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.