Webservice doesn't need to set the page URL. Hence,
any function that requires a page URL will raise debugging output.
The patch fixes it by adding a fake URL for the webservice.
The patch also removed assertDebuggingCalled because it is no longer needed.
This part of the code in 'question_category_object.php' 'update_category' method was used before Moodle 4.0 version for renaming
the random questions in an updated category. For Moodle 4.0 and later versions, it is unnecessary as the details of
random questions are no more stored in 'question' table but in 'question_set_references' table.
The method call move_question_set_references handles the same.
... or anything else with length = 0. This got broken in MDL-71696.
The only way to fix this kind-of involves and API change to
quiz_report_get_significant_questions. However, it is only changing
the external API of this function back to how it was before the 4.0 release,
and the chnages in 4.0 were never documented, nor, I would guess, intended,
since they just broke things.
Set needsupdate to finish to avoid regrading each call.
Add error messages for regrading.
Display the error message on the quiz page.
Co-authored-by: Mark Johnson <mark.johnson@catalyst-eu.net>
Including in this commit:
- New method called get_number_of_unanswered_questions() for getting the unanswered questions
- PHPUnit and Behat tests for the new dialogue
- Changed the title from "Confirm" to "Submit all your answers and finish?"
- Changed the content from "Once you submit, you will no longer be able to change your answers for this attempt."
to "You will no longer be able to change your answers for this attempt."
- Changed some Behat scenarios to match with the new dialogue content
These steps are currently using Atto-specific UI features and must
therefore make use of the @editor_atto tag to ensure that they continue
to run using Atto.
A new issue will be raised to migrate each of these to be
editor-agnostic.
This issue greatly improves the performance of displaying statistics in
the question bank.
1. The required quiz statistics are now pre-computed by a scheduled task.
2. Cached statistics in the database are now never cleaned up, so the
pre-computed stats are always available.
3. The way the cached statistics are loaded for each question
that is being displayed is now a bit more efficient.
4. Related to that, there is a new callback which activities can implement,
if they want their question statistics to be included in the ones shown
in the question bank.
Note, there is still further improvement possible to load the statistics
for all questions being displayed in bulk. However, that must wait for a
future issue, MDL-75576. The other improvements in this issue are
significant and we did not want to delay releasing them.
Co-authored-by: Jonathan Champ <jrchamp@ncsu.edu>
Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
Applied the following changes to various testcase classes:
- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.
Special mention to:
- In lib/tests/blocklib_test.php 2 helper classes have been
moved to tests/fixtures, because they needed to be namespace-free.
* Replaces checking header for SEB config keys to assess quiz access.
* Adds new web service accessible via Ajax
* Forces the use of the new API where available
* Stores access in Moodle SESSION for quiz instead of checking every
page.
* As a student I should only be able to access the next question or the current question
* The API should not show more than the current question
* Once the quiz is previewed we can see the question in any order (existing behaviour)
* Related to ticket MDL-71728
Co-authored-by: Rajneel Totaram <rjnlfj@yahoo.com>
Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
For a long time, Moodle has had the feature to force the language
for a whole course. This change adds the same feature at activity
level.
The course-level feature was controlled by a capability
moodle/course:setforcedlanguage, and I decided to use the same
capability to control this feature. I think a new capability would be
overkill.