This feature is designed for use on pracice or formative quizzes.
It is available for quizzes that use Interactive or Immediate feedback
behaviour.
If the teacher turns this on in the quiz settings, then once a student
has finished a question, they get a 'Redo question' button beside the
question. If they click it, then the question they finished is replaced
by a new one so they can try again to practise that particul skill or
bit of knowledge a bit more.
When randomisation is involved, the studnets will be given a question or
variant that they have not seen before if possible.
touch should only work on temp and below
dir's. With path we get temp/.. and temp/.
So we were modfying moodledata dir as well
and it was failing because of permission issues.
This adds functionality to create individual request directories which can
be only be used for the current request. They are removed by a shutdown
handler.
While default value did not change from 7 days... there are subtle
differences between strtotime('-1 week') used in tests and
-(7*24**3600) used in implementation.
This just makes the unit test to follow the implementation by
using the new config setting.
Disclaimer: I've assigned this commit to MDL-47572 because it's
the issue where I've seen related changes.
Since a couple of days ago, both CI servers were failing. A couple
of days ago it was DST change in Europe/Madrid (that is the PHP
default TZ used by them).
Tests pass perfectly if the TZ is set to any other place not affected
by DST (Australia/Perth, for example).
Really the issue is a wrong mix of functions supporting DST and
functions not supporting them.
But, with current implementation (checking +-60 seconds around a time)
and with a DST change in the middle... this unit tests was going to be
failing for an entire week. And that's not acceptable for CIs.
So, I've changed the intervals, to be bigger than 1h (exactly 1h1s), so
they will be immune to the DST change/partial support.
Ideally all operations should be working in the same way (with or
without DST considered), but that's out from the scope of getting this
test stable enough and passing.