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

process_question_answer queries the DB for each answer rather than per questions

    Details

    • Testing Instructions:
      Hide

      1. Create a quiz with a Multiple choice question.
      2. Duplicate the Quiz in the course.

      Ensure no errors.
      Ensure the answers to the questions are restored correctly by attempting the quiz.

      Show
      1. Create a quiz with a Multiple choice question. 2. Duplicate the Quiz in the course. Ensure no errors. Ensure the answers to the questions are restored correctly by attempting the quiz.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-40893-master

      Description

      During restore, questions have the answers attached to them in a serial manner. However the database is queried for each answer because of the progressive parsing loader.

      Creating a small cache of the answers for a single question allows a reduction in database usage and also does a complete text match rather than the first 255 characters. Which does have the potential to expose the wrong answer to us.

      The memory requirement for a single question should not be large as any quiz page will be required to pay the same cost when displaying the answers to the quiz.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Sep/13