Compare commits

..

602 Commits

Author SHA1 Message Date
Jun Pataleta cbd60e5a9b Moodle release 4.4.7 2025-03-15 20:19:52 +08:00
Ilya Tregubov 6f24f29cde MDL-81945 gradereport_singleview: Fix hidden grade handling.
Seems to become broken after IR refactoring.
2025-03-14 15:21:15 +00:00
Ilya Tregubov 3ba2ebb887 MDL-81945 gradereport_user: Don't reveal visibility by color.
Seems like dimmed_text class was added without proper check so
user can guess if item is hidden.
2025-03-14 15:21:15 +00:00
Ilya Tregubov 501fc68186 MDL-81945 gradereport_user: Behat tests for user report. 2025-03-14 15:21:15 +00:00
Ilya Tregubov 42eab03367 MDL-81945 gradereport_singleview: Behat tests for singleview report. 2025-03-14 15:21:15 +00:00
Ilya Tregubov 9bbcab02b8 MDL-81945 gradereport_grader: Behat tests for grader report 2025-03-14 15:21:15 +00:00
Ilya Tregubov 0dad8a8369 MDL-81945 core_grades: create Behat step for grades action menu. 2025-03-14 15:21:15 +00:00
Ilya Tregubov 1387393a3b MDL-81945 gradereport_singleview: Fix hidden grades handling.
If a user is lacking moodle/grade:viewhidden he should not be able
to view or modify grades.
2025-03-14 15:21:15 +00:00
Sara Arjona 5919d99222 weekly release 4.4.6+ 2025-03-14 16:14:06 +01:00
Sara Arjona a86c05ee7c Merge branch 'MDL-83541-404-behat' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2025-03-14 11:14:44 +01:00
Huong Nguyen d58329f1e1 MDL-83541 qtype_ddimageortext: Fix Behat failure 2025-03-14 16:59:04 +07:00
Huong Nguyen 1fcd367669 MDL-83541 qtype_numerical: Fix incorrect test hints 2025-03-14 09:21:33 +01:00
Huong Nguyen d4f1cb1078 Merge branch 'MDL-83541-404' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2025-03-14 11:59:45 +07:00
Huong Nguyen ba75747f2e MDL-83541 mod_quiz: Fix PHPUnit failure 2025-03-14 10:31:33 +07:00
Mark Johnson 2de34d5c0e MDL-83541 qtypes: Define excluded hash fields and test hints 2025-03-14 10:31:26 +07:00
Mark Johnson 85d85a6a25 MDL-83541 question/quiz: restoring questions with identical stamps
Historically it was possible, through a series of question restores,
moves and edits, to end up with multiple questions in the same
category with the same stamp, but differences in other question
or answer fields. This, combined with changes in versions, led
to errors when restoring or duplicating quizzes using these questions.

While recent changes have made it impossible to create this situation
in current Moodle versions, as any edits will create a new question
version with a new stamp, this situation may exist on long-standing
Moodle sites which have been upgraded since pre-4.0.

This change performs a much wider-ranging comparison of restored
existing questions, generating a hash of all the data for a question in
a backup file, and a corresponding hash for each question in the target
category, to decide if a restored question matches a question already in
the database.
2025-03-14 10:31:22 +07:00
Mark Johnson eda944f427 MDL-83541 qtype_calculated: Add missing field to backups 2025-03-14 10:31:17 +07:00
Mark Johnson 5df88228a5 MDL-83541 qtype_ddimageortext: Fix test hint text
Ensure that hint text is unique to workaround MDL-84261 for
backup/restore testing.
2025-03-14 10:31:10 +07:00
Sara Arjona f35f246d19 Merge branch 'MDL-83634-404' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2025-03-13 16:28:23 +01:00
Sara Arjona d00f94ff44 Merge branch 'MDL-84624-M404_close-recordset-in-core-task-h5p_clean_orphaned_records_task-execute' of https://github.com/ziegenberg/moodle into MOODLE_404_STABLE 2025-03-13 13:20:35 +01:00
Sara Arjona 25a13c0394 Merge branch '83136-fix-unknowncategory-message-404' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_404_STABLE 2025-03-13 12:38:52 +01:00
Sara Arjona 159976d1ef Merge branch 'MDL-77646-404' of https://github.com/lucaboesch/moodle into MOODLE_404_STABLE 2025-03-13 12:33:52 +01:00
Jun Pataleta fa36c75597 Merge branch 'MDL-80386_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2025-03-13 12:32:38 +08:00
Jun Pataleta cf1e71be2b Merge branch 'MDL-65233-404-no-midnight' of https://github.com/sim642/moodle into MOODLE_404_STABLE 2025-03-13 12:21:39 +08:00
Huong Nguyen 0a50f4c904 Merge branch 'MDL-84640-404' of https://github.com/andelacruz/moodle into MOODLE_404_STABLE 2025-03-12 16:32:28 +07:00
Angelia Dela Cruz 683c62f3c6 MDL-84640 analytics: Behat for obtaining prediction models insights 2025-03-12 16:48:48 +08:00
Jun Pataleta 633ddeb157 MDL-83634 tool_brickfield: Test the image alt text check's severity 2025-03-12 13:22:12 +08:00
Jun Pataleta 3c5accff73 MDL-83634 tool_brickfield: Increase the alt text limit to 750 characters
This is consistent with the alt-text length limit of 750 characters in
Moodle's editor.
2025-03-12 13:22:12 +08:00
Jun Pataleta d0afa76de6 MDL-83634 tool_brickfield: Downgrade image alt text check's severity
Given that
* There is no formally defined limit for alt text length,
* Current versions of screen readers can read alt texts longer than
125 characters,
* Accessibility checkers like axe DevTools, WAVE, etc., do not raise
errors or warnings about long image alt texts.

This patch:
- Downgrades the default severity for the `img_alt_is_too_long`
check from `BA_TEST_SEVERE` to `BA_TEST_SUGGESTION`.
- Updates the `checkdesc:imgaltistoolong` lang string to be more of a
reminder/suggestion rather than an error.
2025-03-12 13:22:11 +08:00
Huong Nguyen bc2f8102ce Merge branch 'MDL-84578_404' of https://github.com/cwarwicker/moodle into MOODLE_404_STABLE 2025-03-12 10:39:47 +07:00
Conn Warwicker 532ef50ed6 MDL-80386 core_question: Add "show all" button to filters.
This adds the "Show All" button to the question bank filters
to allow users to select all questions easily.

It also adds new behat tests to test the functionality.
2025-03-11 18:13:23 +00:00
Sara Arjona 8f4cb8c4d5 Merge branch 'MDL-84801-404' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2025-03-11 17:26:29 +01:00
Derek Henderson 1fc38904e1 MDL-77646 lib: Use iframe instead of object to display pdf. 2025-03-11 13:52:51 +01:00
Sara Arjona 4df87b3130 weekly release 4.4.6+ 2025-03-11 13:02:30 +01:00
Sara Arjona 551568aca2 Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2025-03-11 13:02:29 +01:00
Huong Nguyen 3576ec553c MDL-84801 Behat: Fix Expand all fieldsets and advanced elements failure 2025-03-11 09:22:00 +07:00
AMOS bot 7b8510441f Automatically generated installer lang files 2025-03-11 00:07:52 +00:00
Conn Warwicker e7d7d84aa3 MDL-84578 qbank_managecategories: Add category validation.
- This adds simple logic check to filter.js to stop user
submitting an invalid category.
- This adds new behat steps to check this validation.
- This adds a new behat test to test this in managecategories.
2025-03-10 14:05:38 +00:00
Sara Arjona ec9b50b135 Merge branch 'MDL-84313-404' of https://github.com/dpalou/moodle into MOODLE_404_STABLE 2025-03-10 11:35:53 +01:00
Paul Holden aa4fce5f6a Merge branch 'MDL-84620-M404_close-recordset-in-tool_brickfield-manager-check_scheduled_areas' of https://github.com/ziegenberg/moodle into MOODLE_404_STABLE 2025-03-10 10:29:40 +00:00
Daniel Ziegenberg 6bf326fb9f MDL-84620 accessibility: close recordset when it's not needed anymore
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-05-06 06:41:35 +02:00
Sara Arjona 482834493e Merge branch 'MDL-84256-404' of https://github.com/laurentdavid/moodle into MOODLE_404_STABLE 2025-03-10 11:16:50 +01:00
Sara Arjona a4bd8cec97 Merge branch 'MDL-84398-404' of https://github.com/pedrojordao/moodle into MOODLE_404_STABLE 2025-03-10 11:12:16 +01:00
AMOS bot fa63ee1a8a Automatically generated installer lang files 2025-03-10 00:07:40 +00:00
Jun Pataleta f252b16672 weekly release 4.4.6+ 2025-03-08 11:44:32 +08:00
Laurent David 405a99a70b MDL-84256 core_course: Fix course icon in course index page
* In RTL language the icon should follow the course name intead
of being upfront
2025-03-07 11:16:43 +01:00
Andrew Nicols 1b50220d96 Merge branch 'MDL-81623-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-03-07 09:25:43 +08:00
Andrew Nicols ce9d97bd40 Merge branch 'MDL-84729-404' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2025-03-07 09:09:33 +08:00
Andrew Nicols 2c2aa043c9 Merge branch 'MDL-84532-404' of https://github.com/mihailges/moodle into MOODLE_404_STABLE 2025-03-07 09:08:32 +08:00
Sara Arjona 5556f401e0 Merge branch 'MDL-83720-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-03-06 14:56:02 +01:00
Andrew Nicols 5e2a70cb74 Merge branch 'MDL-84723-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2025-03-06 11:50:55 +08:00
Simey Lameze 6a2092db12 MDL-84723 behat: final improvements and fixes to the test
This commit does few things:
- Remove unnecessary grade field to assign generator.
- Remove unnecessary comment lines.
- Update the warning message assertion to use the no-break space unicode character.
2025-03-06 11:24:05 +08:00
Angelia Dela Cruz 31f09682df MDL-84723 gradingform: Behat for maximum grade mismatch in marking guide 2025-03-06 11:24:05 +08:00
Andrew Nicols 02e0fdb3fe Merge branch 'MDL-84295-404' of https://github.com/laurentdavid/moodle into MOODLE_404_STABLE 2025-03-06 09:20:09 +08:00
Andrew Nicols 244166e01d Merge branch 'MDL-75442-404' of https://github.com/StudiUM/moodle into MOODLE_404_STABLE 2025-03-06 09:12:08 +08:00
Laurent David 5ad933815c MDL-84295 core_theme: Fix margin for activity description list
* Make sure lists in activity descriptions are displayed
identically on course page and activity pages
2025-03-05 10:13:10 +01:00
Andrew Nicols c111e4fe87 Merge branch 'MDL-82170-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-03-05 14:40:33 +08:00
Huong Nguyen 847068d11d Merge branch 'MDL-84425-404' of https://github.com/andelacruz/moodle into MOODLE_404_STABLE 2025-03-05 10:51:26 +07:00
Angelia Dela Cruz b577e8d621 MDL-84425 theme_boost: Behat for course section selector unavailable 2025-03-05 11:18:09 +08:00
Daniel Ziegenberg 98ad4352a9 MDL-84624 h5p: close recordset when it's not needed anymore
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-03-04 19:35:48 +01:00
Sara Arjona df2723c6a8 weekly release 4.4.6+ 2025-03-04 16:13:47 +01:00
Sara Arjona 201f222789 Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2025-03-04 16:13:45 +01:00
Huong Nguyen 6c4bf9098e MDL-84729 core: Use core\clock for Tasks
This will help to solve the random failure on "test_adhoc_task_get_first_starting_time"
2025-03-04 16:37:23 +07:00
Huong Nguyen 05682343be Merge branch 'MDL-84595-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2025-03-04 10:40:24 +07:00
AMOS bot afdc24fc07 Automatically generated installer lang files 2025-03-02 00:08:12 +00:00
Pedro Jordao 4f1662e90a MDL-84398 libraries: Configure locale property for ChartJs
ChartJs has a property called locale that makes possible to format scale
numbers according to a language. This way we ensure that decimal places
will be displayed correctly in the chart labels and tooltips.
2025-02-27 21:43:31 -03:00
Paul Holden 9e41cd6609 MDL-81623 admin: sensitive toggle when prompting for upgrade key. 2025-02-27 21:14:07 +00:00
Sara Arjona b132ff1ed8 weekly release 4.4.6+ 2025-02-27 16:54:53 +01:00
Huong Nguyen 377d56c835 Merge branch 'MDL-80351-404' of https://github.com/pedrojordao/moodle into MOODLE_404_STABLE 2025-02-27 10:13:37 +07:00
Simey Lameze 12bf1da9e5 MDL-84424 behat: add template_competencies generator and improve test 2025-02-27 07:50:03 +08:00
Angelia Dela Cruz 52fbae2907 MDL-84424 tool_lp: admin can create learning plans from template 2025-02-27 07:48:19 +08:00
Sara Arjona 5eaaf5e016 Merge branch 'MDL-84609-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2025-02-26 16:19:53 +01:00
Sara Arjona 045db899be Merge branch 'MDL-84584-404' of https://github.com/sh-csg/moodle into MOODLE_404_STABLE 2025-02-26 08:04:15 +01:00
Simey Lameze 16c9172c63 MDL-84609 behat: add required entities and fix failures
This commit also fix some typos and misaligned pipes around the
changed steps.

Signed-off-by: Simey Lameze <simey@moodle.com>
2025-02-25 11:51:14 +08:00
Angelia Dela Cruz 6b12fa32e1 MDL-84609 tool: Replaced tool_lp generators with standard generators 2025-02-25 11:51:14 +08:00
Van Binh Dang b9ce55d66d MDL-75442 quiz: Highlight error message when manually grading 2025-02-24 14:29:44 -05:00
Mihail Geshoski cdce19d0d0 MDL-84532 qtype_ordering: Fix failing query in mssql on upgrade
The SELECT statement can only include columns that are part of the
GROUP BY clause. To resolve this issue, instead of including all columns
('*'), only the 'id' column is now included in the SELECT statement,
while still preserving the existing GROUP BY statement. This column is
the only one needed to identify the relevant qtype_ordering_options
record that requires updating in the next step.
2025-02-24 18:02:06 +08:00
sam marshall 168ca6fdef MDL-83674 Files: pluginfile.php debugging if user not allowed course 2025-02-21 14:12:29 +00:00
Julien Boulen f063ef682f MDL-83136 course: Add missing value on unknowncategory exception message 2025-02-21 09:25:18 +01:00
Huong Nguyen e06475d8ae weekly release 4.4.6+ 2025-02-21 10:15:12 +07:00
Andrew Nicols f0199e8038 MDL-84595 tool_behat: Allow accessibility tests to run for a single Node 2025-02-20 22:28:03 +08:00
Jun Pataleta cca044ce15 Merge branch 'MDL-84448-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2025-02-20 12:10:04 +08:00
Simey Lameze a780d14710 MDL-84448 behat: return null if theme has no config 2025-02-20 12:00:42 +08:00
Amanda Doughty 3af76654fd MDL-84448 lib: Fixed behat context check for grandchild themes 2025-02-20 12:00:42 +08:00
Jun Pataleta de8176c553 Merge branch 'MDL-84592-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2025-02-20 11:45:39 +08:00
Huong Nguyen c6e0071808 Merge branch 'MDL-84528-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-02-20 10:16:54 +07:00
Jun Pataleta 04b0132b3a Merge branch 'MDL-84590-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2025-02-20 10:49:58 +08:00
Andrew Nicols 6e3cb19969 MDL-84592 tool_behat: Improve accessibility failure information 2025-02-20 10:26:30 +08:00
Andrew Nicols 8ca7f282bc MDL-84590 tool_behat: Axe tests must use all wcag rules
Rules are not additive. That is to say that the wcag22a tag does not
include wcag21a or wcag2a. They all need to be specified.
2025-02-20 09:59:48 +08:00
Stefan Hanauska 33e58ab61a MDL-84584 badges: Don't delete all draft files 2025-02-19 12:16:26 +01:00
Sara Arjona 1d40ca9de8 Merge branch 'MDL-83784_404' of https://github.com/cwarwicker/moodle into MOODLE_404_STABLE 2025-02-19 12:00:29 +01:00
Huong Nguyen c0f24543fc MDL-84341 qbank_history: Behat cleanup 2025-02-18 20:41:00 +07:00
Huong Nguyen fe0c832dcd Merge branch 'MDL-84341_404' of https://github.com/cwarwicker/moodle into MOODLE_404_STABLE 2025-02-18 20:40:42 +07:00
Sara Arjona b19296b629 Merge branch '84348-hide-h5p-preview-message-404' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_404_STABLE 2025-02-18 13:12:19 +01:00
Conn Warwicker 6a34598550 MDL-84341 qbank_history: Fix version ordering
Previously the version ordering was done on timecreated which
wasn't always correct. This now uses the version number instead.

Also set the default sorting on the history page to be version.

Also backports a change to the behat question generator to let
us set the value of fields on updated questions in the step.
2025-02-17 11:46:48 +00:00
Jun Pataleta 9508120293 weekly release 4.4.6+ 2025-02-14 09:53:52 +08:00
Jun Pataleta 0891666ec7 Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2025-02-14 09:53:49 +08:00
Conn Warwicker 17c3e8ecc8 MDL-83784 mod_quiz: Fix quiz unusable if question category missing.
Random questions set to question categories which no longer exist
was throwing an error making it impossible to use or edit the quiz
to fix it. This will now allow the user to view the questions and
edit the quiz in order to fix the problem of the missing category.
2025-02-13 15:48:22 +00:00
Paul Holden c6a31786f7 MDL-84528 tag: define missing language string for related tags area. 2025-02-13 15:04:01 +00:00
Pedro Jordao eb0342fa4f MDL-80351 libraries: ChartJS axis options being ignored
When chartJs was updated to version 3.8.0, chart axis were now accessed
as a object property instead of an array element. This solution aims to
update the way we set the axis properties, aiming to display the labels
and other properties.
2025-02-13 02:25:49 -03:00
Huong Nguyen da47f4dafb Merge branch 'MDL-83579-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-02-13 11:11:47 +07:00
Jun Pataleta 8cc95faa8a Merge branch 'mdl-83306_404' of https://github.com/james-cnz/moodle into MOODLE_404_STABLE 2025-02-13 11:54:59 +08:00
Jun Pataleta d5ba48ab32 Merge branch 'MDL-84102-404' of https://github.com/andelacruz/moodle into MOODLE_404_STABLE 2025-02-13 11:48:59 +08:00
Huong Nguyen d7c719f597 Merge branch 'MDL-83645-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-02-13 10:43:09 +07:00
Huong Nguyen 1145b31059 Merge branch 'MDL-69142-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-02-13 10:33:46 +07:00
Huong Nguyen 90ebc61746 Merge branch 'MDL-79265-404' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_404_STABLE 2025-02-13 09:15:54 +07:00
Simmo Saan 650efc4ff7 MDL-65233 course: remove usergetmidnight from reset time shift 2025-02-12 21:56:35 +02:00
Simmo Saan 51f425ec29 MDL-65233 course: add reset time shift test with non-midnight hour 2025-02-12 21:56:35 +02:00
Angelia Dela Cruz bec6456309 MDL-84102 message: Behat for setting default notification preferences 2025-02-12 15:35:21 +08:00
Huong Nguyen 3a9fd31020 Merge branch 'MDL-83452-addbodyclass-404' of https://github.com/leonstr/moodle into MOODLE_404_STABLE 2025-02-12 11:31:13 +07:00
Huong Nguyen f7f8b14c3e Merge branch 'MOODLE_404_MDL-82601' of https://github.com/danielneis/moodle into MOODLE_404_STABLE 2025-02-11 11:46:45 +07:00
Huong Nguyen 298a3f5107 Merge branch 'MDL-82440-MOODLE_404_STABLE' of https://github.com/praxisdigital/moodle into MOODLE_404_STABLE 2025-02-11 11:39:36 +07:00
Huong Nguyen 70efbd07af Merge branch 'MDL-84414-404' of https://github.com/andelacruz/moodle into MOODLE_404_STABLE 2025-02-11 11:17:44 +07:00
Angelia Dela Cruz 5b90cc9653 MDL-84414 gradingform_guide: Behat test to set marking guide as ready 2025-02-11 11:02:45 +08:00
AMOS bot b0423acc58 Automatically generated installer lang files 2025-02-11 00:09:19 +00:00
Paul Holden c275ca43c9 MDL-69142 tool_cohortroles: fix table ordering by role name. 2025-02-10 12:34:09 +00:00
Sara Arjona 746a17f9b0 Merge branch 'MDL-67462-404' of https://github.com/albertgasset/moodle into MOODLE_404_STABLE 2025-02-10 09:38:49 +01:00
Sara Arjona 56a037e766 Moodle release 4.4.6 2025-02-07 12:18:26 +01:00
Albert Gasset eb18a07be2 MDL-67462 badges: Improve tests of external functions 2025-02-07 09:13:05 +01:00
Albert Gasset e0930fce1e MDL-67462 badges: Fix badge alignments returned in external functions 2025-02-07 09:13:05 +01:00
Sara Arjona f0dd12e3b1 weekly release 4.4.5+ 2025-02-06 16:21:48 +01:00
Hieu Nguyen Dang 488a48e5f1 MDL-79265 question bank: fix which questions are listed with hidden
This fixes the bug where if the latest version of the question is hidden,
the question disappears, even if older versions exist that are still visible.
2025-02-06 17:21:15 +07:00
Jun Pataleta b98cd94144 Merge branch 'MDL-83794-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2025-02-06 17:09:56 +08:00
Andrew Nicols fbb5b80781 MDL-83794 editor_tiny: Explicitly list MathML content 2025-02-06 13:50:54 +08:00
Andrew Nicols 6adb349e04 MDL-83794 editor_tiny: Fix typo in style name 2025-02-06 13:50:43 +08:00
Jun Pataleta e689669087 Merge branch 'MDL-81829-fix-pretty-whoops-MOODLE_404_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_404_STABLE 2025-02-06 12:20:17 +08:00
Jun Pataleta d6ada8d0db Merge branch 'MDL-72080-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-02-06 11:36:52 +08:00
Laurent David 5c05b1104e MDL-84271 core_course: Validate module list in search
* We need to validate the list of modules in the course search

