* A method to change the max mark for one question_attempt in the usage
* A method to replace one question in a usage with another, moving the
old question_attempt to the end.
* Methods to set and get metadata (string name value pairs) for each
question_attempt in the usage. This gets stored in the first step in a
way that should not interfere with anything else.
There are several improvements over what we had before:
1. We track all the questions seen in the the student's previous
quiz attempts, so that when they start a new quiz attempt, they get
questions they have not seen before if possible.
2. When there are no more unseen questions, we start repeating, but
always taking from the questions with the fewest attempts so far.
3. A similar logic is applied with variants within one question.
There is lots of credit to go around here. Oleg Sychev's students Alex
Shkarupa, Sergei Bastrykin and Darya Beda all worked on this over
several years, helping to clarify the problem and shape the best
solution. In the end, their various attempts were rewritten into this
final patch by me.
Further improvements to this code, including resolving edge cases:
* The new feature can only be used when it is possible for the
previous question in the quiz to be complete.
* Also, this new feature cannot be used in combination with shuffle
questions, because that make no sense; nor in combination with
sequential navigation, because to make that work properly would be a lot
of effort. If someone needs that to work later, it should be possible
for them to implement it.
* There were changes in the edit renderer API, to try to make things
more consistent, and to make it less likely we will need to change
things again in the future. See mod/quiz/upgrade.txt.
* As part of this change, the styling of the Edit quiz page was tweaked
to make slighly more efficient use of the horizontal space, and to be
more symmetrical.
Several tables have had unique keys added to enforce a constraint that
should always have been there. It is possible for old sites to have
data that violate the constraints, and sometimes people want to backup
data from those old sites, and restore them into a new Moodle.
Therefore, we need to guard agains the unique key violation errors.
* Added tests for previewing the question, to make sure it works when
attempted.
* Added Moodle XML export tests.
* Reorganised the tests to follow the 'Test one thing per scenario' best
practice.
This commit requires MDL-49154 to work.
* Added tests for previewing the question, to make sure it works when
attempted.
* Added Moodle XML export tests.
* Reorganised the tests to follow the 'Test one thing per scenario' best
practice.
This commit requires MDL-49154 to work.
* Added tests for previewing the question, to make sure it works when
attempted.
* Added Moodle XML export tests.
* Reorganised the tests to follow the 'Test one thing per scenario' best
practice.
This commit requires MDL-49154 to work.
This commit also fixes MDL-32049 about the lack or valdiation message
when an incomplete respnses is submitted.
AMOS BEGIN
CPY [pleaseananswerallparts,qtype_match],[pleaseananswerallparts,qtype_multianswer]
AMOS END
following_should_download_between_and_bytes step sometimes
fails because of server speed. Added extended timout
ensuring they wait enough before failing.
Also, not calling force download while running behat site
following_should_download_between_and_bytes step sometimes
fails because of server speed. Added extended timout
ensuring they wait enough before failing.
Also, not calling force download while running behat site
The back end code already threw an exception if you clicked the icon,
so you could not delete the category, but we should not have shown the
icon in the first place.
Thanks to Pramith Dayananda for working out the fix for this issue. I am
just committing it.