Commit Graph

3554 Commits

Author SHA1 Message Date
Sara Arjona 4e70f41e54 Merge branch 'MDL-81209-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2024-04-23 15:37:09 +02:00
Andrew Nicols 99748cdee6 Merge branch 'MDL-70829-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2024-04-12 11:59:04 +08:00
Huong Nguyen 951a3d5e5c Merge branch 'MDL-79174_403_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_403_STABLE 2024-04-12 10:56:50 +07:00
Jun Pataleta ca3218b23f MDL-70829 core: Remove presentation role for decorative images
* An image with non-empty alt text should not have a presentation role.
* An empty alt attribute is sufficient for decorative images. No need to
add a presentation role for them.
* Additionally, if there is already text that is present for an image,
there's no need to add an alt text with the same text. Such images are
decorative and should just have an empty alt text.
2024-04-12 11:13:12 +08:00
Huong Nguyen 1872094df6 Merge branch 'MDL-81256-403' of https://github.com/marinaglancy/moodle into MOODLE_403_STABLE 2024-04-12 08:58:28 +07:00
Shamim Rezaie 34d5c59153 Merge branch 'MDL-81306-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2024-04-12 11:46:06 +10:00
Huong Nguyen 8aed364c22 Merge branch 'MDL-81316-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2024-04-12 08:37:01 +07:00
Anupama Sarjoshi cec3a6438b MDL-81482 Questions: Fix questionlib_test PHPUnit tests 2024-04-09 16:49:22 +01:00
Andrew Nicols 17ba4c535b MDL-81209 core: Unit test should not care about plugin details 2024-04-08 20:54:26 +08:00
Marina Glancy 0b8ce298cb MDL-81256 lib: fix rounding of thumbnail image size 2024-04-08 10:01:47 +01:00
Jake Dallimore 94eb59c5b8 Merge branch 'MDL-81405-403' of https://github.com/jleyva/moodle into MOODLE_403_STABLE 2024-04-08 15:35:18 +08:00
Juan Leyva 5e7440acdc MDL-81405 session: New core cookie helper utility class 2024-04-06 12:25:51 +02:00
Andrew Nicols 493bef4270 MDL-81316 core: Encode anchor fragments properly to RFC 3986 2024-04-04 16:04:37 +08:00
Sara Arjona 075138c474 MDL-81386 output: Fix failure in PHPUnit when running filtered tests
There was a data provider to get the list of the FontAwesome icons that
was initialized when running filtered tests.
It was causing some failures with filtered tests that, for instance,
called require_login and changed the course.
To avoid this failure (and also to improve the performance), the logic
to get the icons list has been moved to the test.
2024-04-03 09:27:10 +02:00
Andrew Nicols f0f1caa67d MDL-81306 core: Do not use xsendfile for request dirs 2024-03-28 09:30:07 +08:00
Andrew Nicols 5dfcc1aedd Merge branch 'MDL-80332-403' of https://github.com/jleyva/moodle into MOODLE_403_STABLE 2024-03-26 22:43:37 +08:00
Juan Leyva d7a0cb8d00 MDL-80332 tool_mobile: Fallback por app launches 2024-03-25 16:05:07 +01:00
Andrew Nicols a5e94e0a08 MDL-81074 core: Simplify strftime tests 2024-03-25 09:51:25 +08:00
Luca Bösch aa2919309f MDL-81074 core: align core_date::strftime results for numeric and string 2024-03-25 09:51:25 +08:00
Jun Pataleta ef94d46a7f Merge branch 'MDL-81313-403' of https://github.com/snake/moodle into MOODLE_403_STABLE 2024-03-22 11:47:46 +08:00
Eloy Lafuente (stronk7) 7e170eb1b3 MDL-69688 phpunit: Improve test_context_not_used
This adds a few changes to the old test_context_not_used test:

- Move it to become an advanced_test, because its mission
  is to verify that the assertEventContextNotUsed() assertion
  works as expected.
- For consistency, also move the fixtures to own phpunit fixtures.
- Add proper coverage tags, to verify that the assertion is being
  covered.
- Add a data provider to provide all the current cases and ease
  any future case that may be needed in the future. One by one
  because previously there was code never executed with the
  warning expectation causing the test to stop.
- Run them in isolation, while this is not strictly required, it's
  including external fixtures and, we'll need that isolation soon
  (for changes coming when moving the test to PHPUnit 9.6 in MDL-81266).
