Commit graph

2722 commits

Author SHA1 Message Date
Jun Pataleta
916503658d Merge branch 'MDL-75012-master-5' of https://github.com/andrewnicols/moodle 2023-03-02 12:34:34 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Jake Dallimore
9abd366ab7 Merge branch 'MDL-76298' of https://github.com/timhunt/moodle 2023-03-02 10:12:43 +08:00
Meirza
e4b24bdd79 MDL-77299 question: Added class properties that are not declared.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

Co-authored-by: Tim Hunt <t.j.Hunt@open.ac.uk>
2023-03-01 10:09:09 +07:00
Tim Hunt
837d1cbf52 MDL-76843 questions behat: enhancements requried to test this issue
* New steps to set up certian sorts of broken test data.
* Fix qtype_essay_question::un_summarise_response().
2023-02-22 14:30:22 +00:00
Tim Hunt
b920f2b0d1 MDL-76298 drag-drop questions: validate the questions are complete
Previously, it was possible to create drag-drop markers and onto image
questions without any drag items or drop zones. This was non-sensical,
and broke statistics calculations.

So, missing validation added, and random guess score calculation made
robust.
2023-02-22 12:03:09 +00:00
Andrew Nicols
7bf34d9982 Merge branch 'MDL-75978-master' of https://github.com/JBThong/moodle 2023-01-27 12:24:53 +08:00
Andrew Nicols
ecc2a8775a Merge branch 'MDL-69164-master' of https://github.com/JBThong/moodle 2023-01-24 11:45:27 +08:00
Andrew Nicols
e76b1bcd5e MDL-76362 qtype_numerical: Fix bug in phpdoc 2023-01-23 09:15:54 +08:00
Andrew Nicols
771b49c9ac MDL-76362 qtype_calculated*: Address issues with null strings 2023-01-23 09:15:54 +08:00
Andrew Nicols
b7710dbaf4 MDL-76362 qtype: Update formatting of qtype_calculated* upgradelib 2023-01-23 09:15:54 +08:00
Andrew Nicols
b4103db72e MDL-76362 qtype_numerical: Support empty units for apply_units 2023-01-23 09:15:54 +08:00
Andrew Nicols
913430f144 MDL-76362 qtype_numeric: Refactor answer tests 2023-01-23 09:15:54 +08:00
Marina Glancy
b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Tien Nguyen
5863659d79 MDL-69164 Question: Convert question/qengine.js to AMD modules 2023-01-18 11:24:38 +07:00
Andrew Nicols
6f1c9d3b53 Merge branch 'MDL-76614' of https://github.com/timhunt/moodle 2023-01-11 10:32:42 +08:00
Marina Glancy
b1c97381b4 MDL-76356 various: avoid implicit conversion to int
PHP before version 8.1 automatically converted to int if the function
parameter (or array key) is expected to be int. PHP 8.1 shows notice in
this case
2023-01-10 15:27:11 +01:00
Tim Hunt
ae6a1c0391 MDL-76614 quiz: clean up the quiz_attempt class 2023-01-06 14:35:52 +00:00
Sara Arjona
4759dbe119 Merge branch 'MDL-76308-master' of https://github.com/BruceGoodGuy/moodle 2023-01-03 14:12:53 +01:00
Paul Holden
cd2fc29712 Merge branch 'MDL-53137-master' of https://github.com/lucisgit/moodle 2023-01-03 12:14:30 +00:00
Sara Arjona
ac023fbfb2 Merge branch 'MDL-76106-master' of https://github.com/NashTechOpenUniversity/moodle 2023-01-02 13:07:34 +01:00
Tony Butler
2970988674
MDL-53137 qtype_numerical: Swap geo tolerance limits for -ve answers 2022-12-22 15:31:12 +00:00
Paul Holden
a48f53ec1c Merge branch 'MDL-75965-master' of https://github.com/HuongNV13/moodle 2022-12-22 12:24:57 +07:00
Thong Bui
4dc5d9e97f MDL-75978 Quiz\D&D: on mobile, a moving line-wrap can bork the question 2022-12-22 10:08:29 +07:00
Huong Nguyen
fc7ecd4c73 MDL-75965 question_multichoice: Misalignment of feedback icons 2022-12-21 13:39:24 +07:00
Paul Holden
5be3686da6 Merge branch 'MDL-72906' of https://github.com/tdjones/moodle 2022-12-19 10:23:03 +00:00
hieuvu
0f5c8f020d MDL-76106 qtype_ddmarker: fix the missing maker issue.
We will not calculate old maker position again and using old data.
This will make sure the position of makers is correct
when the background image is smaller than dropzone.
2022-12-12 20:32:43 +07:00
Khoa Nguyen Dang
315efa2db2 MDL-76308 Question\D&D: The draggable area is slim characters to select 2022-12-12 14:02:56 +07:00
Trevor Jones
c49806941c MDL-72906 Quiz: Prevent scrollbar on multichoice
Remove negative margin from the "clear my choice" anchor.
With the negative margin, when the containing box height is calculated
the anchor's hidden style overflows beyond the boundary and triggers
the overflow:auto to add a scroll bar.
2022-12-07 10:24:34 -07:00
hieuvu
ff342087da MDL-76106 qtype_ddmarker: Improve loading consistency.
Wait for the image to load completely before running the js.
2022-12-02 16:14:23 +07:00
Ilya Tregubov
05535e38df Merge branch 'MDL-76497-master' of https://github.com/junpataleta/moodle 2022-12-01 08:56:09 +03:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Jun Pataleta
c6ab792ddf MDL-76497 upgrade: add the 4.1.0 separation line to all upgrade scripts 2022-11-28 14:43:04 +08:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Helen Foster
ae2f8cfa67 MDL-76105 lang: Import fixed English strings (en_fix) 2022-11-17 09:44:35 +00:00
Andrew Nicols
7e6d32d7c2 Merge branch 'MDL-76112-master' of https://github.com/marinaglancy/moodle 2022-11-16 10:07:49 +08:00
Andrew Nicols
bcbdb8764a MDL-76169 question: General behat fixes
Whilst amending these tests I discovered some other minor fixes to be
made.
2022-11-03 21:39:15 +08:00
Andrew Nicols
3d70f457cb MDL-76169 mod_quiz: Add quiz question bank behat resolver 2022-11-03 21:39:15 +08:00
Marina Glancy
a34b4ebdc3 MDL-76112 various: can not pss null as 3rd param to preg_split
This produces notices in PHP 8.1
2022-10-28 10:51:20 +02:00
Tim Hunt
06c63f7aa1 MDL-75727 question regrading: fix each attempt builds on last
This fixes a regression caused by MDL-74752. If you regraded
a subsequent quiz attempt in a quiz using the 'Each attempt
builds on last' option, then the student's response could get lost.
2022-10-12 11:10:55 +01:00
Mahmoud Kassaei
9ba4b5f306 MDL-75818 qtype_multichoice: site-wide default for showstandardinstruction 2022-10-05 17:04:22 +01:00
Andrew Nicols
392bf7d58a MDL-75744 qtype_gapselect: Remove unnecessary javascript tag 2022-09-27 12:46:01 +08:00
Andrew Nicols
fc8fbb3f64 Merge branch 'MDL-75744-master' of https://github.com/NashTechOpenUniversity/moodle 2022-09-27 12:37:39 +08:00
Jun Pataleta
50fe735e5a Merge branch 'MDL-75777' of https://github.com/stronk7/moodle 2022-09-20 15:12:34 +08:00
Víctor Déniz
06ba397c1c Merge branch 'MDL-74941-master' of https://github.com/lucaboesch/moodle 2022-09-20 08:08:55 +01:00
Steve Bader
0e18ad33a1 MDL-74941 qtype_calculated: Copy dataset from previous question version 2022-09-20 08:11:04 +02:00
Luca Bösch
27093b1893 MDL-74941 qtype_calculated: Fix for usage calculation
The patch for the helper functions is by Nathan Nguyen
<nathannguyen@catalyst-au.net> whom I wish to thank.
2022-09-20 08:10:55 +02:00
Eloy Lafuente (stronk7)
839c2e5c18 MDL-75777 phpunit: Move tests to use correct names and ns (take#6)
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.
2022-09-19 11:01:21 +02:00
Eloy Lafuente (stronk7)
6be384ee8f MDL-75757 phpunit: Add some tolerance to a few failing assertions
Recently, PHPUnit (all versions) did some changes about how the
comparators worked and this has caused some float comparisons
to stop working.

We need to move them to assertEqualsWithDelta(), allowing a small
tolerance to workaround the floats comparison problem.

0.00001 has been decided. And applied to all the similar assertions
within the unittest function, so if more cases are added to them
better be copied with the agreed tolerance.
2022-09-18 15:55:36 +02:00
hieuvu
aee466c0fc MDL-75744 gapselect: remove empty choices option. 2022-09-15 15:43:57 +07:00