Compare commits

...

1370 Commits

Author SHA1 Message Date
Ilya Tregubov aea9770cfc Moodle release 4.1.12 2024-08-10 14:54:42 +08:00
Ilya Tregubov 44305df587 weekly release 4.1.11+ 2024-08-09 09:34:41 +08:00
Huong Nguyen 638caa1355 MDL-82745 filter_tex: Improve PHPUnit test 2024-08-08 21:08:59 +08:00
Michael Hawkins 6d29dc587e MDL-82745 filter_tex: Improve filter deny list 2024-08-08 11:41:11 +07:00
Michael Hawkins 0f03ac03b5 MDL-82576 qtype_calculated: Improve formula regexes 2024-08-08 11:12:28 +07:00
Safat a11b849ebe MDL-82395 tool_xmldb: Table layout update 2024-08-08 10:02:00 +07:00
Jun Pataleta 4cfa5bca7c Merge branch 'MDL-82560-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-08-08 10:44:33 +08:00
Paul Holden 19ad8459d7 MDL-79373 admin: ensure all current password configs are defined.
Ensure the admin preset export tool has an accurate record of each,
to be observed as sensitive settings when creating an export.
2024-08-08 09:23:20 +07:00
Angelia Dela Cruz 3f6919adc7 MDL-82560 mod_forum: Test that students can only start one discussion 2024-08-08 10:18:48 +08:00
Jun Pataleta 5d2ce59559 Merge branch 'MDL-77784-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-08-08 09:47:32 +08:00
Paul Holden e08dd90c32 MDL-81394 restore: format backup file metadata details safely. 2024-08-07 14:05:20 +08:00
raortegar 26d7f16686 MDL-81718 core: Improve localstorage validation 2024-08-06 10:36:01 +07:00
Paul Holden 5b168b055f MDL-82558 h5p: escape template error/exception content. 2024-08-05 11:03:03 +08:00
Paul Holden 29ab56c4d2 MDL-82392 blocks: consistent cleaning of block instance names. 2024-08-02 01:40:24 +00:00
Paul Holden 6c640dacf4 MDL-82261 mod_feedback: ensure only non-respondents can be messaged. 2024-08-02 01:40:24 +00:00
Paul Holden 234d24dfea MDL-82390 badges: correct context check when deleting badges. 2024-08-02 01:40:24 +00:00
meirzamoodle 835505681c MDL-82136 curl: Send credentials to redirect URL if allowed
Curl has the option CURLOPT_UNRESTRICTED_AUTH. If true, curl will send
the credentials to a different host. If false, they will not be sent.

CURLOPT_UNRESTRICTED_AUTH can only work if the CURLOPT_FOLLOWLOCATION
option is true. The filelib forces the CURLOPT_FOLLOWLOCATION option
to be false, because all redirects are emulated at the PHP level. So,
in this case, the CURLOPT_UNRESTRICTED_AUTH option is only being used
in our logic and will not work as you might expect it to.

This patch works almost the same as CURLOPT_UNRESTRICTED_AUTH in ideal
conditions. It will check whether the host is different. If so, the
system will check what value CURLOPT_UNRESTRICTED_AUTH has. If it is
not specified, then by default, it will be false. If false, then
credentials will not be sent.
2024-08-02 01:40:24 +00:00
Paul Holden e930abfcf8 MDL-82262 mod_feedback: fix broken bulk message sesskey checks. 2024-08-02 01:40:24 +00:00
Paul Holden cb06a0a271 MDL-64984 mod_glossary: capability check when restoring global type. 2024-08-02 01:40:24 +00:00
Ilya Tregubov f8f19a4d8e MDL-79541 core_grades: Add missing user info to search services.
Seems just fullname is not enough. So added all name fields.
2024-08-02 01:40:24 +00:00
Ilya Tregubov e2a8d063ee MDL-79541 core_grades: Fix singleview and user report selectors. 2024-08-02 01:40:24 +00:00
Ilya Tregubov 1fd2f0364c MDL-79541 core_grades: Hidden user fields check for search.
If some user profile fields are hidden on some grade reports
users without permission were able to see those.
2024-08-02 01:40:24 +00:00
Ilya Tregubov 7f450dcea3 weekly release 4.1.11+ 2024-08-02 09:31:07 +08:00
Ilya Tregubov c39a3357ed Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-08-02 09:31:04 +08:00
Paul Holden cc10212366 MDL-77784 quiz_grading: editor agnostic Behat scenario steps. 2024-08-01 14:19:30 +01:00
Huong Nguyen df2b3113d9 Merge branch 'MDL-82598-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-08-01 10:27:40 +07:00
AMOS bot d4f428311a Automatically generated installer lang files 2024-08-01 00:07:26 +00:00
Sara Arjona e2c677c3e8 Merge branch 'MDL-72876-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2024-07-31 17:15:38 +02:00
Sara Arjona 80b3cb4951 Merge branch 'MDL-82596-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-07-31 16:46:29 +02:00
Simey Lameze dfa5124909 MDL-82598 behat: improve example submission test 2024-07-31 09:29:01 +08:00
AMOS bot d3a6c97a43 Automatically generated installer lang files 2024-07-31 00:07:24 +00:00
Jun Pataleta 316a50f2b7 MDL-72876 theme_classic: Enclose welcome message in Bootstrap card 2024-07-30 19:40:41 +08:00
Ilya Tregubov 2883fd28e4 Merge branch 'MDL-80345-401' of https://github.com/MartinGauk/moodle into MOODLE_401_STABLE 2024-07-29 11:35:36 +08:00
Paul Holden aa7f8f9e09 MDL-82596 behat: switch manual private files upload to generator. 2024-07-28 19:29:54 +01:00
Paul Holden c4b56bb393 MDL-82596 behat: tidy up existing usage of private files generator.
Filename is no longer required (since 83db25c330), given it never
did anything so can be removed. Requiring the "Private files" block
also isn't necessary since original switch to generator methods.
2024-07-28 19:15:19 +01:00
Jun Pataleta 156d214635 weekly release 4.1.11+ 2024-07-26 13:36:00 +08:00
Jun Pataleta 31b07a6298 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-07-26 13:35:57 +08:00
Jun Pataleta 2c82466444 Merge branch 'MDL-82373-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-07-26 13:18:50 +08:00
Andrew Nicols 91e70280a2 MDL-82373 core_message: Make message drawer router behat-aware
The drawer router was modifying the DOM in a variety of ways and hiding
content, without any pendingJS checks. As a result, there were cases
where a part of the UI was not visible, but had been rendered and was in
the DOM.

This change wraps the router Go method in a pendingJS call that only
resolves when the router transition completes.

Additionally the lazy load manager had a similar issue.
2024-07-26 12:45:30 +08:00
Huong Nguyen 68e93dbfee Merge branch 'MDL-82527-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-07-25 10:50:00 +07:00
Jun Pataleta c12d07d9d4 Merge branch 'MDL-82373-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-07-25 11:30:52 +08:00
Jun Pataleta a29ef48500 Merge branch 'MDL-77706-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-07-25 11:02:16 +08:00
Huong Nguyen 0fae681a7c Merge branch 'MDL-82553-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2024-07-25 09:18:16 +07:00
Shamim Rezaie 149df44e29 Merge branch 'MDL-82551-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2024-07-25 11:53:53 +10:00
Huong Nguyen da1fafe59d Merge branch 'MDL-82422-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-07-25 08:37:31 +07:00
AMOS bot 3821c707b8 Automatically generated installer lang files 2024-07-25 00:07:59 +00:00
Jun Pataleta 1c7a5d9972 Merge branch 'MDL-81803-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-07-24 16:57:26 +08:00
Angelia Dela Cruz 0fdbf26fd0 MDL-82422 mod_workshop: Behat for how strict assessment comparison is 2024-07-24 14:35:06 +08:00
Jun Pataleta 4f3c3432cd MDL-82551 block_recentlyaccesseditems: Mark up decorative image properly
This change applies the same change in MDL-70829 to make the
accessibility Behat test for the welcome message to pass.
2024-07-24 12:05:25 +08:00
Jun Pataleta b6715bb1ae MDL-82553 behat: Run accessibility tests using WCAG 2.2 success criteria 2024-07-22 14:38:19 +08:00
Jun Pataleta 40094ddbe0 MDL-82551 core: Set welcome message heading to level 1 2024-07-22 14:21:22 +08:00
AMOS bot 8535c32bf3 Automatically generated installer lang files 2024-07-21 00:07:33 +00:00
Ilya Tregubov 6b90c69bda weekly release 4.1.11+ 2024-07-19 09:30:44 +08:00
Paul Holden 6f3337dcba MDL-82527 h5p: improve editor Behat scenarios for embedding content.
* Move the shared drag fixture out of the Atto plugin;
* Switch to using faster generators for populating private files;
* Clarify required fields for private files generator
2024-07-18 09:45:53 +01:00
Sara Arjona ff33f82ac2 Merge branch 'MDL-82353-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-07-17 17:08:31 +02:00
Andrew Nicols bf6cf572ca MDL-82373 grade_singleview: Run behat tests in large window
For recent versions of Chrome, we must use a bigger window to avoid
Chrome chrome issues.
2024-07-17 22:58:57 +08:00
Andrew Nicols 433109e2ac MDL-82373 contentbank: Pause in Behat before interacting with h5p
It seems that the loading of the h5p content upsets other interactions
with the page in Firefox as it loads. Unfortunately I haven't found a
reliable way to handle this with pendingJS yet.

This is the poor man's fix and we should find a better solution.
2024-07-17 14:45:23 +08:00
Andrew Nicols 07bfca9041 MDL-82373 question: Make window larger in behat tests
I would suggest that this is a stop gap to solve some failing tests. We
really need to look at whether we can improve the usability of this
interface on smaller displays as a longer-term fix.
2024-07-17 14:45:22 +08:00
Andrew Nicols b2320ccd71 MDL-82373 behat: Wait for alerts before accepting/dismissing them 2024-07-17 14:45:22 +08:00
Andrew Nicols 5e4ba1f036 MDL-82373 core: Make CollapsibleRegion more tolerant to behat 2024-07-17 14:45:22 +08:00
Andrew Nicols 7e17945088 MDL-82373 tool_usertours: Ensure that behat waits for tours to show/hide 2024-07-17 14:45:22 +08:00
Andrew Nicols 535e970ad3 MDL-82373 behat: Stop killing the entire Behat run on driver error
If there's a driver error, for example from a step taking too long, then
this kills the entire Behat run and we have to start from scratch.

This change instead throws away the original connection and starts a new
one to try and continue the test.
2024-07-17 14:45:21 +08:00
Andrew Nicols dd8595035f MDL-82373 behat: Stop calling ensure_node_is_visible before click
W3C WebDriver Element::Click, Element::Clear, and Element::SendKeys all
state that the WebDriver implementation (chromedriver, geckodriver,
edgedriver) should scroll the element into view if it is not already
visible.

It is wrong for us to check if the element is visible or not before
calling these as it may not be but will during the click/clear/type
event.
2024-07-17 14:45:21 +08:00
Andrew Nicols 06ae387ca5 MDL-82373 mod_lesson: Fix failing behat tests for Selenium 4
Recent versions of Chrome do not re-render the page but return previous
page state from cache. The page state had the Submit button disabled
before navigating away.

Refreshing the page addresses this.
2024-07-17 14:45:21 +08:00
Angelia Dela Cruz df48a73c5c MDL-82353 gradingform: Behat to verify marking guide can be set to draft 2024-07-16 17:30:44 +08:00
Andrew Nicols 70bbb44030 MDL-77706 atto_link: Work around Mozilla bug 1906559
This upstream bug prevents creation of an anchor with a hyperlink where
the content has a block-like display.

The workaround is to wrap the content in a span, set the display to
inline, call the `createLink` command on the span, move the content out
of the span, and then remove it.

This is only done for Firefox-based browsers.
2024-07-16 15:38:21 +08:00
Andrew Nicols 70ab78478f MDL-66903 core: Check PHPUNIT_TEST defined before using 2024-07-15 13:42:10 +07:00
Huong Nguyen 8a66b2b99a Merge branch 'MDL-66903-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-07-15 13:22:51 +07:00
Andrew Nicols ee5ac3f1f3 MDL-66903 core: Introduce \core_component::reset to replace hacks
Traditionally we have done this using reflection and it would be better
to do this in a 'proper' fashion in case we ever need to change how it
works.
2024-07-15 12:22:20 +08:00
Andrew Nicols 9e71503ab3 MDL-66903 core: Add option to get core in list of components
Note: This change is backported from MDL-81063.
2024-07-15 12:22:19 +08:00
Andrew Nicols 651ecb52d9 MDL-66903 core: Add helper to get component name from classname
Note: This change is backported from MDL-81063.
2024-07-15 12:22:19 +08:00
Andrew Nicols 85845b13d7 MDL-66903 testing: Helper to load fixture files 2024-07-15 12:22:17 +08:00
Andrew Nicols 7b0946129c MDL-66903 testing: Add support for a \tests\ namespace during tests
This commit:
- introduces a \tests\ sub-namespace for use in unit tests only
- the path to this the tests/classes directory of the owning parent
- files here are excluded from unit test runs

This is agreed per policy in MDL-80855.
2024-07-15 12:21:54 +08:00
Paul Holden 7d7cfee0b7 MDL-81803 tool_dataprivacy: observe disabled expiration time.
A non-positive integer value should indicate "No time limit".
2024-07-12 11:05:19 +01:00
Huong Nguyen 6751ba6500 weekly release 4.1.11+ 2024-07-12 08:42:21 +07:00
Jun Pataleta 6d387e4b2b Merge branch 'MDL-81265-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2024-07-11 12:08:30 +08:00
Jun Pataleta ed3b73d9fc MDL-81265 mod_workshop: Verify "Setup phase" heading with "should exist" 2024-07-11 11:54:39 +08:00
Laurent David f95b010ec5 MDL-81265 mod_workshop: Fix accessibility issues
* Page title should be h2
* Contrasts in the table headers (for submission, assessment and grading)
should be 4:1 at least
2024-07-11 11:54:39 +08:00
Andrew Nicols 97060da478 Merge branch 'MDL-82431-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-07-11 11:47:18 +08:00
Huong Nguyen 9715fd56da Merge branch 'MDL-79717-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-07-11 09:36:07 +07:00
Huong Nguyen 7e3d7fb02d Merge branch 'MDL-76654-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-07-11 09:20:23 +07:00
Paul Holden a9cc2ebb6e MDL-82431 phpunit: correct unit test filename and classname.
Standardise the same test cases, e.g. make final, covers notation,
static data providers, namespaces, etc.

Once the tests run, a couple of them failed. They required changes
to assertions to make them pass.
2024-07-10 19:06:11 +01:00
Paul Holden 1a7ec4cf3d MDL-79717 phpunit: ensure unique data provider keys in tests.
Duplicate data provider keys were overwriting and/or duplicating
one another, leading to some cases being skipped.

Other "duplicate array key" errors were picked up by `phpcs` in
this dragnet across all tests, which have also been fixed.
2024-07-10 14:09:00 +01:00
Huong Nguyen 7715c626ad Merge branch 'MDL-82236-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-07-10 09:05:01 +07:00
Angelia Dela Cruz 1c9098aeb8 MDL-82236 mod_data: Behat to display DB activity entry rating 2024-07-09 16:28:28 +08:00
Sara Arjona 5d18431087 Merge branch 'MDL-81296-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-07-09 08:50:54 +02:00
Angelia Dela Cruz 0d27c76e34 MDL-81296 mod_data: Behat test for data activity readonly availability 2024-07-09 13:06:35 +08:00
Simey Lameze 8deeed9771 MDL-76654 behat: fixes and improvements to self assessment test 2024-07-08 11:22:39 +08:00
Angelia Dela Cruz 7893a34171 MDL-76654 behat: Coverage for workshop self-assessment 2024-07-08 11:22:39 +08:00
Andrew Nicols e6966b7ae7 MDL-66903 testing: Fix whitespace 2024-07-05 22:06:09 +08:00
Andrew Nicols 3e81ebecb6 MDL-66903 testing: Reset CFG and component after test
This change moves the reset of global test state to the finally section
rather than doing it only if the test passes.

Previously if a test which modifies the `core_component` internals
failed, it would not reset the internal state and impact subsequent
tests.
2024-07-05 22:06:09 +08:00
Ilya Tregubov f9c5802f4e weekly release 4.1.11+ 2024-07-05 09:02:18 +08:00
Sara Arjona e6ee7a5b1c Merge branch 'MDL-80907-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2024-07-04 11:19:14 +02:00
Huong Nguyen 17081ee902 MDL-80907 behat: Fix incorrect column selectors 2024-07-04 16:01:53 +07:00
Huong Nguyen e817dd70db Merge branch 'MDL-80907-401' of https://github.com/marinaglancy/moodle into MOODLE_401_STABLE 2024-07-04 11:14:56 +07:00
Ilya Tregubov bc30a904f4 Merge branch 'MDL-63670-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-07-04 10:58:57 +08:00
Sara Arjona b2d9c6ff81 Merge branch 'MDL-82363-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2024-07-03 08:24:03 +02:00
Huong Nguyen 18dae18e20 MDL-82363 Calendar: Responsiveness improvement for calendar block
Hide the month name if the screen is too small
2024-07-03 11:03:02 +07:00
Sara Arjona 18c7f3cdf3 weekly release 4.1.11+ 2024-06-27 16:37:06 +02:00
Sara Arjona f0b462209a Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-06-27 16:37:02 +02:00
Jun Pataleta 974db25816 Merge branch 'MDL-79809-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2024-06-27 11:00:52 +08:00
Andrew Nicols 7a02ae5644 MDL-63670 core_message: Tests should not use another testcase as base 2024-06-27 11:00:49 +08:00
Huong Nguyen a9f24ce125 MDL-79809 environment: Moodle 4.5 requirements 2024-06-24 09:37:38 +07:00
Huong Nguyen a68fcabc65 MDL-79809 environment: Add missing Moodle 4.4 requirements 2024-06-24 09:37:38 +07:00
Huong Nguyen 2978ffc4a5 MDL-79809 environment: Add recommended custom check
Add support for custom environment checks to have a recommended
option in addition to required an optional.
2024-06-24 09:37:38 +07:00
AMOS bot a694661d5c Automatically generated installer lang files 2024-06-22 00:13:59 +00:00
Martin Gauk 7d77854fd6 MDL-80345 core_lock: deal with hash collisions in postgres_lock_factory 2024-06-20 17:44:24 +02:00
Sara Arjona 17124e62a9 weekly release 4.1.11+ 2024-06-20 16:31:16 +02:00
Sara Arjona d9ae012d15 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-06-20 16:31:12 +02:00
AMOS bot c03706fafb Automatically generated installer lang files 2024-06-20 00:16:13 +00:00
Huong Nguyen f77aa8c4a7 Merge branch 'MDL-81249-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-06-19 09:19:35 +07:00
Angelia Dela Cruz 4044abd156 MDL-81249 gradingform: Behat test that grades are retained 2024-06-18 20:11:33 +08:00
Angelia Dela Cruz 6164556c85 MDL-81249 gradingform: Enhance Behat test for deleting marking guide 2024-06-18 17:47:06 +08:00
Huong Nguyen 69a8f920d4 Merge branch 'MDL-82148_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2024-06-18 16:28:34 +07:00
Eloy Lafuente (stronk7) ff263b6dbc MDL-82148 phpunit: Remove all cases of multiple @coversDefaultClass
Only one by class is allowed (to be used as shortcut exclusively).
2024-06-14 16:05:48 +02:00
Ilya Tregubov 763c71194b weekly release 4.1.11+ 2024-06-14 08:57:21 +08:00
Huong Nguyen 19ac0728f2 Merge branch 'MDL-81332-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-06-12 13:16:45 +07:00
Angelia Dela Cruz 39cb2a03e5 MDL-81332 core_course: Behat test for grade and activity reports display 2024-06-11 16:57:53 +08:00
Andrew Nicols c8c84b4af1 Moodle release 4.1.11 2024-06-07 14:55:32 +08:00
Jun Pataleta 5ec01a7226 weekly release 4.1.10+ 2024-06-06 22:30:50 +08:00
Jun Pataleta f878e05d62 NOBUG: Fixed file access permissions 2024-06-06 22:30:49 +08:00
Huong Nguyen aa0e2cffdd Merge branch 'MDL-81989-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-06-06 22:23:26 +08:00
meirzamoodle c18b59808c MDL-81890 assign: confirm_sesskey fixed in view_fix_rescaled_null_grades 2024-06-06 22:23:26 +08:00
meirzamoodle a0d8c025f7 MDL-81890 enrol_lti: Fix sesskey checks 2024-06-06 22:23:25 +08:00
meirzamoodle 137d311fd1 MDL-81890 course: Fix sesskey checks 2024-06-06 22:23:25 +08:00
meirzamoodle 57f20b6cb3 MDL-81890 tool_moodlenet: Fix sesskey checks 2024-06-06 22:23:25 +08:00
Paul Holden a10506b8d7 MDL-81778 mod_bigbluebuttonbn: access checks when getting meeting URL. 2024-06-06 22:23:25 +08:00
Stevani Andolo 28b8fc9896 MDL-81412 calendar: Sanitise calendar event names 2024-06-06 22:22:49 +08:00
lameze f55b829f44 MDL-81989 install: remove unnecessary closing div tags 2024-06-05 14:06:23 +08:00
Cameron Ball 836b2c23a2 MDL-81774 curl: Strip auth headers when redirecting to different host 2024-06-05 02:00:21 +00:00
Huong Nguyen 0068701bc6 Merge branch 'MDL-81751-MOODLE_401_STABLE' of https://github.com/durzo/moodle into MOODLE_401_STABLE 2024-06-05 08:57:27 +07:00
Huong Nguyen 83a978d1cd Merge branch 'MDL-81955-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-06-04 10:34:35 +07:00
Juan Leyva d05795db8e MDL-80959 tool_mobile: Use different user keys for QR and auto login 2024-06-04 10:34:50 +08:00
Paul Holden 629a7066be MDL-81955 assignfeedback_editpdf: ensure ghostscript present in tests. 2024-05-31 07:14:17 +01:00
Ilya Tregubov 058b11e57b Merge branch 'MDL-77685-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-05-31 09:06:09 +08:00
Sara Arjona aa230649d9 weekly release 4.1.10+ 2024-05-30 17:00:42 +02:00
Paul Holden f8cce391b2 MDL-77685 grade: remove Behat specific report rendering hacks.
These changes follow the same approach as that taken elsewhere in
the Gradebook in 3643f48e0f.
2024-05-30 09:43:11 +01:00
Mihail Geshoski a7d476c35f MDL-77685 core_grades: Fix row_column_of_table_should_contain()
Backport from MDL-77632.
2024-05-30 09:42:26 +01:00
Andrew Nicols 5425fb3d79 MDL-81897 tool_mobile: Coding style fix 2024-05-28 11:45:05 +08:00
Andrew Nicols 587d737690 Merge branch 'MDL-81897-401' of https://github.com/jleyva/moodle into MOODLE_401_STABLE 2024-05-28 11:44:49 +08:00
Juan Leyva 31b68a2b5d MDL-81897 tool_mobile: Force partitioned cookies on inapp browser 2024-05-17 10:23:24 +02:00
Jordan Tomkinson a48f00d940 MDL-81751 ddl: new reserved keywords in Aurora MySQL database engine 2024-05-16 13:41:25 +01:00
Huong Nguyen f7da739ea0 weekly release 4.1.10+ 2024-05-16 18:25:49 +07:00
Huong Nguyen ebb346cd8e Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-05-16 18:25:48 +07:00
Huong Nguyen b39d8d5027 Merge branch 'MDL-79838-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-05-16 09:22:50 +07:00
Angelia Dela Cruz cf48f359ad MDL-79838 mod_h5pactivity: Behat for H5P activity grade settings control 2024-05-15 17:00:50 +08:00
Sara Arjona 8ac29c9422 Merge branch 'MDL-81805-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-05-14 17:05:57 +02:00
AMOS bot 7f3617860c Automatically generated installer lang files 2024-05-12 00:14:21 +00:00
Ilya Tregubov b35f70ce14 weekly release 4.1.10+ 2024-05-10 09:09:52 +08:00
Jun Pataleta 77d0c0caa9 Merge branch 'MDL-80972-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-05-09 11:42:40 +08:00
info@eWallah.net c2193308a6 MDL-80972 behat: Behat check_server_status can provide better info. 2024-05-09 11:08:04 +08:00
Huong Nguyen 9456911fe9 Merge branch 'MDL-80453-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-05-09 09:49:19 +07:00
Huong Nguyen bd2c8fdd54 Merge branch 'MDL-79702-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-05-09 09:34:41 +07:00
Angelia Dela Cruz 234d81e39b MDL-80453 mod_glossary: Behat for different glossary format display 2024-05-08 17:41:08 +08:00
Marina Glancy 9747b5b26b MDL-80907 various: fixes to incorrect column selectors in behat 2024-05-07 19:33:47 +01:00
Marina Glancy 508d462fa7 MDL-80907 behat: be more precise in selecting table rows 2024-05-07 19:33:35 +01:00
Simey Lameze f687e02dec MDL-81805 behat: remove unnecessary @javascript from tests 2024-05-07 09:45:17 +08:00
Simey Lameze 72c3038925 MDL-79702 behat: improvements and fixes to new tests
This commit adds the handling of tags as string separated by comma
to forum and glossary modules.
2024-05-06 20:02:57 +08:00
Angelia Dela Cruz d393030c58 MDL-79702 core_tag: Behat for activity tags deletion during course reset 2024-05-06 20:02:57 +08:00
Huong Nguyen d68ea84924 Merge branch 'MDL-80589-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-05-06 09:37:52 +07:00
Ilya Tregubov 85825dcc55 weekly release 4.1.10+ 2024-05-03 08:22:54 +08:00
Ilya Tregubov 80f152296c Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-05-03 08:22:51 +08:00
AMOS bot 48aa9aae56 Automatically generated installer lang files 2024-05-03 00:10:35 +00:00
Simey Lameze 025065daf5 MDL-80589 behat: fixes and improvements to new tests 2024-05-02 13:34:16 +08:00
Angelia Dela Cruz 49be0febdc MDL-80589 qtype_numerical: Behat to add, edit, preview numeric question 2024-05-02 13:34:16 +08:00
Huong Nguyen 73f57aab98 Merge branch 'MDL-79851-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-05-01 16:12:51 +07:00
Angelia Dela Cruz 457f0e9384 MDL-79851 mod_h5pactivity: Behat for h5p activity access control 2024-05-01 14:26:40 +08:00
Sara Arjona 4b15c803e2 Merge branch 'MDL-81632-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-04-30 15:09:54 +02:00
Huong Nguyen 50aff515b7 Merge branch 'MDL-79149-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-04-30 11:49:03 +07:00
Paul Holden 5b33398f07 MDL-79149 report_participation: more resilient activity access test.
Use the "Forum" module rather than the "Book" module, because the latter
emits two events when a student views it - if these two events happened
either side of a single second, then the report  would count two distinct
views (when it was trying to assert only one).
2024-04-26 16:10:22 +01:00
Sara Arjona 47568f31c5 Merge branch 'MDL-77445-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-04-26 10:40:50 +02:00
Sara Arjona eba83406da weekly release 4.1.10+ 2024-04-25 15:43:45 +02:00
Sara Arjona 137c6f36bb Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-04-25 15:43:41 +02:00
Huong Nguyen d9043b324d MDL-77998 Behat: Fix Behat failure 2024-04-25 10:38:18 +07:00
Paul Holden e57e560385 MDL-81632 block_recentlyaccesseditems: deterministic item ordering.
Behat tests of this functionality could trigger the unlikely (in real
world usage) scenario where a user has an identical "timeaccess" value
for multiple course activities.

This led to random failures in said tests when the DB ordered items in
apparently random order, where the "timeaccess" value was equal.
2024-04-24 20:57:46 +01:00
Sara Arjona eebd5742b6 Merge branch 'MDL-77998-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-04-24 14:48:16 +02:00
Angelia Dela Cruz 0837a24c05 MDL-77998 Behat: Add behat coverage for preferences navigation 2024-04-24 19:49:26 +08:00
Angelia Dela Cruz f2e48b39f6 MDL-77445 Behat: Coverage for activity chooser navigation 2024-04-24 18:09:22 +08:00
Huong Nguyen 5060c53176 Merge branch 'MDL-80107-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-04-24 08:36:46 +07:00
Sara Arjona 3f392e934e Merge branch 'MDL-81209-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-04-23 15:32:42 +02:00
Sara Arjona c1e4679ed5 Merge branch 'MDL-81457-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-04-23 14:57:51 +02:00
Pol Torrent i Soler 9254b7e75a MDL-81622 core: fix str_contains usage in cookie_helper 2024-04-23 12:52:58 +02:00
Angelia Dela Cruz 1d609ca0ee MDL-80107 gradingform: Behat test for defining marking guide 2024-04-23 15:40:26 +08:00
AMOS bot 61fabd3e73 Automatically generated installer lang files 2024-04-22 00:10:24 +00:00
Jun Pataleta e8d03fdae4 Moodle release 4.1.10 2024-04-20 15:57:26 +08:00
Huong Nguyen c8922328b2 weekly release 4.1.9+ 2024-04-19 17:05:41 +07:00
Laurent David 19635ef720 MDL-81267 mod_data: Additional tests 2024-04-17 10:33:42 +02:00
Laurent David 9d5a4746ab MDL-81267 mod_data: Clean field type before inclusion
* Filter out wrong field types when restoring or creating a field.
2024-04-17 10:33:42 +02:00
Stevani Andolo e4406472f0 MDL-81354 core: Escape string of fullname 2024-04-12 11:30:23 +00:00
Paul Holden cf2f67272a MDL-81062 mod_lesson: escape identity fields in overview report. 2024-04-12 11:30:23 +00:00
Paul Holden 2ebac5604c MDL-80712 mod_workshop: stricter cleaning of sub-plugin values. 2024-04-12 11:30:23 +00:00
Paul Holden c5f48698da MDL-81058 admin: fix sesskey checks for admin preset actions. 2024-04-12 11:30:23 +00:00
Paul Holden c2a043f50d MDL-81059 tool_analytics: fix sesskey checks for model actions. 2024-04-12 11:30:23 +00:00
Laurent David 001c78285f MDL-81284 mod_wiki: Add stricter cleaning of contentformat
* When restoring backup we clean the contentformat and defaultformat
to avoid issue with invalid value.
* Add tests for format and defaultformat so to check that we
 filter out invalid formats
* Remove private $basepath variable as it was used one and not always
initialised correctly.
2024-04-12 11:30:23 +00:00
meirzamoodle af90bb572e MDL-81352 filter: Ensure equation safety prior to filtering 2024-04-12 11:30:23 +00:00
Paul Holden 882a660f7e MDL-81135 mod_feedback: stricter cleaning of item type parameter. 2024-04-12 11:30:23 +00:00
Huong Nguyen adc1de569d MDL-81247 calendar: Extra validation for webservices 2024-04-12 11:30:23 +00:00
Paul Holden 607716f206 MDL-81247 calendar: freeze event type if "user" only allowed. 2024-04-12 11:30:23 +00:00
Leon Stringer 5358ce28ee MDL-80585 report_log: sanitize descriptions
Strip any HTML tags from values in the "Description" column.
2024-04-12 11:30:23 +00:00
Sara Arjona fef8dda150 weekly release 4.1.9+ 2024-04-12 13:23:37 +02:00
Ilya Tregubov b049731dfb Merge branch 'MDL-80385-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-04-11 15:43:31 +08:00
Huong Nguyen 5277dca108 Merge branch 'MDL-81362-401' of https://github.com/ssj365/moodle into MOODLE_401_STABLE 2024-04-11 11:00:21 +07:00
Ilya Tregubov 4be4d0d489 Merge branch 'MDL-81491-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2024-04-11 09:51:19 +08:00
Shamiso.Jaravaza 3d0bcb7172 MDL-81362 mod_bigbluebuttonbn: Fix content type 2024-04-10 11:49:39 -06:00
Sara Arjona 7dac3707fd Merge branch 'MDL-74977-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2024-04-10 15:51:10 +02:00
Huong Nguyen 037a7d5d6c MDL-74977 core_courseformat: add expanded section update actions
This also fix the Random "Course content preferences" Behat failure
2024-04-10 18:12:45 +07:00
Jake Dallimore f5587cf881 MDL-81491 enrol_lti: fix incorrect login_hint parameter type validation
This was always bad, but since we only used it to verify the existence
of the param, and let library code take $_REQUEST for the real
validation, it was ok. Now, since we're redirecting to self during
necessary cookie checks added by MDL-80835, we lose the real value
originally stored in $_REQUEST. This patch just fixes the param type,
setting it to raw, which is what it should have used originally. The
raw value won't be cast from a string to an int as part of the
require_param call, so the value won't be lost any more.
2024-04-10 17:45:07 +08:00
Sara Arjona a18c0b7c8b weekly release 4.1.9+ 2024-04-09 12:07:33 +02:00
Jake Dallimore 097a879e1a Merge branch 'MDL-81060-401-fix' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2024-04-09 10:14:07 +08:00
Andrew Nicols 58acb96ee6 MDL-81209 core: Unit test should not care about plugin details 2024-04-08 20:54:25 +08:00
Jake Dallimore 1901cd3fdf Merge branch 'MDL-81405-401' of https://github.com/jleyva/moodle into MOODLE_401_STABLE 2024-04-08 15:35:46 +08:00
Jake Dallimore 2c9a5c009f MDL-81060 core: fix incorrect userquota usage in zip_packer
This change reverts much of MDL-74641, removing the erroneous userquota
checks from zip_packer. Now, during extraction, the zip_packer will exit
with an error status when it encounters a file which is larger than its
advertised size, and NOT when it determines the size of the extracted
files have exceeded the userquota (which only applies to private files
and which was used incorrectly here). It also reverts changes to the
draftfiles_ajax.php file, restoring the original (pre-MDL-74641) error
handling.
2024-04-08 09:11:26 +07:00
Andrew Nicols b564a40d74 MDL-81457 core: Do not mark tests as Incomplete when they are wrong
This check was marking a test as Incomplete if there was a bug in any
part of the test, rather than failing the test in such a way that the
test bug may be found.

https://docs.phpunit.de/en/9.6/incomplete-and-skipped-tests.html
2024-04-08 08:47:29 +08:00
Juan Leyva 179bfdf5c5 MDL-81405 tool_mobile: Set Partitioned cookie when required 2024-04-06 12:31:50 +02:00
Juan Leyva eb975467bd MDL-81405 session: New core cookie helper utility class 2024-04-06 12:31:50 +02:00
Sara Arjona 5efbd6e0e1 weekly release 4.1.9+ 2024-04-02 14:46:54 +02:00
Andrew Nicols fa20b1790f Merge branch 'MDL-79712-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2024-04-02 11:57:12 +08:00
Jake Dallimore 7d579dd4bb MDL-79712 auth_lti: ensure MoodleSession uses SameSite=None Secure
The MoodleSession cookie is already set this way when using Chrome, but
not for Firefox. This is a decision made in \core\session\manager. When
Firefox eventually defaults to SameSite=Lax when the SameSite attribute
is omitted from the Set-Cookie headers, the MoodleSession cookie won't
be sent. This change ensures the cookies used during LTI launches will
continue to work if/when this happens, and despite any changes which may
be made to core's sessionlib in future.
2024-04-02 11:44:28 +08:00
Ilya Tregubov 6b0661b9ea Merge branch 'MDL-80036-401' of https://github.com/mickhawkins/moodle into MOODLE_401_STABLE 2024-03-27 11:08:55 +08:00
Sara Arjona afd57ca9a0 weekly release 4.1.9+ 2024-03-26 12:31:21 +01:00
Huong Nguyen c14e75a017 Merge branch 'MDL-81353-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2024-03-26 10:34:46 +07:00
Jake Dallimore 318e2344c0 MDL-81353 auth_lti: fix str_contains usage in cookie_helper
This failure was being masked by Symfony\Polyfill\Php80 during unit
tests.
2024-03-26 09:28:01 +08:00
Sara Arjona 17ed404ccc weekly release 4.1.9+ 2024-03-22 14:03:06 +01:00
Huong Nguyen 5b54a87858 Merge branch 'MDL-80835-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2024-03-21 14:54:20 +07:00
Jake Dallimore ea49be1e61 MDL-80835 auth_lti: fix bad cast breaking samesite LTI usage 2024-03-21 15:41:16 +08:00
Jake Dallimore 0f3d3b2d77 MDL-80835 enrol_lti: add partitioning support for OIDC state cookie
Adds the property that is required by Chrome to opt-in to its 3rd party
cookie partitioning solution, CHIPS. This specific change ensures the
'state' cookie, used in the OIDC handshake, has partitioning support.
This cookie can be partitioned unconditionally, since it's a cookie
controlled by the library and one we don't expect to be set without
partitioning elsewhere.
2024-03-21 15:41:16 +08:00
Jake Dallimore dee41e0648 MDL-80835 auth_lti: add partitioning to post-auth MoodleSession cookie
Adds the property that is required by Chrome to opt-in to its 3rd party
cookie partitioning solution, CHIPS. This specific change to auth_lti is
to ensure the MoodleSession Set-Cookie header resulting from
complete_user_login() calls (in auth.php) have this property set.
2024-03-21 15:41:16 +08:00
Jake Dallimore c11b1c6b3f MDL-80835 enrol_lti: add cookies required notice to auth login endpoint
This will be displayed if the cookie checks fail, which currently occurs
in Safari only.
2024-03-21 15:41:16 +08:00
Jake Dallimore e2362b0a7a MDL-80835 enrol_lti: add partitioning support to MoodleSession cookie
Adds the property that is required by Chrome to opt-in to its 3rd party
cookie partitioning solution, CHIPS. This specific change deals with the
cookie that is set when the user is not yet auth'd with the site and is
necessary to facilitate OIDC nonce retrieval and validation.
2024-03-21 15:41:15 +08:00
Jake Dallimore d63721cb15 MDL-80835 auth_lti: add cookie helper facilitating CHIPS opt-in
To opt a cookie in to Chrome's 3rd party cookie partitioning solution,
CHIPS, the property 'Partitioned;' needs to be set. This adds a helper
class supporting this, for a given cookie(s).

Note also, PHP's native
cookie APIs (setcookie, etc) don't support this cookie property yet -
(https://github.com/php/php-src/issues/12646).

Since this class is intended to allow existing Set-Cookie headers to be
modified before being sent (e.g. allowing clients to set a property on a
cookie set elsewhere in code), it deals with the headers directly anyway
but it means that new cookies must also use this helper to opt-in,
instead of relying on setcookie(). E.g. where the intent is to add
partitioning support to a new cookie, that cookie must first be set
(setcookie) and then it may opt-in to partitioning via this helper;
partitioning support cannot be achieved directly through setcookie and
friends yet.
2024-03-21 15:41:14 +08:00
Ilya Tregubov 66b1733bda weekly release 4.1.9+ 2024-03-20 08:54:22 +08:00
Ilya Tregubov 81821e6833 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-03-20 08:54:18 +08:00
Michael Hawkins 965a5fdb27 MDL-80036 core: Update security.txt expiry 2024-03-19 15:31:33 +08:00
Huong Nguyen 6aa2828161 Merge branch 'MDL-81156-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-03-19 10:56:15 +07:00
Andrew Nicols d46a37ebd4 Merge branch 'MDL-77255-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2024-03-19 11:40:21 +08:00
Huong Nguyen 8c358aefd9 MDL-77255 block_tag_flickr: Update to match with the new API
Flickr dropped php_serial format, we need to change to JSON format
2024-03-19 10:14:58 +07:00
AMOS bot 40aceb0256 Automatically generated installer lang files 2024-03-19 00:08:44 +00:00
Huong Nguyen f64240ce94 weekly release 4.1.9+ 2024-03-15 21:48:28 +07:00
Huong Nguyen 10c7926c0f Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-03-15 21:48:28 +07:00
Jake Dallimore 8a26315686 Merge branch 'MDL-80167-401-int' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2024-03-15 12:55:15 +08:00
Huong Nguyen 0e8d4d8e2a MDL-80167 core: Skip Oracle for Oracle environment in unit tests 2024-03-15 08:46:44 +07:00
Sara Arjona 5ac11701ac Merge branch 'MDL-80167-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2024-03-14 11:55:12 +01:00
Sara Arjona dc65317ba6 Merge branch 'MDL-80479-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-03-14 11:48:14 +01:00
Huong Nguyen f0ae7c4343 MDL-80167 admin: Add environment check for Oracle database 2024-03-14 17:42:51 +07:00
Simey Lameze b52c1855fa MDL-80479 behat: improve new test for quiz timer 2024-03-14 10:21:29 +08:00
Angelia Dela Cruz 6e1e63cc6b MDL-80479 mod_quiz: Behat to set quiz opening and closing time 2024-03-14 10:21:29 +08:00
Simey Lameze 50ae525be9 MDL-81156 behat: coverage for force course language 2024-03-14 09:04:49 +08:00
AMOS bot a700d119df Merge branch 'MOODLE_401_STABLE' into install_401_STABLE 2024-03-14 00:13:07 +00:00
Dale Davies 9ccd794b36 MDL-80385 core: Check lock state before attempting to acquire a lock
This is a cherry-pick of the same change from MDL-76865, which was
accidentally reverted in MDL-79428.
2024-03-13 13:56:49 +00:00
AMOS bot 49673645ea Automatically generated installer lang files 2024-03-13 00:11:01 +00:00
Ilya Tregubov e6316e6b9b weekly release 4.1.9+ 2024-03-13 08:10:00 +08:00
Huong Nguyen 5003afbe48 Merge branch 'MDL-76805-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-03-12 10:33:02 +07:00
Shamiso.Jaravaza 7e1bbaaf20 MDL-76805 mod_bigbluebuttonbn: Fix up behat tests 2024-03-12 11:08:28 +08:00
Sara Arjona d1111bc3e8 weekly release 4.1.9+ 2024-03-08 11:12:04 +01:00
Huong Nguyen 8de03684ac Merge branch 'MDL-79990-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-03-07 10:05:09 +07:00
Simey Lameze 2db07c4d0a MDL-79990 behat: custom step to verify assign grading data
This commit also optimise the new behat test.
2024-03-07 09:44:34 +08:00
Angelia Dela Cruz 3ac3d942dd MDL-79990 gradingform: Behat test for marking guide information display 2024-03-07 09:44:34 +08:00
Huong Nguyen 84308c7dfc Merge branch 'MDL-79278-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-03-06 09:13:39 +07:00
Angelia Dela Cruz 24a0e76ebf MDL-79278 mod_quiz: Teacher can set how quiz questions behave behat
Co-authored-by: Simey Lameze <simey@moodle.com>
2024-03-06 09:48:46 +08:00
Sara Arjona 2444b2b787 weekly release 4.1.9+ 2024-03-05 11:22:31 +01:00
Jun Pataleta b704fa7dda Merge branch 'MDL-80819_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2024-03-05 11:48:39 +08:00
Huong Nguyen 9d3d193f29 Merge branch 'MDL-80836-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2024-03-05 10:24:39 +07:00
Jun Pataleta 43c7557e84 weekly release 4.1.9+ 2024-03-01 12:24:39 +08:00
Jun Pataleta da74ac4987 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-03-01 12:24:37 +08:00
AMOS bot 1e5bc3a393 Automatically generated installer lang files 2024-02-28 00:10:59 +00:00
Sara Arjona 7c20cd1b81 Merge branch 'MDL-81036-401' of https://github.com/marinaglancy/moodle into MOODLE_401_STABLE 2024-02-27 13:04:19 +01:00
Marina Glancy edf1a1ac8c MDL-81036 behat: fix the action menu clickable area selector 2024-02-23 11:23:21 +00:00
Eloy Lafuente (stronk7) 5a2acac1ed MDL-80819 install: halt any install if php min version is not met
Apart from environmental stuff, the moodle_minimum_php_version_is_met()
function is executed by all installs (web, cli, database, ...)
and halts any installation (early) not meeting the PHP constraints.
2024-02-23 11:08:40 +01:00
Huong Nguyen 719c95009e weekly release 4.1.9+ 2024-02-23 08:37:56 +07:00
Huong Nguyen 860b4b941a Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-02-23 08:37:54 +07:00
Huong Nguyen 26ed48ec40 Merge branch 'MDL-80844_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2024-02-22 11:24:26 +07:00
Huong Nguyen 58ba1a9448 Merge branch 'MDL-80862-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-02-22 10:38:16 +07:00
Sara Arjona 40d2b4de39 Merge branch 'MDL-76441_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2024-02-21 17:50:08 +01:00
Sara Arjona bce1d7ff85 Merge branch 'MDL-80404-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-02-21 13:23:48 +01:00
Angelia Dela Cruz 3f439ff9d4 MDL-80404 mod_data: Behat for url autolinking and opening in new window 2024-02-21 16:03:46 +08:00
Huong Nguyen 0c34355c85 Merge branch 'MDL-79792-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-02-21 14:25:55 +07:00
Angelia Dela Cruz ab118d48f5 MDL-79792 core_badges: Behat test for awarding badge to group members 2024-02-21 14:06:09 +08:00
Jun Pataleta 6df3213c9b Merge branch 'MDL-79003-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-02-21 10:35:31 +08:00
Andrew Nicols 6dbd0e938f MDL-80862 testing: Reset task manager between behat tests 2024-02-20 10:55:04 +08:00
AMOS bot 8889f6f26f Automatically generated installer lang files 2024-02-20 00:13:48 +00:00
Sara Arjona 36aa09726b Merge branch 'MDL-79674-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2024-02-19 10:20:59 +01:00
Sara Arjona 196c2ae7a5 Merge branch 'MDL-80613-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-02-19 09:14:39 +01:00
Sara Arjona 4d217e3a1a weekly release 4.1.9+ 2024-02-15 15:39:56 +01:00
Sara Arjona 09e3db1aa6 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-02-15 15:39:53 +01:00
Simey Lameze 8815ecb3fd MDL-80613 behat: convert manual completion steps to use generators 2024-02-15 11:02:57 +08:00
Jake Dallimore 8482210209 MDL-80836 auth_lti: take user through login instead of sesspiggyback
Browsers are phasing out 3rd party cookies. Those which can be set are
partitioned to the top level embedding site, so piggybacking is
prevented. This will break the account linking process. This fix swaps
the piggyback for a login round trip, as originally intended, which
resolves the issue.
2024-02-15 10:40:05 +08:00
Sara Arjona 281ef7ef8d Merge branch 'MDL-79321-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-02-14 09:35:38 +01:00
Angelia Dela Cruz 6970580b4c MDL-79321 mod_quiz: Behat to set quiz as interactive with multiple tries 2024-02-13 17:09:00 +08:00
Jun Pataleta 652633b467 Merge branch 'MDL-80402-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-02-13 15:51:52 +08:00
Angelia Dela Cruz 5a7963d9f5 MDL-80402 mod_quiz: Behat for interactive quiz question dependency 2024-02-13 15:23:17 +08:00
AMOS bot 56ff5e78f1 Automatically generated installer lang files 2024-02-13 00:10:13 +00:00
Eloy Lafuente (stronk7) e31db928b5 MDL-80844 phpunit: Only some tests can use the debugging sink
The only tests that have COMPLETE* support for the debugging sink
are the advanced_testcase and the database_driver ones (store and
report). So we must ensure that the rest of tests don't use the
debugging sink at all.

Right now we are using it for storing, but later there is not
reporting, so any debugging happening within non advanced tests
is not detected.

This commit just ensures that we stop making that storing for
non advanced/database_driver tests. Nothing more, nothing less.

* Note that we have had to add a few missing bits to the
database_driver testcase because it was not 100% complete. Now
it behaves 100% the same than the advanced_testcase one regarding
the debugging sink.
2024-02-12 13:03:06 +01:00
AMOS bot 03fcd81892 Automatically generated installer lang files 2024-02-12 00:11:13 +00:00
Eloy Lafuente (stronk7) 05a41b6e32 MDL-76441 env: Moodle 4.2.x and 4.3.x do not support PHP 8.3 2024-02-10 12:15:11 +01:00
Jake Dallimore 8a38a37f1f Moodle release 4.1.9 2024-02-09 10:33:26 +08:00
Sara Arjona 4ea1bd3537 weekly release 4.1.8+ 2024-02-08 16:18:25 +01:00
Sara Arjona 35b7cbf027 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-02-08 16:18:21 +01:00
Ilya Tregubov 87eb0fdf21 MDL-80504 forum: Fix seperate group mode 2024-02-08 10:56:42 +07:00
Andrew Nicols c8aef2e4ba Merge branch 'MDL-80738-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-02-08 11:39:18 +08:00
Leon Stringer fa72ebc155 MDL-80501 mod_h5pactivity: activity group mode
Respect activity's group mode when checking access to the report.
Previously only the course's group mode was checked.
2024-02-08 11:16:16 +08:00
Andrew Nicols 6d7f162df0 Merge branch 'MDL-80667-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-02-08 09:42:22 +08:00
Jun Pataleta 97d64fb809 Merge branch 'MDL-80784-401' of https://github.com/noeldemartin/moodle into MOODLE_401_STABLE 2024-02-07 17:19:53 +08:00
Paul Holden fd3c586992 MDL-80738 quiz_statistics: ensure tests uses a DB-backed lock class.
Fix the test file/class name too.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2024-02-07 07:50:13 +00:00
Ilya Tregubov 61fb8ee988 MDL-69774 mod_forum: Restrict URL to accpet only expected params 2024-02-07 15:28:42 +08:00
Huong Nguyen 44f8c11123 Merge branch 'MDL-80512-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-02-07 13:32:01 +07:00
Jun Pataleta e5b9510af2 Merge branch 'MDL-75081-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2024-02-07 10:38:03 +08:00
Paul Holden ab151f86ab MDL-75081 grade: fix rogue gradebook scenarios containing invalid steps. 2024-02-07 09:07:04 +08:00
Paul Holden e36e40f530 MDL-75081 behat: define new heading named selector.
Co-authored-by: Jun Pataleta <jun@moodle.com>
2024-02-07 09:06:40 +08:00
Paul Holden 3a8a8c8463 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-07 09:05:07 +08:00
meirzamoodle 2f811e6acf MDL-74641 repository: Fix wrong increment of temporary file for small sizes 2024-02-06 16:00:21 +01:00
meirzamoodle fb7da9c74f MDL-74641 repository: Handles increase bytes while extracting zip files
We should not rely solely on the provided size information.
Therefore the system needs to recalculate the size of each file in the zip file,
whether small or big.

The changes also cover the filemanager.js file if an error appears.
2024-02-06 16:00:21 +01:00
meirzamoodle d27862e2ca MDL-78300 block: Determine if users can comment based on context 2024-02-06 16:00:21 +01:00
Paul Holden c7fde934c7 MDL-54749 tool_langimport: require sesskey to update lang packs. 2024-02-06 16:00:21 +01:00
Sara Arjona be50fbe20c Merge branch 'MDL-80816_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2024-02-06 15:51:56 +01:00
Ilya Tregubov 74bf7382dd Merge branch 'MDL-80713-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2024-02-06 11:20:38 +08:00
Huong Nguyen cb075f6257 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 13:27:07 +07:00
Eloy Lafuente (stronk7) 8a1b5fc2b0 MDL-80816 core: Bump actions to newer versions
All the new ones are Nodejs 20 based, because
Nodejs 16 is being deprecated @ GH environments.

https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20
2024-02-02 17:17:53 +01:00
Noel De Martin bd22abe778 MDL-80784 behat: Disable SSL checks for app initialization 2024-01-31 14:06:17 +01:00
Jun Pataleta b3867e7422 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:19:50 +08:00
Jun Pataleta 8c298f14bb 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:19:48 +08:00
Andrew Nicols 58bd2ed8e4 MDL-79003 js: Bump stylelint and components
Stylelint 15 deprecates a heap of rules which will be removed in 16.

We can't use 16 because it's ESM and requires a big restructure of our
build process.

We can temporarily silence the deprecations and then when we update our
build tooling we can make use of @stylistic/stylelint-plugin to add the
rules back.

This commit:
- bumps stylelint and related dependencies accordingly
- fixes issues identified with newer sniffs
- temporarily silences deprecation warnings
2024-01-30 14:08:51 +08:00
Andrew Nicols 36ca488c06 MDL-79003 js: Move rollup ratelimit to generateBundle
There are two phases of a build: Building, and then Outputting.

We were previously listening on the final event for the build phase, but
we should be listening to the final event of the output phase.
2024-01-30 14:08:51 +08:00
Andrew Nicols bca28b03a9 MDL-79003 js: Move browserlist config to package.json 2024-01-30 14:08:51 +08:00
Andrew Nicols a6216bb890 MDL-79003 js: Standard package bump - glob 2024-01-30 14:08:20 +08:00
Andrew Nicols 94b14df11d MDL-79003 js: Standard package bump - async 2024-01-30 14:07:09 +08:00
Andrew Nicols 0dc60026c8 MDL-79003 js: Remove grunt-contrib-uglify
We stopped using this when we updated our processes to support ESMs in
MDL-62497. Removal of the dependency was missed at the time.
2024-01-30 14:07:08 +08:00
Andrew Nicols 63a1ec81c4 MDL-79003 js: Standard package bump - grunt 2024-01-30 14:07:08 +08:00
Andrew Nicols 150fc0837a MDL-79003 js: Standard package bump - watchman 2024-01-30 14:07:08 +08:00
Andrew Nicols 72958879c6 MDL-79003 js: Standard package bump - ajv 2024-01-30 14:07:08 +08:00
Andrew Nicols d8d560b7fe MDL-79003 js: Use our own jsdoc wrapper
grunt-jsdoc is abandoned and only works with an older version of jsdoc.

This is a very simple wrapper around jsdoc itself.

This commit also includes a fix for broken docs.
2024-01-30 14:07:06 +08:00
Andrew Nicols 917dd49db2 MDL-79003 core: Bump eslint 2024-01-30 14:04:40 +08:00
Ruslan Kabalin 80691cf5a3 MDL-79003 eslint: Enable 'reportUnusedDisableDirectives' eslint setting
This commit is a backport of MDL-74301 which should have been backported
at the time.

This will warn on unused /* eslint-disable */ statements.
2024-01-30 14:04:38 +08:00
Ruslan Kabalin e20720ce0e MDL-79003 eslint: Remove rules included in eslint:recommended
This commit is a backport of MDL-74301 which should have been backported
at the time.

All rules included in "eslint:recommended" set containing matching
values are removed from the list. Recommended set is defined in
node_modules/eslint/conf/eslint-recommended.js
2024-01-30 14:03:10 +08:00
Ruslan Kabalin f976349b95 MDL-79003 eslint: Remove deprecated rules.
This commit is a backport of MDL-74301 which should have been backported
at the time.

To identify deprecated rules, temporary install sarbbottam/eslint-find-rules, then run
`npx eslint-find-rules -d .eslintrc`, it will return a list of rules
defined in .eslintrc that were deprecated.
2024-01-30 14:03:09 +08:00
Ruslan Kabalin 312a166f1e MDL-79003 eslint: Refactor jsdoc rules.
This commit is a backport of MDL-74301 which should have been backported
at the time.

Adding 'plugin:promise/recommended' results in 5k+ jsdoc warnings most
of which includes missing return and naming preferences (e.g. 'returns'
over 'return' or 'string' over 'String'). This needs to be audited and
addressed seprately.
2024-01-30 14:03:09 +08:00
Ruslan Kabalin f16ca8fa7a MDL-79003 eslint: Use 'plugin:promise/recommended'
This commit is a backport of MDL-74301 which should have been backported
at the time.

This enables recommended rules and brings back related rules. Without
reducing level to warn for some of them, this gives numerous (about 88) issues mainly
catch-or-return. Recommended set is defined in
node_modules/eslint-plugin-promise/index.js
2024-01-30 14:03:09 +08:00
Ruslan Kabalin 846a8b6568 MDL-79003 eslint: Address issues reported by eslint
This commit is a backport of MDL-74301 which should have been backported
at the time.
2024-01-30 14:03:05 +08:00
Ruslan Kabalin 692d3090fa MDL-79003 eslint: Change configuration and use 'eslint:recommended'
This commit is a backport of MDL-74301 which should have been backported
at the time.
2024-01-30 13:33:40 +08:00
Ruslan Kabalin 8092eb95c4 MDL-79003 eslint: Upgrade eslint and babel
This commit is a backport of MDL-74301 which should have been backported
at the time.

This patch includes changes:
* Upgrade "@babel/core" to latest point release
* Remove plugins already included into current "@babel/preset-env":
  - "@babel/plugin-proposal-class-properties"
  - "@babel/plugin-proposal-json-strings"
  - "@babel/plugin-syntax-dynamic-import"
  - "@babel/plugin-syntax-import-meta"
* Upgrade "eslint" to latest version
* Replace "eslint-plugin-babel" (depreacted in 2019) with "@babel/eslint-parser" and "@babel/eslint-plugin"
2024-01-30 13:33:40 +08:00
Andrew Nicols 2b864ceec3 MDL-79003 core: Bump NodeJS to lts/iron (NodeJS 20) 2024-01-30 13:33:40 +08:00
AMOS bot 80083244b6 Automatically generated installer lang files 2024-01-27 00:11:24 +00:00
Sara Arjona 560f4d895b weekly release 4.1.8+ 2024-01-25 16:48:39 +01:00
Jun Pataleta 95c3017da4 Merge branch 'MDL-80656-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-01-25 12:13:47 +08:00
Ilya Tregubov 8fffc08ee8 Merge branch 'MDL-79159-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-01-25 09:36:26 +08:00
Ilya Tregubov 364230d6f8 Merge branch 'MDL-80653-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-01-25 09:26:49 +08:00
Paul Holden 45f674e8cb MDL-80653 h5p: handle content type creation errors in test.
See also same in c7d08f85.
2024-01-24 08:58:30 +00:00
Sara Arjona 4ba166cf80 Merge branch 'MDL-79940-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-01-24 09:22:48 +01:00
Angelia Dela Cruz 3a779663aa MDL-79159 mod_lesson: Behat coverage for lesson question max attempts 2024-01-24 16:18:46 +08:00
Simey Lameze ca7b24f6d0 MDL-80656 behat: remove unnecessary activity duplication steps 2024-01-24 11:14:42 +08:00
Angelia Dela Cruz 35a2a34a7d MDL-79940 mod_workshop: Behat to confirm review button for reviewers 2024-01-24 09:10:41 +08:00
Paul Holden 603c794190 MDL-80512 tool_task: absolute path to required library file. 2024-01-23 09:27:09 +00:00
Sara Arjona 38c4d51947 Merge branch 'MDL-80339-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-01-23 07:48:37 +01:00
Angelia Dela Cruz a86228f547 MDL-80339 mod_lesson: Behat to confirm grade visibility in lesson 2024-01-23 10:13:27 +08:00
Jun Pataleta b30033c6c0 Merge branch 'MDL-79029-401' of https://github.com/ferranrecio/moodle into MOODLE_401_STABLE 2024-01-23 09:21:26 +08:00
Ferran Recio 5661849a02 MDL-79029 behat: optimize behat tests
Replace some add activity to section steps to the new
add activity to course section so they are faster and do
not require javascript.
2024-01-22 11:23:44 +01:00
Ferran Recio 66e8ce9976 MDL-79029 behat: new add activity steps 2024-01-22 11:23:44 +01:00
Jun Pataleta cf92eaeb0b Merge branch 'MDL-80377-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-01-22 16:32:15 +08:00
Angelia Dela Cruz f7f40e54e6 MDL-80377 block: Behat confirming folder file in recent activity block 2024-01-19 14:31:30 +08:00
Huong Nguyen 627177855a weekly release 4.1.8+ 2024-01-19 11:24:39 +07:00
Paul Holden 8c7983a43f MDL-80667 task: preserve environment when running tasks from web.
For sites that rely on environment variables to set configuration,
ensure they are also present when executing task process.

Co-authored-by: Olivier Wenger <olivier.wenger@liip.ch>
2024-01-18 16:54:10 +00:00
Andrew Nicols 0d0aa11e19 Merge branch 'MDL-80591_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2024-01-18 10:57:43 +08:00
Sara Arjona eb0439b5da Merge branch 'MDL-80266-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-01-16 07:20:21 +01:00
Andrew Nicols 37101f0698 MDL-80266 mod_forum: Reset subscription caches between behat tests 2024-01-16 13:34:46 +08:00
Eloy Lafuente (stronk7) 4b8a001bb0 MDL-80591 phpunit: delegate run to phpunit binary
Instead of manually including composer's auto-loading
stuff and then run PHPUnit\TextUI\Command::main(), now
we are using the PHPUnit "binary".

That way behaviour should be 100% the same than
running vendor/bin/phpunit (recommended instead of util.php --run).

Also, note that, for other util.php commands, we still need
composer's auto-loading to happen, so we have moved it immediately
after the --run command.

Finally, a few more file_exists() conditions have been added
to ensure that PHPUnit is properly installed. Redundant but...
2024-01-13 18:32:43 +01:00
Ilya Tregubov a9cf9d5519 weekly release 4.1.8+ 2024-01-12 09:11:53 +08:00
Ilya Tregubov 53275e5b8f Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2024-01-12 09:11:48 +08:00
Huong Nguyen 518e5799e4 Merge branch 'MDL-80452-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-01-11 10:45:35 +07:00
Huong Nguyen 6a610605f6 Merge branch 'MDL-80229-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2024-01-11 10:36:56 +07:00
Angelia Dela Cruz e4eb16bd9f MDL-80452 mod_h5pactivity: Behat for H5Pactivity duplication and delete 2024-01-11 11:22:22 +08:00
Huong Nguyen 3e831cc8c5 Merge branch 'MDL-73639-401-fix' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2024-01-10 14:47:48 +07:00
Sara Arjona 5ecca13a6f Merge branch 'MDL-80340-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-01-10 07:35:14 +01:00
Huong Nguyen 278f58dae0 Merge branch 'MDL-80382-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2024-01-10 10:31:13 +07:00
Sara Arjona 73cf6fb65c MDL-73639 behat: Fix the failure with the Enrol button
The button at the top of the page is hidden a few seconds by the
un-enrolment confirmation dialogue. Instead of waiting a few seconds
or reloading the page, the button at the bottom is clicked instead.
2024-01-09 16:39:38 +01:00
Simey Lameze 6483b5d68f MDL-80340 behat: make query to fetch h5p attempts less strict 2024-01-09 16:16:06 +08:00
Angelia Dela Cruz 6c24b8289f MDL-80382 behat: Replace "Frist" typos in Behat tests to "First" 2024-01-09 11:00:06 +08:00
Huong Nguyen e2e00a9dd4 Merge branch 'MDL-73639-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2024-01-08 16:10:15 +07:00
Simey Lameze 8168155e17 MDL-73639 behat: improvements to the new recover grades test 2024-01-08 13:09:25 +08:00
Angelia Dela Cruz d6650b63bf MDL-73639 core_grades: Behat to test Recover grades default settings 2024-01-08 13:09:25 +08:00
Ilya Tregubov 174389cc26 Merge branch 'MDL-79937-401_fixlessonmatching' of https://github.com/catalystfd/moodle into MOODLE_401_STABLE 2024-01-08 09:21:02 +08:00
AMOS bot 03454c2262 Automatically generated installer lang files 2023-12-23 00:11:20 +00:00
Jun Pataleta e591ddc4e8 Moodle release 4.1.8 2023-12-22 10:01:56 +08:00
Sara Arjona e1767fa80f weekly release 4.1.7+ 2023-12-21 13:34:33 +01:00
Huong Nguyen e25033e42d Merge branch 'MDL-80151-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-12-20 15:40:30 +07:00
Huong Nguyen dd2c19eb09 MDL-80151 behat: Improve viewing site calendar step 2023-12-20 16:32:55 +08:00
Angelia Dela Cruz 3b8b8d7d84 MDL-80151 mod_chat: Behat for chat repeat times and past session view 2023-12-20 16:32:55 +08:00
Simey Lameze 5378285a9a MDL-80151 behat: add calendar step to navigate to specific view 2023-12-20 16:32:55 +08:00
Jun Pataleta 3a098250f1 Merge branch 'MDL-68124-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-12-20 15:01:28 +08:00
Jun Pataleta 148ddd26e7 Merge branch 'MDL-80393-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-12-19 17:24:56 +08:00
Paul Holden cdf432ee17 MDL-80393 lang: expose current page language to JS modules.
Since 4be39296 the root HTML element contains the iso6391 language
code of the current language pack. However various JS modules need
access to the original Moodle language pack code, so expose that
in the `M.cfg` structure.
2023-12-19 09:08:12 +00:00
Sara Arjona b1e918edd8 MDL-68124 lesson: Fix random behat error with Oracle
This random error was caused because when reviewing an attempt,
the first pageid to display is calculated based on the timeseen
field in the lesson_attempst table.
In Oracle, sometimes it returned the second pageid (because both
had the same timeseen), so which led to these random failures.

Apart from adding 1-second wait when the attempt is created (to
guarantee the first page is returned properly), a few more
improvements have been also made, like removing manual steps for
setting the lesson activity or adding some extra checks to
confirm the information displayed is expected.
2023-12-18 09:49:05 +01:00
Huong Nguyen f58df6fa88 weekly release 4.1.7+ 2023-12-15 08:44:56 +07:00
Huong Nguyen eae562817d Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-12-15 08:44:52 +07:00
Huong Nguyen 033a59f9c5 Merge branch 'MDL-79828-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-12-14 10:16:22 +07:00
Huong Nguyen a34a8636be Merge branch 'MDL-79050-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-12-14 09:57:28 +07:00
Huong Nguyen 08d2e7c136 Merge branch 'MDL-80394-401' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-12-14 09:23:23 +07:00
Ilya Tregubov 886bbcbdb8 Merge branch 'MDL-79938-m401' of https://github.com/sammarshallou/moodle into MOODLE_401_STABLE 2023-12-14 08:51:51 +08:00
AMOS bot 0c3e759d98 Automatically generated installer lang files 2023-12-14 00:11:04 +00:00
sam marshall 607a452a74 MDL-79938 Behat: Add steps to support multiple tabs 2023-12-13 11:45:51 +00:00
Angelia Dela Cruz 3ef6e04f3c MDL-79050 Behat: Add behat coverage to retake lesson activity 2023-12-13 16:27:02 +08:00
Ilya Tregubov dfc7dcd062 MDL-80394 core_grades: Revert changes to graded_users_iterator
Third party plugins are using it and change was breaking it
2023-12-13 09:38:29 +08:00
Sara Arjona 80d773868c Merge branch 'MDL-80315-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-12-12 14:20:03 +01:00
Sara Arjona eb127cc93b Merge branch 'MDL-79835_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-12-12 14:11:51 +01:00
Huong Nguyen 86716dc120 Moodle release 4.1.7 2023-12-08 09:21:51 +07:00
Francis Devine e5eb66e405 MDL-79937 mod_lesson: Fix matching pagetype question matching
The addition of text format on the output of the answer responses broke
the matching later when comparing the valid answer against the sent
response, as the answer response was not correspondingly formatted.

I decided to use the un formatted answer response as the key, to keep it
as close as identical to prior behaviour
2023-12-08 09:06:53 +13:00
Sara Arjona 3a1b615718 weekly release 4.1.6+ 2023-12-07 16:22:14 +01:00
Paul Holden 54a8516cd2 MDL-79980 mod_survey: remove responses link if user cannot access. 2023-12-07 12:09:27 +01:00
Brendan Heywood 628e7ecc4c MDL-80309 tasks: Clean up mtrace logs 2023-12-07 12:07:45 +08:00
Huong Nguyen 7762fc61e8 Merge branch 'MDL-80341_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-12-07 10:28:55 +07:00
Huong Nguyen 3ffafd9232 Merge branch 'MDL-79061-401-2' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-12-07 09:53:18 +07:00
Huong Nguyen 7c82e1206d Merge branch 'MDL-68652-401-1' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-12-07 09:33:33 +07:00
Jun Pataleta 0152978745 Merge branch 'MDL-80281_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-12-07 10:16:38 +08:00
Huong Nguyen 2302bb7e2b Merge branch 'MDL-77136-401' of https://github.com/lucaboesch/moodle into MOODLE_401_STABLE 2023-12-07 08:37:07 +07:00
Paul Holden d1ccb8702c MDL-79980 mod_survey: respect activity group mode getting report. 2023-12-07 09:31:39 +08:00
Ilya Tregubov 4cb1509e35 MDL-68652 core_grades: Only return allowed fields.
Grade iterator should check user permissions.
2023-12-07 09:14:03 +08:00
Ilya Tregubov f764c332e7 Merge branch 'MOODLE_401_MDL-73378' of https://github.com/danielneis/moodle into MOODLE_401_STABLE 2023-12-07 09:02:59 +08:00
Tim Hunt 67f869a081 MDL-79835 behat_core_generator: remove misleading error obfuscation 2023-12-06 18:14:09 +00:00
Jun Pataleta 467a28d921 Merge branch 'MDL-80127_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-12-06 22:11:56 +08:00
Jun Pataleta 3e4c1c959f Merge branch 'MDL-80079-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-12-06 21:57:54 +08:00
Luca Bösch 69d235426a MDL-77136 qtype_randomsamatch: Newest versions for shortanswer questions 2023-12-06 14:12:02 +01:00
Luca Bösch bbb8622464 MDL-77136 core_question: Newest versions get_questions_from_categories 2023-12-06 14:12:02 +01:00
Tim Hunt 7311dff041 MDL-80127 question engine: prevent fatal errors from old bad data 2023-12-06 11:45:26 +00:00
Tim Hunt 8f2f95bd28 MDL-80127 question engine: don't convert null to '' before storing 2023-12-06 11:43:30 +00:00
Tim Hunt 579a5061ef MDL-80341 quiz: unseen descriptions are not unanswered questonis
This was causing confusing in the 'are you sure you want to submit' confirmation pop-up.
2023-12-06 11:20:06 +00:00
Angelia Dela Cruz a11a9ca5aa MDL-80315 block_comments: Removed duplicate Behat test
Deleted the duplicated course comments block behat test. The file
blocks/comments/tests/behat/add_comment.feature is deleted as a
result.
2023-12-06 18:26:23 +08:00
Ilya Tregubov 2ff0e12b24 Merge branch 'MDL-76109-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-12-06 15:43:39 +08:00
Huong Nguyen 3f163e8330 Merge branch 'MDL-50650-401' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-12-06 14:07:51 +07:00
Ilya Tregubov f5ada5cb0b Merge branch 'MDL-80043-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-12-06 15:01:46 +08:00
Stephan Robotta 63b2ceee5f MDL-41465 reports: In separate group mode, limit to same 2023-12-06 13:50:57 +07:00
Jun Pataleta ee9d740ccf MDL-80043 gradereport_grader: No need to pass header parameter
No need to pass a value for the header parameter in
print_grade_page_head() because:
1. The default grade plugin name will be used anyway.
2. It will allow the use of the editingmode_title lang string for the
grader report so the page title can reflect the display mode of the
grader report, especially when editing mode is turned on.
2023-12-06 13:55:15 +08:00
Ilya Tregubov 13c201fbc7 MDL-68652 mod_forum: Only include gradable users in grading 2023-12-06 12:47:29 +08:00
Jun Pataleta b9fd956e73 MDL-79061 course: Create a sr-only mutations logger
* Create SRLogger that extends from the default Logger class. This
logger outputs the feedback to a sr-only ARIA live region to allow
screen readers to announce the feedback from mutations.
* Update the course editor to use the SRLogger.
2023-12-06 11:54:11 +08:00
David Woloszyn 2f216f5bdb MDL-79759 repository_url: Limit css imports and remove fragments
There are checks to urls that attempt to limit recurrsion when
parse_file is called. This is problematic for css import urls that
can call an indefinite amount of nested import urls. An import limit
has been introduced to address this. Fragments have also been removed.
2023-12-06 04:00:22 +01:00
Stevani Andolo fcebf9b8a6 MDL-80174 tool_log: ensure "other" data is safely unserialized. 2023-12-06 04:00:22 +01:00
Paul Holden 7ace11d396 MDL-80268 badges: require capability to view awarded badges. 2023-12-06 04:00:22 +01:00
Paul Holden ad377e3085 MDL-79797 backup: ensure block config is safely unserialized. 2023-12-06 04:00:22 +01:00
Ilya Tregubov 9b65beb7ed Merge branch 'MDL-79692-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-12-06 10:50:55 +08:00
Huong Nguyen 4afd2390e2 Merge branch 'MDL-80180-401' of https://github.com/jbs1/moodle into MOODLE_401_STABLE 2023-12-06 09:17:28 +07:00
Ilya Tregubov 184aa8d8ca Merge branch 'MDL-74248-MOODLE_401_STABLE-fix_mp3_mod_folder' of https://github.com/praxisdigital/moodle into MOODLE_401_STABLE 2023-12-06 10:02:13 +08:00
Sara Arjona 9e1916ba09 Merge branch 'MDL-80286-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-12-05 16:42:24 +01:00
Sara Arjona 7d01008384 Merge branch 'MDL-79979-401' of https://github.com/aanabit/moodle into MOODLE_401_STABLE 2023-12-05 16:16:58 +01:00
Jun Pataleta 4ca230b174 Merge branch 'MDL-73974-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-12-05 23:08:56 +08:00
Karen Holland 07e0b64822 MDL-73974 tool_brickfield: Processing alpha fontsizes 2023-12-05 23:08:17 +08:00
Sara Arjona 9acc242e13 Merge branch 'MDL-55640-m401' of https://github.com/sammarshallou/moodle into MOODLE_401_STABLE 2023-12-05 16:02:06 +01:00
Sara Arjona fbdd721f0b Merge branch 'MDL-80015-401' of https://github.com/roland04/moodle into MOODLE_401_STABLE 2023-12-05 15:51:40 +01:00
Sara Arjona 66ae31ecb5 Merge branch 'MDL-80254-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-12-05 15:45:49 +01:00
Jun Pataleta 43b30054ef Merge branch 'MDL-79806_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-12-05 12:48:09 +08:00
Huong Nguyen 066edbb11b Merge branch 'MDL-71336-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-12-05 11:20:59 +07:00
Jun Pataleta 0076a8fe5c Merge branch 'm41-mdl64431' of https://github.com/danmarsden/moodle into MOODLE_401_STABLE 2023-12-05 12:13:24 +08:00
Huong Nguyen 534cf6e3d4 Merge branch 'MOODLE_401_STABLE' of https://github.com/dragos5436/moodle into MOODLE_401_STABLE 2023-12-05 10:41:10 +07:00
Ferran Recio 771f183646 MDL-79061 core: Mechanism for logging mutation feedbacks
* Create a mechanism for logging mutation feedbacks.
* The mutation feedbacks are displayed as a toast by default.
* Apply this logging mechanism on the course homepage to provide
feedback for the results of actions performed on course modules and
course sections.
2023-12-05 11:19:30 +08:00
Ilya Tregubov 348efc1495 MDL-68652 core_grades: Refactor grades functions.
get_gradable_users now has extra param to retrieve only active
users. Grade reports hase their own grade_report::get_gradable_users
since they decided whether to inlcude active users from report preferences
2023-12-05 10:53:31 +08:00
Ilya Tregubov 7b9191508f MDL-68652 core_grades: Add a webservice to retrive only gradable users. 2023-12-05 10:53:31 +08:00
Ilya Tregubov 67f08a792f Merge branch 'MDL-80043-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-12-05 09:11:51 +08:00
Ilya Tregubov 36a5a2d4d1 Merge branch 'MDL-80131-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-12-05 09:01:33 +08:00
Sara Arjona 52818283fe Merge branch 'MDL-80185-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-12-04 11:00:56 +01:00
Paul Holden 053aa290b2 MDL-80254 reportbuilder: better handling of deleted users in schedules.
We should verify that schedule and audience users are active accounts,
and that we don't try to send report schedules either from/to them if
they aren't.
2023-12-04 09:48:47 +00:00
Jun Pataleta 1b1a661a03 Merge branch 'MDL-80221-401-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_401_STABLE 2023-12-04 16:10:39 +08:00
Ilya Tregubov ad3e6363f1 MDL-50650 core_grades: Validate minimum grade when importing grades
Also add behat test for max and min grade validation.
2023-12-04 16:01:49 +08:00
Kyle Matter 2627f5ba2c MDL-50650 core_grades: allow grade imports larger than 100 points 2023-12-04 12:55:50 +08:00
Jun Pataleta 223948bf93 MDL-80131 mod_data: Make page titles unique 2023-12-02 07:20:53 +08:00
dragos5436 6b5485a0b0 MDL-60632 mod_quiz: Fix chart rendering fail in quiz report
If a quiz activity has negative grading enabled for incorrect answers,
students can achieve overall negative grades in this quiz. If at least
one student achieves a negative grade, the chart at the bottom of the
quiz 'Results' tab will fail to display. This patch add a search for
negative results, removes them from the band below 0 and adds them to
the 0 band. This will make the chart render correctly again.

Co-authored-by: Susana Leitão <sleitao@uporto.pt>
Co-authored-by: Matthias Opitz <m.opitz@ucl.ac.uk>

Removed whitespace at end of lines
2023-12-01 15:22:23 +00:00
David Mudrák b16e808764 MDL-80221 lang: Use fixed strings in the tests, too 2023-12-01 06:23:33 +01:00
Ilya Tregubov 76ff7600e4 weekly release 4.1.6+ 2023-12-01 13:12:36 +08:00
Jun Pataleta a2ddc55f69 MDL-80043 grade: Add upgrade.txt notes 2023-12-01 09:15:04 +08:00
Jun Pataleta cc6b3c161f MDL-80043 gradereport_grader: Define editingmode_title lang string 2023-12-01 09:15:04 +08:00
Jun Pataleta 18e5768332 MDL-80043 grade: editingmode_title support for grade report plugins
* Add support for grade report plugins that define an
`editingmode_title` lang string. If the grade report plugin defines this
 language string, it will be used for the page title's unique
 identifying information when editing mode is turned on.
2023-12-01 09:15:04 +08:00
Jun Pataleta fe3ff7dd69 MDL-80043 gradereport_singleview: Improve heading wordings
* Make the headings for the single view easier to read and understand
* When on editing mode, update the heading for the grade and user
screens to convey to the user that the page is currently on editing
mode. This is helpful for screen reader users as they can immediately
know the current display mode of the single view report page when this
gets read via the page title.
2023-12-01 09:15:03 +08:00
Jun Pataleta 816fadfcd7 MDL-80043 grade: Use heading parameter for the page title if provided 2023-12-01 09:15:03 +08:00
Helen Foster b136e428d0 MDL-80221 lang: Import fixed English strings (en_fix) 2023-11-30 19:14:48 +01:00
sam marshall f02437f915 MDL-55640 setuplib: test_localcachedir fails sporadically 2023-11-30 13:59:08 +00:00
Paul Holden de6c7d2975 MDL-80286 datafield_date: cast field content to real when sorting.
This ensures we don't under/overflow the size of an integer in DB.
2023-11-30 10:05:13 +00:00
Mark Johnson 7fe281cc45 MDL-79806 quiz_statistics: Queue recalculation on attempt_deleted 2023-11-30 08:53:56 +00:00
Huong Nguyen a410d35ef4 Merge branch 'MDL-79816-401' of https://github.com/rmady/moodle into MOODLE_401_STABLE 2023-11-30 10:41:20 +07:00
Meirza f16b42d013 MDL-76109 core: Don't check password policy for guest user
Besides adding the is_guest() check in the check_password_policy() condition,
I also changed the temporary user ID because the temporary user and
the guest must not share the same ID. Otherwise, it will raise an error.

Co-authored-by: Andrei Bautu <abautu@gmail.com>
2023-11-30 10:35:28 +07:00
Huong Nguyen c26e73fc9f Merge branch 'MDL-74378_401' of https://github.com/PhilippImhof/moodle into MOODLE_401_STABLE 2023-11-30 10:12:31 +07:00
Ilya Tregubov 752c0c77f8 Merge branch 'MDL-78849-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-11-30 10:38:54 +08:00
Ilya Tregubov b49d7c974f Merge branch 'MDL-79325-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-11-30 09:35:45 +08:00
Jun Pataleta 1773a1926d Merge branch 'MDL-79841-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-11-29 23:48:21 +08:00
Sara Arjona 0d056137bb Merge branch 'MDL-79275-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-11-29 16:44:20 +01:00
Jun Pataleta 6822ab321b Merge branch 'MDL-80234-401' of https://github.com/aanabit/moodle into MOODLE_401_STABLE 2023-11-29 23:40:47 +08:00
Sara Arjona d8f055240a Merge branch 'MDL-80150-401' of https://github.com/lucaboesch/moodle into MOODLE_401_STABLE 2023-11-29 13:34:52 +01:00
Jun Pataleta 7527ca4c49 Merge branch 'MDL-79148-401' of https://github.com/ssj365/moodle into MOODLE_401_STABLE 2023-11-29 15:20:11 +08:00
Huong Nguyen e6023839c9 Merge branch 'MDL-80002-401' of https://github.com/roland04/moodle into MOODLE_401_STABLE 2023-11-29 09:36:52 +07:00
Huong Nguyen 2cf4f88b52 Merge branch 'MDL-79267-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-11-29 09:18:34 +07:00
Huong Nguyen 08be365c2c Merge branch 'MDL-79512-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-11-29 09:09:21 +07:00
Huong Nguyen 5c13475743 Merge branch 'MDL-76694-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-11-29 09:01:52 +07:00
Jun Pataleta a2524d8caf Merge branch 'MDL-80181-401' of https://github.com/srobotta/moodle into MOODLE_401_STABLE 2023-11-29 09:37:35 +08:00
Sara Arjona aec53e3547 MDL-80150 resource: Reintroduce file icon
The new activity card design, planned for Moodle 4.3, reintroduces
the resource MIME icon that was removed in Moodle 4.0.
This is a backport of MDL-78285.
2023-11-29 02:17:56 +01:00
Jeremy Schulz a272c2289f MDL-80180 admin: added readonly support for multicheckbox 2023-11-28 14:36:19 -05:00
Mark Johnson 055d5cb3b0 MDL-80281 session: Don't report long session locks for readonly sessions
Previously, $CFG->sessionlockdebug was reporting long session locks for
all requests, even if they defined READ_ONLY_SESSION. This change
ensures that only sessions with locks are reported.
2023-11-28 16:24:17 +00:00
Shamiso.Jaravaza 3d7b5d51b9 MDL-79148 mod_bigbluebuttonbn: fix recording link 2023-11-28 00:40:31 -07:00
Ilya Tregubov 6109f4dfd4 Merge branch 'MDL-79603-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-11-28 13:54:09 +08:00
Laurent David 57791ecd61 MDL-79841 theme_boost: Do not remove card borders
* When we are in small screensize we had removed the
left and right borders for cards. This is now restored
2023-11-28 06:39:04 +01:00
Simey Lameze 3f83ea2456 MDL-79275 behat: add one second wait to avoid random 2023-11-28 11:07:20 +08:00
Amaia Anabitarte 471838be7b MDL-80234 mod_scorm: Saved passed status requirement 2023-11-27 17:41:15 +01:00
Stephan Robotta dfb2be423b MDL-80181 wiki: fix width of left column in comments 2023-11-24 11:18:01 +01:00
Philipp Imhof b554580520 MDL-74378 mod_quiz: make sure timer is initialized 2023-11-24 08:52:35 +01:00
Huong Nguyen b1bb5671df weekly release 4.1.6+ 2023-11-24 12:23:36 +07:00
Huong Nguyen cd5d14d73b Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-11-24 12:23:29 +07:00
David Woloszyn 3fe8dbd027 MDL-80229 core: Add tolerance to min_get_minimum_revision 2023-11-24 15:58:43 +11:00
Eloy Lafuente (stronk7) 98a58ef44c Merge branch 'MDL-79966-m401' of https://github.com/sammarshallou/moodle into MOODLE_401_STABLE 2023-11-23 23:41:28 +01:00
sam marshall 95646071ae MDL-79966 core_task: NEVER_RUN_TIME did not fit in 10 digits 2023-11-23 16:25:10 +00:00
Rodrigo Mady 29d68c07af MDL-79816 block_recentlyaccesseditems: Fix modname type in WS 2023-11-23 11:52:44 -03:00
Paul Holden 773bfa9272 MDL-71336 forms: ensure grouped date elements have unique IDs.
Previously they were each taking the ID of their parent group element.
2023-11-23 12:01:38 +00:00
Andrew Nicols 2995721139 Merge branch 'MDL-79966-m401' of https://github.com/sammarshallou/moodle into MOODLE_401_STABLE 2023-11-23 10:32:05 +08:00
Huong Nguyen 6488fc6a20 Merge branch 'MDL-78496-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-11-23 09:23:46 +07:00
Ilya Tregubov 8c678d2b9a Merge branch 'MDL-80157_storedfileproblem-401' of https://github.com/leonstr/moodle into MOODLE_401_STABLE 2023-11-23 09:47:47 +08:00
Ilya Tregubov cedb8a92cb Merge branch 'MDL-79185-MOODLE_401_STABLE' of https://github.com/dmitriim/moodle into MOODLE_401_STABLE 2023-11-22 11:49:15 +08:00
Dmitrii Metelkin 402153c46e MDL-79185 cache: don't throw exception if cache data is corrupted 2023-11-22 12:47:57 +11:00
Ilya Tregubov 8337ef3be5 Merge branch 'MDL-78670-401' of https://github.com/rmady/moodle into MOODLE_401_STABLE 2023-11-22 09:11:44 +08:00
Paul Holden ecf396842f MDL-80185 lang: use iso6391 language code for HTML lang attributes.
This resolves accessibility issues where Moodle language pack codes
didn't always map to correspondingly named iso6391 codes.

Where this value is defined in the language configuration, it will
now be used.
2023-11-21 22:55:33 +00:00
Mikel Martín bde37edf3c MDL-80015 course: Fix category 'More' dropdown alignment
Co-authored-by: Stephen Sharpe <stephen.sharpe@synergy-learning.com>
2023-11-21 14:15:45 +01:00
Angelia Dela Cruz 6aeecbdf46 MDL-79828 core_badges: Delete already awarded course badges 2023-11-21 17:45:47 +08:00
Amaia Anabitarte b7ebcf7e2c MDL-79979 tool_generator: Use auto-enrol admin in new courses setting 2023-11-21 08:44:05 +01:00
sam marshall 47a38fd827 MDL-79966 core_task: Scheduled task timing (crontab fields) is wrong 2023-11-20 17:08:55 +00:00
Rodrigo Mady 3089485e57 MDL-78670 mod_quiz: Add offline atempt rule for sequential navigation 2023-11-20 12:10:18 -03:00
Juan Olivares 15a9f6f119 MDL-74248 mod_folder: Fix mp3 files being unaccessible in chrome
Platform users that host mp3 files within a folder are not able to access them using Chrome. This fix allows them to do so.
2023-11-20 11:28:33 +01:00
Laurent David dbd62ed4ea MDL-79512 mod_feedback: Add toast dialog when saved
* Add notification to notify the user once the changes have been
successfully saved
2023-11-20 06:55:29 +01:00
Laurent David 2dc6ab3567 MDL-79512 mod_feedback: Fix issue with drag and drop
* A teacher can not change the order of the questions in feedback
as the order is not saved.
2023-11-20 06:55:29 +01:00
AMOS bot 8e31874a3a Automatically generated installer lang files 2023-11-20 00:10:36 +00:00
Leon Stringer f48edc0cd1 MDL-80157 file: Exception message spelling 2023-11-17 14:36:58 +00:00
Paul Holden b2bfd0dcad MDL-79325 group: consistent name formatting in overview page/export. 2023-11-17 09:48:17 +00:00
Sara Arjona 94ad185d09 weekly release 4.1.6+ 2023-11-16 16:22:47 +01:00
Sara Arjona f0dae38957 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-11-16 16:22:42 +01:00
Paul Holden 9390787a34 MDL-78849 user: correct logical operator behaviour for guest button.
Apart from being banned per MDL-74990, it causes a subtle bug here
due to operator precedence.

Co-authored-by: Tom Mayfield <tmayfield@costrack.com>
2023-11-16 11:32:04 +00:00
Huong Nguyen e302d0d902 Merge branch 'MDL-76457-401' of https://github.com/roland04/moodle into MOODLE_401_STABLE 2023-11-16 10:58:57 +07:00
Huong Nguyen 2f04edf37f Merge branch 'MDL-80066-401' of https://github.com/elza3ym/moodle into MOODLE_401_STABLE 2023-11-16 10:53:41 +07:00
Ilya Tregubov ded87e8d92 Merge branch 'MDL-80121-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-11-16 10:01:43 +08:00
Ilya Tregubov 8ddb933f5c Merge branch 'MDL-75616-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2023-11-16 09:23:58 +08:00
Mohamed Shehata d09a390a05 MDL-80066 form: fix date picker on small screens 2023-11-15 23:46:48 +02:00
Sara Arjona e31d7bdb81 Merge branch 'MDL-79981-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-11-15 17:15:31 +01:00
Sara Arjona 246ad70ba9 Merge branch 'MDL-76937-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-11-15 16:34:21 +01:00
Sara Arjona 3f40af87e4 Merge branch 'MDL-80045-401' of https://github.com/roland04/moodle into MOODLE_401_STABLE 2023-11-15 13:47:21 +01:00
Sara Arjona a4a654348d Merge branch 'MDL-79956-401' of https://github.com/ssj365/moodle into MOODLE_401_STABLE 2023-11-15 13:32:03 +01:00
Jun Pataleta ed48b54542 MDL-80121 gradereport_singleview: Increase zero-state heading level
With the h2 heading not being rendered on the zero-state pages of the
Single view report, we need to increase the heading level of the
"Search for a user to view all their grades" and
"Select a grade item above" headings from h3 to h2.
2023-11-15 19:30:26 +08:00
Jun Pataleta d8dbfe5d25 MDL-80121 grade: Trim heading
In order to prevent rendering an empty heading <h2>, we need to make
sure that the $heading parameter passed to print_grade_page_head() is
not an empty string.
2023-11-15 19:30:26 +08:00
Dan Marsden 9dd88a4988 MDL-64431 assignfeedback_editpdf: Flatten PDF files 2023-11-15 19:30:11 +13:00
Angelia Dela Cruz 358386e4f4 MDL-79603 mod_scorm: Behat coverage for Scorm package display options 2023-11-15 11:08:14 +08:00
Huong Nguyen 6724e13007 Merge branch 'MDL-79648-401' of https://github.com/SergioComeron/moodle into MOODLE_401_STABLE 2023-11-15 09:14:19 +07:00
Huong Nguyen 56276d997f Merge branch 'MDL-79601-401' of https://github.com/roland04/moodle into MOODLE_401_STABLE 2023-11-15 09:10:06 +07:00
Andrew Nicols ca345f8853 MDL-80079 core: Correct incorrect arg to format_text::$options 2023-11-15 09:59:55 +08:00
Mikel Martín b372929c9b MDL-76457 tool_usertours: Fix tour popovers in RTL 2023-11-14 21:27:48 +01:00
Mikel Martín 559db765b3 MDL-76457 theme_boost: Fix bootstrap popovers in RTL
- Fix the arrow placement for bootstrap popovers in RTL mode.
- Remove unneded css parser workaround for popover arrows.
  After MDL-67386 was integrated those changes were not needed anymore.
2023-11-14 21:27:48 +01:00
Andrew Nicols 6179d2ba24 MDL-78496 environment: Moodle 4.4 requirements
The only changes to requirements since Moodle 4.3 are increases to:

* the minimum PHP version required; and
* the minimum required Moodle version.
2023-11-14 23:31:58 +08:00
Sara Arjona ba18db3c7c MDL-77581 lesson: Fix behat random failures 2023-11-14 16:25:02 +01:00
Andrew Nicols 61b5850a8c MDL-80079 core: Correct incorrect arg to format_string::$options 2023-11-14 22:50:36 +08:00
Mikel Martín 24f85416a7 MDL-80045 block_starredcourses: Fix cards alignment in small screens 2023-11-14 14:36:34 +01:00
Sara Arjona 69ce4b683d Merge branch 'MDL-77581-401' of https://github.com/dpalou/moodle into MOODLE_401_STABLE 2023-11-14 11:53:02 +01:00
Dani Palou f7ea9dd9cc MDL-77581 lesson: Fix generator unit tests in oracle 2023-11-14 11:08:01 +01:00
SergioComeron bce9cfdfd5 MDL-79648 core_course: 29 October repeating day 2023-11-13 18:35:44 +01:00
Sara Arjona 9ed81d3a8a Merge branch 'MDL-77581-401' of https://github.com/dpalou/moodle into MOODLE_401_STABLE 2023-11-13 17:20:44 +01:00
Mark Johnson 077465cf90 MDL-79806 mod_quiz: Implement new quiz_attempt_deleted callback 2023-11-13 15:13:15 +00:00
Paul Holden c7b9f2980e MDL-79692 enrol_meta: check for group validity when adding members. 2023-11-13 10:23:26 +00:00
Huong Nguyen 2524184384 Merge branch 'MDL-74129-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-11-13 10:43:55 +07:00
David Saylor 0a6b4bb15c MDL-75616 backup: Use standard temp directory for extraction 2023-11-13 11:08:33 +11:00
AMOS bot 99f9513b05 Automatically generated installer lang files 2023-11-12 00:10:04 +00:00
Sara Arjona 8974392cfa MDL-74129 h5p: Preserve metadata information
The metadata information was not restored when an H5P file was uploaded
(it was saved when it was edited directly from the Content bank, but the
original information in the H5P file was lost).
This patch includes all the metadata fields and its values in the original
H5P file to preserve this information too.
2023-11-10 10:34:23 +01:00
Ilya Tregubov 8ad9114050 weekly release 4.1.6+ 2023-11-10 09:17:25 +08:00
Dani Palou 5bda7cac35 MDL-77581 behat: Test create lesson pages using UI 2023-11-09 11:33:57 +01:00
Dani Palou 13ef307253 MDL-77581 behat: Apply new lesson cluster generators to existing tests 2023-11-09 11:33:57 +01:00
Dani Palou 0577c54bc0 MDL-77581 behat: Create generators for lesson clusters 2023-11-09 11:33:57 +01:00
Dani Palou cac02a15b6 MDL-77581 lesson: Fix wrong PHPDoc in some generator functions
While creating the new perform_create_page function I noticed that the PHPDoc return type of the existing functions was wrong
2023-11-09 11:09:55 +01:00
Dani Palou a979e0ce97 MDL-77581 behat: Remove lesson_student_dashboard test file
After f7c476bac5 was integrated, these tests didn't assert anything specific and similar steps are already tested in lesson_navigation
2023-11-09 11:09:04 +01:00
Dani Palou cad097a605 MDL-77581 behat: Apply new lesson generators to existing tests 2023-11-09 11:09:01 +01:00
Dani Palou 40b918348c MDL-77581 behat: Create generators for lesson pages and answers 2023-11-09 11:08:08 +01:00
Dani Palou 1184d3c20f MDL-77581 behat: Support finish_generate_ in generators 2023-11-09 11:08:08 +01:00
Laurent David 711a9c0df5 MDL-76937 core_course: Delete button can be used twice
* Disable the Delete button in the confirmation dialog once
clicked so we avoid running the process twice by mistake.
2023-11-09 09:25:40 +01:00
Shamiso.Jaravaza e9b513d561 MDL-79956 mod_bigbluebuttonbn: fix import links 2023-11-08 21:46:29 -07:00
Michael Aherne d8e0799023 MDL-80030 filelib: Fix info type. 2023-11-09 11:14:07 +08:00
Ilya Tregubov 33fa895d25 Merge branch 'MDL-79992-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-11-09 09:58:03 +08:00
Sara Arjona 93ce6e33d9 Merge branch 'MDL-79827-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-11-08 18:10:55 +01:00
Sara Arjona 4018e95a55 Merge branch 'MDL-79781-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-11-08 17:20:15 +01:00
Sara Arjona 9667e96d89 Merge branch 'MDL-76555-401' of https://github.com/pmaneggia/moodle into MOODLE_401_STABLE 2023-11-08 17:06:31 +01:00
Mikel Martín a919969ae7 MDL-79601 report_completion: Fix RTL First/Last name alignment 2023-11-08 16:23:35 +01:00
Mikel Martín 71f3a87583 MDL-79601 report_progress: Fix RTL First/Last name alignment 2023-11-08 16:23:35 +01:00
Andrew Nicols a09ecad620 MDL-79981 core: Add ability to manually run and filter phpunit on GHA 2023-11-08 12:54:03 +08:00
Ilya Tregubov e0d1d8e469 Merge branch 'MDL-79615_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-11-08 10:44:27 +08:00
Paul Holden d3070236ac MDL-79267 mod_forum: define report subplugin type language strings. 2023-11-07 09:50:08 +00:00
Huong Nguyen 8d77dd09b8 Merge branch 'MDL-78953-401' of https://github.com/pedrojordao/moodle into MOODLE_401_STABLE 2023-11-07 15:34:25 +07:00
Jun Pataleta 1ea9832c3e Merge branch 'MDL-80019-401' of https://github.com/call-learning/moodle into MOODLE_401_STABLE 2023-11-07 13:13:48 +08:00
Laurent David 9eee64d0d5 MDL-80019 mod_bigbluebuttonbn: Completion form freeze fix
* When the completion is locked, we should not be able to edit the completion elements
2023-11-06 22:12:13 +01:00
Sara Arjona 46f1b71c20 Merge branch 'mdl-78650-401-stable' of https://github.com/Fragonite/moodle into MOODLE_401_STABLE 2023-11-06 09:51:11 +01:00
Huong Nguyen 2ee8296efc Merge branch 'MDL-79062-401-2' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-11-06 10:52:57 +07:00
Paola Maneggia e2a7040d94 MDL-76555 mod_resource: Fix PHP8.0 type error (legacy resources) 2023-11-05 13:48:00 +01:00
Mikel Martín 06798fb898 MDL-80002 forumreport_summary: Fix summary report date filtering 2023-11-03 15:47:38 +01:00
Sara Arjona 8737f16faa MDL-79992 backup: Display course backups from activity restore
The Course backup area was not displaying the course backups when
accessing to the Restore page for an activity because the context
was not updated properly for this area.
2023-11-03 12:23:31 +01:00
Jake Dallimore 776319ac8e MDL-76694 core_comment: exit the js init if the element cannot be found
In pages which result in the theme_boost/embedded template being used,
blocks may be rendered and the resulting HTML ignored, leaving any JS
they may have added to run without a corresponding DOM element to act
on. This fixes that case for comments, making sure we exit gracefully
during the init if the element can't be found.
2023-11-03 10:26:49 +08:00
Pedro Jordao 76f66df235 MDL-78953 autocomplete: Add only one empty option when deselecting item.
Each option that was deselected was prepending an empty option in the select.
2023-11-02 19:05:33 -03:00
Jun Pataleta 4b302063c3 MDL-79062 behat: Add number type when guessing field type 2023-11-02 22:19:54 +08:00
Jun Pataleta ad4736b5ec MDL-79062 grade: Behat test fixes
* Feature: We can use a minimum grade different than zero
  - Use correct minimum input values.
  - Use data generators for faster test execution.
* Scenario: Disable category overriding
  - Use the field name to ensure that the correct field is being tested.
2023-11-02 21:45:26 +08:00
Jun Pataleta 6637197d97 MDL-79062 gradereport_grader: Set numeric type for grade value inputs
* Set grade inputs for grade items with type set to GRADE_VALUE to
number and add min and max input attributes, where necessary.
2023-11-02 21:45:26 +08:00
Sara Arjona dd115e572a weekly release 4.1.6+ 2023-11-02 13:41:27 +01:00
Huong Nguyen 663eed6780 Merge branch 'MDL-78903-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-11-02 10:19:12 +07:00
Huong Nguyen 883f98a3f2 Merge branch 'MDL-79801-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-11-02 10:15:40 +07:00
Huong Nguyen 0562c4d552 Merge branch 'MDL-79617_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-11-02 09:04:02 +07:00
Jun Pataleta 15409cfa41 MDL-79062 gradereport_grader: Remove setting of tabindex >= 1
Tab indices that are greater than or equal to 1 break the natural
tab order of the document and may cause problems for keyboard users.
2023-11-02 09:51:39 +08:00
Alexander Van der Bellen 116eef7a25 MDL-78650 mod_assign: Improve group submission action event handling
Don't return an event action when a group submission has already been submitted
by another student.
2023-11-01 20:28:00 +08:00
Alexander Van der Bellen 686d9cfd4c MDL-78650 mod_assign: Add Behat test 2023-11-01 20:27:54 +08:00
Alexander Van der Bellen dec259a249 MDL-78650 mod_assign: Add unit test 2023-11-01 20:27:47 +08:00
Daniel Neis Araujo f92753a3d8 MDL-73378 gradebook: Category grade null when all subgrades are null 2023-10-31 13:55:47 -03:00
Sara Arjona 3d5fa73133 Merge branch 'MDL-79856-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-10-31 13:26:45 +01:00
Huong Nguyen e4989b529a Merge branch 'MDL-79807_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-10-31 12:51:56 +08:00
Meirza f7b2fb473b MDL-78903 tiny_h5p: show repositories if editor filepicker type set 2023-10-31 08:03:26 +07:00
Meirza dc7da1a416 MDL-78903 tiny_media: show repositories if editor filepicker type set 2023-10-31 08:02:47 +07:00
Jun Pataleta c819926529 Merge branch 'MDL-77274-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-10-30 17:13:12 +08:00
Laurent David d20f1024d8 MDL-77274 core_renderer: Respect full name format in letter avatars
* Make sure that we respect the fullnamedisplay and alternativefullnameformat
parameters to decide on the initials for a given user
* Add further tests

Co-authored-by: Tatsunori Uchino <tats.u@live.jp>
2023-10-30 06:18:48 +01:00
Huong Nguyen 07c200438c Merge branch 'MDL-79639_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-10-30 11:24:02 +07:00
Jun Pataleta e146a9d8cd Merge branch 'MDL-79194-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-10-27 23:31:46 +08:00
Mark Johnson ef964137ce MDL-79615 course: Improve efficency of cache rebuilds
When bulk-updating course module visibility, set_coursemodule_visibily
was triggering a partial cache purge and rebuild for each course module.
This potentially led to 2 cache sets each requiring a lock to be
acquired and released per course module, plus any other cache updates
for other changes to the course in the same request.

This adds a new $rebuildcache paramter to the
set_coursemodule_visibilty, which is true by default to retain the
existing behaviour. If set false, it will skip doing the partial purge
and rebuild for that course module, and it is up to the calling code to
ensure the cache is updated as requried.

To assist with this, there is a new
course_modinfo::purge_course_module_cache_multiple() method, which
allows multiple course modules to be purged from the cache in a single
cache set.
2023-10-27 10:52:09 +01:00
Jun Pataleta 650474c0a7 Merge branch 'MDL-77364-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-10-27 16:32:36 +08:00
Sara Arjona 6bc193134a MDL-77364 myoverview: Display course name tooltip
Based on the feedback given by the UX team:
- The text has been increased to display more (50 vs 55).
- A tooltip has been added to display the full course name on hover,
following the accessibility guidelines.
2023-10-27 07:26:37 +02:00
Jun Pataleta 9dbbd31076 weekly release 4.1.6+ 2023-10-27 09:43:13 +08:00
Jun Pataleta 8317aa9b32 Merge branch 'MDL-79768-401-fix' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-10-26 23:05:33 +08:00
Mark Johnson 1944b58bd6 MDL-79807 quiz_statistics: Clear stats cache when question added/removed 2023-10-26 13:43:22 +01:00
Paul Holden 512670fe94 MDL-79781 course: detect invalid creator role for pending courses. 2023-10-26 13:18:41 +01:00
Paul Holden fc93938f23 MDL-79856 roles: use role localname when confirming deletion. 2023-10-26 12:01:05 +01:00
Ferran Recio 7d158f18d9 MDL-79194 core_courseformat: optimize section reload
* When reloading a section, we also forced the reloading of
course modules, resulting in doing the same work twice (once for
the section reload and once for the course module reload)
* Debounce the reloading process so prevent unwanted duplicate
reloads
2023-10-26 12:37:00 +02:00
Andrew Lyons c22b7c2f82 MDL-79194 core: Wrap combobox debounce in pending Promise
This addresses a random failure with the combobox search results where
the debounce causes the results to be shown, and then the same search
result is returned again, re-rendered, and replaced after Behat has
moved on.

Partly cherry-picked from MDL-78779.
2023-10-26 12:33:36 +02:00
Angelia Dela Cruz 8fa9f27c7e MDL-79768 fix: Fixed random failing Behat due to time difference 2023-10-26 18:00:00 +08:00
Jun Pataleta 91e083981d Merge branch 'MDL-79768-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-10-26 10:47:39 +08:00
Jun Pataleta 06ebac56c6 Merge branch 'MDL-42189-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2023-10-26 10:32:02 +08:00
Jun Pataleta 9d9e03ef10 Merge branch 'MDL-75572-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-10-25 13:44:20 +08:00
Sara Arjona 05fdc29294 MDL-75572 criteria: Only award badges to sucessfull completions
The UX team confirmed a badge shouldn't be awarded when the criteria
use a passing grade and the user gets a failing grade.
So the COMPLETION_COMPLETE_FAIL status won't be considered
completed for activities with completion that require a passing
grade.
2023-10-25 07:08:20 +02:00
Laurent David 38708efb50 MDL-79194 core_course: Refresh modules menus with section changes
* Whenever a section is hidden, we need to refresh all contextual (hamburger)
menus of each course modules.
2023-10-24 15:11:17 +02:00
Paul Holden 39ffe174e7 MDL-79827 tiny_link: show repositories only if editor filepicker set. 2023-10-23 22:20:38 +01:00
Mark Johnson fa23ae702c MDL-79617 repository_upload: Close session early in upload process 2023-10-23 15:32:58 +01:00
Angelia Dela Cruz 2d9a6fa760 MDL-79768 mod_data: Test for student can see upcoming data activity 2023-10-23 08:47:04 +08:00
David Woloszyn 1652b5281e MDL-42189 gradereport_overview: Report hidden from suspended enrolments 2023-10-23 09:47:19 +11:00
Paul Holden d8e3c31b32 MDL-79801 tag: fix report entity flagged column/filter query.
The "flag" field isn't a boolean state (1/0), it's a cumulative
count of how many times the tag has been flagged by users. This
should be accounted for to ensure that column aggregation and
filtering performs correctly.
2023-10-20 14:22:29 +01:00
Sara Arjona a985ac2e0c weekly release 4.1.6+ 2023-10-20 12:16:34 +02:00
Mark Johnson ec5d7c3227 MDL-79639 quiz_statistics: Prevent database deadlocks
This changes the cache purge code to select IDs for deletion
first, rather than using a subquery in a DELETE, since this
risks causing a deadlock in MySQL.
2023-10-19 08:58:41 +01:00
Huong Nguyen ccae21a639 Merge branch 'MDL-79689-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-10-19 10:05:37 +07:00
Sara Arjona 345d483ee2 Merge branch 'MDL-77651-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-10-18 15:47:24 +02:00
Sara Arjona 4d9b533fd4 Merge branch 'MDL-79747_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-10-18 10:29:08 +02:00
Angelia Dela Cruz 174fc341d6 MDL-79689 mod_assign: Behat for enabling anonymous submissions 2023-10-18 10:58:34 +08:00
Huong Nguyen bcbab5517b Merge branch 'MDL-79705-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-10-18 09:37:35 +07:00
Huong Nguyen 0848bf8687 Merge branch 'MDL-78979-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-10-18 09:24:21 +07:00
Jun Pataleta 11e0579540 MDL-77651 calendar: Hide left/right arrow characters
* Hide the arrow characters for the calendar templates so they won't be
read out by screen readers and avoid confusion for screen reader users.
2023-10-17 23:53:05 +08:00
Jun Pataleta cc9a537bd2 MDL-77651 core: Hide left/right arrow characters for link_arrow_xx()
* The arrow characters in link_arrow_right() and link_arrow_left()
functions get announced by screen readers. This causes confusion
and is unnecessary.
2023-10-17 23:53:05 +08:00
Paul Holden 38909cd64e MDL-79705 reportbuilder: remove checkbox field callback handling.
We no longer need special handling of this field type, because it
now returns language strings rather than HTML markup for a checkbox
element on display.
2023-10-17 16:51:34 +01:00
Paul Holden 62aa37f70d MDL-79705 profilefield_checkbox: display data as simple Yes/No. 2023-10-17 16:51:34 +01:00
Tim Hunt f6e7eb2ebd MDL-79747 quiz stats: task should run as admin the right way
The correct way to get an ad-hoc task to run as the main admin account
is to leave userid as null.

Setting it causes fatal errors if the main admin account is set to
auth: nologin.
2023-10-17 16:43:48 +01:00
Sara Arjona c0fefd0a4d Merge branch 'MDL-78481-401' of https://github.com/iarenaza/moodle into MOODLE_401_STABLE 2023-10-17 17:15:21 +02:00
Ilya Tregubov b5599f33d0 Merge branch 'MDL-79691-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-10-17 10:29:08 +08:00
Huong Nguyen 5e1588ba63 Merge branch 'MDL-79367-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-10-17 09:18:33 +07:00
Paul Holden 50618adb13 MDL-78979 mod_data: correct restore decode rule for data view page. 2023-10-16 20:53:59 +01:00
Angelia Dela Cruz 1c023e7fbb MDL-79691 mod_h5pactivity: Behat coverage for H5P activity grades reset 2023-10-16 17:06:13 +08:00
Sara Arjona c6d8aca226 Merge branch 'MDL-79566-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2023-10-16 09:54:01 +02:00
Ilya Tregubov c4c514ee46 Merge branch 'MDL-79365-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-10-16 14:08:45 +08:00
Sara Arjona 6c956d3408 MDL-79367 availability: Fail grade does not mark activities as completed
The UX team confirmed that an activity shouldn't be considered completed
when the criteria use a passing grade and the user gets a failing grade.
So the COMPLETION_COMPLETE_FAIL status won't be considered
completed from now on.
2023-10-16 07:55:12 +02:00
Huong Nguyen 052e646cdc Merge branch 'MDL-79698-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-10-16 11:40:32 +07:00
Huong Nguyen f1166fe9e6 Merge branch 'MDL-79653-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-10-16 10:55:23 +07:00
Huong Nguyen 0d45970bd3 MDL-79566 tiny_autosave: Add Javascript submission handler 2023-10-16 09:29:28 +07:00
Paul Holden d160890cab MDL-79365 customfield_textarea: ensure field uniqueness is correct. 2023-10-13 14:30:08 +01:00
Andrew Nicols d6fdd2f5f9 MDL-79698 core: Correct duplicate array key in test provider 2023-10-13 15:44:33 +08:00
Ilya Tregubov d188d58ce9 weekly release 4.1.6+ 2023-10-13 13:39:33 +08:00
Angelia Dela Cruz 1f602aabec MDL-79653 gradingform_guide: Behat coverage for deleting marking guide 2023-10-13 11:11:08 +08:00
Huong Nguyen 0257e1696f Merge branch 'MDL-79638-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-10-12 11:08:05 +07:00
Ilya Tregubov 891b6f796c Merge branch 'MDL-79160-401' of https://github.com/danghieu1407/moodle into MOODLE_401_STABLE 2023-10-12 09:44:23 +08:00
Ilya Tregubov 9fbdf21341 Merge branch 'MDL-79422-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-10-12 09:10:23 +08:00
Jun Pataleta 7e39cee0f6 Merge branch 'MDL-79633-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-10-11 13:41:36 +08:00
Huong Nguyen 82488f901d Merge branch 'MDL-78103-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2023-10-11 11:26:02 +07:00
chen levy 7744cf2f28 MDL-78103 theme: Fixed dropdown menu size by the content 2023-10-11 11:15:44 +07:00
Andrew Nicols e7263580b9 MDL-79638 phpunit: Add unit test for increment resets 2023-10-11 00:10:33 +08:00
Andrew Nicols a74443a342 MDL-79638 phpunit: Adjust version checks for mysql/mariadb hack
This hack was introduced to work around a bug in MySQL 5.6.14 and
MariaDB at the time.

https://bugs.mysql.com/bug.php?id=69882

It was addressed a few months later in 5.6.16, and 5.7.4.
MariaDB merged version 5.6.16 of MySQL's InnoDB engine in MariaDB
10.0.11 and got the patch from there.

Moodle has required MySQL 5.7, and MariaDB 10.2.29 since Moodle 3.11 and
it is therefore safe to remove these hacks for these versions.
2023-10-11 00:02:12 +08:00
Sara Arjona 7ff2d18b93 Merge branch 'MDL-79623-MOODLE_401_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_401_STABLE 2023-10-10 16:19:30 +02:00
Sara Arjona 66ff0a871f Merge branch 'MDL-77816-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-10-10 09:21:39 +02:00
Ilya Tregubov 11fe89c08e Merge branch 'MDL-79501-MOODLE_401_STABLE' of https://github.com/geichelberger/moodle into MOODLE_401_STABLE 2023-10-10 15:07:24 +08:00
Ilya Tregubov 76bd425474 Merge branch 'MDL-79279_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-10-10 11:24:47 +08:00
Ilya Tregubov aeeaea6840 Merge branch 'MDL-71414-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-10-10 10:19:44 +08:00
Paul Holden 5c30074d99 MDL-79633 mod_data: correct timemodified tag replacement attribute. 2023-10-09 19:41:12 +01:00
Laurent David 8e53ef0162 MDL-71414 mod_h5pactivity: Add a new "None" message
* In matching types of questions, sometimes the user does not answer all
questions. We now display "None" in the result report. The answer can
be either correct or incorrect.
* Fix "unknown" answer constant name.
2023-10-09 11:45:11 +02:00
Laurent David 2a2d3c85bb MDL-71414 mod_h5pactivity: Fix issue with drop down report
* Drag and Drop report were missing answers when target could be dropped on multiple
drop zones.
2023-10-09 11:45:10 +02:00
Philipp Memmel 805577664b MDL-79623 tool_componentlibrary: Fix correct modal content attribute 2023-10-09 09:14:48 +00:00
Jun Pataleta b0a7bc3f42 Moodle release 4.1.6 2023-10-07 11:30:22 +08:00
Sara Arjona fcd50e4722 weekly release 4.1.5+ 2023-10-06 14:02:25 +02:00
danghieu1407 cf9373c4dd MDL-79160 Question: Answer field overflows parent width with large size 2023-10-05 11:06:21 +07:00
Paul Holden 52ada82da2 MDL-77816 mod_bigbluebuttonbn: feedback when validating completion. 2023-10-04 21:07:31 +01:00
Yannick Schillinger fca2456e1f MDL-77816 mod_bigbluebuttonbn: Fix completionValidate argument format 2023-10-04 20:27:34 +01:00
Paul Holden 70a83735f3 MDL-79310 enrol: restrict searched users to those user can view. 2023-10-04 14:31:31 +08:00
Paul Holden a067663a63 MDL-79310 forumreport_summary: report only on users who can be viewed. 2023-10-04 14:31:31 +08:00
Paul Holden a55e18fb81 MDL-79310 mod_forum: ensure only visible users can be exported. 2023-10-04 14:31:30 +08:00
Sara Arjona bd18e026bb Merge branch 'MDL-69119-M401_angle_bracket_character_in_answers_not_escaped_in_moodle_xml_export_of_multiple_choice_calculated_questions' of https://github.com/ziegenberg/moodle into MOODLE_401_STABLE 2023-10-04 07:51:42 +02:00
Huong Nguyen c15cb5586c Merge branch 'MDL-79539-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-10-04 10:56:09 +07:00
Mikel Martín fce36ecf4f MDL-79509 mod_wiki: Improve comment editing 2023-10-04 02:10:16 +02:00
Paul Holden 8f8c4e3153 MDL-72249 message: stricter cleaning of processor type parameter. 2023-10-04 02:10:16 +02:00
Paul Holden 369c5407ab MDL-79426 gradeimport_csv: safely preview CSV content during import. 2023-10-04 02:10:16 +02:00
Paul Holden 04db4a3e54 MDL-79455 tool_uploadcourse: clean course data fields individually. 2023-10-04 02:10:16 +02:00
Paul Holden 23466dd6d1 MDL-79455 tool_uploadcourse: safe preview of uploaded course data. 2023-10-04 02:10:16 +02:00
Paul Holden 74b62601d0 MDL-79409 mod_imscp: appropriate unserialization of package structure. 2023-10-04 02:10:16 +02:00
Paul Holden f428d58df6 MDL-79408 mod_lesson: safer unserializing/comparison of properties. 2023-10-04 02:10:16 +02:00
David Woloszyn 6f2fa6011e MDL-77846 core: Make endpoint revision number checks stricter
In some places we prevented cache poisoning, in others we did not. We
also did not place any restriction on the minimum value for a revision.

This change introduces a new set of functions for configonly endpoints
which validates the revision numbers passed in. If the revision is
either too old, or too new, it is rejected and the file content is not
cached. The content is still served, but caching headers are not sent,
and any local storage caching is prevented.

The current time is used as the maximum version, with 60 seconds added
to allow for any clock skew between cluster nodes. Previously some
locations used one hour, but there should never be such a large clock
skew on a correctly configured system.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-10-04 02:10:16 +02:00
Huong Nguyen e2452a4b3c MDL-66730 core_course: Improve permission check for category moving
Co-authored-by: Erica Bithell <egb10@cam.ac.uk>
2023-10-04 02:10:16 +02:00
Laurent David fc26693229 MDL-77795 mod_bigbluebuttonbn: Change meetingID on duplicate
* We need to set a different meetingID when duplicating or importing a
BigBlueButtonBN activity to prevent unwanted sharing of recordings between
meetings.
2023-10-04 02:10:16 +02:00
Paul Holden 1eda3a392b MDL-78820 h5p: use fullname of current user as the xAPI actor name. 2023-10-04 02:10:16 +02:00
meirzamoodle c3c18bbb20 MDL-78969 oauth2: remove auto-login after successful confirmation
With the new flow, users can go to the login page from the confirmed page,
and if the user successfully logs in, the user will be directed to the confirmed page.
To avoid that, the confirmed page can only be seen by users who are not logged in.
2023-10-04 02:10:16 +02:00
Paul Holden c25092b232 MDL-78971 quiz_grading: escape user identity fields on display. 2023-10-04 02:10:16 +02:00
Jun Pataleta a7bdd7a007 weekly release 4.1.5+ 2023-10-04 07:49:17 +08:00
Jun Pataleta 99f4f6894f Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-10-04 07:49:15 +08:00
Tim Hunt 848fd484d5 MDL-79279 qformat_xml: multianswer import should support idnumber
Fix suggested by Georg Maißer.
2023-10-03 20:43:15 +01:00
Daniel Ziegenberg 0839431f16 MDL-69119 qformat_xml: fix mc calculated export
The Moodle XML export of multiple choice calculated questions was
missing proper escaping of answers. Also the indentation of the
generated xml was off.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2023-10-03 12:23:20 +02:00
Jun Pataleta cf98238fdf Merge branch 'MDL-79557-401' of https://github.com/jleyva/moodle into MOODLE_401_STABLE 2023-10-03 12:18:00 +08:00
Jake Dallimore 925c36fb1d Merge branch 'MDL-79056-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-10-03 12:03:58 +08:00
Andrew Nicols d78dda7754 MDL-78580 mod_quiz: Do not concatenate lang strings 2023-10-03 12:03:55 +08:00
Andrew Nicols 2f6519d2de Merge branch 'MDL-78580_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-10-03 11:23:54 +08:00
Huong Nguyen ff7530e1d6 Merge branch 'MDL-79247_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2023-10-03 09:57:55 +07:00
Jun Pataleta fbcb5793c3 Merge branch 'MDL-79254_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-10-03 09:42:08 +08:00
Ilya Tregubov 109879a2a1 Merge branch 'MDL-79428-401' of https://github.com/srobotta/moodle into MOODLE_401_STABLE 2023-10-03 09:41:21 +08:00
Jun Pataleta a0d2e40b4d Merge branch 'MDL-79364-401' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-10-03 09:16:27 +08:00
meirzamoodle 15c7909885 MDL-79539 core: handling negative input to get the upper value
Co-authored-by: Alain Corbière <alain.corbiere@univ-lemans.fr>
2023-10-02 20:57:08 +07:00
meirzamoodle c29a812323 MDL-79539 messageinbound: avoiding a null parameter value 2023-10-02 20:51:33 +07:00
Juan Leyva 8d65efee7c MDL-79557 message: Clean subject field content for get_messages WS 2023-10-02 14:52:25 +02:00
Ilya Tregubov 35312efbf9 MDL-79364 backup: Fix conversion for 1.9 backups.
1.9 backups used current plugin version as oldversion.
But quiz uses some hardcoded version numbers when processing
restore which is lower then current plugin number, so some quiz
logic was ignored.

See define_structure(), process_quiz_question_instance() within
restore_quiz_stepslib.php
2023-10-02 15:29:17 +08:00
Eloy Lafuente (stronk7) 96e62487e7 MDL-79247 forum: Workaround same-time discussion modified dates bug
Within the forum_get_discussion_neighbours() function of forum
when the discussions timemodified (last post) is the same, there
is a bug that does strange things when calculating the prev and
next discussions.

Note that, in real life, this is really hard to achieve, but in tests,
when multiple discussions and post can be created by generators in the
same second (specially when the test machine is quick), chances of
facing that problem are higher.

By adding 1 second wait, we ensure that the discussions won't have
the same timemodified (last post) and workaround the problem.

No mater of that, the problem deserves an issue to be created
so we guarantee from code that it also works ok when the same
timemodified (last post) situation happens.
2023-10-01 23:46:19 +02:00
Eloy Lafuente (stronk7) b342562457 MDL-79247 forum: Make discussion list ordering deterministic
Note that normally this doesn't matter much, but there are situations
when we want the discussion list ordering fully consistent /
deterministic.

Specifically, when discussions (or forum posts )are created in the
same second, or when the discussion titles are repeated, or 2
discussions have the same number of votes... (any criteria in general),
in the context of testing, we don't want the order
to be non-consistent, so we need to provide an extra sorting
criterion to make it fully deterministic.

So, in this case, we are adding a sort by discussion.id <<DIRECTION>>
that is an unique value, primary key... so cheap to calculate and,
that way, when the 1st sorting column has repeated values, the id
will decide.
2023-10-01 23:46:19 +02:00
AMOS bot 803df36ce0 Automatically generated installer lang files 2023-09-30 00:10:27 +00:00
Jun Pataleta b3ea1a9d5b weekly release 4.1.5+ 2023-09-29 22:07:19 +08:00
Jun Pataleta fb311f1eae Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-09-29 22:07:17 +08:00
Gregor Eichelberger 0b28c6a254 MDL-79501 tiny: Fix editing multiple videos
The selection gets lost while opening the modal dialogue to update an
embedded media. Caching the current selection allows us to update the
previously selected node instead of updating the first embedded media.

Signed-off-by: Gregor Eichelberger <gregor.eichelberger@tuwien.ac.at>
2023-09-29 14:11:43 +02:00
Stephan Robotta f9432283a9 MDL-79428 license: upgrading cc core licenses to version 4.0
The short name of the cc licenses are trailed with a suffix containing
the version number (current 3.0 and 4.0). The old cc* licenses become
the new cc-*-3.0 licenses and are disables, because the new cc*-4.0
licenses are the current ones.

This is a backport of MDL-43195.
2023-09-29 09:39:18 +02:00
Artur Neumann 0c4dc597d7 MDL-79487 oauth2: do not delete refresh token
when `log_out` is called from `\core\oauth2\client` it will delete the refresh token,
what it actually needs to use it to get a new access token
actually logging out is not needed here, the only thing we need to make sure is,
the invalid access token is removed from the session
that is done by storing `null`
2023-09-29 12:14:50 +08:00
Jun Pataleta adc138d1f1 MDL-79056 gradereport_user: Make column heading IDs unique
Associate column headings of user report tables to the user ID that the
report is being generated for. This will prevent duplicate IDs for the
report columns when multiple user report tables are displayed on the
User report page.
2023-09-29 11:03:36 +08:00
Jun Pataleta aff1f3a400 MDL-79056 gradereport_user: Set grade category and item names as th
* The table cells mentioned in the `headers` attribute of other table
cells need to be using the table header <th> tag. Otherwise, HTML
validation fails.
2023-09-29 11:03:36 +08:00
AMOS bot 74d66468cb Automatically generated installer lang files 2023-09-29 00:08:05 +00:00
Huong Nguyen 3b31c13678 Merge branch 'MDL-79274' of https://github.com/catalystfd/moodle into MOODLE_401_STABLE 2023-09-28 15:49:40 +07:00
Ilya Tregubov d4c9c36fcd Merge branch 'MDL-79463-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-28 16:41:19 +08:00
Sara Arjona 5299097da9 Merge branch 'MDL-79477-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-28 10:17:47 +02:00
Sara Arjona 8dad07455d Merge branch 'MDL-78918-401' of https://github.com/ssj365/moodle into MOODLE_401_STABLE 2023-09-28 09:52:49 +02:00
Sara Arjona c5707a934d Merge branch 'MDL-79350-401' of https://github.com/daledavies/moodle into MOODLE_401_STABLE 2023-09-28 07:48:06 +02:00
Huong Nguyen 6bc7b8e8be Merge branch 'MDL-78813-401' of https://github.com/mihailges/moodle into MOODLE_401_STABLE 2023-09-28 12:03:25 +07:00
Ilya Tregubov 8894b1eb42 Merge branch 'MDL-79349-m401' of https://github.com/sammarshallou/moodle into MOODLE_401_STABLE 2023-09-28 10:47:24 +08:00
Huong Nguyen f0c0dbbb06 Merge branch 'MDL-75329-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-28 09:36:49 +07:00
Ilya Tregubov 8e5eda32fe Merge branch 'MDL-79285_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2023-09-28 10:21:09 +08:00
Ilya Tregubov 20e40c3882 Merge branch 'MDL-79360/401' of https://github.com/skodak/moodle into MOODLE_401_STABLE 2023-09-28 09:38:20 +08:00
Shamiso.Jaravaza 7127744f39 MDL-78918 mod_bigbluebuttonbn: Fix notifications 2023-09-27 12:28:57 -06:00
Jun Pataleta 5d902db0d1 Merge branch 'MDL-77891-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-09-27 23:49:20 +08:00
Mark Johnson fbb6717550 MDL-79254 quiz_statistics: Convert recalculate task to ad-hoc
Previously, quiz statistics processing happened on a scheduled task.
This task looked for all quizzes with completed attempts, then
determined if those quizzes had a statistics calculation that's newer
than the most recent attempt, then ran the statistics calculation if
needed. It was hard coded to stop processing after 1 hour.

The queries involved in determining which quizzes needed processing
weren't terribly efficient, and combined with the 1 hour limit this made
the statistics unusable on large sites, where they are the most useful.

This converts the scheduled task to an ad-hoc task, and uses an event
observer for mod_quiz\event\attempt_submitted to queue a task when
it is needed. This removes the need for a query to work out what needs
processing, and allows the task processing to be scaled up as needed.
2023-09-27 15:42:41 +01:00
Shamim Rezaie ae0cdf3b67 Merge branch 'MDL-78239-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2023-09-27 14:41:23 +10:00
Huong Nguyen a76f40c81b Merge branch 'MDL-79467-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-27 10:45:07 +07:00
Ilya Tregubov 4f8a492374 Merge branch 'MDL-77708-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-09-27 09:11:38 +08:00
Eloy Lafuente (stronk7) 68a2dd57ef MDL-79285 xhprof: Add support for optional "reducedata" parameter
This new parameter / property will decide if we want to reduce
the run data before processing it:
- By default it will be disabled in table mode.
- By default it will be enabled in graph mode.
- The defaults can be changed by adding reducedata=[0|1] in the URLs
- Once data reduction is enabled, it stays enabled while
  navigating within the xhprof reports.
2023-09-26 19:40:07 +02:00
Eloy Lafuente (stronk7) c841064432 MDL-79285 xhprof: Cover the new functions with unit tests
This covers the 2 new functions with unit tests:
- xhprof_topo_sort()
- reduce_run_data()

Note that the example graph used in the provider is the
one shown in the issue to explain the reduction procedure.
2023-09-26 19:40:06 +02:00
Eloy Lafuente (stronk7) f82ca155ac MDL-79285 xhprof: Enable reducing runs data for quicker use
Here we are reducing the xhprof runs data by removing the
__Mustache==>__Mustache calls and all the orphaned data.

To save N iterations what we are doing is:

0. The information is "topologically" sorted, so we ensure that
   all the parents in the data are processed before the children.
   (this will help a lot when cleaning orphaned data, see below).
1. First pass, all the candidate (by regexp) calls are removed
   from the run data.
2. Second pass, all the orphaned information (calls that have
   ended losing his parent) are also removed, so data is consistent.
   Note that, normally we would need N passes to remove all the
   orphaned data (because each pass creates new orphan candidates),
   but, as far as we have ensured that the information is topologically
   sorted (see point 0 above), all this can be done in one unique pass.

TODO:
  - Add unit tests.
  - Enable some system to be able to decide which utilities we
    want to get the data reduced and which ones will continue
    using the complete data. Right now the reduction is being
    applied to all the utilities (both table and graph views).
  - Document the change and, if implemented, the way to select
    between complete/reduced data.
  - Consider adding some caching to speed-up the reduction process
    (some TODOs have been left in the code pointing to the critical
    points).
2023-09-26 19:40:06 +02:00
Sara Arjona b660e6979a weekly release 4.1.5+ 2023-09-26 16:17:04 +02:00
Mihail Geshoski ebf12946d6 MDL-78813 gradereport_grader: Revert border-top-width css change
Revert the modification of the border-top-width css attribute
to the grader table and the table header. This change seems to
be unnecessary.
2023-09-26 13:32:02 +02:00
Paul Holden 0195ecbf78 MDL-75329 course: defensive counting of course sections.
Avoids errors due to pre-existing integrity issues with course
data, where the absence entirely of section data would result in
PHP errors.
2023-09-26 12:18:39 +01:00
Paul Holden 98381d5ab7 MDL-79477 tool_moodlenet: better handling of network download test.
We can't assume the presense of `Content-Length` header in response
to a HEAD request. Modify test assertion to account for this.
2023-09-26 11:33:09 +01:00
Kevin Percy 00bd11b539 MDL-78813 gradereport_grader: Fixed help icon covering course average 2023-09-26 11:21:00 +02:00
Sara Arjona 54d446ce43 MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:57:33 +02:00
Huong Nguyen e8d14cde9a MDL-78239 editor_tiny: Calculate correct height for non-visible editors 2023-09-26 14:57:24 +07:00
Jun Pataleta ccbb3ce62d Merge branch 'MDL-76713-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-09-26 11:57:14 +08:00
Laurent David 4f620f537e MDL-76713 core_availability: Fix date restriction conflict
* Use a unique ID the date nodes in the HTML tree to be able to find the current node.
* Look for nodes in the same tree "leaf" and work on conflicts in this single leaf/branch.
2023-09-25 10:16:24 +02:00
Shamim Rezaie ff0b12cfd3 Merge branch 'MDL-75928-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-09-25 17:52:16 +10:00
Andrew Nicols 6988b5b328 weekly release 4.1.5+ 2023-09-23 21:38:02 +08:00
Paul Holden 282523b96a MDL-79467 output: handle empty sitename display during installation.
Causes PHP warnings when null on PHP 8.1.
2023-09-22 14:34:34 +01:00
Paul Holden d77a46c804 MDL-79463 output: invert logic in url_select change event.
Avoids eslint `consistent-return` errors (because we previously only
returned from the conditional branch).
2023-09-22 10:22:59 +01:00
Simey Lameze 3b6acb99bd MDL-75928 format_week: improve get_section_dates one week calc 2023-09-22 08:48:37 +08:00
Jun Pataleta 04461bed1c Merge branch 'MDL-79323-401-enfix' of https://github.com/vmdef/moodle into MOODLE_401_STABLE 2023-09-21 15:29:23 +02:00
Ilya Tregubov 0717d4ea0e Merge branch 'MDL-79341-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-21 14:51:12 +08:00
Ilya Tregubov 9e62b27d12 Merge branch 'MDL-71955-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-21 09:18:17 +08:00
Jake Dallimore 3c7c965a80 MDL-77891 core_calendar: support display of mod iconurl
This affects:
- event_item.mustache (day view)
- event_icon.mustache (used by month_mini and month_mini and
month_detailed templates)
2023-09-21 09:17:40 +08:00
Ilya Tregubov 3dc7b4b927 Merge branch 'MDL-68712-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-21 08:52:38 +08:00
Shamim Rezaie 24a5b078f7 Merge branch 'MDL-78895-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-20 23:43:43 +10:00
Paul Holden cee1103bec MDL-68712 enrol_self: improve detection/re-use of group enrolment keys. 2023-09-20 13:31:05 +01:00
Víctor Déniz 98419ad77a MDL-79323 lang: Fix Behat tests regressions after merging en_fix strings 2023-09-20 09:59:26 +01:00
Helen Foster 7e6930f5b9 MDL-79323 lang: Import fixed English strings (en_fix) 2023-09-20 09:59:21 +01:00
Andrew Nicols b8f45d20fd MDL-79422 ajax: Allow no-login WS calls to fetch after a failure 2023-09-20 16:02:31 +08:00
Ilya Tregubov 8e931f2073 weekly release 4.1.5+ 2023-09-20 09:03:29 +08:00
Huong Nguyen 285b364a1e Merge branch 'MDL-79370-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-19 14:30:53 +08:00
Jake Dallimore 2a2edcde93 Merge branch 'MDL-79186-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-19 11:12:51 +08:00
Dale Davies ce1f9ec96a MDL-79350 core: Do not store lang in session when readonly 2023-09-18 14:31:02 +01:00
Huong Nguyen 3720396bb4 Merge branch 'MDL-79332_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-09-18 18:57:01 +07:00
Paul Holden 47941cb17a MDL-79370 user: set profile page URL earlier, avoid subsequent error.
Co-authored-by: Dominique Palumbo <domenico.palumbo@uclouvain.be>
2023-09-18 09:26:45 +01:00
Ilya Tregubov 880e7e7298 Merge branch 'MDL-79047-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-09-18 12:25:40 +08:00
Jun Pataleta 8ebf873b65 MDL-79047 grade: Use the gradebook plugin name for the page title
* Use the appropriate gradebook plugin string for the page title.
* Improve gradebook page titles set by grade_get_plugin_info() by
listing the unique identifying information for the page first
(e.g. the gradebook plugin name), followed by broader information
(Grades + Course name), separating these bits of information using the
pipe `|` character.

For more information, check out
https://www.w3.org/WAI/WCAG21/Techniques/general/G88
2023-09-18 03:47:24 +02:00
Sara Arjona 0a09e482e4 weekly release 4.1.5+ 2023-09-15 17:34:04 +02:00
Mark Johnson e6b80e155b MDL-78580 report_statistics: Prevent database deadlocks when viewing
If a quiz had a long job to calculate statstics running, this would
cause pages that may also attempt a recalculation (the statistics report
page or question bank) to load very slowly, and possibly result in a
database deadlock.

This change will firstly prevent the question bank page performing
analysis calculations at all, since these are not required for this
page, which will speed up loading and prevent deadlocks on this page.

Secondly, this adds a lock to the recalcuation process so that it cannot
run twice concurrently. This will present the user with a message to
indicate that it is waiting for a running calculation until it is
complete, and eventually it will timeout with a message and debugging.
2023-09-15 15:16:12 +01:00
Petr Skoda e42eeb62b0 MDL-79360 filter: fix nolink tag regression from MDL-77525 2023-09-15 12:45:02 +02:00
Ilya Tregubov a5f1d86040 Merge branch 'test4' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-09-15 17:38:42 +08:00
Jun Pataleta c0ec027149 MDL-79057 grade: Remove block-level elements within buttons
Replace <div> tags within <button> tags for the selector
buttons in the grade pages.
2023-09-15 17:37:20 +08:00
Huong Nguyen 02e7ab212a Merge branch 'MDL-79283-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-15 17:37:19 +08:00
Jun Pataleta 312f80d1d7 Merge branch 'MDL-79291-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-15 17:37:19 +08:00
Luca Bösch 767e147dac MDL-79226 questions: check for UTF-8 encoding of the import file 2023-09-15 17:35:33 +08:00
Huong Nguyen c2e501e144 Merge branch 'MDL-78728-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-15 17:32:44 +08:00
Huong Nguyen 978fb4f1fe Merge branch 'MDL-79057-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-09-15 17:32:44 +08:00
Ilya Tregubov 748814dc61 Merge branch 'MDL-79220-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-09-14 17:43:57 +08:00
sam marshall f6f0787fc8 MDL-79349 core_cache: Lock on multi-layer cache can behave incorrectly 2023-09-14 09:32:09 +01:00
Paul Holden 00d7ed9518 MDL-79283 core: add title to embedded iframe, for accessibility. 2023-09-14 09:26:32 +01:00
Jun Pataleta cdb81ef363 Merge branch 'MDL-79181-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-09-14 14:02:29 +08:00
Ilya Tregubov 8a72397e0a Merge branch 'MDL-79195-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-09-14 09:37:53 +08:00
Paul Holden a3ddbca835 MDL-79341 core: more robust testing of user-agent curl response.
The external test file URL concerns itself only with HTTP_USER_AGENT
matching, not sending response headers, which can differ according to
HTTP protocol in use by the endpoint (1.1 vs 2).

Given the returned response code itself is irrelevant to the testcase,
there's not much benefit to asserting it and risking random failures.
2023-09-13 13:36:28 +01:00
Ilya Tregubov f154d35e13 Merge branch 'MDL-78806-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-09-13 10:55:47 +08:00
Eloy Lafuente (stronk7) 5058c46813 weekly release 4.1.5+ 2023-09-12 18:54:06 +02:00
Tim Hunt aea590716a MDL-79332 Question stats: make loading robust to bad data
We were experiencing problems caused by old stats analysis in our
database, computed when there was a bug, causing fatal errors
when they were displayed. Therefore, this code needs to be robust to that.
2023-09-12 16:59:02 +01:00
Angelia Dela Cruz 5d23cfe21f MDL-79195 core_course: Activity and resource description display behat 2023-09-12 12:20:49 +08:00
Huong Nguyen 05c1fb3794 Merge branch 'MDL-79246-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-09-12 08:51:23 +07:00
Paul Holden 0f4b831249 MDL-71955 h5p: ensure embedded player sets up $PAGE correctly.
For module context, it should set the current cm and course to
ensure consistency in navigation API.
2023-09-11 10:18:20 +01:00
Paul Holden 721b02a270 MDL-79186 task: fix evaluation of 'X/Y' cron field format.
The above syntax is defined as supported by the class, for example the
format '5/10' means:

"At every 10th <unit> from 5 through <max>."

It is analogous to '5-<max>/10'.
2023-09-11 09:22:26 +01:00
Jake Dallimore e8e5b279b0 Merge branch 'MDL-79048-401-2' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-09-11 13:00:51 +08:00
Ilya Tregubov b0a931b48a Merge branch 'm41_MDL-63539' of https://github.com/danmarsden/moodle into MOODLE_401_STABLE 2023-09-11 11:15:33 +08:00
Jake Dallimore 35e8d7517f MDL-79181 core: update LinkedIn OAuth template to use OIDC
The old method (sign in with linkedin) is deprecated:
https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin

This replaces this with the new method:
https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2

This is not entirely OIDC compliant, however. The well known
openid-configuration isn't present at the issuer root and the 'locale'
claim contains an object instead of a string. These are worked around.
2023-09-11 10:42:35 +08:00
Jun Pataleta 007988a5f2 MDL-78806 mod_assign: Use new Behat step for checking page title 2023-09-10 10:54:18 +08:00
Jun Pataleta 9b6ed477f8 MDL-78806 behat: Create a step that for checking the page title
Create a Behat step "the page title should contain ':title'" to check
the page title.
2023-09-10 10:54:18 +08:00
Jun Pataleta 94efef85bb MDL-78806 behat: More lenient checking of page title
Instead of doing an exact checking of the page title in
\behat_hooks::before_step(), do a more lenient check by checking that
the page title contains the acceptance test's site name.
2023-09-09 21:28:53 +08:00
Jun Pataleta 89e853437b MDL-78806 core: Add upgrade.txt notes 2023-09-09 08:58:03 +08:00
Jun Pataleta 6664d3ebe6 MDL-78806 admin: Consistent page title during upgrade and install
* Use the page title separator constant when displaying the page title
during upgrade and installation.
* No need to display the site name during install when because it hasn't
been set at this point.
2023-09-09 08:56:50 +08:00
Jun Pataleta d7cae15e57 MDL-78806 admin: Display the most unique information in the title first
* Page titles should display the most unique information first. For
admin pages it would be useful to display the information that
is unique to the page first before the broader categories that the
page belongs to.
* Also use the new page title separator constant.
2023-09-09 08:56:50 +08:00
Jun Pataleta 49393a1608 MDL-78806 core: Remove redundant site name
MDL-78806 core: Remove redundant site name on page titles

* With the site name now being appended to the page titles, there
is no need to manually append the page titles.
2023-09-09 08:56:50 +08:00
Jun Pataleta 143a3bf38b MDL-78806 core: Append site name on page title 2023-09-09 08:56:50 +08:00
Jun Pataleta 5c9a0a80fc MDL-78806 admin: Setting for displaying site name in page title
* A new config setting `sitenameintitle` for displaying the site name
on the page has been created.
2023-09-09 08:56:50 +08:00
Jun Pataleta d1bc94905e weekly release 4.1.5+ 2023-09-08 22:35:13 +08:00
Jun Pataleta fb8885a56e Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-09-08 22:35:11 +08:00
Jun Pataleta 0c239cb841 MDL-78549 multianswer: Prevent default when clicking feedback trigger 2023-09-08 22:23:00 +08:00
Huong Nguyen f8d8553da6 Merge branch 'MDL-78549-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-09-08 22:23:00 +08:00
Andrew Nicols b952716548 MDL-79277 tool_mobile: Correct default value for empty param 2023-09-08 22:22:59 +08:00
Andrew Nicols c9c629dcf7 Merge branch 'MDL-79277-401' of https://github.com/noeldemartin/moodle into MOODLE_401_STABLE 2023-09-08 22:22:59 +08:00
Andrew Nicols d7834ce7c3 Merge branch 'MDL-79250-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-09-08 22:22:59 +08:00
Andrew Nicols 426e4043a4 MDL-79264 tiny_equation: Correct debounce method
The debounced method was being called immediately instead of being
debounced.
2023-09-08 22:22:59 +08:00
Andrew Nicols c28639acd9 Merge branch 'MDL-79264-MOODLE_401_STABLE' of https://github.com/geichelberger/moodle into MOODLE_401_STABLE 2023-09-08 22:22:59 +08:00
Andrew Nicols a164c6b5f8 Merge branch 'MDL-68435-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-08 22:22:58 +08:00
Andrew Nicols 54271fa749 Merge branch 'MDL-78917-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-08 22:22:58 +08:00
Jun Pataleta 6e0210764a MDL-79048 course: Add editing versions of course view page titles
* Create 'editing' versions of the coursetitle and coursesectiontitle
lang strings used for the page title of the course homepage and use
these when editing mode is turned on to provide immediate information
to users, especially screen reader users, the current state of the
course homepage.
2023-09-08 21:58:45 +08:00
AMOS bot c72cd82baf Automatically generated installer lang files 2023-09-08 00:10:46 +00:00
Paul Holden 11867ee8eb MDL-79291 h5p: handle content type creation errors in test generator.
If the endpoint is temporarily down and/or misbehaving, then at least
we'll a clearer failure message.
2023-09-07 15:39:05 +01:00
Jun Pataleta 35209a1d79 Merge branch 'MDL-78795-MOODLE_401_STABLE' of https://github.com/phmemmel/moodle into MOODLE_401_STABLE 2023-09-07 14:17:00 +08:00
Angelia Dela Cruz fe07a2032c MDL-79220 mod_glossary: Behat for glossary entry with attachment 2023-09-07 10:13:08 +08:00
Francis Devine 57a1df54e1 MDL-79274 assignfeedback_editpdf: Fix permission error in conversion
This was causing the adhoc task to fail with a nopermission error, when
a user was unenrolled from a course before their assignment submission
could be converted into a pdf.

Comments from MDL-56810 indicate the correct approach is to not attempt
a conversion in those cases.
2023-09-07 09:27:22 +12:00
Paul Holden 0ef9be6004 MDL-78895 mod_url: fix double encoded ampersands in URL.
Also restore the `$attributes` property (previously `$extra` prior
to 8d8af19a) to define URL opening behaviour, e.g. in popup or new
window.
2023-09-06 13:24:46 +01:00
Jun Pataleta 51655f3485 MDL-79057 gradereport_singleview: Use proper hidden attribute value
HTML attribute hidden="1" is invalid. It either needs to be set to an
empty string or use the keyword "hidden" for its value.
2023-09-06 18:39:15 +08:00
Jun Pataleta bf9a2f43ad MDL-79057 gradereport_singleview: Remove tabindex > 0 for elements
A tab index with a non-zero value messes up with the logical tab order
of a page.
2023-09-06 18:39:15 +08:00
Noel De Martin e3bf7ce603 MDL-79277 tool_mobile: Fix warning 2023-09-06 09:08:47 +02:00
Ilya Tregubov 633d64262d Merge branch 'MDL-76865-401' of https://github.com/daledavies/moodle into MOODLE_401_STABLE 2023-09-06 14:49:02 +08:00
Andrew Nicols ba4393023f Merge branch 'MDL-79205-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-06 12:52:51 +08:00
Andrew Nicols 608c5044ae Merge branch 'MDL-79244-401' of https://github.com/lucaboesch/moodle into MOODLE_401_STABLE 2023-09-06 12:51:23 +08:00
Ilya Tregubov d46c7851ca Merge branch 'MDL-76459_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2023-09-06 10:03:19 +08:00
Luca Bösch b3b813c610 MDL-79244 backup: fix typo for questioncannotberestored.
AMOS BEGIN
 MOV [questionegorycannotberestored,backup],[questioncannotberestored,backup]
AMOS END
2023-09-05 22:30:45 +02:00
Paul Holden a2628c3345 Merge branch 'MDL-76419-401' of https://github.com/rjnl/moodle into MOODLE_401_STABLE 2023-09-05 17:18:32 +01:00
Andrew Nicols 3fddb9017e weekly release 4.1.5+ 2023-09-05 22:26:37 +08:00
Andrew Nicols 4d2d641d0c Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-09-05 22:26:33 +08:00
AMOS bot a779a64656 Automatically generated installer lang files 2023-09-05 14:25:10 +00:00
Gregor Eichelberger dadf19ad3f MDL-79264 tiny: Replace hardcoded contextid
The `contextid` argument of the `tiny_equation_filter` AJAX call is
hardcoded to 1, which causes trouble if the context table does not start
with id 1.

Signed-off-by: Gregor Eichelberger <gregor.eichelberger@tuwien.ac.at>
2023-09-05 13:27:20 +02:00
Paul Holden b1abcd1f42 MDL-79205 webservice: gracefully handle invalid functions in docs. 2023-09-05 08:51:56 +01:00
Jun Pataleta 192210f90e Merge branch 'MDL-78874-401' of https://github.com/danghieu1407/moodle into MOODLE_401_STABLE 2023-09-05 12:05:42 +08:00
Andrew Nicols 48d0cf6dd9 Merge branch 'MDL-79060-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-09-05 11:23:34 +08:00
Jun Pataleta 68b1a94a2e MDL-79060 course: Use course name for the course image link 2023-09-05 11:10:59 +08:00
Andrew Nicols 0e857d3710 Merge branch 'MDL-79230-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-05 10:56:55 +08:00
Andrew Nicols a898eb1964 Merge branch 'MDL-79236-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-05 10:44:32 +08:00
Andrew Nicols d3bb9121fd Merge branch 'MDL-79191-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-05 10:33:40 +08:00
Jun Pataleta b22a25f208 MDL-78549 qtype_multianswer: Configure feedback popover trigger via JS
* For some reason, the `data-trigger="hover focus"` does not work when
rendering the popover via HTML. It just defaults to click, so the
feedback popover for qtype_multianswer questions does not show on hover.
Configuring the feedback popover's trigger via JS seems to work.
2023-09-05 09:36:08 +08:00
AMOS bot 31d6d42cfc Automatically generated installer lang files 2023-09-05 00:11:50 +00:00
Rajneel Totaram 765ea5dbc3 MDL-76419 calendar: Respect $CFG->autologinguests on frontpage 2023-09-05 10:43:17 +12:00
Paul Holden 3b2690ef9c MDL-78728 forms: correctly refer to outermost form element.
Read-only forms do not belong to a <form> element, so we can't refer
to that. Instead find the `.mform` element (which exists for regular
and read-only forms).
2023-09-04 16:43:59 +01:00
Paul Holden d5dbe92232 Merge branch 'MDL-79232-401' of https://github.com/marinaglancy/moodle into MOODLE_401_STABLE 2023-09-04 11:38:13 +01:00
Paul Holden 25e159d1c5 MDL-68435 customfield: fix plugin file serving callbacks.
Incorrect parameter/method call was previously serving files with
wrong filenames.
2023-09-04 10:45:28 +01:00
Jun Pataleta b7087ee353 MDL-79250 admin: Add title to external_content_banner template 2023-09-04 16:54:16 +08:00
Paul Holden ed818157bb MDL-78917 webservice: extra data in exception for missing classpath.
Include the external function classname & methodname properties in
the thrown exception, to aid diagnostic.
2023-09-04 09:03:32 +01:00
Andrew Nicols 62648c74d8 MDL-79246 gradingform_rubric: Use i_click_on for behat clicks 2023-09-04 09:13:02 +08:00
Philipp Memmel 7b105cb467 MDL-78795 core_form: Fix repeated elements JS problem
Co-authored-by: Stefan Hanauska <stefan.hanauska@csg-in.de>
2023-09-03 14:12:39 +02:00
Eloy Lafuente (stronk7) 1e3c3ec907 MDL-76459 xmldb: Add environmental check to verify $CFG->prefix
While, right now, sites using long (> 10 chars) $CFG->prefix
can continue working (because we still don't have any table
> 28 chars), as soon as some new table with long name is added,
it won't work with PostgreSQL anymore (if the 63 limit is raised).

Hence, this environmental check will verify on both install and
upgrade that the $CFG->prefix is always <= 10 chars.

Sites with longer prefixes will need to rename all their tables
(and maybe other objects, depending on the dbtype) to use a shorter
prefix.
2023-09-02 09:22:28 +02:00
Andrew Nicols 8ac8ea416a weekly release 4.1.5+ 2023-09-02 08:18:32 +08:00
Paul Holden 2cfc22350b MDL-79236 editor_tiny: define subplugin type language strings. 2023-09-01 19:25:03 +01:00
Paul Holden 5c93b9fa6d MDL-79230 editor_tiny: fix plugin info manage URL.
Co-authored-by: Meirza <meirza.arson@moodle.com>
2023-09-01 15:19:52 +01:00
Marina Glancy 0ad9a91cf0 MDL-79232 navigation: fix undefined var warning 2023-09-01 14:28:00 +01:00
Huong Nguyen 6d381af4ab Merge branch 'MDL-74828-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-09-01 10:54:43 +07:00
Huong Nguyen 6d966ab9be Merge branch 'MDL-76092-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-09-01 10:42:24 +07:00
Andrew Nicols 4ba4250301 Merge branch 'MDL-78966-401' of https://github.com/rjnl/moodle into MOODLE_401_STABLE 2023-09-01 11:32:21 +08:00
Andrew Nicols aafe17e92a Merge branch 'MDL-78179-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-09-01 11:27:05 +08:00
Ilya Tregubov d281a2bb43 Merge branch 'MDL-74429-401' of https://github.com/roland04/moodle into MOODLE_401_STABLE 2023-09-01 11:15:51 +08:00
Andrew Nicols e3b5759ca7 Merge branch 'MDL-79190-401' of https://github.com/jbs1/moodle into MOODLE_401_STABLE 2023-09-01 11:13:07 +08:00
Ilya Tregubov c526971857 Merge branch 'MDL-78745-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-09-01 10:55:41 +08:00
Andrew Nicols d474c049d1 Merge branch 'MDL-79045-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-09-01 10:47:34 +08:00
Andrew Nicols c2d8196aa2 Merge branch 'MDL-77831-401' of https://github.com/mickhawkins/moodle into MOODLE_401_STABLE 2023-09-01 10:38:29 +08:00
Ilya Tregubov 432201670d Merge branch 'MDL-79202-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-01 10:30:36 +08:00
Ilya Tregubov 23f56c13a6 Merge branch 'MDL-79107-401-2' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-09-01 09:27:21 +08:00
Andrew Nicols 3053acf475 MDL-79107 editor_tiny: Target correct element on editor removal 2023-09-01 09:07:59 +08:00
Paul Holden 7bd76a1230 MDL-79191 grade: correct column type for the grade column (float). 2023-08-31 15:47:24 +01:00
Jun Pataleta 183901ec6d Merge branch 'MDL-79107-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-31 21:09:37 +08:00
Jun Pataleta e6e6c7e7b3 MDL-79107 qtype_essay: Move non_form_fields.feature under qtype_essay 2023-08-31 21:07:07 +08:00
Andrew Nicols 4ce427c2ac MDL-79107 editor_tiny: Inform Behat of field type 2023-08-31 21:07:07 +08:00
Jun Pataleta 2a6e9817f1 Merge branch 'MDL-79017-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-31 20:32:03 +08:00
Michael Hawkins 890217e23e MDL-77831 core: Updated security.txt expiry and added additional info 2023-08-31 18:29:48 +08:00
Jun Pataleta e3cee463b1 Merge branch 'MDL-77657-401-get_extra_scss_code-wrong-order' of https://github.com/danowar2k/moodle into MOODLE_401_STABLE 2023-08-31 17:50:56 +08:00
Huong Nguyen 9b0f057357 Merge branch 'MDL-79207-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-08-31 12:27:02 +07:00
Angelia Dela Cruz 5a61806325 MDL-79207 core_course: Behat coverage for activity and resource deletion 2023-08-31 10:40:05 +08:00
Jun Pataleta 489a9fc818 MDL-79045 grade: Don't enclose grade user_heading in $OUTPUT->heading()
Do not enclose \core_grades_renderer::user_heading() in
$OUTPUT->heading() and enclose the user's name in the user heading in
<h2> tags instead.
- Having <div> inside <h2> results in errors in HTML validation.
- Enclosing the whole user heading in <h2> results in the other
elements in the user heading (Message, Add to contacts) to be announced
to screen readers which can result in confusion.
2023-08-31 09:24:08 +08:00
Sara Arjona 8ad1cceadf Merge branch 'MDL-78612-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-08-30 17:55:45 +02:00
Andrew Nicols 92d73c9dee MDL-78612 core: Wrap modal_factory.create in pendingPromise 2023-08-30 12:42:22 +08:00
meirzamoodle c2bdabd63c MDL-78745 editor_tiny: Stored text in non-entity form
TinyMCE has a default entity_encoding 'named',
which causes text with diacritic symbols to be converted to HTML entities,
e.g. pâté will be convert to p&acirc;t&eacute;
That will be a problem with the Glossary auto-linking filter if a course has a text concept like pâté,
then the filter will likely fail to get the text concept.
Changing the TinyMCE entity_encoding to 'raw' will resolve the problem.
2023-08-30 09:18:31 +07:00
Paul Holden 6625276c7f MDL-79202 tool_mobile: correctly interpolate minutes in exception. 2023-08-30 00:12:27 +01:00
Jeremy Schulz 32412f8a13 MDL-79190 theme_boost: removed obsolete comment 2023-08-29 17:11:31 -04:00
Sara Arjona 8083d74fe2 Merge branch 'MDL-72359-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2023-08-29 16:16:02 +02:00
Huong Nguyen 41722cf56e MDL-72359 core_analytics: Better handling of MAX_TIME
We are limited by both PHP's max int value and DB (cross-db) max int allowed.
We need to use the smallest one
2023-08-29 20:37:49 +07:00
Ilya Tregubov 6e162e4bcd Merge branch 'MDL-78615-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-29 11:59:56 +08:00
Huong Nguyen 3c480d41ec Merge branch 'MDL-72359-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-08-29 10:58:27 +07:00
Huong Nguyen 5f681d2ae2 Merge branch '78241-401-tiny-recordrtc-fix-availability-conditions' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_401_STABLE 2023-08-29 10:53:38 +07:00
Huong Nguyen 527e300076 Merge branch 'MDL-78961-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-29 10:48:10 +07:00
Andrew Nicols 0356a9ba84 Merge branch 'MDL-79059-401-2' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-29 11:37:07 +08:00
Andrew Nicols 04dda99502 Merge branch 'MDL-79169-int-deprecate-401' of https://github.com/Peterburnett/moodle into MOODLE_401_STABLE 2023-08-29 11:21:00 +08:00
Sara Arjona 96c8cc1590 Merge branch 'MDL-78980-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-28 16:56:36 +02:00
Sara Arjona 33847c2920 Merge branch 'MDL-78707-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-28 16:40:58 +02:00
Sara Arjona 2a6000fc36 Merge branch 'MDL-78656-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-28 16:29:57 +02:00
Sara Arjona ccd2ea3d60 Merge branch 'MDL-78749-401' of https://github.com/BruceGoodGuy/moodle into MOODLE_401_STABLE 2023-08-28 14:26:13 +02:00
Sara Arjona 8baa08a6bc MDL-78179 badges: Clean SESSION when user disconnect backpack
The token information was not being properly cleared from the $SESSION.
As a result, certain errors were occurring when users attempted to
reconnect within the same session.
2023-08-28 13:34:06 +02:00
vtos db8e366ed9 MDL-61811 enrol_manual: fixed updating of 'notifyall' field
When updating a manual enrolment instance, the value of 'notifyall' field must be calculated automatically based on the value of
'expirynotify' field. The relevant plugin's method missed that, thus, the value of 'notifyall' field was never updated when
editing a manual enrolment instance and changing the 'expirynotify' setting.

A functional test has been added to test the entire behaviour of the relevant plugin's method.
2023-08-28 16:09:45 +08:00
Ilya Tregubov bc67d4491c Merge branch 'MDL-79139-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-28 15:40:51 +08:00
dor 64f63faa3a MDL-74828 media_videojs: fix loading icon position for RTL 2023-08-27 16:58:03 +08:00
Jun Pataleta 60810e78fb weekly release 4.1.5+ 2023-08-26 11:03:23 +08:00
Jun Pataleta aca404163c Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-08-26 11:03:20 +08:00
Jun Pataleta 319cc7c82c MDL-79059 core: Use full name as alt text for user picture links
When the user picture is being rendered as a link but the user's full
name is not being included in the link and the alt text turns out to be
empty, we could end up with a link without a discernible text. This is
an accessibility issue that will affect screen reader users. If this is
the case, use the full name as the user picture's alt text.
2023-08-26 10:40:34 +08:00
Jun Pataleta 9db9ff3028 MDL-79059 mod_data: Enclose preset options within a fieldset
Enclosing the radio buttons in a fieldset to provide additional context
to the purpose of the fields.
2023-08-26 10:40:34 +08:00
Jun Pataleta bd76d860c0 MDL-79059 mod_data: Fix presets accessibility issues
* Add sr-only column headers for the select and actions columns.
* Define unique IDs for the preset name links using array indices.
* Label the radio buttons via aria-labelledby attribute pointing to
the ID of the preset's link.
2023-08-26 10:40:34 +08:00
Julien Boulen c79c417ea0 MDL-78241 tiny_recordrtc: fix availability conditions 2023-08-25 18:17:11 +02:00
Jun Pataleta e12ef27c0a Merge branch 'MDL-78397-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-25 11:52:43 +08:00
Jun Pataleta e2b9b37846 Merge branch 'MDL-78386-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-25 11:38:55 +08:00
Jun Pataleta fe72c72682 Merge branch 'MDL-77988-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-25 10:35:45 +08:00
Jun Pataleta ec3723d8d0 Merge branch 'MDL-79015-401-fix' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-08-25 09:53:33 +08:00
Peter Burnett 7dac997bdc MDL-79169 admin: Fix implicit int cast in maintenance warning 2023-08-25 11:15:07 +10:00
Simey Lameze ea1cf5d927 MDL-79015 behat: make verification step more specific 2023-08-25 08:55:08 +08:00
AMOS bot 4756f9876c Automatically generated installer lang files 2023-08-25 00:11:58 +00:00
Andrew Nicols 0d3cdb0c10 Merge branch 'MDL-79075-attempt_reviewed-401' of https://github.com/leonstr/moodle into MOODLE_401_STABLE 2023-08-25 00:16:15 +08:00
Andrew Nicols 748acadd05 Merge branch 'MDL-79063-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-25 00:13:21 +08:00
Andrew Nicols a9a76642a4 Merge branch 'MDL-79073-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-25 00:07:20 +08:00
Andrew Nicols bf47757ef3 Merge branch 'MDL-78811-MOODLE-401' of https://github.com/aydevworks/moodle into MOODLE_401_STABLE 2023-08-25 00:02:49 +08:00
Andrew Nicols c0ab693e4e Merge branch 'MDL-78787-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-24 23:58:57 +08:00
Sara Arjona 5c7f1b85c6 Merge branch 'MDL-78688-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-24 17:35:14 +02:00
Sara Arjona d437bdafc4 Merge branch 'MDL-78965-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-08-24 16:38:36 +02:00
danghieu1407 fc3cbd5015 MDL-78874 accessibility: Improve descriptive text for check button 2023-08-24 20:47:58 +07:00
Huong Nguyen de8180935f Merge branch 'MDL-78533-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-24 15:36:33 +07:00
Huong Nguyen 7b720a1f56 Merge branch 'MDL-78502-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-24 15:30:34 +07:00
Huong Nguyen f12e010847 Merge branch 'MDL-78302-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-24 15:26:39 +07:00
Jun Pataleta 87a9b1c8ba Merge branch 'MDL-79015-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-08-24 15:53:14 +08:00
Angelia Dela Cruz a16624f94c MDL-78965 mod_quiz: Behat coverage for quiz with certainty-based marking 2023-08-24 15:01:50 +08:00
Jun Pataleta e25d28ff05 Merge branch 'MDL-78941-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-08-24 13:05:49 +08:00
Angelia Dela Cruz 1b18e3328e MDL-79015 mod_lesson: Behat coverage for lesson with access restriction 2023-08-24 12:53:58 +08:00
Huong Nguyen 3a6c0872b9 Merge branch 'MDL-69187-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-24 10:39:35 +07:00
Angelia Dela Cruz 60e74092cd MDL-78941 mod_quiz: Behat coverage for student flagging quiz questions 2023-08-24 10:56:00 +08:00
Huong Nguyen 45bd1bfa49 Merge branch 'MDL-78843-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-08-24 08:58:03 +07:00
Sara Arjona 6f0e80bd21 Merge branch 'MDL-65363-starred-courses-only-include-enroled-courses-MOODLE_4.1' of https://github.com/stopfstedt/moodle into MOODLE_401_STABLE 2023-08-23 15:27:48 +02:00
Paul Holden c5967dd7d0 MDL-79139 check: clarify default user role action text. 2023-08-23 13:35:44 +01:00
Daniel Poggenpohl a06d7f47be MDL-72359 core: Changed MAX_TIME from 9999999999 to PHP_INT_MAX
This prevents automatic casting from int to double on 32 bit systems
(which have a maximum for integers of 2147483647)

Whilst Moodle does not support 32-bit systems any longer, this is still
worth doing to prevent future issues.
2023-08-23 14:34:32 +08:00
Andrew Nicols 19a25450d2 MDL-76092 core_backup: Unit tests for convert_params_to_values 2023-08-23 14:19:05 +08:00
Paola Maneggia 64fe594e85 MDL-76092 core_backup: Fix PHP8.0 vulnerability convert_params_to_values 2023-08-23 13:26:44 +08:00
Paul Holden ae51bda773 MDL-78787 dml: native casting to char in SQL Server driver.
Ensure the same is used during concatentation to prevent truncation
of data, which was previously set at 255 characters per field.
2023-08-23 00:55:18 +01:00
Paul Holden 367f2bf707 MDL-78961 admin: correct smtppass preset configuration name. 2023-08-22 18:27:36 +01:00
Paul Holden f7b3caac2c MDL-78656 output: display menu item titles in primary navigation.
Since custom menu items were merged into the primary navigation/more
menu as part of 56c34d71 and related work, the "title" attribute of
each custom menu item was lost.
2023-08-22 17:30:04 +01:00
Andrew Nicols 6dcb455973 MDL-69187 core_file: Unit test for file_get_typegroup string types 2023-08-22 17:10:36 +01:00
Paul Holden ec92edec88 MDL-78688 admin: define accepted filetype for uploaded preset file. 2023-08-22 15:32:14 +01:00
Sara Arjona 4adae8e489 weekly release 4.1.5+ 2023-08-22 15:51:02 +02:00
Paul Holden 8034ad8be2 MDL-69187 files: normalize retrieval of mimetypes from groups array.
Ensure that the following both return consistently, so that filepicker
form elements behave the same for each when defining "accepted_types":

    '.html, .txt'
    ['.html', '.txt']
2023-08-22 09:56:17 +01:00
Paul Holden 08344a8c4b MDL-79073 question: detect missing context when deleting question. 2023-08-22 09:45:25 +01:00
Paul Holden 434e5af241 MDL-78386 search: specify correct parameter type for search area. 2023-08-22 08:12:07 +01:00
Paul Holden f9aa8a5d75 MDL-79017 core: re-factor method to unserialize array.
We can use the existing helper for object unserialization as the
base for this method, rather than manual string parsing.
2023-08-21 21:02:45 +01:00
Leon Stringer fe3054d05b MDL-79075 quiz: Fix transposed user IDs
In the description of "Quiz attempt reviewed" events the user IDs of
the reviewer (typically the teacher) and the reviewee (typically the
student) were the wrong way round.
2023-08-21 15:50:28 +01:00
Paul Holden 5af5c5d0a6 Merge branch 'MDL-79071-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-21 15:32:44 +01:00
Paul Holden 194458b229 MDL-78707 forms: improve form container collapsing mechanism.
By using a more explicit selector for matching containers we avoid
previous problems such as incorrect count, and collapsing of elements
that had the same class name.
2023-08-21 12:38:57 +01:00
Paul Holden 4538b46a96 MDL-78397 course: update module name using API after duplicating.
This ensures that various ancillary tasks are also performed (such
as ensuring the gradebook item name matches).
2023-08-21 10:56:45 +01:00
Paul Holden e4ba5d276d MDL-78533 grade: relax param type of itemname in external structures.
Ensure it conforms to the same format as allowed for course modules.
2023-08-21 10:54:24 +01:00
Paul Holden 79e12570d9 MDL-78502 grade: consider only those export formats user can access. 2023-08-21 10:47:06 +01:00
Paul Holden b971d76406 MDL-78615 cache: display failure notifications deleting lock/store. 2023-08-21 10:45:23 +01:00
Huong Nguyen 4a3603d49c Merge branch 'MDL-65887-401' of https://github.com/lucaboesch/moodle into MOODLE_401_STABLE 2023-08-21 10:57:48 +07:00
Stefan Topfstedt e4b3b1c79b MDL-65363 block_starredcourses: only list enroled courses
Filter out any starred courses that the logged-in user is not enroled in.
2023-08-18 11:06:46 -07:00
Daniel Poggenpohl bcf9d4bf68 MDL-77657 theme: Corrected return type 2023-08-18 16:21:02 +02:00
Daniel Poggenpohl 92ee1c561e MDL-77657 theme: Fix get_pre_scss_code load order
This led to problems with grandchild themes,
depending on their direct parent's prescsscallback.
2023-08-18 16:21:02 +02:00
Daniel Poggenpohl 862e1e10c2 MDL-77657 theme: Fix get_extra_scss_code load order
This led to problems with grandchild themes,
depending on their direct parent's extrascsscallback.
2023-08-18 16:21:02 +02:00
Jun Pataleta 96e0a8b04d MDL-79071 course: An empty alt text is needed for decorative images 2023-08-18 17:03:54 +08:00
Jun Pataleta 8fe9f8579d MDL-79063 course: Use .text-body for 'disabled' elements in move modal
Using the .disabled class for the course module or section that is
being moved does not have sufficient colour contrast against the
background, especially when it is being highlighted.
So instead of using .disabled, just use Bootstrap classes .text-body
and .font-italic which renders the cm/section to be moved in normal
font colour while preserving its italicised look.
2023-08-18 16:35:48 +08:00
Jun Pataleta 23d6705ad6 MDL-79063 theme_boost: Match .disabled font colour with .text-muted
* For consistency
* The font colour for .text-muted meets a contrast ratio of 4.69:1
which meets WCAG 2.1 Level AA success criterion for minimum contrast.
2023-08-18 16:29:56 +08:00
Luca Bösch 2baa3bb4a5 MDL-65887 workshop: Recalculate + fill the 'Grade for assessment' column 2023-08-18 08:58:43 +02:00
Ilya Tregubov f12e1b82a0 weekly release 4.1.5+ 2023-08-18 11:23:59 +08:00
Dan Marsden e3fb15de88 MDL-63539 mod_scorm: AICC multi-row content not saving correctly. 2023-08-18 14:45:08 +12:00
Eloy Lafuente (stronk7) 4f6df8a5b9 Merge branch 'MDL-78684-401-fix-2' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-08-17 19:56:46 +02:00
Simey Lameze fd046bf6d6 MDL-78684 behat: fix behat failures 2023-08-17 21:01:05 +08:00
Jun Pataleta 527a11e48c Merge branch 'MDL-78938-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-08-17 09:58:31 +08:00
Andrew Nicols c0b521386c Merge branch 'MDL-77695-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-08-16 23:23:26 +08:00
Andrew Nicols b2780aa6f6 MDL-76557 enrol_lti: Fix unit test docs and convert to provider 2023-08-16 23:04:14 +08:00
ishatalkin 0608452503 MDL-76557 enrol_lti: sync_grades accepts status codes 200,201,202,204 2023-08-16 23:04:11 +08:00
Andrew Nicols d6a9f01cc9 Merge branch 'MDL-78684-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-08-16 22:44:35 +08:00
Andrew Nicols 558d836861 MDL-77381 qengine: Correct coverage for new test 2023-08-16 22:40:16 +08:00
Andrew Nicols 0d82ce2629 Merge branch 'MDL-77381-MOODLE_401_STABLE' of https://github.com/ScottVerbeek/moodle into MOODLE_401_STABLE 2023-08-16 22:40:12 +08:00
Simey Lameze 896763076e MDL-77695 behat: use automatic completion to award badges 2023-08-16 21:16:02 +08:00
Andrew Nicols 7e77e66350 MDL-78938 course: Wrap manual completion toggle in pending
This commit makes two changes to reduce random failures in behat:
- wrap the toggling of manually configured completion in pendingjs
- set the loading spinner content without forcing the completion toggle
  ws to wait for the loading spinner to update.
2023-08-16 20:05:24 +08:00
Andrew Nicols c2af464083 MDL-78938 report_progres: Wrap completion status update in pending 2023-08-16 20:05:24 +08:00
Mikel Martín 09500beae2 MDL-74429 core_form: Fix element url input overflow 2023-08-16 12:41:24 +02:00
Jun Pataleta 152acdd72f Merge branch 'MDL-78505/401' of https://github.com/skodak/moodle into MOODLE_401_STABLE 2023-08-15 22:21:05 +08:00
Petr Skoda 3847e0ba04 MDL-78505 core: stop mangling existing Mardown in text editors
The problem is that HTML Purifier is not compatible with Markdown,
that means we cannot sanitise Markdown texts before editing.

Luckily Markdown has to use plain text editor which does not have
XSS problems.

The only tiny downside is that Markdown cannot be allowed
in "trust text" areas any more.
2023-08-15 14:27:07 +02:00
Petr Skoda 05ffcf0579 MDL-78505 Revert "MDL-32114 form: markdown must be preserved on saving post"
This partially reverts commit 4a31dd69d6.
2023-08-15 14:27:07 +02:00
Huong Nguyen baed2a1aa1 Merge branch 'MDL-71909-m401' of https://github.com/NeillM/moodle into MOODLE_401_STABLE 2023-08-15 16:33:32 +07:00
Dale Davies ddd260ffa4 MDL-76865 core: Check lock state before attempting to acquire a lock 2023-08-14 12:36:45 +01:00
Sara Arjona b8fa7e0a0f Merge branch 'MDL-78761-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-14 10:58:56 +02:00
Sara Arjona 7fbb02cadc Merge branch 'MDL-78700-tidy_no_clean-401' of https://github.com/leonstr/moodle into MOODLE_401_STABLE 2023-08-14 09:12:34 +02:00
Jun Pataleta 954f779c5d Merge branch 'MDL-78927-m401' of https://github.com/sammarshallou/moodle into MOODLE_401_STABLE 2023-08-14 10:19:00 +08:00
Shamim Rezaie b156b18c72 Moodle release 4.1.5 2023-08-11 23:20:36 +10:00
Paul Holden f2f4c098ee MDL-78980 admin: ensure all values for multiselect presets are used.
Previously, just the first value was selected. Instead defer to the
implementation in the base class for `set_value`.
2023-08-11 11:22:35 +01:00
Jun Pataleta 88459bba94 MDL-78983 core: Preserve default behaviour of flipping question icon
Introduce a lang string `questioniconfollowlangdirection` that will
allow the current behaviour of displaying the question mark icon
in RTL languages in the same manner as the current language.
2023-08-11 16:11:05 +07:00
Huong Nguyen b201bcb878 Merge branch 'MDL-78983-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-11 12:53:50 +07:00
Jun Pataleta b504d19c12 MDL-78983 core: Fix question mark icon direction flipping
This fixes the changes made in MDL-75047:
* Change `thisicondirection` langconfig string to a more specific one
  like `questionicondirection`.
* Use existing direction string value `ltr` for the value of
  `questionicondirection`. Also add a comment to at least provide some
  form of documentation for it.
* Improve the logic for applying the horizontal flipping class for the
  question icon:
  - Check first if the icon is a question icon
  - Flip the icon if `questionicondirection` is set to `rtl`.
2023-08-11 11:48:10 +08:00
Huong Nguyen 1c13aba0a2 weekly release 4.1.4+ 2023-08-10 22:50:53 +07:00
Huong Nguyen 8a2c1509d7 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-08-10 22:50:51 +07:00
sam marshall b098b9d61b MDL-78927 core_user: Profile page missing breadcrumbs if no id= 2023-08-10 15:52:42 +01:00
meirzamoodle 033f742e4a MDL-78685 auth_oauth2: Added logged-in status check 2023-08-10 18:44:29 +07:00
Jun Pataleta 9e665137d4 Merge branch 'MDL-78962_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-08-10 18:44:29 +07:00
Jun Pataleta 53b33f7b0e Merge branch 'MDL-77817-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-08-10 18:44:27 +07:00
Jun Pataleta 7d7c342a2c Merge branch 'MDL-78674-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-10 18:44:14 +07:00
Sara Arjona ce77250706 Merge branch 'MDL-76123-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-10 18:44:14 +07:00
Jun Pataleta 770b11c3d9 Merge branch 'MDL-77378_401_v3' of https://github.com/TomoTsuyuki/moodle into MOODLE_401_STABLE 2023-08-10 18:44:14 +07:00
Michael Hawkins a18da528cc MDL-78763 tool_policy: Initialise returnurl as a moodle_url in viewall 2023-08-10 18:44:14 +07:00
Paul Holden d4cec28c30 MDL-78792 message: access checks in processor fragment callback. 2023-08-10 18:44:14 +07:00
raortegar 48dc9e6582 MDL-74289 lib: Improve the proxy bypass matching 2023-08-10 18:44:10 +07:00
Rajneel Totaram 138c3bcb99 MDL-78966 theme: Fix site event icon size in upcoming events block 2023-08-10 19:37:48 +12:00
Simey Lameze 1f43b863f3 MDL-78843 behat: update get_forum_id to search for idnumber or name
This commit also converts manual steps to create discussions on the
Annoucements forum to data generator.
2023-08-10 10:05:16 +08:00
Jun Pataleta 8390f1a03d MDL-78674 calendar: No need to call get_course_and_cm_from_instance()
The course ID and CM id can already be fetched from the event object.
2023-08-10 09:38:07 +08:00
Santosh Nagargoje 2713f2ea17 MDL-78674 calendar: Added fix to rebuild module cache in calendar 2023-08-10 09:38:07 +08:00
Tim Hunt e726198d4d MDL-78962 core/loadingicon: remove jQuery requirement in the API 2023-08-09 21:20:32 +01:00
Paul Holden a11938293e MDL-78647 files: safer unserializing of file reference data. 2023-08-09 04:50:21 +00:00
Shamim Rezaie cfe33b82e3 MDL-66212 tool_lpimport: properly check capabilities
The moodle/competency:competencymanage capability should be checked
before showing the import and export pages.
2023-08-09 04:50:21 +00:00
Matt Porritt cd95c30cb5 MDL-78340 Blocks: Dashboards now respect block permission overrides
Patch makes user dashboard respect permission overrides
that have been set on individual blocks on the system
dashboard (indexsys.php). When a user dashboard is created
either when the user visits their dashboard for the first
time or after an admin reset. When blcoks are copied to
the new dashbaord overriden permissions are also copied.
2023-08-09 04:50:21 +00:00
Rajneel Totaram da05f15e3b MDL-71728 mod_quiz: check if user can access this page 2023-08-09 04:50:21 +00:00
Huong Nguyen efdf0e48c8 Merge branch 'MDL-78904-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-09 11:43:24 +07:00
Huong Nguyen 00e6ac4ad8 Merge branch 'MDL-75047-MOODLE_401_STABLE' of https://github.com/SysBind/moodle into MOODLE_401_STABLE 2023-08-09 11:30:49 +07:00
Jun Pataleta 4de338f002 Merge branch 'MDL-78872-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-09 12:10:16 +08:00
Ilya Tregubov 4732fa0b13 Merge branch 'MDL-78714-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-08-09 12:05:24 +08:00
Huong Nguyen 93ab65454a Merge branch 'MDL-78235-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-08-09 10:43:35 +07:00
Andrew Nicols d8c911ccb4 MDL-78714 editor_tiny: Disable HTML Sanitisation in TinyMCE
This is in keeping with other Editors such as Atto and resolves an issue
where DOM Purification incorrectly identifies HTML-like string content
as an HTML tag with a JS variable.

Moodle already performs XSS sanitisation using HTML Purifier in PHP.
2023-08-09 10:21:39 +08:00
Andrew Nicols e8eb8943e1 MDL-78714 editor_tiny: Add xss_sanitize option to TinyMCE
To address a potential data loss issue, a feature introduced in TinyMCE
6.4.0 to disable client-side XSS sanitisation must be backported.
2023-08-09 10:21:39 +08:00
Andrew Nicols 737f657bad MDL-78714 editor_tiny: Move TinyMCE import instructions to correct path 2023-08-09 09:05:23 +08:00
Huong Nguyen 8ce08d5cd1 Merge branch 'MDL-78492_aurora_mysql_rowformat_401' of https://github.com/mark-webster-catalyst/moodle into MOODLE_401_STABLE 2023-08-08 21:43:36 +07:00
Sara Arjona e250a61e40 Merge branch 'MDL-78770-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-08 13:55:40 +02:00
Sara Arjona bc9138ecba Merge branch 'MDL-77658-MOODLE_401_STABLE' of https://github.com/SysBind/moodle into MOODLE_401_STABLE 2023-08-08 13:29:53 +02:00
Sara Arjona fe7a12a9fd Merge branch 'MDL-78559-401' of https://github.com/rmady/moodle into MOODLE_401_STABLE 2023-08-08 13:02:06 +02:00
Paul Holden 75de5704de MDL-76123 course: multilingual module icon alt text attribute. 2023-08-08 08:29:27 +01:00
Jun Pataleta 1347048659 Merge branch 'MDL-78896-401-enfix' of https://github.com/vmdef/moodle into MOODLE_401_STABLE 2023-08-08 15:29:26 +08:00
AMOS bot 86ff18c9fe Automatically generated installer lang files 2023-08-08 00:10:31 +00:00
ScottVerbeek 59f7404d8b MDL-77381 question engine: don't query empty arrays 2023-08-08 09:04:00 +10:00
Rodrigo Mady 961c7ef3e0 MDL-78559 mod_chat: Fix chat report loading with TeX filter 2023-08-07 09:55:16 -03:00
Helen Foster 7b4d19308e MDL-78896 lang: Import fixed English strings (en_fix) 2023-08-07 11:31:43 +01:00
Paul Holden 5305ddc0a4 MDL-77988 dml: clarify logic when dropping plugin tables.
Comparison of method void return within a conditional didn't make
sense, and the aforementioned method throws an exception on error
anyway which would halt execution.
2023-08-07 10:46:47 +01:00
Paul Holden ecee875be0 MDL-78302 mod_forum: fix course module grade button parameters. 2023-08-07 10:45:21 +01:00
Ilya Tregubov c9143efd7e Merge branch 'MDL-78800_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2023-08-07 16:58:26 +08:00
Ilya Tregubov 52b234d69a Merge branch 'MDL-78550-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-07 11:34:49 +08:00
chen levy 896e87228c MDL-77658 theme: Fixed RTL manage course categories menu
fixed course checkboxes that appears on the categories menu on RTL
2023-08-06 09:54:23 +03:00
Eloy Lafuente (stronk7) 772236e08c MDL-78800 composer: Bump dependencies to current ones
This bumps direct dependencies to current ones:

- phpunit: 9.5.x No updates here, there is the 9.6.x series
  available but a lot of deprecation warnings have been
  introduced there without any alternative to use. See:
  - https://github.com/sebastianbergmann/phpunit/issues/5160
  - https://github.com/sebastianbergmann/phpunit/issues/5062
  - ...
  While that will be handy to prepare ourselves to PHPUnit 10
  in some months... we cannot force everybody to jump to 9.6.x
  because that will make a lot of tests to start emitting
  warnings.
  So we stay with PHPUnit 9.5.x for the life of this branch.
- mink-phpwebdriver: 1.2.1 No updates here, just changed the
  constraint because we cannot advance to 1.3.x yet, there is
  a change there causing some app tests to fail. See:
  - https://github.com/oleg-andreyev/MinkPhpWebDriver/pull/81
  So we stay with 1.2.x until that issue is fixed/clarified,
  only then we'll review the status.
- behat: 3.12.x => 3.13.x

And also, automatically, a bunch of 2nd and deepest dependencies.

Generated with php74 that is the lowest php version supported
by this branch and, also, by some of the dependencies, as per
documented @ https://moodledev.io/general/development/tools/composer

Worth mentioning behat/mink-goutte-driver, that we should move
to mink-browserkit-driver, but that's out from this issue scope.
2023-08-05 11:17:10 +02:00
Sara Arjona 614563082b weekly release 4.1.4+ 2023-08-04 12:40:10 +02:00
Jun Pataleta 0975a83b7a MDL-78904 user: Remove non-existent require
* And enclose context parameter in an array.
2023-08-04 14:42:49 +08:00
meirzamoodle f8691f2e28 MDL-77817 editor_tiny: Fix menu and dialogue window position
The boost theme makes the TinyMCE editor rendered in a scrollable container,
scrolling the editor’s container will cause TinyMCE UI elements to be detached from the anchor.
Therefore, to keep the tinyMCE menu in the correct position,
adjustments must be made on the page drawers style.

When using TinyMCE editor in Safari browsers, a problem may occur where the dialogue
windows (such as modal dialogs) overlap with page drawers due to a specific behavior
in Safari's rendering. This function addresses the issue by adjusting the CSS overflow
property of the page drawers, ensuring they do not obscure the dialogue windows.
2023-08-03 11:40:12 +07:00
Jun Pataleta d25c0c5448 MDL-78498 mod_forum: Prevent race condition in forum recent activity
* Using the generator to create the forum discussions, the timecreated
of a discussion can be set before the user's last course access which
will prevent forum_print_recent_activity() from including this generated
discussion in the recent activity results. To work around this, generate
the forum discussion 1 second after the current time to make sure that
the user's last course access will always be before the discussion's
creation time.
* This patch also includes some optimisations by:
  - Removing the unnecessary @javascript tag for the
    `Time limit expires` scenario
  - Bringing the discussion generation to each scenario to allow each
    scenario to customise the data passed to the generator like for the
    `Time limit expires` scenario.
  - Navigating directly to the forum instance.
2023-08-03 11:33:32 +08:00
Ilya Tregubov cf393e9aae Merge branch 'MDL-78866-401' of https://github.com/danghieu1407/moodle into MOODLE_401_STABLE 2023-08-03 09:39:17 +08:00
Ilya Tregubov e3dd019685 Merge branch 'MDL-78742-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-03 09:25:28 +08:00
Sara Arjona ceb153b1c7 Merge branch 'MDL-78460-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-02 08:51:13 +02:00
Jun Pataleta 1967ccccc0 Merge branch 'MDL-78498-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-08-02 11:22:58 +08:00
Paul Holden 58836d7143 MDL-78872 grade: fix external class execute method visibility. 2023-08-02 02:18:51 +01:00
Sara Arjona d04d701c18 Merge branch 'MDL-78703-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-01 13:45:11 +02:00
danghieu1407 1b4ee84aee MDL-78866 question: question_created trigger pre-saving extra fields 2023-08-01 15:59:57 +07:00
Simey Lameze 33d829716e MDL-78498 behat: add support for private replies
This commit adds support for private replies in the
'the following forum replies exist in course' custom step.
2023-08-01 16:08:10 +08:00
Angelia Dela Cruz 73a08e3ccd MDL-78498 Behat: Use data generators for forum posts and replies
This commit does few things:
* Replace manual forum posts and replies to use data generator.
* It also changes the code to handle social forums.
* Other behat clean-ups and optimization.

Co-authored-by: Simey Lameze <simey@moodle.com>
2023-08-01 16:08:10 +08:00
Angelia Dela Cruz efb38571e5 MDL-78684 Behat: Replace gradebook navigation to use page resolvers
This commit also does other things such as:
- Replace manual steps to setup gradebook by data generators
- Added support for outcomes and scales page resolvers
- Behat clean up
2023-08-01 15:55:33 +08:00
Andrew Nicols 8c8cb002c0 MDL-78632 core: Update upgrade versions 2023-08-01 09:32:36 +08:00
Andrew Nicols ea6adbc72e Merge branch 'M401-MDL-78632' of https://github.com/marcusboon/moodle into MOODLE_401_STABLE 2023-08-01 09:31:42 +08:00
Tomo Tsuyuki 2ba3b8b27e MDL-77378 qtype_multianswer: Fix division by zero errors 2023-08-01 11:26:44 +10:00
Iñaki Arenaza e7817d0d55 MDL-78481 mod_lesson: matching pagetype applying filters fix 2023-07-31 16:25:59 +02:00
Michael Aherne affda87228 MDL-78235 userprofile: Check for defaultdata with isset(). 2023-07-31 19:33:06 +08:00
Jun Pataleta ebe27cf615 MDL-78550 core: Ensure spacing between more menu item attributes 2023-07-28 17:33:07 +08:00
Jun Pataleta 27f453d6e9 MDL-78550 grade: Hide empty fillers from the accessibility tree
* And remove the title attribute for the filler as it is unnecessary.
2023-07-28 17:28:58 +08:00
Jun Pataleta b98fb9032c MDL-78550 grade: Avoid rendering an empty <h2> heading 2023-07-28 17:28:57 +08:00
Jun Pataleta e953e71c54 MDL-78550 grade: Fix HTML validator errors
* Remove invalid "text" attribute in <td> elements
* Use proper id value for grade category checkboxes.
2023-07-28 17:28:56 +08:00
Marcus Boon 3295c4bc1d MDL-78632 filetypes: Introduce yaml file type 2023-07-28 15:28:15 +10:00
Ilya Tregubov 13553c25da weekly release 4.1.4+ 2023-07-28 10:44:15 +08:00
Ilya Tregubov c9fc2bfeb4 Merge branch 'MDL-78782-401' of https://github.com/ferranrecio/moodle into MOODLE_401_STABLE 2023-07-27 10:00:01 +08:00
Ferran Recio dcd7261175 MDL-78782 behat: optimize with editing mode step
The current I am on course homepage with editing mode loads twice the
course page. This patch prevents this from happening by going directly
to editmode.php.
2023-07-26 16:19:57 +02:00
Neill Magill 612b86e193 MDL-71909 assignfeedback_editpdf: Do not queue conversions when not on
Before this change conversion tasks would be queued for assignments that
did not have the pdf annotation method enabled.

The change will also prevent queing when the plugin is disabled.
2023-07-26 09:16:48 +01:00
Huong Nguyen bca23d5477 Merge branch 'MDL-78618_401' of https://github.com/larsbonczek/moodle into MOODLE_401_STABLE 2023-07-26 14:22:42 +07:00
Mark Webster 28aaa93df9 MDL-78492 dml: Better support for auroramysql
Aurora MySQL does not support row format COMPRESSED and falls back
to COMPACT if you try to use it, cuasing column size too large
errors if you try to use it with utf8mb4 collation.
2023-07-25 11:57:38 +01:00
Alex Yeung 356e1d8f31 MDL-78811 check: fix duplicate column contextid warning 2023-07-24 22:49:52 +01:00
Leon Stringer a283cf8fbe MDL-78700 filter_tidy: Stop using 'clean'
When libtidy removed option 'drop-font-tags' the docs said to use the
'clean' option instead (see MDL-69951).  However, 'clean' replaces
legacy style information with classes, the corresponding CSS added in
<head>.  With 'show-body-only' (used because we're inserting an HTML
fragment mid-way through <body>) that <head> with its CSS is omitted.
So 'clean' with 'show-body-only' removes legacy style information,
rather than tidying it. Consequently we now drop the 'clean' option.
This means <font> tags are no longer dropped as libtidy currently has
no equivalent to the removed 'drop-font-tags' functionality.
2023-07-24 17:31:53 +01:00
Paul Holden 9437e82a31 MDL-78761 enrol: correct enrolment suspended state report filter. 2023-07-21 17:13:16 +01:00
Huong Nguyen 533ce56743 weekly release 4.1.4+ 2023-07-21 20:56:32 +07:00
Huong Nguyen e677d31003 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-07-21 20:56:30 +07:00
Paul Holden 5f35d838d1 MDL-78742 tool_uploadcourse: configure show activity dates value. 2023-07-20 16:28:41 +01:00
Jun Pataleta 61d3f1345a MDL-78770 tiny_recordrtc: Use proper window.console.warn() function 2023-07-20 14:32:52 +08:00
Jun Pataleta 9cb8b3fa50 MDL-78770 atto_recordrtc: Use proper window.console.warn() function 2023-07-20 14:23:01 +08:00
Huong Nguyen 8eb8fb844a Merge branch 'MDL-78525-401' of github.com:HuongNV13/moodle into MOODLE_401_STABLE 2023-07-20 10:58:06 +07:00
Huong Nguyen 792530cfe6 MDL-78525 core: Update upgrade.txt for count_words and count_letters 2023-07-20 10:54:57 +07:00
Khoa Nguyen Dang 1408e3b964 MDL-78749 Accessibility\Quiz: Previous attempt table caption missing 2023-07-20 10:15:49 +07:00
Ilya Tregubov 974cbce6e8 Merge branch 'MDL-76854-subscription_deleted-401' of https://github.com/leonstr/moodle into MOODLE_401_STABLE 2023-07-20 10:49:55 +08:00
Huong Nguyen 9c47f4e461 Merge branch 'MDL-78525/401' of https://github.com/skodak/moodle into MOODLE_401_STABLE 2023-07-20 09:04:31 +07:00
Ilya Tregubov cbadd18581 Merge branch 'MDL-75115-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-07-20 09:41:33 +08:00
Andrew Nicols 97c95140c3 Merge branch 'MDL-78716-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-07-20 00:29:09 +08:00
Andrew Nicols 0311f95fee Merge branch 'MDL-78715-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-07-20 00:17:33 +08:00
Andrew Nicols f852e35976 Merge branch 'MDL-77645-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-07-20 00:11:59 +08:00
Andrew Nicols 05c485dc97 Merge branch 'MDL-78704-401' of https://github.com/rjnl/moodle into MOODLE_401_STABLE 2023-07-19 21:57:52 +08:00
AMOS bot 36918dfbfc Automatically generated installer lang files 2023-07-19 00:11:00 +00:00
Shamim Rezaie d0bef0b899 Merge branch 'MDL-78564-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-07-17 20:36:00 +10:00
Leon Stringer ad5e75ddf1 MDL-76854 tool_monitor: subscription_deleted ctx
Fix course context for subscription_deleted event when deleting rules
with multiple subscriptions.
2023-07-15 08:08:22 +01:00
Paul Holden ba6143d1ac MDL-78703 behat: fix HTTP GET method capitalization on redirect. 2023-07-15 01:00:07 +01:00
Paul Holden 0c7a684fcc MDL-78715 payment: prevent action menus flowing under container. 2023-07-14 17:17:00 +01:00
Paul Holden 587ea4d3f3 MDL-78716 course: fix category idnumber updating logic.
Where only the case of the idnumber field was being updated, we
triggered an exception because checking for an exising idnumber
was not excluding the current category (i.e. the one being updated).
2023-07-14 15:14:59 +01:00
Paul Holden f6583c57c8 MDL-78460 mod_forum: correctly render timed post label information. 2023-07-14 10:15:40 +01:00
Petr Skoda f25ad012c5 MDL-78525 core: fix word and character counting 2023-07-14 08:44:15 +02:00
Ilya Tregubov 272fdb321a weekly release 4.1.4+ 2023-07-14 09:25:40 +08:00
Rajneel Totaram 962a3f866c MDL-78704 course: Render unescaped HTML for activity dates 2023-07-14 10:17:04 +12:00
Tim Hunt 0a6f40cb21 MDL-76757 delete questions: fix message generation logic
The order was getting scrambled.
2023-07-13 21:44:04 +02:00
Jun Pataleta 85232e735d Merge branch 'MDL-76046-401' of https://github.com/stevandoMoodle/moodle into MOODLE_401_STABLE 2023-07-13 11:19:30 +08:00
Huong Nguyen 90c15c62f4 Merge branch 'MDL-75195-401' of https://github.com/raortegar/moodle into MOODLE_401_STABLE 2023-07-13 09:57:23 +07:00
Huong Nguyen dcd80cff04 Merge branch 'MDL-76757-401' of https://github.com/danghieu1407/moodle into MOODLE_401_STABLE 2023-07-13 09:46:59 +07:00
Ilya Tregubov e0dc36f27e Merge branch 'mdl-7133-401' of https://github.com/juancs/moodle into MOODLE_401_STABLE 2023-07-13 10:31:28 +08:00
Huong Nguyen 73cce7054c Merge branch 'MDL-77990-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-07-13 09:22:19 +07:00
Jake Dallimore a6b769bddd Merge branch 'MDL-77912_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-07-13 10:09:45 +08:00
Andrew Nicols 94080683ba Merge branch 'MDL-78157-401' of https://github.com/golenkovm/moodle into MOODLE_401_STABLE 2023-07-13 09:48:19 +08:00
Andrew Nicols 10cdb9c72d Merge branch 'MDL-78556-401' of https://github.com/danghieu1407/moodle into MOODLE_401_STABLE 2023-07-13 09:29:04 +08:00
Andrew Nicols 57af739134 Merge branch 'MDL-76996_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-07-13 09:25:35 +08:00
Ilya Tregubov 8cf9b77cdb Merge branch 'MDL-73213_401' of https://github.com/pedrojordao/moodle into MOODLE_401_STABLE 2023-07-13 09:18:31 +08:00
Sara Arjona 07ef1c6aa5 Merge branch 'MDL-78673-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-07-12 18:18:13 +02:00
Andrew Nicols b3820bdc44 Merge branch 'MDL-77450-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-07-13 00:10:14 +08:00
Andrew Nicols a80a370e0a Merge branch 'MDL-78676-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-07-13 00:06:36 +08:00
Sara Arjona 4fbc7a28ae Merge branch 'MDL-78455-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-07-12 17:37:14 +02:00
Paul Holden 0202597261 MDL-77645 course: ensure active enrolments are considered for drawer.
Otherwise the enrolment index page tries to load the course index
drawer, which doesn't exist at this point and triggers exceptions in
the editor module.

Co-authored-by: Tim Volckmann <tim.volckmann@mastersolution.com>
2023-07-12 14:35:33 +01:00
Tim Hunt c589ced794 MDL-76996 question bank: fix errors when qbank_statistics is disabled 2023-07-12 11:47:37 +01:00
Sara Arjona 4abfc497e2 Merge branch '76319-gradebook-add-missing-continue-button-401' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_401_STABLE 2023-07-12 08:28:15 +02:00
Miri Lipson 03a7d208f9 MDL-75115 theme_boost: Fix Bootstrap tooltips in RTL mode 2023-07-12 09:11:33 +07:00
Tim Hunt 0ece3bcfc1 MDL-77912 questions: make multi-choice stats calc robust to bad data 2023-07-11 16:57:45 +01:00
raortegar f904f52240 MDL-75195 core: Added supportemail option to install_database.php 2023-07-11 11:13:49 +02:00
danghieu1407 173da3666c MDL-78556 tablelib: flexible_table should support caption tag 2023-07-11 14:18:54 +07:00
Angelia Dela Cruz 9a55a771c1 MDL-77450 Behat: Behat cleanup and optimisation 2023-07-11 14:22:35 +08:00
Ilya Tregubov c057bc092d Merge branch 'MDL-67852_MOODLE_401_NEW' of https://github.com/aydevworks/moodle into MOODLE_401_STABLE 2023-07-11 11:12:16 +08:00
Ilya Tregubov 5cecf47fd1 Merge branch 'MDL-77690-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-07-11 09:52:05 +08:00
Ilya Tregubov f4e0c7d6bf Merge branch 'MDL-75359-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-07-11 09:30:14 +08:00
Julien Boulen 231577e4b0 MDL-76319 gradebook: add continue button after csv grades import error 2023-07-10 10:18:14 +02:00
danghieu1407 cf0b6e06e2 MDL-76757 Question bank: Can not delete the question completely 2023-07-10 14:34:32 +07:00
Andrew Nicols 43d00eaeba MDL-78673 grade: Switch test to use generators 2023-07-10 11:30:14 +08:00
Andrew Nicols 23c2c5d08e MDL-78673 grade: Switch to behat navigation steps 2023-07-10 11:30:14 +08:00
Andrew Nicols 7961e169b1 MDL-78673 grade: Address random failure due to toast 2023-07-10 11:30:09 +08:00
Andrew Nicols e0c28bebcb MDL-78673 behat: Allow plugins to define their expansion of > 2023-07-10 11:29:39 +08:00
Andrew Nicols 51dc88fa84 Merge branch 'MDL-77180-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-07-09 22:14:37 +08:00
Alex Yeung 236f4654c0 MDL-67852 tool_dataprivacy: Fix security checks 2023-07-09 14:50:10 +01:00
Juan Segarra Montesinos 031e583402 MDL-71133 mod_assign: Grade decimals missing with marking workflow 2023-07-09 08:12:22 +02:00
Sara Arjona e8897600a1 MDL-78676 mod_data: Check completion rules properly
The completion_rule_enabled() method was not checking all the fields
and, in some cases, it was returning false (because it was not checking
that "Count of entries" field was enabled).
2023-07-07 18:28:23 +02:00
Paul Holden e9191587be MDL-77180 customfield: allow entry of formatted category names.
Change the param type of the category name when editing to allow
for entry of multilang tags, the formatting of which is already
supported when returning category name.

Co-authored-by: Hiroto Kagotani <hiroto.kagotani@gmail.com>
2023-07-07 14:59:54 +01:00
Paul Holden 73939586b6 MDL-75359 reportbuilder: fixes for custom/user profile field elements.
Ensures cross-DB compatibility for all types of both custom and user
profile fields, specifically when they're filtered and/or aggregated.

Implement stress testing of both via appropriate report sources.
2023-07-07 14:43:29 +01:00
Ilya Tregubov f29f757f5f weekly release 4.1.4+ 2023-07-07 11:52:28 +08:00
Ilya Tregubov 5246118a3b Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-07-07 11:52:26 +08:00
Pedro Jordao 2ace3d54dc MDL-73213 autocomplete: keep selected value when the state changes.
The selected value of the dropdown was being cleared when the dropdown
was opened, this was causing an error when submitting the form if the
field was required. The main cause was that we were emptying the
select before loading new values, this solution was created because
of an issue where we could not deselect values if the list was
reloaded. To fix this problem, I added an empty option as the first
element of the select only when deselecting a certain item.
2023-07-06 15:33:47 -03:00
Lars Bonczek 24b8efe27a MDL-78618 core_course: use UNION in get_nearest_editable_subcategory 2023-07-06 18:52:36 +02:00
Sara Arjona d9c911598c Merge branch 'MDL-78391-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2023-07-06 11:03:18 +02:00
Huong Nguyen 7a582cf628 MDL-78391 atto_recordrtc: Fix recording issue with Chrome 2023-07-06 15:49:56 +07:00
Huong Nguyen 0f7151e2ba MDL-78391 tiny_recordrtc: Fix recording issue with Chrome 2023-07-06 15:49:55 +07:00
Sara Arjona 082a862366 Merge branch 'MDL-77375-401-patch' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-07-06 10:12:00 +02:00
Misha Golenkov d06d29ef5d MDL-78379 js: Add missing newline character 2023-07-06 16:16:39 +10:00
Ilya Tregubov c7877e7bb3 MDL-77375 tool_dataprivacy: Fix menus going floaty. 2023-07-06 13:12:53 +08:00
Jun Pataleta 6509d6d944 Merge branch 'MDL-78391-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-07-06 11:59:46 +08:00
Jun Pataleta 3601d38c01 Merge branch 'MDL-78488_401' of https://github.com/t-schroeder/moodle into MOODLE_401_STABLE 2023-07-06 11:17:57 +08:00
Ilya Tregubov fa52ecfdf2 Merge branch 'MDL-69983-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2023-07-06 10:26:27 +08:00
Ilya Tregubov 83748b3b19 Merge branch 'MDL-78608_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-07-06 09:57:21 +08:00
Jun Pataleta 461c0bd947 Merge branch 'MDL-78484-401' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_401_STABLE 2023-07-06 09:41:24 +08:00
Ilya Tregubov ff652d5c2c Merge branch 'MDL-77375-401' of https://github.com/rezaies/moodle into MOODLE_401_STABLE 2023-07-06 09:21:18 +08:00
Jun Pataleta d584ca7b7f Merge branch 'MDL-74893-MOODLE_401_STABLE-fix_auto_login_guest' of https://github.com/praxisdigital/moodle into MOODLE_401_STABLE 2023-07-06 09:14:09 +08:00
Paul Holden c537169f84 Merge branch 'MDL-78542-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-07-05 17:13:18 +01:00
Andrew Nicols b3246582c4 Merge branch 'MDL-78644-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-07-05 22:10:42 +08:00
Andrew Nicols c3c39d78c4 Merge branch 'MDL-78338-401_toolbrickfieldlinkinnewwindow' of https://github.com/brickfield/moodle into MOODLE_401_STABLE 2023-07-05 22:03:04 +08:00
Andrew Nicols 2811bedd48 Merge branch 'MDL-78622_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-07-05 21:56:35 +08:00
Andrew Nicols ba32d69255 Merge branch 'MDL-64152-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-07-05 21:49:20 +08:00
Andrew Nicols 17b4837fb6 Merge branch 'MDL-78614-401' of https://github.com/noeldemartin/moodle into MOODLE_401_STABLE 2023-07-05 20:30:42 +08:00
Paul Holden f09241fafe MDL-78644 files: more fault tolerant resizing of logos/icons.
If we cannot resize the given file (files such as ICO can't be, for
SVG it makes no sense), then we should just return the original file
as is rather than an error.
2023-07-05 12:51:41 +01:00
Ilya Tregubov a9fe9bbb0c Merge branch 'MDL-78485-401' of https://github.com/stevandoMoodle/moodle into MOODLE_401_STABLE 2023-07-05 11:52:11 +08:00
Andrew Nicols e5f747ffa4 Merge branch 'MDL-78158-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-07-05 10:24:07 +08:00
Huong Nguyen 28263edd35 Merge branch 'MOODLE_401_MDL-77396' of https://github.com/Dineshdurai/moodle into MOODLE_401_STABLE 2023-07-04 16:15:48 +07:00
Huong Nguyen 25432feda8 Merge branch 'MDL-78596-coursecard-divider-401' of https://github.com/leonstr/moodle into MOODLE_401_STABLE 2023-07-04 15:28:30 +07:00
Huong Nguyen e8058e6981 Merge branch 'MDL-78578-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-07-04 15:16:15 +07:00
Huong Nguyen d19936b1c6 Merge branch 'MDL-76853-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-07-04 12:46:26 +07:00
Huong Nguyen 1751f4e658 Merge branch 'MDL-78138-401' of https://github.com/lucaboesch/moodle into MOODLE_401_STABLE 2023-07-04 12:38:59 +07:00
Stevani Andolo 419db61006 MDL-78485 editor_tiny: Allowed script tag to be added in tinyMCE editor 2023-07-04 13:36:47 +08:00
Andrew Nicols 48a4ad4d4c Merge branch 'MDL-75324-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-07-04 13:30:15 +08:00
Andrew Nicols daccd01a0e Merge branch 'MDL-76840_401' of https://github.com/uzimike/moodle into MOODLE_401_STABLE 2023-07-04 13:21:30 +08:00
Simey Lameze a34591cc0b MDL-75324 behat: use a proper step to verify completion status 2023-07-04 11:20:23 +08:00
Jun Pataleta 5db1843de2 Merge branch 'MDL-78572_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-07-04 09:47:43 +08:00
Angelia Dela Cruz 241a8eb343 MDL-78158 behat: Behat cleanup and optimisation 2023-07-04 08:36:58 +08:00
AMOS bot 55ba6b010a Automatically generated installer lang files 2023-07-04 00:11:38 +00:00
Sara Arjona b90771ef97 Merge branch 'MDL-77868-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-07-03 17:29:40 +02:00
Sara Arjona 7cf23d5396 Merge branch 'MDL-76661-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-07-03 17:26:29 +02:00
Angelia Dela Cruz 0d5b8d1337 MDL-78158 Behat: Use data generators to add blocks 2023-07-03 19:17:35 +08:00
Tim Hunt bcf0112c36 MDL-78622 quiz: add question query must include contextid
It is logically requried and necessary for the query to use the index
2023-07-03 11:51:19 +01:00
Paul Holden d88a8851ac MDL-76661 mod_bigbluebuttonbn: fix meeting attendee role comparison. 2023-07-03 11:41:13 +01:00
Noel De Martin 73fcdb1bf4 MDL-78614 behat: Remove trailing quotes 2023-07-03 11:18:42 +02:00
Andrew Nicols 0830ca48f9 MDL-78391 atto_recordrtc: Improve MacOS codec compatability 2023-07-03 16:52:28 +08:00
Andrew Nicols ed6054fdf8 MDL-78391 tiny_recordrtc: Set filename according to container 2023-07-03 16:52:26 +08:00
Andrew Nicols 3faf81d578 MDL-78391 tiny_recordrtc: Switch to mp4 container for h264
Theh WebM container does not support H.264 / AVC.

For more information see:
https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#webm

General purpose video, preferably in an open format
WebM (ideally with MP4 fallback)
2023-07-03 16:52:07 +08:00
Andrew Nicols 756d9fa18d MDL-78391 tiny_recordrtc: Improve codec selection
From my experimentation I have discovered that Safari does not properly
respect the standard MediaRecorder mimetype. Instead of using `codecs=`
it uses `codecs:`.

This change copies the codec array to have the list of possible codecs
include both codecs= and codecs: whilst remaining in order.
2023-07-03 16:50:12 +08:00
Andrew Nicols d73ad3b532 MDL-78391 tiny_recordrtc: Respect codec options
The audio and video plugins were overriding the wrong method, and thus
preventing selection of a relevant codec and breaking playback on some
devices.
2023-07-03 16:50:11 +08:00
Andrew Nicols 9c97536a9f MDL-76853 editor_tiny: Refactor behat helpers into trait 2023-07-03 09:38:24 +08:00
Karen Holland 1f6fa90a02 MDL-78338 tool_brickfield: Allow link open in new window with warning 2023-07-01 23:14:26 +01:00
Shamim Rezaie 2d8c924d71 MDL-77375 core_grades: set boundary of the dropdowns in grade setup page 2023-07-02 00:40:15 +10:00
Shamim Rezaie ddb1b56f36 MDL-77375 gradereport_singleview: set boundary of the dropdowns 2023-07-02 00:06:14 +10:00
Shamim Rezaie f30316be5d MDL-77375 tool_dataprivacy: set boundary of the dropdowns 2023-07-02 00:06:13 +10:00
Shamim Rezaie 2f108b6430 MDL-77375 mod_forum: set boundary of the dropdown
Also removed the unnecessary button role from the <button> element
2023-07-02 00:06:13 +10:00
Shamim Rezaie ebe8674636 MDL-77375 mod_assign: set overflow constraint boundary of the dropdowns 2023-07-02 00:06:13 +10:00
Shamim Rezaie 88f66617a0 MDL-77375 output: Allow additional options for dropdowns 2023-07-02 00:06:13 +10:00
Shamim Rezaie ba07bb42e1 MDL-77375 theme: Re-fix the bootstrap scrollbar issue 2023-07-02 00:06:13 +10:00
Paul Holden 315e8dd327 MDL-78564 mod_assign: ensure submission statement is present.
Don't require acceptance of statement, if no such statements exists,
during assignment submission.
2023-06-30 14:20:09 +01:00
Jun Pataleta 14d4f0aed3 MDL-77690 mod_lesson: Lesson accessibility fixes
* Set the heading levels of lesson pages appropriately to avoid skipped
heading issues.
* Add appropriate labels for tertiary navigation select menus.
2023-06-30 17:51:12 +08:00
Jun Pataleta 213223d162 MDL-77690 core: New activity_header method get_heading_level()
Add a new method for activity_header that determines the heading level
depending on whether the theme displays a heading for the activity
header (usually a h2 heading with the activity name).

E.g. in Boost, the activity name is already being displayed in a
heading. So page headings can be rendered as h2. However, on Classic,
the activity name is being displayed as a h2 heading. So headings need
to be adjusted for the activity pages.
2023-06-30 17:51:12 +08:00
Tim Schroeder be118c06b3 MDL-78488 question bank: don't load statistics when they are disabled 2023-06-30 11:47:04 +02:00
Jun Pataleta 415de4b23e MDL-77690 user: Add sr-only heading for the user profile page 2023-06-30 17:46:57 +08:00
Jun Pataleta 2f305e5a10 MDL-78542 mod_url: clicktoopen lang string fix
- Improve the grammatical structure of the lang string.
- Remove the mention of "link", for sighted users, it should already
be obvious that it's a link. For screen reader users, screen readers
already announce links. So it would be confusing for them to hear
something like "Click 'Moodle.org, link' link to open resource"
2023-06-30 17:27:32 +08:00
Jun Pataleta 7ffbc23426 MDL-78542 mod_url: Add a help text for URL resource name field
Add a help text explaining that the URL resource's name field will be
used for the link text. Also add basic guidelines about naming links for
the benefit of screen reader users.
2023-06-30 17:27:32 +08:00
Jun Pataleta f6c05b8980 MDL-78542 mod_url: Use the module name for the URL resource's link text 2023-06-30 17:27:32 +08:00
Jake Dallimore 32ad202b06 MDL-64152 library: Fix legacy LTI launches when using reverse proxy
LTI 1.1 uses OAuth 1.0, which requires 'hostname', among other things,
as part of signature verification. When Moodle is run behind a reverse
proxy, $_SERVER['SERVER_NAME'] is an unreliable way to fetch hostname.
It isn't always equal to the external hostname but instead can contain
the local host, meaning the signature verification will fail. This
change replaces the use of $_SERVER vars with $FULLME - which already
takes this into account - to fix the signature verification.

Co-authored-by: Berengar W. Lehr <Berengar.Lehr@uni-jena.de>
2023-06-30 16:42:37 +08:00
Jun Pataleta 1d92fd1ed3 Merge branch 'MDL-78068-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-06-30 16:42:31 +08:00
Franziska Hübler 09a97ba0bf MDL-69983 backup: Save async backups in correct area. 2023-06-30 10:13:17 +10:00
AMOS bot cc4ed8ebb4 Automatically generated installer lang files 2023-06-30 00:08:41 +00:00
Stevani Andolo 322e681c65 MDL-76046 core: Fixed secondary navigation on smaller screen 2023-06-30 06:31:22 +08:00
Luca Bösch 18dfb832d1 MDL-78138 theme_boost: Reliably remove TYPE_CATEGORY breadcrumbs. 2023-06-29 21:48:41 +02:00
Tim Hunt 2a2dd08ff1 MDL-78608 question stats: avoid loading data for missing contexts
It turns out that there are plugins which don't (currently)
clean up their question attempts when a context is deleted.
Therefore, we need to make Moodle core robust to that.
2023-06-29 16:27:01 +01:00
Huong Nguyen 6628845087 weekly release 4.1.4+ 2023-06-29 22:22:22 +07:00
Sara Arjona 9137b58fca Merge branch 'MDL-78554-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-06-29 17:39:05 +08:00
Andrew Nicols d949e40268 Merge branch 'MDL-78599-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-06-29 11:33:22 +08:00
Jun Pataleta 648aa897cf Merge branch 'MDL-77993-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-29 11:28:07 +08:00
Jun Pataleta d73c514909 Merge branch 'MDL-78432-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-06-29 11:25:12 +08:00
Andrew Nicols 2fd55eddff Merge branch 'MDL-78018-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-29 11:02:09 +08:00
Ilya Tregubov 76ec26032e Merge branch 'MDL-77286-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-06-29 09:44:32 +08:00
Ilya Tregubov de210a84e7 Merge branch 'MDL-78521-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-06-29 09:35:06 +08:00
Huong Nguyen 52cd821ac9 Merge branch 'MDL-77679_401' of https://github.com/mkassaei/moodle into MOODLE_401_STABLE 2023-06-28 21:19:10 +07:00
Jake Dallimore 0c0b1ac1d6 MDL-78599 enrol_lti: fix SQL syntax error in course grade sync 2023-06-28 18:13:27 +08:00
Jake Dallimore 07b0f65aac MDL-78599 enrol_lti: test covering decoupled, course context grade syncs
This covers the case where a course is published and the launch data
doesn't include the 'lineitem' property of the ags claim, meaning the
tool can manage its own line items.
2023-06-28 18:13:26 +08:00
Leon Stringer fa9705a870 MDL-78596 core_course: Remove divider
With courselistshortnames enabled Moodle 3.11 and earlier showed
"Category | Short name" on the first line of course cards (for example
in block_myoverview).  From Moodle 4.0 the category is moved to the last
line making the first line "Short name |".  This change removes that
stray "|".
2023-06-27 17:40:41 +01:00
Dinesh Durai 201c577a85 MDL-77396 wiki: Fix print without background 2023-06-27 17:59:37 +05:30
Simey Lameze edf6ad1ee2 MDL-77286 behat: change window size to large to avoid random fails 2023-06-27 17:12:21 +08:00
Laurent David 54e62e6997 MDL-78432 mod_label: Process markdown in label name
* Process markdown and other allowed formats (see FORMAT_XXX) in get_label_name
so it does not display it as a litteral string in the course index menu.
2023-06-27 08:12:57 +02:00
Andrew Nicols ea900c4def Merge branch 'MDL-78459-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-27 13:14:50 +08:00
Ilya Tregubov aa44a1643e Merge branch 'MDL-78443-401' of https://github.com/jleyva/moodle into MOODLE_401_STABLE 2023-06-27 11:01:44 +08:00
Jake Dallimore 8d3fd17313 MDL-78578 enrol_lti: permit launch cache access during launch redirects
This handles things like site policies, which store the current URL,
redirect to the policy agreement, then redirect back the current URL
afterwards. In such cases, we want to redirect back with 'launchid' set
so that we can fetch the id_token from the session cache. This is the
same thing we already do during account binding, so the patch only
makes sure the PAGE->url is properly set before calling require_login.
2023-06-27 10:07:25 +08:00
mkassaei fff6af7c20 MDL-77679 Drag and drop question type weird behavior 2023-06-26 17:07:51 +01:00
Jun Pataleta 6f0dfe8b4b Merge branch 'MDL-76724_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2023-06-26 19:38:03 +08:00
Huong Nguyen d53b1b1cfe MDL-78554 tiny_link: Fix cannot create link for selection text
Backport of MDL-78065
2023-06-26 15:47:33 +08:00
Paul Holden 32f9d1eeb5 MDL-78554 tiny_link: define help link text language string.
Backport of MDL-77874
2023-06-26 15:47:14 +08:00
Huong Nguyen 684889be8f MDL-78554 tiny_link: Add a TinyMCE link plugin
Backport of MDL-76520

Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2023-06-26 15:45:56 +08:00
Laurent David 29eb09287a MDL-78068 mod_h5pactivity: Fix sort the paragraph activity
* Fix sort the paragraph/sequencing activity report in H5P.
2023-06-26 08:42:39 +02:00
Simey Lameze 31c2baeafd MDL-78521 behat: reload page before asserting content
This commit also reword a Scenario name to make it unique
2023-06-26 11:19:48 +08:00
Sara Arjona 78ec9c1c12 MDL-78572 badges: Improve debugging information for Badgr
This is a backport from MDL-77842.

In MDL-77086 some extra information was added when a badge can't be
sent to a backpack. However, as the Badgr is not following the
specification, it's still hard to debug it when it fails (as
raised in MDL-75552, Badgr is not working because, in some cases,
it's returning the "Method Not Allowed / Request method 'POST'
not supported" error.
2023-06-25 17:40:32 +01:00
Sara Arjona 8e965a9661 MDL-78572 badges: Improve debugging
Display more information, like the status error, when the badge can't
be sent to the backpack.

Backport from MDL-77086
2023-06-25 17:40:03 +01:00
Andrew Nicols d9745d9852 Merge branch 'MDL-78237-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2023-06-24 23:21:58 +08:00
Andrew Nicols 378eae6144 Merge branch 'MDL-76673-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-06-24 22:47:10 +08:00
Andrew Nicols 889e1d4e35 Merge branch 'MDL-78544-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-06-24 22:26:57 +08:00
Andrew Nicols 99d941bd6a Merge branch 'MDL-77152-MOODLE_401_STABLE' of https://github.com/sh-csg/moodle into MOODLE_401_STABLE 2023-06-24 22:18:00 +08:00
Andrew Nicols 904e04a14f Merge branch 'MDL-78172-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-24 22:00:12 +08:00
Eloy Lafuente (stronk7) 3c99a0a9ec MDL-76724 environment: Moodle 4.3 requirements
Note that there aren't changes since Moodle 4.2
so this is a complete copy of the information
for that version.
2023-06-24 12:30:01 +02:00
Stefan Hanauska e3c84dcb32 MDL-77152 files: Ensure trailing/leading slash 2023-06-24 10:32:02 +02:00
Sara Arjona eb1fab720a weekly release 4.1.4+ 2023-06-23 09:00:18 +02:00
Andrew Nicols 4e7a476651 Merge branch 'MDL-78004_401' of https://github.com/mwehr/moodle into MOODLE_401_STABLE 2023-06-22 14:37:45 +02:00
Ilya Tregubov 84a7937643 Merge branch 'MDL-78434-m401' of https://github.com/sammarshallou/moodle into MOODLE_401_STABLE 2023-06-22 14:37:45 +02:00
Julien Boulen fd7e43ef34 MDL-77986 backup: trim extra white spaces on search forms 2023-06-22 14:37:44 +02:00
Andrew Nicols acb9789b89 Merge branch 'MDL-78071-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-22 14:37:44 +02:00
Andrew Nicols fd87f7b46d Merge branch 'MDL-78541/401' of https://github.com/skodak/moodle into MOODLE_401_STABLE 2023-06-22 14:37:44 +02:00
Andrew Nicols 675ca18cfa Merge branch 'MDL-78350-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-22 14:37:44 +02:00
Andrew Nicols 1186e8a7e5 Merge branch 'MDL-68067-41' of https://github.com/Chocolate-lightning/moodle into MOODLE_401_STABLE 2023-06-22 14:37:44 +02:00
Andrew Nicols 70a0c87fd3 Merge branch 'MDL-78056-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-06-22 14:37:44 +02:00
Andrew Nicols e67fd9663d Merge branch 'MDL-78263-401' of https://github.com/jleyva/moodle into MOODLE_401_STABLE 2023-06-22 14:37:43 +02:00
Andrew Nicols 0e3c4ad99b Merge branch 'MDL-78435-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-22 14:37:43 +02:00
Andrew Nicols de329f8268 Merge branch 'MDL-75913-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2023-06-22 14:37:43 +02:00
Andrew Nicols 3488b2ae01 Merge branch 'MDL-78477_401' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_401_STABLE 2023-06-22 14:37:43 +02:00
Andrew Nicols 2452db088e Merge branch 'MDL-77865_MOODLE_401_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_401_STABLE 2023-06-22 14:37:43 +02:00
hieuvu 14079fa738 MDL-78484 formslib: Move enable checkbox display before the date picker 2023-06-22 11:08:47 +07:00
Jake Dallimore 331f47a4f3 MDL-78544 forms: fix string to number comparison bug in duration element
Prior to PHP 8, 0 == "", but now no more. We should use empty instead.
See: https://www.php.net/manual/en/migration80.incompatible.php
2023-06-22 11:01:17 +08:00
Paul Holden e8526347a3 MDL-78350 reportbuilder: parse javascript before rendering template. 2023-06-21 17:33:33 +01:00
Paul Holden 61ae9500d7 MDL-78350 output: parse returned dynamic tab javascript when loading.
Ensure we don't create nested <script> tags when rendering templates,
which triggers console errors since 1ef815cd.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-06-21 17:25:40 +01:00
Juan Leyva 8cbf1bb945 MDL-78263 airnotifier: keep notification name as part of the payload 2023-06-21 18:00:58 +02:00
Petr Skoda 9fee59de2a MDL-78541 admin: ignore headings in admin_apply_default_settings()
This is a workaround for plugins that do not have
unique setting names.
2023-06-21 15:47:06 +02:00
Sara Arjona 97b7c894f3 Merge branch 'MDL-76635-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-06-21 14:02:22 +02:00
Sara Arjona c047801eb6 Merge branch 'MDL-63120_Badges_cron_task_fails-MOODLE_401_STABLE' of https://github.com/mebis-lp/moodle into MOODLE_401_STABLE 2023-06-21 11:50:28 +02:00
Anupama Sarjoshi e954482cb0 MDL-78477 qbank_history: Fix and improve UI for edit menu delete option
Changes done to fix the warnings thrown in the history view when the
last version of a question is deleted and improved UI to display the
message and a Continue button, to navigate back to the Question bank.
2023-06-21 10:44:38 +01:00
Ilya Tregubov e34bb395fc Merge branch 'MDL-77591-401' of https://github.com/justusdieckmann/moodle into MOODLE_401_STABLE 2023-06-21 16:58:44 +08:00
Ilya Tregubov f64e9f96aa Merge branch 'MDL-76174_401' of https://github.com/larsbonczek/moodle into MOODLE_401_STABLE 2023-06-21 14:27:10 +08:00
Simey Lameze 39811c4b40 MDL-76635 comment: render the delete icon in the right place
Special thanks to Andrew Lyons.
2023-06-21 12:45:36 +08:00
Simey Lameze 8bcadeff35 MDL-76635 behat: improve submission comments test 2023-06-21 12:45:36 +08:00
Justus Dieckmann 049815cd5f MDL-77591 mod_assign: Fix feedback zip import for group submissions
Import now checks whether assignment is an group submission and
matches group ids instead of user ids in that case.

Additionally check for original unchanged files to not import in
group files instead of user files.
2023-06-20 20:19:44 +02:00
Lars Bonczek 44f60f1b8e MDL-76174 core_course: get_nearest_editable_subcategory performance fix 2023-06-20 14:43:16 +02:00
Ilya Tregubov a69d5ffe33 Merge branch 'MDL-78259-htmlpurify-media-tags-401' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-06-20 16:38:43 +08:00
Julien Boulen 4001902464 MDL-78259 weblib: purify audio/video tags as inline elements 2023-06-20 16:37:02 +08:00
Ilya Tregubov dea9c9534c Merge branch 'MDL-77525/401' of https://github.com/skodak/moodle into MOODLE_401_STABLE 2023-06-20 13:05:29 +08:00
eWallah 71a818f0ff MDL-68067 tool_mobile: Mobile tool link does not have a class attribute. 2023-06-20 10:27:01 +08:00
Jun Pataleta d963201f0a Merge branch 'MDL-74021-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-06-20 10:13:22 +08:00
Jun Pataleta 64f4f58cb8 Merge branch 'MDL-78369_401' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_401_STABLE 2023-06-19 23:16:46 +08:00
Paul Holden 2060b48377 MDL-78071 cohort: disable report actions for managed cohorts. 2023-06-19 15:05:26 +01:00
Paul Holden 7f8d290022 MDL-78459 tool_mobile: use site context in mobile manifest file.
Prevents debugging notices when the site shortname is formatted in
the response data.
2023-06-19 13:03:36 +01:00
Angelia Dela Cruz 07df782303 MDL-74021 behat: Page behat generators use UI
Replace steps that manually add page instances via the UI and use
Behat generators. This improves the speed of Behat test runs.

Co-authored-by: Simey Lameze <simey@moodle.com>
2023-06-19 17:14:19 +08:00
David Woloszyn 86a2213223 MDL-75913 behat: Use alternatives to Atto in tests 2023-06-19 16:38:18 +10:00
David Woloszyn 94b98082a3 MDL-75913 behat: Switch to TinyMCE editor iframe 2023-06-19 16:38:18 +10:00
David Woloszyn 7f6d6d240f MDL-75913 behat: Private files data generator 2023-06-19 16:38:18 +10:00
Andrew Nicols a6e11f20da MDL-75913 behat: Add support for file uploads in page generators 2023-06-19 16:38:18 +10:00
Andrew Nicols 1f553279d2 MDL-75913 behat: Add support for file uploads in generators 2023-06-19 16:38:18 +10:00
Anders Rasmussen c5471d260e MDL-74893 authentication: Fix auto-login guest
Fixed auto-login as guest, when Guest login button is hidden
2023-06-19 07:49:24 +02:00
Laurent David 301f556e41 MDL-78056 mod_h5pactivity: Fix incorrect attempt report
* Fix interpretation of the results on the attempt report whenever case
sensitive option is enabled.
2023-06-19 06:12:05 +02:00
Paul Holden 38e53fdcb6 MDL-77868 mod_bigbluebuttonbn: default config for welcome editable.
The property was added to the config options in c3f4123b, however no
default value was provided, meaning if it was ever unset then a PHP
type error would be triggered on the null return.
2023-06-18 19:19:53 +01:00
Petr Skoda 52e39db7ad MDL-77525 filter: add filtering stages 2023-06-17 16:49:34 +02:00
Paul Holden 0f052d1c35 MDL-78435 mod_assign: ensure due date is always after start date. 2023-06-16 18:42:10 +01:00
Juan Leyva bc2fb3b5e8 MDL-78443 course: Missing require for course_request 2023-06-16 10:17:45 +02:00
Andrew Nicols 64b701190d weekly release 4.1.4+ 2023-06-16 12:04:26 +08:00
Andrew Nicols 202e6a788f Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-06-16 12:04:23 +08:00
Angelia Dela Cruz e08630b394 MDL-78455 Behat: Behat cleanup and optimisation for blog/tests/behat 2023-06-16 09:19:13 +08:00
Angelia Dela Cruz e4a8e344ba MDL-78455 Behat: Add Behat for adding, editing and deleting blog entries 2023-06-16 09:16:32 +08:00
Nathan Nguyen 35f0386bd3 MDL-77865 qtype_ddwtos: fix incorrect inplace class 2023-06-15 15:03:54 +10:00
Ilya Tregubov a3692234ed Merge branch 'MDL-70152-401-fix' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-06-15 12:12:18 +08:00
Simey Lameze 460e2c0c1e MDL-70152 behat: reply to post using data generator 2023-06-15 12:05:41 +08:00
Andrew Nicols 4997295c38 Merge branch 'MDL-77224-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-15 12:02:40 +08:00
Andrew Nicols b66d82ccb4 Merge branch 'MDL-77569-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-15 12:00:55 +08:00
Andrew Nicols e2f07cf2b4 Merge branch 'MDL-78066-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-06-15 11:27:02 +08:00
Andrew Nicols dedfbb7e63 Merge branch 'MDL-78461-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-15 11:23:27 +08:00
Andrew Nicols 196ed7530b Merge branch 'MDL-69231-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-06-15 10:56:53 +08:00
Ilya Tregubov 7e523dfff9 Merge branch 'MDL-77542-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-15 10:36:34 +08:00
Ilya Tregubov 053ad4a57e Merge branch 'MDL-76733-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-06-15 10:23:36 +08:00
Andrew Nicols 46f3dc6538 Merge branch 'MDL-78478-401' of https://github.com/dasistwas/moodle into MOODLE_401_STABLE 2023-06-15 09:56:18 +08:00
Jake Dallimore 68b6ca2f69 MDL-78066 enrol_lti: fix deep linking error in multiple grade items case
If an activity, like workshop or forum, has multiple grade items,
declarative binding of the grade item (line item) isn't supported.
Instead of throwing an exception, handle the case more elegantly
and just omit the 'add to gradebook' option for these activities.
2023-06-15 09:44:21 +08:00
Jake Dallimore 32a34f805f MDL-78066 enrol_lti: test showing multi-grade-items failure
This test demonstrates the failure of the repository to properly fetch
published resources which are compatible with declarative line item
binding.
2023-06-15 09:44:17 +08:00
Andrew Nicols 1adbb84d07 MDL-76733 mod_assign: Remove JS requirement for time-based tests
Converting these tests to use an onlinetext submission and drop the JS
requirement means that they are much less susceptible to runtime issues,
and not susceptible to those caused by JS at all.
2023-06-15 09:34:06 +08:00
Andrew Nicols b5fa1ee8dc MDL-76733 mod_assign: Address random failure
This random failure was happening because of the time required to render
and interact with the file picker which sometimes exceeded 2 seconds,
depending on the speed of the machine running the tests.

Converting these tests to use an onlinetext submission and drop the JS
requirement means that they are much less susceptible to runtime issues,
and not susceptible to those caused by JS at all.
2023-06-15 09:33:42 +08:00
Ilya Tregubov 5472d69233 Merge branch 'MDL-78102-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-06-15 09:04:09 +08:00
AMOS bot ba4f42dfff Automatically generated installer lang files 2023-06-15 00:16:23 +00:00
Sara Arjona 36a7924b64 Merge branch 'MDL-78055-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-14 16:54:57 +02:00
Sara Arjona 4dcf2db446 Merge branch 'MDL-74824-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-14 16:51:11 +02:00
Sara Arjona 86b030d671 Merge branch 'MDL-76733-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-06-14 16:22:26 +02:00
David Bogner c461b4d8fc MDL-78478 forms: Fix repeated elements in dynamic forms 2023-06-14 15:30:32 +02:00
Paul Holden b8f3aa4d12 MDL-78055 themes: account for undefined extrascsscallback config.
Where a theme didn't define this property, it would raise debugging
deprecation warnings in PHP8.1.
2023-06-14 13:51:12 +01:00
Sara Arjona 29d1702f82 Merge branch 'MDL-76715-401' of https://github.com/aanabit/moodle into MOODLE_401_STABLE 2023-06-14 13:19:03 +02:00
Sara Arjona 4c6e5c977d Merge branch 'MDL-64648-401_enrol_manual_expirynotify_default_in_enrol_instance' of https://github.com/vtos/moodle into MOODLE_401_STABLE 2023-06-14 13:08:25 +02:00
Jun Pataleta 302d6f2a3e Merge branch 'MDL-78466-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-06-14 16:05:55 +08:00
Ilya Tregubov beb0328060 Merge branch 'MDL-70152-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-06-14 13:25:03 +08:00
Jun Pataleta e460f1ed4e Merge branch 'MDL-76445-401-patch' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-06-14 12:19:03 +08:00
Ilya Tregubov c162f90445 MDL-76445 gradereport_singleview: Fix Behat test
When you unenrol a user, the notification blocks some tertiary
navigation links.
2023-06-14 11:38:04 +08:00
Andrew Nicols fdf7ea57f0 MDL-78466 cache: Add new result_found helper
This helper is intended to prevent recurrences of this issue by moving
the guess-work to something well tested.
2023-06-14 09:35:40 +08:00
Ilya Tregubov b699da1461 MDL-76445 core_grades: Use group select instead of group search
On Moodle 4.1 we don't have group search on grader report.
That is only available in 4.2+
2023-06-14 09:34:22 +08:00
Andrew Nicols 02652c7651 MDL-78466 cache: Perform strict test on static cache values
If a statically accelerated cache returns an empty array then the value
was still fetched from the non-static cache store.

The check of the `$result` should be strictly checked against `false`,
which is the value used if no value was found.
2023-06-14 09:28:48 +08:00
vtos e0145522c9 MDL-64648 enrol_manual: fixed default setting of 'expirynotify'
When creating a course, a manual enrolment instance is added by default. The instance settings should inherit the values of those
for the manual enrolment plugin and properly calculate its extra settings. The 'expirynotify' setting wasn't inherited correctly
in case it had 'Enroller + Enrolled' value.
A functional test was added to test the behaviour of settings inheritance.
2023-06-13 18:23:35 +02:00
Paul Holden 43d715777a MDL-78461 core: fix base plugininfo class reference to root directory. 2023-06-13 14:05:31 +01:00
Sara Arjona 7e74ec4a3c MDL-78102 badges: Check empty backpack email/password
For backpack connection using OBv2.0, email and password can't be
blank.
This patch adds some extra checks to validate this and displays an
error to the users before trying to connect to the backpack.
Besides, the error displayed when any error is returned by the
backpack (like invalid credentials), has also been improved, to
make it clearer for the users.
2023-06-13 11:21:52 +02:00
sam marshall 673576142e MDL-78434 Lib: PHP 8.1 incompatible code relating to LDAP\Connection 2023-06-13 09:45:04 +01:00
Ilya Tregubov f6650607d6 Merge branch 'MDL-76445-401-2' of https://github.com/mihailges/moodle into MOODLE_401_STABLE 2023-06-13 15:46:29 +08:00
Amaia Anabitarte 789361ae13 MDL-76715 mod_data: Remove data_records when the last field is deleted 2023-06-13 09:35:09 +02:00
Mihail Geshoski 6ceb137f04 MDL-76445 gradereport_singleview: Usability fixes 2023-06-13 15:20:03 +08:00
Mihail Geshoski e60edbf0cb MDL-76445 gradereport_user: Usability fixes 2023-06-13 15:20:03 +08:00
Mihail Geshoski f057a2aef9 MDL-76445 grade: Helper that returns all gradable users in a course 2023-06-13 15:20:03 +08:00
Jake Dallimore f5e4dcf609 Merge branch 'MDL-73052-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-06-13 14:44:52 +08:00
Andrew Nicols a4cc94f3d0 MDL-78297 core: Bump version to update cache config
The missing version bump caused cache configuration to not be updated,
and the static acceleration cache size was therefore not updated. The
result here was that the static acceleration cache was constantly
emptied leading to an increased page load time.
2023-06-13 11:06:20 +08:00
michaelkotlyar c893e3f9b8 MDL-76840 mod_assign: Account for extension when calculating time left. 2023-06-13 14:54:11 +12:00
Anupama Sarjoshi 6664e73599 MDL-78369 Multiple choice: Increase Choice and feedback boxes size 2023-06-12 12:02:21 +01:00
Jun Pataleta fcdad9f31c Merge branch 'MDL-75937-401' of https://github.com/stevandoMoodle/moodle into MOODLE_401_STABLE 2023-06-12 16:10:45 +08:00
Stevani Andolo f0211bbfb1 MDL-75937 admin: Fixed config data display inconsistency 2023-06-12 15:29:54 +08:00
Andrew Nicols 73a55b6268 Merge branch 'MDL-78297-401' of https://github.com/MartinGauk/moodle into MOODLE_401_STABLE 2023-06-12 10:19:43 +08:00
Paul Holden d9c8e2561e MDL-77224 mod_h5pactivity: clean up attempt data on activity deletion. 2023-06-11 18:37:13 +01:00
Paul Holden 99681d7df8 MDL-77993 mod_lesson: ensure report action menu always present. 2023-06-11 18:35:14 +01:00
Paul Holden 05074c1ca3 MDL-74824 user: fix custom change password URL in login notification. 2023-06-11 17:41:09 +01:00
Paul Holden 3215a7b190 MDL-78018 mod_assign: format group name in grading table. 2023-06-11 15:02:36 +01:00
Paul Holden afe9d11746 MDL-77542 mod_assign: remove duplicate grade heading from grader.
It's already part of the subsequent rendered form.
2023-06-11 15:01:35 +01:00
Paul Holden 9ed9a010d6 MDL-78172 mod_forum: ensure group names are correctly formatted. 2023-06-11 15:00:28 +01:00
Paul Holden eea061bc42 MDL-77569 reportbuilder: cache custom report element persistents.
During request lifecycle ensure that column, filter and condition
persistents are only loaded a single time to prevent additional
database reads.

Provide invalidation method, used by the report helpers, to ensure
that the persistents are re-loaded appropriately.

This is a backport of MDL-76901.

Co-authored-by: Marina Glancy <marina@moodle.com>
2023-06-08 10:00:19 +01:00
David Woloszyn 0596ff2d2b MDL-78237 editor_tiny: Prevent navbar obscuring modal content 2023-06-08 17:15:13 +10:00
David Woloszyn 2d677835ec MDL-78237 css: Make navbar height available for non sass-use 2023-06-08 17:15:13 +10:00
Martin Gauk 190db6962e MDL-78297 core: Less cache lookups in deprecated capabilities feature
Avoid use of $cache->has.
2023-06-07 12:04:36 +02:00
Sara Arjona 8caeea5c47 MDL-73052 page: Fix page description when it has only an image
This is as regression of MDL-72413, when description was moved to a
standard module API.
In some cases, when description has only images, it's was not
displayed.
2023-06-02 08:20:38 +02:00
Simey Lameze fc10598d63 MDL-69231 behat: remaining work for role capability generator
This commit does few things:
* Unify data generators usage to role short name.
* Replace remaining manual steps to use the new data generator.
* Also replaced other manual steps to set config to use data generators.
* Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines.
* Fixes tests to have one Given/When/Then per scenario.
2023-06-02 12:42:35 +08:00
Andrew Nicols b67b10af29 MDL-69231 behat: Update tests to use new generator 2023-06-02 12:42:35 +08:00
Andrew Nicols c4cd52ce5a MDL-69231 tests: Add role capability setting generator 2023-06-02 12:42:35 +08:00
Andrew Nicols c49877c8f5 MDL-69231 tests: Improve existing role generator
Support definition of context levels and permissions.
2023-06-02 12:42:35 +08:00
Angelia Dela Cruz 948ac8f62b MDL-70152 behat: Forum behat generators use UI
Behat cleanup and optimisation
2023-05-29 10:28:04 +08:00
Angelia Dela Cruz d7752f9576 MDL-70152 behat: Forum behat generators use UI
Replace steps that manually add forum and forum post instances
via the UI and use Behat generators. This improves the speed of
Behat test runs.
2023-05-29 10:27:33 +08:00
Andrew Nicols c38a977f3d MDL-70152 forum: Create behat data generator
* Convert track_read_posts.feature to use activity and discussion
data generators as exmaple.

Co-authored-by: Jun Pataleta <jun@moodle.com>
2023-05-29 10:27:33 +08:00
Meirza e076d036c2 MDL-76673 atto: Check color contrast only on elements that have text
If the content in Atto is wrapped by an element with only a background color, without text color,
the accessibility checker will use the parent text-color as the foreground color, which is owned by form-control,
it becomes a problem if the wrapped element background using #34274f and the parent text-color is #495057 then
the low contrast as a result.

To avoid such a situation, the patch will only calculate color contrast if only the element has text,
so it will give results per element if the accessibility checker is unsatisfied.
2023-05-27 13:56:50 +07:00
Meirza c6b52f6822 MDL-76673 tiny: Check color contrast only on elements that have text
If the content in Tiny is wrapped by an element with only a background color, without text color,
the accessibility checker will use the parent text-color as the foreground color, which is owned by form-control,
it becomes a problem if the wrapped element background using #34274f and the parent text-color is #495057 then
the low contrast as a result.

To avoid such a situation, the patch will only calculate color contrast if only the element has text,
so it will give results per element if the accessibility checker is unsatisfied.

The patch also changes the selected element from 'body > *' to 'body *',
so it will return all elements (parents and children) in the content instead of parents only.

And minor modifications on the warning_content.mustache to fix the numbering format.
2023-05-27 13:56:50 +07:00
Wehr Mario d7194d3de0 MDL-78004 cache: Fix deprecated null value in Redis connect 2023-05-26 13:22:35 +02:00
= 282a908540 MDL-63120 core_badges: Avoid multiple joins in sql statement 2023-05-24 13:36:41 +02:00
Andrew Nicols 1450dade43 MDL-76733 mod_assign: Tidy up availability behat tests
This feature had lots of small issues and it made sense to fix it whilst
investigating a query:

* most of the steps do not require JavaScript
* it uses the UI to set an admin setting, for every scenario:
** only 3-4 of the scenarios actually test that setting
** it is very slow to do it his way when we have a generator step we can use
* we create two assignments in the Background, but each test only uses one of them
* we create the assignments in the Background with a generator, but
  update them to modify various settings in each Scenario using the UI
  when we should just create one assignment for each test and set it up
  correctly for that Scenario
2023-05-23 10:58:07 +08:00
Jake Dallimore 75ba439f5b MDL-77990 enrol_lti: fix http_client shim by using curl getResponse
Fixes an error in the parsing of response headers containing multiple
HTTP responses in the raw response. Curl already handles this, so let
it do the work.
2023-05-05 10:44:19 +08:00
Jake Dallimore 159a131989 MDL-77990 enrol_lti: test covering the response header parsing
Makes sure the http_client shim properly returns the correct, final
http headers, not intermediate headers such as 302, 100 etc.
2023-05-05 10:44:18 +08:00
Miri Lipson a10f75360b MDL-75047 icons: Define the orientation of the question mark in right-to-left languages. 2023-01-23 17:26:45 +02:00
1576 changed files with 33636 additions and 15354 deletions
+30 -93
View File
@@ -1,8 +1,12 @@
{
'plugins': [
'babel',
'@babel',
'promise',
'jsdoc',
'jsdoc'
],
'extends': [
'eslint:recommended',
'plugin:promise/recommended'
],
'env': {
'browser': true,
@@ -16,42 +20,19 @@
'M': true,
'Y': true
},
// Warn about unused eslint-disable statements.
'reportUnusedDisableDirectives': true,
'rules': {
// See http://eslint.org/docs/rules/ for all rules and explanations of all
// rules.
// === Possible Errors ===
'comma-dangle': 'off',
'no-compare-neg-zero': 'error',
'no-cond-assign': 'error',
'no-console': 'error',
'no-constant-condition': 'error',
'no-control-regex': 'error',
'no-debugger': 'error',
'no-dupe-args': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-empty': 'warn',
'no-empty-character-class': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-parens': 'off',
'no-extra-semi': 'error',
'no-func-assign': 'error',
'no-inner-declarations': 'error',
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-obj-calls': 'error',
'no-prototype-builtins': 'off',
'no-regex-spaces': 'error',
'no-sparse-arrays': 'error',
'no-unexpected-multiline': 'error',
'no-unreachable': 'warn',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'use-isnan': 'error',
'valid-jsdoc': ['warn', { 'requireReturn': false, 'requireParamDescription': false, 'requireReturnDescription': false }],
'valid-typeof': 'error',
// === Best Practices ===
// (these mostly match our jshint config)
@@ -63,15 +44,12 @@
'dot-notation': 'warn',
'no-alert': 'warn',
'no-caller': 'error',
'no-case-declarations': 'error',
'no-div-regex': 'error',
'no-empty-pattern': 'error',
'no-empty-function': 'warn',
'no-eq-null': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'warn',
'no-fallthrough': 'error',
'no-floating-decimal': 'warn',
'no-global-assign': 'warn',
'no-implied-eval': 'error',
@@ -83,28 +61,22 @@
'no-multi-str': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-proto': 'error',
'no-redeclare': 'warn',
'no-restricted-globals': ['error', { 'name': 'Notification' }],
'no-return-assign': 'error',
'no-script-url': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'warn',
'no-throw-literal': 'warn',
'no-unmodified-loop-condition': 'error',
'no-unused-expressions': 'error',
'no-unused-labels': 'error',
'no-useless-call': 'warn',
'no-useless-escape': 'warn',
'no-with': 'error',
'wrap-iife': ['error', 'any'],
// === Variables ===
'no-delete-var': 'error',
'no-undef': 'error',
'no-undef-init': 'error',
'no-unused-vars': ['error', { 'caughtErrors': 'none' }],
@@ -137,8 +109,6 @@
'max-statements-per-line': ['warn', { max: 2 }],
'new-cap': ['warn', { 'properties': false }],
'new-parens': 'warn',
'newline-after-var': 'off',
'newline-before-return': 'off',
'newline-per-chained-call': 'off',
'no-array-constructor': 'off',
'no-bitwise': 'error',
@@ -146,7 +116,6 @@
'no-inline-comments': 'off',
'no-lonely-if': 'off',
'no-mixed-operators': 'off',
'no-mixed-spaces-and-tabs': 'error',
'no-multiple-empty-lines': 'warn',
'no-negated-condition': 'off',
'no-nested-ternary': 'warn',
@@ -168,7 +137,6 @@
'padded-blocks': 'off',
'quote-props': ['warn', 'as-needed', {'unnecessary': false, 'keywords': true, 'numbers': true}],
'quotes': 'off',
'require-jsdoc': 'warn',
'semi': 'error',
'semi-spacing': ['warn', {'before': false, 'after': true}],
'sort-vars': 'off',
@@ -181,21 +149,19 @@
'unicode-bom': 'error',
'wrap-regex': 'off',
// === Promises ===
// === Promises (override plugin:promise/recommended) ===
'promise/always-return': 'warn',
'promise/no-return-wrap': 'warn',
'promise/param-names': 'warn',
'promise/catch-or-return': ['warn', {terminationMethod: ['catch', 'fail']}],
'promise/no-native': 'warn',
'promise/no-promise-in-callback': 'warn',
'promise/no-callback-in-promise': 'warn',
'promise/avoid-new': 'warn',
// === Deprecations ===
"no-restricted-properties": ['warn', {
'object': 'M',
'property': 'str',
'message': 'Use AMD module "core/str" or M.util.get_string()'
'message': 'Use "core/str" module or M.util.get_string()'
}],
},
overrides: [
@@ -235,7 +201,6 @@
parser: '@babel/eslint-parser',
// Check AMD with some slightly stricter rules.
rules: {
'no-unused-vars': 'error',
'no-implicit-globals': 'error',
// Disable all of the rules that have babel versions.
'new-cap': 'off',
@@ -247,65 +212,37 @@
'semi': 'off',
'no-unused-expressions': 'off',
// Enable all of the babel version of these rules.
'babel/new-cap': ['warn', { 'properties': false }],
'@babel/new-cap': ['warn', { 'properties': false }],
// Not using this rule for the time being because it isn't
// compatible with jQuery and ES6.
'babel/no-invalid-this': 'off',
'babel/object-curly-spacing': 'warn',
// This is off in the original style int.
'babel/quotes': 'off',
'babel/semi': 'error',
'babel/no-unused-expressions': 'error',
'@babel/no-invalid-this': 'off',
'@babel/object-curly-spacing': 'warn',
'@babel/semi': 'error',
'@babel/no-unused-expressions': 'error',
// === Promises ===
// We have Promise now that we're using ES6.
'promise/no-native': 'off',
'promise/avoid-new': 'off',
// === JSDocs ===
"jsdoc/check-access": [
'error',
],
"jsdoc/check-alignment": 1, // Recommended.
"jsdoc/check-param-names": [
'error',
],
"jsdoc/check-property-names": [
'error',
],
"jsdoc/empty-tags": [
'error',
],
"jsdoc/implements-on-classes": [
'error',
],
"jsdoc/multiline-blocks": [
'error',
],
"jsdoc/require-jsdoc": [
'error',
],
"jsdoc/require-param": [
'error',
],
"jsdoc/require-param-name": [
'error',
],
"jsdoc/require-param-type": [
'error',
],
"jsdoc/require-property": [
'error',
],
"jsdoc/require-property-name": [
'error',
],
"jsdoc/require-property-type": [
'error',
],
'jsdoc/check-access': 'error',
'jsdoc/check-alignment': 1, // Recommended.
'jsdoc/check-param-names': 'error',
'jsdoc/check-property-names': 'error',
'jsdoc/empty-tags': 'error',
'jsdoc/implements-on-classes': 'error',
'jsdoc/multiline-blocks': 'error',
'jsdoc/require-jsdoc': 'error',
'jsdoc/require-param': 'error',
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
'jsdoc/require-property': 'error',
'jsdoc/require-property-name': 'error',
'jsdoc/require-property-type': 'error'
},
parserOptions: {
'sourceType': 'module',
'requireConfigFile': false,
'requireConfigFile': false
}
}
]
+10 -4
View File
@@ -7,6 +7,12 @@ on:
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.1
@@ -17,10 +23,10 @@ jobs:
steps:
- name: Checking out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Configuring node & npm
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
@@ -97,7 +103,7 @@ jobs:
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setting up PHPUnit
env:
@@ -113,4 +119,4 @@ jobs:
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options
run: vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
+3 -3
View File
@@ -16,10 +16,10 @@ jobs:
git config --global core.eol lf
- name: Checking out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Configuring node & npm
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
@@ -112,7 +112,7 @@ jobs:
git config --global core.eol lf
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v3
uses: actions/checkout@v4
# Needs to be done after php is available, git configured and Moodle checkout has happened.
- name: Setting up moodle-exttests service
+1 -1
View File
@@ -16,4 +16,4 @@ Moodle - the world's open source learning platform
This generated documentation includes API documentation for JavaScript written in the AMD and ES2015 module formats within Moodle.
## Related information
See [https://docs.moodle.org/dev](https://docs.moodle.org/dev) for other related Developer Documentation.
See [https://moodledev.io](https://moodledev.io) for other related Developer Documentation.
+1 -1
View File
@@ -114,7 +114,7 @@ module.exports = {
],
"menu": {
"Developer Docs": {
href: "https://docs.moodle.org/dev",
href: "https://moodledev.io",
target: "_blank",
"class": "menu-item",
id: "devdocs"
+7 -19
View File
@@ -21,7 +21,7 @@
*/
/**
* Function to generate the destination for the uglify task
* Function to generate the destination for the minification task
* (e.g. build/file.min.js). This function will be passed to
* the rename property of files array when building dynamically:
* http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
@@ -60,7 +60,6 @@ module.exports = grunt => {
grunt.registerTask('js', ['amd', 'yui']);
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-rollup');
@@ -104,6 +103,7 @@ module.exports = grunt => {
// The queue runner will run the next `size` items in the queue.
const runQueue = (size = 1) => {
queue.splice(0, size).forEach(resolve => {
grunt.log.debug(`Item resolved. Kicking off next one.`);
resolve();
});
};
@@ -113,15 +113,17 @@ module.exports = grunt => {
// The options hook is run in parallel.
// We can return an unresolved Promise which is queued for later resolution.
options: async() => {
options: async(options) => {
return new Promise(resolve => {
queue.push(resolve);
startQueue();
return options;
});
},
// When an item in the queue completes, start the next item in the queue.
buildEnd: () => {
generateBundle: (options, bundle) => {
grunt.log.debug(`Finished output phase for ${Object.keys(bundle).join(', ')}`);
runQueue();
},
};
@@ -151,24 +153,10 @@ module.exports = grunt => {
//
// It also adds the Moodle plugin name to the AMD module definition
// so that it can be imported as expected in other modules.
path.resolve('.grunt/babel-plugin-add-module-to-define.js'),
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
['@babel/plugin-proposal-class-properties', {'loose': false}],
'@babel/plugin-proposal-json-strings'
path.resolve('.grunt/babel-plugin-add-module-to-define.js')
],
presets: [
['@babel/preset-env', {
targets: {
browsers: [
">0.3%",
"last 2 versions",
"not ie >= 0",
"not op_mini all",
"not Opera > 0",
"not dead"
]
},
modules: false,
useBuiltIns: false
}]
+28 -12
View File
@@ -20,17 +20,33 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
// Project configuration.
grunt.config.merge({
jsdoc: {
dist: {
options: {
configure: ".grunt/jsdoc/jsdoc.conf.js",
},
},
},
});
module.exports = (grunt) => {
const path = require('path');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.registerTask('jsdoc', 'Generate JavaScript documentation using jsdoc', function() {
const done = this.async();
const configuration = path.resolve('.grunt/jsdoc/jsdoc.conf.js');
grunt.util.spawn({
cmd: 'jsdoc',
args: [
'--configure',
configuration,
]
}, function(error, result, code) {
if (result.stdout) {
grunt.log.write(result.stdout);
}
if (result.stderr) {
grunt.log.error(result.stderr);
}
if (error) {
grunt.fail.fatal(`JSDoc failed with error code ${code}`);
} else {
grunt.log.write('JSDoc completed successfully'.green);
}
done();
});
});
};
+5 -1
View File
@@ -29,6 +29,7 @@ module.exports = grunt => {
// Use a fully-qualified path.
src: files,
options: {
quietDeprecationWarnings: true,
configOverrides: {
rules: {
// These rules have to be disabled in .stylelintrc for scss compat.
@@ -45,7 +46,10 @@ module.exports = grunt => {
return {
stylelint: {
scss: {
options: {syntax: 'scss'},
options: {
quietDeprecationWarnings: true,
customSyntax: 'postcss-scss',
},
src: files,
},
},
+1 -1
View File
@@ -1 +1 @@
lts/gallium
lts/iron
+16 -4
View File
@@ -1,9 +1,14 @@
{
"customSyntax": "postcss-scss",
"plugins": [
"stylelint-csstree-validator"
],
"rules": {
"csstree/validator": true,
"csstree/validator": {
"syntaxExtensions": [
"sass"
]
},
"at-rule-empty-line-before": [ "always",
{"except": [ "blockless-after-blockless"], ignore: ["after-comment", "inside-block"]}
],
@@ -45,7 +50,7 @@
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-url-scheme-blacklist": ["data"],
"function-url-scheme-disallowed-list": ["data"],
"function-whitespace-after": "always",
"indentation": 4,
"keyframe-declaration-no-important": true,
@@ -84,12 +89,19 @@
"selector-type-no-unknown": true,
"string-no-newline": true,
"time-min-milliseconds": 100,
"unit-blacklist": ["pt"],
"unit-disallowed-list": ["pt"],
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
}
},
"overrides": [
{
"files": ["**/yui/**/*.css"],
"rules": {
}
}
]
}
+3 -3
View File
@@ -6,7 +6,7 @@ of developers, designers, teachers, testers, translators and other users. We
work in universities, schools, companies and other places. You are very welcome
to join us and contribute to the project.
See <https://docs.moodle.org/dev/Contributing_to_Moodle> for the many ways you
See <https://moodledev.io/general/community/contribute> for the many ways you
can help, not only with coding.
Moodle is open to community contributions to core, though all code must go
@@ -35,7 +35,7 @@ submitted patches has evolved.
* New features are developed on the master branch. Bug fixes are also
backported to currently supported maintenance (stable) branches.
For further details, see <https://docs.moodle.org/dev/Process>.
For further details, see <https://moodledev.io/general/development/process>.
Moodle plugins
--------------
@@ -53,4 +53,4 @@ be easily installed and updated via the Moodle administration interface.
the plugins directory. We do not pull from your code repository; you must do
it explicitly.
For further details, see <https://docs.moodle.org/dev/Plugin_contribution>.
For further details, see <https://moodledev.io/general/community/plugincontribution>.
+1 -1
View File
@@ -20,7 +20,7 @@ Moodle is widely used around the world by universities, schools, companies and
all manner of organisations and individuals.
Moodle is provided freely as open source software, under the GNU General Public
License <https://docs.moodle.org/dev/License>.
License <https://moodledev.io/general/license>.
Moodle is written in PHP and JavaScript and uses an SQL database for storing
the data.
+1 -2
View File
@@ -131,8 +131,7 @@ if ($savebutton) {
$outputhtml .= html_writer::end_tag('div');
}
$visiblepathtosection = array_reverse($settingspage->visiblepath);
$PAGE->set_title("$SITE->shortname: " . implode(": ",$visiblepathtosection));
$PAGE->set_title(implode(moodle_page::TITLE_SEPARATOR, $settingspage->visiblepath));
$PAGE->set_heading($SITE->fullname);
if ($buttons) {
$PAGE->set_button($buttons);
+11
View File
@@ -57,6 +57,7 @@ Options:
--fullname=STRING Name of the site
--shortname=STRING Name of the site
--summary=STRING The summary to be displayed on the front page
--supportemail=STRING Email address for support and help.
-h, --help Print out this help
Example:
@@ -98,6 +99,7 @@ list($options, $unrecognized) = cli_get_params(
'fullname' => '',
'shortname' => '',
'summary' => '',
'supportemail' => '',
'agree-license' => false,
'help' => false
),
@@ -136,6 +138,15 @@ if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
// Validate that the supportemail provided was an e-mail address.
if (!empty($options['supportemail']) && !validate_email($options['supportemail'])) {
$a = (object) [
'option' => 'supportemail',
'value' => $options['supportemail']
];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
$options['lang'] = clean_param($options['lang'], PARAM_SAFEDIR);
if (!file_exists($CFG->dirroot.'/install/lang/'.$options['lang'])) {
$options['lang'] = 'en';
+2 -2
View File
@@ -80,8 +80,8 @@ if (!$category = $DB->get_record('course_categories', ['id' => $options['categor
throw new \moodle_exception('invalidcategoryid');
}
$backupdir = "restore_" . uniqid();
$path = $CFG->tempdir . DIRECTORY_SEPARATOR . "backup" . DIRECTORY_SEPARATOR . $backupdir;
$backupdir = restore_controller::get_tempdir_name(SITEID, $USER->id);
$path = make_backup_temp_directory($backupdir);
cli_heading(get_string('extractingbackupfileto', 'backup', $path));
$fp = get_file_packer('application/vnd.moodle.backup');
+589
View File
@@ -3923,6 +3923,8 @@
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_oracle_usage" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.2" requires="3.11.8">
@@ -3939,6 +3941,7 @@
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.0.0" level="required">
<RESTRICT function="restrict_php_version_83" message="unsupportedphpversion83" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -4112,6 +4115,592 @@
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_oracle_usage" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.3" requires="3.11.8">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.6.7" />
<VENDOR name="mysql" version="8.0" />
<VENDOR name="postgres" version="13" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.0.0" level="required">
<RESTRICT function="restrict_php_version_83" message="unsupportedphpversion83" />
</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_oracle_usage" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.4" requires="4.1.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.6.7" />
<VENDOR name="mysql" version="8.0" />
<VENDOR name="postgres" version="13" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.1.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_oracle_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.5" requires="4.1.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.6.7" />
<VENDOR name="mysql" version="8.0" />
<VENDOR name="postgres" version="13" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.1.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_oracle_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+3 -3
View File
@@ -224,7 +224,7 @@ if (!core_tables_exist()) {
$strlicense = get_string('license');
$PAGE->navbar->add($strlicense);
$PAGE->set_title($strinstallation.' - Moodle '.$CFG->target_release);
$PAGE->set_title($strinstallation . moodle_page::TITLE_SEPARATOR . 'Moodle ' . $CFG->target_release, false);
$PAGE->set_heading($strinstallation);
$PAGE->set_cacheable(false);
@@ -267,7 +267,7 @@ if (!core_tables_exist()) {
upgrade_init_javascript();
$PAGE->navbar->add($strdatabasesetup);
$PAGE->set_title($strinstallation.' - Moodle '.$CFG->target_release);
$PAGE->set_title($strinstallation . moodle_page::TITLE_SEPARATOR . $CFG->target_release, false);
$PAGE->set_heading($strinstallation);
$PAGE->set_cacheable(false);
@@ -811,7 +811,7 @@ $context = context_system::instance();
if (!has_capability('moodle/site:config', $context)) {
// Do not throw exception display an empty page with administration menu if visible for current user.
$PAGE->set_title($SITE->fullname);
$PAGE->set_title(get_string('home'));
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();
echo $OUTPUT->footer();
+4 -8
View File
@@ -96,20 +96,16 @@ function core_admin_pluginfile($course, $cm, $context, $filearea, $args, $forced
send_file_not_found();
}
// No need for resizing, but if the file should be cached we save it so we can serve it fast next time.
if (empty($maxwidth) && empty($maxheight)) {
// Check whether width/height are specified, and we can resize the image (some types such as ICO cannot be resized).
if (($maxwidth === 0 && $maxheight === 0) ||
!$filedata = $file->resize_image($maxwidth, $maxheight)) {
if ($lifetime) {
file_safe_save_content($file->get_content(), $candidate);
}
send_stored_file($file, $lifetime, 0, false, $options);
}
// Proceed with the resizing.
$filedata = $file->resize_image($maxwidth, $maxheight);
if (!$filedata) {
send_file_not_found();
}
// If we don't want to cached the file, serve now and quit.
if (!$lifetime) {
send_content_uncached($filedata, $filename);
+1 -1
View File
@@ -21,7 +21,7 @@
* Displays the list of found local plugins, their version (if found) and
* a link to delete the local plugin.
*
* @see http://docs.moodle.org/dev/Local_customisation
* @see https://moodledev.io/docs/apis/plugintypes/local
* @package admin
* @copyright 2010 David Mudrak <david.mudrak@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+1 -1
View File
@@ -20,7 +20,7 @@
* Displays the list of found plagiarism plugins, their version (if found) and
* a link to uninstall the plagiarism plugin.
*
* @see http://docs.moodle.org/dev/Plagiarism_API
* @see https://moodledev.io/docs/apis/subsystems/plagiarism
* @package admin
* @copyright 2012 Dan Marsden <dan@danmarsden.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -26,42 +26,14 @@ namespace core_adminpresets\local\setting;
*/
class adminpresets_admin_setting_configmultiselect extends adminpresets_setting {
/**
* Ensure that the $value values are setting choices.
*
* @param mixed $value Setting value
* @return mixed Returns false if wrong param value
*/
protected function set_value($value) {
if ($value) {
$options = explode(',', $value);
foreach ($options as $option) {
foreach ($this->settingdata->choices as $key => $choice) {
if ($key == $option) {
$this->value = $option;
$this->set_visiblevalue();
return true;
}
}
}
$value = implode(',', $options);
}
$this->value = $value;
$this->set_visiblevalue();
return true;
}
protected function set_visiblevalue() {
$values = explode(',', $this->value);
$visiblevalues = [];
foreach ($values as $value) {
if (!empty($this->settingdata->choices[$value])) {
// Ensure that each value exists as a setting choice.
if (array_key_exists($value, $this->settingdata->choices)) {
$visiblevalues[] = $this->settingdata->choices[$value];
}
}
+13 -8
View File
@@ -44,7 +44,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->heading(get_string('copyrightnotice'));
$output .= $this->box($copyrightnotice, 'copyrightnotice');
$output .= html_writer::empty_tag('br');
$output .= $this->confirm(get_string('doyouagree'), $continue, "http://docs.moodle.org/dev/License");
$output .= $this->confirm(get_string('doyouagree'), $continue, "https://moodledev.io/general/license");
$output .= $this->footer();
return $output;
@@ -746,10 +746,10 @@ class core_admin_renderer extends plugin_renderer_base {
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
'<a href="http://docs.moodle.org/dev/Releases" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'<a href="https://moodledev.io/general/releases" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
'and <a href="http://moodle.org/dev">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/dev/License">GNU Public License</a>';
'<a href="https://moodledev.io/general/license">GNU Public License</a>';
//////////////////////////////////////////////////////////////////////////////////////////////////
return $this->box($copyrighttext, 'copyright');
@@ -898,7 +898,8 @@ class core_admin_renderer extends plugin_renderer_base {
$url = "https://campaign.moodle.org/current/lms/{$lang}/install/";
$params = [
'url' => $url,
'iframeid' => 'campaign-content'
'iframeid' => 'campaign-content',
'title' => get_string('campaign', 'admin'),
];
return $this->render_from_template('core/external_content_banner', $params);
@@ -919,7 +920,8 @@ class core_admin_renderer extends plugin_renderer_base {
$url = "https://campaign.moodle.org/current/lms/{$lang}/servicesandsupport/";
$params = [
'url' => $url,
'iframeid' => 'services-support-content'
'iframeid' => 'services-support-content',
'title' => get_string('supportandservices', 'admin'),
];
return $this->render_from_template('core/external_content_banner', $params);
@@ -991,7 +993,7 @@ class core_admin_renderer extends plugin_renderer_base {
* @return string HTML to output.
*/
protected function release_notes_link() {
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/dev/Releases');
$releasenoteslink = get_string('releasenoteslink', 'admin', 'https://moodledev.io/general/releases');
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
return $this->box($releasenoteslink, 'generalbox alert alert-info');
}
@@ -2050,8 +2052,10 @@ class core_admin_renderer extends plugin_renderer_base {
// We are checking installed & enabled things
if ($environment_result->getLevel() == 'required') {
$stringtouse = 'environmentrequirecustomcheck';
} else {
} else if ($environment_result->getLevel() == 'optional') {
$stringtouse = 'environmentrecommendcustomcheck';
} else {
$stringtouse = 'environmentshouldfixcustomcheck';
}
} else if ($environment_result->getPart() == 'php_setting') {
@@ -2082,7 +2086,8 @@ class core_admin_renderer extends plugin_renderer_base {
if ($status) { //Handle ok result (ok)
$status = get_string('statusok');
} else {
if ($environment_result->getLevel() == 'optional') {//Handle check result (warning)
// Handle check result (warning).
if (in_array($environment_result->getLevel(), ['optional', 'recommended'])) {
$status = get_string('check');
$warningline = true;
} else { //Handle error result (error)
+1 -1
View File
@@ -76,7 +76,7 @@ switch ($action) {
$optionsyes = array('action'=>'delete', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$a = new stdClass();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->name = $roles[$roleid]->localname;
$a->shortname = $roles[$roleid]->shortname;
$a->count = $DB->count_records_select('role_assignments',
'roleid = ?', array($roleid), 'COUNT(DISTINCT userid)');
+2 -2
View File
@@ -32,7 +32,7 @@ require_once($CFG->libdir . '/adminlib.php');
admin_externalpage_setup('searchareas', '', null, (new moodle_url('/admin/searchreindex.php'))->out(false));
// Get area parameter and check it exists.
$areaid = required_param('areaid', PARAM_ALPHAEXT);
$areaid = required_param('areaid', PARAM_ALPHANUMEXT);
$area = \core_search\manager::get_search_area($areaid);
if ($area === false) {
throw new moodle_exception('invalidrequest');
@@ -44,7 +44,7 @@ $PAGE->set_secondary_active_tab('modules');
// Start page output.
$heading = get_string('gradualreindex', 'search', '');
$PAGE->set_title($PAGE->title . ': ' . $heading);
$PAGE->set_title($areaname . ' - ' . get_string('gradualreindex', 'search', ''));
$PAGE->navbar->add($heading);
echo $OUTPUT->header();
echo $OUTPUT->heading($heading);
+1 -3
View File
@@ -129,9 +129,7 @@ if (empty($SITE->fullname)) {
$PAGE->set_button($buttons);
}
$visiblepathtosection = array_reverse($settingspage->visiblepath);
$PAGE->set_title("$SITE->shortname: " . implode(": ",$visiblepathtosection));
$PAGE->set_title(implode(moodle_page::TITLE_SEPARATOR, $settingspage->visiblepath));
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();
+12
View File
@@ -244,6 +244,18 @@ reports,core_reportbuilder|/reportbuilder/index.php',
// "htmlsettings" settingpage
$temp = new admin_settingpage('htmlsettings', new lang_string('htmlsettings', 'admin'));
$sitenameintitleoptions = [
'shortname' => new lang_string('shortname'),
'fullname' => new lang_string('fullname'),
];
$sitenameintitleconfig = new admin_setting_configselect(
'sitenameintitle',
new lang_string('sitenameintitle', 'admin'),
new lang_string('sitenameintitle_help', 'admin'),
'shortname',
$sitenameintitleoptions
);
$temp->add($sitenameintitleconfig);
$temp->add(new admin_setting_configcheckbox('formatstringstriptags', new lang_string('stripalltitletags', 'admin'), new lang_string('configstripalltitletags', 'admin'), 1));
$temp->add(new admin_setting_emoticons());
$ADMIN->add('appearance', $temp);
+3 -2
View File
@@ -145,14 +145,15 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_heading('adminpresets', new lang_string('siteadminpresetspluginname', 'core_adminpresets'), ''));
$sensiblesettingsdefault = 'recaptchapublickey@@none, recaptchaprivatekey@@none, googlemapkey3@@none, ';
$sensiblesettingsdefault .= 'secretphrase@@url, cronremotepassword@@none, smtpuser@@none, ';
$sensiblesettingsdefault .= 'smtppass@none, proxypassword@@none, quizpassword@@quiz, allowedip@@none, blockedip@@none, ';
$sensiblesettingsdefault .= 'smtppass@@none, proxypassword@@none, quizpassword@@quiz, allowedip@@none, blockedip@@none, ';
$sensiblesettingsdefault .= 'dbpass@@logstore_database, messageinbound_hostpass@@none, ';
$sensiblesettingsdefault .= 'bind_pw@@auth_cas, pass@@auth_db, bind_pw@@auth_ldap, ';
$sensiblesettingsdefault .= 'dbpass@@enrol_database, bind_pw@@enrol_ldap, ';
$sensiblesettingsdefault .= 'server_password@@search_solr, ssl_keypassword@@search_solr, ';
$sensiblesettingsdefault .= 'alternateserver_password@@search_solr, alternatessl_keypassword@@search_solr, ';
$sensiblesettingsdefault .= 'test_password@@cachestore_redis, password@@mlbackend_python, ';
$sensiblesettingsdefault .= 'badges_badgesalt@@none, calendar_exportsalt@@none';
$sensiblesettingsdefault .= 'badges_badgesalt@@none, calendar_exportsalt@@none, ';
$sensiblesettingsdefault .= 'bigbluebuttonbn_shared_secret@@none';
$temp->add(new admin_setting_configtextarea('adminpresets/sensiblesettings',
get_string('sensiblesettings', 'core_adminpresets'),
get_string('sensiblesettingstext', 'core_adminpresets'),
@@ -23,12 +23,15 @@
* name - form element name
* hasoptions - there are some options
* options - list of options containing name, key, id, checked, label
* readonly - bool
Example context (json):
{
"name": "test",
"hasoptions": true,
"options": [ { "name": "Option", "key": "k1", "id": "id0", "checked": true, "label": "Option label"} ]
"options": [ { "name": "Option", "key": "k1", "id": "id0", "checked": true, "label": "Option label"} ],
"readonly": false
}
}}
<div class="form-multicheckbox">
@@ -37,7 +40,7 @@
<ul>
{{#options}}
<li>
<input type="checkbox" name="{{name}}[{{key}}]" value="1" id="{{id}}_{{key}}" {{#checked}}checked{{/checked}}>
<input type="checkbox" name="{{name}}[{{key}}]" value="1" id="{{id}}_{{key}}" {{#readonly}}disabled{{/readonly}} {{#checked}}checked{{/checked}}>
<label for="{{id}}_{{key}}">{{{label}}}</label>
</li>
{{/options}}
+3 -3
View File
@@ -18,7 +18,7 @@ Feature: An administrator can browse user accounts
When I navigate to "Users > Accounts > Browse list of users" in site administration
# Name field always present, email field is default for showidentity.
Then the following should exist in the "users" table:
| First name / Last name | Email address |
| First name | Email address |
| User One | one@example.com |
| User Two | two@example.com |
# Should not see other identity fields or non-default name fields.
@@ -34,7 +34,7 @@ Feature: An administrator can browse user accounts
| alternativefullnameformat | firstnamephonetic lastname |
When I navigate to "Users > Accounts > Browse list of users" in site administration
Then the following should exist in the "users" table:
| First name - phonetic / Last name | Email address |
| First name - phonetic | Email address |
| Yewzer One | one@example.com |
| Yoozare Two | two@example.com |
@@ -43,7 +43,7 @@ Feature: An administrator can browse user accounts
| showuseridentity | department,profile_field_frog |
When I navigate to "Users > Accounts > Browse list of users" in site administration
Then the following should exist in the "users" table:
| First name / Last name | Favourite frog | Department |
| First name | Favourite frog | Department |
| User One | Kermit | Attack |
| User Two | Tree | Defence |
And I should not see "Email address" in the "table" "css_element"
@@ -42,8 +42,8 @@ class import_form extends moodleform {
$mform->setType('name', PARAM_TEXT);
// File upload.
$mform->addElement('filepicker', 'xmlfile',
get_string('selectfile', 'tool_admin_presets'));
$mform->addElement('filepicker', 'xmlfile', get_string('selectfile', 'tool_admin_presets'), null,
['accepted_types' => ['.xml']]);
$mform->addRule('xmlfile', null, 'required');
$this->add_action_buttons(true, get_string('import', 'tool_admin_presets'));
@@ -64,7 +64,7 @@ class delete extends base {
* Delete the DB preset
*/
public function execute(): void {
confirm_sesskey();
require_sesskey();
$this->manager->delete_preset($this->id);
@@ -52,8 +52,6 @@ class export extends base {
* Stores a preset into the DB.
*/
public function execute(): void {
confirm_sesskey();
$url = new \moodle_url('/admin/tool/admin_presets/index.php', ['action' => 'export', 'mode' => 'execute']);
$this->moodleform = new export_form($url);
@@ -87,7 +85,7 @@ class export extends base {
* @throws xml_writer_exception
*/
public function download_xml(): void {
confirm_sesskey();
require_sesskey();
list($xmlstr, $filename) = $this->manager->download_preset($this->id);
@@ -40,8 +40,6 @@ class import extends base {
* Imports the xmlfile into DB
*/
public function execute(): void {
confirm_sesskey();
$url = new \moodle_url('/admin/tool/admin_presets/index.php', ['action' => 'import', 'mode' => 'execute']);
$this->moodleform = new import_form($url);
@@ -38,8 +38,6 @@ class load extends base {
public function execute(): void {
global $OUTPUT;
confirm_sesskey();
$url = new \moodle_url('/admin/tool/admin_presets/index.php', ['action' => 'load', 'mode' => 'execute']);
$this->moodleform = new load_form($url);
@@ -73,7 +73,7 @@ class rollback extends base {
public function execute(): void {
global $OUTPUT;
confirm_sesskey();
require_sesskey();
list($presetapp, $rollback, $failures) = $this->manager->revert_preset($this->id);
+7 -7
View File
@@ -97,28 +97,28 @@ if ($onlycli === false) {
switch ($action) {
case 'enable':
confirm_sesskey();
require_sesskey();
$model->enable();
redirect($returnurl);
break;
case 'disable':
confirm_sesskey();
require_sesskey();
$model->update(0, false, false);
redirect($returnurl);
break;
case 'delete':
confirm_sesskey();
require_sesskey();
$model->delete();
redirect($returnurl);
break;
case 'edit':
confirm_sesskey();
require_sesskey();
$invalidcurrenttimesplitting = $model->invalid_timesplitting_selected();
$potentialtimesplittings = $model->get_potential_timesplittings();
@@ -183,7 +183,7 @@ switch ($action) {
break;
case 'evaluate':
confirm_sesskey();
require_sesskey();
if ($model->is_static()) {
throw new moodle_exception('errornostaticevaluate', 'tool_analytics');
@@ -226,7 +226,7 @@ switch ($action) {
break;
case 'scheduledanalysis':
confirm_sesskey();
require_sesskey();
if ($onlycli) {
throw new moodle_exception('erroronlycli', 'tool_analytics');
@@ -292,7 +292,7 @@ switch ($action) {
break;
case 'clear':
confirm_sesskey();
require_sesskey();
$model->clear();
redirect($returnurl);
@@ -34,8 +34,11 @@ Feature: Manage availability conditions
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "activity" exists:
| activity | page |
| course | C1 |
| name | P1 |
And I log in as "admin"
And I am on site homepage
When I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
# Check the icon is there (it should be a Hide icon, meaning is currently visible).
@@ -51,8 +54,7 @@ Feature: Manage availability conditions
# OK, toggling works. Set the grade one to Hide and we'll go see if it actually worked.
And I click on "Hide" "icon" in the "Restriction by grade" "table_row"
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I am on the "P1" "page activity editing" page
And I expand all fieldsets
And I click on "Add restriction..." "button"
And "Add restriction..." "dialogue" should be visible
@@ -100,8 +100,7 @@ Feature: Set up contextual data for tests
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
When I log in as "student1"
And I am on "Course 1" course homepage
When I am on the "Course 1" course page logged in as student1
Then I should see "Topic 1"
Scenario: Add role assigns
@@ -135,17 +134,11 @@ Feature: Set up contextual data for tests
When I log in as "user1"
And I am on site homepage
Then edit mode should be available on the current page
And I log out
And I log in as "user2"
And I am on "Course 1" course homepage
And I am on the "Course 1" course page logged in as user2
Then edit mode should be available on the current page
And I log out
And I log in as "user3"
And I am on "Course 1" course homepage
And I am on the "Course 1" course page logged in as user3
Then edit mode should be available on the current page
And I log out
And I log in as "user4"
And I am on "Course 1" course homepage
And I am on the "Course 1" course page logged in as user4
Then edit mode should be available on the current page
And I log out
And I log in as "user5"
@@ -187,8 +180,7 @@ Feature: Set up contextual data for tests
And the following "activities" exist:
| activity | name | intro | course | idnumber | grade |
| assign | Test assignment name with scale | Test assignment description | C1 | assign1 | Test Scale 1 |
When I log in as "admin"
And I am on "Course 1" course homepage
When I am on the "Course 1" course page logged in as admin
Then I should see "Test assignment name"
# Assignment 2.2 module type is disabled by default
# And I should see "Test assignment22 name"
@@ -304,9 +296,7 @@ Feature: Set up contextual data for tests
And the following "grade categories" exist:
| fullname | course | gradecategory |
| Grade sub category 2 | C1 | Grade category 1 |
When I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
When I am on the "Course 1" "grades > Grader report > View" page logged in as "admin"
Then I should see "Grade category 1"
And I should see "Grade sub category 2"
@@ -327,9 +317,7 @@ Feature: Set up contextual data for tests
| itemname | course | gradecategory |
| Test Grade Item 2 | C1 | Grade category 1 |
| Test Grade Item 3 | C1 | Grade sub category 2 |
When I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
When I am on the "Course 1" "grades > gradebook setup" page logged in as "admin"
Then I should see "Test Grade Item 1"
And I open the action menu in "Test Grade Item 1" "table_row"
And I choose "Edit" in the open action menu
@@ -358,9 +346,7 @@ Feature: Set up contextual data for tests
And the following "scales" exist:
| name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
When I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Scales" in the course gradebook
When I am on the "Course 1" "grades > scales" page logged in as admin
Then I should see "Test Scale 1"
And I should see "Disappointing, Good, Very good, Excellent"
@@ -379,9 +365,7 @@ Feature: Set up contextual data for tests
| Grade outcome 2 | OT2 | C1 | Test Scale 1 |
And the following config values are set as admin:
| enableoutcomes | 1 |
When I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "More > Outcomes" in the course gradebook
When I am on the "Course 1" "grades > outcomes" page logged in as admin
Then I should see "Grade outcome 1" in the "#addoutcomes" "css_element"
And I should see "Grade outcome 2" in the "#removeoutcomes" "css_element"
And I press "Manage outcomes"
@@ -407,9 +391,7 @@ Feature: Set up contextual data for tests
| Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
And the following config values are set as admin:
| enableoutcomes | 1 |
When I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
When I am on the "Course 1" "grades > gradebook setup" page logged in as "admin"
Then I should see "Test Outcome Grade Item 1"
And I open the action menu in "Test Outcome Grade Item 1" "table_row"
And I choose "Edit" in the open action menu
@@ -425,6 +407,5 @@ Feature: Set up contextual data for tests
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| online_users | Course | C1 | course-view-* | site-pre |
When I log in as "admin"
And I am on "Course 1" course homepage
When I am on the "Course 1" course page logged in as admin
Then I should see "Online users"
@@ -21,12 +21,15 @@ Feature: Edit capabilities
Scenario: Default system capabilities modification
Given I log in as "admin"
And I set the following system permissions of "Teacher" role:
And I navigate to "Users > Permissions > Define roles" in site administration
And I click on "Edit Teacher role" "link"
And I fill the capabilities form with the following permissions:
| capability | permission |
| block/mnet_hosts:myaddinstance | Allow |
| moodle/site:messageanyuser | Inherit |
| moodle/grade:managesharedforms | Prevent |
| moodle/course:request | Prohibit |
And I press "Save changes"
When I follow "Edit Teacher role"
Then "block/mnet_hosts:myaddinstance" capability has "Allow" permission
And "moodle/site:messageanyuser" capability has "Not set" permission
@@ -48,16 +51,12 @@ Feature: Edit capabilities
And "mod/forum:addquestion" capability has "Allow" permission
Scenario: Module capabilities overrides
Given I log in as "teacher1"
And the following "activity" exists:
Given the following "activity" exists:
| activity | forum |
| course | C1 |
| idnumber | 00001 |
| name | I'm the name |
| intro | I'm the introduction |
| section | 1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "I'm the name"
And I am on the "I'm the name" "forum activity" page logged in as teacher1
And I navigate to "Permissions" in current page administration
And I override the system permissions of "Student" role with:
| mod/forum:deleteanypost | Prohibit |
+34
View File
@@ -0,0 +1,34 @@
@tool_behat
Feature: Confirm that we can open multiple browser tabs
In order to use multiple browser tabs
As a test writer
I need the relevant Behat steps to work
@javascript @_switch_window
Scenario: Open multiple browser tabs
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
| Course 3 | C3 |
And I am on the "C1" "Course" page logged in as "admin"
# Open a new tab on the same page.
When I open a tab named "CourseViewer1" on the current page
And I should see "Course 1" in the "h1" "css_element"
And I am on the "C2" "Course" page
# Open new tab for specified page with identifier.
And I open a tab named "CourseViewer2" on the "C3" "Course" page
# And for a specified page without identifier.
And I open a tab named "CourseViewer4" on the "My courses" page
# Switch between all the tabs and confirm their different contents.
Then I should see "No courses"
And I switch to "CourseViewer2" tab
And "Course 3" "heading" should exist
And I switch to "CourseViewer1" tab
And "Course 2" "heading" should exist
And I switch to the main tab
And "Course 1" "heading" should exist
@@ -170,6 +170,19 @@ class brickfield_accessibility_color_test extends brickfield_accessibility_test
'yellowgreen' => '9acd32'
];
/** @var string[] Define estimated relative font-size codes to pt values. */
public $fontsizenames = [
'xx-small' => 9,
'x-small' => 10,
'small' => 11,
'smaller' => 11,
'medium' => 12,
'large' => 14,
'larger' => 14,
'x-large' => 18,
'xx-large' => 24,
];
/**
* Helper method that finds the luminosity between the provided
* foreground and background parameters.
@@ -227,7 +240,8 @@ class brickfield_accessibility_color_test extends brickfield_accessibility_test
$l2 = (.2126 * $r4 + 0.7152 * $g4 + 0.0722 * $b4);
}
$luminosity = round(($l1 + 0.05) / ($l2 + 0.05), 2);
// Increase round to 4 to avoid a 4.49 contrast being round up to a false pass of 4.5.
$luminosity = round(($l1 + 0.05) / ($l2 + 0.05), 4);
return $luminosity;
}
@@ -362,4 +376,35 @@ class brickfield_accessibility_color_test extends brickfield_accessibility_test
: $backrgb['b'] - $forergb['b'];
return ['red' => $reddiff, 'green' => $greendiff, 'blue' => $bluediff];
}
/**
* Helper method that finds the estimated font-size for the provided
* string font-size parameter.
* @param string $fontsize The css font-size, in various formats
* @return int The estimated font-size
*/
public function get_fontsize(string $fontsize): int {
$newfontsize = 12; // Default value, in pt, equivalent to 16px.
// Search for rem, em, and px initially, typical font-size values.
$pos1 = stripos($fontsize, 'rem');
$pos2 = stripos($fontsize, 'em');
$pos3 = stripos($fontsize, 'px');
if ($pos1 !== false) {
$rem = substr($fontsize, 0, -3);
$newfontsize = $newfontsize * $rem;
} else if ($pos2 !== false) {
$em = substr($fontsize, 0, -2);
$newfontsize = $newfontsize * $em;
} else if ($pos3 !== false) {
$px = substr($fontsize, 0, -2);
$newfontsize = 0.75 * $px;
} else if (in_array($fontsize, array_keys($this->fontsizenames))) {
$newfontsize = $this->fontsizenames[$fontsize];
} else {
preg_match_all('!\d+!', $fontsize, $matches);
$newfontsize = $matches[0][0] ?? $newfontsize;
}
return (int) $newfontsize;
}
}
@@ -376,19 +376,61 @@ class brickfield_accessibility_test {
return false;
}
/**
* Returns an array of the newwindowphrases for all enabled language packs.
* @return array of the newwindowphrases for all enabled language packs.
*/
public static function get_all_newwindowphrases(): array {
// Need to process all enabled lang versions of newwindowphrases.
return static::get_all_phrases('newwindowphrases');
}
/**
* Returns an array of the invalidlinkphrases for all enabled language packs.
* @return array of the invalidlinkphrases for all enabled language packs.
*/
public static function get_all_invalidlinkphrases(): array {
// Need to process all enabled lang versions of invalidlinkphrases.
return static::get_all_phrases('invalidlinkphrases');
}
/**
* Returns an array of the relevant phrases for all enabled language packs.
* @param string $stringname the language string identifier you want get the phrases for.
* @return array of the invalidlinkphrases for all enabled language packs.
*/
protected static function get_all_phrases(string $stringname): array {
$stringmgr = get_string_manager();
$allstrings = [];
$enabledlangs = get_string_manager()->get_list_of_translations();
// Somehow, an invalid string was requested. Add exception handling for this in the future.
if (!$stringmgr->string_exists($stringname, manager::PLUGINNAME)) {
return $allstrings;
}
// Need to process all enabled lang versions of invalidlinkphrases.
$enabledlangs = $stringmgr->get_list_of_translations();
foreach ($enabledlangs as $lang => $value) {
$tmpstring = (string)new \lang_string('invalidlinkphrases', manager::PLUGINNAME, null, $lang);
$tmpstring = (string)new \lang_string($stringname, manager::PLUGINNAME, null, $lang);
$tmplangarray = explode('|', $tmpstring);
$allstrings = array_merge($allstrings, $tmplangarray);
}
// Removing duplicates if a lang is enabled, yet using default 'en' due to no relevant lang file.
$allstrings = array_unique($allstrings);
return $allstrings;
}
/**
* Assesses whether a string contains any readable text, which is text that
* contains any characters other than whitespace characters.
*
* @param string $text
* @return bool
*/
public static function is_text_readable(string $text): bool {
// These characters in order are a space, tab, line feed, carriage return,
// NUL-byte, vertical tab and non-breaking space unicode character \xc2\xa0.
$emptycharacters = " \t\n\r\0\x0B\xc2\xa0";
return trim($text, $emptycharacters) != '';
}
}
@@ -39,9 +39,27 @@ class a_links_dont_open_new_window extends brickfield_accessibility_test {
* The main check function. This is called by the parent class to actually check content.
*/
public function check(): void {
// Need to process all enabled lang versions of newwindowphrases.
$text = brickfield_accessibility_test::get_all_newwindowphrases();
foreach ($this->get_all_elements('a') as $a) {
if ($a->hasAttribute('target') && !in_array($a->getAttribute('target'), $this->allowedtargets)) {
$this->add_report($a);
$phrasefound = false;
foreach ($text as $phrase) {
// Sanity check for readable text.
if (!brickfield_accessibility_test::is_text_readable($phrase)) {
break;
}
$pos = stripos($a->nodeValue, $phrase);
if ($pos !== false) {
$phrasefound = true;
break;
}
}
if (!$phrasefound) {
$this->add_report($a);
}
}
}
}
@@ -39,9 +39,26 @@ class area_dont_open_new_window extends brickfield_accessibility_test {
* The main check function. This is called by the parent class to actually check content
*/
public function check(): void {
// Need to process all enabled lang versions of newwindowphrases.
$text = brickfield_accessibility_test::get_all_newwindowphrases();
foreach ($this->get_all_elements('area') as $area) {
if ($area->hasAttribute('target') && !in_array($area->getAttribute('target'), $this->allowedtargets)) {
$this->add_report($area);
$phrasefound = false;
foreach ($text as $phrase) {
// Sanity check for readable text.
if (!brickfield_accessibility_test::is_text_readable($phrase)) {
break;
}
$pos = stripos($area->getAttribute('alt'), $phrase);
if ($pos !== false) {
$phrasefound = true;
break;
}
}
if (!$phrasefound) {
$this->add_report($area);
}
}
}
}
@@ -92,8 +92,7 @@ class css_text_has_contrast extends brickfield_accessibility_color_test {
$italic = false;
if (isset($style['font-size'])) {
preg_match_all('!\d+!', $style['font-size'], $matches);
$fontsize = $matches[0][0];
$fontsize = $this->get_fontsize($style['font-size']);
}
if (isset($style['font-weight'])) {
@@ -93,6 +93,7 @@ $string['invalidcourseid'] = 'Invalid course, please check your input';
$string['invalidlinkphrases'] = 'click|click here|here|more|more here|info|info here|information|information here|read more|read more here|further information|further information here|further details|further details here';
$string['module'] = 'Module';
$string['modulename'] = 'Name';
$string['newwindowphrases'] = 'new window|new-window|new_window';
$string['noerrorsfound'] = 'No common accessibility errors were found for your search parameters. Congratulations!';
$string['norecords'] = 'No relevant records were found for your search parameters.';
$string['notregistered'] = 'Your accessibility toolkit needs to be registered.';
@@ -87,6 +87,19 @@ EOD;
</html>
EOD;
/** @var string Html pass 4 */
private $htmlpass4 = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>A link can indicate that it will open in a new window</title>
</head>
<body>
<a href="www.youtube.com" target="_blank">This is youtube (opens in a new window)</a>
</body>
</html>
EOD;
/**
* Test for links opening a new tab or window
*/
@@ -102,5 +115,8 @@ EOD;
$results = $this->get_checker_results($this->htmlpass3);
$this->assertEmpty($results);
$results = $this->get_checker_results($this->htmlpass4);
$this->assertEmpty($results);
}
}
@@ -87,6 +87,19 @@ EOD;
</html>
EOD;
/** @var string Html pass 4 */
private $htmlpass4 = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>A link can indicate that it will open in a new window</title>
</head>
<body>
<area target="_blank" alt="(opens in a new window)"></area>
</body>
</html>
EOD;
/**
* Test Area tags opening new window without warning
*/
@@ -102,5 +115,8 @@ EOD;
$results = $this->get_checker_results($this->htmlpass3);
$this->assertEmpty($results);
$results = $this->get_checker_results($this->htmlpass4);
$this->assertEmpty($results);
}
}
@@ -178,6 +178,54 @@ EOD;
</html>
EOD;
/** @var string HTML with px18 fail colour values. */
private $px18 = <<<EOD
<body><p style="color:#EF0000; background-color:white; font-size: 18px">
This is not contrasty enough.</p></body>
EOD;
/** @var string HTML with px19bold pass colour values. */
private $px19bold = <<<EOD
<body><p style="color:#EF0000; background-color:white; font-size: 19px; font-weight: bold;">
This is contrasty enough.</p></body>
EOD;
/** @var string HTML with px18 pass colour values. */
private $px18pass = <<<EOD
<body><p style="color:#E60000; background-color:white; font-size: 18px">
This is contrasty enough.</p></body>
EOD;
/** @var string HTML with medium size colour values. */
private $mediumfail = <<<EOD
<body><p style="color:#EF0000; background-color:white; font-size: medium">
This is not contrasty enough.</p></body>
EOD;
/** @var string HTML with px18 colour values. */
private $mediumpass = <<<EOD
<body><p style="color:#E60000; background-color:white; font-size: medium">
This is contrasty enough.</p></body>
EOD;
/** @var string HTML with larger fail colour values. */
private $largerfail = <<<EOD
<body><p style="color:#FF6161; background-color:white; font-size: larger">
This is not contrasty enough.</p></body>
EOD;
/** @var string HTML with px18 colour values. */
private $largerpass = <<<EOD
<body><p style="color:#FF5C5C; background-color:white; font-size: larger;">
This is contrasty enough.</p></body>
EOD;
/** @var string HTML with px18 colour values. */
private $largerboldpass = <<<EOD
<body><p style="color:#FF5C5C; background-color:white; font-size: larger; font-weight: bold;">
This is contrasty enough.</p></body>
EOD;
/**
* Test for the area assign intro
*/
@@ -235,4 +283,68 @@ EOD;
$results = $this->get_checker_results($this->emptyvalue);
$this->assertEmpty($results);
}
/**
* Test for text px18 with insufficient contrast of 4.49.
*/
public function test_check_for_px18_fail() {
$results = $this->get_checker_results($this->px18);
$this->assertTrue($results[0]->element->tagName == 'p');
}
/**
* Test for text px19 bold with sufficient contrast of 4.49.
*/
public function test_check_for_px19bold_pass() {
$results = $this->get_checker_results($this->px19bold);
$this->assertEmpty($results);
}
/**
* Test for text px18 with sufficient contrast of 4.81.
*/
public function test_check_for_px18_pass() {
$results = $this->get_checker_results($this->px18pass);
$this->assertEmpty($results);
}
/**
* Test for medium (12pt) text with insufficient contrast of 4.49.
*/
public function test_check_for_medium_fail() {
$results = $this->get_checker_results($this->mediumfail);
$this->assertTrue($results[0]->element->tagName == 'p');
}
/**
* Test for medium (12pt) text with sufficient contrast of 4.81.
*/
public function test_check_for_medium_pass() {
$results = $this->get_checker_results($this->mediumpass);
$this->assertEmpty($results);
}
/**
* Test for larger (14pt) text with insufficient contrast of 2.94.
*/
public function test_check_for_larger_fail() {
$results = $this->get_checker_results($this->largerfail);
$this->assertTrue($results[0]->element->tagName == 'p');
}
/**
* Test for larger (14pt) text with insufficient contrast of 3.02.
*/
public function test_check_for_larger_pass() {
$results = $this->get_checker_results($this->largerpass);
$this->assertTrue($results[0]->element->tagName == 'p');
}
/**
* Test for larger (14pt) bold text with sufficient contrast of 3.02.
*/
public function test_check_for_largerbold_pass() {
$results = $this->get_checker_results($this->largerboldpass);
$this->assertEmpty($results);
}
}
@@ -9,7 +9,7 @@ menu: "main"
## Moodle templates
[Moodle templates](https://docs.moodle.org/dev/Templates) are use to write HTML and Javascript using mustache files.
[Moodle templates](https://moodledev.io/docs/guides/templates) are use to write HTML and Javascript using mustache files.
If you are creating your own pages in the UI Component library you can load core templates using this (shortcode) syntax:
@@ -51,4 +51,3 @@ This is the result of adding the core/notification template on this page:
"extraclasses": "foo bar"
}
{{< /mustache >}}
@@ -11,7 +11,7 @@ tags:
## How to use moodle forms
Forms are constructed using lib/formslib.php. Using the addElement methods in php a set of different form element types can be added to a form. For more info visit the [Moodledocs](https://docs.moodle.org/dev/lib/formslib.php_Form_Definition) page for forms
Forms are constructed using lib/formslib.php. Using the addElement methods in php a set of different form element types can be added to a form. For more info visit the [Moodledocs](https://moodledev.io/docs/apis/subsystems/form) page for forms
{{< php >}}
$mform->addElement('button', 'intro', get_string("buttonlabel"));
@@ -61,7 +61,7 @@ Disabled toggle with extra classes.
## Use toggle as a template block
It is also possible to include *core/toggle* in any other template using [blocks](https://docs.moodle.org/dev/Templates#Blocks), instead of rendering it with a context.
It is also possible to include *core/toggle* in any other template using [blocks](https://moodledev.io/docs/guides/templates#blocks), instead of rendering it with a context.
The parameters that you can define are:
* id: Unique id for the toggle input.
* extraclasses: Any extra classes added to the toggle input outer container.
@@ -16,7 +16,7 @@ to the element that will trigger the confirmation modal.
## Source files
* `lib/amd/src/confirm.js` ({{< jsdoc module="core/confirm" >}})
* `lib/amd/src/utility.js` ({{< jsdoc module="core/utility" >}})
* `lib/templates/modal.mustache`
## Usage
@@ -24,7 +24,7 @@ The confirmation AMD module is loaded automatically, so the only thing you need
to the target element:
{{< highlight html >}}
<button type="button" class="btn btn-primary" data-confirmation="modal" data-confirmation-title-str='["delete", "core"]'
data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show confirmation modal</button>
data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show confirmation modal</button>
{{< /highlight >}}
You can also use it on PHP, you just need to set the attributes parameter to any moodle output component that takes attributes:
@@ -32,7 +32,7 @@ You can also use it on PHP, you just need to set the attributes parameter to any
echo $OUTPUT->single_button('#', get_string('delete'), 'get', [
'data-confirmation' => 'modal',
'data-confirmation-title-str' => json_encode(['delete', 'core']),
'data-confirmation-question-str' => json_encode(['areyousure']),
'data-confirmation-content-str' => json_encode(['areyousure']),
'data-confirmation-yes-button-str' => json_encode(['delete', 'core'])
]);
{{< / php >}}
@@ -56,8 +56,8 @@ echo $OUTPUT->single_button('#', get_string('delete'), 'get', [
<td>The modal title language string identifier, must be provided in JSON encoded format.</td>
</tr>
<tr>
<td>data-confirmation-question-str</td>
<td>The confirmation question language string identifier, must be provided in JSON encoded format.</td>
<td>data-confirmation-content-str</td>
<td>The confirmation modal main content language string identifier, must be provided in JSON encoded format.</td>
</tr>
<tr>
<td>data-confirmation-yes-button-str</td>
@@ -84,14 +84,14 @@ echo $OUTPUT->single_button('#', get_string('delete'), 'get', [
{{< example >}}
<button type="button" class="btn btn-primary" data-confirmation="modal" data-confirmation-title-str='["delete", "core"]'
data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show confirmation modal</button>
data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show confirmation modal</button>
{{< /example >}}
### Confirmation modal with a toast
{{< example >}}
<button type="button" class="btn btn-primary" data-confirmation="modal" data-confirmation-title-str='["delete", "core"]'
data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]' data-confirmation-toast="true"
data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]' data-confirmation-toast="true"
data-confirmation-toast-confirmation-str='["deleteblockinprogress", "block", "Online users"]'>Show confirmation modal</button>
{{< /example >}}
@@ -99,6 +99,6 @@ data-confirmation-toast-confirmation-str='["deleteblockinprogress", "block", "On
{{< example >}}
<button type="button" class="btn btn-primary" data-confirmation="modal" data-confirmation-title-str='["delete", "core"]'
data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'
data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'
data-confirmation-destination="http://moodle.com">Show confirmation modal</button>
{{< /example >}}
@@ -155,9 +155,9 @@ class data_request extends persistent {
case api::DATAREQUEST_STATUS_EXPIRED:
$result = true;
break;
// Complete requests are expired if the expiry time has elapsed.
// Complete requests are expired if the expiry time is a positive value, and has elapsed.
case api::DATAREQUEST_STATUS_DOWNLOAD_READY:
$expiryseconds = get_config('tool_dataprivacy', 'privacyrequestexpiry');
$expiryseconds = (int) get_config('tool_dataprivacy', 'privacyrequestexpiry');
if ($expiryseconds > 0 && time() >= ($request->get('timemodified') + $expiryseconds)) {
$result = true;
}
@@ -178,7 +178,12 @@ class data_request extends persistent {
public static function get_expired_requests($userid = 0) {
global $DB;
$expiryseconds = get_config('tool_dataprivacy', 'privacyrequestexpiry');
// Complete requests are expired if the expiry time is a positive value, and has elapsed.
$expiryseconds = (int) get_config('tool_dataprivacy', 'privacyrequestexpiry');
if ($expiryseconds <= 0) {
return [];
}
$expirytime = strtotime("-{$expiryseconds} second");
$table = self::TABLE;
$sqlwhere = 'type = :export_type AND status = :completestatus AND timemodified <= :expirytime';
@@ -285,7 +285,7 @@ class data_requests_table extends table_sql {
$actionsmenu = new action_menu($actions);
$actionsmenu->set_menu_trigger(get_string('actions'));
$actionsmenu->set_owner_selector('request-actions-' . $requestid);
$actionsmenu->set_constraint('[data-region=data-requests-table] > .no-overflow');
$actionsmenu->set_boundary('window');
return $OUTPUT->render($actionsmenu);
}
@@ -71,7 +71,7 @@
{{/filter}}
</div>
<div class="mt-1 mb-1" data-region="data-requests-table">
<div class="position-relative mt-1 mb-1" data-region="data-requests-table">
{{{datarequests}}}
</div>
</div>
@@ -58,7 +58,7 @@ class behat_tool_dataprivacy extends behat_base {
);
/**
* Creates the specified element. More info about available elements in http://docs.moodle.org/dev/Acceptance_testing#Fixtures.
* Creates the specified element. More info about available elements in https://moodledev.io/general/development/tools/behat.
*
* @Given /^the following data privacy "(?P<element_string>(?:[^"]|\\")*)" exist:$/
*
@@ -30,6 +30,12 @@ Feature: Protected data should not be deleted
| Site purpose | PT1H | 0 |
| prot | P1D | 1 |
| unprot | P1D | 0 |
And the following "mod_forum > discussions" exist:
| user | forum | name | message |
| u1 | forump1 | Discussion subject | Test post in forump1 |
| u1 | forumu1 | Discussion subject | Test post in forumu1 |
| u1 | forump2 | Discussion subject | Test post in forump2 |
| u1 | forumu2 | Discussion subject | Test post in forumu2 |
And I set the category and purpose for the "forump1" "forum" in course "C1" to "CAT" and "prot"
And I set the category and purpose for the "forump2" "forum" in course "C2" to "CAT" and "prot"
And I set the category and purpose for the "forumu1" "forum" in course "C1" to "CAT" and "unprot"
@@ -38,47 +44,25 @@ Feature: Protected data should not be deleted
@javascripta
Scenario: Unexpired and protected data is not removed
Given I log in as "u1"
And I am on "C1" course homepage
And I add a new discussion to "forump1" forum with:
| Subject | Discussion subject |
| Message | Test post in forump1 |
And I am on "C1" course homepage
And I add a new discussion to "forumu1" forum with:
| Subject | Discussion subject |
| Message | Test post in forumu1 |
And I am on "C2" course homepage
And I add a new discussion to "forump2" forum with:
| Subject | Discussion subject |
| Message | Test post in forump2 |
And I am on "C2" course homepage
And I add a new discussion to "forumu2" forum with:
| Subject | Discussion subject |
| Message | Test post in forumu2 |
And I log out
And I log in as "admin"
Given I log in as "admin"
And I create a dataprivacy "delete" request for "u1"
And I approve a dataprivacy "delete" request for "u1"
And I run all adhoc tasks
And I navigate to "Users > Privacy and policies > Data requests" in site administration
And I should see "Deleted" in the "u1" "table_row"
And I am on "C1" course homepage
And I follow "forump1"
And I am on the "forump1" "forum activity" page
And I follow "Discussion subject"
Then I should not see "Test post in forump1"
When I am on "C1" course homepage
And I follow "forumu1"
When I am on the "forumu1" "forum activity" page
And I follow "Discussion subject"
Then I should not see "Test post in forumu1"
And I am on "C2" course homepage
And I follow "forump2"
And I am on the "forump2" "forum activity" page
And I follow "Discussion subject"
Then I should see "Test post in forump2"
When I am on "C2" course homepage
And I follow "forumu2"
When I am on the "forumu2" "forum activity" page
And I follow "Discussion subject"
Then I should not see "Test post in forumu2"
@@ -26,10 +26,11 @@ require_once('data_privacy_testcase.php');
* Expired data requests tests.
*
* @package tool_dataprivacy
* @covers \tool_dataprivacy\data_request
* @copyright 2018 Michael Hawkins
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class expired_data_requests_test extends data_privacy_testcase {
final class expired_data_requests_test extends data_privacy_testcase {
/**
* Test tearDown.
@@ -107,6 +108,52 @@ class expired_data_requests_test extends data_privacy_testcase {
$this->assertEquals(0, $DB->count_records('files', $fileconditions));
}
/**
* Test that data requests are not expired when expiration is disabled (set to zero)
*/
public function test_data_request_expiry_never(): void {
global $DB;
$this->resetAfterTest();
\core_privacy\local\request\writer::setup_real_writer_instance();
// Disable request expiry.
set_config('privacyrequestexpiry', 0, 'tool_dataprivacy');
// Create and approve data request.
$user = $this->getDataGenerator()->create_user();
$usercontext = \context_user::instance($user->id);
$this->setUser($user->id);
$datarequest = api::create_data_request($user->id, api::DATAREQUEST_TYPE_EXPORT);
$requestid = $datarequest->get('id');
$this->setAdminUser();
api::approve_data_request($requestid);
ob_start();
$this->runAdhocTasks('\tool_dataprivacy\task\process_data_request_task');
ob_end_clean();
// Run expiry deletion - should not affect test export.
$expiredrequests = data_request::get_expired_requests();
$this->assertEmpty($expiredrequests);
data_request::expire($expiredrequests);
// Confirm approved and exported.
$request = new data_request($requestid);
$this->assertEquals(api::DATAREQUEST_STATUS_DOWNLOAD_READY, $request->get('status'));
$fileconditions = [
'userid' => $user->id,
'component' => 'tool_dataprivacy',
'filearea' => 'export',
'itemid' => $requestid,
'contextid' => $usercontext->id,
];
$this->assertEquals(2, $DB->count_records('files', $fileconditions));
}
/**
* Test for \tool_dataprivacy\data_request::is_expired()
* Tests for the expected request status to protect from false positive/negative,
+1 -1
View File
@@ -46,7 +46,7 @@ $PAGE->set_url(new \moodle_url('/admin/tool/filetypes/delete.php', array('extens
$PAGE->navbar->add($title);
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);
$PAGE->set_primary_active_tab('siteadminnode');
$PAGE->set_secondary_active_tab('server');
+1 -1
View File
@@ -107,7 +107,7 @@ $PAGE->set_secondary_active_tab('server');
$PAGE->navbar->add($oldextension ? s($oldextension) : $title);
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);
// Display the page.
echo $OUTPUT->header();
+1 -1
View File
@@ -34,7 +34,7 @@ $context = context_system::instance();
$PAGE->set_url(new \moodle_url('/admin/tool/filetypes/index.php'));
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);
$renderer = $PAGE->get_renderer('tool_filetypes');
+1 -1
View File
@@ -46,7 +46,7 @@ $PAGE->set_url(new \moodle_url('/admin/tool/filetypes/revert.php', array('extens
$PAGE->navbar->add($title);
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);
// Display the page.
echo $OUTPUT->header();
@@ -120,8 +120,7 @@ Feature: Add customised file types
| Custom description | Froggy file |
And I press "Save changes"
# Create a resource activity and add it to a course
And I am on "Course 1" course homepage with editing mode on
When I add a "File" to section "1"
When I add a resource activity to course "Course 1" section "1"
And I set the following fields to these values:
| Name | An example of customised file type |
| Description | File description |
@@ -205,7 +205,7 @@ class tool_generator_course_backend extends tool_generator_backend {
* @return int Course id
*/
public function make() {
global $DB, $CFG;
global $DB, $CFG, $USER;
require_once($CFG->dirroot . '/lib/phpunit/classes/util.php');
raise_memory_limit(MEMORY_EXTRA);
@@ -231,6 +231,12 @@ class tool_generator_course_backend extends tool_generator_backend {
$this->create_users();
$this->create_forum();
// We are checking 'enroladminnewcourse' setting to decide to enrol admins or not.
if (!empty($CFG->creatornewroleid) && !empty($CFG->enroladminnewcourse) && is_siteadmin($USER->id)) {
// Deal with course creators - enrol them internally with default role.
enrol_try_internal_enrol($this->course->id, $USER->id, $CFG->creatornewroleid);
}
// Log total time.
$this->log('coursecompleted', round(microtime(true) - $entirestart, 1));
@@ -0,0 +1,33 @@
@core @core_course @tool_generator
Feature: Admins can create test courses
In order to create testing information
As an admin
I need to create testing courses quickly
@javascript
Scenario: 'Auto-enrol admin in new courses' setting when creating a test course as admin
Given I log in as "admin"
And the following config values are set as admin:
| enroladminnewcourse | 0 |
And I navigate to "Development > Make test course" in site administration
And I set the following fields to these values:
| Size of course | XS |
| Course full name | Fake course for testing |
| Course short name | fake |
And I press "Create course"
And I click on "Continue" "link"
And I navigate to course participants
Then I should not see "Teacher"
And I should not see "Nothing to display"
And the following config values are set as admin:
| enroladminnewcourse | 1 |
And I navigate to "Courses > Add a new course" in site administration
And I navigate to "Development > Make test course" in site administration
And I set the following fields to these values:
| Size of course | XS |
| Course full name | New fake course for testing |
| Course short name | newfake |
And I press "Create course"
And I click on "Continue" "link"
And I navigate to course participants
And I should see "Teacher"
@@ -68,9 +68,14 @@ class maketestcourse_test extends \advanced_testcase {
$this->assertEquals(2, count($modinfo->get_section_info_all()));
// Check user is enrolled.
// enroladminnewcourse is enabled by default, so admin is also enrolled as teacher.
$users = get_enrolled_users($context);
$this->assertEquals(1, count($users));
$this->assertEquals('tool_generator_000001', reset($users)->username);
$this->assertEquals(2, count($users));
$usernames = array_map(function($user) {
return $user->username;
}, $users);
$this->assertTrue(in_array('admin', $usernames));
$this->assertTrue(in_array('tool_generator_000001', $usernames));
// Check there's a page on the course.
$pages = $modinfo->get_instances_of('page');
+1 -1
View File
@@ -114,7 +114,7 @@ if ($mode == DELETION_OF_SELECTED_LANG and (!empty($uninstalllang) or !empty($co
}
}
if ($mode == UPDATE_ALL_LANG) {
if ($mode == UPDATE_ALL_LANG && confirm_sesskey()) {
core_php_time_limit::raise();
$controller->update_all_installed_languages();
}
@@ -87,6 +87,7 @@
<div>
<form id="updateform" action="{{updateurl}}" method="post">
<fieldset>
<input type="hidden" name="sesskey" value="{{sesskey}}">
<input type="submit" value="{{#str}}updatelangs, tool_langimport{{/str}}" class="btn btn-secondary">
{{#hasmanyinstalledlanguages}}
<p class="mt-2 small">{{#str}} updatelangsnote, tool_langimport, {"taskname": {{#quote}}{{updatelangstaskname}}{{/quote}} }{{/str}}</p>
@@ -10,12 +10,12 @@ Feature: Licence manager
Then I should see "Licence not specified" in the "unknown" "table_row"
And I should see "All rights reserved" in the "allrightsreserved" "table_row"
And I should see "Public domain" in the "public" "table_row"
And I should see "Creative Commons" in the "cc" "table_row"
And I should see "Creative Commons - NoDerivs" in the "cc-nd" "table_row"
And I should see "Creative Commons - No Commercial NoDerivs" in the "cc-nc-nd" "table_row"
And I should see "Creative Commons - No Commercial" in the "cc-nc" "table_row"
And I should see "Creative Commons - No Commercial ShareAlike" in the "cc-nc-sa" "table_row"
And I should see "Creative Commons - ShareAlike" in the "cc-sa" "table_row"
And I should see "Creative Commons - 4.0 International" in the "cc-4.0" "table_row"
And I should see "Creative Commons - NoDerivatives 4.0 International" in the "cc-nd-4.0" "table_row"
And I should see "Creative Commons - NonCommercial-NoDerivatives 4.0 International" in the "cc-nc-nd-4.0" "table_row"
And I should see "Creative Commons - NonCommercial-ShareAlike 4.0 International" in the "cc-nc-sa-4.0" "table_row"
And I should see "Creative Commons - ShareAlike 4.0 International" in the "cc-sa-4.0" "table_row"
And I should see "Creative Commons - NonCommercial 4.0 International" in the "cc-nc-4.0" "table_row"
Scenario: I should be able to enable and disable licences
Given I log in as "admin"
@@ -25,25 +25,25 @@ Feature: Licence manager
And I navigate to "Licence > Licence manager" in site administration
Then "This is the site default licence" "icon" should exist in the "public" "table_row"
And "Enable licence" "icon" should not exist in the "public" "table_row"
And "This is the site default licence" "icon" should not exist in the "cc" "table_row"
And "This is the site default licence" "icon" should not exist in the "cc-4.0" "table_row"
And I navigate to "Licence > Licence settings" in site administration
And I set the field "Default site licence" to "Creative Commons"
And I press "Save changes"
And I navigate to "Licence > Licence manager" in site administration
And "This is the site default licence" "icon" should exist in the "cc" "table_row"
And "Enable licence" "icon" should not exist in the "cc" "table_row"
And "This is the site default licence" "icon" should exist in the "cc-4.0" "table_row"
And "Enable licence" "icon" should not exist in the "cc-4.0" "table_row"
And "This is the site default licence" "icon" should not exist in the "public" "table_row"
@javascript @_file_upload
Scenario Outline: User licence preference is remembered depending of setting value
Given the following config values are set as admin:
| sitedefaultlicense | cc |
| sitedefaultlicense | cc-4.0 |
| rememberuserlicensepref | <rememberuserlicensepref> |
And I log in as "admin"
And I follow "Private files" in the user menu
And I follow "Add..."
And I follow "Upload a file"
And the field with xpath "//select[@name='license']" matches value "Creative Commons"
And the field with xpath "//select[@name='license']" matches value "Creative Commons - 4.0 International"
And I click on "Close" "button" in the "File picker" "dialogue"
When I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager as:
| Save as | empty_copy.txt |
@@ -53,6 +53,6 @@ Feature: Licence manager
Then the field with xpath "//select[@name='license']" matches value "<expectedlicence>"
Examples:
| rememberuserlicensepref | expectedlicence |
| 0 | Creative Commons |
| 1 | Public domain |
| rememberuserlicensepref | expectedlicence |
| 0 | Creative Commons - 4.0 International |
| 1 | Public domain |
@@ -174,24 +174,24 @@ class manager_test extends advanced_testcase {
$this->resetAfterTest();
$licenseorder = array_keys(license_manager::get_licenses());
$initialposition = array_search('cc-nc', $licenseorder);
$initialposition = array_search('cc-nc-4.0', $licenseorder);
$manager = new tool_licensemanager\manager();
// We're testing a private method, so we need to setup reflector magic.
$method = new ReflectionMethod('\tool_licensemanager\manager', 'change_license_order');
$method->setAccessible(true); // Allow accessing of private method.
$method->invoke($manager, \tool_licensemanager\manager::ACTION_MOVE_UP, 'cc-nc');
$method->invoke($manager, \tool_licensemanager\manager::ACTION_MOVE_UP, 'cc-nc-4.0');
$licenseorder = array_keys(license_manager::get_licenses());
$newposition = array_search('cc-nc', $licenseorder);
$newposition = array_search('cc-nc-4.0', $licenseorder);
$this->assertLessThan($initialposition, $newposition);
$initialposition = array_search('allrightsreserved', $licenseorder);
$method->invoke($manager, \tool_licensemanager\manager::ACTION_MOVE_DOWN, 'allrightsreserved');
$licenseorder = array_keys(license_manager::get_licenses());
$newposition = array_search('cc-nc', $licenseorder);
$newposition = array_search('cc-nc-4.0', $licenseorder);
$this->assertGreaterThan($initialposition, $newposition);
}
+1 -1
View File
@@ -75,7 +75,7 @@ trait reader {
*/
public static function decode_other(?string $other) {
if ($other === 'N;' || preg_match('~^.:~', $other ?? '')) {
return unserialize($other);
return unserialize($other, ['allowed_classes' => [stdClass::class]]);
} else {
return json_decode($other ?? '', true);
}
@@ -14,6 +14,6 @@ Feature: In a report, admin can see logstore visibility changes
And I click on "Enable" "icon" in the "External database log" "table_row"
And I navigate to "Reports > Config changes" in site administration
Then the following should exist in the "reportbuilder-table" table:
| User | Plugin | Setting | New value | Original value |
| First name | Plugin | Setting | New value | Original value |
| Admin User | logstore_standard | tool_logstore_visibility | 0 | 1 |
| Admin User | logstore_database | tool_logstore_visibility | 1 | 0 |
File diff suppressed because one or more lines are too long
-2
View File
@@ -71,14 +71,12 @@ define(['jquery'], function($) {
return null;
};
// eslint-disable-line valid-jsdoc
/**
* Return the type of the module.
*
* @return {String}
* @method getType
*/
// eslint-enable-line valid-jsdoc
Rule.prototype.getType = function() {
throw new Error('Not implemented');
};
@@ -94,7 +94,7 @@ class behat_tool_lp_data_generators extends behat_base {
);
/**
* Creates the specified element. More info about available elements in http://docs.moodle.org/dev/Acceptance_testing#Fixtures.
* Creates the specified element. More info about available elements in https://moodledev.io/general/development/tools/behat.
*
* @Given /^the following lp "(?P<element_string>(?:[^"]|\\")*)" exist:$/
*
+11 -17
View File
@@ -15,6 +15,17 @@ Feature: Manage plan workflow
| usermanageowndraftplan | User manage own draft plan role | user |
| usermanageownplan | User manage own plan role | user |
| manageplan | Manager all plans role | manager |
And the following "role capabilities" exist:
| role | moodle/competency:planmanageowndraft | moodle/competency:planmanageown |
| usermanageowndraftplan | allow | |
| usermanageownplan | allow | allow |
| manageplan | allow | allow |
And the following "role capability" exists:
| role | manageplan |
| moodle/competency:planmanage | allow |
| moodle/competency:planview | allow |
| moodle/competency:planreview | allow |
| moodle/competency:planrequestreview | allow |
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| user1 | usermanageowndraftplan | System | |
@@ -40,23 +51,6 @@ Feature: Manage plan workflow
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| lp | System | 1 | my-index | content |
And I log in as "admin"
And I set the following system permissions of "User manage own draft plan role" role:
| capability | permission |
| moodle/competency:planmanageowndraft | Allow |
And I set the following system permissions of "User manage own plan role" role:
| capability | permission |
| moodle/competency:planmanageowndraft | Allow |
| moodle/competency:planmanageown | Allow |
And I set the following system permissions of "Manager all plans role" role:
| capability | permission |
| moodle/competency:planmanage | Allow |
| moodle/competency:planmanagedraft | Allow |
| moodle/competency:planmanageowndraft | Allow |
| moodle/competency:planview | Allow |
| moodle/competency:planreview | Allow |
| moodle/competency:planrequestreview | Allow |
And I log out
Scenario: User can manages his own plan draft
Given I log in as "user1"
+2
View File
@@ -25,6 +25,8 @@
require_once(__DIR__ . '/../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('toollpexportcsv');
$pagetitle = get_string('exportnavlink', 'tool_lpimportcsv');
$context = context_system::instance();
+2
View File
@@ -25,6 +25,8 @@ define('NO_OUTPUT_BUFFERING', true);
require_once(__DIR__ . '/../../../config.php');
require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('toollpimportcsv');
$pagetitle = get_string('pluginname', 'tool_lpimportcsv');
$context = context_system::instance();
@@ -829,7 +829,7 @@ class manager {
// An auto-reply may itself include the Bulk Precedence.
$precedence = $messagedata->getHeaderText(0, \Horde_Imap_Client_Data_Fetch::HEADER_PARSE)->getValue('Precedence');
$isbulk = $isbulk || strtolower($precedence) == 'bulk';
$isbulk = $isbulk || strtolower($precedence ?? '') == 'bulk';
// If the X-Autoreply header is set, and not 'no', then this is an automatic reply.
$autoreply = $messagedata->getHeaderText(0, \Horde_Imap_Client_Data_Fetch::HEADER_PARSE)->getValue('X-Autoreply');
+8 -4
View File
@@ -118,8 +118,12 @@ class api {
$langs = $stringmanager->get_list_of_translations(true);
foreach ($langs as $langid => $langname) {
foreach ($addoninfo['lang'] as $stringinfo) {
$lang[$langid][$stringinfo[0]] =
$stringmanager->get_string($stringinfo[0], $stringinfo[1], null, $langid);
$lang[$langid][$stringinfo[0]] = $stringmanager->get_string(
$stringinfo[0],
$stringinfo[1] ?? '',
null,
$langid
);
}
}
}
@@ -415,13 +419,13 @@ class api {
public static function get_qrlogin_key(stdClass $mobilesettings) {
global $USER;
// Delete previous keys.
delete_user_key('tool_mobile', $USER->id);
delete_user_key('tool_mobile/qrlogin', $USER->id);
// Create a new key.
$iprestriction = !empty($mobilesettings->qrsameipcheck) ? getremoteaddr(null) : null;
$qrkeyttl = !empty($mobilesettings->qrkeyttl) ? $mobilesettings->qrkeyttl : self::LOGIN_QR_KEY_TTL;
$validuntil = time() + $qrkeyttl;
return create_user_key('tool_mobile', $USER->id, null, $iprestriction, $validuntil);
return create_user_key('tool_mobile/qrlogin', $USER->id, null, $iprestriction, $validuntil);
}
/**
@@ -0,0 +1,45 @@
<?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/>.
namespace tool_mobile;
use core\session\utility\cookie_helper;
use core\event\user_loggedin;
/**
* Event handler for tool_mobile.
*
* @package tool_mobile
* @copyright 2024 Juan Leyva
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class event_handler {
/**
* Allows the plugin to augment Set-Cookie headers when the user_loggedin event is fired as part of complete_user_login() calls.
*
* @param user_loggedin $event the event
* @return void
*/
public static function handle_user_loggedin(user_loggedin $event): void {
global $CFG;
// Set Partitioned and Secure attributes to the MoodleSession cookie if the user is using the Moodle app.
if (\core_useragent::is_moodle_app()) {
cookie_helper::add_attributes_to_cookie_response_header('MoodleSession'.$CFG->sessioncookie, ['Secure', 'Partitioned']);
}
}
}
+3 -3
View File
@@ -319,7 +319,7 @@ class external extends external_api {
$timenow = time();
if ($timenow - $last < $mintimereq) {
$minutes = $mintimereq / MINSECS;
throw new moodle_exception('autologinkeygenerationlockout', 'tool_mobile', $minutes);
throw new moodle_exception('autologinkeygenerationlockout', 'tool_mobile', '', $minutes);
}
set_user_preference('tool_mobile_autologin_request_last', $timenow, $USER);
@@ -649,8 +649,8 @@ class external extends external_api {
api::check_autologin_prerequisites($params['userid']); // Checks https, avoid site admins using this...
// Validate and delete the key.
$key = validate_user_key($params['qrloginkey'], 'tool_mobile', null);
delete_user_key('tool_mobile', $params['userid']);
$key = validate_user_key($params['qrloginkey'], 'tool_mobile/qrlogin', null);
delete_user_key('tool_mobile/qrlogin', $params['userid']);
// Double check key belong to user.
if ($key->userid != $params['userid']) {
@@ -66,7 +66,7 @@ class provider implements
FROM {user_private_key} k
JOIN {user} u ON k.userid = u.id
JOIN {context} ctx ON ctx.instanceid = u.id AND ctx.contextlevel = :contextlevel
WHERE k.userid = :userid AND k.script = 'tool_mobile'";
WHERE k.userid = :userid AND (k.script = 'tool_mobile' OR k.script = 'tool_mobile/qrlogin')";
$params = ['userid' => $userid, 'contextlevel' => CONTEXT_USER];
$contextlist = new contextlist();
$contextlist->add_from_sql($sql, $params);
@@ -88,6 +88,7 @@ class provider implements
// Add users based on userkey.
\core_userkey\privacy\provider::get_user_contexts_with_script($userlist, $context, 'tool_mobile');
\core_userkey\privacy\provider::get_user_contexts_with_script($userlist, $context, 'tool_mobile/qrlogin');
}
/**
@@ -108,6 +109,7 @@ class provider implements
}
// Export associated userkeys.
\core_userkey\privacy\provider::export_userkeys($context, [], 'tool_mobile');
\core_userkey\privacy\provider::export_userkeys($context, [], 'tool_mobile/qrlogin');
}
/**
* Export all user preferences for the plugin.
@@ -138,6 +140,7 @@ class provider implements
$userid = $context->instanceid;
// Delete all the userkeys.
\core_userkey\privacy\provider::delete_userkeys('tool_mobile', $userid);
\core_userkey\privacy\provider::delete_userkeys('tool_mobile/qrlogin', $userid);
}
/**
* Delete all user data for the specified user, in the specified contexts.
@@ -158,6 +161,7 @@ class provider implements
$userid = $context->instanceid;
// Delete all the userkeys.
\core_userkey\privacy\provider::delete_userkeys('tool_mobile', $userid);
\core_userkey\privacy\provider::delete_userkeys('tool_mobile/qrlogin', $userid);
}
/**
@@ -178,5 +182,6 @@ class provider implements
// Delete all the userkeys.
\core_userkey\privacy\provider::delete_userkeys('tool_mobile', $userid);
\core_userkey\privacy\provider::delete_userkeys('tool_mobile/qrlogin', $userid);
}
}
+33
View File
@@ -0,0 +1,33 @@
<?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/>.
/**
* tool_mobile plugin event handler definition.
*
* @package tool_mobile
* @category event
* @copyright 2024 Juan Leyva
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$observers = [
[
'eventname' => '\core\event\user_loggedin',
'callback' => '\tool_mobile\event_handler::handle_user_loggedin',
],
];
+8
View File
@@ -69,6 +69,14 @@ if (empty($service)) {
throw new moodle_exception('servicenotavailable', 'webservice');
}
// If the user is using the inapp (embedded) browser, we need to set the Secure and Partitioned attributes to the session cookie.
if (\core_useragent::is_moodle_app()) {
\core\session\utility\cookie_helper::add_attributes_to_cookie_response_header(
"MoodleSession{$CFG->sessioncookie}",
['Secure', 'Partitioned'],
);
}
require_login(0, false);
// Require an active user: not guest, not suspended.
+14 -1
View File
@@ -222,7 +222,7 @@ function tool_mobile_standard_footer_html() {
global $CFG;
$output = '';
if (!empty($CFG->enablemobilewebservice) && $url = tool_mobile_create_app_download_url()) {
$output .= html_writer::link($url, get_string('getmoodleonyourmobile', 'tool_mobile'));
$output .= html_writer::link($url, get_string('getmoodleonyourmobile', 'tool_mobile'), ['class' => 'mobilelink']);
}
return $output;
}
@@ -265,3 +265,16 @@ function tool_mobile_pre_processor_message_send($procname, $data) {
$data->fullmessagehtml .= html_writer::tag('p', get_string('readingthisemailgettheapp', 'tool_mobile', $url->out()));
}
}
/**
* Callback to add headers before the HTTP headers are sent.
*
*/
function tool_mobile_before_http_headers() {
global $CFG;
// Set Partitioned and Secure attributes to the MoodleSession cookie if the user is using the Moodle app.
if (\core_useragent::is_moodle_app()) {
\core\session\utility\cookie_helper::add_attributes_to_cookie_response_header('MoodleSession'.$CFG->sessioncookie, ['Secure', 'Partitioned']);
}
}
+1 -1
View File
@@ -56,7 +56,7 @@ $context = context_system::instance();
$PAGE->set_url(new \moodle_url('/'.$CFG->admin.'/tool/mobile/logout.php'));
$PAGE->navbar->add($title);
$PAGE->set_context($context);
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);
// Display the page.
echo $OUTPUT->header();
+3 -2
View File
@@ -31,7 +31,6 @@ define('NO_DEBUG_DISPLAY', true);
define('NO_MOODLE_COOKIES', true);
require_once(__DIR__ . '/../../../config.php');
use tool_mobile\api;
header('Content-Type: application/json; charset: utf-8');
@@ -41,7 +40,9 @@ if (!empty($CFG->enablemobilewebservice) && !empty($mobilesettings->enablesmarta
!empty($mobilesettings->androidappid)) {
$manifest = new StdClass;
$manifest->short_name = format_string($SITE->shortname);
$manifest->short_name = format_string($SITE->shortname, true, [
'context' => context_system::instance(),
]);
$manifest->prefer_related_applications = true;
$manifest->icons = [(object)
[
+6 -6
View File
@@ -387,18 +387,18 @@ class externallib_test extends externallib_advanced_testcase {
$result = external::get_autologin_key($token->privatetoken);
$result = \external_api::clean_returnvalue(external::get_autologin_key_returns(), $result);
// Change min time between requests to 30 seconds.
set_config('autologinmintimebetweenreq', 30, 'tool_mobile');
// Change min time between requests to 3 minutes.
set_config('autologinmintimebetweenreq', 3 * MINSECS, 'tool_mobile');
// Mock a previous request, 60 seconds ago.
$mocktime = time() - MINSECS;
// Mock a previous request, 4 minutes ago.
$mocktime = time() - (4 * MINSECS);
set_user_preference('tool_mobile_autologin_request_last', $mocktime, $USER);
$result = external::get_autologin_key($token->privatetoken); // All good, we were expecint 30 seconds or more.
$result = external::get_autologin_key($token->privatetoken);
$result = \external_api::clean_returnvalue(external::get_autologin_key_returns(), $result);
// We just requested one token, we must wait.
$this->expectException('moodle_exception');
$this->expectExceptionMessage(get_string('autologinkeygenerationlockout', 'tool_mobile'));
$this->expectExceptionMessage(get_string('autologinkeygenerationlockout', 'tool_mobile', 3));
$result = external::get_autologin_key($token->privatetoken);
}
@@ -87,7 +87,8 @@ class provider_test extends \core_privacy\tests\provider_testcase {
$context1 = \context_user::instance($user1->id);
$context2 = \context_user::instance($user2->id);
$key1 = get_user_key('tool_mobile', $user1->id);
$key2 = get_user_key('tool_mobile', $user2->id);
$key2 = get_user_key('tool_mobile/qrlogin', $user1->id);
$key3 = get_user_key('tool_mobile', $user2->id);
// Ensure only user1 is found in context1.
$userlist = new \core_privacy\local\request\userlist($context1, $component);
@@ -174,12 +175,15 @@ class provider_test extends \core_privacy\tests\provider_testcase {
$context1 = \context_user::instance($user1->id);
$context2 = \context_user::instance($user2->id);
$keyvalue1 = get_user_key('tool_mobile', $user1->id);
$keyvalue2 = get_user_key('tool_mobile', $user2->id);
$keyvalue2 = get_user_key('tool_mobile/qrlogin', $user1->id);
$keyvalue3 = get_user_key('tool_mobile', $user2->id);
$key1 = $DB->get_record('user_private_key', ['value' => $keyvalue1]);
// Before deletion, we should have 2 user_private_keys.
// Before deletion, we should have 2 user_private_keys for tool_mobile and one for tool_mobile/qrlogin.
$count = $DB->count_records('user_private_key', ['script' => 'tool_mobile']);
$this->assertEquals(2, $count);
$count = $DB->count_records('user_private_key', ['script' => 'tool_mobile/qrlogin']);
$this->assertEquals(1, $count);
// Ensure deleting wrong user in the user context does nothing.
$approveduserids = [$user2->id];
@@ -197,6 +201,8 @@ class provider_test extends \core_privacy\tests\provider_testcase {
// Ensure only user1's data is deleted, user2's remains.
$count = $DB->count_records('user_private_key', ['script' => 'tool_mobile']);
$this->assertEquals(1, $count);
$count = $DB->count_records('user_private_key', ['script' => 'tool_mobile/qrlogin']);
$this->assertEquals(0, $count);
$params = ['script' => $component];
$userid = $DB->get_field_select('user_private_key', 'userid', 'script = :script', $params);
+1 -1
View File
@@ -23,7 +23,7 @@
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2022112800; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2022112801; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2022111800; // Requires this Moodle version.
$plugin->component = 'tool_mobile'; // Full name of the plugin (used for diagnostics).
$plugin->dependencies = array(
@@ -194,10 +194,9 @@ class subscription_manager {
if (!is_null($coursecontext)) {
$context = $coursecontext;
$courseid = $subscription->courseid;
} else if (!empty($subscription->courseid) && ($coursecontext =
} else if (!empty($subscription->courseid) && ($context =
\context_course::instance($subscription->courseid, IGNORE_MISSING))) {
$courseid = $subscription->courseid;
$context = $coursecontext;
} else {
$courseid = 0;
$context = \context_system::instance();
@@ -169,10 +169,9 @@ Feature: tool_monitor_subscriptions
And I should not see "You can manage rules the from the Event monitoring rules page."
Scenario: No manage rules link when user does not have permission
Given I log in as "admin"
And I set the following system permissions of "Non-editing teacher" role:
| tool/monitor:managerules | Prohibit |
And I log out
Given the following "role capability" exists:
| role | teacher |
| tool/monitor:managerules | prohibit |
And I log in as "teacher1"
And I follow "Preferences" in the user menu
And I follow "Event monitoring"
File diff suppressed because one or more lines are too long
@@ -121,7 +121,6 @@ define(['tool_moodlenet/validator',
});
// Trigger the transition between 'pages'.
carousel.carousel(2);
// eslint-disable-next-line max-len
modal.setFooter(Templates.render('tool_moodlenet/chooser_footer_close_mnet', {}));
};
+1 -1
View File
@@ -63,7 +63,7 @@ if ($cancel) {
}
redirect($url);
} else if ($continue) {
confirm_sesskey();
require_sesskey();
// Handle backups.
if (strtolower($importinfo->get_resource()->get_extension()) == 'mbz') {
+1 -1
View File
@@ -81,7 +81,7 @@ switch ($config->type) {
}
if ($import && $module) {
confirm_sesskey();
require_sesskey();
$handlerinfo = $handlerregistry->get_resource_handler_for_mod_and_strategy($importinfo->get_resource(), $module, $strategy);
if (is_null($handlerinfo)) {
@@ -98,7 +98,15 @@ class remote_resource_test extends \advanced_testcase {
]
);
$this->assertGreaterThan(0, $remoteres->get_download_size());
// We need to handle size of -1 (missing "Content-Length" header), or where it is set and greater than zero.
$this->assertThat(
$remoteres->get_download_size(),
$this->logicalOr(
$this->equalTo(-1),
$this->greaterThan(0),
),
);
[$path, $name] = $remoteres->download_to_requestdir();
$this->assertIsString($path);
$this->assertEquals('test.html', $name);
+6 -7
View File
@@ -50,12 +50,10 @@ list($options, $unrecognized) = cli_get_params(
)
);
if (file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/composer.json')) {
// Composer packages present.
require_once(__DIR__.'/../../../../vendor/autoload.php');
} else {
// Note: installation via PEAR is not supported any more.
// Basic check to see if phpunit is installed.
if (!file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/composer.json') ||
!file_exists(__DIR__.'/../../../../vendor/bin/phpunit') ||
!file_exists(__DIR__.'/../../../../vendor/autoload.php')) {
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
}
@@ -74,12 +72,13 @@ if ($options['run']) {
}
}
$_SERVER['argv'] = array_values($_SERVER['argv']);
PHPUnit\TextUI\Command::main();
require(__DIR__ . '/../../../../vendor/bin/phpunit');
exit(0);
}
define('PHPUNIT_UTIL', true);
require(__DIR__.'/../../../../vendor/autoload.php');
require(__DIR__ . '/../../../../lib/phpunit/bootstrap.php');
// from now on this is a regular moodle CLI_SCRIPT

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