This is a regression when the activity pages were redessigned in Moodle
4.0. The default introduction should be displayed when the activity
description is empty.
This commit makes the following improvements to mod_imscp tests:
* Removes unnecessary @javascript and @_file_upload tags from non-JS tests.
* Removes user/enrol data generation from tests that can be performed as admin.
* Removes "I log out" and other unnecessary steps.
In this commit, the following improvements were made to the mod_lti Behat tests:
* Replaced manual steps with data generators to set completion.
* Eliminated unnecessary user and course enrolments data generation as some tests can be performed as an admin.
* Removed the @javascript tag from non-JS tests.
* Updated the LTI data generator to generate an internal Moodle URL in the toolurl field, enabling the use of XML files.
Restoring multiple quizzes from a pre-4.0 backup was broken when
the quizzes shared a random question. This is because after the
first quiz created a set reference in place of the random question,
it deleted the question record so it was not there for the second
quiz to use. This change tracks the IDs of random questions so
they can be deleted at the end.
Previously, a set of calculated quiz statistics would only 'last' for
15 minutes. Then they would be considered invalid and not used.
Now, computed statistics are kept indefinitely. Instead, when a new
batch of values are computed for a particular set of settings, older numbers
for the same settings are deleted first. Therefore,
question_stats_cleanup_task is no more.
Previously, when users viewed the question bank, if the quiz statistics
had not already been calculated, we would try to compute them there an then.
This could be very, very slow, leading to session lock problems.
Now, we never try to compute the statistics on the fly. Instead, we rely
on the existing \quiz_statistics\task\recalculate scheduled task to do it.
The behat step "I draw on the pdf" creates the exact same line every
time it is called. This can cause issues in a situation like the following:
- Student uploads PDF
- Teacher annotates page 1
- Student edits submission, adding another PDF
- Teacher annotates page 1 again
- When the student looks at their annotated PDF it appears the same as
before they added the second PDF (i.e., they don't see extra pages for
the second PDF)
Exactly why this happens isn't clear, and in practice this probably never
happens because the chances of drawing the exact same line twice are almost
0. However, when testing the functionality added in MDL-45580 it was causing
issues.
When requesting the readonly version of pages (which contain
teacher annotations), they should always be available - the
PHP side even throws an exception when they're not. This
means we don't need to worry about polling document converters
from the JS side and can just return the pages immediately.
MDL-45580 introduced the readonlypages filearea, and when loading
page images for an attempt, the code would check if the pages existed
, creating them if not. The code inside this block also contained
a guard clause for the case where no readonly pages existed - which
is a situation that should not happen. Whenever readonly pages are
requested, they should exist.
MDL-66626 introduced a situation where page counts not matching would
also retrigger page generation. However this led to a situation where
the guard clause could be entered when requesting readonly pages.
This patch refactors the guard clause, and improves the logic to
regenerate pages.