Commit graph

107981 commits

Author SHA1 Message Date
Laurent David
9686196e91 MDL-75337 mod_data: Single button - mod_data changes
* Update mod_data module to use the new button style
2023-01-24 06:01:35 +01:00
Laurent David
fc72a1d7b1 MDL-75337 core: Single button - core changes
* Change all core calls toward single_button to use single_button::BUTTON_PRIMARY
    when needed
2023-01-24 06:01:35 +01:00
Andrew Nicols
ecc2a8775a Merge branch 'MDL-69164-master' of https://github.com/JBThong/moodle 2023-01-24 11:45:27 +08:00
Jun Pataleta
da144479fb Merge branch 'MDL-76362-master-extra' of https://github.com/andrewnicols/moodle 2023-01-24 10:38:55 +08:00
Jun Pataleta
bcfed4c920 Merge branch 'MDL-76987-master' of https://github.com/andrewnicols/moodle 2023-01-24 09:03:09 +08:00
Angelia Dela Cruz
2cd327b16f MDL-76655 behat: Coverage for workshop grading strategies 2023-01-24 08:48:08 +08:00
Paul Holden
363942cbb6 MDL-76354 competency: export user privacy data unconditionally.
We should ensure that any past competency data for a user is always
exported, regardless whether competencies are currently enabled.
2023-01-23 22:14:22 +00:00
Paul Holden
89be8b7c78 MDL-77001 tiny_autosave: use valid lang string during privacy export. 2023-01-23 22:05:45 +00:00
Amaia Anabitarte
d4e66f1df5 MDL-76066 mod_data: Trigger field_deleted event when importing 2023-01-23 18:53:44 +01:00
Laurent David
377c962f11 MDL-75337 core: Single button - API changes
* Update component library for new features of single_button and modal
    * Update core_notification javascript
2023-01-23 13:45:21 +01:00
Andrew Nicols
5e33d57dbe MDL-76987 webservice: Correct namespace for external_api 2023-01-23 20:37:05 +08:00
Paul Holden
89db417402 MDL-76584 question: correct temporary questionid upgrade field.
Pass correct parameter/type in field constructor (`XMLDB_NOTNULL`)
for consistency. This corrects the definition and preserves the
truthyness of the value that was incorrectly passed previously.
2023-01-23 09:16:48 +00:00
Andrew Nicols
fcad49b03b MDL-72609 core: Remove YUI from M.util.pendingJS 2023-01-23 15:02:55 +08:00
Andrew Nicols
b8f6b7602b MDL-72609 core: Fix complete_js to be a list of strings 2023-01-23 15:02:55 +08:00
Andrew Nicols
116ddb8933 MDL-72609 behat: Rewrite core/pending to observe ES6 style
This commit makes the following changes:
* convert to use ES6 module format
* migrate from a jQuery Deferred to a native ES6 promise
* add a native-Promise-like instantiation

New uses are documented in appropriate jsdoc with examples.
2023-01-23 15:02:55 +08:00
Eloy Lafuente (stronk7)
7fa7d4dd2a MDL-76362 workshop: check for empty (null included) feedbackreviewer
As far as feedbackreviewer can be null, we cannot, since PHP 8.1
apply any string operation (trim, strlen...) on it, hence, checking
before applying.
2023-01-23 09:17:48 +08:00
Eloy Lafuente (stronk7)
240b193603 MDL-76362 enrol_lti: Prevent calling to DataConnector with null keys
While it could have been fixed in DataConnector (3rd part lib), better
prevent in our code to call to it with null keys.

Covered by unit tests.
2023-01-23 09:17:48 +08:00
Eloy Lafuente (stronk7)
4a76c772d7 MDL-76362 output: Preserve original behaviour for PHP 8.1
Whenever the page_requirements_manager::js_fix_url()
is called with null url, it must throw an exception and emit 0 warnings.

It's covered by an explicit test:

