65 Commits

Author SHA1 Message Date
Paul Holden
a49c099ae5
MDL-82001 mod_quiz: respect user language in draft save message text. 2024-05-30 16:04:58 +01:00
Philipp Imhof
7b284a8e04
MDL-67259 mod_quiz: show time of last autosave 2024-02-23 09:00:51 +01:00
Philipp Imhof
b46453e457
MDL-80003 mod_quiz: watch all instances of tinyMCE 2023-12-07 17:29:43 +01:00
Andrew Nicols
222c43f8eb
MDL-77174 mod_quiz: Switch from YUI dialogue to utility modal 2023-07-31 10:56:22 +08:00
Andrew Nicols
d20b272df7
MDL-77174 mod_quiz: Remove usage of moodle-core-nofification-alert 2023-07-31 10:56:21 +08:00
Andrew Nicols
2e706ee5fb
MDL-77174 mod_quiz: Update toolbox to drop YUI confirm module 2023-07-31 10:56:21 +08:00
Tim Hunt
24bbb18eb2 MDL-77656 quiz editing: customisable numbers only in unshuffled sections
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.
2023-03-31 16:01:23 +01:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Jun Pataleta
08a2781607 MDL-76597 mod_quiz: Set presentation role for the question list
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.
2023-01-06 22:37:54 +08:00
Jun Pataleta
e4f1f254c9 MDL-76597 mod_quiz: Add a default sr-only section heading
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.
2023-01-06 22:37:54 +08:00
Andrew Nicols
a0afccfd5a MDL-75782 mod_quiz: Make TinyMCE autosave less fragile
This commit amends the quiz autosave feature to not assume the
components of the Tiny API as much, and add support for newer versions
of TinyMCE.
2022-09-19 12:55:10 +08:00
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Thong Bui
3c19cbbb18 MDL-72507 Quiz: Quiz auto-save does not detect uploaded files 2021-10-19 16:10:15 +07:00
Russell Boyatt
747f5ba09b MDL-58926 quiz: Addition of AJAX based quiz timer. 2020-06-06 17:28:02 +01:00
Andrew Nicols
29c5fafff5 MDL-66109 js: Fix Shifter linting issues 2020-05-11 11:07:49 +08:00
Jun Pataleta
62e72577b5 MDL-65938 mod_quiz: Use new core/checkbox-toggleall
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
2019-07-19 13:14:11 +08:00
Tim Hunt
b3c6c89b35 MDL-57884 quiz: autosave should not send the value of submit buttons 2019-06-18 17:46:47 +01:00
Shamim Rezaie
e7b3575cf1 MDL-65399 mod_quiz: Handling the edge case when section name is '' 2019-05-06 18:11:23 +10:00
Shamim Rezaie
aa6a8b98c6 MDL-65399 mod_quiz: UI should prevent deleting the last slot of section 2019-05-06 18:11:22 +10:00
M Kassaei
6bafb66c34 MDL-63825 Quiz: convert quiz repaginate.js from YUI to AMD 2019-02-08 15:50:45 +00:00
Tim Hunt
7a8782c4ae MDL-63194 quiz editing: subtle drag-drop bug if moving between sections 2018-10-08 17:37:11 +01:00
Ryan Wyllie
6c057c77dc MDL-61138 mod_quiz: remove YUI random question modal 2018-04-18 11:45:01 +08:00
Ryan Wyllie
e6743b4b80 MDL-61135 mod_quiz: remove YUI question bank dialogue 2018-02-08 02:44:17 +00:00
Simey Lameze
7a1a9ec635 MDL-57431 mod_quiz: remove unnecessary class from selector 2017-12-19 12:47:43 +08:00
Mathew May
aa6b85d2b7 MDL-57431 mod_quiz: Quiz editing help icon fix 2017-12-12 09:56:05 +08:00
Simey Lameze
84d4411b01 MDL-58796 mod_quiz: add handling for fontawesome icons 2017-05-04 13:51:14 +08:00
Andrew Nicols
7d1709f91e MDL-48771 mod_quiz: Rebase conflict fix img => .icon 2017-04-04 10:41:22 +08:00
Colin Chambers
f37cffb6a5 MDL-48771 quiz edit: delete mulitiple tidy up & Behat tests 2017-04-04 01:53:43 +01:00
Luca Bösch
5d803e5395 MDL-48771 quiz: Select multiple questions to delete
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.
2017-04-03 20:11:47 +01:00
Damyon Wiese
8857c715d1 MDL-40759 icons: Behat fixes for font-awesome 2017-03-17 15:52:18 +08:00
Damyon Wiese
e6bf10c772 MDL-40759 dragdrop: Use a pix icon renderer for drag handles. 2017-03-17 15:51:28 +08:00
Tim Hunt
1a07d5ef82 MDL-57402 quiz editing: fix add heading after remove page break 2016-12-14 16:34:50 +00:00
Frederic Massart
9189888989 MDL-55797 mod_quiz: Convert question chooser to template
Part of MDL-55071
2016-09-23 10:55:17 +01:00
Damyon Wiese
63e4df60f6 MDL-55839 behat: Behat fixes for theme_noname
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
2016-09-23 10:55:16 +01:00
Frederic Massart
c2f12b0d16 MDL-55831 mod_quiz: Fix selectors to handle renderer overrides
Part of MDL-55071
2016-09-23 10:55:16 +01:00
Dan Poltawski
3a0bc0fdc4 MDL-55244 js: build changes
There should be no changes to minified code
2016-07-25 07:58:05 +01:00
Dan Poltawski
bc8b6dc652 MDL-55244 js: fix various lint warnings in yui
* Incorrect brace style
* Empty functions
* Multiple var statemnts
2016-07-25 07:53:05 +01:00
Dan Poltawski
5bb4f444de MDL-55244 js: fix problems with eslint --fix
eslint --fix '**/yui/src/**/*.js'
2016-07-25 07:53:05 +01:00
Dan Poltawski
ad3f8cd18c MDL-54944 eslint: make the .eslintrc default stricter
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.
2016-07-11 12:44:34 +01:00
Neill Magill
ccfb9b69db MDL-50971 ActionMenu: Action menus cause page to jump when closing
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.
2015-08-28 12:13:16 +01:00
Dan Poltawski
f79860257a MDL-50749 js: add some TODOs to some small hacks 2015-07-07 08:48:32 +01:00
M Kassaei
32498c28ea MDL-49813 quiz: add sections in the right place after page changes 2015-04-23 16:54:50 +01:00
M Kassaei
9f9d2caa33 MDL-40988 quiz: fix bug when editing default heading on blank quiz 2015-04-08 12:42:34 +01:00
M Kassaei
5d949702f8 MDL-40988 quiz: ability to break quizzes into sections
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.
2015-04-05 14:30:53 +01:00
Tim Hunt
441d284ada MDL-40990 quiz: option to require prev Q finished before next shown
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.
2015-03-17 17:16:22 +00:00
Andrew Nicols
557f44d970 MDL-48620 JavaScript: Updated shifted files to comply with coding style 2015-01-23 14:51:24 +08:00
Andrew Nicols
64e7aa4de1 MDL-28286 JavaScript: Convert all uses of M.str to M.util.get_string 2014-12-01 08:32:04 +13:00
Sam Hemelryk
1a14f8a6de MDL-47959 mod_quiz: fixed 0 questions bug 2014-10-31 13:35:25 +13:00
Colin Chambers
6375e98cbb MDL-47959 Number of questions not updated dynamically in new quiz edit page 2014-10-29 16:26:49 +00:00