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

For a quiz with more than 10 questions, remove page break then add section heading fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.4, 3.2.1
    • 3.1.3
    • Quiz
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • Hide

      The Behat test is probably sufficient (I verifed it failed before fixing the JavaScript) but here are the steps if you want to do it manually.

      1. Create a new course
      2. Create a quiz
      3. Add 11 questions, one on each page.
      4. Use the remove page-break icon to remove the page-break between pages 10 and 11.
      5. From the Add menu for page 10, choose a new section heading.
      Show
      The Behat test is probably sufficient (I verifed it failed before fixing the JavaScript) but here are the steps if you want to do it manually. Create a new course Create a quiz Add 11 questions, one on each page. Use the remove page-break icon to remove the page-break between pages 10 and 11. From the Add menu for page 10, choose a new section heading.

      Thanks to Antonia Bonaccorso for reporting this in the forum, and patiently explaining to me how to reproduce it.

      1. On https://qa.moodle.net/course/view.php?id=7, or any new course, as teacher.
      2. Add 11 questions to a quiz, one on each page.
      3. Use the remove page-break icon to remove the page-break between pages 10 and 11.
      4. From the Add menu for page 10, choose a new section heading.

      Expected result: page reloads with the new head.

      Actual result: Error: Column 'firstslot' cannot be null

      If you look at the HTTP traffic, you can see the problem is a request /mod/quiz/edit.php?cmid=977&addsectionatpage=100 (when it should be 10).

      The problem is, the JavaScript that updates the page after altering page-breaks incorrectly handles two-digit page-breaks.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Eric Merrill Eric Merrill
            David Monllaó David Monllaó
            Ryan Wyllie Ryan Wyllie
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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