Upon Moodle 2.8 the option to bulk delete all questions of a quiz
disappeared.
This patch adresses this and reintruduces a bulk action button.
Pushing that button shows a Delete and a Cancel button as well as
two Select all / Deselect all triggers and each and every question
gets a checkbox. The UI is slimmed down and other elements (e.g.
'Repaginate' button and so on) are hidden. Questions can be chosen
and deleted by pushing the Delete button. The bulk action button
is disabled when quiz attempts are present, just like the
'Repaginate' button.
TODO: Behat tests are lacking.
Mostly the rules were not having any effect so have been removed.
The text-wrap rule was removed rather than corrected because overflow
was clipped with ellipsis anyway.
An exception for !important has been added to mod/quiz/styles.css
because the use in the secure style is by design. But the exception
isn't ideal because it applied to the whole file and csslint doesn't
seem to be very intelligent at appling line rules at a more granular
level at this point in time.
1. Don't show a warning if there are a limited number of attempts, only
if there is a time limit.
2. Merge that time-limit warning into the same form that is used for
entering a password, etc.
3. Make that form an JavaScript dialogue when you click the start attempt
button.
AMOS BEGIN
MOV ['confirmstarttimelimit', 'mod_quiz'], ['confirmstart', 'quizaccess_timelimit']
AMOS END
This is to be consistent with places like forum and book, where if we
have a next link, we also have a previous link.
At the same time I have amended the links/buttons from 'Previous'/'Next'
to 'Previous page'/'Next page' because I think that is clearer.
Also, on the last page of the quiz, I have changed 'Next' to 'Finish
attempt ...' for consistency with the link in the navigation block.
AMOS BEGIN
CPY [navigatenext,mod_assignment],[navigatenext,mod_quiz]
CPY [navigateprevious,mod_assignment],[navigateprevious,mod_quiz]
AMOS END
The sections are created on the edit quiz page, and then appear in the
navigation panel when the quiz is being attempted to help students find
their way around.
The 'Shuffle questions' setting has been moved from being per-quiz
to being a per-section.
This commit is actually the joint work of Mahmoud Kassaei and Tim Hunt
from The Open University. We could only use one persons name for the
commit and this time Mahmoud gets the credit/blame.
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.
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.
As part of this, I tweaked the LTR style a bit, in a way that is both an
improvement (I hope) and also to reduce the amount of RTL-specific code
required. (Thanks to Fred for spotting some of the problems.)
Also, I changed one course style in boostrapbase, where the RTL rule was
different from the LTR rule.
Finally, I saw some repeated RTL rules in the quiz styles.css, and so
eliminated the the duplicate rules.
While doing this code clean-up, I noticed that the question bank pop-up was
only showing the question name, whereas it should have been showing the
question name and the start of the question text, so I fixed that.
This commit is actually the joint work of Mahmoud Kassaei, Colin
Chambers and Tim Hunt from The Open University. We could only use one
persons name for the commit, and this time Colin gets the credit/blame.
The goal of this work was to increase usability, and also clean up
the page enough that it will be possible to add new features in future.
Display of mod/quiz/edit.php is now entirely generated by
mod_quiz\output\edit_renderer. This uses a helper class
mod_quiz\structure to provide details of the structure of the quiz, and
mod_quiz\repaginate to alter that structure. (Acutally, there are still
some modification methods on mod_quiz\structure. Expect that to be
cleaned up in future.)
The new code uses much more ajax, and there are new scripts
mod/quiz/edit_rest.php and mod/quiz/repaginate.php to handle this.
(Again, don't be surprised if those two scripts get merged in future.)
Also questionbank.ajax.php (which may, in future, be made more generic,
and moved into the core question bank code.)
Most of the new JavaScript code has intentionally copied the way things
are done when editing activities on the course page.
As a result of this, mod/quiz/editlib.php is now much shorter than it
was. (In future, expect the remaining code in here to move into
mod/quiz/classes.)
In various places, when showing several attempts, we try to hilight the
most significant one (the one that gave the final grade if the quiz is
set to first/last/best attempt). That was not working because the table
zebra stripes were a more specific rule.
Also, the colour was inconsistent, not nice, and not very bootstrapy, so
I changed it.
When the auto-save fails, we alert the user that they may have lost their
internet connection so that they don't do more work that they might just
lose.
On edit quiz page marks/reorder text box has zindex set, which should be considered by modal
window. Also, tab set is also using zindex for active node.