If any of the access rules require the attempt to open in a new window, assume we
require javascript to attempt the quiz. This makes it harder to bypass the javascript
pseudo security restrictions.
Changes include:
* question: Add bootstrap classes to buttons and selects so they look consistent.
* mod_quiz: Add bootstrap styles to report form elements
* question: Add bootstrap classes to question form elements
* And remove the success/fail styles from boost because they conflict badly
with the quiz plugin styles (making unreadable text).
* quiz: nav block buttons had black background
* quiz: Add bootstrap styles to quiz navigation buttons
* qtype_ddmarker: Remove bullets from list
Edit form coordinates preview had list bullets for each coordinate.
* boost: Prevent menu scrolling on quiz edit
* mod_quiz: Add bootstrap styles to edit quiz fields
Pagination and max grades forms.
* quiz: Undo some custom styles on review options
These checkboxes were laid out in a fake grid with no responsiveness
that conflicts with the bootstrap form-inline templates. Reset the
custom style to bootstrap default.
* quiz: Fix unit tests for boost changes
* qtype_ddwtos: Accurate positioning of drop targets
* questions: Make the review page responsive
* question: bootstrap 4 compatibility
.alert in bs4 contains no colours by default, you need to mix it with
one of the context classes to get some change in colours, borders etc.
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
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.
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.
The "No more attempts are allowed" message was being shown twice. I
checked back, and it has been like that since before the quiz was
converted to use a renderer. Still, it looks horrible, so changing it.
GD PHP extension is now required. Add-ons need to remove $CFG->gdversion tests. The worst case regression is that add-on will think GD is not available.
This fix a small API change in mod_quiz_renderer::finish_review_link.
At least the required change is an improvement, since it gives the
renderer more flexibility.
if (empty($CFG->gdversion)) { seems to be the common idiom for this.
I refactored the graph output into the renderer, to avoid having to
duplicate that test three times.