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

question attempts in Preview question window are not deleted from database

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2.4, 2.3.1, 2.4
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      0. Look in your question_usages table. If you have done any work with questions, you will probably see lots of rows with component 'core_question_preview'. Note the smallest id of any row with component = 'core_question_preview'

      If you don't have lots of old previews kicking around, you should probably let someone else test this bug.

      1. Go and preview a question somewhere, so you have a recent preview. Keep that preview pop-up open.

      2. Now run cron. make sure it completes without errors, particularly the bit about 'Cleaning up old question previews...'.

      3. Look in the question_usages table again. Most of the old previews should now have been deleted. In particular, the oldest preview, whose id you noted in step 0. should be gone.

      4. Press reload (F5) in the question preview pop-up you opened in step 1. That should be fine. Recent previews should not be deleted.

      5. Please test that cron runs without errors on all 4 supported databases.

      Show
      0. Look in your question_usages table. If you have done any work with questions, you will probably see lots of rows with component 'core_question_preview'. Note the smallest id of any row with component = 'core_question_preview' If you don't have lots of old previews kicking around, you should probably let someone else test this bug. 1. Go and preview a question somewhere, so you have a recent preview. Keep that preview pop-up open. 2. Now run cron. make sure it completes without errors, particularly the bit about 'Cleaning up old question previews...'. 3. Look in the question_usages table again. Most of the old previews should now have been deleted. In particular, the oldest preview, whose id you noted in step 0. should be gone. 4. Press reload (F5) in the question preview pop-up you opened in step 1. That should be fine. Recent previews should not be deleted. 5. Please test that cron runs without errors on all 4 supported databases.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      The database tables mdl_question_attempts, mdl_question_attempt_steps & mdl_question_attempt_step_data store all question attempts.

      Attempts at questions which are made from within a Quiz are deleted when the said Quiz is deleted.

      However, attempts at questions made in the Preview Question window never get deleted.
      On a site where question creators heavily test their questions this may un-necessarilyh blow-up the database. Since it is not possible to delete those attempts from the moodle interface, it is impossible to delete a question behaviour NOR a question type that has some attempts remaining in the database.

      Would it be possible for attempts made in the Preview question window to be automatically deleted upon closing the window? Those attempts are no use whatsoever later on anyway...

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12