-
Functional Test
-
Minor
-
None
-
Moodle 5.0
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!
Upgrade
- Before applying the changes, create a course and add a quiz
- Apply the changes and run the upgrade.
- During the upgrade, set the new "Precreate period" plugin setting to "5 hours".
- Go back to the quiz and access the settings page.
- Expand the "Timing" fieldset.
- Confirm that you do not see the "Pre-create attempts" setting.
- Go to Site Administration > Plugins > Activity modules > Quiz
- Uncheck the "Locked" checkbox for the "Precreate period" setting and save.
- Return to the quiz settings page.
- Expand the "Timing" fieldset.
- Confirm that you do not see the "Pre-create attempts" setting.
- Check "Enabled" on the "Open the quiz" setting
- Confirm that you do see the "Pre-create attempts" setting, and it is unchecked.
- Check "Pre-create attempts" and save settings
- Return to the quiz settings screen.
- Confirm that "Pre-create attempts" is checked.
Pre-create attempts
- Create a course with some students and teacher enrolled.
- Log in as admin
- Go to Site Administration > Plugins > Activity modules > Quiz
- Set the new "Precreate period" plugin setting to "5 hours" and check "Locked", if not already, and save changes.
- 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"
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 text and save changes.
- Log in as a student with a pre-created attempt.
- Wait for the quiz to open (if needed) and begin your attempt.
- Navigate to the edited question.
- Confirm that you see the edited question text, not the original text.
- is a QA test written for
-
MDL-68806 New quiz attempt states and asynchronous attempt creation
-
- Closed
-