1441 |
ariadna |
1 |
# mod_quiz Upgrade notes
|
|
|
2 |
|
|
|
3 |
## 5.0
|
|
|
4 |
|
|
|
5 |
### Added
|
|
|
6 |
|
|
|
7 |
- quiz_attempt now has 2 additional state values, NOT_STARTED and SUBMITTED. These represent attempts when an attempt has been
|
|
|
8 |
|
|
|
9 |
For more information see [MDL-68806](https://tracker.moodle.org/browse/MDL-68806)
|
|
|
10 |
- New quiz setting "precreateperiod" controls the period before timeopen during which attempts will be pre-created using the new
|
|
|
11 |
NOT_STARTED state. This setting is marked advanced and locked by default, so can only be set by administrators. This setting
|
|
|
12 |
is read by the \mod_quiz\task\precreate_attempts task to identify quizzes due for pre-creation.
|
|
|
13 |
|
|
|
14 |
For more information see [MDL-68806](https://tracker.moodle.org/browse/MDL-68806)
|
|
|
15 |
|
|
|
16 |
### Changed
|
|
|
17 |
|
|
|
18 |
- quiz_attempt_save_started now sets the IN_PROGRESS state, timestarted, and saves the attempt, while the new quiz_attempt_save_not_started function sets the NOT_STARTED state and saves the attempt.
|
|
|
19 |
|
|
|
20 |
For more information see [MDL-68806](https://tracker.moodle.org/browse/MDL-68806)
|
|
|
21 |
- quiz_attempt_save_started Now takes an additional $timenow parameter, to specify the timestart of the attempt. This was previously
|
|
|
22 |
set in quiz_create_attempt, but is now set in quiz_attempt_save_started and quiz_attempt_save_not_started.
|
|
|
23 |
|
|
|
24 |
For more information see [MDL-68806](https://tracker.moodle.org/browse/MDL-68806)
|
|
|
25 |
- The `quiz_question_tostring` method now includes a new boolean parameter, `displaytaglink`. This parameter specifies whether the tag name in the question bank should be displayed as a clickable hyperlink (`true`) or as plain text (`false`).
|
|
|
26 |
|
|
|
27 |
For more information see [MDL-75075](https://tracker.moodle.org/browse/MDL-75075)
|
|
|
28 |
- The `\mod_quiz\attempt_walkthrough_from_csv_test` unit test has been marked as final and should not be extended by other tests.
|
|
|
29 |
|
|
|
30 |
All shared functionality has been moved to a new autoloadable test-case:
|
|
|
31 |
`\mod_quiz\tests\attempt_walkthrough_testcase`.
|
|
|
32 |
|
|
|
33 |
To support this testcase the existing `$files` instance property should be replaced with a new static method, `::get_test_files`.
|
|
|
34 |
Both the existing instance property and the new static method can co-exist.
|
|
|
35 |
|
|
|
36 |
For more information see [MDL-81521](https://tracker.moodle.org/browse/MDL-81521)
|
|
|
37 |
|
|
|
38 |
### Deprecated
|
|
|
39 |
|
|
|
40 |
- quiz_attempt::process_finish is now deprecated, and its functionality is split between ::process_submit, which saves the
|
|
|
41 |
submission, sets the finish time and sets the SUBMITTED status, and ::process_grade_submission which performs automated
|
|
|
42 |
grading and sets the FINISHED status.
|
|
|
43 |
|
|
|
44 |
For more information see [MDL-68806](https://tracker.moodle.org/browse/MDL-68806)
|
|
|
45 |
- The webservice function `mod_quiz_get_user_attempts` is now deprecated in favour of `mod_quiz_get_user_quiz_attempts`.
|
|
|
46 |
|
|
|
47 |
With the introduction of the new NOT_STARTED quiz attempt state, `mod_quiz_get_user_attempts` has been modified to not return NOT_STARTED attempts, allowing clients such as the mobile app to continue working without modifications.
|
|
|
48 |
|
|
|
49 |
`mod_quiz_get_user_quiz_attempts` will return attempts in all states, as `mod_quiz_get_user_attempts` did before. Once clients are updated to handle NOT_STARTED attempts, they can migrate to use this function.
|
|
|
50 |
|
|
|
51 |
A minor modification to `mod_quiz_start_attempt` has been made to allow it to transparently start an existing attempt that is in the NOT_STARTED state, rather than creating a new one.
|
|
|
52 |
|
|
|
53 |
For more information see [MDL-68806](https://tracker.moodle.org/browse/MDL-68806)
|
|
|
54 |
|
|
|
55 |
### Removed
|
|
|
56 |
|
|
|
57 |
- Final removal of quiz_delete_override() and quiz_delete_all_overrides()
|
|
|
58 |
|
|
|
59 |
For more information see [MDL-80944](https://tracker.moodle.org/browse/MDL-80944)
|
|
|
60 |
|
|
|
61 |
## 4.5
|
|
|
62 |
|
|
|
63 |
### Added
|
|
|
64 |
|
|
|
65 |
- The following methods of the `quiz_overview_report` class now take a new optional `$slots` parameter used to only regrade some slots in each attempt (default all):
|
|
|
66 |
- `\quiz_overview_report::regrade_attempts()`
|
|
|
67 |
- `\quiz_overview_report::regrade_batch_of_attempts()`
|
|
|
68 |
|
|
|
69 |
For more information see [MDL-79546](https://tracker.moodle.org/browse/MDL-79546)
|