Co-authored-by: Lars Bonczek <bonczek@math.tu-berlin.de>
2025-02-06 11:20:01 +08:00
Paul Holden 81d8bf30ec MDL-84003 mod_glossary: capability check restoring trusted entry text. 2025-02-06 10:51:42 +08:00
Paul Holden d3cdeeff2b MDL-84145 report_loglive: format event description as plain text. 2025-02-06 09:44:27 +07:00
Huong Nguyen 86d6a59dc1 Merge branch 'MDL-83635-404' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2025-02-06 08:46:00 +07:00
Brendan Heywood de65f0f62b MDL-81829 core: Fix early bootstrap bug with whoops 2025-02-06 09:36:03 +11:00
Paul Holden ddf3665d9c MDL-82170 user: replace increment operator on string type variable. 2025-02-05 20:10:33 +00:00
Leon Stringer 045669a9bf MDL-79976 mod_feedback: Check group for response
Check the teacher's group membership if group mode is SEPARATEGROUPS
prior to showing or deleting responses.
2025-02-05 18:13:02 +01:00
Sara Arjona 0f5a96ff3e Merge branch 'MDL-80848-404' of https://github.com/andrewgos/moodle into MOODLE_404_STABLE 2025-02-05 18:13:02 +01:00
Jun Pataleta 7ce74ac844 Merge branch 'MDL-83753_404_STABLE' of https://github.com/djarran/moodle into MOODLE_404_STABLE 2025-02-05 18:13:02 +01:00
Jun Pataleta 400adb0717 Merge branch 'mdl-83695_404' of https://github.com/james-cnz/moodle into MOODLE_404_STABLE 2025-02-05 18:13:02 +01:00
Sara Arjona 080f51b546 Merge branch 'MDL-67683-404' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2025-02-05 18:13:02 +01:00
Huong Nguyen 03bf0094d6 Merge branch 'mdl-83690_404' of https://github.com/james-cnz/moodle into MOODLE_404_STABLE 2025-02-05 18:13:02 +01:00
Huong Nguyen b659d83c7e Merge branch 'MDL-83650-404_fix_ods_cell' of https://github.com/Cl3mensM/moodle into MOODLE_404_STABLE 2025-02-05 18:13:02 +01:00
Jun Pataleta c5b12b8434 Merge branch 'MDL-83809-m404' of https://github.com/sammarshallou/moodle into MOODLE_404_STABLE 2025-02-05 18:13:02 +01:00
sam marshall 25641fd188 MDL-83809 Accessibility: Focus issues in modals
This change fixes 2 issues:

1 The focus lock for modals (e.g. within Tiny editor) did not
  correctly loop round from the end of the modal to the start.

2 After clicking 'Browse repositories' button in a Tiny editor
  modal, and closing the file picker, focus did not return to
  the button as expected.
2025-02-04 12:59:06 +00:00
james-cnz cbe7511ab9 MDL-83695 backup: Add space before course Restores in progress heading 2025-02-05 00:15:30 +13:00
Paul Holden 21b1e38161 MDL-84239 badges: correct context check when disabling badge. 2025-02-04 15:19:58 +08:00
David Woloszyn 8b936d2c59 MDL-84136 filter_tex: Improve sanitization of forbidden items 2025-02-04 11:35:46 +07:00
Mark Johnson e2544e97bf MDL-84146 question: Improve handling of JS parameters 2025-02-03 12:11:18 +00:00
meirzamoodle b702448816 MDL-84023 lib: Update requirejs to 2.3.7 2025-02-03 12:11:18 +00:00
Marina Glancy e4a814847d MDL-83941 tags: prevent users from browsing unsearchable collections 2025-02-03 12:11:18 +00:00
Mihail Geshoski 4eea25dc73 MDL-82896 qtype_ddimageortext: Clean drop zone label text
It is unnecessary to allow HTML to be added to the drop zone label text,
as this content is hidden and only accessible to screen readers.
Additionally, the content is currently not properly formatted, which
introduces a risk for potential XSS exploits. This change ensures that
only plain text (PARAM_TEXT) is allowed when adding content and that the
content is properly formatted before being output.
2025-02-03 12:11:18 +00:00
Sara Arjona 79e95b9c98 Merge branch 'MDL-82679-404-fix' of https://github.com/ferranrecio/moodle into MOODLE_404_STABLE 2025-02-03 13:08:09 +01:00
ferran 5ad11fffa8 MDL-82679 course: fixing sections collapse steps 2025-02-03 11:49:18 +01:00
Jun Pataleta 0088376633 MDL-67683 theme_boost: Update selector for calendar block styles
With the change from `aside` to `section` for blocks within the main
content region, the selector for instances of the calendar block not in
the main content region also needs to be updated to use a more generic
selector that can cover when either the blocks container containing the
calendar block is an `aside` or a `section`.

The `data-blockregion` attribute is a good selector for this purpose.
2025-02-03 15:55:56 +08:00
Jun Pataleta e14f48ea61 MDL-67683 behat: Add accessibility test for the maintenance mode layout 2025-02-03 15:55:56 +08:00
Jun Pataleta b227c46f5f MDL-67683 behat: Add accessibility test for the secure layout
Also, add page title and heading to the secure test page to make
it accessible.
2025-02-03 15:55:56 +08:00
Jun Pataleta bcbc1e4ccc MDL-67683 output: Make block regions unique
Unique labels for the block regions:
* `side-pre` blocks - "Blocks"
* `side-post` blocks - "Supplementary blocks"
* `content` blocks - "Main content blocks"

Blocks in the main content region (div role="main") should not also be
in an <aside> as it is a top-level landmark.
2025-02-03 15:55:55 +08:00
Jun Pataleta e757bec9f8 MDL-67683 theme: Set page heading in a header landmark for secure layout 2025-02-03 15:55:55 +08:00
Jun Pataleta 3f8defcc19 MDL-67683 auth: Test login page accessibility with axe best-practice tag 2025-02-03 15:55:55 +08:00
Jun Pataleta d9ad34cb1d MDL-67683 behat: Update xpath selector for #region-main 2025-02-03 15:55:55 +08:00
Jun Pataleta 070a61b84a MDL-67683 blocks: Do not assign a complementary role for blocks
Blocks are contained in an <aside> which has a default ARIA role of
"complementary", a top-level landmark. So assigning a "complementary"
role for block instances is not needed. As blocks are already in a
<section> tag which has a default role of "region", there's no need
to override the ARIA role, unless specified by the block plugin.

Read more at:
https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/
2025-02-03 15:55:55 +08:00
Jun Pataleta 4f6733acfc MDL-67683 theme: Do not use section for block containers
The containers for the blocks in layout templates should not be using a
<section> tag (which has a default landmark role of "region") as the
blocks are already contained in an <aside> tag that has the default
"complementary" role which should be a top-level landmark.

Read more at:
https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/
2025-02-03 15:55:54 +08:00
Jun Pataleta 000e5b2381 MDL-67683 theme: Do not use section for #region-main
The #region-main container should not be a <section> tag (which has a
default landmark role of "region") as it contains the container with
the "main" role which should be a top-level landmark.

Read more at:
https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/
2025-02-03 15:55:54 +08:00
Jun Pataleta 80963c3d4f MDL-83635 tool_brickfield: Use core_text:strlen() for img alt check
Multibyte alt texts will cause this check to fail easily. We need to be
using `core_text::strlen()` when checking the image alt text's length.
2025-02-03 15:52:19 +08:00
Huong Nguyen e2259ad35f Merge branch 'MDL-81478-404' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2025-02-03 09:32:34 +07:00
Huong Nguyen 07496fe189 Merge branch 'MDL-83794-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2025-02-03 09:20:49 +07:00
Sara Arjona 60c4a31809 Merge branch 'mdl-82679_404_wip' of https://github.com/james-cnz/moodle into MOODLE_404_STABLE 2025-01-31 16:01:39 +01:00
Sara Arjona 854d8c248e Merge branch 'MDL-84321-404-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_404_STABLE 2025-01-31 15:42:50 +01:00
Jun Pataleta af4b548211 Merge branch 'MDL-82542-404' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_404_STABLE 2025-01-31 12:43:36 +08:00
Huong Nguyen 1c7ac7057b weekly release 4.4.5+ 2025-01-31 09:20:35 +07:00
Huong Nguyen a55ef4111e Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2025-01-31 09:20:32 +07:00
James C afa14a570a MDL-82679 course: Prevent collapsable sections conflicting 2025-01-30 22:30:00 +13:00
Huong Nguyen 6b1f83664e Merge branch 'MDL-79281_404' of https://github.com/cwarwicker/moodle into MOODLE_404_STABLE 2025-01-30 11:13:41 +07:00
Huong Nguyen 609c94d3d9 Merge branch 'MDL-84103-404' of https://github.com/andelacruz/moodle into MOODLE_404_STABLE 2025-01-30 11:10:13 +07:00
Huong Nguyen 803cba0ab5 Merge branch 'MDL-84095-404' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2025-01-30 10:51:20 +07:00
Huong Nguyen db44196363 Merge branch 'MDL-84275-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-01-30 10:27:55 +07:00
Angelia Dela Cruz 7105bd2b60 MDL-84103 imscc: Behat test for import IMS Cartridge to course 2025-01-30 10:37:54 +08:00
Huong Nguyen 4ce8e8361d Merge branch 'MDL-83297-maxgradesperpage-404' of https://github.com/dragos5436/moodle into MOODLE_404_STABLE 2025-01-30 09:29:09 +07:00
Huong Nguyen 29c6c98cee Merge branch 'MDL-84323-404' of https://github.com/sarjona/moodle into MOODLE_404_STABLE 2025-01-30 09:20:35 +07:00
Clemens 4af5a3334f MDL-83650 odslib: Add variable to class MoodleODSCell 2025-01-30 00:36:18 +01:00
james-cnz 5863d457ae MDL-83690 course: Fix course index label links 2025-01-30 10:37:13 +13:00
Sara Arjona faf6c8bf88 Merge branch 'MDL-84264-404' of https://github.com/pmaneggia/moodle into MOODLE_404_STABLE 2025-01-29 16:53:04 +01:00
Sara Arjona c1e8f835d7 Merge branch 'MDL-84243-404' of https://github.com/ferranrecio/moodle into MOODLE_404_STABLE 2025-01-29 16:47:45 +01:00
Sara Arjona 5dc97f0d3b Merge branch 'MDL-84129-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-01-29 08:50:14 +01:00
Sara Arjona ef550e346a Merge branch 'MDL-84214-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-01-29 08:39:32 +01:00
Sara Arjona dcc038b0ec Merge branch 'MDL-84148-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-01-29 08:30:22 +01:00
Sara Arjona babc113f5a Merge branch 'MDL-79819_404' of https://github.com/jonof/moodle into MOODLE_404_STABLE 2025-01-29 08:18:42 +01:00
Sara Arjona 70a4c4a855 Merge branch 'MDL-84355-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2025-01-29 08:09:58 +01:00
Sara Arjona f8295a0a91 Merge branch '83617-fix-grader-report-url-404' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_404_STABLE 2025-01-29 08:00:56 +01:00
Sara Arjona 94671a1ad3 Merge branch 'MDL-83152-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-01-29 07:49:34 +01:00
Andrew Nicols 61c159565d MDL-84355 phpunit: Exclude fixtures from testsuite search 2025-01-29 11:46:02 +08:00
Andrew Nicols 756b823873 MDL-84355 phpunit: Correct test path for component configs 2025-01-29 11:46:01 +08:00
David Mudrák aa036f8f2d MDL-84321 lang: Use the fixed strings in tests, too 2025-01-28 20:58:49 +01:00
Helen Foster 51af4b62e6 MDL-84321 lang: Import fixed English strings (en_fix) 2025-01-28 20:55:25 +01:00
Paul Holden ca0c71ed9a MDL-72080 javascript: explicit Content-Type in service responses.
This fixes various external methods that initialize page output
manually, e.g. `core_get_fragment`, which can mess with third party
proxies that modify data in transit because of the current default
response type header (text/html).

Co-authored-by: Mario Torres
2025-01-28 12:48:38 +00:00
Julien Boulen 0f75ce3ebf MDL-84348 h5pactivity: Hide preview mode warning for guest users 2025-01-28 12:00:05 +01:00
Huong Nguyen 01f65cb442 Merge branch 'MDL-83079-404' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2025-01-28 17:04:47 +07:00
Frederik Milling Pytlick bc75c60a0d MDL-83079 core: Make signal handlers run during non CLI scripts 2025-01-28 16:50:55 +07:00
Jun Pataleta 0428108f77 Merge branch 'MDL-81195-404' of https://github.com/martygilbert/moodle into MOODLE_404_STABLE 2025-01-28 10:53:18 +08:00
AMOS bot e3c9b1782b Automatically generated installer lang files 2025-01-28 00:07:46 +00:00
ferran 329eeab4a8 MDL-84243 core_courseformat: fix course index completion icon 2025-01-27 17:24:34 +01:00
Sara Arjona 8eefbaeb1a MDL-84323 core_badges: Remove endorsement from JSON
The endorsement has been removed from the JSON because, according to
the OBv2.0specification, it must not be included in either the badge
or the assertion.
Including it results in a format error, rendering the badge invalid.
2025-01-27 10:34:49 +01:00
Paul Holden 0df63ca7da MDL-83720 tag: correct description formatting component/filearea. 2025-01-24 12:52:22 +00:00
Jun Pataleta b2e8267f28 Merge branch 'MDL-83989-404' of https://github.com/clransom/moodle into MOODLE_404_STABLE 2025-01-24 15:52:34 +08:00
Marty 898f075788 MDL-81195 core_course: allow for daylight savings
In timezones where daylight savings time is used, courses that start
on a Monday at 00:00 would display the week headings incorrectly
during the change forward.

When the time changes backwards, courses that have a start time of
Sunday at 23:00 also have a mislabeled week.

This attempts to use the DateTime() library, along with the user's
local timezone setting to display the correct day, rather than just
subtracting 86400.
2025-01-23 14:48:22 -05:00
Sara Arjona c5d94d21f2 weekly release 4.4.5+ 2025-01-23 17:35:02 +01:00
Sara Arjona 83ef24ea9d Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2025-01-23 17:35:00 +01:00
Katie Ransom b79da43ed9 MDL-83989 file upload: Filemanager breaks if you drop file outside of it 2025-01-23 16:27:34 +00:00
Dani Palou 1a3e762198 MDL-84313 pluginfile: Allow fetching by chunks in cross-site requests
Without these headers, the range headers are blocked so only the first chunk of the file can be retrieved.
2025-01-23 15:54:18 +01:00
Huong Nguyen efbbed5c91 Merge branch 'MDL-83751-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-01-23 10:48:47 +07:00
Huong Nguyen 589d84fb63 Merge branch 'MDL-81685_matrix_homeserver_name_404' of https://github.com/mark-webster-catalyst/moodle into MOODLE_404_STABLE 2025-01-23 09:17:23 +07:00
Huong Nguyen e9efe724c5 Merge branch 'MDL-84101-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2025-01-23 09:09:30 +07:00
Huong Nguyen c3b83ea5ef Merge branch 'MDL-84249-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2025-01-23 09:02:46 +07:00
Simey Lameze 3e72128eda MDL-84101 behat: add step to save changes
Signed-off-by: Simey Lameze <simey@moodle.com>
2025-01-23 07:26:16 +08:00
Huong Nguyen 6a0030b42d Merge branch 'MDL-78365-404' of https://github.com/pedrojordao/moodle into MOODLE_404_STABLE 2025-01-22 15:11:32 +07:00
Angelia Dela Cruz c1b740031d MDL-84101 message: Behat test for managing notification options 2025-01-22 15:50:26 +08:00
Andrew Gosali 00f653d756 MDL-80848 mod_forum: to have id as the backup sorting condition
When the first sorting condition fails (falls on the same value), it should have another sorting as a backup.
2025-01-22 13:39:08 +07:00
Andrew Nicols a3cac367ce MDL-83794 editor_tiny: Add SVG support 2025-01-22 11:41:53 +08:00
Andrew Nicols 416317aa71 MDL-83794 editor_tiny: Add support for MathML 2025-01-22 11:41:45 +08:00
Paul Holden 974fc76672 MDL-84275 factor_totp: format site fullname for authenticator setup. 2025-01-21 21:36:23 +00:00
dragos5436 19f8007d0e MDL-83297 gradereport_grader: Make maxgradesperpage configurable
After deploying to our production environment, we noticed that for large gradebooks, having a max of 200,000 grades per
page was still too high and resulted in the gradebook page crashing or failing to load entirely. This commit will make
this value configurable (e.g. ->maxgradesperpage = 70000) rather than a constant so that other institutions can tune it.

Co-authored-by: Leon Stringer <leon.stringer@ucl.ac.uk>
2025-01-21 12:46:40 +00:00
Mark Webster fd6d8a582e MDL-81685 communication_matrix: Adds Matrix homeserver name setting
Allows setting a homeserver name for instances where
usernames do not follow the pattern @user:homeserverurl
2025-01-21 12:38:38 +00:00
Huong Nguyen d8c0d9d91d Merge branch 'MDL-84111-404' of https://github.com/lucaboesch/moodle into MOODLE_404_STABLE 2025-01-21 09:32:47 +07:00
Huong Nguyen 8eecfce1f9 Merge branch 'MDL-82722_404' of https://github.com/cwarwicker/moodle into MOODLE_404_STABLE 2025-01-21 09:06:46 +07:00
Huong Nguyen a16e81a3fe Merge branch 'MDL-82237_404_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_404_STABLE 2025-01-21 08:58:15 +07:00
Paola Maneggia 0081e95baf MDL-84264 backup: encode and decode urls for the new course section page 2025-01-20 19:05:29 +01:00
Sara Arjona 64f2292294 Merge branch 'MDL-81043-404' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2025-01-20 16:03:35 +01:00
Conn Warwicker 03af18d503 MDL-79281 core_question: Remove 'deleteall' param from edit page.
This removes the setting of the 'deleteall' param to every link
on the question edit page and inserts it into the url based
on if we actually want to delete all versions or not.
2025-01-20 14:16:28 +00:00
Mark Johnson dcc42cf288 MDL-82237 mod_quiz: Include all filters in "See questions" link
The "See questions" link for random questions was still using the old
format the filter conditions, so was only applying the category filter
on the list of questions displayed. This means that if a tag filter (or
any other filter) was set on the random question set, it was not applied
when viewing the list of questions.

