-
Functional Test
-
Minor
-
None
-
Original - DO NOT REPORT TEST RESULTS HERE
This is an exploratory test of a new feature or improvement, so please feel free to try anything you like and not just the test steps!
Pre-create attempts
- Create a course with some students and teacher enrolled.
- Log in as admin
- Create a quiz called "Test Quiz" with Timing > Open the quiz set to 5 minutes from now.
- Add a question to the quiz (doesn't matter what).
- Go to Site Administration > Server > Tasks > Scheduled tasks, find \mod_quiz\task\precreate_attempts, and click "Run now"
- Confirm that you see the following output, where X is the number of enrolled students:
Found 1 quizzes to create attempts for
Creating attempts for Test Quiz
Created X attempts for Test Quiz in Y seconds
Created attempts for 1 quizzes
- Confirm that you see the following output, where X is the number of enrolled students:
- Return to the quiz view page
- Confirm that you see an "Attempts: X"
- Follow the link to the list of attempts
- Confirm that the options at the top of the page are set to "Attempts from: enrolled users who have a quiz attempt" and "Attempts that are" has all 6 states selected.
- Confirm that the list of attempts contains an attempt for each enrolled student, in the state "Not started", with all subsequent columns containing "-".
- Set "Attempts from" to "Enrolled users who do not have a quiz attempt" and click "Show report"
- Confirm that no users are shown.
- Set "Attempts from" to "Enrolled users who have, or do not have a quiz attempt" and click "Show report"
- Confirm that the attempts are shown again
- Untick "Not started" from the list of attempt states and click "Show report"
- Confirm that no attempts are shown.
- Log out
Start and submit a pre-created attempt
- Log in as a student
- If necessary, wait until the quiz open time is reached
- Go to the course and access the quiz
- Confirm you do not see any attempts listed on the page
- Confirm you see the "Attempt quiz" button
- Click "Attempt quiz"
- Confirm you are on this quiz page with the question displayed
- Click "Back"
- Confirm that the page lists 1 in-progress attempt
- Click "Continue attempt"
- Answer the question and click "Finish attempt..."
- Click "Submit all and finish"
Review a submitted attempt
- Click "Submit all and finish" in the confirmation modal
- Confirm that you see the attempt review page
- Confirm that the attempt details table at the top of the page shows only the Started on, Completed on, Time taken and State rows, with the state "Submitted".
- Confirm that the message "This attempt has been submitted and is queued for grading. Please check back shortly to see grades and feedback." is displayed above the question.
- Confirm that the question is displayed with your answer in place, no marks or feedback, and your answer cannot be altered.
- Click "Finish review"
- Confirm that the quiz front page shows your attempt with state "Submitted", the submitted date, and "Not yet graded" for the Marks and Grade.
Grade submitted attempts
- Run `php admin/cli/adhoc_task.php --classname='\mod_quiz\task\grade_submission'` to process the attempt.
- Click "Review" to return to the attempt review.
- Confirm that you now see the "Marks" and "Grade" rows in the summary table.
- Confirm that you no longer see the "queued for grading" message.
- Confirm that the question displays indicating whether the answer is correct, showing the marks awarded and any feedback is displayed.
- Log out.
Re-create pre-created attempts when a question is edited
- Log in as admin
- Go back to "Test Quiz" and select the "Results" tab.
- Check all attempts in the list and select "Delete selected attempts"
- Go to the "Settings" tab.
- Set "Timing" > "Open the quiz" to 5 minutes from now and save changes.
- Go to Site Administration > Server > Tasks > Scheduled tasks, find \mod_quiz\task\precreate_attempts, and click "Run now"
- Return to the "Test Quiz" "Results" tab
- Confirm that you see a list of attempts in "Not started" state.
- Go to the "Question bank" tab.
- Pick one of the questions used in the quiz, select "Edit" > "Edit settings".
- Edit the question name and save changes.
- Go back to the "Results" tab.
- Confirm that there are no attempts listed as they have been deleted.
- Go to Site Administration > Server > Tasks > Scheduled tasks, find \mod_quiz\task\precreate_attempts, and click "Run now"
- Go back to the "Results" tab.
- Confirm that you see a list of attempts in "Not started" state.
- is a QA test written for
-
MDL-68806 New quiz attempt states to support creating or grading them asynchronously
- Development in progress