Compare commits

...

331 Commits

Author SHA1 Message Date
Shamim Rezaie 860bd3783d weekly release 4.1.22+ 2025-12-12 14:07:07 +11:00
AMOS bot 99a6ce8328 Automatically generated installer lang files 2025-12-11 00:07:45 +00:00
Huong Nguyen df1157bb84 Moodle release 4.1.22 2025-12-07 08:05:28 +07:00
Huong Nguyen 6e3f6a9cb9 weekly release 4.1.21+ 2025-12-05 08:09:28 +07:00
Huong Nguyen 98f72dee05 Merge branch 'MDL-87068-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-12-04 10:02:27 +07:00
Angelia Dela Cruz 4284ff971e MDL-87068 contentbank_h5p: Behat for restoring course contentbank 2025-12-04 10:34:32 +08:00
Huong Nguyen ec20fc4868 MDL-72744 table: Improve PHPUnit test 2025-12-04 08:56:40 +07:00
David Woloszyn e2f12b1e7a MDL-72744 core_grades: Escape formulas when exporting spreadsheets 2025-12-04 08:56:40 +07:00
David Woloszyn 347e10c764 MDL-72744 dataformat: Escape formulas when exporting spreadsheets
Co-authored-by: Huong Nguyen <huongnv13@gmail.com>
2025-12-04 08:56:40 +07:00
Huong Nguyen 191365e09f MDL-86087 core: Use correct required version 2025-12-04 08:37:48 +07:00
Huong Nguyen 04b3e9d359 Merge branch 'MDL-87091-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-12-03 16:11:48 +07:00
mioyu-ubiq 4419db89d2 MDL-87091 behat: Test authloginviaemail setting behavior 2025-12-03 15:56:41 +08:00
Huong Nguyen a5aeb2ef10 MDL-87353 core: Safer unserializing of file references 2025-12-03 14:18:16 +08:00
Jun Pataleta c4e2106834 Merge branch 'MDL-86087-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2025-12-03 14:09:45 +08:00
Stefan Hanauska 906f0191aa MDL-86960 mod_glossary: Check user 2025-12-03 13:45:50 +08:00
Stefan Hanauska 6a0b2ee174 MDL-86960 mod_data: Check user 2025-12-03 13:45:43 +08:00
Stefan Hanauska 1e54b2a86b MDL-86960 mod_forum: Check user 2025-12-03 13:45:37 +08:00
Jake Dallimore 8f31bda522 MDL-87286 enrol_lti: prevent suspended user account auth in legacy LTI 2025-12-03 15:52:20 +11:00
Jake Dallimore bdeba5416a MDL-87286 auth_lti: prevent suspended user account auth in LTI1p3 2025-12-03 15:52:20 +11:00
Mihail Geshoski 238bc8bf87 MDL-82808 assign: Use blindid during submission removal in blind marking 2025-12-03 09:50:48 +08:00
Rajneel Totaram 20388bbdac MDL-82808 mod_assign: replace userid with blindid in anonymous marking 2025-12-03 09:50:48 +08:00
Huong Nguyen 2354627702 MDL-86087 core: Define environment requirements for Moodle 5.2 2025-11-28 09:10:05 +07:00
David Woloszyn 592dcf7f7f MDL-86544 lib: Adjust checks on local URL params 2025-11-27 11:50:19 +00:00
Eric Merrill 0f54245988 MDL-80317 auth_oauth2: Restrict login redirect to local url 2025-11-27 11:50:19 +00:00
David Woloszyn 22f722d2d0 MDL-85557 atto_equation: Sanitise equation preview input 2025-11-27 11:50:19 +00:00
David Woloszyn ec12af83dd MDL-85557 tiny_equation: Sanitise equation preview input 2025-11-27 11:50:19 +00:00
Stefan Hanauska 4e47698ca9 MDL-86507 badge: Check if role is assigned 2025-11-27 11:50:19 +00:00
yusufwib01 e6651b7bde MDL-86326 auth: Enhance validation logic in resend_confirmation_email 2025-11-27 11:50:19 +00:00
Mihail Geshoski d0dc60895c weekly release 4.1.21+ 2025-11-27 19:41:09 +08:00
Mihail Geshoski 3512c1fe32 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-11-27 19:41:04 +08:00
Andrew Nicols 26bea242d9 Merge branch 'MDL-86255-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2025-11-27 11:12:13 +08:00
Mihail Geshoski c6672aa58c Merge branch 'MDL-87149-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2025-11-26 17:31:53 +08:00
Paul Holden c0e2de83b2 Merge branch 'MDL-87046-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2025-11-25 15:25:39 +00:00
AMOS bot 6dfc4a77eb Automatically generated installer lang files 2025-11-23 00:08:06 +00:00
Huong Nguyen 6dc2d2b9ec weekly release 4.1.21+ 2025-11-21 14:34:04 +07:00
Huong Nguyen 3046f836aa Merge branch 'MDL-87048-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-11-21 08:17:53 +07:00
Huong Nguyen 54e1488821 Merge branch 'MDL-84735-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-11-21 08:17:53 +07:00
Andrew Nicols b7cd590de7 MDL-87046 core: Fix shutdown manager early return
If the `\core_shutdown_manager::initialize` method is called multiple
times, it should only succeed once.

Unfortunately whilst logging existed, the shutdown manager did not
actually exit.
2025-11-21 08:53:03 +08:00
Angelia Dela Cruz ffa968a34a MDL-87048 tool_lp: Behat for synchronising cohort with learning plan 2025-11-20 10:28:55 +08:00
Angelia Dela Cruz cd4c94ca68 MDL-84735 gradingform: Behat for modifying marking guide criterion 2025-11-20 07:09:05 +08:00
Julien Boulen f8b2bf5a3f MDL-86320 core: Fix unit test qrcode_test 2025-11-19 10:06:29 +07:00
Huong Nguyen 63ab738ae2 Merge branch 'MDL-86907-401' of https://github.com/mioyu-ubiq/moodle into MOODLE_401_STABLE 2025-11-19 10:03:33 +07:00
mioyu-ubiq f0c327b94c MDL-86907 mod_choice: Behat test for adding multiple choice responses 2025-11-18 15:05:20 +08:00
Simey Lameze 18065046f4 MDL-87050 behat: use src for img xpath selector 2025-11-18 10:51:13 +07:00
Huong Nguyen 0d58c33e7d Merge branch 'MDL-87050-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-11-17 15:58:32 +07:00
Jun Pataleta bc575ee1ac MDL-87149 mod_feedback: Generate dependent questions
Allow the generator to create questions that depend on other questions.
2025-11-17 12:47:54 +08:00
Mihail Geshoski f087c4eb99 weekly release 4.1.21+ 2025-11-13 18:49:39 +08:00
Angelia Dela Cruz 60bc55dc8c MDL-87050 mod_folder: Behat for preventing forced file downloads 2025-11-13 16:53:02 +08:00
Huong Nguyen f04d7d4a3f Merge branch 'MDL-86895-401' of https://github.com/mioyu-ubiq/moodle into MOODLE_401_STABLE 2025-11-13 10:44:22 +07:00
Huong Nguyen 6c06fab0a1 Merge branch 'MDL-79249-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-11-13 10:20:54 +07:00
Huong Nguyen 291e340b9a Merge branch 'MDL-87047-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-11-13 10:17:10 +07:00
Mihail Geshoski 90d176b2d5 Merge branch 'MDL-86963-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-11-12 17:17:42 +08:00
Mihail Geshoski 86a7753def Merge branch 'MDL-85686-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-11-12 17:05:01 +08:00
Angelia Dela Cruz 4563fd2fe2 MDL-87047 tool_lp: Behat optimisation 2025-11-12 16:40:22 +08:00
Mihail Geshoski da14987cbf Merge branch 'MDL-86886-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-11-12 16:40:11 +08:00
Angelia Dela Cruz 035f84ee8c MDL-87047 tool_lp: Behat to complete a learning plan and alter it 2025-11-12 16:35:20 +08:00
Angelia Dela Cruz 3e0a272b74 MDL-86963 tool_lp: Behat to perform CRUD operations on competencies 2025-11-12 16:01:07 +08:00
Angelia Dela Cruz f3a499a129 MDL-86886 tool_lp: Behat to move and cross-reference competencies 2025-11-11 16:10:15 +08:00
Mio Yu 629338999b MDL-86895 core_grades: Behat to verify listing and grading submissions 2025-11-11 12:59:00 +08:00
Simey Lameze 75f2b6ad5d MDL-85686 mod_quiz: unit test coverage for questions shuffle 2025-11-11 11:38:44 +08:00
Huong Nguyen 637a6bdb45 weekly release 4.1.21+ 2025-11-07 14:49:44 +07:00
Huong Nguyen 7c7ae75b1f Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-11-07 14:49:42 +07:00
Huong Nguyen fb3d29e53d MDL-69226 environment: filter extension required for 4.1 2025-11-06 18:23:12 +08:00
Mihail Geshoski 6f77d3c5b0 Merge branch 'MDL-87073-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2025-11-06 17:09:54 +08:00
Huong Nguyen 4b7ccd75d8 MDL-87073 PHPUnit: Use non-DST timezone for comparing
Including in this commit
 - Use America/New_York instead of US/Eastern
2025-11-06 15:47:30 +07:00
Huong Nguyen 053e93b18a Merge branch 'MDL-87049-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-11-06 15:40:48 +07:00
Huong Nguyen e84c2d821a Merge branch 'MDL-87079-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2025-11-06 15:38:23 +07:00
Simey Lameze a6d9be042d MDL-87049 behat: read showcampaigncontent setting when running behat 2025-11-06 08:52:30 +08:00
Angelia Dela Cruz a255637c74 MDL-87049 core: Behat to toggle campaign content banner display 2025-11-06 08:52:30 +08:00
AMOS bot b19752f929 Automatically generated installer lang files 2025-11-06 00:07:40 +00:00
Andrew Nicols c9ce233f08 MDL-87079 core: Call existing pcntl handlers
Whilst `register_shutdown_function` works as a queue, `pcntl_signal`
does not.

To preserve the behaviour of existing signal handlers, as are typically
found in CLI wrappers like PHPUnit and Behat, we should store any
existing handler
2025-11-05 08:52:34 +08:00
Jun Pataleta 7f5911b137 Merge branch 'MDL-86833-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2025-11-04 13:29:35 +08:00
Angelia Dela Cruz 2ca67ce948 MDL-79249 core_filepicker: Cancel file and folder upload using X button 2025-11-03 11:32:37 +08:00
Huong Nguyen ccbfbbc3bf Merge branch 'MDL-69226-M401_verify-that-the-filter-php-extension-is-present' of https://github.com/ziegenberg/moodle into MOODLE_401_STABLE 2025-11-03 09:02:33 +07:00
AMOS bot 9c4134efca Automatically generated installer lang files 2025-11-01 00:07:40 +00:00
Mihail Geshoski 752ed6e63e weekly release 4.1.21+ 2025-10-30 18:11:54 +08:00
Mihail Geshoski 7ed44dc763 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-10-30 18:11:50 +08:00
Mihail Geshoski ba295cac53 Merge branch 'MDL-86894-401' of https://github.com/Kredelirious/moodle into MOODLE_401_STABLE 2025-10-29 10:19:41 +08:00
Daniel Ziegenberg ef0c245178 MDL-69226 environment: filter extension required
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-10-28 19:40:35 +01:00
Kim Jared Lucas f3fcc635e9 MDL-86894 mod_forum: Behat to verify default forum RSS settings 2025-10-28 13:15:27 +08:00
AMOS bot e375cbc024 Automatically generated installer lang files 2025-10-28 00:09:30 +00:00
Amaia Anabitarte be83232f57 Merge branch 'MDL-86971-401' of https://github.com/bhect0/moodle into MOODLE_401_STABLE 2025-10-27 18:12:26 +01:00
Héctor Benedicte 3a3d251c91 MDL-86971 core: replace str_contains() for PHP 7.4 compatibility. 2025-10-27 12:38:30 +01:00
Huong Nguyen 7135adf77c weekly release 4.1.21+ 2025-10-24 11:00:52 +07:00
Huong Nguyen 3a53982564 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-10-24 11:00:51 +07:00
ferran 52d8c7259b Merge branch 'MDL-86969-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2025-10-22 14:16:59 +02:00
Sara Arjona 95a93ab74d MDL-86969 badges: Replace str_contains with PHP7.4 compatible method 2025-10-22 06:47:55 +02:00
Paul Holden 40736ec563 MDL-86255 behat: implement methods to assert date/time field value. 2025-10-21 11:34:58 +01:00
Mihail Geshoski 3b37608523 Merge branch 'MDL-85696-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-10-20 10:30:48 +08:00
Angelia Dela Cruz adcb52a66c MDL-85696 mod_quiz: Behat to attempt password and time restricted quiz 2025-10-17 17:47:37 +08:00
AMOS bot c899c6fb5a Automatically generated installer lang files 2025-10-15 00:09:17 +00:00
AMOS bot 6d6fea6c3e Automatically generated installer lang files 2025-10-09 00:08:55 +00:00
Paul Holden 9a257e13c2 MDL-86833 behat: remove stray upgrade notes file. 2025-10-06 09:13:25 +01:00
Huong Nguyen 239be346a1 Moodle release 4.1.21 2025-10-04 09:02:50 +07:00
AMOS bot e23a5c6b85 Automatically generated installer lang files 2025-10-04 00:07:41 +00:00
Shamim Rezaie fd6667f694 weekly release 4.1.20+ 2025-10-03 20:02:43 +10:00
Mihail Geshoski 6d990ff157 MDL-75087 mod_assign: Fix failing behat tests in classic 2025-10-03 14:23:15 +07:00
Mihail Geshoski 5ad39879ea MDL-75087 mod_assign: Fix failing unit test 2025-10-02 18:10:13 +07:00
Rajneel Totaram 0e8027d3dd MDL-75087 mod_assign: Respect assignment timer
This patch has better handling of timed assignments.
Users cannot directly access the submission page without
confirming to begin a timed assignment.
2025-10-02 10:48:05 +08:00
Mihail Geshoski 13ab8ce3f6 Merge branch 'MDL-86637-401' of https://github.com/cameron1729/moodle into MOODLE_401_STABLE 2025-10-02 01:31:42 +08:00
yusufwib01 321f20bde4 MDL-86353 mod_assign: Sync exception handling in PdfType and PdfReader 2025-09-30 09:24:29 +07:00
Paul Holden ccb94debcf MDL-85421 cohort: limit requests for all cohorts to system context. 2025-09-29 13:34:09 +07:00
David Woloszyn 596f290ca7 MDL-86327 auth_webservice: Stricter check on login 2025-09-29 08:24:56 +07:00
yusufwib01 3cf753aea9 MDL-86261 calendar: Improve event form to show accessible groups 2025-09-26 12:00:20 +00:00
cescobedo 2689a8fdd3 weekly release 4.1.20+ 2025-09-26 13:44:36 +02:00
AMOS bot 0ef7b2853d Automatically generated installer lang files 2025-09-25 00:07:39 +00:00
Sara Arjona 3389ddbe77 weekly release 4.1.20+ 2025-09-23 17:21:20 +02:00
Huong Nguyen 9c0d3f8037 Merge branch 'MDL-84870-401' of https://github.com/andimendunia/moodle into MOODLE_401_STABLE 2025-09-22 08:29:01 +07:00
Huong Nguyen 7b5bdf9b6e weekly release 4.1.20+ 2025-09-18 08:34:34 +07:00
Huong Nguyen 78468dffaa Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-09-18 08:34:32 +07:00
Huong Nguyen d314c4719d MDL-86495 core: Improve PHPUnit for IPLookup 2025-09-16 08:52:18 +07:00
Andi Permana 4b30d08025 MDL-84870 core: Update security.txt expiry 2025-09-15 13:04:41 +07:00
Cameron Ball bc29ef5d9e MDL-86637 core: Use ReflectionProperty to access static navigation data
In PHP 7.4.0, ReflectionClass and static properties don't play nicely
together. Using ReflectionProperty side steps the issue.
2025-09-15 13:01:56 +08:00
Huong Nguyen 3030cde4ba MDL-86495 core: Better errors handling for IP Lookup
- Since `Geoplugin` is not free anymore, a new admin setting called `GeoPlugin API key` has been added for user to input
  their API key if they still want to use `Geoplugin` service.
- The `iplookup_find_location()` method has been improved to handle error responses more effectively.
2025-09-09 08:47:14 +07:00
AMOS bot bfef5e4581 Automatically generated installer lang files 2025-09-06 00:07:42 +00:00
AMOS bot 17c4412033 Automatically generated installer lang files 2025-09-03 00:07:39 +00:00
AMOS bot 5b9e5416d5 Automatically generated installer lang files 2025-09-01 00:07:35 +00:00
cescobedo d3777d8a06 weekly release 4.1.20+ 2025-08-29 15:01:25 +02:00
Huong Nguyen 3613faf8d6 Merge branch 'MDL-86452-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2025-08-29 08:46:43 +07:00
Andrew Nicols 9b060f43ce MDL-86452 core: Reset navigation data between tests 2025-08-28 13:13:05 +08:00
cescobedo d63b359944 weekly release 4.1.20+ 2025-08-26 15:54:21 +02:00
cescobedo 144c57c4ff Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-08-26 15:54:19 +02:00
Mihail Geshoski 9956df769b Merge branch 'MDL-85677-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-08-26 11:55:55 +08:00
Huong Nguyen b2fab52908 Merge branch 'MDL-86315-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2025-08-26 09:23:42 +07:00
Simey Lameze 787199fa99 MDL-85677 behat: test to verify SEB download link visibility 2025-08-26 09:19:15 +08:00
Mihail Geshoski 0afa5bfdb5 Merge branch 'MDL-85676-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-08-26 00:42:17 +08:00
Simey Lameze 9247cf1bd6 MDL-85676 behat: validate SEB attempt message 2025-08-25 14:08:20 +08:00
AMOS bot 42eeec6261 Automatically generated installer lang files 2025-08-24 00:09:44 +00:00
Mihail Geshoski 8b234f6690 weekly release 4.1.20+ 2025-08-22 20:40:46 +08:00
Mihail Geshoski f4795ade4a Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-08-22 20:40:42 +08:00
Huong Nguyen fc1a79d882 Merge branch 'MDL-86231-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2025-08-22 08:47:08 +07:00
AMOS bot 6b715e7e7f Automatically generated installer lang files 2025-08-16 00:07:39 +00:00
David Woloszyn bd96199040 MDL-86315 registration: Unset emails in hub when dependant value not set 2025-08-15 13:01:17 +10:00
AMOS bot 127b856a73 Automatically generated installer lang files 2025-08-14 00:07:47 +00:00
AMOS bot 28f675da81 Automatically generated installer lang files 2025-08-13 00:07:48 +00:00
Andrew Nicols f2552bb9c4 MDL-86231 behat: Support array callable syntax in execute method 2025-08-08 11:42:26 +08:00
Mihail Geshoski 3966291cd5 Moodle release 4.1.20 2025-08-08 10:48:50 +08:00
Sara Arjona 0c9f0c4bbf weekly release 4.1.19+ 2025-08-07 16:45:26 +02:00
Sara Arjona 35edd02d74 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-08-07 16:45:23 +02:00
Ilya Tregubov be2c290b2f MDL-63395 user: Fix profile visibility check.
It needs to be done in user_get_user_details as well.
2025-08-07 10:31:15 +07:00
Jun Pataleta 9ec4f4b386 Merge branch 'MDL-85674-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-08-07 10:43:57 +08:00
AMOS bot 52d90156aa Automatically generated installer lang files 2025-08-07 00:07:42 +00:00
ferran 44757023a1 Merge branch 'MDL-86176-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2025-08-06 16:22:04 +02:00
Sara Arjona 061049e5cf MDL-86176 badges: Adjust badges due to Canvas Credentials changes
This change addresses necessary adjustments to how OBV2.0 badges are
sent to backpacks, specifically to ensure compatibility and correct
functionality following recent updates to Canvas Credentials' conditions.

