5178 Commits

Author SHA1 Message Date
Ilya Tregubov
25f4874743 Merge branch 'MDL-82282-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-07-16 09:26:20 +08:00
Paul Holden
2196813e1e
MDL-79717 phpunit: ensure unique data provider keys in tests.
Duplicate data provider keys were overwriting and/or duplicating
one another, leading to some cases being skipped.

Other "duplicate array key" errors were picked up by `phpcs` in
this dragnet across all tests, which have also been fixed.
2024-07-10 14:08:52 +01:00
Huong Nguyen
ff3fb00a96
MDL-80907 qtype_ordering: Fix incorrect Behat column selectors 2024-07-04 21:24:12 +07:00
Paul Holden
771694018e
MDL-82282 question: consider only editable flags in JS module. 2024-07-04 10:19:30 +01:00
Luca Bösch
a79853672e
MDL-81959 qtype_multianswer: Margin between checkboxes and text 2024-07-01 16:16:13 +02:00
Stephan Robotta
219d5bfb44 MDL-79758 qbank: add filter in pagination links
Contains some minor tweaks by Tim Hunt <T.J.Hunt@open.ac.uk>.
2024-06-27 09:22:31 +01:00
Eloy Lafuente (stronk7)
202c58888a
MDL-82148 phpunit: Remove all cases of multiple @coversDefaultClass
Only one by class is allowed (to be used as shortcut exclusively).
2024-06-14 16:05:15 +02:00
Jun Pataleta
533deb42af
Merge branch 'MDL-79885-404' of https://github.com/Chocolate-lightning/moodle into MOODLE_404_STABLE 2024-06-13 10:37:39 +08:00
Mathew May
17f080683d MDL-79885 qtype_ordering: Add learner behat testing 2024-06-13 10:11:10 +08:00
Eloy Lafuente (stronk7)
091b458c52
MDL-81522 phpunit: Add missing void return type to all tests #2
This commit includes more changes, all them also adding the :void
return type to unit tests missing them.

The difference is that all these changes, while also detected
perfectly by the moodle.PHPUnit.TestReturnType sniff, were not
auto-fixed (like the previous commit ones), because all them
do include some "return" statement and, for safety, we don't
fix them.

All the cases have been visually inspected and confirmed that
the existing "return" statements always belong to anon
functions within the test body and not the test own return statement.
2024-06-11 12:18:05 +02:00
Eloy Lafuente (stronk7)
1093256560
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 12:18:04 +02:00
Helen Foster
b12afc89e4
MDL-81982 lang: Import fixed English strings (en_fix) 2024-06-05 10:25:06 +08:00
Andrew Nicols
5cf7efb761
Merge branch 'MDL-81597-404' of https://github.com/roland04/moodle into MOODLE_404_STABLE 2024-05-28 23:49:59 +08:00
Mikel Martín
e6af0ea94e MDL-81597 renderer: Add page getter method to renderer_base 2024-05-27 13:27:05 +02:00
Eloy Lafuente (stronk7)
b2a485e244
MDL-81698 phpunit: Apply various fixes towards 1by1 execution
The changes here are heterogeneous:
- Include stuff that is not available (other test has included it).
  Sometimes local to a unit test, others in setupBeforeClass() or
  globally, ... depends on every case.
- Rename some tests (namespaces, test name, ...) towards getting it
  running.
- Amend small bits here and there.