This change takes all the filter conditions applied in random question's
slot and passes them to the question bank in the "See questions" link.
2025-01-20 12:48:02 +00:00
Julien Boulen bb669f4504 MDL-83617 gradereport_grader: Fix URL encoding
When changing the number of grades per page, the redirect url was encoded twice.
2025-01-20 10:45:32 +01:00
Simey Lameze 3dbec6c9f8 MDL-84249 behat: remove unnecessary javascript tag
This commit also make the repeated scenario names unique.
2025-01-20 14:00:05 +08:00
Jun Pataleta c314471845 Merge branch 'MDL-83750-404' of https://github.com/raortegar/moodle into MOODLE_404_STABLE 2025-01-20 10:24:18 +08:00
Jun Pataleta 29e22d2b11 Merge branch 'MDL-83814-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2025-01-20 09:58:11 +08:00
Jonathon Fowler 0a8243000f MDL-79819 assignfeedback_editpdf: safely handle bad jpg->pdf conversion 2025-01-20 08:42:24 +10:00
Paul Holden 75d85f4ef4 MDL-84214 mod_bigbluebuttonbn: fix default presentation file serving. 2025-01-17 12:29:07 +00:00
Paul Holden fec551a29b MDL-83152 mod_glossary: fix chronological sorting of pending entries. 2025-01-17 10:26:11 +00:00
Jun Pataleta c53ea9148f Merge branch 'MDL-83341-404' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2025-01-17 17:01:10 +08:00
Huong Nguyen 3ea5feff62 MDL-81043 gradereport_grader: Improve gradereport_grader/collapse
- This will helps `nodesUpdate` handle asynchronous updates better
 - This also helps to fix Random Behat failure
2025-01-17 15:13:59 +07:00
Luca Bösch 002eb8eb36 MDL-84111 qtype_ddimageortext: keep item type, file and text together. 2025-01-17 08:53:43 +01:00
AMOS bot c2ee302fb0 Automatically generated installer lang files 2025-01-17 00:07:51 +00:00
Paul Holden 9a8e896f66 MDL-83751 check: remove non-functional result class method. 2025-01-16 17:40:13 +00:00
Paul Holden 5b8a7b7d73 MDL-83579 tiny_media: pass filepicker accepted types to dropzone. 2025-01-16 17:37:59 +00:00
Huong Nguyen ddc7c93a3c weekly release 4.4.5+ 2025-01-16 23:46:45 +07:00
Huong Nguyen 1485574d2e Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2025-01-16 23:46:42 +07:00
Jun Pataleta 666ae9685c Merge branch 'MDL-80468-factorpage-44' of https://github.com/bwalkerl/moodle into MOODLE_404_STABLE 2025-01-16 12:25:52 +08:00
Jun Pataleta 4e4a767b2f Merge branch 'MDL-83826-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2025-01-16 10:22:06 +08:00
Conn Warwicker 9a4b282cac MDL-82772 mod_quiz: Update context when random question is updated. 2025-01-15 13:16:46 +00:00
Jun Pataleta e55d6ba449 Merge branch 'MDL-83172-404-test' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2025-01-15 17:02:20 +08:00
Sara Arjona fe4f0952d8 Merge branch 'MDL-83995-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-01-15 08:29:11 +01:00
Angelia Dela Cruz 147f276a1d MDL-83826 core_admin: Behat coverage for plugins overview for admins 2025-01-15 14:02:39 +08:00
Sara Arjona d1917aa733 Merge branch 'MDL-83630-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-01-14 11:53:40 +01:00
Sara Arjona e98adf16ef Merge branch 'MDL-83183-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2025-01-14 10:59:23 +01:00
meirzamoodle 2c61186716 MDL-83172 environment: Fix undefined array key error 2025-01-14 16:34:32 +07:00
meirzamoodle b244f300f5 MDL-83172 environment: Remove Oracle from LMS 2025-01-14 16:34:32 +07:00
Jun Pataleta 0763a2818a Merge branch 'MDL-84124-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2025-01-14 11:12:29 +08:00
Huong Nguyen 7b4b1bc8c4 Merge branch 'MDL-83831-404' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_404_STABLE 2025-01-14 09:01:24 +07:00
AMOS bot f59e9e5075 Automatically generated installer lang files 2025-01-14 00:07:39 +00:00
Paul Holden 3b5b747bf0 MDL-84129 reportbuilder: improve handling of alternate name fields.
It's possible the first returned field contains a null value, while
subsequent fields may be non-null - in this case we should still
populate the fullname in column callback.
2025-01-13 16:05:01 +00:00
Pedro Jordao 52337aa5a5 MDL-78365 libraries: Truncate ChartJs labels to avoid display issues
If the chart label is too large, it is breaking the display, so we will
add ellipsis to the label and display the full text in the tooltip.
2025-01-13 11:36:38 -03:00
raortegar ea50d0b151 MDL-83750 core_form: Fix deprecated preg_replace in form 2025-01-13 15:05:08 +01:00
Daniel Neis Araujo 402ea0f8d2 MDL-82601 scorm: score not being stored when force complete is used 2025-01-13 09:56:54 -03:00
Jun Pataleta 9f3fee7b4f Merge branch 'MDL-83832-404' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_404_STABLE 2025-01-13 15:50:47 +08:00
Andrew Nicols 1a627c76ae MDL-83814 core: Bump Node to latest LTS 2025-01-13 09:07:08 +08:00
AMOS bot a854dfc52f Automatically generated installer lang files 2025-01-13 00:07:46 +00:00
Benjamin Walker 59591eb4b0 MDL-80468 tool_mfa: Allow loading factor defined externalpages correctly 2025-01-10 21:14:50 +10:00
Andrew Nicols 99aac9532a MDL-84152 tests: Remove extraneous / in external file URL generation 2025-01-10 14:48:18 +08:00
Paul Holden b8120879e1 MDL-84148 tool_lp: clarify the primary save action of scales dialogue. 2025-01-09 18:29:14 +00:00
Paul Holden 56a109d2c3 MDL-83645 grade: fix text formatting in external grading form method. 2025-01-09 14:52:08 +00:00
Sara Arjona a843eab495 weekly release 4.4.5+ 2025-01-09 15:21:55 +01:00
Sara Arjona cd4526e074 Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2025-01-09 15:21:52 +01:00
meirzamoodle 5e4ee44064 MDL-84095 tiny_recordrtc: Shows error toast for failures 2025-01-09 15:57:00 +07:00
Huong Nguyen cca3aa9d64 Merge branch 'MDL-77185-diskfreespace-404' of https://github.com/leonstr/moodle into MOODLE_404_STABLE 2025-01-09 10:13:27 +07:00
hieuvu 5728b158e6 MDL-82542 qbank_managecategories: Add new user preferences
Keep the checkbox to show questions from subcategories as a user preference.
2025-01-09 09:42:28 +07:00
Jun Pataleta b74a075f06 Merge branch 'MDL-82769_404' of https://github.com/cwarwicker/moodle into MOODLE_404_STABLE 2025-01-09 10:16:31 +08:00
AMOS bot 61075feacd Automatically generated installer lang files 2025-01-09 00:09:58 +00:00
Andrew Nicols 0a609e28f8 MDL-84124 cache: Purge Redis cache between tests 2025-01-09 08:00:43 +08:00
Paul Holden 47d187ddf6 MDL-83995 mod_glossary: support export/import of entry trusted text. 2025-01-08 13:44:27 +00:00
Khoa Nguyen c737a3824e MDL-83831 core_question: Reset columns on history page causes confusion 2025-01-08 13:36:23 +07:00
sarjona 518897961a MDL-83917 core: Move upgradenotes to upgrade.txt 2025-01-08 07:25:20 +01:00
sarjona 4392036ba0 Merge branch 'MDL-83917-404' of https://github.com/pedrojordao/moodle into MOODLE_404_STABLE 2025-01-08 07:16:36 +01:00
meirzamoodle dfef6244e9 MDL-81478 atto_recordrtc: Add webm audio support as a fallback
Co-authored-by: Djarran Cotleanu <djarrancotleanu@catalyst-au.net>
2025-01-08 12:53:34 +07:00
meirzamoodle a1437fd754 MDL-81478 tiny_recordrtc: Add webm audio support as a fallback
Co-authored-by: Djarran Cotleanu <djarrancotleanu@catalyst-au.net>
2025-01-08 12:53:34 +07:00
Huong Nguyen 88f5d8ee4d Merge branch 'MDL-84008-404' of https://github.com/lucaboesch/moodle into MOODLE_404_STABLE 2025-01-08 09:41:27 +07:00
Huong Nguyen c33711e7d3 Merge branch 'MDL-79122_404' of https://github.com/cwarwicker/moodle into MOODLE_404_STABLE 2025-01-08 09:26:44 +07:00
Pedro Jordao ea6d8984ba MDL-83917 core_completion: Create function count_modules_completed
The function returns the number of modules completed by a user and
executes a COUNT aggregate function to avoid running many queries
to obtain this information, aiming to optimize performance.

Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
2025-01-07 22:22:34 -03:00
AMOS bot f24ef9c6fd Automatically generated installer lang files 2025-01-08 00:07:43 +00:00
sarjona 7dd7955bad Merge branch 'MDL-83746-404' of https://github.com/srobotta/moodle into MOODLE_404_STABLE 2025-01-07 14:50:11 +01:00
sarjona 266b18f42f Merge branch 'MDL-82788-404' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2025-01-07 14:15:02 +01:00
Conn Warwicker 6b7e0041ee MDL-79122 question: Correct capability check for question comments link.
This makes the rendering of the question comments count additionally
check the core moodle/comment:post capability, since this capability
is required to make comments. Previously, this was not being checked
so users could open the modal to make a comment, which was causing
a javascript error due to expected elements being missing.
2025-01-07 12:21:57 +00:00
Jun Pataleta d313e901f4 Merge branch 'MDL-83668-404' of https://github.com/srobotta/moodle into MOODLE_404_STABLE 2025-01-07 13:56:46 +08:00
Conn Warwicker fb9e208703 MDL-82769 question: Update legacy filters on random questions.
- Adds the "cat" field to the converted legacy filter, which was
  missing.
- Does the conversion on the editrandom.php page as this was
  throwing a warning.
2025-01-06 14:15:03 +00:00
meirzamoodle b1732ce439 MDL-82788 theme_boost: Obtain the correct Tiny and Atto editor elements 2025-01-06 20:27:27 +07:00
Luca Bösch d5e003d8bc MDL-84008 qtype_match: keep question and answer together. 2025-01-06 13:37:16 +01:00
Luca Bösch 6b11c30774 MDL-84008 qtype_calculated: glue formula, tolerance, display, feedback. 2025-01-06 13:37:16 +01:00
Luca Bösch edd55a9171 MDL-84008 qtype_multichoice: keep choice, grade and feedback together. 2025-01-06 13:37:16 +01:00
Stephan Robotta e25296bd61 MDL-83746 navigation: check host and path for active flag in custom menu 2025-01-06 08:32:06 +01:00
Stephan Robotta 9f467c9a00 MDL-83668 tiny: customize allowed HTML tags and attributes 2025-01-06 08:31:56 +01:00
Jun Pataleta 32667ab162 Merge branch 'MDL-83835-404' of https://github.com/raortegar/moodle into MOODLE_404_STABLE 2025-01-06 13:14:56 +08:00
Huong Nguyen 7bf1f87415 weekly release 4.4.5+ 2025-01-03 13:54:12 +07:00
Huong Nguyen 10a6d148fd Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2025-01-03 13:54:09 +07:00
Khoa Nguyen 246d1fcd32 MDL-83832 core_question: Links to question history may show blank page 2025-01-03 13:50:05 +07:00
AMOS bot d688c34fba Automatically generated installer lang files 2025-01-01 00:07:52 +00:00
Leon Stringer 3b6e1ac581 MDL-77185 session: Fix undefined disk_free_space
Fix PHP fatal error "Call to undefined function
core\session\disk_free_space()" when disable_functions=disk_free_space.
Prior to PHP 8.0 this error was suppressed by '@'.

Co-authored-by: Federico Alvarez <32086536+fedealvz@users.noreply.github.com>
2024-12-31 15:32:47 +00:00
Huong Nguyen ffe2149889 Merge branch 'MDL-66129-404' of https://github.com/rhell4/moodle into MOODLE_404_STABLE 2024-12-30 09:41:11 +07:00
AMOS bot 417d9cd5f5 Automatically generated installer lang files 2024-12-25 00:23:03 +00:00
Huong Nguyen 8ba245a89d Merge branch 'MDL-83159-404' of https://github.com/lucaboesch/moodle into MOODLE_404_STABLE 2024-12-24 09:42:38 +07:00
Huong Nguyen 9da4a23e14 Merge branch 'MDL-83988-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2024-12-24 09:29:52 +07:00
Shamim Rezaie 1fe2dcfbc5 Merge branch 'MDL-83005-404' of https://github.com/davewoloszyn/moodle into MOODLE_404_STABLE 2024-12-23 06:03:11 +11:00
AMOS bot 41e480dd05 Automatically generated installer lang files 2024-12-22 00:08:05 +00:00
AMOS bot a73e9f5af7 Automatically generated installer lang files 2024-12-21 00:07:37 +00:00
Luca Bösch 84cf584796 MDL-83159 mod_quiz: Use format_string for course and quiz name. 2024-12-20 13:41:19 +01:00
AMOS bot 232ae785db Automatically generated installer lang files 2024-12-20 00:07:42 +00:00
Jun Pataleta a9f2dd8d4a weekly release 4.4.5+ 2024-12-19 20:08:18 +08:00
Jun Pataleta 29e6c7b58a Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2024-12-19 20:08:16 +08:00
djarrancotleanu 15e14140ef MDL-83753 cachestore_redis: Allow for configurable connection timeout 2024-12-19 14:23:59 +10:00
djarrancotleanu 5add10950f MDL-83753 redis: Allow for configurable max retries setting 2024-12-19 14:23:54 +10:00
Huong Nguyen 10f47d3811 Merge branch 'MDL-83940-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-12-19 10:40:47 +07:00
Huong Nguyen dbf7ee97d0 Merge branch 'MDL-82697-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-12-19 10:21:36 +07:00
Andrew Nicols c61f7e4459 Merge branch 'MDL-63802-404' of https://github.com/lucaboesch/moodle into MOODLE_404_STABLE 2024-12-19 09:20:06 +08:00
djarrancotleanu 48aca139b3 MDL-83753 redis: Set connection and read timeouts to configurable value 2024-12-19 10:33:26 +10:00
Jun Pataleta f30e39a586 Merge branch 'MDL-84026-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2024-12-18 13:24:26 +08:00
Jun Pataleta 00adbc39f1 Merge branch '79121-normalize-proxy-bypass-404' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_404_STABLE 2024-12-18 10:56:08 +08:00
Andrew Nicols cb755080ef MDL-84026 core: Update GitHub Funding to point to fund.moodle.org 2024-12-18 10:45:57 +08:00
Huong Nguyen 29076b3859 Merge branch 'MDL-84000-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-12-18 09:05:02 +07:00
Sara Arjona 276c7160a4 Merge branch 'MDL-83807-404' of https://github.com/clransom/moodle into MOODLE_404_STABLE 2024-12-17 17:06:33 +01:00
Sara Arjona d490c2b988 Merge branch 'MDL-81952-404' of https://github.com/srobotta/moodle into MOODLE_404_STABLE 2024-12-17 13:01:32 +01:00
Jun Pataleta 2e98e0f101 Merge branch 'MDL-83377-404' of https://github.com/sh-csg/moodle into MOODLE_404_STABLE 2024-12-17 19:54:09 +08:00
Jun Pataleta 1334a9ef95 Merge branch 'MDL-83593_404' of https://github.com/lostrogit/moodle into MOODLE_404_STABLE 2024-12-17 19:32:59 +08:00
Carlos Castillo 9bfe24cc87 MDL-83593 theme_boost: Fix navbar site logo link 2024-12-17 11:21:43 +01:00
Sara Arjona 18fcb17067 Merge branch 'MDL-83696-404' of https://github.com/andelacruz/moodle into MOODLE_404_STABLE 2024-12-17 07:41:57 +01:00
Angelia Dela Cruz b55d4c68d7 MDL-83696 core_tag: Added behat for book chapter and glossary entry tags 2024-12-17 10:08:48 +08:00
Paul Holden e93e62f241 MDL-83183 mod_bigbluebuttonbn: consistent order in activity index. 2024-12-16 21:02:31 +00:00
hieuvu a86b1088b3 MDL-82273 core_question: Fix behat failed 2024-12-16 18:50:45 +01:00
Julien Boulen fde3b64046 MDL-79121 lib: Improve the dataset for is_proxybypass_provider() 2024-12-16 15:55:58 +01:00
Julien Boulen 945a1404b0 MDL-79121 lib: Normalize proxybypass value
This changes prevent the admin to define an incorrect proxybypass value.

Dropped out formats in MDL-74289 are now fixed automatically.
e.g.: "192.168." becomes "192.168.0.0/16" and ".domain.tld" becomes "*.domain.tld".
2024-12-16 15:54:52 +01:00
Stefan Hanauska 6586175de0 MDL-83377 repository_local: Missing options for searching 2024-12-16 06:26:54 +01:00
Huong Nguyen aa14fb7444 Merge branch 'MDL-79268-404' of https://github.com/danghieu1407/moodle into MOODLE_404_STABLE 2024-12-16 10:56:06 +07:00
Huong Nguyen 088fa6b3ef Merge branch 'MDL-82273-404' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_404_STABLE 2024-12-16 10:02:17 +07:00
Huong Nguyen e30c70a93d Merge branch 'MDL-75075-404' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_404_STABLE 2024-12-16 09:52:08 +07:00
Huong Nguyen 252eceba0b Merge branch 'MDL-83493-404' of https://github.com/roland04/moodle into MOODLE_404_STABLE 2024-12-16 09:00:22 +07:00
AMOS bot 3e666415b7 Automatically generated installer lang files 2024-12-15 00:08:21 +00:00
Stephan Robotta daffe8b826 MDL-81952 questions: Fix warning in export of multitype 2024-12-14 13:06:37 +01:00
Paul Holden a0f26a114f MDL-84000 reportbuilder: move testcase helper to autoloaded namespace.
Clean up some class imports while we're at it.
2024-12-13 10:16:29 +00:00
Luca Bösch 0ed18ff37c MDL-63802 theme_classic: ARIA label in nav for secure layout 2024-12-13 08:21:15 +01:00
danghieu1407 de73df3764 MDL-79268 questions: Show version numbers in delete confirmation 2024-12-13 13:32:20 +07:00
Huong Nguyen ce0193fcde weekly release 4.4.5+ 2024-12-13 08:58:27 +07:00
Huong Nguyen 03d10e4c8f Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2024-12-13 08:58:24 +07:00
hieuvu b3586c31bd MDL-82273 core_question: get correct category for question bank view 2024-12-12 13:22:45 +07:00
Paul Holden 7cdb3538eb MDL-82697 courseformat: fix exception arguments for section limit.
Co-authored-by: James C <5689414+james-cnz@users.noreply.github.com>
2024-12-11 17:47:02 +00:00
Andrew Nicols b9fe6d942f MDL-83988 core: Hide common machine-read files 2024-12-11 23:35:45 +08:00
Katie Ransom 408383f20d MDL-83807 files: Make file_get_all_files_in_draftarea return zip files 2024-12-11 14:11:57 +00:00
Amaia Anabitarte e10420df88 MDL-83807 h5p: Return a default valid H5P 2024-12-11 14:11:57 +00:00
Jun Pataleta cb472bf77c Merge branch 'MDL-81520-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2024-12-11 13:41:28 +08:00
Andrew Nicols 5b03e6e38c MDL-81520 mod_assign: Update tests to not extend assign_provider test 2024-12-11 12:30:22 +08:00
Andrew Nicols 55126be4ad MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
AMOS bot 8f563111dd Automatically generated installer lang files 2024-12-11 00:07:45 +00:00
Khoa Nguyen f21b4d5b25 MDL-75075 quiz: Show question tags as non-links to avoid errors 2024-12-10 13:52:35 +07:00
Khoa Nguyen 0516293b0c MDL-75075 core_tag: Add an option to render tag lists without links 2024-12-10 13:52:02 +07:00
Huong Nguyen f50e51b625 Merge branch 'MDL-81115_404' of https://github.com/cwarwicker/moodle into MOODLE_404_STABLE 2024-12-10 09:18:30 +07:00
AMOS bot e6dff5b8b7 Automatically generated installer lang files 2024-12-10 00:07:46 +00:00
Sara Arjona befe9e31fb Merge branch 'MDL-75750-404' of https://github.com/aanabit/moodle into MOODLE_404_STABLE 2024-12-09 16:18:51 +01:00
Sara Arjona 43c9b69f16 Merge branch 'MDL-81841-404' of https://github.com/laurentdavid/moodle into MOODLE_404_STABLE 2024-12-09 16:16:36 +01:00
Frederik Milling Pytlick 0d8b41f727 MDL-82440 assignfeedback_editpdf: Force ghostscript pdf's to pdf v1.4 2024-12-09 15:46:28 +01:00
Laurent David a9ba677492 MDL-81841 mod_data: Add spacing bottom of preset page
* The action menu is going under the sticky footer on
the preset page. Adding more space helps to display the
entire menu instead of cutting it off.
2024-12-09 08:14:22 +01:00
Huong Nguyen 520707ef71 MDL-83341 repository_onedrive: Fix download and create controlled link
Onedrive direct download URL does not accept authorization headers,
it will just return the `unauthenticated` content with 401 HTTP Code