It ensures our badge integration continues to operate smoothly despite
these external changes.
2025-08-06 15:21:40 +02:00
Simey Lameze 1ce514e02f MDL-85674 behat: replace multiple steps by a single table step 2025-08-06 18:29:58 +08:00
andelacruz 5eb65b8a7c MDL-85674 mod_grade: Behat test for multiple questions manual grading 2025-08-06 18:21:03 +08:00
Huong Nguyen 2b41fcb73d MDL-84464 report_log: Fix EOF 2025-08-06 10:39:58 +07:00
Laurent David 5f2880ea13 MDL-84464 report_loglive: Hide report for teacher without groups 2025-08-06 10:23:12 +07:00
Laurent David edd9c78756 MDL-84464 report_log: Hide report for teachers without groups
* Teachers without groups in SEPARATEGROUP mode should not see the report log page nor access it
2025-08-06 10:23:12 +07:00
Laurent David 7c3b3af98c MDL-84463 mod_feedback: Fix behat test
* Fix typo in test description
* Use the right step to edit questions
2025-08-05 03:40:26 +00:00
Laurent David 3d3f842be3 MDL-84463 mod_feedback: Fix users in no group and email
* Non editing teachers in no group should not receive feedback emails
from students in no group
2025-08-05 03:40:26 +00:00
Laurent David 4fd6963185 MDL-84463 mod_feedback: Fix show entries and nonrespondents
* Non editing teachers not in a groups should not see entries
from other users
2025-08-05 03:40:26 +00:00
raortegar 4e7263a65a MDL-85704 mod_bigbluebuttonbn: Update sesskey handling for compatibility 2025-08-05 03:40:26 +00:00
Mihail Geshoski 5cb86be37b Merge branch 'MDL-85565_401' of https://github.com/PhilippImhof/moodle into MOODLE_401_STABLE 2025-08-05 11:33:34 +08:00
Sara Arjona a9cf9eb991 weekly release 4.1.19+ 2025-07-31 16:08:52 +02:00
Sara Arjona 9269de8830 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-07-31 16:08:49 +02:00
Michael Hawkins 4d2b0e8e17 Merge branch 'MDL-85362-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2025-07-31 14:43:17 +08:00
Huong Nguyen 71a794bec6 Merge branch 'MDL-84485-Select-webservice-in-wstoken-behat-breadcrumb-401' of https://github.com/farhan6318/moodle into MOODLE_401_STABLE 2025-07-31 10:18:05 +07:00
AMOS bot ba9ed2e56e Automatically generated installer lang files 2025-07-31 00:07:46 +00:00
Mihail Geshoski ae15c3d214 Merge branch 'MDL-86113-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2025-07-30 23:28:04 +08:00
Farhan Karmali 80c8402050 MDL-84485 webservice: Add Behat step for mobile web service selection 2025-07-29 16:09:02 +05:30
AMOS bot 53e2ba10f2 Automatically generated installer lang files 2025-07-28 13:16:42 +00:00
Philipp Imhof ccf93c9b86 MDL-85565 phpunit: check for <select> before <option>
Make sure that assert_select_options() will fail when the output does
not contain a <select> and therefore does not have the given options.
2025-07-25 13:14:16 +02:00
Jake Dallimore dfa1545e4c MDL-86113 mod_lti: skip slow network calls during tests
This check exists to determine whether a given tool URL is a cartridge,
specifically when the URL does not end in .xml. It hits the URL to
determine this. In tests, we have many mock tool URLs, which won't
resolve, and running this code causes large hangs and random failures.
Any tests covering cartridge support still work fine, provided they
continue to use URLs ending in .xml; this change only skips the check
during tests for other non-xml URLs.
2025-07-25 16:52:18 +08:00
Michael Hawkins 206a64a376 weekly release 4.1.19+ 2025-07-25 12:14:56 +08:00
Huong Nguyen 1a2eab4adb Merge branch 'MDL-86049-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2025-07-24 09:48:04 +07:00
Huong Nguyen 3a68cb5ec1 MDL-85362 core: Define environment requirements for Moodle 5.1 2025-07-22 10:54:31 +07:00
Andrew Nicols 7b79251c63 MDL-86049 core: Do not use the component cache before purge
When trying to resolve a corrupt cache where it is not possible to
complete the Moodle setup/bootstrap, it is necessary to ignore the
current cache to load the cache purging infrastructure.
2025-07-21 12:25:26 +08:00
Mihail Geshoski 8adb42acb7 weekly release 4.1.19+ 2025-07-18 14:53:06 +08:00
Mihail Geshoski 3491e73f43 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-07-18 14:53:03 +08:00
Huong Nguyen 16fe869164 Merge branch 'MDL-86016-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2025-07-15 09:56:54 +07:00
Andrew Nicols 6b56bfbb2f MDL-86016 core: Remove xmldb test in favour of unit test 2025-07-15 09:33:19 +08:00
Andrew Nicols 6e37aba2f1 MDL-86016 tests: Make install.xml test less restrictive 2025-07-15 09:33:19 +08:00
AMOS bot ad38a2d971 Automatically generated installer lang files 2025-07-12 00:07:38 +00:00
Michael Hawkins 5f47dc23ff weekly release 4.1.19+ 2025-07-11 12:49:45 +08:00
Mihail Geshoski 70fe9e2361 Merge branch 'MDL-85689-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-07-10 11:36:06 +08:00
andelacruz 3dada91163 MDL-85689 mod_quiz: Behat for adding and deleting page from quiz 2025-07-09 16:32:44 +08:00
Huong Nguyen 34309b79a3 Merge branch 'MDL-85697-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-07-09 09:11:07 +07:00
Huong Nguyen 4f5a6d3c5b Merge branch 'MDL-85947-M401_bump-GHA-ubuntu-24-04' of https://github.com/ziegenberg/moodle into MOODLE_401_STABLE 2025-07-08 17:36:03 +07:00
andelacruz 2eb2524353 MDL-85697 mod_lesson: Behat for lesson group and user overrides 2025-07-08 17:29:52 +08:00
andelacruz f669d7619b MDL-85697 mod_assign: Behat for assignment group and user overrides 2025-07-08 17:28:35 +08:00
andelacruz 93c7b15257 MDL-85697 mod_quiz: Behat for quiz group and user overrides 2025-07-08 17:23:44 +08:00
Daniel Ziegenberg 88d3c6e72b MDL-85947 ci: Bump GHA to Ubuntu 24.04
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-07-07 16:17:54 +02:00
Mihail Geshoski 3342f23b29 weekly release 4.1.19+ 2025-07-06 09:31:13 +08:00
Mihail Geshoski d450f05832 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-07-06 09:31:09 +08:00
Mihail Geshoski c5900cbe2e Merge branch 'patch/MDL-85666-401' of https://github.com/skodak/moodle into MOODLE_401_STABLE 2025-07-03 09:53:02 +08:00
Petr Skoda 220d1d7a23 MDL-85666 phpunit: add general plugin tests
This defines new group which can be used
to limit execution of these tests to one plugin only.

For example to execute all tests for Label module use:

phpunit --testsuite=mod_label_testsuite
phpunit --group=plugin_checks --filter=mod_label

or

phpunit --filter=mod_label
2025-07-02 07:11:25 +02:00
AMOS bot b56058f1d5 Automatically generated installer lang files 2025-07-02 00:09:35 +00:00
Huong Nguyen 27396dc954 weekly release 4.1.19+ 2025-06-29 16:19:04 +07:00
Huong Nguyen f489998aec Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-06-29 16:19:02 +07:00
Mihail Geshoski 8b2c1e4297 Merge branch 'MDL-85665-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-06-26 10:41:33 +08:00
andelacruz 44f0e44d8b MDL-85665 mod_quiz: Behat to build quiz in single activity format course 2025-06-24 18:26:15 +08:00
AMOS bot 7251cc06d3 Automatically generated installer lang files 2025-06-15 00:09:37 +00:00
Mihail Geshoski 4f61b2974b weekly release 4.1.19+ 2025-06-13 14:43:57 +08:00
Huong Nguyen 88d166ba77 MDL-85316 dml: Revert DB vendor changes 2025-06-12 17:11:49 +07:00
Huong Nguyen 13a23c43aa Merge branch 'MDL-85316-401-mysql-version' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2025-06-11 13:34:10 +07:00
meirzamoodle 4e3a28c454 MDL-85316 admin: Add environment check for AWS Aurora database 2025-06-11 10:49:13 +07:00
Mihail Geshoski a0a0458154 Moodle release 4.1.19 2025-06-06 12:26:16 +08:00
Sara Arjona 58d1571e08 weekly release 4.1.18+ 2025-06-05 16:43:46 +02:00
Michael Hawkins 75283557ad MDL-83762 core_files: Bind resolve IPs and ports to cURL calls 2025-06-05 12:10:26 +07:00
Vincent Schneider 7d23d3ae3a MDL-84518 course: improved course visibility state handling 2025-06-05 11:23:19 +07:00
Mark Johnson af2c368089 MDL-85323 core: Don't cache the login page 2025-06-05 11:02:54 +07:00
meirzamoodle 3b7f2aa473 MDL-85375 libraries: Escaping a query parameter on pg_insert_id() 2025-06-02 09:55:58 +07:00
Vincent Schneider 00bef0f91d MDL-84706 bigbluebuttonbn: improved authorization and mitigate CSRF risks 2025-05-30 08:40:21 +00:00
Huong Nguyen 26e53e8cc2 MDL-79993 course: Fix PHPUnit failure 2025-05-30 08:40:21 +00:00
raortegar be0dea2892 MDL-79993 course: Improve user access to recent courses service 2025-05-30 08:40:21 +00:00
Vincent Schneider e522e7fc67 MDL-84497 badges: fix missing action sesskey checks. 2025-05-30 08:40:21 +00:00
Michael Hawkins 7e19a2a640 weekly release 4.1.18+ 2025-05-30 16:29:50 +08:00
Michael Hawkins 724275abbc Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-05-30 16:29:43 +08:00
Huong Nguyen ea79441d28 Merge branch 'MDL-85525-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-05-29 09:52:08 +07:00
Huong Nguyen ca580b25b9 Merge branch 'MDL-85400-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-05-29 09:00:17 +07:00
Huong Nguyen 2f785afb00 Merge branch 'MDL-85389-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-05-29 08:53:08 +07:00
AMOS bot 7b6fddd811 Automatically generated installer lang files 2025-05-29 00:07:40 +00:00
andelacruz ac77c1c217 MDL-85525 mod_quiz: Behat test for quiz attempt page block display 2025-05-28 16:20:56 +08:00
andelacruz 71bbfc2495 MDL-85389 mod_lesson: Behat for filtering lesson reports/essays by group 2025-05-28 15:42:08 +08:00
sam marshall c56c08e9ce MDL-85400 PHPunit: Hard to test code that uses encryption
This change stops the encryption code setting created key files to
read-only during PHPunit runs, which means they will be safely
deleted when the system resets after a test.
2025-05-28 13:14:34 +08:00
Huong Nguyen 4c3df551a4 weekly release 4.1.18+ 2025-05-23 11:04:05 +07:00
Huong Nguyen 516b81954a Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-05-23 11:04:04 +07:00
Huong Nguyen 4caed80b37 Merge branch 'MDL-84793-m401' of https://github.com/sammarshallou/moodle into MOODLE_401_STABLE 2025-05-22 10:49:00 +07:00
Huong Nguyen 7f6e49af41 Merge branch 'MDL-84918-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2025-05-22 10:35:05 +07:00
David Woloszyn 69cca28118 MDL-84918 core: Add zend.exception_ignore_args environment check 2025-05-22 10:12:03 +07:00
Huong Nguyen 3e30033749 MDL-84918 core: Add initial environment requirements for Moodle 5.1 2025-05-22 10:12:03 +07:00
Huong Nguyen d61b9111fa Merge branch 'MDL-85374-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2025-05-21 09:56:32 +07:00
AMOS bot 07a30d6650 Automatically generated installer lang files 2025-05-21 00:07:37 +00:00
Andrew Nicols 6f25549278 MDL-85374 report_competency: Create custom step for setting autocomplete
The autocompletes used in the competency report have been bastardised to
redirect on selection. Unfortunately this also applies when when making
null-op changes like deleting the initial "Please select a value"
option.

The autocomplete code removes all current options before creating an
option, and because of this redirect the browser is redirecting before
the new value can be entered, but we retain a reference to the field as
`$this->field`, which is now stale.
2025-05-20 13:09:53 +08:00
Mihail Geshoski 5ee4098ce5 weekly release 4.1.18+ 2025-05-16 12:59:25 +08:00
Mihail Geshoski 44956b2463 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-05-16 12:59:18 +08:00
sam marshall e65075c421 MDL-84793 Behat: Allow CLI scripts to run on Behat instance 2025-05-15 08:51:54 +01:00
Huong Nguyen 3d95f94ca6 Merge branch 'MDL-85279-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-05-15 11:43:10 +07:00
andelacruz 1b51d716e2 MDL-85279 mod_assign: Renamed behat test to a more specific name 2025-05-14 15:17:01 +08:00
andelacruz 7602fa7ad9 MDL-85279 mod_page: Fix behat to match the expected behaviour 2025-05-14 15:13:15 +08:00
AMOS bot f2ef4c6808 Automatically generated installer lang files 2025-05-10 00:07:38 +00:00
Huong Nguyen 757f0a56c9 weekly release 4.1.18+ 2025-05-09 09:50:36 +07:00
Huong Nguyen e22f3d47c2 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-05-09 09:50:35 +07:00
Huong Nguyen 1ef498d989 Merge branch 'MDL-84654-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-05-08 08:44:56 +07:00
AMOS bot 747fff61c4 Automatically generated installer lang files 2025-05-07 00:07:33 +00:00
Angelia Dela Cruz 0f368a42cc MDL-84654 mod_assign: Assignment additional files can be hidden 2025-05-06 13:24:37 +08:00
Huong Nguyen 186284ec1f Merge branch 'MDL-85310-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-05-06 10:32:40 +07:00
Huong Nguyen cdfdfc30d9 Merge branch 'MDL-85226-401' of https://github.com/mackensen/moodle into MOODLE_401_STABLE 2025-05-06 10:30:38 +07:00
AMOS bot 6c95086bc9 Automatically generated installer lang files 2025-05-01 00:07:39 +00:00
Angelia Dela Cruz 45ef55471b MDL-85310 qtype: Renamed duplicate scenario names to fix warning 2025-04-30 13:36:18 +08:00
AMOS bot ac270cb26f Automatically generated installer lang files 2025-04-23 00:07:39 +00:00
AMOS bot b2ba6624ce Automatically generated installer lang files 2025-04-20 00:08:01 +00:00
AMOS bot b57eb5dd88 Automatically generated installer lang files 2025-04-19 00:07:37 +00:00
AMOS bot 9bf42e7aad Automatically generated installer lang files 2025-04-18 00:07:40 +00:00
Charles Fulton 4318e21563 MDL-85226 gha: Pin mongodb extension version 2025-04-16 15:28:57 -04:00
Jun Pataleta 2a900d6ed9 Moodle release 4.1.18 2025-04-13 09:52:10 +08:00
Huong Nguyen 385721f105 weekly release 4.1.17+ 2025-04-11 22:02:30 +07:00
Huong Nguyen 83c5af5001 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-04-11 22:02:29 +07:00
Sara Arjona 1b995b811d MDL-83994 course: Adapt PHPUnit to lower PHP versions 2025-04-11 19:24:57 +08:00
Huong Nguyen 52ad957d74 MDL-72704 message: Fix fetching for user has already contacted 2025-04-11 17:46:51 +08:00
Paul Holden edb68975d1 MDL-84865 cohort: improve system report validation of parameters. 2025-04-11 12:47:07 +08:00
Jun Pataleta 9d84286479 MDL-72704 message: Additional optimisation tweaks
* Return early if the `userids` params is empty or if the filtered
user IDs end up being empty.
2025-04-11 12:19:28 +08:00
Stevani Andolo 7b8be76dd9 MDL-72704 message: Fix fetching of conversation member info 2025-04-11 12:19:28 +08:00
raortegar c2bcdedbd6 MDL-85104 lib: Add additional check to local URLs params. 2025-04-11 10:22:58 +07:00
James C ca40241461 MDL-83994 course: Respect course_can_delete_section() in AJAX 2025-04-11 13:07:26 +10:00
Paul Holden 5e7ec29c65 MDL-84473 repository_equella: safer unserializing of file references. 2025-04-11 09:52:40 +07:00
Paul Holden 193e6b0fad MDL-84475 repository_dropbox: safer unserializing of file references. 2025-04-11 09:34:44 +07:00
Michael Hawkins b7a8375e65 MDL-85152 filter_tex: Update deny list and slash handling 2025-04-10 14:21:39 +08:00
Paul Holden 10e93d074b MDL-84478 tool_brickfield: verify sesskey prior to course analysis. 2025-04-10 13:07:36 +08:00
Paul Holden 0e6246db29 MDL-84499 block_rss_client: user access checks for viewing feed. 2025-04-10 12:32:57 +08:00
Paul Holden 58efa0fa10 MDL-65356 mod_data: update entry editing/deletion to not leak sesskey. 2025-04-10 10:08:23 +07:00
Paul Holden afc3bfc296 MDL-84750 course: require user be able to view course participants. 2025-04-10 09:31:11 +08:00
Paul Holden 9af8958b03 MDL-84479 tool_usertours: verify sesskey prior to tour duplication. 2025-04-08 16:16:42 +07:00
AMOS bot 896da8f473 Automatically generated installer lang files 2025-04-08 00:07:36 +00:00
Huong Nguyen 90fa1113f2 weekly release 4.1.17+ 2025-04-04 22:20:22 +07:00
Jun Pataleta aaf985001e Merge branch 'MDL-84907-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2025-04-04 11:31:11 +08:00
Shamim Rezaie 9b81be597c Merge branch 'MDL-85000-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2025-04-03 06:14:42 +11:00
Huong Nguyen 998f6ce060 MDL-85000 media_videojs: Enable Ogv.JS Tech for all browsers 2025-04-02 13:10:37 +07:00
Sara Arjona 881ad82c44 weekly release 4.1.17+ 2025-03-28 12:48:32 +01:00
Sara Arjona 5c163fff89 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-03-28 12:48:31 +01:00
Paul Holden 1ac64c87f9 MDL-85048 core: define mapping for new America/Coyhaique zone.
Follows same process as other timezone additions in d5ec3594.
2025-03-28 08:58:49 +00:00
Huong Nguyen ce35013ebf Merge branch 'MDL-85048-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-03-28 15:01:38 +07:00
Simey Lameze 8de6b2d6f4 MDL-85048 phpunit: add america/coyhaique timezone 2025-03-28 15:00:39 +08:00
AMOS bot 81fc25e7fa Automatically generated installer lang files 2025-03-28 00:08:28 +00:00
Huong Nguyen 5efe1cbf3c weekly release 4.1.17+ 2025-03-26 08:56:13 +07:00
Huong Nguyen 5deff67cea Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-03-26 08:56:12 +07:00
Huong Nguyen 14cb950ff3 Merge branch 'MDL-83160-401' of https://github.com/mickhawkins/moodle into MOODLE_401_STABLE 2025-03-24 14:55:08 +07:00
AMOS bot 374028b418 Automatically generated installer lang files 2025-03-22 00:07:37 +00:00
Huong Nguyen f0133eaae1 weekly release 4.1.17+ 2025-03-21 22:04:26 +07:00
Huong Nguyen 18998a6051 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-03-21 22:04:25 +07:00
AMOS bot 00b94dec34 Automatically generated installer lang files 2025-03-21 00:07:37 +00:00
Huong Nguyen 71269d9c8f MDL-84905 Behat: Fix I set the following administration settings failure 2025-03-19 09:17:38 +07:00
Huong Nguyen 61c44c40d8 MDL-84907 backup: Fix invalid CTRL characters regex 2025-03-18 14:13:52 +07:00
Jun Pataleta b05bd11a84 Moodle release 4.1.17 2025-03-15 20:19:11 +08:00
Ilya Tregubov 57fc983d37 MDL-81945 gradereport_singleview: Fix hidden grade handling.
Seems to become broken after IR refactoring.
2025-03-14 15:20:15 +00:00
Ilya Tregubov eef27680b9 MDL-81945 gradereport_user: Don't reveal visibility by color.
Seems like dimmed_text class was added without proper check so
user can guess if item is hidden.
2025-03-14 15:20:15 +00:00
Ilya Tregubov c57def5dd1 MDL-81945 gradereport_singleview: Fix hidden grades handling.
If a user is lacking moodle/grade:viewhidden he should not be able
to view or modify grades.
2025-03-14 15:20:15 +00:00
Sara Arjona 67c6b85e1f weekly release 4.1.16+ 2025-03-14 16:14:21 +01:00
Sara Arjona 57daa7a932 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-03-14 16:14:18 +01:00
Michael Hawkins 4629c45815 MDL-83160 core: Update security.txt expiry 2025-03-13 20:36:10 +08:00
Huong Nguyen 0fcd9f04cc Merge branch 'MDL-84640-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-03-12 16:32:53 +07:00
Angelia Dela Cruz 2342c3f0c8 MDL-84640 analytics: Behat for obtaining prediction models insights 2025-03-12 17:01:32 +08:00
Sara Arjona 5bf1fb6564 Merge branch 'MDL-84801-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2025-03-11 17:26:42 +01:00
Huong Nguyen 4a719ac83a MDL-84801 Behat: Fix Expand all fieldsets and advanced elements failure 2025-03-11 09:25:08 +07:00
AMOS bot df1e1b6fb2 Automatically generated installer lang files 2025-03-11 00:07:39 +00:00
AMOS bot dc57f7a253 Automatically generated installer lang files 2025-03-10 00:07:29 +00:00
Jun Pataleta 509b1110d3 weekly release 4.1.16+ 2025-03-08 11:44:46 +08:00
Andrew Nicols 45cc6fe44d Merge branch 'MDL-84723-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-03-06 11:51:50 +08:00
Simey Lameze 593e08c20d MDL-84723 behat: final improvements and fixes to the test
This commit does few things:
- Remove unnecessary grade field to assign generator.
- Remove unnecessary comment lines.
- Update the warning message assertion to use the no-break space unicode character.
2025-03-06 11:24:27 +08:00
Angelia Dela Cruz d6841046f1 MDL-84723 gradingform: Behat for maximum grade mismatch in marking guide 2025-03-06 11:24:27 +08:00
Huong Nguyen e768e90859 Merge branch 'MDL-84425-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-03-05 10:52:13 +07:00
Angelia Dela Cruz 0ad8ac1c3b MDL-84425 theme_boost: Behat for course section selector unavailable 2025-03-05 11:21:20 +08:00
Sara Arjona 8bd8b19e00 weekly release 4.1.16+ 2025-03-04 16:13:54 +01:00
Sara Arjona 023694ac28 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-03-04 16:13:52 +01:00
Huong Nguyen ed789da14a Merge branch 'MDL-84595-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2025-03-04 10:56:16 +07:00
Andrew Nicols 0d78d3dde0 MDL-84595 tool_behat: Allow accessibility tests to run for a single Node 2025-03-04 10:24:29 +07:00
AMOS bot 648f9ab53e Automatically generated installer lang files 2025-03-02 00:08:01 +00:00
Sara Arjona 99445f3724 weekly release 4.1.16+ 2025-02-27 16:55:01 +01:00
Simey Lameze abe5b83ef4 MDL-84424 behat: add template_competencies generator and improve test 2025-02-27 07:59:56 +08:00
Angelia Dela Cruz 244db143eb MDL-84424 tool_lp: admin can create learning plans from template 2025-02-27 07:58:57 +08:00
Sara Arjona baa20b3778 Merge branch 'MDL-84609-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-02-26 16:20:06 +01:00
Simey Lameze 0e45b4e1e1 MDL-84609 behat: add required entities and fix failures
This commit also fix some typos and misaligned pipes around the
changed steps.

