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

A bad question in db stops the question bank

XMLWordPrintable

    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MDL-63809-master-5
    • 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

      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

            rezaie9 Shamim Rezaie
            rezaie9 Shamim Rezaie
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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