We switched to a safer way. We fetch the item information and use
a new curl instance (without authorization headers)
to fetch the content via direct download URL
2024-12-09 09:30:18 +07:00
James C ee87a1bcac MDL-83306 book: Book section return fix 2024-12-09 10:18:08 +13:00
AMOS bot de7c6f24d6 Automatically generated installer lang files 2024-12-08 00:08:02 +00:00
Conn Warwicker 1404ae7ed4 MDL-81115 question: Question bank tag filter to use all available tags.
This makes the tags which are available to the user on the question
bank tag filter, use tags from all available contexts, not just
that course. This means they can filter by tags assigned to system
questions as well, for example.
2024-12-06 14:16:40 +00:00
Paul Holden d1834b1fdf MDL-83940 comment: fix collapse/loading icons in comment container. 2024-12-06 10:53:38 +00:00
Huong Nguyen 02e8cebdd2 Moodle release 4.4.5 2024-12-06 13:13:12 +07:00
Huong Nguyen 024051b719 weekly release 4.4.4+ 2024-12-05 22:32:58 +07:00
Sara Arjona 6423996066 Merge branch 'MDL-75610-404' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2024-12-05 16:13:21 +01:00
Jun Pataleta 490e544204 MDL-75610 core: Revert the addition of .upgradenotes
Upgrade notes generated by the `upgradenotes` tool is only available
from Moodle 4.5. For 4.4 and below, we should still update the
appropriate upgrade.txt file.
2024-12-05 21:34:05 +08:00
Huong Nguyen 62395a5aca MDL-83921 competency: Update unit tests with latest changes 2024-12-05 18:37:08 +08:00
Huong Nguyen 41ed00e59a MDL-82379 core_user: Move email change token to user private access key 2024-12-05 13:38:21 +08:00
Huong Nguyen ba74b9be02 Merge branch 'MDL-83606-404' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_404_STABLE 2024-12-05 12:10:07 +07:00
Jun Pataleta 16f8d04930 Merge branch 'MDL-83727-404' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_404_STABLE 2024-12-05 12:36:00 +08:00
Huong Nguyen b389ec0b8b Merge branch 'MDL-83641-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-12-05 11:29:30 +07:00
Huong Nguyen 1c8ac6a361 MDL-83921 competency: Bump version 2024-12-05 11:21:32 +07:00
Michael Hawkins c748e7d7e9 MDL-83921 competency: Match web service capability check with page check 2024-12-05 11:21:23 +07:00
Jun Pataleta fcff77046d Merge branch 'MDL-83823-404-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_404_STABLE 2024-12-05 11:48:39 +08:00
Huong Nguyen d01b671f2d Merge branch 'MDL-83584-m404' of https://github.com/sammarshallou/moodle into MOODLE_404_STABLE 2024-12-05 10:13:00 +07:00
Huong Nguyen 2d35e0a180 Merge branch 'MDL-83223-404' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2024-12-05 10:08:58 +07:00
Huong Nguyen a8b11d8923 MDL-82963 Tag: Improve validation for users tagged with sepecified tag 2024-12-05 11:03:13 +08:00
Jun Pataleta 6cc0eabc7e Merge branch 'MDL-83844-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-12-05 10:35:36 +08:00
Jun Pataleta 4a1811b769 Merge branch 'MDL-83710-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-12-05 09:55:13 +08:00
Helen Foster ffabf0b4b9 MDL-83823 lang: Import fixed English strings (en_fix) 2024-12-04 20:26:09 +01:00
David Woloszyn 43410fa170 MDL-83005 tool_usertours: Fixed animating scroll on Boost tours 2024-12-04 16:14:19 +11:00
David Woloszyn 9f3398261c MDL-83005 tool_usertours: Correct user tour highlighting bugs
This way of highlighting user tour content removes the need to
juggle z-index. It also resolves the problem of cloning the target
element into a separate container and breaking styling.
2024-12-04 16:14:19 +11:00
meirzamoodle 5e078e4a78 MDL-83223 core: Use capture with addEventListener to intercept events
The issue is that Bootstrap’s dropdown component likely stops
event propagation after the first click to manage its own
dropdown behavior. This prevents your click event handler from
running on subsequent clicks.

To fix this, we can handle the event before Bootstrap’s code stops
the propagation by using capture option with addEventListener.
2024-12-04 10:37:02 +07:00
Laurent David 77c39c40e3 MDL-82757 mod_data: Improve group access handling
* Improved handling of group access to ensure correct visibility of records.
2024-12-04 02:51:26 +00:00
Jun Pataleta 8ec9af05b5 MDL-61316 core: Fix session gc unit tests 2024-12-04 02:51:26 +00:00
meirzamoodle 0ecdb05ab9 MDL-61316 core: Removed 5x multiplier from guest session expiration 2024-12-04 02:51:26 +00:00
Mark Johnson 54bc7d8197 MDL-83357 question: Fix filter cleaning in page links 2024-12-04 02:51:26 +00:00
Mark Johnson ea3848abe8 MDL-83357 question: Additional cleaning of filter params 2024-12-04 02:51:26 +00:00
Huong Nguyen 5f0201bd79 Merge branch 'MDL-82946-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-12-04 09:39:43 +07:00
Angelia Dela Cruz 363941c247 MDL-82946 qbank: Behat coverage for questions bulk actions 2024-12-03 10:36:29 +08:00
Huong Nguyen 60e0905018 Merge branch 'MDL-83128-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-12-03 09:32:43 +07:00
raortegar 77f7082c03 MDL-83835 lib: PEAR - passing null to str functions is deprecated 2024-12-02 13:13:01 +01:00
Paul Holden 987b7ef10d MDL-83641 cohort: allow 'includes' option be specified in form element. 2024-12-02 10:58:50 +00:00
Paul Holden fdb5d897de MDL-83844 mod_scorm: avoid SQL reserved words retrieving SCO timing. 2024-12-02 10:47:47 +00:00
Jun Pataleta 02d5efc450 Merge branch 'MDL-83648_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2024-12-02 17:24:32 +08:00
Huong Nguyen 4b2a950d08 Merge branch 'MDL-83711-404' of https://github.com/lucaboesch/moodle into MOODLE_404_STABLE 2024-12-02 14:19:46 +07:00
Shamim Rezaie 899b4fa1f4 Merge branch 'MDL-75610_404_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_404_STABLE 2024-12-02 15:24:44 +11:00
Huong Nguyen 9ce7e40f2e Merge branch 'MDL-83778-404' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_404_STABLE 2024-12-02 10:44:38 +07:00
Huong Nguyen 84459c1ebf Merge branch 'MDL-83670-m404' of https://github.com/sammarshallou/moodle into MOODLE_404_STABLE 2024-12-02 10:31:06 +07:00
Huong Nguyen 495654b92b Merge branch 'MDL-82657_404_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_404_STABLE 2024-12-02 10:17:49 +07:00
Tim Hunt 6535a96989 MDL-83648 javascript dialogues: fix responsive behaviour
visibilityChanged in the dialogue base class does important things.
Therefore if ajaxException and exception also want to do something
else in response to the visibleChange event, it should use a
different method name, rather than a name that collides with the
base class method.
2024-11-29 17:05:14 +00:00
Luca Bösch 8628fc8664 MDL-83711 quiz: Quiz navigation profile pic not linking in secure mode 2024-11-29 14:25:49 +01:00
Sara Arjona 7da8af1006 weekly release 4.4.4+ 2024-11-29 12:37:03 +01:00
Khoa Nguyen 4bce55d783 MDL-83727 question: Core question privacy provider misuses lazy-loading 2024-11-29 10:55:39 +07:00
Khoa Nguyen e9cfb0ad02 MDL-83778 quiz: prevent page caching for quiz view page 2024-11-28 16:42:46 +07:00
Jun Pataleta 73a35edc24 MDL-83470 environment: Put back Oracle support for now
Even though Oracle support is planned to be dropped for 5.0, the
actual issue that drops it (MDL-83172) has not yet landed. So, it's
better to keep this in environment.xml for now and defer its removal
from environment.xml in MDL-83172.
2024-11-28 16:05:59 +07:00
Jun Pataleta 83c6906e75 Merge branch 'MDL-82475-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-11-28 13:19:08 +08:00
Huong Nguyen 3637e3db9f Merge branch 'MDL-83776-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-11-28 12:00:31 +07:00
Jun Pataleta 30d8c900a9 Merge branch 'MDL-83759-404' of https://github.com/roland04/moodle into MOODLE_404_STABLE 2024-11-28 12:28:54 +08:00
Jun Pataleta 1d5e6e4e5d Merge branch 'MDL-83412-404' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2024-11-28 12:12:08 +08:00
Huong Nguyen 276c40500c Merge branch 'MDL-83470-404' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2024-11-28 11:03:57 +07:00
Jun Pataleta e7556aa106 MDL-83412 core: Coding style fixes 2024-11-28 11:55:26 +08:00
Andrew Nicols 68c96a97b9 MDL-83412 calendartype_gregorian: Use core_date
Update timestamp_to_date_string to use core_date.
2024-11-28 11:55:25 +08:00
Andrew Nicols 213b37077c MDL-83412 core: Use LLL/LLLL for standalone Month names
We currently use MMM and MMMM which mean 'month in year', however in
some locales this is context-specific and should only be used in
conjunction with a day, for example "10 October 2024".

LLL and LLLL are for "stand-alone on the in year" and should be used
when a month is used without a day.
2024-11-28 11:55:25 +08:00
Huong Nguyen e75b7d1e0d Merge branch 'MDL-63264-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-11-28 10:46:58 +07:00
Huong Nguyen 7a77eb18c3 Merge branch 'MDL-83653_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2024-11-28 10:21:43 +07:00
Huong Nguyen 5d5d2f8f49 Merge branch 'MDL-82931-MOODLE_404_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_404_STABLE 2024-11-28 09:44:27 +07:00
Huong Nguyen da00d28c2c Merge branch 'MDL-83661-404' of https://github.com/ferranrecio/moodle into MOODLE_404_STABLE 2024-11-28 09:39:16 +07:00
Huong Nguyen e778888ed2 Merge branch 'MDL-82932-MOODLE_404_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_404_STABLE 2024-11-28 09:28:29 +07:00
Huong Nguyen b058b6681c Merge branch 'MDL-83643-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-11-28 09:21:16 +07:00
Jun Pataleta e2928d531e Merge branch 'MDL-83211-m404' of https://github.com/sammarshallou/moodle into MOODLE_404_STABLE 2024-11-27 23:28:46 +08:00
Jun Pataleta c3184e070a Merge branch 'MDL-83788-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2024-11-27 16:19:30 +08:00
Huong Nguyen cd7f36d194 Merge branch 'MDL-83658-MOODLE_404_STABLE' of https://github.com/praxisdigital/moodle into MOODLE_404_STABLE 2024-11-27 09:51:28 +07:00
Andrew Nicols 6f97d3a89f MDL-83788 mod_glossary: Correct assertions for assertArrayHasKey 2024-11-27 13:26:01 +11:00
Mark Johnson 4da7e5dec3 MDL-82657 qbank_managecategories: Check "includesubcategories" on reload
The "includesubcategories" parameter is passed in the URL as lowercase,
but the Javascript was looking for "includeSubcategories" in camel case.
This meant it was always being set as false (unchecked) even when the
URL said it was true.

This fixes the casing in the Javascript, and adds a behat test to
confirm the fix.
2024-11-26 13:29:02 +00:00
Shamim Rezaie 35b9ad6bbf Merge branch 'MDL-77957-404-test2' of https://github.com/rezaies/moodle into MOODLE_404_STABLE 2024-11-26 20:59:43 +11:00
Bastian Schmidt-Kuhl af68f3ca28 MDL-77957 theme_boost: Fix drawer not closing on mobile if it has focus 2024-11-26 20:52:17 +11:00
Huong Nguyen ecf91e296e Merge branch 'mdl-82762_404_wip' of https://github.com/james-cnz/moodle into MOODLE_404_STABLE 2024-11-26 12:10:51 +07:00
Huong Nguyen ef09179d1e Merge branch 'MDL-83795-404' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2024-11-26 12:03:22 +07:00
Khoa Nguyen 1ab37f0e63 MDL-83606 Question bank: Delete questions to fit one page causes errors. 2024-11-26 11:17:49 +07:00
Mikel Martín 286c3367c2 MDL-83759 theme_boost: Fix user navigation items height 2024-11-25 12:05:32 +01:00
Paul Holden 493e23ae12 MDL-83630 theme_boost: vertically align submenu navigation icon. 2024-11-25 09:49:38 +00:00
Huong Nguyen d514c32c71 Merge branch 'MDL-83704-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2024-11-25 10:15:52 +07:00
Paul Holden 1d192cf19d MDL-83128 blocks: consistently style/align block list icons. 2024-11-22 16:22:06 +00:00
Paul Holden d805dde928 MDL-63264 enrol: retrieve additional welcome message contact data.
The `maildisplay` field is required to determine from whom to send
the welcome message.

Co-authored-by: Zak Risha <zjrisha@gmail.com>
2024-11-22 16:17:50 +00:00
Jun Pataleta 86e2e5882e MDL-83795 courseformat: Move upgrade notes to upgrade.txt 2024-11-22 23:53:34 +08:00
Jun Pataleta 505987af6c weekly release 4.4.4+ 2024-11-22 22:26:55 +08:00
Paul Holden 558b5aa693 MDL-83776 customfield_text: correct link field URL encoding. 2024-11-21 09:53:49 +00:00
Jun Pataleta 888a4f23bb MDL-83470 core: Define environment requirements for Moodle 5.0 2024-11-21 17:35:23 +08:00
Andrew Nicols e871b6fc71 Merge branch 'MDL-83551-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-11-21 12:26:12 +08:00
Huong Nguyen d032d75641 Merge branch 'MDL-83747-404' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2024-11-21 11:08:56 +07:00
Huong Nguyen 43a90e8197 Merge branch 'MDL-83048_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2024-11-21 11:01:48 +07:00
Andrew Nicols 25657e4be2 Merge branch 'MDL-83501-url-encode-nginx-paths-MOODLE_404_STABLE' of https://github.com/rajandangi/moodle into MOODLE_404_STABLE 2024-11-21 11:48:31 +08:00
Andrew Nicols 2f27619ffe Merge branch 'MDL-83226-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-11-21 11:45:11 +08:00
Philipp Memmel 80a77e7c74 MDL-82931 mod_data: Harden parsing of content format 2024-11-20 21:23:06 +01:00
Amaia Anabitarte acfa4c5a07 MDL-75750 theme: Round login frame in small viewport 2024-11-20 16:16:57 +01:00
Paul Holden 761f169185 Merge branch 'MDL-83570-404-fix' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2024-11-20 12:25:07 +00:00
Jun Pataleta a3b50194ee MDL-83570 tiny_recordrtc: Use the correct upgrade_plugin_savepoint()
And move the release upgrade line comment before the upgrade step.
2024-11-20 18:17:17 +08:00
Huong Nguyen 752b45d421 Merge branch 'MDL-83570-404' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2024-11-20 16:11:35 +07:00
Frederik Milling Pytlick 7d3a4aa37d MDL-83658 core: Fix reactive debug tool logging
Fixed issue where the reactive debug panel does not log a transaction,
if the events fired are exactly the same as the previous ones.
2024-11-20 08:16:33 +01:00
meirzamoodle 55fb142c2f MDL-83570 tiny_recordrtc: Turn the audio bitrate input to Select field
The current code may have a bug. If users set the audio bit rate to
a non-supported value, such as 1000,
Firefox will display an error in the console,
while Chrome will create the recorded audio file successfully,
but it will have no sound. I tested this on Ubuntu 24.04.

The minimum bit rate threshold varies depending on the audio format.
During my tests with Firefox version 131.0.3, which uses
the audio/Ogg format, I found that the minimum supported value
is 24000. In Chrome 129.0.6668.70, which uses the audio/MP4 format,
the minimum supported value is 2400.

Due to these differences, I decided to change the input from
a text field to a select field, offering options that support both
Ogg and MP4 audio formats.

The database conversion for the old value has been provided in
the lib/db/upgrade.php. The script will find the closest match to
the current data and update it accordingly.
2024-11-20 10:08:10 +07:00
Mikel Martín de05373739 MDL-83493 theme_boost: Fix popover triggering
Popovers were not being closed when clicking elsewhere resulting in
multiple popovers open at the same time that cannot be closed. That
was happening because the trigger for popovers was set to "focus" and
"click" at the same time. This patch removes the "click" as trigger.
Also, adds the click event listener to show the popover and avoid the
problem described in MDL-82570, that caused this regression.
2024-11-19 15:25:28 +01:00
Jun Pataleta d4a98e6cfb Merge branch 'MDL-81521-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2024-11-19 15:15:25 +08:00
Huong Nguyen 97b1dd2f2f Merge branch 'MDL-83610-404' of https://github.com/marinaglancy/moodle into MOODLE_404_STABLE 2024-11-19 09:28:58 +07:00
Jun Pataleta 626ea71299 MDL-83747 mod_data: Add accessible name for delcheck checkboxes 2024-11-18 19:39:13 +08:00
Marina Glancy 98975c118e MDL-83610 behat: allow to set date fields in groups 2024-11-18 10:37:17 +00:00
Jun Pataleta 90409e8fa0 Merge branch 'MDL-83502-404' of https://github.com/ferranrecio/moodle into MOODLE_404_STABLE 2024-11-18 14:37:06 +08:00
Andrew Nicols d7898ee7da MDL-81521 mod_quiz: Fix attempt walkthrough tests 2024-11-18 10:24:55 +08:00
Andrew Nicols c6942c9bb7 MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-18 10:24:55 +08:00
sam marshall 38688c0be6 MDL-83211 core_search: Indexing can miss items due to race condition
Changes search indexing so that (except for test scripts) each indexing
run indexes only items up to 5 seconds ago, and the following indexing
will start from the same point. This ensures all items are indexed,
even if an item is written to the database one or two seconds after its
timecreated value.
2024-11-15 09:34:44 +00:00
Mark Johnson a88cbdae73 MDL-75610 theme: Allow the activity title in Boost theme's secure layout 2024-11-15 08:32:57 +00:00
Mark Johnson ec498ce036 MDL-75610 output: Fix title display logic in activity header
The display logic for including the title in the activity header was
such that the title would only display if both the theme default and the
layout option for 'notitle' were undefined or false. It was not possible
to a theme to have 'notitle' default to true, but have a layout override
that as false to display the title.

This change re-writes the is_title_allowed method to encapsulte the new
logic, first checking if the current layout has the option set and using
that, and if not falling back to the theme default if that is set. If
neither is set, the title is displayed.

