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

Replace Legacy events - Quiz

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Events API, Quiz
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-41039-master
    • Story Points:
      40
    • Sprint:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/13