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

A bad question in db stops the question bank

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Log in as admin
      2. Restore the backup-moodle2-course-7-c1-20181123-2011-nu.mbz backup file into Moodle as a new course.
      3. Go to the course and then go to the quiz that is in the first section
      4. Go to the quiz editing page (where you can add questions to the quiz)
      5. Click on add -> from question bank link
      6. set the category to CAT63809
      7. Confirm that you see the list of questions and no exception dialogue/modal pops up
      Show
      Log in as admin Restore the  backup-moodle2-course-7-c1-20181123-2011-nu.mbz  backup file into Moodle as a new course. Go to the course and then go to the quiz that is in the first section Go to the quiz editing page (where you can add questions to the quiz) Click on add -> from question bank link set the category to CAT63809 Confirm that you see the list of questions and no exception dialogue/modal pops up
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
      MDL-63809-35-5
    • Pull Master Branch:
      MDL-63809-master-5

      Description

      If there is a bad question (for example a multichoice question with no option in the qtype_multichoice_options table) in the DB, when you try to add a question from the bank Moodle throws a JS error and in the logs there is an sql error record not found.

      This is the same problem as MDL-62811, but it is showing itself in other places as well.

      To reproduce:

      1. Create a new multiple choice question.
      2. In the database, delete the newly added row in qtype_multichoice_options.
      3. Create a quiz
      4. Go to the quiz edit questions page
      5. click on add -> from question bank

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rezaie9 Shamim Rezaie
              Reporter:
              rezaie9 Shamim Rezaie
              Peer reviewer:
              Tim Hunt
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Jan/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m