This works by always outputting both the customised and uncustomised
number into the HTML of the Questions page, then uses CSS & JS to
show the appropriate one as shuffle is toggled.
Since the <ul> and <li> elements for listing the quiz questions and
elements are mainly used for layout purposes, it is better to set the
role of these elements to presentation only.
The aria-label for the <li> element is inappropriate and can also cause
confusion to screen reader users. Better to remove this. Though this is
being used in the confirmation modal so better to just change it to a
data attribute.
Add a default sr-only section heading in order to prevent having an
empty heading for the quiz section which is not good for accessibility.
Plus:
- There's also an existing issue where filters are never applied to
section headings on load. This has been fixed in this commit as well.
- Button role added for the edit section button which enables it to
take advantage of the theme highlighting when it receives focus.
Plus:
* On the attempts report pages, the "Regrade selected attempts"
and "Delete selected attempts" buttons are now only enabled when
there's at least one item selected.
* Behat fixes for quiz edit feature after this patch
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.
This is a squash of many small fixes.
The list of changes are:
Initial set of behat selectors overrides required for new theme.
set core behat selectors if not overridden by theme
Remove pause
Fix for checkboxes not saving properly
Custom override for click in the user menu
Fix for behat guessing the field type.
Behat fix for guessing the correct field type.
Fix for missing closeElementBefore mforms mess.
Fix for textareas not displaying their contents.
Fix availability form element
Fix action menu selectors for activities in a course page
Fix textareas not retaining their values
Fix selector for blocks
I had to change the single select template to use an input instead of a button because of a
behat bug we have not tracked down yet.
Fix for frozen attribute in form elements
Use input instead of button while behat is still broken
Fix for navigation selector override
Behat selector fixes and multi-select fixes for templated select
Fix for configure blocks selector + booleans for autocomplete
Fixes for course_summary behat tests
Allow optgroups in single_select
Behat fixes for block_navigation
Fixes for url form element and activity chooser selectors
blocks_social - fix specific selector for behat
Fix export_for_template for selectgroups element.
Dont set empty id on the form
Fix direct call to behat_navigation in backup context
Checkbox empty value fix
Fix for assign grading panel popouts
file picker overrides to find a file manager in the page
Fix chat tests to use element name
Make selectors in mod_data behat less specific
MDL-55839: recent activity behat test relies on time()
SQUASH Honour mform element "class" attribute on the container
SQUASH Fixes for behat in mod_forum
SQUASH search form template showing value as text next to the button
SQUASH undo double selectgroup fix
SQUASH - The slightly different structure to action menus breaks course drag and drop
SQUASH Wrap loading icon in a span so the selector still works.
SQUASH Fix fragile javascript in report_loglive
SQUASH Fix tabtree, and selectgroups for mod_feedback
Also - do-not enhance the action menu - we are dropping support for this.
SQUASH Fix filemanager selector and pix_icon template for mod_forum tests.
SQUASH Fixes to breadcrumb and add formid to single select (fixes mod_glossary tests)
SQUASH lesson behat fixes. 95% of lesson styles were rubbish so they were disgarded.
SQUASH Fix lti behat tests - they were cheating and using a context step from quiz
SQUASH Behat fixes for quiz with new theme
SQUASH behat fixes for mod_wiki
SQUASH Workshop behat fixes
SQUASH Frozen form elements cannot use a readonly form element because it screws with the form JS "disabledIf" stuff.
SQUASH Fixes for grades behat tests
SQUASH behat fixes for groups
SQUASH blacklist action menu tests
SQUASH Fix for tag form element missing "manage standard tags" link
SQUASH Incomplete fixes for course behat tests
SQUASH behat fixes for badges
SQUASH Tags fixes for behat
SQUASH filepicker fixes for behat
SQUASH Abort guessing field type when we hit 'html'
SQUASH Fix for admin/tool/behat tests
SQUASH fix for admin tool behat tests
SQUASH fix for availabilty conditions hiding "aria-hidden" elements
SQUASH give the blocks more room. We get behat files because nav tree nodes are not in view
SQUASH Blocks fixed
Fix behaviour of unchecked checkboxes
SQUASH Remove incorrect step in user test
SQUASH behat fixes for course tests
Part of MDL-55071
Instead of using the more rollup-tolerant config for all files, make the
configuration stricter by default but lower in grunt for yui modules.
This means that manual runs (prechecker) or editor integrations will
flag up the errors as well as grunt.
Also add ignore lines to the core files so that eslint isn't noisy when
not running with grunt.
This patch changes the behavior of open action menus when using a mouse.
Before this patch when clicking on the page with an open action menu the focus would be
returned to the action menu's call button. This could cause the page to jump when a
mouse user did not close an action menu, scrolled and then tried to perform another
action on the page.
After this patch when clicking the focus will not be returned to the action menu's call button.
The behavior of the script will not be changed when using the keyboard.
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.
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.