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

Replace Legacy events - Quiz

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6
    • 2.6
    • Events API, Quiz
    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • MDL-41039-master
    • Hide

      Test pre-requisites

      1. Give the permissions mod/quiz:emailconfirmsubmission, and mod/quiz:emailwarnoverdue to Student role.
      2. Make sure your students accounts can receive emails

      Test 0

      1. Create a quiz without a time limit or close date.
      2. Attempt the quiz as a student, and submit it.
      3. Make sure you receive an email about the quiz being submitted.

      Test 1

      1. Create a quiz
        • with a close date set to be now + 2 min, and
        • "When time expires" to "There is a grace period when open attempts can be submitted, but no more questions answered"
        • A grace period of 2 min
      2. Attempt the quiz as a student, do not submit any answer and leave the quiz. Wait for the quiz to expire and re-visit it.
      3. Make sure you receive an email about the quiz being overdue
      4. Click the link in the email, then click the Submit all and finish button.
      5. Make sure you receive an email about the quiz being submitted

      Test 2

      1. Create a quiz
        • with a close date set to be now + 2 min, and
        • "When time expires" to "Attempts must be submitted before time expires, or they are not counted"
      2. Attempt the quiz as a student, submit the answers, but not the quiz, and let the quiz expire
      3. Make sure you do not receive an email about the quiz being submitted.
      4. Go back to the quiz, and make sure the attempt state is now never submitted.

      Test 3

      1. Create a quiz
        • with a close date set to be now + 2 min, and
        • "When time expires" to "Open attempts are submitted automatically"
      2. Attempt the quiz as a student, submit the answers, but not the quiz, and let the quiz expire
      3. Make sure you receive an email about the quiz being submitted

      Test 4

      1. Run the unit tests and make sure that they pass.
        • mod/quiz/tests/attemptlib_test.php
        • mod/quiz/tests/locallib_test.php
      Show
      Test pre-requisites Give the permissions mod/quiz:emailconfirmsubmission, and mod/quiz:emailwarnoverdue to Student role. Make sure your students accounts can receive emails Test 0 Create a quiz without a time limit or close date. Attempt the quiz as a student, and submit it. Make sure you receive an email about the quiz being submitted. Test 1 Create a quiz with a close date set to be now + 2 min, and "When time expires" to "There is a grace period when open attempts can be submitted, but no more questions answered" A grace period of 2 min Attempt the quiz as a student, do not submit any answer and leave the quiz. Wait for the quiz to expire and re-visit it. Make sure you receive an email about the quiz being overdue Click the link in the email, then click the Submit all and finish button. Make sure you receive an email about the quiz being submitted Test 2 Create a quiz with a close date set to be now + 2 min, and "When time expires" to "Attempts must be submitted before time expires, or they are not counted" Attempt the quiz as a student, submit the answers, but not the quiz, and let the quiz expire Make sure you do not receive an email about the quiz being submitted. Go back to the quiz, and make sure the attempt state is now never submitted. Test 3 Create a quiz with a close date set to be now + 2 min, and "When time expires" to "Open attempts are submitted automatically" Attempt the quiz as a student, submit the answers, but not the quiz, and let the quiz expire Make sure you receive an email about the quiz being submitted Test 4 Run the unit tests and make sure that they pass. mod/quiz/tests/attemptlib_test.php mod/quiz/tests/locallib_test.php
    • 40
    • BACKEND Sprint 5

    Description

      Replace all legacy events related to quiz.

      • quiz_attempt_started
      • quiz_attempt_submitted
      • quiz_attempt_abandoned
      • quiz_attempt_overdue

      Change handlers to observers
      mod/quiz/db/events.php

      • quiz_attempt_submitted
      • quiz_attempt_overdue

      Attachments

        Issue Links

          Activity

            People

              fred Frédéric Massart
              abgreeve Adrian Greeve
              Tim Hunt Tim Hunt
              Sam Hemelryk Sam Hemelryk
              Andrew Davis Andrew Davis
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Raquel Ortega, Sabina Abellan, Sander Bangma, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13