2024-03-21 08:30:32 +01:00
Jake Dallimore 8e9abf5bd6 MDL-81313 core: Revert "Merge branch 'MDL-80338-403'
This reverts commit 3905247a84, reversing
changes made to 4414c4598e.
2024-03-21 11:30:10 +08:00
Jun Pataleta 0dfe161746 Merge branch 'MDL-80279-403' of https://github.com/pedrojordao/moodle into MOODLE_403_STABLE 2024-03-18 11:22:42 +08:00
Pedro Jordao eac4b571ee MDL-80279 core: Set new attributes for user profile initials
When the user does not have a profile photo and initials are displayed,
there is no alt text for the initials which causes accessibility
issues, so with this change I added the user's full name to the title
and aria-label attributes and I set a role='img' when the element span
is rendered.
2024-03-15 07:39:23 -03:00
Huong Nguyen 7ad4a82cb3 MDL-80167 core: Skip Oracle for Oracle environment in unit tests 2024-03-15 08:46:35 +07:00
Huong Nguyen d424951ce0 MDL-80167 admin: Add environment check for Oracle database 2024-03-14 17:42:39 +07:00
Andrew Nicols 3a1443ee0b MDL-80684 core: Correct location of task tests 2024-02-28 14:20:54 +08:00
Andrew Nicols c108c1ead7 Merge branch 'MDL-80684-MOODLE_403_STABLE-fail_running_tasks_on_shutdown' of https://github.com/praxisdigital/moodle into MOODLE_403_STABLE 2024-02-28 14:20:49 +08:00
Marina Glancy 8e08798e8e MDL-81036 behat: fix the action menu clickable area selector 2024-02-23 11:22:54 +00:00
Huong Nguyen 3905247a84 Merge branch 'MDL-80338-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2024-02-22 11:18:06 +07:00
Mark Johnson 558de0b8b4 MDL-79174 groups: Add includehidden parameter
This allows groups_get_user_groups to return groups with
GROUP_VISIBILITY_NONE that the specified user belongs to. The parameter
is false by default, and should be use with care as membership of these
groups should not be revealed to the user.
2024-02-21 15:42:47 +00:00
Frederik Milling Pytlick 11a3328b06 MDL-80684 core: Fail running tasks on shutdown
When you kill a process which is executing a task, it now marks it as failed.
2024-02-19 12:06:08 +01:00
Sara Arjona dac3242a2c Merge branch 'MDL-79674-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2024-02-19 10:20:47 +01:00
Sara Arjona 571be8e18c Merge branch 'MDL-79577-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2024-02-08 15:45:36 +08:00
Paul Holden 120e0af3de MDL-80338 core: encode moodle_url instance anchor properties. 2024-02-07 12:21:33 +00:00
Jun Pataleta 7a79c4d751 Merge branch 'MDL-75081-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2024-02-07 10:37:19 +08:00
Ilya Tregubov f8d5db3ea7 Merge branch 'MDL-79527_403' of https://github.com/timhunt/moodle into MOODLE_403_STABLE 2024-02-07 09:28:28 +08:00
Jun Pataleta bc763d3c0a Merge branch 'MDL-80693-m403' of https://github.com/sammarshallou/moodle into MOODLE_403_STABLE 2024-02-07 08:32:54 +08:00
Paul Holden 3932499ea6 MDL-75081 behat: correct tests of table contents asserting one column.
Prior to this change, assertions of "should exist" and "should not
exist" in table content, where the step provided only a single column,
could give false positives and pass (when they shouldn't).
2024-02-06 16:41:25 +00:00
Huong Nguyen cfcf3ab6a9 MDL-80713 Unit Tests: Message sink improvement
- Added a new method called get_messages_by_component()
  This method will help to retreive the redirected messages
  of specific component only
- Added a new method called get_messages_by_component_and_type()
  This method will help to retreive the redirected messages
  of specific component and type only
2024-02-05 09:24:34 +07:00
Tim Hunt eee0a8e89f MDL-79527 questions: category tree loading handling bad data
It should always be the case that a question category and its parent
category belong to the same context. However, over the years, we have
observed that this becomes violated by some data in some Moodle sites.
(The suspicion is that this is a backup/restor bug of some sort which
has never been tracked down.)

Since this happens, we should make the code robust to it, which is what
this change does. It ensure that when loading child categories, we only
consider ones in the same context.
2024-02-02 11:35:23 +00:00
Jun Pataleta e7ebe317a5 Merge branch 'MDL-74775-403' of https://github.com/HuongNV13/moodle into MOODLE_403_STABLE 2024-02-01 11:47:08 +08:00
Jun Pataleta d48e967e89 MDL-79674 behat: Use proper tags for testing WCAG 2.1 criteria
`wcag2a` and `wcag2aa` refer to WCAG 2.0 standards. We should be using
`wcag21a` and `wcag21aa` to test against WCAG 2.1 standards.

See:
https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#axe-core-tags
2024-01-30 16:21:02 +08:00
Jun Pataleta 09414b1184 MDL-79674 behat: axe-core version fixes
* Update \behat_accessibility::run_axe_validation_for_tags()'s
  PHPDoc block to reflect the current version.
* Fix incorrect copyright tag for the library
2024-01-30 16:21:01 +08:00
Huong Nguyen 7b9d56e0df MDL-74775 adhoc_task: Do not clear the timecreated of failed tasks 2024-01-29 10:02:30 +07:00
Paul Holden b6a66ef378 MDL-78311 core: fix host parameter type cleaning by IPv4 address. 2024-01-25 23:39:38 +00:00
Ilya Tregubov ef367f6b6e Merge branch 'MDL-80098-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2024-01-25 10:20:30 +08:00
Sara Arjona 9f0ab79ba9 Merge branch 'MDL-76723-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2024-01-24 13:13:10 +01:00
Huong Nguyen 8c719efc1b MDL-75579 adhoc_task: Implement no-retry flag 2024-01-23 09:41:23 +07:00
sam marshall d44fe7013d MDL-80693 core_user: search() fails if no standard identify fields 2024-01-22 12:54:37 +00:00