Signed-off-by: Simey Lameze <simey@moodle.com>
2025-02-25 11:55:03 +08:00
Angelia Dela Cruz 70fc4013bd MDL-84609 tool: Replaced tool_lp generators with standard generators 2025-02-25 11:55:03 +08:00
Huong Nguyen 75f6669217 weekly release 4.1.16+ 2025-02-21 10:15:22 +07:00
Jun Pataleta b498552116 Merge branch 'MDL-84448-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-02-20 12:10:10 +08:00
Simey Lameze 346e9a792b MDL-84448 behat: return null if theme has no config 2025-02-20 12:00:59 +08:00
Amanda Doughty 0fe4411848 MDL-84448 lib: Fixed behat context check for grandchild themes 2025-02-20 12:00:59 +08:00
Jun Pataleta f74a599586 Merge branch 'MDL-84592-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2025-02-20 11:45:48 +08:00
Jun Pataleta cbc56fd8f3 Merge branch 'MDL-84590-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2025-02-20 10:50:04 +08:00
Andrew Nicols b3e26daa43 MDL-84592 tool_behat: Improve accessibility failure information 2025-02-20 10:26:46 +08:00
Huong Nguyen 737a3ea643 Merge branch 'MDL-84498-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2025-02-20 09:22:56 +07:00
Andrew Nicols 5742a54a93 MDL-84590 tool_behat: Axe tests must use all wcag rules
Rules are not additive. That is to say that the wcag22a tag does not
include wcag21a or wcag2a. They all need to be specified.
2025-02-20 10:00:05 +08:00
Jason Den Dulk 30c1019ab3 MDL-84498 lib: Fix reflection property regression. 2025-02-20 09:37:46 +08:00
Jun Pataleta d328504273 weekly release 4.1.16+ 2025-02-14 09:54:09 +08:00
Jun Pataleta c89cedc548 Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2025-02-14 09:54:06 +08:00
Jun Pataleta 38657e7cab Merge branch 'MDL-84102-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-02-13 11:49:07 +08:00
Angelia Dela Cruz 92cab9906d MDL-84102 message: Behat for setting default notification preferences 2025-02-12 15:37:51 +08:00
Huong Nguyen 2b58d92bac Merge branch 'MDL-84414-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2025-02-11 11:18:15 +07:00
Angelia Dela Cruz 16c162352d MDL-84414 gradingform_guide: Behat test to set marking guide as ready 2025-02-11 11:30:29 +08:00
AMOS bot affa5dbfb3 Automatically generated installer lang files 2025-02-11 00:09:05 +00:00
849 changed files with 8307 additions and 2805 deletions
+4 -3
View File
@@ -19,7 +19,7 @@ env:
jobs:
Grunt:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checking out code
@@ -60,11 +60,12 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
php: 7.4
extensions:
db: mysqli
- os: ubuntu-22.04
- os: ubuntu-24.04
extensions: mongodb-1.19.4
php: 8.1
db: pgsql
+1
View File
@@ -24,6 +24,7 @@
*/
define('CLI_SCRIPT', true);
define('IGNORE_COMPONENT_CACHE', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
+412
View File
@@ -3835,6 +3835,7 @@
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="optional"/>
<PHP_EXTENSION name="exif" level="optional"/>
<PHP_EXTENSION name="filter" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
@@ -4410,6 +4411,7 @@
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="required"/>
<PHP_EXTENSION name="exif" level="optional"/>
<PHP_EXTENSION name="filter" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
@@ -4605,6 +4607,7 @@
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="required"/>
<PHP_EXTENSION name="exif" level="optional"/>
<PHP_EXTENSION name="filter" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
@@ -4714,6 +4717,7 @@
<VENDOR name="mysql" version="8.4" />
<VENDOR name="postgres" version="14" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="auroramysql" version="8.0" />
</DATABASE>
<PHP version="8.2.0" level="required">
</PHP>
@@ -4799,6 +4803,7 @@
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="required"/>
<PHP_EXTENSION name="exif" level="optional"/>
<PHP_EXTENSION name="filter" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
@@ -4893,6 +4898,413 @@
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="5.1" requires="4.2.3">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.11.0" />
<VENDOR name="mysql" version="8.4" />
<VENDOR name="postgres" version="15" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="auroramysql" version="8.0" />
</DATABASE>
<PHP version="8.2.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="required"/>
<PHP_EXTENSION name="exif" level="optional"/>
<PHP_EXTENSION name="filter" level="required"/>
</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_SETTING name="zend.exception_ignore_args" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingzendexceptionignoreargs" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
<FEEDBACK>
<ON_ERROR message="sixtyfourbitsrequired" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
<FEEDBACK>
<ON_CHECK message="iscustomadminwarnings" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="5.2" requires="4.4">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.11.0" />
<VENDOR name="mysql" version="8.4" />
<VENDOR name="postgres" version="16" />
<VENDOR name="mssql" version="15.0" />
<VENDOR name="auroramysql" version="8.0" />
</DATABASE>
<PHP version="8.3.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_EXTENSION name="filter" level="required"/>
</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_SETTING name="zend.exception_ignore_args" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingzendexceptionignoreargs" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK function="\core\environment::check_composer_dependencies_installed" level="optional" />
<CUSTOM_CHECK function="\core\environment::check_composer_developer_dependencies_not_installed" level="optional" />
<CUSTOM_CHECK function="\core\environment::check_composer_dependencies_optimised" level="optional" />
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
<FEEDBACK>
<ON_ERROR message="sixtyfourbitsrequired" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
<FEEDBACK>
<ON_CHECK message="iscustomadminwarnings" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_async_backup" level="recommended">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_aurora_version" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+8 -2
View File
@@ -916,8 +916,14 @@ if (empty($CFG->disabledevlibdirscheck) && (is_dir($CFG->dirroot.'/vendor') || i
// Check if the site is being foced onto ssl.
$overridetossl = !empty($CFG->overridetossl);
// Check if moodle campaign content setting is enabled or not.
$showcampaigncontent = !isset($CFG->showcampaigncontent) || $CFG->showcampaigncontent;
if (defined('BEHAT_SITE_RUNNING') && BEHAT_SITE_RUNNING) {
// We need to add this in order to be able to verify the showcampaigncontent setting behaviour during behat tests.
$showcampaigncontent = get_config('core', 'showcampaigncontent');
$showcampaigncontent = $showcampaigncontent === 'true';
} else {
// Check if moodle campaign content setting is enabled or not.
$showcampaigncontent = !isset($CFG->showcampaigncontent) || $CFG->showcampaigncontent;
}
// Encourage admins to enable the user feedback feature if it is not enabled already.
$showfeedbackencouragement = empty($CFG->enableuserfeedback);
+2
View File
@@ -23,6 +23,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('IGNORE_COMPONENT_CACHE', true);
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
+8
View File
@@ -51,6 +51,14 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_countrycodes('allcountrycodes', new lang_string('allcountrycodes', 'core_admin'),
new lang_string('configallcountrycodes', 'core_admin')));
$temp->add(new admin_setting_configtext(
'geopluginapikey',
new lang_string('geopluginapikey', 'core_admin'),
new lang_string('geopluginapikey_desc', 'core_admin'),
'',
PARAM_TEXT,
));
}
$ADMIN->add('location', $temp);
+2
View File
@@ -82,6 +82,8 @@ class behat_admin extends behat_base {
$this->execute('behat_forms::i_set_the_field_with_xpath_to', [$fieldxpath, $value]);
$this->execute("behat_general::i_click_on", [get_string('savechanges'), 'button']);
// Wait for the page to be redirected.
$this->execute("behat_general::i_wait_to_be_redirected");
}
}
@@ -18,6 +18,7 @@ Feature: Verify the breadcrumbs in webservice tokens site administration pages
And "Manage tokens" "link" should exist in the ".breadcrumb" "css_element"
And "Web services" "link" should exist in the ".breadcrumb" "css_element"
And I set the field "User" to "John Doe"
And I set the field "Service" to "Moodle mobile web service"
And I press "Save changes"
When I click on "Delete" "link"
Then "Delete token" "text" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,17 @@
@core @core_admin
Feature: Toggle campaign banner visibility
In order to control the visibility of the campaign banner content
As an admin
I need to be able to disable the campaign banner display
Scenario Outline: Admin can disable the campaign banner display
Given the following config values are set as admin:
| showcampaigncontent | <showcampaigncontent> |
And I log in as "admin"
When I navigate to "Notifications" in site administration
Then "//iframe[@id='campaign-content']" "xpath_element" <display> exist
Examples:
| showcampaigncontent | display |
| true | should |
| false | should not |
@@ -0,0 +1,79 @@
@tool @tool_analytics
Feature: Manager can obtain prediction models insights
In order to view prediction models insights
As a manager
I should be able to obtain the prediction models insights
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| s1 | Student | One | s1@example.com |
| m1 | Manager | One | m1@example.com |
| m2 | Manager | Two | m2@example.com |
| t1 | Teacher | One | t1@example.com |
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| m1 | manager | System | |
| m2 | manager | System | |
# To ensure that course start date is in the future, set course start date to "tomorrow".
And the following "courses" exist:
| fullname | shortname | startdate |
| Course 1 | C1 | ##tomorrow## |
| Course 2 | C2 | ##tomorrow## |
| Course 3 | C3 | ##tomorrow## |
And the following "course enrolments" exist:
| user | course | role |
| s1 | C1 | student |
| s1 | C2 | student |
| s1 | C3 | student |
| t1 | C3 | editingteacher |
# Disable "Analytics processes execution via command line only".
And the following config values are set as admin:
| onlycli | 0 | analytics |
@javascript
Scenario: Manager can obtain prediction models insights
Given I log in as "m1"
And I navigate to "Analytics > Analytics models" in site administration
And I click on "Actions" "link" in the "Courses at risk of not starting" "table_row"
And I click on "Execute scheduled analysis" "link" in the "Courses at risk of not starting" "table_row"
And I press "Continue"
When I select "All predictions" from the "contextid" singleselect
# Confirm that only courses without teachers, Course 1 and Course 2, are listed.
Then "Course 1" "text" should exist
And "Course 2" "text" should exist
And "Course 3" "text" should not exist
And I click on "Select Course 1 for bulk action" "checkbox"
And I press "Not applicable"
And I press "Confirm"
# After m1 marks Course 1 as Not applicable, only Course 2 should be listed in the predictions for manager 1.
And "Course 1" "text" should not exist
And "Course 2" "text" should exist
And I log in as "m2"
And I click on ".popover-region-notifications" "css_element"
# Notification of new insight exists.
And "Upcoming courses have no teachers or students" "text" should exist
And I click on "View full notification" "link" in the ".popover-region-notifications" "css_element"
And I click on "View insight" "link"
# Course 1, previously marked as Not applicable by manager 1, is still listed for manager 2.
And "Course 1" "text" should exist
And I click on "View details" "link" in the "Course 1" "table_row"
# Prediction details and indicators are displayed for the selected course.
And the following should exist in the "insights-list" table:
| Description |
| Course 1 |
And the following should exist in the "prediction-calculations" table:
| -1- | -2- |
| Teacher availability | No |
| Student enrolments | Yes |
# Date of prediction analysis execution.
And "##today##%A, %d %B %Y##" "text" should exist in the "Time predicted" "table_row"
And I click on "Select Course 1 for bulk action" "checkbox"
And I press "Accept"
And I press "Confirm"
# Verify that you end up on the page listing predictions for 'No teaching'.
And "Courses at risk of not starting" "text" should exist
And "The following courses due to start in the upcoming days are at risk of not starting because they don't have teachers or students enrolled." "text" should exist
And the following should not exist in the "insights-list" table:
| Description |
| Course 1 |
+4
View File
@@ -36,6 +36,10 @@ if (function_exists('opcache_reset')) {
define('CLI_SCRIPT', true);
define('CACHE_DISABLE_ALL', true);
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
// from the normal environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
// Basic functions.
require_once(__DIR__ . '/../../../../lib/clilib.php');
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
+4
View File
@@ -31,6 +31,10 @@ define('ABORT_AFTER_CONFIG', true);
define('CACHE_DISABLE_ALL', true);
define('NO_OUTPUT_BUFFERING', true);
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
// from the normal environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
require_once(__DIR__ .'/../../../../config.php');
require_once(__DIR__.'/../../../../lib/clilib.php');
require_once(__DIR__.'/../../../../lib/behat/lib.php');
+4
View File
@@ -39,6 +39,10 @@ define('NO_OUTPUT_BUFFERING', true);
define('IGNORE_COMPONENT_CACHE', true);
define('ABORT_AFTER_CONFIG', true);
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
// from the normal environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
require_once(__DIR__ . '/../../../../lib/clilib.php');
// CLI options.
+4
View File
@@ -33,6 +33,10 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
die(); // No access from web!.
}
// It makes no sense to use BEHAT_CLI for this script (the Behat launch scripts expect to start
// from the normal environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
// Basic functions.
require_once(__DIR__ . '/../../../../lib/clilib.php');
require_once(__DIR__ . '/../../../../lib/behat/lib.php');
+1
View File
@@ -87,6 +87,7 @@ $action = optional_param('action', '', PARAM_ALPHA);
// Handle any single operation actions.
if ($action == 'requestanalysis') {
if ($courseid != 0) {
require_sesskey();
scheduler::request_course_analysis($courseid);
if ($courseid == SITEID) {
redirect(accessibility::get_plugin_url());
@@ -0,0 +1,70 @@
<?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/>.
namespace tool_capability;
// phpcs:disable moodle.PHPUnit.TestCaseProvider.dataProviderSyntaxMethodNotFound
/**
* Detect common problems in capability definitions of plugins.
*
* @group plugin_checks
* @package tool_capability
* @copyright 2025 Petr Skoda
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
final class plugin_checks_test extends \core\tests\plugin_checks_testcase {
/**
* Verify contents of plugin db/access.php file.
*
* @dataProvider all_plugins_provider
* @coversNothing
*
* @param string $component
* @param string $plugintype
* @param string $pluginname
* @param string $dir
*/
public function test_db_access_file(string $component, string $plugintype, string $pluginname, string $dir): void {
global $CFG;
$stringmanager = get_string_manager();
$corerolefile = "$CFG->dirroot/lang/en/role.php";
$langfile = "$dir/lang/en/$component.php";
$file = "$dir/db/access.php";
$capabilities = $this->fetch_array_from_file($file, 'capabilities');
if (!$capabilities) {
$this->expectNotToPerformAssertions();
return;
}
foreach ($capabilities as $capname => $capability) {
if ($plugintype === 'qbank' && str_starts_with($capname, 'moodle/question:')) {
// Question bank capabilities are irregular.
$strname = explode('/', $capname, 2)[1];
$this->assertTrue($stringmanager->string_exists($strname, 'core_role'),
"Missing capability name string '$strname' in $corerolefile");
continue;
}
$this->assertMatchesRegularExpression("|^$plugintype/$pluginname:[a-z0-9_]+$|", $capname);
$strname = substr($capname, strlen($plugintype) + 1);
$this->assertTrue($stringmanager->string_exists($strname, $component),
"Missing capability name string '$strname' in $langfile");
$this->assertSame($capname, clean_param($capname, PARAM_CAPABILITY));
}
}
}
@@ -0,0 +1,77 @@
@tool @tool_lp @tool_lp_framework
Feature: Manage CRUD operations for competencies
In order to perform CRUD operations on competencies
As a manager
I need to be able to create, read, update and delete competencies
Background:
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| CF1 | CF1 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework | idnumber | description |
| C1 | CF1 | C1ID | C1 description |
And I log in as "admin"
And I navigate to "Competencies > Competency frameworks" in site administration
And I click on "CF1 (CF1)" "link"
@javascript
Scenario: Create a new competency
# Targets the `CF1` element to make `Add competency` button visible and accessible to avoid ambiguity with the other 'CF1' element on the screen.
Given I click on "//ul[@class='competency-tree']//span[text()='CF1']" "xpath_element"
When I press "Add competency"
And I set the field "Name" to "C2"
And I set the field "Description" to "C2 description"
And I set the field "ID number" to "C2ID"
And I press "Save changes"
# Access the newly created competencies to ensure that correct information was registered.
Then "Competency created" "text" should exist
And "C2" "text" should appear after "C1" "text"
And I select "C2" of the competency tree
And "C2ID" "text" should exist
And "C2 description" "text" should exist
@javascript
Scenario: Read a competency
When I select "C1" of the competency tree
# Confirm that selected competency info displayed matches registered info.
Then "C1ID" "text" should exist
And "C1 description" "text" should exist
# Targets the unique 'Edit' link needed to open the menu, avoiding ambiguity with the other 'Edit' link.
And I click on "//a[@href='#' and text()='Edit']" "xpath_element"
# Similar to the previous step, to avoid ambiguity with the competency framework "Edit", target css element with data-action=edit.
And I click on "[data-action=edit]" "css_element"
# Confirm that the details displayed when accessing edit screen values match registered data.
And the field "Name" matches value "C1"
And the field "Description" matches value "C1 description"
And the field "ID number" matches value "C1ID"
@javascript
Scenario: Update a competency
Given I select "C1" of the competency tree
# Targets the unique 'Edit' link needed to open the menu, avoiding ambiguity with the other 'Edit' link.
And I click on "//a[@href='#' and text()='Edit']" "xpath_element"
# Similar to the previous step, to avoid ambiguity with the competency framework "Edit", target css element with data-action=edit.
When I click on "[data-action=edit]" "css_element"
And I set the field "Name" to "C2"
And I set the field "Description" to "C2 description"
And I set the field "ID number" to "C2ID"
And I press "Save changes"
Then "Competency updated" "text" should exist
And "C1" "text" should not exist
And "C2" "text" should exist
And I select "C2" of the competency tree
And "C2ID" "text" should exist
And "C1ID" "text" should not exist
And "C2 description" "text" should exist
And "C1 description" "text" should not exist
@javascript
Scenario: Delete a competency
Given I select "C1" of the competency tree
# Targets the unique 'Edit' link needed to open the menu, avoiding ambiguity with the other 'Edit' link.
And I click on "//a[@href='#' and text()='Edit']" "xpath_element"
When I click on "Delete" "link"
And I click on "Delete" "button" in the "Confirm" "dialogue"
# Confirm that "C1" competency was successfully deleted.
Then "C1" "text" should not exist
@@ -0,0 +1,63 @@
@tool @tool_lp @tool_lp_framework
Feature: Move and cross-reference competencies
In order to move and cross-reference competencies
As a manager
I need to be open the competency's menu items.
Background:
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| CF1 | CF1 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework |
| C1 | CF1 |
| C2 | CF1 |
| C3 | CF1 |
| C4 | CF1 |
And I log in as "admin"
And I navigate to "Competencies > Competency frameworks" in site administration
And I click on "CF1 (CF1)" "link"
@javascript
Scenario: Move a competency using Move up/Move down menu items
Given I select "C1" of the competency tree
# Targets the unique 'Edit' link needed to open the menu, avoiding ambiguity with the other 'Edit' link.
And I click on "//a[@href='#' and text()='Edit']" "xpath_element"
When I click on "Move down" "link"
Then "C1" "text" should appear after "C2" "text"
# Targets the unique 'Edit' link needed to open the menu, avoiding ambiguity with the other 'Edit' link.
And I click on "//a[@href='#' and text()='Edit']" "xpath_element"
And I click on "Move up" "link"
And "C1" "text" should appear before "C2" "text"
@javascript
Scenario: Move a competency using Relocate menu item
Given I select "C3" of the competency tree
# Targets the unique 'Edit' link needed to open the menu, avoiding ambiguity with the other 'Edit' link.
And I click on "//a[@href='#' and text()='Edit']" "xpath_element"
When I click on "Relocate" "link"
And I click on "C1" "text" in the "Move competency" "dialogue"
And I click on "Move" "button" in the "Move competency" "dialogue"
Then "C1" "text" should appear before "C3" "text"
And "C3" "text" should appear before "C2" "text"
And I select "C3" of the competency tree
# Targets the unique 'Edit' link needed to open the menu, avoiding ambiguity with the other 'Edit' link.
And I click on "//a[@href='#' and text()='Edit']" "xpath_element"
# Similar to the previous step, to avoid ambiguity with the competency framework "Edit", target css element with data-action=edit.
And I click on "[data-action=edit]" "css_element"
And "C1" "text" should exist
And "No parent (top-level competency)" "text" should not exist
And I press "Cancel"
And "C1" "text" should appear before "C3" "text"
And "C3" "text" should appear before "C2" "text"
@javascript
Scenario: Cross-reference a competency
Given I select "C1" of the competency tree
# Targets the unique 'Edit' link needed to open the menu, avoiding ambiguity with the other 'Edit' link.
And I click on "//a[@href='#' and text()='Edit']" "xpath_element"
When I click on "Add cross-referenced competency" "link"
And I click on "C2" "text" in the "Competency picker" "dialogue"
And I click on "Add" "button" in the "Competency picker" "dialogue"
Then "Cross-referenced competencies:" "text" should exist
And I should see "C2 cmp2"
@@ -4,13 +4,13 @@ Feature: See the competencies for an activity on the course competencies page.
In order to see only the competencies for an activity in the course competencies page.
Background:
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Test-Framework | ID-FW1 |
And the following lp "competencies" exist:
| shortname | framework |
| Test-Comp1 | ID-FW1 |
| Test-Comp2 | ID-FW1 |
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Test-Framework | ID-FW1 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework |
| Test-Comp1 | ID-FW1 |
| Test-Comp2 | ID-FW1 |
Given the following "courses" exist:
| shortname | fullname | enablecompletion |
| C1 | Course 1 | 1 |
@@ -46,11 +46,11 @@ Feature: See the competencies for an activity on the course competencies page.
When I follow "Competencies"
Then I should see "Test-Comp1"
And I should see "Test-Comp2"
And I set the field "Filter competencies by resource or activity" to "PageName1"
And I set the competency filter "Filter competencies by resource or activity" to "PageName1"
And I press the enter key
And I should see "Test-Comp1"
And I should not see "Test-Comp2"
And I set the field "Filter competencies by resource or activity" to "PageName2"
And I set the competency filter "Filter competencies by resource or activity" to "PageName2"
And I press the enter key
And I should not see "Test-Comp1"
And I should not see "Test-Comp2"
@@ -29,18 +29,18 @@ Feature: Manage competency frameworks
And I should see "Science Year-1"
Scenario: Read a framework
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Science Year-2 | sc-y-2 |
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Science Year-2 | sc-y-2 |
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-2"
When I click on "Science Year-2" "link"
Then I should see "Science Year-2"
Scenario: Edit a framework
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Science Year-3 | sc-y-3 |
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Science Year-3 | sc-y-3 |
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-3"
And I click on "Edit" of edit menu in the "Science Year-3" row
@@ -52,9 +52,9 @@ Feature: Manage competency frameworks
And I should see "sc-y-3"
Scenario: Delete a framework
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Science Year-4 | sc-y-4 |
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Science Year-4 | sc-y-4 |
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-4"
And I should see "sc-y-4"
@@ -70,24 +70,24 @@ Feature: Manage competency frameworks
And I should not see "sc-y-4"
Scenario: Edit a framework with competencies in user competency
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Science Year-5 | sc-y-5 |
And the following lp "competencies" exist:
| shortname | framework |
| Comp1 | sc-y-5 |
| Comp2 | sc-y-5 |
And the following lp "plans" exist:
| name | user | description |
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Science Year-5 | sc-y-5 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework | idnumber |
| Comp1 | sc-y-5 | Comp1 |
| Comp2 | sc-y-5 | Comp2 |
And the following "core_competency > plans" exist:
| name | user | description |
| Plan Science-5 | admin | Plan description |
And the following lp "plancompetencies" exist:
| plan | competency |
| Plan Science-5 | Comp1 |
| Plan Science-5 | Comp2 |
And the following lp "usercompetencies" exist:
| user | competency |
| admin | Comp1 |
| admin | Comp2 |
And the following "core_competency > plan_competency" exist:
| plan | competency |
| Plan Science-5 | Comp1 |
| Plan Science-5 | Comp2 |
And the following "core_competency > user_competency" exist:
| user | competency |
| admin | Comp1 |
| admin | Comp2 |
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-5"
And I click on "Edit" of edit menu in the "Science Year-5" row
@@ -100,24 +100,24 @@ Feature: Manage competency frameworks
And I should see "sc-y-5"
Scenario: Edit a framework with competencies in user competency plan
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Science Year-6 | sc-y-6 |
And the following lp "competencies" exist:
| shortname | framework |
| Comp1 | sc-y-6 |
| Comp2 | sc-y-6 |
And the following lp "plans" exist:
| name | user | description |
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Science Year-6 | sc-y-6 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework | idnumber |
| Comp1 | sc-y-6 | Comp1 |
| Comp2 | sc-y-6 | Comp2 |
And the following "core_competency > plans" exist:
| name | user | description |
| Plan Science-6 | admin | Plan description |
And the following lp "plancompetencies" exist:
| plan | competency |
| Plan Science-6 | Comp1 |
| Plan Science-6 | Comp2 |
And the following lp "usercompetencyplans" exist:
| user | competency | plan |
| admin | Comp1 | Plan Science-6 |
| admin | Comp2 | Plan Science-6 |
And the following "core_competency > plan_competency" exist:
| plan | competency |
| Plan Science-6 | Comp1 |
| Plan Science-6 | Comp2 |
And the following "core_competency > user_competency_plans" exist:
| user | competency | plan |
| admin | Comp1 | Plan Science-6 |
| admin | Comp2 | Plan Science-6 |
And I navigate to "Competencies > Competency frameworks" in site administration
And I should see "Science Year-6"
And I click on "Edit" of edit menu in the "Science Year-6" row
@@ -130,12 +130,12 @@ Feature: Manage competency frameworks
And I should see "sc-y-6"
Scenario: Duplicate a competency framework
Given the following lp "frameworks" exist:
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| CF1 | CF1 |
And the following lp "competencies" exist:
| shortname | framework |
| C1 | CF1 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework |
| C1 | CF1 |
And I navigate to "Competencies > Competency frameworks" in site administration
# Duplicate the selected competency framework
When I click on "Duplicate" of edit menu in the "CF1" row
@@ -0,0 +1,69 @@
@tool @tool_lp @tool_lp_plan
Feature: Admin can create learning plans from template
In order to link and unlink a learning plan from a student
As an admin
I need to be able to create a learning plan from template
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | One | student1@email.com |
And the following "core_competency > frameworks" exist:
| shortname | idnumber |
| CF1 | CF1 |
| CF2 | CF2 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework | idnumber |
| CF1 Competency 1 | CF1 | CF1C1 |
| CF2 Competency 1 | CF2 | CF2C1 |
And the following "core_competency > templates" exist:
| shortname | description |
| LPT1 | LPT 1 description |
And the following "core_competency > template_competencies" exist:
| template | competency |
| LPT1 | CF1C1 |
@javascript
Scenario: Admin can assign competencies from different frameworks to a learning plan
Given I log in as "admin"
And I navigate to "Competencies > Learning plan templates" in site administration
And I follow "LPT1"
When I press "Add competencies to learning plan template"
# Add another competency from a different framework in the learning plan template.
And I set the field with xpath "//select[@data-action='chooseframework']" to "CF2 CF2"
And I select "CF2 Competency 1" of the competency tree
And I click on "Add" "button" in the "Competency picker" "dialogue"
# Confirm that both competencies from different frameworks are successfully added to learning plan template.
Then "LPT1" "text" should exist
And "Learning plan template competencies" "text" should exist
And "CF1 Competency 1" "text" should exist
And "CF2 Competency 1" "text" should exist
@javascript
Scenario: Admin can link and unlink learning plans created from template
Given I log in as "admin"
And I navigate to "Competencies > Learning plan templates" in site administration
# Initially, the number of learning plans is 0.
And the following should exist in the "generaltable" table:
| Name | Learning plans |
| LPT1 | 0 |
And I click on ".template-userplans" "css_element" in the "LPT1" "table_row"
# Create a learning plan for selected student using template.
When I set the field "Select users" to "student1"
And I press "Create learning plans"
# Confirm that selected student is now in the list of learning plans.
Then "A learning plan was created" "text" should exist
And the following should exist in the "generaltable" table:
| Name | Email address |
| LPT1 | student1@email.com |
And I click on "LPT1" "link" in the "LPT1" "table_row"
# Template title and Unlink from learning plan template link exists.
And "Learning plan template" "text" should exist
And "Unlink from learning plan template" "link" should exist
# Unlink the template.
And I click on "Unlink from learning plan template" "link"
And I press "Unlink from learning plan template"
# Learning plan still exists but Template name and Unlink from learning plan template link no longer exist.
And "LPT1" "text" should exist
And "Learning plan template" "text" should not exist
And "Unlink from learning plan template" "link" should not exist
+26 -26
View File
@@ -22,8 +22,8 @@ Feature: Manage plearning plan
And I should see "Science plan"
Scenario: Create a learning plan based on template
Given the following lp "templates" exist:
| shortname | description |
Given the following "core_competency > templates" exist:
| shortname | description |
| Science template | science template description |
And I am on homepage
And I navigate to "Competencies > Learning plan templates" in site administration
@@ -36,8 +36,8 @@ Feature: Manage plearning plan
And I should see "Admin User" in the "Science template" "table_row"
Scenario: Create a learning plan from template cohort
Given the following lp "templates" exist:
| shortname | description |
Given the following "core_competency > templates" exist:
| shortname | description |
| Science template cohort | science template description |
And the following "users" exist:
| username | firstname | lastname | email |
@@ -62,8 +62,8 @@ Feature: Manage plearning plan
And I should see "Student 2"
Scenario: Read a learning plan
Given the following lp "plans" exist:
| name | user | description |
Given the following "core_competency > plans" exist:
| name | user | description |
| Science plan Year-1 | admin | science plan description |
And I follow "Learning plans"
And I should see "Science plan Year-1"
@@ -72,16 +72,16 @@ Feature: Manage plearning plan
And I should see "Learning plan competencies"
Scenario: Manage a learning plan competencies
Given the following lp "plans" exist:
| name | user | description |
Given the following "core_competency > plans" exist:
| name | user | description |
| Science plan Year-manage | admin | science plan description |
And the following lp "frameworks" exist:
And the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Framework 1 | sc-y-2 |
And the following lp "competencies" exist:
| shortname | framework |
| comp1 | sc-y-2 |
| comp2 | sc-y-2 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework |
| comp1 | sc-y-2 |
| comp2 | sc-y-2 |
And I follow "Learning plans"
And I should see "Science plan Year-manage"
And I follow "Science plan Year-manage"
@@ -98,8 +98,8 @@ Feature: Manage plearning plan
And "comp1" "table_row" should not exist
Scenario: Edit a learning plan
Given the following lp "plans" exist:
| name | user | description |
Given the following "core_competency > plans" exist:
| name | user | description |
| Science plan Year-2 | admin | science plan description |
| Science plan Year-3 | admin | science plan description |
And I follow "Learning plans"
@@ -113,8 +113,8 @@ Feature: Manage plearning plan
And I should see "Science plan Year-3 Edited"
Scenario: Delete a learning plan
Given the following lp "plans" exist:
| name | user | description |
Given the following "core_competency > plans" exist:
| name | user | description |
| Science plan Year-4 | admin | science plan description |
And I follow "Learning plans"
And I should see "Science plan Year-4"
@@ -130,16 +130,16 @@ Feature: Manage plearning plan
Then I should not see "Science plan Year-4"
Scenario: See a learning plan from a course
Given the following lp "plans" exist:
| name | user | description |
Given the following "core_competency > plans" exist:
| name | user | description |
| Science plan Year-manage | admin | science plan description |
And the following lp "frameworks" exist:
| shortname | idnumber |
| Framework 1 | sc-y-2 |
And the following lp "competencies" exist:
| shortname | framework |
| comp1 | sc-y-2 |
| comp2 | sc-y-2 |
And the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Framework 1 | sc-y-2 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework |
| comp1 | sc-y-2 |
| comp2 | sc-y-2 |
And I follow "Learning plans"
And I should see "Science plan Year-manage"
And I follow "Science plan Year-manage"
+99 -51
View File
@@ -16,34 +16,28 @@ Feature: Manage plan workflow
| usermanageownplan | User manage own plan role | user |
| manageplan | Manager all plans role | manager |
And the following "role capabilities" exist:
| role | moodle/competency:planmanageowndraft | moodle/competency:planmanageown |
| usermanageowndraftplan | allow | |
| usermanageownplan | allow | allow |
| manageplan | allow | allow |
And the following "role capability" exists:
| role | manageplan |
| moodle/competency:planmanage | allow |
| moodle/competency:planview | allow |
| moodle/competency:planreview | allow |
| moodle/competency:planrequestreview | allow |
| role | moodle/competency:planmanageowndraft | moodle/competency:planmanageown | moodle/competency:planmanage | moodle/competency:planview | moodle/competency:planreview | moodle/competency:planrequestreview |
| usermanageowndraftplan | allow | | | | | |
| usermanageownplan | allow | allow | | | | |
| manageplan | allow | allow | allow | allow | allow | allow |
And the following "role assigns" exist:
| user | role | contextlevel | reference |
| user1 | usermanageowndraftplan | System | |
| user2 | usermanageownplan | System | |
| manager1 | manageplan | System | |
And the following lp "frameworks" exist:
| shortname | idnumber |
| Test-Framework | ID-FW1 |
And the following lp "competencies" exist:
| shortname | framework |
| Test-Comp1 | ID-FW1 |
| Test-Comp2 | ID-FW1 |
And the following lp "plans" exist:
| name | user | description |
| Test-Plan1 | user1 | Description of plan for user 1 |
| Test-Plan2 | user2 | Description of plan for user 2 |
And the following lp "plancompetencies" exist:
| plan | competency |
And the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Test-Framework | ID-FW1 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework | idnumber |
| Test-Comp1 | ID-FW1 | Test-Comp1 |
| Test-Comp2 | ID-FW1 | Test-Comp2 |
And the following "core_competency > plans" exist:
| name | user | description | reviewer | status |
| Test-Plan1 | user1 | Description of plan for user 1 | user1 | draft |
| Test-Plan2 | user2 | Description of plan for user 2 | user2 | draft |
And the following "core_competency > plan_competency" exist:
| plan | competency |
| Test-Plan1 | Test-Comp1 |
| Test-Plan1 | Test-Comp2 |
| Test-Plan2 | Test-Comp1 |
@@ -53,8 +47,7 @@ Feature: Manage plan workflow
| lp | System | 1 | my-index | content |
Scenario: User can manages his own plan draft
Given I log in as "user1"
And I follow "Profile" in the user menu
Given I am on the "user1" "user > profile" page logged in as user1
When I follow "Learning plans"
Then I should see "List of learning plans"
And I should see "Test-Plan1"
@@ -63,11 +56,9 @@ Feature: Manage plan workflow
And I should see "Waiting for review"
And I click on "Cancel review" of edit menu in the "Test-Plan1" row
And I should see "Draft"
And I log out
Scenario: User can manages his own plan
Given I log in as "user2"
And I follow "Profile" in the user menu
Given I am on the "user2" "user > profile" page logged in as user2
When I follow "Learning plans"
Then I should see "List of learning plans"
And I should see "Test-Plan2"
@@ -82,25 +73,24 @@ Feature: Manage plan workflow
And I should see "Active"
And I click on "Complete this learning plan" of edit menu in the "Test-Plan2" row
And I click on "Complete this learning plan" "button" in the "Confirm" "dialogue"
And I wait until the page is ready
And I should see "Complete"
And I click on "Reopen this learning plan" of edit menu in the "Test-Plan2" row
And I click on "Reopen this learning plan" "button" in the "Confirm" "dialogue"
And I should see "Active"
And I log out
Scenario: Manager can see learning plan with status waiting for review
Given the following lp "plans" exist:
| name | user | description | status |
Given the following "core_competency > plans" exist:
| name | user | description | status |
| Test-Plan3 | user2 | Description of plan 3 for user 1 | waiting for review |
| Test-Plan4 | user1 | Description of plan 3 for user 1 | draft |
| Test-Plan4 | user1 | Description of plan 3 for user 1 | draft |
When I log in as "manager1"
Then I should see "Test-Plan3"
And I should not see "Test-Plan4"
And I log out
Scenario: Manager can start review of learning plan with status waiting for review
Given the following lp "plans" exist:
| name | user | description | status |
Given the following "core_competency > plans" exist:
| name | user | description | status |
| Test-Plan3 | user1 | Description of plan 3 for user 1 | waiting for review |
And I log in as "manager1"
And I follow "Test-Plan3"
@@ -108,11 +98,10 @@ Feature: Manage plan workflow
And I should see "Test-Plan3"
When I follow "Start review"
Then I should see "In review"
And I log out
Scenario: Manager can reject a learning plan with status in review
Given the following lp "plans" exist:
| name | user | description | status | reviewer |
Given the following "core_competency > plans" exist:
| name | user | description | status | reviewer |
| Test-Plan3 | user1 | Description of plan 3 for user 1 | in review | manager1 |
And I log in as "manager1"
And I follow "Test-Plan3"
@@ -121,11 +110,10 @@ Feature: Manage plan workflow
And I should see "In review"
When I follow "Finish review"
Then I should see "Draft"
And I log out
Scenario: Manager can accept a learning plan with status in review
Given the following lp "plans" exist:
| name | user | description | status | reviewer |
Given the following "core_competency > plans" exist:
| name | user | description | status | reviewer |
| Test-Plan3 | user1 | Description of plan 3 for user 1 | in review | manager1 |
And I log in as "manager1"
And I follow "Test-Plan3"
@@ -134,11 +122,10 @@ Feature: Manage plan workflow
And I should see "In review"
When I follow "Make active"
Then I should see "Active"
And I log out
Scenario: Manager send back to draft an active learning plan
Given the following lp "plans" exist:
| name | user | description | status | reviewer |
Given the following "core_competency > plans" exist:
| name | user | description | status | reviewer |
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
And I am on the "user1" "user > profile" page logged in as "manager1"
@@ -150,11 +137,10 @@ Feature: Manage plan workflow
And I follow "Learning plans"
Then I should see "Draft"
And I should not see "Active"
And I log out
Scenario: Manager change an active learning plan to completed
Given the following lp "plans" exist:
| name | user | description | status | reviewer |
Given the following "core_competency > plans" exist:
| name | user | description | status | reviewer |
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
And I am on the "user1" "user > profile" page logged in as "manager1"
@@ -169,11 +155,10 @@ Feature: Manage plan workflow
And I follow "Learning plans"
Then I should see "Complete"
And I should not see "Active"
And I log out
Scenario: Manager reopen a complete learning plan
Given the following lp "plans" exist:
| name | user | description | status | reviewer |
Given the following "core_competency > plans" exist:
| name | user | description | status | reviewer |
| Test-Plan3 | user1 | Description of plan 3 for user 1 | complete | manager1 |
| Test-Plan4 | user1 | Description of plan 4 for user 1 | complete | manager1 |
And I am on the "user1" "user > profile" page logged in as "manager1"
@@ -187,4 +172,67 @@ Feature: Manage plan workflow
And I follow "Learning plans"
Then I should see "Active"
And I should not see "Complete"
And I log out
Scenario: Student learning plan derived from templates can be completed
Given the following "core_competency > templates" exist:
| shortname |
| LPT1 |
And the following "core_competency > template_competencies" exist:
| template | competency |
| LPT1 | Test-Comp1 |
And I log in as "admin"
And I navigate to "Competencies > Learning plan templates" in site administration
# Select 1 user to assign to create learning plans for using template.
And I click on ".template-userplans" "css_element" in the "LPT1" "table_row"
And I set the field "Select users" to "user1"
And I press "Create learning plans"
And I click on "LPT1" "link" in the "LPT1" "table_row"
When I click on "Complete this learning plan" "link"
And I click on "Complete this learning plan" "button" in the "Confirm" "dialogue"
# Add a short wait to ensure the page has loaded before checking that "Complete" "text" exists.
And I wait until the page is ready
# Confirm that student's learning plan template is marked as Completed.
Then "Complete" "text" should exist
And "Reopen this learning plan" "link" should exist
Scenario: Learning plan template updates are not reflected on plans already completed
Given the following "core_competency > templates" exist:
| shortname |
| LPT1 |
And the following "core_competency > template_competencies" exist:
| template | competency |
| LPT1 | Test-Comp1 |
And I log in as "admin"
And I navigate to "Competencies > Learning plan templates" in site administration
# Select 2 users to assign to create learning plans for using template.
And I click on ".template-userplans" "css_element" in the "LPT1" "table_row"
And I set the field "Select users" to "user1"
And I press "Create learning plans"
And I set the field "Select users" to "user2"
And I press "Create learning plans"
# Complete the learning plan for User 1.
And I click on "LPT1" "link" in the "User 1" "table_row"
And I click on "Complete this learning plan" "link"
And I click on "Complete this learning plan" "button" in the "Confirm" "dialogue"
# Add another competency to the learning plan template.
And the following "core_competency > template_competencies" exist:
| template | competency |
| LPT1 | Test-Comp2 |
# Navigate back to the list of Learning plan templates in order to access User 1's learning plan.
And I navigate to "Competencies > Learning plan templates" in site administration
And I click on ".template-userplans" "css_element" in the "LPT1" "table_row"
# Confirm that only the first competency is reflected on User 1's learning plan since it's already completed.
When I click on "LPT1" "link" in the "User 1" "table_row"
Then "Test-Comp2" "link" should not exist
And "Test-Comp2" "text" should not exist
And "Test-Comp1" "link" should exist
And "Test-Comp1" "text" should exist
# Navigate back to list of Learning plan templates in order to access User 2's learning plan.
And I navigate to "Competencies > Learning plan templates" in site administration
And I click on ".template-userplans" "css_element" in the "LPT1" "table_row"
# Confirm that both competencies are reflected on User 2's learning plan since it's not yet completed.
And I click on "LPT1" "link" in the "User 2" "table_row"
And "Test-Comp2" "link" should exist
And "Test-Comp2" "text" should exist
And "Test-Comp1" "link" should exist
And "Test-Comp1" "text" should exist
@@ -0,0 +1,60 @@
@tool @tool_lp @core_cohort
Feature: Cohorts can be synchronized with learning plans
In order to create learning plans for cohort members
As an admin
I need to be able to synchronise cohorts with learning plans
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| user1 | User | One | user1@example.com |
| user2 | User | Two | user2@example.com |
And the following "cohorts" exist:
| name | idnumber |
| Cohort 1 | CH1 |
And the following "cohort members" exist:
| user | cohort |
| user1 | CH1 |
| user2 | CH1 |
And the following "core_competency > frameworks" exist:
| shortname | idnumber |
| CF1 | CF1 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework | idnumber |
| C1 | CF1 | C1 |
And the following "core_competency > templates" exist:
| shortname |
| LPT1 |
And the following "core_competency > template_competencies" exist:
| template | competency |
| LPT1 | C1 |
@javascript
Scenario: Cohorts can be synchronised with learning plans
Given I log in as "admin"
# Navigate to the list of learning plan templates in order to add cohorts.
And I navigate to "Competencies > Learning plan templates" in site administration
When I click on "Add cohorts to sync" of edit menu in the "LPT1" row
And I set the field "Select cohorts to sync" to "Cohort 1"
And I press "Add cohorts"
And I wait until the page is ready
# Confirm that 2 learning plans were created for members of the cohort.
Then "2 learning plans were created" "text" should exist
# Confirm current screen is still "Cohorts synced to this learning plan template screen"
And "Cohorts synced to this learning plan template" "text" should exist
# Confirm that the cohort is now added to the learning plan template.
And the following should exist in the "generaltable" table:
| Name | Cohort ID |
| Cohort 1 | CH1 |
# Navigate back to the list of learning plan templates to view updated list.
And I navigate to "Competencies > Learning plan templates" in site administration
# Confirm that the added cohort and learning plans are now reflected on the list of Learning plan templates.
And the following should exist in the "generaltable" table:
| Name | Category | Cohorts | Learning plans |
| LPT1 | System | 1 | 2 |
And I click on ".template-userplans" "css_element" in the "LPT1" "table_row"
# Confirm that learning plans were created for all cohort members.
And the following should exist in the "generaltable" table:
| Name | First name | Email address |
| LPT1 | User One | user1@example.com |
| LPT1 | User Two | user2@example.com |
@@ -21,8 +21,8 @@ Feature: Manage plearning plan templates
And I should see "Science template"
Scenario: Read a learning plan template
Given the following lp "templates" exist:
| shortname | description |
Given the following "core_competency > templates" exist:
| shortname | description |
| Science template Year-2 | science template description |
And I navigate to "Competencies > Learning plan templates" in site administration
And I should see "Science template Year-2"
@@ -31,8 +31,8 @@ Feature: Manage plearning plan templates
And I should see "Learning plan template competencies"
Scenario: Edit a learning plan template
Given the following lp "templates" exist:
| shortname | description |
Given the following "core_competency > templates" exist:
| shortname | description |
| Science template Year-3 | science template description |
And I navigate to "Competencies > Learning plan templates" in site administration
And I should see "Science template Year-3"
@@ -44,8 +44,8 @@ Feature: Manage plearning plan templates
And I should see "Science template Year-3 Edited"
Scenario: Delete a learning plan template
Given the following lp "templates" exist:
| shortname | description |
Given the following "core_competency > templates" exist:
| shortname | description |
| Science template Year-4 | science template description |
And I navigate to "Competencies > Learning plan templates" in site administration
And I should see "Science template Year-4"
@@ -5,22 +5,22 @@ Feature: Manage competencies linked to evidence of prior learning
I need to link and unlink competencies from evidence of prior learning
Background:
Given the following lp "frameworks" exist:
| shortname | idnumber |
| Test-Framework | ID-FW1 |
And the following lp "competencies" exist:
| shortname | framework |
| Test-Comp1 | ID-FW1 |
| Test-Comp2 | ID-FW1 |
And the following lp "plans" exist:
| name | user | description |
Given the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Test-Framework | ID-FW1 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework | idnumber |
| Test-Comp1 | ID-FW1 | Test-Comp1 |
| Test-Comp2 | ID-FW1 | Test-Comp2 |
And the following "core_competency > plans" exist:
| name | user | description |
| Test-Plan | admin | Plan description |
And the following lp "plancompetencies" exist:
| plan | competency |
And the following "core_competency > plan_competency" exist:
| plan | competency |
| Test-Plan | Test-Comp1 |
| Test-Plan | Test-Comp2 |
And the following lp "userevidence" exist:
| name | description | user |
And the following "core_competency > user_evidence" exist:
| name | description | user |
| Test-Evidence | Description evidence | admin |
When I log in as "admin"
And I follow "Profile" in the user menu
@@ -51,12 +51,12 @@ Feature: Manage competencies linked to evidence of prior learning
Then "Test-Comp2" "table_row" should exist
Scenario: Unlink competency from evidence of prior learning
Given the following lp "userevidencecompetencies" exist:
| userevidence | competency |
Given the following "core_competency > user_evidence_competency" exist:
| userevidence | competency |
| Test-Evidence | Test-Comp1 |
| Test-Evidence | Test-Comp2 |
Given the following lp "usercompetencies" exist:
| user | competency |
And the following "core_competency > user_competency" exist:
| user | competency |
| admin | Test-Comp1 |
| admin | Test-Comp2 |
And I follow "Evidence of prior learning"
@@ -24,8 +24,8 @@ Feature: Manage evidence of prior learning
And I should see "Evidence-1"
Scenario: Read an evidence of prior learning
Given the following lp "userevidence" exist:
| name | description | user |
Given the following "core_competency > user_evidence" exist:
| name | description | user |
| Evidence-2 | Evidence-2 description | user1 |
And I follow "Evidence of prior learning"
And I should see "List of evidence"
@@ -34,8 +34,8 @@ Feature: Manage evidence of prior learning
Then I should see "Evidence-2"
Scenario: Edit an evidence of prior learning
Given the following lp "userevidence" exist:
| name | description | user |
Given the following "core_competency > user_evidence" exist:
| name | description | user |
| Evidence-3 | Evidence-3 description | user1 |
And I follow "Evidence of prior learning"
And I should see "List of evidence"
@@ -47,8 +47,8 @@ Feature: Manage evidence of prior learning
And I should see "Evidence-3 Edited"
Scenario: Delete an evidence of prior learning
Given the following lp "userevidence" exist:
| name | description | user |
Given the following "core_competency > user_evidence" exist:
| name | description | user |
| Evidence-4 | Evidence-4 description | user1 |
And I follow "Evidence of prior learning"
And I should see "List of evidence"
@@ -62,10 +62,10 @@ Feature: Manage evidence of prior learning
Scenario: List evidences of prior learning
Given the following "users" exist:
| username | firstname | lastname | email |
|user2 | User | 2 | user2@example.com |
And the following lp "userevidence" exist:
| name | description | user |
| username | firstname | lastname | email |
| user2 | User | 2 | user2@example.com |
And the following "core_competency > user_evidence" exist:
| name | description | user |
| Evidence-5 | Evidence-5 description | user1 |
| Evidence-6 | Evidence-6 description | user2 |
And I follow "Evidence of prior learning"
@@ -40,9 +40,9 @@ Feature: View competencies
| competency | relatedcompetency |
| desserts | cakes |
And the following "core_competency > plans" exist:
| name | description | competencies | user |
| Cookery | Cookery is important | salads, desserts, cakes | student1 |
| Literacy | Literacy is important | reading, writing | student1 |
| name | description | competencies | user | status |
| Cookery | Cookery is important | salads, desserts, cakes | student1 | active |
| Literacy | Literacy is important | reading, writing | student1 | active |
And the following "core_competency > course_competencies" exist:
| course | competency |
| C1 | salads |
+4
View File
@@ -34,6 +34,10 @@ if (function_exists('opcache_reset')) {
define('IGNORE_COMPONENT_CACHE', true);
// It makes no sense to use BEHAT_CLI for this script (you cannot initialise PHPunit starting from
// the Behat environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
require_once(__DIR__.'/../../../../lib/clilib.php');
require_once(__DIR__.'/../../../../lib/phpunit/bootstraplib.php');
require_once(__DIR__.'/../../../../lib/testing/lib.php');
+4
View File
@@ -30,6 +30,10 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
define('IGNORE_COMPONENT_CACHE', true);
// It makes no sense to use BEHAT_CLI for this script (you cannot initialise PHPunit starting from
// the Behat environment), so in case user has set tne environment variable, disable it.
putenv('BEHAT_CLI=0');
require_once(__DIR__.'/../../../../lib/clilib.php');
require_once(__DIR__.'/../../../../lib/phpunit/bootstraplib.php');
require_once(__DIR__.'/../../../../lib/testing/lib.php');
+2 -3
View File
@@ -218,12 +218,11 @@ class helper {
* @return moodle_url The URL.
*/
public static function get_duplicate_tour_link($tourid) {
$link = new \moodle_url('/admin/tool/usertours/configure.php', [
return new \moodle_url('/admin/tool/usertours/configure.php', [
'action' => manager::ACTION_DUPLICATETOUR,
'id' => $tourid,
'sesskey' => sesskey(),
]);
return $link;
}
/**
+2 -1
View File
@@ -512,8 +512,9 @@ class manager {
* @param int $tourid The ID of the tour to duplicate.
*/
protected function duplicate_tour($tourid) {
$tour = helper::get_tour($tourid);
require_sesskey();
$tour = helper::get_tour($tourid);
$export = $tour->to_record();
// Remove the id.
unset($export->id);
@@ -1,12 +0,0 @@
@tool @tool_xmldb
Feature: The Reconcile XMLDB files report works and all the files are ok
In order to ensure that all the XMLDB Editor xml files are generated properly
As a developer
I need to be able to run the Reconcile XMLDB files report and verify that everything is ok
Scenario: The Reconcile XMLDB files reports that all files are ok
Given I log in as "admin"
And I navigate to "Development > XMLDB editor" in site administration
When I follow "[Reconcile XMLDB files]"
Then I should see "Look for XMLDB files needing reconciling"
And I should see "All files are OK. No reconciling is needed."
+13 -6
View File
@@ -365,7 +365,7 @@ class core_auth_external extends external_api {
* @throws moodle_exception
*/
public static function resend_confirmation_email($username, $password, $redirect = '') {
global $PAGE;
global $PAGE, $CFG;
$warnings = array();
$params = self::validate_parameters(
@@ -382,20 +382,27 @@ class core_auth_external extends external_api {
$username = trim(core_text::strtolower($params['username']));
$password = $params['password'];
$user = core_user::get_user_by_username($username);
if (!empty($user) && $user->confirmed) {
if (!empty($CFG->protectusernames)) {
throw new moodle_exception('invalidlogin');
}
throw new moodle_exception('alreadyconfirmed');
}
if (is_restored_user($username)) {
if (!empty($CFG->protectusernames)) {
throw new moodle_exception('invalidlogin');
}
throw new moodle_exception('restoredaccountresetpassword', 'webservice');
}
$user = authenticate_user_login($username, $password);
if (empty($user)) {
throw new moodle_exception('invalidlogin');
}
if ($user->confirmed) {
throw new moodle_exception('alreadyconfirmed');
}
// Check if we should redirect the user once the user is confirmed.
$confirmationurl = null;
if (!empty($params['redirect'])) {
+14
View File
@@ -104,6 +104,7 @@ class auth_plugin_lti extends \auth_plugin_base {
* @param int $provisioningmode the desired account provisioning mode, which controls the auth flow for unbound users.
* @param array $legacyconsumersecrets an array of secrets used by the legacy consumer if a migration claim exists.
* @throws coding_exception if the specified provisioning mode is invalid.
* @throws moodle_exception if user authentication fails.
*/
public function complete_login(array $launchdata, moodle_url $returnurl, int $provisioningmode,
array $legacyconsumersecrets = []): void {
@@ -113,6 +114,19 @@ class auth_plugin_lti extends \auth_plugin_base {
// Always sync the PII, regardless of whether we're already authenticated as this user or not.
$user = $this->find_or_create_user_from_launch($launchdata, true);
if ($user->suspended) {
$failurereason = AUTH_LOGIN_SUSPENDED;
$event = \core\event\user_login_failed::create([
'userid' => $user->id,
'other' => [
'username' => $user->username,
'reason' => $failurereason
]
]);
$event->trigger();
throw new moodle_exception('invalidlogin', 'core');
}
if (isloggedin()) {
// If a different user is currently logged in, authenticate the linked user instead.
global $USER;
+1 -1
View File
@@ -25,7 +25,7 @@
require_once('../../config.php');
$issuerid = required_param('id', PARAM_INT);
$wantsurl = new moodle_url(optional_param('wantsurl', '', PARAM_URL));
$wantsurl = new moodle_url(optional_param('wantsurl', '', PARAM_LOCALURL));
$PAGE->set_context(context_system::instance());
$PAGE->set_url(new moodle_url('/auth/oauth2/login.php', ['id' => $issuerid]));
+9
View File
@@ -180,6 +180,7 @@ final class external_test extends externallib_advanced_testcase {
$this->assertTrue($result['success']);
$this->assertEmpty($result['warnings']);
set_config('protectusernames', 0);
$_SERVER['HTTP_USER_AGENT'] = 'no browser'; // Hack around missing user agent in CLI scripts.
$this->expectException('\moodle_exception');
$this->expectExceptionMessage('error/invalidlogin');
@@ -203,6 +204,7 @@ final class external_test extends externallib_advanced_testcase {
$this->assertTrue($result['success']);
$this->assertEmpty($result['warnings']);
set_config('protectusernames', 0);
$_SERVER['HTTP_USER_AGENT'] = 'no browser'; // Hack around missing user agent in CLI scripts.
$this->expectException('\moodle_exception');
$this->expectExceptionMessage('error/invalidlogin');
@@ -233,6 +235,13 @@ final class external_test extends externallib_advanced_testcase {
$result = \external_api::clean_returnvalue(core_auth_external::confirm_user_returns(), $result);
$this->assertTrue($result['success']);
// Keep protectusernames enabled so the call returns invalidlogin exception.
$this->expectException('\moodle_exception');
$this->expectExceptionMessage('error/invalidlogin');
core_auth_external::resend_confirmation_email($username, $password);
// Now disable protectusernames and expect an exception.
set_config('protectusernames', 0);
$this->expectException('\moodle_exception');
$this->expectExceptionMessage('error/alreadyconfirmed');
core_auth_external::resend_confirmation_email($username, $password);
+9 -1
View File
@@ -73,7 +73,15 @@ class auth_plugin_webservice extends auth_plugin_base {
function user_login_webservice($username, $password) {
global $CFG, $DB;
// special web service login
if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
$user = $DB->get_record('user', [
'username' => $username,
'auth' => 'webservice',
'deleted' => '0',
'suspended' => '0',
'mnethostid' => $CFG->mnet_localhost_id,
]);
if ($user) {
return validate_internal_user_password($user, $password);
}
return false;
@@ -168,8 +168,7 @@ abstract class restore_qtype_plugin extends restore_plugin {
$this->questionanswercacheid = $newquestionid;
// Cache all cleaned answers for a simple text match.
foreach ($answers as $answer) {
// MDL-30018: Clean in the same way as {@link xml_writer::xml_safe_utf8()}.
$clean = preg_replace('/[\x-\x8\xb-\xc\xe-\x1f\x7f]/is','', $answer->answer); // Clean CTRL chars.
$clean = core_text::trim_ctrl_chars($answer->answer); // Clean CTRL chars.
$clean = preg_replace("/\r\n|\r/", "\n", $clean); // Normalize line ending.
$this->questionanswercache[$clean] = $answer->id;
}
+1 -2
View File
@@ -5154,8 +5154,7 @@ class restore_create_categories_and_questions extends restore_structure_step {
$potentialhints = $DB->get_records('question_hints',
array('questionid' => $newquestionid), '', 'id, hint');
foreach ($potentialhints as $potentialhint) {
// Clean in the same way than {@link xml_writer::xml_safe_utf8()}.
$cleanhint = preg_replace('/[\x-\x8\xb-\xc\xe-\x1f\x7f]/is','', $potentialhint->hint); // Clean CTRL chars.
$cleanhint = core_text::trim_ctrl_chars($potentialhint->hint); // Clean CTRL chars.
$cleanhint = preg_replace("/\r\n|\r/", "\n", $cleanhint); // Normalize line ending.
if ($cleanhint === $data->hint) {
$newitemid = $data->id;
+3 -3
View File
@@ -253,14 +253,14 @@ class xml_writer {
}
/**
* Perform some UTF-8 cleaning, stripping the control chars (\x0-\x1f)
* but tabs (\x9), newlines (\xa) and returns (\xd). The delete control
* Perform some UTF-8 cleaning, stripping the control chars (\x00-\x1f)
* but tabs (\x09), newlines (\xa) and returns (\xd). The delete control
* char (\x7f) is also included. All them are forbiden in XML 1.0 specs.
* The expression below seems to be UTF-8 safe too because it simply
* ignores the rest of characters. Also normalize linefeeds and return chars.
*/
protected function xml_safe_utf8($content) {
$content = preg_replace('/[\x-\x8\xb-\xc\xe-\x1f\x7f]/is', '', $content ?? ''); // clean CTRL chars.
$content = core_text::trim_ctrl_chars($content ?? '');
$content = preg_replace("/\r\n|\r/", "\n", $content); // Normalize line&return=>line
return fix_utf8($content);
}
+10
View File
@@ -82,6 +82,16 @@ if (!$badge->is_active()) {
die();
}
if (!empty($role)) {
if (!user_has_role_assignment($USER->id, $role, $context->id) && !$isadmin) {
// User does not have the role passed by the parameter.
echo $OUTPUT->header();
echo $OUTPUT->notification(get_string('wrongrole', 'badges'));
echo $OUTPUT->footer();
die();
}
}
$returnurl = new moodle_url('recipients.php', array('id' => $badge->id));
$returnlink = html_writer::link($returnurl, $strrecipients);
$actionbar = new \core_badges\output\standard_action_bar($PAGE, $badge->type, false, false, $returnurl);
+110 -58
View File
@@ -60,6 +60,7 @@ if (!empty($issuedbadge->recipient->id)) {
$assertionid = $assertion->get_assertion_hash();
$assertionentityid = $assertiondata['id'];
$badgeadded = false;
$issuerexists = false;
if (badges_open_badges_backpack_api() == OPEN_BADGES_V2) {
$sitebackpack = badges_get_site_primary_backpack();
$api = new \core_badges\backpack_api($sitebackpack);
@@ -71,62 +72,75 @@ if (!empty($issuedbadge->recipient->id)) {
$issuer = $assertion->get_issuer();
if (!($issuerentityid = badges_external_get_mapping($sitebackpack->id, OPEN_BADGES_V2_TYPE_ISSUER, $issuer['email']))) {
$response = $api->put_issuer($issuer);
if (!$response) {
throw new moodle_exception('invalidrequest', 'error');
if ($response) {
$issuerexists = true;
$issuerentityid = $response->id;
badges_external_create_mapping(
$sitebackpack->id,
OPEN_BADGES_V2_TYPE_ISSUER,
$issuer['email'],
$issuerentityid,
);
}
$issuerentityid = $response->id;
badges_external_create_mapping($sitebackpack->id, OPEN_BADGES_V2_TYPE_ISSUER, $issuer['email'],
$issuerentityid);
}
// Create badge.
$badge = $assertion->get_badge_class(false);
$badgeid = $assertion->get_badge_id();
if (!($badgeentityid = badges_external_get_mapping($sitebackpack->id, OPEN_BADGES_V2_TYPE_BADGE, $badgeid))) {
$response = $api->put_badgeclass($issuerentityid, $badge);
if (!$response) {
throw new moodle_exception('invalidrequest', 'error');
if ($issuerexists) {
// Create badge.
$badge = $assertion->get_badge_class(false);
$badgeid = $assertion->get_badge_id();
if (!($badgeentityid = badges_external_get_mapping($sitebackpack->id, OPEN_BADGES_V2_TYPE_BADGE, $badgeid))) {
$response = $api->put_badgeclass($issuerentityid, $badge);
if ($response) {
$badgeentityid = $response->id;
badges_external_create_mapping(
$sitebackpack->id,
OPEN_BADGES_V2_TYPE_BADGE,
$badgeid,
$badgeentityid,
);
}
}
$badgeentityid = $response->id;
badges_external_create_mapping($sitebackpack->id, OPEN_BADGES_V2_TYPE_BADGE, $badgeid,
$badgeentityid);
}
// Create assertion (Award the badge!).
$assertionentityid = badges_external_get_mapping(
$sitebackpack->id,
OPEN_BADGES_V2_TYPE_ASSERTION,
$assertionid
);
if ($assertionentityid && strpos($sitebackpack->backpackapiurl, 'badgr')) {
$assertionentityid = badges_generate_badgr_open_url(
$sitebackpack,
OPEN_BADGES_V2_TYPE_ASSERTION,
$assertionentityid
);
}
// Create an assertion for the recipient in the issuer's account.
if (!$assertionentityid) {
$response = $api->put_badgeclass_assertion($badgeentityid, $assertiondata);
if (!$response) {
throw new moodle_exception('invalidrequest', 'error');
}
$assertionentityid = badges_generate_badgr_open_url($sitebackpack, OPEN_BADGES_V2_TYPE_ASSERTION, $response->id);
$badgeadded = true;
badges_external_create_mapping($sitebackpack->id, OPEN_BADGES_V2_TYPE_ASSERTION, $assertionid,
$response->id);
} else {
// An assertion already exists. Make sure it's up to date.
$internalid = badges_external_get_mapping(
// Create assertion (Award the badge!).
$assertionentityid = badges_external_get_mapping(
$sitebackpack->id,
OPEN_BADGES_V2_TYPE_ASSERTION,
$assertionid,
'externalid'
$assertionid
);
$response = $api->update_assertion($internalid, $assertiondata);
if (!$response) {
throw new moodle_exception('invalidrequest', 'error');
if ($assertionentityid && strpos($sitebackpack->backpackapiurl, 'badgr')) {
$assertionentityid = badges_generate_badgr_open_url(
$sitebackpack,
OPEN_BADGES_V2_TYPE_ASSERTION,
$assertionentityid
);
}
// Create an assertion for the recipient in the issuer's account.
if (!$assertionentityid) {
$response = $api->put_badgeclass_assertion($badgeentityid, $assertiondata);
if ($response) {
$assertionentityid = badges_generate_badgr_open_url(
$sitebackpack,
OPEN_BADGES_V2_TYPE_ASSERTION,
$response->id,
);
$badgeadded = true;
badges_external_create_mapping(
$sitebackpack->id,
OPEN_BADGES_V2_TYPE_ASSERTION,
$assertionid,
$response->id,
);
}
} else {
// An assertion already exists. Make sure it's up to date.
$internalid = badges_external_get_mapping(
$sitebackpack->id,
OPEN_BADGES_V2_TYPE_ASSERTION,
$assertionid,
'externalid'
);
$response = $api->update_assertion($internalid, $assertiondata);
}
}
}
@@ -136,21 +150,59 @@ if (!empty($issuedbadge->recipient->id)) {
// - If a user and site backpack have the same provider we can skip this as Badgr automatically maps recipients
// based on email address.
// - This is only needed when the backpacks are from different regions.
if ($assertionentityid && !badges_external_get_mapping($userbackpack->id, OPEN_BADGES_V2_TYPE_ASSERTION, $assertionid)) {
if (
$assertionentityid
&& (!$issuerexists || !badges_external_get_mapping($userbackpack->id, OPEN_BADGES_V2_TYPE_ASSERTION, $assertionid))
) {
$userapi = new \core_badges\backpack_api($userbackpack, $backpack);
$userapi->authenticate();
$response = $userapi->import_badge_assertion($assertionentityid);
if (!$response) {
throw new moodle_exception('invalidrequest', 'error');
if ($response) {
$assertionentityid = $response->id;
$badgeadded = true;
badges_external_create_mapping(
$userbackpack->id,
OPEN_BADGES_V2_TYPE_ASSERTION,
$assertionid,
$assertionentityid,
);
}
$assertionentityid = $response->id;
$badgeadded = true;
badges_external_create_mapping($userbackpack->id, OPEN_BADGES_V2_TYPE_ASSERTION, $assertionid,
$assertionentityid);
}
$response = $badgeadded ? ['success' => 'addedtobackpack'] : ['warning' => 'existsinbackpack'];
redirect(new moodle_url('/badges/mybadges.php', $response));
$message = '';
$messagetype = \core\output\notification::NOTIFY_INFO;
if ($badgeadded) {
$message = get_string('addedtobackpack', 'badges');
$messagetype = \core\output\notification::NOTIFY_SUCCESS;
} else {
if (isset($userapi) && !empty($userapi->get_errors())) {
// If the api used to import the badge to the backpack has errors, show them to inform the user.
if (array_filter($userapi->get_errors(), fn($element) => (strpos($element, "DUPLICATE_BADGE") !== false))) {
// Duplicated badges are displayed as a warning.
$message = get_string('existsinbackpack', 'badges');
$messagetype = \core\output\notification::NOTIFY_WARNING;
} else {
// If the userapi has any other errors, we will use those to inform the user.
$message = get_string(
'error:cannotsendtobackpack',
'badges',
implode($userapi->get_errors()),
);
$messagetype = \core\output\notification::NOTIFY_ERROR;
}
} else if (isset($api) && !empty($api->get_errors())) {
// If the api used to create/update the issuer has errors, show them to inform the user.
$errors = $api->get_errors() ?? [get_string('invalidrequest', 'error')];
$message = get_string(
'error:cannotsendtobackpack',
'badges',
implode($errors),
);
$messagetype = \core\output\notification::NOTIFY_ERROR;
}
}
redirect(new moodle_url('/badges/mybadges.php'), $message, null, $messagetype);
} else {
redirect(new moodle_url('/badges/mybadges.php'));
}
+1 -1
View File
@@ -56,7 +56,7 @@ if ($action == 'delete' && $confirm && confirm_sesskey()) {
} else {
$msg = get_string('sitebackpacknotdeleted', 'badges');
}
} else if ($action == 'moveup' || $action == 'movedown') {
} else if (($action == 'moveup' || $action == 'movedown') && confirm_sesskey()) {
// If no backpack has been selected, there isn't anything to move.
if (empty($id)) {
redirect($url);
+14
View File
@@ -667,6 +667,20 @@ class backpack_api {
return backpack_api_mapping::get_authentication_error();
}
/**
* List all errors occurred during the requests to the backpack.
*
* @return array The list of errors.
*/
public function get_errors(): array {
$errors = [];
foreach ($this->mappings as $mapping) {
$errors = array_merge($errors, $mapping->get_errors());
}
return $errors;
}
/**
* Get the list of badges in a collection.
*
+40
View File
@@ -79,6 +79,9 @@ class backpack_api_mapping {
/** @var string Error string from authentication request. */
private static $authenticationerror = '';
/** @var array Errors encountered during the request. */
protected $errors = [];
/**
* Create a mapping.
*
@@ -144,6 +147,26 @@ class backpack_api_mapping {
return self::$authenticationerror;
}
/**
* Get the errors encountered during the request.
*
* @return array The list of errors.
*/
public function get_errors() {
return $this->errors;
}
/**
* Add an error to the list of errors.
*
* @param string $error The error message.
* @return self This instance for method chaining.
*/
public function add_error(string $error): self {
$this->errors[] = $error;
return $this;
}
/**
* Does the action match this mapping?
*
@@ -366,6 +389,23 @@ class backpack_api_mapping {
$response = $curl->put($url, $post, $options);
}
$response = json_decode($response);
if ($response === null) {
$this->add_error(get_string('invalidrequest', 'error'));
return null;
}
if (isset($response->status) && isset($response->status->success) && $response->status->success != true) {
// If the response wasn't successful, store the errors and return null.
if (isset($response->validationErrors)) {
$error = implode(', ', $response->validationErrors);
} else if (isset($response->status)) {
$error = $response->status->description;
} else {
$error = get_string('invalidrequest', 'error');
}
$this->add_error($error);
return null;
}
if (isset($response->result)) {
$response = $response->result;
}
@@ -56,13 +56,13 @@
<td> {{{backpackweburl}}} </td>
<td>
{{#canmoveup}}
<a href="{{baseurl}}?id={{id}}&action=moveup">{{#pix}}t/up, core,{{#str}}moveup{{/str}}{{/pix}}</a>
<a href="{{baseurl}}?id={{id}}&sesskey={{sesskey}}&action=moveup">{{#pix}}t/up, core,{{#str}}moveup{{/str}}{{/pix}}</a>
{{/canmoveup}}
{{^canmoveup}}
{{#pix}}spacer, moodle{{/pix}}
{{/canmoveup}}
{{#canmovedown}}
<a href="{{baseurl}}?id={{id}}&action=movedown">{{#pix}}t/down, core,{{#str}}movedown{{/str}}{{/pix}}</a>
<a href="{{baseurl}}?id={{id}}&sesskey={{sesskey}}&action=movedown">{{#pix}}t/down, core,{{#str}}movedown{{/str}}{{/pix}}</a>
{{/canmovedown}}
{{^canmovedown}}
{{#pix}}spacer, moodle{{/pix}}
@@ -14,13 +14,13 @@ Feature: Award badges based on competency completion
And the following "course enrolments" exist:
| user | course | role |
| user1 | C1 | student |
And the following lp "frameworks" exist:
| shortname | idnumber |
| Framework 1 | sc-y-2 |
And the following lp "competencies" exist:
| shortname | framework |
| comp1 | sc-y-2 |
| comp2 | sc-y-2 |
And the following "core_competency > frameworks" exist:
| shortname | idnumber |
| Framework 1 | sc-y-2 |
And the following "core_competency > competencies" exist:
| shortname | competencyframework |
| comp1 | sc-y-2 |
| comp2 | sc-y-2 |
And I log in as "admin"
@javascript
+16 -6
View File
@@ -15,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Script to let a user edit the properties of a particular RSS feed.
* Script to let a user view the output of a particular RSS feed.
*
* @package block_rss_client
* @copyright 2009 Tim Hunt
@@ -26,9 +26,6 @@ require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir .'/simplepie/moodle_simplepie.php');
require_login();
if (isguestuser()) {
throw new \moodle_exception('guestsarenotallowed');
}
$returnurl = optional_param('returnurl', '', PARAM_LOCALURL);
$courseid = optional_param('courseid', 0, PARAM_INT);
@@ -46,6 +43,11 @@ if ($courseid) {
$PAGE->set_context($context);
}
$managesharedfeeds = has_capability('block/rss_client:manageanyfeeds', $context);
if (!$managesharedfeeds) {
require_capability('block/rss_client:manageownfeeds', $context);
}
$urlparams = array('rssid' => $rssid);
if ($courseid) {
$urlparams['courseid'] = $courseid;
@@ -56,10 +58,18 @@ if ($returnurl) {
$PAGE->set_url('/blocks/rss_client/viewfeed.php', $urlparams);
$PAGE->set_pagelayout('popup');
$rssrecord = $DB->get_record('block_rss_client', array('id' => $rssid), '*', MUST_EXIST);
if ($managesharedfeeds) {
$select = 'id = :id AND (userid = :userid OR shared = 1)';
} else {
$select = 'id = :id AND userid = :userid';
}
$rssrecord = $DB->get_record_select('block_rss_client', $select, [
'id' => $rssid,
'userid' => $USER->id,
], '*', MUST_EXIST);
$rss = new moodle_simplepie($rssrecord->url);
if ($rss->error()) {
debugging($rss->error());
throw new \moodle_exception('errorfetchingrssfeed');
+3 -3
View File
@@ -911,10 +911,10 @@ class core_calendar_external extends external_api {
$formoptions['eventtypes'] = $allowedeeventtypes;
if ($courseid) {
require_once($CFG->libdir . '/grouplib.php');
$groupcoursedata = groups_get_course_data($courseid);
if (!empty($groupcoursedata->groups)) {
$groupcoursedata = groups_get_all_groups($courseid);
if (!empty($groupcoursedata)) {
$formoptions['groups'] = [];
foreach ($groupcoursedata->groups as $groupid => $groupdata) {
foreach ($groupcoursedata as $groupid => $groupdata) {
$formoptions['groups'][$groupid] = $groupdata->name;
}
}
+4 -4
View File
@@ -3608,9 +3608,9 @@ function calendar_output_fragment_event_form($args) {
if (is_null($eventid)) {
if (!empty($courseid)) {
$groupcoursedata = groups_get_course_data($courseid);
$groupcoursedata = groups_get_all_groups($courseid);
$formoptions['groups'] = [];
foreach ($groupcoursedata->groups as $groupid => $groupdata) {
foreach ($groupcoursedata as $groupid => $groupdata) {
$formoptions['groups'][$groupid] = $groupdata->name;
}
}
@@ -3652,9 +3652,9 @@ function calendar_output_fragment_event_form($args) {
$formoptions['event'] = $event;
if (!empty($event->courseid)) {
$groupcoursedata = groups_get_course_data($event->courseid);
$groupcoursedata = groups_get_all_groups($event->courseid);
$formoptions['groups'] = [];
foreach ($groupcoursedata->groups as $groupid => $groupdata) {
foreach ($groupcoursedata as $groupid => $groupdata) {
$formoptions['groups'][$groupid] = $groupdata->name;
}
}
+40 -40
View File
@@ -41,8 +41,8 @@ final class rrule_manager_test extends \advanced_testcase {
global $DB;
$this->resetAfterTest();
// Set our timezone based on the timezone in the RFC's samples (US/Eastern).
$tz = 'US/Eastern';
// Set our timezone based on the timezone in the RFC's samples (America/New_York).
$tz = 'America/New_York';
$this->setTimezone($tz);
$timezone = new \DateTimeZone($tz);
// Create our event's DTSTART date based on RFC's samples (most commonly used in RFC is 1997-09-02 09:00:00 EDT).
@@ -686,8 +686,8 @@ final class rrule_manager_test extends \advanced_testcase {
// Change the start date for forever events to 9am of the 2nd day of the current month and year.
$this->change_event_startdate(date('Ym02\T090000'));
$startdatetime = new \DateTime(date('Y-m-d H:i:s', $this->event->timestart));
$startdate = new \DateTime(date('Y-m-d', $this->event->timestart));
$startdatetime = new \DateTime(date('Y-m-d H:i:s', $this->event->timestart), new \DateTimeZone('Australia/Perth'));
$startdate = new \DateTime(date('Y-m-d', $this->event->timestart), new \DateTimeZone('Australia/Perth'));
$offsetinterval = $startdatetime->diff($startdate, true);
$interval = new \DateInterval('P12M');
@@ -843,8 +843,8 @@ final class rrule_manager_test extends \advanced_testcase {
// Change the start date for forever events to 9am of the 2nd day of the current month and year.
$this->change_event_startdate(date('Ym02\T090000'));
$startdatetime = new \DateTime(date('Y-m-d H:i:s', $this->event->timestart));
$startdate = new \DateTime(date('Y-m-d', $this->event->timestart));
$startdatetime = new \DateTime(date('Y-m-d H:i:s', $this->event->timestart), new \DateTimeZone('Australia/Perth'));
$startdate = new \DateTime(date('Y-m-d', $this->event->timestart), new \DateTimeZone('Australia/Perth'));
$offsetinterval = $startdatetime->diff($startdate, true);
$interval = new \DateInterval('P12M');
@@ -1202,8 +1202,8 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_every_other_day_forever() {
global $DB;
// Change the start date for forever events to 9am of the current date in US/Eastern time.
$this->change_event_startdate(date('Ymd\T090000'), 'US/Eastern');
// Change the start date for forever events to 9am of the current date in America/New_York time.
$this->change_event_startdate(date('Ymd\T090000'), 'America/New_York');
$startdatetime = new \DateTime(date('Y-m-d H:i:s', $this->event->timestart));
$interval = new \DateInterval('P2D');
@@ -1272,7 +1272,7 @@ final class rrule_manager_test extends \advanced_testcase {
global $DB;
// Change our event's date to 01-01-1998, based on the example from the RFC.
$this->change_event_startdate('19980101T090000', 'US/Eastern');
$this->change_event_startdate('19980101T090000', 'America/New_York');
$rrule = 'FREQ=YEARLY;UNTIL=20000131T090000Z;BYMONTH=1;BYDAY=SU,MO,TU,WE,TH,FR,SA';
$mang = new rrule_manager($rrule);
@@ -1306,7 +1306,7 @@ final class rrule_manager_test extends \advanced_testcase {
global $DB;
// Change our event's date to 01-01-1998, based on the example from the RFC.
$this->change_event_startdate('19980101T090000', 'US/Eastern');
$this->change_event_startdate('19980101T090000', 'America/New_York');
$rrule = 'FREQ=DAILY;UNTIL=20000131T090000Z;BYMONTH=1';
$mang = new rrule_manager($rrule);
@@ -1404,8 +1404,8 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_every_other_week_forever() {
global $DB;
// Change the start date for forever events to 9am of the current date in US/Eastern time.
$this->change_event_startdate(date('Ymd\T090000'), 'US/Eastern');
// Change the start date for forever events to 9am of the current date in America/New_York time.
$this->change_event_startdate(date('Ymd\T090000'), 'America/New_York');
$interval = new \DateInterval('P2W');
@@ -1615,7 +1615,7 @@ final class rrule_manager_test extends \advanced_testcase {
global $DB;
// Change our event's date to 05-09-1997, based on the example from the RFC.
$startdatetime = $this->change_event_startdate('19970905T090000', 'US/Eastern');
$startdatetime = $this->change_event_startdate('19970905T090000', 'America/New_York');
$startdate = new \DateTime(date('Y-m-d', $this->event->timestart));
$offsetinterval = $startdatetime->diff($startdate, true);
@@ -1651,7 +1651,7 @@ final class rrule_manager_test extends \advanced_testcase {
global $DB;
// Change our event's date to 05-09-1997, based on the example from the RFC.
$startdatetime = $this->change_event_startdate('19970905T090000', 'US/Eastern');
$startdatetime = $this->change_event_startdate('19970905T090000', 'America/New_York');
$startdate = new \DateTime(date('Y-m-d', $this->event->timestart));
$offsetinterval = $startdatetime->diff($startdate, true);
@@ -1689,7 +1689,7 @@ final class rrule_manager_test extends \advanced_testcase {
global $DB;
// Change our event's date to 05-09-1997, based on the example from the RFC.
$startdatetime = $this->change_event_startdate('19970907T090000', 'US/Eastern');
$startdatetime = $this->change_event_startdate('19970907T090000', 'America/New_York');
$startdate = new \DateTime(date('Y-m-d', $this->event->timestart));
$offsetinterval = $startdatetime->diff($startdate, true);
@@ -1732,7 +1732,7 @@ final class rrule_manager_test extends \advanced_testcase {
global $DB;
// Change our event's date to 05-09-1997, based on the example from the RFC.
$startdatetime = $this->change_event_startdate('19970922T090000', 'US/Eastern');
$startdatetime = $this->change_event_startdate('19970922T090000', 'America/New_York');
$startdate = new \DateTime($startdatetime->format('Y-m-d'));
$offsetinterval = $startdatetime->diff($startdate, true);
@@ -1774,7 +1774,7 @@ final class rrule_manager_test extends \advanced_testcase {
global $DB;
// Change our event's date to 28 September of the current year, based on the example from the RFC.
$this->change_event_startdate(date('Y0928\T090000'), 'US/Eastern');
$this->change_event_startdate(date('Y0928\T090000'), 'America/New_York');
$rrule = 'FREQ=MONTHLY;BYMONTHDAY=-3';
$mang = new rrule_manager($rrule);
@@ -1860,7 +1860,7 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_every_first_and_last_day_of_the_month_10_count() {
global $DB;
$startdatetime = $this->change_event_startdate('19970930T090000', 'US/Eastern');
$startdatetime = $this->change_event_startdate('19970930T090000', 'America/New_York');
$startdate = new \DateTime($startdatetime->format('Y-m-d'));
$offsetinterval = $startdatetime->diff($startdate, true);
@@ -1905,7 +1905,7 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_every_18_months_days_10_to_15_10_count() {
global $DB;
$startdatetime = $this->change_event_startdate('19970910T090000', 'US/Eastern');
$startdatetime = $this->change_event_startdate('19970910T090000', 'America/New_York');
$rrule = 'FREQ=MONTHLY;INTERVAL=18;COUNT=10;BYMONTHDAY=10,11,12,13,14,15';
$mang = new rrule_manager($rrule);
@@ -1950,9 +1950,9 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_every_tuesday_every_other_month_forever() {
global $DB;
// Change the start date for forever events to 9am of the Tuesday on or before of the current date in US/Eastern time.
// Change the start date for forever events to 9am of the Tuesday on or before of the current date in America/New_York time.
$nexttuesday = new \DateTime('next Tuesday');
$this->change_event_startdate($nexttuesday->format('Ymd\T090000'), 'US/Eastern');
$this->change_event_startdate($nexttuesday->format('Ymd\T090000'), 'America/New_York');
$rrule = 'FREQ=MONTHLY;INTERVAL=2;BYDAY=TU';
$mang = new rrule_manager($rrule);
@@ -2005,7 +2005,7 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_yearly_in_june_july_10_count() {
global $DB;
$startdatetime = $this->change_event_startdate('19970610T090000', 'US/Eastern');
$startdatetime = $this->change_event_startdate('19970610T090000', 'America/New_York');
$rrule = 'FREQ=YEARLY;COUNT=10;BYMONTH=6,7';
$mang = new rrule_manager($rrule);
@@ -2048,7 +2048,7 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_every_other_year_in_june_july_10_count() {
global $DB;
$startdatetime = $this->change_event_startdate('19970310T090000', 'US/Eastern');
$startdatetime = $this->change_event_startdate('19970310T090000', 'America/New_York');
$rrule = 'FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3';
$mang = new rrule_manager($rrule);
@@ -2095,7 +2095,7 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_every_3_years_1st_100th_200th_days_10_count() {
global $DB;
$startdatetime = $this->change_event_startdate('19970101T090000', 'US/Eastern');
$startdatetime = $this->change_event_startdate('19970101T090000', 'America/New_York');
$rrule = 'FREQ=YEARLY;INTERVAL=3;COUNT=10;BYYEARDAY=1,100,200';
$mang = new rrule_manager($rrule);
@@ -2145,7 +2145,7 @@ final class rrule_manager_test extends \advanced_testcase {
// Change our event's date to the 20th Monday of the current year.
$twentiethmonday = new \DateTime(date('Y-01-01'));
$twentiethmonday->modify('+20 Monday');
$startdatetime = $this->change_event_startdate($twentiethmonday->format('Ymd\T000000'), 'US/Eastern');
$startdatetime = $this->change_event_startdate($twentiethmonday->format('Ymd\T000000'), 'America/New_York');
$interval = new \DateInterval('P1Y');
@@ -2191,7 +2191,7 @@ final class rrule_manager_test extends \advanced_testcase {
// Change our event's date to the start of the 20th week of the current year.
$twentiethweek = new \DateTime(date('Y-01-01'));
$twentiethweek->setISODate($twentiethweek->format('Y'), 20);
$startdatetime = $this->change_event_startdate($twentiethweek->format('Ymd\T090000'), 'US/Eastern');
$startdatetime = $this->change_event_startdate($twentiethweek->format('Ymd\T090000'), 'America/New_York');
$startdate = clone($startdatetime);
$startdate->modify($startdate->format('Y-m-d'));
@@ -2238,9 +2238,9 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_every_thursday_in_march_forever() {
global $DB;
// Change our event's date to the first Thursday of March of the current year at 9am US/Eastern time.
// Change our event's date to the first Thursday of March of the current year at 9am America/New_York time.
$firstthursdayofmarch = new \DateTime('first Thursday of March');
$startdatetime = $this->change_event_startdate($firstthursdayofmarch->format('Ymd\T090000'), 'US/Eastern');
$startdatetime = $this->change_event_startdate($firstthursdayofmarch->format('Ymd\T090000'), 'America/New_York');
$interval = new \DateInterval('P1Y');
@@ -2297,9 +2297,9 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_every_thursday_june_july_august_forever() {
global $DB;
// Change our event's date to the first Thursday of June in the current year at 9am US/Eastern time.
// Change our event's date to the first Thursday of June in the current year at 9am America/New_York time.
$firstthursdayofjune = new \DateTime('first Thursday of June');
$startdatetime = $this->change_event_startdate($firstthursdayofjune->format('Ymd\T090000'), 'US/Eastern');
$startdatetime = $this->change_event_startdate($firstthursdayofjune->format('Ymd\T090000'), 'America/New_York');
$startdate = new \DateTime($startdatetime->format('Y-m-d'));
@@ -2354,8 +2354,8 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_friday_the_thirteenth_forever() {
global $DB;
// Change our event's date to the first Thursday of June in the current year at 9am US/Eastern time.
$this->change_event_startdate(date('Ymd\T090000'), 'US/Eastern');
// Change our event's date to the first Thursday of June in the current year at 9am America/New_York time.
$this->change_event_startdate(date('Ymd\T090000'), 'America/New_York');
$rrule = 'FREQ=MONTHLY;BYDAY=FR;BYMONTHDAY=13';
$mang = new rrule_manager($rrule);
@@ -2391,10 +2391,10 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_first_saturday_following_first_sunday_forever() {
global $DB;
// Change our event's date to the next Saturday after the first Sunday of the the current month at 9am US/Eastern time.
// Change our event's date to the next Saturday after the first Sunday of the current month at 9am America/New_York time.
$firstsaturdayafterfirstsunday = new \DateTime('first Sunday of this month');
$firstsaturdayafterfirstsunday->modify('next Saturday');
$startdatetime = $this->change_event_startdate($firstsaturdayafterfirstsunday->format('Ymd\T090000'), 'US/Eastern');
$startdatetime = $this->change_event_startdate($firstsaturdayafterfirstsunday->format('Ymd\T090000'), 'America/New_York');
$startdate = new \DateTime($startdatetime->format('Y-m-d'));
$offset = $startdatetime->diff($startdate, true);
@@ -2452,7 +2452,7 @@ final class rrule_manager_test extends \advanced_testcase {
$electiondate->modify('+1 Tuesday');
// Use the most recent election date as the starting date of our recurring events.
$startdatetime = $this->change_event_startdate($electiondate->format('Ymd\T090000'), 'US/Eastern');
$startdatetime = $this->change_event_startdate($electiondate->format('Ymd\T090000'), 'America/New_York');
$startdate = new \DateTime($startdatetime->format('Y-m-d'));
$offset = $startdatetime->diff($startdate, true);
@@ -2495,7 +2495,7 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_monthly_bysetpos_3_count() {
global $DB;
$this->change_event_startdate('19970904T090000', 'US/Eastern');
$this->change_event_startdate('19970904T090000', 'America/New_York');
$rrule = 'FREQ=MONTHLY;COUNT=3;BYDAY=TU,WE,TH;BYSETPOS=3';
$mang = new rrule_manager($rrule);
@@ -2532,7 +2532,7 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_second_to_the_last_weekday_of_the_month() {
global $DB;
$this->change_event_startdate('19970929T090000', 'US/Eastern');
$this->change_event_startdate('19970929T090000', 'America/New_York');
$rrule = 'FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2;COUNT=7';
$mang = new rrule_manager($rrule);
@@ -2757,7 +2757,7 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_weekly_byday_with_wkst_mo() {
global $DB;
$this->change_event_startdate('19970805T090000', 'US/Eastern');
$this->change_event_startdate('19970805T090000', 'America/New_York');
$rrule = 'FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=MO';
$mang = new rrule_manager($rrule);
@@ -2790,7 +2790,7 @@ final class rrule_manager_test extends \advanced_testcase {
public function test_weekly_byday_with_wkst_su() {
global $DB;
$this->change_event_startdate('19970805T090000', 'US/Eastern');
$this->change_event_startdate('19970805T090000', 'America/New_York');
$rrule = 'FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU';
$mang = new rrule_manager($rrule);
@@ -2870,7 +2870,7 @@ final class rrule_manager_test extends \advanced_testcase {
* Change the event's timestart (DTSTART) based on the test's needs.
*
* @param string $datestr The date string. In 'Ymd\This' format. e.g. 19990902T090000.
* @param null|string $timezonestr A valid timezone string. e.g. 'US/Eastern'.
* @param null|string $timezonestr A valid timezone string. e.g. 'America/New_York'.
* If not provided, the default timezone will be used.
* @return bool|DateTime
*/
@@ -55,11 +55,11 @@ class cohorts extends system_report {
"{$entitymainalias}.component");
// Check if report needs to show a specific category.
$contextid = $this->get_parameter('contextid', 0, PARAM_INT);
$showall = $this->get_parameter('showall', true, PARAM_BOOL);
if (!$showall) {
if (!$this->get_context() instanceof context_system || !$this->get_parameter('showall', false, PARAM_BOOL)) {
$paramcontextid = database::generate_param_name();
$this->add_base_condition_sql("{$entitymainalias}.contextid = :$paramcontextid", [$paramcontextid => $contextid]);
$this->add_base_condition_sql("{$entitymainalias}.contextid = :{$paramcontextid}", [
$paramcontextid => $this->get_context()->id,
]);
}
// Now we can call our helper methods to add the content we want to include in the report.
@@ -77,14 +77,7 @@ class cohorts extends system_report {
* @return bool
*/
protected function can_view(): bool {
$contextid = $this->get_parameter('contextid', 0, PARAM_INT);
if ($contextid) {
$context = context::instance_by_id($contextid, MUST_EXIST);
} else {
$context = context_system::instance();
}
return has_any_capability(['moodle/cohort:manage', 'moodle/cohort:view'], $context);
return has_any_capability(['moodle/cohort:manage', 'moodle/cohort:view'], $this->get_context());
}
/**
@@ -98,10 +91,8 @@ class cohorts extends system_report {
public function add_columns(cohort $cohortentity): void {
$entitymainalias = $cohortentity->get_table_alias('cohort');
$showall = $this->get_parameter('showall', false, PARAM_BOOL);
// Category column. An extra callback is appended in order to extend the current column formatting.
if ($showall) {
if ($this->get_context() instanceof context_system && $this->get_parameter('showall', false, PARAM_BOOL)) {
$this->add_column_from_entity('cohort:context')
->add_callback(static function(string $value, stdClass $cohort): string {
$context = context::instance_by_id($cohort->contextid);
@@ -195,10 +186,11 @@ class cohorts extends system_report {
*/
protected function add_actions(): void {
$contextid = $this->get_parameter('contextid', 0, PARAM_INT);
$showall = $this->get_parameter('showall', true, PARAM_BOOL);
$returnurl = (new moodle_url('/cohort/index.php',
['id' => ':id', 'contextid' => $contextid, 'showall' => $showall]))->out(false);
$returnurl = (new moodle_url('/cohort/index.php', [
'id' => ':id',
'contextid' => $this->get_context()->id,
'showall' => $this->get_parameter('showall', false, PARAM_BOOL),
]))->out(false);
// Hide action. It will be only shown if the property 'visible' is true and user has 'moodle/cohort:manage' capabillity.
$this->add_action((new action(
+6
View File
@@ -380,6 +380,12 @@ class core_cohort_external extends external_api {
$results = array_merge($results, cohort_get_available_cohorts($context, COHORT_ALL, $limitfrom, $limitnum, $query));
}
} else if ($includes == 'all') {
$contextsystem = context_system::instance();
if (!$context instanceof context_system &&
!has_any_capability(['moodle/cohort:view', 'moodle/cohort:manage'], $contextsystem)) {
throw new required_capability_exception($contextsystem, 'moodle/cohort:view', 'nopermissions', '');
}
$results = cohort_get_all_cohorts($limitfrom, $limitnum, $query);
$results = $results['cohorts'];
} else {
+1 -2
View File
@@ -104,8 +104,7 @@ if ($editcontrols = cohort_edit_controls($context, $baseurl)) {
echo $OUTPUT->render($editcontrols);
}
$reportparams = ['contextid' => $context->id, 'showall' => $showall];
$report = system_report_factory::create(cohorts::class, $context, '', '', 0, $reportparams);
$report = system_report_factory::create(cohorts::class, $context, '', '', 0, ['showall' => $showall]);
// Check if it needs to search by name.
if (!empty($searchquery)) {
+16 -6
View File
@@ -555,6 +555,7 @@ final class externallib_test extends externallib_advanced_testcase {
role_assign($userrole, $catuser->id, $catcontext->id);
// Enrol user in the course.
$this->getDataGenerator()->enrol_user($creator->id, $course->id);
$this->getDataGenerator()->enrol_user($courseuser->id, $course->id, 'courserole');
$syscontext = array('contextid' => \context_system::instance()->id);
@@ -612,18 +613,27 @@ final class externallib_test extends externallib_advanced_testcase {
$this->assertEquals(3, count($result['cohorts']));
// A user in the course context with the system cohort:view capability. Check that all the system cohorts are returned.
$this->setUser($courseuser);
$result = core_cohort_external::search_cohorts("Cohortsearch", $coursecontext, 'all');
$this->assertEquals(1, count($result['cohorts']));
$this->assertEquals('Cohortsearch 1', $result['cohorts'][$cohort1->id]->name);
$this->assertEquals(3, count($result['cohorts']));
// A user in the course context without the ability to view system cohorts.
$this->setUser($courseuser);
try {
$result = core_cohort_external::search_cohorts("Cohortsearch", $coursecontext, 'all');
$this->fail('Exception expected');
} catch (\Throwable $e) {
$this->assertInstanceOf(\required_capability_exception::class, $e);
$this->assertStringContainsString('(View site-wide cohorts)', $e->getMessage());
}
// Detect invalid parameter $includes.
$this->setUser($creator);
try {
$result = core_cohort_external::search_cohorts("Cohortsearch", $syscontext, 'invalid');
$this->fail('Invalid parameter includes');
} catch (\coding_exception $e) {
// All good.
$this->fail('Exception expected');
} catch (\Throwable $e) {
$this->assertInstanceOf(\coding_exception::class, $e);
$this->assertStringContainsString('Invalid parameter value for \'includes\'', $e->getMessage());
}
}
}
@@ -57,7 +57,13 @@ class behat_core_competency_generator extends behat_generator_base {
'singular' => 'plan',
'datagenerator' => 'plan',
'required' => ['name'],
'switchids' => ['user' => 'userid'],
'switchids' => ['user' => 'userid', 'status' => 'status'],
],
'plan_competencies' => [
'singular' => 'plan_competency',
'datagenerator' => 'plan_competency',
'required' => ['plan', 'competency'],
'switchids' => ['competency' => 'competencyid', 'plan' => 'planid'],
],
'related_competencies' => [
'singular' => 'related_competency',
@@ -83,14 +89,38 @@ class behat_core_competency_generator extends behat_generator_base {
'required' => ['plan', 'competency', 'user'],
'switchids' => ['plan' => 'planid', 'competency' => 'competencyid', 'user' => 'userid'],
],
'user_evidence' => [
'singular' => 'user_evidence',
'datagenerator' => 'user_evidence',
'required' => ['user', 'name'],
'switchids' => ['user' => 'userid'],
],
'user_evidence_competency' => [
'singular' => 'user_evidence_competency',
'datagenerator' => 'user_evidence_competency',
'required' => ['userevidence', 'competency'],
'switchids' => ['userevidence' => 'userevidenceid', 'competency' => 'competencyid'],
],
'templates' => [
'singular' => 'template',
'datagenerator' => 'template',
'required' => ['shortname'],
'switchids' => ['context' => 'contextid'],
],
'template_competencies' => [
'singular' => 'template_competency',
'datagenerator' => 'template_competency',
'required' => ['template', 'competency'],
'switchids' => ['template' => 'templateid', 'competency' => 'competencyid'],
],
];
}
/**
* Get the competecy framework id using an idnumber.
* Get the competency framework id using an idnumber.
*
* @param string $idnumber
* @return int The competecy framework id
* @return int The competency framework id
*/
protected function get_competencyframework_id(string $idnumber): int {
global $DB;
@@ -103,10 +133,10 @@ class behat_core_competency_generator extends behat_generator_base {
}
/**
* Get the competecy id using an idnumber.
* Get the competency id using an idnumber.
*
* @param string $idnumber
* @return int The competecy id
* @return int The competency id
*/
protected function get_competency_id(string $idnumber): int {
global $DB;
@@ -135,15 +165,31 @@ class behat_core_competency_generator extends behat_generator_base {
}
/**
* Get the related competecy id using an idnumber.
* Get the related competency id using an idnumber.
*
* @param string $idnumber
* @return int The related competecy id
* @return int The related competency id
*/
protected function get_relatedcompetency_id(string $idnumber): int {
return $this->get_competency_id($idnumber);
}
/**
* Get the template id by shortname.
*
* @param string $shortname The template name.
* @return int
*/
protected function get_template_id(string $shortname): int {
global $DB;
if (!$id = $DB->get_field('competency_template', 'id', ['shortname' => $shortname])) {
throw new Exception('The specified template with name "' . $shortname . '" could not be found.');
}
return $id;
}
/**
* Add a plan.
*
@@ -208,6 +254,8 @@ class behat_core_competency_generator extends behat_generator_base {
* @return array Processed data.
*/
protected function preprocess_plan(array $data): array {
global $DB, $USER;
if (isset($data['competencies'])) {
$competencies = array_map('trim', str_getcsv($data['competencies']));
$data['competencyids'] = array_map([$this, 'get_competency_id'], $competencies);
@@ -215,11 +263,20 @@ class behat_core_competency_generator extends behat_generator_base {
unset($data['competencies']);
}
global $USER;
if (isset($data['reviewer'])) {
if (is_number($data['reviewer'])) {
$data['reviewerid'] = $data['reviewer'];
} else {
if (!$userid = $DB->get_field('user', 'id', ['username' => $data['reviewer']])) {
throw new Exception('The specified user "' . $data['reviewer'] . '" could not be found.');
}
$data['reviewerid'] = $userid;
}
unset($data['reviewer']);
}
return $data + [
'userid' => $USER->id,
'status' => plan::STATUS_ACTIVE,
];
}
@@ -258,4 +315,81 @@ class behat_core_competency_generator extends behat_generator_base {
protected function get_data_generator(): core_competency_generator {
return $this->componentdatagenerator;
}
/**
* Get the user evidence id using a name.
*
* @param string $name User evidence name.
* @return int The user evidence id
*/
protected function get_userevidence_id(string $name): int {
global $DB;
if (!$id = $DB->get_field('competency_userevidence', 'id', ['name' => $name])) {
throw new Exception('The specified user evidence with name "' . $name . '" could not be found.');
}
return $id;
}
/**
* Get the template competency id using a name.
*
* @param string $name Template competency name.
* @return int The template competency id
*/
protected function get_templatecompetency_id(string $name): int {
global $DB;
if (!$id = $DB->get_field('competency_template', 'id', ['name' => $name])) {
throw new Exception('The specified template competency with name "' . $name . '" could not be found.');
}
return $id;
}
/**
* Get the context id using a contextid.
*
* @param string $contextid Context id.
* @return int The context id
*/
protected function get_context_id(string $contextid): int {
global $DB;
if (!$id = $DB->get_field('context', 'id', ['id' => $contextid])) {
throw new Exception('The specified context with id "' . $contextid . '" could not be found.');
}
return $id;
}
/**
* Get the status id by status name.
*
* @param string $name Status name.
* @return int
*/
protected function get_status_id(string $name): int {
switch ($name) {
case 'draft':
$status = plan::STATUS_DRAFT;
break;
case 'in review':
$status = plan::STATUS_IN_REVIEW;
break;
case 'waiting for review':
$status = plan::STATUS_WAITING_FOR_REVIEW;
break;
case 'complete':
$status = plan::STATUS_COMPLETE;
break;
default:
$status = plan::STATUS_ACTIVE;
break;
}
return $status;
}
}
@@ -0,0 +1,38 @@
@core @core_contentbank @core_h5p @contentbank_h5p
Feature: Content bank contents are retained when course is restored
In order to restore content bank contents
As a manager
I need to be able to restore course containing the content bank
Background:
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| admin | C1 | editingteacher |
And the following "contentbank content" exist:
| contextlevel | reference | contenttype | user | contentname | filepath |
| Course | C1 | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And the following config values are set as admin:
| unaddableblocks | | theme_boost|
# TODO MDL-57120 site "Content bank" link not accessible without navigation block.
And I add the "Navigation" block if not present
@javascript
Scenario: Deleted courses with content banks can be restored
Given I navigate to "Courses > Manage courses and categories" in site administration
And I click on "delete" action for "Course 1" in management course listing
And I click on "Delete" "button" in the "Confirm" "dialogue"
And I press "Continue"
And I navigate to "Recycle bin" in current page administration
And I click on "Restore" "link" in the "Course 1" "table_row"
And I am on "Course 1" course homepage
And I expand "Site pages" node
When I click on "Content bank" "link"
And I click on "filltheblanks.h5p" "link"
And I switch to "h5p-player" class iframe
And I switch to "h5p-iframe" class iframe
Then I should see "Of which countries are Berlin, Washington, Beijing, Canberra and Brasilia the capitals?"
+13 -7
View File
@@ -4127,7 +4127,7 @@ class core_course_external extends external_api {
self::validate_context($usercontext);
if ($userid != $USER->id and !has_capability('moodle/user:viewdetails', $usercontext)) {
if ($userid != $USER->id && !has_capability('moodle/user:viewalldetails', $usercontext)) {
return array();
}
@@ -4177,22 +4177,28 @@ class core_course_external extends external_api {
* @param int $groupid Group id from which the users will be obtained
* @param bool $onlyactive Whether to return only the active enrolled users or all enrolled users in the course.
* @return array List of users
* @throws invalid_parameter_exception
*/
public static function get_enrolled_users_by_cmid(int $cmid, int $groupid = 0, bool $onlyactive = false) {
global $PAGE;
global $PAGE;
$warnings = [];
self::validate_parameters(self::get_enrolled_users_by_cmid_parameters(), [
'cmid' => $cmid,
'groupid' => $groupid,
'onlyactive' => $onlyactive,
[
'cmid' => $cmid,
'groupid' => $groupid,
'onlyactive' => $onlyactive,
] = self::validate_parameters(self::get_enrolled_users_by_cmid_parameters(), [
'cmid' => $cmid,
'groupid' => $groupid,
'onlyactive' => $onlyactive,
]);
list($course, $cm) = get_course_and_cm_from_cmid($cmid);
$coursecontext = context_course::instance($course->id);
self::validate_context($coursecontext);
course_require_view_participants($coursecontext);
$enrolledusers = get_enrolled_users($coursecontext, '', $groupid, 'u.*', null, 0, 0, $onlyactive);
$users = array_map(function ($user) use ($PAGE) {
+3
View File
@@ -242,6 +242,9 @@ class stateactions {
foreach ($ids as $sectionid) {
$section = $modinfo->get_section_info_by_id($sectionid, MUST_EXIST);
if (!course_can_delete_section($course, $section)) {
continue;
}
// Send all activity deletions.
if (!empty($modinfo->sections[$section->section])) {
foreach ($modinfo->sections[$section->section] as $modnumber) {
+120
View File
@@ -0,0 +1,120 @@
<?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_courseformat\external;
defined('MOODLE_INTERNAL') || die();
use core_courseformat\stateactions;
use core_courseformat\stateupdates;
global $CFG;
require_once($CFG->dirroot . '/webservice/tests/helpers.php');
/**
* Tests for the delete section test class.
*
* @package core_courseformat
* @copyright 2025 Laurent David <laurent.david@moodle.com>
* @category test
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_courseformat\stateactions
*/
final class delete_section_test extends \externallib_advanced_testcase {
/**
* Setup to ensure that fixtures are loaded.
*/
public static function setupBeforeClass(): void { // phpcs:ignore
global $CFG;
require_once($CFG->dirroot . '/course/format/tests/fixtures/format_theunittestdelete.php');
}
/**
* Test the webservice can execute the section_delete action.
*
* @covers ::section_delete
* @dataProvider section_delete_provider
* @param int $sectionum
* @param string $format
* @param array $formatoptions
* @param int $expectedsectionum
*
* @throws \moodle_exception
*/
public function test_delete_section(int $sectionum, string $format, array $formatoptions, int $expectedsectionum): void {
$this->resetAfterTest();
$course =
$this->getDataGenerator()->create_course(array_merge(
['numsections' => $sectionum, 'format' => $format],
$formatoptions,
));
$teacher = $this->getDataGenerator()->create_and_enrol($course, 'editingteacher');
// Execute the method.
$courseformat = course_get_format($course->id);
$updates = new stateupdates($courseformat);
$modinfo = get_fast_modinfo($course);
$sections = $modinfo->get_section_info_all();
$sectionsid = array_map(function ($section) {
return $section->id;
}, $sections);
$actions = new stateactions();
$this->setUser($teacher);
$actions->section_delete(
$updates,
$course,
$sectionsid
);
// Check result.
$modinfo = get_fast_modinfo($course);
$sections = $modinfo->get_section_info_all();
$this->assertCount($expectedsectionum, $sections);
if ($format == 'theunittestdelete') {
$this->assertDebuggingCalled();
}
}
/**
* Data provider for the test_delete_section method.
*
* @return array
*/
public static function section_delete_provider(): array {
return [
'format topic' => [
'sectionum' => 1,
'format' => 'topics',
'formatoptions' => [],
'expectedsectionum' => 1,
],
'format theunittestdelete' => [
'sectionum' => 1,
'format' => 'theunittestdelete',
'formatoptions' => [],
'expectedsectionum' => 2,
],
'format theunittestdelete can delete' => [
'sectionum' => 1,
'format' => 'theunittestdelete',
'formatoptions' => ['can_delete_sections' => true],
'expectedsectionum' => 1,
],
];
}
}
@@ -0,0 +1,70 @@
<?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/>.
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/format_theunittest.php');
/**
* Fixture for fake course format testing course format API.
*
* @package core_courseformat
* @copyright 2025 Laurent David <laurent.david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class format_theunittestdelete extends format_theunittest {
/**
* Definitions of the additional options that format uses
*
* @param bool $foreditform
* @return array of options
*/
public function course_format_options($foreditform = false) {
static $courseformatoptions = false;
if ($courseformatoptions === false) {
$courseformatoptions = parent::course_format_options(true);
$courseformatoptionsadditional = [
'can_delete_sections' => [
'default' => false,
'type' => PARAM_BOOL,
],
];
$courseformatoptions = array_merge_recursive($courseformatoptions, $courseformatoptionsadditional);
}
return $courseformatoptions;
}
/**
* Whether this format allows to delete sections
*
* Here for test purpose we just can delete one section every two sections
*
* Do not call this function directly, instead use course_can_delete_section()
*
* @param int|stdClass|section_info $section
* @return bool
*/
public function can_delete_section($section) {
return $this->get_format_options()['can_delete_sections'] ?? false;
}
/**
* Returns true if this course format uses sections
*/
public function uses_sections() {
return true;
}
}
+8 -1
View File
@@ -1757,7 +1757,14 @@ class core_course_renderer extends plugin_renderer_base {
// This is a request for the course information.
$courseid = required_param('courseid', PARAM_INT);
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
$course = $DB->get_record('course', ['id' => $courseid], '*', IGNORE_MISSING);
if ($course === false) {
throw new \moodle_exception('invalidcourseid');
}
$coursecontext = context_course::instance($course->id, MUST_EXIST);
if ($course->visible == 0 && !has_capability('moodle/course:viewhiddencourses', $coursecontext)) {
throw new \moodle_exception('invalidcourseid');
}
$chelper = new coursecat_helper();
$chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED);
+12
View File
@@ -3639,6 +3639,12 @@ final class externallib_test extends externallib_advanced_testcase {
$this->assignUserCapability('moodle/user:viewdetails', $usercontext, $teacherroleid);
// Sorted by course id DESC.
// User without moodle/user:viewalldetails capability will not be able to see the course details.
$result = core_course_external::get_recent_courses($student->id);
$this->assertCount(0, $result);
// User with moodle/user:viewalldetails capability will be able to see the course details.
$this->assignUserCapability('moodle/user:viewalldetails', $usercontext, $teacherroleid);
$result = core_course_external::get_recent_courses($student->id);
$this->assertCount(1, $result);
$this->assertEquals($courses[0]->id, array_shift($result)->id);
@@ -3742,6 +3748,12 @@ final class externallib_test extends externallib_advanced_testcase {
$this->assertEquals(2, count($users['users']));
$this->assertEquals($expectedusers, $users);
// Prohibit the capability for viewing course participants.
$this->unassignUserCapability('moodle/course:viewparticipants', null, null, $course1->id);
$this->expectException(required_capability_exception::class);
$this->expectExceptionMessage('Sorry, but you do not currently have permissions to do that (View participants)');
core_course_external::get_enrolled_users_by_cmid($forum1->cmid);
}
/**
+14
View File
@@ -259,6 +259,20 @@ class tool_provider extends ToolProvider {
// Get the updated user record.
$user = $DB->get_record('user', ['id' => $user->id]);
} else {
if ($dbuser->suspended) {
require_once($CFG->libdir . '/authlib.php');
$failurereason = AUTH_LOGIN_SUSPENDED;
$event = \core\event\user_login_failed::create([
'userid' => $dbuser->id,
'other' => [
'username' => $dbuser->username,
'reason' => $failurereason
]
]);
$event->trigger();
throw new moodle_exception('invalidlogin', 'core');
}
if (helper::user_match($user, $dbuser)) {
$user = $dbuser;
} else {
+10 -1
View File
@@ -84,11 +84,20 @@ function filter_tex_sanitize_formula(string $texexp): string {
'\afterassignment', '\expandafter', '\noexpand', '\special',
'\let', '\futurelet', '\else', '\fi', '\chardef', '\makeatletter', '\afterground',
'\noexpand', '\line', '\mathcode', '\item', '\section', '\mbox', '\declarerobustcommand',
'\ExplSyntaxOn', '\pdffiledump',
'\ExplSyntaxOn', '\pdffiledump', '\mathtex',
];
$allowlist = ['inputenc'];
// Add encoded backslash (&#92;) versions of backslashed items to deny list.
$encodedslashdenylist = array_map(function($value) {
$encoded = str_replace('\\', '&#92;', $value);
// Return an encoded slash version if a slash is found, otherwise null so we can filter it off.
return $encoded != $value ? $encoded : null;
}, $denylist);
$encodedslashdenylist = array_filter($encodedslashdenylist);
$denylist = array_merge($denylist, $encodedslashdenylist);
// Prepare the denylist for regular expression.
$denylist = array_map(function($value){
return '/' . preg_quote($value, '/') . '/i';
@@ -0,0 +1,104 @@
@gradingform @gradingform_guide
Feature: Marking guide criterion can be edited and replaced
In order to edit and replace a marking guide criterion
As a teacher
I need to have an existing marking guide criterion
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | course | name | advancedgradingmethod_submissions | assignsubmission_onlinetext_enabled |
| assign | C1 | Assign 1 | guide | 1 |
And I am on the "Course 1" course page logged in as teacher1
And I go to "Assign 1" advanced grading definition page
And I set the following fields to these values:
| Name | Assign 1 marking guide |
| Description | Marking guide description |
And I define the following marking guide:
| Criterion name | Description for students | Description for markers | Maximum score |
| Grade Criteria 1 | Grade 1 description for students | Grade 1 description for markers | 70 |
| Grade Criteria 2 | Grade 2 description for students | Grade 2 description for markers | 30 |
And I define the following frequently used comments:
| Comment 1 |
| Comment 2 |
| Comment 3 |
And I press "Save marking guide and make it ready"
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Assign 1 | student1 | I'm the student first submission |
And I am on the "Assign 1" "assign activity" page
And I go to "Student 1" "Assign 1" activity advanced grading page
And I grade by filling the marking guide with:
| Grade Criteria 1 | 50 | Comment 1 |
| Grade Criteria 2 | 20 | Comment 2 |
And I press "Save changes"
@javascript
Scenario: Marking guide frequently used comments can be updated and reordered
Given I go to "Assign 1" advanced grading definition page
And I click on "Move up" "button" in the "Comment 3" "table_row"
And I click on "Move down" "button" in the "Comment 1" "table_row"
When I press "Save"
# Confirm that the order of the frequently used comments are updated.
Then "Comment 3" "text" should appear before "Comment 1" "text"
And "Comment 2" "text" should appear after "Comment 1" "text"
And I am on the "Assign 1" "assign activity" page
And I go to "Student 1" "Assign 1" activity advanced grading page
# Confirm that there are no changes to the existing marking records.
And I should see "Comment 1" in the "Grade Criteria 1" "table_row"
And I should see "Comment 2" in the "Grade Criteria 2" "table_row"
@javascript
Scenario: Marking guide criterion can be modified
Given I go to "Assign 1" advanced grading definition page
And I click on "Delete criterion" "button" in the "Grade Criteria 1" "table_row"
And I press "Yes"
And I wait "1" seconds
And I should not see "Grade Criteria 1"
And I press "Add criterion"
# Used xpath_element selectors in order to differentiate multiple criterion fields.
And I click on "//table[@id='guide-criteria']//tr[@class='criterion odd last']//div[@class='criterionname']" "xpath_element"
# Set the new criterion name.
And I set the field with xpath "//input[@id='guide-criteria-NEWID1-shortname']" to "Grade Criteria 3"
And I click on "//table[@id='guide-criteria']//tr[@class='criterion odd last']//div[@class='criteriondesc']//span[@class='textvalue']" "xpath_element"
# Set the new criterion description for students.
And I set the field with xpath "//textarea[@id='guide[criteria][NEWID1][description]']" to "Grade 3 description for students"
And I click on "//table[@id='guide-criteria']//tr[@class='criterion odd last']//div[@class='criteriondescmarkers']//span[@class='textvalue']" "xpath_element"
# Set the new criterion description for markers.
And I set the field with xpath "//textarea[@id='guide[criteria][NEWID1][descriptionmarkers]']" to "Grade 3 description for markers"
And I click on "//table[@id='guide-criteria']//tr[@class='criterion odd last']//div[@class='criterionmaxscore']//span[@class='textvalue']" "xpath_element"
# Set the new criterion max score.
And I set the field with xpath "//input[@id='guide[criteria][NEWID1][maxscore]']" to "70"
When I press "Save"
Then "You are about to save significant changes to a marking guide that has already been used for grading. The gradebook value will be unchanged, but the marking guide will be hidden from students until their item is regraded." "text" should exist
And I press "Continue"
And I am on the "Assign 1" "assign activity" page logged in as student1
# Confirm that the remarks for each grading criterion are not displayed.
And "Comment 1" "text" should not exist
And "Comment 2" "text" should not exist
# Confirm that the submission is not regraded.
And I should see "70.00 / 100.00"
# Regrade the submission.
And I am on the "Course 1" course page logged in as teacher1
And I go to "Student 1" "Assign 1" activity advanced grading page
And I grade by filling the marking guide with:
| Grade Criteria 2 | 15 | Comment 3 |
| Grade Criteria 3 | 50 | Comment 2 |
And I press "Save changes"
And I am on the "Assign 1" "assign activity" page logged in as student1
# Confirm that submission is re-marked and regraded.
And I should see "65.00 / 100.00"
And I should see the marking guide information displayed as:
| criteria | description | remark | maxscore | criteriascore |
| Grade Criteria 2 | Grade 2 description for students | Comment 3 | 30 | 15 / 30 |
| Grade Criteria 3 | Grade 3 description for students | Comment 2 | 70 | 50 / 70 |
@@ -18,7 +18,7 @@ Feature: Teacher can edit a marking guide state
| activity | course | name | advancedgradingmethod_submissions |
| assign | C1 | Assign 1 | guide |
Scenario: Marking guide state can be changed to draft
Scenario Outline: Marking guide state can be changed
Given I am on the "Course 1" course page logged in as teacher1
And I go to "Assign 1" advanced grading definition page
And I set the following fields to these values:
@@ -28,12 +28,12 @@ Feature: Teacher can edit a marking guide state
| Criterion name | Description for students | Description for markers | Maximum score |
| Grade Criteria 1 | Grade 1 description for students | Grade 1 description for markers | 70 |
| Grade Criteria 2 | Grade 2 description for students | Grade 2 description for markers | 30 |
And I press "Save marking guide and make it ready"
And I should not see "Please note: the advanced grading form is not ready at the moment. Simple grading method will be used until the form has a valid status."
And I should not see "Assign 1 marking guide Draft"
And I should see "Assign 1 marking guide Ready for use"
And I click on "Edit the current form definition" "link"
When I press "Save as draft"
Then I should see "Please note: the advanced grading form is not ready at the moment. Simple grading method will be used until the form has a valid status."
And I should see "Assign 1 marking guide Draft"
And I should not see "Assign 1 marking guide Ready for use"
When I press "<buttonname>"
Then I <drafttextvisibility> see "Please note: the advanced grading form is not ready at the moment. Simple grading method will be used until the form has a valid status."
And I <drafttextvisibility> see "Assign 1 marking guide Draft"
And I <readytextvisibility> see "Assign 1 marking guide Ready for use"
Examples:
| buttonname | drafttextvisibility | readytextvisibility |
| Save marking guide and make it ready | should not | should |
| Save as draft | should | should not |
@@ -0,0 +1,44 @@
@gradingform @gradingform_guide
Feature: Verify listings and grading submissions
In order to verify grade listing
As a teacher
I need to be able to see grades in the correct column
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student | Student | One | one@example.com |
| teacher | Teacher | One | t1@example.com |
And the following "courses" exist:
| shortname | fullname |
| C1 | Course 1 |
And the following "course enrolments" exist:
| user | course | role |
| student | C1 | student |
| teacher | C1 | editingteacher |
And the following "activities" exist:
| activity | name | course | advancedgradingmethod_submissions | assignsubmission_onlinetext_enabled |
| assign | Assign1 | C1 | guide | 1 |
And I am on the "Course 1" course page logged in as teacher
And I go to "Assign1" advanced grading definition page
And I set the following fields to these values:
| Name | Assign1 marking guide |
| Description | Marking guide description |
And I define the following marking guide:
| Criterion name | Description for students | Description for markers | Maximum score |
| Criteria 1 | Grade 1 description for students | Grade 1 description for markers | 100 |
And I press "Save marking guide and make it ready"
And the following "mod_assign > submissions" exist:
| assign | user | onlinetext |
| Assign1 | student | This is a submission for assignment |
@javascript
Scenario: Mark and view all grades in submissions table
Given I am on the "Assign1" "assign activity" page
And I click on "View all submission" "link"
And I click on "Grade" "link" in the "Student One" "table_row"
And I grade by filling the marking guide with:
| Criteria 1 | 50 | Excellent work! |
And I press "Save changes"
When I follow "View all submissions"
Then "Student One" row "Grade" column of "generaltable" table should contain "50"
@@ -0,0 +1,43 @@
@gradingform @gradingform_guide
Feature: Marking guide can handle maximum grade mismatches
In order to handle maximum grade mismatches
As a teacher
I should be able to set the maximum grade
Background:
Given the following "user" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
Scenario Outline: Marking guide maximum grade handling
Given the following "activities" exist:
| activity | course | name | advancedgradingmethod_submissions |
| assign | C1 | Assign 1 | guide |
And I am on the "Course 1" course page logged in as teacher1
And I go to "Assign 1" advanced grading definition page
And I set the following fields to these values:
| Name | Assign 1 marking guide |
| Description | Marking guide description |
And I define the following marking guide:
| Criterion name | Description for students | Description for markers | Maximum score |
| Grade Criteria 1 | Grade 1 description for students | Grade 1 description for markers | <maxscore> |
| Grade Criteria 2 | Grade 2 description for students | Grade 2 description for markers | 30 |
When I press "Save marking guide and make it ready"
Then I should see "Assign 1 marking guide Ready for use"
# Please note: We need to add the no-break space unicode character to the warning message otherwise it will fail.
And I should see "WARNING: Your marking guide has a maximum grade of <totalmaxscore> points but the maximum grade set in your activity is 100 The maximum score set in your marking guide will be scaled to the maximum grade in the module."
And I should see "Intermediate scores will be converted respectively and rounded to the nearest available grade."
Examples:
# <totalmaxscore> value is derived from <maxscore> + maximum score assigned to criteria 2 (30).
# Case 1: total > max score of 100.
# Case 2: total < max score of 100.
| maxscore | totalmaxscore |
| 90 | 120 |
| 50 | 80 |
@@ -26,6 +26,7 @@ namespace gradereport_singleview\local\ui;
defined('MOODLE_INTERNAL') || die;
use context_course;
use grade_grade;
/**
@@ -83,6 +84,10 @@ class exclude extends grade_attribute_format implements be_checked, be_disabled,
* @return element
*/
public function determine_format(): element {
if (($this->grade->is_hidden() || $this->grade->grade_item->is_hidden()) &&
!has_capability('moodle/grade:viewhidden', context_course::instance($this->grade->grade_item->courseid))) {
return new empty_element();
}
return new checkbox_attribute(
$this->get_name(),
$this->get_label(),
@@ -24,6 +24,8 @@
namespace gradereport_singleview\local\ui;
use context_course;
defined('MOODLE_INTERNAL') || die;
/**
@@ -104,6 +106,10 @@ class feedback extends grade_attribute_format implements unique_value, be_disabl
* @return element
*/
public function determine_format(): element {
if (($this->grade->is_hidden() || $this->grade->grade_item->is_hidden()) &&
!has_capability('moodle/grade:viewhidden', context_course::instance($this->grade->grade_item->courseid))) {
return new empty_element();
}
return new text_attribute(
$this->get_name(),
$this->get_value(),
@@ -26,6 +26,7 @@ namespace gradereport_singleview\local\ui;
defined('MOODLE_INTERNAL') || die;
use context_course;
use stdClass;
/**
* UI element representing the finalgrade column.
@@ -113,6 +114,11 @@ class finalgrade extends grade_attribute_format implements unique_value, be_disa
* @return element
*/
public function determine_format(): element {
if (($this->grade->is_hidden() || $this->grade->grade_item->is_hidden()) &&
!has_capability('moodle/grade:viewhidden', context_course::instance($this->grade->grade_item->courseid))) {
return new empty_element();
}
if ($this->grade->grade_item->load_scale()) {
$scale = $this->grade->grade_item->load_scale();
@@ -24,6 +24,8 @@
namespace gradereport_singleview\local\ui;
use context_course;
defined('MOODLE_INTERNAL') || die;
/**
@@ -94,7 +96,11 @@ class override extends grade_attribute_format implements be_checked, be_disabled
* @return element
*/
public function determine_format(): element {
if (!$this->grade->grade_item->is_overridable_item()) {
// If the grade is hidden and the user does not have permission to view hidden grades,
// then we don't show the override checkbox.
$allowhiddenoverride = (!$this->grade->is_hidden() && !$this->grade->grade_item->is_hidden()) ||
has_capability('moodle/grade:viewhidden', context_course::instance($this->grade->grade_item->courseid));
if (!$allowhiddenoverride || !$this->grade->grade_item->is_overridable_item()) {
return new empty_element();
}
return new checkbox_attribute(
+12 -6
View File
@@ -482,7 +482,7 @@ class user extends grade_report {
$gradegrade->load_grade_item();
// Hidden Items.
if ($gradegrade->grade_item->is_hidden()) {
if ($gradegrade->grade_item->is_hidden() && $this->canviewhidden) {
$hidden = ' dimmed_text';
}
@@ -548,7 +548,7 @@ class user extends grade_report {
$itemicon = \html_writer::div($this->gtree->get_element_icon($element), 'mr-1');
$elementtype = $this->gtree->get_element_type_string($element);
$itemtype = \html_writer::span($elementtype, 'd-block text-uppercase small dimmed_text',
$itemtype = \html_writer::span($elementtype, 'd-block text-uppercase small ' . $hidden,
['title' => $elementtype]);
if ($type == 'categoryitem' || $type == 'courseitem') {
@@ -636,10 +636,11 @@ class user extends grade_report {
);
$gradeitemdata['gradehiddenbydate'] = true;
} else if ($gradegrade->is_hidden()) {
$data['grade']['class'] = $class.' dimmed_text';
$data['grade']['class'] = $class;
$data['grade']['content'] = '-';
if ($this->canviewhidden) {
$data['grade']['class'] .= ' dimmed_text';
$gradeitemdata['graderaw'] = $gradeval;
$data['grade']['content'] = grade_format_gradevalue($gradeval,
$gradegrade->grade_item,
@@ -697,9 +698,10 @@ class user extends grade_report {
$data['percentage']['class'] = $class.' gradingerror';
$data['percentage']['content'] = get_string('error');
} else if ($gradegrade->is_hidden()) {
$data['percentage']['class'] = $class.' dimmed_text';
$data['percentage']['class'] = $class;
$data['percentage']['content'] = '-';
if ($this->canviewhidden) {
$data['percentage']['class'] .= ' dimmed_text';
$data['percentage']['content'] = grade_format_gradevalue(
$gradeval,
$gradegrade->grade_item,
@@ -726,8 +728,9 @@ class user extends grade_report {
$data['lettergrade']['class'] = $class.' gradingerror';
$data['lettergrade']['content'] = get_string('error');
} else if ($gradegrade->is_hidden()) {
$data['lettergrade']['class'] = $class.' dimmed_text';
$data['lettergrade']['class'] = $class;
if (!$this->canviewhidden) {
$data['lettergrade']['class'] .= ' dimmed_text';
$data['lettergrade']['content'] = '-';
} else {
$data['lettergrade']['content'] = grade_format_gradevalue(
@@ -757,8 +760,11 @@ class user extends grade_report {
$data['rank']['class'] = $class.' gradingerror';
$data['rank']['content'] = get_string('error');
} else if ($gradegrade->is_hidden()) {
$data['rank']['class'] = $class.' dimmed_text';
$data['rank']['class'] = $class;
$data['rank']['content'] = '-';
if ($this->canviewhidden) {
$data['rank']['class'] .= ' dimmed_text';
}
} else if (is_null($gradeval)) {
// No grade, o rank.
$data['rank']['class'] = $class;
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
+3 -3
View File
@@ -20,11 +20,11 @@
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
* {@link https://moodledev.io/general/projects/api/amos}) using the
* list of strings defined in install/stringnames.txt file.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();

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