Important note: I've left any "cosmetic" warning out from the
changes, only a few errors (like long array syntax) have been fixed.
2024-05-25 17:19:52 +02:00
Huong Nguyen
625e015ff8
Merge branch 'MDL-81407_404' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_404_STABLE 2024-05-23 10:38:42 +07:00
Huong Nguyen
9d74cebd74
Merge branch 'MDL-81992_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2024-05-23 09:45:26 +07:00
Tim Hunt
f0fb54d907 MDL-81992 question bank: disable create question button until ready
Previously, you could click the button before it was ready, and that
just led to an error, which was very silly usability.
2024-05-22 16:26:05 +01:00
Huong Nguyen
dd87304fcf
Merge branch 'MDL-81652-404' of https://github.com/lucaboesch/moodle into MOODLE_404_STABLE 2024-05-21 17:33:50 +07:00
Luca Bösch
462b8f9861 MDL-76765 qtype_ddmarker: Show multiple tries options correctly. 2024-05-20 22:13:40 +02:00
Luca Bösch
242ab5d5aa MDL-76765 question: Show multiple tries options correctly. 2024-05-20 22:13:39 +02:00
Luca Bösch
bf8a28b220 MDL-81652 qtype_multianswer: Tackle Bootstrap 5 compatibility. 2024-05-20 21:30:18 +02:00
Anupama Sarjoshi
4e151ddf30 MDL-81407 qbank_columnsortorder: Fix error displaying hiddencols
When the question custom fields were deleted, if there were any
hidden columns in qbank Column sort order referring those fields they
were throwing 'Custom field does not exist' exception. Changes done to
ignore such fields and display valid hiddencols, as these references
were breaking the qbank Column sort order and Question bank pages.
2024-05-19 08:58:45 +01:00
Huong Nguyen
9ccdee7687
Merge branch 'MDL-81543-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-05-16 09:38:53 +07:00
Paul Holden
e205d5accc
MDL-81543 qtype_calculated: correct component of language string. 2024-05-13 10:43:44 +01:00
Paul Holden
513bafbcfd
MDL-81867 qbank_columnsortorder: correct/cleanup previous upgrade step. 2024-05-10 09:16:46 +01:00
Huong Nguyen
b83cd14d25
Merge branch 'MDL-80589-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-05-06 09:37:09 +07:00
Simey Lameze
778470818a MDL-80589 behat: fixes and improvements to new tests 2024-05-02 13:33:44 +08:00
Angelia Dela Cruz
4625eeb998 MDL-80589 qtype_numerical: Behat to add, edit, preview numeric question 2024-05-02 13:33:44 +08:00
Ilya Tregubov
eccadb67b7 MDL-81380 qbank_columnsortorder: Add type and return value hint 2024-04-29 10:47:59 +08:00
Ilya Tregubov
94d8b7f040 Merge branch 'MDL-81380_404' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_404_STABLE 2024-04-29 10:47:06 +08:00
Ilya Tregubov
48597285cd Merge branch 'MDL-81697-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-04-29 09:22:27 +08:00
Anupama Sarjoshi
1542a9f9e1 MDL-81380 qbank_columnsortorder: Add upgrade.php
Before Moodle 4.3, config_plugins settings for qbank_columnsortorder
(disabledcol, enabledcol) had a value like
qbank_statistics\columns\facility_index,
qbank_statistics\columns\discriminative_efficiency, ...
In Moodle 4.3, the values are stored as
qbank_statistics\columns\facility_index-facility_index.
So updating the old values to match the new format.
2024-04-26 17:12:45 +01:00
Huong Nguyen
771786ad4d
Merge branch 'MDL-81641_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2024-04-26 16:03:54 +07:00
Paul Holden
21e6eea20e
MDL-81697 qtype_ordering: correctly reference feedback file areas. 2024-04-25 21:38:15 +01:00
Eloy Lafuente (stronk7)
1dbc78253c
MDL-81581 phpunit: Apply the new method to all remaining cases
After discussing it in the issue, we have agreed to apply
the new phpunit_util::normalise_line_endings() method to
all the remaining cases (within tests!) where the manual
replacement was being done. This commits achieves that.

Note that I've looked for both str_replace() and preg_replace()
cases, but only the former had cases worth converting. All the
later ones are different and cannot be replaced by the new
utility method.
2024-04-25 18:52:25 +02:00
Eloy Lafuente (stronk7)
c9d48f6f25
MDL-81581 phpunit: Create the normalise_line_endings() method
And apply it to all the obvious places related with the issue.

Note that surely there are way more in code base, but it's
out of scope for this issue.
2024-04-25 18:52:25 +02:00
Eloy Lafuente (stronk7)
894ee17f53
MDL-81581 phpunit: Move multiple assert_same_xml() to common one 2024-04-25 18:52:25 +02:00
Philipp Imhof
452cf5c72d
MDL-80087 Questions: warn if preload_all_step_users was not called
Co-authored-by: Tim Hunt <T.J.Hunt@open.ac.uk>
2024-04-25 09:37:47 +07:00
Tim Hunt
c9b7b67fad MDL-81641 question: fix random question loader draft state tests 2024-04-23 18:25:24 +01:00
Jun Pataleta
8b976e77ce MDL-81616 upgrade: add the 4.4.0 separation line to all upgrade scripts 2024-04-23 15:24:02 +10:00
Jun Pataleta
2e13c434b9
MDL-81549 qtype_ordering: Remove $plugin->requires reference to 3.11 2024-04-17 00:17:01 +08:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Shamim Rezaie
b32617e346 MDL-80426 qtype_ordering: An announcement region to announce reorders 2024-04-15 20:07:11 +10:00
Shamim Rezaie
eccfb73839 MDL-80426 qtype_ordering: Remove the unintuitive keyboard handling code
Users can now rearrange options using the move buttons that each option
have, therefore there is no need for the current unintuitive keyboard
interaction implementation in the ordering question type plugin.
2024-04-15 20:07:11 +10:00
Shamim Rezaie
84034c62f0 MDL-80426 qtype_ordering: Move options by single pointer
Each option has a couple of buttons to move the option's position. This
allows moving options by single pointer without dragging to address WCAG
 Success Criterion 2.5.7.
Having the buttons also addresses WCAG Success Criterion 2.1.1 as it
provides an intuitive way to move options using keyboard.
2024-04-15 20:07:11 +10:00
Andrew Nicols
1d25d54e2c
Merge branch 'MDL-74610-mysql-fix' of https://github.com/timhunt/moodle 2024-04-12 08:57:17 +08:00
Andrew Nicols
d26c40db26
Merge branch 'MDL-81114' of https://github.com/timhunt/moodle 2024-04-11 23:25:22 +08:00
Tim Hunt
ee80a41dd5 MDL-74610 quiz: fix grade items query for MySQL 2024-04-11 13:55:19 +01:00
Sara Arjona
54960f8e15
Merge branch 'MDL-81383' of https://github.com/timhunt/moodle 2024-04-11 12:49:29 +02:00