This also tweaks moodle_page::magic_get_layout_options to ensure the
theme is initialised before trying to return the layout options.
2024-11-15 08:32:56 +00:00
Jun Pataleta 5f85ba1793 Merge branch 'MDL-82877-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-11-15 13:31:31 +08:00
Huong Nguyen 63205f03bb weekly release 4.4.4+ 2024-11-15 09:21:36 +07:00
Jun Pataleta b820c1c5c3 Merge branch 'MDL-80926-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-11-14 12:05:17 +08:00
Jun Pataleta 482d0cc1dc Merge branch 'MDL-74836_404_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_404_STABLE 2024-11-14 10:46:12 +08:00
Paul Holden 195a4ce781 MDL-83710 report_questioninstances: fix missing type query params. 2024-11-13 21:16:05 +00:00
James C 785d70c2d7 MDL-82762 course: Prevent "undefined" being added to course index 2024-11-14 10:14:17 +13:00
Wiktor Wandachowicz ab25803907 MDL-83048 mod_quiz: Fixed use of grade_out_of and plugin renderer 2024-11-13 17:14:03 +00:00
Huong Nguyen 1a88833799 Merge branch 'MDL-83185-404' of https://github.com/laurentdavid/moodle into MOODLE_404_STABLE 2024-11-13 14:27:46 +07:00
Huong Nguyen 8e6355fc8c Merge branch 'MDL-80689_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2024-11-13 14:01:03 +07:00
Andrew Nicols 00fc817923 MDL-83704 core: Stop loading subplugins files to uninstall
The list of subplugin types was loaded from the json/php subplugins
file, but then the actual list of subplugins was loaded from the cache
in the component, rendering any benefit of using the source json/php as
pointless.
2024-11-13 10:26:21 +08:00
Andrew Nicols c8f0796ca6 MDL-83704 core: Stop loading subplugins files to fetch caps
This information is heavily cached in the component class. This should
be used wherever possible rather than checking on disk.
2024-11-13 10:17:32 +08:00
Simey Lameze afe848bcc6 MDL-83643 behat: make manual completion scenario names unique 2024-11-13 07:18:01 +08:00
Simey Lameze 89e18f1381 MDL-83551 behat: make duplicated scenario names unique 2024-11-13 06:50:56 +08:00
Nexterday 200fb340e6 MDL-74836 theme: Display activity header on secure layouts 2024-11-11 15:15:54 +00:00
Philipp Memmel 364c27227a MDL-82932 mod_data: Fix export with userdata of deleted users 2024-11-11 12:38:54 +01:00
Tim Hunt a70bbb3628 MDL-83653 file manager: report ajax errors
This is for things like when you click on a file, and then click on
the delete button, and an error happens then. Previously that was
ignored.
2024-11-08 17:14:41 +00:00
sam marshall 5bbe044927 MDL-83670 availability_group: With hidden groups, can throw warning 2024-11-08 11:59:00 +00:00
ferran a85c93018a MDL-83661 core_courseformat: fix drop file modal
When the user drags and drops a file into a course section that can
create more than one type of activity (for example a zip file) the modal
had repeated form elements ids. Now every radio option has its own id.
2024-11-08 11:45:58 +01:00
Rossco Hellmans 78be42a88e MDL-66129 course_module: include lib.php before calling _refresh_events
Before checking for and calling the module _refresh_events function in
course_module_calendar_event_update_process, the module lib.php file
needs to be included if it has not been already.
2024-11-08 18:41:32 +10:00
Huong Nguyen 3f9b9363d0 weekly release 4.4.4+ 2024-11-08 13:56:42 +07:00
Huong Nguyen 805ff1806a MDL-82335 qbank_columnsortorder: Fix upgrade code coding style 2024-11-08 09:04:55 +07:00
sam marshall 6ba656e2f5 MDL-83584 report_log: Group filter can get list of all users in system 2024-11-07 09:39:46 +00:00
Huong Nguyen 91d352a085 MDL-82335 qbank_columnsortorder: Cleanup upgrade code 2024-11-07 13:40:01 +07:00
Huong Nguyen 27073a36b6 Merge branch 'MDL-83619-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-11-07 11:05:52 +07:00
Huong Nguyen e1b6c9be56 Merge branch 'MDL-83611-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-11-07 11:02:35 +07:00
Huong Nguyen fee929cdaf Merge branch 'MDL-82335_404' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_404_STABLE 2024-11-07 09:31:58 +07:00
Huong Nguyen a3a1e2184d Merge branch 'MDL-83316-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-11-07 09:27:04 +07:00
Simey Lameze 2245a4c0bc MDL-83316 behat: remove duplicated Then from new test 2024-11-07 07:49:12 +08:00
sam marshall 803f72ef0f MDL-83316 Behat: New step allows system clock change 2024-11-07 07:48:02 +08:00
Jun Pataleta 5ad4c9cf3b Merge branch 'mdl-83497_404' of https://github.com/james-cnz/moodle into MOODLE_404_STABLE 2024-11-06 22:38:45 +08:00
Anupama Sarjoshi 21fc25e46c MDL-82335 qbank_columnsortorder: Fix upgrading issue
When upgraded to Moodle 4.4 or higher, for qbank_columnsortorder
the colsize values in the config_plugins were getting incorrectly set,
resulting in errors accessing the question bank. Changes done to fix
this code and to remove the corrupted colsize value from
config_plugins table.
2024-11-06 13:31:02 +00:00
Jun Pataleta 962d7cfa55 Merge branch 'MDL-76563-404' of https://github.com/roland04/moodle into MOODLE_404_STABLE 2024-11-06 17:29:34 +08:00
Simey Lameze 37319d2c88 MDL-80926 behat: fix random and improve h5p completion test 2024-11-06 13:37:05 +08:00
Simey Lameze be5b800a80 MDL-83611 behat: increase window size to avoid randoms 2024-11-05 13:21:33 +08:00
Simey Lameze c3bc783ff4 MDL-83619 behat: enable bbb module early in the test 2024-11-05 10:23:34 +08:00
Paul Holden 58c98e14d9 MDL-82877 customfield: pass correct instanceid for restore structure. 2024-11-04 15:32:14 +00:00
Paul Holden ad201ba85a MDL-83226 customfield: set backup/restore configuration defaults. 2024-11-04 15:29:17 +00:00
Laurent David 3203fb9ae7 MDL-83185 core_courseformat: Refresh cache on group change
* When we add users to a group (or remove them), we should refresh
the course index cache so it stays in sync with what the user
can actually see.
2024-11-04 06:15:25 +01:00
ferran 84c2589c42 MDL-83185 core_courseformat: Allow global state cache invalidation 2024-11-04 06:15:25 +01:00
Huong Nguyen 99b5729824 weekly release 4.4.4+ 2024-11-01 14:29:24 +07:00
Huong Nguyen 3134bf772a Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2024-11-01 14:29:22 +07:00
Tim Hunt db03f2a58e MDL-80689 filepicker: better reporting of incorrect file type
Before this change, file type errors were reported like system errors. Now,
they are reported in a plain dialoue, which is more like how it works for
drag-drop upload.