test_js_fix_url_coding_exception with data set "Provide a null argument"
2023-01-23 09:17:48 +08:00
Andrew Nicols
7000a99de3 MDL-76362 core: Coding style fixes 2023-01-23 09:15:55 +08:00
Andrew Nicols
ce85ef1e49 MDL-76362 core_privacy: Shortcircuit URL rewriting on empty content 2023-01-23 09:15:55 +08:00
Andrew Nicols
5d3cb79f30 MDL-76362 core: Short circuit s() on empty values 2023-01-23 09:15:55 +08:00
Andrew Nicols
19bedb8eba MDL-76362 core: Short-circuit strip_querystring on empty values 2023-01-23 09:15:55 +08:00
Andrew Nicols
b0aa0b63e0 MDL-76362 core_file: Check prefix exists before checking length 2023-01-23 09:15:55 +08:00
Andrew Nicols
93ab932211 MDL-76362 core: plugin names must be strings to be valid 2023-01-23 09:15:55 +08:00
Andrew Nicols
e068f2284f MDL-76362 core: Update core_component plugin name tests 2023-01-23 09:15:55 +08:00
Andrew Nicols
eceb3c49fd MDL-76362 core: Test coursealias before using 2023-01-23 09:15:55 +08:00
Andrew Nicols
6ae3f79c1e MDL-76362 h5p: Use string as default lang param 2023-01-23 09:15:55 +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
Andrew Nicols
32b45433bb MDL-76362 question: Add test for number(null) 2023-01-23 09:15:54 +08:00
Andrew Nicols
5c2d98efcd MDL-76362 question: Refactor question number unit tests 2023-01-23 09:15:54 +08:00
Andrew Nicols
ef09257dc1 MDL-76362 core: Use empty default string when getting prefs
The json_decode function does not accept a null, which is the
traditional default for get_user_preferences. By passing a default of
am empty string we avoid issues in PHP 8.1.
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
Marina Glancy
491ed7b200 MDL-76362 mustache: Override parent method to avoid PHP notices
Parent method checks baseDir that is null in this case. This shows notices under PHP 8.1
2023-01-23 09:15:54 +08:00
Paul Holden
5414b82e6e MDL-76977 phpunit: ensure unique data provider keys in mustache test. 2023-01-20 17:19:16 +00:00
Sara Arjona
7c56b6900e Merge branch 'MDL-76942-master-2' of https://github.com/junpataleta/moodle 2023-01-20 16:20:09 +01:00
Sara Arjona
3c649386da Merge branch 'MDL-76139-master' of https://github.com/kevpercy/moodle 2023-01-20 16:11:54 +01:00
Jun Pataleta
b60cb734b7 MDL-76942 course: Adjust activity chooser Behat tests
* Try to use the button name instead of CSS selectors whenever possible.
2023-01-20 21:27:39 +08:00
Jun Pataleta
544656431a MDL-76942 core: Revert change to insertresourceoractivitybefore
Revert the lang string "Add an activity or resource before [xx]" back to
its original form of "Insert an activity or resource before [xx]" in
order to avoid conflicts with the "Add an activity or resource" button
especially when running Behat tests.
2023-01-20 21:27:39 +08:00
Andrew Nicols
5b2e04f301 MDL-75945 core: Update uses of ImagePolygon
A new signature was introduced to ImagePolygon functions from PHP 8.0
with the previous signature deprecated in 8.1.

For PHP versions 8.0 and later we should use the new signature. Once PHP
8.0 is the required minimum version, the legacy version should be
removed.
2023-01-20 18:41:26 +07:00
Paul Holden
1b52486cce MDL-76973 user: correct testcase reference to external_api class. 2023-01-20 11:30:02 +00:00
Paul Holden
ab670ab286 MDL-76933 badges: create user-focused datasource for custom reporting.
This report source differs from the original badges source (5274ee5a)
by making `user` the primary table of the report, allowing for reports
on all users regardless of whether they have been awarded badges.
2023-01-20 10:20:01 +00:00
Paul Holden
75ab52d902 MDL-76878 user: amend permission callbacks for preference definitions.
Ensure those preferences that are used for storing state can always be
updated via web service requests for the current user.
2023-01-20 10:05:21 +00:00
Jun Pataleta
a479c1854b MDL-76968 mod_quiz: Use proper external_api reference 2023-01-20 17:06:17 +08:00
Luca Bösch
a4eee48b49 MDL-76967 questions: Questions last used line height 2023-01-20 09:56:55 +01:00
Kevin Percy
567214a500 MDL-76139 gradebook_grader: Move group selector to tertiary navigation 2023-01-20 13:08:59 +08:00
Jaydn Cunningham
6ad6b28a34 MDL-76370 curl: suppress CONNECT header when using HTTP proxy 2023-01-20 14:26:30 +10:30