Compare commits

..

2301 Commits

Author SHA1 Message Date
Ilya Tregubov 62c1f37d40 Moodle release 4.2.9 2024-08-10 14:54:35 +08:00
Ilya Tregubov cfda0752ab weekly release 4.2.8+ 2024-08-09 09:34:33 +08:00
Huong Nguyen 9fb15b2357 MDL-82745 filter_tex: Improve PHPUnit test 2024-08-08 21:07:28 +08:00
Michael Hawkins d216f54daf MDL-82745 filter_tex: Improve filter deny list 2024-08-08 11:40:51 +07:00
Michael Hawkins ab19e3a35b MDL-82576 qtype_calculated: Improve formula regexes 2024-08-08 11:12:08 +07:00
Safat c08f1615ea MDL-82395 tool_xmldb: Table layout update 2024-08-08 10:01:34 +07:00
Jun Pataleta a92dfea792 Merge branch 'MDL-82560-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-08-08 10:44:41 +08:00
Paul Holden 8f2b234393 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:22:55 +07:00
Angelia Dela Cruz 3e442e842a MDL-82560 mod_forum: Test that students can only start one discussion 2024-08-08 10:18:42 +08:00
Huong Nguyen 4fa7993ca5 Merge branch 'MDL-82669-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-08-08 08:59:12 +07:00
Jun Pataleta 483aa01191 Merge branch 'MDL-77784-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-08-08 09:55:21 +08:00
Jun Pataleta b45e5e9e64 Merge branch 'MOODLE_402_MDL-82518' of https://github.com/danielneis/moodle into MOODLE_402_STABLE 2024-08-07 17:11:54 +08:00
Paul Holden 2736b6e7fa MDL-81394 restore: format backup file metadata details safely. 2024-08-07 14:05:05 +08:00
Huong Nguyen f26739cfec MDL-81718 core_grades: Fix Behat failures 2024-08-07 10:53:21 +08:00
raortegar 3d336a1afa MDL-81718 core: Improve localstorage validation 2024-08-07 10:53:21 +08:00
Paul Holden 4a21f27def MDL-82558 h5p: escape template error/exception content. 2024-08-05 11:02:46 +08:00
Daniel Neis Araujo 8c36dadbe2 MDL-82518 core_user: Fix regression introduced by MDL-80271 2024-08-02 15:02:11 -03:00
Paul Holden 82d535640a MDL-82669 mod_assign: remove Atto reliance workaround for Behat.
See 8fe80e743c for context, and 802ff3e2e3 for additonal comments.
2024-08-02 10:33:51 +01:00
Paul Holden 7e5acc697b MDL-82669 editor: remove reliance on Atto editor in Behat scenarios. 2024-08-02 10:33:50 +01:00
Paul Holden 97866086d3 MDL-82392 blocks: consistent cleaning of block instance names. 2024-08-02 01:33:18 +00:00
Paul Holden 00b1e807ab MDL-82261 mod_feedback: ensure only non-respondents can be messaged. 2024-08-02 01:33:18 +00:00
Paul Holden 179fe73506 MDL-82390 badges: correct context check when deleting badges. 2024-08-02 01:33:18 +00:00
meirzamoodle a7834a73bf 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:33:18 +00:00
Paul Holden e97e13b7ec MDL-82262 mod_feedback: fix broken bulk message sesskey checks. 2024-08-02 01:33:18 +00:00
Paul Holden e41452ba37 MDL-64984 mod_glossary: capability check when restoring global type. 2024-08-02 01:33:18 +00:00
Ilya Tregubov 8d8ec98aea 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:33:18 +00:00
Ilya Tregubov 27e94bad0a MDL-79541 core_grades: Fix singleview and user report selectors. 2024-08-02 01:33:18 +00:00
Ilya Tregubov a3342ca99f 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:33:18 +00:00
Ilya Tregubov efce12bb63 weekly release 4.2.8+ 2024-08-02 09:30:59 +08:00
Ilya Tregubov c5783bb8d1 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-08-02 09:30:56 +08:00
Paul Holden cbafc99366 MDL-77784 quiz_grading: editor agnostic Behat scenario steps. 2024-08-01 14:17:47 +01:00
Huong Nguyen a6c2b16be5 Merge branch 'MDL-82598-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-08-01 10:27:23 +07:00
AMOS bot ce34532f39 Automatically generated installer lang files 2024-08-01 00:07:29 +00:00
Jun Pataleta 5c6365cde6 MDL-72876 theme_classic: Enclose welcome message in Bootstrap card 2024-07-31 17:15:55 +02:00
Sara Arjona 0ed9c4bc30 Merge branch 'MDL-82596-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-07-31 16:46:22 +02:00
Simey Lameze 09c29f3496 MDL-82598 behat: improve example submission test 2024-07-31 09:05:30 +08:00
AMOS bot aa2c8af443 Automatically generated installer lang files 2024-07-31 00:07:26 +00:00
Ilya Tregubov c4d0b41624 Merge branch 'MDL-80345-402' of https://github.com/MartinGauk/moodle into MOODLE_402_STABLE 2024-07-29 11:35:10 +08:00
Paul Holden 0c39608eaf MDL-82596 behat: switch manual private files upload to generator. 2024-07-28 19:29:39 +01:00
Paul Holden 32a85859bf 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:12 +01:00
Jun Pataleta b98c8f7a5f weekly release 4.2.8+ 2024-07-26 13:35:52 +08:00
Jun Pataleta 6027dc0942 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-07-26 13:35:49 +08:00
Jun Pataleta 5746cd1ba4 Merge branch 'MDL-82373-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-07-26 13:19:25 +08:00
Andrew Nicols abb970f87c 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:53:29 +08:00
Huong Nguyen 578f563ea6 Merge branch 'MDL-82527-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-07-25 10:49:39 +07:00
Jun Pataleta f8e8c6eff2 Merge branch 'MDL-82373-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-07-25 11:31:02 +08:00
Jun Pataleta 9e961824a3 Merge branch 'MDL-77706-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-07-25 11:02:24 +08:00
Huong Nguyen b6d37642e8 Merge branch 'MDL-82553-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-07-25 09:18:01 +07:00
Huong Nguyen cbcd372a39 Merge branch 'MDL-82422-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-07-25 08:37:16 +07:00
AMOS bot a700df849f Automatically generated installer lang files 2024-07-25 00:08:02 +00:00
Jun Pataleta ef214ba29a Merge branch 'MDL-81803-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-07-24 16:57:35 +08:00
Angelia Dela Cruz 06a7c2fb1c MDL-82422 mod_workshop: Behat for how strict assessment comparison is 2024-07-24 14:16:38 +08:00
Jun Pataleta ce1233b43c MDL-82553 behat: Run accessibility tests using WCAG 2.2 success criteria 2024-07-22 14:38:10 +08:00
AMOS bot 26737b5337 Automatically generated installer lang files 2024-07-21 00:07:36 +00:00
Ilya Tregubov 8233caad6d weekly release 4.2.8+ 2024-07-19 09:30:37 +08:00
Paul Holden 07b0a5740b 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:38:13 +01:00
Sara Arjona 9ba5a1a913 Merge branch 'MDL-82353-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-07-17 17:08:26 +02:00
Andrew Nicols 45f64ecdef 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 13:47:14 +08:00
Andrew Nicols 6007ba3c53 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 13:47:14 +08:00
Andrew Nicols d11d6e1fd9 MDL-82373 behat: Wait for alerts before accepting/dismissing them 2024-07-17 13:46:09 +08:00
Andrew Nicols e2faf39070 MDL-82373 core: Make CollapsibleRegion more tolerant to behat 2024-07-17 13:46:09 +08:00
Andrew Nicols 7ce351e8b5 MDL-82373 tool_usertours: Ensure that behat waits for tours to show/hide 2024-07-17 13:46:07 +08:00
Andrew Nicols a8a5651b8f 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 13:45:22 +08:00
Andrew Nicols 65b8f8c33d 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 13:41:24 +08:00
Andrew Nicols 97ff8d2f9f 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-17 13:35:25 +08:00
Andrew Nicols d9e35bd123 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 13:35:25 +08:00
Angelia Dela Cruz 5b76a6fd20 MDL-82353 gradingform: Behat to verify marking guide can be set to draft 2024-07-16 17:12:24 +08:00
Andrew Nicols e98f31c222 MDL-66903 core: Check PHPUNIT_TEST defined before using 2024-07-15 13:42:57 +07:00
Huong Nguyen 45e3520fe6 Merge branch 'MDL-66903-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-07-15 13:22:35 +07:00
Andrew Nicols aa12f3ab77 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 8603e870d7 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:20 +08:00
Andrew Nicols 5fdc5a3bda 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 2eb8d9af4c MDL-66903 testing: Helper to load fixture files 2024-07-15 12:22:17 +08:00
Andrew Nicols 90d53f7d90 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 a75906d75e MDL-81803 tool_dataprivacy: observe disabled expiration time.
A non-positive integer value should indicate "No time limit".
2024-07-12 11:05:13 +01:00
Huong Nguyen 0f3cc7d9f5 weekly release 4.2.8+ 2024-07-12 08:42:16 +07:00
Andrew Nicols e1d8bfd7d8 Merge branch 'MDL-82431-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-07-11 11:47:02 +08:00
Huong Nguyen 7933daf5cc Merge branch 'MDL-79717-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-07-11 09:35:50 +07:00
Huong Nguyen 767e84f401 Merge branch 'MDL-76654-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-07-11 09:20:08 +07:00
Paul Holden 2c68ee6918 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:21 +01:00
Paul Holden 7c72ec0373 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:08:57 +01:00
Huong Nguyen e59ce79f00 Merge branch 'MDL-82236-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-07-10 09:04:46 +07:00
Angelia Dela Cruz 6ff2db90f9 MDL-82236 mod_data: Behat to display DB activity entry rating 2024-07-09 15:07:58 +08:00
Sara Arjona 3dd7c6f6f8 Merge branch 'MDL-81296-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-07-09 08:50:48 +02:00
Angelia Dela Cruz 41ac252e70 MDL-81296 mod_data: Behat test for data activity readonly availability 2024-07-09 12:52:44 +08:00
Simey Lameze 41269b7115 MDL-76654 behat: fixes and improvements to self assessment test 2024-07-08 11:22:30 +08:00
Angelia Dela Cruz 5bf260d921 MDL-76654 behat: Coverage for workshop self-assessment 2024-07-08 11:22:30 +08:00
Andrew Nicols ee1ea6ffe6 MDL-66903 testing: Fix whitespace 2024-07-05 22:15:06 +08:00
Andrew Nicols f5a2991935 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:15:06 +08:00
Ilya Tregubov 34b34aed9c weekly release 4.2.8+ 2024-07-05 09:02:12 +08:00
Sara Arjona 423cbd2824 Merge branch 'MDL-80907-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-07-04 11:19:21 +02:00
Huong Nguyen d76c95f425 MDL-80907 behat: Fix incorrect column selectors 2024-07-04 15:17:12 +07:00
Huong Nguyen e3581a759a Merge branch 'MDL-80907-402' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2024-07-04 11:14:37 +07:00
Ilya Tregubov a344e93c28 Merge branch 'MDL-63670-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-07-04 10:58:26 +08:00
Sara Arjona 47197dded0 Merge branch 'MDL-82363-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-07-03 08:23:57 +02:00
Huong Nguyen f90b310189 MDL-82363 Calendar: Responsiveness improvement for calendar block
Hide the month name if the screen is too small
2024-07-03 11:02:54 +07:00
Sara Arjona 0a00ae5151 weekly release 4.2.8+ 2024-06-27 16:36:59 +02:00
Sara Arjona 574e7b39f4 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-06-27 16:36:56 +02:00
Andrew Nicols 71427f127c MDL-63670 core_message: Tests should not use another testcase as base 2024-06-27 11:20:42 +08:00
Jun Pataleta 83b31ea2d6 Merge branch 'MDL-79809-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-06-27 11:01:10 +08:00
Huong Nguyen ab1982b600 MDL-79809 environment: Moodle 4.5 requirements 2024-06-24 09:37:32 +07:00
Huong Nguyen 9ea30b852d MDL-79809 environment: Add missing Moodle 4.4 requirements 2024-06-24 09:37:31 +07:00
Huong Nguyen feb5468de7 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:31 +07:00
AMOS bot 1ba4c16317 Automatically generated installer lang files 2024-06-22 00:14:03 +00:00
Martin Gauk 3835002cf1 MDL-80345 core_lock: deal with hash collisions in postgres_lock_factory 2024-06-20 17:33:04 +02:00
Sara Arjona 89855404de weekly release 4.2.8+ 2024-06-20 16:31:09 +02:00
Sara Arjona 44d7647837 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-06-20 16:31:06 +02:00
AMOS bot ab9737d0ec Automatically generated installer lang files 2024-06-20 00:16:18 +00:00
Huong Nguyen 157135400d Merge branch 'MDL-81249-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-06-19 09:19:07 +07:00
Angelia Dela Cruz e684f9a0eb MDL-81249 gradingform: Behat test that grades are retained 2024-06-18 19:03:58 +08:00
Angelia Dela Cruz 766fd1c555 MDL-81249 gradingform: Enhance Behat test for deleting marking guide 2024-06-18 17:46:54 +08:00
Huong Nguyen 5eba696644 Merge branch 'MDL-82148_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2024-06-18 16:28:16 +07:00
Eloy Lafuente (stronk7) dddcaba228 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:36 +02:00
Ilya Tregubov c136d9798d weekly release 4.2.8+ 2024-06-14 08:57:13 +08:00
Huong Nguyen 9b4a0b4978 Merge branch 'MDL-81332-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-06-12 13:16:25 +07:00
Angelia Dela Cruz 6958f54ef4 MDL-81332 core_course: Behat test for grade and activity reports display 2024-06-11 16:43:04 +08:00
Andrew Nicols 2d41ac46f4 Moodle release 4.2.8 2024-06-07 14:55:25 +08:00
Jun Pataleta afa68b9685 weekly release 4.2.7+ 2024-06-06 22:30:43 +08:00
Jun Pataleta f5c82455b8 NOBUG: Fixed file access permissions 2024-06-06 22:30:43 +08:00
Huong Nguyen 684a375b45 Merge branch 'MDL-81989-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-06-06 22:21:42 +08:00
meirzamoodle dc84fcfab0 MDL-81890 assign: confirm_sesskey fixed in view_fix_rescaled_null_grades 2024-06-06 22:21:42 +08:00
meirzamoodle 093aedf798 MDL-81890 enrol_lti: Fix sesskey checks 2024-06-06 22:21:41 +08:00
meirzamoodle c1aacb3e28 MDL-81890 course: Fix sesskey checks 2024-06-06 22:21:41 +08:00
meirzamoodle c5b1604e81 MDL-81890 tool_moodlenet: Fix sesskey checks 2024-06-06 22:21:41 +08:00
Paul Holden 647b9dc064 MDL-81778 mod_bigbluebuttonbn: access checks when getting meeting URL. 2024-06-06 22:21:41 +08:00
Stevani Andolo 3048a162cb MDL-81412 calendar: Sanitise calendar event names 2024-06-06 22:21:24 +08:00
lameze b48193c056 MDL-81989 install: remove unnecessary closing div tags 2024-06-05 14:06:16 +08:00
Cameron Ball 3e38c84315 MDL-81774 curl: Strip auth headers when redirecting to different host 2024-06-05 02:03:17 +00:00
Huong Nguyen 5bf91592cd Merge branch 'MDL-81751-MOODLE_402_STABLE' of https://github.com/durzo/moodle into MOODLE_402_STABLE 2024-06-05 08:57:05 +07:00
Huong Nguyen b3b1d731ab Merge branch 'MDL-81955-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-06-04 10:34:18 +07:00
Juan Leyva 0caedaab7c MDL-80959 tool_mobile: Use different user keys for QR and auto login 2024-06-04 10:34:20 +08:00
Paul Holden 4461d3f6d6 MDL-81955 assignfeedback_editpdf: ensure ghostscript present in tests. 2024-05-31 07:14:10 +01:00
Ilya Tregubov 742bc470ab Merge branch 'MDL-77685-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-05-31 09:09:05 +08:00
Sara Arjona be10cd772b weekly release 4.2.7+ 2024-05-30 17:00:37 +02:00
Andrew Nicols c1aae7d366 MDL-81897 tool_mobile: Coding style fix 2024-05-28 11:44:33 +08:00
Andrew Nicols 19ea4c183d Merge branch 'MDL-81897-402' of https://github.com/jleyva/moodle into MOODLE_402_STABLE 2024-05-28 11:44:28 +08:00
Juan Leyva e5348292f2 MDL-81897 tool_mobile: Force partitioned cookies on inapp browser 2024-05-17 10:22:03 +02:00
Jordan Tomkinson 1d186d7f36 MDL-81751 ddl: new reserved keywords in Aurora MySQL database engine 2024-05-16 13:41:26 +01:00
Huong Nguyen 7ecbcb3c33 weekly release 4.2.7+ 2024-05-16 18:25:40 +07:00
Huong Nguyen a645dc7051 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-05-16 18:25:38 +07:00
Huong Nguyen 00d0724b66 Merge branch 'MDL-79838-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-05-16 09:22:32 +07:00
Angelia Dela Cruz 108fc684de MDL-79838 mod_h5pactivity: Behat for H5P activity grade settings control 2024-05-15 16:19:51 +08:00
Sara Arjona e1b3e14886 Merge branch 'MDL-81805-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-05-14 17:05:52 +02:00
AMOS bot 80e8737375 Automatically generated installer lang files 2024-05-12 00:14:25 +00:00
Ilya Tregubov 95b5ca87eb weekly release 4.2.7+ 2024-05-10 09:09:45 +08:00
Jun Pataleta ab0792d943 Merge branch 'MDL-80972-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-05-09 11:42:53 +08:00
info@eWallah.net 022a3d71fd MDL-80972 behat: Behat check_server_status can provide better info. 2024-05-09 11:07:53 +08:00
Huong Nguyen 9dbd03e51d Merge branch 'MDL-80453-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-05-09 09:48:53 +07:00
Huong Nguyen 93b53c3bb1 Merge branch 'MDL-79702-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-05-09 09:34:25 +07:00
Paul Holden c92cfe9aed 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-08 12:29:56 +01:00
Mihail Geshoski 1fc3e502f0 MDL-77685 core_grades: Fix row_column_of_table_should_contain()
Backport from MDL-77632.
2024-05-08 12:29:56 +01:00
Angelia Dela Cruz b49bb7a6b5 MDL-80453 mod_glossary: Behat for different glossary format display 2024-05-08 17:36:07 +08:00
Marina Glancy 71b4125622 MDL-80907 various: fixes to incorrect column selectors in behat 2024-05-07 19:32:21 +01:00
Marina Glancy 70106f31f9 MDL-80907 behat: be more precise in selecting table rows 2024-05-07 19:32:15 +01:00
Simey Lameze cb49940156 MDL-81805 behat: remove unnecessary @javascript from tests 2024-05-07 09:10:41 +08:00
Simey Lameze 981272bc2c 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:47 +08:00
Angelia Dela Cruz 3cdf09eb8b MDL-79702 core_tag: Behat for activity tags deletion during course reset 2024-05-06 20:02:47 +08:00
Huong Nguyen 1f3550847b Merge branch 'MDL-80589-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-05-06 09:37:41 +07:00
Ilya Tregubov 3fdb0f3580 weekly release 4.2.7+ 2024-05-03 08:22:46 +08:00
Ilya Tregubov 4ff803a9f3 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-05-03 08:22:43 +08:00
AMOS bot 43386365b8 Automatically generated installer lang files 2024-05-03 00:10:40 +00:00
Simey Lameze b034a4a24a MDL-80589 behat: fixes and improvements to new tests 2024-05-02 13:34:07 +08:00
Angelia Dela Cruz f0ba09aabe MDL-80589 qtype_numerical: Behat to add, edit, preview numeric question 2024-05-02 13:34:07 +08:00
Huong Nguyen 13aa29cbae Merge branch 'MDL-79851-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-05-01 16:12:03 +07:00
Angelia Dela Cruz d78d270031 MDL-79851 mod_h5pactivity: Behat for h5p activity access control 2024-05-01 14:26:31 +08:00
Sara Arjona c852ec91ab Merge branch 'MDL-81632-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-04-30 15:09:47 +02:00
Huong Nguyen 1f4489ed59 Merge branch 'MDL-79149-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-04-30 11:48:45 +07:00
Paul Holden 479da404db 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:08:24 +01:00
Sara Arjona c862fc046c Merge branch 'MDL-77445-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-04-26 10:40:45 +02:00
Sara Arjona 7b172f51b9 weekly release 4.2.7+ 2024-04-25 15:43:39 +02:00
Sara Arjona 2936dbdd3f Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-04-25 15:43:35 +02:00
Huong Nguyen 3d847c154a MDL-77998 Behat: Fix Behat failure 2024-04-25 10:31:58 +07:00
Paul Holden 1b0d03b87e 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:44 +01:00
Sara Arjona d5002415ce Merge branch 'MDL-77998-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-04-24 14:48:11 +02:00
Angelia Dela Cruz 5eef98ee05 MDL-77998 Behat: Add behat coverage for preferences navigation 2024-04-24 19:47:51 +08:00
Angelia Dela Cruz f4220e56eb MDL-77445 Behat: Coverage for activity chooser navigation 2024-04-24 16:41:37 +08:00
Huong Nguyen dda25ae3c8 Merge branch 'MOODLE_402_MDL-81613' of https://github.com/danielneis/moodle into MOODLE_402_STABLE 2024-04-24 15:13:48 +07:00
Huong Nguyen e97accec36 Merge branch 'MDL-80107-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-04-24 08:36:25 +07:00
Sara Arjona d5814b74be Merge branch 'MDL-81209-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-04-23 15:30:54 +02:00
Sara Arjona ea1bc14949 Merge branch 'MDL-81457-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-04-23 14:57:45 +02:00
Angelia Dela Cruz 0015c873ce MDL-80107 gradingform: Behat test for defining marking guide 2024-04-23 15:20:01 +08:00
Daniel Neis Araujo a95b757384 MDL-81613 report_log: fix user fullname export for log report 2024-04-22 14:36:42 -03:00
AMOS bot 2d1c685828 Automatically generated installer lang files 2024-04-22 00:10:28 +00:00
Jun Pataleta 6a1fcb3050 Moodle release 4.2.7 2024-04-20 15:57:37 +08:00
Huong Nguyen cff8e8dc6a weekly release 4.2.6+ 2024-04-19 17:05:36 +07:00
Jun Pataleta 4cea1c74ac Merge branch 'MDL-81584-402' of https://github.com/mihailges/moodle into MOODLE_402_STABLE 2024-04-19 11:03:42 +08:00
Mihail Geshoski 8f9d3179c3 MDL-81584 gradereport_grader: Pin the last row only when necessary
Fixes the current behavior where the last row in the grader report is
always 'pinned', ensuring it is pinned only when necessary.
2024-04-18 16:19:55 +08:00
Laurent David 5708639d32 MDL-81267 mod_data: Additional tests 2024-04-17 10:33:35 +02:00
Laurent David 63ba5e591d 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:35 +02:00
meirzamoodle 4b09e99595 MDL-81352 filter: Ensure equation safety prior to filtering 2024-04-17 13:34:52 +07:00
Stevani Andolo 9c4131f03d MDL-81354 core: Escape string of fullname 2024-04-17 03:23:20 +00:00
Paul Holden 915e3007a8 MDL-81062 mod_lesson: escape identity fields in overview report. 2024-04-17 03:23:20 +00:00
Paul Holden 1d0f426d97 MDL-80712 mod_workshop: stricter cleaning of sub-plugin values. 2024-04-17 03:23:20 +00:00
Paul Holden 2a54d31352 MDL-81058 admin: fix sesskey checks for admin preset actions. 2024-04-17 03:23:20 +00:00
Paul Holden 251b89743d MDL-81059 tool_analytics: fix sesskey checks for model actions. 2024-04-17 03:23:20 +00:00
Laurent David 6885687464 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-17 03:23:20 +00:00
Paul Holden 43bb50931d MDL-81135 mod_feedback: stricter cleaning of item type parameter. 2024-04-17 03:23:19 +00:00
Huong Nguyen 6c0e29e944 MDL-81247 calendar: Extra validation for webservices 2024-04-17 03:23:19 +00:00
Paul Holden 7a05e29d3d MDL-81247 calendar: freeze event type if "user" only allowed. 2024-04-17 03:23:19 +00:00
Leon Stringer 0f6571f1cd MDL-80585 report_log: sanitize descriptions
Strip any HTML tags from values in the "Description" column.
2024-04-17 03:23:19 +00:00
Huong Nguyen 97090433d6 Merge branch 'MDL-81552-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-04-17 10:14:03 +07:00
Jun Pataleta 127da6652a MDL-81552 core: Assign proper webdav_client class variables 2024-04-16 13:06:54 +08:00
Sara Arjona 6ba9ca190c weekly release 4.2.6+ 2024-04-12 13:23:31 +02:00
Ilya Tregubov 394fa437a5 Merge branch 'MDL-80160-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-04-12 13:04:28 +08:00
Huong Nguyen a50d789801 MDL-80160 admin: Use html_writter to display the paragraph 2024-04-12 11:59:37 +07:00
Huong Nguyen a1eec364e5 Merge branch 'MDL-77015-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-04-12 11:46:25 +07:00
Huong Nguyen efa2c5881f Merge branch 'MDL-65381-402' of https://github.com/jleyva/moodle into MOODLE_402_STABLE 2024-04-12 11:11:55 +07:00
Andrew Nicols aa93afad1a Merge branch 'MDL-70829-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-04-12 11:59:20 +08:00
Huong Nguyen 42f39c6ced MDL-79174 availability: Behat cleanups 2024-04-12 10:57:33 +07:00
Huong Nguyen b708b37a63 Merge branch 'MDL-79174_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2024-04-12 10:57:25 +07:00
Andrew Nicols 367f0e5b8c Merge branch 'MDL-81192_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2024-04-12 11:48:38 +08:00
Jun Pataleta 25e2df4fe0 MDL-70829 output: Remove the presentation role for html_writer::img()
* A presentation role is not necessary for the img tag.
  - If a non-empty alt text is provided, the presentation role will
  conflict with the alt text.
  - An empty alt text denotes a decorative image. The presence of a
  presentation role is redundant.
* Make sure that the alt text is set to an empty string. Otherwise,
  an img tag without an alt attribute will be produced which is an
  invalid markup.
2024-04-12 11:45:07 +08:00
Andrew Nicols 138ffb4719 Merge branch 'MDL-78902_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2024-04-12 11:19:10 +08:00
Jun Pataleta 8a525dcce6 MDL-70829 core: Set the icon of action icons as a decorative image
* When text is rendered for the action icon, set the icon as a
decorative image by setting empty alt and title attributes and adding
the aria-hidden attribute as well. Otherwise, assistive technologies
will read the action name twice.
2024-04-12 11:17:30 +08:00
Jun Pataleta fac456676f MDL-70829 block_recentlyaccesseditems: Move listitem role out of <a>
* Axe DevTools flags an error on the recently accessed items block that
the listitem role is not allowed for <a> tags. This is because the
"listitem" role will override the native semantic meaning of the course
links. So the solution is to move the course links within a <div> tag
with the listitem role instead.
2024-04-12 11:17:29 +08:00
Jun Pataleta 582b55df77 MDL-70829 tool_lp: Add empty alt text for decorative image
* The decorative image for the course modules in the user competency
summary modal is missing an empty alt text.
2024-04-12 11:17:29 +08:00
Jun Pataleta 87bacf1750 MDL-70829 theme_boost: Make context header icons decorative
The non-empty alt text for the icons of the context header buttons like
the "Message" and the "Add contact" buttons cause redundant information
to be read twice by screen readers when the buttons are rendered with
the icon and the button name. The icons need to be set as decorative by
setting an empty alt text for them.
* The presentation role is also unnecessary.
* The alt text is needed when the button gets rendered without the
button name text.
2024-04-12 11:17:29 +08:00
Jun Pataleta dd29c50196 MDL-70829 core_search: Mark up decorative image properly
* An empty alt text is enough for decorative images. There's no need
  to set a presentation role.
2024-04-12 11:17:06 +08:00
Jun Pataleta 7ad48d998d MDL-70829 enrol_manual: Mark up decorative image properly
* An empty alt text is enough for decorative images. There's no need
  to set a presentation role.
2024-04-12 11:17:06 +08:00
Jun Pataleta de9b088216 MDL-70829 mod_workshop: Mark up decorative images properly
* Decorative images should have an empty alt text and there's no need
to set a presentation role.
2024-04-12 11:17:06 +08:00
Jun Pataleta c726557be5 MDL-70829 mod_quiz: Mark up decorative images properly
* Decorative images should have an empty alt text and there's no need
to set a presentation role.
* Accessibility Behat tests added to cover the changes
2024-04-12 11:17:06 +08:00
Jun Pataleta 6a4307c700 MDL-70829 mod_data: Mark up decorative images properly
* Decorative images should have an empty alt text and there's no need
to set a presentation role.
* Accessibility Behat tests added to cover the changes
2024-04-12 11:17:05 +08:00
Jun Pataleta 80c7835f1b MDL-70829 course: Mark up decorative images properly
* Decorative images should have an empty alt text and there's no need
to set a presentation role.
* Accessibility Behat tests added to cover the changes:
  - block_starredcourses uses the core_course/no-courses template
  - core_completion tests changes in core_course/activity instance and
    core_course/editdefaultcompletion
2024-04-12 11:17:05 +08:00
Jun Pataleta a1c9eec784 MDL-70829 block_recentlyaccesseditems: Mark up decorative image properly
* The zero state image is purely decorative so there's no need to
set a non-empty alt text for it.
* The presentation role is also unnecessary for decorative image with
empty alt.
* Accessibility Behat tests added to cover changes
2024-04-12 11:17:05 +08:00
Jun Pataleta 1b2fb9e004 MDL-70829 block_myoverview: Mark up decorative image properly
* The zero state image is purely decorative so there's no need to
set a non-empty alt text for it.
* The presentation role is also unnecessary for decorative image with
empty alt.
* Accessibility Behat tests added to cover changes
2024-04-12 11:17:05 +08:00
Jun Pataleta b245e9e36e MDL-70829 tool_lp: Remove presentation role for decorative images
* Behat tests in report_competency added to test the user summary
display in the user competency summary modal.
2024-04-12 11:17:05 +08:00
Jun Pataleta 2c5df73e65 MDL-70829 core: Remove presentation role for decorative images
* An image with non-empty alt text should not have a presentation role.
* An empty alt attribute is sufficient for decorative images. No need to
add a presentation role for them.
* Additionally, if there is already text that is present for an image,
there's no need to add an alt text with the same text. Such images are
decorative and should just have an empty alt text.
2024-04-12 11:17:05 +08:00
Huong Nguyen 5b33d3ed96 Merge branch 'MDL-81320-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-04-12 10:12:05 +07:00
Huong Nguyen e92d302968 Merge branch 'MDL-81256-402' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2024-04-12 08:58:44 +07:00
Shamim Rezaie 49f208613a Merge branch 'MDL-81306-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-04-12 11:46:48 +10:00
Huong Nguyen 0cabf7439f Merge branch 'MDL-81316-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-04-12 08:37:26 +07:00
Huong Nguyen 2bf465589e Merge branch 'MDL-81420-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2024-04-12 08:34:28 +07:00
Ilya Tregubov 926a41ff15 Merge branch 'MDL-80160-402-siteadminsconfigphp' of https://github.com/mudrd8mz/moodle into MOODLE_402_STABLE 2024-04-12 08:47:38 +08:00
Shamim Rezaie b083d20b02 Merge branch 'MDL-81482_402' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_402_STABLE 2024-04-12 09:31:40 +10:00
Tomo Tsuyuki ef609b5559 MDL-78902 quiz restore: fix restore of 3.x backups with random questions
... where the random questions come from the quiz module context.

Co-authored-by: Tim Hunt <T.J.Hunt@open.ac.uk>
2024-04-11 22:10:16 +01:00
Sara Arjona 3ab5b63463 Merge branch 'MDL-81472-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-04-11 17:35:54 +02:00
Andrew Nicols 88290b1968 Merge branch 'MDL-81114_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2024-04-11 23:26:21 +08:00
Sara Arjona a72c3d6f6b Merge branch 'MDL-80469-402' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2024-04-11 14:52:05 +02:00
Marina Glancy 92408cf43a MDL-80469 forms: add a hidden label to the button action group
This is a temporary solution to the accessibility problem
"Fieldsets without legend". We will no longer use a fieldset tag
if there is no legend after MDL-80431
2024-04-11 12:55:54 +01:00
Pedro Jordao cf4b8bec22 MDL-80195 forms: Keep dropdown menu open when tabbing into datepicker
When accessing a datepicker that is within a dropdown menu using the tab
key, the navigation sequence was changed since the datepicker code is
not rendered within the dropdown menu element, thus the dropdown was
closed as it was understood that we were not more inside it.
Furthermore, when exiting the datepicker by pressing tab, as the
dropdown was closed, the navigation jumped to the first element on the
page, which is the link to Skip to main content.

To resolve this, a validation was added that keeps the dropdown menu
open if the datepicker is open and accessed via the tab key.
2024-04-11 11:03:51 +02:00
Mark Johnson 578d35e81f MDL-81192 sessions: Prevent false positive session change errors
If $CFG->enable_read_only_sessions_debug was not enabled, debugging could be
enabled part-way through a request when restart_with_write_lock was
called. This meant that a diff between the initial and final session
would be made during write_close(), although the intial session state
was never captured. This generated false positives in the logs, and it
thought any variable set in the session was a change from the original
value.

This ensures that debugging is enabled before the debug flag is allowed
to change, preventing false positives.
2024-04-11 08:54:20 +01:00
Ilya Tregubov 073735a431 Merge branch 'MDL-80385-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-04-11 15:43:08 +08:00
Huong Nguyen 28f26a66c7 Merge branch 'MDL-81362-402' of https://github.com/ssj365/moodle into MOODLE_402_STABLE 2024-04-11 10:59:56 +07:00
Huong Nguyen 77f610789d Merge branch 'MDL-81327-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2024-04-11 10:19:31 +07:00
Ilya Tregubov 708caba53b Merge branch 'MDL-81491-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2024-04-11 09:51:35 +08:00
Sara Arjona ba4f0a0b3f Merge branch 'MDL-74977-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-04-10 15:51:05 +02:00
Huong Nguyen 50950c8001 MDL-74977 core_courseformat: add expanded section update actions
This also fix the Random "Course content preferences" Behat failure
2024-04-10 18:12:18 +07:00
Sara Arjona f56dfeb5d2 Merge branch 'MDL-81307-fix-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2024-04-10 12:53:01 +02:00
Sara Arjona 883ebde06f MDL-81307 theme: Fix behat failures with classic and sticky footer
Authored-by: Mikel Martín Corrales <mikel@moodle.com>
2024-04-10 12:36:43 +02:00
Jake Dallimore 5c94593816 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:44:24 +08:00
Huong Nguyen 59103ae80e Merge branch 'MDL-81351-402-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_402_STABLE 2024-04-10 13:55:52 +07:00
Anupama Sarjoshi 5a13faf0cf MDL-81482 Questions: Fix questionlib_test PHPUnit tests 2024-04-09 17:33:35 +01:00
Sara Arjona 41d94f98a0 Merge branch 'MDL-81307-402' of https://github.com/roland04/moodle into MOODLE_402_STABLE 2024-04-09 16:18:36 +02:00
Mikel Martín 7f18665575 MDL-81307 core_courseformat: Add bulk styles for small devices 2024-04-09 15:54:04 +02:00
Mikel Martín 112625d571 MDL-81307 core_behat: Backport closing drawer steps
Backport 'I close block drawer if open' and 'I keep block drawer closed' behat steps
added in MDL-75762 for 4.3 onwards.
2024-04-09 15:53:58 +02:00
Sara Arjona a6f26b66e2 Merge branch 'MDL-81451-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2024-04-09 15:31:15 +02:00
Paul Holden 13d6489f7c MDL-81472 mod_scorm: add missing library require to privacy class. 2024-04-09 11:38:14 +01:00
Sara Arjona e7d21fd9c0 weekly release 4.2.6+ 2024-04-09 12:07:28 +02:00
Laurent David ac5524575b MDL-81327 report_loglive: Apply the same fixes to loglive
* Additional fix: take into account selected group (filter)
2024-04-09 11:00:33 +02:00
Andrew Nicols b7ef78c4e6 MDL-81327 report_log: Make group filtering logstore agnostic
The original implementation of group filtering introduced in MDL-80565
assumed that the log table existed in Moodle's own database. This is not
the case of the database logstore, or any similar logstore implemetning
the database \core\log\sql_reader interface.

Furthermore this check was also applying the SQL when the user had the
`accessallgroups` capability, or when the course was not in SEPARATE
groups mode (no groupmode and/or visible groups).

Co-authored: Laurent David <laurent.david@moodle.com>
2024-04-09 11:00:33 +02:00
Laurent David d740bb09e3 MDL-81327 report_log: Fix col_fullusername
* Avoid calling get_user_fullname too many times and
deal with the case that $event->userid is empty
2024-04-09 11:00:33 +02:00
Andrew Nicols 7e5b98ea3e MDL-81327 core: Remove unnecessary table filter
The \Traversable interface does not define the `valid` method.
Furthermore, the `valid` method actually checks that there is a _next_
value, which requires the value already be fetched and waiting. This is
not the case for all Iterators. For example the CallbackFilterIterator
does not load the initial value until it is requested.

It is completely unnecessary to do this check anyway as an invalid
Iterator will just not return any values.
2024-04-09 11:00:33 +02:00
Jake Dallimore eb8ff555d5 Merge branch 'MDL-81060-402-fix' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2024-04-09 10:13:54 +08:00
Luca Bösch fe4c9df572 MDL-81451 qtype_missingtype: adopt icon size to other. 2024-04-08 17:27:06 +02:00
Luca Bösch 9a1b4a4278 MDL-81451 qtype_gapfill: adopt icon size to other. 2024-04-08 17:27:06 +02:00
Sara Arjona e40e5dc513 Merge branch 'MDL-81298-MOODLE_402_STABLE' of https://github.com/vithushau/moodle into MOODLE_402_STABLE 2024-04-08 17:12:02 +02:00
Didier 'OdyX' Raboud 53e9136176 MDL-65381 grade_report: fix empty separate groups own grades access
On separate groups' courses, users without groups could not access
their own grade items.
2024-04-08 17:03:09 +02:00
Sara Arjona f67e87ec7a Merge branch 'MDL-78457-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-04-08 16:54:54 +02:00
Andrew Nicols 25e4619ae7 MDL-81209 core: Unit test should not care about plugin details 2024-04-08 20:54:25 +08:00
Huong Nguyen f7e5353863 Merge branch 'MDL-75037-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-04-08 16:07:03 +07:00
Marina Glancy 151edb5949 MDL-81256 lib: fix rounding of thumbnail image size 2024-04-08 10:02:07 +01:00
Sara Arjona c856ee60bf MDL-81420 enrol: Remove duplicated header in editing form 2024-04-08 10:49:35 +02:00
Jake Dallimore 37fc36554b Merge branch 'MDL-81405-402' of https://github.com/jleyva/moodle into MOODLE_402_STABLE 2024-04-08 15:35:33 +08:00
Ilya Tregubov 6e3e69b0cd Merge branch 'MDL-81409-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2024-04-08 12:45:40 +08:00
Huong Nguyen 32e3c9102f Merge branch 'MDL-80934-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2024-04-08 09:13:31 +07:00
Jake Dallimore 10df0d8122 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:37 +07:00
Huong Nguyen 17b57e06e0 Merge branch 'MDL-81402-MOODLE_402_STABLE' of https://github.com/sh-csg/moodle into MOODLE_402_STABLE 2024-04-08 09:03:35 +07:00
Andrew Nicols 341ec5ba81 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:46:59 +08:00
Juan Leyva 5ede213279 MDL-81405 tool_mobile: Set Partitioned cookie when required 2024-04-06 12:29:52 +02:00
Juan Leyva e62918e4fd MDL-81405 session: New core cookie helper utility class 2024-04-06 12:29:51 +02:00
Paul Holden 83197cee22 MDL-81320 datafield_checkbox: account for empty field content. 2024-04-05 15:16:45 +01:00
Sara Arjona c0038b965e weekly release 4.2.6+ 2024-04-05 13:22:37 +02:00
Stefan Hanauska e179c272e3 MDL-81402 course: Add sectionnum to cm export 2024-04-04 13:51:29 +02:00
Laurent David a8ff93575d MDL-80934 core_courseformat: Expand section when selected
* Sections in the course content must be expanded when an item
from this section is selected in the course index
2024-04-04 10:41:42 +02:00
Andrew Nicols 7611878d8d MDL-81316 core: Encode anchor fragments properly to RFC 3986 2024-04-04 16:04:37 +08:00
Ilya Tregubov 899dc30959 Merge branch 'MDL-78370-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-04-04 14:19:37 +08:00
Andrew Nicols 13efde9b95 NOBUG: mod_h5pactivity - Version bump after rewrite 2024-04-04 10:36:34 +08:00
Sara Arjona 481715aff9 Merge branch 'MDL-80765-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2024-04-03 17:19:03 +02:00
Huong Nguyen a398bbadc5 MDL-81393 atto: Disable mediaplugin filter for Behat test 2024-04-04 00:24:38 +11:00
Paul Holden 666cf9927d MDL-75037 core: update Moodlenet repository search URLs. 2024-04-03 13:00:45 +01:00
Jake Dallimore fa504af178 MDL-81409 enrol_lti: fixes to dynamic registration to support Blackboard
The following fixes resolve issues when used with Blackboard Learn:
- Set registration request Content-Type header to application/json
- Make registration_token optional, per the spec:
https://www.imsglobal.org/node/200666#step-1-registration-initiation-request
- Conditionally create the deployment since it's optional in
lti-tool-configuration:
https://www.imsglobal.org/node/200666#lti-configuration-0
- Remove empty custom_parameters property, since that's optional too:
https://www.imsglobal.org/node/200666#lti-configuration-0
- Remove overly-strict validation on registration_token. This was
validating the param as a JWT, but since the spec has stabilised, this
is not always the case. It's a Bearer token that's opaque to the tool
(i.e. it's just passed back unmodified), so while it could be validated
against RFC6750, it's simplest to just remove the validation entirely.
- change targetOrigin of the postMessage to '*' as per the spec:
https://www.imsglobal.org/node/200666#step-4-registration-completed-and-activation
2024-04-03 16:23:34 +08:00
Shamim Rezaie 366e8bd8c1 Merge branch 'MDL-81393-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-04-03 16:39:21 +11:00
Andrew Nicols 1bc2cc0bca Merge branch 'MDL-80818-402' of https://github.com/aanabit/moodle into MOODLE_402_STABLE 2024-04-03 13:06:25 +08:00
Huong Nguyen 02379cc237 Merge branch 'MDL-77779-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2024-04-03 09:12:43 +07:00
Huong Nguyen 7a1cd8700a Merge branch 'MDL-81300-402' of https://github.com/roland04/moodle into MOODLE_402_STABLE 2024-04-03 09:07:05 +07:00
Huong Nguyen c0e8e44bf6 Merge branch 'MDL-77838-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-04-03 08:52:43 +07:00
Sara Arjona 6a008f13b5 weekly release 4.2.6+ 2024-04-02 14:46:46 +02:00
Paul Holden 1cce6e50c9 MDL-78457 course: remove participants navigation if cannot access. 2024-04-02 10:03:53 +01:00
Paul Holden f2c3a62385 MDL-77015 mod_data: consistent escaping of template field names.
* When creating default templates, avoid escaping the field names
  contained within [[ ]] brackets;
* When managing field, ensure the field names are escaped.
2024-04-02 10:02:14 +01:00
Mikel Martín 7fe5a9c323 MDL-81300 theme_boost: Fix dnd overlay in course sections
Drag and drop overlay in course page was being overlapped by divider
buttons and quick edit links.
That happens because both elements have their own z-index context.
Add z-index to the drag and drop overlay elenment to fix this issue.
2024-04-02 10:44:32 +02:00
Andrew Nicols f6e27c5dfa Merge branch 'MDL-79712-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2024-04-02 11:56:54 +08:00
Jake Dallimore ea15eb265b 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:42:11 +08:00
Laurent David 0a2120ab19 MDL-80765 mod_data: Trim values on field update
* When creating a field we usually trim values, so we should
do the same on field update
2024-04-02 05:41:45 +02:00
Huong Nguyen 443efa8df3 MDL-81393 media_videojs: Switch to use Ogv.Js tech for Chrome 2024-04-02 10:27:18 +07:00
David Mudrák 187d53de0a MDL-81351 lang: Use the fixed strings in the tests, too 2024-03-28 11:25:20 +01:00
Helen Foster fce7f84cca MDL-81351 lang: Import fixed English strings (en_fix) 2024-03-28 11:19:40 +01:00
Andrew Nicols 4a35061172 MDL-81306 core: Do not use xsendfile for request dirs 2024-03-28 09:30:07 +08:00
Andrew Nicols e72422e42c MDL-81306 core: Remove docs on use of xsendfile with request dirs
This reverts the change made in MDL-80648 and adds a note to not do it.
2024-03-28 09:29:27 +08:00
Ilya Tregubov 7197b66d58 Merge branch 'mdl80598-402' of https://github.com/matthewhilton/moodle into MOODLE_402_STABLE 2024-03-28 09:06:34 +08:00
Amaia Anabitarte b459df584c MDL-80818 QuickForm: Freeze all elements with the same name
There are some radio buttons in activity Completion Conditions settings
that must be frozen altogether, because all of them have the same name.
2024-03-27 16:28:53 +01:00
Vithusha Uthayakumar b838c9142c MDL-81298 external: fix typo error in failing testcase 2024-03-27 16:41:02 +11:00
Ilya Tregubov eee7268bd7 Merge branch 'MDL-80036-402' of https://github.com/mickhawkins/moodle into MOODLE_402_STABLE 2024-03-27 11:08:30 +08:00
Shamiso.Jaravaza bf9d201af9 MDL-81362 mod_bigbluebuttonbn: Fix content type 2024-03-26 20:14:28 -06:00
Sara Arjona fa4a79d6d7 weekly release 4.2.6+ 2024-03-26 12:31:16 +01:00
Jun Pataleta adf53426bf Merge branch 'MDL-81266_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2024-03-26 10:33:50 +08:00
Matthew Hilton 41d73d71b0 MDL-80598 bigbluebutton: Gracefully handle invalid customdata 2024-03-26 10:09:06 +10:00
Sara Arjona f4ba69224f Merge branch 'MDL-81246-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-03-25 17:01:51 +01:00
Sara Arjona 64325bc560 Merge branch 'MDL-80088-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-25 16:20:36 +01:00
Andrew Nicols c10d1a30da Merge branch 'MDL-80827-402' of https://github.com/stevandoMoodle/moodle into MOODLE_402_STABLE 2024-03-25 11:44:40 +08:00
Huong Nguyen 8406fd5cc2 Merge branch 'MDL-79829-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2024-03-25 09:22:58 +07:00
Huong Nguyen ff76a52fd1 Merge branch 'MDL-81074-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-03-25 09:16:05 +07:00
Andrew Nicols 054d15a42f MDL-81074 core: Simplify strftime tests 2024-03-25 09:51:25 +08:00
Luca Bösch bd4c8e3a70 MDL-81074 core: align core_date::strftime results for numeric and string 2024-03-25 09:51:25 +08:00
Andrew Nicols d265739f7d MDL-81074 core: Add assertTimeStringMatches PHPUnit Assertion
Also raised as https://github.com/sebastianbergmann/phpunit/issues/5757
2024-03-25 09:51:25 +08:00
Eloy Lafuente (stronk7) 4fcf69eb18 MDL-81266 composer: Bump behat/behat to 3.14 and other deps
Only applied to 402_STABLE and up, all them requiring PHP 8.0
as a minimum. And generated following the instructions in the
dev docs.
2024-03-23 13:37:42 +01:00
Paul Holden f512681b3b MDL-77838 repository: preserve empty dirs in download if selected. 2024-03-22 16:23:08 +00:00
Sara Arjona 23b110b28b weekly release 4.2.6+ 2024-03-22 14:03:01 +01:00
Jun Pataleta 14f699d4d9 Merge branch 'MDL-81313-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2024-03-22 11:47:41 +08:00
Sara Arjona f6240d0346 Merge branch 'MDL-80488-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-21 17:30:55 +01:00
Sara Arjona fdf6f2b5b4 Merge branch 'MDL-79913-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-21 17:18:25 +01:00
Sara Arjona 3f5ca666b5 Merge branch 'MDL-81112-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-21 17:11:41 +01:00
Sara Arjona 7dc2cc4074 Merge branch 'MDL-69688_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2024-03-21 15:29:58 +01:00
Huong Nguyen 4f1db606cd Merge branch 'MDL-81289-402' of https://github.com/ferranrecio/moodle into MOODLE_402_STABLE 2024-03-21 15:12:31 +07:00
Huong Nguyen f7c5f34883 Merge branch 'MDL-80835-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2024-03-21 14:54:02 +07:00
Jake Dallimore 8da80a17b2 MDL-80835 auth_lti: fix bad cast breaking samesite LTI usage 2024-03-21 15:39:06 +08:00
Jake Dallimore 2dc10f656b 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:39:06 +08:00
Jake Dallimore d225ecddbf 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:39:06 +08:00
Jake Dallimore e58ca2edf4 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:39:06 +08:00
Jake Dallimore 036c4e3a9c 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:39:06 +08:00
Jake Dallimore c3597e30ae 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:39:05 +08:00
Eloy Lafuente (stronk7) 06f12a2027 MDL-69688 phpunit: Improve test_context_not_used
This adds a few changes to the old test_context_not_used test:

- Move it to become an advanced_test, because its mission
  is to verify that the assertEventContextNotUsed() assertion
  works as expected.
- For consistency, also move the fixtures to own phpunit fixtures.
- Add proper coverage tags, to verify that the assertion is being
  covered.
- Add a data provider to provide all the current cases and ease
  any future case that may be needed in the future. One by one
  because previously there was code never executed with the
  warning expectation causing the test to stop.
- Run them in isolation, while this is not strictly required, it's
  including external fixtures and, we'll need that isolation soon
  (for changes coming when moving the test to PHPUnit 9.6 in MDL-81266).
2024-03-21 08:30:01 +01:00
Jake Dallimore 4262ddd629 MDL-81313 core: Revert "Merge branch 'MDL-80338-402'
This reverts commit 714906f0b6, reversing
changes made to 9070c5dfcc.
2024-03-21 11:29:46 +08:00
Paul Holden 31ff0d1e3a MDL-80488 mod_lesson: avoid overflowing length of page titles. 2024-03-20 23:51:24 +00:00
Paul Holden 793487edcf MDL-81112 gradereport_grader: show user country value correctly. 2024-03-20 23:50:03 +00:00
Jun Pataleta 929cd807d6 Merge branch 'MDL-79007-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-03-20 15:39:38 +08:00
Mark Johnson be192b5b27 MDL-79007 calendar: Make screen readers read the new month name 2024-03-20 15:13:38 +08:00
Mark Johnson 419930f35d MDL-79007 calendar: Make screen readers read out calendar day popovers 2024-03-20 15:11:50 +08:00
Mark Johnson c7104868f3 MDL-79007 calendar: Expose block month link names to screen readers 2024-03-20 15:03:19 +08:00
Ilya Tregubov 4aea02a526 weekly release 4.2.6+ 2024-03-20 08:54:15 +08:00
Ilya Tregubov e14310ea26 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-03-20 08:54:12 +08:00
ferranrecio 6b11cd340c MDL-81289 core_courseformat: fix get_format_string params 2024-03-19 17:34:26 +01:00
Paul Holden e4621f3ba5 Merge branch 'MDL-78438-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2024-03-19 10:45:35 +00:00
Ilya Tregubov 76298ee081 MDL-78438 gradereport_grader: Fix Behat test
Seems Oracle is too slow on pressing buttons :))
2024-03-19 17:45:38 +08:00
Michael Hawkins 17da4aa635 MDL-80036 core: Update security.txt expiry 2024-03-19 15:31:19 +08:00
Huong Nguyen 7e28d5386f Merge branch 'MDL-81156-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-03-19 10:56:01 +07:00
Andrew Nicols 801b64899f Merge branch 'MDL-77255-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-03-19 11:40:03 +08:00
Huong Nguyen b4963516fe 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:52 +07:00
Ilya Tregubov 511371a6d4 Merge branch 'MDL-80240-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-19 10:28:35 +08:00
Ilya Tregubov cfdd746569 Merge branch 'MDL-80919-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-19 10:14:46 +08:00
Ilya Tregubov acc40ef803 Merge branch 'MDL-78438-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-19 09:47:34 +08:00
Ilya Tregubov 9f11b1fe13 Merge branch 'MDL-80793-402' of https://github.com/OxyOCE/moodle into MOODLE_402_STABLE 2024-03-19 09:12:59 +08:00
AMOS bot ce2d73bf6a Automatically generated installer lang files 2024-03-19 00:08:48 +00:00
Sara Arjona fe65233fd1 Merge branch 'MDL-72923-M402' of https://github.com/michael-milette/moodle into MOODLE_402_STABLE 2024-03-18 16:57:07 +01:00
Sara Arjona b6d6d75095 Merge branch 'MDL-81254-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-18 16:08:22 +01:00
Laurent David 5dd9626ff7 MDL-79829 theme: Fix Course index draggable cursor
* Make the cursor consistent for drag and drop operation
to be the same in the course content and the course index
2024-03-18 07:39:12 +01:00
Laurent David 313c6d80a0 MDL-79829 core: Reactive drag and drop cursor
* When dragging and dropping an item, the cursor should be
set to "move" and not copy.
2024-03-18 07:39:11 +01:00
Jun Pataleta 1300ddb017 Merge branch 'MDL-80279-402' of https://github.com/pedrojordao/moodle into MOODLE_402_STABLE 2024-03-18 11:22:32 +08:00
Paul Holden b34c1981b9 MDL-79913 grade: respect messaging config for user heading buttons. 2024-03-15 17:00:33 +00:00
Paul Holden 9f769b0fa1 MDL-81254 grade: ensure we always close the graded user iterator.
This ensures that the recordsets contained within are also closed
when we're done with them.
2024-03-15 16:26:36 +00:00
Huong Nguyen 87a08ab157 weekly release 4.2.6+ 2024-03-15 21:48:22 +07:00
Huong Nguyen cf7e8e194d Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-03-15 21:48:21 +07:00
Pedro Jordao bce2299e75 MDL-80279 core: Set new attributes for user profile initials
When the user does not have a profile photo and initials are displayed,
there is no alt text for the initials which causes accessibility
issues, so with this change I added the user's full name to the title
and aria-label attributes and I set a role='img' when the element span
is rendered.
2024-03-15 07:43:35 -03:00
Jake Dallimore 6fd3a9054f Merge branch 'MDL-80167-402-int' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-03-15 12:54:59 +08:00
Huong Nguyen bb057e53af MDL-81246 dml: Check the statement resource before freeing it 2024-03-15 11:19:50 +07:00
Huong Nguyen 7b9d71254b MDL-80167 core: Skip Oracle for Oracle environment in unit tests 2024-03-15 08:46:39 +07:00
Ilya Tregubov d0dc438919 Merge branch 'MDL-81190-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-15 08:42:40 +08:00
Sara Arjona a6a84d6fe8 Merge branch 'MDL-80167-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-03-14 11:55:04 +01:00
Sara Arjona 1b445aa197 Merge branch 'MDL-80479-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-03-14 11:48:04 +01:00
Huong Nguyen 315ad4b289 MDL-80167 admin: Add environment check for Oracle database 2024-03-14 17:42:45 +07:00
Simey Lameze cf5e25259d MDL-80479 behat: improve new test for quiz timer 2024-03-14 10:21:24 +08:00
Angelia Dela Cruz 2f2c6408c9 MDL-80479 mod_quiz: Behat to set quiz opening and closing time 2024-03-14 10:21:24 +08:00
Ilya Tregubov 7dbecdbacc MDL-77779 competency: Fix course restore from older backups.
overridegrade might be not set if Moodle < 4.1
2024-03-14 09:30:01 +08:00
Simey Lameze 4ffded4880 MDL-81156 behat: coverage for force course language 2024-03-14 09:04:42 +08:00
AMOS bot 0c20c4f178 Merge branch 'MOODLE_402_STABLE' into install_402_STABLE 2024-03-14 00:13:13 +00:00
Dale Davies f1dc10573f 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:44 +00:00
Sara Arjona 2f826c7407 Merge branch 'MDL-80865-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-13 12:19:06 +01:00
Ilya Tregubov 1a42f253de Merge branch 'MDL-80565-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2024-03-13 11:23:07 +08:00
AMOS bot d2295281fa Automatically generated installer lang files 2024-03-13 00:11:06 +00:00
Ilya Tregubov 0ff19ca287 weekly release 4.2.6+ 2024-03-13 08:09:53 +08:00
Tim Hunt b200b26636 MDL-81039 qtype_multichoice: better way to control feedback display 2024-03-12 12:02:21 +01:00
Tim Hunt 7f7ed47336 MDL-81039 question: Improve some comments in question_display_options 2024-03-12 12:02:11 +01:00
Huong Nguyen ae51dc65aa Merge branch 'MDL-76805-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-03-12 10:32:43 +07:00
Shamiso.Jaravaza c59fdffc2f MDL-76805 mod_bigbluebuttonbn: Fix up behat tests 2024-03-12 11:07:59 +08:00
Ilya Tregubov d1cd5d9c59 Merge branch 'MDL-81035-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-03-12 10:41:01 +08:00
Ilya Tregubov 27b9963490 Merge branch 'MDL-81127-402' of https://github.com/izendegi/moodle into MOODLE_402_STABLE 2024-03-12 10:27:35 +08:00
Ilya Tregubov b2e39b8a7f Merge branch 'MDL-81191-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-12 10:16:07 +08:00
Paul Holden b2bc5b2849 MDL-81191 course: define batch stealth feedback language string. 2024-03-11 17:28:31 +00:00
Paul Holden 3de04dae67 MDL-81190 mod_assign: correct context argument to format string. 2024-03-11 16:58:08 +00:00
Sara Arjona 2233454466 Merge branch 'MDL-79027-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-11 17:27:01 +01:00
Laurent David db79dde840 MDL-80565 report_loglive: Do not show logs from other groups
* Prevent users from seeing logs from other groups if
groupmode is in SEPARATEGROUP
2024-03-11 14:30:50 +01:00
Laurent David 63f1f94a76 MDL-80565 report_log: Prevent user from seeing other logs
* When no groups are selected we forcefully prevent
users from seeing users' logs from other groups
2024-03-11 14:30:50 +01:00
Laurent David 58d0ae35cb MDL-80565 report_log: Fix report log selector
* When using the report log and we select a group, the group
list should show the right list of users
2024-03-11 14:30:49 +01:00
Laurent David 85b832ff8a MDL-80565 report: Revert MDL-41465 changes
* Partial revert of changes made in MDL-41465,
while keeping the API changes made in enrol/lib.
2024-03-11 14:30:49 +01:00
Huong Nguyen 55473ab11d MDL-81035 core: Fix redirect with sub-path 2024-03-11 15:56:21 +07:00
Tim Hunt 7884d5b779 MDL-81114 question: fix selection of random questions with draft status
We need to pick the latest 'ready' version of each question
(not questions where the latest version is ready).
2024-03-08 19:31:43 +00:00
Iñigo Zendegi 6ed0b36d3b MDL-81127 filter: Support filters on course completion message 2024-03-08 14:09:26 +01:00
Sara Arjona 58e84e19b2 weekly release 4.2.6+ 2024-03-08 11:11:57 +01:00
Ilya Tregubov 1132a4e7ba Merge branch 'MDL-78547-402-phpunit' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-03-08 13:44:14 +08:00
Huong Nguyen e68c43c3df MDL-78547 quiz: Remove unnecessary call to clear_regrade_date_cache()
This method is designed to clear the values but these values are never set anywhere
It's safe to remove it out of the test now
2024-03-08 12:42:09 +07:00
Ilya Tregubov 3f86d722c0 Merge branch 'MDL-80550-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-08 11:06:07 +08:00
Huong Nguyen c3a943edd2 Merge branch 'MDL-78547_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2024-03-08 08:52:24 +07:00
Ilya Tregubov 8f7b882630 Merge branch 'MDL-80943-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-08 09:22:58 +08:00
Tim Hunt 91609a45cf MDL-78547 quiz: in a preview, if a question has been edited, update it
As part of implementing this, there is a new more efficient method
get_version_information_for_questions_in_attempt to see if any
questions in a quiz need to be updated. The regrade code was updated
to take advantage of this.

Co-authored-by: Khoa Nguyen Dang <khoanguyend7@nashtechglobal.com>
2024-03-07 16:14:28 +00:00
Tim Hunt 66ff5a87d0 MDL-78547 questions: a way to replace a attempt in a usage
... without keeping the old attempt

Co-authored-by: Khoa Nguyen Dang <khoanguyend7@nashtechglobal.com>
2024-03-07 16:14:28 +00:00
Sara Arjona fc6ad45ecd MDL-69656 backup: Remove illegal whitespaces 2024-03-07 12:05:37 +01:00
Paul Holden b014a4b944 MDL-80943 reportbuilder: select-type customfields should be text.
The column type determines the available aggregation options present
for the column. Custom fields of type "select" should be considered as
text fields for this purpose, because their stored value represents
the index to their available options, rather than having any distinct
meaning of it's own for display.
2024-03-07 09:48:02 +00:00
Huong Nguyen 722cb7e4f8 Merge branch 'MDL-79990-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-03-07 10:04:58 +07:00
Simey Lameze 2d7b5f4859 MDL-79990 behat: custom step to verify assign grading data
This commit also optimise the new behat test.
2024-03-07 09:44:28 +08:00
Angelia Dela Cruz 07aaf4b0a4 MDL-79990 gradingform: Behat test for marking guide information display 2024-03-07 09:44:28 +08:00
Andrew Nicols d54cef26cd Merge branch 'MDL-69656-MOODLE_402_STABLE' of https://github.com/sh-csg/moodle into MOODLE_402_STABLE 2024-03-06 23:23:49 +08:00
Michael Milette 725e64fbf5 MDL-72923 message: Fixed levels of headings in messaging drawer. 2024-03-06 07:33:08 -05:00
Stefan Hanauska e797f1e087 MDL-69656 backup: Replace urlencoded pluginfile urls 2024-03-06 07:40:28 +01:00
Andrew Nicols 9242d13483 Merge branch 'MDL-80183-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-06 14:04:58 +08:00
Huong Nguyen 3d2d1e04c0 Merge branch 'MDL-80241-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-06 09:24:08 +07:00
Huong Nguyen 5ab684e657 Merge branch 'MDL-79278-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-03-06 09:13:22 +07:00
Angelia Dela Cruz 337244bfb4 MDL-79278 mod_quiz: Teacher can set how quiz questions behave behat
Co-authored-by: Simey Lameze <simey@moodle.com>
2024-03-06 09:47:11 +08:00
David Mudrák 2948abf1e3 MDL-80160 admin: Fix site admins selector UI if the list is hardcoded
If the list of site admins was defined in the config.php, the UI to
select / modify admins never worked. But there was no indication of the
reason which was unexpected and confusing.
2024-03-05 23:45:16 +01:00
Sara Arjona c2b6290ed1 Merge branch 'MDL-80930-402' of https://github.com/raortegar/moodle into MOODLE_402_STABLE 2024-03-05 15:25:04 +01:00
Andrew Nicols 15a77e7519 Merge branch 'MDL-80731-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-03-05 22:06:47 +08:00
Sara Arjona 5ef6dccc02 weekly release 4.2.6+ 2024-03-05 11:22:24 +01:00
Jun Pataleta 94e7bfbd81 Merge branch 'MDL-80819_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2024-03-05 11:49:51 +08:00
Huong Nguyen 534e33bf0f Merge branch 'MDL-80836-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2024-03-05 10:24:26 +07:00
Paul Holden 127fb43d1f MDL-80240 gradereport_grader: fix userfields parameter to search sql. 2024-03-04 14:43:43 +00:00
Paul Holden 82644cb997 MDL-79027 block_myoverview: retrieve only course related custom fields. 2024-03-04 10:38:50 +00:00
raortegar c516fe9aac MDL-80930 core: Course delete modules task handle non deletable cms 2024-03-01 13:14:54 +01:00
Jun Pataleta 7e1ddefbd8 weekly release 4.2.6+ 2024-03-01 12:24:32 +08:00
Jun Pataleta 46ae3ce27a Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-03-01 12:24:30 +08:00
Huong Nguyen 147605bd6b Merge branch 'MDL-80364-402' of https://github.com/pedrojordao/moodle into MOODLE_402_STABLE 2024-02-29 10:45:27 +07:00
Simey Lameze 82fa5ad309 MDL-68674 behat: make content bank steps more specific 2024-02-29 09:42:46 +07:00
Andrew Nicols b543b65a20 Merge branch 'MDL-81042-42' of https://github.com/micaherne/moodle into MOODLE_402_STABLE 2024-02-29 09:22:30 +08:00
Sara Arjona 5118d7a0d4 Merge branch 'MDL-81029-402' of https://github.com/aanabit/moodle into MOODLE_402_STABLE 2024-02-28 17:22:09 +01:00
Sara Arjona 5b28ac18a6 Merge branch 'mdl-80917-402' of https://github.com/Fragonite/moodle into MOODLE_402_STABLE 2024-02-28 16:44:24 +01:00
Sara Arjona 680ebc8d36 Merge branch 'MDL-80834_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2024-02-28 16:34:45 +01:00
Sara Arjona 109b3ddee7 Merge branch 'MDL-80197-402' of https://github.com/pedrojordao/moodle into MOODLE_402_STABLE 2024-02-28 16:09:55 +01:00
Jun Pataleta 8e7b8281c0 Merge branch 'MDL-68674-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2024-02-28 23:03:51 +08:00
Sara Arjona 3d3fff3787 Merge branch 'MDL-52891-MOODLE_402_STABLE' of https://github.com/opitz/moodle into MOODLE_402_STABLE 2024-02-28 15:23:29 +01:00
Andrew Nicols cf46667e43 MDL-80684 core: Correct location of task tests 2024-02-28 14:21:24 +08:00
Andrew Nicols cd4e7f3fe6 Merge branch 'MDL-80684-MOODLE_402_STABLE-fail_running_tasks_on_shutdown' of https://github.com/praxisdigital/moodle into MOODLE_402_STABLE 2024-02-28 14:21:13 +08:00
AMOS bot e881931be0 Automatically generated installer lang files 2024-02-28 00:11:04 +00:00
Harry Smith 0881357dc4 MDL-80793 calendar: Setup $USER with all fields 2024-02-28 10:38:46 +13:00
Pedro Jordao da41805b5e MDL-80364 message: Change icon and background-color when item selected
Icon and background-color had contrast issues in the selected state.
2024-02-27 15:38:28 +01:00
Sara Arjona c6f6e1a496 Merge branch 'MDL-81036-402' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2024-02-27 13:04:14 +01:00
Matthias Opitz bf93a4c590 MDL-52891 calculatedsimple question: forcing new gen. values into form
* forcing new generated sets of wildcard values into the question edit form so they can be saved.
* added Behat test to check new generated values are used.
2024-02-27 11:16:12 +00:00
Stevani Andolo b60d42e92a MDL-80827 tool_xmldb: Fixed xmldb editor broken with PHP 8.1 2024-02-27 12:21:35 +08:00
Huong Nguyen d53011ed8c Merge branch 'MDL-78984-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-27 09:54:00 +07:00
Michael Aherne 7c0e7bd762 MDL-81042 quiz: Typo in renamed class. 2024-02-26 09:07:26 +00:00
Paul Holden 93102af0dd MDL-80550 cohort: get IDs for customfields correctly in external search. 2024-02-23 15:27:43 +00:00
Amaia Anabitarte d1e414d3bb MDL-81029 core_course: Fix activity settings page title 2024-02-23 16:04:54 +01:00
Marina Glancy 563081cc8f MDL-81036 behat: fix the action menu clickable area selector 2024-02-23 11:23:08 +00:00
Paul Holden d3cbf29cc6 MDL-78984 mod_assign: observe timelimit config in override form. 2024-02-23 11:18:48 +00:00
Eloy Lafuente (stronk7) 51f170fc64 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:28 +01:00
Luca Bösch 0e3205a159 MDL-68674 theme: Have block headers have h3 class="h5". 2024-02-23 10:59:55 +01:00
Jun Pataleta c8d990de64 Merge branch 'MDL-77965-m402' of https://github.com/NeillM/moodle into MOODLE_402_STABLE 2024-02-23 17:59:38 +08:00
Paul Holden 05a7705fb2 MDL-78438 gradereport_grader: use lang string for collapsed columns. 2024-02-23 09:39:17 +00:00
Neill Magill af1e548adc MDL-77965 unit tests: Add covers annotation 2024-02-23 09:33:23 +00:00
Neill Magill ce125ae0e6 MDL-77965 quiz: Improve efficiency of the data export
Before this change the query used an index scan to perform the
export, this could be really expensive on the database.

After the change the the query will use far more efficient joins,
on a large MySQL instance this can take minutes off of the query
time.

In additon the query was returning two columns that are not used
in the function. The layout column was causing the UNION to fail
on Oracle as it cannot compare text columns, removing these
columns from the returned data should further increase
performance further.
2024-02-23 09:33:23 +00:00
Neill Magill 8f995f9adc MDL-77965 grade: Improve data export performance
The existing query was inefficient using an index scan and
index merges. This change splits the query up into many individually
much more efficient queries.

This should significantly improve performance on large sites.
2024-02-23 09:33:23 +00:00
Neill Magill 7a6e47070d MDL-77965 notes: Improve data export performance
The UNION caused the query to be run in a way that is very
inefficient on MySQL, separating the queries causes each of them to
run in a much more efficient form.

Any duplicated will be filtered out on the PHP side instead of in
the database. On large Moodle sites this is preferable as the
extract is likely to be performed on a server dedicated to running
the Moodle cron and so there will be less of effect on resources
that are used to serve end users.
2024-02-23 09:33:23 +00:00
Neill Magill fed4c20d68 MDL-77965 calendar: Improve performance of data extract
The UNION caused the query to be run in a way that is very
inefficient on MySQL, separating the queries causes each of them to
run in a much more efficient form.

Any duplicated will be filtered out on the PHP side instead of in
the database. On large Moodle sites this is preferable as the
extract is likely to be performed on a server dedicated to running
the Moodle cron and so there will be less of effect on resources
that are used to serve end users.
2024-02-23 09:33:23 +00:00
Neill Magill 6de5117a81 MDL-77965 competency: Improve query performance and data
This change removes LEFT JOINS to improve the performance
when run against Moodle sites with very large data sets.

It will also cause some additional contexts to be returned:

1. When a user has modified a user_evidence_competency
   without modifying its associated user_evidence record
2024-02-23 09:33:23 +00:00
Neill Magill 2d0c5c46b4 MDL-77965 competency: Correct order of expectations
The expected value was being passed second which meant that the
messages sent by PHPUnit when this fails are the wrong way round.
2024-02-23 09:33:23 +00:00
Jun Pataleta 8c81fa2cd3 Merge branch 'MDL-80805-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2024-02-23 17:31:49 +08:00
Huong Nguyen 5fff172a6e weekly release 4.2.6+ 2024-02-23 08:37:50 +07:00
Huong Nguyen 294db8a3cb Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-02-23 08:37:48 +07:00
Paul Holden be46d2ee2a MDL-80183 message: improve ARIA labelling of total/unread counts. 2024-02-22 17:03:58 +00:00
Paul Holden 18acd24914 MDL-80183 message: render user online status as an accessible icon. 2024-02-22 17:01:07 +00:00
Paul Holden 3b08277ed4 MDL-80731 core: ensure valid /Lang attribute in generated PDF files.
As with the changes in 4be39296, PDF files have criteria for validity
of language identifiers.
2024-02-22 16:53:09 +00:00
Huong Nguyen b9c2b4317f Merge branch 'MDL-80844_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2024-02-22 11:24:12 +07:00
Huong Nguyen 714906f0b6 Merge branch 'MDL-80338-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-22 11:18:18 +07:00
Huong Nguyen 9070c5dfcc Merge branch 'MDL-62404_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2024-02-22 10:50:09 +07:00
Huong Nguyen 567e171318 Merge branch 'MDL-80868-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-22 10:43:31 +07:00
Huong Nguyen fec7eb792a Merge branch 'MDL-80950-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2024-02-22 10:40:43 +07:00
Huong Nguyen e0c3a64ecd Merge branch 'MDL-80862-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-02-22 10:38:02 +07:00
Huong Nguyen b488c2459b Merge branch 'MDL-80481_402' of https://github.com/santoshndev/moodle into MOODLE_402_STABLE 2024-02-22 09:51:11 +07:00
Santosh Nagargoje dc5f698fa4 MDL-80481 report: Fixed breadcrumb menu issue 2024-02-22 01:59:49 +05:30
Sara Arjona 0fc876444a Merge branch 'MDL-76441_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2024-02-21 17:50:02 +01:00
Sara Arjona 793e2d7e05 Merge branch 'wip_MDL-79802_m42_v8' of https://github.com/gjb2048/moodle into MOODLE_402_STABLE 2024-02-21 17:32:18 +01:00
Mark Johnson b47dcbb0cd MDL-79174 availability: Allow group condition to use hidden groups
Previously, groups with GROUP_VISIBILITY_NONE could be selected for an
availability condition, but as the group API did not return a user's own
groups with this visibility, the condition's is_available check always
failed.

This change uses the new $includehidden parameter to get all of a user's
groups from groups_get_user_groups when evaluating the condition, so
these groups work as expected. Due to the enforced hiding of conditions
containing these groups, they will never be seen by the user.
2024-02-21 15:45:39 +00:00
Mark Johnson 2d51b3dd97 MDL-79174 groups: Add includehidden parameter
This allows groups_get_user_groups to return groups with
GROUP_VISIBILITY_NONE that the specified user belongs to. The parameter
is false by default, and should be use with care as membership of these
groups should not be revealed to the user.
2024-02-21 15:45:39 +00:00
Sara Arjona 8fbbb3f4e2 Merge branch 'MDL-80605-402' of https://github.com/jbs1/moodle into MOODLE_402_STABLE 2024-02-21 16:19:23 +01:00
Sara Arjona e41340c435 Merge branch 'MDL-80404-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-02-21 13:23:36 +01:00
Paul Holden d389c06894 MDL-80241 grade: update user filtering by matched properties.
Invert the previous logic, which maintained a "banned" list of
fields, to instead only try to filter on those fields that are
explicitly defined to support that.
2024-02-21 10:21:38 +00:00
Sara Arjona 2a439d0fae Merge branch 'MDL-78944-42' of https://github.com/Chocolate-lightning/moodle into MOODLE_402_STABLE 2024-02-21 09:19:06 +01:00
Angelia Dela Cruz cb8c663829 MDL-80404 mod_data: Behat for url autolinking and opening in new window 2024-02-21 16:02:32 +08:00
Huong Nguyen e52dae90cc Merge branch 'MDL-79792-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-02-21 14:25:44 +07:00
Angelia Dela Cruz 387a3fdae0 MDL-79792 core_badges: Behat test for awarding badge to group members 2024-02-21 14:05:29 +08:00
Jun Pataleta 22eb4c9fe1 Merge branch 'MDL-79003-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-02-21 10:35:53 +08:00
Jun Pataleta b13eae06db MDL-78370 block_myoverview: Conditionally show "All" paging option
To minimise performance issues when displaying courses in Summary view,
we need to conditionally show the "All" paging option. This commit
will prevent the "All" paging option to be shown if the following
conditions are met:
- The display mode is "summary"; and
- There are more than 100 courses to be shown.
2024-02-21 09:50:02 +08:00
Juan Leyva ce9d8dcd88 MDL-79802 tool_mobile: Support new setting in the mobile app 2024-02-20 18:06:20 +00:00
Gareth Barnard a1326ff471 MDL-79802 core_h5p: Add a new setting for adding custom H5P styles. 2024-02-20 18:06:04 +00:00
Paul Holden 6df2a49db1 MDL-80919 course: initial check for section modules to duplicate. 2024-02-20 16:22:41 +00:00
Sara Arjona bb2ad26f15 Merge branch 'MDL-80912-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-20 15:39:29 +01:00
Paul Holden f5db45abdf MDL-80088 mod_imscp: better uploaded package filetype validation. 2024-02-20 14:10:12 +00:00
Huong Nguyen c22b8986ba MDL-76024 qtype calculated: Fix deprecation related to dynamic property 2024-02-20 12:29:48 +01:00
Paul Holden e8fa6d43a2 MDL-80865 customfield_textarea: empty check prior to exporting value.
Co-authored-by: Sara Bozzini <s.bozzini@cineca.it>
2024-02-20 10:55:01 +00:00
Huong Nguyen d6fc90e1d8 Merge branch 'MDL-80936-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-20 10:28:49 +07:00
Huong Nguyen f97fe5840e Merge branch 'MDL-76024-MOODLE_402_STABLE' of https://github.com/opitz/moodle into MOODLE_402_STABLE 2024-02-20 10:23:51 +07:00
Andrew Nicols 70b7730827 MDL-80862 testing: Reset task manager between behat tests 2024-02-20 10:54:55 +08:00
AMOS bot 751f1f36b2 Automatically generated installer lang files 2024-02-20 00:13:52 +00:00
Pedro Jordao 75a5a43750 MDL-80197 forms: Added attributes to the calendar link
The datepicker is not keyboard accessible when in a modal.

As we are using yui datepicker and the change is not simple, I added aria-hidden and tabindex properties to avoid screenreaders.
2024-02-19 21:12:26 -03:00
Jeremy Schulz fbbb39ca62 MDL-80605 uploaduser: fixed username already existing when mail-matching 2024-02-19 17:25:13 +01:00
Paul Holden 8f7376df56 MDL-80912 reportbuilder: output table caption when rendering reports.
Move the `get_name` method to the base report class, so that it can be
implemented by all report types. Provide a default implementation for
system reports based on the name of the class.

Use the name of the report as the caption. Target via Behat selectors.
2024-02-19 11:57:57 +00:00
Frederik Milling Pytlick cc96965b3b MDL-80684 core: Fail running tasks on shutdown
When you kill a process which is executing a task, it now marks it as failed.
2024-02-19 12:03:51 +01:00
Sara Arjona 91b453eb1d Merge branch 'MDL-79674-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-02-19 10:20:53 +01:00
Sara Arjona c1e7ef97bc Merge branch 'MDL-80613-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-02-19 09:14:32 +01:00
Matthias Opitz acaf6c5e6e MDL-76024 calculated questions: improving coding style 2024-02-16 10:23:15 +00:00
Matthias Opitz 17193ae01b MDL-76024 calculated questions: cast float type before comparison
* added calculated question for multiplication to tests/helper.php.
* added test_grading_of_negative_responses() test to question/type/calculated/tests/question_test.php
2024-02-16 10:23:15 +00:00
Eloy Lafuente (stronk7) 207bac77ab 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-15 18:46:37 +01:00
Eloy Lafuente (stronk7) f0bbfa22a2 MDL-76441 env: Moodle 4.2.x and 4.3.x do not support PHP 8.3 2024-02-15 18:45:02 +01:00
Sara Arjona e5ead3c03a MDL-80950 external: Fix PHP deprecated error for explode()
This patch fixes the following error:
PHP Deprecated:  explode(): Passing null to parameter #2 ($string)
of type string is deprecated in lib/upgradelib.php on line 1299
2024-02-15 17:52:46 +01:00
sam marshall 208298d00d MDL-80805 core_form: Accessibility - add aria-required to form fields
Most types of form field will now include aria-required="true" if the
field is marked as required. This causes assistive technology to inform
users that the field is required.

Before this change, in some cases (e.g. screen reader users tabbing
through fields) users were not informed that a field is required.
2024-02-15 15:06:09 +00:00
Sara Arjona 0f8e328e75 weekly release 4.2.6+ 2024-02-15 15:39:49 +01:00
Sara Arjona 66c760f644 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-02-15 15:39:44 +01:00
lihidor 9cf5d56172 MDL-62404 mod_quiz: Delete previews after repaginate 2024-02-15 11:00:13 +00:00
Huong Nguyen 15c708addc Merge branch 'MDL-80823-wwwroot-redirect-MOODLE_402_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_402_STABLE 2024-02-15 11:14:20 +07:00
Simey Lameze 080a06ebb7 MDL-80613 behat: convert manual completion steps to use generators 2024-02-15 11:01:23 +08:00
Mathew May 8a51a07d11 MDL-78944 gradereport_grader: Spurious behat fix 2024-02-15 11:00:07 +08:00
Jake Dallimore f623bf2770 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:38:48 +08:00
Alexander Van der Bellen a7311b0c05 MDL-80917 core_backup: Clear restored course cache 2024-02-15 09:08:38 +08:00
Paul Holden 15b96af24d MDL-80936 reportbuilder: fix when default customfield values are shown.
We should ensure we only show a value for the custom field (default or
otherwise) when it's actually joined to an entity it represents.
2024-02-14 12:30:58 +00:00
Sara Arjona 3ff231c1d4 Merge branch 'MDL-79321-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-02-14 09:35:32 +01:00
Angelia Dela Cruz 7b243f53cc MDL-79321 mod_quiz: Behat to set quiz as interactive with multiple tries 2024-02-13 16:56:56 +08:00
Jun Pataleta 6d474f0170 Merge branch 'MDL-80402-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-02-13 15:52:01 +08:00
Jun Pataleta ddcae16efb Merge branch 'MDL-80766-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-13 15:33:59 +08:00
Angelia Dela Cruz 69cf7cf56a MDL-80402 mod_quiz: Behat for interactive quiz question dependency 2024-02-13 15:19:43 +08:00
Huong Nguyen 363150d771 Merge branch 'MDL-80869-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-13 09:14:56 +07:00
AMOS bot a1d797b2d8 Automatically generated installer lang files 2024-02-13 00:10:24 +00:00
AMOS bot 116322c4c6 Automatically generated installer lang files 2024-02-12 00:11:17 +00:00
Jake Dallimore 6acc0648d8 Moodle release 4.2.6 2024-02-09 10:33:33 +08:00
Paul Holden 81cac56362 MDL-80868 question: correct deleted format plugin definitions. 2024-02-08 16:15:33 +00:00
Sara Arjona f6533c6b7d weekly release 4.2.5+ 2024-02-08 16:18:18 +01:00
Sara Arjona 0d616e922c NOBUG: Fixed SVG browser compatibility 2024-02-08 16:18:15 +01:00
Paul Holden 7bfd7fe95f MDL-80869 mod_bigbluebuttonbn: ensure test retrieves expected record. 2024-02-08 13:22:33 +00:00
Sara Arjona add0bcf30f Merge branch 'MDL-80544-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 11:27:16 +01:00
Paul Holden 955fc14841 MDL-80544 h5p: add v126 library to list of standard plugins. 2024-02-08 10:15:57 +00:00
Andrew Nicols 59e71de878 Merge branch 'MDL-75081-402-fix' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-02-08 16:13:04 +08:00
Huong Nguyen 4421459ceb Merge branch 'MDL-80809-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:13:04 +08:00
Andrew Nicols 404a6b418c Merge branch 'MDL-80768-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:13:04 +08:00
Jun Pataleta 24d053f783 MDL-75081 gradereport_grader: Ensure correct search results are shown 2024-02-08 16:13:03 +08:00
Ilya Tregubov 4e3c61ba0e MDL-80504 forum: Fix seperate group mode 2024-02-08 16:13:03 +08:00
Leon Stringer bd305ed770 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 16:13:03 +08:00
Andrew Nicols 9d57938602 Merge branch 'MDL-80738-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:13:03 +08:00
Huong Nguyen f9eb47625c MDL-80544 h5plib: Use the correct plugin version 2024-02-08 16:13:03 +08:00
Huong Nguyen b43e19ba93 Merge branch 'MDL-80544-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2024-02-08 16:13:02 +08:00
Daniel Ziegenberg feefa25d3c MDL-80648 files: extend xsendfilealiases
Add missing entry for custom $CFG->localrequestdir locations in the
preconfigured array for $CFG->xsendfilealiases in config-dist.php.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-02-08 16:13:02 +08:00
Andrew Nicols f62c8d5383 Merge branch 'MDL-80803-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:13:02 +08:00
Andrew Nicols 5e9fdc8f6b Merge branch 'MDL-36733-MOODLE_402_STABLE' of https://github.com/PascalHamar/moodle into MOODLE_402_STABLE 2024-02-08 16:13:01 +08:00
Andrew Nicols d036e5e3fd Merge branch 'MDL-80667-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:13:01 +08:00
Ilya Tregubov 030204dc4f Merge branch 'MDL-78173-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:13:01 +08:00
Sara Arjona da1fb2b149 Merge branch 'mdl-78095-402' of https://github.com/james-cnz/moodle into MOODLE_402_STABLE 2024-02-08 16:13:01 +08:00
Sara Arjona e4b3c5056b Merge branch 'MDL-74500-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:13:00 +08:00
Sara Arjona c71455259b Merge branch 'MDL-80808_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2024-02-08 16:13:00 +08:00
Sara Arjona 581ff0fe7c Merge branch 'MDL-79514-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:11:36 +08:00
Sara Arjona 85a545b3a6 Merge branch 'MDL-79577-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:11:36 +08:00
Jun Pataleta 3807a2d2d4 Merge branch 'MDL-80784-402' of https://github.com/noeldemartin/moodle into MOODLE_402_STABLE 2024-02-08 16:11:35 +08:00
Ilya Tregubov 26ed8fda6c MDL-69774 mod_forum: Restrict URL to accpet only expected params 2024-02-08 16:11:35 +08:00
Huong Nguyen 13fd81f316 Merge branch 'MDL-78417-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:11:35 +08:00
Huong Nguyen 32473f46a3 Merge branch 'MDL-80512-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-08 16:11:35 +08:00
Brendan Heywood 67cbdbcf0b MDL-80823 core: Redirect to wwwroot with full path 2024-02-08 12:08:14 +11:00
Paul Holden dbfddeb48a MDL-74500 profilefield_checkbox: override show/empty class methods. 2024-02-07 14:13:54 +00:00
Paul Holden da92cd6e76 MDL-80338 core: encode moodle_url instance anchor properties. 2024-02-07 12:21:38 +00:00
Ilya Tregubov 65123d48bc Merge branch 'MDL-80124-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-07 13:16:43 +08:00
Ilya Tregubov 71836d9dfd Merge branch 'MDL-80324-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-07 13:12:46 +08:00
Jun Pataleta eb617a25a8 Merge branch 'MDL-70058-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-07 12:31:25 +08:00
Jun Pataleta 416a1434e9 Merge branch '402_check_cached_empty_modnames' of https://github.com/opitz/moodle into MOODLE_402_STABLE 2024-02-07 11:17:44 +08:00
Jun Pataleta ed69ba56f0 Merge branch 'MDL-75081-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-07 10:37:12 +08:00
Ilya Tregubov ac77568bc3 Merge branch 'MDL-79433-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-07 10:13:18 +08:00
meirzamoodle be3404290c MDL-74641 repository: Fix wrong increment of temporary file for small sizes 2024-02-07 02:33:17 +01:00
meirzamoodle 9072dd8fdd 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-07 02:33:17 +01:00
meirzamoodle 9d97e933e8 MDL-78300 block: Determine if users can comment based on context 2024-02-07 02:33:17 +01:00
Paul Holden f3790e330a MDL-54749 tool_langimport: require sesskey to update lang packs. 2024-02-07 02:33:17 +01:00
Ilya Tregubov 8acb4b5218 Merge branch 'MDL-79527_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2024-02-07 09:28:47 +08:00
Ilya Tregubov a3d4a43b29 Merge branch 'MDL-78621-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-07 08:57:25 +08:00
Jun Pataleta 9775201ff9 Merge branch 'MDL-80693-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2024-02-07 08:32:48 +08:00
Paul Holden 83ae3639eb MDL-75081 grade: fix rogue gradebook scenarios containing invalid steps. 2024-02-06 17:15:13 +00:00
Paul Holden 06f50b1f9b MDL-75081 behat: define new heading named selector.
Co-authored-by: Jun Pataleta <jun@moodle.com>
2024-02-06 17:06:53 +00:00
Paul Holden edcfa562f0 MDL-75081 behat: correct tests of table contents asserting one column.
Prior to this change, assertions of "should exist" and "should not
exist" in table content, where the step provided only a single column,
could give false positives and pass (when they shouldn't).
2024-02-06 16:41:38 +00:00
Paul Holden 131e3c2619 Merge branch 'MDL-80735-402' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2024-02-06 15:26:49 +00:00
Marina Glancy c894510194 MDL-80735 reportbuilder: do not render filters form during download
this removes unnecessary calculations and also prevents the session mutation
2024-02-06 14:52:54 +00:00
Sara Arjona c0619f6058 Merge branch 'MDL-80816_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2024-02-06 15:51:51 +01:00
Tim Hunt 2fb1311389 MDL-80834 quiz editing: fix position of the 'depends on previous' icon 2024-02-06 11:31:57 +00:00
Jun Pataleta 9eedc76274 Merge branch 'MDL-80725-402-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_402_STABLE 2024-02-06 15:58:50 +08:00
Sara Arjona 114b81bb01 MDL-80544 core_h5p: Remove the h5plib_v124 plugin
The h5plib_v124 plugin can be removed because it has been replaced
with h5plib_v126, which is using the latest versions of the
libraries.
2024-02-06 08:13:18 +01:00
Sara Arjona d1aed3f685 MDL-80544 core_h5p: Add core lib changes after upgrading it 2024-02-06 08:12:08 +01:00
Sara Arjona 47a8c8c232 MDL-80544 core_h5p: Upgrade core lib to 1.26
This commit is upgrading the joubel/core library to the one
tagged as 1.26 (which also increases the coreApi minorVersion).
That's why the previous commit was duplicating the existing
h5plib_v124.
This tag is also pointing to the same tag that the mod_hvp is using
too: https://github.com/h5p/moodle-mod_hvp/releases/tag/1.26.1
2024-02-06 08:12:08 +01:00
Sara Arjona 4679b8797c MDL-80544 h5plib: Create first version of h5plib_v126
AMOS BEGIN
 CPY [editor:a11ytitleshowlabel,h5plib_v124],[editor:a11ytitleshowlabel,h5plib_v126]
 CPY [editor:a11ytitlehidelabel,h5plib_v124],[editor:a11ytitlehidelabel,h5plib_v126]
 CPY [editor:atoz,h5plib_v124],[editor:atoz,h5plib_v126]
 CPY [editor:add,h5plib_v124],[editor:add,h5plib_v126]
 CPY [editor:addauthor,h5plib_v124],[editor:addauthor,h5plib_v126]
 CPY [editor:addentity,h5plib_v124],[editor:addentity,h5plib_v126]
 CPY [editor:addfile,h5plib_v124],[editor:addfile,h5plib_v126]
 CPY [editor:addnewchange,h5plib_v124],[editor:addnewchange,h5plib_v126]
 CPY [editor:addtitle,h5plib_v124],[editor:addtitle,h5plib_v126]
 CPY [editor:addvideodescription,h5plib_v124],[editor:addvideodescription,h5plib_v126]
 CPY [editor:avtablistlabel,h5plib_v124],[editor:avtablistlabel,h5plib_v126]
 CPY [editor:belowmin,h5plib_v124],[editor:belowmin,h5plib_v126]
 CPY [editor:cancel,h5plib_v124],[editor:cancel,h5plib_v126]
 CPY [editor:cancellabel,h5plib_v124],[editor:cancellabel,h5plib_v126]
 CPY [editor:changefile,h5plib_v124],[editor:changefile,h5plib_v126]
 CPY [editor:changelanguage,h5plib_v124],[editor:changelanguage,h5plib_v126]
 CPY [editor:changelibrary,h5plib_v124],[editor:changelibrary,h5plib_v126]
 CPY [editor:changelogdescription,h5plib_v124],[editor:changelogdescription,h5plib_v126]
 CPY [editor:close,h5plib_v124],[editor:close,h5plib_v126]
 CPY [editor:commonfields,h5plib_v124],[editor:commonfields,h5plib_v126]
 CPY [editor:commonfieldsdescription,h5plib_v124],[editor:commonfieldsdescription,h5plib_v126]
 CPY [editor:confirmchangelibrary,h5plib_v124],[editor:confirmchangelibrary,h5plib_v126]
 CPY [editor:confirmdeletechangelog,h5plib_v124],[editor:confirmdeletechangelog,h5plib_v126]
 CPY [editor:confirmimageremoval,h5plib_v124],[editor:confirmimageremoval,h5plib_v126]
 CPY [editor:confirmpastebuttontext,h5plib_v124],[editor:confirmpastebuttontext,h5plib_v126]
 CPY [editor:confirmpastecontent,h5plib_v124],[editor:confirmpastecontent,h5plib_v126]
 CPY [editor:confirmremoval,h5plib_v124],[editor:confirmremoval,h5plib_v126]
 CPY [editor:confirmremoveauthor,h5plib_v124],[editor:confirmremoveauthor,h5plib_v126]
 CPY [editor:contenttypebackbuttonlabel,h5plib_v124],[editor:contenttypebackbuttonlabel,h5plib_v126]
 CPY [editor:contenttypecacheoutdated,h5plib_v124],[editor:contenttypecacheoutdated,h5plib_v126]
 CPY [editor:contenttypecacheoutdateddesc,h5plib_v124],[editor:contenttypecacheoutdateddesc,h5plib_v126]
 CPY [editor:contenttypedemobuttonlabel,h5plib_v124],[editor:contenttypedemobuttonlabel,h5plib_v126]
 CPY [editor:contenttypedetailbuttonlabel,h5plib_v124],[editor:contenttypedetailbuttonlabel,h5plib_v126]
 CPY [editor:contenttypegetbuttonlabel,h5plib_v124],[editor:contenttypegetbuttonlabel,h5plib_v126]
 CPY [editor:contenttypeiconalttext,h5plib_v124],[editor:contenttypeiconalttext,h5plib_v126]
 CPY [editor:contenttypeinstallbuttonlabel,h5plib_v124],[editor:contenttypeinstallbuttonlabel,h5plib_v126]
 CPY [editor:contenttypeinstallerror,h5plib_v124],[editor:contenttypeinstallerror,h5plib_v126]
 CPY [editor:contenttypeinstallsuccess,h5plib_v124],[editor:contenttypeinstallsuccess,h5plib_v126]
 CPY [editor:contenttypeinstallingbuttonlabel,h5plib_v124],[editor:contenttypeinstallingbuttonlabel,h5plib_v126]
 CPY [editor:contenttypelicensepaneltitle,h5plib_v124],[editor:contenttypelicensepaneltitle,h5plib_v126]
 CPY [editor:contenttypenotinstalled,h5plib_v124],[editor:contenttypenotinstalled,h5plib_v126]
 CPY [editor:contenttypenotinstalleddesc,h5plib_v124],[editor:contenttypenotinstalleddesc,h5plib_v126]
 CPY [editor:contenttypeowner,h5plib_v124],[editor:contenttypeowner,h5plib_v126]
 CPY [editor:contenttyperestricted,h5plib_v124],[editor:contenttyperestricted,h5plib_v126]
 CPY [editor:contenttyperestricteddesc,h5plib_v124],[editor:contenttyperestricteddesc,h5plib_v126]
 CPY [editor:contenttypesearchfieldplaceholder,h5plib_v124],[editor:contenttypesearchfieldplaceholder,h5plib_v126]
 CPY [editor:contenttypesectionall,h5plib_v124],[editor:contenttypesectionall,h5plib_v126]
 CPY [editor:contenttypeunsupportedapiversioncontent,h5plib_v124],[editor:contenttypeunsupportedapiversioncontent,h5plib_v126]
 CPY [editor:contenttypeunsupportedapiversiontitle,h5plib_v124],[editor:contenttypeunsupportedapiversiontitle,h5plib_v126]
 CPY [editor:contenttypeupdateavailable,h5plib_v124],[editor:contenttypeupdateavailable,h5plib_v126]
 CPY [editor:contenttypeupdatebuttonlabel,h5plib_v124],[editor:contenttypeupdatebuttonlabel,h5plib_v126]
 CPY [editor:contenttypeupdatesuccess,h5plib_v124],[editor:contenttypeupdatesuccess,h5plib_v126]
 CPY [editor:contenttypeupdatingbuttonlabel,h5plib_v124],[editor:contenttypeupdatingbuttonlabel,h5plib_v126]
 CPY [editor:contenttypeusebuttonlabel,h5plib_v124],[editor:contenttypeusebuttonlabel,h5plib_v126]
 CPY [editor:contributetranslations,h5plib_v124],[editor:contributetranslations,h5plib_v126]
 CPY [editor:copiedbutton,h5plib_v124],[editor:copiedbutton,h5plib_v126]
 CPY [editor:copiedtoclipboard,h5plib_v124],[editor:copiedtoclipboard,h5plib_v126]
 CPY [editor:copybutton,h5plib_v124],[editor:copybutton,h5plib_v126]
 CPY [editor:copytoclipboard,h5plib_v124],[editor:copytoclipboard,h5plib_v126]
 CPY [editor:createcontenttablabel,h5plib_v124],[editor:createcontenttablabel,h5plib_v126]
 CPY [editor:currentmenuselected,h5plib_v124],[editor:currentmenuselected,h5plib_v126]
 CPY [editor:editcopyright,h5plib_v124],[editor:editcopyright,h5plib_v126]
 CPY [editor:editimage,h5plib_v124],[editor:editimage,h5plib_v126]
 CPY [editor:editmode,h5plib_v124],[editor:editmode,h5plib_v126]
 CPY [editor:enteraudiotitle,h5plib_v124],[editor:enteraudiotitle,h5plib_v126]
 CPY [editor:enteraudiourl,h5plib_v124],[editor:enteraudiourl,h5plib_v126]
 CPY [editor:enterfullscreenbuttonlabel,h5plib_v124],[editor:enterfullscreenbuttonlabel,h5plib_v126]
 CPY [editor:entervideotitle,h5plib_v124],[editor:entervideotitle,h5plib_v126]
 CPY [editor:entervideourl,h5plib_v124],[editor:entervideourl,h5plib_v126]
 CPY [editor:errorcalculatingmaxscore,h5plib_v124],[editor:errorcalculatingmaxscore,h5plib_v126]
 CPY [editor:errorcommunicatinghubcontent,h5plib_v124],[editor:errorcommunicatinghubcontent,h5plib_v126]
 CPY [editor:errorcommunicatinghubtitle,h5plib_v124],[editor:errorcommunicatinghubtitle,h5plib_v126]
 CPY [editor:errorheader,h5plib_v124],[editor:errorheader,h5plib_v126]
 CPY [editor:errornotsupported,h5plib_v124],[editor:errornotsupported,h5plib_v126]
 CPY [editor:errorparamsbroken,h5plib_v124],[editor:errorparamsbroken,h5plib_v126]
 CPY [editor:errortoohighversion,h5plib_v124],[editor:errortoohighversion,h5plib_v126]
 CPY [editor:example,h5plib_v124],[editor:example,h5plib_v126]
 CPY [editor:exceedsmax,h5plib_v124],[editor:exceedsmax,h5plib_v126]
 CPY [editor:exitfullscreenbuttonlabel,h5plib_v124],[editor:exitfullscreenbuttonlabel,h5plib_v126]
 CPY [editor:expandcollapse,h5plib_v124],[editor:expandcollapse,h5plib_v126]
 CPY [editor:filetolarge,h5plib_v124],[editor:filetolarge,h5plib_v126]
 CPY [editor:fillinthefieldsbelow,h5plib_v124],[editor:fillinthefieldsbelow,h5plib_v126]
 CPY [editor:gethelp,h5plib_v124],[editor:gethelp,h5plib_v126]
 CPY [editor:h5pfileuploadservererrorcontent,h5plib_v124],[editor:h5pfileuploadservererrorcontent,h5plib_v126]
 CPY [editor:h5pfileuploadservererrortitle,h5plib_v124],[editor:h5pfileuploadservererrortitle,h5plib_v126]
 CPY [editor:h5pfilevalidationfailedcontent,h5plib_v124],[editor:h5pfilevalidationfailedcontent,h5plib_v126]
 CPY [editor:h5pfilevalidationfailedtitle,h5plib_v124],[editor:h5pfilevalidationfailedtitle,h5plib_v126]
 CPY [editor:h5pfilewrongextensioncontent,h5plib_v124],[editor:h5pfilewrongextensioncontent,h5plib_v126]
 CPY [editor:h5pfilewrongextensiontitle,h5plib_v124],[editor:h5pfilewrongextensiontitle,h5plib_v126]
 CPY [editor:height,h5plib_v124],[editor:height,h5plib_v126]
 CPY [editor:hide,h5plib_v124],[editor:hide,h5plib_v126]
 CPY [editor:hideimportantinstructions,h5plib_v124],[editor:hideimportantinstructions,h5plib_v126]
 CPY [editor:hubpanellabel,h5plib_v124],[editor:hubpanellabel,h5plib_v126]
 CPY [editor:illegaldecimalnumber,h5plib_v124],[editor:illegaldecimalnumber,h5plib_v126]
 CPY [editor:imagelightboxprogress,h5plib_v124],[editor:imagelightboxprogress,h5plib_v126]
 CPY [editor:imagelightboxtitle,h5plib_v124],[editor:imagelightboxtitle,h5plib_v126]
 CPY [editor:importantinstructions,h5plib_v124],[editor:importantinstructions,h5plib_v126]
 CPY [editor:insert,h5plib_v124],[editor:insert,h5plib_v126]
 CPY [editor:invalidformat,h5plib_v124],[editor:invalidformat,h5plib_v126]
 CPY [editor:language,h5plib_v124],[editor:language,h5plib_v126]
 CPY [editor:librarymissing,h5plib_v124],[editor:librarymissing,h5plib_v126]
 CPY [editor:licensecandistribute,h5plib_v124],[editor:licensecandistribute,h5plib_v126]
 CPY [editor:licensecanholdliable,h5plib_v124],[editor:licensecanholdliable,h5plib_v126]
 CPY [editor:licensecanmodify,h5plib_v124],[editor:licensecanmodify,h5plib_v126]
 CPY [editor:licensecansublicense,h5plib_v124],[editor:licensecansublicense,h5plib_v126]
 CPY [editor:licensecanusecommercially,h5plib_v124],[editor:licensecanusecommercially,h5plib_v126]
 CPY [editor:licensecannotholdliable,h5plib_v124],[editor:licensecannotholdliable,h5plib_v126]
 CPY [editor:licensedescription,h5plib_v124],[editor:licensedescription,h5plib_v126]
 CPY [editor:licensefetchdetailsfailed,h5plib_v124],[editor:licensefetchdetailsfailed,h5plib_v126]
 CPY [editor:licensemodalsubtitle,h5plib_v124],[editor:licensemodalsubtitle,h5plib_v126]
 CPY [editor:licensemodaltitle,h5plib_v124],[editor:licensemodaltitle,h5plib_v126]
 CPY [editor:licensemustincludecopyright,h5plib_v124],[editor:licensemustincludecopyright,h5plib_v126]
 CPY [editor:licensemustincludelicense,h5plib_v124],[editor:licensemustincludelicense,h5plib_v126]
 CPY [editor:licenseunspecified,h5plib_v124],[editor:licenseunspecified,h5plib_v126]
 CPY [editor:listbelowmin,h5plib_v124],[editor:listbelowmin,h5plib_v126]
 CPY [editor:listexceedsmax,h5plib_v124],[editor:listexceedsmax,h5plib_v126]
 CPY [editor:listlabel,h5plib_v124],[editor:listlabel,h5plib_v126]
 CPY [editor:loading,h5plib_v124],[editor:loading,h5plib_v126]
 CPY [editor:loadingimageeditor,h5plib_v124],[editor:loadingimageeditor,h5plib_v126]
 CPY [editor:logthischange,h5plib_v124],[editor:logthischange,h5plib_v126]
 CPY [editor:loggedchanges,h5plib_v124],[editor:loggedchanges,h5plib_v126]
 CPY [editor:maxscoresemanticsmissing,h5plib_v124],[editor:maxscoresemanticsmissing,h5plib_v126]
 CPY [editor:metadata,h5plib_v124],[editor:metadata,h5plib_v126]
 CPY [editor:metadatasharingandlicensinginfo,h5plib_v124],[editor:metadatasharingandlicensinginfo,h5plib_v126]
 CPY [editor:missingproperty,h5plib_v124],[editor:missingproperty,h5plib_v126]
 CPY [editor:missingtranslation,h5plib_v124],[editor:missingtranslation,h5plib_v126]
 CPY [editor:newchangehasbeenlogged,h5plib_v124],[editor:newchangehasbeenlogged,h5plib_v126]
 CPY [editor:newestfirst,h5plib_v124],[editor:newestfirst,h5plib_v126]
 CPY [editor:nextimage,h5plib_v124],[editor:nextimage,h5plib_v126]
 CPY [editor:nochangeshavebeenlogged,h5plib_v124],[editor:nochangeshavebeenlogged,h5plib_v126]
 CPY [editor:nocontenttypesavailable,h5plib_v124],[editor:nocontenttypesavailable,h5plib_v126]
 CPY [editor:nocontenttypesavailabledesc,h5plib_v124],[editor:nocontenttypesavailabledesc,h5plib_v126]
 CPY [editor:nofollow,h5plib_v124],[editor:nofollow,h5plib_v126]
 CPY [editor:notimageordimensionsfield,h5plib_v124],[editor:notimageordimensionsfield,h5plib_v126]
 CPY [editor:numresults,h5plib_v124],[editor:numresults,h5plib_v126]
 CPY [editor:numberfield,h5plib_v124],[editor:numberfield,h5plib_v126]
 CPY [editor:ok,h5plib_v124],[editor:ok,h5plib_v126]
 CPY [editor:onlynumbers,h5plib_v124],[editor:onlynumbers,h5plib_v126]
 CPY [editor:or,h5plib_v124],[editor:or,h5plib_v126]
 CPY [editor:orderitemdown,h5plib_v124],[editor:orderitemdown,h5plib_v126]
 CPY [editor:orderitemup,h5plib_v124],[editor:orderitemup,h5plib_v126]
 CPY [editor:outofstep,h5plib_v124],[editor:outofstep,h5plib_v126]
 CPY [editor:pasteandreplacebutton,h5plib_v124],[editor:pasteandreplacebutton,h5plib_v126]
 CPY [editor:pasteandreplacefromclipboard,h5plib_v124],[editor:pasteandreplacefromclipboard,h5plib_v126]
 CPY [editor:pastebutton,h5plib_v124],[editor:pastebutton,h5plib_v126]
 CPY [editor:pastecontent,h5plib_v124],[editor:pastecontent,h5plib_v126]
 CPY [editor:pastecontentnotsupported,h5plib_v124],[editor:pastecontentnotsupported,h5plib_v126]
 CPY [editor:pastecontentrestricted,h5plib_v124],[editor:pastecontentrestricted,h5plib_v126]
 CPY [editor:pasteerror,h5plib_v124],[editor:pasteerror,h5plib_v126]
 CPY [editor:pastefromclipboard,h5plib_v124],[editor:pastefromclipboard,h5plib_v126]
 CPY [editor:pastenocontent,h5plib_v124],[editor:pastenocontent,h5plib_v126]
 CPY [editor:pastetoonew,h5plib_v124],[editor:pastetoonew,h5plib_v126]
 CPY [editor:pastetooold,h5plib_v124],[editor:pastetooold,h5plib_v126]
 CPY [editor:popularfirst,h5plib_v124],[editor:popularfirst,h5plib_v126]
 CPY [editor:previousimage,h5plib_v124],[editor:previousimage,h5plib_v126]
 CPY [editor:proceedbuttonlabel,h5plib_v124],[editor:proceedbuttonlabel,h5plib_v126]
 CPY [editor:readless,h5plib_v124],[editor:readless,h5plib_v126]
 CPY [editor:readmore,h5plib_v124],[editor:readmore,h5plib_v126]
 CPY [editor:recentlyusedfirst,h5plib_v124],[editor:recentlyusedfirst,h5plib_v126]
 CPY [editor:reloadbuttonlabel,h5plib_v124],[editor:reloadbuttonlabel,h5plib_v126]
 CPY [editor:removefile,h5plib_v124],[editor:removefile,h5plib_v126]
 CPY [editor:removeimage,h5plib_v124],[editor:removeimage,h5plib_v126]
 CPY [editor:removeitem,h5plib_v124],[editor:removeitem,h5plib_v126]
 CPY [editor:requiredproperty,h5plib_v124],[editor:requiredproperty,h5plib_v126]
 CPY [editor:resettooriginallabel,h5plib_v124],[editor:resettooriginallabel,h5plib_v126]
 CPY [editor:savelabel,h5plib_v124],[editor:savelabel,h5plib_v126]
 CPY [editor:savemetadata,h5plib_v124],[editor:savemetadata,h5plib_v126]
 CPY [editor:screenshots,h5plib_v124],[editor:screenshots,h5plib_v126]
 CPY [editor:scriptmissing,h5plib_v124],[editor:scriptmissing,h5plib_v126]
 CPY [editor:searchresults,h5plib_v124],[editor:searchresults,h5plib_v126]
 CPY [editor:selectfiletoupload,h5plib_v124],[editor:selectfiletoupload,h5plib_v126]
 CPY [editor:selectlibrary,h5plib_v124],[editor:selectlibrary,h5plib_v126]
 CPY [editor:semanticserror,h5plib_v124],[editor:semanticserror,h5plib_v126]
 CPY [editor:show,h5plib_v124],[editor:show,h5plib_v126]
 CPY [editor:showimportantinstructions,h5plib_v124],[editor:showimportantinstructions,h5plib_v126]
 CPY [editor:tabtitlebasicfileupload,h5plib_v124],[editor:tabtitlebasicfileupload,h5plib_v126]
 CPY [editor:tabtitleinputlinkurl,h5plib_v124],[editor:tabtitleinputlinkurl,h5plib_v126]
 CPY [editor:textfield,h5plib_v124],[editor:textfield,h5plib_v126]
 CPY [editor:thecontenttype,h5plib_v124],[editor:thecontenttype,h5plib_v126]
 CPY [editor:thiswillpotentially,h5plib_v124],[editor:thiswillpotentially,h5plib_v126]
 CPY [editor:title,h5plib_v124],[editor:title,h5plib_v126]
 CPY [editor:toolong,h5plib_v124],[editor:toolong,h5plib_v126]
 CPY [editor:tryagain,h5plib_v124],[editor:tryagain,h5plib_v126]
 CPY [editor:tutorial,h5plib_v124],[editor:tutorial,h5plib_v126]
 CPY [editor:unabletointerpreterror,h5plib_v124],[editor:unabletointerpreterror,h5plib_v126]
 CPY [editor:unabletointerpretsolution,h5plib_v124],[editor:unabletointerpretsolution,h5plib_v126]
 CPY [editor:unknownfieldpath,h5plib_v124],[editor:unknownfieldpath,h5plib_v126]
 CPY [editor:uploadinstructionstitle,h5plib_v124],[editor:uploadinstructionstitle,h5plib_v126]
 CPY [editor:uploadplaceholder,h5plib_v124],[editor:uploadplaceholder,h5plib_v126]
 CPY [editor:uploadsuccess,h5plib_v124],[editor:uploadsuccess,h5plib_v126]
 CPY [editor:uploadtablabel,h5plib_v124],[editor:uploadtablabel,h5plib_v126]
 CPY [editor:uploadvideotitle,h5plib_v124],[editor:uploadvideotitle,h5plib_v126]
 CPY [editor:uploading,h5plib_v124],[editor:uploading,h5plib_v126]
 CPY [editor:uploadingthrobber,h5plib_v124],[editor:uploadingthrobber,h5plib_v126]
 CPY [editor:usedforsearchingreportsandcopyrightinformation,h5plib_v124],[editor:usedforsearchingreportsandcopyrightinformation,h5plib_v126]
 CPY [editor:videoquality,h5plib_v124],[editor:videoquality,h5plib_v126]
 CPY [editor:videoqualitydefaultlabel,h5plib_v124],[editor:videoqualitydefaultlabel,h5plib_v126]
 CPY [editor:videoqualitydescription,h5plib_v124],[editor:videoqualitydescription,h5plib_v126]
 CPY [editor:warningchangebrowsingtoseeresults,h5plib_v124],[editor:warningchangebrowsingtoseeresults,h5plib_v126]
 CPY [editor:warningnocontenttypesinstalled,h5plib_v124],[editor:warningnocontenttypesinstalled,h5plib_v126]
 CPY [editor:warningupdateavailablebody,h5plib_v124],[editor:warningupdateavailablebody,h5plib_v126]
 CPY [editor:warningupdateavailabletitle,h5plib_v124],[editor:warningupdateavailabletitle,h5plib_v126]
 CPY [editor:width,h5plib_v124],[editor:width,h5plib_v126]
AMOS END
2024-02-06 08:12:07 +01:00
Jun Pataleta 4ec88a2e6e Merge branch 'MDL-72703-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-06 12:10:04 +08:00
Ilya Tregubov 2b41d90a9e Merge branch 'MDL-80713-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-02-06 11:20:18 +08:00
Tim Hunt c19fa82e7c MDL-80808 quiz: improve message when the student can't review 2024-02-05 10:50:10 +00:00
Jun Pataleta bb80d04930 Merge branch 'MDL-80060-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-05 16:06:47 +08:00
Huong Nguyen d6295c30ef Merge branch 'MDL-80718-402' of https://github.com/dpalou/moodle into MOODLE_402_STABLE 2024-02-05 13:37:49 +07:00
Huong Nguyen 8af2a58c33 Merge branch 'MDL-67772-email-thread-headers-MOODLE_402_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_402_STABLE 2024-02-05 13:33:57 +07:00
Jun Pataleta cea960eeb4 Merge branch 'MDL-80694-402' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2024-02-05 14:26:53 +08:00
Huong Nguyen f1e4c6595e Merge branch 'MDL-80537_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2024-02-05 11:29:18 +07:00
Huong Nguyen 2d9eb08806 MDL-80713 Unit Tests: Message sink improvement
- Added a new method called get_messages_by_component()
  This method will help to retreive the redirected messages
  of specific component only
- Added a new method called get_messages_by_component_and_type()
  This method will help to retreive the redirected messages
  of specific component and type only
2024-02-05 09:24:42 +07:00
Eloy Lafuente (stronk7) fdcb6755a9 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:03 +01:00
Tim Hunt 8c2029ef64 MDL-79527 questions: category tree loading handling bad data
It should always be the case that a question category and its parent
category belong to the same context. However, over the years, we have
observed that this becomes violated by some data in some Moodle sites.
(The suspicion is that this is a backup/restor bug of some sort which
has never been tracked down.)

Since this happens, we should make the code robust to it, which is what
this change does. It ensure that when loading child categories, we only
consider ones in the same context.
2024-02-02 11:33:44 +00:00
Ilya Tregubov 44fd4d7dc0 weekly release 4.2.5+ 2024-02-02 08:56:29 +08:00
Ilya Tregubov 8c8885420b Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-02-02 08:56:25 +08:00
james-cnz 8da787e789 MDL-78095 course: Respect is_bulk_editable() 2024-02-02 10:26:40 +13:00
David Mudrák b175313da9 MDL-80725 lang: Fix Behat regressions related to the question rename 2024-02-01 20:05:27 +01:00
David Mudrák cb831f890f MDL-80725 lang: Fix Help and documentation regressions 2024-02-01 20:05:22 +01:00
Paul Holden 7ef9f78c01 MDL-80809 course: correct context arguments when formatting strings. 2024-02-01 18:16:37 +00:00
Tim Hunt 24826f4fc3 MDL-80537 question bank: escape plain text display of question text 2024-02-01 16:35:51 +00:00
Paul Holden f0c4f19c46 MDL-80803 course: observe mod availability before update notification. 2024-02-01 14:51:35 +00:00
Brendan Heywood 60c7936c6a MDL-67772 mod_forum: Fix email threading for first message 2024-02-01 16:18:40 +11:00
Huong Nguyen 5559f6d08c Merge branch 'MDL-80485-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 11:31:40 +07:00
Huong Nguyen 919cbdf64c Merge branch 'MDL-80660-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 11:24:16 +07:00
Huong Nguyen e4f05ef164 Merge branch 'MDL-80538-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-02-01 11:18:28 +07:00
Simey Lameze 54608ed959 MDL-80538 phpdoc: add missing null parameter type to phpdoc 2024-02-01 12:07:34 +08:00
info@eWallah.net 12db10be31 MDL-80538 phpdoc: Incorrect dataformat type documentation in table lib 2024-02-01 12:07:34 +08:00
Huong Nguyen 150568f88c Merge branch 'MDL-71665-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2024-02-01 11:07:20 +07:00
Huong Nguyen 271e8d1924 Merge branch 'MDL-80450-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 11:01:37 +07:00
Huong Nguyen 41b9d54489 Merge branch 'MDL-80692-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 10:57:52 +07:00
Huong Nguyen 2beaddf3c0 Merge branch 'MDL-73010-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 10:50:54 +07:00
Jun Pataleta 4869ee3499 Merge branch 'MDL-74775-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-02-01 11:47:02 +08:00
Huong Nguyen ba638f834a Merge branch 'MDL-29261-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 10:45:57 +07:00
Huong Nguyen 4572833853 Merge branch 'MDL-80706-402' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2024-02-01 10:44:22 +07:00
Jun Pataleta 180a3e8a73 Merge branch 'MDL-80247-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 11:38:54 +08:00
Jun Pataleta d1131393aa Merge branch 'MDL-79725-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2024-02-01 11:33:00 +08:00
Ilya Tregubov fbb8aa92ad Merge branch 'MDL-80202-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 10:39:26 +08:00
Ilya Tregubov 328b34ca98 Merge branch 'MDL-80199-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 10:31:43 +08:00
Ilya Tregubov 553b9e2a60 Merge branch 'MDL-80727-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-01 10:27:06 +08:00
Huong Nguyen aacb33bd48 Merge branch 'MDL-80289-402' of https://github.com/call-learning/moodle into MOODLE_402_STABLE 2024-02-01 08:55:59 +07:00
David Mudrák 393b277e29 MDL-80725 lang: Use the fixed strings in tests, too 2024-01-31 22:12:47 +01:00
Helen Foster ecb3d0a1b0 MDL-80725 lang: Import fixed English strings (en_fix) 2024-01-31 22:12:29 +01:00
Paul Holden d8bec7a090 MDL-80766 gradereport_grader: omit max constraint for unlimited grades. 2024-01-31 18:26:42 +00:00
Noel De Martin e87d652092 MDL-80784 behat: Disable SSL checks for app initialization 2024-01-31 14:07:17 +01:00
Ilya Tregubov ac57e1a023 Merge branch 'MDL-80575-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-31 09:25:25 +08:00
Paul Holden 5a1aef5a51 MDL-80768 output: stricter progress bar component percentage type.
Avoid mixing float/string types, where the decimal separator could
vary according to current locale.
2024-01-30 23:28:47 +00:00
Paul Holden deed60f5a1 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-01-30 15:39:07 +00:00
Paul Holden dd46cc65d7 MDL-80692 calendar: calculate today relative to users own timezone.
Co-authored-by: Archil Abuladze <armiworker@gmail.com>
2024-01-30 14:39:12 +00:00
Paul Holden 93f80f61d3 MDL-74500 user: method to determine whether to show profile fields.
The new API replaces identical behaviour in existing calling code, but
allows for profile field types to override/separate the logic used to
show the field and determine whether it's empty
2024-01-30 11:34:04 +00:00
Paul Holden 365a1ca7f5 MDL-80485 tool_lp: consistent activity icon element styling. 2024-01-30 11:28:54 +00:00
Jun Pataleta da0f7544fa 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:20:28 +08:00
Jun Pataleta 1091ff1f12 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:20:26 +08:00
Andrew Nicols 3bea8ad014 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 13:32:46 +08:00
Andrew Nicols bb64ff0b0f 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 13:32:45 +08:00
Andrew Nicols 3bb4bc5bb5 MDL-79003 js: Move browserlist config to package.json 2024-01-30 13:32:45 +08:00
Andrew Nicols e48494696d MDL-79003 js: Standard package bump - glob 2024-01-30 13:32:45 +08:00
Andrew Nicols b3f2e372c4 MDL-79003 js: Standard package bump - async 2024-01-30 13:32:45 +08:00
Andrew Nicols 53f53e2424 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 13:32:45 +08:00
Andrew Nicols 4c10eb14d8 MDL-79003 js: Standard package bump - grunt 2024-01-30 13:32:44 +08:00
Andrew Nicols b4858a4237 MDL-79003 js: Standard package bump - watchman 2024-01-30 13:32:44 +08:00
Andrew Nicols 6c80395a44 MDL-79003 js: Standard package bump - ajv 2024-01-30 13:32:44 +08:00
Andrew Nicols 00a7b14c0e 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 13:32:44 +08:00
Andrew Nicols 527944c274 MDL-79003 core: Bump eslint 2024-01-30 13:32:43 +08:00
Ruslan Kabalin 95458aa709 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 13:32:34 +08:00
Ruslan Kabalin deb801fadc 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 13:32:29 +08:00
Ruslan Kabalin b3445f0c83 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 13:32:18 +08:00
Ruslan Kabalin 266083b359 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 13:32:13 +08:00
Ruslan Kabalin 70e3dc44ef 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 13:32:07 +08:00
Ruslan Kabalin 1e242956cc 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 13:32:00 +08:00
Ruslan Kabalin 47bc3254c8 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:31:41 +08:00
Ruslan Kabalin 8b85e34fbf 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 12:23:36 +08:00
Andrew Nicols 25c5ed6ea3 MDL-79003 core: Bump NodeJS to lts/iron (NodeJS 20) 2024-01-30 12:21:33 +08:00
Huong Nguyen 76c94c34e4 Merge branch 'MDL-80523-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-30 09:42:30 +07:00
Laurent David 7b3be7dfbc MDL-71665 core_courseformat: Sync activity name in the page
* Changing the name of an activity should change the access restriction messages.
* Introduction of a marker as data-cm-name-for to be able to change any
occurence of a course module name in the page when this one changes.
2024-01-29 09:04:08 +01:00
Huong Nguyen 06802bd46d MDL-74775 adhoc_task: Do not clear the timecreated of failed tasks 2024-01-29 10:03:17 +07:00
Jun Pataleta f710c51f93 Merge branch 'MDL-69225-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2024-01-29 10:20:05 +08:00
Jun Pataleta ba013f48eb Merge branch 'MDL-78311-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-29 10:08:23 +08:00
Jun Pataleta 2e4169e2e7 Merge branch 'M402-MDL-79930' of https://github.com/marcusboon/moodle into MOODLE_402_STABLE 2024-01-29 10:04:10 +08:00
Marcus Boon 8f4d6f460d MDL-79930 mod_forum: Use MUC for forum count discussions 2024-01-29 08:35:02 +10:00
AMOS bot fc76bbb142 Automatically generated installer lang files 2024-01-27 00:11:28 +00:00
Paul Holden 2bdc211928 MDL-78311 core: fix host parameter type cleaning by IPv4 address. 2024-01-25 23:39:18 +00:00
Paul Holden 6dc458a4f9 MDL-80727 tool_task: replace hard-coded adhoc task runner strings. 2024-01-25 22:46:23 +00:00
Paul Holden 81794e4ec7 MDL-80124 admin: prevent deletion of pre-installed preset definitions. 2024-01-25 21:51:54 +00:00
Sara Arjona 734c027367 MDL-69225 h5pactivity: Review when and which banners display
The UX team proposal is to display two different notifications, to avoid confusion:

1. When the user is in preview mode:
Message: 'You are in preview mode.'
Notification Type: Information (blue), with the information permanently visible and not dismissible,
ensuring continuous awareness.

2. When activity tracking is disabled:
Message: 'Attempt tracking is not enabled for this activity. You can enable it in Settings.'
Notification Type: Warning (yellow) with a close icon for dismissal if tracking is intentionally disabled.

These notifications should only be visible to teachers and content creators, not students.
If a teacher also has a student role, this information should not appear when logged in as a student.

That's why the pre-existing is_tracking_enabled() function has been updated to only check if tracking
is on for an activity, without considering user capabilities (that's why the $user parameter has been
removed from this function too). Besides, a new function called can_submit() has been created to find
out if users are allowed to submit an activity.
2024-01-25 17:48:34 +01:00
Sara Arjona 3958f68d9b weekly release 4.2.5+ 2024-01-25 16:48:32 +01:00
Paul Holden 05b76a28a9 MDL-80660 user: preserve return URL upon role switch from frontpage. 2024-01-25 15:40:58 +00:00
Dani Palou 9f09e25cdd MDL-80718 quiz: Apply overrides in mod_quiz_get_combined_review_options 2024-01-25 10:54:18 +01:00
Jun Pataleta 3f90aea54e Merge branch 'MDL-80656-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-01-25 12:13:55 +08:00
Huong Nguyen 50b19d282e Merge branch 'MDL-80224-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-25 11:02:15 +07:00
Huong Nguyen 033f0522ba Merge branch 'MDL-80516-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-25 10:45:56 +07:00
Huong Nguyen 81c290fc31 Merge branch 'MDL-76671-402' of https://github.com/jleyva/moodle into MOODLE_402_STABLE 2024-01-25 10:25:17 +07:00
Ilya Tregubov e9f133abc1 Merge branch 'MDL-80098-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-25 10:20:53 +08:00
Huong Nguyen 31a54100d2 Merge branch 'MDL-80676-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-01-25 09:08:10 +07:00
Ilya Tregubov 54441ad964 Merge branch 'MDL-79927-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-25 09:54:06 +08:00
Huong Nguyen 8a03f02e83 Merge branch 'MDL-76716-m402' of https://github.com/stefangub/moodle into MOODLE_402_STABLE 2024-01-25 08:51:44 +07:00
Ilya Tregubov caee1d8cb3 Merge branch 'MDL-79159-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-01-25 09:36:05 +08:00
Ilya Tregubov b63c94587c Merge branch 'MDL-80653-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-25 09:26:19 +08:00
Sara Arjona 196a388010 Merge branch 'MDL-79681-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-24 17:02:33 +01:00
Sara Arjona 14a63c9988 Merge branch 'MDL-79152-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-01-24 16:03:02 +01:00
Paul Holden 1344a8a477 MDL-78173 user: correct return URL upon login as from frontpage. 2024-01-24 14:58:35 +00:00
Sara Arjona b8f6a64ace Merge branch 'MDL-80668-402' of https://github.com/pedrojordao/moodle into MOODLE_402_STABLE 2024-01-24 15:16:26 +01:00
Sara Arjona 4f9de1b21e Merge branch 'MDL-78888-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-24 13:26:02 +01:00
Sara Arjona 64a1d7a056 Merge branch 'MDL-76723-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-01-24 13:14:03 +01:00
Sara Arjona 4ac202c713 Merge branch 'MDL-79940-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-01-24 09:22:42 +01:00
Angelia Dela Cruz f48aae4514 MDL-79159 mod_lesson: Behat coverage for lesson question max attempts 2024-01-24 16:18:15 +08:00
Ilya Tregubov 047654cffd Merge branch 'MDL-80270-402' of https://github.com/mihailges/moodle into MOODLE_402_STABLE 2024-01-24 13:47:13 +08:00
Simey Lameze 435ac352ca MDL-80656 behat: remove unnecessary activity duplication steps 2024-01-24 11:14:35 +08:00
Angelia Dela Cruz 81f203b60c MDL-79940 mod_workshop: Behat to confirm review button for reviewers 2024-01-24 09:03:37 +08:00
Marina Glancy b9486a01c5 MDL-80706 customfield: php8.1 warning about passing null to strlen 2024-01-23 14:58:30 +00:00
Marina Glancy dee152197f MDL-80694 external: fix return param in inplace_editable WS 2024-01-23 14:21:08 +00:00
Stefan Van der Vyver b151356bcf MDL-76716 grades: handle open delegated transaction on grade delete 2024-01-23 10:08:06 +00:00
Paul Holden c88b80e715 MDL-80512 tool_task: absolute path to required library file. 2024-01-23 09:25:03 +00:00
Jun Pataleta d73782a68a Merge branch 'MDL-80271-MOODLE_402_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_402_STABLE 2024-01-23 16:32:39 +08:00
Paul Holden 1b846984eb MDL-80324 webservice: correct current page URL for user settings. 2024-01-23 08:22:53 +00:00
Sara Arjona dad2eebff4 Merge branch 'MDL-80339-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-01-23 07:48:31 +01:00
Jake Dallimore 66e6fd329d MDL-79725 libraries: fix auth URL generation in lti1p3 library 2024-01-23 12:53:29 +08:00
Ilya Tregubov c28c449259 Merge branch 'MDL-75579-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-01-23 12:05:02 +08:00
Jun Pataleta 564671dd5f Merge branch 'MDL-78219-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2024-01-23 11:59:18 +08:00
Huong Nguyen 922471c050 MDL-75579 Backup: Prevent failed course restore task to be retried 2024-01-23 09:34:12 +07:00
Huong Nguyen ca05ed2c18 MDL-75579 adhoc_task: Implement no-retry flag 2024-01-23 09:34:12 +07:00
Angelia Dela Cruz 53a516b798 MDL-80339 mod_lesson: Behat to confirm grade visibility in lesson 2024-01-23 10:13:03 +08:00
Jun Pataleta 0aa92a472a Merge branch 'MDL-79029-402' of https://github.com/ferranrecio/moodle into MOODLE_402_STABLE 2024-01-23 09:21:34 +08:00
Sara Arjona dbd36ffd0c Merge branch 'MDL-80559-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-22 16:23:37 +01:00
sam marshall 85a522280b MDL-80693 core_user: search() fails if no standard identify fields 2024-01-22 12:55:09 +00:00
Paul Holden a56bd8d4e1 MDL-80202 repository_local: null check when recursing child nodes. 2024-01-22 10:19:51 +00:00
Ferran Recio 4958cb4245 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:18:22 +01:00
Ferran Recio ac095c5aa4 MDL-79029 behat: new add activity steps 2024-01-22 11:18:19 +01:00
Paul Holden 5d37f3a5d9 MDL-80653 h5p: handle content type creation errors in test.
See also same in c7d08f85.
2024-01-22 09:46:16 +00:00
Huong Nguyen 464a02ca84 Merge branch 'MDL-80532-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-22 15:39:36 +07:00
Huong Nguyen 609761ba2e Merge branch 'MDL-80499-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-22 15:36:44 +07:00
Jun Pataleta c63571cfca Merge branch 'MDL-80377-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-01-22 16:32:22 +08:00
Jun Pataleta 3f1e893a17 Merge branch 'MDL-80374-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-22 16:29:48 +08:00
Jun Pataleta 352b995cb9 Merge branch 'MDL-80323-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-22 16:26:00 +08:00
Jun Pataleta 0760a174f0 Merge branch 'MDL-80232-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-22 15:04:38 +08:00
Pedro Jordao c9683882e6 MDL-80668 modal: Change aria roles on modal to improve accessibility.
The roles we were using were no longer the most recommended for modals.
2024-01-19 08:14:43 -03:00
Paul Holden a7739ffa3c MDL-79577 user: better parsing of user menu lang string identifiers. 2024-01-19 09:49:33 +00:00
Matthias Opitz 5742078443 MDL-79988 course: checking for cached empty modnames
Check if empty modnames have been cached and if so retrieve them again.
2024-01-19 09:45:24 +00:00
Angelia Dela Cruz 29b0224de7 MDL-80377 block: Behat confirming folder file in recent activity block 2024-01-19 14:30:27 +08:00
Jun Pataleta b58bebbf9f MDL-80676 core: Remove unnecessary aria-labelledby for action menu links
The aria-labelledby attribute for the action menu link's <a> tag is
unnecessary as the <span> tag containing the action menu link's text
is already within the <a> tag and already serves as the link's label by
default.
2024-01-19 14:13:06 +08:00
Philipp Memmel 09db8f17d4 MDL-80271 core_user: Only update record if necessary 2024-01-19 05:59:24 +00:00
Huong Nguyen 72c1d1921f weekly release 4.2.5+ 2024-01-19 11:24:17 +07:00
Paul Holden 01e627bb87 MDL-79514 mod_feedback: ensure base item class library is required. 2024-01-18 20:46:39 +00:00
Paul Holden 70cee4252f 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:08 +00:00
Paul Holden dc2e3d8eec MDL-79433 tiny_autosave: allow non-logged in user calls to webservice.
Accounts for the editor being added to pages for non-logged in users,
such as the "New account" page.
2024-01-18 10:49:22 +00:00
Paul Holden f635e0a44e MDL-73010 repository_filesystem: fix directory read comparison.
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2024-01-18 10:02:19 +00:00
Andrew Nicols 9e6cdc07c6 MDL-79152 editor_tiny: Enable browser-based spell-checking 2024-01-18 12:55:59 +08:00
Andrew Nicols f93bc845e6 Merge branch 'MDL-80201-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-01-18 11:34:34 +08:00
Jun Pataleta bac138d997 Merge branch 'MDL-79498-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-01-18 10:59:13 +08:00
Andrew Nicols 52bf269e7d Merge branch 'MDL-80591_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2024-01-18 10:57:30 +08:00
Justus Dieckmann 04bbf2a1f3 MDL-79498 javascript: Adjust get_string function signature
In order to reflect param and lang being optional parameters.
2024-01-18 10:54:37 +08:00
Andrew Nicols 64f937689b Merge branch 'MDL-80041-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2024-01-18 10:54:20 +08:00
Sara Arjona 9a91e0fae4 Merge branch 'MDL-80058-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2024-01-17 18:46:54 +01:00
Sara Arjona c28aa03f2b Merge branch 'MDL-80081-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2024-01-17 18:18:15 +01:00
Juan Leyva 8af5f10f2b MDL-76671 tool_mobile: Allow OAuth launches after accepting policies 2024-01-17 16:50:41 +01:00
Sara Arjona e195bd680f Merge branch 'MDL-80255-402' of https://github.com/aanabit/moodle into MOODLE_402_STABLE 2024-01-17 11:51:15 +01:00
Paul Holden c70803f489 MDL-78888 tool_uploaduser: case-insensitive email matching on upload. 2024-01-17 09:01:18 +00:00
Paul Holden 88c6878fa6 MDL-80098 core: correct arguments for invalidmoduleid exceptions.
The "invalid module ID" should be passed as the `$a` constructor
argument.
2024-01-17 08:59:01 +00:00
Paul Holden 0c2af009dd MDL-80060 enrol_manual: correct exception constructor arguments. 2024-01-17 08:57:49 +00:00
Paul Holden 552f60f51b MDL-78417 tool_uploaduser: handle empty default in custom menu field. 2024-01-17 08:56:01 +00:00
Huong Nguyen 5d9ed882b6 Merge branch 'MDL-79701-402' of https://github.com/rjnl/moodle into MOODLE_402_STABLE 2024-01-17 14:10:53 +07:00
Huong Nguyen b915a4bde0 Merge branch 'MDL-80498_402' of https://github.com/santoshndev/moodle into MOODLE_402_STABLE 2024-01-17 10:38:41 +07:00
Amaia Anabitarte a2fc550ab4 MDL-80255 mod_scorm: Remove 'Completed' as default completion 2024-01-16 17:26:54 +01:00
Paul Holden 4a3a5872e0 MDL-72703 profilefield_text: validate field length when editing.
This also means the same validation is applied elsewhere,  such as
in the upload user tool.
2024-01-16 09:54:20 +00:00
Sara Arjona 59d66f6b21 Merge branch 'MDL-80266-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-01-16 07:20:16 +01:00
Andrew Nicols 0a06809d17 MDL-80266 mod_forum: Reset subscription caches between behat tests 2024-01-16 13:34:40 +08:00
Ilya Tregubov 0852082960 Merge branch 'MDL-69615-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2024-01-16 10:58:09 +08:00
Huong Nguyen 0ba6c2d20c MDL-69615 core_backup: Send backup report email once the tasks are done 2024-01-16 09:31:36 +07:00
Sara Arjona ffb3f3595f Merge branch 'MDL-59467-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-01-15 17:28:22 +01:00
Sara Arjona 550f16c903 Merge branch 'MDL-79519-402_url_select' of https://github.com/Tsheke/moodle into MOODLE_402_STABLE 2024-01-15 17:03:10 +01:00
Paul Holden d643996bcf MDL-29261 tool_uploaduser: warn user about invalid data values. 2024-01-15 15:15:01 +00:00
Paul Holden b36e7ecce2 MDL-80516 core: more robust plugin update component checking.
Occurs when a plugin in incorrectly removed (via file system only,
rather than following proper uninstall process), and also contains
it's own sub-plugins.

In the above scenario, the update would request and receive back a
response for a plugin whose name was comprised of an empty string,
subsequently causing errors when processing said response.
2024-01-15 14:10:10 +00:00
Johnny Tsheke 2a839aed46 MDL-79519 course: remove null to use the default value. 2024-01-15 08:59:49 -05:00
Sara Arjona 57dd86d987 Merge branch 'MDL-79091-MOODLE_402_STABLE' of https://github.com/jay-oswald/moodle into MOODLE_402_STABLE 2024-01-15 12:31:47 +01:00
Jake Dallimore e798226270 MDL-78219 enrol_lti: fix auth method usage in base testcase 2024-01-15 15:45:07 +08:00
Jake Dallimore 1363941461 MDL-78219 auth_lti: ensure user updates happen after authentication
If an existing session is active at the time of launch, that user id
appears in the user_updated log. This log should show the launching user
updating their own record, not someone else. To resolve this, auth the
user before making any record updates so that the event gets the correct
user id.
2024-01-15 15:45:07 +08:00
Jake Dallimore 0b1159c314 MDL-78219 auth_lti: force empty session before launch user creation
If an existing session is active at the time of launch, that user id
appears in the user_created log, incorrectly (it should be system/0).
This patch makes sure that any existing session is terminated before
creation of a new user during launches.
2024-01-15 15:45:07 +08:00
Huong Nguyen e0594f0d68 MDL-69615 privacy: Use task trait for unit tests 2024-01-15 11:26:26 +07:00
Huong Nguyen 88814648a6 MDL-69615 core_task: Add a task trait 2024-01-15 11:26:26 +07:00
Eloy Lafuente (stronk7) 8edbf3d1f7 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:14 +01:00
Paul Holden ee74b1752d MDL-70058 customfield: reference field element names correctly.
In the course external create/update methods, we must ensure that
the correct form element names are used. Specifically because the
textarea field type uses non-standard name.
2024-01-12 10:29:31 +00:00
Jun Pataleta af8d6ce5f4 Merge branch 'MDL-80192-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-12 17:28:17 +08:00
Paul Holden 32d33c7112 Merge branch 'MDL-80564-402' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2024-01-12 09:07:42 +00:00
Santosh Nagargoje 8267670f60 MDL-80498 group: Added required rule for filepicker field 2024-01-12 14:28:57 +05:30
Paul Holden 3aac83edc4 MDL-80192 reportbuilder: ensure filter form group elements have labels.
This ensures compliance with the following WCAG criterion:

"H71: Providing a description for groups of form controls using fieldset
and legend elements".
2024-01-12 08:39:43 +00:00
Paul Holden 3cc4de3368 MDL-80192 forms: implement method to set group element hidden label.
This is consistent with the API used for other form element types,
in order to provide screen-readable text in the fieldset legend while
not necessarily wanting to display said label.

The new class property is automatically exported to the template via
the `templatable_form_element` trait.
2024-01-12 08:33:45 +00:00
Jun Pataleta 20960a5781 Merge branch 'MDL-80353-MOODLE_402_STABLE' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2024-01-12 16:20:20 +08:00
meirzamoodle b9cc529140 MDL-80081 editor_tiny: Allow empty content in the i tag 2024-01-12 14:11:14 +07:00
Ilya Tregubov 287cfcbe83 weekly release 4.2.5+ 2024-01-12 09:11:44 +08:00
Marina Glancy d3696a6fb5 MDL-80564 reportbuilder: Consistent permission check for user full name 2024-01-11 14:45:51 +00:00
Paul Holden 6cc27fbb73 MDL-80575 mod_forum: correct field name for "Notify students" setting. 2024-01-11 11:44:34 +00:00
Jun Pataleta b841e46332 Merge branch 'MDL-80246-402' of https://github.com/mihailges/moodle into MOODLE_402_STABLE 2024-01-11 11:49:54 +08:00
Huong Nguyen 75982525d9 Merge branch 'MDL-80452-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-01-11 10:45:01 +07:00
Huong Nguyen 97e7e26a6a Merge branch 'MDL-80229-402' of https://github.com/davewoloszyn/moodle into MOODLE_402_STABLE 2024-01-11 10:36:29 +07:00
Angelia Dela Cruz 03a0584a1e MDL-80452 mod_h5pactivity: Behat for H5Pactivity duplication and delete 2024-01-11 11:21:09 +08:00
Ilya Tregubov 38f083d339 Merge branch 'MDL-80446-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-11 10:44:51 +08:00
Ilya Tregubov ddd8dc3290 Merge branch 'MDL-80357_402_STABLE' of https://github.com/SimonasAdams/moodle into MOODLE_402_STABLE 2024-01-11 10:38:57 +08:00
Ilya Tregubov 0e2f602534 Merge branch 'MDL-80333_402' of https://github.com/santoshndev/moodle into MOODLE_402_STABLE 2024-01-11 10:35:04 +08:00
Paul Holden 0012117629 MDL-80499 datafield_date: specify UTC time when editing field content. 2024-01-10 19:23:13 +00:00
Paul Holden 8555750bf4 MDL-80199 report_log: remove duplicate "all logs" breadcrumb. 2024-01-10 10:07:59 +00:00
Santosh Nagargoje b9978b0dd4 MDL-80333 Authentication: Fixed new login notification adhoc task 2024-01-10 15:31:04 +05:30
Paul Holden 7d3eff209c MDL-78621 mod_choice: verify limited responses before showing "full". 2024-01-10 09:48:59 +00:00
Huong Nguyen dac069b1d4 Merge branch 'MDL-73639-402-fix' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2024-01-10 14:46:29 +07:00
Sara Arjona 1d9ec2a6d2 Merge branch 'MDL-80340-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-01-10 07:35:08 +01:00
Huong Nguyen 763280d045 Merge branch 'MDL-80382-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2024-01-10 10:30:46 +07:00
meirzamoodle 55d828df88 MDL-80058 editor_tiny: add preformatted format to the blocks 2024-01-10 09:40:22 +07:00
Angelia Dela Cruz db95f6c51a MDL-80382 behat: Replace "Frist" typos in Behat tests to "First" 2024-01-10 09:16:42 +08:00
Paul Holden 681f3b8afb MDL-80559 badges: set contexturl/name in badge awarded notification. 2024-01-09 17:17:05 +00:00
Sara Arjona 5f26ab7eb4 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:32:33 +01:00
Simey Lameze f7fd5ac77d MDL-80340 behat: make query to fetch h5p attempts less strict 2024-01-09 16:15:57 +08:00
Sara Arjona 2def6cb4cd Merge branch 'MDL-78999_402' of https://github.com/santoshndev/moodle into MOODLE_402_STABLE 2024-01-08 16:38:44 +01:00
Paul Holden a85e2ca6ca MDL-80323 h5p: fail content type retrieval task on errors.
It's better for the task to fail gracefully rather than silently
swallow any errors, so that the task API can schedule re-tries.

If the endpoint is temporarily down and/or misbehaving, this will
allow admins to have clearer failures.
2024-01-08 10:06:43 +00:00
Huong Nguyen 72f3b26589 Merge branch 'MDL-73639-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2024-01-08 16:09:04 +07:00
Simey Lameze e7316bd9e3 MDL-73639 behat: improvements to the new recover grades test 2024-01-08 13:09:13 +08:00
Angelia Dela Cruz d203ed497e MDL-73639 core_grades: Behat to test Recover grades default settings 2024-01-08 13:09:13 +08:00
Ilya Tregubov 71f4243351 Merge branch 'MDL-69497-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-08 10:04:35 +08:00
Ilya Tregubov 2d61dd30e7 Merge branch 'MDL-79937-402_fixlessonmatching' of https://github.com/catalystfd/moodle into MOODLE_402_STABLE 2024-01-08 09:20:43 +08:00
Víctor Déniz a5f9878fc5 MDL-79681 user: fix conditional to get the last access to a course 2024-01-05 13:56:05 +00:00
Paul Holden a72d1e7e75 MDL-79681 user: fix participant filter "never accessed" options.
For courses, determine whether "Never accessed" should be available,
and correct the used value to match that expected by the API (-1).
2024-01-05 13:56:04 +00:00
Laurent David eee5c76aa3 MDL-80289 mod_bigbluebutton: Fix retrieval of meeting via meetingid 2024-01-05 11:15:17 +01:00
Santosh Nagargoje 78a8085801 MDL-78999 theme: Fixed site logo issue in small screens 2024-01-05 01:11:26 +05:30
Rajneel Totaram 96e9cd62ec MDL-79701 block_calendar_upcoming: Display activity name in tooltip 2024-01-05 07:18:01 +12:00
Paul Holden da8e3dd790 MDL-80523 mod_label: correct upgrade step select query parameters. 2024-01-04 16:22:37 +00:00
Paul Holden 930a5644c5 MDL-80532 block_myoverview: don't post sesskey to quickstart guide URL. 2024-01-04 14:38:41 +00:00
Paul Holden 3a3bde5a17 MDL-79927 files: scope toggleall checkboxes per filemanager instance.
Ensures that when multiple exist on the same page, each operates
independently of the others.
2024-01-04 13:22:46 +00:00
Paul Holden d690b1c0c8 MDL-80247 files: multi-byte aware filename shortening in exporter.
Also correctly extract the original file extension.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
Co-authored-by: Mazitov Artem <maz@2i.tusur.ru>
2024-01-04 13:20:26 +00:00
Sara Arjona 591cdd8211 weekly release 4.2.5+ 2024-01-04 12:02:06 +01:00
Sara Arjona 6fe0b2f549 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2024-01-04 12:02:02 +01:00
Sara Arjona 4558e3cc76 Merge branch 'MDL-79307-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-03 17:18:26 +01:00
Sara Arjona f553ee9fb6 Merge branch 'MDL-76719-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-01-03 16:32:48 +01:00
Huong Nguyen 93c949c3ae Merge branch 'MDL-80412-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-12-27 17:22:40 +07:00
AMOS bot b77f1985cc Automatically generated installer lang files 2023-12-23 00:11:25 +00:00
Jun Pataleta 8ec1e5d96a Moodle release 4.2.5 2023-12-22 10:01:03 +08:00
Jun Pataleta 924565f64a MDL-80041 gradereport_singleview: Implement grade validation
Implement grade validation for numeric grade overrides by setting
the type attribute for the grade input to number and setting a min
and max attribute values. Submitting the form with invalid values
will trigger built-in validation of the inputs.
2023-12-21 22:19:02 +08:00
Sara Arjona 28c4db5a53 weekly release 4.2.4+ 2023-12-21 13:34:26 +01:00
Paul Holden e8df849c04 MDL-80450 mod_resource: observe print intro setting when embedding. 2023-12-21 11:37:43 +00:00
Huong Nguyen 34b0267471 Merge branch 'MDL-80151-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-12-20 15:40:11 +07:00
Huong Nguyen 20712c35da MDL-80151 behat: Improve viewing site calendar step 2023-12-20 16:32:46 +08:00
Angelia Dela Cruz 5e2476c137 MDL-80151 mod_chat: Behat for chat repeat times and past session view 2023-12-20 16:32:46 +08:00
Simey Lameze 75a9f6c7bc MDL-80151 behat: add calendar step to navigate to specific view 2023-12-20 16:32:46 +08:00
Jun Pataleta 50c647ec32 Merge branch 'MDL-68124-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-12-20 15:01:17 +08:00
Simon Adams fb68a79b34 MDL-80357 theme_boost: Correctly interpolate SCSS
Fixes interpolation between SCSS setting and background images SCSS when SCSS setting is a single line comment
2023-12-19 15:26:42 +00:00
Jun Pataleta 8a52036e91 Merge branch 'MDL-80393-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-12-19 17:25:03 +08:00
Paul Holden 4baf48383b MDL-80446 mod_feedback: stricter selector for getting draggable items.
Ensure we don't also match inner nodes of the label question.
2023-12-19 08:27:28 +00:00
Jun Pataleta f48e9d5899 MDL-76723 core_tag: Use external_format_value constructor properly
* First parameter should be the field name that the format property
points to.
* No need for VALUE_REQUIRED since it's the default for the $required
parameter.
* Third parameter is the default value and not a description string.
2023-12-19 15:50:30 +08:00
Jun Pataleta 5b5a3fd550 MDL-76723 mod_page: Use external_format_value constructor properly
* 'Content format' is passed to the $default parameter which is
incorrect.
* Also removed passing of VALUE_REQUIRED because it's already the
default value for the $required parameter.
2023-12-19 15:50:30 +08:00
Jun Pataleta 23cbb7ffa4 MDL-76723 core_external: Handle format properties properly
- If a text format property defines the 'optional' attribute as true,
then the $required parameter that
is passed to \core\external\exporter::get_format_structure() should be
VALUE_OPTIONAL.
- If a default value is provided for a format property,
\core\external\exporter::get_format_structure() should pass the default
value to the external_format_value constructor.
- Added validation for external_format_value for the default parameter.
  Debugging will be shown in case an invalid default value is passed.
- Amended unit tests for better coverage.
2023-12-19 15:50:30 +08:00
Frédéric Massart 09f5efdbd7 MDL-76723 core_external: Test invalid required value for format fields 2023-12-19 15:50:30 +08:00
Paul Holden f78b33e6bf 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 07:48:02 +00:00
Jun Pataleta 797e4fbee0 MDL-80201 core: Check for default format value for exporter::export() 2023-12-19 15:47:08 +08:00
Andrew Nicols 40966eedaa MDL-59467 core: Use hasHelper instead of catching exception
When xdebug is set to break on exceptions it stops on all exceptions,
including _caught_ exceptions.

As a result we regularly hit this uniqid helper issue if debugging with
xdebug.

The solution is to check if the helper exists using the hasHelper method
instead of catching an exception when it does not exist.
2023-12-19 09:20:51 +08:00
Sara Arjona 46a4fafc46 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:48:59 +01:00
Huong Nguyen 92f457aa21 Merge branch 'MDL-80401-402' of https://github.com/aanabit/moodle into MOODLE_402_STABLE 2023-12-18 14:06:43 +07:00
Paul Holden cf85c59831 MDL-80412 reportbuilder: Behat scenario to view/sort additional names.
Related to fixes from 8f32e623.
2023-12-15 10:55:35 +00:00
Paul Holden 8aa82eff4a MDL-80412 reportbuilder: remove duplicate columns from order clause.
This works around a problem in SQL Server, which caused it to throw a
DML exception if the same column is duplicated in `ORDER BY` clause.

Backported from MDL-79270.
2023-12-15 10:54:14 +00:00
Huong Nguyen bc6e29023b weekly release 4.2.4+ 2023-12-15 08:44:39 +07:00
Huong Nguyen 13cf39fb4f Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-12-15 08:44:36 +07:00
Huong Nguyen f43d27963e Merge branch 'MDL-79828-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-12-14 10:15:27 +07:00
Huong Nguyen 285a480aaa Merge branch 'MDL-79050-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-12-14 09:57:00 +07:00
Huong Nguyen d57d384b29 Merge branch 'MDL-80394-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-12-14 09:22:58 +07:00
Ilya Tregubov 2923c911be Merge branch 'MDL-79938-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2023-12-14 08:51:23 +08:00
AMOS bot e89af7978b Automatically generated installer lang files 2023-12-14 00:11:09 +00:00
Angelia Dela Cruz c396f4a7b6 MDL-79050 Behat: Add behat coverage to retake lesson activity 2023-12-13 16:26:03 +08:00
Huong Nguyen f64a52cc7e Merge branch 'MDL-74466-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-12-13 09:29:13 +07:00
Ilya Tregubov f82c0f1a4b 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:21 +08:00
Ilya Tregubov d6bafb16a7 Merge branch 'MDL-80003_402' of https://github.com/PhilippImhof/moodle into MOODLE_402_STABLE 2023-12-13 09:22:36 +08:00
Sara Arjona 95cf12db60 Merge branch 'MDL-77572_402' of https://github.com/santoshndev/moodle into MOODLE_402_STABLE 2023-12-12 17:59:25 +01:00
sam marshall 498e5bea37 MDL-79938 Behat: Add steps to support multiple tabs 2023-12-12 16:43:52 +00:00
Santosh Nagargoje 99ce28a961 MDL-77572 Course: Added fix for section,activity visibility capabilities
fixed bug
2023-12-12 21:57:25 +05:30
Amaia Anabitarte b284d7852d MDL-80401 completion: New SCORM activity completion rules 2023-12-12 17:09:39 +01:00
Sara Arjona 6193d59626 Merge branch 'MDL-80315-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-12-12 14:19:57 +01:00
Sara Arjona 9bc9099ebe Merge branch 'MDL-79835_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-12-12 14:11:46 +01:00
Paul Holden f6cd4f8a45 MDL-80224 tool_uploaduser: better user defaults per site configuration.
Improve use of `core_user` type/default/choice definitions when setting
fields in the "Default values" form, used on upload.
2023-12-12 10:13:04 +00:00
Paul Holden a86fac1edb MDL-80374 grade: show localised plugin name in report column heading. 2023-12-11 10:35:04 +00:00
Marina Glancy 487e1c4ac6 MDL-80353 core_user: announce user selector changes to the screenreader 2023-12-08 15:29:44 +00:00
Huong Nguyen 86a0b87658 Moodle release 4.2.4 2023-12-08 09:21:47 +07:00
Mihail Geshoski c85976dcfc MDL-80246 tiny_equation: Escape elementid in the data-target attribute
Tabs use the value of the data-target attribute of the active tab link
to find and display the appropriate tab content. In some situations the
elementid value that is used to generate the data-target may contain
certain characters that have a special meaning in the selector context
(e.g. ".", ",", "#") and because of that the target element cannot be
correctly identified. To fix this problem the elementid value needs to
be escaped prior to generating the data-target attribute.
2023-12-08 09:51:20 +08:00
Francis Devine 889b850a42 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:07:46 +13:00
Paul Holden 2f71e00e81 MDL-80232 forumreport_summary: fix pagination count for summary report. 2023-12-07 17:25:49 +00:00
Philipp Imhof d021745498 MDL-80003 mod_quiz: watch all instances of tinyMCE 2023-12-07 17:30:12 +01:00
Sara Arjona 4f347438c5 weekly release 4.2.3+ 2023-12-07 16:22:08 +01:00
Paul Holden c151ed6853 MDL-79980 mod_survey: remove responses link if user cannot access.
Update Behat scenario to match.
2023-12-07 12:09:10 +01:00
Brendan Heywood e5fc6edb1d MDL-80309 tasks: Clean up mtrace logs 2023-12-07 12:07:55 +08:00
Huong Nguyen 27ad69c575 Merge branch 'MDL-80341_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-12-07 10:28:24 +07:00
Paul Holden c0a3fd11a0 MDL-79839 tool_task: clean task classname parameter prior to use. 2023-12-07 10:53:53 +08:00
Huong Nguyen 4329ce029a Merge branch 'MDL-79061-402-2' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-12-07 09:52:53 +07:00
Jun Pataleta f59a763929 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-07 10:43:47 +08:00
Ferran Recio 39f03ba9c3 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-07 10:43:47 +08:00
Huong Nguyen 9378404bc3 Merge branch 'MDL-68652-402-1' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-12-07 09:32:29 +07:00
Jun Pataleta b42ffb923c Merge branch 'MDL-80281_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-12-07 10:16:45 +08:00
Huong Nguyen 82968da537 Merge branch 'MDL-77136-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-12-07 08:36:50 +07:00
Paul Holden 21d1673c56 MDL-79980 mod_survey: respect activity group mode getting report. 2023-12-07 09:31:50 +08:00
Ilya Tregubov 28f37199f4 MDL-68652 core_grades: Only return allowed fields.
Grade iterator should check user permissions.
2023-12-07 09:13:26 +08:00
Ilya Tregubov 1c21156c4f Merge branch 'MOODLE_402_MDL-73378' of https://github.com/danielneis/moodle into MOODLE_402_STABLE 2023-12-07 09:02:37 +08:00
Paul Holden 115d05b7a1 MDL-80239 grade: escape matched data in user search results. 2023-12-07 08:42:57 +08:00
Paul Holden aedb7ff6e5 MDL-80287 grade: escape current value in search templates. 2023-12-07 08:36:49 +08:00
Tim Hunt 01515859f2 MDL-79835 behat_core_generator: remove misleading error obfuscation 2023-12-06 18:13:50 +00:00
Jun Pataleta a94f1b2db0 Merge branch 'MDL-80127_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-12-06 22:12:05 +08:00
Jun Pataleta 122fa72a27 Merge branch 'MDL-80079-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-12-06 21:58:35 +08:00
Luca Bösch 14e0e1423e MDL-77136 qtype_randomsamatch: Newest versions for shortanswer questions 2023-12-06 14:13:09 +01:00
Luca Bösch be87aed144 MDL-77136 core_question: Newest versions get_questions_from_categories 2023-12-06 14:13:09 +01:00
Tim Hunt de1396fd70 MDL-80127 question engine: prevent fatal errors from old bad data 2023-12-06 11:38:26 +00:00
Tim Hunt 4ab988703f MDL-80127 question engine: don't convert null to '' before storing 2023-12-06 11:38:24 +00:00
Tim Hunt 28cd6e023e 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:16:38 +00:00
Angelia Dela Cruz 4a66bfe57e 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:19:45 +08:00
Ilya Tregubov 32cd67aedd Merge branch 'MDL-76109-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-12-06 15:43:17 +08:00
Huong Nguyen f49269ef3a Merge branch 'MDL-50650-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-12-06 14:07:08 +07:00
Ilya Tregubov b928d8a604 Merge branch 'MDL-80043-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-12-06 15:00:52 +08:00
Stephan Robotta 74a3ed0258 MDL-41465 reports: In separate group mode, limit to same 2023-12-06 13:52:18 +07:00
Jun Pataleta 7a90b04fef 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. We don't really render a header on that page.
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:49:20 +08:00
Ilya Tregubov 5ad9b4ae57 MDL-68652 mod_forum: Only include gradable users in grading 2023-12-06 12:46:42 +08:00
David Woloszyn b39c9fb8d8 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 03:53:17 +01:00
Stevani Andolo fdacc779e7 MDL-80174 tool_log: ensure "other" data is safely unserialized. 2023-12-06 03:53:17 +01:00
Paul Holden 7bd8adfd89 MDL-80268 badges: require capability to view awarded badges. 2023-12-06 03:53:17 +01:00
Paul Holden 11128057ee MDL-79797 backup: ensure block config is safely unserialized. 2023-12-06 03:53:17 +01:00
Ilya Tregubov 7eb7b63231 Merge branch 'MDL-79692-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-12-06 10:50:34 +08:00
Huong Nguyen fb17f84e80 Merge branch 'MDL-80180-402' of https://github.com/jbs1/moodle into MOODLE_402_STABLE 2023-12-06 09:16:56 +07:00
Ilya Tregubov 5587eaa54f Merge branch 'MDL-74248-MOODLE_402_STABLE-fix_mp3_mod_folder' of https://github.com/praxisdigital/moodle into MOODLE_402_STABLE 2023-12-06 10:01:26 +08:00
Sara Arjona 37b2c0aabc Merge branch 'MDL-80286-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-12-05 16:42:19 +01:00
Sara Arjona 3d5fe79377 Merge branch 'MDL-79979-402' of https://github.com/aanabit/moodle into MOODLE_402_STABLE 2023-12-05 16:16:52 +01:00
Jun Pataleta e8a21f7636 Merge branch 'MDL-73974-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-12-05 23:09:05 +08:00
Karen Holland 5d3346bdb2 MDL-73974 tool_brickfield: Processing alpha fontsizes 2023-12-05 23:08:08 +08:00
Sara Arjona 02bb4161e1 Merge branch 'MDL-55640-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2023-12-05 16:02:00 +01:00
Sara Arjona e4f31a2a5b Merge branch 'MDL-80015-402' of https://github.com/roland04/moodle into MOODLE_402_STABLE 2023-12-05 15:51:35 +01:00
Sara Arjona 1a87ce267c Merge branch 'MDL-80254-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-12-05 15:45:43 +01:00
Paul Holden f4b502a493 MDL-79307 assignfeedback_editpdf: more informative task failure.
If ghostscript is not correctly configured the task will never
succeed, so error out earlier with a more informative exception
explaining this.
2023-12-05 12:20:30 +00:00
Jun Pataleta ec97ffa6cb Merge branch 'MDL-79806_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-12-05 12:48:20 +08:00
Huong Nguyen 25ab55144f Merge branch 'MDL-71336-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-12-05 11:20:05 +07:00
Jun Pataleta 3f013a6f89 Merge branch 'm42-mdl64431' of https://github.com/danmarsden/moodle into MOODLE_402_STABLE 2023-12-05 12:13:32 +08:00
Huong Nguyen 10bf4f5e27 Merge branch 'MOODLE_402_STABLE' of https://github.com/dragos5436/moodle into MOODLE_402_STABLE 2023-12-05 10:40:50 +07:00
Ilya Tregubov 175eb51e18 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:52:55 +08:00
Ilya Tregubov d18acd7025 MDL-68652 core_grades: Add a webservice to retrive only gradable users. 2023-12-05 10:52:55 +08:00
Ilya Tregubov 9a29ac8266 Merge branch 'MDL-80043-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-12-05 09:11:28 +08:00
Ilya Tregubov 2dc5cac7ec Merge branch 'MDL-80131-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-12-05 09:01:08 +08:00
Sara Arjona 4a6f8d9b13 Merge branch 'MDL-80185-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-12-04 11:00:50 +01:00
Paul Holden 67a3a39d11 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:44 +00:00
Paul Holden 11787aaa7f MDL-74466 repository: avoid passing around sesskey when not required. 2023-12-04 09:22:38 +00:00
Jun Pataleta bfa1b6cf19 Merge branch 'MDL-80221-402-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_402_STABLE 2023-12-04 16:11:21 +08:00
Ilya Tregubov c95b5bc821 MDL-50650 core_grades: Validate minimum grade when importing grades
Also add behat test for max and min grade validation.
2023-12-04 16:02:28 +08:00
Kyle Matter 2af9d3d576 MDL-50650 core_grades: allow grade imports larger than 100 points 2023-12-04 12:54:52 +08:00
Jun Pataleta 933261722b MDL-80131 mod_data: Make page titles unique 2023-12-02 07:20:45 +08:00
dragos5436 c36d886087 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:25:50 +00:00
Paul Holden 95446e49e2 MDL-76719 mod_assign: don't try to load user if there are none. 2023-12-01 13:17:40 +00:00
Paul Holden bb118b2328 MDL-69497 mod_assign: amend preference definitions for current user.
Ensure they can always be updated when using the grader.
2023-12-01 10:55:33 +00:00
David Mudrák 83054f331b MDL-80221 lang: Use fixed strings in the tests, too 2023-12-01 06:24:27 +01:00
Ilya Tregubov caacef2ea2 weekly release 4.2.3+ 2023-12-01 13:12:29 +08:00
Jun Pataleta 205d7dd83d MDL-80043 grade: Add upgrade.txt notes 2023-12-01 09:11:47 +08:00
Jun Pataleta e3592f4c44 MDL-80043 gradereport_grader: Define editingmode_title lang string 2023-12-01 09:11:47 +08:00
Jun Pataleta 8754e9c76e 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:11:47 +08:00
Jun Pataleta 0635ae4081 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:11:47 +08:00
Jun Pataleta e372e143ca MDL-80043 grade: Use heading parameter for the page title if provided 2023-12-01 09:11:46 +08:00
sam marshall e133aeef69 MDL-55640 setuplib: test_localcachedir fails sporadically 2023-11-30 13:58:23 +00:00
Paul Holden 328fe7ec6b 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:10 +00:00
Mark Johnson b43db639b3 MDL-79806 quiz_statistics: Queue recalculation on attempt_deleted 2023-11-30 08:53:34 +00:00
Jay Oswald 04b4eeb16a MDL-79091 core_badges: refactor bades cron task 2023-11-30 17:24:29 +11:00
Jay Oswald d70903a077 MDL-79091 core_badges: use adhoc tasks 2023-11-30 17:24:29 +11:00
Huong Nguyen b8e9bd5c1d Merge branch 'MDL-79816-402' of https://github.com/rmady/moodle into MOODLE_402_STABLE 2023-11-30 10:40:57 +07:00
Meirza 5d7492c54a 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:33 +07:00
Huong Nguyen c2f8ca5fd5 Merge branch 'MDL-74378_402' of https://github.com/PhilippImhof/moodle into MOODLE_402_STABLE 2023-11-30 10:12:05 +07:00
Ilya Tregubov 254d53cee8 Merge branch 'MDL-79890-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-11-30 10:45:20 +08:00
Ilya Tregubov d98419ea93 Merge branch 'MDL-78849-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-11-30 10:38:31 +08:00
Mihail Geshoski c9c5947e1c MDL-80270 gradereport_grader: User row as the last row cannot be sticky
In certain scenarios, a user row can be the last row in the grader
report table. The current logic does not take this into account and
always pins the last row regardless of the type.
This change ensures that the last row is not a user row before executing
the logic responsible for pinning this row.
2023-11-30 09:58:54 +08:00
Ilya Tregubov e045c69681 Merge branch 'MDL-79325-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-11-30 09:35:11 +08:00
Jun Pataleta 27c51d0fab Merge branch 'MDL-79841-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-11-29 23:48:30 +08:00
Sara Arjona 3028b06859 Merge branch 'MDL-79275-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-11-29 16:44:05 +01:00
Jun Pataleta d12944b1a3 Merge branch 'MDL-80234-402' of https://github.com/aanabit/moodle into MOODLE_402_STABLE 2023-11-29 23:40:35 +08:00
Sara Arjona 27354b214d Merge branch 'MDL-80150-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-11-29 13:34:47 +01:00
Jun Pataleta b8f71fe67f Merge branch 'MDL-79148-402' of https://github.com/ssj365/moodle into MOODLE_402_STABLE 2023-11-29 15:20:18 +08:00
Huong Nguyen 95981fec91 Merge branch 'v_4_2_0' of https://github.com/dominicchinkh/moodle into MOODLE_402_STABLE 2023-11-29 10:33:39 +07:00
Huong Nguyen b705bcd66f Merge branch 'MDL-80002-402' of https://github.com/roland04/moodle into MOODLE_402_STABLE 2023-11-29 09:36:28 +07:00
Huong Nguyen 6de7215961 Merge branch 'MDL-79267-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-11-29 09:18:08 +07:00
Huong Nguyen aef3c1d974 Merge branch 'MDL-79512-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-11-29 09:09:01 +07:00
Jake Dallimore 3a086999f0 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-29 09:00:41 +07:00
Jun Pataleta 07fb55e3b1 Merge branch 'MDL-80181-402' of https://github.com/srobotta/moodle into MOODLE_402_STABLE 2023-11-29 09:37:40 +08:00
Sara Arjona 43a10cb268 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:07:07 +01:00
Jeremy Schulz 21613c49b3 MDL-80180 admin: added readonly support for multicheckbox 2023-11-28 14:35:23 -05:00
Helen Foster d6a1af70d8 MDL-80221 lang: Import fixed English strings (en_fix) 2023-11-28 19:51:58 +01:00
Pascal Hamar 8641eaa822 MDL-36733 qtype_calculated: Wildcards in calculated question hints
The placeholders for the hints are properly replaced by this change and any formulas present are replaced.

The validation is performed by the existing function qtype_calculated_find_formula_errors(),
which is called by the calculate() function,
which in turn is called by the variable substituter "vs" using the replace_expressions_in_text() function.

vs -> replace_expressions_in_text() -> calculate() -> qtype_calculated_find_formula_errors().
2023-11-28 18:47:45 +01:00
Mark Johnson 03c4de78ae 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:21:32 +00:00
Shamiso.Jaravaza 0240b8fee1 MDL-79148 mod_bigbluebuttonbn: fix recording link 2023-11-27 23:57:37 -07:00
Ilya Tregubov eaa7bdec56 Merge branch 'MDL-79603-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-11-28 13:53:44 +08:00
Laurent David 034d447375 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:37:32 +01:00
Simey Lameze ea693e675e MDL-79275 behat: add one second wait to avoid random 2023-11-28 11:05:12 +08:00
Amaia Anabitarte adc1e510ad MDL-80234 mod_scorm: Saved passed status requirement 2023-11-24 21:25:20 +01:00
Stephan Robotta cc0aa28495 MDL-80181 wiki: fix width of left column in comments 2023-11-24 11:18:04 +01:00
Philipp Imhof e0b8adbb98 MDL-74378 mod_quiz: make sure timer is initialized 2023-11-24 08:52:20 +01:00
Huong Nguyen 253028f813 weekly release 4.2.3+ 2023-11-24 12:23:20 +07:00
Huong Nguyen fdcd9ca6e4 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-11-24 12:23:17 +07:00
David Woloszyn f59d91480d MDL-80229 core: Add tolerance to min_get_minimum_revision 2023-11-24 15:54:11 +11:00
Eloy Lafuente (stronk7) af58302ff7 Merge branch 'MDL-79966-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2023-11-23 23:41:06 +01:00
sam marshall edb057d922 MDL-79966 core_task: NEVER_RUN_TIME did not fit in 10 digits 2023-11-23 16:24:15 +00:00
Rodrigo Mady 6f55283c98 MDL-79816 block_recentlyaccesseditems: Fix modname type in WS 2023-11-23 11:54:30 -03:00
Paul Holden d264ccea06 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:33 +00:00
Andrew Nicols 5b9fc748bb Merge branch 'MDL-79966-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2023-11-23 10:31:51 +08:00
Huong Nguyen 5ad71ada1d Merge branch 'MDL-78496-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-11-23 09:23:29 +07:00
Ilya Tregubov 02e4d6c6c5 Merge branch 'MDL-80157_storedfileproblem-402' of https://github.com/leonstr/moodle into MOODLE_402_STABLE 2023-11-23 09:47:26 +08:00
Ilya Tregubov f91b44c004 Merge branch 'MDL-79185-MOODLE_402_STABLE' of https://github.com/dmitriim/moodle into MOODLE_402_STABLE 2023-11-22 11:48:30 +08:00
Dmitrii Metelkin 521ca60292 MDL-79185 cache: don't throw exception if cache data is corrupted 2023-11-22 12:48:49 +11:00
Ilya Tregubov fb76e3a046 Merge branch 'MDL-78670-402' of https://github.com/rmady/moodle into MOODLE_402_STABLE 2023-11-22 09:11:21 +08:00
Paul Holden 9078635183 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:31 +00:00
Mikel Martín 0393e4cce5 MDL-80015 course: Fix category 'More' dropdown alignment
Co-authored-by: Stephen Sharpe <stephen.sharpe@synergy-learning.com>
2023-11-21 14:15:42 +01:00
Angelia Dela Cruz a0fdbfac3a MDL-79828 core_badges: Delete already awarded course badges 2023-11-21 17:23:46 +08:00
Amaia Anabitarte 6ccdd08641 MDL-79979 tool_generator: Use auto-enrol admin in new courses setting 2023-11-21 08:43:14 +01:00
sam marshall 8f01753027 MDL-79966 core_task: Scheduled task timing (crontab fields) is wrong 2023-11-20 17:11:32 +00:00
Rodrigo Mady 903c67404f MDL-78670 mod_quiz: Add offline atempt rule for sequential navigation 2023-11-20 12:08:24 -03:00
Juan Olivares 5cd19b757f 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:29:36 +01:00
Huong Nguyen 321facce94 Merge branch 'MDL-79604-402' of https://github.com/srobotta/moodle into MOODLE_402_STABLE 2023-11-20 14:01:52 +07:00
Laurent David 1358d27f82 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:22 +01:00
Laurent David 2fe64cf016 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:21 +01:00
AMOS bot f761432b06 Automatically generated installer lang files 2023-11-20 00:10:40 +00:00
Leon Stringer eba5cdff20 MDL-80157 file: Exception message spelling 2023-11-17 14:36:22 +00:00
Paul Holden b34a5d8376 MDL-79325 group: consistent name formatting in overview page/export. 2023-11-17 09:48:12 +00:00
Dominic Chin 6905fec8b3 MDL-80035 theme_boost: Fix fourth argument of single_button constructor 2023-11-17 09:15:12 +11:00
Sara Arjona 3790c0a8fe weekly release 4.2.3+ 2023-11-16 16:22:40 +01:00
Sara Arjona 5076567efd Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-11-16 16:22:36 +01:00
Paul Holden 3cc243bbd9 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:02 +00:00
Huong Nguyen 5652247245 Merge branch 'MDL-76457-402' of https://github.com/roland04/moodle into MOODLE_402_STABLE 2023-11-16 10:58:39 +07:00
Huong Nguyen acd56e570f Merge branch 'MDL-80066-402' of https://github.com/elza3ym/moodle into MOODLE_402_STABLE 2023-11-16 10:53:20 +07:00
Ilya Tregubov 94904e3d33 Merge branch 'MDL-80121-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-11-16 10:01:24 +08:00
Ilya Tregubov 309ef4f8cf Merge branch 'MDL-75616-402' of https://github.com/davewoloszyn/moodle into MOODLE_402_STABLE 2023-11-16 09:23:38 +08:00
Mohamed Shehata 28d83c2e26 MDL-80066 form: fix date picker on small screens 2023-11-15 23:45:25 +02:00
Sara Arjona 129ca39c6d Merge branch 'MDL-79981-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-11-15 17:10:16 +01:00
Sara Arjona 5d93ccf205 Merge branch 'MDL-76937-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-11-15 16:33:14 +01:00
Sara Arjona ec412116cf Merge branch 'MDL-79697-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-11-15 16:15:56 +01:00
Andrew Nicols 328bf5f691 MDL-79697 core: PSR-4 NS can be spread across multiple dirs
The PSR-4 specification does not preclude a single namespaces from
having multiple sources. This is the case for several PSR standards
including standard packagist packages distributed by PSR:

- PSR-7 - HTTP Message Interfaces: \Psr\Http\Message
- PSR-17 - HTTP Factories: \Psr\Http\Message
- PSR-15 - http-server-handler: \Psr\Http\Server
- PSR-15 - http-server-middleware: \Psr\Http\Server
2023-11-15 21:25:08 +08:00
Sara Arjona e8356d64a8 Merge branch 'MDL-80045-402' of https://github.com/roland04/moodle into MOODLE_402_STABLE 2023-11-15 13:47:15 +01:00
Sara Arjona c2d63c1044 Merge branch 'MDL-79956-402' of https://github.com/ssj365/moodle into MOODLE_402_STABLE 2023-11-15 13:31:58 +01:00
Jun Pataleta 3c339154c8 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:29:05 +08:00
Jun Pataleta ac6f82440a 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:29:01 +08:00
Stephan Robotta f9a852881f MDL-79604 mod_data: exception if mandatory checkox list is missing 2023-11-15 12:23:51 +01:00
Dan Marsden 63c92d18f4 MDL-64431 assignfeedback_editpdf: Flatten PDF files 2023-11-15 19:29:09 +13:00
Angelia Dela Cruz c6d048f6fc MDL-79603 mod_scorm: Behat coverage for Scorm package display options 2023-11-15 10:53:41 +08:00
Huong Nguyen a5dd36b647 Merge branch 'MDL-79648-402' of https://github.com/SergioComeron/moodle into MOODLE_402_STABLE 2023-11-15 09:13:59 +07:00
Huong Nguyen 07f4965b83 Merge branch 'MDL-79601-402' of https://github.com/roland04/moodle into MOODLE_402_STABLE 2023-11-15 09:09:45 +07:00
Andrew Nicols bed2ece03a MDL-79890 core: Stop using get_class() without args
PHP 8.3 deprecates the use of `get_class()` without arguments. The
following alternatives should instead be used as appropriate:

- `get_class($this)` - The equivalent for instance methods
- `self::class` - The current class

Note that the behaviour of `get_class()` in a static method was
equivalent to `self::class` and _not_ `static::class`. That is to say
that the previous behaviour did not respect late static binding.
2023-11-15 09:14:08 +08:00
Andrew Nicols 4e03a113fa MDL-79890 core: ReflectionProperties::setValue() should take 2 args
Since PHP 8.3 setValue() must be called with null as the first arg if
called statically.
2023-11-15 09:13:08 +08:00
Mikel Martín e0f753bf5a MDL-76457 tool_usertours: Fix tour popovers in RTL 2023-11-14 21:27:44 +01:00
Mikel Martín 991926e9b6 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:44 +01:00
Sara Arjona 9bd4f7f93f MDL-77581 lesson: Fix behat random failures 2023-11-14 16:24:49 +01:00
Andrew Nicols ce9a65ce4d 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 22:47:55 +08:00
Andrew Nicols e7c8762353 MDL-80079 core: Correct incorrect arg to format_text::$options 2023-11-14 22:28:55 +08:00
Andrew Nicols 79a42253c3 MDL-80079 core: Correct incorrect arg to format_string::$options 2023-11-14 22:28:55 +08:00
Mikel Martín 07eb0e821e MDL-80045 block_starredcourses: Fix cards alignment in small screens 2023-11-14 14:36:29 +01:00
Sara Arjona 5f5a393f32 Merge branch 'MDL-77581-402' of https://github.com/dpalou/moodle into MOODLE_402_STABLE 2023-11-14 11:52:56 +01:00
Dani Palou 5409754f3d MDL-77581 lesson: Fix generator unit tests in oracle 2023-11-14 11:10:00 +01:00
SergioComeron 8cd37b6a4e MDL-79648 core_course: 29 October repeating day 2023-11-13 18:33:20 +01:00
Sara Arjona cf63a0afcc Merge branch 'MDL-77581-402' of https://github.com/dpalou/moodle into MOODLE_402_STABLE 2023-11-13 17:20:14 +01:00
Mark Johnson 03d18db837 MDL-79806 mod_quiz: Implement new quiz_attempt_deleted callback 2023-11-13 15:07:19 +00:00
Paul Holden 3aa910c237 MDL-79692 enrol_meta: check for group validity when adding members. 2023-11-13 10:23:20 +00:00
Huong Nguyen 7e5e176f43 Merge branch 'MDL-74129-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-11-13 10:43:36 +07:00
David Saylor c808279568 MDL-75616 backup: Use standard temp directory for extraction 2023-11-13 11:08:25 +11:00
AMOS bot 46363d6f0f Automatically generated installer lang files 2023-11-12 00:10:11 +00:00
Sara Arjona ee8960fdd7 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:33:57 +01:00
Ilya Tregubov d7e3b07082 weekly release 4.2.3+ 2023-11-10 09:17:20 +08:00
Dani Palou 9efd86d55b MDL-77581 behat: Test create lesson pages using UI 2023-11-09 11:32:53 +01:00
Dani Palou cd5d5a3090 MDL-77581 behat: Apply new lesson cluster generators to existing tests 2023-11-09 11:32:53 +01:00
Dani Palou 7cb334e138 MDL-77581 behat: Create generators for lesson clusters 2023-11-09 11:32:53 +01:00
Dani Palou dcc18dced2 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:07:00 +01:00
Dani Palou b4c4904af1 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:06:43 +01:00
Dani Palou 40bf6fced0 MDL-77581 behat: Apply new lesson generators to existing tests 2023-11-09 11:06:33 +01:00
Dani Palou 6e979a85c0 MDL-77581 behat: Create generators for lesson pages and answers 2023-11-09 11:04:00 +01:00
Dani Palou a27cae466c MDL-77581 behat: Support finish_generate_ in generators 2023-11-09 11:03:43 +01:00
Shamiso.Jaravaza f201ab66d3 MDL-79956 mod_bigbluebuttonbn: fix import links 2023-11-08 21:47:29 -07:00
Michael Aherne 75fae6a479 MDL-80030 filelib: Fix info type. 2023-11-09 11:13:59 +08:00
Ilya Tregubov 9e94c6b857 Merge branch 'MDL-79992-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-11-09 09:57:41 +08:00
Sara Arjona 17571e2f05 Merge branch 'MDL-79827-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-11-08 18:10:49 +01:00
Sara Arjona 81cf77e4e2 Merge branch 'MDL-79975-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-11-08 18:03:14 +01:00
Sara Arjona d716c7e54b Merge branch 'MDL-79781-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-11-08 17:20:08 +01:00
Sara Arjona 7396a627fc Merge branch 'MDL-76555-402' of https://github.com/pmaneggia/moodle into MOODLE_402_STABLE 2023-11-08 17:06:24 +01:00
Mikel Martín 0a6c151515 MDL-79601 report_completion: Fix RTL First/Last name alignment 2023-11-08 16:23:32 +01:00
Mikel Martín 1af6dd1035 MDL-79601 report_progress: Fix RTL First/Last name alignment 2023-11-08 16:23:32 +01:00
Laurent David c5f89e6730 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-08 07:53:18 +01:00
Andrew Nicols 7364fe4716 MDL-79981 core: Add ability to manually run and filter phpunit on GHA 2023-11-08 12:53:54 +08:00
Ilya Tregubov f6a14afe2d Merge branch 'MDL-79615_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-11-08 10:43:39 +08:00
Huong Nguyen c4db30f0ef Merge branch 'MDL-79739-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-11-08 09:24:09 +07:00
Ilya Tregubov d1cdb4dce5 Merge branch 'MDL-79858-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-11-08 09:50:05 +08:00
Paul Holden d6ffa9bd39 MDL-79267 mod_forum: define report subplugin type language strings. 2023-11-07 09:50:02 +00:00
Huong Nguyen de9d123349 Merge branch 'MDL-78953-402' of https://github.com/pedrojordao/moodle into MOODLE_402_STABLE 2023-11-07 15:34:06 +07:00
Jun Pataleta bdba59a789 Merge branch 'MDL-80019-402' of https://github.com/call-learning/moodle into MOODLE_402_STABLE 2023-11-07 13:13:36 +08:00
Laurent David ee4849900d 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:11:31 +01:00
Sara Arjona 144c6b4dae Merge branch 'mdl-78650-402-stable' of https://github.com/Fragonite/moodle into MOODLE_402_STABLE 2023-11-06 09:51:06 +01:00
Huong Nguyen ec1f6f2cf5 Merge branch 'MDL-79062-402-2' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-11-06 10:52:18 +07:00
Paola Maneggia 02ca268931 MDL-76555 mod_resource: Fix PHP8.0 type error (legacy resources) 2023-11-05 13:47:32 +01:00
Mikel Martín e66840a3a7 MDL-80002 forumreport_summary: Fix summary report date filtering 2023-11-03 15:47:33 +01:00
Sara Arjona f58a867a50 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:26 +01:00
Pedro Jordao 1ff16a3823 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 18:55:48 -03:00
Paul Holden d4596bf0a0 MDL-79975 tool_task: correct class attribute table cell property. 2023-11-02 13:19:57 +00:00
Sara Arjona 5d44f11444 weekly release 4.2.3+ 2023-11-02 13:41:09 +01:00
Jun Pataleta dc5a065006 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 17:32:42 +08:00
Jun Pataleta 7e5a2f73df MDL-79062 grades: Sort-by-name menu item accessibility fixes
* <h6> tags cannot be in table cells. Replace them with <div> tags.
* Group the ascending/descending sort menu items to better indicate
where they belong to.
2023-11-02 17:32:42 +08:00
Jun Pataleta 25c1db7275 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 17:32:42 +08:00
Huong Nguyen 467a6be1f1 Merge branch 'MDL-78903-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-11-02 10:18:48 +07:00
Huong Nguyen f4e322aa3c Merge branch 'MDL-79801-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-11-02 10:15:15 +07:00
Huong Nguyen 4fb844989a Merge branch 'MDL-79617_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-11-02 09:04:49 +07:00
Jun Pataleta 6f91e223e1 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:50:42 +08:00
Alexander Van der Bellen b77c00f3f5 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:34:42 +08:00
Alexander Van der Bellen ec78f6135b MDL-78650 mod_assign: Add Behat test 2023-11-01 20:34:36 +08:00
Alexander Van der Bellen 82acec75cb MDL-78650 mod_assign: Add unit test 2023-11-01 20:34:33 +08:00
Daniel Neis Araujo fcaf6f601e MDL-73378 gradebook: Category grade null when all subgrades are null 2023-10-31 13:55:10 -03:00
Sara Arjona 900a3f35ef Merge branch 'MDL-79856-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-10-31 13:26:37 +01:00
Jun Pataleta fbd085e68d Merge branch 'MDL-79853-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-10-31 16:45:56 +08:00
Huong Nguyen 22d17775f6 Merge branch 'MDL-79807_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-10-31 12:51:18 +08:00
Meirza 90408b2e64 MDL-78903 tiny_h5p: show repositories if editor filepicker type set 2023-10-31 08:04:35 +07:00
Meirza ae3fac6ddd MDL-78903 tiny_media: show repositories if editor filepicker type set 2023-10-31 08:04:21 +07:00
Jun Pataleta 2269130354 Merge branch 'MDL-77274-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-10-30 17:13:50 +08:00
Laurent David bbd015f89b 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:17:57 +01:00
Huong Nguyen 8186259f7e Merge branch 'MDL-79639_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-10-30 11:23:40 +07:00
Jun Pataleta be729ebf64 Merge branch 'MDL-79194-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-10-27 23:31:56 +08:00
Mark Johnson 690b27c832 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:51:45 +01:00
Jun Pataleta 3b0433e44d Merge branch 'MDL-77364-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-10-27 16:33:55 +08:00
Sara Arjona 074d411eb7 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:32 +02:00
Jun Pataleta 933c9c0756 weekly release 4.2.3+ 2023-10-27 09:43:08 +08:00
Jun Pataleta d9e4881aa5 Merge branch 'MDL-79768-402-fix' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-10-26 23:05:41 +08:00
Mark Johnson 9586685724 MDL-79807 quiz_statistics: Clear stats cache when question added/removed 2023-10-26 13:44:44 +01:00
Paul Holden 8561485239 MDL-79858 block_myoverview: correctly export request course button. 2023-10-26 13:40:37 +01:00
Paul Holden 479faa9735 MDL-79781 course: detect invalid creator role for pending courses. 2023-10-26 13:18:39 +01:00
Ferran Recio 41f098e7da 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 14:11:10 +02:00
Paul Holden 8be8e244dd MDL-79856 roles: use role localname when confirming deletion. 2023-10-26 12:01:02 +01:00
Angelia Dela Cruz b5d5825b3f MDL-79768 fix: Fixed random failing Behat due to time difference 2023-10-26 18:02:08 +08:00
Andrew Nicols 38f2aaf4d7 MDL-79853 core: Add phpunit options to manual runs 2023-10-26 14:48:59 +08:00
Jun Pataleta d014dc94ab Merge branch 'MDL-79768-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-10-26 10:47:48 +08:00
Jun Pataleta 4c041328c8 Merge branch 'MDL-42189-402' of https://github.com/davewoloszyn/moodle into MOODLE_402_STABLE 2023-10-26 10:32:08 +08:00
Jun Pataleta e68ebb8a7b Merge branch 'MDL-75572-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-10-25 13:44:33 +08:00
Sara Arjona 65f0bfdc49 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:07:39 +02:00
Andrew Lyons 560c42964d 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-24 13:40:48 +08:00
Jun Pataleta faa16533da Merge branch 'MDL-79637-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-10-24 10:49:05 +08:00
Paul Holden 926fe4f429 MDL-79827 tiny_link: show repositories only if editor filepicker set. 2023-10-23 22:07:01 +01:00
Mark Johnson a9ed3dd710 MDL-79617 repository_upload: Close session early in upload process 2023-10-23 15:32:36 +01:00
Angelia Dela Cruz b3afaa0c54 MDL-79768 mod_data: Test for student can see upcoming data activity 2023-10-23 08:48:27 +08:00
David Woloszyn 8d3962e056 MDL-42189 gradereport_overview: Report hidden from suspended enrolments 2023-10-23 09:47:08 +11:00
Paul Holden 1fcd9911d9 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:27 +01:00
Sara Arjona bfb3763947 weekly release 4.2.3+ 2023-10-20 12:16:24 +02:00
Huong Nguyen 3549288d8d Merge branch 'MDL-78775-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-10-20 09:30:30 +07:00
Ilya Tregubov 025ab5fc7f MDL-78775 gradereport_grade: Fix Behat.
Sort by lastname before doing any assertions.
2023-10-20 09:57:00 +08:00
Mark Johnson 6a9e714c97 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:07 +01:00
Huong Nguyen 25b30d5a43 Merge branch 'MDL-79689-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-10-19 10:04:31 +07:00
Sara Arjona 16cc533e46 Merge branch 'MDL-79635-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-10-18 19:55:55 +02:00
Sara Arjona 855bc6da54 Merge branch 'MDL-77651-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-10-18 15:47:17 +02:00
Sara Arjona 8e34fa9bf8 Merge branch 'MDL-79747_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-10-18 10:29:02 +02:00
Huong Nguyen a3f5947c41 Merge branch 'MDL-78775-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-10-18 12:57:47 +07:00
Ilya Tregubov a780e2253e MDL-78775 core_grades: Fix Behat 2023-10-18 12:53:02 +08:00
Angelia Dela Cruz e6c9273720 MDL-79689 mod_assign: Behat for enabling anonymous submissions 2023-10-18 10:52:57 +08:00
Huong Nguyen bc075c9653 Merge branch 'MDL-79705-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-10-18 09:37:05 +07:00
Huong Nguyen fd1ce04f08 Merge branch 'MDL-78979-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-10-18 09:23:53 +07:00
Jun Pataleta f52f6d5719 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:52:01 +08:00
Jun Pataleta a7d8106957 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:52:01 +08:00
Paul Holden f80cf55ab3 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:31 +01:00
Paul Holden 6cc24abb78 MDL-79705 profilefield_checkbox: display data as simple Yes/No. 2023-10-17 16:51:31 +01:00
Tim Hunt 04d92abc79 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:44:08 +01:00
Sara Arjona c1db959770 Merge branch 'MDL-78481-402' of https://github.com/iarenaza/moodle into MOODLE_402_STABLE 2023-10-17 17:15:17 +02:00
Andrew Nicols 7544f66e0e MDL-79739 core: Only run some tests in separate processes 2023-10-17 12:21:21 +08:00
Huong Nguyen a7cf0a9da8 Merge branch 'MDL-78775-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-10-17 10:47:41 +07:00
Ilya Tregubov 9d602fb813 Merge branch 'MDL-79691-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-10-17 10:28:49 +08:00
Huong Nguyen d1bb8ef0f5 Merge branch 'MDL-79367-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-10-17 09:18:05 +07:00
Paul Holden 9ebc3f2fdc MDL-78979 mod_data: correct restore decode rule for data view page. 2023-10-16 20:53:58 +01:00
Angelia Dela Cruz 5dca2f72dd MDL-79691 mod_h5pactivity: Behat coverage for H5P activity grades reset 2023-10-16 16:52:41 +08:00
Sara Arjona a03972b0f3 Merge branch 'MDL-79566-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2023-10-16 09:53:53 +02:00
Ilya Tregubov 6444c72bed Merge branch 'MDL-79365-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-10-16 14:08:23 +08:00
Sara Arjona 895c094a9b 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:54:07 +02:00
Huong Nguyen e57d09c00d Merge branch 'MDL-79698-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-10-16 11:40:09 +07:00
Huong Nguyen dcb935bf21 Merge branch 'MDL-79653-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-10-16 10:54:59 +07:00
Huong Nguyen ebb8eeb4bd Merge branch 'MDL-79352-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-10-16 10:42:29 +07:00
Huong Nguyen b93fa5e412 MDL-79566 tiny_autosave: Add Javascript submission handler 2023-10-16 09:29:22 +07:00
Paul Holden c426f8e97e MDL-79365 customfield_textarea: ensure field uniqueness is correct. 2023-10-13 14:30:02 +01:00
Andrew Nicols c6ca6cd629 MDL-79698 core: Correct duplicate array key in test provider 2023-10-13 15:44:26 +08:00
Ilya Tregubov f0c782c87c MDL-78775 core_grades: Fix saving on grader report page
When we have a pagination on grader page and search for user
that is not on first page, saving was throwing an error
since page didn't have enough data
2023-10-13 14:20:11 +08:00
Ilya Tregubov ce43783c16 weekly release 4.2.3+ 2023-10-13 13:39:28 +08:00
Angelia Dela Cruz e1168e9a33 MDL-79653 gradingform_guide: Behat coverage for deleting marking guide 2023-10-13 10:58:57 +08:00
Huong Nguyen f97a376cd7 Merge branch 'MDL-79638-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-10-12 11:07:41 +07:00
Ilya Tregubov f71088b26a Merge branch 'MDL-79160-402' of https://github.com/danghieu1407/moodle into MOODLE_402_STABLE 2023-10-12 09:44:01 +08:00
Ilya Tregubov d3d0e0d147 Merge branch 'MDL-79422-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-10-12 09:09:52 +08:00
Jun Pataleta 4a2b27a493 Merge branch 'MDL-79611-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-10-11 18:15:32 +08:00
Jun Pataleta 7cb3f15da7 Merge branch 'MDL-79633-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-10-11 13:41:24 +08:00
Huong Nguyen 086cdc566b Merge branch 'MDL-78103-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2023-10-11 11:25:30 +07:00
chen levy d009f95aeb MDL-78103 theme: Fixed dropdown menu size by the content 2023-10-11 11:14:43 +07:00
Andrew Nicols 77f8e2b834 MDL-79637 phpunit: Do not reset DB during init of isolated tests
During the bootstrap of PHPUnit we ensure that the database has been
reset to its initial state.

We do this by checking the internally-stored DB write count between
runs. If the count is not yet set (null), or it has been increased, we
force a reset.

When running an isolated test the test runner resets the database, it
then sets up a new isolated test environment by writing a new PHPUnit
test case and passing it to a new PHP Process using standard in. As part
of this, the bootstrap is run for that process.

Because we are in a new process, the db write count is fresh and not yet
set. This has been leading to an additional db reset before the isolated
test.

To handle this we want to _not_ perform a reset during the
initialisation for isolated runs. We know that the DB is in a fresh
state before we start the run.

To support this we need to know whether the test is an isolated test
during the bootstrap, which means we cannot use the previous approach to
calculating this.

Instead we look at the PHP_SELF value. PHP sets this to "Standard input
code" when run from stdin, instead of running a file.

There should not be any other legitimate reason to run a PHPUnit
bootstrap via this stdin approach.

Unfortunately this approach is a little bit risky as it depends on the
presence of a specific string, however this string has been in place
since 2016, and there is no legitimate way of calculating this.

I did consider looking at whether the called script included `/vendor/`
and `/phpunit`, but this is also likely a risky approach if someone
calls PHPUnit in an unexpected way.

This approach is itself unit tested so any change to PHP's stdin string
before we deprecate this approach entirely in 12 months time will be
caught.
2023-10-11 09:29:26 +08:00
Andrew Nicols a4cf2b2a59 MDL-79638 phpunit: Add unit test for increment resets 2023-10-11 00:10:33 +08:00
Andrew Nicols f3de0635a1 MDL-79638 phpunit: Remove 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 hte patch from there.

Moodle has required MySQL 8.0, and MariaDB 10.6.7 since Moodle 4.2 and
it is therefore safe to remove these hacks.
2023-10-10 23:35:55 +08:00
Sara Arjona 1f3cf81ff2 Merge branch 'MDL-79623-MOODLE_402_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_402_STABLE 2023-10-10 16:19:25 +02:00
Paul Holden 7e7f7fc803 MDL-79635 group: ensure unique params used to determine visibility.
Or we'll trigger DML "Incorrect number of query parameters" exception.
2023-10-10 10:08:59 +01:00
Sara Arjona 09740de2e2 Merge branch 'MDL-77816-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-10-10 09:21:34 +02:00
Ilya Tregubov 914fadcd2c Merge branch 'MDL-79501-MOODLE_402_STABLE' of https://github.com/geichelberger/moodle into MOODLE_402_STABLE 2023-10-10 15:07:01 +08:00
Ilya Tregubov 8d4c5ee417 Merge branch 'MDL-79279_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-10-10 11:24:12 +08:00
Ilya Tregubov 608528726a Merge branch 'MDL-71414-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-10-10 10:19:22 +08:00
Paul Holden 3cbd94ce8b MDL-79633 mod_data: correct timemodified tag replacement attribute. 2023-10-09 19:41:10 +01:00
Paul Holden c911a134fd MDL-79352 admin: fix links to tool plugin management page. 2023-10-09 15:11:18 +01:00
Laurent David 2e95ee0fb2 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:57:44 +02:00
Laurent David cdbfb77b5c 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:57:43 +02:00
Philipp Memmel fb15469759 MDL-79623 tool_componentlibrary: Fix correct modal content attribute 2023-10-09 09:05:44 +00:00
Jun Pataleta 9713039354 Moodle release 4.2.3 2023-10-07 11:30:16 +08:00
Sara Arjona 88bfa9978a weekly release 4.2.2+ 2023-10-06 14:02:16 +02:00
Paul Holden aed9018825 MDL-79611 group: early exit getting members of non-existing group. 2023-10-05 22:37:00 +01:00
danghieu1407 a375941564 MDL-79160 Question: Answer field overflows parent width with large size 2023-10-05 11:03:30 +07:00
Paul Holden d07882d219 MDL-77816 mod_bigbluebuttonbn: feedback when validating completion. 2023-10-04 21:06:40 +01:00
Yannick Schillinger 262a3951ae MDL-77816 mod_bigbluebuttonbn: Fix completionValidate argument format 2023-10-04 20:27:27 +01:00
Paul Holden 53f4b83cb4 MDL-79310 enrol: restrict searched users to those user can view. 2023-10-04 14:31:12 +08:00
Paul Holden f39c15df3e MDL-79310 forumreport_summary: report only on users who can be viewed. 2023-10-04 14:31:12 +08:00
Paul Holden 8c379e2040 MDL-79310 mod_forum: ensure only visible users can be exported. 2023-10-04 14:31:12 +08:00
Sara Arjona 78c09ca6b4 Merge branch 'MDL-69119-M402_angle_bracket_character_in_answers_not_escaped_in_moodle_xml_export_of_multiple_choice_calculated_questions' of https://github.com/ziegenberg/moodle into MOODLE_402_STABLE 2023-10-04 07:51:36 +02:00
Huong Nguyen 01e88f37c0 Merge branch 'MDL-79539-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-10-04 10:55:02 +07:00
Mikel Martín 924fa47b5b MDL-79509 mod_wiki: Improve comment editing 2023-10-04 02:03:22 +02:00
Paul Holden af04de0f3c MDL-72249 message: stricter cleaning of processor type parameter. 2023-10-04 02:03:22 +02:00
Mark Johnson ec4207fc77 MDL-79213 groups: Add visibility checks in groups_get_members_join()
Group visibility was not taken into account when
generating SQL for getting enrolled users restricted
to a list of groups. This may have allowed users to
infer membership of groups they were not allowed to
see members of.
2023-10-04 02:03:22 +02:00
Paul Holden 21bc608466 MDL-79426 gradeimport_csv: safely preview CSV content during import. 2023-10-04 02:03:22 +02:00
Paul Holden 1fd4ef9f2a MDL-79455 tool_uploadcourse: clean course data fields individually. 2023-10-04 02:03:22 +02:00
Paul Holden 679df0fcca MDL-79455 tool_uploadcourse: safe preview of uploaded course data. 2023-10-04 02:03:22 +02:00
Paul Holden 74b21db96b MDL-79409 mod_imscp: appropriate unserialization of package structure. 2023-10-04 02:03:22 +02:00
Paul Holden 8bb0d14c8e MDL-79408 mod_lesson: safer unserializing/comparison of properties. 2023-10-04 02:03:22 +02:00
David Woloszyn 61f082c4aa 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:03:22 +02:00
Huong Nguyen 86d104b033 MDL-66730 core_course: Improve permission check for category moving
Co-authored-by: Erica Bithell <egb10@cam.ac.uk>
2023-10-04 02:03:22 +02:00
Laurent David a75bb4099b 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:03:22 +02:00
Paul Holden f0b20505d9 MDL-78820 h5p: use fullname of current user as the xAPI actor name. 2023-10-04 02:03:22 +02:00
meirzamoodle 493f8261c8 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:03:22 +02:00
Paul Holden ad1990f348 MDL-78971 quiz_grading: escape user identity fields on display. 2023-10-04 02:03:22 +02:00
Jun Pataleta 1d825a95e8 weekly release 4.2.2+ 2023-10-04 07:49:10 +08:00
Jun Pataleta c2269718f6 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-10-04 07:49:07 +08:00
Tim Hunt eff2ee3103 MDL-79279 qformat_xml: multianswer import should support idnumber
Fix suggested by Georg Maißer.
2023-10-03 20:42:23 +01:00
Daniel Ziegenberg a8f5d84ea6 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:21:03 +02:00
Jun Pataleta 754d5a7d02 Merge branch 'MDL-79557-402' of https://github.com/jleyva/moodle into MOODLE_402_STABLE 2023-10-03 12:18:06 +08:00
Jake Dallimore a0ca538f50 Merge branch 'MDL-79056-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-10-03 12:03:38 +08:00
Andrew Nicols c62d5bb17f MDL-78580 mod_quiz: Do not concatenate lang strings 2023-10-03 12:03:33 +08:00
Andrew Nicols f929dcc160 Merge branch 'MDL-78580_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-10-03 11:23:23 +08:00
Huong Nguyen 5b202da310 Merge branch 'MDL-79247_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-10-03 09:57:31 +07:00
Jun Pataleta 46dc2acea8 Merge branch 'MDL-79254_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-10-03 09:42:13 +08:00
Ilya Tregubov 210fc33058 Merge branch 'MDL-79428-402' of https://github.com/srobotta/moodle into MOODLE_402_STABLE 2023-10-03 09:41:03 +08:00
Jun Pataleta 3acc4f9a99 Merge branch 'MDL-79364-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-10-03 09:16:33 +08:00
meirzamoodle d131194571 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:55:24 +07:00
meirzamoodle dc3c730131 MDL-79539 messageinbound: avoiding a null parameter value 2023-10-02 20:51:35 +07:00
Juan Leyva 974775cf56 MDL-79557 message: Clean subject field content for get_messages WS 2023-10-02 14:52:15 +02:00
Ilya Tregubov 3d6061c210 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:06 +08:00
Eloy Lafuente (stronk7) 6f92480c01 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:45:43 +02:00
Eloy Lafuente (stronk7) 926f622e6f 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:45:43 +02:00
AMOS bot 3d0da1504b Automatically generated installer lang files 2023-09-30 00:10:32 +00:00
Jun Pataleta 48d464516a weekly release 4.2.2+ 2023-09-29 22:07:12 +08:00
Jun Pataleta 121d4dfc3b Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-09-29 22:07:10 +08:00
Gregor Eichelberger 3e05ff74bc 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 13:06:06 +02:00
Stephan Robotta 988e48eb7f 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:41:39 +02:00
Jun Pataleta 99e7796853 Merge branch 'MDL-79487-do-not-delete-refresh-token' of https://github.com/individual-it/moodle into MOODLE_402_STABLE 2023-09-29 12:14:19 +08:00
Jun Pataleta a865e835bc Merge branch 'MDL-79041-402-2' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2023-09-29 11:59:34 +08:00
Jun Pataleta 528f5142e7 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 10:59:18 +08:00
Jun Pataleta 517019a261 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 10:59:18 +08:00
Ilya Tregubov 7fbf1393aa Merge branch 'MDL-79280-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-29 09:53:55 +08:00
AMOS bot f4f2fffd5f Automatically generated installer lang files 2023-09-29 00:08:09 +00:00
Sara Arjona e09f12a07a Merge branch 'MDL-79511-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-09-28 16:15:53 +02:00
Artur Neumann 18907f9136 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-28 16:00:27 +05:45
Huong Nguyen a3dfbe4b93 Merge branch 'MDL-79274_402' of https://github.com/catalystfd/moodle into MOODLE_402_STABLE 2023-09-28 15:49:11 +07:00
Ilya Tregubov b1680c4478 Merge branch 'MDL-79463-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-28 16:40:57 +08:00
Sara Arjona b3b5928496 Merge branch 'MDL-79477-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-28 10:17:41 +02:00
Sara Arjona dd416c256d Merge branch 'MDL-78918-402' of https://github.com/ssj365/moodle into MOODLE_402_STABLE 2023-09-28 09:52:32 +02:00
Sara Arjona 7560c3b462 Merge branch 'MDL-79350-402' of https://github.com/daledavies/moodle into MOODLE_402_STABLE 2023-09-28 07:48:00 +02:00
Huong Nguyen e3757d659e Merge branch 'MDL-78813-402' of https://github.com/mihailges/moodle into MOODLE_402_STABLE 2023-09-28 12:02:54 +07:00
Huong Nguyen a84a56cfcd MDL-79041 core: Fix typo for MoodleNet resource URL 2023-09-28 11:39:38 +07:00
Huong Nguyen 6dd7948968 MDL-79041 core: Fix PHPDoc for prepare_file_share_request_data() 2023-09-28 11:39:38 +07:00
Huong Nguyen 827d1498fe MDL-79041 core: Better handling of the MoodleNet resource URL
- Switch use PARAM_TEXT instead of PARAM_URL for resource URL
 - Added noreferrer to the Go to MoodleNet drafts button, to avoid the risks associated with opening in
   _blank without removing access to the referrer and opener
2023-09-28 11:34:19 +07:00
Meirza cef7d8c2ed MDL-79511 lib: Allow dynamic properties for ADOFieldObject class 2023-09-28 10:22:31 +07:00
Meirza 595a112ad1 MDL-79511 auth: Avoid errors on the dynamic properties creation
Currently, Moodle uses fetchOBject() from ADOdb to get the table columns.
Sadly, the current ADOdb, especially the fetchObject() function, still creates dynamic properties.
Altering the fetchObject() with fetchRow() to avoid the dynamic properties deprecation error on PHP 8.2
2023-09-28 10:20:54 +07:00
Meirza 5b8f6990a1 MDL-79511 enrol: Avoid errors on the dynamic properties creation
Currently, Moodle uses fetchOBject() from ADOdb to get the table columns.
Sadly, the current ADOdb, especially the fetchObject() function, still creates dynamic properties.
Altering the fetchObject() with fetchRow() to avoid the dynamic properties deprecation error on PHP 8.2
2023-09-28 10:20:54 +07:00
Ilya Tregubov 41dc0d0790 Merge branch 'MDL-79349-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2023-09-28 10:47:56 +08:00
Huong Nguyen 4e5116e93b Merge branch 'MDL-75329-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-28 09:36:15 +07:00
Ilya Tregubov 38d77abdf3 Merge branch 'MDL-79285_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-09-28 10:20:45 +08:00
Ilya Tregubov 073d8cd69e Merge branch 'MDL-79360/402' of https://github.com/skodak/moodle into MOODLE_402_STABLE 2023-09-28 09:37:57 +08:00
Shamiso.Jaravaza 6e4adc44b5 MDL-78918 mod_bigbluebuttonbn: Fix notifications 2023-09-27 12:29:41 -06:00
Jun Pataleta c821a0b9ed Merge branch 'MDL-77891-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-09-27 23:50:23 +08:00
Mark Johnson d3987bdea9 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:57 +01:00
Shamim Rezaie d92dd7d1b6 Merge branch 'MDL-78239-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2023-09-27 14:41:00 +10:00
Huong Nguyen c5260e1fd2 Merge branch 'MDL-79467-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-27 10:44:31 +07:00
Jun Pataleta d3147d565f Merge branch 'MDL-78937-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-09-27 11:40:27 +08:00
Meirza 69dd978b2c MDL-78937 lib: Set default value to $component property
We encountered errors on the plugin check page while upgrading from version 3.11 to 4.3.
The plugins marked with the status "To be deleted" have a null value for the $component property,
which results in the following error message:
"Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is
deprecated in lib/classes/component.php on line 1056."
To avoid this error, we need to set an empty string as the default value for the $component property.
2023-09-27 09:56:51 +07:00
Ilya Tregubov a981f16107 Merge branch 'MDL-77708-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-09-27 09:11:17 +08:00
Eloy Lafuente (stronk7) a3235c49da 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:39:56 +02:00
Eloy Lafuente (stronk7) 0f79521edd 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:39:56 +02:00
Eloy Lafuente (stronk7) c61f05e575 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:39:56 +02:00
Sara Arjona da9ebc40f6 weekly release 4.2.2+ 2023-09-26 16:16:55 +02:00
Mihail Geshoski 8c9617d859 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:31:22 +02:00
Paul Holden 1fcbdf24b8 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:34 +01:00
Paul Holden be16e617be 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:02 +01:00
Kevin Percy 5783059471 MDL-78813 gradereport_grader: Fixed help icon covering course average 2023-09-26 11:18:37 +02:00
Sara Arjona 42bc1871cb MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:49:24 +02:00
Huong Nguyen d635ec350c MDL-78239 editor_tiny: Calculate correct height for non-visible editors 2023-09-26 14:57:15 +07:00
Jun Pataleta 058f02a3c8 Merge branch 'MDL-76713-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-09-26 11:57:08 +08:00
Laurent David cb84d4d24c 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:15:10 +02:00
Shamim Rezaie acfcbde784 Merge branch 'MDL-75928-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-09-25 17:51:53 +10:00
Andrew Nicols 3070f8e760 weekly release 4.2.2+ 2023-09-23 21:37:55 +08:00
Paul Holden f4f2dad317 MDL-79467 output: handle empty sitename display during installation.
Causes PHP warnings when null on PHP 8.1.
2023-09-22 14:34:26 +01:00
Paul Holden eeff52fc0f 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:40:01 +01:00
Paul Holden 6015eca424 MDL-79280 mod_quiz: normalise cm instance in override form. 2023-09-22 10:32:06 +01:00
Simey Lameze 4a25694002 MDL-75928 format_week: improve get_section_dates one week calc 2023-09-22 08:48:25 +08:00
Jun Pataleta b085e1b7a2 Merge branch 'MDL-79323-402-enfix' of https://github.com/vmdef/moodle into MOODLE_402_STABLE 2023-09-21 15:29:29 +02:00
Ilya Tregubov 919dd174fd Merge branch 'MDL-79341-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-21 14:50:46 +08:00
Ilya Tregubov ab857a4877 Merge branch 'MDL-71955-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-21 09:17:51 +08:00
Jake Dallimore 42c59cc622 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:16:47 +08:00
Ilya Tregubov f755e93f9a Merge branch 'MDL-68712-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-21 08:52:18 +08:00
Shamim Rezaie 97904b5deb Merge branch 'MDL-78895-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-20 23:43:22 +10:00
Paul Holden 092a3b70ad MDL-68712 enrol_self: improve detection/re-use of group enrolment keys. 2023-09-20 13:31:02 +01:00
Víctor Déniz 51990e9e70 MDL-79323 lang: Fix Behat tests regressions after merging en_fix strings 2023-09-20 09:57:32 +01:00
Helen Foster 537d920272 MDL-79323 lang: Import fixed English strings (en_fix) 2023-09-20 09:57:26 +01:00
Andrew Nicols 35cec39a6d MDL-79422 ajax: Allow no-login WS calls to fetch after a failure 2023-09-20 16:02:31 +08:00
Ilya Tregubov 3175ca60c8 weekly release 4.2.2+ 2023-09-20 09:03:24 +08:00
Huong Nguyen 2afd7e22c1 Merge branch 'MDL-79370-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-19 14:30:28 +08:00
Jake Dallimore f5908f5607 Merge branch 'MDL-79186-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-19 11:12:37 +08:00
Jun Pataleta dd919ead81 Merge branch 'MDL-79327-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-18 19:38:33 +02:00
Paul Holden 9c9a1d9837 MDL-79327 gradereport_grader: fix markup in collapsed columns dialog. 2023-09-18 18:35:57 +01:00
Dale Davies e7a76935f7 MDL-79350 core: Do not store lang in session when readonly 2023-09-18 14:31:28 +01:00
Huong Nguyen 616872837d Merge branch 'MDL-79332_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-09-18 18:56:30 +07:00
Paul Holden cff812f09a 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:38 +01:00
Ilya Tregubov e5d1ee7f84 Merge branch 'MDL-79047-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-09-18 12:25:19 +08:00
Jun Pataleta 1ece6f4295 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:45:02 +02:00
Sara Arjona 88f4aafad9 weekly release 4.2.2+ 2023-09-15 17:33:44 +02:00
Mark Johnson 3e73c33f99 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:15:40 +01:00
Petr Skoda cf424224d1 MDL-79360 filter: fix nolink tag regression from MDL-77525 2023-09-15 12:44:37 +02:00
Shamim Rezaie b8844ca4ff Merge branch 'MDL-78833-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-09-15 17:11:44 +08:00
Huong Nguyen 12db9a5512 Merge branch 'MDL-79283-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-15 17:11:43 +08:00
Jun Pataleta 8479c0fd4c Merge branch 'MDL-79291-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-15 17:11:42 +08:00
Huong Nguyen 1b60f7e7ea Merge branch 'MDL-79226-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-09-15 17:11:42 +08:00
Huong Nguyen 71694c96be Merge branch 'MDL-78728-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-15 17:11:41 +08:00
Huong Nguyen 51c0bf6bae Merge branch 'MDL-79057-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-09-15 17:11:41 +08:00
Ilya Tregubov 80dd8d008d Merge branch 'MDL-79220-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-09-14 17:43:38 +08:00
sam marshall d5670d8735 MDL-79349 core_cache: Lock on multi-layer cache can behave incorrectly 2023-09-14 09:33:50 +01:00
Paul Holden 530914eb3c MDL-79283 core: add title to embedded iframe, for accessibility. 2023-09-14 09:26:18 +01:00
Jun Pataleta aeb30d52bf Merge branch 'MDL-79181-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-09-14 14:02:37 +08:00
Ilya Tregubov 077b72fd31 Merge branch 'MDL-79195-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-09-14 09:37:29 +08:00
Paul Holden 8b69e718c2 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:21 +01:00
Laurent David e455c5bdb8 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-09-13 11:16:09 +02:00
Ilya Tregubov a69b2b7132 Merge branch 'MDL-78806-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-09-13 10:55:21 +08:00
Luca Bösch fedce774b9 MDL-79226 questions: check for UTF-8 encoding of the import file 2023-09-12 20:39:45 +02:00
Eloy Lafuente (stronk7) d6f0c937ba weekly release 4.2.2+ 2023-09-12 18:54:00 +02:00
Tim Hunt 1bc6e270cc 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:58:46 +01:00
Ilya Tregubov a7bc7091ea MDL-78833 gradereport_grader: Propery align averages and ranges row.
Depending on editing mode or grade display type it can be right or
left aligned
2023-09-12 16:28:13 +08:00
Angelia Dela Cruz 05f8a7ba27 MDL-79195 core_course: Activity and resource description display behat 2023-09-12 12:05:34 +08:00
Huong Nguyen fce064e53d Merge branch 'MDL-79246-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-09-12 08:50:56 +07:00
Paul Holden da8fc7640d 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:17 +01:00
Paul Holden 962c23a4d5 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:21 +01:00
Jake Dallimore 8cbc4de495 Merge branch 'MDL-79048-402-2' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-09-11 13:00:33 +08:00
Ilya Tregubov a0002b2a09 Merge branch 'm42_MDL-63539' of https://github.com/danmarsden/moodle into MOODLE_402_STABLE 2023-09-11 11:15:12 +08:00
Jake Dallimore fe7f2c99f3 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:41:28 +08:00
Francis Devine 6c65bee3f6 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-11 08:54:27 +12:00
Jun Pataleta 92462f9cfb MDL-78806 mod_assign: Use new Behat step for checking page title 2023-09-10 10:52:53 +08:00
Jun Pataleta a20f76d455 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:52:53 +08:00
Jun Pataleta e63e5286b2 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:07 +08:00
Jun Pataleta 9352b14912 MDL-78806 core: Add upgrade.txt notes 2023-09-09 08:58:29 +08:00
Jun Pataleta 2e1d5e70df 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:58:29 +08:00
Jun Pataleta aea8d3fda5 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:58:29 +08:00
Jun Pataleta 90a9ea3be1 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:58:29 +08:00
Jun Pataleta 4a966117a6 MDL-78806 core: Append site name on page title 2023-09-09 08:58:28 +08:00
Jun Pataleta 156a8bd21e 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:58:28 +08:00
Jun Pataleta f1116b10f1 weekly release 4.2.2+ 2023-09-08 22:35:06 +08:00
Jun Pataleta ea6b21949e Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-09-08 22:35:04 +08:00
Jun Pataleta 33ccb45fc9 MDL-78549 multianswer: Prevent default when clicking feedback trigger 2023-09-08 22:20:55 +08:00
Huong Nguyen 20051d6a31 Merge branch 'MDL-78549-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-09-08 22:20:55 +08:00
Andrew Nicols c32ae455ff Merge branch 'MDL-79286-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-08 22:20:55 +08:00
Andrew Nicols 8ba52e492e MDL-79277 tool_mobile: Correct default value for empty param 2023-09-08 22:20:55 +08:00
Andrew Nicols df1502735a Merge branch 'MDL-79277-402' of https://github.com/noeldemartin/moodle into MOODLE_402_STABLE 2023-09-08 22:20:55 +08:00
Andrew Nicols fb70d04c2a Merge branch 'MDL-79250-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-09-08 22:20:54 +08:00
Andrew Nicols c84971519f MDL-79264 tiny_equation: Correct debounce method
The debounced method was being called immediately instead of being
debounced.
2023-09-08 22:20:54 +08:00
Andrew Nicols abafa13fb9 Merge branch 'MDL-79264-MOODLE_402_STABLE' of https://github.com/geichelberger/moodle into MOODLE_402_STABLE 2023-09-08 22:20:54 +08:00
Andrew Nicols 62ea3716ca Merge branch 'MDL-68435-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-08 22:20:54 +08:00
Andrew Nicols fdf431f508 Merge branch 'MDL-78917-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-08 22:20:54 +08:00
Jun Pataleta 4cdb5a8188 Merge branch 'MDL-78082-402-patch' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-09-08 22:20:53 +08:00
Ilya Tregubov 9d260df51c MDL-78082 gradereport_grader: Remove xpath from Behat. 2023-09-08 22:20:52 +08:00
Jun Pataleta 60559b843b MDL-79048 course: Update page title when toggling bulk editing
* When toggling bulk editing, updating the page's title can help users,
especially screen reader users, to determine the current editing state
of the course homepage.
2023-09-08 21:57:55 +08:00
Jun Pataleta cc01c15baa 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:56:49 +08:00
AMOS bot c6385ad021 Automatically generated installer lang files 2023-09-08 00:10:50 +00:00
Paul Holden cce79aae42 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:38:59 +01:00
Paul Holden 7fdc3b2040 MDL-79286 mod_quiz: account for users with multiple enrolments.
The quiz override form should account for this, to ensure duplicate
user records don't trigger DML debugging.
2023-09-07 11:34:03 +01:00
Ilya Tregubov 11b51eaec6 Merge branch 'MDL-78082-402' of https://github.com/rezaies/moodle into MOODLE_402_STABLE 2023-09-07 14:31:27 +08:00
Jun Pataleta 278f3d65b6 Merge branch 'MDL-78795-MOODLE_402_STABLE' of https://github.com/phmemmel/moodle into MOODLE_402_STABLE 2023-09-07 14:17:06 +08:00
Angelia Dela Cruz d10d50c4e8 MDL-79220 mod_glossary: Behat for glossary entry with attachment 2023-09-07 09:59:28 +08:00
Shamim Rezaie 89b5bb7bde MDL-78082 gradereport_grader: Acceptance test for locking 2023-09-07 06:46:52 +10:00
Shamim Rezaie 6100c0c548 MDL-78082 core_grades: Fix locking inconsistency
Problem:
In Moodle 4.2, an unintended change in behaviour occurred when locking
and unlocking grade items. Previously, in Moodle 4.1, locking a grade
item and then subsequently unlocking the grade item left specific grades
for students still locked if they were being locked individually.
However, in Moodle 4.2, the unintended change caused the individual
grades to be unlocked along with the grade item.

Solution:
To address this issue, I modified the set_locked calls in action.php to
pass the cascade parameter as false. Now, when locking or unlocking a
grade item, only the grade item itself is affected, leaving individual
grades unchanged. I have also modified the locking behaviour in the
grade_category class. So, similarly, when locking or unlocking a grade
category, the change applies only to the grade items and grade
categories within the category, without expanding to individual grades.

Explanation:
By making this change, we ensure that the locking mechanism behaves as
expected, providing a consistent and desirable user experience. Locking
and unlocking a grade item or category will no longer inadvertently
affect individual grades, preserving their locked status and avoiding
loss of data when unlocking a grade item associated with the total mark
of a category.
2023-09-07 05:52:30 +10:00
Shamim Rezaie 3693a22ed7 MDL-78082 core_grades: lock/unlock all option for grade categories
A lock/unlock option is added to the context menu of the grade
categories again. But it is only used as an auxiliary tool to lock or
unlock all the grade items within the category.
2023-09-07 05:52:30 +10:00
Shamim Rezaie d2d8d16c2a MDL-78082 core_grades: Hide lock/unlock options for grade categories
Problem:
The grade_categories table lacks a 'locked' field, making it technically
impossible to lock grade categories. In Moodle 4.1, the "category total"
column could be locked (from the edit category form), but locking grade
categories directly was not supported.

Solution:
In response to the issue, the lock/unlock feature for grade categories
has been removed. Since the grade_categories table does not have the
necessary 'locked' field, attempting to implement category locking would
be infeasible. As a result, the feature has been removed from the
interface to avoid confusion.

Explanation:
By removing the lock/unlock feature for grade categories, we ensure that
users no longer encounter non-functional options and prevent any
potential misunderstandings about the locking behaviour. Additionally,
this change aligns the user interface with the underlying database
schema and eliminates any misleading functionality.
2023-09-07 05:50:09 +10:00
Shamim Rezaie 475f617659 MDL-78082 core_grades: Fix locking issue with natural aggregation
Problem:
When the aggregation method is set to "natural," grade items' weights
and the maximum grade of the grade category's item get recalculated,
causing the needsupdate flag to be set to true. As a result, the locking
process was skipped, leading to unexpected behaviour.

Solution:
To address the issue, the set_locked method has been modified. Instead
of skipping the locking process, the method now schedules the locking of
grade items to occur slightly in the past, specifically one second in
the past. This ensures that the grade item will be automatically locked
after the recalculations are completed.

Explanation:
By making this adjustment, we ensure that the locking process is not
skipped during natural aggregation, maintaining consistent behaviour and
preventing any unintended consequences related to grade item locking.
2023-09-07 05:50:09 +10:00
Shamim Rezaie 314350afee MDL-78082 gradereport_grader: Enter should submit the form
Problem:
Previously, when users pressed the Enter key while interacting with the
grader report, instead of submitting the form, a table column was
inadvertently expanded or collapsed. This behaviour occurred due to the
expand/collapse buttons lacking an explicit 'type' attribute within the
form. As a result, these buttons were mistakenly treated as submit
buttons.

Solution:
In this commit, we have addressed the issue by ensuring that the
expand/collapse buttons now have the correct 'type' attribute set,
explicitly identifying them as non-submit buttons. This adjustment
prevents them from interfering with form submission unintentionally.

Explanation:
By making this fix, we improve the user experience in the grade book,
allowing users to navigate and interact with the interface more
smoothly. Pressing the Enter key will now trigger the form submission as
expected, rather than inadvertently activating expand/collapse actions.
2023-09-07 05:50:09 +10:00
Paul Holden 4f0c86cad3 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:41 +01:00
Jun Pataleta 92d78a75d7 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:07 +08:00
Jun Pataleta 6d2430e4c4 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:07 +08:00
Noel De Martin a5f7b5a6fd MDL-79277 tool_mobile: Fix warning 2023-09-06 09:08:19 +02:00
Ilya Tregubov 9242a03950 Merge branch 'MDL-76865-402' of https://github.com/daledavies/moodle into MOODLE_402_STABLE 2023-09-06 14:48:41 +08:00
Andrew Nicols 3570320a1c Merge branch 'MDL-79205-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-06 12:52:40 +08:00
Andrew Nicols 16b8a98f6d Merge branch 'MDL-79244-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-09-06 12:51:11 +08:00
Ilya Tregubov 5c9d30fbf5 Merge branch 'MDL-76459_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-09-06 10:02:57 +08:00
Luca Bösch d6edf187db MDL-79244 backup: fix typo for questioncannotberestored.
AMOS BEGIN
 MOV [questionegorycannotberestored,backup],[questioncannotberestored,backup]
AMOS END
2023-09-05 22:30:40 +02:00
Paul Holden 6e7c9cefdc Merge branch 'MDL-76419-402' of https://github.com/rjnl/moodle into MOODLE_402_STABLE 2023-09-05 17:18:31 +01:00
Andrew Nicols 4d0490a9d3 weekly release 4.2.2+ 2023-09-05 22:26:28 +08:00
Andrew Nicols 5625562b57 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-09-05 22:26:24 +08:00
AMOS bot f2aaca16c0 Automatically generated installer lang files 2023-09-05 14:25:15 +00:00
Gregor Eichelberger 4818a44e89 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:26:33 +02:00
Paul Holden 8b3bca1f44 MDL-79205 webservice: gracefully handle invalid functions in docs. 2023-09-05 08:51:53 +01:00
Jun Pataleta 848883f0f0 Merge branch 'MDL-78874-402' of https://github.com/danghieu1407/moodle into MOODLE_402_STABLE 2023-09-05 12:05:49 +08:00
Andrew Nicols 0abb96ff98 Merge branch 'MDL-79132-402' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_402_STABLE 2023-09-05 11:53:26 +08:00
Andrew Nicols 9eac5b5267 Merge branch 'MDL-79060-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-09-05 11:23:10 +08:00
Jun Pataleta 77ed988b4a MDL-79060 course: Use course name for the course image link 2023-09-05 11:10:50 +08:00
Andrew Nicols 96ded0055b Merge branch 'MDL-79230-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-05 10:56:41 +08:00
Andrew Nicols b6f72452e2 Merge branch 'MDL-79236-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-05 10:43:58 +08:00
Andrew Nicols f66da56df2 Merge branch 'MDL-79191-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-05 10:33:34 +08:00
Jun Pataleta 7ce8053de7 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:35:57 +08:00
AMOS bot 02f03b5e59 Automatically generated installer lang files 2023-09-05 00:11:54 +00:00
Rajneel Totaram 528e33b795 MDL-76419 calendar: Respect $CFG->autologinguests on frontpage 2023-09-05 10:41:16 +12:00
Paul Holden bd384d3a50 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:41:47 +01:00
Paul Holden 522aeebd4a Merge branch 'MDL-79232-402' of https://github.com/marinaglancy/moodle into MOODLE_402_STABLE 2023-09-04 11:38:11 +01:00
Paul Holden 69bb59b9fe MDL-68435 customfield: fix plugin file serving callbacks.
Incorrect parameter/method call was previously serving files with
wrong filenames.
2023-09-04 10:45:22 +01:00
Jun Pataleta cf35cc2c45 MDL-79250 admin: Add title to external_content_banner template 2023-09-04 16:54:07 +08:00
Paul Holden 4e13cfc9a2 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 08:59:04 +01:00
Andrew Nicols 2e867b3aba MDL-79246 gradingform_rubric: Use i_click_on for behat clicks 2023-09-04 09:12:54 +08:00
Philipp Memmel 5359b82c93 MDL-78795 core_form: Fix repeated elements JS problem
Co-authored-by: Stefan Hanauska <stefan.hanauska@csg-in.de>
2023-09-03 14:13:39 +02:00
Eloy Lafuente (stronk7) 25db666693 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:20 +02:00
Andrew Nicols 094b78764f weekly release 4.2.2+ 2023-09-02 08:18:25 +08:00
Paul Holden d562154bee MDL-79236 editor_tiny: define subplugin type language strings. 2023-09-01 19:22:38 +01:00
Paul Holden 3d9000cba0 MDL-79230 editor_tiny: fix plugin info manage URL.
Co-authored-by: Meirza <meirza.arson@moodle.com>
2023-09-01 15:19:44 +01:00
Marina Glancy fe7deae2b3 MDL-79232 navigation: fix undefined var warning 2023-09-01 14:27:10 +01:00
Andrew Nicols 066e0196aa Merge branch 'mdl-79204-402' of https://github.com/james-cnz/moodle into MOODLE_402_STABLE 2023-09-01 11:59:05 +08:00
Huong Nguyen 0a91ee80d5 Merge branch 'MDL-74828-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-09-01 10:54:05 +07:00
Huong Nguyen 4af899a2fc Merge branch 'MDL-76092-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-09-01 10:41:53 +07:00
Andrew Nicols 81920663cb Merge branch 'MDL-78966-402' of https://github.com/rjnl/moodle into MOODLE_402_STABLE 2023-09-01 11:31:49 +08:00
Andrew Nicols eaf2530c2e Merge branch 'MDL-78179-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-09-01 11:26:44 +08:00
Ilya Tregubov 0fcdb5f333 Merge branch 'MDL-74429-402' of https://github.com/roland04/moodle into MOODLE_402_STABLE 2023-09-01 11:15:31 +08:00
Andrew Nicols 6d9f767f85 Merge branch 'MDL-79190-402' of https://github.com/jbs1/moodle into MOODLE_402_STABLE 2023-09-01 11:12:19 +08:00
Ilya Tregubov 2145f755fc Merge branch 'MDL-78745-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-09-01 10:54:33 +08:00
Andrew Nicols b5e39ebbf6 Merge branch 'MDL-79045-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-09-01 10:47:19 +08:00
Andrew Nicols dc580dd258 Merge branch 'MDL-77831-402' of https://github.com/mickhawkins/moodle into MOODLE_402_STABLE 2023-09-01 10:38:15 +08:00
Ilya Tregubov 1afdbdf3d4 Merge branch 'MDL-79202-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-01 10:30:14 +08:00
Ilya Tregubov 13f6f56c48 Merge branch 'MDL-79107-402-2' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-09-01 09:26:49 +08:00
Andrew Nicols c746849316 MDL-79107 editor_tiny: Target correct element on editor removal 2023-09-01 09:07:59 +08:00
Paul Holden ea8b67c54d MDL-79191 grade: correct column type for the grade column (float). 2023-08-31 15:47:16 +01:00
Jun Pataleta 245850be56 Merge branch 'MDL-79107-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-31 21:09:44 +08:00
Jun Pataleta a9e5225a76 MDL-79107 qtype_essay: Move non_form_fields.feature under qtype_essay 2023-08-31 21:06:21 +08:00
Andrew Nicols c174c64a04 MDL-79107 editor_tiny: Inform Behat of field type 2023-08-31 21:06:18 +08:00
Jun Pataleta 14e28ce6c5 Merge branch 'MDL-79017-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-31 20:32:10 +08:00
Michael Hawkins 32f0ccedbc MDL-77831 core: Updated security.txt expiry and added additional info 2023-08-31 18:29:40 +08:00
Jun Pataleta cddf443afb Merge branch 'MDL-77657-402-get_extra_scss_code-wrong-order' of https://github.com/danowar2k/moodle into MOODLE_402_STABLE 2023-08-31 17:51:03 +08:00
Huong Nguyen d2800be381 Merge branch 'MDL-79207-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-08-31 12:26:40 +07:00
Angelia Dela Cruz 6b159057df MDL-79207 core_course: Behat coverage for activity and resource deletion 2023-08-31 10:21:28 +08:00
Jun Pataleta c2f25b7778 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:23:20 +08:00
Sara Arjona 642622731f Merge branch 'MDL-78612-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-08-30 17:55:38 +02:00
Andrew Nicols 8616392383 MDL-78612 core: Wrap modal_factory.create in pendingPromise 2023-08-30 12:41:37 +08:00
meirzamoodle 38c63776fc 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:19:14 +07:00
james-cnz 396376c6a3 MDL-79204 course: Remove HTML tag trailing slashes 2023-08-30 12:20:05 +12:00
Paul Holden 6293da274b MDL-79202 tool_mobile: correctly interpolate minutes in exception. 2023-08-30 00:06:40 +01:00
Jeremy Schulz ec832df228 MDL-79190 theme_boost: removed obsolete comment 2023-08-29 17:11:59 -04:00
Sara Arjona 10404b07b9 Merge branch 'MDL-72359-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2023-08-29 16:15:44 +02:00
Huong Nguyen be57a10c08 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:44 +07:00
Ilya Tregubov 8b40e8a7b9 Merge branch 'MDL-78615-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-29 11:59:30 +08:00
Huong Nguyen 3e48861804 Merge branch 'MDL-72359-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-08-29 10:58:02 +07:00
Huong Nguyen 6c02ef6b50 Merge branch '78241-402-tiny-recordrtc-fix-availability-conditions' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_402_STABLE 2023-08-29 10:53:15 +07:00
Huong Nguyen bf3ef1889a Merge branch 'MDL-78961-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-29 10:47:42 +07:00
Andrew Nicols fbe382e322 Merge branch 'MDL-79059-402-2' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-29 11:36:45 +08:00
Andrew Nicols 539ed76740 Merge branch 'MDL-79092-402' of https://github.com/rhell4/moodle into MOODLE_402_STABLE 2023-08-29 11:23:43 +08:00
Andrew Nicols 7a25dc7584 Merge branch 'MDL-79169-int-deprecate-402' of https://github.com/Peterburnett/moodle into MOODLE_402_STABLE 2023-08-29 11:20:37 +08:00
Sara Arjona 451a641a1d Merge branch 'MDL-78980-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-28 16:56:31 +02:00
Sara Arjona d41ea9ba9c Merge branch 'MDL-78707-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-28 16:40:53 +02:00
Sara Arjona a7ecd0e9ee Merge branch 'MDL-78656-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-28 16:29:51 +02:00
Sara Arjona 9167c78cc9 Merge branch 'MDL-78749-402' of https://github.com/BruceGoodGuy/moodle into MOODLE_402_STABLE 2023-08-28 14:26:07 +02:00
Sara Arjona 58122441be 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:12 +02:00
vtos f8a093ac7a 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:35 +08:00
Ilya Tregubov 9159adb6d9 Merge branch 'MDL-79139-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-28 15:40:22 +08:00
dor 464393b154 MDL-74828 media_videojs: fix loading icon position for RTL 2023-08-27 16:57:52 +08:00
Jun Pataleta eac4d1866d weekly release 4.2.2+ 2023-08-26 11:03:14 +08:00
Jun Pataleta 0ca5d64e7e Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-08-26 11:03:11 +08:00
Jun Pataleta f588a8212b 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:24 +08:00
Jun Pataleta 3984cf9e42 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:24 +08:00
Jun Pataleta 6954a32400 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:24 +08:00
Julien Boulen bc64c7515e MDL-78241 tiny_recordrtc: fix availability conditions 2023-08-25 18:16:57 +02:00
Jun Pataleta c01758009f Merge branch 'MDL-78397-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-25 11:52:51 +08:00
Jun Pataleta 6ce8860446 Merge branch 'MDL-78386-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-25 11:39:01 +08:00
Jun Pataleta 6753d875f4 Merge branch 'MDL-77988-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-25 10:35:52 +08:00
Jun Pataleta 338307f2f5 Merge branch 'MDL-79015-402-fix' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-08-25 09:52:58 +08:00
Peter Burnett a686819cf0 MDL-79169 admin: Fix implicit int cast in maintenance warning 2023-08-25 11:16:49 +10:00
Simey Lameze 90fc48e77e MDL-79015 behat: make verification step more specific 2023-08-25 08:52:42 +08:00
AMOS bot 3f191f8e98 Automatically generated installer lang files 2023-08-25 00:12:02 +00:00
Andrew Nicols c4221f3766 Merge branch 'MDL-79075-attempt_reviewed-402' of https://github.com/leonstr/moodle into MOODLE_402_STABLE 2023-08-25 00:16:01 +08:00
Andrew Nicols 1fd1d91445 Merge branch 'MDL-79063-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-25 00:12:55 +08:00
Andrew Nicols eaa0aba89a Merge branch 'MDL-79073-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-25 00:06:54 +08:00
Andrew Nicols d37f01b307 Merge branch 'MDL-78811-MOODLE-402' of https://github.com/aydevworks/moodle into MOODLE_402_STABLE 2023-08-25 00:02:38 +08:00
Andrew Nicols 77311c710f Merge branch 'MDL-78787-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-24 23:58:39 +08:00
Andrew Nicols 9608dffc26 Merge branch 'MDL-79147-402' of https://github.com/ferranrecio/moodle into MOODLE_402_STABLE 2023-08-24 23:48:05 +08:00
Sara Arjona 60967196c5 Merge branch 'MDL-78688-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-24 17:35:08 +02:00
Anupama Sarjoshi dbcef4ebff MDL-79132 core_admin: Fix PHPUnit tests related to editors sorting 2023-08-24 15:44:46 +01:00
Sara Arjona 368d7dfa35 Merge branch 'MDL-78965-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-08-24 16:38:28 +02:00
danghieu1407 4e79fb543e MDL-78874 accessibility: Improve descriptive text for check button 2023-08-24 20:47:00 +07:00
Ferran Recio a586ee8e07 MDL-79147 core: fix mustache_filesystem_loader load hint 2023-08-24 10:43:04 +02:00
Huong Nguyen ff8741ac41 Merge branch 'MDL-78533-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-24 15:36:04 +07:00
Huong Nguyen 44f3917b9a Merge branch 'MDL-78502-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-24 15:30:07 +07:00
Huong Nguyen 14170be764 Merge branch 'MDL-78302-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-24 15:26:15 +07:00
Jun Pataleta ec715af8c5 Merge branch 'MDL-79015-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-08-24 15:53:05 +08:00
Angelia Dela Cruz 3ff3d55e57 MDL-78965 mod_quiz: Behat coverage for quiz with certainty-based marking 2023-08-24 14:50:25 +08:00
Jun Pataleta 7f0dc25ac1 Merge branch 'MDL-78941-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-08-24 13:06:23 +08:00
Angelia Dela Cruz 0128dd24ec MDL-79015 mod_lesson: Behat coverage for lesson with access restriction 2023-08-24 12:46:37 +08:00
Huong Nguyen 3965ea7ac5 Merge branch 'MDL-69187-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-24 10:39:00 +07:00
Angelia Dela Cruz b22ca27580 MDL-78941 mod_quiz: Behat coverage for student flagging quiz questions 2023-08-24 10:42:24 +08:00
Huong Nguyen a02fbfd763 Merge branch 'MDL-78843-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-08-24 08:57:37 +07:00
Sara Arjona 3ab68e124e Merge branch 'MDL-65363-starred-courses-only-include-enroled-courses-MOODLE_4.2' of https://github.com/stopfstedt/moodle into MOODLE_402_STABLE 2023-08-23 15:27:42 +02:00
Paul Holden db711b545a MDL-79139 check: clarify default user role action text. 2023-08-23 13:28:53 +01:00
Daniel Poggenpohl dbbe231d2d 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 f4d84d2452 MDL-76092 core_backup: Unit tests for convert_params_to_values 2023-08-23 14:19:05 +08:00
Paola Maneggia 67e2decfec MDL-76092 core_backup: Fix PHP8.0 vulnerability convert_params_to_values 2023-08-23 13:26:33 +08:00
Paul Holden 97e768706a 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:21 +01:00
Rossco Hellmans 981614e483 MDL-79092 session: fix recentsessionlocks mutated session debugging
In write_close() call update_recent_session_locks() before setting
$sessionatclose so that it includes $SESSION->recentsessionlocks and
doesn't trigger the debugging in check_mutated_closed_session().
2023-08-23 09:40:03 +10:00
Paul Holden e2a6530ad2 MDL-78961 admin: correct smtppass preset configuration name. 2023-08-22 18:26:52 +01:00
Paul Holden c34786138b 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:02 +01:00
Andrew Nicols 215f370c39 MDL-69187 core_file: Unit test for file_get_typegroup string types 2023-08-22 15:58:14 +01:00
Paul Holden 421e9e2cb5 MDL-78688 admin: define accepted filetype for uploaded preset file. 2023-08-22 15:32:09 +01:00
Sara Arjona e54c28009d weekly release 4.2.2+ 2023-08-22 15:50:55 +02:00
Paul Holden 37e9c47ff8 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:12 +01:00
Paul Holden 4bbd640515 MDL-79073 question: detect missing context when deleting question. 2023-08-22 09:45:18 +01:00
Paul Holden d67b102ff1 MDL-78386 search: specify correct parameter type for search area. 2023-08-22 08:12:01 +01:00
Paul Holden 9f678b57fa 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:36 +01:00
Leon Stringer 1794ce5f9c 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:52:07 +01:00
Paul Holden 7bbeff9e3d Merge branch 'MDL-79071-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-21 15:32:43 +01:00
Paul Holden ea456e35db 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:51 +01:00
Paul Holden 36b85d2225 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:38 +01:00
Paul Holden f1c7dfbc29 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:31 +01:00
Paul Holden 32ac7e8207 MDL-78502 grade: consider only those export formats user can access. 2023-08-21 10:46:59 +01:00
Paul Holden 295b2edfc8 MDL-78615 cache: display failure notifications deleting lock/store. 2023-08-21 10:45:17 +01:00
Huong Nguyen 7e872ce450 Merge branch 'MDL-65887-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-08-21 10:57:24 +07:00
Stefan Topfstedt 3b61cac81a 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:08:14 -07:00
Daniel Poggenpohl f3c5b84da3 MDL-77657 theme: Corrected return type 2023-08-18 16:27:24 +02:00
Daniel Poggenpohl d98766494f 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:27:19 +02:00
Daniel Poggenpohl eae7f9deb7 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:27:11 +02:00
Jun Pataleta f0097f6999 MDL-79071 course: An empty alt text is needed for decorative images 2023-08-18 17:03:44 +08:00
Jun Pataleta 0faac60665 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:43:36 +08:00
Jun Pataleta 06fa72efcf 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:26 +08:00
Luca Bösch dcd18c22bf MDL-65887 workshop: Recalculate + fill the 'Grade for assessment' column 2023-08-18 08:58:38 +02:00
Ilya Tregubov 4488c92859 weekly release 4.2.2+ 2023-08-18 11:23:53 +08:00
Dan Marsden b75e300960 MDL-63539 mod_scorm: AICC multi-row content not saving correctly. 2023-08-18 14:44:37 +12:00
Eloy Lafuente (stronk7) 7eb39a1e2f Merge branch 'MDL-78684-402-fix-2' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-08-17 19:56:16 +02:00
Eloy Lafuente (stronk7) 8e57bb3b24 Merge branch 'MDL-78684-402-fix' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-17 19:47:02 +02:00
Jun Pataleta 4e8b351234 MDL-78684 gradereport_grader: Increase window size during Behat run 2023-08-17 21:33:34 +08:00
Simey Lameze d1c2ae134a MDL-78684 behat: fix behat failures 2023-08-17 20:59:26 +08:00
Simey Lameze b391e3e78c MDL-78684 behat: remove tab and set the focus to the user search field
This commit also does few things:
- Adds the I change window size step back to avoid future randoms.
- Increase the download limit size on a couple of download steps that
have been failing randomly.
- Adds missing @core_grades to tertiary_navigation_searching.feature.
2023-08-17 13:51:51 +02:00
Jun Pataleta b18dc8e916 Merge branch 'MDL-78938-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-08-17 09:24:22 +02:00
Ilya Tregubov 5f63518bef Merge branch 'MDL-78974-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-17 09:24:21 +02:00
Andrew Nicols 8b768bda5d Merge branch 'MDL-77695-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-08-17 09:24:21 +02:00
Andrew Nicols 0e269966c8 MDL-76557 enrol_lti: Fix unit test docs and convert to provider 2023-08-17 09:24:21 +02:00
ishatalkin 1b5c26b50a MDL-76557 enrol_lti: sync_grades accepts status codes 200,201,202,204 2023-08-17 09:24:21 +02:00
Andrew Nicols 6f6bee2c16 Merge branch 'MDL-78684-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-08-17 09:24:21 +02:00
Andrew Nicols 13b8473ee5 MDL-77381 qengine: Correct coverage for new test 2023-08-17 09:24:21 +02:00
Andrew Nicols 1a7d80db11 Merge branch 'MDL-77381-MOODLE_402_STABLE' of https://github.com/ScottVerbeek/moodle into MOODLE_402_STABLE 2023-08-17 09:24:21 +02:00
Sara Arjona f8a2af3aa4 Merge branch 'MDL-76408_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-08-17 09:24:21 +02:00
Jun Pataleta dd1cfdcee3 Merge branch 'MDL-78505/402' of https://github.com/skodak/moodle into MOODLE_402_STABLE 2023-08-17 09:24:21 +02:00
Huong Nguyen 69122df707 Merge branch 'MDL-71909-m402' of https://github.com/NeillM/moodle into MOODLE_402_STABLE 2023-08-17 09:24:21 +02:00
Sara Arjona f2509b8c2c Merge branch 'MDL-78678-402' of https://github.com/aanabit/moodle into MOODLE_402_STABLE 2023-08-17 09:24:21 +02:00
Sara Arjona 5686ec990b Merge branch 'MDL-78761-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-17 09:24:20 +02:00
Simey Lameze fa1f87270f MDL-77695 behat: use automatic completion to award badges 2023-08-16 21:15:52 +08:00
Andrew Nicols 5e64d5cceb 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:13 +08:00
Andrew Nicols b980073cf4 MDL-78938 report_progres: Wrap completion status update in pending 2023-08-16 20:05:13 +08:00
Mikel Martín 1657437342 MDL-74429 core_form: Fix element url input overflow 2023-08-16 12:41:27 +02:00
Petr Skoda dbf1a653c4 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:26:51 +02:00
Petr Skoda 9de0581c79 MDL-78505 Revert "MDL-32114 form: markdown must be preserved on saving post"
This partially reverts commit 4a31dd69d6.
2023-08-15 14:26:51 +02:00
Dale Davies 3c9a3e5ca4 MDL-76865 core: Check lock state before attempting to acquire a lock 2023-08-14 12:37:37 +01:00
Sara Arjona 3f5ba599e0 Merge branch 'MDL-78700-tidy_no_clean-402' of https://github.com/leonstr/moodle into MOODLE_402_STABLE 2023-08-14 09:12:30 +02:00
Jun Pataleta 27af8b1cb3 Merge branch 'MDL-78927-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2023-08-14 10:19:07 +08:00
Eloy Lafuente (stronk7) f8df10cd9a MDL-76408 gha: Move "highest" runs from php81 to php82
Note that, for windows php82, we need to have the php-zip extension
explicitly added. So we are adding it too.

From the manual:
  "As of PHP 8.2.0, php_zip.dll DLL must be enabled in php.ini.
  Previously, this extension was built-in."
2023-08-11 17:35:58 +02:00
Shamim Rezaie 91e6642f16 Moodle release 4.2.2 2023-08-11 23:20:32 +10:00
Paul Holden 45f6fbcbe7 MDL-78974 themes: define removedprimarynavitems theme config property.
All configurable theme config properties must be defined at the class
level, lest PHP 8.2 complain about creation of dynamic properties.
2023-08-11 13:42:21 +01:00
Paul Holden ec3d2170cd 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:11:49 +01:00
Amaia Anabitarte 494753ee72 MDL-78678 course: Highlight all types of modules when scrolling 2023-08-11 11:30:51 +02:00
Jun Pataleta 62169983fd 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:10:47 +07:00
Huong Nguyen 459659ce89 Merge branch 'MDL-78983-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-11 12:53:23 +07:00
Jun Pataleta 18e34acffb 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:02 +08:00
Huong Nguyen 571777775e weekly release 4.2.1+ 2023-08-10 22:50:48 +07:00
Huong Nguyen 4945852c97 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-08-10 22:50:46 +07:00
sam marshall 3be5a98a8d MDL-78927 core_user: Profile page missing breadcrumbs if no id= 2023-08-10 15:51:41 +01:00
Ilya Tregubov a15550e7ff MDL-78790 gradereport_grader: Fix sorting. 2023-08-10 18:43:20 +07:00
meirzamoodle 61bc6ed948 MDL-78685 auth_oauth2: Added logged-in status check 2023-08-10 18:43:20 +07:00
Jun Pataleta 9e32013053 Merge branch 'MDL-78957_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-08-10 18:43:20 +07:00
Jun Pataleta 76420650aa Merge branch 'MDL-78962_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-08-10 18:43:20 +07:00
Jun Pataleta 922cc4d23e Merge branch 'MDL-77817-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-08-10 18:43:18 +07:00
Jun Pataleta 8cf476dc6d Merge branch 'MDL-78674-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-10 18:42:58 +07:00
Ilya Tregubov dc9c9d16f4 Merge branch 'MDL-78939-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-10 18:42:58 +07:00
Paul Holden 0923a3979e MDL-78790 gradereport_grader: normalise report sort parameter safely. 2023-08-10 18:42:58 +07:00
Paul Holden e6eb379544 MDL-78871 gradereport_grader: capability check getting report users. 2023-08-10 18:42:58 +07:00
Sara Arjona 59f6c64947 Merge branch 'MDL-76123-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-10 18:42:57 +07:00
Jun Pataleta 5aac33d755 Merge branch 'MDL-77378_402_v3' of https://github.com/TomoTsuyuki/moodle into MOODLE_402_STABLE 2023-08-10 18:42:57 +07:00
Michael Hawkins 82c04ab972 MDL-78763 tool_policy: Initialise returnurl as a moodle_url in viewall 2023-08-10 18:42:57 +07:00
Paul Holden 5047ae82f9 MDL-78792 message: access checks in processor fragment callback. 2023-08-10 18:42:57 +07:00
raortegar 3ef202da9c MDL-74289 lib: Improve the proxy bypass matching 2023-08-10 18:42:52 +07:00
Rajneel Totaram c489f95d1e MDL-78966 theme: Fix site event icon size in upcoming events block 2023-08-10 19:40:21 +12:00
Simey Lameze aa0785431a 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:07 +08:00
Jun Pataleta fd65fe1bdf 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:37:58 +08:00
Santosh Nagargoje 9ffdcf3da1 MDL-78674 calendar: Added fix to rebuild module cache in calendar 2023-08-10 09:37:58 +08:00
ScottVerbeek 51a07db338 MDL-77381 question engine: don't query empty arrays 2023-08-10 08:08:34 +10:00
Tim Hunt 8905ebffb7 MDL-78962 core/loadingicon: remove jQuery requirement in the API 2023-08-09 21:17:05 +01:00
Eloy Lafuente (stronk7) a3ed617072 MDL-78957 libraries: Fix php82 undefined property deprecation
This was detected only in master (4.3dev) because MDL-40084
added a unit test covering it. But the very same patch is
needed in 402_STABLE, no matter it's not covered there.
2023-08-09 15:26:58 +02:00
Paul Holden e3d93edc6d MDL-78647 files: safer unserializing of file reference data. 2023-08-09 04:53:19 +00:00
Shamim Rezaie 6f93f45c53 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:53:19 +00:00
Matt Porritt d043d3daf7 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:53:19 +00:00
Rajneel Totaram c85b2a4566 MDL-71728 mod_quiz: check if user can access this page 2023-08-09 04:53:19 +00:00
Huong Nguyen 1933e6a39f Merge branch 'MDL-78904-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-09 11:42:56 +07:00
Huong Nguyen 68366595f2 Merge branch 'MDL-75047-MOODLE_402_STABLE' of https://github.com/SysBind/moodle into MOODLE_402_STABLE 2023-08-09 11:30:15 +07:00
Jun Pataleta a8e8576e0b Merge branch 'MDL-78872-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-09 12:10:23 +08:00
Ilya Tregubov a14e8aaae7 Merge branch 'MDL-78714-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-08-09 12:05:05 +08:00
Huong Nguyen 1b05063d00 Merge branch 'MDL-78235-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-08-09 10:43:03 +07:00
Ilya Tregubov ae4ae605b4 Merge branch 'MOODLE_402_STABLE_MDL-78860' of https://github.com/mattporritt/moodle into MOODLE_402_STABLE 2023-08-09 09:43:08 +08:00
Andrew Nicols 9de452c011 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 09:07:04 +08:00
Andrew Nicols ff9d561d82 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 09:05:25 +08:00
Andrew Nicols 5acae49336 MDL-78714 editor_tiny: Move TinyMCE import instructions to correct path 2023-08-09 09:05:23 +08:00
Huong Nguyen c5f9df8d11 Merge branch 'MDL-78492_aurora_mysql_rowformat_402' of https://github.com/mark-webster-catalyst/moodle into MOODLE_402_STABLE 2023-08-08 21:42:59 +07:00
Sara Arjona 08d97e4b30 Merge branch 'MDL-78770-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-08 13:55:32 +02:00
Sara Arjona 9a1aea7c91 Merge branch 'MDL-77658-MOODLE_402_STABLE' of https://github.com/SysBind/moodle into MOODLE_402_STABLE 2023-08-08 13:29:48 +02:00
Sara Arjona c662c08d89 Merge branch 'MDL-78559-402' of https://github.com/rmady/moodle into MOODLE_402_STABLE 2023-08-08 13:02:01 +02:00
Paul Holden ab962f6e20 MDL-76123 course: multilingual module icon alt text attribute. 2023-08-08 08:29:20 +01:00
Jun Pataleta a27734b6f1 Merge branch 'MDL-78896-402-enfix' of https://github.com/vmdef/moodle into MOODLE_402_STABLE 2023-08-08 15:29:14 +08:00
Paul Holden 3e11151348 MDL-78939 qformat_xml: fix reference to calculated question files. 2023-08-08 08:09:38 +01:00
AMOS bot 9b01237187 Automatically generated installer lang files 2023-08-08 00:10:35 +00:00
Helen Foster 63440b3216 MDL-78896 lang: Import fixed English strings (en_fix) 2023-08-07 11:26:45 +01:00
Paul Holden ed2638244f 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:42 +01:00
Paul Holden ce06287a82 MDL-78302 mod_forum: fix course module grade button parameters. 2023-08-07 10:45:15 +01:00
Ilya Tregubov 410d8cf0ba Merge branch 'MDL-78800_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-08-07 16:58:05 +08:00
Ilya Tregubov 9f24926e1a Merge branch 'MDL-78550-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-07 11:34:27 +08:00
chen levy cd2d34a055 MDL-77658 theme: Fixed RTL manage course categories menu
fixed course checkboxes that appears on the categories menu on RTL
2023-08-06 09:56:29 +03:00
Eloy Lafuente (stronk7) 11510dadbc 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 php80 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-04 15:08:51 +02:00
Sara Arjona 6f40d9ffd7 weekly release 4.2.1+ 2023-08-04 12:40:05 +02:00
Jun Pataleta a5742d7845 MDL-78904 user: Remove non-existent require
* And enclose context parameter in an array.
2023-08-04 14:42:39 +08:00
Matt Porritt 6177a2f994 MDL-78860 qtype_calculatedmulti: PHP 8.2 compatibility
PHP 8.2 has deprecated setting properties on objects dynamically.
The qtype_calculatedmulti question type had two properties being
set this way($correctanswerlength and$correctanswerformat).
This patch extends the question_answer class to add the properties
when the object is instantiated.
2023-08-04 15:46:46 +10:00
meirzamoodle ab0a36e796 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:17 +07:00
Jun Pataleta c3f70b3ef5 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:24 +08:00
Ilya Tregubov abfdb19e80 Merge branch 'MDL-78866-402' of https://github.com/danghieu1407/moodle into MOODLE_402_STABLE 2023-08-03 09:38:55 +08:00
Ilya Tregubov 4fb54bb52f Merge branch 'MDL-78742-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-03 09:24:03 +08:00
Sara Arjona 46e3110812 Merge branch 'MDL-78460-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-02 08:51:06 +02:00
Jun Pataleta 2dc7fc1497 Merge branch 'MDL-78498-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-08-02 11:23:10 +08:00
Paul Holden e30c0b63b7 MDL-78872 grade: fix external class execute method visibility. 2023-08-02 02:15:13 +01:00
Sara Arjona 7dbeef905e Merge branch 'MDL-78703-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-08-01 13:44:59 +02:00
danghieu1407 d7b79e57a9 MDL-78866 question: question_created trigger pre-saving extra fields 2023-08-01 16:00:49 +07:00
Simey Lameze bcd8431a7f 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:00 +08:00
Angelia Dela Cruz 03795be887 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:00 +08:00
Angelia Dela Cruz 54ba0809bf 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:57:29 +08:00
Andrew Nicols b74cea9834 MDL-78632 core: Update upgrade versions 2023-08-01 09:31:11 +08:00
Andrew Nicols ce9eee67cb Merge branch 'M402-MDL-78632' of https://github.com/marcusboon/moodle into MOODLE_402_STABLE 2023-08-01 09:29:51 +08:00
Tomo Tsuyuki 1d1b5908db MDL-77378 qtype_multianswer: Fix division by zero errors 2023-08-01 11:25:42 +10:00
Iñaki Arenaza fa331c5360 MDL-78481 mod_lesson: matching pagetype applying filters fix 2023-07-31 16:30:20 +02:00
Michael Aherne 10cb2941e5 MDL-78235 userprofile: Check for defaultdata with isset(). 2023-07-31 19:32:55 +08:00
Jun Pataleta 1dc6a35d24 MDL-78550 core: Ensure spacing between more menu item attributes 2023-07-28 17:25:44 +08:00
Jun Pataleta 5c0af05e15 MDL-78550 grade: Hide empty filler rows from the accessibility tree 2023-07-28 17:25:22 +08:00
Jun Pataleta 997d5e44a8 MDL-78550 grade: Avoid rendering an empty <h2> heading 2023-07-28 17:25:21 +08:00
Jun Pataleta d351633fb9 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:25:20 +08:00
Marcus Boon db9b34b993 MDL-78632 filetypes: Introduce yaml file type 2023-07-28 15:27:26 +10:00
Ilya Tregubov e4919b0feb weekly release 4.2.1+ 2023-07-28 10:44:10 +08:00
Ilya Tregubov 520a212057 Merge branch 'MDL-78782-402' of https://github.com/ferranrecio/moodle into MOODLE_402_STABLE 2023-07-27 09:59:42 +08:00
Ferran Recio ad4e61c2a2 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:20:06 +02:00
Neill Magill 9793303d3f 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 08:44:00 +01:00
Huong Nguyen 170a0d0eb9 Merge branch 'MDL-78618_402' of https://github.com/larsbonczek/moodle into MOODLE_402_STABLE 2023-07-26 14:22:13 +07:00
Jun Pataleta 7629c4ff44 Merge branch 'MDL-78377-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-26 10:47:34 +08:00
Mark Webster afc6f0953c 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:58:08 +01:00
Miri Lipson bbcf3db3c5 MDL-75047 icons: Define the orientation of the question mark in right-to-left languages. 2023-07-25 11:04:37 +03:00
Alex Yeung 5069c84fee MDL-78811 check: fix duplicate column contextid warning 2023-07-24 22:52:37 +01:00
Leon Stringer f8f9395ed8 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:02 +01:00
Paul Holden 6cbb421d31 MDL-78761 enrol: correct enrolment suspended state report filter. 2023-07-21 17:13:06 +01:00
Huong Nguyen acf600a9b4 weekly release 4.2.1+ 2023-07-21 20:56:27 +07:00
Huong Nguyen 917780c2cb Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-07-21 20:56:26 +07:00
Paul Holden 124a575813 MDL-78742 tool_uploadcourse: configure show activity dates value. 2023-07-20 16:28:39 +01:00
Jun Pataleta 1d12df6e12 MDL-78770 tiny_recordrtc: Use proper window.console.warn() function 2023-07-20 14:32:46 +08:00
Jun Pataleta e5acfffa04 MDL-78770 atto_recordrtc: Use proper window.console.warn() function 2023-07-20 14:23:14 +08:00
Huong Nguyen 9f2d2332de Merge branch 'MDL-78525-402' of github.com:HuongNV13/moodle into MOODLE_402_STABLE 2023-07-20 10:57:47 +07:00
Huong Nguyen d3e42f9a8b MDL-78525 core: Update upgrade.txt for count_words and count_letters 2023-07-20 10:53:56 +07:00
Khoa Nguyen Dang 7cdae1a10c MDL-78749 Accessibility\Quiz: Previous attempt table caption missing 2023-07-20 10:17:13 +07:00
Ilya Tregubov b222d8927b Merge branch 'MDL-76854-subscription_deleted-402' of https://github.com/leonstr/moodle into MOODLE_402_STABLE 2023-07-20 10:49:32 +08:00
Huong Nguyen 44f4d3b123 Merge branch 'MDL-78525/402' of https://github.com/skodak/moodle into MOODLE_402_STABLE 2023-07-20 09:04:12 +07:00
Ilya Tregubov cfe04a6891 Merge branch 'MDL-75115-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-07-20 09:41:07 +08:00
Andrew Nicols 7f50d30e9f Merge branch 'MDL-78716-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-20 00:28:36 +08:00
Andrew Nicols 97fbf797c4 Merge branch 'MDL-78715-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-20 00:17:21 +08:00
Andrew Nicols 45561f7d84 Merge branch 'MDL-77645-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-20 00:11:36 +08:00
Andrew Nicols 3f3409cfd7 Merge branch 'MDL-77328-402-fix' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-07-19 23:47:51 +08:00
Andrew Nicols 66c3430f2d Merge branch 'MDL-78704-402' of https://github.com/rjnl/moodle into MOODLE_402_STABLE 2023-07-19 21:57:37 +08:00
Jun Pataleta ac846f9fd7 MDL-77328 qformat_xml: Avoid dynamic declaration for question_answer
Declare qformat_xml::answerfiles and qformat_xml::feedbackfiles instead
of dynamically declaring answerfiles and feedbackfiles for the
question_answer instance when exporting questions and answers to XML
format.
2023-07-19 14:33:41 +08:00
Jun Pataleta fe7295010e MDL-77328 qtype_caclulatedmulti: Use qtype_calculated_answer
The question answers for question type plugins extending
\qtype_calculated now have the type
\qtype_calculated\qtype_calculated_answer. So the answers for test
helper functions make_calculatedmulti_question_singleresponse() and
make_calculatedmulti_question_multiresponse() should also be changed
accordingly.
2023-07-19 14:33:41 +08:00
Jun Pataleta 5fe5629ef2 MDL-77328 qtype_caclulatedsimple: Use qtype_calculated_answer
The question answers for question type plugins extending
\qtype_calculated now have the type
\qtype_calculated\qtype_calculated_answer. So the answers for
make_calculatedsimple_question_sum() should be changed accordingly.
2023-07-19 14:33:41 +08:00
Jun Pataleta 6ec5cfa4e8 MDL-77328 qtype_calculated: Add upgrade.txt notes
* Question type plugins that extend qtype_calculated should be made
aware of the changes about the new question_answer type
\qtype_calculated\qtype_calculated_answer.
2023-07-19 14:33:41 +08:00
Jun Pataleta 91430abc21 Merge branch 'MDL-77328-402' of https://github.com/rezaies/moodle into MOODLE_402_STABLE 2023-07-19 09:54:18 +08:00
AMOS bot a6ef6a2253 Automatically generated installer lang files 2023-07-19 00:11:05 +00:00
Shamim Rezaie e88e9f6327 Merge branch 'MDL-78564-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-17 20:36:32 +10:00
Leon Stringer b755271b8d MDL-76854 tool_monitor: subscription_deleted ctx
Fix course context for subscription_deleted event when deleting rules
with multiple subscriptions.
2023-07-15 08:20:08 +01:00
Paul Holden f5aca82d20 MDL-78703 behat: fix HTTP GET method capitalization on redirect. 2023-07-15 00:59:59 +01:00
Paul Holden c7ac993b9e MDL-78715 payment: prevent action menus flowing under container. 2023-07-14 17:16:54 +01:00
Paul Holden 0bd734bdda 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:16 +01:00
Paul Holden 79bfce98af MDL-78460 mod_forum: correctly render timed post label information. 2023-07-14 10:14:57 +01:00
Petr Skoda b3fa09d554 MDL-78525 core: fix word and character counting 2023-07-14 08:44:26 +02:00
Ilya Tregubov 0ac092cc92 weekly release 4.2.1+ 2023-07-14 09:25:36 +08:00
Rajneel Totaram 6b8b79c3f4 MDL-78704 course: Render unescaped HTML for activity dates 2023-07-14 10:19:54 +12:00
Tim Hunt b69cc0c26d MDL-76757 delete questions: fix message generation logic
The order was getting scrambled.
2023-07-13 21:43:48 +02:00
Meirza 6e4e0abad7 MDL-77328 qtype_multianswer: Refactor for PHP 8.2 compatibility
This commit addresses compatibility issues in the qtype_multianswer
question type. The following changes were made:

- The usage of the undeclared property $maxmark on subquestions in
  qtype_multianswer was identified as problematic. To resolve this,
  the existing declared property $defaultmark is now being used for
  the same purpose.

By switching to the declared property $defaultmark, compatibility with
PHP 8.2 is ensured and the issue with the undeclared property is
resolved.
2023-07-13 21:04:48 +10:00
Shamim Rezaie 35b64b004a MDL-77328 qtype_calculated: Refactor for PHP 8.2 compatibility
This commit addresses compatibility issues in the qtype_calculated
question type. The following problems were identified and resolved:

- qtype_calculated was reusing the qtype_numerical_answer class and
  setting two additional properties ($correctanswerlength and
  $correctanswerformat) that were not declared. To resolve this, a new
  class, qtype_calculated_answer, was defined and utilised.
- During grading in qtype_numerical, there were references to an
  undeclared property ($unitisright) used to track calculation details.
  This issue was fixed using a 'replace temp with query' refactoring.

These changes ensure the qtype_calculated question type is compatible
with PHP 8.2 and addresses the identified issues.
2023-07-13 21:04:48 +10:00
Meirza b8949b4c90 MDL-77328 qtype_truefalse: Refactor for PHP 8.2 compatibility
This commit addresses the following issues and improvements in the
qtype_truefalse class:

- Added missing class properties:
 - public $truefeedbackformat
 - public $falsefeedbackformat
 - public $showstandardinstruction
- Updated qtype_truefalse_question to include type hinting for better
  IDE support.
2023-07-13 21:04:48 +10:00
Jun Pataleta 89d84af752 Merge branch 'MDL-76046-402' of https://github.com/stevandoMoodle/moodle into MOODLE_402_STABLE 2023-07-13 11:19:36 +08:00
Huong Nguyen b7bf1d6fc3 Merge branch 'MDL-75195-402' of https://github.com/raortegar/moodle into MOODLE_402_STABLE 2023-07-13 09:57:55 +07:00
Huong Nguyen 68d5bfe6e3 Merge branch 'MDL-76757-402' of https://github.com/danghieu1407/moodle into MOODLE_402_STABLE 2023-07-13 09:46:44 +07:00
Ilya Tregubov af4ff2b867 Merge branch 'mdl-7133-402' of https://github.com/juancs/moodle into MOODLE_402_STABLE 2023-07-13 10:31:11 +08:00
Jake Dallimore 73ec043d4b Merge branch 'MDL-77912_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-07-13 10:09:26 +08:00
Andrew Nicols 951d0b8987 Merge branch 'MDL-78157-402' of https://github.com/golenkovm/moodle into MOODLE_402_STABLE 2023-07-13 09:48:03 +08:00
Andrew Nicols 2578646f10 Merge branch 'MDL-78556-402' of https://github.com/danghieu1407/moodle into MOODLE_402_STABLE 2023-07-13 09:28:49 +08:00
Andrew Nicols 10b7e70014 Merge branch 'MDL-76996_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-07-13 09:25:24 +08:00
Ilya Tregubov 3779f0fb4a Merge branch 'MDL-73213_402' of https://github.com/pedrojordao/moodle into MOODLE_402_STABLE 2023-07-13 09:18:09 +08:00
Sara Arjona c52c8e85dd Merge branch 'MDL-78673-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-07-12 18:18:08 +02:00
Andrew Nicols c18f100ea0 Merge branch 'MDL-77450-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-07-13 00:09:58 +08:00
Andrew Nicols 954d38e6f2 Merge branch 'MDL-78676-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-07-13 00:06:22 +08:00
Sara Arjona 79b2271482 Merge branch 'MDL-78455-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-07-12 17:37:07 +02:00
Sara Arjona 819aa90469 Merge branch 'MDL-78642-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-12 17:21:42 +02:00
Sara Arjona 6ac3d62125 Merge branch 'MDL-78522-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-07-12 16:57:42 +02:00
Paul Holden 6bdf4bb2b1 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:23 +01:00
Tim Hunt 22c57001d1 MDL-76996 question bank: fix errors when qbank_statistics is disabled 2023-07-12 11:47:17 +01:00
Sara Arjona 92ee7151e5 Merge branch '76319-gradebook-add-missing-continue-button-402' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_402_STABLE 2023-07-12 08:28:09 +02:00
Miri Lipson 0e2342d79d MDL-75115 theme_boost: Fix Bootstrap tooltips in RTL mode 2023-07-12 09:11:42 +07:00
Ilya Tregubov bcfc49e3ab Merge branch 'MDL-78216-402-1' of https://github.com/mihailges/moodle into MOODLE_402_STABLE 2023-07-12 09:47:49 +08:00
Tim Hunt 0fc9bfa71a MDL-77912 questions: make multi-choice stats calc robust to bad data 2023-07-11 16:57:58 +01:00
raortegar bed2352e67 MDL-75195 core: Added supportemail option to install_database.php 2023-07-11 11:13:54 +02:00
danghieu1407 38d1c5f174 MDL-78556 tablelib: flexible_table should support caption tag 2023-07-11 14:15:22 +07:00
Angelia Dela Cruz b98876efa1 MDL-77450 Behat: Behat cleanup and optimisation 2023-07-11 13:31:45 +08:00
Ilya Tregubov b0be75b9ac Merge branch 'MDL-67852_MOODLE_402_NEW' of https://github.com/aydevworks/moodle into MOODLE_402_STABLE 2023-07-11 11:11:54 +08:00
Ilya Tregubov 47cb335ea2 Merge branch 'MDL-77690-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-07-11 09:51:42 +08:00
Ilya Tregubov e046077a13 Merge branch 'MDL-75359-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-11 09:29:49 +08:00
Julien Boulen 96b5cb56e8 MDL-76319 gradebook: add continue button after csv grades import error 2023-07-10 10:18:31 +02:00
danghieu1407 bb7d15c7e0 MDL-76757 Question bank: Can not delete the question completely 2023-07-10 14:32:35 +07:00
Andrew Nicols a8105bccf9 MDL-78673 grade: Switch test to use generators 2023-07-10 11:28:00 +08:00
Andrew Nicols 6a79b98768 MDL-78673 grade: Switch to behat navigation steps 2023-07-10 11:27:09 +08:00
Andrew Nicols ded705eacd MDL-78673 grade: Address random failure due to toast 2023-07-10 11:26:38 +08:00
Andrew Nicols 2e8bbe2c94 MDL-78673 behat: Allow plugins to define their expansion of > 2023-07-10 11:26:38 +08:00
Andrew Nicols 3e34904ce9 Merge branch 'MDL-77180-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-09 22:14:11 +08:00
Alex Yeung b4deb483ce MDL-67852 tool_dataprivacy: Fix security checks 2023-07-09 14:51:32 +01:00
Juan Segarra Montesinos ebc281d14f MDL-71133 mod_assign: Grade decimals missing with marking workflow 2023-07-09 08:12:50 +02:00
Sara Arjona fdf3daa6a9 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:29 +02:00
Paul Holden 8c540d58f2 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:49 +01:00
Paul Holden a75a0a596e 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:24 +01:00
Ilya Tregubov d7a0dcbdae MDL-78522 cohort: Fix capability/visibility check. 2023-07-07 15:58:27 +08:00
Ilya Tregubov 2ef6a3b9b9 weekly release 4.2.1+ 2023-07-07 11:52:21 +08:00
Ilya Tregubov 4aa826356b Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-07-07 11:52:18 +08:00
Pedro Jordao f4727c3922 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:42:57 -03:00
Lars Bonczek 67dea5b53b MDL-78618 core_course: use UNION in get_nearest_editable_subcategory 2023-07-06 18:52:17 +02:00
Sara Arjona 3231d72a96 Merge branch 'MDL-78391-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2023-07-06 11:03:11 +02:00
Huong Nguyen f1a8189dfb MDL-78391 atto_recordrtc: Fix recording issue with Chrome 2023-07-06 15:47:47 +07:00
Huong Nguyen 395f8c49d8 MDL-78391 tiny_recordrtc: Fix recording issue with Chrome 2023-07-06 15:47:44 +07:00
Sara Arjona bdd7ea645e Merge branch 'MDL-77375-402-patch' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-07-06 10:12:22 +02:00
Paul Holden 882d676a66 MDL-78642 mod_assign: typecast portfolio button renderer return.
Internally the button return is nullable, which we need to account
for in the renderer.
2023-07-06 09:04:54 +01:00
Misha Golenkov 412231454f MDL-78379 js: Add missing newline character 2023-07-06 16:15:36 +10:00
Ilya Tregubov e9c4e02202 MDL-77375 tool_dataprivacy: Fix menus going floaty. 2023-07-06 13:11:47 +08:00
Jun Pataleta c17ed92914 Merge branch 'MDL-78391-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-07-06 11:59:15 +08:00
Jun Pataleta 3e592b11fe Merge branch 'MDL-78488_402' of https://github.com/t-schroeder/moodle into MOODLE_402_STABLE 2023-07-06 11:17:19 +08:00
Ilya Tregubov d5e8ce4743 Merge branch 'MDL-69983-402' of https://github.com/davewoloszyn/moodle into MOODLE_402_STABLE 2023-07-06 10:26:06 +08:00
Ilya Tregubov 57d3069711 Merge branch 'MDL-78608_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-07-06 09:57:00 +08:00
Jun Pataleta a5b351cf10 Merge branch 'MDL-78484-402' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_402_STABLE 2023-07-06 09:41:33 +08:00
Ilya Tregubov 2ad8691f81 Merge branch 'MDL-77375-402' of https://github.com/rezaies/moodle into MOODLE_402_STABLE 2023-07-06 09:20:36 +08:00
Jun Pataleta 4af519c068 Merge branch 'MDL-74893-MOODLE_402_STABLE-fix_auto_login_guest' of https://github.com/praxisdigital/moodle into MOODLE_402_STABLE 2023-07-06 09:14:17 +08:00
Paul Holden 079269febb Merge branch 'MDL-78542-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-07-05 17:13:19 +01:00
Andrew Nicols 3bdf0bdffe Merge branch 'MDL-78644-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-05 22:10:30 +08:00
Andrew Nicols 5f71eb0d12 Merge branch 'MDL-78338-402_toolbrickfieldlinkinnewwindow' of https://github.com/brickfield/moodle into MOODLE_402_STABLE 2023-07-05 22:01:48 +08:00
Rodrigo Mady 4e233eb6b0 MDL-78559 mod_chat: Fix chat report loading with TeX filter 2023-07-05 10:57:38 -03:00
Andrew Nicols 1eb52d00f1 Merge branch 'MDL-78622_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-07-05 21:56:14 +08:00
Andrew Nicols dee8468aa9 Merge branch 'MDL-64152-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-07-05 21:49:05 +08:00
Andrew Nicols 3c3bd19f49 Merge branch 'MDL-78614-402' of https://github.com/noeldemartin/moodle into MOODLE_402_STABLE 2023-07-05 20:30:28 +08:00
Paul Holden e2fd30a2c5 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:36 +01:00
Ilya Tregubov 0db5c697d7 Merge branch 'MDL-78485-402' of https://github.com/stevandoMoodle/moodle into MOODLE_402_STABLE 2023-07-05 11:51:48 +08:00
Andrew Nicols 935664bc95 Merge branch 'MDL-78158-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-07-05 10:23:55 +08:00
Andrew Nicols 178fe9f0c7 Merge branch 'MDL-77873-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-07-05 10:04:22 +08:00
Luca Bösch c65dabf79b MDL-77873 quiz: style the question number edit elements. 2023-07-04 23:06:59 +02:00
Huong Nguyen 2bcdfcf638 Merge branch 'MOODLE_402_MDL-77396_Fix' of https://github.com/Dineshdurai/moodle into MOODLE_402_STABLE 2023-07-04 16:15:26 +07:00
Huong Nguyen d8e0807dd2 Merge branch 'MDL-78596-coursecard-divider-402' of https://github.com/leonstr/moodle into MOODLE_402_STABLE 2023-07-04 15:28:01 +07:00
Huong Nguyen 86e27a7eb1 Merge branch 'MDL-78578-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-07-04 15:16:00 +07:00
Huong Nguyen a52d5c9e28 Merge branch 'MDL-76853-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-07-04 12:46:10 +07:00
Huong Nguyen 442c94a808 Merge branch 'MDL-78138-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-07-04 12:38:35 +07:00
Stevani Andolo c270d87fec MDL-78485 editor_tiny: Allowed script tag to be added in tinyMCE editor 2023-07-04 13:36:34 +08:00
Andrew Nicols 9047a30cd9 Merge branch 'MDL-75324-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-07-04 13:30:04 +08:00
Andrew Nicols 3970ad4264 Merge branch 'MDL-76840_402' of https://github.com/uzimike/moodle into MOODLE_402_STABLE 2023-07-04 13:21:18 +08:00
Simey Lameze a51864ad26 MDL-75324 behat: use a proper step to verify completion status 2023-07-04 11:20:14 +08:00
AMOS bot 1169389d47 Automatically generated installer lang files 2023-07-04 00:11:41 +00:00
Angelia Dela Cruz 09792257fd MDL-78158 behat: Behat cleanup and optimisation 2023-07-04 07:49:46 +08:00
Sara Arjona 28005f7f39 Merge branch 'MDL-77868-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-03 17:29:35 +02:00
Sara Arjona 576ae57607 Merge branch 'MDL-76661-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-07-03 17:26:21 +02:00
Paul Holden a2a899b204 MDL-78377 grade: reset page number when filtering by group. 2023-07-03 12:54:53 +01:00
Angelia Dela Cruz 82fdb9e20e MDL-78158 Behat: Use data generators to add blocks 2023-07-03 18:59:19 +08:00
Tim Hunt 9512b017b2 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:36 +01:00
Paul Holden 97ea22bc19 MDL-76661 mod_bigbluebuttonbn: fix meeting attendee role comparison. 2023-07-03 11:41:10 +01:00
Noel De Martin c3c2180169 MDL-78614 behat: Remove trailing quotes 2023-07-03 11:18:30 +02:00
Andrew Nicols e18af1ab61 MDL-78391 atto_recordrtc: Improve MacOS codec compatability 2023-07-03 16:52:28 +08:00
Andrew Nicols b31b0f7479 MDL-78391 tiny_recordrtc: Set filename according to container 2023-07-03 16:52:26 +08:00
Andrew Nicols 0f07221c64 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 cf681dc724 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:13 +08:00
Andrew Nicols be8a7442e7 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 2f6c1b56e4 MDL-76853 editor_tiny: Refactor behat helpers into trait 2023-07-03 09:38:23 +08:00
Karen Holland e72f030874 MDL-78338 tool_brickfield: Allow link open in new window with warning 2023-07-01 23:11:18 +01:00
Shamim Rezaie 91acee489d MDL-77375 core_grades: set boundary of the dropdowns in grade setup page 2023-07-02 00:05:18 +10:00
Shamim Rezaie 72d853549a MDL-77375 gradereport_singleview: set boundary of the dropdowns 2023-07-02 00:05:18 +10:00
Shamim Rezaie 4059ac3e29 MDL-77375 tool_dataprivacy: set boundary of the dropdowns 2023-07-02 00:03:04 +10:00
Shamim Rezaie 1d724c4a4a MDL-77375 mod_forum: set boundary of the dropdown
Also removed the unnecessary button role from the <button> element
2023-07-02 00:03:03 +10:00
Shamim Rezaie 73da2849e5 MDL-77375 mod_assign: set overflow constraint boundary of the dropdowns 2023-07-02 00:03:03 +10:00
Shamim Rezaie 8dda51d57e MDL-77375 output: Allow additional options for dropdowns 2023-07-02 00:03:03 +10:00
Shamim Rezaie 5c945e1283 MDL-77375 theme: Re-fix the bootstrap scrollbar issue 2023-07-02 00:03:03 +10:00
Paul Holden ed5a1cdef1 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:02 +01:00
Jun Pataleta 5491e32ef3 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:55:09 +08:00
Jun Pataleta abd334b104 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:55:04 +08:00
Tim Schroeder 5014d7bbb4 MDL-78488 question bank: don't load statistics when they are disabled 2023-06-30 11:47:50 +02:00
Jun Pataleta d32cccf278 MDL-77690 user: Add sr-only heading for the user profile page 2023-06-30 17:45:25 +08:00
Jun Pataleta d6fc042d06 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:45 +08:00
Jun Pataleta 628c5c07de 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:45 +08:00
Jun Pataleta eeabb5303f MDL-78542 mod_url: Use the module name for the URL resource's link text 2023-06-30 17:27:43 +08:00
Jun Pataleta 9f23aa9036 Merge branch 'MDL-78068-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-06-30 16:42:37 +08:00
Jake Dallimore 059dab5861 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:02 +08:00
Franziska Hübler 1da8cc11f2 MDL-69983 backup: Save async backups in correct area. 2023-06-30 10:13:17 +10:00
AMOS bot fe7f1346bf Automatically generated installer lang files 2023-06-30 00:08:45 +00:00
Stevani Andolo e334506829 MDL-76046 core: Fixed secondary navigation on smaller screen 2023-06-30 06:31:05 +08:00
Luca Bösch d2c83565d9 MDL-78138 theme_boost: Reliably remove TYPE_CATEGORY breadcrumbs. 2023-06-29 21:42:31 +02:00
Tim Hunt 3c311cc9af 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:26:13 +01:00
Huong Nguyen b509652427 weekly release 4.2.1+ 2023-06-29 22:22:17 +07:00
Andrew Nicols 024fe89697 Merge branch 'MDL-78599-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-06-29 11:33:06 +08:00
Jun Pataleta dc5f74ce5d Merge branch 'MDL-77993-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-29 11:27:58 +08:00
Jun Pataleta e6d3a4817e Merge branch 'MDL-78432-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-06-29 11:25:48 +08:00
Andrew Nicols c807000e6d Merge branch 'MDL-78018-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-29 11:01:57 +08:00
Ilya Tregubov 18e1093d07 Merge branch 'MDL-77286-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-06-29 09:44:59 +08:00
Ilya Tregubov b401a8b4c9 Merge branch 'MDL-78521-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-06-29 09:34:44 +08:00
Huong Nguyen 6c3cf7dce0 Merge branch 'MDL-77679_402' of https://github.com/mkassaei/moodle into MOODLE_402_STABLE 2023-06-28 21:17:53 +07:00
Jake Dallimore bafffc90d1 MDL-78599 enrol_lti: fix SQL syntax error in course grade sync 2023-06-28 12:40:33 +08:00
Jake Dallimore 4f5d62730f 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 12:40:22 +08:00
Leon Stringer def6434c79 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:15 +01:00
Simey Lameze e81aa45dec MDL-77286 behat: change window size to large to avoid random fails 2023-06-27 17:12:12 +08:00
Laurent David 7075ea60ea 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:13:01 +02:00
Andrew Nicols cecd6ed530 Merge branch 'MDL-78459-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-27 13:14:23 +08:00
Ilya Tregubov 59227e27fa Merge branch 'MDL-78443-402' of https://github.com/jleyva/moodle into MOODLE_402_STABLE 2023-06-27 11:01:22 +08:00
Jake Dallimore 9434b600c9 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:06:14 +08:00
Dinesh Durai 62b3a19b17 MDL-77396 wiki: Fix print without background 2023-06-27 00:53:47 +05:30
mkassaei 2345dcbdfa MDL-77679 Drag and drop question type weird behavior 2023-06-26 17:04:41 +01:00
Jun Pataleta 8e90f17e65 Merge branch 'MDL-76724_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-06-26 19:26:00 +08:00
Laurent David b312ed4b11 MDL-78068 mod_h5pactivity: Fix sort the paragraph activity
* Fix sort the paragraph/sequencing activity report in H5P.
2023-06-26 08:42:44 +02:00
Jun Pataleta 961137d435 Merge branch 'MDL-78168-402-final' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-06-26 11:20:01 +08:00
Simey Lameze 33fc59cfc5 MDL-78521 behat: reload page before asserting content
This commit also reword a Scenario name to make it unique
2023-06-26 11:19:39 +08:00
Andrew Nicols 2273c1f8e7 Merge branch 'MDL-78237-402' of https://github.com/davewoloszyn/moodle into MOODLE_402_STABLE 2023-06-24 23:21:41 +08:00
Andrew Nicols 84b160f432 Merge branch 'MDL-76673-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-24 22:46:37 +08:00
Andrew Nicols ff32f911a3 Merge branch 'MDL-78544-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-06-24 22:26:41 +08:00
Andrew Nicols d8cecb3d25 Merge branch 'MDL-77152-MOODLE_402_STABLE' of https://github.com/sh-csg/moodle into MOODLE_402_STABLE 2023-06-24 22:17:43 +08:00
Andrew Nicols 3054ef4de3 Merge branch 'MDL-78172-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-24 21:59:58 +08:00
Eloy Lafuente (stronk7) a5aa29cd2a MDL-76724 phpcs: Moodle 4.2.x is going to use php80 to php82 only
Now that it has been decided to backport php82 to Moodle 4.2.x, we
can already fix the php versions to be checked by the coding
standard (they were previously open for the branch).
2023-06-24 12:29:53 +02:00
Eloy Lafuente (stronk7) 3ac9bda79a 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:29:53 +02:00
Andrew Nicols cb6d999911 MDL-78168 mod_assign: Stop storing properties dynamically
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

In these cases, mod_assign was treating other unrelated objects as its
personal object store. These have been updated to not require this.
2023-06-24 13:35:13 +08:00
Sara Arjona 56c8910c4b weekly release 4.2.1+ 2023-06-23 09:00:07 +02:00
Andrew Nicols f37ded7607 Merge branch 'MDL-78004_402' of https://github.com/mwehr/moodle into MOODLE_402_STABLE 2023-06-22 14:34:42 +02:00
Ilya Tregubov a70d3dcdb6 Merge branch 'MDL-78434-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2023-06-22 14:34:42 +02:00
Julien Boulen 4e4264c058 MDL-77986 backup: trim extra white spaces on search forms 2023-06-22 14:34:42 +02:00
Andrew Nicols 470d53ca58 Merge branch 'MDL-78071-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-22 14:34:42 +02:00
Andrew Nicols 88d7a6c496 Merge branch 'MDL-78541/402' of https://github.com/skodak/moodle into MOODLE_402_STABLE 2023-06-22 14:34:42 +02:00
Andrew Nicols 9879ed8f06 Merge branch 'MDL-78350-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-22 14:34:41 +02:00
Andrew Nicols db9c75632a Merge branch 'MDL-68067-42' of https://github.com/Chocolate-lightning/moodle into MOODLE_402_STABLE 2023-06-22 14:34:41 +02:00
Andrew Nicols 4a8db46d03 Merge branch 'MDL-78056-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-06-22 14:34:41 +02:00
Andrew Nicols db19db585b Merge branch 'MDL-78263-402' of https://github.com/jleyva/moodle into MOODLE_402_STABLE 2023-06-22 14:34:41 +02:00
Andrew Nicols 2e9c7a7af5 Merge branch 'MDL-78435-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-22 14:34:41 +02:00
Andrew Nicols f3ef477d4c Merge branch 'MDL-75913-402' of https://github.com/davewoloszyn/moodle into MOODLE_402_STABLE 2023-06-22 14:34:40 +02:00
Andrew Nicols 087043b0fe Merge branch 'MDL-78477_402' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_402_STABLE 2023-06-22 14:34:40 +02:00
Andrew Nicols bcada07b27 Merge branch 'MDL-78159-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-22 14:34:40 +02:00
Andrew Nicols 8ddac57a20 Merge branch 'MDL-77865_MOODLE_402_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_402_STABLE 2023-06-22 14:34:40 +02:00
Andrew Nicols 2a9a1b8117 Merge branch 'MDL-78164-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-22 14:34:39 +02:00
hieuvu d91659242b MDL-78484 formslib: Move enable checkbox display before the date picker 2023-06-22 11:03:16 +07:00
Jake Dallimore 18339a5fa7 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 10:59:37 +08:00
Paul Holden ea5509263a MDL-78350 reportbuilder: parse javascript before rendering template. 2023-06-21 17:33:37 +01:00
Paul Holden 402709b93d 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:37 +01:00
Petr Skoda 570405db75 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:46:47 +02:00
Sara Arjona 4df28116eb Merge branch 'MDL-76635-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-06-21 14:02:16 +02:00
Anupama Sarjoshi cc2638d1b2 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:46:51 +01:00
Sara Arjona af3eebdcf9 Merge branch 'MDL-63120_Badges_cron_task_fails-MOODLE_402_STABLE' of https://github.com/mebis-lp/moodle into MOODLE_402_STABLE 2023-06-21 11:43:10 +02:00
Ilya Tregubov 3769c65a97 Merge branch 'MDL-77591-402' of https://github.com/justusdieckmann/moodle into MOODLE_402_STABLE 2023-06-21 16:58:18 +08:00
Meirza 8bdda22ea1 MDL-78159 lib: Added missing properties for core libraries
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-06-21 15:42:59 +07:00
Meirza 5dee6a318c MDL-78164 lib: Added class properties that are not declared in grade
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-06-21 14:47:46 +07:00
Ilya Tregubov b280b960e3 Merge branch 'MDL-76174_402' of https://github.com/larsbonczek/moodle into MOODLE_402_STABLE 2023-06-21 14:26:45 +08:00
Simey Lameze 3c566431b1 MDL-76635 comment: render the delete icon in the right place
Special thanks to Andrew Lyons.
2023-06-21 12:45:27 +08:00
Simey Lameze 104eb90f4d MDL-76635 behat: improve submission comments test 2023-06-21 12:45:27 +08:00
Andrew Nicols 692ca82c6d Merge branch 'MDL-78163-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-21 11:59:25 +08:00
Andrew Nicols 262c1241bf Merge branch 'MDL-78160-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-21 10:22:16 +08:00
Lars Bonczek 62036a3e8b MDL-76174 core_course: get_nearest_editable_subcategory performance fix 2023-06-20 14:42:54 +02:00
Ilya Tregubov 371d086fcb Merge branch 'MDL-78259-htmlpurify-media-tags-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-06-20 14:36:50 +08:00
Julien Boulen bd7702ca83 MDL-78259 weblib: purify audio/video tags as inline elements 2023-06-20 14:34:10 +08:00
Ilya Tregubov 049c3e85f9 Merge branch 'MDL-77525/402' of https://github.com/skodak/moodle into MOODLE_402_STABLE 2023-06-20 13:04:28 +08:00
eWallah 0423dd3b75 MDL-68067 tool_mobile: Mobile tool link does not have a class attribute. 2023-06-20 10:26:13 +08:00
Jun Pataleta 0733bec58f Merge branch 'MDL-74021-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-06-20 10:13:29 +08:00
Jun Pataleta 24496360d2 Merge branch 'MDL-78369_402' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_402_STABLE 2023-06-19 23:16:55 +08:00
Mihail Geshoski ac4099d93b MDL-78216 gradereport_grader: Fix overlapping caused by sticky cells 2023-06-19 22:19:59 +08:00
Paul Holden fab09fb1c6 MDL-78071 cohort: disable report actions for managed cohorts. 2023-06-19 15:05:20 +01:00
Meirza 22d912df33 MDL-78160 lib: Added class properties that are not declared in dml
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

At the test_transaction_with_events() I changed $this->_called into $called local var,
since the $called is used inside the anonymous function I added the third param as
a variable passed by reference so the last assert can get the newest value.
2023-06-19 19:57:43 +07:00
Paul Holden 8f47df378a 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:01:59 +01:00
Angelia Dela Cruz 218d456ca0 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:09:20 +08:00
David Woloszyn d9c38222f2 MDL-75913 behat: Use alternatives to Atto in tests 2023-06-19 16:38:42 +10:00
David Woloszyn c9af94efcd MDL-75913 behat: Switch to TinyMCE editor iframe 2023-06-19 16:38:42 +10:00
David Woloszyn bfcc39996f MDL-75913 behat: Private files data generator 2023-06-19 16:38:42 +10:00
Andrew Nicols 0b80e3a887 MDL-75913 behat: Add support for file uploads in page generators 2023-06-19 16:38:42 +10:00
Andrew Nicols 7a35fe7213 MDL-75913 behat: Add support for file uploads in generators 2023-06-19 16:38:42 +10:00
Anders Rasmussen 3222658b8b MDL-74893 authentication: Fix auto-login guest
Fixed auto-login as guest, when Guest login button is hidden
2023-06-19 07:50:33 +02:00
Laurent David 91e6a55056 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:01 +02:00
Paul Holden 6f97a0325c 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:48 +01:00
Stefan Hanauska 377aa25c81 MDL-77152 files: Ensure trailing/leading slash 2023-06-18 16:22:20 +02:00
Petr Skoda 15217816ff MDL-77525 filter: add filtering stages 2023-06-17 16:48:40 +02:00
Paul Holden 53f513b9c6 MDL-78435 mod_assign: ensure due date is always after start date. 2023-06-16 18:41:58 +01:00
Juan Leyva a622730742 MDL-78443 course: Missing require for course_request 2023-06-16 10:17:40 +02:00
Andrew Nicols 95e0d9ce66 weekly release 4.2.1+ 2023-06-16 12:04:18 +08:00
Andrew Nicols 2d78e70d7b Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-06-16 12:04:15 +08:00
Angelia Dela Cruz 01b8a0b596 MDL-78455 Behat: Behat cleanup and optimisation for blog/tests/behat 2023-06-16 09:12:37 +08:00
Angelia Dela Cruz 6165917109 MDL-78455 Behat: Add Behat for adding, editing and deleting blog entries 2023-06-16 09:11:22 +08:00
Juan Leyva a98016f5c7 MDL-78263 airnotifier: keep notification name as part of the payload 2023-06-15 17:28:15 +02:00
Sara Arjona 686a27c470 Merge branch 'MDL-78165-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-06-15 10:17:05 +02:00
Andrew Nicols a6f69bb3e1 MDL-78165 mod_bigbluebuttonbn: Fetch cron status using API 2023-06-15 16:02:53 +08:00
Nathan Nguyen 5b8f9536e0 MDL-77865 qtype_ddwtos: fix incorrect inplace class 2023-06-15 15:02:14 +10:00
Ilya Tregubov 0bf0a489fb Merge branch 'MDL-70152-402-fix' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-06-15 12:12:37 +08:00
Simey Lameze 7b5b10df16 MDL-70152 behat: reply to post using data generator 2023-06-15 12:03:54 +08:00
Andrew Nicols dfd3cf1ca2 Merge branch 'MDL-77224-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-15 12:02:24 +08:00
Andrew Nicols ca3cd0d583 Merge branch 'MDL-78066-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-06-15 11:26:47 +08:00
Andrew Nicols f526079781 Merge branch 'MDL-78461-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-15 11:23:21 +08:00
Andrew Nicols 4548c9ac70 Merge branch 'MDL-78385-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-15 11:07:13 +08:00
Andrew Nicols 8f15bff75d Merge branch 'MDL-78141-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-15 11:03:02 +08:00
Andrew Nicols 42c06e002a Merge branch 'MDL-69231-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-06-15 10:59:34 +08:00
Ilya Tregubov a5cd8f3e91 Merge branch 'MDL-77542-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-15 10:36:59 +08:00
Ilya Tregubov 7a6deae378 Merge branch 'MDL-76733-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-06-15 10:23:09 +08:00
Andrew Nicols 13d0035479 Merge branch 'MDL-78165-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-15 10:00:01 +08:00
Andrew Nicols fb22161d75 Merge branch 'MDL-78478-402' of https://github.com/dasistwas/moodle into MOODLE_402_STABLE 2023-06-15 09:56:03 +08:00
Jake Dallimore 31e371e554 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:42:51 +08:00
Jake Dallimore 1aa2996451 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:42:48 +08:00
Andrew Nicols d33ae4187d 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 1a6d3fe529 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 ce7eed3bbc Merge branch 'MDL-78102-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-06-15 09:03:46 +08:00
AMOS bot 4ef6372aa4 Automatically generated installer lang files 2023-06-15 00:16:27 +00:00
Sara Arjona 289afaad9b Merge branch 'MDL-78055-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-14 16:54:52 +02:00
Sara Arjona 052c85bd72 Merge branch 'MDL-74824-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-14 16:51:06 +02:00
Sara Arjona 3cb0f37200 Merge branch 'MDL-76733-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-06-14 16:22:17 +02:00
David Bogner 9113605691 MDL-78478 forms: Fix repeated elements in dynamic forms 2023-06-14 15:39:05 +02:00
Meirza 352932e61f MDL-78165 lib: Added class properties that are not declared in classes
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-06-14 20:18:24 +07:00
Paul Holden 98080048cd 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:09 +01:00
Paul Holden eb1b246855 MDL-78385 course: fix non-AJAX activity indentation URL parameter. 2023-06-14 13:00:40 +01:00
Sara Arjona 0c357b9b3f Merge branch 'MDL-76715-402' of https://github.com/aanabit/moodle into MOODLE_402_STABLE 2023-06-14 13:18:20 +02:00
Sara Arjona d0c63dda2e Merge branch 'MDL-64648-402_enrol_manual_expirynotify_default_in_enrol_instance' of https://github.com/vtos/moodle into MOODLE_402_STABLE 2023-06-14 13:08:19 +02:00
Jun Pataleta 4b90d6a142 Merge branch 'MDL-78466-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-06-14 16:00:25 +08:00
Jake Dallimore 0e0af39f4b Merge branch 'MDL-78144-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-14 14:16:24 +08:00
Ilya Tregubov 79d4938240 Merge branch 'MDL-70152-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-06-14 13:24:40 +08:00
Jun Pataleta 25be7facf2 Merge branch 'MDL-76445-402-patch' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-06-14 12:18:49 +08:00
Andrew Nicols 36d7db23d0 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 11:58:06 +08:00
Meirza 020f7e655a MDL-78144 libraries: Added #[AllowDynamicProperties] to ltiprovider
To prevent the PHP 8.2 warning about Dynamic Properties' deprecation,
the #[\AllowDynamicProperties] attributes was added.
2023-06-14 10:28:24 +07:00
Meirza b613c4bbde MDL-78163 lib: Added class properties that are not declared in form
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-06-14 09:53:22 +07:00
Jun Pataleta ace64f66e3 Merge branch 'MDL-78313-blocks-performance-MOODLE_402_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_402_STABLE 2023-06-14 10:15:36 +08:00
Andrew Nicols e528b5dab4 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:27:25 +08:00
Ilya Tregubov eb0e8f6bd5 MDL-76445 gradereport_singleview: Fix Behat test
When you unenrol a user, the notification blocks some tertiary
navigation links.
2023-06-14 09:05:00 +08:00
vtos 76b28ab6c0 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:21:28 +02:00
Paul Holden 10bc8af009 MDL-78461 core: fix base plugininfo class reference to root directory. 2023-06-13 14:05:24 +01:00
Sara Arjona 32f001d98d 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:58 +02:00
sam marshall 029325bb3b MDL-78434 Lib: PHP 8.1 incompatible code relating to LDAP\Connection 2023-06-13 09:46:01 +01:00
Brendan Heywood 2f6ef17322 MDL-78313 admin: Improve performance of manage blocks page
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-06-13 17:49:57 +10:00
Ilya Tregubov 10d4819083 Merge branch 'MDL-76445-402-2' of https://github.com/mihailges/moodle into MOODLE_402_STABLE 2023-06-13 15:45:50 +08:00
Amaia Anabitarte aa85dad6c1 MDL-76715 mod_data: Remove data_records when the last field is deleted 2023-06-13 09:33:30 +02:00
Mihail Geshoski 3415229bf1 MDL-76445 gradereport_singleview: Usability fixes 2023-06-13 15:14:21 +08:00
Mihail Geshoski 40d2a8cb93 MDL-76445 gradereport_user: Usability fixes 2023-06-13 15:14:21 +08:00
Mihail Geshoski 932ebd1c2e MDL-76445 grade: Helper that returns all gradable users in a course 2023-06-13 15:14:21 +08:00
Jake Dallimore afd992fd6d Merge branch 'MDL-73052-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-06-13 14:44:37 +08:00
Andrew Nicols 167d24f052 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:05:57 +08:00
michaelkotlyar f45045aa85 MDL-76840 mod_assign: Account for extension when calculating time left. 2023-06-13 14:53:02 +12:00
Anupama Sarjoshi cc2512d450 MDL-78369 Multiple choice: Increase Choice and feedback boxes size 2023-06-12 12:07:47 +01:00
Jun Pataleta 3a1b6ac250 Merge branch 'MDL-75937-402' of https://github.com/stevandoMoodle/moodle into MOODLE_402_STABLE 2023-06-12 16:10:31 +08:00
Stevani Andolo 56edfcf6d5 MDL-75937 admin: Fixed config data display inconsistency 2023-06-12 15:24:51 +08:00
Jake Dallimore cd7b95205b Merge branch 'MDL-78167-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-12 15:06:32 +08:00
Andrew Nicols c6d04cbb1c Merge branch 'MDL-78166-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-12 12:25:53 +08:00
Andrew Nicols 13ba731659 Merge branch 'MDL-78355-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-12 10:26:56 +08:00
Andrew Nicols 7886051f83 Merge branch 'MDL-78297-402' of https://github.com/MartinGauk/moodle into MOODLE_402_STABLE 2023-06-12 10:19:13 +08:00
Paul Holden b1b41636a4 MDL-77224 mod_h5pactivity: clean up attempt data on activity deletion. 2023-06-11 18:37:08 +01:00
Paul Holden fff6b8b710 MDL-77993 mod_lesson: ensure report action menu always present. 2023-06-11 18:35:09 +01:00
Paul Holden 64734d59af MDL-74824 user: fix custom change password URL in login notification. 2023-06-11 17:41:01 +01:00
Paul Holden 419fcadcc8 MDL-78018 mod_assign: format group name in grading table. 2023-06-11 15:02:31 +01:00
Paul Holden 900534adc0 MDL-77542 mod_assign: remove duplicate grade heading from grader.
It's already part of the subsequent rendered form.
2023-06-11 15:01:28 +01:00
Paul Holden a30b75f9f8 MDL-78172 mod_forum: ensure group names are correctly formatted. 2023-06-11 15:00:23 +01:00
Ilya Tregubov 8c989335be Moodle release 4.2.1 2023-06-10 14:07:52 +08:00
Justus Dieckmann 87dc0ccfc3 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-09 14:47:27 +02:00
Ilya Tregubov d4937c4527 weekly release 4.2+ 2023-06-09 13:14:22 +08:00
Sara Arjona 62e7dc94d9 Merge branch 'MDL-78415-402-enfix' of https://github.com/vmdef/moodle into MOODLE_402_STABLE 2023-06-08 20:33:07 +02:00
Víctor Déniz cf40395830 MDL-78415 lang: Fix typo in Behat tests 2023-06-08 18:48:39 +01:00
Víctor Déniz ab62e5f23f MDL-78415 lang: Fix Behat tests regressions after merging en_fix strings 2023-06-08 11:52:38 +01:00
Víctor Déniz a29056941b MDL-78415 lang: Add parameter to reopencolumn string 2023-06-08 11:51:59 +01:00
Helen Foster 78db6582ba MDL-78415 lang: Import fixed English strings (en_fix) 2023-06-08 11:50:02 +01:00
David Woloszyn 80db7a0873 MDL-78237 editor_tiny: Prevent navbar obscuring modal content 2023-06-08 17:15:12 +10:00
David Woloszyn f77fe1c652 MDL-78237 css: Make navbar height available for non sass-use 2023-06-08 17:15:12 +10:00
Sara Arjona b1ccbfc24d Merge branch 'MDL-77946-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-08 06:56:51 +02:00
Sara Arjona 8c9545ca78 Merge branch 'MDL-78308-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-08 06:48:35 +02:00
Andrew Nicols 5b48a61484 Merge branch 'MDL-75696_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-06-08 12:31:03 +08:00
Andrew Nicols ef3eb09347 Merge branch 'MDL-78364-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-08 12:18:50 +08:00
Andrew Nicols abff2a6570 Merge branch 'MDL-78008_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-06-08 12:10:28 +08:00
Andrew Nicols 15afb64771 Merge branch 'MDL-77933-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-06-08 12:03:17 +08:00
Andrew Nicols c8631653cd MDL-76838 core: Add unit test for invalid unicode sequences 2023-06-08 11:59:14 +08:00
Andrew Nicols 30add0c159 Merge branch 'MDL-76838-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-08 11:54:25 +08:00
Cameron Ball 2fbb766149 MDL-75898 assignfeedback_editpdf: Improve page count mismatch logic
MDL-45580 introduced the readonlypages filearea, and when loading
page images for an attempt, the code would check if the pages existed
, creating them if not. The code inside this block also contained
a guard clause for the case where no readonly pages existed - which
is a situation that should not happen. Whenever readonly pages are
requested, they should exist.

MDL-66626 introduced a situation where page counts not matching would
also retrigger page generation. However this led to a situation where
the guard clause could be entered when requesting readonly pages.

This patch refactors the guard clause, and improves the logic to
regenerate pages.
2023-06-08 11:44:19 +08:00
Cameron Ball 3fa41951f3 MDL-75898 assignfeedback_editpdf: Don't poll readonly pages
When requesting the readonly version of pages (which contain
teacher annotations), they should always be available - the
PHP side even throws an exception when they're not. This
means we don't need to worry about polling document converters
from the JS side and can just return the pages immediately.
2023-06-08 11:44:19 +08:00
Cameron Ball 3d02f36f87 MDL-75898 assignfeedback_editpdf: Add randomness to PDF annotations
The behat step "I draw on the pdf" creates the exact same line every
time it is called. This can cause issues in a situation like the following:

- Student uploads PDF
- Teacher annotates page 1
- Student edits submission, adding another PDF
- Teacher annotates page 1 again
- When the student looks at their annotated PDF it appears the same as
  before they added the second PDF (i.e., they don't see extra pages for
  the second PDF)

Exactly why this happens isn't clear, and in practice this probably never
happens because the chances of drawing the exact same line twice are almost
0. However, when testing the functionality added in MDL-45580 it was causing
issues.
2023-06-08 11:44:19 +08:00
Andrew Nicols dcd20bec34 Merge branch 'MDL-78026-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-08 11:36:40 +08:00
Andrew Nicols fec48e90ac Merge branch 'MDL-77264-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-08 11:34:06 +08:00
Andrew Nicols 1a469cda51 Merge branch 'MDL-76821-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-06-08 11:29:11 +08:00
Jake Dallimore f98b725610 MDL-77933 enrol_lti: return site name and logo during registration
Instead of the Moodle icon and the 'moodle' lang string, return the
site fullname and compact logo during dynamic registration.
2023-06-08 11:28:38 +08:00
Andrew Nicols cc9f2527a8 Merge branch 'MDL-77799-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2023-06-08 11:21:14 +08:00
Andrew Nicols 8e5f9ca9d4 Merge branch 'MDL-78408-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-06-08 11:05:20 +08:00
Jun Pataleta d247ea08e9 Merge branch 'MDL-78036_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-06-08 11:03:33 +08:00
Andrew Nicols eab902354f Merge branch 'wip_MDL-78400_m42' of https://github.com/gjb2048/moodle into MOODLE_402_STABLE 2023-06-08 10:51:34 +08:00
Andrew Nicols d3e4957556 Merge branch 'MDL-76406-402' of https://github.com/safatshahin/moodle into MOODLE_402_STABLE 2023-06-08 10:37:53 +08:00
Jun Pataleta 40b68fd88f Merge branch 'MDL-76842-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-06-08 10:34:37 +08:00
Jun Pataleta c180b1babd Merge branch 'MDL-78229-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-06-08 10:30:34 +08:00
Jun Pataleta a1e281a31d Merge branch 'MDL-78431-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-06-08 10:28:25 +08:00
Jake Dallimore ab12596a7b MDL-76842 enrol_lti: fix user record updates in user_repository
Only call user_update_user when the relevant user data has changed,
preventing unnecessary user_updated events. This also removes the
line setting timemodified on the user since user_update_user already
handles this.
2023-06-08 10:28:24 +08:00
Jake Dallimore fd5585777f MDL-76842 enrol_lti: test confirming the erroneous user_updated events
This test will fail until the fix - only updating users when data has
changed - is put in place in the following commit.
2023-06-08 09:37:45 +08:00
Jake Dallimore 5132a27822 MDL-76842 auth_lti: don't update the user unless data has changed
When receiving data from the LTI launch, or service call, only update
the user record when we know something has changed. This prevents the
creation of many \core\event\user_updated events.
2023-06-08 09:37:44 +08:00
Stevani Andolo 9f6fbc11dd MDL-78215 core: Added support unit test 2023-06-08 09:36:40 +08:00
Stevani Andolo a801a741b9 MDL-78215 core: support checking if 0.0.0.0 is in subnet 2023-06-08 09:36:40 +08:00
Jake Dallimore 685be3d41b MDL-76842 auth_lti: don't update the user after membership creation
This isn't required and generates excess events. The only thing update
does, other than update the user fields, is to update the picture, but
in this case, that's unset in membership-based auths anyway, so it's
entirely safe to remove this.
2023-06-08 09:36:17 +08:00
Jake Dallimore 0e504f73ee MDL-76842 auth_lti: test confirming the erroneous user_updated events
This test will fail until the fix - only updating users when data has
changed - is put in place in the following commit.
2023-06-08 09:36:16 +08:00
Jun Pataleta 7dfcc7e3f5 Merge branch 'MDL-78378-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-06-07 23:25:42 +08:00
Jun Pataleta 35500db40c Merge branch 'MDL-76745_402_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_402_STABLE 2023-06-07 22:54:16 +08:00
Andrew Nicols cfb5b76ba7 MDL-78431 core: Abort after config for source maps 2023-06-07 21:07:43 +08:00
Sara Arjona ff68353e39 Merge branch 'MDL-78322-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-07 12:43:03 +02:00
Sara Arjona 0f410c087a Merge branch 'MDL-78352-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-07 12:41:11 +02:00
Sara Arjona e160cdd8a7 Merge branch 'MDL-78047-402' of https://github.com/stevandoMoodle/moodle into MOODLE_402_STABLE 2023-06-07 18:14:20 +08:00
Sara Arjona d25ad8aaf9 Merge branch 'MDL-78010-402' of https://github.com/ferranrecio/moodle into MOODLE_402_STABLE 2023-06-07 18:14:20 +08:00
Sara Arjona c938c41de8 Merge branch 'MDL-78143-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-07 18:14:19 +08:00
Sara Arjona 04996f2cf8 Merge branch 'MDL-78147-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-07 18:14:19 +08:00
Martin Gauk 801ccfebe4 MDL-78297 core: Less cache lookups in deprecated capabilities feature
Avoid use of $cache->has.
2023-06-07 12:07:14 +02:00
sam marshall 5481c31fe6 MDL-77799 webservice_rest: unhandled exception should go in server log 2023-06-07 10:02:05 +01:00
Jake Dallimore 79a9167a1e MDL-78408 core: fix restoration of anchor to wantsurl during login 2023-06-07 14:28:57 +08:00
Stevani Andolo 4d035d0f80 MDL-78047 core_courseformat: Wrapping added to text and media activity 2023-06-07 12:58:52 +08:00
Paul Holden cd885856f3 MDL-77193 mnet: correct sorting of access control table. 2023-06-07 09:53:31 +08:00
Meirza 5f67d77aae MDL-78147 h5p: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-06-07 05:17:33 +07:00
Ferran Recio d59a10108c MDL-78010 mod_label: improve upgrade performance 2023-06-06 21:33:16 +02:00
Meirza b4cf5c50bf MDL-78143 lib: Added class properties in html purifier
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-06-06 21:48:13 +07:00
Paul Holden e5e6bb9764 MDL-78355 xapi: correct coverage notation for delete state test. 2023-06-06 12:04:09 +01:00
Eloy Lafuente (stronk7) 71440dc236 MDL-78036 behat: Move all links from old docs to new counterparts 2023-06-06 12:38:49 +02:00
Petr Skoda 75264720ac MDL-76683 core_group: fix template 2023-06-06 09:33:15 +00:00
Hiroto Kagotani 735c2c6b47 MDL-76936 course: purge course cache on resetting start date 2023-06-06 11:22:39 +02:00
Paul Holden 319d3954f8 MDL-78364 reportbuilder: earlier calculation of schedule recipients. 2023-06-05 16:22:30 +01:00
Gareth Barnard 0fc6e59121 MDL-78400 JavaScript: Building JS puts build files in src dir on Win. 2023-06-05 14:54:24 +01:00
Luca Bösch ace6e8db3d MDL-78229 quiz: quiz editing page less narrow.
This is a backport of MDL-77872.
2023-06-02 08:34:08 +02:00
Sara Arjona 2d4d196f97 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:42 +02:00
Sara Arjona 2970f0f433 MDL-78378 survey: Display default introduction when description is empty
This is a regression when the activity pages were redessigned in Moodle
4.0. The default introduction should be displayed when the activity
description is empty.
2023-06-02 08:19:53 +02:00
Simey Lameze 719b351f86 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:45:36 +08:00
Andrew Nicols fc2b45f960 MDL-69231 behat: Update tests to use new generator 2023-06-02 12:45:36 +08:00
Andrew Nicols fb6e93d98a MDL-69231 tests: Add role capability setting generator 2023-06-02 12:45:36 +08:00
Andrew Nicols 1281e34e02 MDL-69231 tests: Improve existing role generator
Support definition of context levels and permissions.
2023-06-02 12:45:36 +08:00
Safat 4899d8c11a MDL-76406 core: Add environment check for versions not supporting 8.2 2023-06-02 12:05:24 +10:00
Ilya Tregubov 20302d4f86 weekly release 4.2+ 2023-06-02 09:55:35 +08:00
Ilya Tregubov d1053fe035 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-06-02 09:55:33 +08:00
Mark Johnson 5d361ee332 MDL-76745 cache: Implement cache_loader_with_locking in cache_disabled
If a plugin attempts to do something that would lock coursemodinfo cache
during install (such as creating a course module), this currently fails
as check_lock_state is not implemented in cache_disabled. Adding the
cache_loader_with_locking interface ensures that all lock methods are
implemented.
2023-06-01 15:04:39 +01:00
Brendan Heywood a43b2b2998 MDL-77749 admin: Fix code error with unset config duration 2023-06-01 13:32:37 +08:00
Jun Pataleta cf46e93304 Merge branch 'MDL-78092-m402' of https://github.com/sammarshallou/moodle into MOODLE_402_STABLE 2023-06-01 11:36:32 +08:00
Andrew Nicols bb7b0f996d Merge branch 'MDL-78383_m402' of https://github.com/jrchamp/moodle into MOODLE_402_STABLE 2023-06-01 11:12:45 +08:00
Andrew Nicols 9c5e63cf17 Merge branch 'MDL-78146-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-01 11:07:03 +08:00
Andrew Nicols 5d89ce0058 Merge branch 'MDL-78327_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-06-01 10:52:31 +08:00
Ilya Tregubov 6143ad4b1b Merge branch 'MDL-78196-402' of https://github.com/jleyva/moodle into MOODLE_402_STABLE 2023-06-01 10:40:17 +08:00
Andrew Nicols d54edef0f7 Merge branch 'MDL-78142-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-06-01 09:54:24 +08:00
Ilya Tregubov 02d2e80bae Merge branch 'MDL-77259-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-06-01 09:29:39 +08:00
Ilya Tregubov 5cf5134a12 Merge branch 'MDL-75961-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-06-01 09:08:02 +08:00
AMOS bot 5112c89929 Automatically generated installer lang files 2023-06-01 00:11:06 +00:00
Juan Leyva fab3b2ccbc MDL-78196 user: Fix files used space check 2023-05-31 17:15:18 +02:00
Sara Arjona 56f75d7aea Merge branch 'MDL-76693-402' of https://github.com/roland04/moodle into MOODLE_402_STABLE 2023-05-31 17:08:55 +02:00
Simey Lameze 2f10bf1a1f MDL-77547 behat: run recalculate task before checking values 2023-05-31 15:04:54 +02:00
Tim Hunt 0384f8dfa0 MDL-78327 question stats: store same timestamp for all question stats 2023-05-31 12:02:23 +01:00
Sara Arjona e05576d74c Merge branch 'MDL-77547-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-05-31 12:51:25 +02:00
Sara Arjona 01b577ee65 Merge branch 'MDL-77907-402' of https://github.com/andelacruz/moodle into MOODLE_402_STABLE 2023-05-31 12:18:07 +02:00
Sara Arjona 0f5a1a61f7 Merge branch 'MDL-78145-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-05-31 12:09:24 +02:00
Sara Arjona b4479d7981 Merge branch 'MDL-78148-402' of https://github.com/ferranrecio/moodle into MOODLE_402_STABLE 2023-05-31 11:42:12 +02:00
Sara Arjona 2a2badacb2 Merge branch 'MDL-73648-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-31 11:38:13 +02:00
Jonathan Champ eb0585ea72 MDL-78383 cache: Remove unused class property configlockmappings 2023-05-30 19:45:28 -04:00
Ilya Tregubov 7faf41dce5 Merge branch 'MDL-73138-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-30 12:54:09 +08:00
Ilya Tregubov 6aa360ae83 Merge branch 'MDL-77723-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-30 12:44:28 +08:00
AMOS bot 804e8b62da Automatically generated installer lang files 2023-05-30 00:10:40 +00:00
Jun Pataleta 1092a998ae Merge branch 'MDL-78314-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-05-29 17:35:15 +08:00
Mikel Martín 027e3c6660 MDL-76693 core_course: Fix activity chooser summary overlap
In activity chooser modal, there is an overlap issue in the information "sub-page".
Changing some classes in the layout solves the problem.
2023-05-29 09:38:32 +02:00
Ferran Recio 2b407d891f MDL-78148 core_courseformat: reduce the use of uniqid in templates 2023-05-29 08:40:20 +02:00
Angelia Dela Cruz 865ca1d6a2 MDL-70152 behat: Forum behat generators use UI
Behat cleanup and optimisation
2023-05-29 10:30:44 +08:00
Angelia Dela Cruz 0f11899e33 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:30:32 +08:00
Andrew Nicols da0459f75f 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:30:32 +08:00
Meirza 8a5b788914 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 14:01:09 +07:00
Meirza 5d893a4748 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 14:01:09 +07:00
Meirza 1b284001ac MDL-78146 lib: Added missing class properties in phpmailer
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-27 11:27:14 +07:00
Meirza b3350a0ea7 MDL-78145 lib: Added missing class properties in pear
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-27 11:11:29 +07:00
Meirza 0ffed15ee4 MDL-78142 lib: Added class properties that are not declared in bennu
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-27 09:50:11 +07:00
meirzamoodle a385c75dca MDL-78141 libraries: Apply some changes from ADOdb 5.22.5
To make Moodle 4.2 compatible with PHP 8.2 regarding the deprecation of dynamic properties,
several changes have been made from version 5.22.5 (https://github.com/adodb/adodb/compare/v5.22.4...v5.22.5) and
then applied the changes to Moodle 4.2.
2023-05-27 09:48:13 +07:00
Meirza 62bd66ccf9 MDL-78166 lib: Added missing class properties in portfolio
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

Removing the existing $id property at portfolio_format_leap2a_writer, because
the $id only needed inside the __construct().
2023-05-27 09:29:33 +07:00
Meirza 0e7a7318af MDL-78167 lib: Added missing class properties in tests
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

Adding @runTestsInSeparateProcesses and removing setUp() and tearDown() at the
component_test.php, so the test will run in a separate process making sure that
whatever changes happen to the in-memory version of the component class in its thread,
therefore does not impact other tests and makes it more safe.
2023-05-27 09:27:10 +07:00
Eloy Lafuente (stronk7) d20cf16533 MDL-78036 behat: Fix php81 deprecation warning 2023-05-26 18:04:18 +02:00
Luca Bösch 3e13847324 MDL-78314 quiz: style button fieldset in "Manually grade question". 2023-05-26 15:10:33 +02:00
Paul Holden 24f646038c MDL-78352 webservice: use default user context page heading. 2023-05-26 12:27:40 +01:00
Wehr Mario b29be1a2ed MDL-78004 cache: Fix deprecated null value in Redis connect 2023-05-26 13:24:32 +02:00
Paul Holden 928760f865 MDL-73648 badges: add Behat generator class for creating badges. 2023-05-26 12:19:20 +01:00
Paul Holden 9a3f097da5 MDL-73138 group: remove double encoding of group/role names. 2023-05-26 10:25:42 +01:00
Paul Holden 1198d57f71 MDL-73138 user: avoid double encoding participant filter values. 2023-05-26 10:25:42 +01:00
Sara Arjona 6b8884e13b weekly release 4.2+ 2023-05-26 09:28:41 +02:00
Sara Arjona 7edbca66f9 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-05-26 09:28:36 +02:00
Jun Pataleta e0c8854480 Merge branch 'MDL-78346-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-05-25 16:22:41 +08:00
Andrew Nicols 7d5b30290f MDL-78346 tool_langimport: Print any notifications before redirect 2023-05-25 14:54:58 +08:00
Jun Pataleta 3e2bf77656 Merge branch 'MDL-78339-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-25 12:01:10 +08:00
Jun Pataleta 15b0cd25e6 Merge branch 'MDL-76065-402' of https://github.com/lameze/moodle into MOODLE_402_STABLE 2023-05-25 11:57:05 +08:00
Jun Pataleta e99fcecdf9 Merge branch 'MDL-78320-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-25 11:48:47 +08:00
Jun Pataleta 5feb510035 Merge branch 'MDL-78346-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-05-25 11:43:43 +08:00
Andrew Nicols cae92e5a92 MDL-78346 tool_langimport: Redirect after action to prevent resubmission 2023-05-25 11:14:15 +08:00
Andrew Nicols 1342f28224 MDL-78346 tool_langimport: Prevent uninstallation of invalid targets 2023-05-25 11:14:14 +08:00
Andrew Nicols b0b214bbf2 Merge branch 'MDL-77341-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-05-25 10:46:32 +08:00
Andrew Nicols 1ff32127d4 Merge branch 'MDL-78307-402' of https://github.com/dpalou/moodle into MOODLE_402_STABLE 2023-05-25 10:42:57 +08:00
Andrew Nicols a443a29b79 Merge branch 'MDL-77995-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-25 09:50:34 +08:00
Paul Holden f92c748a2d MDL-78320 quiz_overview: format group names in overview report. 2023-05-24 16:19:32 +01:00
Andrew Nicols af0f37405f Merge branch 'MDL-77983-402' of https://github.com/rjnl/moodle into MOODLE_402_STABLE 2023-05-24 21:15:03 +08:00
= 3180479b87 MDL-63120 core_badges: Avoid multiple joins in sql statement 2023-05-24 13:35:27 +02:00
Dani Palou fb71a7a8c7 MDL-78307 quiz: Fix URL passed to secure_window.init_close_button 2023-05-24 13:10:45 +02:00
Dani Palou b10afcdd4c MDL-78307 quiz: Fix contexturl passed to attempt_overdue message 2023-05-24 13:10:45 +02:00
Paul Holden 93c35a89bb MDL-78339 webservice: correctly namespace external API. 2023-05-24 09:38:08 +01:00
Jun Pataleta 43fdf37a96 Merge branch 'MDL-78005-402' of https://github.com/davewoloszyn/moodle into MOODLE_402_STABLE 2023-05-24 12:06:45 +08:00
Simey Lameze b490a0ae08 MDL-75961 behat: review and enhance mod_imscp tests
This commit makes the following improvements to mod_imscp tests:
* Removes unnecessary @javascript and @_file_upload tags from non-JS tests.
* Removes user/enrol data generation from tests that can be performed as admin.
* Removes "I log out" and other unnecessary steps.
2023-05-24 10:40:44 +08:00
Angelia Dela Cruz 80410a354b MDL-75961 behat: IMSCP behat generators use UI
Replace steps that manually add IMSCP instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2023-05-24 10:40:44 +08:00
Sara Arjona b1b0c2d59b Merge branch 'MDL-78176_402' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_402_STABLE 2023-05-23 17:45:52 +02:00
Sara Arjona aa7aec1088 Merge branch 'MDL-78242-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-23 17:36:54 +02:00
Jun Pataleta 7bae6c8ca6 Merge branch 'MDL-76688/402' of https://github.com/skodak/moodle into MOODLE_402_STABLE 2023-05-23 15:22:14 +08:00
Angelia Dela Cruz 7a5806d3cb MDL-77547 Behat: Coverage to check for bad multichoice questions 2023-05-23 15:16:04 +08:00
Simey Lameze 279cc50e5c MDL-76065 behat: Review and enhance mod_lti Behat tests
In this commit, the following improvements were made to the mod_lti Behat tests:

* Replaced manual steps with data generators to set completion.
* Eliminated unnecessary user and course enrolments data generation as some tests can be performed as an admin.
* Removed the @javascript tag from non-JS tests.
* Updated the LTI data generator to generate an internal Moodle URL in the toolurl field, enabling the use of XML files.
2023-05-23 12:13:53 +08:00
Angelia Dela Cruz dc4ff6a2f5 MDL-76065 behat: LTI behat generators use UI
Replace steps that manually add LTI instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2023-05-23 12:13:53 +08:00
Andrew Nicols 7c64a411d7 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:55:42 +08:00
Andrew Nicols fb343534d0 Merge branch 'MDL-78170-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-23 10:28:05 +08:00
Andrew Nicols b4935649b3 Merge branch 'MDL-78087-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-05-23 10:26:39 +08:00
AMOS bot 0d426e571a Automatically generated installer lang files 2023-05-23 00:10:30 +00:00
Paul Holden b938b53096 MDL-76838 backup: remove invalid utf8 code sequences writing XML.
The surrogate blocks FFFE and FFFF are non-characters, specifically
disallowed in the character range for XML documents.
2023-05-22 21:04:07 +01:00
Paul Holden 525b69dc69 MDL-78322 tool_cohortroles: don't assign roles to deleted users. 2023-05-22 20:14:34 +01:00
Tim Hunt 5630f86d81 MDL-78008 qtype_multianswer: random guess score with missing subqs
Sometimes, due to other bugs, subquestions can get lost, so the code
needs to be robust to this.
2023-05-22 17:01:59 +01:00
Sara Arjona 30ac87781a Merge branch 'MDL-78211-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-22 17:41:42 +02:00
Sara Arjona 2b9a9286d0 Merge branch 'MDL-78226-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-22 17:29:21 +02:00
Sara Arjona 2e6d8b72b1 Merge branch 'MDL-78225-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-22 12:04:13 +02:00
sam marshall 2724eb6041 MDL-78092 Cache: Modinfo locking with Redis store does not work
The feature added in 4.1 to lock the modinfo cache does not work when
using Redis, because:

* The API to acquire a cache lock is confusing, and the code did not
  check that it successfully acquired a lock before going on to build
  the cache anyway.

* Unlike the other types of cache lock, the Redis store did not retry
  the lock for a timeout period before giving up and failing.

This change fixes both points.
2023-05-22 10:44:15 +01:00
Jun Pataleta df8413ade0 Merge branch 'MDL-78157-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-05-22 15:29:36 +08:00
Andrew Nicols 414f0df046 MDL-78157 js: Be more careful about inserting missing module names
It is perfectly legitimate to create and/or use a method named `define`
in JS outside of RequireJS.

Unfortunately our requirejs.php wrapper is dumb and does not understand
this.

In the long term we need to stop doing this at all. We really should be
able to already, but every time I try to something prevents it.

In the interim, this change adds a secondary check to see if there is an
existing define which _does_ have the right name in it already.
2023-05-22 14:40:41 +08:00
Jun Pataleta 29a7e00f9c Merge branch 'MDL-78323-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-05-22 14:29:10 +08:00
Andrew Nicols 81b9a51fb7 MDL-78323 gradereport_grader: Fix jsdoc syntax 2023-05-22 09:23:47 +08:00
Meirza 03c461ab87 MDL-77341 mnet: Added missing class properties
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-20 21:38:35 +07:00
Anupama Sarjoshi c2fbb10a52 MDL-78176 Question: Fix D&D onto image and D&D markers theme issue 2023-05-19 16:31:44 +01:00
Jun Pataleta 4781b41631 weekly release 4.2+ 2023-05-19 21:13:51 +08:00
Jun Pataleta caf4da762c Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-05-19 21:13:48 +08:00
Andrew Nicols 0ab5bf01f0 MDL-77733 behat: Remove extraneous no-axe option
There is no need for no-axe if we make axe a boolean value. We already
have automatic support for negated boolean flags.
2023-05-19 11:27:57 +08:00
Mark Johnson 078782e656 MDL-75696 quiz: Fix restoring pre-4.0 quizzes with random questions
Restoring multiple quizzes from a pre-4.0 backup was broken when
the quizzes shared a random question. This is because after the
first quiz created a set reference in place of the random question,
it deleted the question record so it was not there for the second
quiz to use. This change tracks the IDs of random questions so
they can be deleted at the end.
2023-05-18 15:55:39 +01:00
Mark Johnson 2b6456c1d0 MDL-75696 quiz: Set default value for includingsubcategories on restore 2023-05-18 15:55:39 +01:00
Mark Johnson a37ce627a8 MDL-75696 backup: Fix backup version checks
Several version checks were incorrectly using
restore_controller::info::moodle_release instead of moodle_version as a
version number. This replaces all of those checks with a common pair of
methods to make the checks clearer and more maintainable.
2023-05-18 15:55:38 +01:00
Paul Holden 26b885edb6 MDL-78308 output: better parsing of custom menu item configuration.
Previously certain values would cause deprecation notices in PHP8.1.
2023-05-18 10:19:20 +01:00
Jun Pataleta b514f0bb1d Merge branch 'MDL-78116-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-05-18 12:11:39 +08:00
Andrew Nicols 12dc12c954 Merge branch 'MDL-77451-402' of https://github.com/rezaies/moodle into MOODLE_402_STABLE 2023-05-18 11:59:41 +08:00
Jun Pataleta ec7b3cab86 Merge branch 'MDL-78135-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-18 11:54:58 +08:00
Andrew Nicols 6808c8f3b2 Merge branch 'MDL-78260_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-05-18 11:51:32 +08:00
Andrew Nicols 109a0ffeb9 Merge branch 'MDL-78151-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-18 11:48:26 +08:00
Simey Lameze 4a04cda71b MDL-77733 behat: enable Axe accessibility tests by default 2023-05-18 11:43:57 +08:00
David Woloszyn a0920d8b8d MDL-78005 editor_tiny: Declared vars to supress error logging 2023-05-18 13:02:55 +10:00
Jun Pataleta 11bf54289f Merge branch 'MOODLE_402_STABLE_MDL-78048' of https://github.com/mattporritt/moodle into MOODLE_402_STABLE 2023-05-18 10:14:47 +08:00
Tim Hunt 666708b561 MDL-78260 quiz stats: fix View details for random questions 2023-05-17 09:10:20 +01:00
Rajneel Totaram a1162e3943 MDL-77983 core_user: Avoid passing nulls to base64_decode 2023-05-17 19:37:15 +12:00
Ilya Tregubov 9de9651809 Merge branch 'MDL-78152-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-17 15:07:17 +08:00
Sara Arjona dcb3ce31ce Merge branch 'MDL-77350-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-05-17 08:26:39 +02:00
Meirza 8b641a1b0d MDL-77350 tag: Added class properties that are not declared 2023-05-17 09:00:09 +07:00
Meirza 8fa53a336e MDL-77350 competency: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza 5a22258f42 MDL-77350 favourites: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

// Removed test_add_malformed_favourite()
PHPUnit version >= 9.5 no longer converts PHP deprecations to exceptions by default.
To comply with PHP 8.2, which will deprecate the dynamic properties,
we need to remove test_add_malformed_favourite()
because the test will raise a warning for dynamic property deprecations.
2023-05-17 09:00:09 +07:00
Meirza 92cba2c5ba MDL-77350 auth: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza 7d8a40fe3e MDL-77350 availability: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza 2de2d6bc30 MDL-77350 badges: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza beb55edffc MDL-77350 blocks: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza ae8466162d MDL-77350 blog: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza b5f98e022d MDL-77350 cache: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza b9d21ee2ad MDL-77350 calendar: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza 04fb9beb20 MDL-77350 comment: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza 3be559b763 MDL-77350 completion: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza 88a1d4d4c2 MDL-77350 course: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza e0045688b3 MDL-77350 enrol: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza c645df564a MDL-77350 filter: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza 8bac8a2da7 MDL-77350 media: Added missing class properties
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza 2e339446d8 MDL-77350 message: Added missing class properties
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:09 +07:00
Meirza 1c9379ab09 MDL-77350 mod_h5pactivity: Added missing class properties
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:08 +07:00
Meirza 24ad6848aa MDL-77350 portfolio: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:08 +07:00
Meirza da43ea4ef7 MDL-77350 rating: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:08 +07:00
Meirza f49f24c516 MDL-77350 report: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:08 +07:00
Meirza 473cfc369d MDL-77350 search: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:08 +07:00
Meirza 0ba9466281 MDL-77350 webservice: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-17 09:00:08 +07:00
AMOS bot 9e6f6c0e7e Automatically generated installer lang files 2023-05-17 00:11:02 +00:00
Matt Porritt b87a75110b MDL-78048 Site Registration: Course Dates
Course date registration data reports correctly.

MDL-77306 added a count of how many courses there are
without start and end dates. However, all courses have
a start date, it is only the end date that is optional.
This patch fixes the data collection and makes the lang
string describing it clearer.
2023-05-17 09:03:20 +10:00
Jun Pataleta 52bcdf9e06 Merge branch 'MDL-77439-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-05-16 20:38:50 +08:00
Peter Mayer f113d4c116 MDL-77439 lib_filebrowser: Splitup query to speedup get_courses 2023-05-16 20:37:47 +08:00
Paul Holden 16bac432fd MDL-78026 group: format retrieved group names from external methods. 2023-05-16 10:10:01 +01:00
Paul Holden 4e28613a16 MDL-77264 grade: define fallback name of abstract export event. 2023-05-16 09:54:34 +01:00
Paul Holden 1df40c823e MDL-77259 tool_monitor: use core component API for event list.
The previous method of hardcoded filepaths, specifically for events
belonging to core, meant that any events belongs to core subsystems
were omitted (core_customfield, core_h5p, core_payment, etc).
2023-05-16 09:50:17 +01:00
Angelia Dela Cruz 5dfec00bb1 MDL-77907 Behat: Coverage for duplicating competency framework 2023-05-16 15:45:05 +08:00
Jake Dallimore c00c6dd4cf Merge branch 'MDL-77930-402' of https://github.com/rjnl/moodle into MOODLE_402_STABLE 2023-05-16 10:49:46 +08:00
Jake Dallimore 0f687a9028 Merge branch 'MDL-78120-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-05-16 10:44:49 +08:00
Jun Pataleta 1d2b0ade40 Merge branch 'MDL-75576_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-05-16 09:59:11 +08:00
Ilya Tregubov a5f2c1d591 Merge branch 'MDL-77840-402' of https://github.com/davewoloszyn/moodle into MOODLE_402_STABLE 2023-05-16 09:48:13 +08:00
Andrew Nicols 5e59ad2b6e Merge branch 'MDL-77432-402' of https://github.com/lucaboesch/moodle into MOODLE_402_STABLE 2023-05-15 22:12:31 +08:00
Andrew Nicols 441003231f Merge branch 'MDL-78149-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-15 22:06:20 +08:00
Andrew Nicols 54c8336373 Merge branch 'MDL-78140-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-15 22:03:44 +08:00
Paul Holden e3ac233307 MDL-78242 roles: consistently check course contact config. 2023-05-15 13:04:39 +01:00
Tim Hunt 4d263b0505 MDL-75576 quiz/question statistics: don't expire by time
Previously, a set of calculated quiz statistics would only 'last' for
15 minutes. Then they would be considered invalid and not used.

Now, computed statistics are kept indefinitely. Instead, when a new
batch of values are computed for a particular set of settings, older numbers
for the same settings are deleted first. Therefore,
question_stats_cleanup_task is no more.
2023-05-15 10:03:27 +01:00
Tim Hunt 25953f9c7f MDL-75576 quiz statistics: don't time-limit the use of cached values
This should have been done as part of  MDL-74762, but was missed.
2023-05-15 10:03:26 +01:00
Tim Hunt b112cee58c MDL-75576 quiz statistics: don't compute when a user views the qbank
Previously, when users viewed the question bank, if the quiz statistics
had not already been calculated, we would try to compute them there an then.
This could be very, very slow, leading to session lock problems.

Now, we never try to compute the statistics on the fly. Instead, we rely
on the existing \quiz_statistics\task\recalculate scheduled task to do it.
2023-05-15 10:03:26 +01:00
Tim Hunt bc7dacecb6 MDL-75576 question bank: bulk-load statistics for all questions at once
There is a new method on the column class, for the column to declare any
statistics it requires. The question then efficiently loads all those
statistics in one go, and makes them available as the columns are
rendererd, or do any subsequent processing.
2023-05-15 10:03:26 +01:00
Tim Hunt d1fcfd1de2 MDL-75576 qbank_statistics: remove copy-pasted PHPdoc comments
These methods are already correctly documented on the base class.
2023-05-15 10:03:25 +01:00
Luca Bösch 32bc50a135 MDL-78120 login: handle empty wantsurl on login with alternateloginurl. 2023-05-15 10:20:24 +02:00
Paul Holden 02e893a575 MDL-77995 javascript: more precise path matching building JS. 2023-05-15 09:05:44 +01:00
Paul Holden 59c75c928d MDL-77723 user: ensure identity refers to a valid custom profile field. 2023-05-15 09:03:34 +01:00
Andrew Nicols c2a74815c0 Merge branch 'MDL-78156_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-05-15 12:43:38 +08:00
Jun Pataleta 9ac38f5db6 Merge branch 'MDL-76903-402' of https://github.com/laurentdavid/moodle into MOODLE_402_STABLE 2023-05-15 12:06:09 +08:00
Andrew Nicols 04b35cb3db Merge branch 'MDL-78125-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-05-15 11:57:59 +08:00
Jun Pataleta c6cc0449ed MDL-78125 qtype_multianswer: Convert popover trigger to link
According to Boostrap Popovers documentation for popovers triggered
on focus:
"For proper cross-browser and cross-platform behavior, you must use the
<a> tag, not the <button> tag, and you also must include a tabindex
attribute."
2023-05-12 22:47:18 +08:00
Luca Bösch 30f1f0778f MDL-77432 mod_assign: Confirm submission page standard and not incourse 2023-05-12 09:20:14 +02:00
Ilya Tregubov f9edf5c1be weekly release 4.2+ 2023-05-12 08:56:43 +08:00
Ilya Tregubov c4f7a44824 Merge branch 'install_402_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_402_STABLE 2023-05-12 08:56:41 +08:00
Paul Holden 26dbb8466a MDL-78226 contentbank: verify presence of bank heading element. 2023-05-11 23:16:29 +01:00
Paul Holden 2fb84af337 MDL-78225 output: add sesskey for post requests only in renderables. 2023-05-11 22:48:48 +01:00
Laurent David 717c74a448 MDL-76903 mod_book: Fix activity completion
* Check only visibles pages to set completion status.
* Make sure we have consistent completion value in API and on the view page.
2023-05-11 12:09:26 +02:00
Paul Holden 4a2e621012 MDL-78140 analytics: improve context restrictions manager test.
This test apparently fails sporadically on Oracle, without obvious
causes. The failure however was hard to interpret, and the test
itself made a lot of assumptions about the system re. naming of
categories/courses. This could be prone to errors, so improve that.
2023-05-11 09:37:46 +01:00
Sara Arjona 732dc4f334 MDL-78087 h5p: Fix TimeLine display bug
When the H5P third-party library was upgraded to moodle-1.23, the calls to
libraryToString(xxx, true) where replaced with libraryToFolderName().
We missed this, which was doing the H5P Timeline activities weren't
displayed properly.

Thanks Joseph for raising this and preparing a patch! Well done!

Co-authored: Joseph Rézeau
2023-05-11 10:22:48 +02:00
Paul Holden c348119685 MDL-77946 access: fix category sort order of capability contexts. 2023-05-11 08:33:27 +01:00
Jun Pataleta ced8835b5f Merge branch 'MDL-76344-402-fix' of https://github.com/stevandoMoodle/moodle into MOODLE_402_STABLE 2023-05-11 14:35:13 +08:00
Stevani Andolo a5cf13cd90 MDL-76344 course: Fixed course image 'non image file' layout 2023-05-11 14:11:00 +08:00
Jake Dallimore 10f9d0d51a Merge branch 'MDL-75552-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-05-11 11:23:33 +08:00
Sara Arjona 9bdfec812d Merge branch 'MDL-78040-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-10 19:45:14 +02:00
Paul Holden 78d90e3c16 MDL-78211 contentbank: fix context option when formatting categories. 2023-05-10 17:42:23 +01:00
Paul Holden d5ec3594cc MDL-78151 core: account for timezone differences in intl extension.
Recent additions to timezones from the IANA TZDB are not necessarily
reflected in those used by the intl extension and/or ICU zones:

 * America/Ciudad_Juarez
 * America/Nuuk
 * Europe/Kyiv
 * Pacific/Kanton

Create mapping to allow these zones to be used without errors.
2023-05-10 17:12:16 +01:00
Mikhail Golenkov 5303c032bb MDL-77592 filter_tex: Use request dir instead of temp shared storage 2023-05-10 13:03:29 +08:00
Andrew Nicols b2cca9ef62 Merge branch 'MDL-78034-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-10 12:59:57 +08:00
Ilya Tregubov 87736d9a0b Merge branch 'MDL-75623-MOODLE_402_STABLE' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-05-10 11:45:49 +08:00
Stefan Hanauska b1496fa5df MDL-75623 backup: Encode pluginfile URLs 2023-05-10 11:44:45 +08:00
Paul Holden 411dc66fd9 MDL-78170 rating: consistently calculate average rating aggregation.
Ensure it's always cast by the database as a float, to avoid loss of
precision.
2023-05-09 15:57:37 +01:00
Jun Pataleta c58d3b4759 Merge branch 'MDL-78065-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2023-05-09 22:41:56 +08:00
Paul Holden 39a930f762 MDL-78149 mod_data: ensure group selector is always present. 2023-05-09 12:20:29 +01:00
Paul Holden 3493d9ebc3 MDL-78152 mod_book: set permissions required for page editing. 2023-05-09 12:11:26 +01:00
Jun Pataleta eff51c6001 Merge branch 'MDL-78093-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-09 17:26:18 +08:00
Shamim Rezaie 7365bc38b2 MDL-77451 gradereport: stress handling for multiple clicks 2023-05-09 16:57:10 +10:00
Andrew Nicols 856803faf8 MDL-75552 badges: move apiBase consumption to backpack
The apiBase in .well-known/badgeconnect.json was ignored and it was
causing some failures when connecting or sending badges to an
external backpack.
For OBv2.1, it has been changed to always use the apiBase defined
in the badgeconnect.json backpack provider.
2023-05-09 08:51:25 +02:00
Rajneel Totaram 97d935b337 MDL-77930 accesslib: php81 deprecation warnings on missing plugins 2023-05-09 17:48:45 +12:00
Eloy Lafuente (stronk7) f46e5fc229 MDL-78156 groups: Make groups_get_user_groups() order deterministic
Right now the order of the groups returned by groups_get_user_groups()
is not fixed and, every DB, can return them in any order. While 99%
of times the order will be the creation one, depending of the RDBMS
decisions, they can be returned in any order.

This is specially noticeable with Oracle, but can affect to any DB.

And that makes some tests (expecting a given order) to fail.

This commit fixes the problem by making the order of the groups
deterministic, because that's the way we use to fix these problems.

Alternative is to relax the tests so only values are asserted by
using assertEqualsCanonicalizing().
2023-05-08 18:25:05 +02:00
Petr Skoda 8a6c536b29 MDL-76688 filter_text: prevent LaTeX3 syntax 2023-05-08 10:11:55 +02:00
AMOS bot 84da51dafd Automatically generated installer lang files 2023-05-07 00:07:29 +00:00
Paul Holden 98448477d9 MDL-78135 completion: include required criteria library in test. 2023-05-05 16:45:39 +01:00
Jake Dallimore 62076a191e MDL-76821 enrol_lti: prevent legacy launches via upgraded enrolment
If the enrolment instance (the 'published resource') has been upgraded
from LTI 1.1/2.0 to LTI 1.3 (i.e. a new instance was not created),
prevent legacy launches which may occur from old resource links. Only
LTI Advantage launches should be permitted through the method.
2023-05-05 17:10:12 +08:00
Jake Dallimore b1a7ae63c3 MDL-76821 enrol_lti: fix bug in repo causing return of legacy lti users
If the enrolment method is updated from an LTI 1.1/2.0 tool to an LTI
1.3 tool, it may have associated enrol_lti_users records not having
ltideploymentid values. These are legacy users and must not be returned
by the repository, which deals only with LTI 1.3 LTI users.
2023-05-05 17:10:12 +08:00
Jun Pataleta 929ad63114 Merge branch 'MDL-76344-402' of https://github.com/stevandoMoodle/moodle into MOODLE_402_STABLE 2023-05-05 10:35:07 +08:00
Sara Arjona 29a21ee986 weekly release 4.2+ 2023-05-04 12:42:42 +02:00
Eloy Lafuente (stronk7) c721cc6803 MDL-78116 core: Run tests against Windows on GHA
Signed-off-by: Andrew Nicols <andrew@nicols.co.uk>
2023-05-04 15:41:54 +08:00
Dani Palou 2ccc6a2346 MDL-78054 airnotifier: Fix data encrypted several times 2023-05-04 12:06:28 +08:00
Stevani Andolo cd3643a149 MDL-76344 course: Fixed course image 'non image file' layout 2023-05-04 10:28:03 +08:00
Jake Dallimore 2138619b01 Merge branch 'MDL-78002_402' of https://github.com/stronk7/moodle into MOODLE_402_STABLE 2023-05-04 10:08:09 +08:00
Ilya Tregubov 97f6672420 Merge branch 'MDL-78094-402' of https://github.com/snake/moodle into MOODLE_402_STABLE 2023-05-04 08:54:07 +08:00
Paul Holden f6afe82978 MDL-78040 block_glossary_random: switch to block test generator.
Random failures after manually adding block instances (specifically
on slow/Oracle systems) can be entirely avoided by using the block
test generator for scenarios that are not specifically concerned with
manually adding blocks.
2023-05-03 16:45:16 +01:00
Laurent David 16f91dfdb3 MDL-77781 core_completion: Completion view must be deleted too
When resetting a course, completion view entries should also be
deleted

Co-authored-by: Georg Moser <georg@moser.link>
2023-05-03 16:05:10 +02:00
Jun Pataleta da46551bea Merge branch 'MDL-77398-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 20:36:28 +08:00
Jake Dallimore 861ce57a8a Merge branch 'MDL-77384-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 16:52:21 +08:00
Jake Dallimore 048070e25f Merge branch 'MDL-78023-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 16:15:42 +08:00
Sara Arjona 223b1afabf Merge branch 'MDL-77312-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 09:59:17 +02:00
Sara Arjona 92a57c95be Merge branch 'MDL-78049-MOODLE_402_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_402_STABLE 2023-05-03 09:45:16 +02:00
Ilya Tregubov 680644b593 Merge branch 'MDL-77320-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 15:36:34 +08:00
Sara Arjona bdaed5ec3c Merge branch '42_MDL-78057' of https://github.com/danmarsden/moodle into MOODLE_402_STABLE 2023-05-03 09:22:39 +02:00
Sara Arjona 812219fcb2 Merge branch 'MDL-76971-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 09:18:23 +02:00
Sara Arjona 514865575c Merge branch 'MDL-78006-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 09:04:35 +02:00
Ilya Tregubov 1b1c1a56b1 Merge branch 'MDL-77810-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 13:08:32 +08:00
Ilya Tregubov 33f62c3309 Merge branch 'MDL-77987_402' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_402_STABLE 2023-05-03 12:40:12 +08:00
Jake Dallimore 0f66c8fe5c Merge branch 'MDL-78052-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-05-03 12:06:45 +08:00
Ilya Tregubov a56ca931aa Merge branch 'MDL-77546-402' of https://github.com/mihailges/moodle into MOODLE_402_STABLE 2023-05-03 10:57:05 +08:00
Jun Pataleta 453ea97395 Merge branch 'MDL-77394-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 10:31:07 +08:00
Jun Pataleta 4e9be8c131 Merge branch 'MDL-78038-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 10:25:37 +08:00
Ilya Tregubov a7055da32d Merge branch 'MDL-77936-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 10:07:40 +08:00
Jun Pataleta bd85500e2a Merge branch 'MDL-78011-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-03 09:58:10 +08:00
Jake Dallimore e0e94dbf84 MDL-78094 webservice_soap: fix use of core_external in locallib 2023-05-03 09:43:29 +08:00
Ilya Tregubov 9de24c27c6 Merge branch 'MDL-76835-402' of https://github.com/aya-saad1/moodle into MOODLE_402_STABLE 2023-05-03 09:29:32 +08:00
David Woloszyn 89215b79fb MDL-77840 enrol_lti: Avoid passing nulls to base64_encode 2023-05-03 09:34:29 +10:00
Paul Holden 4065904ad1 MDL-78093 gradereport_grader: handle modal retrieval promise failures. 2023-05-02 16:19:52 +01:00
Paul Holden 3862ec015d MDL-78093 grade: standardize additional external parameter type. 2023-05-02 16:19:38 +01:00
Sara Arjona c516a6fc14 Merge branch 'MDL-77858-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-05-02 16:49:48 +02:00
Sara Arjona fb14c67dec Merge branch 'MDL-77791_402' of https://github.com/dvdcastro/moodle into MOODLE_402_STABLE 2023-05-02 12:03:53 +02:00
Jun Pataleta b297347f12 Merge branch 'MDL-76857-402' of https://github.com/sarjona/moodle into MOODLE_402_STABLE 2023-05-02 15:45:09 +08:00
Huong Nguyen b89351f084 MDL-78065 tiny_link: Fix cannot create link for selection text 2023-05-02 11:38:01 +07:00
David Woloszyn b78a8983ed MDL-77840 lti: Avoid passing nulls to base64_encode 2023-05-02 13:50:14 +10:00
David Woloszyn 84ddb8c655 MDL-77840 backup: Avoid passing nulls to base64_encode 2023-05-02 13:50:14 +10:00
David Woloszyn cc3828c85a MDL-77840 mnet: Avoid passing nulls to base64_encode 2023-05-02 13:50:14 +10:00
Ilya Tregubov 7af8bddad7 Merge branch 'MDL-78025_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-05-02 11:43:12 +08:00
Dan Marsden 3bdfc594b6 MDL-78057 core_user: Use correct class for context check. 2023-05-01 08:50:40 +12:00
Eloy Lafuente (stronk7) c6ff4c551e MDL-78002 phpunit: Ensure that all uses of psr streams are closed
While the uses here were not causing too much problem with PHPUnit
execution in any OS, better have them explicitly closed to better
serve as reference for other, future uses anywhere in codebase.

Always that a stream is used, better we close it as soon as possible,
not relying on destructors, gc and friends.
2023-04-29 23:08:27 +02:00
Eloy Lafuente (stronk7) b6531bf613 MDL-78002 moodlenet: Always close the request stream explicitly
And do it as soon as it's not needed any more. Else, only
_destruct() / shutdown / gc will, and that can be problematic
if many streams are open, or, under some environments like
Windows that consider the stream underlying files still busy,
because they have not been closed.
2023-04-29 20:33:09 +02:00
Paul Holden 7c4fc1725f MDL-77810 gradereport_summary: show localised plugin name in report. 2023-04-27 15:19:27 +01:00
Ilya Tregubov 4f625c1e2e weekly release 4.2+ 2023-04-27 19:28:33 +08:00
Sara Arjona 99e38b7118 MDL-78052 lib: Set Moodle files after Font Awesome upgrade 2023-04-27 13:22:20 +02:00
Sara Arjona 5650cab0d6 MDL-78052 theme: Update FontAwesome to 6.4.0
This version also fixes a regression in 6.3.0 where a number of
icons weren't centered properly in their viewboxes.
2023-04-27 13:22:20 +02:00
Sara Arjona 4b23b98e16 MDL-76857 filter_displayh5p: Improve behat tests
Although the screenshots in the failures for some of the scenarios in
filter/displayh5p/tests/behat/h5p_filter.feature, like "Render a local
H5P file as teacher" were displaying the expected result, there were
some javascript errors (probably due to behat is quicker and the
iframes were not always ready).
I've added one extra step before accessing the iframe to give more
time to the H5P player to load and confirm the page is displayed
properly.
2023-04-27 11:21:26 +02:00
Paul Holden c7595a7169 MDL-77320 tool_licensemanager: restrict exposure of user sesskey. 2023-04-27 09:33:33 +01:00
Paul Holden b97ffab51a MDL-77936 grade: omit second cell action divider when not required. 2023-04-27 08:42:52 +01:00
Philipp Memmel f1633ba0f8 MDL-78049 core_external: Run test_all_external_info in separate process 2023-04-27 08:30:57 +02:00
Mihail Geshoski 3f4b46b16a MDL-77546 gradereport_singleview: Fix item order in grade item selector 2023-04-27 11:59:06 +08:00
danghieu1407 32df1530ff MDL-77883 forms: fix display of client-side validation for textareas 2023-04-27 11:08:42 +08:00
Jun Pataleta 20e1d18c29 Merge branch 'MDL-77997_402' of https://github.com/timhunt/moodle into MOODLE_402_STABLE 2023-04-27 10:40:49 +08:00
Paul Holden 01fd68f06d MDL-78038 mod_bigbluebuttonbn: observe course format section config. 2023-04-26 16:10:45 +01:00
Tim Hunt a8a3855c6d MDL-78025 questions: improve the comment on question_references.version 2023-04-26 15:36:57 +01:00
Tim Hunt 950aa78611 MDL-78025 questions: fix PHPdoc on question_require_capability_on 2023-04-26 15:36:57 +01:00
Tim Hunt b2e36b6baa MDL-78025 quiz: fix the quiz_questions_in_use logic 2023-04-26 15:36:57 +01:00
Tim Hunt 85662b721b MDL-78025 questions: questions_in_use should check question_references
This avoids the needs for plugins to do separate queries, which is
easier for them, and better performing.
2023-04-26 15:36:56 +01:00
Tim Hunt eb6c618fd4 MDL-78025 question generator: make the behaviour less surprising
* The object returned by update_question is alwasy a new clone
  and the $question passed in will not be modified.

* The returned object has the fields like questionbankentryid and
  the ones related to versionning, so it is more like the data
  returned by question_bank::load_question_data.
2023-04-26 15:36:56 +01:00
Paul Holden d43dc80d65 MDL-78034 mod_bigbluebuttonbn: format instance group names. 2023-04-26 15:31:38 +01:00
Tim Hunt 8e1583455e MDL-78025 question: move hiding logic into question_delete_question
This logic belongs in the API, so it is applied consistently.

Also this avoids calling the expensive function questions_in_use
twice per question.
2023-04-26 15:30:58 +01:00
Aya Saad 4bfce15818 MDL-76835 theme: Fix unordered lists indentation 2023-04-26 14:01:47 +02:00
Ilya Tregubov 6b8aeb5c90 Merge branch 'MDL-76929-402' of https://github.com/ilyatregubov/moodle into MOODLE_402_STABLE 2023-04-26 09:28:52 +08:00
Matt Porritt d9f71f0666 MDL-76929 Libraries: Upgrade phpxmlrpc to 4.10.1 2023-04-26 09:26:40 +08:00
David Castro 9e0d12e5ae MDL-77791 data: Fix file attachment to search doc 2023-04-25 19:56:26 -05:00
Paul Holden 86fd45f0de MDL-78023 tool_policy: cast timemodified column on table download. 2023-04-25 14:51:04 +01:00
Sara Arjona ffd32bacba Merge branch 'MDL-77313-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-04-25 15:18:35 +02:00
Paul Holden 3ee04ecf78 Merge branch 'MDL-78007-402' of https://github.com/HuongNV13/moodle into MOODLE_402_STABLE 2023-04-25 12:36:08 +01:00
Max Larkin c675170c4e MDL-73331 tool_brickfield: Update advanced tab display 2023-04-25 12:04:36 +01:00
Paul Holden 0c74bbfa06 Merge branch 'MDL-77766-402-2' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-04-25 09:38:36 +01:00
Anupama Sarjoshi 4f7ccd0432 MDL-77987 Backup: add progress tracking to some slow steps 2023-04-25 09:19:36 +01:00
Paul Holden 4806324231 MDL-77384 check: clarify statistics check name. 2023-04-25 09:05:45 +01:00
Paul Holden 9c779fefc7 MDL-76971 reportbuilder: switch remaining classes to external_api.
Continues on the work started in a3cc26f8, to remove the last
remnants of usage of previous external API classes.
2023-04-25 08:50:27 +01:00
Paul Holden b82cc59782 MDL-78011 qbank_managecategories: require library for pagesize const. 2023-04-24 15:35:47 +01:00
Jun Pataleta e38a933fa2 MDL-77766 qtype_truefalse: Respect showstandardinstruction
* When showstandardinstruction is set to no, replace the standard
instruction with the generic "Answer" text for the answer options
fieldset's legend.
2023-04-24 20:11:10 +08:00
Jun Pataleta 9ef5ed8527 MDL-77766 qtype_multichoice: Respect showstandardinstruction
* When showstandardinstruction is set to no, replace the standard
instruction with the generic "Answer" text for the answer options
fieldset's legend.
2023-04-24 20:11:10 +08:00
Marina Glancy f1afcf6616 MDL-78006 course: test for adding activity in a new section 2023-04-24 11:42:07 +01:00
Paul Holden 0a05336551 MDL-78006 course: register activity chooser listeners just once. 2023-04-24 11:41:57 +01:00
Tim Hunt a9c5734f04 MDL-77997 questions: add back Export as XML to the preview screen
The used the exist in Moodle up to 3.11, but then was removed with
insufficient thought in 4.0 (because we had grander long-term plans
which still have not happened). Until those plans happen, this
commit adds the simple link back on the preview screen.
2023-04-24 11:30:28 +01:00
Paul Holden 1e81424bdd MDL-77312 files: exclude drafts when determining license usage. 2023-04-24 11:08:18 +01:00
Paul Holden 4aaaaa5f57 MDL-77313 restore: re-add field to indicate course/category search.
When the two restore forms for searching courses and categories were
converted to core templates in eb9935c9 they lost the named submit
button, which broke searching.
2023-04-24 11:05:13 +01:00
Paul Holden 963b56cf7e MDL-77858 javascript: correct core/notification exception imports. 2023-04-24 10:45:55 +01:00
Paul Holden f3368a55b5 MDL-77394 mod_forum: de-couple discussion pinned/starred options. 2023-04-24 10:38:28 +01:00
Paul Holden 37564d61d5 MDL-77398 mod_assign: disable form submit protection for batch options. 2023-04-24 10:35:49 +01:00
Huong Nguyen 94a87bc47e MDL-78007 tiny_media: Fix wrong condition for the Tiny Media
Including in this commit:
 - Switched to Tiny editor in manually_mark_question.feature
2023-04-24 15:59:26 +07:00
Jun Pataleta e6615e587f MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-24 13:22:41 +08:00
10780 changed files with 220194 additions and 462278 deletions
+1 -1
View File
@@ -153,7 +153,7 @@
'promise/always-return': 'warn',
'promise/no-return-wrap': 'warn',
'promise/param-names': 'warn',
'promise/catch-or-return': ['warn', {terminationMethod: ['catch', 'fail', 'always'], allowFinally: true}],
'promise/catch-or-return': ['warn', {terminationMethod: ['catch', 'fail']}],
'promise/no-native': 'warn',
'promise/avoid-new': 'warn',
-7
View File
@@ -1,7 +0,0 @@
*** PLEASE DO NOT OPEN PULL REQUESTS VIA GITHUB ***
The moodle.git repository at Github is just a mirror of the official repository. We do not accept pull requests at Github.
See CONTRIBUTING.md guidelines for how to contribute patches for Moodle. Thank you.
--
-6
View File
@@ -1,6 +0,0 @@
> [!IMPORTANT]
> PLEASE DO NOT PUBLISH SECURITY FINDINGS PUBLICLY.
If you discover a potential security issue, please report it via our [Security Submission Form](https://moodle.org/security/report).
For more information about our security processes and responsible disclosure policy, see the [Security Procedures documentation](https://moodledev.io/general/development/process/security).
-1
View File
@@ -1 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1231.24 314.44" preserveAspectRatio="xMinYMid meet"><defs><style>.cls-1{fill:#f48020;}.cls-2,.cls-3{fill:#383738;stroke:#4a4a4c;}.cls-2{stroke-width:2.37px;}.cls-3{stroke-width:2.38px;}.cls-4{fill:#585858;}</style></defs><title>Moodle_Logo_UseonBlack_RGB</title><path class="cls-1" d="M1086.3,235.34a53.42,53.42,0,0,0,16.71,29q13.26,12.27,29.48,12.27,11.29,0,24.56-5.89,16.23-6.88,16.22-16.22l58-.49q-12.29,29-41.76,45.2-27.52,15.23-60.43,15.24-42.25,0-70-26.29t-27.75-68.54q0-43.73,27.75-69.51t72-25.8q48.15,0,75.17,31.94,25.07,29.47,25.06,79.1Zm89.91-33.91q-3.43-17.69-14.73-29-12.8-12.28-29.49-12.29-17.21,0-28.74,11.79t-15.47,29.48Z"/><path class="cls-1" d="M965.45,308.54V0h55V308.54Z"/><path class="cls-1" d="M892.69,308.54V290.36q-7.38,9.83-25.06,15.72a92.31,92.31,0,0,1-30,5.41q-39.31,0-63.13-27T750.7,217.65q0-39.3,23.34-65.84t62.15-26.53q43.71,0,56.5,23.58V0h53.55V308.54Zm0-102.68q0-14.75-14-28.26t-28.74-13.51q-21.12,0-33.41,17.2-10.8,15.24-10.8,37.33,0,21.63,10.8,36.85,12.29,17.71,33.41,17.69,12.78,0,27.76-12t15-24.81Z"/><path class="cls-1" d="M647,313.45q-41.77,0-69-26.53t-27.27-68.3q0-41.73,27.27-68.28t69-26.53q41.75,0,69.27,26.53t27.52,68.28q0,41.79-27.52,68.3T647,313.45ZM647,168q-19.89,0-30.58,15.07t-10.68,35.79q0,20.73,9.94,35.05,11.43,16.31,31.32,16.28t31.32-16.28q10.44-14.31,10.44-35.05t-9.94-35Q667.42,168,647,168Z"/><path class="cls-1" d="M448.07,313.45q-41.76,0-69-26.53t-27.27-68.3q0-41.73,27.27-68.28t69-26.53q41.74,0,69.28,26.53t27.5,68.28q0,41.79-27.5,68.3T448.07,313.45Zm0-145.43q-19.89,0-30.59,15.07t-10.69,35.79q0,20.73,9.94,35.05,11.43,16.31,31.34,16.28t31.32-16.28q10.42-14.31,10.44-35.05t-9.94-35Q468.45,168,448.07,168Z"/><path class="cls-1" d="M288.89,309.11V201q0-33.9-28-33.9t-28,33.9V309.11h-55V201q0-33.9-27.52-33.9-28,0-28,33.9V309.11h-55V194.65q0-35.37,24.56-53.54,21.61-16.22,58.46-16.22,37.35,0,55,19.16,15.23-19.16,55.51-19.16,36.86,0,58.45,16.22,24.57,18.16,24.57,53.54V309.11Z"/><path class="cls-2" d="M.76,145.76"/><path class="cls-3" d="M1.73,145.32"/><path class="cls-4" d="M173.86,116.85l55.08-40.1-.7-2.44C135,83.92,80.42,96.44,0,144.13l.73,2.38,21-.67c15.17.52,30.85,1.26,46,1.32-1,24.09.83,32.65.83,32.65,51.92,17.58,101.22,1.53,127.14-43.9A248.72,248.72,0,0,0,173.86,116.85Z"/><path class="cls-4" d="M113.78,110c-.3-1.08-2.23-1.48-4.28-.9a4.73,4.73,0,0,0-3.14,2.19c-18.53,5-49.16,13.72-70.73,21l-1.33.45c-16.68,5.61-24.73,8.49-25.22,12.55-2.29,18.44-.87,42.18-.86,42.48l.19,6.4c-9.74,27.56.06,49.6,8.38,69.77.06-24.92,1.07-45.22-6-71-.2-3.82-1.49-30.36.61-47.34.34-2.75,11.65-6.56,23.63-10.59l1.33-.44c22-7.42,53.57-16.39,71.9-21.29a6.75,6.75,0,0,0,2.29-.25C112.64,112.43,114.08,111.09,113.78,110Z"/></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

-31
View File
@@ -1,31 +0,0 @@
name: 'Close Pull Requests'
on:
pull_request_target:
types: opened
workflow_dispatch:
jobs:
close:
# Avoid forks to run this job
if: github.repository_owner == 'moodle'
name: Close Pull Requests
runs-on: ubuntu-latest
steps:
- uses: dessant/repo-lockdown@v4
with:
process-only: prs
close-pr: true
skip-closed-pr-comment: true
pr-comment: >
**Please, don't open pull requests via GitHub.**
This repository (moodle.git) at GitHub is just a mirror of the official Moodle repository.
For how to contribute patches for Moodle see
[CONTRIBUTING.md](https://github.com/moodle/moodle/blob/main/CONTRIBUTING.md).
Closing this pull request.
-143
View File
@@ -1,143 +0,0 @@
name: One by One Testing
# Run all the individual unit tests one by one, with
# fully independent PHPUnit executions. Useful to
# detect issues with some tests that are using stuff
# that has been made available by others, but is not
# available when running individually.
#
# Note that we aren't using PHPUnit's own isolation
# here but completely separated runs, one for each
# test.
#
# The workflow will fail reporting all the tests
# that have failed (and will pass if no failure is
# detected, of course).
#
# It's only executed via workflow dispatch (automated
# or manual), not by push/tag. And acceptd configuration
# of phpunit, specially useful to run it with PHPUnit's
# own isolation or any other option.
on:
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
chunks: 7
jobs:
collect:
name: Collect individual unit tests
runs-on: ubuntu-latest
outputs:
matrix: ${{steps.individual-tests.outputs.matrix }}
steps:
- name: Checking out code
uses: actions/checkout@v4
- name: Looking for all individual tests
id: individual-tests
run: |
count=0 # Number of individual tests found.
while read -r testfile; do # For each test file.
while read -r testname; do # For each unit test in a file.
count=$((count + 1))
# Sent it to the correct chunk file.
chunk=$(((($count % $chunks)) + 1))
echo "$testname $testfile" >> ./chunk_$chunk.txt
done < <(grep "function test_" "${testfile}" | sed -r "s/^.*function (test_[a-zA-Z0-9_]+).*/\1/")
done < <(find . -name "*_test.php")
# Generate the matrix to run tests.
echo "matrix=$(ls -1 chunk_*.txt | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
echo "$count individual tests collected in $chunks files"
- name: Upload individual tests files
uses: actions/upload-artifact@v4
with:
name: individual_tests
path: chunk_*.txt
retention-days: 1
test:
name: Run tests
needs: collect
runs-on: ubuntu-latest
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
file: ${{ fromJson(needs.collect.outputs.matrix) }}
steps:
- name: Setting up DB pgsql
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 13
postgresql db: test
postgresql user: test
postgresql password: test
- name: Setting up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
ini-values: max_input_vars=5000
coverage: none
- name: Checking out code
uses: actions/checkout@v4
- name: Download individual test files
uses: actions/download-artifact@v4
with:
name: individual_tests # Make all the chunk files available for the next steps.
- name: Setting up PHPUnit
env:
dbtype: pgsql
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
sudo locale-gen en_AU.UTF-8
php admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Run PHPUnit test (one by one)
env:
dbtype: pgsql
run: |
status=0
count=0
while read -r line; do # For each line in the chunk file
count=$((count + 1))
filter="${line% *}"
file="${line#* }"
# Run the individual unit test and report problems if needed to.
if ! php vendor/bin/phpunit \
--fail-on-empty-test-suite \
--fail-on-warning \
--fail-on-risky \
--filter "$filter" ${{ inputs.phpunit_extra_options }} \
"$file" >/dev/null 2>&1; then
if [ $status -eq 0 ]; then
echo "Problems found, list of PHPUnit commands failing:"
fi
echo "vendor/bin/phpunit --filter '${filter}' ${{ inputs.phpunit_extra_options }} $file"
status=$((status + 1))
fi
done < ${{ matrix.file }}
echo "Finished: $count individual tests executed, $status tests failed"
exit $status
+3 -4
View File
@@ -3,7 +3,6 @@ name: Core
on:
push:
branches-ignore:
- main
- master
- MOODLE_[0-9]+_STABLE
tags-ignore:
@@ -16,7 +15,7 @@ on:
default: ''
env:
php: 8.3
php: 8.2
jobs:
Grunt:
@@ -63,12 +62,12 @@ jobs:
include:
# MySQL builds always run with the lowest PHP supported version.
- os: ubuntu-22.04
php: 8.1
php: 8.0
extensions:
db: mysqli
# PostgreSQL builds always run with the highest PHP supported version.
- os: ubuntu-22.04
php: 8.3
php: 8.2
db: pgsql
steps:
+3 -3
View File
@@ -8,7 +8,7 @@ on:
required: false
default: ''
env:
php: 8.3
php: 8.2
jobs:
Grunt:
@@ -51,7 +51,7 @@ jobs:
matrix:
include:
- os: windows-latest
php: 8.3
php: 8.2
# Ideally we should use mysql/mariadb, but they are 4x slower without tweaks and configuration
# so let's run only postgres (1.5h vs 6h) only, If some day we want to improve the mysql runs,
# this is the place to enable them.
@@ -59,7 +59,7 @@ jobs:
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
- os: windows-latest
php: 8.1
php: 8.0
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium
-1
View File
@@ -26,7 +26,6 @@
/.patches/
/.idea/
.phpstorm.*
!.phpstorm.meta.php
/nbproject/
CVS
.DS_Store
-40
View File
@@ -1,40 +0,0 @@
<?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/>.
/**
* Helper file for PhpStorm, and other IDEs, to provide better code completion.
*
* @package core
* @copyright 2024 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace PHPSTORM_META;
// Assume that anything returned by \core\di::get('...') is an instance of the first argument.
override(\core\di::get(0), map([
'' => '@',
]));
// Assume that anything returned by \Psr\Container\ContainerInterface::get('...') is an instance of the first argument.
override(\Psr\Container\ContainerInterface::get(0), map([
'' => '@',
]));
// Assume that anything returned by \DI\Container::get('...') is an instance of the first argument.
override(\DI\Container::get(0), map([
'' => '@',
]));
-52
View File
@@ -1,52 +0,0 @@
# Contributing to Moodle
[Moodle][1] is made by people like you. We are members of a big worldwide community of developers, designers, teachers, testers, translators and many more. We work in universities, schools, companies and other places. You are very welcome to join us and contribute to the project.
There are many ways that you can contribute to Moodle, not just through development. See our [community contribution guide][2] for some of the many ways that you can help.
## Github
> [!NOTE]
> Please do not open pull requests via Github.
All issues should be reported via, and patched provided to the [Moodle Tracker][3].
The Moodle [Github][4] repository is a clone of the official Moodle repository, whcih can be found at https://git.moodle.org.
## Moodle core bug fixes and new features
Over the years, Moodle has developed a mature process for reporting, reviewing, and accepting patches. This is fully documented in our [documentation on development processes][6], but in summary:
- Every bug fix or new feature must have a tracker issue.
- You publish the branch implementing the fix or new feature in your public clone of the moodle.git repository (typically on Github).
- Your patch is peer-reviewed, discussed, integrated, tested and then released as a part of one of our weekly releases.
- New features are developed on the `main` branch. Bug fixes are also backported to currently supported maintenance (stable) branches.
> [!IMPORTANT]
> Please do not publish security issues, or patches releating to them publicly.
> See our [Responsible Disclosure Policy][5] for more information.
## Moodle plugins
Moodle has a framework for additional plugins to extend its functionality. We
have a Moodle plugins directory <https://moodle.org/plugins/> where you can
register and maintain your plugin. Plugins hosted in the plugins directory can
be easily installed and updated via the Moodle administration interface.
* You are expected to have a public source code repository with your plugin
code.
* After registering your plugin in the plugins directory it is reviewed before
being published.
* You are expected to continuously release updated versions of the plugin via
the plugins directory. We do not pull from your code repository; you must do
it explicitly.
For further details, see <https://moodledev.io/general/community/plugincontribution>.
[1]: https://moodle.org
[2]: https://moodledev.io/general/community/contribute
[3]: https://tracker.moodle.org
[4]: https://github.com/moodle/moodle
[5]: https://moodledev.io/general/development/process/security
[6]: https://moodledev.io/general/development/process
+56
View File
@@ -0,0 +1,56 @@
CONTRIBUTING TO MOODLE
======================
Moodle is made by people like you. We are members of a big worldwide community
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://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
through peer-review, automated behaviour testing, continuous integration and
human post-integration checks.
Pull requests
-------------
Please do not open pull requests via Github. The repository there is just a
mirror of the official repository at <https://git.moodle.org>. Issues are
reported and patches provided via <https://tracker.moodle.org>. See below for
more information.
Moodle core bug fixes and new features
--------------------------------------
During the years of intensive development, a mature process of including
submitted patches has evolved.
* Every bug fix or new feature must have a tracker issue.
* You publish the branch implementing the fix or new feature in your public
clone of the moodle.git repository (typically on Github).
* Your patch is peer-reviewed, discussed, integrated, tested and then released
as a part of moodle.git.
* New features are developed on the master branch. Bug fixes are also
backported to currently supported maintenance (stable) branches.
For further details, see <https://moodledev.io/general/development/process>.
Moodle plugins
--------------
Moodle has a framework for additional plugins to extend its functionality. We
have a Moodle plugins directory <https://moodle.org/plugins/> where you can
register and maintain your plugin. Plugins hosted in the plugins directory can
be easily installed and updated via the Moodle administration interface.
* You are expected to have a public source code repository with your plugin
code.
* After registering your plugin in the plugins directory it is reviewed before
being published.
* You are expected to continuously release updated versions of the plugin via
the plugins directory. We do not pull from your code repository; you must do
it explicitly.
For further details, see <https://moodledev.io/general/community/plugincontribution>.
+7
View File
@@ -0,0 +1,7 @@
*** PLEASE DO NOT OPEN PULL REQUESTS VIA GITHUB ***
The moodle.git repository at Github is just a mirror of the official repository. We do not accept pull requests at Github.
See CONTRIBUTING.txt guidelines for how to contribute patches for Moodle. Thank you.
--
-48
View File
@@ -1,48 +0,0 @@
# Moodle
<p align="center"><a href="https://moodle.org" target="_blank" title="Moodle Website">
<img src="https://raw.githubusercontent.com/moodle/moodle/main/.github/moodlelogo.svg" alt="The Moodle Logo">
</a></p>
[Moodle][1] is the World's Open Source Learning Platform, widely used around the world by countless universities, schools, companies, and all manner of organisations and individuals.
Moodle is designed to allow educators, administrators and learners to create personalised learning environments with a single robust, secure and integrated system.
## Documentation
- Read our [User documentation][3]
- Discover our [developer documentation][5]
- Take a look at our [demo site][4]
## Community
[moodle.org][1] is the central hub for the Moodle Community, with spaces for educators, administrators and developers to meet and work together.
You may also be interested in:
- attending a [Moodle Moot][6]
- our regular series of [developer meetings][7]
- the [Moodle User Association][8]
## Installation and hosting
Moodle is Free, and Open Source software. You can easily [download Moodle][9] and run it on your own web server, however you may prefer to work with one of our experienced [Moodle Partners][10].
Moodle also offers hosting through both [MoodleCloud][11], and our [partner network][10].
## License
Moodle is provided freely as open source software, under version 3 of the GNU General Public License. For more information on our license see
[1]: https://moodle.org
[2]: https://moodle.com
[3]: https://docs.moodle.org/
[4]: https://sandbox.moodledemo.net/
[5]: https://moodledev.io
[6]: https://moodle.com/events/mootglobal/
[7]: https://moodledev.io/general/community/meetings
[8]: https://moodleassociation.org/
[9]: https://download.moodle.org
[10]: https://moodle.com/partners
[11]: https://moodle.com/cloud
[12]: https://moodledev.io/general/license
+28
View File
@@ -0,0 +1,28 @@
.-..-.
_____ | || |
/____/-.---_ .---. .---. .-.| || | .---.
| | _ _ |/ _ \/ _ \/ _ || |/ __ \
* | | | | | || |_| || |_| || |_| || || |___/
|_| |_| |_|\_____/\_____/\_____||_|\_____)
Moodle - the world's open source learning platform
Moodle <https://moodle.org> is a learning platform designed to provide
educators, administrators and learners with a single robust, secure and
integrated system to create personalised learning environments.
You can download Moodle <https://download.moodle.org> and run it on your own
web server, ask one of our Moodle Partners <https://moodle.com/partners/> to
assist you, or have a MoodleCloud site <https://moodle.com/cloud/> set up for
you.
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://moodledev.io/general/license>.
Moodle is written in PHP and JavaScript and uses an SQL database for storing
the data.
See <https://docs.moodle.org> for details of Moodle's many features.
-10
View File
@@ -1,10 +0,0 @@
define("core_admin/bulk_user_actions",["exports","core_reportbuilder/local/selectors","core_table/local/dynamic/events","core_form/changechecker","core/custom_interaction_events","jquery"],(function(_exports,reportSelectors,tableEvents,FormChangeChecker,CustomEvents,_jquery){var obj;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}
/**
* Add bulk actions to the users list report
*
* @module core_admin/bulk_user_actions
* @copyright 2024 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,reportSelectors=_interopRequireWildcard(reportSelectors),tableEvents=_interopRequireWildcard(tableEvents),FormChangeChecker=_interopRequireWildcard(FormChangeChecker),CustomEvents=_interopRequireWildcard(CustomEvents),_jquery=(obj=_jquery)&&obj.__esModule?obj:{default:obj};const Selectors_bulkActionsForm="form#user-bulk-action-form",Selectors_userReportWrapper='[data-region="report-user-list-wrapper"]',Selectors_checkbox='input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="slave"]',Selectors_masterCheckbox='input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="master"]',Selectors_checkedRows='[data-togglegroup="report-select-all"][data-toggle="slave"]:checked';_exports.init=()=>{var _userBulkForm$closest;const userBulkForm=document.querySelector(Selectors_bulkActionsForm),userReport=null==userBulkForm||null===(_userBulkForm$closest=userBulkForm.closest(Selectors_userReportWrapper))||void 0===_userBulkForm$closest?void 0:_userBulkForm$closest.querySelector(reportSelectors.regions.report);if(!userBulkForm||!userReport)return;const actionSelect=userBulkForm.querySelector("select");CustomEvents.define(actionSelect,[CustomEvents.events.accessibleChange]),(0,_jquery.default)(actionSelect).on(CustomEvents.events.accessibleChange,(event=>{if(event.target.value&&"0"!=="".concat(event.target.value)){const e=new Event("submit",{cancelable:!0});userBulkForm.dispatchEvent(e),e.defaultPrevented||(FormChangeChecker.markFormSubmitted(userBulkForm),userBulkForm.submit())}}));const updateUserIds=()=>{const selectedUsers=[...userReport.querySelectorAll(Selectors_checkedRows)],selectedUserIds=selectedUsers.map((check=>parseInt(check.value)));userBulkForm.querySelector('[name="userids"]').value=selectedUserIds.join(","),actionSelect.disabled=0===selectedUsers.length,actionSelect.disabled&&(actionSelect.value="0");const selectedUsersNames=selectedUsers.map((check=>document.querySelector('label[for="'.concat(check.id,'"]')).textContent));userBulkForm.data={userids:selectedUserIds,usernames:selectedUsersNames}};updateUserIds(),document.addEventListener("change",(event=>{(event.target.matches(Selectors_checkbox)||event.target.matches(Selectors_masterCheckbox))&&userReport.contains(event.target)&&updateUserIds()})),document.addEventListener(tableEvents.tableContentRefreshed,(event=>{userReport.contains(event.target)&&updateUserIds()}))}}));
//# sourceMappingURL=bulk_user_actions.min.js.map
File diff suppressed because one or more lines are too long
-10
View File
@@ -1,10 +0,0 @@
define("core_admin/themeselector/preview_modal",["exports","core/modal_events","core/modal_cancel","core/modal_save_cancel","core/notification","core/templates","core/str"],(function(_exports,_modal_events,_modal_cancel,_modal_save_cancel,_notification,_templates,_str){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}
/**
* Modal for theme previews.
*
* @module core_admin/themeselector/preview_modal
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_modal_events=_interopRequireDefault(_modal_events),_modal_cancel=_interopRequireDefault(_modal_cancel),_modal_save_cancel=_interopRequireDefault(_modal_save_cancel),_notification=_interopRequireDefault(_notification),_templates=_interopRequireDefault(_templates);const SELECTORS_THEMES_CONTAINER="themelist",SELECTORS_PREVIEW='[data-action="preview"]';_exports.init=()=>{registerListenerEvents()};const registerListenerEvents=()=>{document.addEventListener("click",(e=>{const preview=e.target.closest(SELECTORS_PREVIEW);preview&&buildModal(preview).catch(_notification.default.exception)}))},buildModal=async element=>{let description=await(0,_str.getString)("choosereadme","theme_"+element.getAttribute("data-choose"));const themesContainer=document.getElementById(SELECTORS_THEMES_CONTAINER),definedInConfig=parseInt(themesContainer.dataset.definedinconfig),data={name:element.getAttribute("data-name"),image:element.getAttribute("data-image"),description:description.replace(/<[^>]+>/g," "),current:element.getAttribute("data-current"),actionurl:element.getAttribute("data-actionurl"),choose:element.getAttribute("data-choose"),sesskey:element.getAttribute("data-sesskey"),definedinconfig:definedInConfig};let modalTemplate=_modal_save_cancel.default;(data.current||data.definedinconfig)&&(modalTemplate=_modal_cancel.default);const modal=await modalTemplate.create({title:data.name,body:_templates.default.render("core_admin/themeselector/theme_preview_modal",data),large:!0,buttons:{save:(0,_str.getString)("selecttheme","moodle"),cancel:(0,_str.getString)("closebuttontitle","moodle")},show:!0});modal.getRoot().on(_modal_events.default.save,(()=>{modal.getRoot().find("form").submit()}))}}));
//# sourceMappingURL=preview_modal.min.js.map
@@ -1 +0,0 @@
{"version":3,"file":"preview_modal.min.js","sources":["../../src/themeselector/preview_modal.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Modal for theme previews.\n *\n * @module core_admin/themeselector/preview_modal\n * @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport ModalEvents from 'core/modal_events';\nimport ModalCancel from 'core/modal_cancel';\nimport ModalSaveCancel from 'core/modal_save_cancel';\nimport Notification from 'core/notification';\nimport Templates from 'core/templates';\nimport {getString} from 'core/str';\n\nconst SELECTORS = {\n THEMES_CONTAINER: 'themelist',\n PREVIEW: '[data-action=\"preview\"]',\n};\n\n/**\n * Entrypoint of the js.\n *\n * @method init\n */\nexport const init = () => {\n registerListenerEvents();\n};\n\n/**\n * Register theme related event listeners.\n *\n * @method registerListenerEvents\n */\nconst registerListenerEvents = () => {\n document.addEventListener('click', (e) => {\n const preview = e.target.closest(SELECTORS.PREVIEW);\n if (preview) {\n buildModal(preview).catch(Notification.exception);\n }\n });\n};\n\n/**\n * Build the modal with the provided data.\n *\n * @method buildModal\n * @param {object} element\n */\nconst buildModal = async(element) => {\n\n // This string can be long. We will fetch it with JS as opposed to passing it as an attribute.\n let description = await getString('choosereadme', 'theme_' + element.getAttribute('data-choose'));\n\n const themesContainer = document.getElementById(SELECTORS.THEMES_CONTAINER);\n const definedInConfig = parseInt(themesContainer.dataset.definedinconfig);\n // Prepare data for modal.\n const data = {\n name: element.getAttribute('data-name'),\n image: element.getAttribute('data-image'),\n description: description.replace(/<[^>]+>/g, ' '), // Strip out HTML tags.\n current: element.getAttribute('data-current'),\n actionurl: element.getAttribute('data-actionurl'),\n choose: element.getAttribute('data-choose'),\n sesskey: element.getAttribute('data-sesskey'),\n definedinconfig: definedInConfig,\n };\n\n // Determine which modal template we should use.\n let modalTemplate = ModalSaveCancel;\n if (data.current || data.definedinconfig) {\n modalTemplate = ModalCancel;\n }\n\n const modal = await modalTemplate.create({\n title: data.name,\n body: Templates.render('core_admin/themeselector/theme_preview_modal', data),\n large: true,\n buttons: {\n 'save': getString('selecttheme', 'moodle'),\n 'cancel': getString('closebuttontitle', 'moodle'),\n },\n show: true,\n });\n\n modal.getRoot().on(ModalEvents.save, () => {\n modal.getRoot().find('form').submit();\n });\n};\n"],"names":["SELECTORS","registerListenerEvents","document","addEventListener","e","preview","target","closest","buildModal","catch","Notification","exception","async","description","element","getAttribute","themesContainer","getElementById","definedInConfig","parseInt","dataset","definedinconfig","data","name","image","replace","current","actionurl","choose","sesskey","modalTemplate","ModalSaveCancel","ModalCancel","modal","create","title","body","Templates","render","large","buttons","show","getRoot","on","ModalEvents","save","find","submit"],"mappings":";;;;;;;gWA8BMA,2BACgB,YADhBA,kBAEO,wCAQO,KAChBC,gCAQEA,uBAAyB,KAC3BC,SAASC,iBAAiB,SAAUC,UAC1BC,QAAUD,EAAEE,OAAOC,QAAQP,mBAC7BK,SACAG,WAAWH,SAASI,MAAMC,sBAAaC,eAW7CH,WAAaI,MAAAA,cAGXC,kBAAoB,kBAAU,eAAgB,SAAWC,QAAQC,aAAa,sBAE5EC,gBAAkBd,SAASe,eAAejB,4BAC1CkB,gBAAkBC,SAASH,gBAAgBI,QAAQC,iBAEnDC,KAAO,CACTC,KAAMT,QAAQC,aAAa,aAC3BS,MAAOV,QAAQC,aAAa,cAC5BF,YAAaA,YAAYY,QAAQ,WAAY,KAC7CC,QAASZ,QAAQC,aAAa,gBAC9BY,UAAWb,QAAQC,aAAa,kBAChCa,OAAQd,QAAQC,aAAa,eAC7Bc,QAASf,QAAQC,aAAa,gBAC9BM,gBAAiBH,qBAIjBY,cAAgBC,4BAChBT,KAAKI,SAAWJ,KAAKD,mBACrBS,cAAgBE,6BAGdC,YAAcH,cAAcI,OAAO,CACrCC,MAAOb,KAAKC,KACZa,KAAMC,mBAAUC,OAAO,+CAAgDhB,MACvEiB,OAAO,EACPC,QAAS,OACG,kBAAU,cAAe,kBACvB,kBAAU,mBAAoB,WAE5CC,MAAM,IAGVR,MAAMS,UAAUC,GAAGC,sBAAYC,MAAM,KACjCZ,MAAMS,UAAUI,KAAK,QAAQC"}
-97
View File
@@ -1,97 +0,0 @@
// 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/>.
/**
* Add bulk actions to the users list report
*
* @module core_admin/bulk_user_actions
* @copyright 2024 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import * as reportSelectors from 'core_reportbuilder/local/selectors';
import * as tableEvents from 'core_table/local/dynamic/events';
import * as FormChangeChecker from 'core_form/changechecker';
import * as CustomEvents from 'core/custom_interaction_events';
import jQuery from 'jquery';
const Selectors = {
bulkActionsForm: 'form#user-bulk-action-form',
userReportWrapper: '[data-region="report-user-list-wrapper"]',
checkbox: 'input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="slave"]',
masterCheckbox: 'input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="master"]',
checkedRows: '[data-togglegroup="report-select-all"][data-toggle="slave"]:checked',
};
/**
* Initialise module
*/
export const init = () => {
const userBulkForm = document.querySelector(Selectors.bulkActionsForm);
const userReport = userBulkForm?.closest(Selectors.userReportWrapper)?.querySelector(reportSelectors.regions.report);
if (!userBulkForm || !userReport) {
return;
}
const actionSelect = userBulkForm.querySelector('select');
CustomEvents.define(actionSelect, [CustomEvents.events.accessibleChange]);
jQuery(actionSelect).on(CustomEvents.events.accessibleChange, event => {
if (event.target.value && `${event.target.value}` !== "0") {
const e = new Event('submit', {cancelable: true});
userBulkForm.dispatchEvent(e);
if (!e.defaultPrevented) {
FormChangeChecker.markFormSubmitted(userBulkForm);
userBulkForm.submit();
}
}
});
// Every time the checkboxes in the report are changed, update the list of users in the form values
// and enable/disable the action select.
const updateUserIds = () => {
const selectedUsers = [...userReport.querySelectorAll(Selectors.checkedRows)];
const selectedUserIds = selectedUsers.map(check => parseInt(check.value));
userBulkForm.querySelector('[name="userids"]').value = selectedUserIds.join(',');
// Disable the action selector if nothing selected, and reset the current selection.
actionSelect.disabled = selectedUsers.length === 0;
if (actionSelect.disabled) {
actionSelect.value = "0";
}
const selectedUsersNames = selectedUsers.map(check => document.querySelector(`label[for="${check.id}"]`).textContent);
// Add the user ids and names to the form data attributes so they can be available from the
// other JS modules that listen to the form submit event.
userBulkForm.data = {userids: selectedUserIds, usernames: selectedUsersNames};
};
updateUserIds();
document.addEventListener('change', event => {
// When checkboxes are checked next to individual users or the master toggle (Select all/none).
if ((event.target.matches(Selectors.checkbox) || event.target.matches(Selectors.masterCheckbox))
&& userReport.contains(event.target)) {
updateUserIds();
}
});
document.addEventListener(tableEvents.tableContentRefreshed, event => {
// When the report contents is updated (i.e. page is changed, filters applied, etc).
if (userReport.contains(event.target)) {
updateUserIds();
}
});
};
@@ -1,104 +0,0 @@
// 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/>.
/**
* Modal for theme previews.
*
* @module core_admin/themeselector/preview_modal
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import ModalEvents from 'core/modal_events';
import ModalCancel from 'core/modal_cancel';
import ModalSaveCancel from 'core/modal_save_cancel';
import Notification from 'core/notification';
import Templates from 'core/templates';
import {getString} from 'core/str';
const SELECTORS = {
THEMES_CONTAINER: 'themelist',
PREVIEW: '[data-action="preview"]',
};
/**
* Entrypoint of the js.
*
* @method init
*/
export const init = () => {
registerListenerEvents();
};
/**
* Register theme related event listeners.
*
* @method registerListenerEvents
*/
const registerListenerEvents = () => {
document.addEventListener('click', (e) => {
const preview = e.target.closest(SELECTORS.PREVIEW);
if (preview) {
buildModal(preview).catch(Notification.exception);
}
});
};
/**
* Build the modal with the provided data.
*
* @method buildModal
* @param {object} element
*/
const buildModal = async(element) => {
// This string can be long. We will fetch it with JS as opposed to passing it as an attribute.
let description = await getString('choosereadme', 'theme_' + element.getAttribute('data-choose'));
const themesContainer = document.getElementById(SELECTORS.THEMES_CONTAINER);
const definedInConfig = parseInt(themesContainer.dataset.definedinconfig);
// Prepare data for modal.
const data = {
name: element.getAttribute('data-name'),
image: element.getAttribute('data-image'),
description: description.replace(/<[^>]+>/g, ' '), // Strip out HTML tags.
current: element.getAttribute('data-current'),
actionurl: element.getAttribute('data-actionurl'),
choose: element.getAttribute('data-choose'),
sesskey: element.getAttribute('data-sesskey'),
definedinconfig: definedInConfig,
};
// Determine which modal template we should use.
let modalTemplate = ModalSaveCancel;
if (data.current || data.definedinconfig) {
modalTemplate = ModalCancel;
}
const modal = await modalTemplate.create({
title: data.name,
body: Templates.render('core_admin/themeselector/theme_preview_modal', data),
large: true,
buttons: {
'save': getString('selecttheme', 'moodle'),
'cancel': getString('closebuttontitle', 'moodle'),
},
show: true,
});
modal.getRoot().on(ModalEvents.save, () => {
modal.getRoot().find('form').submit();
});
};
-71
View File
@@ -1,71 +0,0 @@
<?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 core_admin\output;
use moodle_url;
use renderable;
use renderer_base;
use stdClass;
use templatable;
/**
* Theme selector renderable.
*
* @package core_admin
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class theme_selector implements renderable, templatable {
/** @var array $themedata Theme data to pass to the template. */
private $themedata = null;
/** @var bool Whether $CFG->theme is defined in config.php. */
private $definedinconfig;
/**
* Constructor.
*
* @param array $themedata Theme data used for template.
* @param bool $definedinconfig Whether $CFG->theme is defined in config.php.
*/
public function __construct(array $themedata, bool $definedinconfig = false) {
$this->themedata = $themedata;
$this->definedinconfig = $definedinconfig;
}
/**
* Export this data so it can be used as the context for a mustache template.
*
* @param renderer_base $output Renderer base.
* @return stdClass
*/
public function export_for_template(renderer_base $output): stdClass {
$data = new stdClass();
// Theme data used to populate cards and modal.
$data->themes = $this->themedata;
// Reset theme caches button.
$reseturl = new moodle_url('/admin/themeselector.php', ['sesskey' => sesskey(), 'reset' => 1]);
$resetbutton = new \single_button($reseturl, get_string('themeresetcaches', 'admin'), 'post',
\single_button::BUTTON_SECONDARY);
$data->resetbutton = $resetbutton->export_for_template($output);
$data->definedinconfig = $this->definedinconfig;
return $data;
}
}
+1 -1
View File
@@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason(): string {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
@@ -78,17 +78,6 @@ class task_logs extends datasource {
];
}
/**
* Return the column sorting that will be added to the report upon creation
*
* @return int[]
*/
public function get_default_column_sorting(): array {
return [
'task_log:starttime' => SORT_DESC,
];
}
/**
* Return the filters that will be added to the report upon creation
*
@@ -46,14 +46,12 @@ class task_log extends base {
protected const FAILED = 1;
/**
* Database tables that this entity uses
* Database tables that this entity uses and their default aliases
*
* @return string[]
* @return array
*/
protected function get_default_tables(): array {
return [
'task_log',
];
protected function get_default_table_aliases(): array {
return ['task_log' => 'tl'];
}
/**
@@ -1,108 +0,0 @@
<?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/>.
declare(strict_types=1);
namespace core_admin\reportbuilder\local\filters;
use core\context\system;
use core_course_category;
use MoodleQuickForm;
use core_reportbuilder\local\filters\base;
use core_reportbuilder\local\helpers\database;
/**
* Course role report filter (by role, category, course)
*
* The provided filter field SQL must refer/return an expression for the user ID (e.g. "{$user}.id")
*
* @package core_admin
* @copyright 2023 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class courserole extends base {
/**
* Setup form
*
* @param MoodleQuickForm $mform
*/
public function setup_form(MoodleQuickForm $mform): void {
$elements = [];
// Role.
$elements['role'] = $mform->createElement('select', "{$this->name}_role", get_string('rolefullname', 'core_role'),
[0 => get_string('anyrole', 'core_filters')] + get_default_enrol_roles(system::instance()));
// Category.
$elements['category'] = $mform->createElement('select', "{$this->name}_category", get_string('category'),
[0 => get_string('anycategory', 'core_filters')] + core_course_category::make_categories_list());
// Course.
$elements['course'] = $mform->createElement('text', "{$this->name}_course", get_string('shortnamecourse'));
$mform->setType("{$this->name}_course", PARAM_RAW_TRIMMED);
$mform->addGroup($elements, "{$this->name}_group", $this->get_header(), '', false)
->setHiddenLabel(true);
}
/**
* Return filter SQL
*
* @param array $values
* @return array
*/
public function get_sql_filter(array $values): array {
[$fieldsql, $params] = $this->filter->get_field_sql_and_params();
[$contextalias, $rolealias, $coursealias] = database::generate_aliases(3);
[$roleparam, $categoryparam, $courseparam] = database::generate_param_names(3);
// Role.
$role = (int) ($values["{$this->name}_role"] ?? 0);
if ($role > 0) {
$selects[] = "{$rolealias}.roleid = :{$roleparam}";
$params[$roleparam] = $role;
}
// Category.
$category = (int) ($values["{$this->name}_category"] ?? 0);
if ($category > 0) {
$selects[] = "{$coursealias}.category = :{$categoryparam}";
$params[$categoryparam] = $category;
}
// Course.
$course = trim($values["{$this->name}_course"] ?? '');
if ($course !== '') {
$selects[] = "{$coursealias}.shortname = :{$courseparam}";
$params[$courseparam] = $course;
}
// Filter values are not set.
if (empty($selects)) {
return ['', []];
}
return ["{$fieldsql} IN (
SELECT {$rolealias}.userid
FROM {role_assignments} {$rolealias}
JOIN {context} {$contextalias} ON {$contextalias}.id = {$rolealias}.contextid AND {$contextalias}.contextlevel = 50
JOIN {course} {$coursealias} ON {$coursealias}.id = {$contextalias}.instanceid
WHERE " . implode(' AND ', $selects) . "
)", $params];
}
}
@@ -1,417 +0,0 @@
<?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 core_admin\reportbuilder\local\systemreports;
use core_admin\reportbuilder\local\filters\courserole;
use core\context\system;
use core_cohort\reportbuilder\local\entities\cohort;
use core_cohort\reportbuilder\local\entities\cohort_member;
use core_reportbuilder\local\entities\user;
use core_reportbuilder\local\filters\boolean_select;
use core_reportbuilder\local\helpers\database;
use core_reportbuilder\local\helpers\user_profile_fields;
use core_reportbuilder\local\report\action;
use core_reportbuilder\local\report\filter;
use core_reportbuilder\system_report;
use core_role\reportbuilder\local\entities\role;
use core_user\fields;
use lang_string;
use moodle_url;
use pix_icon;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/authlib.php');
require_once($CFG->libdir.'/enrollib.php');
require_once($CFG->dirroot.'/user/lib.php');
/**
* Browse users system report class implementation
*
* @package core_admin
* @copyright 2023 David Carrillo <davidmc@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class users extends system_report {
/**
* Initialise report, we need to set the main table, load our entities and set columns/filters
*/
protected function initialise(): void {
global $CFG;
// Our main entity, it contains all of the column definitions that we need.
$entityuser = new user();
$entityuseralias = $entityuser->get_table_alias('user');
$this->set_main_table('user', $entityuseralias);
$this->add_entity($entityuser);
// Any columns required by actions should be defined here to ensure they're always available.
$fullnamefields = array_map(fn($field) => "{$entityuseralias}.{$field}", fields::get_name_fields());
$this->add_base_fields("{$entityuseralias}.id, {$entityuseralias}.confirmed, {$entityuseralias}.mnethostid,
{$entityuseralias}.suspended, {$entityuseralias}.username, " . implode(', ', $fullnamefields));
if ($this->get_parameter('withcheckboxes', false, PARAM_BOOL)) {
$canviewfullnames = has_capability('moodle/site:viewfullnames', \context_system::instance());
$this->set_checkbox_toggleall(static function(\stdClass $row) use ($canviewfullnames): array {
return [$row->id, fullname($row, $canviewfullnames)];
});
}
$paramguest = database::generate_param_name();
$this->add_base_condition_sql("{$entityuseralias}.deleted <> 1 AND {$entityuseralias}.id <> :{$paramguest}",
[$paramguest => $CFG->siteguest]);
$entitycohortmember = new cohort_member();
$entitycohortmemberalias = $entitycohortmember->get_table_alias('cohort_members');
$this->add_entity($entitycohortmember
->add_joins($entitycohortmember->get_joins())
->add_join("LEFT JOIN {cohort_members} {$entitycohortmemberalias}
ON {$entityuseralias}.id = {$entitycohortmemberalias}.userid")
);
$entitycohort = new cohort();
$entitycohortalias = $entitycohort->get_table_alias('cohort');
$this->add_entity($entitycohort
->add_joins($entitycohort->get_joins())
->add_joins($entitycohortmember->get_joins())
->add_join("LEFT JOIN {cohort} {$entitycohortalias}
ON {$entitycohortalias}.id = {$entitycohortmemberalias}.cohortid")
);
// Join the role entity (Needed for the system role filter).
$roleentity = new role();
$role = $roleentity->get_table_alias('role');
$this->add_entity($roleentity
->add_join("LEFT JOIN (
SELECT DISTINCT r0.id, ras.userid
FROM {role} r0
JOIN {role_assignments} ras ON ras.roleid = r0.id
WHERE ras.contextid = ".SYSCONTEXTID."
) {$role} ON {$role}.userid = {$entityuseralias}.id")
);
// Now we can call our helper methods to add the content we want to include in the report.
$this->add_columns();
$this->add_filters();
$this->add_actions();
// Set if report can be downloaded.
$this->set_downloadable(true);
}
/**
* Validates access to view this report
*
* @return bool
*/
protected function can_view(): bool {
return has_any_capability(['moodle/user:update', 'moodle/user:delete'], system::instance());
}
/**
* Adds the columns we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
public function add_columns(): void {
$entityuser = $this->get_entity('user');
$entityuseralias = $entityuser->get_table_alias('user');
$this->add_column($entityuser->get_column('fullnamewithpicturelink'));
// Include identity field columns.
$identitycolumns = $entityuser->get_identity_columns($this->get_context());
foreach ($identitycolumns as $identitycolumn) {
$this->add_column($identitycolumn);
}
// Add "Last access" column.
$this->add_column(($entityuser->get_column('lastaccess'))
->set_callback(static function ($value, \stdClass $row): string {
if ($row->lastaccess) {
return format_time(time() - $row->lastaccess);
}
return get_string('never');
})
);
if ($column = $this->get_column('user:fullnamewithpicturelink')) {
$column
->add_fields("{$entityuseralias}.suspended, {$entityuseralias}.confirmed")
->add_callback(static function(string $fullname, \stdClass $row): string {
if ($row->suspended) {
$fullname .= ' ' . \html_writer::tag('span', get_string('suspended', 'moodle'),
['class' => 'badge badge-secondary ml-1']);
}
if (!$row->confirmed) {
$fullname .= ' ' . \html_writer::tag('span', get_string('confirmationpending', 'admin'),
['class' => 'badge badge-danger ml-1']);
}
return $fullname;
});
}
$this->set_initial_sort_column('user:fullnamewithpicturelink', SORT_ASC);
$this->set_default_no_results_notice(new lang_string('nousersfound', 'moodle'));
}
/**
* Adds the filters we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
protected function add_filters(): void {
$entityuser = $this->get_entity('user');
$entityuseralias = $entityuser->get_table_alias('user');
$filters = [
'user:fullname',
'user:firstname',
'user:lastname',
'user:username',
'user:idnumber',
'user:email',
'user:department',
'user:institution',
'user:city',
'user:country',
'user:confirmed',
'user:suspended',
'user:timecreated',
'user:lastaccess',
'user:timemodified',
'user:auth',
'user:lastip',
'cohort:idnumber',
'role:name',
];
$this->add_filters_from_entities($filters);
// Enrolled in any course filter.
$ue = database::generate_alias();
[$now1, $now2] = database::generate_param_names(2);
$now = time();
$sql = "CASE WHEN ({$entityuseralias}.id IN (
SELECT userid FROM {user_enrolments} {$ue}
WHERE {$ue}.status = " . ENROL_USER_ACTIVE . "
AND ({$ue}.timestart = 0 OR {$ue}.timestart < :{$now1})
AND ({$ue}.timeend = 0 OR {$ue}.timeend > :{$now2})
)) THEN 1 ELSE 0 END";
$this->add_filter((new filter(
boolean_select::class,
'enrolledinanycourse',
new lang_string('anycourses', 'filters'),
$this->get_entity('user')->get_entity_name(),
))
->set_field_sql($sql, [
$now1 => $now,
$now2 => $now,
])
);
// Course role filter.
$this->add_filter((new filter(
courserole::class,
'courserole',
new lang_string('courserole', 'filters'),
$this->get_entity('user')->get_entity_name(),
))
->set_field_sql("{$entityuseralias}.id")
);
// Add user profile fields filters.
$userprofilefields = new user_profile_fields($entityuseralias . '.id', $entityuser->get_entity_name());
foreach ($userprofilefields->get_filters() as $filter) {
$this->add_filter($filter);
}
// Set options for system role filter.
if ($filter = $this->get_filter('role:name')) {
$filter
->set_header(new lang_string('globalrole', 'role'))
->set_options(get_assignable_roles(system::instance()));
}
}
/**
* Add the system report actions. An extra column will be appended to each row, containing all actions added here
*
* Note the use of ":id" placeholder which will be substituted according to actual values in the row
*/
protected function add_actions(): void {
global $DB, $USER;
$contextsystem = system::instance();
// Action to edit users.
$this->add_action((new action(
new moodle_url('/user/editadvanced.php', ['id' => ':id', 'course' => get_site()->id]),
new pix_icon('t/edit', ''),
[],
false,
new lang_string('edit', 'moodle'),
))->add_callback(static function(\stdclass $row) use ($USER, $contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && (is_siteadmin($USER) || !is_siteadmin($row));
}));
// Action to suspend users (non mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['suspend' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/show', ''),
[],
false,
new lang_string('suspenduser', 'admin'),
))->add_callback(static function(\stdclass $row) use ($USER, $contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && !$row->suspended && !is_mnet_remote_user($row) &&
!($row->id == $USER->id || is_siteadmin($row));
}));
// Action to unsuspend users (non mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['unsuspend' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/hide', ''),
[],
false,
new lang_string('unsuspenduser', 'admin'),
))->add_callback(static function(\stdclass $row) use ($USER, $contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && $row->suspended && !is_mnet_remote_user($row) &&
!($row->id == $USER->id || is_siteadmin($row));
}));
// Action to unlock users (non mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['unlock' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/unlock', ''),
[],
false,
new lang_string('unlockaccount', 'admin'),
))->add_callback(static function(\stdclass $row) use ($contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && !is_mnet_remote_user($row) &&
login_is_lockedout($row);
}));
// Action to suspend users (mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['acl' => ':id', 'sesskey' => sesskey(), 'accessctrl' => 'deny']),
new pix_icon('t/show', ''),
[],
false,
new lang_string('denyaccess', 'mnet'),
))->add_callback(static function(\stdclass $row) use ($DB, $contextsystem): bool {
if (!$accessctrl = $DB->get_field(table: 'mnet_sso_access_control', return: 'accessctrl',
conditions: ['username' => $row->username, 'mnet_host_id' => $row->mnethostid]
)) {
$accessctrl = 'allow';
}
return has_capability('moodle/user:update', $contextsystem) && !$row->suspended &&
is_mnet_remote_user($row) && $accessctrl == 'allow';
}));
// Action to unsuspend users (mnet remote users).
$this->add_action((new action(
new moodle_url('/admin/user.php', ['acl' => ':id', 'sesskey' => sesskey(), 'accessctrl' => 'allow']),
new pix_icon('t/hide', ''),
[],
false,
new lang_string('allowaccess', 'mnet'),
))->add_callback(static function(\stdclass $row) use ($DB, $contextsystem): bool {
if (!$accessctrl = $DB->get_field(table: 'mnet_sso_access_control', return: 'accessctrl',
conditions: ['username' => $row->username, 'mnet_host_id' => $row->mnethostid]
)) {
$accessctrl = 'allow';
}
return has_capability('moodle/user:update', $contextsystem) && !$row->suspended &&
is_mnet_remote_user($row) && $accessctrl == 'deny';
}));
// Action to delete users.
$this->add_action((new action(
new moodle_url('/admin/user.php', ['delete' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/delete', ''),
[
'class' => 'text-danger',
'data-modal' => 'confirmation',
'data-modal-title-str' => json_encode(['deleteuser', 'admin']),
'data-modal-content-str' => ':deletestr',
'data-modal-yes-button-str' => json_encode(['delete', 'core']),
'data-modal-destination' => ':deleteurl',
],
false,
new lang_string('delete', 'moodle'),
))->add_callback(static function(\stdclass $row) use ($USER, $contextsystem): bool {
// Populate deletion modal attributes.
$row->deletestr = json_encode([
'deletecheckfull',
'moodle',
fullname($row, true),
]);
$row->deleteurl = (new moodle_url('/admin/user.php', [
'delete' => $row->id,
'confirm' => md5($row->id),
'sesskey' => sesskey(),
]))->out(false);
return has_capability('moodle/user:delete', $contextsystem) &&
!is_mnet_remote_user($row) && $row->id != $USER->id && !is_siteadmin($row);
}));
$this->add_action_divider();
// Action to confirm users.
$this->add_action((new action(
new moodle_url('/admin/user.php', ['confirmuser' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/check', ''),
[],
false,
new lang_string('confirmaccount', 'moodle'),
))->add_callback(static function(\stdclass $row) use ($contextsystem): bool {
return has_capability('moodle/user:update', $contextsystem) && !$row->confirmed;
}));
// Action to resend email.
$this->add_action((new action(
new moodle_url('/admin/user.php', ['resendemail' => ':id', 'sesskey' => sesskey()]),
new pix_icon('t/email', ''),
[],
false,
new lang_string('resendemail', 'moodle'),
))->add_callback(static function(\stdclass $row): bool {
return !$row->confirmed && !is_mnet_remote_user($row);
}));
}
/**
* Row class
*
* @param \stdClass $row
* @return string
*/
public function get_row_class(\stdClass $row): string {
return $row->suspended ? 'text-muted' : '';
}
}
-281
View File
@@ -1,281 +0,0 @@
<?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 core_admin\table;
use core_plugin_manager;
use flexible_table;
use html_writer;
use stdClass;
defined('MOODLE_INTERNAL') || die();
require_once("{$CFG->libdir}/tablelib.php");
/**
* Plugin Management table.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class hook_list_table extends flexible_table {
/** @var \core\plugininfo\base[] The plugin list */
protected array $plugins = [];
/** @var int The number of enabled plugins of this type */
protected int $enabledplugincount = 0;
/** @var core_plugin_manager */
protected core_plugin_manager $pluginmanager;
/** @var string The plugininfo class for this plugintype */
protected string $plugininfoclass;
/** @var stdClass[] The list of emitted hooks with metadata */
protected array $emitters;
public function __construct() {
global $CFG;
$this->define_baseurl('/admin/hooks.php');
parent::__construct('core_admin-hook_list_table');
// Add emitted hooks.
$this->emitters = \core\hook\manager::discover_known_hooks();
$this->setup_column_configuration();
$this->setup();
}
/**
* Set up the column configuration for this table.
*/
protected function setup_column_configuration(): void {
$columnlist = [
'details' => get_string('hookname', 'core_admin'),
'callbacks' => get_string('hookcallbacks', 'core_admin'),
'deprecates' => get_string('hookdeprecates', 'core_admin'),
];
$this->define_columns(array_keys($columnlist));
$this->define_headers(array_values($columnlist));
$columnswithhelp = [
'callbacks' => new \help_icon('hookcallbacks', 'admin'),
];
$columnhelp = array_map(function (string $column) use ($columnswithhelp): ?\renderable {
if (array_key_exists($column, $columnswithhelp)) {
return $columnswithhelp[$column];
}
return null;
}, array_keys($columnlist));
$this->define_help_for_headers($columnhelp);
}
/**
* Print the table.
*/
public function out(): void {
// All hook consumers referenced from the db/hooks.php files.
$hookmanager = \core\di::get(\core\hook\manager::class);
$allhooks = (array)$hookmanager->get_all_callbacks();
// Add any unused hooks.
foreach (array_keys($this->emitters) as $classname) {
if (isset($allhooks[$classname])) {
continue;
}
$allhooks[$classname] = [];
}
// Order rows by hook name, putting core first.
\core_collator::ksort($allhooks);
$corehooks = [];
foreach ($allhooks as $classname => $consumers) {
if (str_starts_with($classname, 'core\\')) {
$corehooks[$classname] = $consumers;
unset($allhooks[$classname]);
}
}
$allhooks = array_merge($corehooks, $allhooks);
foreach ($allhooks as $classname => $consumers) {
$this->add_data_keyed(
$this->format_row((object) [
'classname' => $classname,
'callbacks' => $consumers,
]),
$this->get_row_class($classname),
);
}
$this->finish_output(false);
}
protected function col_details(stdClass $row): string {
return $row->classname .
$this->get_description($row) .
html_writer::div($this->get_tags_for_row($row));
}
/**
* Show the name column content.
*
* @param stdClass $row
* @return string
*/
protected function get_description(stdClass $row): string {
if (!array_key_exists($row->classname, $this->emitters)) {
return '';
}
return html_writer::tag(
'small',
clean_text(markdown_to_html($this->emitters[$row->classname]['description']), FORMAT_HTML),
);
}
protected function col_deprecates(stdClass $row): string {
if (!class_exists($row->classname)) {
return '';
}
$deprecates = \core\hook\manager::get_replaced_callbacks($row->classname);
if (count($deprecates) === 0) {
return '';
}
$content = html_writer::start_tag('ul');
foreach ($deprecates as $deprecatedmethod) {
$content .= html_writer::tag('li', $deprecatedmethod);
}
$content .= html_writer::end_tag('ul');
return $content;
}
protected function col_callbacks(stdClass $row): string {
global $CFG;
$hookclass = $row->classname;
$cbinfo = [];
foreach ($row->callbacks as $definition) {
$iscallable = is_callable($definition['callback'], false, $callbackname);
$isoverridden = isset($CFG->hooks_callback_overrides[$hookclass][$definition['callback']]);
$info = "{$callbackname}&nbsp;({$definition['priority']})";
if (!$iscallable) {
$info .= '&nbsp;';
$info .= $this->get_tag(
get_string('error'),
'danger',
get_string('hookcallbacknotcallable', 'core_admin', $callbackname),
);
}
if ($isoverridden) {
// The lang string meaning should be close enough here.
$info .= $this->get_tag(
get_string('hookconfigoverride', 'core_admin'),
'warning',
get_string('hookconfigoverride_help', 'core_admin'),
);
}
$cbinfo[] = $info;
}
if ($cbinfo) {
$output = html_writer::start_tag('ol');
foreach ($cbinfo as $callback) {
$class = '';
if ($definition['disabled']) {
$class = 'dimmed_text';
}
$output .= html_writer::tag('li', $callback, ['class' => $class]);
}
$output .= html_writer::end_tag('ol');
return $output;
} else {
return '';
}
}
/**
* Get the HTML to display the badge with tooltip.
*
* @param string $tag The main text to display
* @param null|string $type The pill type
* @param null|string $tooltip The content of the tooltip
* @return string
*/
protected function get_tag(
string $tag,
?string $type = null,
?string $tooltip = null,
): string {
$attributes = [];
if ($type === null) {
$type = 'info';
}
if ($tooltip) {
$attributes['data-toggle'] = 'tooltip';
$attributes['title'] = $tooltip;
}
return html_writer::span($tag, "badge badge-{$type}", $attributes);
}
/**
* Get the code to display a set of tags for this table row.
*
* @param stdClass $row
* @return string
*/
protected function get_tags_for_row(stdClass $row): string {
if (!array_key_exists($row->classname, $this->emitters)) {
// This hook has been defined in the db/hooks.php file
// but does not refer to a hook in this version of Moodle.
return $this->get_tag(
get_string('hookunknown', 'core_admin'),
'warning',
get_string('hookunknown_desc', 'core_admin'),
);
}
if (!class_exists($row->classname)) {
// This hook has been defined in a hook discovery agent, but the class it refers to could not be found.
return $this->get_tag(
get_string('hookclassmissing', 'core_admin'),
'warning',
get_string('hookclassmissing_desc', 'core_admin'),
);
}
$tags = $this->emitters[$row->classname]['tags'] ?? [];
$taglist = array_map(function($tag): string {
if (is_array($tag)) {
return $this->get_tag(...$tag);
}
return $this->get_tag($tag, 'badge bg-info text-white');
}, $tags);
return implode("\n", $taglist);
}
protected function get_row_class(string $classname): string {
return '';
}
}
+7 -23
View File
@@ -33,7 +33,6 @@ require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
list($options, $unrecognized) = cli_get_params(array(
'courseid' => false,
'courseshortname' => '',
'cmid' => false,
'destination' => '',
'help' => false,
), array('h' => 'help'));
@@ -43,14 +42,13 @@ if ($unrecognized) {
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help'] || !($options['courseid'] || $options['courseshortname'] || $options['cmid'])) {
if ($options['help'] || !($options['courseid'] || $options['courseshortname'])) {
$help = <<<EOL
Perform backup of the given course or course module.
Perform backup of the given course.
Options:
--courseid=INTEGER Course ID for backup.
--courseshortname=STRING Course shortname for backup. This option is ignored if courseid is set.
--cmid=INTEGER Course module ID for backup. This option is ignored if courseid or courseshortname is set.
--courseshortname=STRING Course shortname for backup.
--destination=STRING Path where to store backup file. If not set the backup
will be stored within the course backup file area.
-h, --help Print out this help.
@@ -78,26 +76,16 @@ if (!empty($dir)) {
}
}
// Check that the course or course module exists.
// Check that the course exists.
if ($options['courseid']) {
$course = $DB->get_record('course', array('id' => $options['courseid']), '*', MUST_EXIST);
} else if ($options['courseshortname']) {
$course = $DB->get_record('course', array('shortname' => $options['courseshortname']), '*', MUST_EXIST);
} else if ($options['cmid']) {
$cm = $DB->get_record('course_modules', ['id' => $options['cmid']], '*', MUST_EXIST);
}
cli_heading('Performing backup...');
if (!empty($course)) {
$bc = new backup_controller(backup::TYPE_1COURSE, $course->id, backup::FORMAT_MOODLE,
backup::INTERACTIVE_YES, backup::MODE_GENERAL, $admin->id);
} else if (!empty($cm)) {
$bc = new backup_controller(backup::TYPE_1ACTIVITY, $cm->id, backup::FORMAT_MOODLE,
backup::INTERACTIVE_YES, backup::MODE_GENERAL, $admin->id);
} else {
throw new \moodle_exception('invalidoption');
}
$bc = new backup_controller(backup::TYPE_1COURSE, $course->id, backup::FORMAT_MOODLE,
backup::INTERACTIVE_YES, backup::MODE_GENERAL, $admin->id);
// Set the default filename.
$format = $bc->get_format();
$type = $bc->get_type();
@@ -125,11 +113,7 @@ if (!empty($dir)) {
}
}
} else {
if (!empty($course)) {
mtrace("Backup completed, the new file is listed in the backup area of the given course");
} else {
mtrace("Backup completed, the new file is listed in the backup area of the given module");
}
mtrace("Backup completed, the new file is listed in the backup area of the given course");
}
$bc->destroy();
exit(0);
+5 -1
View File
@@ -39,6 +39,8 @@ if ($unrecognized) {
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
// TODO: MDL-71421 - Remove the openssl alternative once sodium becomes a requirement in Moodle 4.2.
if ($options['help']) {
echo "Generate secure key
@@ -52,7 +54,9 @@ may be manually installed on multiple servers.
Options:
-h, --help Print out this help
--method <method> Generate key for specified encryption method instead of default (sodium)
--method <method> Generate key for specified encryption method instead of default.
* sodium
* openssl-aes-256-ctr
Example:
php admin/cli/generate_key.php
-132
View File
@@ -1,132 +0,0 @@
<?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/>.
/**
* This script allows to import a course from CLI.
*
* @package core
* @subpackage cli
* @author Tomo Tsuyuki <tomotsuyuki@catalyst-au.net>
* @copyright 2023 Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', 1);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir . '/clilib.php');
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . "/backup/util/includes/restore_includes.php");
list($options, $unrecognized) = cli_get_params([
'srccourseid' => '',
'srccmid' => '',
'dstcourseid' => '',
'showdebugging' => false,
'help' => false,
], [
's' => 'showdebugging',
'h' => 'help',
]);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help'] ||
!(($options['srccourseid'] && $options['dstcourseid'])
|| ($options['srccmid'] && $options['dstcourseid']))) {
$help = <<<EOL
Import course or course module into provided course.
Options:
--srccourseid=INT Source course ID to backup.
--srccmid=INT Source course module ID to backup.
--dstcourseid=INT Destination course ID to restore.
-s, --showdebugging Show developer level debugging information
-h, --help Print out this help.
Example1: (Import from a course into another course)
\$sudo -u www-data /usr/bin/php admin/cli/import.php --srccourseid=12 --dstcourseid=13\n
Example2: (Import from a course module into a course)
\$sudo -u www-data /usr/bin/php admin/cli/import.php --srccmid=21 --dstcourseid=11\n
EOL;
echo $help;
exit(0);
}
if ($options['showdebugging']) {
set_debugging(DEBUG_DEVELOPER, true);
}
if (!$admin = get_admin()) {
throw new \moodle_exception('noadmins');
}
if (!empty($options['srccourseid']) && !empty($options['dstcourseid'])) {
// Import from course into course.
if (!$srccourse = $DB->get_record('course', ['id' => $options['srccourseid']], 'id')) {
throw new \moodle_exception('invalidcourseid');
}
if (!$dstcourse = $DB->get_record('course', ['id' => $options['dstcourseid']], 'id')) {
throw new \moodle_exception('invalidcourseid');
}
cli_heading(get_string('importfromcoursetocourse', 'backup', (object)$options));
$bc = new backup_controller(backup::TYPE_1COURSE, $srccourse->id, backup::FORMAT_MOODLE,
backup::INTERACTIVE_NO, backup::MODE_IMPORT, $admin->id);
$backupid = $bc->get_backupid();
$bc->execute_plan();
$bc->destroy();
cli_heading(get_string('backupthenrestore', 'backup'));
$rc = new restore_controller($backupid, $dstcourse->id, backup::INTERACTIVE_NO,
backup::MODE_SAMESITE, $admin->id, backup::TARGET_EXISTING_ADDING);
$rc->execute_precheck();
$rc->execute_plan();
$rc->destroy();
cli_heading(get_string('restoredcourseid', 'backup', $dstcourse->id));
} else if (!empty($options['srccmid']) && !empty($options['dstcourseid'])) {
// Import from course module into course.
if (!$cm = $DB->get_record('course_modules', ['id' => $options['srccmid']], 'id')) {
throw new \moodle_exception('invalidcoursemoduleid', 'error', '', $options['srccmid']);
}
if (!$course = $DB->get_record('course', ['id' => $options['dstcourseid']], 'id')) {
throw new \moodle_exception('invalidcourseid');
}
cli_heading(get_string('importfromccmidtocourse', 'backup', (object)$options));
$bc = new backup_controller(backup::TYPE_1ACTIVITY, $cm->id, backup::FORMAT_MOODLE,
backup::INTERACTIVE_NO, backup::MODE_IMPORT, $admin->id);
$backupid = $bc->get_backupid();
$bc->execute_plan();
$bc->destroy();
cli_heading(get_string('backupthenrestore', 'backup'));
$rc = new restore_controller($backupid, $course->id, backup::INTERACTIVE_NO,
backup::MODE_SAMESITE, $admin->id, backup::TARGET_EXISTING_ADDING);
$rc->execute_precheck();
$rc->execute_plan();
$rc->destroy();
cli_heading(get_string('restoredcourseid', 'backup', $course->id));
} else {
throw new \moodle_exception('invalidoption');
}
exit(0);
-3
View File
@@ -31,7 +31,6 @@ require_once($CFG->libdir.'/clilib.php');
$longoptions = [
'help' => false,
'muc' => false,
'courses' => false,
'theme' => false,
'lang' => false,
'js' => false,
@@ -56,8 +55,6 @@ all caches will be purged.
Options:
-h, --help Print out this help
--muc Purge all MUC caches (includes lang cache)
--courses Purge all course caches (or only those specified by a comma-separated list).
e.g. --courses=4,67,145
--theme Purge theme cache
--lang Purge language string cache
--js Purge JavaScript cache
+12 -40
View File
@@ -32,13 +32,11 @@ require_once($CFG->dirroot . "/backup/util/includes/restore_includes.php");
list($options, $unrecognized) = cli_get_params([
'file' => '',
'categoryid' => '',
'courseid' => '',
'showdebugging' => false,
'help' => false,
], [
'f' => 'file',
'c' => 'categoryid',
'C' => 'courseid',
's' => 'showdebugging',
'h' => 'help',
]);
@@ -48,17 +46,15 @@ if ($unrecognized) {
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help'] || !($options['file']) || !($options['categoryid'] || $options['courseid'])) {
if ($options['help'] || !($options['file']) || !($options['categoryid'])) {
$help = <<<EOL
Restore backup into provided category or course.
If courseid is set, course module/s will be added into the course.
Restore backup into provided category.
Options:
-f, --file=STRING Path to the backup file.
-c, --categoryid=INT ID of the course category to restore to.
-C, --courseid=INT ID of the course to restore to. This option is ignored if categoryid is set.
-s, --showdebugging Show developer level debugging information
-h, --help Print out this help.
-f, --file=STRING Path to the backup file.
-c, --categoryid=INT ID of the category to restore too.
-s, --showdebugging Show developer level debugging information
-h, --help Print out this help.
Example:
\$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/file.mbz --categoryid=1\n
@@ -80,16 +76,8 @@ if (!file_exists($options['file'])) {
throw new \moodle_exception('filenotfound');
}
if ($options['categoryid']) {
if (!$category = $DB->get_record('course_categories', ['id' => $options['categoryid']], 'id')) {
throw new \moodle_exception('invalidcategoryid');
}
} else if ($options['courseid']) {
if (!$course = $DB->get_record('course', ['id' => $options['courseid']], 'id')) {
throw new \moodle_exception('invalidcourseid');
}
} else {
throw new \moodle_exception('invalidoption');
if (!$category = $DB->get_record('course_categories', ['id' => $options['categoryid']], 'id')) {
throw new \moodle_exception('invalidcategoryid');
}
$backupdir = restore_controller::get_tempdir_name(SITEID, $USER->id);
@@ -104,29 +92,13 @@ try {
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoringcourse', 'backup'),
get_string('restoringcourseshortname', 'backup'));
if (!empty($course)) {
$courseid = $course->id;
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
backup::MODE_GENERAL, $admin->id, backup::TARGET_EXISTING_ADDING);
} else {
$courseid = restore_dbops::create_new_course($fullname, $shortname, $category->id);
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
backup::MODE_GENERAL, $admin->id, backup::TARGET_NEW_COURSE);
}
$courseid = restore_dbops::create_new_course($fullname, $shortname, $category->id);
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
backup::MODE_GENERAL, $admin->id, backup::TARGET_NEW_COURSE);
$rc->execute_precheck();
$rc->execute_plan();
$rc->destroy();
// Rename course name if the backup is from course module and restore to category.
if (empty($course)) {
$course = get_course($courseid);
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoretonewcourse', 'backup'),
get_string('newcourse'));
$course->fullname = $fullname;
$course->shortname = $shortname;
$course->visible = 1;
$DB->update_record('course', $course);
}
} catch (Exception $e) {
cli_heading(get_string('cleaningtempdata'));
fulldelete($path);
+12 -40
View File
@@ -36,8 +36,6 @@ list($options, $unrecognized) = cli_get_params(
'showsql' => false,
'showdebugging' => false,
'force' => false,
'disable' => false,
'enable' => false,
], [
'h' => 'help',
'f' => 'force',
@@ -49,15 +47,11 @@ if ($unrecognized) {
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
$commands = ['list', 'execute', 'disable', 'enable'];
$hascommand = count(array_filter($commands, fn($command) => $options[$command])) > 0;
if ($options['help'] || !$hascommand) {
if ($options['help'] or (!$options['list'] and !$options['execute'])) {
$help =
"Scheduled cron tasks.
Options:
--disable=\\some\\task Disable scheduled task
--enable=\\some\\task Enable scheduled task
--execute=\\some\\task Execute scheduled task manually
--list List all scheduled tasks
--showsql Show sql queries before they are executed
@@ -125,43 +119,17 @@ if ($options['list']) {
exit(0);
}
if (moodle_needs_upgrading()) {
mtrace("Moodle upgrade pending, cannot manage tasks.");
exit(1);
}
if ($disable = $options['disable']) {
if (!$task = \core\task\manager::get_scheduled_task($disable)) {
mtrace("Task '$disable' not found");
exit(1);
}
try {
$task->disable();
mtrace("Disabled '$disable'");
} catch (Exception $e) {
mtrace("$e->getMessage()");
exit(1);
}
} else if ($enable = $options['enable']) {
if (!$task = \core\task\manager::get_scheduled_task($enable)) {
mtrace("Task '$enable' not found");
exit(1);
}
try {
$task->enable();
mtrace("Enabled '$enable'");
} catch (Exception $e) {
mtrace("$e->getMessage()");
exit(1);
}
} else if ($execute = $options['execute']) {
if ($execute = $options['execute']) {
if (!$task = \core\task\manager::get_scheduled_task($execute)) {
mtrace("Task '$execute' not found");
exit(1);
}
if (moodle_needs_upgrading()) {
mtrace("Moodle upgrade pending, cannot execute tasks.");
exit(1);
}
if (!get_config('core', 'cron_enabled') && !$options['force']) {
mtrace('Cron is disabled. Use --force to override.');
exit(1);
@@ -189,7 +157,11 @@ if ($disable = $options['disable']) {
}
$task->set_lock($lock);
$cronlock->release();
if (!$task->is_blocking()) {
$cronlock->release();
} else {
$task->set_cron_lock($cronlock);
}
\core\cron::run_inner_scheduled_task($task);
}
-65
View File
@@ -1,65 +0,0 @@
<?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/>.
/**
* Communication and its plugins settings.
*
* @package core
* @subpackage communication
* @copyright 2023 Huong Nguyen <huongnv13@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../config.php');
require_once($CFG->libdir . '/adminlib.php');
$action = required_param('action', PARAM_ALPHANUMEXT);
$name = required_param('name', PARAM_PLUGIN);
$syscontext = context_system::instance();
$PAGE->set_url('/admin/communication.php');
$PAGE->set_context($syscontext);
require_admin();
require_sesskey();
$return = new moodle_url('/admin/settings.php', ['section' => 'managecommunicationproviders']);
$plugins = core_plugin_manager::instance()->get_plugins_of_type('communication');
$sortorder = array_flip(array_keys($plugins));
if (!isset($plugins[$name])) {
throw new moodle_exception('communicationprovidernotfound', 'core_communication', $return, $name);
}
$plugintypename = $plugins[$name]->type . '_' . $plugins[$name]->name;
switch ($action) {
case 'disable':
if ($plugins[$name]->is_enabled()) {
$class = core_plugin_manager::resolve_plugininfo_class('communication');
$class::enable_plugin($name, false);
}
break;
case 'enable':
if (!$plugins[$name]->is_enabled()) {
$class = core_plugin_manager::resolve_plugininfo_class('communication');
$class::enable_plugin($name, true);
}
break;
}
redirect($return);
+195
View File
@@ -4508,4 +4508,199 @@
</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>
-41
View File
@@ -1,41 +0,0 @@
<?php
// This file is part of Moodle - https://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 <https://www.gnu.org/licenses/>.
/**
* Hooks overview page.
*
* @package core
* @author Petr Skoda
* @copyright 2022 Open LMS
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/tablelib.php');
admin_externalpage_setup('hooksoverview');
require_capability('moodle/site:config', \core\context\system::instance());
$hookmanager = \core\di::get(\core\hook\manager::class);
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('hooksoverview', 'core_admin'));
$table = new \core_admin\table\hook_list_table();
$table->out();
echo $OUTPUT->footer();
+3 -1
View File
@@ -301,12 +301,14 @@ class helper {
// Set Activity chooser tabs to the default value ("Starred, Recommended, All, Activities, Resources").
static::add_item($presetid, 'activitychoosertabmode', '3');
// Modules: Enable database, external tool (lti), IMS content package (imscp), lesson, SCORM, wiki, workshop.
// Modules: Enable chat, database, external tool (lti), IMS content package (imscp), lesson, SCORM, survey, wiki, workshop.
static::add_plugin($presetid, 'mod', 'chat', true);
static::add_plugin($presetid, 'mod', 'data', true);
static::add_plugin($presetid, 'mod', 'lti', true);
static::add_plugin($presetid, 'mod', 'imscp', true);
static::add_plugin($presetid, 'mod', 'lesson', true);
static::add_plugin($presetid, 'mod', 'scorm', true);
static::add_plugin($presetid, 'mod', 'survey', true);
static::add_plugin($presetid, 'mod', 'wiki', true);
static::add_plugin($presetid, 'mod', 'workshop', true);
@@ -19,8 +19,6 @@ namespace core_adminpresets\local\setting;
/**
* Reimplementation to allow human friendly view of the selected regexps.
*
* @deprecated Moodle 4.3 MDL-78468 - No longer used since the devicedetectregex was removed.
* @todo Final deprecation on Moodle 4.7 MDL-79052
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
@@ -28,16 +26,7 @@ namespace core_adminpresets\local\setting;
*/
class adminpresets_admin_setting_devicedetectregex extends adminpresets_admin_setting_configtext {
/**
* @deprecated Moodle 4.3 MDL-78468 - No longer used since the devicedetectregex was removed.
* @todo Final deprecation on Moodle 4.7 MDL-79052
*/
public function set_visiblevalue() {
debugging(
__FUNCTION__ . '() is deprecated.' .
'All functions associated with devicedetectregex theme setting are being removed.',
DEBUG_DEVELOPER
);
$values = json_decode($this->get_value());
if (!$values) {
+2 -2
View File
@@ -41,7 +41,7 @@ class provider implements
* @param collection $collection A list of information about this component
* @return collection The collection object filled out with information about this component.
*/
public static function get_metadata(collection $collection): collection {
public static function get_metadata(collection $collection) : collection {
// These tables are really data about site configuration and not user data.
// The adminpresets includes information about which user performed a configuration change using the admin_presets
@@ -74,7 +74,7 @@ class provider implements
* @param int $userid The user to search.
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
*/
public static function get_contexts_for_userid(int $userid): contextlist {
public static function get_contexts_for_userid(int $userid) : contextlist {
return new contextlist();
}
+2
View File
@@ -227,6 +227,7 @@ class core_adminpresets_generator extends \component_generator_base {
public function access_protected($object, string $property) {
$reflection = new ReflectionClass($object);
$property = $reflection->getProperty($property);
$property->setAccessible(true);
return $property->getValue($object);
}
@@ -243,6 +244,7 @@ class core_adminpresets_generator extends \component_generator_base {
// Set method accessibility.
$method = new ReflectionMethod(manager::class, 'get_setting');
$method->setAccessible(true);
// Get the proper adminpresets_setting instance.
$settingpage = $adminroot->locate($category);
+1 -1
View File
@@ -344,7 +344,7 @@ class helper_test extends \advanced_testcase {
],
'plugins' => [
'assign' => 1,
'book' => 1,
'chat' => 1,
'data' => 1,
'lesson' => 1,
],
-8
View File
@@ -29,14 +29,6 @@ use stdClass;
* @coversDefaultClass \core_adminpresets\manager
*/
class manager_test extends \advanced_testcase {
/**
* Include required libraries.
*/
public static function setUpBeforeClass(): void {
global $CFG;
require_once($CFG->libdir.'/adminlib.php');
}
/**
* Test the behaviour of protected get_site_settings method.
*
+4 -4
View File
@@ -27,8 +27,7 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
use core\event\qbank_plugin_enabled;
use core\event\qbank_plugin_disabled;
use qbank_columnsortorder\column_manager;
$action = required_param('action', PARAM_ALPHANUMEXT);
$name = required_param('name', PARAM_PLUGIN);
@@ -50,11 +49,12 @@ if (!isset($plugins[$name])) {
}
$plugintypename = $plugins[$name]->type . '_' . $plugins[$name]->name;
$columnsortordermanager = new column_manager();
switch ($action) {
case 'disable':
if ($plugins[$name]->is_enabled()) {
qbank_plugin_disabled::create_for_plugin($plugintypename)->trigger();
$columnsortordermanager->disable_columns($plugintypename);
$class = \core_plugin_manager::resolve_plugininfo_class('qbank');
$class::enable_plugin($name, false);
set_config('disabled', 1, 'qbank_'. $name);
@@ -62,7 +62,7 @@ switch ($action) {
break;
case 'enable':
if (!$plugins[$name]->is_enabled()) {
qbank_plugin_enabled::create_for_plugin($plugintypename)->trigger();
$columnsortordermanager->enable_columns($plugintypename);
$class = \core_plugin_manager::resolve_plugininfo_class('qbank');
$class::enable_plugin($name, true);
}
+28 -43
View File
@@ -617,7 +617,7 @@ class core_admin_renderer extends plugin_renderer_base {
* @param bool $croninfrequent
* @return string HTML to output.
*/
public function cron_infrequent_warning(bool $croninfrequent): string {
public function cron_infrequent_warning(bool $croninfrequent) : string {
global $CFG;
if (!$croninfrequent) {
@@ -1111,11 +1111,10 @@ class core_admin_renderer extends plugin_renderer_base {
if ($isstandard = $plugin->is_standard()) {
$row->attributes['class'] .= ' standard';
$sourcelabel = html_writer::span(get_string('sourcestd', 'core_plugin'),
'sourcetext badge bg-secondary text-dark');
$sourcelabel = html_writer::span(get_string('sourcestd', 'core_plugin'), 'sourcetext badge badge-secondary');
} else {
$row->attributes['class'] .= ' extension';
$sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext badge bg-info text-white');
$sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext badge badge-info');
}
$coredependency = $plugin->is_core_dependency_satisfied($version);
@@ -1129,19 +1128,19 @@ class core_admin_renderer extends plugin_renderer_base {
$statusclass = 'statustext badge ';
switch ($statuscode) {
case core_plugin_manager::PLUGIN_STATUS_NEW:
$statusclass .= $dependenciesok ? 'bg-success text-white' : 'bg-warning text-dark';
$statusclass .= $dependenciesok ? 'badge-success' : 'badge-warning';
break;
case core_plugin_manager::PLUGIN_STATUS_UPGRADE:
$statusclass .= $dependenciesok ? 'bg-info text-white' : 'bg-warning text-dark';
$statusclass .= $dependenciesok ? 'badge-info' : 'badge-warning';
break;
case core_plugin_manager::PLUGIN_STATUS_MISSING:
case core_plugin_manager::PLUGIN_STATUS_DOWNGRADE:
case core_plugin_manager::PLUGIN_STATUS_DELETE:
$statusclass .= 'bg-danger text-white';
$statusclass .= 'badge-danger';
break;
case core_plugin_manager::PLUGIN_STATUS_NODB:
case core_plugin_manager::PLUGIN_STATUS_UPTODATE:
$statusclass .= $dependenciesok ? 'bg-light text-dark' : 'bg-warning text-dark';
$statusclass .= $dependenciesok ? 'badge-light' : 'badge-warning';
break;
}
$status = html_writer::span(get_string('status_' . $statuscode, 'core_plugin'), $statusclass);
@@ -1264,11 +1263,11 @@ class core_admin_renderer extends plugin_renderer_base {
}
$out .= html_writer::div(html_writer::link(new moodle_url($this->page->url, array('showallplugins' => 0)),
get_string('plugincheckattention', 'core_plugin')).' '.html_writer::span($sumattention, 'badge bg-light text-dark'),
get_string('plugincheckattention', 'core_plugin')).' '.html_writer::span($sumattention, 'badge badge-light'),
'btn btn-link mr-1');
$out .= html_writer::div(html_writer::link(new moodle_url($this->page->url, array('showallplugins' => 1)),
get_string('plugincheckall', 'core_plugin')).' '.html_writer::span($sumtotal, 'badge bg-light text-dark'),
get_string('plugincheckall', 'core_plugin')).' '.html_writer::span($sumtotal, 'badge badge-light'),
'btn btn-link mr-1');
$out .= $this->output->container_end(); // End of .actions container.
@@ -1421,9 +1420,9 @@ class core_admin_renderer extends plugin_renderer_base {
$supportedmoodles = array();
foreach ($plugin->version->supportedmoodles as $moodle) {
if ($CFG->branch == str_replace('.', '', $moodle->release)) {
$supportedmoodles[] = html_writer::span($moodle->release, 'badge bg-success text-white');
$supportedmoodles[] = html_writer::span($moodle->release, 'badge badge-success');
} else {
$supportedmoodles[] = html_writer::span($moodle->release, 'badge bg-light text-dark');
$supportedmoodles[] = html_writer::span($moodle->release, 'badge badge-light');
}
}
@@ -1529,7 +1528,7 @@ class core_admin_renderer extends plugin_renderer_base {
$label = '';
} else {
$class = 'requires-failed';
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge bg-danger text-white');
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger');
}
if ($branch != null && !$plugin->is_core_compatible_satisfied($branch)) {
@@ -1558,10 +1557,8 @@ class core_admin_renderer extends plugin_renderer_base {
} else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_MISSING) {
if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) {
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'),
'badge bg-warning text-dark');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'),
'badge bg-warning text-dark');
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning');
$class = 'requires-failed requires-missing requires-available';
$actions[] = html_writer::link(
new moodle_url('https://moodle.org/plugins/view.php', array('plugin' => $reqname)),
@@ -1569,25 +1566,24 @@ class core_admin_renderer extends plugin_renderer_base {
);
} else {
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge bg-danger text-white');
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-danger');
$label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'),
'badge bg-danger text-white');
'badge badge-danger');
$class = 'requires-failed requires-missing requires-unavailable';
}
$displayuploadlink = true;
} else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_OUTDATED) {
if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) {
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge bg-warning text-dark');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'),
'badge bg-warning text-dark');
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning');
$class = 'requires-failed requires-outdated requires-available';
$displayupdateslink = true;
} else {
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge bg-danger text-white');
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger');
$label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'),
'badge bg-danger text-white');
'badge badge-danger');
$class = 'requires-failed requires-outdated requires-unavailable';
}
$displayuploadlink = true;
@@ -1697,7 +1693,7 @@ class core_admin_renderer extends plugin_renderer_base {
new moodle_url($this->page->url, array('contribonly' => 0, 'updatesonly' => 1)),
get_string('overviewupdatable', 'core_plugin'),
array('title' => get_string('filterupdatesonly', 'core_plugin'))
).' '.html_writer::span($numupdatable, 'badge bg-info text-white number number-updatable');
).' '.html_writer::span($numupdatable, 'badge badge-info number number-updatable');
} else {
// No updates, or the notifications disabled.
$infoupdatable = '';
@@ -1872,13 +1868,13 @@ class core_admin_renderer extends plugin_renderer_base {
$source = '';
} else {
$row->attributes['class'] .= ' extension';
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge bg-info text-white');
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge badge-info');
}
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge bg-danger text-white');
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge badge-danger');
} else if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) {
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge bg-success text-white');
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge badge-success');
} else {
$msg = '';
}
@@ -2120,13 +2116,13 @@ class core_admin_renderer extends plugin_renderer_base {
// Format error or warning line
if ($errorline) {
$messagetype = 'error';
$statusclass = 'bg-danger text-white';
$statusclass = 'badge-danger';
} else if ($warningline) {
$messagetype = 'warn';
$statusclass = 'bg-warning text-dark';
$statusclass = 'badge-warning';
} else {
$messagetype = 'ok';
$statusclass = 'bg-success text-white';
$statusclass = 'badge-success';
}
$status = html_writer::span($status, 'badge ' . $statusclass);
// Here we'll store all the feedback found
@@ -2210,7 +2206,7 @@ class core_admin_renderer extends plugin_renderer_base {
$out = format_text(get_string('registerwithmoodleorginfo', 'core_hub'), FORMAT_MARKDOWN);
$out .= html_writer::link(
MOODLE_PRODUCTURL.'/solutions/moodle-app/',
new moodle_url('/admin/settings.php', ['section' => 'moodleservices']),
$this->output->pix_icon('i/info', '').' '.get_string('registerwithmoodleorginfoapp', 'core_hub'),
['class' => 'btn btn-link', 'role' => 'opener', 'target' => '_href']
);
@@ -2260,15 +2256,4 @@ class core_admin_renderer extends plugin_renderer_base {
return $this->warning($xmlrpcwarning);
}
/**
* Renders the theme selector list.
*
* @param core_admin\output\theme_selector $themeselector
* @return string HTML
*/
public function theme_selector_list(core_admin\output\theme_selector $themeselector): string {
$renderable = $themeselector->export_for_template($this);
return $this->render_from_template('core_admin/themeselector/theme_selector', $renderable);
}
}
+4 -1
View File
@@ -44,7 +44,10 @@ if (array_key_exists('siteadmins', $CFG->config_php_settings)) {
echo $OUTPUT->heading(get_string('manageadmins', 'core_role'), 3);
echo $OUTPUT->notification(get_string('siteadministratorsconfigphp', 'core_role'), \core\output\notification::NOTIFY_INFO);
echo $OUTPUT->box_start();
echo $OUTPUT->paragraph(get_string('existingadmins', 'core_role'));
echo html_writer::tag(
'p',
get_string('existingadmins', 'core_role'),
);
$admisselector->display();
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
+3 -3
View File
@@ -99,7 +99,7 @@ abstract class core_role_allow_role_page {
* @param int $fromroleid
* @param int $targetroleid
*/
abstract protected function set_allow($fromroleid, $targetroleid);
protected abstract function set_allow($fromroleid, $targetroleid);
/**
* Load the current allows from the database.
@@ -183,11 +183,11 @@ abstract class core_role_allow_role_page {
* Snippet of text displayed above the table, telling the admin what to do.
* @return string
*/
abstract public function get_intro_text();
public abstract function get_intro_text();
/**
* Returns the allow class respective event class name.
* @return string
*/
abstract protected function get_eventclass();
protected abstract function get_eventclass();
}
@@ -142,12 +142,12 @@ abstract class core_role_capability_table_base {
/**
* For subclasses to override, output header cells, after the initial capability one.
*/
abstract protected function add_header_cells();
protected abstract function add_header_cells();
/**
* For subclasses to override, return the number of cells that add_header_cells/add_row_cells output.
*/
abstract protected function num_extra_columns();
protected abstract function num_extra_columns();
/**
* For subclasses to override. Allows certain capabilties
@@ -191,5 +191,5 @@ abstract class core_role_capability_table_base {
* @param stdClass $capability the capability this row relates to.
* @return string html of row cells
*/
abstract protected function add_row_cells($capability);
protected abstract function add_row_cells($capability);
}
@@ -84,7 +84,7 @@ abstract class core_role_capability_table_with_risks extends core_role_capabilit
}
}
abstract protected function load_parent_permissions();
protected abstract function load_parent_permissions();
/**
* Update $this->permissions based on submitted data, while making a list of
@@ -156,7 +156,7 @@ abstract class core_role_capability_table_with_risks extends core_role_capabilit
return $rowclasses;
}
abstract protected function add_permission_cells($capability);
protected abstract function add_permission_cells($capability);
protected function add_row_cells($capability) {
$cells = $this->add_permission_cells($capability);
@@ -645,7 +645,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
protected function print_field($name, $caption, $field, $helpicon = null) {
global $OUTPUT;
// Attempt to generate HTML like formslib.
echo '<div class="fitem row mb-3">';
echo '<div class="fitem row form-group">';
echo '<div class="fitemtitle col-md-3">';
if ($name) {
echo '<label for="' . $name . '">';
@@ -663,7 +663,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
} else {
$extraclass = '';
}
echo '<div class="felement col-md-9 d-flex flex-wrap align-items-center' . $extraclass . '">';
echo '<div class="felement col-md-9 form-inline' . $extraclass . '">';
echo $field;
if (isset($this->errors[$name])) {
echo $OUTPUT->error_text($this->errors[$name]);
+2 -2
View File
@@ -53,7 +53,7 @@ class provider implements
* @param collection $collection An object for storing metadata.
* @return collection The metadata.
*/
public static function get_metadata(collection $collection): collection {
public static function get_metadata(collection $collection) : collection {
$rolecapabilities = [
'roleid' => 'privacy:metadata:role_capabilities:roleid',
'capability' => 'privacy:metadata:role_capabilities:capability',
@@ -100,7 +100,7 @@ class provider implements
* @param int $userid The user ID.
* @return contextlist The list of context IDs.
*/
public static function get_contexts_for_userid(int $userid): contextlist {
public static function get_contexts_for_userid(int $userid) : contextlist {
global $DB;
$contextlist = new contextlist();
@@ -1,124 +0,0 @@
<?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/>.
declare(strict_types=1);
namespace core_role\reportbuilder\datasource;
use core\reportbuilder\local\entities\context;
use core_reportbuilder\datasource;
use core_reportbuilder\local\entities\user;
use core_role\reportbuilder\local\entities\{role, role_assignment};
/**
* Roles datasource
*
* @package core_role
* @copyright 2024 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class roles extends datasource {
/**
* Return user friendly name of the report source
*
* @return string
*/
public static function get_name(): string {
return get_string('roles', 'core_role');
}
/**
* Initialise report
*/
protected function initialise(): void {
$contextentity = new context();
$contextalias = $contextentity->get_table_alias('context');
$roleentity = new role();
$rolealias = $roleentity->get_table_alias('role');
// Role table.
$this->add_entity($roleentity->set_table_alias('context', $contextalias));
$this->set_main_table('role', $rolealias);
// Join role assignments.
$roleassignmententity = new role_assignment();
$roleassignmentalias = $roleassignmententity->get_table_alias('role_assignments');
$this->add_entity($roleassignmententity);
$this->add_join("JOIN {role_assignments} {$roleassignmentalias} ON {$roleassignmentalias}.roleid = {$rolealias}.id");
// Join context.
$this->add_entity($contextentity);
$this->add_join("LEFT JOIN {context} {$contextalias} ON {$contextalias}.id = {$roleassignmentalias}.contextid");
// Join user.
$userentity = new user();
$useralias = $userentity->get_table_alias('user');
$this->add_entity($userentity
->add_join("LEFT JOIN {user} {$useralias} ON {$useralias}.id = {$roleassignmentalias}.userid"));
$this->add_all_from_entities();
}
/**
* Return the columns that will be added to the report upon creation
*
* @return string[]
*/
public function get_default_columns(): array {
return [
'context:link',
'role:originalname',
'user:fullnamewithlink',
];
}
/**
* Return the column sorting that will be added to the report upon creation
*
* @return int[]
*/
public function get_default_column_sorting(): array {
return [
'context:link' => SORT_ASC,
'role:originalname' => SORT_ASC,
'user:fullnamewithlink' => SORT_ASC,
];
}
/**
* Return the filters that will be added to the report upon creation
*
* @return string[]
*/
public function get_default_filters(): array {
return [
'context:level',
'role:name',
'user:fullname',
];
}
/**
* Return the conditions that will be added to the report upon creation
*
* @return string[]
*/
public function get_default_conditions(): array {
return [];
}
}
@@ -1,203 +0,0 @@
<?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/>.
declare(strict_types=1);
namespace core_role\reportbuilder\local\entities;
use context;
use context_helper;
use lang_string;
use stdClass;
use core_reportbuilder\local\entities\base;
use core_reportbuilder\local\filters\select;
use core_reportbuilder\local\report\{column, filter};
/**
* Role entity
*
* @package core_role
* @copyright 2023 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class role extends base {
/**
* Database tables that this entity uses
*
* @return string[]
*/
protected function get_default_tables(): array {
return [
'context',
'role',
];
}
/**
* The default title for this entity
*
* @return lang_string
*/
protected function get_default_entity_title(): lang_string {
return new lang_string('role');
}
/**
* Initialise the entity
*
* @return base
*/
public function initialise(): base {
$columns = $this->get_all_columns();
foreach ($columns as $column) {
$this->add_column($column);
}
// All the filters defined by the entity can also be used as conditions.
$filters = $this->get_all_filters();
foreach ($filters as $filter) {
$this
->add_filter($filter)
->add_condition($filter);
}
return $this;
}
/**
* Returns list of all available columns
*
* @return column[]
*/
protected function get_all_columns(): array {
global $DB;
$contextalias = $this->get_table_alias('context');
$rolealias = $this->get_table_alias('role');
// Name column.
$columns[] = (new column(
'name',
new lang_string('rolefullname', 'core_role'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_fields("{$rolealias}.name, {$rolealias}.shortname, {$rolealias}.id, {$contextalias}.id AS contextid")
->add_fields(context_helper::get_preload_record_columns_sql($contextalias))
// The sorting is on name, unless empty (determined by single space - thanks Oracle) then we use shortname.
->set_is_sortable(true, [
"CASE WHEN " . $DB->sql_concat("{$rolealias}.name", "' '") . " = ' '
THEN {$rolealias}.shortname
ELSE {$rolealias}.name
END",
])
->set_callback(static function($name, stdClass $role): string {
if ($name === null) {
return '';
}
context_helper::preload_from_record($role);
$context = context::instance_by_id($role->contextid);
return role_get_name($role, $context, ROLENAME_BOTH);
});
// Original name column.
$columns[] = (new column(
'originalname',
new lang_string('roleoriginalname', 'core_role'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_fields("{$rolealias}.name, {$rolealias}.shortname")
// The sorting is on name, unless empty (determined by single space - thanks Oracle) then we use shortname.
->set_is_sortable(true, [
"CASE WHEN " . $DB->sql_concat("{$rolealias}.name", "' '") . " = ' '
THEN {$rolealias}.shortname
ELSE {$rolealias}.name
END",
])
->set_callback(static function($name, stdClass $role): string {
if ($name === null) {
return '';
}
return role_get_name($role, null, ROLENAME_ORIGINAL);
});
// Short name column.
$columns[] = (new column(
'shortname',
new lang_string('roleshortname', 'core_role'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_fields("{$rolealias}.shortname")
->set_is_sortable(true);
// Description column.
$descriptionfieldsql = "{$rolealias}.description";
if ($DB->get_dbfamily() === 'oracle') {
$descriptionfieldsql = $DB->sql_order_by_text($descriptionfieldsql, 1024);
}
$columns[] = (new column(
'description',
new lang_string('description'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_LONGTEXT)
->add_field($descriptionfieldsql, 'description')
->add_field("{$rolealias}.shortname")
->set_callback(static function($description, stdClass $role): string {
if ($description === null) {
return '';
}
return role_get_description($role);
});
return $columns;
}
/**
* Return list of all available filters
*
* @return filter[]
*/
protected function get_all_filters(): array {
$rolealias = $this->get_table_alias('role');
// Name filter.
$filters[] = (new filter(
select::class,
'name',
new lang_string('rolefullname', 'core_role'),
$this->get_entity_name(),
"{$rolealias}.id"
))
->add_joins($this->get_joins())
->set_options_callback(static function(): array {
return role_get_names(null, ROLENAME_ORIGINAL, true);
});
return $filters;
}
}
@@ -1,143 +0,0 @@
<?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/>.
declare(strict_types=1);
namespace core_role\reportbuilder\local\entities;
use lang_string;
use core_reportbuilder\local\entities\base;
use core_reportbuilder\local\filters\date;
use core_reportbuilder\local\helpers\format;
use core_reportbuilder\local\report\{column, filter};
/**
* Role assignment entity
*
* @package core_role
* @copyright 2024 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class role_assignment extends base {
/**
* Database tables that this entity uses
*
* @return string[]
*/
protected function get_default_tables(): array {
return [
'role_assignments',
];
}
/**
* The default title for this entity
*
* @return lang_string
*/
protected function get_default_entity_title(): lang_string {
return new lang_string('roleassignment', 'core_role');
}
/**
* Initialise the entity
*
* @return base
*/
public function initialise(): base {
$columns = $this->get_all_columns();
foreach ($columns as $column) {
$this->add_column($column);
}
// All the filters defined by the entity can also be used as conditions.
$filters = $this->get_all_filters();
foreach ($filters as $filter) {
$this
->add_filter($filter)
->add_condition($filter);
}
return $this;
}
/**
* Returns list of all available columns
*
* @return column[]
*/
protected function get_all_columns(): array {
$raalias = $this->get_table_alias('role_assignments');
// Time modified column.
$columns[] = (new column(
'timemodified',
new lang_string('timemodified', 'core_reportbuilder'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TIMESTAMP)
->add_field("{$raalias}.timemodified")
->set_is_sortable(true)
->set_callback([format::class, 'userdate']);
// Component column.
$columns[] = (new column(
'component',
new lang_string('plugin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("{$raalias}.component")
->set_is_sortable(true);
// Item ID column.
$columns[] = (new column(
'itemid',
new lang_string('pluginitemid'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_field("{$raalias}.itemid")
->set_is_sortable(true);
return $columns;
}
/**
* Return list of all available filters
*
* @return filter[]
*/
protected function get_all_filters(): array {
$raalias = $this->get_table_alias('role_assignments');
// Time modified filter.
$filters[] = (new filter(
date::class,
'timemodified',
new lang_string('timemodified', 'core_reportbuilder'),
$this->get_entity_name(),
"{$raalias}.timemodified"
))
->add_joins($this->get_joins());
return $filters;
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ M.core_role.init_cap_table_filter = function(Y, tableid, contextid) {
this.table = Y.one('#'+this.tableid);
// Create a div to hold the search UI.
this.div = Y.Node.create('<div class="capabilitysearchui d-flex flex-wrap align-items-center"></div>').setStyles({
this.div = Y.Node.create('<div class="capabilitysearchui form-inline"></div>').setStyles({
width : this.table.get('offsetWidth'),
marginLeft : 'auto',
marginRight : 'auto'
@@ -1,239 +0,0 @@
<?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/>.
declare(strict_types=1);
namespace core_role\reportbuilder\datasource;
use core\context\course;
use core_reportbuilder_generator;
use core_reportbuilder_testcase;
use core_reportbuilder\local\filters\{date, select, text};
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php");
/**
* Unit tests for roles datasource
*
* @package core_role
* @covers \core_role\reportbuilder\datasource\roles;
* @copyright 2024 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
final class roles_test extends core_reportbuilder_testcase {
/**
* Test default datasource
*/
public function test_datasource_default(): void {
$this->resetAfterTest();
$course = $this->getDataGenerator()->create_course();
$context = course::instance($course->id);
$studentone = $this->getDataGenerator()->create_and_enrol($course, 'student', ['firstname' => 'Zoe']);
$studenttwo = $this->getDataGenerator()->create_and_enrol($course, 'student', ['firstname' => 'Amy']);
$manager = $this->getDataGenerator()->create_and_enrol($course, 'manager');
/** @var core_reportbuilder_generator $generator */
$generator = $this->getDataGenerator()->get_plugin_generator('core_reportbuilder');
$report = $generator->create_report(['name' => 'Roles', 'source' => roles::class, 'default' => 1]);
$content = $this->get_custom_report_content($report->get('id'));
$this->assertCount(3, $content);
// Default columns are context link, original role name and user link. Sorted by each.
[$contextlink, $rolename, $userlink] = array_values($content[0]);
$this->assertStringContainsString($context->get_context_name(), $contextlink);
$this->assertEquals('Manager', $rolename);
$this->assertStringContainsString(fullname($manager), $userlink);
[$contextlink, $rolename, $userlink] = array_values($content[1]);
$this->assertStringContainsString($context->get_context_name(), $contextlink);
$this->assertEquals('Student', $rolename);
$this->assertStringContainsString(fullname($studenttwo), $userlink);
[$contextlink, $rolename, $userlink] = array_values($content[2]);
$this->assertStringContainsString($context->get_context_name(), $contextlink);
$this->assertEquals('Student', $rolename);
$this->assertStringContainsString(fullname($studentone), $userlink);
}
/**
* Test datasource columns that aren't added by default
*/
public function test_datasource_non_default_columns(): void {
global $DB;
$this->resetAfterTest();
$course = $this->getDataGenerator()->create_course();
$context = course::instance($course->id);
// Create an alias for our role.
$roleid = $DB->get_field('role', 'id', ['shortname' => 'manager']);
$DB->insert_record('role_names', (object) [
'contextid' => $context->id,
'roleid' => $roleid,
'name' => 'Moocher',
]);
$manager = $this->getDataGenerator()->create_user();
$this->getDataGenerator()->enrol_user($manager->id, $course->id, $roleid);
/** @var core_reportbuilder_generator $generator */
$generator = $this->getDataGenerator()->get_plugin_generator('core_reportbuilder');
$report = $generator->create_report(['name' => 'Roles', 'source' => roles::class, 'default' => 0]);
// Role.
$generator->create_column(['reportid' => $report->get('id'), 'uniqueidentifier' => 'role:name']);
$generator->create_column(['reportid' => $report->get('id'), 'uniqueidentifier' => 'role:shortname']);
$generator->create_column(['reportid' => $report->get('id'), 'uniqueidentifier' => 'role:description']);
// Role assignment.
$generator->create_column(['reportid' => $report->get('id'), 'uniqueidentifier' => 'role_assignment:timemodified']);
$generator->create_column(['reportid' => $report->get('id'), 'uniqueidentifier' => 'role_assignment:component']);
$generator->create_column(['reportid' => $report->get('id'), 'uniqueidentifier' => 'role_assignment:itemid']);
$content = $this->get_custom_report_content($report->get('id'));
$this->assertCount(1, $content);
[$rolename, $roleshortname, $roledescription, $timemodified, $component, $itemid] = array_values($content[0]);
// Role.
$this->assertEquals('Moocher (Manager)', $rolename);
$this->assertEquals('manager', $roleshortname);
$this->assertEquals('Managers can access courses and modify them, but usually do not participate in them.',
$roledescription);
// Role assignment.
$this->assertNotEmpty($timemodified);
$this->assertEquals('', $component);
$this->assertEquals(0, $itemid);
}
/**
* Data provider for {@see test_datasource_filters}
*
* @return array[]
*/
public static function datasource_filters_provider(): array {
global $DB;
return [
// Role.
'Filter role name' => ['role:name', [
'role:name_operator' => select::EQUAL_TO,
'role:name_value' => $DB->get_field('role', 'id', ['shortname' => 'student']),
], true],
'Filter role name (no match)' => ['role:name', [
'role:name_operator' => select::EQUAL_TO,
'role:name_value' => -1,
], false],
// Role assignment.
'Filter role assignment time modified' => ['role_assignment:timemodified', [
'role_assignment:timemodified_operator' => date::DATE_RANGE,
'role_assignment:timemodified_from' => 1622502000,
], true],
'Filter role assignment time modified (no match)' => ['role_assignment:timemodified', [
'role_assignment:timemodified_operator' => date::DATE_RANGE,
'role_assignment:timemodified_to' => 1622502000,
], false],
// Context.
'Filter context level' => ['context:level', [
'context:level_operator' => select::EQUAL_TO,
'context:level_value' => CONTEXT_COURSE,
], true],
'Filter context level (no match)' => ['context:level', [
'context:level_operator' => select::EQUAL_TO,
'context:level_value' => CONTEXT_COURSECAT,
], false],
// User.
'Filter user firstname' => ['user:firstname', [
'user:firstname_operator' => text::IS_EQUAL_TO,
'user:firstname_value' => 'Zoe',
], true],
'Filter user firstname (no match)' => ['user:firstname', [
'user:firstname_operator' => text::IS_EQUAL_TO,
'user:firstname_value' => 'Amy',
], false],
];
}
/**
* Test datasource filters
*
* @param string $filtername
* @param array $filtervalues
* @param bool $expectmatch
*
* @dataProvider datasource_filters_provider
*/
public function test_datasource_filters(
string $filtername,
array $filtervalues,
bool $expectmatch,
): void {
$this->resetAfterTest();
$course = $this->getDataGenerator()->create_course();
$this->getDataGenerator()->create_and_enrol($course, 'student', ['firstname' => 'Zoe']);
/** @var core_reportbuilder_generator $generator */
$generator = $this->getDataGenerator()->get_plugin_generator('core_reportbuilder');
// Create report containing single column, and given filter.
$report = $generator->create_report(['name' => 'Roles', 'source' => roles::class, 'default' => 0]);
$generator->create_column(['reportid' => $report->get('id'), 'uniqueidentifier' => 'role:shortname']);
// Add filter, set it's values.
$generator->create_filter(['reportid' => $report->get('id'), 'uniqueidentifier' => $filtername]);
$content = $this->get_custom_report_content($report->get('id'), 0, $filtervalues);
if ($expectmatch) {
$this->assertCount(1, $content);
$this->assertEquals('student', reset($content[0]));
} else {
$this->assertEmpty($content);
}
}
/**
* Stress test datasource
*
* In order to execute this test PHPUNIT_LONGTEST should be defined as true in phpunit.xml or directly in config.php
*/
public function test_stress_datasource(): void {
if (!PHPUNIT_LONGTEST) {
$this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
}
$this->resetAfterTest();
$course = $this->getDataGenerator()->create_course();
$this->getDataGenerator()->create_and_enrol($course);
$this->datasource_stress_test_columns(roles::class);
$this->datasource_stress_test_columns_aggregation(roles::class);
$this->datasource_stress_test_conditions(roles::class, 'role:shortname');
}
}
+58 -83
View File
@@ -8,6 +8,61 @@ $capabilities = array(
);
if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themes')));
// "themesettings" settingpage
$temp = new admin_settingpage('themesettings', new lang_string('themesettings', 'admin'));
$setting = new admin_setting_configtext('themelist', new lang_string('themelist', 'admin'),
new lang_string('configthemelist', 'admin'), '', PARAM_NOTAGS);
$setting->set_force_ltr(true);
$temp->add($setting);
$setting = new admin_setting_configcheckbox('themedesignermode', new lang_string('themedesignermode', 'admin'), new lang_string('configthemedesignermode', 'admin'), 0);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
$temp->add(new admin_setting_configcheckbox('allowuserthemes', new lang_string('allowuserthemes', 'admin'), new lang_string('configallowuserthemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcoursethemes', new lang_string('allowcoursethemes', 'admin'), new lang_string('configallowcoursethemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcategorythemes', new lang_string('allowcategorythemes', 'admin'), new lang_string('configallowcategorythemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcohortthemes', new lang_string('allowcohortthemes', 'admin'), new lang_string('configallowcohortthemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowthemechangeonurl', new lang_string('allowthemechangeonurl', 'admin'), new lang_string('configallowthemechangeonurl', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', new lang_string('allowuserblockhiding', 'admin'), new lang_string('configallowuserblockhiding', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('langmenuinsecurelayout',
new lang_string('langmenuinsecurelayout', 'admin'),
new lang_string('langmenuinsecurelayout_desc', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('logininfoinsecurelayout',
new lang_string('logininfoinsecurelayout', 'admin'),
new lang_string('logininfoinsecurelayout_desc', 'admin'), 0));
$temp->add(new admin_setting_configtextarea('custommenuitems', new lang_string('custommenuitems', 'admin'),
new lang_string('configcustommenuitems', 'admin'), '', PARAM_RAW, '50', '10'));
$temp->add(new admin_setting_configtextarea(
'customusermenuitems',
new lang_string('customusermenuitems', 'admin'),
new lang_string('configcustomusermenuitems', 'admin'),
'profile,moodle|/user/profile.php
grades,grades|/grade/report/mygrades.php
calendar,core_calendar|/calendar/view.php?view=month
privatefiles,moodle|/user/files.php
reports,core_reportbuilder|/reportbuilder/index.php',
PARAM_RAW,
'50',
'10'
));
$temp->add(new admin_setting_configcheckbox('enabledevicedetection', new lang_string('enabledevicedetection', 'admin'), new lang_string('configenabledevicedetection', 'admin'), 1));
$temp->add(new admin_setting_devicedetectregex('devicedetectregex', new lang_string('devicedetectregex', 'admin'), new lang_string('devicedetectregex_desc', 'admin'), ''));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', new lang_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
// settings for each theme
foreach (core_component::get_plugin_list('theme') as $theme => $themedir) {
$settings_path = "$themedir/settings.php";
if (file_exists($settings_path)) {
$settings = new admin_settingpage('themesetting'.$theme, new lang_string('pluginname', 'theme_'.$theme));
include($settings_path);
if ($settings) {
$ADMIN->add('themes', $settings);
}
}
}
// Logos section.
$temp = new admin_settingpage('logos', new lang_string('logossettings', 'admin'));
@@ -147,14 +202,14 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
));
$choices = [HOMEPAGE_SITE => new lang_string('home')];
if (!isset($CFG->enabledashboard) || $CFG->enabledashboard) {
if (!empty($CFG->enabledashboard)) {
$choices[HOMEPAGE_MY] = new lang_string('mymoodle', 'admin');
}
$choices[HOMEPAGE_MYCOURSES] = new lang_string('mycourses', 'admin');
$choices[HOMEPAGE_USER] = new lang_string('userpreference', 'admin');
$temp->add(new admin_setting_configselect('defaulthomepage', new lang_string('defaulthomepage', 'admin'),
new lang_string('configdefaulthomepage', 'admin'), get_default_home_page(), $choices));
if (!isset($CFG->enabledashboard) || $CFG->enabledashboard) {
if (!empty($CFG->enabledashboard)) {
$temp->add(new admin_setting_configcheckbox(
'allowguestmymoodle',
new lang_string('allowguestmymoodle', 'admin'),
@@ -181,6 +236,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
new lang_string('confignavcourselimit', 'admin'), 10, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('usesitenameforsitepages', new lang_string('usesitenameforsitepages', 'admin'), new lang_string('configusesitenameforsitepages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('linkadmincategories', new lang_string('linkadmincategories', 'admin'), new lang_string('linkadmincategories_help', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('linkcoursesections', new lang_string('linkcoursesections', 'admin'), new lang_string('linkcoursesections_help', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('navshowfrontpagemods', new lang_string('navshowfrontpagemods', 'admin'), new lang_string('navshowfrontpagemods_help', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('navadduserpostslinks', new lang_string('navadduserpostslinks', 'admin'), new lang_string('navadduserpostslinks_help', 'admin'), 1));
@@ -282,85 +338,4 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
$temp = new admin_settingpage('templates', new lang_string('templates', 'admin'));
$temp->add($setting);
$ADMIN->add('appearance', $temp);
// Advanced theme settings page.
$temp = new admin_settingpage('themesettingsadvanced', new lang_string('themesettingsadvanced', 'admin'));
$setting = new admin_setting_configtext('themelist', new lang_string('themelist', 'admin'),
new lang_string('configthemelist', 'admin'), '', PARAM_NOTAGS);
$setting->set_force_ltr(true);
$temp->add($setting);
$setting = new admin_setting_configcheckbox('themedesignermode', new lang_string('themedesignermode', 'admin'),
new lang_string('configthemedesignermode', 'admin'), 0);
$setting->set_updatedcallback('theme_reset_all_caches');
$temp->add($setting);
$setting = new admin_setting_configcheckbox('allowuserthemes', new lang_string('allowuserthemes', 'admin'),
new lang_string('configallowuserthemes', 'admin'), 0);
$setting->set_updatedcallback('theme_purge_used_in_context_caches');
$temp->add($setting);
$setting = new admin_setting_configcheckbox('allowcoursethemes', new lang_string('allowcoursethemes', 'admin'),
new lang_string('configallowcoursethemes', 'admin'), 0);
$setting->set_updatedcallback('theme_purge_used_in_context_caches');
$temp->add($setting);
$setting = new admin_setting_configcheckbox('allowcategorythemes', new lang_string('allowcategorythemes', 'admin'),
new lang_string('configallowcategorythemes', 'admin'), 0);
$setting->set_updatedcallback('theme_purge_used_in_context_caches');
$temp->add($setting);
$setting = new admin_setting_configcheckbox('allowcohortthemes', new lang_string('allowcohortthemes', 'admin'),
new lang_string('configallowcohortthemes', 'admin'), 0);
$setting->set_updatedcallback('theme_purge_used_in_context_caches');
$temp->add($setting);
$temp->add(new admin_setting_configcheckbox('allowthemechangeonurl', new lang_string('allowthemechangeonurl', 'admin'),
new lang_string('configallowthemechangeonurl', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowuserblockhiding', new lang_string('allowuserblockhiding', 'admin'),
new lang_string('configallowuserblockhiding', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('langmenuinsecurelayout',
new lang_string('langmenuinsecurelayout', 'admin'),
new lang_string('langmenuinsecurelayout_desc', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('logininfoinsecurelayout',
new lang_string('logininfoinsecurelayout', 'admin'),
new lang_string('logininfoinsecurelayout_desc', 'admin'), 0));
$temp->add(new admin_setting_configtextarea('custommenuitems', new lang_string('custommenuitems', 'admin'),
new lang_string('configcustommenuitems', 'admin'), '', PARAM_RAW, '50', '10'));
$defaultsettingcustomusermenuitems = [
'profile,moodle|/user/profile.php',
'grades,grades|/grade/report/mygrades.php',
'calendar,core_calendar|/calendar/view.php?view=month',
'privatefiles,moodle|/user/files.php',
'reports,core_reportbuilder|/reportbuilder/index.php',
];
$temp->add(new admin_setting_configtextarea(
'customusermenuitems',
new lang_string('customusermenuitems', 'admin'),
new lang_string('configcustomusermenuitems', 'admin'),
implode("\n", $defaultsettingcustomusermenuitems),
PARAM_RAW,
'50',
'10'
));
$ADMIN->add('appearance', $temp);
// Theme selector page.
$ADMIN->add('appearance', new admin_externalpage('themeselector',
new lang_string('themeselector', 'admin'), $CFG->wwwroot . '/admin/themeselector.php'));
// Settings page for each theme.
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themesettingscustom', 'admin')));
foreach (core_component::get_plugin_list('theme') as $theme => $themedir) {
$settingspath = "$themedir/settings.php";
if (file_exists($settingspath)) {
$settings = new admin_settingpage("themesetting$theme", new lang_string('pluginname', "theme_$theme"),
'moodle/site:config', true
);
include($settingspath);
// Add settings if not hidden (to avoid displaying the section if it appears empty in the UI).
if ($settings && !$settings->hidden) {
$ADMIN->add('themes', $settings);
}
}
}
} // end of speedup
+40 -108
View File
@@ -43,6 +43,12 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
array('moodle/category:manage', 'moodle/course:create')
)
);
$ADMIN->add('courses',
new admin_externalpage('course_customfield', new lang_string('course_customfield', 'admin'),
$CFG->wwwroot . '/course/customfield.php',
array('moodle/course:configurecustomfields')
)
);
$ADMIN->add('courses',
new admin_externalpage('addcategory', new lang_string('addcategory', 'admin'),
new moodle_url('/course/editcategory.php', array('parent' => 0)),
@@ -62,49 +68,6 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
)
);
// Download course content.
$downloadcoursedefaulturl = new moodle_url('/admin/settings.php', ['section' => 'coursesettings']);
$temp = new admin_settingpage('downloadcoursecontent', new lang_string('downloadcoursecontent', 'course'));
$temp->add(new admin_setting_configcheckbox('downloadcoursecontentallowed',
new lang_string('downloadcoursecontentallowed', 'admin'),
new lang_string('downloadcoursecontentallowed_desc', 'admin', $downloadcoursedefaulturl->out()), 0));
// 50MB default maximum size per file when downloading course content.
$defaultmaxdownloadsize = 50 * filesize::UNIT_MB;
$temp->add(new filesize('maxsizeperdownloadcoursefile', new lang_string('maxsizeperdownloadcoursefile', 'admin'),
new lang_string('maxsizeperdownloadcoursefile_desc', 'admin'), $defaultmaxdownloadsize, filesize::UNIT_MB));
$temp->hide_if('maxsizeperdownloadcoursefile', 'downloadcoursecontentallowed');
$ADMIN->add('courses', $temp);
// "courserequests" settingpage.
$temp = new admin_settingpage('courserequest', new lang_string('courserequest'));
$temp->add(new admin_setting_configcheckbox('enablecourserequests',
new lang_string('enablecourserequests', 'admin'),
new lang_string('configenablecourserequests', 'admin'), 1));
$temp->add(new admin_settings_coursecat_select('defaultrequestcategory',
new lang_string('defaultrequestcategory', 'admin'),
new lang_string('configdefaultrequestcategory', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('lockrequestcategory',
new lang_string('lockrequestcategory', 'admin'),
new lang_string('configlockrequestcategory', 'admin'), 0));
$temp->add(new admin_setting_users_with_capability(
'courserequestnotify',
new lang_string('courserequestnotify', 'admin'),
new lang_string('configcourserequestnotify2', 'admin'),
[],
'moodle/site:approvecourse'
));
$ADMIN->add('courses', $temp);
// Pending course requests.
if (!empty($CFG->enablecourserequests)) {
$ADMIN->add('courses', new admin_externalpage('coursespending', new lang_string('pendingrequests'),
$CFG->wwwroot . '/course/pending.php', array('moodle/site:approvecourse')));
}
// Add a category for the course Default settings.
$ADMIN->add('courses', new admin_category('coursedefaultsettings', new lang_string('defaultsettingscategory', 'course')));
// Course Default Settings Page.
// NOTE: these settings must be applied after all other settings because they depend on them.
@@ -251,73 +214,42 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp->add(new admin_setting_configselect('moodlecourse/groupmode', new lang_string('groupmode'), '', key($choices),$choices));
$temp->add(new admin_setting_configselect('moodlecourse/groupmodeforce', new lang_string('force'), new lang_string('coursehelpforce'), 0,array(0 => new lang_string('no'), 1 => new lang_string('yes'))));
// Communication.
$temp->add(new admin_setting_heading('communication',
new lang_string('communication', 'core_communication'), ''));
$ADMIN->add('courses', $temp);
list($communicationproviders, $defaulprovider) = \core_communication\api::
get_enabled_providers_and_default();
// Download course content.
$downloadcoursedefaulturl = new moodle_url('/admin/settings.php', ['section' => 'coursesettings']);
$temp = new admin_settingpage('downloadcoursecontent', new lang_string('downloadcoursecontent', 'course'));
$temp->add(new admin_setting_configcheckbox('downloadcoursecontentallowed',
new lang_string('downloadcoursecontentallowed', 'admin'),
new lang_string('downloadcoursecontentallowed_desc', 'admin', $downloadcoursedefaulturl->out()), 0));
$temp->add(new admin_setting_configselect('moodlecourse/coursecommunicationprovider',
new lang_string('selectcommunicationprovider', 'communication'),
new lang_string('coursecommunication_desc', 'course'),
$defaulprovider, $communicationproviders));
// 50MB default maximum size per file when downloading course content.
$defaultmaxdownloadsize = 50 * filesize::UNIT_MB;
$temp->add(new filesize('maxsizeperdownloadcoursefile', new lang_string('maxsizeperdownloadcoursefile', 'admin'),
new lang_string('maxsizeperdownloadcoursefile_desc', 'admin'), $defaultmaxdownloadsize, filesize::UNIT_MB));
$temp->hide_if('maxsizeperdownloadcoursefile', 'downloadcoursecontentallowed');
$ADMIN->add('coursedefaultsettings', $temp);
if (!empty($CFG->enablecompletion)) {
$ADMIN->add('coursedefaultsettings', new admin_externalpage(
'sitedefaultcompletion',
new lang_string('defaultcompletion', 'completion'),
new moodle_url('/course/defaultcompletion.php', ['id' => $SITE->id]),
['moodle/course:manageactivities'])
);
$ADMIN->add('courses', $temp);
// "courserequests" settingpage.
$temp = new admin_settingpage('courserequest', new lang_string('courserequest'));
$temp->add(new admin_setting_configcheckbox('enablecourserequests',
new lang_string('enablecourserequests', 'admin'),
new lang_string('configenablecourserequests', 'admin'), 1));
$temp->add(new admin_settings_coursecat_select('defaultrequestcategory',
new lang_string('defaultrequestcategory', 'admin'),
new lang_string('configdefaultrequestcategory', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('lockrequestcategory',
new lang_string('lockrequestcategory', 'admin'),
new lang_string('configlockrequestcategory', 'admin'), 0));
$temp->add(new admin_setting_users_with_capability('courserequestnotify', new lang_string('courserequestnotify', 'admin'), new lang_string('configcourserequestnotify2', 'admin'), array(), 'moodle/site:approvecourse'));
$ADMIN->add('courses', $temp);
// Pending course requests.
if (!empty($CFG->enablecourserequests)) {
$ADMIN->add('courses', new admin_externalpage('coursespending', new lang_string('pendingrequests'),
$CFG->wwwroot . '/course/pending.php', array('moodle/site:approvecourse')));
}
$ADMIN->add('coursedefaultsettings', new admin_externalpage(
'course_customfield',
new lang_string('course_customfield', 'admin'),
$CFG->wwwroot . '/course/customfield.php',
['moodle/course:configurecustomfields'])
);
$temp = new admin_settingpage('activitychoosersettings', new lang_string('activitychoosersettings', 'course'));
// Tab mode for the activity chooser.
$temp->add(
new admin_setting_configselect(
'activitychoosertabmode',
new lang_string('activitychoosertabmode', 'course'),
new lang_string('activitychoosertabmode_desc', 'course'),
3,
[
3 => new lang_string('activitychoosertabmodefour', 'course'),
4 => new lang_string('activitychoosertabmodefive', 'course'),
5 => new lang_string('activitychoosertabmodesix', 'course'),
0 => new lang_string('activitychoosertabmodeone', 'course'),
1 => new lang_string('activitychoosertabmodetwo', 'course'),
2 => new lang_string('activitychoosertabmodethree', 'course'),
]
)
);
// Add a category for the Groups.
$ADMIN->add('courses', new admin_category('groups', new lang_string('groups')));
$ADMIN->add(
'groups',
new admin_externalpage(
'group_customfield',
new lang_string('group_customfield', 'admin'),
$CFG->wwwroot . '/group/customfield.php',
['moodle/group:configurecustomfields']
)
);
$ADMIN->add(
'groups',
new admin_externalpage(
'grouping_customfield',
new lang_string('grouping_customfield', 'admin'),
$CFG->wwwroot . '/group/grouping_customfield.php',
['moodle/group:configurecustomfields']
)
);
// Add a category for the Activity Chooser.
$ADMIN->add('courses', new admin_category('activitychooser', new lang_string('activitychoosercategory', 'course')));
@@ -727,12 +659,12 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp = new admin_settingpage('asyncgeneralsettings', new lang_string('asyncgeneralsettings', 'backup'));
$temp->add(new admin_setting_configcheckbox('enableasyncbackup', new lang_string('enableasyncbackup', 'backup'),
new lang_string('enableasyncbackup_help', 'backup'), 1, 1, 0));
new lang_string('enableasyncbackup_help', 'backup'), 0, 1, 0));
$temp->add(new admin_setting_configcheckbox(
'backup/backup_async_message_users',
new lang_string('asyncemailenable', 'backup'),
new lang_string('asyncemailenabledetail', 'backup'), 1));
new lang_string('asyncemailenabledetail', 'backup'), 0));
$temp->hide_if('backup/backup_async_message_users', 'enableasyncbackup');
$temp->add(new admin_setting_configtext(
-8
View File
@@ -38,11 +38,6 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
new lang_string('enablesharingtomoodlenet', 'core_admin'),
new lang_string('enablesharingtomoodlenet_desc', 'core_admin'), 0));
// New communication subsystem setting.
$temp->add(new admin_setting_configcheckbox('enablecommunicationsubsystem',
new lang_string('enablecommunicationsubsystem', 'core_admin'),
new lang_string('enablecommunicationsubsystem_desc', 'core_admin'), 0));
$ADMIN->add('experimental', $temp);
// "debugging" settingpage
@@ -121,7 +116,4 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
"$CFG->wwwroot/$CFG->admin/purgecaches.php"));
$ADMIN->add('development', new admin_externalpage('thirdpartylibs', new lang_string('thirdpartylibs','admin'), "$CFG->wwwroot/$CFG->admin/thirdpartylibs.php"));
$ADMIN->add('development', new admin_externalpage('hooksoverview',
new lang_string('hooksoverview', 'admin'), "$CFG->wwwroot/$CFG->admin/hooks.php"));
} // end of speedup
+23 -5
View File
@@ -74,8 +74,6 @@ if (has_capability('moodle/grade:manage', $systemcontext)
$temp->add(new admin_setting_special_gradeexport());
$temp->add(new admin_setting_special_gradeexportdefault());
$temp->add(new admin_setting_special_gradelimiting());
$temp->add(new admin_setting_configcheckbox('grade_report_showmin',
@@ -115,7 +113,7 @@ if (has_capability('moodle/grade:manage', $systemcontext)
$defaultvisible = array(GRADE_AGGREGATE_SUM);
$defaults = array('value' => GRADE_AGGREGATE_SUM, 'forced' => false);
$defaults = array('value' => GRADE_AGGREGATE_SUM, 'forced' => false, 'adv' => false);
$temp->add(new admin_setting_gradecat_combo('grade_aggregation', new lang_string('aggregation', 'grades'), new lang_string('aggregation_help', 'grades'), $defaults, $options));
$temp->add(new admin_setting_configmultiselect('grade_aggregations_visible', new lang_string('aggregationsvisible', 'grades'),
@@ -123,10 +121,10 @@ if (has_capability('moodle/grade:manage', $systemcontext)
$options = array(0 => new lang_string('no'), 1 => new lang_string('yes'));
$defaults = array('value' => 1, 'forced' => false);
$defaults = array('value'=>1, 'forced'=>false, 'adv'=>true);
$temp->add(new admin_setting_gradecat_combo('grade_aggregateonlygraded', new lang_string('aggregateonlygraded', 'grades'),
new lang_string('aggregateonlygraded_help', 'grades'), $defaults, $options));
$defaults = array('value' => 0, 'forced' => false);
$defaults = array('value'=>0, 'forced'=>false, 'adv'=>true);
$temp->add(new admin_setting_gradecat_combo('grade_aggregateoutcomes', new lang_string('aggregateoutcomes', 'grades'),
new lang_string('aggregateoutcomes_help', 'grades'), $defaults, $options));
@@ -163,6 +161,26 @@ if (has_capability('moodle/grade:manage', $systemcontext)
'3' => '3',
'4' => '4',
'5' => '5')));
$temp->add(new admin_setting_configmultiselect('grade_item_advanced', new lang_string('gradeitemadvanced', 'grades'), new lang_string('gradeitemadvanced_help', 'grades'),
array('iteminfo', 'idnumber', 'gradepass', 'plusfactor', 'multfactor', 'display', 'decimals', 'hiddenuntil', 'locktime'),
array('iteminfo' => new lang_string('iteminfo', 'grades'),
'idnumber' => new lang_string('idnumbermod'),
'gradetype' => new lang_string('gradetype', 'grades'),
'scaleid' => new lang_string('scale'),
'grademin' => new lang_string('grademin', 'grades'),
'grademax' => new lang_string('grademax', 'grades'),
'gradepass' => new lang_string('gradepass', 'grades'),
'plusfactor' => new lang_string('plusfactor', 'grades'),
'multfactor' => new lang_string('multfactor', 'grades'),
'display' => new lang_string('gradedisplaytype', 'grades'),
'decimals' => new lang_string('decimalpoints', 'grades'),
'hidden' => new lang_string('hidden', 'grades'),
'hiddenuntil' => new lang_string('hiddenuntil', 'grades'),
'locked' => new lang_string('locked', 'grades'),
'locktime' => new lang_string('locktime', 'grades'),
'aggregationcoef' => new lang_string('aggregationcoef', 'grades'),
'parentcategory' => new lang_string('parentcategory', 'grades'))));
}
$ADMIN->add('grades', $temp);
+53
View File
@@ -0,0 +1,53 @@
<?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/>.
/**
* This file gives information about Moodle Services
*
* @package core
* @copyright 2018 Amaia Anabitarte <amaia@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
if ($hassiteconfig) {
// Create Moodle Services information.
$moodleservices->add(new admin_setting_heading('moodleservicesintro', '',
new lang_string('moodleservices_help', 'admin')));
// Moodle Partners information.
if (empty($CFG->disableserviceads_partner)) {
$moodleservices->add(new admin_setting_heading('moodlepartners',
new lang_string('moodlepartners', 'admin'),
new lang_string('moodlepartners_help', 'admin')));
}
// Moodle app information.
$moodleservices->add(new admin_setting_heading('moodleapp',
new lang_string('moodleapp', 'admin'),
new lang_string('moodleapp_help', 'admin')));
// Branded Moodle app information.
if (empty($CFG->disableserviceads_branded)) {
$moodleservices->add(new admin_setting_heading('moodlebrandedapp',
new lang_string('moodlebrandedapp', 'admin'),
new lang_string('moodlebrandedapp_help', 'admin')));
}
}
-41
View File
@@ -116,17 +116,6 @@ if ($hassiteconfig) {
$temp->add($setting);
$temp->add(new admin_setting_configcheckbox('verifychangedemail', new lang_string('verifychangedemail', 'admin'), new lang_string('configverifychangedemail', 'admin'), 1));
// ReCaptcha.
$temp->add(new admin_setting_configselect('enableloginrecaptcha',
new lang_string('auth_loginrecaptcha', 'auth'),
new lang_string('auth_loginrecaptcha_desc', 'auth'),
0,
[
new lang_string('no'),
new lang_string('yes'),
],
));
$setting = new admin_setting_configtext('recaptchapublickey', new lang_string('recaptchapublickey', 'admin'), new lang_string('configrecaptchapublickey', 'admin'), '', PARAM_NOTAGS);
$setting->set_force_ltr(true);
$temp->add($setting);
@@ -135,18 +124,6 @@ if ($hassiteconfig) {
$temp->add($setting);
$ADMIN->add('authsettings', $temp);
// Toggle password visiblity icon.
$temp->add(new admin_setting_configselect('loginpasswordtoggle',
new lang_string('auth_loginpasswordtoggle', 'auth'),
new lang_string('auth_loginpasswordtoggle_desc', 'auth'),
TOGGLE_SENSITIVE_SMALL_SCREENS_ONLY,
[
TOGGLE_SENSITIVE_DISABLED => get_string('disabled', 'admin'),
TOGGLE_SENSITIVE_ENABLED => get_string('enabled', 'admin'),
TOGGLE_SENSITIVE_SMALL_SCREENS_ONLY => get_string('smallscreensonly', 'admin'),
],
));
$temp = new admin_externalpage('authtestsettings', get_string('testsettings', 'core_auth'), new moodle_url("/auth/test_settings.php"), 'moodle/site:config', true);
$ADMIN->add('authsettings', $temp);
@@ -196,10 +173,6 @@ if ($hassiteconfig) {
$temp = new admin_settingpage('manageantiviruses', new lang_string('antivirussettings', 'antivirus'));
$temp->add(new admin_setting_manageantiviruses());
// Status check.
$temp->add(new admin_setting_heading('antivirus/statuschecks', new lang_string('statuschecks'), ''));
$temp->add(new admin_setting_check('antivirus/checkantivirus', new \core\check\environment\antivirus()));
// Common settings.
$temp->add(new admin_setting_heading('antiviruscommonsettings', new lang_string('antiviruscommonsettings', 'antivirus'), ''));
@@ -808,20 +781,6 @@ if ($hassiteconfig) {
}
}
// Communication plugins.
if ($hassiteconfig && core_communication\api::is_available()) {
$ADMIN->add('modules', new admin_category('communicationsettings', new lang_string('communication', 'core_communication')));
$temp = new admin_settingpage('managecommunicationproviders',
new lang_string('managecommunicationproviders', 'core_communication'));
$temp->add(new \core_communication\admin\manage_communication_providers_page());
$ADMIN->add('communicationsettings', $temp);
$plugins = core_plugin_manager::instance()->get_plugins_of_type('communication');
foreach ($plugins as $plugin) {
/** @var \core\plugininfo\communication $plugin */
$plugin->load_settings($ADMIN, 'communicationsettings', $hassiteconfig);
}
}
// Content bank content types.
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
+3 -1
View File
@@ -152,7 +152,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$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'),
@@ -164,6 +165,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp = new admin_settingpage('httpsecurity', new lang_string('httpsecurity', 'admin'));
$temp->add(new admin_setting_configcheckbox('cookiesecure', new lang_string('cookiesecure', 'admin'), new lang_string('configcookiesecure', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('cookiehttponly', new lang_string('cookiehttponly', 'admin'), new lang_string('configcookiehttponly', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowframembedding', new lang_string('allowframembedding', 'admin'), new lang_string('allowframembedding_help', 'admin'), 0));
// Settings elements used by the \core\files\curl_security_helper class.
+1 -22
View File
@@ -390,17 +390,6 @@ if ($hassiteconfig) {
30 * MINSECS
)
);
$temp->add(
new admin_setting_configduration(
'task_adhoc_failed_retention',
new lang_string('task_adhoc_failed_retention', 'admin'),
new lang_string('task_adhoc_failed_retention_desc', 'admin'),
\core\task\manager::ADHOC_TASK_FAILED_RETENTION,
WEEKSECS
)
);
$ADMIN->add('taskconfig', $temp);
// Task log configuration.
@@ -464,12 +453,6 @@ if ($hassiteconfig) {
// Outgoing mail configuration.
$temp = new admin_settingpage('outgoingmailconfig', new lang_string('outgoingmailconfig', 'admin'));
if (!empty($CFG->noemailever)) {
$noemaileverwarning = new \core\output\notification(get_string('noemaileverwarning', 'admin'),
\core\output\notification::NOTIFY_ERROR);
$temp->add(new admin_setting_heading('outgoingmaildisabled', '', $OUTPUT->render($noemaileverwarning)));
}
$temp->add(new admin_setting_heading('smtpheading', new lang_string('smtp', 'admin'),
new lang_string('smtpdetail', 'admin')));
@@ -533,12 +516,8 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_heading('noreplydomainheading', new lang_string('noreplydomain', 'admin'),
new lang_string('noreplydomaindetail', 'admin')));
$default = clean_param('noreply@' . get_host_from_url($CFG->wwwroot), PARAM_EMAIL);
if (!$default) {
$default = null;
}
$temp->add(new admin_setting_configtext('noreplyaddress', new lang_string('noreplyaddress', 'admin'),
new lang_string('confignoreplyaddress', 'admin'), $default, PARAM_EMAIL));
new lang_string('confignoreplyaddress', 'admin'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_EMAIL));
$temp->add(new admin_setting_configtextarea('allowedemaildomains',
new lang_string('allowedemaildomains', 'admin'),
+2
View File
@@ -31,6 +31,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
1 => get_string('completionactivitydefault', 'completion'),
0 => get_string('completion_none', 'completion')
);
$optionalsubsystems->add(new admin_setting_configselect('completiondefault', new lang_string('completiondefault', 'completion'),
new lang_string('configcompletiondefault', 'completion'), 1, $options));
$optionalsubsystems->add($checkbox = new admin_setting_configcheckbox('enableavailability',
new lang_string('enableavailability', 'availability'),
+6
View File
@@ -14,6 +14,12 @@ $ADMIN->add('root', new admin_externalpage('registrationmoodleorg', new lang_str
new moodle_url("/admin/registration/index.php")));
// hidden upgrade script
$ADMIN->add('root', new admin_externalpage('upgradesettings', new lang_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
// Adding Moodle Services information page.
$moodleservices = new admin_settingpage('moodleservices', new lang_string('moodleservices',
'admin'));
$ADMIN->add('root', $moodleservices);
$userfeedback = new admin_settingpage('userfeedback', new lang_string('feedbacksettings', 'admin'));
$ADMIN->add('root', $userfeedback);
+1 -1
View File
@@ -26,7 +26,7 @@
}
}}
<div class="simplesearchform d-flex justify-content-end">
<form autocomplete="off" action="{{action}}" method="get" accept-charset="utf-8" class="mform d-flex flex-wrap align-items-center simplesearchform">
<form autocomplete="off" action="{{action}}" method="get" accept-charset="utf-8" class="mform form-inline simplesearchform">
<div class="input-group">
<label for="searchinput-{{uniqid}}">
<span class="sr-only">{{#str}} search, core {{/str}}</span>
@@ -39,7 +39,7 @@
Setting configduration.
}}
<div class="form-duration defaultsnext">
<div class="d-flex flex-wrap align-items-center">
<div class="form-inline">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
+1 -1
View File
@@ -44,7 +44,7 @@
Setting configfile.
}}
<div class="form-file defaultsnext">
<div class="d-flex flex-wrap align-items-center">
<div class="form-inline">
<input type="text" name="{{name}}" id="{{id}}" size="{{size}}" value="{{value}}" class="form-control text-ltr" {{#readonly}}readonly{{/readonly}}>
{{#showvalidity}}
{{#valid}}
@@ -39,7 +39,7 @@
Setting configfilesize.
}}
<div class="form-filesize defaultsnext">
<div class="d-flex flex-wrap align-items-center">
<div class="form-inline">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
+2 -11
View File
@@ -27,8 +27,6 @@
* forceltr - always display as ltr
* attributes - list of additional attributes containing name, value
* readonly - bool
* data - list of arbitrary data attributes
* maxcharacter - maximum character
Example context (json):
{
@@ -38,19 +36,12 @@
"size": "21",
"forceltr": false,
"readonly": false,
"attributes": [ { "name": "readonly", "value": "readonly" } ],
"data": [ { "key": "validation_max_length", "value": "10" } ],
"maxcharacter": false
"attributes": [ { "name": "readonly", "value": "readonly" } ]
}
}}
{{!
Setting configtext.
}}
<div class="form-text defaultsnext">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}" {{#readonly}}disabled{{/readonly}} {{#data}} data-{{key}}={{#quote}}{{{value}}}{{/quote}}{{/data}}>
{{#data}}
{{#maxcharacter}}
<div class="form-defaultinfo text-muted d-block">{{#str}} maxcharacter, admin, {{value}} {{/str}}</div>
{{/maxcharacter}}
{{/data}}
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}" {{#readonly}}disabled{{/readonly}}>
</div>
+1 -1
View File
@@ -45,7 +45,7 @@
Setting configtime.
}}
<div class="form-time defaultsnext">
<div class="d-flex flex-wrap align-items-center text-ltr">
<div class="form-inline text-ltr">
<label class="sr-only" for="{{id}}h">{{#str}}hours{{/str}}</label>
<select id="{{id}}h" name="{{name}}[h]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#hours}}
@@ -40,9 +40,9 @@
{{!
Setting courselist_frontpage.
}}
<div class="mb-3">
<div class="form-group">
{{#selects}}
<select id="{{id}}{{key}}" name="{{name}}[]" class="custom-select mb-1">
<select id="{{id}}{{key}}" name="{{name}}[]" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -15,8 +15,6 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@deprecated since Moodle 4.3
@todo Final deprecation on Moodle 4.7 MDL-79052
@template core_admin/setting_devicedetectregex
Admin devicedetectregex setting template.
+1 -1
View File
@@ -35,7 +35,7 @@
{{!
Setting emoticons.
}}
<div class="mb-3">
<div class="form-group">
<table id="emoticonsetting" class="admintable generaltable">
<thead>
<tr>
@@ -24,6 +24,7 @@
* id - element id
* options - list of options containing name, value and selected
* forced - is it forced
* advanced - is it advanced
Example context (json):
{
@@ -32,13 +33,14 @@
"options": [
{ "name": "Option name", "value": "Value", "selected": true }
],
"forced": true
"forced": true,
"advanced": true
}
}}
{{!
Setting configselect.
}}
<div class="mb-3">
<div class="form-group">
<select id="{{id}}" name="{{name}}[value]" class="form-select custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
@@ -46,5 +48,7 @@
</select>
<input type="checkbox" id="{{id}}force" name="{{name}}[forced]" value="1" {{#forced}}checked{{/forced}}>
<label for="{{id}}force">{{#str}}force{{/str}}</label>
<input type="checkbox" id="{{id}}adv" name="{{name}}[adv]" value="1" {{#advanced}}checked{{/advanced}}>
<label for="{{id}}adv">{{#str}}advanced{{/str}}</label>
</div>
+34
View File
@@ -0,0 +1,34 @@
{{!
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/>.
}}
{{!
@template core_admin/tasklogs
This is the template for the search form which appears above the task logs report.
}}
<form class="form-inline" method="GET" action="{{{action}}}">
<label class="sr-only" for="tasklog-filter">{{#str}}filter{{/str}}</label>
<input class="form-control" type="text" id="tasklog-filter" name="filter" value="{{{filter}}}">
<label class="sr-only" for="tasklog-resultfilter">{{#str}}resultfilter, admin{{/str}}</label>
<select class="form-control custom-select" name="result" id="tasklog-resultfilter">
{{#resultfilteroptions}}
<option value="{{{value}}}"{{#selected}} selected="selected"{{/selected}}>{{title}}</option>
{{/resultfilteroptions}}
</select>
<input class="btn btn-primary" type="submit" value="{{#str}}filter{{/str}}">
</form>
@@ -1,101 +0,0 @@
{{!
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/>.
}}
{{!
@template core_admin/themeselector/theme_card
This template renders the singular card for a theme.
Example context (json):
{
"name": "Boost",
"choose": "boost",
"image": "http://moodlesite/theme/image.php?theme=boost&image=screenshot&component=theme",
"current": true,
"actionurl": "http://moodlesite/admin/themeselector.php",
"sesskey": "123XYZ",
"settingsurl": "http://moodlesite/admin/settings.php?section=themesettingboost",
"reporturl": "http://moodlesite/report/themeusage/index.php?themechoice=boost"
}
}}
<div class="card theme-card" role="listitem" id="theme-card-{{choose}}" aria-labelledby="theme-name-{{choose}} {{#current}}current-theme-{{choose}}{{/current}}">
<div class="card-img card-img-top" style='background-image: url("{{image}}");'></div>
<div class="card-body p-3">
<div class="d-flex">
<div class="flex-grow-1">
<h3 class="h5" id="theme-name-{{choose}}">{{name}}</h3>
</div>
<div>
<button
type="button"
id="theme-preview-{{choose}}"
class="btn btn-link p-0"
title="{{#str}}previewthemename, moodle, {{name}}{{/str}}"
data-action="preview"
data-name="{{name}}"
data-image="{{image}}"
data-current="{{current}}"
data-actionurl="{{actionurl}}"
data-choose="{{choose}}"
data-sesskey="{{sesskey}}">
<i class="icon fa fa-info-circle m-0" aria-hidden="true"></i>
<span class="sr-only">{{#str}}previewthemename, moodle, {{name}}{{/str}}</span>
</button>
{{#reporturl}}
<a
href="{{reporturl}}"
id="theme-usage-report-{{choose}}"
class="btn btn-link p-0 ml-2"
title="{{#str}}themeusagereportname, admin, {{name}}{{/str}}">
<i class="icon fa fa-area-chart m-0" aria-hidden="true"></i>
<span class="sr-only">{{#str}}themeusagereportname, admin, {{name}}{{/str}}</span>
</a>
{{/reporturl}}
{{#settingsurl}}
<a
href="{{settingsurl}}"
id="theme-settings-{{choose}}"
class="btn btn-link p-0 ml-2"
title="{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}">
<i class="icon fa fa-cog m-0" aria-hidden="true"></i>
<span class="sr-only">{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}</span>
</a>
{{/settingsurl}}
</div>
</div>
</div>
<div class="d-flex align-items-end flex-column p-3">
{{#current}}
<strong><span class="text-success" id="current-theme-{{choose}}">{{#str}}currenttheme, moodle{{/str}}</span></strong>
{{#definedinconfig}}
<div class="alert alert-info p-1">{{#str}}configoverride, admin{{/str}}</div>
{{/definedinconfig}}
{{/current}}
{{^current}}
{{#actionurl}}
<form method="post" action="{{actionurl}}" id="theme-select-form-{{choose}}">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<input type="hidden" name="choose" value="{{choose}}">
<button type="submit" class="btn btn-primary">
<span aria-hidden="true">{{#str}}selecttheme, moodle{{/str}}</span>
<span class="sr-only">{{#str}}selectthemename, moodle, {{name}}{{/str}}</span>
</button>
</form>
{{/actionurl}}
{{/current}}
</div>
</div>
@@ -1,58 +0,0 @@
{{!
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/>.
}}
{{!
@template core_admin/themeselector/theme_preview_modal
This template renders the modal for the selected theme.
Example context (json):
{
"name": "Boost",
"choose": "boost",
"image": "http://moodlesite/theme/image.php?theme=boost&image=screenshot&component=theme",
"description": "Boost is a modern highly-customisable theme...",
"current": true,
"actionurl": "http://moodlesite/admin/themeselector.php",
"sesskey": "123XYZ"
}
}}
<div>
<div>
<img
src="{{image}}"
alt=""
id="modal-theme-preview-{{choose}}"
class="w-100 mb-3">
</div>
<div class="d-flex">
<div class="flex-grow-1">
<p><strong>{{#str}}themepreviewdescription, moodle, {{name}}{{/str}}</strong></p>
</div>
<div class="d-flex align-items-end flex-column">
{{#current}}
<strong><span class="text-success">{{#str}}currenttheme, moodle{{/str}}</span></strong>
{{#definedinconfig}}
<div class="alert alert-info p-1">{{#str}}configoverride, admin{{/str}}</div>
{{/definedinconfig}}
{{/current}}
</div>
</div>
<p>{{description}}</p>
{{#actionurl}}
<form method="post" action="{{actionurl}}" id="modal-theme-select-form-{{choose}}">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<input type="hidden" name="choose" value="{{choose}}">
</form>
{{/actionurl}}
</div>
@@ -1,77 +0,0 @@
{{!
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/>.
}}
{{!
@template core_admin/themeselector/theme_selector
This template renders the cards view for choosing a theme.
Example context (json):
{
"themes": [
{
"name": "Boost",
"choose": "boost",
"image": "http://moodlesite/theme/image.php?theme=boost&image=screenshot&component=theme",
"current": true,
"actionurl": "http://moodlesite/admin/themeselector.php",
"sesskey": "123XYZ"
},
{
"name": "Classic",
"choose": "classic",
"image": "http://moodlesite/theme/image.php?theme=classic&image=screenshot&component=theme",
"actionurl": "http://moodlesite/admin/themeselector.php",
"sesskey": "123XYZ"
}
],
"resetbutton": {
"id": "single_button123",
"method": "post",
"url": "index.php",
"label": "Clear theme caches",
"params": [
{
"name": "sesskey",
"value": "123XYZ"
},
{
"name": "reset",
"value": "1"
}
]
}
}
}}
<h2>{{#str}}themeselector, admin{{/str}}</h2>
{{#resetbutton}}
<div class="mb-3">
{{>core/single_button}}
</div>
{{/resetbutton}}
<div class="card-grid row row-cols-1 row-cols-md-3 mx-0" id="themelist" data-region="card-deck" role="list" data-definedinconfig="{{definedinconfig}}">
{{#themes}}
<div class="col d-flex px-1 mb-2">
{{>core_admin/themeselector/theme_card}}
</div>
{{/themes}}
</div>
{{#js}}
require(['core_admin/themeselector/preview_modal'], function(Modal) {
Modal.init();
});
{{/js}}
@@ -1,47 +0,0 @@
{{!
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/>.
}}
{{!
@template core_admin/webservice_token_new
This is the template for displaying the newly created webservice token.
Context variable required for this template:
* token - Token value
Example context (json):
{
"token": "ef9ee4d0c6eed5eab8453a63b93b5b8b"
}
}}
<div class="d-inline-block">
<div class="alert alert-warning">
<div class="lead">{{#str}}tokennewmessage, webservice{{/str}}</div>
</div>
<div class="alert alert-primary">
<div class="lead">{{tokenname}}</div>
<div class="d-flex justify-content-start align-middle">
<div class="lead text-break pt-1" id="copytoclipboardtoken">{{token}}</div>
<button class="btn btn-primary ml-2" data-action="copytoclipboard" data-clipboard-target="#copytoclipboardtoken" data-clipboard-success-message="{{#str}}tokencopied, webservice{{/str}}">
{{#pix}}t/copy, core {{/pix}}{{#str}}copytoclipboard{{/str}}</button>
</div>
</div>
</div>
{{#js}}
require(['core/copy_to_clipboard']);
{{/js}}
-6
View File
@@ -40,12 +40,6 @@ if ($form->is_cancelled()) {
echo $OUTPUT->header();
echo $OUTPUT->heading($headingtitle);
// Displaying noemailever warning.
if (!empty($CFG->noemailever)) {
$msg = get_string('noemaileverwarning', 'admin');
echo $OUTPUT->notification($msg, \core\output\notification::NOTIFY_ERROR);
}
$data = $form->get_data();
if ($data) {
$emailuser = new stdClass();
+2 -2
View File
@@ -56,7 +56,7 @@ Feature: Staff can assign user roles
Scenario: Enrol at activity level using custom field search
When I am on the "page1" "Activity" page logged in as "admin"
And I navigate to "Permissions" in current page administration
And I set the field "Participants tertiary navigation" to "Locally assigned roles"
And I select "Locally assigned roles" from the "jump" singleselect
And I follow "Teacher"
And I set the field "addselect_searchtext" to "Kermit"
# The Behat 'I should see' step doesn't work for optgroup labels.
@@ -72,7 +72,7 @@ Feature: Staff can assign user roles
| user1 | editingteacher | Activity module | page1 |
When I am on the "page1" "Activity" page logged in as "admin"
And I navigate to "Permissions" in current page administration
And I set the field "Participants tertiary navigation" to "Locally assigned roles"
And I select "Locally assigned roles" from the "jump" singleselect
And I follow "Teacher"
And I set the field "removeselect_searchtext" to "Kermit"
# The Behat 'I should see' step doesn't work for optgroup labels.
+1
View File
@@ -75,6 +75,7 @@ class behat_admin extends behat_base {
// Multi element settings, interacting only the first one.
$fieldxpath = "//*[label[contains(., $label)]|span[contains(., $label)]]" .
"/ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' form-item ')]" .
"/descendant::div[contains(concat(' ', @class, ' '), ' form-group ')]" .
"/descendant::*[self::input | self::textarea | self::select]" .
"[not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]";
}
+13 -177
View File
@@ -1,4 +1,4 @@
@core @core_admin @core_reportbuilder
@core @core_admin
Feature: An administrator can browse user accounts
In order to find the user accounts I am looking for
As an admin
@@ -17,24 +17,24 @@ Feature: An administrator can browse user accounts
Scenario: User accounts display default fields
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 "reportbuilder-table" table:
| First name / Last name | Email address |
Then the following should exist in the "users" table:
| 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.
And I should not see "Department" in the "reportbuilder-table" "table"
And I should not see "Attack" in the "reportbuilder-table" "table"
And I should not see "Favourite frog" in the "reportbuilder-table" "table"
And I should not see "Kermit" in the "reportbuilder-table" "table"
And I should not see "First name - phonetic" in the "reportbuilder-table" "table"
And I should not see "Yoozare" in the "reportbuilder-table" "table"
And I should not see "Department" in the "table" "css_element"
And I should not see "Attack"
And I should not see "Favourite frog" in the "table" "css_element"
And I should not see "Kermit"
And I should not see "First name - phonetic" in the "table" "css_element"
And I should not see "Yoozare"
Scenario: User accounts with extra name fields
Given the following config values are set as admin:
| alternativefullnameformat | firstnamephonetic lastname |
When I navigate to "Users > Accounts > Browse list of users" in site administration
Then the following should exist in the "reportbuilder-table" table:
| First name - phonetic / Last name | Email address |
Then the following should exist in the "users" table:
| First name - phonetic | Email address |
| Yewzer One | one@example.com |
| Yoozare Two | two@example.com |
@@ -42,14 +42,13 @@ Feature: An administrator can browse user accounts
Given the following config values are set as admin:
| 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 "reportbuilder-table" table:
| First name / Last name | Favourite frog | Department |
Then the following should exist in the "users" table:
| 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"
And I should not see "one@example.com"
@javascript
Scenario: Sort user accounts by custom profile field
Given the following config values are set as admin:
| showuseridentity | profile_field_frog |
@@ -58,166 +57,3 @@ Feature: An administrator can browse user accounts
Then "Kermit" "text" should appear before "Tree" "text"
And I follow "Favourite frog"
Then "Tree" "text" should appear before "Kermi" "text"
@javascript
Scenario: Edit user information
Given I navigate to "Users > Accounts > Browse list of users" in site administration
And I press "Edit" action in the "User One" report row
And I set the field "Last name" to "OneOne"
And I press "Update profile"
Then I should see "User OneOne"
@javascript
Scenario: Suspend and activate user account
Given I navigate to "Users > Accounts > Browse list of users" in site administration
And I press "Suspend user account" action in the "User One" report row
And I should see "Suspended" in the "User One" "table_row"
And I press "Activate user account" action in the "User One" report row
Then I should not see "Suspended" in the "User One" "table_row"
@javascript
Scenario: Delete a user account
Given I navigate to "Users > Accounts > Browse list of users" in site administration
And I press "Delete" action in the "User One" report row
And I should see "Are you absolutely sure you want to completely delete the user User One" in the "Delete user" "dialogue"
And I click on "Delete" "button" in the "Delete user" "dialogue"
Then I should see "Deleted user User One"
And I should not see "User One" in the "reportbuilder-table" "table"
@javascript
Scenario: Resend email and confirm a user account
Given the following "users" exist:
| username | firstname | lastname | email | confirmed |
| user3 | User | Three | three@example.com | 0 |
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "Confirmation pending" in the "User Three" "table_row"
And I press "Resend confirmation email" action in the "User Three" report row
And I should see "Confirmation email sent successfully"
And I press "Confirm" action in the "User Three" report row
And I should not see "Confirmation pending" in the "User Three" "table_row"
@javascript
Scenario: User report filters
Given the following "users" exist:
| username | firstname | lastname | email | profile_field_frog |
| user3 | User | Three | three@example.com | Glass |
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then the following should exist in the "reportbuilder-table" table:
| First name / Last name | Email address |
| User One | one@example.com |
| User Two | two@example.com |
| User Three | three@example.com |
And I click on "Filters" "button"
And I set the following fields in the "Last name" "core_reportbuilder > Filter" to these values:
| Last name operator | Is equal to |
| Last name value | Three |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I click on "Filters" "button"
And I should see "User Three" in the "reportbuilder-table" "table"
And I should not see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I click on "Filters" "button"
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
And I set the following fields in the "Favourite frog" "core_reportbuilder > Filter" to these values:
| Favourite frog operator | Is equal to |
| Favourite frog value | Kermit |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I click on "Filters" "button"
And I should see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
@javascript
Scenario: User report enrolled in any course filter
Given the following "courses" exist:
| shortname | fullname |
| C1 | Course 1 |
And the following "course enrolments" exist:
| user | course | role |
| user2 | C1 | student |
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then the following should exist in the "reportbuilder-table" table:
| First name / Last name | Email address |
| User One | one@example.com |
| User Two | two@example.com |
And I click on "Filters" "button"
And I set the following fields in the "Enrolled in any course" "core_reportbuilder > Filter" to these values:
| Enrolled in any course operator | Yes |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I click on "Filters" "button"
And I should not see "User One" in the "reportbuilder-table" "table"
And I should see "User Two" in the "reportbuilder-table" "table"
@javascript
Scenario: User report system role and course role filters
Given the following "users" exist:
| username | firstname | lastname | email |
| user3 | User | Three | three@example.com |
And the following "courses" exist:
| shortname | fullname |
| C1 | Course 1 |
And the following "course enrolments" exist:
| user | course | role |
| user1 | C1 | student |
| user2 | C1 | editingteacher |
| user3 | C1 | student |
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| user1 | coursecreator | system | |
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then the following should exist in the "reportbuilder-table" table:
| First name / Last name | Email address |
| User One | one@example.com |
| User Two | two@example.com |
| User Three | three@example.com |
And I click on "Filters" "button"
And I set the following fields in the "System role" "core_reportbuilder > Filter" to these values:
| System role operator | Is equal to |
| System role value | Course creator |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I click on "Filters" "button"
And I should see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I click on "Filters" "button"
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
And I set the following fields in the "Course role" "core_reportbuilder > Filter" to these values:
| Role name | Teacher |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I click on "Filters" "button"
And I should not see "User One" in the "reportbuilder-table" "table"
And I should see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
Scenario: Add a new user
Given I navigate to "Users > Accounts > Browse list of users" in site administration
And I click on "Add a new user" "link"
Then I should see "Username"
And I should see "User picture"
And I should see "Additional names"
@javascript
Scenario: Browse user list as a person with limited capabilities
Given the following "users" exist:
| username | firstname | lastname | email |
| manager | Max | Manager | manager@example.com |
And the following "roles" exist:
| name | shortname | description | archetype |
| Custom manager | custom1 | My custom role 1 | |
And the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/site:configview | Allow | custom1 | System | |
| moodle/user:update | Allow | custom1 | System | |
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| manager | custom1 | System | |
When I log in as "manager"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I click on "User One" "checkbox"
And the "Bulk user actions" select box should contain "Confirm"
And the "Bulk user actions" select box should not contain "Delete"
And I set the field "Bulk user actions" to "Force password change"
And I should see "Are you absolutely sure you want to force a password change to User One ?"
And I press "Yes"
And I press "Continue"
And I should see "Browse list of users"
+2 -2
View File
@@ -28,7 +28,7 @@ Feature: Staff can check user permissions
@javascript
Scenario: Search for a user (enrolled on the course) by custom field and select them to see permissions
When I am on the "C1" "permissions" page logged in as "admin"
And I set the field "Participants tertiary navigation" to "Check permissions"
And I select "Check permissions" from the "jump" singleselect
And I set the field "Search" to "Kermit"
# The Behat 'I should see' step doesn't work for optgroup labels.
Then "optgroup[label='Matching enrolled users (1)']" "css_element" should exist
@@ -42,7 +42,7 @@ Feature: Staff can check user permissions
@javascript
Scenario: Search for a user (not enrolled on the course) by custom field and select them to see permissions
When I am on the "C1" "permissions" page logged in as "admin"
And I set the field "Participants tertiary navigation" to "Check permissions"
And I select "Check permissions" from the "jump" singleselect
And I set the field "Search" to "Kermit"
# The Behat 'I should see' step doesn't work for optgroup labels.
Then "optgroup[label*='Potential users matching'][label*=' (1)']" "css_element" should exist
+96 -137
View File
@@ -1,4 +1,4 @@
@core @core_admin @core_reportbuilder
@core @core_admin
Feature: An administrator can filter user accounts by role, cohort and other profile fields
In order to find the user accounts I am looking for
As an admin
@@ -33,150 +33,109 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
@javascript
Scenario: Filter user accounts by role and cohort
When I click on "Filters" "button"
And I set the following fields in the "Course role" "core_reportbuilder > Filter" to these values:
| Role name | Student |
| Course short name | C1 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
Then I should see "User One" in the "reportbuilder-table" "table"
And I should see "User Two" in the "reportbuilder-table" "table"
And I should see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
And I set the following fields in the "Cohort ID" "core_reportbuilder > Filter" to these values:
| Cohort ID operator | Is equal to |
| Cohort ID value | CH1 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I should not see "User One" in the "reportbuilder-table" "table"
And I should see "User Two" in the "reportbuilder-table" "table"
And I should see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
And I should see "User One" in the "reportbuilder-table" "table"
And I should see "User Two" in the "reportbuilder-table" "table"
And I should see "User Three" in the "reportbuilder-table" "table"
And I should see "User Four" in the "reportbuilder-table" "table"
When I set the following fields to these values:
| courserole_rl | Student |
| courserole_ct | any category |
| courserole | C1 |
And I press "Add filter"
Then I should see "User One"
And I should see "User Two"
And I should see "User Three"
And I should not see "User Four"
And I set the following fields to these values:
| cohort | CH1 |
And I press "Add filter"
And I should not see "User One"
And I should see "User Two"
And I should see "User Three"
And I should not see "User Four"
And I press "Remove all filters"
And I should see "User One"
And I should see "User Two"
And I should see "User Three"
And I should see "User Four"
@javascript
Scenario: Filter user accounts by confirm and authentication method
When I click on "Filters" "button"
And I set the following fields in the "Confirmed" "core_reportbuilder > Filter" to these values:
| Confirmed operator | No |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
Then I should see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should see "User Four" in the "reportbuilder-table" "table"
And I set the following fields in the "Authentication" "core_reportbuilder > Filter" to these values:
| Authentication operator | Is equal to |
| Authentication value | Manual accounts |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I should see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
When I set the following fields to these values:
| Confirmed | No |
And I press "Add filter"
Then I should see "User One"
And I should not see "User Two"
And I should not see "User Three"
And I should see "User Four"
And I set the following fields to these values:
| Authentication | manual |
And I press "Add filter"
And I should see "User One"
And I should not see "User Two"
And I should not see "User Three"
And I should not see "User Four"
@javascript
Scenario: Filter user accounts by enrolled in any course
When I click on "Filters" "button"
And I set the following fields in the "Enrolled in any course" "core_reportbuilder > Filter" to these values:
| Enrolled in any course operator | Yes |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
Then I should see "User One" in the "reportbuilder-table" "table"
And I should see "User Two" in the "reportbuilder-table" "table"
And I should see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
And I set the following fields in the "Enrolled in any course" "core_reportbuilder > Filter" to these values:
| Enrolled in any course operator | No |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I should not see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should see "User Four" in the "reportbuilder-table" "table"
When I set the following fields to these values:
| id_anycourses | Yes |
And I press "Add filter"
Then I should see "User One"
And I should see "User Two"
And I should see "User Three"
And I should not see "User Four"
And I press "Remove all filters"
And I set the following fields to these values:
| id_anycourses | No |
And I press "Add filter"
And I should not see "User One"
And I should not see "User Two"
And I should not see "User Three"
And I should see "User Four"
@javascript
Scenario: Filter user accounts by last IP address
When I click on "Filters" "button"
And I set the following fields in the "Last IP address" "core_reportbuilder > Filter" to these values:
| Last IP address operator | Is equal to |
| Last IP address value | 127.0.1.1 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
Then I should see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
And I set the following fields in the "Last IP address" "core_reportbuilder > Filter" to these values:
| Last IP address operator | Is equal to |
| Last IP address value | 127.0.1.2 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I should not see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should see "User Four" in the "reportbuilder-table" "table"
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
And I should see "User One" in the "reportbuilder-table" "table"
And I should see "User Two" in the "reportbuilder-table" "table"
And I should see "User Three" in the "reportbuilder-table" "table"
And I should see "User Four" in the "reportbuilder-table" "table"
When I set the following fields to these values:
| id_lastip | 127.0.1.1 |
And I press "Add filter"
Then I should see "User One"
And I should not see "User Two"
And I should not see "User Three"
And I should not see "User Four"
And I press "Remove all filters"
And I set the following fields to these values:
| id_lastip | 127.0.1.2 |
And I press "Add filter"
And I should not see "User One"
And I should not see "User Two"
And I should not see "User Three"
And I should see "User Four"
And I press "Remove all filters"
And I should see "User One"
And I should see "User Two"
And I should see "User Three"
And I should see "User Four"
@javascript
Scenario: Filter users by institution and department
When I click on "Filters" "button"
And I set the following fields in the "Institution" "core_reportbuilder > Filter" to these values:
| Institution operator | Is equal to |
| Institution value | moodle |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
Then I should see "User One" in the "reportbuilder-table" "table"
And I should see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
And I set the following fields in the "Department" "core_reportbuilder > Filter" to these values:
| Department operator | Is equal to |
| Department value | red |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I should see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
When I set the field "id_institution" to "moodle"
And I press "Add filter"
Then I should see "User One"
And I should see "User Two"
And I should not see "User Three"
And I should not see "User Four"
And I set the field "id_department" to "red"
And I press "Add filter"
And I should see "User One"
And I should not see "User Two"
@javascript
Scenario: Filter users by custom profile field (specific or any)
When I click on "Filters" "button"
And I set the following fields in the "Favourite frog" "core_reportbuilder > Filter" to these values:
| Favourite frog operator | Is equal to |
| Favourite frog value | Kermit |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
Then I should see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
And I set the following fields in the "Type of undead" "core_reportbuilder > Filter" to these values:
| Type of undead operator | Is equal to |
| Type of undead value | Zombie |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I should see "User Two" in the "reportbuilder-table" "table"
And I should not see "User One" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
@javascript
Scenario: Filter users by full name
When I click on "Filters" "button"
And I set the following fields in the "Full name" "core_reportbuilder > Filter" to these values:
| Full name operator | Is equal to |
| Full name value | User One |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
Then I should see "User One" in the "reportbuilder-table" "table"
And I should not see "User Two" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
And I set the following fields in the "Full name" "core_reportbuilder > Filter" to these values:
| Full name operator | Is equal to |
| Full name value | User Two |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
And I should see "User Two" in the "reportbuilder-table" "table"
And I should not see "User One" in the "reportbuilder-table" "table"
And I should not see "User Three" in the "reportbuilder-table" "table"
And I should not see "User Four" in the "reportbuilder-table" "table"
When I set the field "id_profile_fld" to "Favourite frog"
And I set the field "id_profile" to "Kermit"
And I press "Add filter"
Then I should see "User One"
And I should not see "User Two"
And I should not see "User Three"
And I should not see "User Four"
And I press "Remove all filters"
And I set the field "id_profile_fld" to "any field"
And I set the field "id_profile" to "Zombie"
And I press "Add filter"
And I should see "User Two"
And I should not see "User One"
And I should not see "User Three"
And I should not see "User Four"
@@ -0,0 +1,150 @@
@core @core_admin @javascript
Feature: An administrator can configure the available user list filters
In order to have all needed user filters instantly at hand
As an admin
I want to configure the filters which are shown as default
Scenario: Do not change the user filter default configuration
When I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "User full name"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
And I should not see "City/town" in the "New filter" "fieldset"
And I should not see "Country" in the "New filter" "fieldset"
And I should not see "Confirmed" in the "New filter" "fieldset"
And I should not see "Suspended account" in the "New filter" "fieldset"
And I should not see "User profile fields" in the "New filter" "fieldset"
And I should not see "Course role" in the "New filter" "fieldset"
And I should not see "Enrolled in any course" in the "New filter" "fieldset"
And I should not see "System role" in the "New filter" "fieldset"
And I should not see "Cohort ID" in the "New filter" "fieldset"
And I should not see "First access" in the "New filter" "fieldset"
And I should not see "Last access" in the "New filter" "fieldset"
And I should not see "Last modified" in the "New filter" "fieldset"
And I should not see "Authentication" in the "New filter" "fieldset"
And I should not see "ID number" in the "New filter" "fieldset"
And I should not see "Last IP address" in the "New filter" "fieldset"
And I should not see "MNet ID provider" in the "New filter" "fieldset"
And I navigate to "Users > Accounts > Bulk user actions" in site administration
Then I should see "User full name"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
And I should not see "City/town" in the "New filter" "fieldset"
And I should not see "Country" in the "New filter" "fieldset"
And I should not see "Confirmed" in the "New filter" "fieldset"
And I should not see "Suspended account" in the "New filter" "fieldset"
And I should not see "User profile fields" in the "New filter" "fieldset"
And I should not see "Course role" in the "New filter" "fieldset"
And I should not see "Enrolled in any course" in the "New filter" "fieldset"
And I should not see "System role" in the "New filter" "fieldset"
And I should not see "Cohort ID" in the "New filter" "fieldset"
And I should not see "First access" in the "New filter" "fieldset"
And I should not see "Last access" in the "New filter" "fieldset"
And I should not see "Last modified" in the "New filter" "fieldset"
And I should not see "Authentication" in the "New filter" "fieldset"
And I should not see "ID number" in the "New filter" "fieldset"
And I should not see "Last IP address" in the "New filter" "fieldset"
And I should not see "MNet ID provider" in the "New filter" "fieldset"
Scenario: Change the user filter default configuration to something else
Given the following config values are set as admin:
| userfiltersdefault | realname,username,email |
And I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "User full name"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should see "Username" in the "New filter" "fieldset"
And I should see "Email address" in the "New filter" "fieldset"
And I should not see "City/town" in the "New filter" "fieldset"
And I should not see "Country" in the "New filter" "fieldset"
And I should not see "Confirmed" in the "New filter" "fieldset"
And I should not see "Suspended account" in the "New filter" "fieldset"
And I should not see "User profile fields" in the "New filter" "fieldset"
And I should not see "Course role" in the "New filter" "fieldset"
And I should not see "Enrolled in any course" in the "New filter" "fieldset"
And I should not see "System role" in the "New filter" "fieldset"
And I should not see "Cohort ID" in the "New filter" "fieldset"
And I should not see "First access" in the "New filter" "fieldset"
And I should not see "Last access" in the "New filter" "fieldset"
And I should not see "Last modified" in the "New filter" "fieldset"
And I should not see "Authentication" in the "New filter" "fieldset"
And I should not see "ID number" in the "New filter" "fieldset"
And I should not see "Last IP address" in the "New filter" "fieldset"
And I should not see "MNet ID provider" in the "New filter" "fieldset"
And I navigate to "Users > Accounts > Bulk user actions" in site administration
Then I should see "User full name"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should see "Username" in the "New filter" "fieldset"
And I should see "Email address" in the "New filter" "fieldset"
And I should not see "City/town" in the "New filter" "fieldset"
And I should not see "Country" in the "New filter" "fieldset"
And I should not see "Confirmed" in the "New filter" "fieldset"
And I should not see "Suspended account" in the "New filter" "fieldset"
And I should not see "User profile fields" in the "New filter" "fieldset"
And I should not see "Course role" in the "New filter" "fieldset"
And I should not see "Enrolled in any course" in the "New filter" "fieldset"
And I should not see "System role" in the "New filter" "fieldset"
And I should not see "Cohort ID" in the "New filter" "fieldset"
And I should not see "First access" in the "New filter" "fieldset"
And I should not see "Last access" in the "New filter" "fieldset"
And I should not see "Last modified" in the "New filter" "fieldset"
And I should not see "Authentication" in the "New filter" "fieldset"
And I should not see "ID number" in the "New filter" "fieldset"
And I should not see "Last IP address" in the "New filter" "fieldset"
And I should not see "MNet ID provider" in the "New filter" "fieldset"
Scenario: Change the user filter default configuration to no filter at all
Given the following config values are set as admin:
| userfiltersdefault | |
And I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "User full name"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
And I should not see "City/town" in the "New filter" "fieldset"
And I should not see "Country" in the "New filter" "fieldset"
And I should not see "Confirmed" in the "New filter" "fieldset"
And I should not see "Suspended account" in the "New filter" "fieldset"
And I should not see "User profile fields" in the "New filter" "fieldset"
And I should not see "Course role" in the "New filter" "fieldset"
And I should not see "Enrolled in any course" in the "New filter" "fieldset"
And I should not see "System role" in the "New filter" "fieldset"
And I should not see "Cohort ID" in the "New filter" "fieldset"
And I should not see "First access" in the "New filter" "fieldset"
And I should not see "Last access" in the "New filter" "fieldset"
And I should not see "Last modified" in the "New filter" "fieldset"
And I should not see "Authentication" in the "New filter" "fieldset"
And I should not see "ID number" in the "New filter" "fieldset"
And I should not see "Last IP address" in the "New filter" "fieldset"
And I should not see "MNet ID provider" in the "New filter" "fieldset"
And I navigate to "Users > Accounts > Bulk user actions" in site administration
Then I should see "User full name"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
And I should not see "City/town" in the "New filter" "fieldset"
And I should not see "Country" in the "New filter" "fieldset"
And I should not see "Confirmed" in the "New filter" "fieldset"
And I should not see "Suspended account" in the "New filter" "fieldset"
And I should not see "User profile fields" in the "New filter" "fieldset"
And I should not see "Course role" in the "New filter" "fieldset"
And I should not see "Enrolled in any course" in the "New filter" "fieldset"
And I should not see "System role" in the "New filter" "fieldset"
And I should not see "Cohort ID" in the "New filter" "fieldset"
And I should not see "First access" in the "New filter" "fieldset"
And I should not see "Last access" in the "New filter" "fieldset"
And I should not see "Last modified" in the "New filter" "fieldset"
And I should not see "Authentication" in the "New filter" "fieldset"
And I should not see "ID number" in the "New filter" "fieldset"
And I should not see "Last IP address" in the "New filter" "fieldset"
And I should not see "MNet ID provider" in the "New filter" "fieldset"
+9 -36
View File
@@ -19,32 +19,19 @@ Feature: Manage external services tokens
And I am on site homepage
And I navigate to "Server > Web services > Manage tokens" in site administration
And I press "Create token"
And I set the field "Name" to "Webservice1"
And I set the field "User" to "Firstname1 Lastname1"
And I set the field "Service" to "Moodle mobile web service"
And I set the field "IP restriction" to "127.0.0.1"
When I press "Save changes"
Then the following should exist in the "generaltable" table:
| Name | First name | Service | IP restriction | Last access |
| Webservice1 | Firstname1 Lastname1 | Moodle mobile web service | 127.0.0.1 | Never |
# Verify the message and the "Copy to clipboard" button.
And I should see "Copy the token now. It won't be shown again once you leave this page."
And "Copy to clipboard" "button" should exist
# New token can only read once.
And I reload the page
And I should not see "Copy the token now. It won't be shown again once you leave this page."
And "Copy to clipboard" "button" should not exist
# Delete token.
And I click on "Delete" "link" in the "Webservice1" "table_row"
Then I should see "Moodle mobile web service" in the "Firstname1 Lastname1" "table_row"
And I should see "127.0.0.1" in the "Firstname1 Lastname1" "table_row"
And I click on "Delete" "link" in the "Firstname1 Lastname1" "table_row"
And I should see "Do you really want to delete this web service token for Firstname1 Lastname1 on the service Moodle mobile web service?"
And I press "Delete"
And "Webservice1" "table_row" should not exist
And "Firstname1 Lastname1" "table_row" should not exist
@javascript @skip_chrome_zerosize
Scenario: Tokens can be filtered by name (case-insensitive), by user and by service
Scenario: Tokens can be filtered by user and by service
Given the following "core_webservice > Service" exists:
| name | Site information |
| shortname | siteinfo |
@@ -53,10 +40,10 @@ Feature: Manage external services tokens
| service | siteinfo |
| functions | core_webservice_get_site_info |
And the following "core_webservice > Tokens" exist:
| user | service | name |
| user2 | siteinfo | WEBservice1 |
| user3 | moodle_mobile_app | webservicE3 |
| user4 | siteinfo | New service2 |
| user | service |
| user2 | siteinfo |
| user3 | moodle_mobile_app |
| user4 | siteinfo |
When I log in as "admin"
And I navigate to "Server > Web services > Manage tokens" in site administration
@@ -66,20 +53,6 @@ Feature: Manage external services tokens
And I should see "Moodle mobile web service" in the "Firstname3 Lastname3" "table_row"
And I should see "Site information" in the "Firstname4 Lastname4" "table_row"
# Filter tokens by by name (case-insensitive).
And I click on "Tokens filter" "link"
And I set the field "Name" to "webservice"
And I press "Show only matching tokens"
And I should see "Site information" in the "Firstname2 Lastname2" "table_row"
And I should see "Moodle mobile web service" in the "Firstname3 Lastname3" "table_row"
And "Firstname4 Lastname4" "table_row" should not exist
# Reset the filter.
And I press "Show all tokens"
And I should see "Site information" in the "Firstname2 Lastname2" "table_row"
And I should see "Moodle mobile web service" in the "Firstname3 Lastname3" "table_row"
And I should see "Site information" in the "Firstname4 Lastname4" "table_row"
# Filter tokens by user (note we can select the user by the identity field here).
When I click on "Tokens filter" "link"
And I set the field "User" to "user2@example.com"
+55 -55
View File
@@ -7,35 +7,35 @@ Feature: Reset course indentation
Background:
Given the following "courses" exist:
| fullname | shortname | format |
| Sections Course 1 | T1 | topics |
| Sections Course 2 | T2 | topics |
| Topics Course 1 | T1 | topics |
| Topics Course 2 | T2 | topics |
| Weekly Course 1 | W1 | weeks |
| Weekly Course 2 | W2 | weeks |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| forum | Sections forum name | Sections forum description | T1 | forum1 |
| data | Sections database name | Sections database description | T1 | data1 |
| wiki | Sections wiki name | Sections wiki description | T2 | wiki1 |
| forum | Weekly forum name | Weekly forum description | W1 | forum2 |
| data | Weekly database name | Weekly database description | W1 | data2 |
| wiki | Weekly wiki name | Weekly wiki description | W2 | wiki2 |
| activity | name | intro | course | idnumber |
| forum | Topics forum name | Topics forum description | T1 | forum1 |
| data | Topics database name | Topics database description | T1 | data1 |
| wiki | Topics wiki name | Topics wiki description | T2 | wiki1 |
| forum | Weekly forum name | Weekly forum description | W1 | forum2 |
| data | Weekly database name | Weekly database description | W1 | data2 |
| wiki | Weekly wiki name | Weekly wiki description | W2 | wiki2 |
And I log in as "admin"
And I am on "Sections Course 1" course homepage with editing mode on
And I open "Sections forum name" actions menu
And I click on "Move right" "link" in the "Sections forum name" activity
And I open "Sections forum name" actions menu
And "Move right" "link" in the "Sections forum name" "activity" should not be visible
And "Move left" "link" in the "Sections forum name" "activity" should be visible
And I am on "Topics Course 1" course homepage with editing mode on
And I open "Topics forum name" actions menu
And I click on "Move right" "link" in the "Topics forum name" activity
And I open "Topics forum name" actions menu
And "Move right" "link" in the "Topics forum name" "activity" should not be visible
And "Move left" "link" in the "Topics forum name" "activity" should be visible
And I press the escape key
And I open "Sections database name" actions menu
And "Move right" "link" in the "Sections database name" "activity" should be visible
And "Move left" "link" in the "Sections database name" "activity" should not be visible
And I am on "Sections Course 2" course homepage with editing mode on
And I open "Sections wiki name" actions menu
And I click on "Move right" "link" in the "Sections wiki name" activity
And I open "Sections wiki name" actions menu
And "Move right" "link" in the "Sections wiki name" "activity" should not be visible
And "Move left" "link" in the "Sections wiki name" "activity" should be visible
And I open "Topics database name" actions menu
And "Move right" "link" in the "Topics database name" "activity" should be visible
And "Move left" "link" in the "Topics database name" "activity" should not be visible
And I am on "Topics Course 2" course homepage with editing mode on
And I open "Topics wiki name" actions menu
And I click on "Move right" "link" in the "Topics wiki name" activity
And I open "Topics wiki name" actions menu
And "Move right" "link" in the "Topics wiki name" "activity" should not be visible
And "Move left" "link" in the "Topics wiki name" "activity" should be visible
And I am on "Weekly Course 1" course homepage with editing mode on
And I open "Weekly forum name" actions menu
And I click on "Move right" "link" in the "Weekly forum name" activity
@@ -54,7 +54,7 @@ Feature: Reset course indentation
And "Move left" "link" in the "Weekly wiki name" "activity" should be visible
Scenario Outline: Apply course indentation reset
Given I navigate to "Plugins > Course formats > <format>" in site administration
Given I navigate to "Plugins > Course formats > <format> format" in site administration
And I wait "5" seconds
And "Reset indentation sitewide" "link" should exist
When I click on "Reset indentation sitewide" "link"
@@ -62,31 +62,31 @@ Feature: Reset course indentation
And "Reset indentation sitewide" "button" should exist
And I click on "Reset indentation sitewide" "button"
Then I should see "Indentation reset."
And I am on "<prefix> Course 1" course homepage with editing mode on
And I open "<prefix> forum name" actions menu
And "Move right" "link" in the "<prefix> forum name" "activity" should be visible
And "Move left" "link" in the "<prefix> forum name" "activity" should not be visible
And I am on "<format> Course 1" course homepage with editing mode on
And I open "<format> forum name" actions menu
And "Move right" "link" in the "<format> forum name" "activity" should be visible
And "Move left" "link" in the "<format> forum name" "activity" should not be visible
And I press the escape key
And I open "<prefix> database name" actions menu
And "Move right" "link" in the "<prefix> database name" "activity" should be visible
And "Move left" "link" in the "<prefix> database name" "activity" should not be visible
And I am on "<prefix> Course 2" course homepage with editing mode on
And I open "<prefix> wiki name" actions menu
And "Move right" "link" in the "<prefix> wiki name" "activity" should be visible
And "Move left" "link" in the "<prefix> wiki name" "activity" should not be visible
# Check other course formats had not been reset
And I open "<format> database name" actions menu
And "Move right" "link" in the "<format> database name" "activity" should be visible
And "Move left" "link" in the "<format> database name" "activity" should not be visible
And I am on "<format> Course 2" course homepage with editing mode on
And I open "<format> wiki name" actions menu
And "Move right" "link" in the "<format> wiki name" "activity" should be visible
And "Move left" "link" in the "<format> wiki name" "activity" should not be visible
# Check other course formats had not been reset
And I am on "<other> Course 1" course homepage with editing mode on
And I open "<other> forum name" actions menu
And "Move right" "link" in the "<other> forum name" "activity" should not be visible
And "Move left" "link" in the "<other> forum name" "activity" should be visible
Examples:
| format | prefix | other |
| Custom sections | Sections | Weekly |
| Weekly sections | Weekly | Sections |
| format | other |
| Topics | Weekly |
| Weekly | Topics |
Scenario Outline: Cancel course indentation reset
Given I navigate to "Plugins > Course formats > <format>" in site administration
Given I navigate to "Plugins > Course formats > <format> format" in site administration
And "Reset indentation sitewide" "link" should exist
When I click on "Reset indentation sitewide" "link"
And I should see "Reset indentation sitewide"
@@ -94,20 +94,20 @@ Feature: Reset course indentation
And "Cancel" "button" should exist
And I click on "Cancel" "button"
Then I should not see "Indentation reset."
And I am on "<prefix> Course 1" course homepage with editing mode on
And I open "<prefix> forum name" actions menu
And "Move right" "link" in the "<prefix> forum name" "activity" should not be visible
And "Move left" "link" in the "<prefix> forum name" "activity" should be visible
And I am on "<format> Course 1" course homepage with editing mode on
And I open "<format> forum name" actions menu
And "Move right" "link" in the "<format> forum name" "activity" should not be visible
And "Move left" "link" in the "<format> forum name" "activity" should be visible
And I press the escape key
And I open "<prefix> database name" actions menu
And "Move right" "link" in the "<prefix> database name" "activity" should be visible
And "Move left" "link" in the "<prefix> database name" "activity" should not be visible
And I am on "<prefix> Course 2" course homepage with editing mode on
And I open "<prefix> wiki name" actions menu
And "Move right" "link" in the "<prefix> wiki name" "activity" should not be visible
And "Move left" "link" in the "<prefix> wiki name" "activity" should be visible
And I open "<format> database name" actions menu
And "Move right" "link" in the "<format> database name" "activity" should be visible
And "Move left" "link" in the "<format> database name" "activity" should not be visible
And I am on "<format> Course 2" course homepage with editing mode on
And I open "<format> wiki name" actions menu
And "Move right" "link" in the "<format> wiki name" "activity" should not be visible
And "Move left" "link" in the "<format> wiki name" "activity" should be visible
Examples:
| format | prefix |
| Custom sections | Sections |
| Weekly sections | Weekly |
| format |
| Topics |
| Weekly |
@@ -46,24 +46,17 @@ class task_logs_test extends core_reportbuilder_testcase {
$this->resetAfterTest();
$this->generate_task_log_data(true, 3, 2, 1654038000, 1654038060);
$this->generate_task_log_data(false, 5, 1, 1654556400, 1654556700);
/** @var core_reportbuilder_generator $generator */
$generator = $this->getDataGenerator()->get_plugin_generator('core_reportbuilder');
$report = $generator->create_report(['name' => 'Tasks', 'source' => task_logs::class, 'default' => 1]);
$content = $this->get_custom_report_content($report->get('id'));
$this->assertCount(2, $content);
$this->assertCount(1, $content);
// Default columns are name, start time, duration, result. Sorted by start time descending.
// Default columns are name, starttime, duration, result.
[$name, $timestart, $duration, $result] = array_values($content[0]);
$this->assertStringContainsString(send_schedules::class, $name);
$this->assertEquals('7/06/22, 07:00:00', $timestart);
$this->assertEquals('5 mins', $duration);
$this->assertEquals('Fail', $result);
[$name, $timestart, $duration, $result] = array_values($content[1]);
$this->assertStringContainsString(send_schedules::class, $name);
$this->assertEquals('1/06/22, 07:00:00', $timestart);
$this->assertEquals('1 min', $duration);
$this->assertEquals('Success', $result);
@@ -1,114 +0,0 @@
<?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/>.
declare(strict_types=1);
namespace core_admin\reportbuilder\local\filters;
use advanced_testcase;
use lang_string;
use core_reportbuilder\local\report\filter;
/**
* Unit tests for course role report filter
*
* @package core_admin
* @covers \core_admin\reportbuilder\local\filters\courserole
* @copyright 2023 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class courserole_test extends advanced_testcase {
/**
* Data provider for {@see test_get_sql_filter}
*
* @return array[]
*/
public static function get_sql_filter_provider(): array {
return [
'Empty filter' => ['', '', '', ['admin', 'guest', 'user1', 'user2', 'user3', 'user4']],
'Filter by role' => ['editingteacher', '', '', ['user1', 'user3', 'user4']],
'Filter by role in category' => ['editingteacher', 'cat2', '', ['user1', 'user3']],
'Filter by role in category and course' => ['editingteacher', 'cat2', 'course2', ['user1']],
'Filter by role in course' => ['student', '', 'course2', ['user2']],
'Filter by category' => ['', 'cat2', '', ['user1', 'user2', 'user3']],
'Filter by category and course' => ['', 'cat2', 'course2', ['user1', 'user2']],
'Filter by course' => ['', '', 'course3', ['user3']],
'Filter by course (ensure whitespace is trimmed)' => ['', '', ' course3 ', ['user3']],
];
}
/**
* Test getting filter SQL
*
* @param string $rolename
* @param string $categoryname
* @param string $course
* @param string[] $expectedusers
*
* @dataProvider get_sql_filter_provider
*/
public function test_get_sql_filter(
string $rolename,
string $categoryname,
string $course,
array $expectedusers,
): void {
global $DB;
$this->resetAfterTest();
// Create categories/course structure (categoryone: courseone; categorytwo: coursetwo/coursethree).
$categoryone = $this->getDataGenerator()->create_category(['name' => 'cat1']);
$courseone = $this->getDataGenerator()->create_course(['category' => $categoryone->id, 'shortname' => 'course1']);
$categorytwo = $this->getDataGenerator()->create_category(['name' => 'cat2']);
$coursetwo = $this->getDataGenerator()->create_course(['category' => $categorytwo->id, 'shortname' => 'course2']);
$coursethree = $this->getDataGenerator()->create_course(['category' => $categorytwo->id, 'shortname' => 'course3']);
// User one is a teacher in courseone/coursetwo.
$userone = $this->getDataGenerator()->create_and_enrol($courseone, 'editingteacher', ['username' => 'user1']);
$this->getDataGenerator()->enrol_user($userone->id, $coursetwo->id, 'editingteacher');
// User two is a student in coursetwo.
$usertwo = $this->getDataGenerator()->create_and_enrol($coursetwo, 'student', ['username' => 'user2']);
// User three is a teacher in courseone/coursethree.
$userthree = $this->getDataGenerator()->create_and_enrol($courseone, 'editingteacher', ['username' => 'user3']);
$this->getDataGenerator()->enrol_user($userthree->id, $coursethree->id, 'editingteacher');
// User four is a teacher in courseone.
$userfour = $this->getDataGenerator()->create_and_enrol($courseone, 'editingteacher', ['username' => 'user4']);
$filter = new filter(
courserole::class,
'test',
new lang_string('yes'),
'testentity',
'id',
);
// Create instance of our filter, passing given operators (with lookups for role/category).
[$select, $params] = courserole::create($filter)->get_sql_filter([
$filter->get_unique_identifier() . '_role' => $DB->get_field('role', 'id', ['shortname' => $rolename]),
$filter->get_unique_identifier() . '_category' => $DB->get_field('course_categories', 'id', ['name' => $categoryname]),
$filter->get_unique_identifier() . '_course' => $course,
]);
$users = $DB->get_fieldset_select('user', 'username', $select, $params);
$this->assertEqualsCanonicalizing($expectedusers, $users);
}
}
-154
View File
@@ -1,154 +0,0 @@
<?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/>.
/**
* Theme selector page for admin use.
*
* @package core_admin
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../config.php');
require_once($CFG->libdir . '/adminlib.php');
$choose = optional_param('choose', '', PARAM_PLUGIN);
$reset = optional_param('reset', 0, PARAM_BOOL);
$confirmation = optional_param('confirmation', 0, PARAM_BOOL);
admin_externalpage_setup('themeselector');
unset($SESSION->theme);
$PAGE->set_primary_active_tab('siteadminnode');
$PAGE->navbar->add(get_string('themeselector', 'admin'), $PAGE->url);
$PAGE->set_pagelayout('standard');
// Clear theme cache.
if ($reset && confirm_sesskey()) {
theme_reset_all_caches();
}
$definedinconfig = array_key_exists('theme', $CFG->config_php_settings);
if ($definedinconfig) {
$forcedthemename = get_string('pluginname', 'theme_'.$CFG->theme);
// Show a notification that the theme is defined in config.php.
\core\notification::info(get_string('themedefinedinconfigphp', 'admin', $forcedthemename));
}
// Change theme.
if (!$definedinconfig && !empty($choose) && confirm_sesskey()) {
// Load the theme to make sure it is valid.
$theme = theme_config::load($choose);
if ($theme instanceof \theme_config) {
set_config('theme', $theme->name);
$notifytype = 'success';
$notifymessage = get_string('themesaved');
} else {
$notifytype = 'error';
$notifymessage = get_string('error');
}
// Redirect with notification.
redirect(new moodle_url('/admin/themeselector.php'), $notifymessage, null, $notifytype);
}
// Insert header.
echo $OUTPUT->header();
// Prepare data for rendering.
$data = [];
$index = 0;
$currentthemeindex = 0;
$themes = core_component::get_plugin_list('theme');
// Loop through available themes.
foreach ($themes as $themename => $themedir) {
try {
$theme = theme_config::load($themename);
} catch (Exception $e) {
// Bad theme, just skip it for now.
continue;
}
if ($themename !== $theme->name) {
// Obsoleted or broken theme, just skip for now.
continue;
}
if (empty($CFG->themedesignermode) && $theme->hidefromselector) {
// The theme doesn't want to be shown in the theme selector and as theme
// designer mode is switched off we will respect that decision.
continue;
}
// All params for modal use are set here, except for 'choosereadme' (description).
// That string can be long. We will fetch it with JS as opposed to passing it as an attribute.
$themedata = [];
// The 'name' param is formatted and should not to be confused with 'choose'.
$themedata['name'] = get_string('pluginname', 'theme_'.$themename);;
$themedata['choose'] = $themename;
// Image to display for previewing.
$image = new moodle_url('/theme/image.php', ['theme' => $themename, 'image' => 'screenshot', 'component' => 'theme']);
$themedata['image'] = $image;
// Is this the current theme?
if ($themename === $CFG->theme) {
$themedata['current'] = true;
$currentthemeindex = $index;
} else if (!$definedinconfig) {
// Form params.
$actionurl = new moodle_url('/admin/themeselector.php');
$themedata['actionurl'] = $actionurl;
$themedata['sesskey'] = sesskey();
}
// Settings url.
$settingspath = "$themedir/settings.php";
if (file_exists($settingspath)) {
$section = "themesetting{$themename}";
$settingsurl = new moodle_url('/admin/settings.php', ['section' => $section]);
$themedata['settingsurl'] = $settingsurl;
}
// Link to the theme usage report if override enabled and it is being used in at least one context.
if (\core\output\theme_usage::is_theme_used_in_any_context($themename) === \core\output\theme_usage::THEME_IS_USED) {
$reporturl = new moodle_url($CFG->wwwroot . '/report/themeusage/index.php');
$reporturl->params(['themechoice' => $themename]);
$themedata['reporturl'] = $reporturl->out(false);
}
$data[$index] = $themedata;
$index++;
}
// Reorder the array to always have the current theme first.
if (isset($data[$currentthemeindex])) {
$currenttheme = $data[$currentthemeindex];
unset($data[$currentthemeindex]);
array_unshift($data, $currenttheme);
}
// Show theme selector.
$renderable = new \core_admin\output\theme_selector($data, $definedinconfig);
$renderer = $PAGE->get_renderer('core', 'admin');
echo $renderer->theme_selector_list($renderable);
// Show footer.
echo $OUTPUT->footer();
@@ -31,7 +31,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason(): string {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
@@ -14,13 +14,13 @@ Feature: I can apply presets
Scenario: Applying Starter Moodle preset changes status and settings
# Checking the settings before applying Full Moodle preset (we're only testing one of each type).
Given I navigate to "Plugins > Activity modules > Manage activities" in site administration
And "Disable Database" "icon" should exist in the "Database" "table_row"
And "Disable Chat" "icon" should exist in the "Chat" "table_row"
And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
And "Hide" "icon" should exist in the "Restriction by grouping" "table_row"
And I navigate to "Plugins > Blocks > Manage blocks" in site administration
And "Disable Logged in user" "icon" should exist in the "Logged in user" "table_row"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
And "Disable" "icon" should exist in the "Social" "table_row"
And "Disable" "icon" should exist in the "Social format" "table_row"
And I navigate to "Plugins > Question behaviours > Manage question behaviours" in site administration
And "Enabled" "icon" should exist in the "Immediate feedback with CBM" "table_row"
And I navigate to "Plugins > Question types > Manage question types" in site administration
@@ -40,9 +40,9 @@ Feature: I can apply presets
And I should see "Calculated" in the "Setting changes" "table"
And I should see "Calculated multichoice" in the "Setting changes" "table"
And I should see "Calculated simple" in the "Setting changes" "table"
And I should see "Database" in the "Setting changes" "table"
And "Database" row "Current value" column of "Setting changes" table should contain "Enabled"
And "Database" row "New value" column of "Setting changes" table should contain "Disabled"
And I should see "Chat" in the "Setting changes" "table"
And "Chat" row "Current value" column of "Setting changes" table should contain "Enabled"
And "Chat" row "New value" column of "Setting changes" table should contain "Disabled"
And I should see "Cohort sync" in the "Setting changes" "table"
And I should see "Comments" in the "Setting changes" "table"
And I should see "Course completion status" in the "Setting changes" "table"
@@ -92,9 +92,9 @@ Feature: I can apply presets
And I should see "Server files" in the "Setting changes" "table"
And I should see "Show data retention summary" in the "Setting changes" "table"
And I should see "Social activities" in the "Setting changes" "table"
And I should see "Social" in the "Setting changes" "table"
And I should see "Social format" in the "Setting changes" "table"
And I should see "Starred courses" in the "Setting changes" "table"
And I should see "Lesson" in the "Setting changes" "table"
And I should see "Survey" in the "Setting changes" "table"
And I should see "Tags" in the "Setting changes" "table"
And I should see "URL downloader" in the "Setting changes" "table"
And I should see "Wiki" in the "Setting changes" "table"
@@ -109,13 +109,13 @@ Feature: I can apply presets
And the field "Enable badges" matches value "0"
And the field "Enable competencies" matches value "0"
And I navigate to "Plugins > Activity modules > Manage activities" in site administration
And "Disable Database" "icon" should not exist in the "Database" "table_row"
And "Disable Chat" "icon" should not exist in the "Chat" "table_row"
And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
And "Hide" "icon" should not exist in the "Restriction by grouping" "table_row"
And I navigate to "Plugins > Blocks > Manage blocks" in site administration
And "Disable Logged in user" "icon" should not exist in the "Logged in user" "table_row"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
And "Disable" "icon" should not exist in the "Social" "table_row"
And "Disable" "icon" should not exist in the "Social format" "table_row"
And I navigate to "Plugins > Question behaviours > Manage question behaviours" in site administration
And "Enabled" "icon" should not exist in the "Immediate feedback with CBM" "table_row"
And I navigate to "Plugins > Question types > Manage question types" in site administration
@@ -20,13 +20,13 @@ Feature: I can revert changes after a load
And the field "Enable badges" matches value "0"
And the field "Enable competencies" matches value "0"
And I navigate to "Plugins > Activity modules > Manage activities" in site administration
And "Disable Database" "icon" should not exist in the "Database" "table_row"
And "Disable Chat" "icon" should not exist in the "Chat" "table_row"
And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
And "Hide" "icon" should not exist in the "Restriction by grouping" "table_row"
And I navigate to "Plugins > Blocks > Manage blocks" in site administration
And "Disable Logged in user" "icon" should not exist in the "Logged in user" "table_row"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
And "Disable" "icon" should not exist in the "Social" "table_row"
And "Disable" "icon" should not exist in the "Social format" "table_row"
And I navigate to "Plugins > Question behaviours > Manage question behaviours" in site administration
And "Enabled" "icon" should not exist in the "Immediate feedback with CBM" "table_row"
And I navigate to "Plugins > Question types > Manage question types" in site administration
@@ -39,13 +39,13 @@ Feature: I can revert changes after a load
Then the field "Enable badges" matches value "1"
And the field "Enable competencies" matches value "1"
And I navigate to "Plugins > Activity modules > Manage activities" in site administration
And "Disable Database" "icon" should exist in the "Database" "table_row"
And "Disable Chat" "icon" should exist in the "Chat" "table_row"
And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
And "Hide" "icon" should exist in the "Restriction by grouping" "table_row"
And I navigate to "Plugins > Blocks > Manage blocks" in site administration
And "Disable Logged in user" "icon" should exist in the "Logged in user" "table_row"
And I navigate to "Plugins > Course formats > Manage course formats" in site administration
And "Disable" "icon" should exist in the "Social" "table_row"
And "Disable" "icon" should exist in the "Social format" "table_row"
And I navigate to "Plugins > Question behaviours > Manage question behaviours" in site administration
And "Enabled" "icon" should exist in the "Immediate feedback with CBM" "table_row"
And I navigate to "Plugins > Question types > Manage question types" in site administration
+2 -2
View File
@@ -26,5 +26,5 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'tool_admin_presets';
$plugin->version = 2024042200;
$plugin->requires = 2024041600;
$plugin->version = 2023042400;
$plugin->requires = 2023041800;
+7 -7
View File
@@ -1,10 +1,10 @@
define("tool_analytics/log_info",["exports","core/modal","core/str"],(function(_exports,_modal,_str){var obj;
/**
* Shows a dialogue with info about this logs.
*
* @module tool_analytics/log_info
* @copyright 2017 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.loadInfo=void 0,_modal=(obj=_modal)&&obj.__esModule?obj:{default:obj};_exports.loadInfo=(id,info)=>{document.addEventListener("click",(e=>{if(!e.target.closest('[data-model-log-id="'.concat(id,'"]')))return;e.preventDefault();const bodyInfo=document.createElement("ul");info.forEach((item=>{const li=document.createElement("li");li.innerHTML=item,bodyInfo.append(li)})),_modal.default.create({title:(0,_str.get_string)("loginfo","tool_analytics"),body:bodyInfo.outerHTML,large:!0,show:!0,removeOnClose:!0})}))}}));
* Shows a dialogue with info about this logs.
*
* @module tool_analytics/log_info
* @copyright 2017 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_analytics/log_info",["jquery","core/str","core/modal_factory","core/notification"],(function($,str,ModalFactory,Notification){return{loadInfo:function(id,info){var link=$('[data-model-log-id="'+id+'"]');str.get_string("loginfo","tool_analytics").then((function(langString){var bodyInfo=$("<ul>");return info.forEach((function(item){bodyInfo.append("<li>"+item+"</li>")})),bodyInfo.append("</ul>"),ModalFactory.create({title:langString,body:bodyInfo.html(),large:!0},link)})).catch(Notification.exception)}}}));
//# sourceMappingURL=log_info.min.js.map
@@ -1 +1 @@
{"version":3,"file":"log_info.min.js","sources":["../src/log_info.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Shows a dialogue with info about this logs.\n *\n * @module tool_analytics/log_info\n * @copyright 2017 David Monllao {@link http://www.davidmonllao.com}\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\nimport Modal from 'core/modal';\nimport {get_string as getString} from 'core/str';\n\n/**\n * Prepares a modal info for a log's results.\n *\n * @param {Number} id\n * @param {string[]} info\n */\nexport const loadInfo = (id, info) => {\n document.addEventListener('click', (e) => {\n const link = e.target.closest(`[data-model-log-id=\"${id}\"]`);\n if (!link) {\n return;\n }\n e.preventDefault();\n const bodyInfo = document.createElement('ul');\n info.forEach((item) => {\n const li = document.createElement('li');\n li.innerHTML = item;\n bodyInfo.append(li);\n });\n\n Modal.create({\n title: getString('loginfo', 'tool_analytics'),\n body: bodyInfo.outerHTML,\n large: true,\n show: true,\n removeOnClose: true,\n });\n });\n};\n"],"names":["id","info","document","addEventListener","e","target","closest","preventDefault","bodyInfo","createElement","forEach","item","li","innerHTML","append","create","title","body","outerHTML","large","show","removeOnClose"],"mappings":";;;;;;;8JA+BwB,CAACA,GAAIC,QACzBC,SAASC,iBAAiB,SAAUC,QACnBA,EAAEC,OAAOC,sCAA+BN,iBAIrDI,EAAEG,uBACIC,SAAWN,SAASO,cAAc,MACxCR,KAAKS,SAASC,aACJC,GAAKV,SAASO,cAAc,MAClCG,GAAGC,UAAYF,KACfH,SAASM,OAAOF,sBAGdG,OAAO,CACTC,OAAO,mBAAU,UAAW,kBAC5BC,KAAMT,SAASU,UACfC,OAAO,EACPC,MAAM,EACNC,eAAe"}
{"version":3,"file":"log_info.min.js","sources":["../src/log_info.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Shows a dialogue with info about this logs.\n *\n * @module tool_analytics/log_info\n * @copyright 2017 David Monllao {@link http://www.davidmonllao.com}\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/str', 'core/modal_factory', 'core/notification'], function($, str, ModalFactory, Notification) {\n\n return /** @alias module:tool_analytics/log_info */ {\n\n /**\n * Prepares a modal info for a log's results.\n *\n * @method loadInfo\n * @param {int} id\n * @param {string[]} info\n */\n loadInfo: function(id, info) {\n\n var link = $('[data-model-log-id=\"' + id + '\"]');\n str.get_string('loginfo', 'tool_analytics').then(function(langString) {\n\n var bodyInfo = $(\"<ul>\");\n info.forEach(function(item) {\n bodyInfo.append('<li>' + item + '</li>');\n });\n bodyInfo.append(\"</ul>\");\n\n return ModalFactory.create({\n title: langString,\n body: bodyInfo.html(),\n large: true,\n }, link);\n\n }).catch(Notification.exception);\n }\n };\n});\n"],"names":["define","$","str","ModalFactory","Notification","loadInfo","id","info","link","get_string","then","langString","bodyInfo","forEach","item","append","create","title","body","html","large","catch","exception"],"mappings":";;;;;;;AAsBAA,iCAAO,CAAC,SAAU,WAAY,qBAAsB,sBAAsB,SAASC,EAAGC,IAAKC,aAAcC,oBAEjD,CAShDC,SAAU,SAASC,GAAIC,UAEfC,KAAOP,EAAE,uBAAyBK,GAAK,MAC3CJ,IAAIO,WAAW,UAAW,kBAAkBC,MAAK,SAASC,gBAElDC,SAAWX,EAAE,eACjBM,KAAKM,SAAQ,SAASC,MAClBF,SAASG,OAAO,OAASD,KAAO,YAEpCF,SAASG,OAAO,SAETZ,aAAaa,OAAO,CACvBC,MAAON,WACPO,KAAMN,SAASO,OACfC,OAAO,GACRZ,SAEJa,MAAMjB,aAAakB"}
+1 -1
View File
@@ -5,6 +5,6 @@
* @copyright 2017 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_analytics/model",["jquery","core/str","core/log","core/notification","core/modal_save_cancel","core/modal_cancel","core/modal_events","core/templates"],(function($,Str,log,Notification,ModalSaveCancel,ModalCancel,ModalEvents,Templates){var actionsList={clear:{title:{key:"clearpredictions",component:"tool_analytics"},body:{key:"clearmodelpredictions",component:"tool_analytics"}},delete:{title:{key:"delete",component:"tool_analytics"},body:{key:"deletemodelconfirmation",component:"tool_analytics"}}};return{confirmAction:function(actionId,actionType){$('[data-action-id="'+actionId+'"]').on("click",(function(ev){ev.preventDefault();var a=$(ev.currentTarget);if(void 0!==actionsList[actionType]){var wrap,reqStrings=[actionsList[actionType].title,actionsList[actionType].body];reqStrings[1].param=(wrap=$(a).closest("[data-model-name]")).length?wrap.attr("data-model-name"):(log.error("Unexpected DOM error - unable to obtain the model name"),"");var stringsPromise=Str.get_strings(reqStrings),modalPromise=ModalSaveCancel.create({});$.when(stringsPromise,modalPromise).then((function(strings,modal){return modal.setTitle(strings[0]),modal.setBody(strings[1]),modal.setSaveButtonText(strings[0]),modal.getRoot().on(ModalEvents.save,(function(){window.location.href=a.attr("href")})),modal.show(),modal})).fail(Notification.exception)}else log.error('Action "'+actionType+'" is not allowed.')}))},selectEvaluationOptions:function(actionId,trainedOnlyExternally){$('[data-action-id="'+actionId+'"]').on("click",(function(ev){ev.preventDefault();var a=$(ev.currentTarget),timeSplittingMethods=$(this).attr("data-timesplitting-methods");ModalSaveCancel.create({title:Str.get_string("evaluatemodel","tool_analytics"),body:Templates.render("tool_analytics/evaluation_options",{trainedexternally:trainedOnlyExternally,timesplittingmethods:JSON.parse(timeSplittingMethods)}),removeOnClose:!0,buttons:{save:Str.get_string("evaluate","tool_analytics")},show:!0}).then((modal=>(modal.getRoot().on(ModalEvents.save,(function(){"trainedmodel"==$("input[name='evaluationmode']:checked").val()&&a.attr("href",a.attr("href")+"&mode=trainedmodel");var timeSplittingMethod=$("#id-evaluation-timesplitting").val();a.attr("href",a.attr("href")+"&timesplitting="+timeSplittingMethod),window.location.href=a.attr("href")})),modal))).catch(Notification.exception)}))},selectExportOptions:function(actionId,isTrained){$('[data-action-id="'+actionId+'"]').on("click",(function(ev){ev.preventDefault();var a=$(ev.currentTarget);if(!isTrained)return a.attr("href",a.attr("href")+"&action=exportmodel&includeweights=0"),void(window.location.href=a.attr("href"));var stringsPromise=Str.get_strings([{key:"export",component:"tool_analytics"}]),modalPromise=ModalSaveCancel.create({body:Templates.render("tool_analytics/export_options",{}),removeOnClose:!0});$.when(stringsPromise,modalPromise).then((function(strings,modal){return modal.setTitle(strings[0]),modal.setSaveButtonText(strings[0]),modal.getRoot().on(ModalEvents.save,(function(){"exportdata"==$("input[name='exportoption']:checked").val()?a.attr("href",a.attr("href")+"&action=exportdata"):(a.attr("href",a.attr("href")+"&action=exportmodel"),$("#id-includeweights").is(":checked")?a.attr("href",a.attr("href")+"&includeweights=1"):a.attr("href",a.attr("href")+"&includeweights=0")),window.location.href=a.attr("href")})),modal.show(),modal})).fail(Notification.exception)}))}}}));
define("tool_analytics/model",["jquery","core/str","core/log","core/notification","core/modal_factory","core/modal_events","core/templates"],(function($,Str,log,Notification,ModalFactory,ModalEvents,Templates){var actionsList={clear:{title:{key:"clearpredictions",component:"tool_analytics"},body:{key:"clearmodelpredictions",component:"tool_analytics"}},delete:{title:{key:"delete",component:"tool_analytics"},body:{key:"deletemodelconfirmation",component:"tool_analytics"}}};return{confirmAction:function(actionId,actionType){$('[data-action-id="'+actionId+'"]').on("click",(function(ev){ev.preventDefault();var a=$(ev.currentTarget);if(void 0!==actionsList[actionType]){var wrap,reqStrings=[actionsList[actionType].title,actionsList[actionType].body];reqStrings[1].param=(wrap=$(a).closest("[data-model-name]")).length?wrap.attr("data-model-name"):(log.error("Unexpected DOM error - unable to obtain the model name"),"");var stringsPromise=Str.get_strings(reqStrings),modalPromise=ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL});$.when(stringsPromise,modalPromise).then((function(strings,modal){return modal.setTitle(strings[0]),modal.setBody(strings[1]),modal.setSaveButtonText(strings[0]),modal.getRoot().on(ModalEvents.save,(function(){window.location.href=a.attr("href")})),modal.show(),modal})).fail(Notification.exception)}else log.error('Action "'+actionType+'" is not allowed.')}))},selectEvaluationOptions:function(actionId,trainedOnlyExternally){$('[data-action-id="'+actionId+'"]').on("click",(function(ev){ev.preventDefault();var a=$(ev.currentTarget),timeSplittingMethods=$(this).attr("data-timesplitting-methods"),stringsPromise=Str.get_strings([{key:"evaluatemodel",component:"tool_analytics"},{key:"evaluate",component:"tool_analytics"}]),modalPromise=ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL}),bodyPromise=Templates.render("tool_analytics/evaluation_options",{trainedexternally:trainedOnlyExternally,timesplittingmethods:JSON.parse(timeSplittingMethods)});$.when(stringsPromise,modalPromise).then((function(strings,modal){return modal.getRoot().on(ModalEvents.hidden,modal.destroy.bind(modal)),modal.setTitle(strings[0]),modal.setSaveButtonText(strings[1]),modal.setBody(bodyPromise),modal.getRoot().on(ModalEvents.save,(function(){"trainedmodel"==$("input[name='evaluationmode']:checked").val()&&a.attr("href",a.attr("href")+"&mode=trainedmodel");var timeSplittingMethod=$("#id-evaluation-timesplitting").val();a.attr("href",a.attr("href")+"&timesplitting="+timeSplittingMethod),window.location.href=a.attr("href")})),modal.show(),modal})).fail(Notification.exception)}))},selectExportOptions:function(actionId,isTrained){$('[data-action-id="'+actionId+'"]').on("click",(function(ev){ev.preventDefault();var a=$(ev.currentTarget);if(!isTrained)return a.attr("href",a.attr("href")+"&action=exportmodel&includeweights=0"),void(window.location.href=a.attr("href"));var stringsPromise=Str.get_strings([{key:"export",component:"tool_analytics"}]),modalPromise=ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL}),bodyPromise=Templates.render("tool_analytics/export_options",{});$.when(stringsPromise,modalPromise).then((function(strings,modal){return modal.getRoot().on(ModalEvents.hidden,modal.destroy.bind(modal)),modal.setTitle(strings[0]),modal.setSaveButtonText(strings[0]),modal.setBody(bodyPromise),modal.getRoot().on(ModalEvents.save,(function(){"exportdata"==$("input[name='exportoption']:checked").val()?a.attr("href",a.attr("href")+"&action=exportdata"):(a.attr("href",a.attr("href")+"&action=exportmodel"),$("#id-includeweights").is(":checked")?a.attr("href",a.attr("href")+"&includeweights=1"):a.attr("href",a.attr("href")+"&includeweights=0")),window.location.href=a.attr("href")})),modal.show(),modal})).fail(Notification.exception)}))}}}));
//# sourceMappingURL=model.min.js.map

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