Also, before this, after an upload errors, you were left with a blank
filepicker dialogue. Now, the upload form is redisplayed.
2024-10-31 11:39:16 +00:00
Tim Hunt 78cbc7cb16 MDL-80689 behat: add a transformation to get dirroot 2024-10-31 11:39:15 +00:00
Tim Hunt b784c144f8 MDL-80689 form behat: move fixture file to the expected place 2024-10-31 11:39:15 +00:00
Huong Nguyen 94ab19f544 Merge branch 'MDL-82911-404-fix' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-10-31 14:14:46 +07:00
Simey Lameze 438ef558cf MDL-82911 behat: change future times example to minutes 2024-10-31 14:15:48 +08:00
Huong Nguyen 16c1a0494c Merge branch 'MDL-82911-404' of https://github.com/andelacruz/moodle into MOODLE_404_STABLE 2024-10-31 11:23:00 +07:00
Huong Nguyen 9b0b39065c Merge branch 'MDL-83414-404' of https://github.com/lameze/moodle into MOODLE_404_STABLE 2024-10-31 11:23:00 +07:00
Huong Nguyen 8b0afe2984 Merge branch 'MDL-82989-404' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2024-10-31 11:22:59 +07:00
Jun Pataleta 6fa7222f0f Merge branch 'MDL-82809-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-10-31 11:22:59 +07:00
Huong Nguyen f616472d63 Merge branch 'MDL-82988-404' of https://github.com/meirzamoodle/moodle into MOODLE_404_STABLE 2024-10-31 11:22:59 +07:00
Angelia Dela Cruz cc33999469 MDL-83414 core_grades: Behat to test custom scale display 2024-10-31 09:46:39 +08:00
Angelia Dela Cruz 4736294b35 MDL-82911 mod_bigbluebuttonbn: Behat for BBB open and close date time 2024-10-29 12:09:41 +08:00
AMOS bot cc86aa7f8d Automatically generated installer lang files 2024-10-29 00:07:50 +00:00
meirzamoodle 2f5145d704 MDL-82989 communication_matrix: Apply helper to mock http_client 2024-10-27 15:55:05 +07:00
Andrew Nicols e62acd23e0 MDL-82989 PHPUnit: Add helper to mock http_client 2024-10-27 15:55:05 +07:00
meirzamoodle 5bd5d08f7e MDL-82988 general: Apply helper to get path to fixture 2024-10-27 15:45:19 +07:00
Andrew Nicols 7bec161984 MDL-82988 PHPUnit: Add helper to get path to fixture 2024-10-27 15:45:19 +07:00
Huong Nguyen f960ce6d5b weekly release 4.4.4+ 2024-10-25 08:36:04 +07:00
Huong Nguyen 9ade28a977 Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2024-10-25 08:36:01 +07:00
Mikel Martín 93821b6024 MDL-76563 theme: Change SCSS variable value
Change the value of the $pink SCSS colour variable so it is
colour contrast accessible on white backgrounds.
2024-10-24 13:27:57 +02:00
Jun Pataleta 731d5cc8b3 Merge branch 'MDL-82548-404' of https://github.com/roland04/moodle into MOODLE_404_STABLE 2024-10-24 12:18:11 +08:00
Jun Pataleta 2bb85117e3 Merge branch 'MDL-83423-404' of https://github.com/snake/moodle into MOODLE_404_STABLE 2024-10-24 12:13:28 +08:00
Huong Nguyen dced24e7c3 Merge branch 'MDL-83432-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-10-24 10:13:29 +07:00
Huong Nguyen 62d0705cc1 Merge branch 'MDL-83504-404' of https://github.com/marinaglancy/moodle into MOODLE_404_STABLE 2024-10-24 09:45:06 +07:00
AMOS bot 62778bb1aa Automatically generated installer lang files 2024-10-24 00:08:14 +00:00
Jun Pataleta 3d05070094 Merge branch 'MDL-81308-404' of https://github.com/junpataleta/moodle into MOODLE_404_STABLE 2024-10-23 18:15:28 +08:00
Jun Pataleta 7b007b32af Merge branch 'MDL-83463-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-10-23 14:35:39 +08:00
Andrew Nicols 564de9d4a7 MDL-81308 core: Use a helper for consecutive invocation counts 2024-10-23 14:17:37 +08:00
Andrew Nicols da7c5d98ec MDL-81308 core: Update tests to not use withConsecutive 2024-10-23 14:17:36 +08:00
Jun Pataleta ff51c0bbf6 Merge branch 'MDL-83472-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-10-22 15:55:59 +08:00
Marina Glancy 33bc3cd98c MDL-83504 user: reset preference cache in unittests 2024-10-21 16:04:43 +01:00
ferran dd2c9b56bf MDL-83502 course: fix chrome file dropping in course page 2024-10-21 11:40:42 +02:00
rajandangi a3bcf54428 MDL-83501 core: URL encode paths for Nginx X-Accel-Redirect 2024-10-21 19:49:27 +10:30
James C fb6ea9b0d6 MDL-83497 course: Preserve move section dialogue info HTML 2024-10-19 16:19:37 +13:00
Paul Holden 599a3be74f MDL-83432 enrol: fix arguments to enrolment test generator. 2024-10-18 15:12:52 +01:00
Paul Holden 23a60a1220 MDL-83432 enrol_manual: reference correct role in welcome message. 2024-10-18 15:12:52 +01:00
Shamim Rezaie b097840e33 weekly release 4.4.4+ 2024-10-18 23:28:57 +11:00
Shamim Rezaie 04e7c65f0c Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2024-10-18 23:28:55 +11:00
Jun Pataleta 7e3638ff2e Merge branch 'MDL-83457-404' of https://github.com/roland04/moodle into MOODLE_404_STABLE 2024-10-17 12:23:24 +08:00
Jun Pataleta 540fda4055 Merge branch 'MDL-83443-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-10-17 12:17:38 +08:00
Jun Pataleta f44da13380 Merge branch 'MDL-83367-404' of https://github.com/dravek/moodle into MOODLE_404_STABLE 2024-10-17 12:08:52 +08:00
Jun Pataleta c8d55cdc52 Merge branch 'MDL-81450-MOODLE_404_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_404_STABLE 2024-10-17 12:05:10 +08:00
Huong Nguyen d87999b89a Merge branch 'MDL-82580-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-10-17 10:49:26 +07:00
Jun Pataleta 6e617b9e46 Merge branch 'MDL-83143-404' of https://github.com/safatshahin/moodle into MOODLE_404_STABLE 2024-10-17 11:47:16 +08:00
Jun Pataleta 5a237cfef2 Merge branch 'MDL-82838-404' of https://github.com/justusdieckmann/moodle into MOODLE_404_STABLE 2024-10-17 10:54:39 +08:00
Huong Nguyen e05af64ecf Merge branch 'MDL-75724-404_toolbrickfield_tableheadercheck' of https://github.com/brickfield/moodle into MOODLE_404_STABLE 2024-10-17 09:44:43 +07:00
Jun Pataleta 1427cd178c Merge branch 'MDL-83002-404' of https://github.com/marinaglancy/moodle into MOODLE_404_STABLE 2024-10-16 20:32:28 +08:00
Paul Holden 6f6eae5d67 MDL-83472 phpunit: add void return type to test methods.
See also 01148a0816 from MDL-81522.
2024-10-16 13:04:13 +01:00
Paul Holden f442e8d5ad MDL-82809 reportbuilder: always apply conditions to custom report.
Including those that are otherwise unavailable to the current user,
ensuring that they are always applied when viewing report output.
2024-10-16 10:51:52 +01:00
Philipp Memmel 0ccc87c617 MDL-81450 mod_forum: Reduce size of file icon in HTML mails
@Co-authored-by: Mateusz Walczak
2024-10-16 11:32:48 +02:00
Paul Holden 92b27a6f07 MDL-82475 reportbuilder: account for duplicate profile field names.
Long-term, it would be better to not allow this scenario to happen
at all but until then we'll have to work around it (see MDL-73461).
2024-10-16 09:33:22 +01:00
Paul Holden 07bc841860 MDL-82809 reportbuilder: load custom/profile fields consistently.
Ensure that provided columns and filters for each use appropriate
checks to determine their availability (based on user permissions,
etc), rather than conditionally adding them to the entity.
2024-10-16 09:11:20 +01:00
Huong Nguyen 0282a557d0 Merge branch 'MDL-82793-MOODLE_404_STABLE' of https://github.com/phmemmel/moodle into MOODLE_404_STABLE 2024-10-16 09:26:49 +07:00
Philipp Memmel d506b8f6e2 MDL-82793 core: Make modal execute JS from template
Co-authored-by: Huong Nguyen <huongnv13@gmail.com>
2024-10-15 20:52:27 +02:00
Paul Holden 34495e01fc MDL-83463 backup: ensure defaults for course file inclusion are read. 2024-10-15 12:27:17 +01:00
Jun Pataleta cd06961249 Merge branch 'MDL-83070_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2024-10-15 19:09:14 +08:00
Huong Nguyen 7cdc137d8a Merge branch 'MDL-82429-404' of https://github.com/x-iy/moodle into MOODLE_404_STABLE 2024-10-15 16:25:11 +07:00
Mikel Martín 8a6d6ef675 MDL-83457 mod_feedback: Fix get_incomplete_users early return type
Fix 'feedback_get_incomplete_users' early return when there are no users with
the 'mod/feedback:complete' capability from 'false' to an empty array. That
will follow the function signature.
2024-10-15 09:57:06 +02:00
Jun Pataleta b2cf67e4f5 Merge branch 'MDL-83253-404' of https://github.com/andrewnicols/moodle into MOODLE_404_STABLE 2024-10-15 11:44:36 +08:00
Jake Dallimore 62a0b21d27 MDL-83423 mod_lti: fix JWK decoding when multiple keys missing alg
Related to MDL-77077, but was a case missed there. Now, any unusable
keys (i.e. can't be used during the JWT decode), are dropped from the
keyset if they don't have the 'alg' prop, preventing a 'missing alg'
exception during keyset parsing. Since these cannot be used during
decode, these aren't needed anyway.
2024-10-15 09:12:21 +08:00
AMOS bot cee330362c Automatically generated installer lang files 2024-10-15 00:09:32 +00:00
Michael Pound 9e7d54ebe6 MDL-75724 tool_brickfield: Ensuring correct table headers pass checks. 2024-10-14 16:56:52 +00:00
Leon Stringer 9567305f70 MDL-83452 mod_assign: Remove add_body_class
Remove extraneous $PAGE->add_body_class('limitedwidth'), unneeded since
MDL-74031 added a call to this.
2024-10-14 08:44:14 +01:00
AMOS bot b51456d83a Automatically generated installer lang files 2024-10-13 00:07:52 +00:00
Paul Holden 847ab7d072 MDL-83443 enrol: use defined role name in welcome message. 2024-10-11 14:35:28 +01:00
Jake Dallimore b48e64e2a1 weekly release 4.4.4+ 2024-10-11 10:55:06 +08:00
Jake Dallimore 71e219b7db Merge branch 'install_404_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_404_STABLE 2024-10-11 10:55:05 +08:00
Safat aa0fbc3f08 MDL-83143 core_communication: Behat coverage for default to course name 2024-10-11 11:02:08 +11:00
Safat 9ef5476361 MDL-83143 core_course: Add course name as default for empty room name 2024-10-11 11:02:08 +11:00
Safat 2c363085af MDL-83143: core_communication: Fix variable name typos 2024-10-11 11:02:07 +11:00
Jun Pataleta 75573d11e9 Merge branch 'MDL-82813-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-10-10 12:04:15 +08:00
Huong Nguyen 35ca0b0616 Merge branch 'MDL-82570-404' of https://github.com/vietlx426/moodle-1 into MOODLE_404_STABLE 2024-10-10 10:52:51 +07:00
Huong Nguyen 1ff3797d8d Merge branch 'MDL-83255-MOODLE_404_STABLE' of https://github.com/TobiGa/moodle into MOODLE_404_STABLE 2024-10-10 10:11:40 +07:00
Jun Pataleta 666fffc680 Merge branch 'MDL-82912-404' of https://github.com/andelacruz/moodle into MOODLE_404_STABLE 2024-10-10 10:35:07 +08:00
Jun Pataleta 6bbb0de4eb Merge branch 'MDL-82812_404_toolbrickfieldfaicons' of https://github.com/brickfield/moodle into MOODLE_404_STABLE 2024-10-10 10:13:44 +08:00
Angelia Dela Cruz 79dcd64b34 MDL-82912 mod_workshop: Behat to view assessment after workshop close 2024-10-09 16:42:30 +08:00
Huong Nguyen 13e5a55ae9 Merge branch 'MDL-83331_404' of https://github.com/timhunt/moodle into MOODLE_404_STABLE 2024-10-09 14:47:14 +07:00
AMOS bot e5b03f9fb9 Automatically generated installer lang files 2024-10-09 00:09:23 +00:00
Max Larkin 9a72cc8837 MDL-82812 tool_brickfield: Ignore fa icons 2024-10-08 13:02:23 +01:00
Huong Nguyen 756a559024 Merge branch 'MDL-70180-404' of https://github.com/roland04/moodle into MOODLE_404_STABLE 2024-10-08 09:36:38 +07:00
AMOS bot 0685bfdb24 Automatically generated installer lang files 2024-10-08 00:07:46 +00:00
david adamson 6f73e436fb MDL-82429 tool_brickfield: Process calculated fontsizes 2024-10-08 09:32:57 +11:00
Tim Hunt b72b37c974 MDL-83331 behat: enable navigation direct to mod/.../index.php 2024-10-07 12:05:19 +01:00
Tobias Garske dc2b113bca MDL-83255 core_course: Fix activitychooser recommended tab navigation 2024-10-07 08:24:31 +00:00
Tim Hunt a9d4d93b74 MDL-83070 question restore: recode links in hints 2024-10-07 08:53:58 +01:00
David Carrillo 2128d39ed7 MDL-83367 tasks: Apply trim() to pathtophp setting
- It fixes the problem that when "pathtophp" setting is stored with
whitespaces, the "Run now" button will still show up in the tasks list,
but the task will never run
2024-10-04 15:36:31 +02:00
Marina Glancy 6c113ddc35 MDL-83002 theme_boost: tell behat to wait when initialising drawers 2024-10-03 15:52:13 +01:00
vietlx426 fce950a59a MDL-82570 themes: Help boxes not accessible if selected consecutively 2024-10-03 16:27:29 +07:00
Mikel Martín bdd79633d3 MDL-82548 courseformat: Fix courseindex cm anchors
In the course index the course modules links had incorrenct "href" (only the anchor) when
being displayed in a page different than course page. This patch regenerates the href for
cms in the course index when needed.
2024-10-01 11:01:48 +02:00
Andrew Nicols a89faaf6e5 MDL-83253 core: Ignore invalid components for deprecated cap info
When checking for deprecated capabilty info, if a component is invalid,
skip loading of that component.
2024-09-26 15:17:40 +08:00
Bas Brands e2712c4065 MDL-70180 theme_boost: Allow form autoselect modal overflow
Co-authored-by: Mikel Martín <mikel@moodle.com>
2024-09-23 15:07:34 +02:00
Paul Holden 4a4a42cdce MDL-82580 report_log: preserve filter by individual user. 2024-09-20 20:54:15 +01:00
Paul Holden 90fd319190 MDL-82813 group: correctly format group description property. 2024-09-19 13:44:58 +01:00
Justus Dieckmann a7f5c1eb05 MDL-82838 tool_mfa: Prevent accidental resubmission of token 2024-08-20 16:44:24 +02:00
2308 changed files with 16971 additions and 7591 deletions
+3
View File
@@ -1,3 +1,6 @@
**/yui/build/** -diff
**/amd/build/** -diff
lib/dml/oci_native_moodle_package.sql text eol=lf
**.js.map -diff
**-min.js -diff
**.min.js -diff
+1 -1
View File
@@ -1,2 +1,2 @@
# Primary donations pages.
custom: ["https://moodle.com/donations/", moodle.org]
custom: ["https://moodle.com/donations/", "https://fund.moodle.org"]
+1 -1
View File
@@ -1 +1 @@
lts/iron
lts/jod
+192
View File
@@ -4703,4 +4703,196 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="5.0" requires="4.2.3">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.11.0" />
<VENDOR name="mysql" version="8.4" />
<VENDOR name="postgres" version="14" />
<VENDOR name="mssql" version="14.0" />
</DATABASE>
<PHP version="8.2.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="required"/>
<PHP_EXTENSION name="exif" level="optional"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
<FEEDBACK>
<ON_ERROR message="sixtyfourbitsrequired" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
<FEEDBACK>
<ON_CHECK message="iscustomadminwarnings" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+2 -2
View File
@@ -25,7 +25,7 @@ namespace core_adminpresets;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass core_adminpresets_generator
*/
class generator_test extends \advanced_testcase {
final class generator_test extends \advanced_testcase {
/**
* Test the behaviour of create_preset() method.
@@ -180,7 +180,7 @@ class generator_test extends \advanced_testcase {
*
* @return array
*/
public function create_preset_provider(): array {
public static function create_preset_provider(): array {
return [
'Default values' => [
],
+7 -7
View File
@@ -25,7 +25,7 @@ namespace core_adminpresets;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass helper
*/
class helper_test extends \advanced_testcase {
final class helper_test extends \advanced_testcase {
/**
* Test the behaviour of create_preset() method.
@@ -84,7 +84,7 @@ class helper_test extends \advanced_testcase {
*
* @return array
*/
public function create_preset_provider(): array {
public static function create_preset_provider(): array {
return [
'Default values' => [
],
@@ -177,7 +177,7 @@ class helper_test extends \advanced_testcase {
*
* @return array
*/
public function add_item_provider(): array {
public static function add_item_provider(): array {
return [
'Setting without plugin' => [
'name' => 'settingname',
@@ -239,7 +239,7 @@ class helper_test extends \advanced_testcase {
*
* @return array
*/
public function add_plugin_provider(): array {
public static function add_plugin_provider(): array {
return [
'Plugin: enabled (using int)' => [
'type' => 'plugintype',
@@ -321,7 +321,7 @@ class helper_test extends \advanced_testcase {
*
* @return array
*/
public function change_default_preset_provider(): array {
public static function change_default_preset_provider(): array {
return [
'Starter preset' => [
'preset' => 'starter',
@@ -364,7 +364,7 @@ class helper_test extends \advanced_testcase {
'preset' => 'unexisting',
],
'Valid XML file' => [
'preset' => __DIR__ . '/fixtures/import_settings_plugins.xml',
'preset' => self::get_fixture_path(__NAMESPACE__, 'import_settings_plugins.xml'),
'settings' => [
'allowemojipicker' => 1,
'enableportfolios' => 1,
@@ -377,7 +377,7 @@ class helper_test extends \advanced_testcase {
],
],
'Invalid XML file' => [
'preset' => __DIR__ . '/fixtures/invalid_xml_file.xml',
'preset' => self::get_fixture_path(__NAMESPACE__, 'invalid_xml_file.xml'),
],
'Unexisting XML file' => [
'preset' => __DIR__ . '/fixtures/unexisting.xml',
@@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_bloglevel
*/
class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase {
final class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase {
/**
* Test the behaviour of save_value() method.
@@ -72,7 +72,7 @@ class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase {
*
* @return array
*/
public function save_value_provider(): array {
public static function save_value_provider(): array {
return [
'Save the bloglevel and set blog_menu block visibility to true' => [
'setttingvalue' => BLOG_USER_LEVEL,
@@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_sitesettext
*/
class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase {
final class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase {
/**
* Test the behaviour of save_value() method.
@@ -66,7 +66,7 @@ class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase {
*
* @return array
*/
public function save_value_provider(): array {
public static function save_value_provider(): array {
return [
'Fullname: different value' => [
'settingname' => 'fullname',
@@ -25,7 +25,7 @@ namespace core_adminpresets\local\setting;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\local\setting\adminpresets_setting
*/
class adminpresets_setting_test extends \advanced_testcase {
final class adminpresets_setting_test extends \advanced_testcase {
/**
* Test the behaviour of save_value() method.
@@ -77,7 +77,7 @@ class adminpresets_setting_test extends \advanced_testcase {
*
* @return array
*/
public function save_value_provider(): array {
public static function save_value_provider(): array {
return [
'Core setting with the same value is not saved' => [
'category' => 'optionalsubsystems',
@@ -167,7 +167,7 @@ class adminpresets_setting_test extends \advanced_testcase {
*
* @return array
*/
public function save_attributes_values_provider(): array {
public static function save_attributes_values_provider(): array {
return [
'Plugin setting with the same value is not saved' => [
'category' => 'modsettinglesson',
+24 -10
View File
@@ -28,7 +28,7 @@ use stdClass;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\manager
*/
class manager_test extends \advanced_testcase {
final class manager_test extends \advanced_testcase {
/**
* Include required libraries.
*/
@@ -367,7 +367,7 @@ class manager_test extends \advanced_testcase {
*
* @return array
*/
public function export_preset_provider(): array {
public static function export_preset_provider(): array {
return [
'Export settings and plugins, excluding sensible' => [
'includesensible' => false,
@@ -530,26 +530,32 @@ class manager_test extends \advanced_testcase {
*
* @return array
*/
public function import_preset_provider(): array {
public static function import_preset_provider(): array {
return [
'Import settings from an empty file' => [
'filecontents' => '',
'expectedpreset' => false,
],
'Import settings and plugins from a valid XML file' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/import_settings_plugins.xml'),
'filecontents' => file_get_contents(
filename: self::get_fixture_path(__NAMESPACE__, 'import_settings_plugins.xml')
),
'expectedpreset' => true,
'expectedsettings' => true,
'expectedplugins' => true,
],
'Import only settings from a valid XML file' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/import_settings.xml'),
'filecontents' => file_get_contents(
filename: self::get_fixture_path(__NAMESPACE__, 'import_settings.xml')
),
'expectedpreset' => true,
'expectedsettings' => true,
'expectedplugins' => false,
],
'Import settings and plugins from a valid XML file with Starter name, which will be marked as non-core' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/import_starter_name.xml'),
'filecontents' => file_get_contents(
filename: self::get_fixture_path(__NAMESPACE__, 'import_starter_name.xml')
),
'expectedpreset' => true,
'expectedsettings' => true,
'expectedplugins' => true,
@@ -558,7 +564,9 @@ class manager_test extends \advanced_testcase {
'expectedpresetname' => 'Starter',
],
'Import settings from an invalid XML file' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/invalid_xml_file.xml'),
'filecontents' => file_get_contents(
filename: self::get_fixture_path(__NAMESPACE__, 'invalid_xml_file.xml')
),
'expectedpreset' => false,
'expectedsettings' => false,
'expectedplugins' => false,
@@ -566,20 +574,26 @@ class manager_test extends \advanced_testcase {
'expectedexception' => \Exception::class,
],
'Import unexisting settings category' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/unexisting_category.xml'),
'filecontents' => file_get_contents(
filename: self::get_fixture_path(__NAMESPACE__, 'unexisting_category.xml')
),
'expectedpreset' => false,
'expectedsettings' => false,
'expectedplugins' => false,
],
'Import unexisting setting' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/unexisting_setting.xml'),
'filecontents' => file_get_contents(
filename: self::get_fixture_path(__NAMESPACE__, 'unexisting_setting.xml')
),
'expectedpreset' => false,
'expectedsettings' => false,
'expectedplugins' => false,
'expecteddebugging' => true,
],
'Import valid settings with one unexisting setting too' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/import_settings_with_unexisting_setting.xml'),
'filecontents' => file_get_contents(
filename: self::get_fixture_path(__NAMESPACE__, 'import_settings_with_unexisting_setting.xml'),
),
'expectedpreset' => true,
'expectedsettings' => false,
'expectedplugins' => false,
@@ -30,7 +30,7 @@ use core_privacy\tests\provider_testcase;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\privacy\provider
*/
class privacy_provider_test extends provider_testcase {
final class privacy_provider_test extends provider_testcase {
/**
* Test for provider::get_metadata().
+2 -1
View File
@@ -2180,10 +2180,11 @@ class core_admin_renderer extends plugin_renderer_base {
$output = '';
$output .= $this->header();
$output .= $this->container_start('upgradekeyreq');
$output .= $this->heading(get_string('upgradekeyreq', 'core_admin'));
$output .= $this->container_start('upgradekeyreq w-25');
$output .= html_writer::start_tag('form', array('method' => 'POST', 'action' => $url));
$output .= html_writer::empty_tag('input', [
'id' => 'upgradekey',
'name' => 'upgradekey',
'type' => 'password',
'class' => 'form-control w-auto',
+2 -2
View File
@@ -26,7 +26,7 @@ use core_role_preset;
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class preset_test extends \advanced_testcase {
final class preset_test extends \advanced_testcase {
public function test_xml(): void {
global $DB;
@@ -84,7 +84,7 @@ class preset_test extends \advanced_testcase {
public function test_mixed_levels(): void {
// The problem here is that we cannot guarantee plugin contexts
// have unique short names, so we have to also support level numbers.
$xml = file_get_contents(__DIR__ . '/fixtures/mixed_levels.xml');
$xml = file_get_contents(self::get_fixture_path(__NAMESPACE__, 'mixed_levels.xml'));
$this->assertTrue(\core_role_preset::is_valid_preset($xml));
$preset = \core_role_preset::parse_preset($xml);
+1 -1
View File
@@ -40,7 +40,7 @@ use core_privacy\local\request\approved_userlist;
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider_test extends provider_testcase {
final class provider_test extends provider_testcase {
/**
* Test to check export_user_preferences.
* returns user preferences data.
@@ -20,13 +20,8 @@ namespace core_role\reportbuilder\datasource;
use core\context\course;
use core_reportbuilder_generator;
use core_reportbuilder_testcase;
use core_reportbuilder\local\filters\{date, select, text};
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php");
use core_reportbuilder\tests\core_reportbuilder_testcase;
/**
* Unit tests for roles datasource
+24 -1
View File
@@ -420,6 +420,12 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
new lang_string('generalgroups', 'backup'), new lang_string('configgeneralgroups', 'backup'),
array('value' => 1, 'locked' => 0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_competencies', new lang_string('generalcompetencies','backup'), new lang_string('configgeneralcompetencies','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock(
'backup/backup_general_customfield',
new lang_string('generalcustomfield', 'backup'),
new lang_string('configgeneralcustomfield', 'backup'),
['value' => 1, 'locked' => 0],
));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_contentbankcontent',
new lang_string('generalcontentbankcontent', 'backup'),
new lang_string('configgeneralcontentbankcontent', 'backup'),
@@ -431,7 +437,6 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
['value' => 1, 'locked' => 0])
);
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_legacyfiles',
new lang_string('generallegacyfiles', 'backup'),
new lang_string('configlegacyfiles', 'backup'), array('value' => 1, 'locked' => 0)));
@@ -460,6 +465,12 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
new lang_string('generalgroups', 'backup'), new lang_string('configgeneralgroups', 'backup'),
array('value' => 1, 'locked' => 0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_competencies', new lang_string('generalcompetencies','backup'), new lang_string('configgeneralcompetencies','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock(
'backup/backup_import_customfield',
new lang_string('generalcustomfield', 'backup'),
new lang_string('configgeneralcustomfield', 'backup'),
['value' => 1, 'locked' => 0],
));
$temp->add(new admin_setting_configcheckbox_with_lock(
'backup/backup_import_contentbankcontent',
new lang_string('generalcontentbankcontent', 'backup'),
@@ -589,6 +600,12 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_groups', new lang_string('generalgroups', 'backup'),
new lang_string('configgeneralgroups', 'backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_competencies', new lang_string('generalcompetencies','backup'), new lang_string('configgeneralcompetencies','backup'), 1));
$temp->add(new admin_setting_configcheckbox(
'backup/backup_auto_customfield',
new lang_string('generalcustomfield', 'backup'),
new lang_string('configgeneralcustomfield', 'backup'),
1,
));
$temp->add(new admin_setting_configcheckbox(
'backup/backup_auto_contentbankcontent',
new lang_string('generalcontentbankcontent', 'backup'),
@@ -668,6 +685,12 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp->add(new admin_setting_configcheckbox_with_lock('restore/restore_general_competencies',
new lang_string('generalcompetencies', 'backup'),
new lang_string('configrestorecompetencies', 'backup'), array('value' => 1, 'locked' => 0)));
$temp->add(new admin_setting_configcheckbox_with_lock(
'restore/restore_general_customfield',
new lang_string('generalcustomfield', 'backup'),
new lang_string('configrestorecustomfield', 'backup'),
['value' => 1, 'locked' => 0],
));
$temp->add(new admin_setting_configcheckbox_with_lock('restore/restore_general_contentbankcontent',
new lang_string('generalcontentbankcontent', 'backup'),
new lang_string('configrestorecontentbankcontent', 'backup'), array('value' => 1, 'locked' => 0)));
+10 -2
View File
@@ -181,8 +181,16 @@ if ($hassiteconfig) {
new lang_string('configproxyuser', 'admin'), ''));
$temp->add(new admin_setting_configpasswordunmask('proxypassword', new lang_string('proxypassword', 'admin'),
new lang_string('configproxypassword', 'admin'), ''));
$temp->add(new admin_setting_configtext('proxybypass', new lang_string('proxybypass', 'admin'),
new lang_string('configproxybypass', 'admin'), 'localhost, 127.0.0.1'));
$setting = new admin_setting_configtext('proxybypass', new lang_string('proxybypass', 'admin'),
new lang_string('configproxybypass', 'admin'), 'localhost,127.0.0.1');
$setting->set_updatedcallback(function() {
// Normalize $CFG->proxybypass value.
$normalizedvalue = \core\ip_utils::normalize_internet_address_list(get_config('core', 'proxybypass'));
set_config('proxybypass', $normalizedvalue);
});
$temp->add($setting);
$temp->add(new admin_setting_configcheckbox('proxylogunsafe', new lang_string('proxylogunsafe', 'admin'),
new lang_string('configproxylogunsafe_help', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('proxyfixunsafe', new lang_string('proxyfixunsafe', 'admin'),
@@ -0,0 +1,40 @@
@core @core_admin
Feature: Plugins overview page
In order to manage plugin and settings
As an admin
I can access the plugins overview page
Background:
Given I am logged in as "admin"
And I navigate to "Plugins > Plugins overview" in site administration
Scenario: An administrator can view plugins overview page
Then "Plugins overview" "text" should exist
And "Check for available updates" "button" should exist
And "All plugins" "link" should exist
And "Additional plugins" "link" should exist
Scenario: An administrator can access list of activities when activity modules cog icon is pressed
When I click on "Settings" "link" in the "Activity modules" "table_row"
Then "Activities" "text" should exist
And "Manage activities" "text" should exist in the ".breadcrumb" "css_element"
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
Scenario: An administrator can access plugin settings
When I click on "Settings" "link" in the "Assignment" "table_row"
Then "Assignment settings" "text" should exist
And "Assignment settings" "text" should exist in the ".breadcrumb" "css_element"
And "Assignment" "link" should exist in the ".breadcrumb" "css_element"
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
Scenario: Plugins with dependencies cannot be uninstalled
When I navigate to "Plugins > Plugins overview" in site administration
Then "Uninstall" "link" should not exist in the "Database" "table_row"
And "Required by: filter_data" "text" should exist in the "Database" "table_row"
Scenario: Cancelling plugin uninstall does not uninstall the selected plugin
When I click on "Uninstall" "link" in the "Assignment" "table_row"
Then "Uninstalling Assignment" "text" should exist
And "You are about to uninstall the plugin Assignment. This will completely delete everything in the database associated with this plugin, including its configuration, log records, user files managed by the plugin etc. There is no way back and Moodle itself does not create any recovery backup. Are you SURE you want to continue?" "text" should exist
And I click on "Cancel" "button"
And "Uninstall" "link" should exist in the "Assignment" "table_row"
+2 -2
View File
@@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php');
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class set_block_protection_test extends \externallib_advanced_testcase {
final class set_block_protection_test extends \externallib_advanced_testcase {
/**
* Test execute method with no login.
*/
@@ -85,7 +85,7 @@ class set_block_protection_test extends \externallib_advanced_testcase {
*
* @return array
*/
public function execute_provider(): array {
public static function execute_provider(): array {
return [
[
'block_login',
+3 -3
View File
@@ -33,7 +33,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php');
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class set_plugin_order_test extends \externallib_advanced_testcase {
final class set_plugin_order_test extends \externallib_advanced_testcase {
/**
* Text execute method for editor plugins, which support ordering.
*
@@ -72,7 +72,7 @@ class set_plugin_order_test extends \externallib_advanced_testcase {
*
* @return array
*/
public function execute_editor_provider(): array {
public static function execute_editor_provider(): array {
$pluginmanager = \core_plugin_manager::instance();
$allplugins = array_keys($pluginmanager->get_plugins_of_type('editor'));
@@ -142,7 +142,7 @@ class set_plugin_order_test extends \externallib_advanced_testcase {
$this->assertIsArray(set_plugin_order::execute($plugin, 1));
}
public function execute_non_orderable_provider(): array {
public static function execute_non_orderable_provider(): array {
return [
// Activities do not support ordering.
['mod_assign'],
+2 -2
View File
@@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php');
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class set_plugin_state_test extends \externallib_advanced_testcase {
final class set_plugin_state_test extends \externallib_advanced_testcase {
/**
* Text execute method.
*
@@ -66,7 +66,7 @@ class set_plugin_state_test extends \externallib_advanced_testcase {
*
* @return array
*/
public function execute_standard_provider(): array {
public static function execute_standard_provider(): array {
$generatetestsfor = function (string $plugin): array {
return [
[
@@ -20,14 +20,9 @@ namespace core_admin\reportbuilder\datasource;
use core\task\database_logger;
use core_reportbuilder_generator;
use core_reportbuilder_testcase;
use core_reportbuilder\local\filters\{boolean_select, date, duration, number, select, text};
use core_reportbuilder\task\send_schedules;
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php");
use core_reportbuilder\tests\core_reportbuilder_testcase;
/**
* Unit tests for task logs datasource
@@ -37,7 +32,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php");
* @copyright 2022 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_logs_test extends core_reportbuilder_testcase {
final class task_logs_test extends core_reportbuilder_testcase {
/**
* Test default datasource
@@ -110,7 +105,7 @@ class task_logs_test extends core_reportbuilder_testcase {
*
* @return array[]
*/
public function datasource_filters_provider(): array {
public static function datasource_filters_provider(): array {
return [
'Filter name' => ['task_log:name', [
'task_log:name_values' => [send_schedules::class],
@@ -30,7 +30,7 @@ use core_reportbuilder\local\report\filter;
* @copyright 2023 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class courserole_test extends advanced_testcase {
final class courserole_test extends advanced_testcase {
/**
* Data provider for {@see test_get_sql_filter}
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_admin_presets\event\preset_deleted
*/
class preset_deleted_test extends \advanced_testcase {
final class preset_deleted_test extends \advanced_testcase {
/**
* Test preset_deleted event.
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_admin_presets\event\preset_downloaded
*/
class preset_downloaded_test extends \advanced_testcase {
final class preset_downloaded_test extends \advanced_testcase {
/**
* Test preset_downloaded event.
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_admin_presets\event\preset_exported
*/
class preset_exported_test extends \advanced_testcase {
final class preset_exported_test extends \advanced_testcase {
/**
* Test preset_exported event.
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_admin_presets\event\preset_imported
*/
class preset_imported_test extends \advanced_testcase {
final class preset_imported_test extends \advanced_testcase {
/**
* Test preset_imported event.
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_admin_presets\event\preset_loaded
*/
class preset_loaded_test extends \advanced_testcase {
final class preset_loaded_test extends \advanced_testcase {
/**
* Test preset_loaded event.
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_admin_presets\event\preset_previewed
*/
class preset_previewed_test extends \advanced_testcase {
final class preset_previewed_test extends \advanced_testcase {
/**
* Test preset_previewed event.
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_admin_presets\event\preset_reverted
*/
class preset_reverted_test extends \advanced_testcase {
final class preset_reverted_test extends \advanced_testcase {
/**
* Test preset_reverted event.
@@ -25,7 +25,7 @@ namespace tool_admin_presets\event;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @covers \tool_admin_presets\event\presets_listed
*/
class presets_listed_test extends \advanced_testcase {
final class presets_listed_test extends \advanced_testcase {
/**
* Test presets_listed event.
@@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\local\action\base
*/
class base_test extends \advanced_testcase {
final class base_test extends \advanced_testcase {
/**
* Test the behaviour of log() method.
@@ -70,7 +70,7 @@ class base_test extends \advanced_testcase {
*
* @return array
*/
public function log_provider(): array {
public static function log_provider(): array {
return [
// Action = base.
'action=base and mode = show' => [
@@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\local\action\delete
*/
class delete_test extends \advanced_testcase {
final class delete_test extends \advanced_testcase {
/**
* Test the behaviour of execute() method.
@@ -27,7 +27,7 @@ use core_adminpresets\manager;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\local\action\export
*/
class export_test extends \advanced_testcase {
final class export_test extends \advanced_testcase {
/**
* Test the behaviour of execute() method.
@@ -156,7 +156,7 @@ class export_test extends \advanced_testcase {
*
* @return array
*/
public function export_execute_provider(): array {
public static function export_execute_provider(): array {
return [
'Export settings and plugins, excluding sensible' => [
'includesensible' => false,
@@ -27,7 +27,7 @@ use core_adminpresets\manager;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\local\action\import
*/
class import_test extends \advanced_testcase {
final class import_test extends \advanced_testcase {
/**
* Test the behaviour of execute() method.
@@ -190,7 +190,7 @@ class import_test extends \advanced_testcase {
*
* @return array
*/
public function import_execute_provider(): array {
public static function import_execute_provider(): array {
$fixturesfolder = __DIR__ . '/../../../../../presets/tests/fixtures/';
return [
@@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\local\action\load
*/
class load_test extends \advanced_testcase {
final class load_test extends \advanced_testcase {
/**
* Test the behaviour of show() method when the preset id doesn't exist.
@@ -25,7 +25,7 @@ namespace tool_admin_presets\local\action;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\local\action\rollback
*/
class rollback_test extends \advanced_testcase {
final class rollback_test extends \advanced_testcase {
/**
* Test the behaviour of execute() method.
@@ -0,0 +1,79 @@
@tool @tool_analytics
Feature: Manager can obtain prediction models insights
In order to view prediction models insights
As a manager
I should be able to obtain the prediction models insights
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| s1 | Student | One | s1@example.com |
| m1 | Manager | One | m1@example.com |
| m2 | Manager | Two | m2@example.com |
| t1 | Teacher | One | t1@example.com |
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| m1 | manager | System | |
| m2 | manager | System | |
# To ensure that course start date is in the future, set course start date to "tomorrow".
And the following "courses" exist:
| fullname | shortname | startdate |
| Course 1 | C1 | ##tomorrow## |
| Course 2 | C2 | ##tomorrow## |
| Course 3 | C3 | ##tomorrow## |
And the following "course enrolments" exist:
| user | course | role |
| s1 | C1 | student |
| s1 | C2 | student |
| s1 | C3 | student |
| t1 | C3 | editingteacher |
# Disable "Analytics processes execution via command line only".
And the following config values are set as admin:
| onlycli | 0 | analytics |
@javascript
Scenario: Manager can obtain prediction models insights
Given I log in as "m1"
And I navigate to "Analytics > Analytics models" in site administration
And I click on "Actions" "link" in the "Courses at risk of not starting" "table_row"
And I click on "Execute scheduled analysis" "link" in the "Courses at risk of not starting" "table_row"
And I press "Continue"
When I select "All predictions" from the "contextid" singleselect
# Confirm that only courses without teachers, Course 1 and Course 2, are listed.
Then "Course 1" "text" should exist
And "Course 2" "text" should exist
And "Course 3" "text" should not exist
And I click on "Select Course 1 for bulk action" "checkbox"
And I press "Not applicable"
And I press "Confirm"
# After m1 marks Course 1 as Not applicable, only Course 2 should be listed in the predictions for manager 1.
And "Course 1" "text" should not exist
And "Course 2" "text" should exist
And I log in as "m2"
And I click on ".popover-region-notifications" "css_element"
# Notification of new insight exists.
And "Upcoming courses have no teachers or students" "text" should exist
And I click on "View full notification" "link" in the ".popover-region-notifications" "css_element"
And I click on "View insight" "link"
# Course 1, previously marked as Not applicable by manager 1, is still listed for manager 2.
And "Course 1" "text" should exist
And I click on "View details" "link" in the "Course 1" "table_row"
# Prediction details and indicators are displayed for the selected course.
And the following should exist in the "insights-list" table:
| Description |
| Course 1 |
And the following should exist in the "prediction-calculations" table:
| -1- | -2- |
| Teacher availability | No |
| Student enrolments | Yes |
# Date of prediction analysis execution.
And "##today##%A, %d %B %Y##" "text" should exist in the "Time predicted" "table_row"
And I click on "Select Course 1 for bulk action" "checkbox"
And I press "Accept"
And I press "Confirm"
# Verify that you end up on the page listing predictions for 'No teaching'.
And "Courses at risk of not starting" "text" should exist
And "The following courses due to start in the upcoming days are at risk of not starting because they don't have teachers or students enrolled." "text" should exist
And the following should not exist in the "insights-list" table:
| Description |
| Course 1 |
+1 -1
View File
@@ -45,7 +45,7 @@ require_once($CFG->dirroot . '/analytics/tests/fixtures/test_target_course_level
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 3.8
*/
class external_test extends externallib_advanced_testcase {
final class external_test extends externallib_advanced_testcase {
/**
* test_potential_contexts description
@@ -0,0 +1,61 @@
@tool @tool_behat
Feature: Frozen clock in Behat
In order to write tests that depend on the current system time
As a test writer
I need to set the time using a Behat step
Background:
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "activities" exist:
| activity | course | name | idnumber | externalurl |
| url | C1 | Fixture | url1 | #wwwroot#/admin/tool/behat/tests/fixtures/core/showtime.php |
| forum | C1 | TestForum | forum1 | |
Scenario: Time has been frozen
# Set up 2 forum discussions at different times. This tests the clock in the Behat CLI process.
Given the time is frozen at "2024-03-01 12:34:56"
And the following "mod_forum > discussions" exist:
| user | forum | name | message |
| admin | forum1 | Subject1 | Message1 |
And the time is frozen at "2024-08-01 12:34:56"
And the following "mod_forum > discussions" exist:
| user | forum | name | message |
| admin | forum1 | Subject2 | Message2 |
When I am on the "TestForum" "forum activity" page logged in as admin
Then I should see "1 Mar 2024" in the "Subject1" "table_row"
And I should see "1 Aug 2024" in the "Subject2" "table_row"
# Also view time on the fixture page. This tests the clock for Behat web server requests.
And I am on the "Fixture" "url activity" page
And I should see "Behat time is not the same as real time"
# This Unix time corresponds to 12:34:56 in Perth time zone.
And I should see "Unix time 1722486896"
And I should see "Date-time 2024-08-01 12:34:56"
# This scenario is second, to verify that the clock automatically goes back to normal after test.
Scenario: Time is normal
Given the following "mod_forum > discussions" exist:
| user | forum | name | message |
| admin | forum1 | Subject1 | Message1 |
When I am on the "TestForum" "forum activity" page logged in as admin
# The time should be the real current time, not the frozen time.
Then I should see "## today ##%d %b %Y##" in the "Subject1" "table_row"
And I am on the "Fixture" "url activity" page
And I should see "Behat time is the same as real time"
Scenario: Time is frozen and then unfrozen
Given the time is frozen at "2024-03-01 12:34:56"
And the following "mod_forum > discussions" exist:
| user | forum | name | message |
| admin | forum1 | Subject1 | Message1 |
And the time is no longer frozen
And the following "mod_forum > discussions" exist:
| user | forum | name | message |
| admin | forum1 | Subject2 | Message2 |
When I am on the "TestForum" "forum activity" page logged in as admin
Then I should see "1 Mar 2024" in the "Subject1" "table_row"
# The time should be the real current time, not the frozen time for this entry.
And I should see "## today ##%d %b %Y##" in the "Subject2" "table_row"
And I am on the "Fixture" "url activity" page
And I should see "Behat time is the same as real time"
@@ -46,14 +46,14 @@ require_once($CFG->libdir . '/behat/form_field/behat_form_text.php');
* @covers \behat_form_text
* @covers \behat_form_field
*/
class behat_form_text_test extends \basic_testcase {
final class behat_form_text_test extends \basic_testcase {
/**
* Data provider for the test_set_get_value() method.
*
* @return array of value and expectation pairs to be tested.
*/
public function provider_test_set_get_value() {
public static function provider_test_set_get_value(): array {
return [
'null' => [null, null],
'int' => [3, 3],
@@ -68,7 +68,7 @@ class behat_form_text_test extends \basic_testcase {
*
* @param mixed $value value to be set.
* @param mixed $expectation value to be checked.
* @dataProvider provider_test_set_get_value()
* @dataProvider provider_test_set_get_value
*/
public function test_set_get_value($value, $expectation): void {
$session = $this->createMock(Session::class);
@@ -85,7 +85,7 @@ class behat_form_text_test extends \basic_testcase {
*
* @return array of decsep, value, match and result pairs to be tested.
*/
public function provider_test_matches() {
public static function provider_test_matches(): array {
return [
'lazy true' => ['.', 'hello', 'hello', true],
'lazy false' => ['.', 'hello', 'bye', false],
@@ -113,7 +113,7 @@ class behat_form_text_test extends \basic_testcase {
* @param mixed $value value to be set.
* @param mixed $match value to be matched.
* @param bool $result expected return status of the function.
* @dataProvider provider_test_matches()
* @dataProvider provider_test_matches
*/
public function test_matches($decsep, $value, $match, $result): void {
global $CFG;
@@ -30,7 +30,7 @@ namespace tool_behat\external;
*
* @covers \tool_behat\external\get_entity_generator
*/
class get_entity_generator_test extends \advanced_testcase {
final class get_entity_generator_test extends \advanced_testcase {
/**
* Log in as admin
+52
View File
@@ -0,0 +1,52 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Fixture to show the current server time using \core\clock.
*
* @package tool_behat
* @copyright 2024 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// phpcs:disable moodle.Files.RequireLogin.Missing
require(__DIR__ . '/../../../../../../config.php');
defined('BEHAT_SITE_RUNNING') || die('Behat fixture');
$PAGE->set_context(\context_system::instance());
$PAGE->set_url(new \moodle_url('/admin/tool/behat/tests/fixtures/core/showtime.php'));
echo $OUTPUT->header();
$clock = \core\di::get(\core\clock::class);
$dt = $clock->now();
$realbefore = time();
$time = $clock->time();
$realafter = time();
echo html_writer::div('Unix time ' . $time);
echo html_writer::div('Date-time ' . $dt->format('Y-m-d H:i:s'));
echo html_writer::div('TZ ' . $dt->getTimezone()->getName());
if ($time >= $realbefore && $time <= $realafter) {
echo html_writer::div('Behat time is the same as real time');
} else {
echo html_writer::div('Behat time is not the same as real time');
}
echo $OUTPUT->footer();
+6 -10
View File
@@ -1,7 +1,4 @@
<?php
// phpcs:ignoreFile
// @codeCoverageIgnoreStart
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -43,8 +40,7 @@ require_once($CFG->libdir . '/behat/classes/behat_config_manager.php');
* @copyright 2016 Rajesh Taneja
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class manager_util_test extends \advanced_testcase {
final class manager_util_test extends \advanced_testcase {
/** @var array Fixtures features which are available. */
private $featurepaths = array(
'default' => array(
@@ -107,11 +103,11 @@ class manager_util_test extends \advanced_testcase {
*/
private function get_behat_config_util($behatconfigutil, $notheme = false) {
// Create a map of arguments to return values.
$map = array(
array('withfeatures', __DIR__.'/fixtures/theme/withfeatures'),
array('nofeatures', __DIR__.'/fixtures/theme/nofeatures'),
array('defaulttheme', __DIR__.'/fixtures/theme/defaulttheme'),
);
$map = [
['withfeatures', self::get_fixture_path(__NAMESPACE__, 'theme/withfeatures')],
['nofeatures', self::get_fixture_path(__NAMESPACE__, 'theme/nofeatures')],
['defaulttheme', self::get_fixture_path(__NAMESPACE__, 'theme/defaulttheme')],
];
// List of themes is const for test.
if ($notheme) {
$themelist = array('defaulttheme');
@@ -410,13 +410,13 @@ class brickfield_accessibility_color_test extends brickfield_accessibility_test
$pos3 = stripos($fontsize, 'px');
if ($pos1 !== false) {
$rem = substr($fontsize, 0, -3);
$newfontsize = $newfontsize * $rem;
$newfontsize = is_numeric($rem) ? $newfontsize * $rem : $newfontsize;
} else if ($pos2 !== false) {
$em = substr($fontsize, 0, -2);
$newfontsize = $newfontsize * $em;
$newfontsize = is_numeric($em) ? $newfontsize * $em : $newfontsize;
} else if ($pos3 !== false) {
$px = substr($fontsize, 0, -2);
$newfontsize = 0.75 * $px;
$newfontsize = is_numeric($px) ? 0.75 * $px : $newfontsize;
} else if (in_array($fontsize, array_keys($this->fontsizenames))) {
$newfontsize = $this->fontsizenames[$fontsize];
} else {
@@ -16,7 +16,7 @@
namespace tool_brickfield\local\htmlchecker\common\checks;
use tool_brickfield\local\htmlchecker\common\brickfield_accessibility_tag_test;
use tool_brickfield\local\htmlchecker\common\brickfield_accessibility_test;
/**
* Brickfield accessibility HTML checker library.
@@ -28,11 +28,25 @@ use tool_brickfield\local\htmlchecker\common\brickfield_accessibility_tag_test;
* @copyright 2020 onward: Brickfield Education Labs, www.brickfield.ie
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class i_is_not_used extends brickfield_accessibility_tag_test {
class i_is_not_used extends brickfield_accessibility_test {
/** @var int The default severity code for this test. */
public $defaultseverity = \tool_brickfield\local\htmlchecker\brickfield_accessibility::BA_TEST_SEVERE;
/** @var string The tag this test will fire on. */
public $tag = 'i';
/**
* Check for any i elements and flag them as errors
* while allowing font awesome icons to be used.
*/
public function check(): void {
foreach ($this->get_all_elements('i') as $element) {
// Ensure this is not a font awesome icon with aria-hidden.
if (str_contains($element->getAttribute('class'), 'fa-') && $element->getAttribute('aria-hidden') === 'true') {
continue;
}
$this->add_report($element);
}
}
}
@@ -16,6 +16,7 @@
namespace tool_brickfield\local\htmlchecker\common\checks;
use core_text;
use tool_brickfield\local\htmlchecker\common\brickfield_accessibility_test;
/**
@@ -29,10 +30,6 @@ use tool_brickfield\local\htmlchecker\common\brickfield_accessibility_test;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class img_alt_is_too_long extends brickfield_accessibility_test {
/** @var int The default severity code for this test. */
public $defaultseverity = \tool_brickfield\local\htmlchecker\brickfield_accessibility::BA_TEST_SEVERE;
/**
* The main check function. This is called by the parent class to actually check content.
*/
@@ -40,8 +37,8 @@ class img_alt_is_too_long extends brickfield_accessibility_test {
global $alttextlengthlimit;
foreach ($this->get_all_elements('img') as $img) {
$alttextlengthlimit = 125;
if ($img->hasAttribute('alt') && strlen($img->getAttribute('alt')) > $alttextlengthlimit) {
$alttextlengthlimit = 750;
if ($img->hasAttribute('alt') && core_text::strlen($img->getAttribute('alt')) > $alttextlengthlimit) {
$this->add_report($img);
}
}
@@ -46,7 +46,7 @@ class table_data_should_have_th extends brickfield_accessibility_table_test {
foreach ($tr->childNodes as $th) {
if ($this->property_is_equal($th, 'tagName', 'th')) {
break 3;
} else {
} else if ($th->nodeName != '#text') {
$this->add_report($table);
break 3;
}
@@ -57,7 +57,7 @@ class table_data_should_have_th extends brickfield_accessibility_table_test {
foreach ($child->childNodes as $th) {
if ($this->property_is_equal($th, 'tagName', 'th')) {
break 2;
} else {
} else if ($th->nodeName != '#text') {
$this->add_report($table);
break 2;
}
@@ -402,6 +402,8 @@ class manager {
}
}
$rs->close();
if (count($batchinserts) > 0) {
$DB->insert_records(self::DB_PROCESS, $batchinserts);
}
@@ -179,7 +179,7 @@ $string['checkdesc:headerh3'] = 'Headers following after H3 headers (the editor
$string['checkdesc:headershavetext'] = 'A header needs to contain text to be perceivable.';
$string['checkdesc:iisnotused'] = 'Italic (i) elements should not be used; "em" should be used instead.';
$string['checkdesc:imgaltisdifferent'] = 'Image alt (alternative) text should not be the image filename.';
$string['checkdesc:imgaltistoolong'] = 'Image alt (alternative) text should not be more than the maximum allowed (125) characters.';
$string['checkdesc:imgaltistoolong'] = 'Ensure that the image alt (alternative) text is concise enough to describe the image.';
$string['checkdesc:imgaltnotemptyinanchor'] = 'Image alt (alternative) text should not be empty, especially when the image has a link going elsewhere.';
$string['checkdesc:imgaltnotplaceholder'] = 'Image alt (alternative) text should not be a simple placeholder text, such as "image".';
$string['checkdesc:imghasalt'] = 'Image alt (alternative) text should not be missing for image elements, unless purely decorative with no meaning.';
@@ -26,7 +26,7 @@ use tool_brickfield\local\tool\filter;
* @author Jay Churchward (jay@brickfieldlabs.ie)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class accessibility_test extends \advanced_testcase {
final class accessibility_test extends \advanced_testcase {
/**
* Test get_title().
+1 -1
View File
@@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/admin/tool/brickfield/tests/area_test_base.php');
* @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class area_test extends area_test_base {
final class area_test extends area_test_base {
/**
* Test for the area assign intro
*/
+1 -1
View File
@@ -26,7 +26,7 @@ use tool_brickfield\local\tool\filter;
* @author Jay Churchward (jay.churchward@poetopensource.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class filters_test extends \advanced_testcase {
final class filters_test extends \advanced_testcase {
public function test_constructor(): void {
$this->resetAfterTest();
@@ -23,7 +23,7 @@ namespace tool_brickfield\local\areas\core_question;
* @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class questionanswers_test extends \advanced_testcase {
final class questionanswers_test extends \advanced_testcase {
/**
* Set up before class.
@@ -30,7 +30,7 @@ use tool_brickfield\area_test_base;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_brickfield\local\areas\core_question\base
*/
class questiontext_test extends area_test_base {
final class questiontext_test extends area_test_base {
/**
* Set up before class.
*/
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class a_links_dont_open_new_window_testcase
*/
class a_links_dont_open_new_window_test extends all_checks {
final class a_links_dont_open_new_window_test extends all_checks {
/** @var string Check type */
protected $checktype = 'a_links_dont_open_new_window';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class a_must_contain_text_testcase
*/
class a_must_contain_text_test extends all_checks {
final class a_must_contain_text_test extends all_checks {
/** @var string Check type */
protected $checktype = 'a_must_contain_text';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class a_suspicious_link_text
*/
class a_suspicious_link_text_test extends all_checks {
final class a_suspicious_link_text_test extends all_checks {
/** @var string Check type */
protected $checktype = 'a_suspicious_link_text';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class area_dont_open_new_window_testcase
*/
class area_dont_open_new_window_test extends all_checks {
final class area_dont_open_new_window_test extends all_checks {
/** @var string Check type */
protected $checktype = 'area_dont_open_new_window';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class area_has_alt_value_testcase
*/
class area_has_alt_value_test extends all_checks {
final class area_has_alt_value_test extends all_checks {
/** @var string Check type */
protected $checktype = 'area_has_alt_value';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class basefont_is_not_used_testcase
*/
class basefont_is_not_used_test extends all_checks {
final class basefont_is_not_used_test extends all_checks {
/** @var string Check type */
protected $checktype = 'basefont_is_not_used';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class blink_is_not_used_testcase
*/
class blink_is_not_used_test extends all_checks {
final class blink_is_not_used_test extends all_checks {
/** @var string Check type */
protected $checktype = 'blink_is_not_used';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class bold_is_not_used_testcase
*/
class bold_is_not_used_test extends all_checks {
final class bold_is_not_used_test extends all_checks {
/** @var string Check type */
protected $checktype = 'bold_is_not_used';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class content_too_long_testcase
*/
class content_too_long_test extends all_checks {
final class content_too_long_test extends all_checks {
/** @var string Check type */
protected $checktype = 'content_too_long';
@@ -32,7 +32,7 @@ require_once('all_checks.php');
* Class test_css_text_has_contrast_test
* @covers \tool_brickfield\local\htmlchecker\brickfield_accessibility
*/
class css_text_has_contrast_test extends all_checks {
final class css_text_has_contrast_test extends all_checks {
/** @var string The check type. */
protected $checktype = 'css_text_has_contrast';
@@ -227,6 +227,18 @@ EOD;
This is contrasty enough.</p></body>
EOD;
/** @var string HTML with calculated size colour values. */
private $calculatedfail = <<<EOD
<body><p style="color:#EF0000; background-color:white; font-size: calc(0.90375rem + 0.045vw)">
This is not contrasty enough.</p></body>
EOD;
/** @var string HTML with calculated size colour values. */
private $calculatedpass = <<<EOD
<body><p style="color:#E60000; background-color:white; font-size: calc(0.90375rem + 0.045vw);">
This is contrasty enough.</p></body>
EOD;
/**
* Test for the area assign intro
*/
@@ -458,4 +470,20 @@ EOD;
$results = $this->get_checker_results($html);
$this->assertEmpty($results);
}
/**
* Test for calculated (12pt) text with insufficient contrast of 4.49.
*/
public function test_check_for_calculated_fail(): void {
$results = $this->get_checker_results($this->calculatedfail);
$this->assertTrue($results[0]->element->tagName == 'p');
}
/**
* Test for calculated (12pt) text with sufficient contrast of 4.81.
*/
public function test_check_for_calculated_pass(): void {
$results = $this->get_checker_results($this->calculatedpass);
$this->assertEmpty($results);
}
}
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class embed_has_associated_no_embed_testcase
*/
class embed_has_associated_no_embed_test extends all_checks {
final class embed_has_associated_no_embed_test extends all_checks {
/** @var string Check type */
protected $checktype = 'embed_has_associated_no_embed';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class header_h3_testcase
*/
class header_h3_test extends all_checks {
final class header_h3_test extends all_checks {
/** @var string Check type */
protected $checktype = 'header_h3';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class headers_have_text_testcase
*/
class headers_have_text_test extends all_checks {
final class headers_have_text_test extends all_checks {
/** @var string Check type */
protected $checktype = 'headers_have_text';
@@ -30,8 +30,10 @@ require_once('all_checks.php');
/**
* Class i_is_not_used_testcase
*
* @covers \tool_brickfield\local\htmlchecker\common\checks\i_is_not_used
*/
class i_is_not_used_test extends all_checks {
final class i_is_not_used_test extends all_checks {
/** @var string Check type */
protected $checktype = 'i_is_not_used';
@@ -71,4 +73,13 @@ EOD;
$results = $this->get_checker_results($this->htmlpass);
$this->assertEmpty($results);
}
/**
* Test for font awesome icon.
*/
public function test_fa_icon(): void {
$html = '<div><i class="fa fa-user"></i><i>Hello there</i><i class="fa fa-address-book" aria-hidden="true"></i></div>';
$results = $this->get_checker_results($html);
$this->assertCount(2, $results);
}
}
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class img_alt_is_different_testcase
*/
class img_alt_is_different_test extends all_checks {
final class img_alt_is_different_test extends all_checks {
/** @var string Check type */
protected $checktype = 'img_alt_is_different';
@@ -24,55 +24,92 @@
namespace tool_brickfield\local\htmlchecker\common\checks;
use tool_brickfield\local\htmlchecker\brickfield_accessibility;
defined('MOODLE_INTERNAL') || die();
require_once('all_checks.php');
/**
* Class img_alt_is_too_long_testcase
*
* @covers \tool_brickfield\local\htmlchecker\common\checks\img_alt_is_too_long
*/
class img_alt_is_too_long_test extends all_checks {
final class img_alt_is_too_long_test extends all_checks {
/** @var string Check type */
protected $checktype = 'img_alt_is_too_long';
/** @var string Html fail */
private $htmlfail = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
/**
* Get test HTML with an image tag.
*
* @param string $alttext
* @return string
*/
protected function get_test_html(string $alttext): string {
return <<<EOD
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Image alt attributes must not be too long</title>
</head>
<body>
<img src="rex.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent accumsan, ante varius viverra aliquam,
dolor risus scelerisque massa, ut lacinia ipsum felis id est. Nullam convallis odio ante, in commodo elit fermentum sed.
Vivamus ullamcorper tincidunt sagittis. Sed et semper sapien. Quisque malesuada lacus nec libero cursus, aliquam malesuada
neque ultricies. Cras sit amet enim vel orci tristique porttitor a vitae urna. Suspendisse mi leo, hendrerit et eleifend a,
mollis at ex. Maecenas eget magna nec sem dignissim pharetra vel nec ex. Donec in porta lectus. Aenean porttitor euismod
lectus, sodales eleifend ex egestas in. Donec sed metus sodales, lobortis velit quis, dictum arcu.">
<img src="rex.jpg" alt="$alttext">
</body>
</html>
EOD;
}
/**
* Image alt text data provider.
*
* @return array
*/
public static function img_alt_text_provider(): array {
return [
'Alt text <= 750 characters' => [
true,
str_repeat("Hello world!", 60),
],
'Alt text > 750 characters' => [
false,
str_repeat("Hello world!", 65),
],
'Multi-byte alt text <= 750 characters' => [
true,
str_repeat('こんにちは、世界!', 83),
],
'Multi-byte alt text > 750 characters' => [
false,
str_repeat('こんにちは、世界!', 90),
],
];
}
/** @var string Html pass */
private $htmlpass = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Image alt attributes must not be too long</title>
</head>
<body>
<img src="rex.jpg" alt="this is an image of rex">
</body>
</html>
EOD;
/**
* Test for image alt attributes being too long
*
* @dataProvider img_alt_text_provider
* @param bool $expectedpass Whether the test is expected to pass or fail.
* @param string $alttext The alt text to test.
*/
public function test_check(): void {
$results = $this->get_checker_results($this->htmlfail);
$this->assertTrue($results[0]->element->tagName == 'img');
public function test_check(bool $expectedpass, string $alttext): void {
$html = $this->get_test_html($alttext);
$results = $this->get_checker_results($html);
if ($expectedpass) {
$this->assertEmpty($results);
} else {
$this->assertEquals('img', $results[0]->element->tagName);
}
}
$results = $this->get_checker_results($this->htmlpass);
$this->assertEmpty($results);
/**
* Test the severity of the {@see img_alt_is_too_long} check.
*
* @return void
*/
public function test_severity(): void {
$html = $this->get_test_html('Some alt text');
$checker = new brickfield_accessibility($html, 'brickfield', 'string');
$this->assertEquals(brickfield_accessibility::BA_TEST_SUGGESTION, $checker->get_test_severity(img_alt_is_too_long::class));
}
}
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class img_alt_not_empty_in_anchor_testcase
*/
class img_alt_not_empty_in_anchor_test extends all_checks {
final class img_alt_not_empty_in_anchor_test extends all_checks {
/** @var string Check type */
protected $checktype = 'img_alt_not_empty_in_anchor';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class img_alt_not_placeholder_testcase
*/
class img_alt_not_place_holder_test extends all_checks {
final class img_alt_not_place_holder_test extends all_checks {
/** @var string Check type */
protected $checktype = 'img_alt_not_place_holder';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class test_css_text_has_contrast_testcase
*/
class img_has_alt_test extends all_checks {
final class img_has_alt_test extends all_checks {
/** @var string Check type */
public $checktype = 'img_has_alt';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class img_with_map_has_use_map_test
*/
class img_with_map_has_use_map_test extends all_checks {
final class img_with_map_has_use_map_test extends all_checks {
/** @var string Check type */
public $checktype = 'img_with_map_has_use_map';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class legend_text_not_empty_test
*/
class legend_text_not_empty_test extends all_checks {
final class legend_text_not_empty_test extends all_checks {
/** @var string Check type */
public $checktype = 'legend_text_not_empty';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class no_headings_test
*/
class no_headings_test extends all_checks {
final class no_headings_test extends all_checks {
/** @var string Check type */
public $checktype = 'no_headings';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class object_must_have_embeded_test
*/
class object_must_have_embed_test extends all_checks {
final class object_must_have_embed_test extends all_checks {
/** @var string Check type */
public $checktype = 'object_must_have_embed';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class object_must_have_title_test
*/
class object_must_have_title_test extends all_checks {
final class object_must_have_title_test extends all_checks {
/** @var string Check type */
public $checktype = 'object_must_have_title';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class object_must_have_valid_title_test
*/
class object_must_have_valid_title_test extends all_checks {
final class object_must_have_valid_title_test extends all_checks {
/** @var string Check type */
public $checktype = 'object_must_have_valid_title';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class strike_is_not_used_testcase
*/
class strike_is_not_used_test extends all_checks {
final class strike_is_not_used_test extends all_checks {
/** @var string Check type */
public $checktype = 'strike_is_not_used';
@@ -30,8 +30,10 @@ require_once('all_checks.php');
/**
* Class table_data_should_have_th_test
*
* @covers \tool_brickfield\local\htmlchecker\common\checks\table_data_should_have_th
*/
class table_data_should_have_th_test extends all_checks {
final class table_data_should_have_th_test extends all_checks {
/** @var string Check type */
public $checktype = 'table_data_should_have_th';
@@ -113,6 +115,117 @@ EOD;
</table>
</body>
</html>
EOD;
/** @var string HTML that should not get flagged. */
private $htmlpass3 = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Table should have at least one th - pass</title>
</head>
<body>
<table>
<thead>
<tr>
<th>
This is table heading
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
This is a tables data
</td>
</tr>
</tbody>
</table>
</body>
</html>
EOD;
/** @var string HTML that should not get flagged. */
private $htmlpass4 = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Table should have at least one th - pass</title>
</head>
<body>
<table>
<tr>
<th>
This is table heading
</th>
</tr>
<tr>
<td>
This is a tables data
</td>
</tr>
</table>
</body>
</html>
EOD;
/** @var string HTML that should not get flagged. */
private $htmlpass5 = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Table should have at least one th - pass</title>
</head>
<body>
<table>
<thead>
<tr>
<th>
This is table heading
</th>
</tr>
</thead>
<tbody>
<tr>
<th>
This is a table heading in table data
</th>
</tr>
<tr>
<td>
This is a tables data
</td>
</tr>
</tbody>
</table>
</body>
</html>
EOD;
/** @var string HTML that should not get flagged. */
private $htmlpass6 = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Table should have at least one th - pass</title>
</head>
<body>
<table>
<tbody>
<tr>
<th>
This is a table heading in table data
</th>
</tr>
<tr>
<td>
This is a tables data
</td>
</tr>
</tbody>
</table>
</body>
</html>
EOD;
/**
* Test that th does not exist
@@ -134,5 +247,17 @@ EOD;
$results = $this->get_checker_results($this->htmlpass2);
$this->assertEmpty($results);
$results = $this->get_checker_results($this->htmlpass3);
$this->assertEmpty($results);
$results = $this->get_checker_results($this->htmlpass4);
$this->assertEmpty($results);
$results = $this->get_checker_results($this->htmlpass5);
$this->assertEmpty($results);
$results = $this->get_checker_results($this->htmlpass6);
$this->assertEmpty($results);
}
}
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class table_summary_does_not_duplicate_caption_test
*/
class table_summary_does_not_duplicate_caption_test extends all_checks {
final class table_summary_does_not_duplicate_caption_test extends all_checks {
/** @var string Check type */
public $checktype = 'table_summary_does_not_duplicate_caption';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class table_td_should_not_merge_test
*/
class table_td_should_not_merge_test extends all_checks {
final class table_td_should_not_merge_test extends all_checks {
/** @var string Check type */
public $checktype = 'table_td_should_not_merge';
@@ -31,7 +31,7 @@ require_once('all_checks.php');
/**
* Class table_th_should_have_scope_test
*/
class table_th_should_have_scope_test extends all_checks {
final class table_th_should_have_scope_test extends all_checks {
/** @var string Check type */
public $checktype = 'table_th_should_have_scope';
@@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool;
* @author Jay Churchward (jay.churchward@poetopensource.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activityresults_test extends \advanced_testcase {
final class activityresults_test extends \advanced_testcase {
public function test_toolname(): void {
$this->resetAfterTest();
@@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool;
* @author Jay Churchward (jay.churchward@poetopensource.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class checktyperesults_test extends \advanced_testcase {
final class checktyperesults_test extends \advanced_testcase {
public function test_toolname(): void {
$this->resetAfterTest();
@@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool;
* @author Jay Churchward (jay.churchward@poetopensource.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class errors_test extends \advanced_testcase {
final class errors_test extends \advanced_testcase {
public function test_toolname(): void {
$this->resetAfterTest();
@@ -24,7 +24,7 @@ namespace tool_brickfield\local\tool;
* @author Jay Churchward (jay.churchward@poetopensource.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class printable_test extends \advanced_testcase {
final class printable_test extends \advanced_testcase {
/**
* Test tool name.
+1 -1
View File
@@ -23,7 +23,7 @@ namespace tool_brickfield;
* @copyright 2020 onward: Brickfield Education Labs, https://www.brickfield.ie
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class manager_test extends \advanced_testcase {
final class manager_test extends \advanced_testcase {
/**
* Tests for the function manager::get_all_areas()
@@ -28,7 +28,7 @@ namespace tool_brickfield;
* Unit tests for {@registration tool_brickfield\registration.php}.
* @group tool_brickfield
*/
class registration_test extends \advanced_testcase {
final class registration_test extends \advanced_testcase {
public static function setUpBeforeClass(): void {
global $CFG;
@@ -24,7 +24,7 @@ namespace tool_brickfield;
* @author Jay Churchward (jay@brickfieldlabs.ie)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class scheduler_test extends \advanced_testcase {
final class scheduler_test extends \advanced_testcase {
public function test_request_analysis(): void {
$this->resetAfterTest();
+6 -6
View File
@@ -27,10 +27,10 @@ use tool_brickfield\local\tool\tool;
* @author Jay Churchward (jay.churchward@poetopensource.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_test extends \advanced_testcase {
final class tool_test extends \advanced_testcase {
/** @var string base 64 image */
protected $base64img = <<<EOF
protected static string $base64img = <<<EOF
<img src="data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/
8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5N
WvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29u
@@ -118,11 +118,11 @@ EOF;
* Base64 image provider.
* @return array
*/
public function base64_img_provider(): array {
public static function base64_img_provider(): array {
$img = '<img src="myimage.jpg" />';
return [
'Image tag alone (base64)' => [
$this->base64img,
self::$base64img,
true,
],
'Image tag alone (link)' => [
@@ -130,7 +130,7 @@ EOF;
false,
],
'Image tag in string (base64)' => [
"This is my image {$this->base64img}.",
"This is my image " . self::$base64img,
true,
],
'Image tag in string (link)' => [
@@ -162,7 +162,7 @@ EOF;
}
public function test_truncate_base64(): void {
$truncated = tool::truncate_base64($this->base64img);
$truncated = tool::truncate_base64(self::$base64img);
$this->assertStringContainsString('<img src="data:image/gif;base64..."', $truncated);
}
}
@@ -31,7 +31,7 @@ namespace tool_capability\event;
* @copyright 2014 Petr Skoda
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/
class events_test extends \advanced_testcase {
final class events_test extends \advanced_testcase {
/**
* Setup testcase.
@@ -31,7 +31,7 @@ require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/capability/locallib.php'
/**
* Tests for the capability overview helper functions.
*/
class locallib_test extends \advanced_testcase {
final class locallib_test extends \advanced_testcase {
/**
* Test the function that gets the data - simple case.
@@ -63,11 +63,9 @@ class assign_role_cohort extends moodleform {
$mform->addElement('select', 'roleid', get_string('selectrole', 'tool_cohortroles'), $options);
$mform->addRule('roleid', null, 'required');
$context = context_system::instance();
$options = array(
'multiple' => true,
'data-contextid' => $context->id,
'data-includes' => 'all'
'includes' => 'all',
);
$mform->addElement('cohort', 'cohortids', get_string('selectcohorts', 'tool_cohortroles'), $options);
$mform->addRule('cohortids', null, 'required');
@@ -175,7 +175,7 @@ class cohort_role_assignments_table extends table_sql {
* @return array containing sql to use and an array of params.
*/
protected function get_sql_and_params($count = false) {
$fields = 'uca.id, uca.cohortid, uca.userid, uca.roleid, ';
$fields = 'uca.id, uca.cohortid, uca.userid, uca.roleid, r.shortname AS rolename, ';
$fields .= 'c.name as cohortname, c.idnumber as cohortidnumber, c.contextid as cohortcontextid, ';
$fields .= 'c.visible as cohortvisible, c.description as cohortdescription, c.theme as cohorttheme';
@@ -193,6 +193,7 @@ class cohort_role_assignments_table extends table_sql {
$sql = "SELECT $select
FROM {tool_cohortroles} uca
JOIN {user} u ON u.id = uca.userid
JOIN {role} r ON r.id = uca.roleid
JOIN {cohort} c ON c.id = uca.cohortid";
// Check if any additional filtering is required.
+1 -1
View File
@@ -23,7 +23,7 @@ namespace tool_cohortroles;
* @copyright 2015 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class api_test extends \advanced_testcase {
final class api_test extends \advanced_testcase {
/** @var \stdClass $cohort */
protected $cohort = null;
@@ -39,7 +39,7 @@ use core_privacy\local\request\approved_userlist;
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider_test extends \core_privacy\tests\provider_testcase {
final class provider_test extends \core_privacy\tests\provider_testcase {
/**
* Overriding setUp() function to always reset after tests.
@@ -36,7 +36,7 @@ use moodle_exception;
* @copyright 2020 Ferran Recio <ferran@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class langstring_test extends advanced_testcase {
final class langstring_test extends advanced_testcase {
/**
* Sanity 1.x string
@@ -60,7 +60,7 @@ class langstring_test extends advanced_testcase {
*
* @return array
*/
public function fix_syntax_data(): array {
public static function fix_syntax_data(): array {
return [
// Syntax sanity v1 strings.
[

Some files were not shown because too many files have changed in this diff Show More