Compare commits

..

732 Commits

Author SHA1 Message Date
Jun Pataleta b864c78a31 Moodle release 4.0.6 2023-01-14 14:17:09 +08:00
Jun Pataleta 5b81c07712 weekly release 4.0.5+ 2023-01-13 10:52:19 +08:00
Andrew Nicols 7299eb910d Merge branch 'MDL-76820-400' of https://github.com/cameron1729/moodle into MOODLE_400_STABLE 2023-01-12 12:09:48 +08:00
Jun Pataleta 43bfcc4c77 Merge branch 'MDL-76649_400' of https://github.com/timhunt/moodle into MOODLE_400_STABLE 2023-01-12 12:06:54 +08:00
Michael Hawkins 044e23f691 MDL-76861 blog: Ensure correct escaping applied to search string 2023-01-12 11:43:22 +08:00
Jake Dallimore 8a5563445d MDL-76862 user: Unit test for setting user home page preferences 2023-01-12 11:30:46 +08:00
Paul Holden 8de0b97f7d MDL-76862 user: ensure user can only update own preferred start page. 2023-01-12 11:17:00 +08:00
Cameron Ball 8ee9748839 MDL-76820 core_search: Reset manager::$coursedeleting between tests 2023-01-12 10:54:50 +08:00
Jun Pataleta 2d82b93072 Merge branch 'MDL-76739-400' of https://github.com/junpataleta/moodle into MOODLE_400_STABLE 2023-01-12 10:17:52 +08:00
Jun Pataleta a387d795f7 MDL-76739 mod_data: Replace "Author surname" with "Author last name"
For consistency with the rest of the lang strings
2023-01-12 09:59:50 +08:00
Jun Pataleta 80d8f7f1be MDL-76739 behat: Replace occurrences of "surname" in Behat tests
Replace occurrences of "surname" in Behat tests with "last name".
2023-01-12 09:49:57 +08:00
David Mudrák bb82843548 MDL-76739 lang: Use the fixed strings in the tests, too 2023-01-11 18:54:57 +01:00
Helen Foster 3463f7fa5d MDL-76739 lang: Import fixed English strings (en_fix) 2023-01-11 18:54:57 +01:00
Ilya Tregubov 005814360f Merge branch 'MDL-76607-400' of https://github.com/davewoloszyn/moodle into MOODLE_400_STABLE 2023-01-11 19:18:48 +07:00
Andrew Nicols 8e9e4ca362 Merge branch '66924-view-own-private-reply-400' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_400_STABLE 2023-01-11 15:53:40 +08:00
Tim Hunt 799f7fb18f MDL-76810 redirect handling: ensure return URLs are properly sanitised 2023-01-11 11:43:45 +08:00
Jake Dallimore 978a6bb8ec Merge branch 'MDL-76597-400-2' of https://github.com/junpataleta/moodle into MOODLE_400_STABLE 2023-01-11 10:12:33 +08:00
Paul Holden 7405121cd2 Merge branch 'MDL-76811-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2023-01-10 16:40:06 +00:00
Paul Holden aa40f64f98 Merge branch 'MDL-76803-400' of https://github.com/junpataleta/moodle into MOODLE_400_STABLE 2023-01-10 16:24:04 +00:00
Paul Holden b7baec898a Merge branch 'MDL-76653-400' of https://github.com/lameze/moodle into MOODLE_400_STABLE 2023-01-10 15:29:16 +00:00
Paul Holden aeabe6324b Merge branch 'MDL-76833-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2023-01-10 12:29:18 +00:00
Jun Pataleta c445846da4 MDL-76803 lang: Update usages of reworded email display options 2023-01-10 16:01:51 +08:00
Jun Pataleta 8376eec99d MDL-76803 lang: Make email display options more concise 2023-01-10 16:01:51 +08:00
Andrew Nicols a20c78d894 MDL-76833 core: Bump phpunit/php-code-coverage version
This includes a bug fix for a display issue with code coverage reporting
in phpunit's HTML output report.
2023-01-10 12:09:01 +08:00
Andrew Nicols fe6d102184 MDL-76811 mod_data: Remove duplicate tests 2023-01-10 11:39:40 +08:00
Andrew Nicols e719cbb687 MDL-76811 mod_data: strpos check should be strict 2023-01-10 11:39:40 +08:00
Andrew Nicols b5cce2514d MDL-76811 mod_data: Generator test cleanup 2023-01-10 11:39:40 +08:00
Simey Lameze 81ff190dfb MDL-76653 behat: add coverage for SCORM availability 2023-01-10 10:25:55 +08:00
Jun Pataleta 7268fe0424 Merge branch 'MDL-76061-MOODLE_400_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_400_STABLE 2023-01-10 09:42:10 +08:00
Philipp Memmel c2b7e33b5d MDL-76061 core_calendar: Fix changing event type from 'user' 2023-01-09 15:06:09 +01:00
Tim Hunt 0dcd79d2e8 MDL-76649 quiz statistics task: output more useful trace info
At the moment, quiz_statistics\task\recalculate gives no useful
information about what it is doing, which makes it hard to investigate
if the task fails. This commit makes it more usefully verbose.

Also, following this change, one instance of this task will not
run for more than one hour at a time.

As part of this commit, I have added a new helper mtrace_exception.
to consistently log exceptions in scheduled tasks. It is sad to
add a new function to moodlelib.php, but that seemed the logical place.
Looking at other tasks, this method is badly needed. Many are just
logging the ->getMessage() which is normaly insufficient for proper
debugging. However, swiching all existing tasks to use the new function
will need to wait for a future MDL.
2023-01-09 13:46:29 +00:00
Julien Boulen 918b7c9c87 MDL-66924 mod_forum: Allow users to see their own private messages
Allow users to see their own private messages even if they don't have
mod/forum:readprivatereplies capability

Add behat test to avoid MDL-67109 issue.

Co-authored-by: Martin Putzlocher <mputzi@users.noreply.github.com>
2023-01-09 14:43:45 +01:00
Paul Holden 06634f0add Merge branch 'MDL-75532-400' of https://github.com/snake/moodle into MOODLE_400_STABLE 2023-01-09 11:51:00 +00:00
Paul Holden d7ba5b5d6f Merge branch 'MDL-76601-400' of https://github.com/junpataleta/moodle into MOODLE_400_STABLE 2023-01-09 10:11:07 +00:00
Jun Pataleta a61a86c61d MDL-76597 mod_quiz: Add a default heading name for Behat tests 2023-01-09 15:42:57 +08:00
Jake Dallimore 673faab506 MDL-75532 enrol_lti: fix optional lineitemsurl in grade sync task
As in MDL-74691, we need either or both of these fields, meaning either
one could be omitted. This just supports that as per the fix made in
MDL-74691.
2023-01-09 11:37:14 +08:00
Jake Dallimore 3a8149ccc2 MDL-75532 enrol_lti: add tests for coupled and decoupled line items
This covers the following cases:
1. Where only the 'lineitem' service endpoint is provided
2. Where only the 'lineitems' service endpoint is provided.
Existing tests already cover the case where both are provided.
2023-01-09 11:37:14 +08:00
Jun Pataleta 4d64b0b5fe MDL-76597 mod_quiz: Set presentation role for the question list
Since the <ul> and <li> elements for listing the quiz questions and
elements are mainly used for layout purposes, it is better to set the
role of these elements to presentation only.
The aria-label for the <li> element is inappropriate and can also cause
confusion to screen reader users. Better to remove this. Though this is
being used in the confirmation modal so better to just change it to a
data attribute.
2023-01-06 22:55:13 +08:00
Jun Pataleta 58d350d53d MDL-76597 question: Add question version lang string 2023-01-06 22:55:12 +08:00
Jun Pataleta 7ad4bc126b MDL-76597 mod_quiz: Add label for question checkboxes 2023-01-06 22:55:12 +08:00
Jun Pataleta dac806d47d MDL-76597 mod_quiz: Darken section heading on quiz questions page 2023-01-06 22:55:12 +08:00
Jun Pataleta 5ea303bacb MDL-76597 mod_quiz: Add label for version selector 2023-01-06 22:55:12 +08:00
Jun Pataleta d597211fa6 MDL-76597 mod_quiz: Add a default sr-only section heading
Add a default sr-only section heading in order to prevent having an
empty heading for the quiz section which is not good for accessibility.

Plus:
- There's also an existing issue where filters are never applied to
section headings on load. This has been fixed in this commit as well.
- Button role added for the edit section button which enables it to
take advantage of the theme highlighting when it receives focus.
2023-01-06 22:55:12 +08:00
Paul Holden fcea42b77e Merge branch 'MDL-32114-400' of https://github.com/srobotta/moodle into MOODLE_400_STABLE 2023-01-06 11:20:48 +00:00
Paul Holden 9b7854dbad Merge branch 'MDL-76578-400' of https://github.com/aanabit/moodle into MOODLE_400_STABLE 2023-01-06 10:41:37 +00:00
Ilya Tregubov 500bde134f Merge branch 'MDL-76251-patch-400' of https://github.com/ilyatregubov/moodle into MOODLE_400_STABLE 2023-01-06 16:15:06 +07:00
Ilya Tregubov dc230cf98e MDL-76251 mod_forum: Fix illegal whitespace. 2023-01-06 16:13:37 +07:00
Ilya Tregubov dc516a038e Merge branch 'MDL-76251-400' of https://github.com/aya-saad1/moodle into MOODLE_400_STABLE 2023-01-06 15:38:19 +07:00
Stephan Robotta bd1d89a94a MDL-32114 form: markdown must be preserved on saving post
- Markdown is saved to the DB, no conversion to HTML to keep
  ability to reedit the content without beaking it.
- Blockquote element is styled that it's distingishable from
  normal text.
2023-01-05 18:36:58 +01:00
Andrew Nicols 7d4104a8eb Merge branch 'MDL-76508-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2023-01-05 21:31:14 +08:00
Paul Holden da216a5545 weekly release 4.0.5+ 2023-01-05 10:53:13 +00:00
Aya Saad 08d0ea0aad MDL-76251 mod_forum: fix responsive issues in discussion 2023-01-05 11:35:44 +02:00
David Woloszyn 50c1e2507d MDL-76607 timeline: Reordered message to account for long course name 2023-01-05 12:13:39 +11:00
David Woloszyn ec71e226d4 MDL-76607 css: Fixed various classes where long strings break layout 2023-01-05 12:13:39 +11:00
Sara Arjona 9b11c29932 Merge branch 'MDL-76375-400' of https://github.com/lucaboesch/moodle into MOODLE_400_STABLE 2023-01-04 16:21:51 +01:00
Luca Bösch 2af81f271d MDL-76375 quiz generator: Allow more than one attempt by Behat tests. 2023-01-04 15:16:30 +01:00
Sara Arjona 1fa5b0c03c Merge branch 'MDL-76221-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2023-01-04 13:09:46 +01:00
Paul Holden 160019f2e3 MDL-76657 grade: load required test libraries for grade helper. 2023-01-04 11:22:51 +00:00
Paul Holden 8412f2adb0 Merge branch 'MDL-76657-400' of https://github.com/rezaies/moodle into MOODLE_400_STABLE 2023-01-04 11:10:43 +00:00
Jun Pataleta 1d3bd4e102 Merge branch 'MDL-74822-400' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2023-01-04 17:29:11 +08:00
Jun Pataleta 54e2850687 MDL-76601 block_myoverview: Remove hover action before clicking on menu
With the course card menu now always displayed, there's no need to hover
first before clicking on the menus on block_myoverview Behat tests.
2023-01-04 17:22:46 +08:00
Jun Pataleta 1c1f42d5d3 MDL-76601 blocks: Always display course card menus
Displaying the course card menu only on hover is bad in terms of
accessibility as it prevents keyboard-only users from accessing the
menu. So it's better to always display them.
2023-01-04 17:22:46 +08:00
Sara Arjona d070caea1a Merge branch 'MDL-76181-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2023-01-04 09:20:25 +01:00
Sara Arjona dd6549e0be Merge branch 'MDL-76308-400' of https://github.com/BruceGoodGuy/moodle into MOODLE_400_STABLE 2023-01-03 14:13:05 +01:00
Paul Holden 0b66c7a43a Merge branch 'MDL-53137-400' of https://github.com/lucisgit/moodle into MOODLE_400_STABLE 2023-01-03 12:14:43 +00:00
Sara Arjona 093b2d9eb5 Merge branch 'MDL-71506-400' of https://github.com/lucaboesch/moodle into MOODLE_400_STABLE 2023-01-03 13:10:22 +01:00
Paul Holden 7172bf1f73 Merge branch 'MDL-75346-reset_dashboard_error-400' of https://github.com/leonstr/moodle into MOODLE_400_STABLE 2023-01-03 11:28:33 +00:00
Shamim Rezaie 540ce30050 MDL-76657 gradebook: Remove hard-coded plugin names from unit test 2023-01-03 20:33:17 +11:00
Andrew Nicols 4fb6de6324 MDL-32105 mod_glossary: Improve behat test 2023-01-03 15:32:39 +08:00
Andrew Nicols d9d1cd7c55 Merge branch 'MDL-32105-400' of https://github.com/Chocolate-lightning/moodle into MOODLE_400_STABLE 2023-01-03 15:32:36 +08:00
Peter 6774281d65 MDL-32105 mod_glossary: Restrict glossary aliases by set of keywords 2023-01-03 13:49:09 +08:00
Huong Nguyen e22131aa8f MDL-74822 usertours: Fix accessibility issues with user tours
Including in this commit:
 - Prevent the tour to be displayed if the CSS is disabled by the browser
 - Removed redundant tabindex=0 attribute on the target
 - Created extra code to re-calculate the suitable position of the tour
 - Fixed tour issue in 200% and 400% zoom
 - Fixed tour highlight is not correct in 200% and 400%
2023-01-03 10:35:32 +07:00
Sara Arjona 81ecef2c1b Merge branch 'MDL-60038-400' of https://github.com/aneno-m-e/moodle into MOODLE_400_STABLE 2023-01-02 16:35:30 +01:00
Luca Bösch d0e3eb464a MDL-71506 mod_choice: suppress non respondents in downloads if set so. 2023-01-02 15:52:47 +01:00
Sara Arjona 5e439eefde Merge branch 'MDL-76106-400' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_400_STABLE 2023-01-02 13:07:45 +01:00
Sara Arjona d066f500bf Merge branch 'MDL-76760-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2023-01-02 12:27:46 +01:00
Paul Holden bb898838d6 MDL-76221 reportbuilder: improve report test generator methods.
Test generators for creating report columns, filters and conditions
now allow for setting all persistent properties.
2022-12-29 14:02:32 +00:00
Paul Holden 81cc2e6b41 MDL-76181 reportbuilder: sort columns during stress testing. 2022-12-29 13:57:42 +00:00
Sara Arjona fcfc240a77 weekly release 4.0.5+ 2022-12-29 12:57:50 +01:00
Sara Arjona f3fee9f4d2 Merge branch 'MDL-76399-patch-400' of https://github.com/ilyatregubov/moodle into MOODLE_400_STABLE 2022-12-29 09:13:39 +01:00
Ilya Tregubov 302610302a MDL-76399 behat: switch to appropriate Behat step for selects. 2022-12-29 14:45:00 +07:00
Ilya Tregubov fa417ba8a3 Merge branch 'MDL-76399-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-29 09:44:00 +07:00
Sara Arjona 9d14b80f5b Merge branch 'MDL-76004-400' of https://github.com/aanabit/moodle into MOODLE_400_STABLE 2022-12-28 18:22:40 +01:00
Sara Arjona bdbd1b3af0 Merge branch 'MDL-72523-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-28 13:01:45 +01:00
Paul Holden 2b6ca7e207 MDL-72523 calendar: return original focus from event modals. 2022-12-28 11:14:50 +00:00
Huong Nguyen 023ac9229f MDL-72523 javascript: Introduce setReturnElement for core/modal 2022-12-28 11:14:50 +00:00
Sara Arjona 5f02141a7a Merge branch 'MDL-72563-400' of https://github.com/KepaUrzelai/moodle into MOODLE_400_STABLE 2022-12-28 12:13:21 +01:00
Sara Arjona 54cffd7c2e Merge branch 'MDL-69071-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-28 11:41:18 +01:00
Paul Holden 5e80881587 MDL-76760 tool_behat: defer library loading until service execution.
Ensures that API documentation can be generated without requiring
the presence of the `vendor/` directory.
2022-12-28 10:39:54 +00:00
Ilya Tregubov c6c77554ef Merge branch 'MDL-76731_400' of https://github.com/PhilippImhof/moodle into MOODLE_400_STABLE 2022-12-28 15:14:35 +07:00
Sara Arjona dcfd3b29a9 Merge branch 'MDL-76679-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-27 16:55:31 +01:00
Amaia Anabitarte 293bc2d615 MDL-76578 core_course: One section per page summary information 2022-12-26 16:02:51 +01:00
Meirza eeccbf0ebd MDL-76508 templates: Handling non-JSON string
When the param string contains a left curly bracket as the first character,
the system will assume the string is a JSON string and will be parsed and returned as an object.
But in some cases, the string is not JSON and will return an error if the system parses it.
For example, a user might have used the course name with a left curly bracket as the first character.
Adding a double quote after the left curly bracket to differentiate between string and JSON string,
so it can be safe to parse the string.
2022-12-24 05:24:24 +07:00
Noemie Ariste 8cded7cd9f MDL-60038 moodlelib: ignore site policy if user auth type = 'webservice' 2022-12-23 10:03:41 +13:00
Philipp Imhof 652d8971ec MDL-76731 behat: add steps to check for version
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2022-12-22 17:12:29 +01:00
Tony Butler 8fbede49ae MDL-53137 qtype_numerical: Swap geo tolerance limits for -ve answers 2022-12-22 15:32:00 +00:00
Ilya Tregubov 37e16d4da2 weekly release 4.0.5+ 2022-12-22 19:16:34 +07:00
Ilya Tregubov 5b325dc2e9 Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-12-22 19:16:32 +07:00
Ilya Tregubov 06d3ff9ea2 Merge branch 'MDL-76667-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-22 12:30:08 +07:00
Paul Holden 6aa9d215c8 Merge branch 'MDL-75965-400' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2022-12-22 12:30:08 +07:00
Andrew Nicols 0faa70e56a MDL-75105 tool_behat: Coding style fixes 2022-12-22 12:30:08 +07:00
Andrew Nicols 0ab77c7287 Merge branch 'MDL-75105_400_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_400_STABLE 2022-12-22 12:30:07 +07:00
Paul Holden 3d0bbf1a0f Merge branch 'MDL-75914-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-12-22 12:30:07 +07:00
AMOS bot 9287e1e0ea Automatically generated installer lang files 2022-12-22 00:07:39 +00:00
Meirza e4bf4cf37e MDL-75914 webservice: Added fake URL to avoid debugging output.
Webservice doesn't need to set the page URL. Hence,
any function that requires a page URL will raise debugging output.
The patch fixes it by adding a fake URL for the webservice.
The patch also removed assertDebuggingCalled because it is no longer needed.
2022-12-21 16:32:54 +07:00
Mark Johnson 4dfb5cf6e7 MDL-75105 tool_behat: List available data generators
This will find all data generators that can be used in behat via the
'the following "something" exist:' step, and display them in a select
list on the step definitions page.

When a generator is selected, it will fetch the required fields for that
generator and display them on the page.
2022-12-21 08:38:20 +00:00
Huong Nguyen 4fc412b538 MDL-75965 question_multichoice: Misalignment of feedback icons 2022-12-21 14:15:50 +07:00
Ilya Tregubov 9e6b6b4925 Merge branch 'MDL-76727-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-12-21 09:50:45 +07:00
Paul Holden 0e52ea009d Merge branch 'MDL-75279-400' of https://github.com/spvickers/moodle into MOODLE_400_STABLE 2022-12-20 10:27:42 +00:00
Andrew Nicols 7a5389f1cc MDL-76727 core: Allow phpcs configuration to be overridden locally
This change reduces the priority of the shipped phpcs configuration to
allow for local overrides.

This is beneficial in several situations:
- when users wish to apply stricter or additional standards
- when the integration team wishes to trial new rules
2022-12-20 09:35:51 +08:00
Stephen Vickers e7a5867a88 MDL-75279 mod_lti: Add username to NRPS response 2022-12-19 17:11:04 +00:00
Paul Holden 741c9e003d Merge branch 'MDL-72906-400' of https://github.com/tdjones/moodle into MOODLE_400_STABLE 2022-12-19 10:23:16 +00:00
Ilya Tregubov f464b00ab8 Merge branch 'MDL-74779-400' of https://github.com/ssj365/moodle into MOODLE_400_STABLE 2022-12-19 09:45:54 +07:00
Leon Stringer 2f4fa118db MDL-75346 core_my: Handle missing blocks on reset
If the default dashboard contained a block that was missing from disk
then "Exception - Call to a member function instance_copy() on bool"
was shown to users.  This change only shows an error with debugging
enabled which now includes the name of the missing block.
2022-12-17 17:40:38 +00:00
Paul Holden 2144007387 MDL-76399 question: switch to appropriate Behat step for selects. 2022-12-16 13:09:54 +00:00
Paul Holden 6176c8fc88 MDL-76399 behat: improvements to "should exist in" thrown exception. 2022-12-16 12:29:19 +00:00
Paul Holden e62f86b983 Merge branch 'MDL-76026_400' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_400_STABLE 2022-12-16 09:54:54 +00:00
Andrew Nicols 089260dae2 weekly release 4.0.5+ 2022-12-16 09:05:57 +08:00
Andrew Nicols 661e595500 Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-12-16 09:05:56 +08:00
Paul Holden 1aba16cbea MDL-69071 core: retrieve full result from remote content.
Use the full result from download_file_content within the component
installer to ensure that spurious debugging is not emitted during
operation. Handle validation of the returned data consistently.
2022-12-15 17:19:08 +00:00
Paul Holden c9a5b23d7a MDL-76679 admin: correct password config field template.
The template changes were missed as part of 0795b579, update them
to match so that they continue to work with the unmask JS module.
2022-12-14 19:12:11 +00:00
Sara Arjona 636ad3d3a0 Merge branch 'MDL-76674_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-12-14 18:34:56 +01:00
Amaia Anabitarte 3f39fcf27e MDL-76004 core_h5p: Ensure the browser is serving updated file 2022-12-14 16:22:59 +01:00
Eloy Lafuente (stronk7) 1097414910 MDL-76674 core_lang: Add string for new America/Ciudad_Juarez 2022-12-14 15:51:36 +01:00
Paul Holden 364c3b1fa9 Merge branch 'MDL-76666_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-12-14 13:22:07 +00:00
Eloy Lafuente (stronk7) 27ebb8fa2d MDL-76666 local_langimport: Better handling of long locales
Under some linux versions, and depending of the configured
locale categories, it's possible to get a current locally
which length > 255 when calling to setlocale(LC_ALL, 0).

Later, if that long locale is tried to be restored, there
is a "setlocale(): Specified locale name is too long" warning
error.

When that happens we need to split the long locale into
individual chunks and set all the (six) locale categories
supported one by one.

Covered with tests, note that, in practice, this only
happens with linux because it supports 12 locale categories
@ OS level. Both BSD (6) and Windows (5) hardly can reach the limit.

No matter of that, the tests have been designed to ensure that
they pass on all OSs, just the new code only will be executed
on linux.
2022-12-14 12:25:37 +01:00
Sara Arjona 08c8e9bba2 Merge branch 'MDL-75441-400' of https://github.com/aanabit/moodle into MOODLE_400_STABLE 2022-12-14 09:57:19 +01:00
AMOS bot b4ab42a911 Automatically generated installer lang files 2022-12-14 00:07:39 +00:00
Anupama Sarjoshi a85ff11cba MDL-76026 Question bank: Fix errors related to categories renaming
This part of the code in 'question_category_object.php' 'update_category' method was used before Moodle 4.0 version for renaming
the random questions in an updated category. For Moodle 4.0, it is unnecessary as the details of random questions are no more
stored in 'question' table but in 'question_set_references' table. The method call move_question_set_references handles the same.
2022-12-13 19:21:19 +00:00
Amaia Anabitarte 9d2ddbf7fe MDL-75441 mod_forum: Show add new post button to guest users 2022-12-13 18:48:01 +01:00
Paul Holden 34eee61037 MDL-76667 forms: mark modal form as submitted upon success.
Ensure the form change checker module doesn't warn user about it.
2022-12-13 14:48:16 +00:00
Andrew Nicols ff72ae15f3 Merge branch 'MDL-76509-400' of https://github.com/safatshahin/moodle into MOODLE_400_STABLE 2022-12-13 20:32:01 +08:00
Andrew Nicols 8a4a9fc096 Merge branch 'MDL-76536-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-13 11:42:57 +08:00
Andrew Nicols 4ab2e98a64 MDL-76293 gradebook: Address coding violations
This includes a data provider which had the 'test_' prefix and was
therefore run as a test.
2022-12-13 11:07:37 +08:00
Andrew Nicols e5ed497363 Merge branch 'MDL-76293_400' of https://github.com/mkassaei/moodle into MOODLE_400_STABLE 2022-12-13 11:07:33 +08:00
Safat 26ed26289d MDL-76509 core: Upgrade error resolve for slot tags 2022-12-13 13:40:33 +11:00
Shamiso.Jaravaza fdcc78fee0 MDL-74779 mod_bigbluebuttonbn: Fix recording sort
AMOS BEGIN
 MOV [config_recordings_sortorder,mod_bigbluebuttonbn],[config_recordings_asc_sort,mod_bigbluebuttonbn]
 MOV [config_recordings_sortorder_description,mod_bigbluebuttonbn],[config_recordings_asc_sort_description,mod_bigbluebuttonbn]
AMOS END
2022-12-12 13:32:09 -07:00
Sara Arjona 43e0217956 Merge branch 'MDL-75571-400' of https://github.com/jacdsouza/moodle into MOODLE_400_STABLE 2022-12-12 11:23:24 +01:00
Khoa Nguyen Dang 7ae8b4dbed MDL-76308 Question\D&D: The draggable area is slim characters to select 2022-12-12 13:49:39 +07:00
hieuvu 097b706970 MDL-76106 qtype_ddmarker: fix the missing maker issue.
We will not calculate old maker position again and using old data.
This will make sure the position of makers is correct
when the background image is smaller than dropzone.
2022-12-12 11:10:18 +07:00
Andrew Nicols 2d3acb52df Merge branch 'MDL-76398-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-11 20:21:00 +08:00
Jackson D'souza 118240ef22 MDL-75571 tool_componentlibrary: Custom activity icon 2022-12-09 15:51:33 +00:00
Jackson D'souza d7b3d443aa MDL-75571 theme_boost: Activity icon
* Use Activity get_icon_url helper method to fetch icon.
2022-12-09 15:51:33 +00:00
Jackson D'souza 75247caff8 MDL-75571 block_timeline: Display custom activity icon if available. 2022-12-09 15:51:33 +00:00
Jackson D'souza bb23523870 MDL-75571 calendar: Activity icon
* Use Activity get_icon_url helper method to fetch icon.
2022-12-09 15:51:33 +00:00
Sara Arjona e4b7d8b323 Merge branch 'MDL-76274-400' of https://github.com/cameron1729/moodle into MOODLE_400_STABLE 2022-12-09 16:18:14 +01:00
Paul Holden 93ac861ec5 MDL-76536 enrol: prevent invalid role assignments in course creation.
Upgrade step to fixup existing bad data.
2022-12-09 11:39:51 +00:00
Sara Arjona ce6131e6f7 weekly release 4.0.5+ 2022-12-09 08:57:06 +01:00
Sara Arjona 3e0a29dee5 Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-12-09 08:57:01 +01:00
Jun Pataleta c1fb24274e Merge branch 'MDL-76556-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-12-08 10:07:41 +08:00
Andrew Nicols ec6d835341 Merge branch 'MDL-76491-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-08 08:12:55 +08:00
AMOS bot 73d873e752 Automatically generated installer lang files 2022-12-08 00:07:38 +00:00
Andrew Nicols 623ca576bd Merge branch 'MDL-76550_400' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_400_STABLE 2022-12-08 08:07:20 +08:00
Andrew Nicols df2fe09963 Merge branch 'MDL-76074-400' of https://github.com/srobotta/moodle into MOODLE_400_STABLE 2022-12-08 07:29:05 +08:00
Andrew Nicols 4b31bb97f5 Merge branch 'MDL-76116-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-12-08 06:17:25 +08:00
Sara Arjona b6355c6490 Merge branch 'MDL-75588-400' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2022-12-07 19:31:18 +01:00
Trevor Jones 40c59b5865 MDL-72906 Quiz: Prevent scrollbar on multichoice
Remove negative margin from the "clear my choice" anchor.
With the negative margin, when the containing box height is calculated
the anchor's hidden style overflows beyond the boundary and triggers
the overflow:auto to add a scroll bar.
2022-12-07 11:22:27 -07:00
Sara Arjona 814fc9cbc1 Merge branch 'MDL-76500-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-07 18:27:59 +01:00
Sara Arjona 77ef43cb2e Merge branch 'MDL-76193-400' of https://github.com/JBThong/moodle into MOODLE_400_STABLE 2022-12-07 17:26:30 +01:00
Sara Arjona 0ab8dfd19f Merge branch 'MDL-76571_400' of https://github.com/timhunt/moodle into MOODLE_400_STABLE 2022-12-07 17:17:50 +01:00
Tim Hunt 38bad90a7e MDL-76571 quiz reports: should not show description items
... or anything else with length = 0. This got broken in MDL-71696.

The only way to fix this kind-of involves and API change to
quiz_report_get_significant_questions. However, it is only changing
the external API of this function back to how it was before the 4.0 release,
and the chnages in 4.0 were never documented, nor, I would guess, intended,
since they just broke things.
2022-12-07 14:51:42 +00:00
Jun Pataleta 85ca739855 Merge branch 'MDL-76559-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-12-07 22:40:44 +08:00
Andrew Nicols 57f473425a MDL-76559 core: validate_email does not take false either 2022-12-07 21:40:18 +08:00
Sara Arjona 982427b990 Merge branch 'MDL-76273-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-07 12:51:49 +01:00
Huong Nguyen 15a855e371 MDL-75588 assign: Reset completion status when resetting a submission 2022-12-07 16:16:07 +07:00
Jun Pataleta 72ceec4d94 Merge branch 'MDL-73017-M400_add-environment-check-for-versions-not-supporting-php-8-1' of https://github.com/ziegenberg/moodle into MOODLE_400_STABLE 2022-12-07 13:47:21 +08:00
Meirza fd89171c91 MDL-76116 mnet: styling the delete key confirmation window properly 2022-12-07 11:28:15 +07:00
Jun Pataleta 9e06598722 Merge branch 'MDL-75635-MOODLE_40_STABLE' of https://github.com/catalyst/moodle into MOODLE_400_STABLE 2022-12-07 11:04:00 +08:00
Thong Bui 25ca760ccd MDL-76193 Questions: Backup and Restore with tags fails 2022-12-06 22:32:30 +07:00
Jun Pataleta 8cca821b62 Merge branch 'MDL-76559-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-12-06 23:19:28 +08:00
Andrew Nicols 7c28bd0d36 MDL-76559 core: validate_email should not accept empty values 2022-12-06 20:53:54 +08:00
Jun Pataleta 743fe53e6b Merge branch 'MDL-75381-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-06 19:24:28 +08:00
Ilya Tregubov af51642584 Merge branch 'MDL-76490-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-06 13:10:21 +03:00
Paul Holden 0dc67b9d10 MDL-76500 grade: fix grade form when item cannot be overridden. 2022-12-06 09:19:52 +00:00
Ilya Tregubov 8966d10fd6 Merge branch 'MDL-76446-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-06 12:19:34 +03:00
Mahmoud Kassaei 8ee6c1b4ed MDL-76293 Gradebook: PHPUnit fails when plugins are not expected 2022-12-06 08:39:56 +00:00
Cameron Ball f4dba7ab54 MDL-76274 assignfeedback_editpdf: Fix upgrade step for stale conversions 2022-12-06 16:07:50 +08:00
Ilya Tregubov 42d71d6502 Merge branch 'MDL-75516_400' of https://github.com/larsbonczek/moodle into MOODLE_400_STABLE 2022-12-06 10:38:40 +03:00
Andrew Nicols 34c8e455ea Merge branch 'MDL-75446-400' of https://github.com/andelacruz/moodle into MOODLE_400_STABLE 2022-12-06 15:20:01 +08:00
Andrew Nicols e81a91d18f Merge branch 'MDL-75573-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-06 13:56:47 +08:00
Andrew Nicols c877d579e7 Merge branch 'MDL-76145-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-12-06 13:36:30 +08:00
Paul Holden ef9310d1e7 MDL-76273 core: multi-byte character filename support for TCPDF.
See: https://github.com/tecnickcom/TCPDF/pull/562
2022-12-05 15:03:09 +00:00
Paul Holden 64439605c6 MDL-76490 behat: use defined step for interaction with autocomplete. 2022-12-05 14:22:27 +00:00
Marina Glancy 7ae00a1542 MDL-76490 behat: correct step for opening autocomplete in container. 2022-12-05 14:22:02 +00:00
Anupama Sarjoshi 8576612fbb MDL-76550 Quiz and qbank: Fix display of Category and question names 2022-12-05 12:09:26 +00:00
Sara Arjona 4fc0a470fb Merge branch 'MDL-75789-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-05 12:53:50 +01:00
Sara Arjona f05f5b909f Merge branch 'MDL-76166-username-logging-MOODLE_400_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_400_STABLE 2022-12-05 12:44:30 +01:00
Ilya Tregubov 90829a7550 Merge branch 'MDL-75788-400' of https://github.com/lameze/moodle into MOODLE_400_STABLE 2022-12-05 14:32:22 +03:00
Sara Arjona afafcca723 Merge branch 'MDL-76482-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-12-05 12:04:09 +01:00
Daniel Ziegenberg 02663758fb MDL-73017 env: Moodle 3.9.x, 3.11.x and 4.0.x do not support PHP 8.1
This commit adds an additional environment check for the unsupported
PHP 8.1 version to Moodle 3.9.x, 3.11.x and 4.0.x.

It also updates the lang string for unsupported PHP version.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-12-05 11:39:53 +01:00
Angelia Dela Cruz 1bec71f1b6 MDL-75446 behat: Workshop behat generators use UI
Replace steps that manually add Workshop instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2022-12-05 16:37:06 +08:00
Ilya Tregubov 507d27ba9b Merge branch 'MDL-76330-MOODLE_400_STABLE' of https://github.com/sh-csg/moodle into MOODLE_400_STABLE 2022-12-05 09:22:37 +03:00
Jun Pataleta 65397a0a86 Merge branch 'MDL-76225-400' of https://github.com/ferranrecio/moodle into MOODLE_400_STABLE 2022-12-05 13:47:37 +08:00
AMOS bot a916576147 Automatically generated installer lang files 2022-12-04 00:08:29 +00:00
Andrew Nicols 258c8ca75c MDL-76556 tool_log: Set the store property correctly 2022-12-03 11:49:24 +08:00
Lars Bonczek 3afa59e702 MDL-75516 core: Perform proper JSON encoding in mustache quote helper 2022-12-02 13:37:33 +01:00
Paul Holden b729d36baf MDL-76491 javascript: add missing core/notification imports. 2022-12-02 10:06:27 +00:00
Paul Holden f5bb4eebce MDL-76491 javascript: prevent eslint undefined Notification import. 2022-12-02 10:06:10 +00:00
Paul Holden 91e96925c9 MDL-76398 reportbuilder: use improved action menu steps in Behat.
Improved steps for using actions menus were added in 232ebac3, so
make use of them here for consistency/reliability.
2022-12-02 09:54:58 +00:00
Paul Holden b903d21ea2 MDL-76398 behat: broader action menu partial matching by element.
For action menu elements whose trigger element isn't plain text
(e.g. a pix icon), we should be able to match via the title of
that element.
2022-12-02 09:54:58 +00:00
Stephan Robotta 1ad4c0e91c MDL-76074 completion: fixed filter in reports with custom user fields
When the site uses custom user text fields that would show up in a
user list, the filter for firstname or lastname didnt work anymore.
If a filter was used, no result would show up. Users where shown only
when the course reports where used without filters.
2022-12-02 09:42:29 +01:00
Dani Palou 6aafd5fa61 MDL-75788 behat: Use profile field generators in existing tests 2022-12-02 14:58:38 +08:00
Dani Palou e2d166e526 MDL-75788 testing: Handle new lines in menu profile field generator 2022-12-02 14:58:38 +08:00
hieuvu ae949341cd MDL-76106 qtype_ddmarker: Improve loading consistency.
Wait for the image to load completely before running the js.
2022-12-02 12:34:43 +07:00
Paul Holden ef5112211b MDL-75573 backup: translate async operation type in messages. 2022-12-01 19:48:36 +00:00
Stefan Hanauska ea6c1d65af MDL-76330 enrol: Check permission to show edit icon 2022-12-01 20:07:10 +01:00
Sara Arjona bdba78514f weekly release 4.0.5+ 2022-12-01 16:08:04 +01:00
Andrew Nicols 1d35066ba5 Merge branch 'MDL-75604-400' of https://github.com/ssj365/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Andrew Nicols cb26fec31f Merge branch 'MDL-75281-400' of https://github.com/call-learning/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Sara Arjona 1e6be54edd Merge branch 'MDL-76226-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Jun Pataleta 1fc5e599c5 Merge branch 'MDL-76250-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Jun Pataleta 53c1445753 Merge branch 'MDL-76483-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Andrew Nicols 53e5b88001 Merge branch 'MDL-75826-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Jun Pataleta 17e976a2a7 Merge branch 'MDL-68981-400' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Jun Pataleta 230c3cedc6 Merge branch 'MDL-76284-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Jun Pataleta 09d76ce833 Merge branch 'MDL-76429_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Andrew Nicols 3b504d259b Merge branch 'MDL-76380-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-12-01 09:02:48 +03:00
Andrew Nicols a24b426062 Merge branch 'MDL-76218-m400' of https://github.com/sammarshallou/moodle into MOODLE_400_STABLE 2022-12-01 09:02:47 +03:00
Andrew Nicols e8c58c9a3b Merge branch 'MDL-76127-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-12-01 09:02:47 +03:00
Ilya Tregubov f51798f962 Merge branch 'MDL-72019-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-12-01 09:02:47 +03:00
Laurent David 46e658d506 MDL-75281 mod_bigbluebuttonbn: Upgrade failure when table exists
* Fix several upgrade script issue when the recording table exists or plugin has been
downgraded prior to 4.x upgrade
2022-11-30 20:15:13 +01:00
Shamiso.Jaravaza c72574f800 MDL-75604 mod_bigbluebuttonbn: Fix welcome section
* Removed welcome message from General settings
* Cleaned settings.php file to remove hardcoded add($item) after adding conditional element
2022-11-30 10:08:37 -07:00
Ferran Recio 70abc44e05 MDL-76225 core_courseformat: fix section title id 2022-11-30 16:47:09 +01:00
Meirza 966b0dd3df MDL-76145 course: Avoid long course names that exceed available space
Co-authored-by: Stephen Sharpe <stephen.sharpe@synergy-learning.com>
2022-11-30 11:36:16 +07:00
Andrew Nicols ad770fe215 MDL-76482 output: The javascript mustache helper should return a string 2022-11-30 12:18:54 +08:00
Huong Nguyen 832d237c94 MDL-68981 tool_recyclebin: Force necessary settings when restoring
Created code to force the necessary settings for restore_item in:
  + course_bin class
  + category_bin class
2022-11-30 10:20:09 +07:00
Huong Nguyen cb8b72034e MDL-68981 tool_recyclebin: Extra PHPUnit with General restore config 2022-11-30 10:20:09 +07:00
Huong Nguyen 31c047d2d3 MDL-68981 tool_recyclebin: Extra Behat test with General restore config
Including in this commit:
 - Convert existing Behat scenario to use Data generators
 - Convert existing Behat scenario to use Provider
 - Add new scenario for Include users setting in General restore page
2022-11-30 10:20:06 +07:00
Brendan Heywood acf152ca8b MDL-76166 calendar: Ensure user is in server access logs 2022-11-30 13:26:11 +11:00
Brendan Heywood 4dc23af4ad MDL-76166 auth: Ensure user is in server access logs 2022-11-30 13:26:11 +11:00
Paul Holden d24c88543d MDL-76446 user: correct logic for multiple keyword search.
When the keyword participant filter was used with multiple values
in conjunction with other participants filters, the boolean logic
was effectively:

 X AND Y OR Z

When what we actually wanted was:

 X AND (Y OR Z)
2022-11-29 16:30:41 +00:00
Andrew Nicols 382f91cf8c Merge branch 'MDL-75960-400' of https://github.com/andelacruz/moodle into MOODLE_400_STABLE 2022-11-29 17:05:18 +08:00
Paul Holden 109b772c06 MDL-75381 gradereport_grader: ensure valid paging preference value.
Set type of the report paging setting to integer, to ensure usage
of it is predictable. Unsupported operated type errors were thrown
on PHP8.0 when it's value contained a string or was empty.
2022-11-29 08:41:27 +00:00
Paul Holden 937c47e90e MDL-75789 restore: multi-byte safe substring calculating course names.
Co-authored-by: Leon Stringer <leon.stringer@ntlworld.com>
2022-11-29 08:32:13 +00:00
Andrew Nicols 1735591d32 Merge branch 'MDL-65939-400' of https://github.com/ewallah/moodle into MOODLE_400_STABLE 2022-11-29 15:41:51 +08:00
Andrew Nicols 6846a839f5 Merge branch 'MDL-76058-400' of https://github.com/lameze/moodle into MOODLE_400_STABLE 2022-11-29 15:37:24 +08:00
Andrew Nicols 11123d3aba Merge branch 'MDL-74454-MOODLE_400_STABLE' of https://github.com/pabloamayab/moodle into MOODLE_400_STABLE 2022-11-29 14:19:05 +08:00
Andrew Nicols eb61b04180 MDL-76258 mod_lti: Codign style fixes 2022-11-29 12:29:06 +08:00
Andrew Nicols 9fa5637b56 Merge branch 'MDL-76258-MOODLE_400_STABLE' of https://github.com/sh-csg/moodle into MOODLE_400_STABLE 2022-11-29 12:29:03 +08:00
Andrew Nicols ab112ec2b7 MDL-69570 assignfeedback_editpdf: Whitespace fix 2022-11-29 11:52:01 +08:00
Andrew Nicols 801ca38d89 Merge branch 'MDL-69570-400' of https://github.com/abgreeve/moodle into MOODLE_400_STABLE 2022-11-29 11:51:05 +08:00
Adrian Greeve fa0e0b9a39 MDL-69570 assignfeedback_editpdf: Upgrade step to remove files.
This upgrade step removes all orphaned editpdf feedback files and
records.
2022-11-29 09:48:47 +08:00
Adrian Greeve df99098fb6 MDL-69570 assignfeedback_editpdf: Remove temp pdf files
This adds a new method to the assignfeedback edit pdf library
to specify user data file areas that will return just the meaningful
annotated feedback pdf.

get_file_areas has been updated for this plugin to return all
file areas related to assignfeedback_editpdf, and should stop
producing orphaned files and records when a course reset is done.

Thanks to @toniginard who provided a base solution for me to work
off.
2022-11-29 09:47:48 +08:00
Paul Holden a63ddc2ec3 MDL-76380 tool_oauth2: remove double persistent load on update.
The method already loaded the validated persistent model data on the
previous line, there's no need to do it again (while also trying to
load unvalidated properties).
2022-11-28 19:39:00 +00:00
Paul Holden 740d11fb43 MDL-76250 mod_assign: disable form change checker for grading options.
This was previously fixed in 8e9efe60, but seems to have regressed
somewhere along the way.
2022-11-28 16:07:04 +00:00
Paul Holden e4bdc416d8 MDL-76226 admin: account for preset config checkboxes other than bool.
The assumption that the settings checkbox always stores boolean values
(e.g. 0/1) isn't correct. The `perfdebug` configuration instead uses
the values 7/15.
2022-11-28 16:04:14 +00:00
Paul Holden 7030ec9af2 MDL-76284 webservice: early exit if no users for missing capabilities. 2022-11-28 11:52:52 +00:00
Meirza 34f8f8fe90 MDL-75826 profile: Redirect to profile page if returnto is profile. 2022-11-28 16:16:23 +07:00
Angelia Dela Cruz aeebd7a189 MDL-75960 behat: Survey behat generators use UI
Replace steps that manually add Survey instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2022-11-28 10:01:16 +08:00
Eloy Lafuente (stronk7) ffbb559293 MDL-76429 composer: Bump to phpwebdriver 1.2.1 for php81 compat
This fix is really only required for Moodle 4.1 and up, that will
be the one supporting php81, but we always apply composer changes
to all branches (supported and security), so we keep them running
the same stuff.

Note this comes with a bunch of other small updates, all them
pretty minor and should not be problematic. Better we get them
than keeping them apart.
2022-11-25 16:27:24 +01:00
Andrew Nicols 6687efe4d5 MDL-76483 core: Handle default value for get_docs_url() 2022-11-25 22:19:20 +08:00
Ilya Tregubov efdaed1f70 weekly release 4.0.5+ 2022-11-25 15:38:30 +03:00
Jun Pataleta 56143593c4 Merge branch 'MDL-76468-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-11-24 17:51:43 +08:00
Andrew Nicols 1a5322ab4b MDL-76468 output: Correct slasharg URL for theme stylesheet 2022-11-24 16:41:07 +08:00
Andrew Nicols 449104d62a Merge branch 'MDL-76395-400-enfix' of https://github.com/vmdef/moodle into MOODLE_400_STABLE 2022-11-24 16:25:17 +08:00
Ilya Tregubov 437f447816 Merge branch 'MDL-76291-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-24 10:59:47 +03:00
Víctor Déniz ef8fdb4762 Merge branch 'MDL-76324-400' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2022-11-23 14:22:40 +00:00
Víctor Déniz 476474da69 MDL-76395 lang: Use fixed strings in tests 2022-11-23 12:45:54 +00:00
Paul Holden 2e534d0c99 MDL-76291 mod_bigbluebuttonbn: tell Behat to wait while polling.
While fetching recording data, and updating room info. Should reduce
random scenario failures.
2022-11-23 10:15:39 +00:00
Jun Pataleta c09e748a9a Merge branch 'MDL-76365-400' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2022-11-23 14:51:34 +08:00
Huong Nguyen 8a0f9db07f MDL-76324 webdav: Fix error for PHP 8.0 2022-11-23 09:12:02 +07:00
Helen Foster 0487f8ed9a MDL-76395 lang: Import fixed English strings (en_fix) 2022-11-23 00:14:28 +00:00
Ilya Tregubov bb7e105ca9 weekly release 4.0.5+ 2022-11-22 15:58:21 +03:00
Huong Nguyen cca0bc9ec5 MDL-76365 mod_data: Fix export with empty template
If the template is not created, we need to use the default template for the export
2022-11-22 12:08:45 +07:00
Jun Pataleta 65886c04da Merge branch 'MDL-76390_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-11-22 11:20:05 +08:00
Jun Pataleta 472ea45f92 Merge branch 'MDL-76367-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-11-22 11:08:31 +08:00
Jun Pataleta b62844e26c Merge branch 'MDL-76389_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-11-22 09:49:42 +08:00
Ilya Tregubov e72dd8c3d9 Merge branch 'MDL-76341-400' of https://github.com/stevandoMoodle/moodle into MOODLE_400_STABLE 2022-11-21 16:54:36 +03:00
Meirza 4419deedab MDL-76127 Profiling: Make the breadcrumb of the profiling URL clickable
Boost has the behavior to remove the last item action.
To avoid that, we need to add an action item.
2022-11-21 14:28:14 +07:00
Stevani Andolo 3bd0fd816f MDL-76341 tool_lp: Fixed learning plan's header not containing user name 2022-11-21 14:35:19 +08:00
Eloy Lafuente (stronk7) c5569f2965 MDL-76390 tool_lp: Remove magic getter call
Since Moodle 3.3 (see MDL-57273), the magix getters and setters
for persistent classes are deprecated, instead get() and set()
must be used.
2022-11-20 14:53:17 +01:00
Eloy Lafuente (stronk7) 5d16d55949 MDL-76389 output: Ensure we don't try to iterate over null
Just convert nulls to empty array before trying to iterate it.
2022-11-20 11:42:02 +01:00
Paul Holden 2da8a31849 weekly release 4.0.5+ 2022-11-18 11:43:11 +00:00
Paul Holden f9460201fd Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-11-18 11:43:08 +00:00
Andrew Nicols 5851941cef MDL-76367 core: Apply RTL transformations to editors too 2022-11-18 15:14:42 +08:00
Jun Pataleta 28a2586852 Merge branch 'MDL-76332-400' of https://github.com/call-learning/moodle into MOODLE_400_STABLE 2022-11-18 11:58:12 +08:00
Jun Pataleta 6579bdbdb7 Merge branch 'MDL-75903-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-18 11:29:09 +08:00
AMOS bot 12e4a722bd Automatically generated installer lang files 2022-11-18 00:07:39 +00:00
Sara Arjona 7d2d64a559 Merge branch 'MDL-73620-400_grouperror' of https://github.com/alexmorrisnz/moodle into MOODLE_400_STABLE 2022-11-17 18:00:27 +01:00
Sara Arjona cef970f6d5 Merge branch 'MDL-74780-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-17 17:40:15 +01:00
Paul Holden 7fb8631e3e Merge branch 'MDL-76105-400-enfix' of https://github.com/vmdef/moodle into MOODLE_400_STABLE 2022-11-17 16:30:18 +00:00
Sara Arjona 40d67d22b2 Merge branch 'MDL-70491-400_take2' of https://github.com/lucaboesch/moodle into MOODLE_400_STABLE 2022-11-17 17:25:54 +01:00
Sara Arjona 2700e9b29f Merge branch 'MDL-75627_m400_v1' of https://github.com/sbourget/moodle into MOODLE_400_STABLE 2022-11-17 17:22:30 +01:00
info@eWallah.net 0f6bed1637 MDL-65939 phpunit: Maildigest tests can query a wrong adhoc task 2022-11-17 15:53:41 +01:00
Paul Holden 9c9b10b709 Merge branch 'MDL-75569-400' of https://github.com/justusdieckmann/moodle into MOODLE_400_STABLE 2022-11-17 14:34:55 +00:00
Víctor Déniz 02a066b847 Merge branch 'MDL-76326-400' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2022-11-17 13:19:34 +00:00
Sara Arjona 1d8d3ba456 Merge branch 'MDL-75567-400' of https://github.com/justusdieckmann/moodle into MOODLE_400_STABLE 2022-11-17 13:06:33 +01:00
Víctor Déniz 18f6f90021 Merge branch 'MDL-73804-make-category-filter-context-400' of https://github.com/Peterburnett/moodle into MOODLE_400_STABLE 2022-11-17 11:56:33 +00:00
Paul Holden d2215442ac Merge branch 'MDL-75665_MOODLE_400_STABLE' of https://github.com/tasosb/moodle into MOODLE_400_STABLE 2022-11-17 11:42:28 +00:00
Meirza 591305c989 MDL-72019 user: Allows data to be formatted when exporting. 2022-11-17 16:23:58 +07:00
Jun Pataleta 0cc918fbce Merge branch 'MDL-76310-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-17 14:39:40 +08:00
Bas Brands 1085ea44b8 MDL-70491 theme_boost: improve form autocomplete badge styles 2022-11-17 07:04:51 +01:00
Huong Nguyen 424992eeff MDL-76326 oauth2: Update Nextcloud logo to the new one 2022-11-17 11:32:17 +07:00
Andrew Nicols 359d436178 Merge branch 'MDL-75651-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-17 10:07:07 +08:00
Andrew Nicols 222af18607 Merge branch 'MDL-76083-400' of https://github.com/aanabit/moodle into MOODLE_400_STABLE 2022-11-17 10:00:33 +08:00
David Mudrák 37f2404bd0 MDL-76105 lang: Use fixed strings in tests, too. 2022-11-16 17:33:18 +00:00
Laurent David bfedfcbc4a MDL-76332 mod_bigbluebuttonbn: Fix JS exception, recording only room
* The room updater should only run on room that have the join button
2022-11-16 18:16:54 +01:00
Paul Holden 3faffbc882 Merge branch 'MDL-73078-400' of https://github.com/lucaboesch/moodle into MOODLE_400_STABLE 2022-11-16 16:37:03 +00:00
Paul Holden eb0b6e7619 Merge branch 'MDL-76271-400' of https://github.com/davewoloszyn/moodle into MOODLE_400_STABLE 2022-11-16 16:25:01 +00:00
Sara Arjona b8cf30d2e9 Merge branch 'MDL-75380_400' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_400_STABLE 2022-11-16 16:23:46 +01:00
Kepa Urzelai 441afd68b0 MDL-72563 theme_boost: rubric area style fix 2022-11-16 15:31:33 +01:00
Laurent David 09ed58c5a1 MDL-76083 mod_data: Fix preset importer
* We should delete fields that have not been marked as to preserve.
2022-11-16 13:15:28 +01:00
Helen Foster f9022d9fa9 MDL-76105 lang: Import fixed English strings (en_fix) 2022-11-16 10:21:38 +00:00
Jun Pataleta ce4bdc144e Merge branch 'MDL-75415-400' of https://github.com/ssj365/moodle into MOODLE_400_STABLE 2022-11-16 17:51:39 +08:00
Jun Pataleta 2d4fb04857 Merge branch 'MDL-74558-400' of https://github.com/ssj365/moodle into MOODLE_400_STABLE 2022-11-16 17:51:17 +08:00
Jake Dallimore f2b007ee49 Merge branch 'MDL-76220-400' of https://github.com/ferranrecio/moodle into MOODLE_400_STABLE 2022-11-16 16:34:03 +08:00
Jun Pataleta c70361bd9b Merge branch 'MDL-75365-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-11-16 12:38:00 +08:00
David Woloszyn eb9de04a11 MDL-76271 dndupload: Corrected layout when uploading to course via dnd 2022-11-16 11:20:05 +11:00
Víctor Déniz 0c15fe263e Merge branch 'MDL-75781-400' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_400_STABLE 2022-11-15 22:32:02 +00:00
Sara Arjona bd8e040536 Merge branch 'MDL-76039-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-15 17:57:12 +01:00
Ilya Tregubov d652929260 weekly release 4.0.5+ 2022-11-15 18:09:28 +03:00
Paul Holden fc09484ec1 MDL-76310 enrol_lti: fix consumer key upgrade steps for Oracle.
Avoids CLOB comparison exceptions, related to ORA-00932.
2022-11-15 11:50:00 +00:00
Peter Burnett 028dc3ff0a MDL-73804 category: Use system context for category name filtering 2022-11-15 14:48:58 +10:00
Jun Pataleta b1926ad5f2 Merge branch 'MDL-76230-400' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2022-11-15 11:48:46 +08:00
Jun Pataleta 882a63d966 Merge branch 'MDL-76196-400' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2022-11-15 11:06:34 +08:00
Víctor Déniz 707ff5a4f2 Merge branch 'MDL-76229-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-11-14 23:40:59 +00:00
Víctor Déniz a76a02901f Merge branch 'MDL-76192-400' of https://github.com/mihailges/moodle into MOODLE_400_STABLE 2022-11-14 22:35:47 +00:00
Paul Holden bc220f8d72 MDL-75903 output: increase precision of primary active node matching.
Co-authored-by: Mikel Martín <mikel@moodle.com>
2022-11-14 17:31:32 +00:00
Paul Holden 6b412c403b MDL-74780 grade: account for absence of course grade items on import. 2022-11-14 17:30:20 +00:00
Paul Holden cb20f32f46 MDL-75651 mod_feedback: remove duplicated activity heading. 2022-11-14 17:28:56 +00:00
Sara Arjona 7d96732e31 Merge branch '75792-moodle400-fix-grouping-sort-order' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_400_STABLE 2022-11-14 16:07:26 +01:00
Sara Arjona 47d6bbcb9e Merge branch 'MDL-75300-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-14 16:04:11 +01:00
sam marshall 7731cb8127 MDL-76218 cachestore_redis: delete_many can fail with no keys
In some cases, we get an error message such as:

Wrong parameter count for Redis::zRem()

Within the delete_many function. This function requires at least one
key to be supplied, but if delete_many is called with an empty array,
we will call it with no keys.
2022-11-14 14:39:12 +00:00
Paul Holden eb80cbd249 MDL-76039 forms: account for null values in serialize util method.
Co-authored-by: Marina Glancy <marina@moodle.com>
2022-11-14 14:20:40 +00:00
Julien Boulen 43f1e99dac MDL-75792 availability: sort groupings list by name 2022-11-14 13:16:58 +01:00
Huong Nguyen 4fca1452d4 MDL-76230 block_tag_flickr: Change User-agent value for API calls 2022-11-14 09:35:29 +07:00
Huong Nguyen e4af35b9b8 MDL-76230 block_tag_flickr: Extra Behat test for a specific tag 2022-11-14 09:35:29 +07:00
Meirza c2f415e57c MDL-76229 core_form: Show frozen text editor in a more accessible way. 2022-11-12 18:46:42 +07:00
Jun Pataleta fdbcfa1b15 Moodle release 4.0.5 2022-11-12 12:55:21 +08:00
Luca Bösch 872f3a03dc MDL-73078 workshop: align 'Edit subm' 'Delete subm' 'Export this page' 2022-11-11 16:43:36 +01:00
Sara Arjona cda2e48134 weekly release 4.0.4+ 2022-11-11 15:01:48 +01:00
Sara Arjona d3b1e4da07 NOBUG: Fixed file access permissions 2022-11-11 15:01:48 +01:00
Jake Dallimore b1bad4dbbc Merge branch 'MDL-76213-400-fix' of https://github.com/junpataleta/moodle into MOODLE_400_STABLE 2022-11-11 17:38:27 +08:00
David Woloszyn cac3162bf3 MDL-76196 mod_folder: Display manual completion if inline display set 2022-11-11 15:50:06 +07:00
Jun Pataleta 44883e4f32 MDL-76213 mod_assign: Pass correct parameters to override query 2022-11-11 16:12:19 +08:00
Mathew May 6ade6d6060 MDL-71920 libraries: Migrate LTI lib away from pure curl 2022-11-11 12:54:11 +08:00
Mathew May e3ce8c37bd MDL-71920 core: update filelib opt name definition 2022-11-11 12:54:11 +08:00
Adrian Greeve 56a9861094 Merge branch 'MDL-76099-400' of https://github.com/stevandoMoodle/moodle into MOODLE_400_STABLE 2022-11-11 12:24:43 +08:00
Jake Dallimore 6981b82c41 Merge branch 'MDL-75872-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-11 11:45:39 +08:00
Jun Pataleta f5644a9a79 Merge branch 'MDL-76213-400' of https://github.com/Chocolate-lightning/moodle into MOODLE_400_STABLE 2022-11-11 11:34:01 +08:00
Mathew May c110ef6c79 MDL-76213 mod_assign: Improve group override info for teachers 2022-11-11 11:17:03 +08:00
Jun Pataleta 6904a25eb2 Merge branch 'MDL-63037-400' of https://github.com/snake/moodle into MOODLE_400_STABLE 2022-11-11 10:42:19 +08:00
Sara Arjona dee4c975ae Merge branch 'MDL-76253-400' of https://github.com/justusdieckmann/moodle into MOODLE_400_STABLE 2022-11-10 17:17:51 +01:00
Sara Arjona 1c38f5031b Merge branch 'MDL-76070-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-11-10 16:56:50 +01:00
Sara Arjona 188de51d23 Merge branch 'MDL-71951-400' of https://github.com/stevandoMoodle/moodle into MOODLE_400_STABLE 2022-11-10 16:37:30 +01:00
Paul Holden bbdb70f1d2 Merge branch 'MDL-75890-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-11-10 15:30:25 +00:00
Sara Arjona c91ebee573 Merge branch 'MOODLE_400_MDL-75874' of https://github.com/matheusot/moodle into MOODLE_400_STABLE 2022-11-10 16:22:15 +01:00
Sara Arjona a529aac615 Merge branch 'MDL-74606-400-support-multilang-group-names-in-mod_assign' of https://github.com/krostas1983/moodle into MOODLE_400_STABLE 2022-11-10 16:04:39 +01:00
Jun Pataleta 0905aae5c6 Merge branch 'master_MDL-75126-allow-multiple-bulk-action-40' of https://github.com/catalyst/moodle-MDL-72752 into MOODLE_400_STABLE 2022-11-10 22:12:07 +08:00
Matheus Rodrigues 5a4a2e9baa MDL-75874 aiken_html: correctly display HTML chars for Aiken questions
Updates the Aiken Format class to process answers correctly, enabling
support for special HTML characteres such as <, >, and &.

Co-authored-by: Leticia Luz <leticia.adrielli.luz@gmail.com>
2022-11-10 09:59:34 -03:00
Safat Shahin 047d341465 MDL-75126 core_question: Allow multiple bulk action from qbank plugins
This commit implements the bulk action api to allow multiple bulk
actions from the qbank plugins instead of one. Any qbank plugin
wants to implement bulk action can now define an array of bulk
actions as a plugin feature.
2022-11-10 23:42:55 +11:00
Sara Arjona 759a87273f Merge branch 'MDL-75448-MOODLE_400' of https://github.com/golenkovm/moodle into MOODLE_400_STABLE 2022-11-10 13:19:42 +01:00
Paul Holden 6c983fda3c Merge branch 'MDL-68550-400' of https://github.com/rezaies/moodle into MOODLE_400_STABLE 2022-11-10 11:59:55 +00:00
Sara Arjona a08e8032c5 Merge branch 'MDL-75974-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-10 12:51:40 +01:00
Paul Holden fbd321ea90 Merge branch 'MDL-76011-400' of https://github.com/abgreeve/moodle into MOODLE_400_STABLE 2022-11-10 11:49:54 +00:00
Sara Arjona fe3ea2fe53 Merge branch 'MDL-75876-MOODLE_400_STABLE' of https://github.com/praxisdigital/moodle into MOODLE_400_STABLE 2022-11-10 12:47:17 +01:00
Sara Arjona 9d1b79c074 Merge branch 'MDL-76167-400' of https://github.com/davewoloszyn/moodle into MOODLE_400_STABLE 2022-11-10 12:42:19 +01:00
Andrew Nicols eab0470f4f MDL-75365 javascript: Support ES6 in all JS except YUI 2022-11-10 17:04:23 +08:00
Paul Holden a7eab36f96 Merge branch 'MDL-76224-400' of https://github.com/justusdieckmann/moodle into MOODLE_400_STABLE 2022-11-10 08:54:09 +00:00
Paul Holden 3fd54014ae MDL-75862 backup: omit sesskey for continue buttons using get method.
It's automatically added by the rendered single_button instance when
using post method, so no need to add it unconditionally.
2022-11-10 10:17:19 +08:00
Andrew Nicols 87002d24be Merge branch 'MDL-75917-400' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_400_STABLE 2022-11-10 08:48:27 +08:00
Shamim Rezaie c3aba13f79 MDL-68550 tablelib: Use aria-role=button
Use the aria-role=button for:
- show/hide links
- sort links
- reset table preferences link
2022-11-10 06:19:31 +11:00
Shamim Rezaie ba32b852e5 MDL-68550 output: Improve accessibility of the initials bar
- The current item should be focusable otherwise the focus will be lost
  as soon as a user clicks on an item in the initials bar
- Modified behat tests to not mistakenly click on the 'All' link
- The currently selected item is specified by aria-current
- Useed aria-current=true rather than =page because the links of each
  item in the initials bar is missing the pagination information
2022-11-10 06:17:58 +11:00
Shamim Rezaie f4039ba2a9 MDL-68550 output: Improve accessibility of the paging bar
The use of aria-current is based on the example at
https://design-system.w3.org/components/pagination.html
2022-11-10 06:17:58 +11:00
Shamim Rezaie c11f5aa005 MDL-68550 theme: Not showing the gap in the initial bar
The gap issue was a regression from MDL-66670.
2022-11-10 06:17:57 +11:00
Paul Holden c3367700c2 MDL-75872 mod_lesson: allow unlimited attempts default value.
Related change in 252e85be added a similar value per activity, we
should also allow it to be chosen as a default for the site.
2022-11-09 18:54:08 +00:00
Stefan Hanauska 229da267a6 MDL-76258 mod_lti: Reset clientid after restore 2022-11-09 19:33:52 +01:00
Mihail Geshoski a616371921 MDL-76192 mod_glossary: Export all entry aliases to the portfolio 2022-11-10 00:33:03 +08:00
Sara Arjona b680dd8894 Merge branch 'MDL-50935-400-2' of https://github.com/junpataleta/moodle into MOODLE_400_STABLE 2022-11-09 16:01:24 +01:00
Meirza 3259a19a6a MDL-76131 core_user: encode social profile fields data. 2022-11-09 15:49:39 +01:00
Justus Dieckmann 11f8109d4c MDL-76253 calendar: Use activities monologo pix 2022-11-09 15:22:08 +01:00
Jun Pataleta 2172f91656 Merge branch 'MDL-76185-400' of https://github.com/mihailges/moodle into MOODLE_400_STABLE 2022-11-09 21:51:25 +08:00
Jun Pataleta ed7137f7f1 Merge branch 'MDL-76054_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-11-09 20:09:04 +08:00
Sara Arjona de3a8678cd Merge branch 'MDL-75889-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-09 12:36:48 +01:00
Sara Arjona a0af8ccba9 Merge branch 'MDL-76059-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-09 12:31:38 +01:00
David Woloszyn 7eadd4979c MDL-76091 lib: Add additional check to local URLs params 2022-11-09 19:24:27 +08:00
Sara Arjona 63f9d1edc4 Merge branch 'MDL-75766-400' of https://github.com/aanabit/moodle into MOODLE_400_STABLE 2022-11-09 11:57:32 +01:00
Sara Arjona 5231856a76 Merge branch 'MDL-74201-400' of https://github.com/aanabit/moodle into MOODLE_400_STABLE 2022-11-09 11:49:40 +01:00
Víctor Déniz cf86a03796 Merge branch 'MDL-76000-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-09 10:11:38 +00:00
Jun Pataleta 14c5642fa7 Merge branch 'MDL-76170-400' of https://github.com/snake/moodle into MOODLE_400_STABLE 2022-11-09 15:44:27 +08:00
Jake Dallimore 921e34a607 MDL-76099 core_backup: set selected overflow node in restore and copy
These pages sit under the 'restore' and 'copy' menu items respectively
but the selected menu item isn't correct because the 'restore.php' and
'copyprogress.php' page URLs don't match the node action for their
respective 'restore' and 'copy' nodes. Force set the selected node in
each case to resolve this.
2022-11-09 15:22:51 +08:00
Stevani Andolo 7d9ab768a4 MDL-76099 core_navigation: allow setting selected course overflow node
Allow pages to choose which course reuse overflow node is selected, to
handle cases where the default selection (based on matching PAGE->url
to the node action URL) isn't possible (such as when several pages need
to exist under the same selected node).
2022-11-09 15:22:51 +08:00
Jake Dallimore 4938cb25b1 MDL-76170 enrol_lti: fix missing secret in enrol_lti_users
If member sync runs before the user launches the tool, a partial record
is created, without consumer secret. Subsequent launches of the tool by
that member don't resolve this and this results in grade sync failing
for any affected users. This patch:
- data fixes the existing affected rows
- fixes the launch code, ensuring secret is recorded on launch,
irrespective of whether the user info record has been created already
or not.
2022-11-09 10:03:50 +08:00
Simey Lameze a1df353c67 MDL-76058 behat: send message using data generator 2022-11-09 09:52:07 +08:00
Frédéric Massart bb66f7e425 MDL-74201 backup: Restore reference to content bank files 2022-11-08 20:18:30 +01:00
Eloy Lafuente (stronk7) f1a8f0059c MDL-76054 environment: Remove the php-xmlrpc extension check
For Moodle 4.1 and up, the php-xmlrpc is not needed anymore:
- All the MNet stuff has been moved to use php library (MDL-76055).
- The webservice/xmlrpc has been moved from core to contrib (MDL-76052).

So we just remove the check here. Starting with 4.1, it's not
needed for any core functionality.

No lang string changes in this branch, only in master (4.1dev).
2022-11-08 16:45:44 +01:00
Víctor Déniz 543b0e0055 weekly release 4.0.4+ 2022-11-08 13:44:44 +00:00
Ferran Recio bc794a82a2 MDL-76220 mod_wiki: fix extend_navigation
The wiki_extend_navigation is using $PAGE->url when it is not allowed
to. Extending navigation can be invoked in an Ajax request so it should
not use $PAGE global.
2022-11-08 14:41:35 +01:00
hieuvu 497c7ee517 MDL-75781 javascript: Centering when resize for dialog 2022-11-08 18:10:12 +07:00
Jake Dallimore df8a9bdde7 MDL-63037 mnet: fix hostexists string usage 2022-11-08 17:05:06 +08:00
Jake Dallimore 98d5109d91 Merge branch 'MDL-75941-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-08 12:04:29 +08:00
Jun Pataleta 9508492e28 Merge branch 'MDL-76113-400' of https://github.com/snake/moodle into MOODLE_400_STABLE 2022-11-08 12:01:54 +08:00
Jake Dallimore 590bfd9029 Merge branch 'MDL-76071-400' of https://github.com/laurentdavid/moodle into MOODLE_400_STABLE 2022-11-08 11:44:17 +08:00
Jake Dallimore 475784b2b5 Merge branch 'MDL-72882-400-3' of https://github.com/junpataleta/moodle into MOODLE_400_STABLE 2022-11-08 11:32:06 +08:00
Jun Pataleta d77935d8ea Merge branch 'MDL-76207-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-11-08 10:25:35 +08:00
Paul Holden 31889f9b20 MDL-75974 tool_customlang: check out language pack in CLI import. 2022-11-07 22:41:01 +00:00
Paul Holden 7526bfd8b7 MDL-75889 core: compare domain names in a case-insensitive manner.
As per https://www.rfc-editor.org/rfc/rfc1035#section-3.1
2022-11-07 22:37:07 +00:00
Justus Dieckmann f4b822a178 MDL-76224 Resource: Set correct page url in /mod/label/view.php 2022-11-07 18:46:20 +01:00
Andrew Nicols 3886236dae Merge branch 'MDL-75880_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-11-07 21:57:05 +08:00
Andrew Nicols b2b7a091b7 Merge branch 'MDL-73624-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-11-07 21:52:11 +08:00
Andrew Nicols 8858280766 Merge branch 'MDL-75519-400' of https://github.com/marinaglancy/moodle into MOODLE_400_STABLE 2022-11-07 21:41:49 +08:00
Víctor Déniz c95c319fad Merge branch 'm40_MDL-74912_Fix_RegExp_Word_Boundaries_On_MySQL8' of https://github.com/scara/moodle into MOODLE_400_STABLE 2022-11-07 10:20:03 +00:00
Jun Pataleta 1a35908e1f MDL-50935 atto_equation: Add upgrade step to fix existing sites 2022-11-07 15:14:17 +08:00
Jun Pataleta d474d4f3cf MDL-50935 atto_equation: Fix display of matrix template
Thanks to Geoffrey Rowland's fix suggestion.
2022-11-07 15:13:06 +08:00
Andrew Nicols cbc0b075b7 MDL-74468 mod_bigbluebuttonbn: Coding style violation fix 2022-11-07 12:14:21 +08:00
Andrew Nicols 3698429d29 Merge branch 'MDL-74468-400' of https://github.com/call-learning/moodle into MOODLE_400_STABLE 2022-11-07 12:14:17 +08:00
Andrew Nicols 7b18e8ad63 MDL-76207 contentbank: Switch to opened window 2022-11-07 10:03:08 +08:00
Matteo Scaramuccia a052c15e6a MDL-74912 dml: Fix PHP coding style problems 2022-11-05 10:08:13 +01:00
Matteo Scaramuccia 1a84f17a20 MDL-74912 dml: Fix missing nullable marker 2022-11-05 10:08:13 +01:00
Matteo Scaramuccia 8c0d6a1869 MDL-74912 mod_forum: Fix regexp word boundaries markers in MySQL 8 2022-11-05 10:08:13 +01:00
anisa kusumadewi ab42a71563 MDL-75766 core_h5p: Added index for pathnamehash to h5p table 2022-11-04 16:54:38 +01:00
Eloy Lafuente (stronk7) 88f2c9bb45 MDL-75880 phpunit: fix all @coversDefaultClass missing @covers
Because @coversDefaultClass doesn't indicate any coverage (it's
just an alias to avoid having to write the class name in @covers),
this commit fixes all the files that were using that annotation
and missing any @covers.

Basically, replacing one by the other and done.
2022-11-04 16:51:24 +01:00
Víctor Déniz d7e367af90 Merge branch 'MDL-76130-400' of https://github.com/meirzamoodle/moodle into MOODLE_400_STABLE 2022-11-04 15:36:56 +00:00
Sara Arjona 28043b9b2e weekly release 4.0.4+ 2022-11-04 14:51:59 +01:00
Sara Arjona 3f30ad9df0 Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-11-04 14:51:56 +01:00
hieuvu 001fdb5f29 MDL-75917 moodle_page: add a modname to body tag.
This is a backport of MDL-75844
2022-11-04 16:04:02 +07:00
Laurent David 79153d99cd MDL-74468 mod_bigbluebuttonbn: Fix logger count method
* The logger::count_callback_events was confusing and needs clarification
and small refactoring.
2022-11-04 09:38:11 +01:00
Laurent David f75aed1c54 MDL-74468 mod_bigbluebuttonbn: Remove getallheader
* getallheader is only fully compatible with Apache servers. Replace it
with a polyfill.
2022-11-04 09:38:11 +01:00
Shamiso.Jaravaza 4436dd0fea MDL-74468 mod_bigbluebuttonbn: Fix custom completion for BBB
* BBB has specific completion indicator that need to be taken into account
* Fix mock requests so we can send participant id and then attach events to them
* Refactor slightly the broker to split meeting logic from request (decoding)
* Fix update completion state cron
2022-11-04 09:38:11 +01:00
Meirza 296fa4b83d MDL-76130 install: make the button to the center position 2022-11-04 11:23:21 +07:00
Jun Pataleta bbc586af7e Merge branch 'MDL-76103-400' of https://github.com/junpataleta/moodle into MOODLE_400_STABLE 2022-11-04 11:34:36 +08:00
Marina Glancy 1ec11f0761 MDL-76103 search: skip solr behat tests if solr is not installed 2022-11-04 11:22:13 +08:00
Jun Pataleta 61e0c07247 Merge branch 'MDL-76072-400' of https://github.com/lameze/moodle into MOODLE_400_STABLE 2022-11-04 11:13:14 +08:00
Víctor Déniz 8902acf217 Merge branch 'MDL-70071-400' of https://github.com/Chocolate-lightning/moodle into MOODLE_400_STABLE 2022-11-04 11:13:14 +08:00
Sara Arjona 38f0e86110 Merge branch 'MDL-76169-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-11-04 11:13:14 +08:00
Sara Arjona df8978e969 Merge branch 'MDL-75759-400' of https://github.com/junpataleta/moodle into MOODLE_400_STABLE 2022-11-04 11:13:14 +08:00
Andrew Nicols ab6a1b655b Merge branch 'MDL-75904-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-04 11:13:14 +08:00
Andrew Nicols d0c489dab7 Merge branch 'MDL-75784-400' of https://github.com/JBThong/moodle into MOODLE_400_STABLE 2022-11-04 11:13:14 +08:00
AMOS bot 437ce92e1b Automatically generated installer lang files 2022-11-04 00:07:35 +00:00
David Woloszyn 82d7777ca5 MDL-76167 installer: Corrected dockblock param types 2022-11-04 10:46:20 +11:00
Shamiso.Jaravaza 1f2f41a2d9 MDL-75415 mod_bigbluebuttonbn: Fix session times 2022-11-03 11:21:33 -06:00
Mihail Geshoski c37c8fd6fa MDL-76185 mod_glossary: Remove separator in continuous display format 2022-11-03 23:54:09 +08:00
Andrew Nicols 1d8d73c761 MDL-70071 forum: Convert post threshold warnings to info 2022-11-03 15:03:44 +08:00
Jun Pataleta 8ef225eb62 MDL-72882 tool_langimport: Set default language when deleting lang pack
* When the language pack being deleted is
  - the same as the site default language, we must set the site default
    language to 'en'.
  - fix the user's current language to the default site language.
2022-11-03 14:00:11 +08:00
Jun Pataleta 9cca971abc MDL-72882 core: Use default site lang when user lang no longer available
* Check that the lang attribute for the output HTML exists. If not,
use the default site language.
* Also fix the current language for the user.
2022-11-03 14:00:09 +08:00
Andrew Nicols 6509945bcd MDL-76169 question: General behat fixes
Whilst amending these tests I discovered some other minor fixes to be
made.
2022-11-03 13:28:52 +08:00
Andrew Nicols b4a53cba59 MDL-76169 question: Use action menu steps consistently 2022-11-03 13:28:52 +08:00
Andrew Nicols 5e0b235790 MDL-76169 mod_quiz: Add quiz question bank behat resolver 2022-11-03 13:28:52 +08:00
Andrew Nicols e53e25af94 MDL-76169 behat: Normalise exception message in should (not) steps
These steps have accepted a NodeElement instance as an argument for some
time, but were trying to cast it to string when formulating exception
messages, making it harder to debug and, in the case of the 'should see'
step, not work at all.

This patch introduces a new function to produce a consistent naming for
them.
2022-11-03 13:28:52 +08:00
Andrew Nicols 414a99535b MDL-76169 behat: Add improved steps for using action menus
This commit adds new steps related to action menus to support:
* Choosing an item in a named action menu
* Choosing an item in a named action menu within a container
* Confirming that an action menu item does or does not exist in a named
  action menu
* Confirming that an action menu item does or does not exist in a named
  action menu within a container

The existing action menu steps were insufficient as they assume that
there is only one action menu within he container, which is not
necessarily the case.

The existing action menu steps are not non-JS friendly and will error if
JS is disabled, without providing any fallback when one is easily
available.

Unfortunately these steps cannot be used to replace the existing steps
without manual intervention.
2022-11-03 13:28:51 +08:00
Jun Pataleta 1ae08553b7 MDL-75759 courseformat: Link classes in PHPDocs with @see tags
- Linking classes/methods mentioned in PHPDoc with @see tags help devs
checking the PHPDoc to quickly navigate to the class/method mentioned
and also helps us ensure that it points to the correct class/method.
- Some typo/grammar fixes as well in existing PHPDoc descriptions.
- Fixed parameter type in execute()'s PHPDoc block.
2022-11-03 11:58:18 +08:00
Simey Lameze 97c3804ac3 MDL-75759 courseformat: fix documentation of stateupdates tests 2022-11-03 11:58:18 +08:00
Jun Pataleta 55f0f4e0f4 MDL-75759 courseformat: Fix stateactions test
* Require lib/externallib.php in
\core_courseformat\output\local\state\cm::export_for_template()
* Point @coversDefaultClass to the proper class.
2022-11-03 11:58:18 +08:00
Simey Lameze cd642570f1 MDL-76072 tool_lp: only init inlineGrader module if user can grade 2022-11-03 11:42:02 +08:00
Paul Holden 76d6feb23e MDL-75300 mod_h5pactivity: check whether reviewer join matches rows.
Return original capability join if so, to prevent generating invalid
SQL.
2022-11-02 19:25:47 +00:00
Jake Dallimore d7b4dd9a6a MDL-76113 enrol_lti: Fix secret on lti user for LTI 2.0 consumers
Fixes the enrol_lti_users.consumersecret field for LTI 2.0 users.
This field erroneously contained the tool secret and not the consumer
secret needed for service requests when used with LTI 2.0 consumers,
which resulted in complete grade sync failure for LTI 2.0 consumers.
This patch:
- adds an upgrade step to address existing incorrect secrets for LTI
2.0 launched users. It sets these to the correct consumer secret.
- fixes the way the secret is first set during a launch, ensuring
this->consumer->secret is used, which properly captures either the
tool secret (for 1.1 launches) or the consumer secret (for 2.0
launches).
2022-11-02 17:00:49 +08:00
Sara Arjona dc02b1bbb2 Merge branch 'MDL-61880-400' of https://github.com/snake/moodle into MOODLE_400_STABLE 2022-11-02 08:30:14 +01:00
Jun Pataleta 18ce123c4e Merge branch 'MDL-75038-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-02 13:39:21 +08:00
Jun Pataleta 1a61b0bb6c Merge branch 'MDL-75848-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-11-02 13:20:06 +08:00
Jake Dallimore 93318586a5 MDL-61880 tool_oauth2: don't rely on discovery when editing issuers
Adjusts the testing scenarios so that we don't rely on endpoint
discovery being run during an issuer edit, which is no longer the case.
For scenarios that need a userinfo endpoint, set this manually.
2022-11-02 11:12:03 +08:00
Jake Dallimore 177caaa3b5 MDL-61880 core: don't clear issuer fields not present in form data
In cases where we have an id, load the persistent and then set new data
before saving. This ensures we don't delete fields which are missing in
the form data.
2022-11-02 11:12:03 +08:00
Yannick Forget 33b1897e55 MDL-61880 core: Retain OAuth 2.0 user field mappings after issuer update 2022-11-02 11:11:51 +08:00
Paul Holden abebddafc2 MDL-75038 blog: link back to user only when one specified. 2022-11-01 21:26:54 +00:00
Ilya Tregubov dca920d105 weekly release 4.0.4+ 2022-11-01 15:00:01 +03:00
Andrew Nicols 254eb24e80 Merge branch '400-mdl-75010' of https://github.com/danmarsden/moodle into MOODLE_400_STABLE 2022-11-01 11:52:45 +08:00
Jun Pataleta 8552936427 Merge branch 'MDL-76120-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-11-01 09:17:03 +08:00
Sara Arjona f683ec0990 Merge branch 'MDL-75771-MOODLE_400_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_400_STABLE 2022-10-31 13:39:49 +01:00
Jun Pataleta c4b81d09dc Merge branch 'MDL-76108-400' of https://github.com/aanabit/moodle into MOODLE_400_STABLE 2022-10-31 16:49:14 +08:00
Jake Dallimore 8d9ae08d7a Merge branch 'MDL-76041-400' of https://github.com/call-learning/moodle into MOODLE_400_STABLE 2022-10-31 11:44:09 +08:00
Jun Pataleta 889e427df0 Merge branch 'MDL-75358-400' of https://github.com/marinaglancy/moodle into MOODLE_400_STABLE 2022-10-31 10:10:09 +08:00
Dan Marsden 2c99c5fa4d MDL-75010 core: Prevent user last access update on user key login 2022-10-31 14:19:31 +13:00
Víctor Déniz c26e24b613 Merge branch 'MDL-68437-400' of https://github.com/mihailges/moodle into MOODLE_400_STABLE 2022-10-28 18:26:48 +01:00
Amaia Anabitarte 97c52ca3a1 MDL-76108 mod_lesson: improving count call for PHP8.0 2022-10-28 18:17:52 +02:00
Philipp Memmel 42b3b6da8d MDL-75771 core_courseformat: Add behat test for show_editor function 2022-10-28 17:25:52 +02:00
Philipp Memmel 8db30d32f8 MDL-75771 core_courseformat: Fix capability for edit controls
course_format\base:show_editor now by default uses 'moodle/course:manageactivities', but also accepts other capabilities as param
2022-10-28 17:25:29 +02:00
Andrew Nicols b35468292e MDL-76120 behat: Swap click on select option to set field
Recent versions of Marionette do not like to click on the option
element so we must always use the set field option.

Change-Id: I9e1397700db53328d15e049e2f4c565888975079
2022-10-28 21:14:07 +08:00
Sara Arjona 141e369a01 weekly release 4.0.4+ 2022-10-28 14:09:16 +02:00
Meirza 0b8ab0da36 MDL-76070 dataformat_json: Fix data loss in the exported file. 2022-10-28 13:16:04 +07:00
Jake Dallimore 27bbd43730 MDL-68943 assignfeedback_editpdf: fix version numbers 2022-10-28 12:05:21 +08:00
Jake Dallimore 666e68d5dc Merge branch 'MDL-68943-400' of https://github.com/cameron1729/moodle into MOODLE_400_STABLE 2022-10-28 11:49:59 +08:00
Cameron Ball 064b544465 MDL-68943 assignfeedback_editpdf: Upgrade step for stale conversions 2022-10-28 11:25:45 +08:00
Cameron Ball 32094232c7 MDL-68943 assignfeedback_editpdf: Reconvert updated files 2022-10-28 11:25:45 +08:00
Jake Dallimore 27acd15fb4 Merge branch 'MDL-76069-400' of https://github.com/mihailges/moodle into MOODLE_400_STABLE 2022-10-28 09:36:08 +08:00
Sara Arjona a8e813a289 Merge branch 'MDL-76023-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-27 17:03:57 +02:00
Víctor Déniz 789e0a41dc Merge branch 'MDL-75969-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-27 15:44:59 +01:00
Mihail Geshoski 145a0690da MDL-76069 enrol_manual: Fix missing breadcrumbs 2022-10-27 21:57:04 +08:00
Meirza 10ac386fd2 MDL-73624 lib_spout: encode output file name 2022-10-27 16:50:17 +07:00
Adrian Greeve 91bf85846e MDL-76011 lib: Updated the zip writer to retain the modified date. 2022-10-27 15:06:31 +08:00
Meirza aceac725e6 MDL-75890 block_myoverview: Added new wrapper element
Added a new element to wrap filter control in Course Overview,
so it will display well on desktop and mobile.

Co-authored-by: Huong Nguyen (huongnv13@gmail.com)
2022-10-26 16:21:22 +07:00
Thong Bui 744cd41a4d MDL-75784 Forms: Fix issues multi expand all/collapse buttons on a page 2022-10-26 14:05:50 +07:00
Marina Glancy 281fe1161a MDL-75519 reportbuilder: set default sortorder for Users datasource 2022-10-25 11:19:21 +02:00
Jun Pataleta dbb2deed8c weekly release 4.0.4+ 2022-10-25 17:17:09 +08:00
Jun Pataleta 59bcc16e26 Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-10-25 17:17:06 +08:00
Laurent David 9b1a88cbd9 MDL-76071 mod_choice: fix choice display on graphs
* The setting "Display mode" modifies the choices alignment of radio choice button
from horizontally to vertically. It should also display the list of choices in
the graph in the same directions.
2022-10-25 10:42:49 +02:00
Stevani Andolo 1fe377b410 MDL-71951 calendar: Accessbility issue fix 2022-10-25 13:07:16 +08:00
Jake Dallimore 8888b7756f Merge branch 'MDL-75727_400' of https://github.com/timhunt/moodle into MOODLE_400_STABLE 2022-10-25 11:56:24 +08:00
Andrew Nicols 8f2dc4b229 Merge branch 'MDL-76049_400' of https://github.com/timhunt/moodle into MOODLE_400_STABLE 2022-10-25 11:49:46 +08:00
Andrew Nicols f993f02826 Merge branch 'MDL-75763-400' of https://github.com/call-learning/moodle into MOODLE_400_STABLE 2022-10-25 11:11:40 +08:00
Jake Dallimore 84b7fd82b6 Merge branch 'MDL-74315-400' of https://github.com/roland04/moodle into MOODLE_400_STABLE 2022-10-25 11:09:17 +08:00
Víctor Déniz a6448908ed Merge branch 'MDL-75074-m400' of https://github.com/sammarshallou/moodle into MOODLE_400_STABLE 2022-10-24 16:43:19 +01:00
Andrew Nicols 86a3a3d9c0 Merge branch 'MDL-74911-400' of https://github.com/matthewhilton/moodle into MOODLE_400_STABLE 2022-10-24 22:23:03 +08:00
Sara Arjona 2184c2368f Merge branch 'MDL-73030-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-24 15:47:27 +02:00
Sara Arjona 023b30e1bb Merge branch 'MDL-75897-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-24 15:35:36 +02:00
Jun Pataleta b2e715f33d Merge branch 'MDL-75936-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-24 15:58:05 +08:00
Andrew Nicols 34845eaad2 MDL-75936 core_message: Drawer must be ready before firing drawer events
This commit addresses a race condition when showing the message drawer
and opening the settings page from the Message preferences page.

In that situation, the message/edit.php page calls the
message_drawer_helper.showSettings function, which publishes a request
to show the drawer.

In some conditions (notably faster machines, or after MDL-66107) this
event is fired before the message_drawer.init has listened to it.

The solution here is to delay firing of the event until the drawer
announces itself as ready.

This ensures that the event is subscribed to before it is fired.

Change-Id: Id90df6b90f8803e25df0be6260a435c09031cf45
2022-10-24 14:30:32 +08:00
Jun Pataleta 6c8db244c7 Merge branch 'MDL-76018-m400' of https://github.com/sammarshallou/moodle into MOODLE_400_STABLE 2022-10-24 13:16:06 +08:00
Matthew Hilton 1169179385 MDL-74911 assignfeedback_editpdf: unlock session when polling conversion
Polling conversions will run the document conversion immediately if the
conversion has not already been completed.

Releasing the session lock while doing this ensures large conversions
do not unnecessarily hold the users session.
2022-10-24 12:57:33 +10:00
Matthew Hilton c431058d92 MDL-74911 assignfeedback_editpdf: per-assignment conversion poll lock
The lock ensures that multiple conversions do not happen for the same
assignment submission.

Otherwise, subsequent conversions will fail when trying to save the
converted file.
2022-10-24 12:57:31 +10:00
AMOS bot 19c42ef49d Automatically generated installer lang files 2022-10-23 00:08:16 +00:00
Paul Holden ec0c7a2788 MDL-75904 admin: ignore $CFG->allowcategorythemes during installation. 2022-10-21 23:22:28 +01:00
Paul Holden ef34b06efa MDL-76059 forms: graceful early exit for invalid button elements.
Ensure login form tries to capture guest button only if it exists.
2022-10-21 19:36:36 +01:00
Paul Holden 96f8c0a106 MDL-75848 editor_atto: fix console error when clicking toolbar menu. 2022-10-21 19:19:16 +01:00
Sara Arjona bf0bf4be24 Merge branch 'MDL-72828-400' of https://github.com/davewoloszyn/moodle into MOODLE_400_STABLE 2022-10-21 16:24:47 +02:00
Ilya Tregubov 9d7609f39c weekly release 4.0.4+ 2022-10-21 15:33:49 +03:00
David Woloszyn 90553e9f6e MDL-72828 js: get_strings supports jquery objects 2022-10-21 15:02:33 +11:00
Tim Hunt 06f1241f24 MDL-76049 quiz generator: update calendar events for new overrides 2022-10-20 23:45:32 +01:00
Anupama Sarjoshi 432628f3a3 MDL-75380 customfields: Fix incorrect links sent when enrolling users 2022-10-20 18:50:16 +01:00
Sara Arjona 92ef33c4e0 Merge branch 'MDL-75791-400' of https://github.com/marinaglancy/moodle into MOODLE_400_STABLE 2022-10-20 16:36:54 +02:00
Ilya Tregubov 20288fee39 Merge branch 'MDL-72058-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-20 15:42:48 +03:00
Paul Holden 50568e9382 MDL-75897 output: safer checking of course reuse action nodes.
Also ensure that if course reuse contains only a single node (e.g.
reset), then it is still accessible from secondary navigation.

Co-authored-by: Meirza Arson <meirza.arson@moodle.com>
2022-10-20 11:08:32 +01:00
Víctor Déniz a8444275b1 Merge branch 'MDL-75907-400' of https://github.com/golenkovm/moodle into MOODLE_400_STABLE 2022-10-20 10:46:35 +01:00
Jun Pataleta 2875fb574a Merge branch 'MDL-75497-400' of https://github.com/raortegar/moodle into MOODLE_400_STABLE 2022-10-20 17:29:04 +08:00
Jun Pataleta e519e93871 Merge branch 'MDL-75599-400' of https://github.com/laurentdavid/moodle into MOODLE_400_STABLE 2022-10-20 17:26:02 +08:00
raortegar f39af49969 MDL-75497 mod_data: Review Check existence of field.class.php 2022-10-20 10:01:14 +02:00
Andrew Nicols 44518ff64d Merge branch 'MDL-75834-m400' of https://github.com/sammarshallou/moodle into MOODLE_400_STABLE 2022-10-20 14:37:49 +08:00
Jun Pataleta 952079533c Merge branch 'MDL-59458-400' of https://github.com/laurentdavid/moodle into MOODLE_400_STABLE 2022-10-20 13:08:50 +08:00
Laurent David 7af2bad4e2 MDL-75599 mod_data: Fix warning message
* Fix warning message when accessing advanced search page with a date field.
2022-10-20 06:53:07 +02:00
Víctor Déniz 9416a1a399 Merge branch 'MDL-75962-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-20 00:44:49 +01:00
Paul Holden f006c73a17 MDL-75941 theme_boost: don't auto grow breadcrumb items.
On mobile/small breakpoint, display breadcrumb items without
excess whitespace.
2022-10-19 21:57:00 +01:00
Paul Holden 7d883400d9 MDL-76000 theme_boost: reset form padding when in tertiary navigation. 2022-10-19 21:06:14 +01:00
Laurent David c0d17ca8ba MDL-76041 mod_bigbluebuttonbn: Exception on Recording only page
* This fixes a the parameter provided to the get_recordings method of recording class
2022-10-19 21:18:53 +02:00
Paul Holden 4d9b3c9839 MDL-76023 course: fix access to custom data in notification task.
The message class `customdata` property is automatically JSON encoded
via magic setter method, so we can't append to it directly.
2022-10-19 18:52:35 +01:00
Jun Pataleta 984057c7cd Merge branch 'MDL-75985-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-19 21:27:48 +08:00
Andrew Nicols 825f039968 MDL-75985 behat: Return newline character for \n
Somehow part of this commit was lost during the push and/or squash.
2022-10-19 20:27:13 +08:00
Sara Arjona d1a16f5f4a Merge branch 'MDL-76020-400' of https://github.com/mickhawkins/moodle into MOODLE_400_STABLE 2022-10-19 13:01:04 +02:00
Sara Arjona f00b1a838e Merge branch 'MDL-76010_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-10-19 12:56:25 +02:00
Michael Hawkins baba4d8cc2 MDL-76020 theme: Add missing support links to footer in Classic theme
The "Services and support" and "Contact site support" links were
missing from the footer in the Classic theme (which now has its own
footer template), so there was no way to navigate to the relevant links.
2022-10-19 17:52:54 +08:00
Jun Pataleta eb4b144e13 Merge branch 'MDL-75645_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-10-19 15:37:26 +08:00
Ilya Tregubov d20501ecf2 Merge branch 'MDL-74654-400' of https://github.com/ssj365/moodle into MOODLE_400_STABLE 2022-10-19 09:23:34 +03:00
Jun Pataleta 36afea55eb Merge branch 'MDL-75985-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-19 10:55:52 +08:00
Shamiso.Jaravaza afd07d1e42 MDL-74654 mod_bigbluebuttonbn: Add role parameter 2022-10-18 08:23:54 -06:00
Mikel Martín 320d99378c MDL-74315 reportbuilder: Fix report filters hidden under top navbar
- Add scrolling to big filter containers to avoid them to be hidden under header
- Remove custom reportbuilder scrollbar mixin and replace it with 'thin-scrolls'
  standard mixin
2022-10-18 15:34:02 +02:00
Eloy Lafuente (stronk7) 06f4976cab MDL-75645 mnet: Stop caching OpenSSLAsymmetricKey keys
The mnet_environment->keypair array contains the following
elements (and more, just focussing on these):
- keypair_PEM : textual representation of the private key.
- certificate : textual representation of the public key.
- privatekey  : OpenSSLAsymmetricKey representation of the private key,
                generated from keypair_PEM. See get_private_key().
- publickey   : OpenSSLAsymmetricKey representation if the public key,
                generated from certificate. See get_public_key().

The last 2 elements in the array are only used as "caching", to avoid
having to call to openssl_pkey_get_private() and
openssl_pkey_get_public() to convert from the textual representation
to the OpenSSLAsymmetricKey representation that is the one required
by a number of openssl functions.

Problems arrive when, as part of the MNet protocol, the mnet_environment
is serialised, because, since PHP 8.0 those OpenSSLAsymmetricKey objects
aren't serialisable any more.

So, as far as they are only used for internal caching it's perfectly ok
to remove the caching bits and use the openssl_pkey_get_xxx() methods
to calculate them under demand.

The alternative to this would be to implement into the mnet_environment
some custom serialisation, skipping those OpenSSLAsymmetricKey
instances, using __sleep(), the Serializabla interface or __serialize(),
but that seems unnecessary because, as explained above, the uses are
really limited and easily replaceable.

That's what this patch does.
2022-10-18 14:30:56 +02:00
Eloy Lafuente (stronk7) 0bf0f82444 MDL-76010 behat: New scenario to verify that manual attempts work
This is basically the manual background that was removed in the
previous commit, with 4 attempts here. Note it includes the 2
waits that are REQUIRED to make it pass in too-quick environments.

If they are removed, they begin to fail because it seems that
the attempts need a minimum of separation between them.
2022-10-18 14:27:59 +02:00
Eloy Lafuente (stronk7) 7b9adf44bf MDL-76010 behat: Move feature to use attempts generator
This moves away from manual attempts and uses the activity
attempts generator instead. Quicker and not exposed to the
problems with clicks, refreshes and missing attempts.

Note that there is a small change in the attempt generator
so, now, when a new attempt is created, if the activity has
tracking enabled, the final result / grades are recalculated.

That's the real behaviour when the activity settings are
changes in the edition form and it's natural to get them
recalculated without having to visit the form. Specifically,
this allows the 1st scenario to pass, because in that scenario
no changes to the form are being performed.

Also, little detail, amend a dupe scenario name.
2022-10-18 14:27:59 +02:00
Sara Arjona 3d2710653e weekly release 4.0.4+ 2022-10-18 13:09:54 +02:00
Ilya Tregubov 6dba57ee81 Merge branch 'MDL-75173-400-fix' of https://github.com/sarjona/moodle into MOODLE_400_STABLE 2022-10-18 10:18:11 +03:00
Sara Arjona ecc896f4b4 MDL-75173 completion: Remove ordering from PHPUnit
To avoid getting some random errors with Oracle, the order for the
students have been removed from the tests (to check they are there,
regardless the order they are returned, because in that case, the
order is not important).
2022-10-18 08:37:57 +02:00
Jun Pataleta 616e01911e Merge branch 'MDL-75783-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-18 10:06:40 +08:00
Andrew Nicols 524d855f6b MDL-75783 javascript: Add optional jsconfig configuration
This commit adds a new Grunt task which generates a jsconfig.json file.

This file is described at
https://code.visualstudio.com/docs/languages/jsconfig and can be used
to configure vscode and other similar editors to understand our module
loading.

This task is an optional task for Grunt and can be run with:

    npx grunt jsconfig

The file is git-ignored and will not affect normal usage.
2022-10-18 09:33:04 +08:00
Víctor Déniz 0d855827c7 Merge branch 'MDL-75983_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-10-18 01:07:54 +01:00
sam marshall 1d9d855172 MDL-76018 core_navigation: Activity header warning if no module intro 2022-10-17 17:28:36 +01:00
Sara Arjona 1cb527de1c Merge branch 'MDL-75711-400' of https://github.com/ssj365/moodle into MOODLE_400_STABLE 2022-10-17 16:55:59 +02:00
Sara Arjona df5626b1a3 Merge branch 'MDL-72836-400' of https://github.com/mickhawkins/moodle into MOODLE_400_STABLE 2022-10-17 16:39:53 +02:00
Sara Arjona 27c2863777 Merge branch 'MDL-75077-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-17 16:32:40 +02:00
Sara Arjona b169ba0121 Merge branch 'MDL-74814-400-1' of https://github.com/HuongNV13/moodle into MOODLE_400_STABLE 2022-10-17 15:30:53 +02:00
Sara Arjona c317ee7de0 Merge branch 'MDL-75173-400' of https://github.com/ilyatregubov/moodle into MOODLE_400_STABLE 2022-10-17 15:18:03 +02:00
Jun Pataleta 3f7c4d65e9 Merge branch 'MDL-74958-m400' of https://github.com/sammarshallou/moodle into MOODLE_400_STABLE 2022-10-17 21:10:45 +08:00
sam marshall e49bd4e798 MDL-74958 core_navigation: Add renamed classes to renamedclasses.php
The renamed secondary navigation classes have been adeed to
renamedclasses.php files.
2022-10-17 10:56:15 +01:00
sam marshall e555d057e9 MDL-74958 core_navigation: Secondary nav in plugins, change namespace
This is a backport of MDL-74733.

Secondary nav previously had to be in my_plugin\local\views\secondary;
this location continues to work but will be deprecated in 4.1. The new
location is my_plugin\navigation\views\secondary.
2022-10-17 10:55:41 +01:00
Huong Nguyen c5c13aa9ae MDL-74814 forms: Fix accessibility issue in edit profile page
- Fixed legend tag issue
 - Modified the passwordunmask Javascript hide/unhide the password field by CSS class
2022-10-17 15:51:54 +07:00
Andrew Nicols b01fee2008 MDL-75969 behat: Allow the editor field to request a save
Some editors do not immediately store their content to the textarea they
represent and only do so when the form is submitted or they are
requested to.

This change adds to the existing API to allow an (optional)
`store_current_value` function to be defined for the editor type so that
it can use the JavaScript API to persist any current content to the
editor.
2022-10-14 23:46:25 +08:00
Andrew Nicols 3418b4d61c MDL-75985 behat: Standardise HTML output when comparing editor content
This commit adds a standardise_html function and updates the matches
function to compare normalised content.

This allows for a wider variety of valid editor output to be handled
using the standard value matching steps in Behat, thus supporting
editors other than Atto better.
2022-10-14 23:44:11 +08:00
Víctor Déniz dfd9b50595 Merge branch 'MDL-75736-m400' of https://github.com/sammarshallou/moodle into MOODLE_400_STABLE 2022-10-14 16:10:43 +01:00
Shamiso.Jaravaza ebc4a00bca MDL-74558 mod_bigbluebuttonbn: Fix deletion error 2022-10-14 08:58:28 -06:00
Eloy Lafuente (stronk7) 5b60a837d1 MDL-75983 gha: Update used actions to be node16 compatible
Node12 is being deprecated in github for actions:

https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/

So we need to ensure we are using node16 actions.
2022-10-14 13:27:26 +02:00
Sara Arjona 00ad2a14da weekly release 4.0.4+ 2022-10-14 12:49:18 +02:00
Sara Arjona 764d2cd510 Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-10-14 12:49:15 +02:00
Ilya Tregubov ddb0f7dc92 MDL-75173 core_completion: More unit tests and Behat. 2022-10-14 11:47:50 +03:00
Ilya Tregubov 59303de673 MDL-75173 core_completion: Fixes after review.
Unit tests added. Used new steps in Behat. Code style fix for long line.
2022-10-14 11:47:50 +03:00
Ilya Tregubov 1a7d05eca7 MDL-75173 core_completion: Fix completion for different settings. 2022-10-14 11:47:50 +03:00
Ilya Tregubov 289d5f3faa MDL-75173 core_completion: Inconsistent status check.
There is inconsistent status check for course completion block and
completion details page. Completion block was taking to account
pending statuses for completion criteria while completion details
page was ignoring those.
2022-10-14 11:47:50 +03:00
Ilya Tregubov aa34b109a4 MDL-75173 behat: Fix broken test.
Test was testing failing state when student didn't receive passing
grade. But it was expecting that completion criteria is completed
which was wrong.
2022-10-14 11:47:50 +03:00
Ilya Tregubov c4cd3a61c8 MDL-75173 core_completion: Fix course completion criteria marking.
SQL was fetching activities where completion state was 'completed,
but not passed reqyured grade'. For course completion such states
must be ignored.

Also fixed progress bar on my courses page. Same reasoning as above.
2022-10-14 11:47:49 +03:00
AMOS bot f4e4bfd3da Automatically generated installer lang files 2022-10-14 00:07:36 +00:00
Víctor Déniz 3cd5cbd327 Merge branch 'MDL-74789-400' of https://github.com/lucaboesch/moodle into MOODLE_400_STABLE 2022-10-13 21:32:19 +01:00
Jun Pataleta 6d805b7774 Merge branch 'MDL-74887-MOODLE_400_STABLE' of https://github.com/sh-csg/moodle into MOODLE_400_STABLE 2022-10-14 00:29:24 +08:00
Paul Holden 38c8f8be7d MDL-75811 reportbuilder: concatenate using list seperator lang config. 2022-10-13 16:26:18 +02:00
Sara Arjona 180048ad9e Merge branch 'MDL-75959-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-13 16:03:37 +02:00
Simey Lameze df1f4b8178 MDL-75984 admin_presets: split test into smaller ones 2022-10-13 15:55:26 +02:00
Ilya Tregubov d5e6b7e7eb Merge branch 'MDL-75970-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-13 14:08:56 +03:00
Stefan Hanauska c9bd3a20b6 MDL-74887 mod_label: Update visibility 2022-10-13 12:42:26 +02:00
Shamim Rezaie a85d347227 Merge branch 'MDL-75642-400' of https://github.com/BruceGoodGuy/moodle into MOODLE_400_STABLE 2022-10-13 16:28:52 +11:00
Tim Hunt b4ed5e95b5 MDL-75727 question regrading: fix each attempt builds on last
This fixes a regression caused by MDL-74752. If you regraded
a subsequent quiz attempt in a quiz using the 'Each attempt
builds on last' option, then the student's response could get lost.
2022-10-12 11:11:18 +01:00
Paul Holden 2700c84d7e MDL-75970 tool_customlang: clarify CLI export target/filename. 2022-10-12 10:16:31 +01:00
Andrew Nicols 24953e5d46 MDL-75962 js: Fix jsdoc violations 2022-10-12 10:07:45 +08:00
Jun Pataleta a2487cbe55 Merge branch 'MDL-75431_400' of https://github.com/AnupamaSarjoshi/moodle into MOODLE_400_STABLE 2022-10-12 09:39:14 +08:00
Jun Pataleta d88a746ec5 Merge branch 'MDL-75887-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-12 09:23:01 +08:00
Simey Lameze 8e5396a6b1 MDL-75887 behat: Add ability to set value regardless of the editor
Prior to this commit, the behat_form_editor integration was hard-coded
to use Atto.

This change allows other editors to be used to set editor values, and
breaks that hard bond. Following this change, any editor is able to
define a behat_editor_[name].php file defining a function which meets
the following signature:

  set_editor_value(string $editorid, string $value): void

Each editor is responsible for checking whether its own API is available
and calling any relevant functions to force the editor to set the
content.

Please note: Behat is unable to determine the current editor in use on
the page automatically.
2022-10-12 06:44:30 +08:00
Andrew Nicols e2ea6b2a8a MDL-75959 customfield: Correct inappropriate class import
I suspect this was an incorrect tab completion import by an IDE which
was missed.
2022-10-12 06:40:33 +08:00
sam marshall a7d47d7813 MDL-75736 lib: Course cache can be rebuilt unnecessarily
This change puts back the behaviour that get_fast_modinfo will accept
a cached version of modinfo that is newer than expected (according to
the course cacherev).

Not accepting newer versions can lead to poor performance in cases
where multiple requests take place at once, or using a clustered
database.
2022-10-11 16:59:59 +01:00
Jun Pataleta 3af0824487 weekly release 4.0.4+ 2022-10-11 23:16:36 +08:00
Jun Pataleta 9872e6f74f Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-10-11 23:16:34 +08:00
AMOS bot 5368babac0 Automatically generated installer lang files 2022-10-11 00:07:33 +00:00
Andrew Madden 3a60aec87d MDL-75635 quizaccess_seb: Implement Safe Exam Browser JS API
This is a backport of MDL-72188

* Replaces checking header for SEB config keys to assess quiz access.
* Adds new web service accessible via Ajax
* Forces the use of the new API where available
* Stores access in Moodle SESSION for quiz instead of checking every
page.
2022-10-11 08:33:30 +11:00
Alex Morris 7ee9daa15e MDL-73620 mod_forum: Fix issue with discussion permission check
Users with access to some groups but not all would receive an error
page when creating a discussion topic that was set to send to all
groups
2022-10-11 08:29:42 +13:00
sam marshall d450c5931b MDL-75834 lib: Focus lock JS bug when focus area removed 2022-10-10 16:35:21 +01:00
Sara Arjona 74a5ef1332 Merge branch 'MDL-75656-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-10 16:16:26 +02:00
Anupama Sarjoshi 689a57fa74 MDL-75431 qbank: fix tests with CodeRunner installed 2022-10-10 12:57:52 +01:00
Jun Pataleta 3d32032451 Merge branch 'MDL-75923-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-10 18:24:29 +08:00
Jun Pataleta eee7623eb8 Merge branch 'MDL-75909-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-10 18:08:20 +08:00
Jun Pataleta 30dbafdcdf Merge branch 'MDL-75922-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-10 14:55:26 +08:00
Jun Pataleta 169cb76c9e Merge branch 'MDL-75910-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-10 11:07:15 +08:00
Simey Lameze 7edd9db682 MDL-75923 tool_usertours: Update tour content to match formatted content
When an HTML content area contains invalid HTML, some editors will clean
and validate the content upon submission.

In this case the content was:

    <b>Test content</b>

But this should be wrapped in some form of container which accepts
phrasing content (such as a <p> tag).

Some editors, such as TinyMCE, will normalise the content and add the
wrapping paragraph tags to it.

Furthermore, the bold tag is purely stylistic and does not have semantic
meaning. As a result, the <strong> tag is favoured and some editors,
again such as TinyMCE, will replace bold tags with strong tags.

We should update the content here to be valid HTML (wrap the bold tag
in a para), and use a strong tag rather than bold. This allows this test
to pass both with Atto, and other stricter editors such as TinyMCE 6.
2022-10-10 09:13:41 +08:00
Simey Lameze 583b3e5b3f MDL-75922 behat: Apply @editor_atto tag to tests requiring Atto
These steps are currently using Atto-specific UI features and must
therefore make use of the @editor_atto tag to ensure that they continue
to run using Atto.

A new issue will be raised to migrate each of these to be
editor-agnostic.
2022-10-09 20:26:58 +08:00
Andrew Nicols 45ea8119c6 Merge branch 'MDL-61395-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-09 13:13:16 +08:00
Justus Dieckmann f98da613d6 MDL-75567 core_course: Other hidden badges remain when adding new one 2022-10-08 23:05:38 +02:00
Stefan Hanauska 56cc6bf703 MDL-74887 course: Hide stealth mode without view page 2022-10-08 08:09:38 +02:00
AMOS bot 9cd9153777 Automatically generated installer lang files 2022-10-08 00:07:33 +00:00
Luca Bösch 60c61a832a MDL-74789 course: category full width 2022-10-07 09:25:55 +02:00
Michael Hawkins 8430dc556f MDL-72836 core: Updated security.txt expiry and policy URL 2022-10-07 14:12:05 +08:00
Mikhail Golenkov e9b68a5f13 MDL-75907 core: Add index on temp table to optimise stats cron 2022-10-07 16:18:13 +11:00
Andrew Nicols b4493c2a16 weekly release 4.0.4+ 2022-10-07 13:03:55 +08:00
Andrew Nicols e51085274a Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-10-07 13:03:53 +08:00
Khoa Nguyen Dang 3a886db065 MDL-75642 quiz: Delete multiple (random) questions from quiz 2022-10-07 11:04:02 +07:00
AMOS bot 816e396380 Automatically generated installer lang files 2022-10-07 00:07:39 +00:00
Simey Lameze fc40e74d15 MDL-75910 core_form: Allow editor field to set a hidden label
When an editor is used in a form as part of a group, it is missing its
label element.

This happens because there is no inline template for the editor, and
therefore it reverts to using the old `toHtml` function. The legacy
function does not cater to the editor being in a group, and therefore
does not add the hidden label.

In addition, the hiddenLabel attribute was missing from the editor
element. This is a semi-standard element but must be added to each
supporting element.

Both the missing inline template for the editor, and the hidden label
attribute must be present:
- If the hidden label attribute is not present, then the standard inline
  template will add a visible label within the group.
- If the inline editor template is missing, then the label is not shown
  at all.
2022-10-06 22:54:05 +08:00
Andrew Nicols dc27423087 MDL-75909 mod_data: Make template editor use html editor
When the template editor is configured to use the HTML Editor, it should
indicate this to Behat by setting the `data-fieldtype` to "editor".

This indicates to the behat field manager that the editor is in use,
which ensures that the correct value setting can take place.

This is important in the context of MDL-75887.
2022-10-06 21:48:25 +08:00
Andrew Nicols d62139e86b MDL-71686 core_form: Include missing build 2022-10-06 14:44:17 +08:00
Andrew Nicols fa0dd0abab MDL-71686 core_form: Move form serializer to shared function 2022-10-06 10:21:24 +08:00
Andrew Nicols 5d6424de33 Merge branch 'MDL-71686-400' of https://github.com/marinaglancy/moodle into MOODLE_400_STABLE 2022-10-06 10:21:20 +08:00
Shamim Rezaie 3a70d7e816 Merge branch 'MDL-75886-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-10-06 12:24:24 +11:00
Andrew Nicols b3f611a14e MDL-75752 question: Bind contextid param in comment backup
In source_sql, unmapped values must be bound using the
backup_helper::is_sql_param() function.
2022-10-06 09:07:42 +08:00
Andrew Nicols e3b8864cc4 Merge branch 'MDL-75752_400' of https://github.com/timhunt/moodle into MOODLE_400_STABLE 2022-10-06 09:07:31 +08:00
Víctor Déniz 7c46149ec5 Merge branch 'MDL-74569-400' of https://github.com/lucaboesch/moodle into MOODLE_400_STABLE 2022-10-06 01:44:07 +01:00
Víctor Déniz 3276137f1a Merge branch 'MDL-75192-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-06 01:08:57 +01:00
Víctor Déniz 1eaf570ea7 Merge branch 'MDL-75729-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-10-05 22:07:56 +01:00
Paul Holden 3afbd2a0ad MDL-75077 output: prevent duplicate ID errors in custom menus.
Following on from 8e4a7c6b, we should apply a similar change to
custom menus to account for being collapsed into the "More" menu.
2022-10-05 18:30:08 +01:00
Thorsten Siegmund Bartel 02e99e4a4d MDL-74606 mod_assign: Support multilanguage strings in group names. 2022-10-05 12:54:09 +02:00
Pablo Amaya 0c2b15935c MDL-74454 mod_scorm: Fixed problems in lateral navigation.
Fixed problems in lateral navigation and grading when
a SCORM has more than three levels

The SCORM module has problems with full screen display,
completion tracking and grading in SCORM.

Also resolves issues MDL-74992, MDL-73249, MDL-75407
2022-10-05 12:44:14 +02:00
Andrew Nicols 80799bfec1 MDL-75886 atto: Always use Atto for @atto tests
This change, which should be easy to mimic for other editors.

This will ensure that the correct editor is used for tests relating to
that editor, or its subplugins.
2022-10-05 09:54:48 +08:00
Jun Pataleta 4d9a42c7d8 Merge branch 'MDL-75351_400' of https://github.com/timhunt/moodle into MOODLE_400_STABLE 2022-10-04 20:36:10 +08:00
Jun Pataleta 3eba3dc263 Merge branch 'MDL-66955-m400' of https://github.com/NeillM/moodle into MOODLE_400_STABLE 2022-10-04 16:36:34 +08:00
AMOS bot 95c0628b61 Automatically generated installer lang files 2022-10-04 00:07:36 +00:00
Shamiso.Jaravaza 5ee9422b3d MDL-75711 mod_bigbluebuttonbn: Fix recent activity 2022-10-03 11:03:42 -06:00
Frederik Milling Pytlick df530a7012 MDL-75876 core_calendar: Add raise_memory_limit call to export_execute
Added a call to raise_memory_limit in /calendar/export_execute.php as it can be very memory intensive.
2022-10-03 12:47:14 +02:00
sam marshall 0a5b0201b4 MDL-75074 core_courseformat: Output classes are not inherited
If you have one course format that extends another one, any course
format output classes that are not defined in the child format will
now inherit from the parent (instead of from the base class as
before).
2022-10-03 11:22:05 +01:00
Paul Holden 320d38bb49 MDL-73030 backup: case-insensitive detection of Moodle backups. 2022-10-03 09:32:11 +01:00
Paul Holden 21478a1e5e MDL-72058 reportbuilder: replace custom dataformat export format.
The formatting of exported dataformat content is now always dependent
on whether the format supports HTML or not, so we no longer need our
custom export class for providing the same.
2022-10-03 09:15:58 +01:00
Paul Holden e69c09d756 MDL-72058 dataformat: remove HTML when export format lacks support. 2022-10-03 09:15:58 +01:00
Andrew Nicols aba165140b Merge branch 'MDL-75836_400' of https://github.com/jrchamp/moodle into MOODLE_400_STABLE 2022-10-02 21:44:21 +08:00
Tim Hunt 9cd481431b MDL-75351 question comments: don't hard-code system context id 2022-09-30 18:46:43 +02:00
Andrew Nicols 5de4468345 MDL-75614 dml: Unit tests must test something 2022-09-30 16:38:12 +08:00
Andrew Nicols 632bbfafe1 Merge branch 'MDL-75614-debugsqltrace-MOODLE_400_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_400_STABLE 2022-09-30 16:38:08 +08:00
Neill Magill 152d919261 MDL-66955 messages: Improve speed of message search
The OR conditions in the WHERE clause prevented the query from
effectively filtering the messages related to the user quickly, this
change helps gets around this by allowing the database to limit
the rows in the messages table it needs to scan significantly.
2022-09-30 08:30:05 +01:00
Luca Bösch 81f390069d MDL-74569 theme_boost: remove unit from top: 0; 2022-09-30 08:38:47 +02:00
Mihail Geshoski ca77344ead MDL-68437 forum: Support to show only active course users in grader
The following change adds support to show only active course users
in the forum grader and generally replicates the behaviour from the
assignment grader which relies on certain config settings, user
permissions and capabilities.
2022-09-30 12:02:08 +08:00
Mihail Geshoski 7e0b0bc14b MDL-68437 course: ws support to optionally fetch only active users
Modifies the 'core_course_get_enrolled_users_by_cmid' webservice and
the generic js methods that call this webservice and enables defining
whether the ws should only return the active users or all enrolled
users in the course.
2022-09-30 12:02:08 +08:00
Jake Dallimore cdd954430f weekly release 4.0.4+ 2022-09-30 10:17:34 +08:00
Tim Hunt 6ddf63486d MDL-75752 question comments: fix backup query so it uses the index
This should greatly improve the performance.
2022-09-29 11:38:36 +02:00
Andrew Nicols 21e1d60833 Merge branch 'MDL-74922_MOODLE_400_STABLE_fix_storage_wrapper_validate_cache' of https://github.com/gthomas2/moodle into MOODLE_400_STABLE 2022-09-29 12:06:28 +08:00
Andrew Nicols d7f8f844bd Merge branch 'MDL-75721-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-09-29 11:57:27 +08:00
Jun Pataleta 643d5ec406 Merge branch 'MDL-75782-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-09-29 11:54:04 +08:00
Andrew Nicols 5ce0f28de8 Merge branch 'MDL-75738-m400' of https://github.com/sammarshallou/moodle into MOODLE_400_STABLE 2022-09-29 11:40:06 +08:00
Jun Pataleta 3304dec7c5 Merge branch 'MDL-75559-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-09-29 10:54:11 +08:00
Jun Pataleta f1e67ccfa3 Merge branch 'MDL-66902_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-09-28 23:15:42 +08:00
Andrew Nicols 9ff194ffba Merge branch 'MDL-75459-400' of https://github.com/davewoloszyn/moodle into MOODLE_400_STABLE 2022-09-28 22:47:51 +08:00
Paul Holden 6f5fc5f1ee MDL-75192 reportbuilder: observe start day in current week filter.
Ensure we observe the site configuration/preference for calendar
first day of the week, in the current week date filter.
2022-09-28 13:37:01 +01:00
Jun Pataleta df56d5659d Merge branch 'MDL-75827-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-09-28 20:36:05 +08:00
Jake Dallimore 4938cbd0af Merge branch '40_mdl75668' of https://github.com/danmarsden/moodle into MOODLE_400_STABLE 2022-09-28 16:35:54 +08:00
Andrew Nicols e6983a7a09 Merge branch 'MDL-75447-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-09-28 12:43:27 +08:00
Jun Pataleta ffac7011b3 Merge branch 'MDL-72490-m400' of https://github.com/sammarshallou/moodle into MOODLE_400_STABLE 2022-09-28 11:55:16 +08:00
Jun Pataleta d59e83c423 Merge branch 'MDL-75726_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-09-28 08:12:03 +08:00
Jun Pataleta 2d337c94eb Merge branch 'MDL-75776_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-09-28 08:06:50 +08:00
Jonathan Champ 1dc488e333 MDL-75836 activities: preserve moodleform validation errors 2022-09-27 14:24:05 -04:00
Andrew Nicols 54f90e39a1 Merge branch 'MDL-75168-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-09-27 23:42:25 +08:00
Paul Holden e46420e57e MDL-75168 tag: cleanup module tag instances upon course deletion. 2022-09-27 14:10:57 +01:00
Jun Pataleta 409fb784db Merge branch 'MDL-75800-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-09-27 20:20:00 +08:00
Andrew Nicols 00d62550c6 Merge branch 'MDL-27570_400' of https://github.com/timhunt/moodle into MOODLE_400_STABLE 2022-09-27 17:02:13 +08:00
Jun Pataleta 3d08e501fe Merge branch 'MDL-71531-400' of https://github.com/andrewnicols/moodle into MOODLE_400_STABLE 2022-09-27 16:29:10 +08:00
Andrew Nicols f215a8b9cc Merge branch 'MDL-75460-400' of https://github.com/ssj365/moodle into MOODLE_400_STABLE 2022-09-27 13:03:43 +08:00
Andrew Nicols acc1354295 MDL-75744 qtype_gapselect: Remove unnecessary javascript tag 2022-09-27 12:45:57 +08:00
Andrew Nicols 9af9a0da85 Merge branch 'MDL-75744-400' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_400_STABLE 2022-09-27 12:37:55 +08:00
Paul Holden 789e3f42c0 MDL-75827 theme_boost: append table elements to popover whitelist.
This allows for their use within popover tooltips, such as those
used for showing help icon dialogues.
2022-09-26 16:00:10 +01:00
Eloy Lafuente (stronk7) d24f96a248 MDL-66902 tests: Fix all incorrect namespaces
This issue just goes over all the currently incorrect
namespaces in test cases and:

1. Change the namespace to the correct one.
2. Move/rename it to correct location if needed (level 2 and down).
3. Remove not needed MOODLE_INTERNAL check when possible.
4. Remove file phpdoc when the file only has one class.
5. Make small adjustments in case the change of namespace requires it.
2022-09-26 14:30:41 +02:00
sam marshall 76c7206927 MDL-75738 tool_moodlenet: Upgrade clean user profile slow, pointless
There is an upgrade to clean the moodlenetprofile field which
performs very poorly, but it is also not needed because an upgrade
further down sets this field to empty string anyway.
2022-09-26 11:25:50 +01:00
Hien Dinh b82b0f6ce5 MDL-72490 availability: Show error if conflict in date restriction 2022-09-26 11:20:51 +01:00
Paul Holden 9a68b6ea7e MDL-61395 forms: style frozen tag element values. 2022-09-26 11:16:04 +01:00
Paul Holden bd048774dd MDL-75656 tag: decode entities in tags element values. 2022-09-26 10:56:33 +01:00
Eloy Lafuente (stronk7) a67daf6b24 MDL-75726 ci: Bump GHA to Ubuntu 22.04
Have tried to also bump Travis to 22.04 (jammy) but it
was not working ok, with problems trying to find both
PHP and PostgreSQL versions.

Surely that's because 22.04 support is really new (Sep 9, 2022):

https://blog.travis-ci.com/22-9-9-ubuntujammy

So we'll have to wait a little more before being able to, also,
bump Travis to use 22.04
2022-09-22 17:45:10 +02:00
Eloy Lafuente (stronk7) da4772d234 MDL-75776 composer: minor updates
In stables, just minors updates to components.

Generated using the instructions @ https://docs.moodle.org/dev/Composer
and using PHP 7.3 (always the min version supported) to generate the
lock file.
2022-09-22 17:44:38 +02:00
Eloy Lafuente (stronk7) d708740c3f weekly release 4.0.4+ 2022-09-22 17:05:44 +02:00
Tim Hunt b20f6471b6 MDL-27570 quiz timing: add unit test and simplify top of process_attempt 2022-09-22 11:12:23 +01:00
Eloy Lafuente (stronk7) 84f03ab16d Merge branch 'MDL-74762_400' of https://github.com/catalyst/moodle-MDL-72752 into MOODLE_400_STABLE 2022-09-21 14:26:40 +02:00
Philipp Imhof bebdb51753 MDL-27570 quiz: check if time is really up 2022-09-21 11:38:24 +01:00
David Woloszyn 4f14495420 MDL-75459 Collapsable Form Sections: Default state bug fix
In circumstances where all collapsible form sections were expanded on
page load, a check is now made to ensure the expand all/collapse all
button behaves as intended.
2022-09-21 12:30:10 +10:00
Nathan Nguyen 1c843805eb MDL-74762 qbank_statistics: fix unit test failure with Oracle DB 2022-09-21 12:10:12 +10:00
Paul Holden d08559b8ae MDL-75800 enrol: correct instance deleted event name. 2022-09-20 14:09:34 +01:00
Justus Dieckmann 8763bba518 MDL-75569 course: fix non-functional search bar in course index page
For users who are not allowed to access course/management.php, the
normal course search is used instead.
2022-09-20 12:34:45 +02:00
Jun Pataleta 1febfbebcd Merge branch 'MDL-75777_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-09-20 15:12:15 +08:00
Víctor Déniz ae317e6527 Merge branch 'MDL-74941-400' of https://github.com/lucaboesch/moodle into MOODLE_400_STABLE 2022-09-20 08:09:06 +01:00
Laurent David d74f805126 MDL-75763 mod_bigbluebuttonbn: Fix get_server_not_available_url
* The redirection should go to xxx?section=modsettingbigbluebuttonbn in case of error
2022-09-20 08:39:10 +02:00
Steve Bader 30cc7e5c1e MDL-74941 qtype_calculated: Copy dataset from previous question version 2022-09-20 08:09:13 +02:00
Luca Bösch 0acbe6914d MDL-74941 qtype_calculated: Fix for usage calculation
The patch for the helper functions is by Nathan Nguyen
<nathannguyen@catalyst-au.net> whom I wish to thank.
2022-09-20 08:09:02 +02:00
Stephen Bourget 3bb3afdcab MDL-75627 Calendar: Fix calendar imports from Office 365 2022-09-19 15:51:03 -04:00
Marina Glancy 9ddc556300 MDL-75791 reportbuilder: set persistent for active conditions 2022-09-19 16:54:21 +02:00
Marina Glancy be60921e14 MDL-75358 reportbuilder: display nulls as empty cells in aggregation 2022-09-19 14:44:01 +02:00
Marina Glancy 4e8013e418 MDL-75358 reportbuilder: display nulls as empty cells for numeric/bool 2022-09-19 14:43:56 +02:00
Ilya Tregubov 236b14a90f Merge branch 'MDL-75065-401' of https://github.com/devlionco/moodle into MOODLE_400_STABLE 2022-09-19 14:01:36 +04:00
Eloy Lafuente (stronk7) be02cc3687 MDL-75777 phpunit: Move tests to use correct names and ns (take#6)
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.
2022-09-19 11:02:50 +02:00
Jun Pataleta 5bd5f5b4c9 Merge branch 'MDL-75757_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-09-19 13:01:57 +08:00
Andrew Nicols 493ef64d13 MDL-75782 mod_quiz: Make TinyMCE autosave less fragile
This commit amends the quiz autosave feature to not assume the
components of the Tiny API as much, and add support for newer versions
of TinyMCE.
2022-09-19 12:55:41 +08:00
Eloy Lafuente (stronk7) dff5793807 MDL-75757 phpunit: Add some tolerance to a few failing assertions
Recently, PHPUnit (all versions) did some changes about how the
comparators worked and this has caused some float comparisons
to stop working.

We need to move them to assertEqualsWithDelta(), allowing a small
tolerance to workaround the floats comparison problem.

0.00001 has been decided. And applied to all the similar assertions
within the unittest function, so if more cases are added to them
better be copied with the agreed tolerance.
2022-09-18 15:57:01 +02:00
Víctor Déniz 3657cfa88c Merge branch 'MDL-74762_400' of https://github.com/catalyst/moodle-MDL-72752 into MOODLE_400_STABLE 2022-09-16 14:24:53 +01:00
Nathan Nguyen 92f979948f MDL-74762 qbank_statistics: improve performance loading the data
This issue greatly improves the performance of displaying statistics in
the question bank.

1. The required quiz statistics are now pre-computed by a scheduled task.

2. Cached statistics in the database are now never cleaned up, so the
   pre-computed stats are always available.

3. The way the cached statistics are loaded for each question
   that is being displayed is now a bit more efficient.

4. Related to that, there is a new callback which activities can implement,
   if they want their question statistics to be included in the ones shown
   in the question bank.

Note, there is still further improvement possible to load the statistics
for all questions being displayed in bulk. However, that must wait for a
future issue, MDL-75576. The other improvements in this issue are
significant and we did not want to delay releasing them.

Co-authored-by: Jonathan Champ <jrchamp@ncsu.edu>
Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
2022-09-16 21:15:27 +10:00
Sara Arjona 5b90f71153 Merge branch 'MDL-75108-m400' of https://github.com/sammarshallou/moodle into MOODLE_400_STABLE 2022-09-16 11:23:21 +02:00
Paul Holden 3e97c3ee83 MDL-75721 reportbuilder: select from main table in absence of columns.
Ensure any joins added to the report itself are also present.
2022-09-15 17:07:20 +01:00
Sara Arjona 844abeaf5d weekly release 4.0.4+ 2022-09-15 16:11:51 +02:00
Sara Arjona e7e0609857 Merge branch 'install_400_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_400_STABLE 2022-09-15 16:11:49 +02:00
hieuvu 3b1ef88cb4 MDL-75744 gapselect: remove empty choices option. 2022-09-15 15:45:35 +07:00
Andrew Nicols 049288a65d MDL-71531 cachestore_file: Stop locking cache files to read
The cache file is only ever written to in the `write_file` function,
where it does so by writing to a temp file and performing an atomic
rename of that file. When writing, the target file is never locked.

The cache file is only ever read in the `get` function, and there is no
need for an exclusive lock in that situation.

There is therefore no need to obtain any lock, shared or exclusive, to
read the cache file. Doing so only affects performance of the file sytem
as file locks must be needlessly obtained and written to disk for a read
operation which does not benefit from them.
2022-09-15 10:14:00 +08:00
Jun Pataleta f5f40abd28 Merge branch 'MDL-75716_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-09-15 09:55:48 +08:00
Jun Pataleta 24a00a0d97 Merge branch 'MDL-75714_400' of https://github.com/stronk7/moodle into MOODLE_400_STABLE 2022-09-15 09:26:13 +08:00
Eloy Lafuente (stronk7) 6e672c0a82 MDL-75714 navigation: Cover a couple of situations with behat
- Guest user attempting to access to single-activity course.
- Not enrolled user attempt to access to single-activity course.

Both should, by default, land to the "cannot access/enrol" page.
2022-09-14 23:41:25 +02:00
Stefan Hanauska ed369e32ef MDL-75714 navigation: Check if node is false 2022-09-14 23:41:25 +02:00
Víctor Déniz fb049600c3 Merge branch 'MDL-75558-400' of https://github.com/ssj365/moodle into MOODLE_400_STABLE 2022-09-14 22:33:57 +01:00
Víctor Déniz a19e234dd3 Merge branch 'MDL-74965-400' of https://github.com/ssj365/moodle into MOODLE_400_STABLE 2022-09-14 20:23:01 +01:00
Ferran Recio 5d6d91b706 MDL-75625 core_courseformat: fix MDL-71979 comments 2022-09-14 20:05:32 +01:00
Marina Glancy bf896b01dc MDL-71686 forms: allow arrays in dynamic forms args 2022-09-14 17:59:10 +02:00
Shamiso.Jaravaza 8f090ac85d MDL-74965 mod_bigbluebuttonbn: Fix error in role 2022-09-14 09:06:00 -06:00
Sara Arjona 49705b1f40 Merge branch 'MDL-74010-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-09-14 11:41:47 +02:00
Paul Holden 4bd6777cfb MDL-75729 reportbuilder: improve handling of card toggle button. 2022-09-14 10:18:55 +01:00
Jun Pataleta 497e9da529 Merge branch 'MDL-75308-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-09-14 05:32:57 +08:00
Eloy Lafuente (stronk7) ad01614e9c MDL-75716 phpunit: Move tests to use correct names and ns (take#5)
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- In lib/tests/blocklib_test.php 2 helper classes have been
  moved to tests/fixtures, because they needed to be namespace-free.
2022-09-12 19:29:11 +02:00
Sara Arjona 152bdb1aa1 Merge branch 'MDL-75051_400' of https://github.com/mkassaei/moodle into MOODLE_400_STABLE 2022-09-12 12:30:31 +02:00
Andrew Nicols 0a63b5c08d MDL-75559 behat: Sort behat_hooks to top of context list 2022-09-12 12:33:31 +08:00
AMOS bot 0693f196e7 Automatically generated installer lang files 2022-09-11 00:07:58 +00:00
Mahmoud Kassaei 7c7505e428 MDL-75051 Questions: Selecting idnumber in the question bank,
the copy/pasting, includes extraneous text in Chrome
2022-09-09 10:35:55 +01:00
Anastasios Bithas 098cf7b38d MDL-75665 gradereport_overview: Format strings in grade report overview 2022-09-07 12:36:59 +03:00
Dan Marsden 4603578b43 MDL-75668 backup: Save context mapping of duplicate blocks. 2022-09-07 12:40:20 +12:00
Paul Holden 2ae6bde9dc MDL-75447 reportbuilder: return only valid audience instances. 2022-09-02 12:33:59 +01:00
Brendan Heywood 65d259ef55 MDL-75614 dml: Fixed debugsqltrace with anon classes bug 2022-09-02 11:42:31 +10:00
Paul Holden fc0bd43f9d MDL-75308 task: explicit check for tasks of disabled plugins.
The enabled state of a plugin is a tri-state value (boolean or
null). We should be consistent with elsewhere by only considering
boolean false as an actually disabled plugin.

See also cdcb53a1 for similar change in task management.
2022-08-30 13:03:52 +01:00
Shamiso.Jaravaza d30eabf344 MDL-75558 mod_bigbluebuttonbn: Fix alert banner 2022-08-23 17:19:06 -06:00
Mikhail Golenkov 02cca91bfe MDL-75448 assignfeedback_editpdf: Fix conversion for rotated images 2022-08-19 15:38:03 +10:00
Mikhail Golenkov c3474f0fb7 MDL-75448 stored_file: Cover rotate_image() method with unit tests 2022-08-19 15:38:03 +10:00
Shamiso.Jaravaza 0e27c5f7a5 MDL-75460 mod_bigbluebuttonbn: Fix lock on start 2022-08-15 23:51:21 -06:00
Laurent David c84606f5a7 MDL-59458 mod_data: Fix sorting data query
* When activating sorting on a different field than the original field
the list of records is empty
2022-08-15 17:13:28 +02:00
Anton b674666081 MDL-75065 qbank_editquestion: fix creating simple calculated question 2022-08-10 09:43:33 +03:00
Paul Holden 59ce247b72 MDL-74010 core: check defined MDL_PERF* values in conditionals. 2022-08-05 11:03:02 +01:00
sam marshall 3c82c11f72 MDL-75108 block_html: Search tries to index directory entries
Search attach_files function should only attach indexable files,
not directory entries which are 0 bytes and cannot be indexed.
2022-07-01 14:09:51 +01:00
gthomas2 137cfc18ee MDL-74922 javascript: storragewrapper validateCache fix 2022-06-08 09:34:20 +01:00
950 changed files with 14826 additions and 6388 deletions
+9 -5
View File
@@ -6,6 +6,10 @@
],
'env': {
'browser': true,
// Enable ES6+ features by default.
// See http://eslint.org/docs/user-guide/configuring#specifying-environments
// Note: The YUI override must exactly match this when disabling the ES6+ version because those features are not supported by Shifter.
'es2020': true,
'amd': true
},
'globals': {
@@ -83,6 +87,7 @@
'no-octal-escape': 'error',
'no-proto': 'error',
'no-redeclare': 'warn',
'no-restricted-globals': ['error', { 'name': 'Notification' }],
'no-return-assign': 'error',
'no-script-url': 'error',
'no-self-assign': 'error',
@@ -196,6 +201,10 @@
overrides: [
{
files: ["**/yui/src/**/*.js"],
'env': {
// Disable ES6+ for YUI files.
'es2020': false,
},
// Disable some rules which we can't safely define for YUI rollups.
rules: {
'no-undef': 'off',
@@ -221,10 +230,6 @@
},
{
files: ["**/amd/src/*.js", "**/amd/src/**/*.js", "Gruntfile.js", ".grunt/*.js", ".grunt/tasks/*.js", "jsdoc.conf.js"],
// We support es6 now. Woot!
env: {
es6: true
},
// We're using babel transpiling so use their parser
// for linting.
parser: '@babel/eslint-parser',
@@ -299,7 +304,6 @@
],
},
parserOptions: {
'ecmaVersion': 9,
'sourceType': 'module',
'requireConfigFile': false,
}
+7 -7
View File
@@ -13,14 +13,14 @@ env:
jobs:
Grunt:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checking out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Configuring node & npm
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
@@ -54,11 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
php: 7.3
extensions:
db: mysqli
- os: ubuntu-20.04
- os: ubuntu-22.04
php: 8.0
db: pgsql
extensions: xmlrpc-beta
@@ -85,7 +85,7 @@ jobs:
postgresql password: test
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v3.x
uses: rlespinasse/github-slug-action@v4
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
@@ -96,7 +96,7 @@ jobs:
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setting up PHPUnit
env:
+2 -1
View File
@@ -54,4 +54,5 @@ moodle-plugin-ci.phar
/admin/tool/componentlibrary/docs
/admin/tool/componentlibrary/hugo/site/data/my-index.json
.hugo_build.lock
.phpcs.xml
phpcs.xml
jsconfig.json
+1
View File
@@ -233,6 +233,7 @@ const getOwningComponentDirectory = checkPath => {
};
module.exports = {
fetchComponentData,
getAmdSrcGlobList,
getComponentFromPath,
getComponentPaths,
+2 -2
View File
@@ -39,7 +39,7 @@ module.exports = grunt => {
{
rule: {
_attrs: {
ref: './.phpcs.xml.dist',
ref: './phpcs.xml.dist',
},
},
},
@@ -52,7 +52,7 @@ module.exports = grunt => {
});
});
grunt.file.write('.phpcs.xml', toXML(config, {
grunt.file.write('phpcs.xml', toXML(config, {
header: true,
indent: ' ',
}) + "\n");
+3
View File
@@ -47,6 +47,9 @@ module.exports = grunt => {
// Load ESLint.
require('./eslint')(grunt);
// Load jsconfig.
require('./jsconfig')(grunt);
// Load JSDoc.
require('./jsdoc')(grunt);
+53
View File
@@ -0,0 +1,53 @@
// 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/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2022 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
const configuration = {
compilerOptions: {
baseUrl: ".",
paths: {
},
target: "es2015",
allowSyntheticDefaultImports: false,
},
exclude: [
"node_modules",
],
include: [],
};
module.exports = (grunt) => {
const handler = () => {
const jsconfigData = Object.assign({}, configuration);
const path = require('path');
const {fetchComponentData} = require(path.join(process.cwd(), '.grunt', 'components.js'));
const componentData = fetchComponentData().components;
for (const [thisPath, component] of Object.entries(componentData)) {
jsconfigData.compilerOptions.paths[`${component}/*`] = [`${thisPath}/amd/src/*`];
jsconfigData.include.push(`${thisPath}/amd/src/**/*`);
}
grunt.file.write('jsconfig.json', JSON.stringify(jsconfigData, null, " ") + "\n");
};
grunt.registerTask('jsconfig', 'Generate a jsconfig configuration compatible with the LSP', handler);
};
+2 -5
View File
@@ -3371,6 +3371,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
<RESTRICT function="restrict_php_version_81" message="unsupportedphpversion81" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -3557,6 +3558,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
<RESTRICT function="restrict_php_version_81" message="unsupportedphpversion81" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -3781,11 +3783,6 @@
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
+18 -3
View File
@@ -46,11 +46,23 @@
$formcontinue = new single_button(new moodle_url('index.php', array('confirm' => md5($mnet->public_key))), get_string('yes'));
$formcancel = new single_button(new moodle_url('index.php', array()), get_string('no'));
echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string("deletekeycheck", "mnet"), $formcontinue, $formcancel);
echo $OUTPUT->footer();
exit;
} else {
// We're deleting
// If no/cancel then redirect back to the network setting page.
if (!isset($form->confirm)) {
redirect(
new moodle_url('/admin/mnet/index.php'),
get_string('keydeletedcancelled', 'mnet'),
null,
\core\output\notification::NOTIFY_SUCCESS
);
}
if (!isset($SESSION->mnet_confirm_delete_key)) {
// fail - you're being attacked?
@@ -63,8 +75,12 @@
if($time < time() - 60) {
// fail - you're out of time.
print_error ('deleteoutoftime', 'mnet', 'index.php');
exit;
redirect(
new moodle_url('/admin/mnet/index.php'),
get_string('deleteoutoftime', 'mnet'),
null,
\core\output\notification::NOTIFY_WARNING
);
}
if ($key != md5(sha1($mnet->keypair['keypair_PEM']))) {
@@ -75,7 +91,6 @@
$mnet->replace_keys();
redirect('index.php', get_string('keydeleted','mnet'));
exit;
}
}
$hosts = $DB->get_records_select('mnet_host', "id <> ? AND deleted = 0", array($CFG->mnet_localhost_id), 'wwwroot ASC');
+2 -3
View File
@@ -59,9 +59,8 @@ class mnet_simple_host_form extends moodleform {
$wwwroot = 'http://'.$wwwroot;
}
if ($host = $DB->get_record('mnet_host', array('wwwroot' => $wwwroot))) {
global $CFG;
return array('wwwroot' => get_string('hostexists', 'mnet',
new moodle_url('/admin/mnet/peers.php', array('hostid' => $host->id))));
$str = get_string('hostexists', 'mnet', (new moodle_url('/admin/mnet/peers.php', ['hostid' => $host->id]))->out());
return array('wwwroot' => $str);
}
return array();
}
@@ -16,6 +16,8 @@
namespace core_adminpresets\local\setting;
use admin_setting_configcheckbox;
/**
* Checkbox setting.
*
@@ -26,15 +28,15 @@ namespace core_adminpresets\local\setting;
*/
class adminpresets_admin_setting_configcheckbox extends adminpresets_setting {
protected function set_value($value) {
$this->value = clean_param($value, PARAM_BOOL);
$this->set_visiblevalue();
return true;
}
/**
* Sets the visible name for the setting selected value
*/
protected function set_visiblevalue() {
if ($this->value) {
/** @var admin_setting_configcheckbox $settingdata */
$settingdata = $this->get_settingdata();
// We need to compare the "yes" value of the inner checkbox, which isn't necessarily boolean.
if ($this->value == $settingdata->yes) {
$str = get_string('yes');
} else {
$str = get_string('no');
@@ -51,12 +51,12 @@
<div class="form-password">
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
<span data-passwordunmask="editor">
<input type="hidden"
<input type="password"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
data-size="{{ size }}"
class="form-control d-inline-block"
class="form-control d-none"
>
</span>
<a href="#" data-passwordunmask="edit" title="{{ edithint }}">
+3 -3
View File
@@ -18,7 +18,7 @@ Feature: An administrator can browse user accounts
When I navigate to "Users > Accounts > Browse list of users" in site administration
# Name field always present, email field is default for showidentity.
Then the following should exist in the "users" table:
| First name / Surname | Email address |
| First name / Last name | Email address |
| User One | one@example.com |
| User Two | two@example.com |
# Should not see other identity fields or non-default name fields.
@@ -34,7 +34,7 @@ Feature: An administrator can browse user accounts
| alternativefullnameformat | firstnamephonetic lastname |
When I navigate to "Users > Accounts > Browse list of users" in site administration
Then the following should exist in the "users" table:
| First name - phonetic / Surname | Email address |
| First name - phonetic / Last name | Email address |
| Yewzer One | one@example.com |
| Yoozare Two | two@example.com |
@@ -43,7 +43,7 @@ Feature: An administrator can browse user accounts
| showuseridentity | department,profile_field_frog |
When I navigate to "Users > Accounts > Browse list of users" in site administration
Then the following should exist in the "users" table:
| First name / Surname | Favourite frog | Department |
| First name / Last name | Favourite frog | Department |
| User One | Kermit | Attack |
| User Two | Tree | Defence |
And I should not see "Email address" in the "table" "css_element"
@@ -15,7 +15,7 @@ Feature: Allowing multiple accounts to have the same email address
And I set the following fields to these values:
| Username | s2 |
| First name | Jane |
| Surname | Doe |
| Last name | Doe |
| Email address | <email> |
| New password | test |
And I press "Create user"
@@ -8,7 +8,7 @@ Feature: An administrator can configure the available user list filters
When I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
@@ -30,7 +30,7 @@ Feature: An administrator can configure the available user list filters
And I should not see "MNet ID provider" in the "New filter" "fieldset"
And I navigate to "Users > Accounts > Bulk user actions" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
@@ -57,7 +57,7 @@ Feature: An administrator can configure the available user list filters
And I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should see "Username" in the "New filter" "fieldset"
And I should see "Email address" in the "New filter" "fieldset"
@@ -79,7 +79,7 @@ Feature: An administrator can configure the available user list filters
And I should not see "MNet ID provider" in the "New filter" "fieldset"
And I navigate to "Users > Accounts > Bulk user actions" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should see "Username" in the "New filter" "fieldset"
And I should see "Email address" in the "New filter" "fieldset"
@@ -106,7 +106,7 @@ Feature: An administrator can configure the available user list filters
And I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
@@ -128,7 +128,7 @@ Feature: An administrator can configure the available user list filters
And I should not see "MNet ID provider" in the "New filter" "fieldset"
And I navigate to "Users > Accounts > Bulk user actions" in site administration
Then I should see "User full name"
And I should not see "Surname" in the "New filter" "fieldset"
And I should not see "Last name" in the "New filter" "fieldset"
And I should not see "Firstname" in the "New filter" "fieldset"
And I should not see "Username" in the "New filter" "fieldset"
And I should not see "Email address" in the "New filter" "fieldset"
@@ -1,18 +1,20 @@
@tool @tool_admin_presets
Feature: I can download a preset
Background:
Given I log in as "admin"
And the following "tool_admin_presets > preset" exist:
Given the following "tool_admin_presets > preset" exist:
| name |
| Custom preset |
And I navigate to "Site admin presets" in site administration
@javascript
Scenario: Core and custom preset settings can be downloaded
Scenario: Custom preset settings can be downloaded
Given I log in as "admin"
And I navigate to "Site admin presets" in site administration
When I open the action menu in "Custom preset" "table_row"
Then following "Download" "link" in the "Custom preset" "table_row" should download between "0" and "5000" bytes
And I open the action menu in "Starter" "table_row"
And following "Download" "link" in the "Starter" "table_row" should download between "0" and "5000" bytes
@javascript
Scenario: Core preset settings can be downloaded
Given I log in as "admin"
And I navigate to "Site admin presets" in site administration
When I open the action menu in "Starter" "table_row"
Then following "Download" "link" in the "Starter" "table_row" should download between "0" and "5000" bytes
@@ -23,7 +23,7 @@ namespace tool_admin_presets\event;
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\event\preset_deleted
* @covers \tool_admin_presets\event\preset_deleted
*/
class preset_deleted_test extends \advanced_testcase {
@@ -23,7 +23,7 @@ namespace tool_admin_presets\event;
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\event\preset_downloaded
* @covers \tool_admin_presets\event\preset_downloaded
*/
class preset_downloaded_test extends \advanced_testcase {
@@ -23,7 +23,7 @@ namespace tool_admin_presets\event;
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\event\preset_exported
* @covers \tool_admin_presets\event\preset_exported
*/
class preset_exported_test extends \advanced_testcase {
@@ -23,7 +23,7 @@ namespace tool_admin_presets\event;
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\event\preset_imported
* @covers \tool_admin_presets\event\preset_imported
*/
class preset_imported_test extends \advanced_testcase {
@@ -23,7 +23,7 @@ namespace tool_admin_presets\event;
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\event\preset_loaded
* @covers \tool_admin_presets\event\preset_loaded
*/
class preset_loaded_test extends \advanced_testcase {
@@ -23,7 +23,7 @@ namespace tool_admin_presets\event;
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\event\preset_previewed
* @covers \tool_admin_presets\event\preset_previewed
*/
class preset_previewed_test extends \advanced_testcase {
@@ -23,7 +23,7 @@ namespace tool_admin_presets\event;
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\event\preset_reverted
* @covers \tool_admin_presets\event\preset_reverted
*/
class preset_reverted_test extends \advanced_testcase {
@@ -23,7 +23,7 @@ namespace tool_admin_presets\event;
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_admin_presets\event\presets_listed
* @covers \tool_admin_presets\event\presets_listed
*/
class presets_listed_test extends \advanced_testcase {
+11
View File
@@ -0,0 +1,11 @@
define("tool_behat/steps",["exports","core/ajax","core/templates","core/pending"],(function(_exports,_ajax,_templates,_pending){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}
/**
* Enhancements for the step definitions page.
*
* @module tool_behat/steps
* @copyright 2022 Catalyst IT EU
* @author Mark Johnson <mark.johnson@catalyst-eu.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_ajax=_interopRequireDefault(_ajax),_templates=_interopRequireDefault(_templates),_pending=_interopRequireDefault(_pending);_exports.init=()=>{document.addEventListener("change",(async e=>{const entityElement=e.target.closest(".entities"),stepElement=e.target.closest(".stepcontent");if(!entityElement||!stepElement)return;const pendingPromise=new _pending.default("tool_behat/steps:change"),entityData=await(entityType=e.target.value,_ajax.default.call([{methodname:"tool_behat_get_entity_generator",args:{entitytype:entityType}}])[0]);var entityType;const{html:html,js:js}=await(entityData=>{var _entityData$required;return null!==(_entityData$required=entityData.required)&&void 0!==_entityData$required&&_entityData$required.length?_templates.default.renderForPromise("tool_behat/steprequiredfields",{fields:entityData.required}):Promise.resolve({html:"",js:""})})(entityData),stepRequiredFields=stepElement.querySelector(".steprequiredfields");stepRequiredFields?await _templates.default.replaceNode(stepRequiredFields,html,js):await _templates.default.appendNodeContents(stepElement,html,js),pendingPromise.resolve()}))}}));
//# sourceMappingURL=steps.min.js.map
@@ -0,0 +1 @@
{"version":3,"file":"steps.min.js","sources":["../src/steps.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\nimport Ajax from 'core/ajax';\nimport Templates from 'core/templates';\nimport PendingJS from 'core/pending';\n\n/**\n * Enhancements for the step definitions page.\n *\n * @module tool_behat/steps\n * @copyright 2022 Catalyst IT EU\n * @author Mark Johnson <mark.johnson@catalyst-eu.net>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * Call the get_entity_generator web service function\n *\n * Takes the name of an entity generator and returns an object containing a list of the required fields.\n *\n * @param {String} entityType\n * @returns {Promise}\n */\nconst getGeneratorEntities = (entityType) => Ajax.call([{\n methodname: 'tool_behat_get_entity_generator',\n args: {entitytype: entityType}\n}])[0];\n\n/**\n * Render HTML for required fields\n *\n * Takes the entity data returned from getGeneratorEntities and renders the HTML to display the required fields.\n *\n * @param {String} entityData\n * @return {Promise}\n */\nconst getRequiredFieldsContent = (entityData) => {\n if (!entityData.required?.length) {\n return Promise.resolve({\n html: '',\n js: ''\n });\n }\n return Templates.renderForPromise('tool_behat/steprequiredfields', {fields: entityData.required});\n};\n\nexport const init = () => {\n // When an entity is selected in the \"the following exist\" step, fetch and display the required fields.\n document.addEventListener('change', async(e) => {\n const entityElement = e.target.closest('.entities');\n const stepElement = e.target.closest('.stepcontent');\n if (!entityElement || !stepElement) {\n return;\n }\n\n const pendingPromise = new PendingJS('tool_behat/steps:change');\n\n const entityData = await getGeneratorEntities(e.target.value);\n const {html, js} = await getRequiredFieldsContent(entityData);\n\n const stepRequiredFields = stepElement.querySelector('.steprequiredfields');\n if (stepRequiredFields) {\n await Templates.replaceNode(stepRequiredFields, html, js);\n } else {\n await Templates.appendNodeContents(stepElement, html, js);\n }\n pendingPromise.resolve();\n });\n};\n"],"names":["document","addEventListener","async","entityElement","e","target","closest","stepElement","pendingPromise","PendingJS","entityData","entityType","value","Ajax","call","methodname","args","entitytype","html","js","required","_entityData$required","length","Templates","renderForPromise","fields","Promise","resolve","getRequiredFieldsContent","stepRequiredFields","querySelector","replaceNode","appendNodeContents"],"mappings":";;;;;;;;4NA2DoB,KAEhBA,SAASC,iBAAiB,UAAUC,MAAAA,UAC1BC,cAAgBC,EAAEC,OAAOC,QAAQ,aACjCC,YAAcH,EAAEC,OAAOC,QAAQ,oBAChCH,gBAAkBI,yBAIjBC,eAAiB,IAAIC,iBAAU,2BAE/BC,iBAlCgBC,WAkCwBP,EAAEC,OAAOO,MAlClBC,cAAKC,KAAK,CAAC,CACpDC,WAAY,kCACZC,KAAM,CAACC,WAAYN,eACnB,IAH0BA,IAAAA,iBAmChBO,KAACA,KAADC,GAAOA,SAtBaT,CAAAA,0EACzBA,WAAWU,0CAAXC,qBAAqBC,OAMnBC,mBAAUC,iBAAiB,gCAAiC,CAACC,OAAQf,WAAWU,WAL5EM,QAAQC,QAAQ,CACnBT,KAAM,GACNC,GAAI,MAkBiBS,CAAyBlB,YAE5CmB,mBAAqBtB,YAAYuB,cAAc,uBACjDD,yBACMN,mBAAUQ,YAAYF,mBAAoBX,KAAMC,UAEhDI,mBAAUS,mBAAmBzB,YAAaW,KAAMC,IAE1DX,eAAemB"}
+82
View File
@@ -0,0 +1,82 @@
// 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/>.
import Ajax from 'core/ajax';
import Templates from 'core/templates';
import PendingJS from 'core/pending';
/**
* Enhancements for the step definitions page.
*
* @module tool_behat/steps
* @copyright 2022 Catalyst IT EU
* @author Mark Johnson <mark.johnson@catalyst-eu.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Call the get_entity_generator web service function
*
* Takes the name of an entity generator and returns an object containing a list of the required fields.
*
* @param {String} entityType
* @returns {Promise}
*/
const getGeneratorEntities = (entityType) => Ajax.call([{
methodname: 'tool_behat_get_entity_generator',
args: {entitytype: entityType}
}])[0];
/**
* Render HTML for required fields
*
* Takes the entity data returned from getGeneratorEntities and renders the HTML to display the required fields.
*
* @param {String} entityData
* @return {Promise}
*/
const getRequiredFieldsContent = (entityData) => {
if (!entityData.required?.length) {
return Promise.resolve({
html: '',
js: ''
});
}
return Templates.renderForPromise('tool_behat/steprequiredfields', {fields: entityData.required});
};
export const init = () => {
// When an entity is selected in the "the following exist" step, fetch and display the required fields.
document.addEventListener('change', async(e) => {
const entityElement = e.target.closest('.entities');
const stepElement = e.target.closest('.stepcontent');
if (!entityElement || !stepElement) {
return;
}
const pendingPromise = new PendingJS('tool_behat/steps:change');
const entityData = await getGeneratorEntities(e.target.value);
const {html, js} = await getRequiredFieldsContent(entityData);
const stepRequiredFields = stepElement.querySelector('.steprequiredfields');
if (stepRequiredFields) {
await Templates.replaceNode(stepRequiredFields, html, js);
} else {
await Templates.appendNodeContents(stepElement, html, js);
}
pendingPromise.resolve();
});
};
@@ -0,0 +1,92 @@
<?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/>.
/**
* Return data about an entity generator.
*
* @package tool_behat
* @copyright 2022 onwards Catalyst IT EU {@link https://catalyst-eu.net}
* @author Mark Johnson <mark.johnson@catalyst-eu.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_behat\external;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/externallib.php');
/**
* External function for getting properties of entity generators.
*/
class get_entity_generator extends \external_api {
/**
* Define parameters for external function.
*
* The parameter is either in the format 'entity' or 'component_name > entity'. There is no appropriate param type for a
* string like this containing angle brackets, so we will do PARAM_RAW. The value will be parsed by
* behat_data_generators::parse_entity_type, which validates the format of the parameter and throws an exception if it is not
* correct.
*
* @return \external_function_parameters
*/
public static function execute_parameters(): \external_function_parameters {
return new \external_function_parameters([
'entitytype' => new \external_value(PARAM_RAW, 'Entity type that can be created by a generator.'),
]);
}
/**
* Return a list of the required fields for a given entity type.
*
* @param string $entitytype
* @return array
*/
public static function execute(string $entitytype): array {
global $CFG;
// Ensure we can load Behat and Facebook namespaces in behat libraries.
require_once("{$CFG->dirroot}/vendor/autoload.php");
require_once("{$CFG->libdir}/tests/behat/behat_data_generators.php");
$params = self::validate_parameters(self::execute_parameters(), ['entitytype' => $entitytype]);
$context = \context_system::instance();
self::validate_context($context);
require_capability('moodle/site:config', $context);
$generators = new \behat_data_generators();
$entity = $generators->get_entity($params['entitytype']);
return ['required' => $entity['required']];
}
/**
* Define return values.
*
* Return required fields
*
* @return \external_single_structure
*/
public static function execute_returns(): \external_single_structure {
return new \external_single_structure([
'required' => new \external_multiple_structure(
new \external_value(PARAM_TEXT, 'Required field'),
'Required fields',
VALUE_OPTIONAL
),
]);
}
}
+37
View File
@@ -0,0 +1,37 @@
<?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/>.
/**
* Define web service functions for tool_behat
*
* @package tool_behat
* @copyright 2022 onwards Catalyst IT EU {@link https://catalyst-eu.net}
* @author Mark Johnson <mark.johnson@catalyst-eu.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$functions = [
'tool_behat_get_entity_generator' => [
'classname' => 'tool_behat\\external\\get_entity_generator',
'methodname' => 'execute',
'description' => 'Get the generator details for an entity',
'type' => 'read',
'ajax' => true,
'capabilities' => 'moodle/site:config'
]
];
+1
View File
@@ -56,6 +56,7 @@ if ($components) {
$form = new steps_definitions_form(null, array('components' => $componentswithsteps));
// Output contents.
$PAGE->requires->js_call_amd('tool_behat/steps', 'init');
$renderer = $PAGE->get_renderer('tool_behat');
echo $renderer->render_stepsdefinitions($steps, $form);
+28
View File
@@ -24,6 +24,8 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/behat/classes/behat_generator_base.php');
/**
* Renderer for behat tool web features
*
@@ -106,6 +108,32 @@ class tool_behat_renderer extends plugin_renderer_base {
},
$stepsdefinitions
);
$elementstrings = [];
$count = 1;
$stepsdefinitions = preg_replace_callback('/(the following ")ELEMENT\d?_STRING(" exist:)/',
function($matches) use (&$elementstrings, &$count) {
// Replace element type arguments with a user-friendly select.
if (empty($elementstrings)) {
$behatgenerators = new behat_data_generators();
$componententities = $behatgenerators->get_all_entities();
ksort($componententities);
$elementstrings = [];
foreach ($componententities as $component => $entities) {
asort($entities);
foreach ($entities as $entity) {
$string = ($component === 'core') ? $entity : $component . ' > ' . $entity;
$elementstrings[$string] = $string;
}
}
}
$select = html_writer::select($elementstrings, 'entities' . $count, '', ['' => 'choosedots'],
['class' => 'entities']);
$count++;
return $matches[1] . $select . $matches[2];
},
$stepsdefinitions
);
}
// Steps definitions.
+6
View File
@@ -29,3 +29,9 @@
#page-admin-tool-behat-index .steps-definitions .stepregex {
color: #060;
}
#page-admin-tool-behat-index .steprequiredfields {
font-weight: bold;
font-size: 1em;
margin-top: 1em;
}
@@ -0,0 +1,33 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template tool_behat/steprequiredfields
Display a Gherkin-style table row showing required columns for a step.
Example context (json):
{
"fields": [
"user",
"role",
"context"
]
}
}}
<pre class="steprequiredfields">
|{{#fields}} {{{.}}} |{{/fields}}
</pre>
@@ -13,6 +13,10 @@ Feature: List the system steps definitions
Scenario: Accessing the list
Then I should see "Step definitions"
And I should not see "There aren't steps definitions matching this filter"
And I should not see "the following \"ELEMENT_STRING\" exist:"
And "entities1" "select" should exist
And the "entities1" select box should contain "users"
And the "entities1" select box should contain "mod_assign > submissions"
@javascript
Scenario: Filtering by type
@@ -34,3 +38,11 @@ Feature: List the system steps definitions
Then I should not see "There aren't steps definitions matching this filter"
And I should see "Checks the provided element and selector type exists in the current page."
And I should see "Checks that an element and selector type exists in another element and selector type on the current page."
@javascript
Scenario: Get required fields
Given I set the field "entities1" to "users"
And I should see "| username |"
When I set the field "entities1" to "mod_quiz > user overrides"
Then I should not see "| username |"
And I should see "| quiz | user |"
@@ -13,24 +13,24 @@ Feature: Transform steps arguments
And I open my profile in edit mode
Scenario: Use nasty strings on steps arguments
When I set the field "Surname" to "$NASTYSTRING1"
When I set the field "Last name" to "$NASTYSTRING1"
And I set the field "Description" to "$NASTYSTRING2"
And I set the field "City/town" to "$NASTYSTRING3"
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And the field "Surname" matches value "$NASTYSTRING1"
And the field "Last name" matches value "$NASTYSTRING1"
And the field "City/town" matches value "$NASTYSTRING3"
Scenario: Use nasty strings on table nodes
When I set the following fields to these values:
| Surname | $NASTYSTRING1 |
| Last name | $NASTYSTRING1 |
| Description | $NASTYSTRING2 |
| City/town | $NASTYSTRING3 |
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And the field "Surname" matches value "$NASTYSTRING1"
And the field "Last name" matches value "$NASTYSTRING1"
And the field "City/town" matches value "$NASTYSTRING3"
Scenario: Use double quotes
@@ -48,11 +48,11 @@ Feature: Transform steps arguments
Scenario: Nasty strings with other contents
When I set the field "First name" to "My Firstname $NASTYSTRING1"
And I set the following fields to these values:
| Surname | My Surname $NASTYSTRING2 |
| Last name | My Last name $NASTYSTRING2 |
And I press "Update profile"
And I click on "Edit profile" "link" in the "region-main" "region"
Then I should not see "NASTYSTRING"
And I should see "My Firstname"
And I should see "My Surname"
And I should see "My Last name"
And the field "First name" matches value "My Firstname $NASTYSTRING1"
And the field "Surname" matches value "My Surname $NASTYSTRING2"
And the field "Last name" matches value "My Last name $NASTYSTRING2"
@@ -0,0 +1,104 @@
<?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/>.
/**
* Unit tests for get_entity_generator web service
*
* @package tool_behat
* @copyright 2022 onwards Catalyst IT EU {@link https://catalyst-eu.net}
* @author Mark Johnson <mark.johnson@catalyst-eu.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_behat\external;
/**
* Tests for get_entity_generator web service
*
* @covers \tool_behat\external\get_entity_generator
*/
class get_entity_generator_test extends \advanced_testcase {
/**
* Log in as admin
*
* @return void
*/
public function setUp(): void {
$this->resetAfterTest();
$this->setAdminUser();
}
/**
* Get the generator for a core entity.
*
* @return void
*/
public function test_execute_core_entity(): void {
$generator = get_entity_generator::execute('users');
$this->assertEquals(['required' => ['username']], $generator);
}
/**
* Get the generator for the plugin entity.
*
* @return void
*/
public function test_execute_plugin_entity(): void {
$generator = get_entity_generator::execute('mod_book > chapters');
$this->assertEquals(['required' => ['book', 'title', 'content']], $generator);
}
/**
* Get the generator for an entity with no required fields.
*
* @return void
*/
public function test_execute_no_requried(): void {
$generator = get_entity_generator::execute('mod_forum > posts');
$this->assertEquals(['required' => []], $generator);
}
/**
* Attempt to get the generator for a core entity that does not exist.
*
* @return void
*/
public function test_execute_invalid_entity(): void {
$this->expectException('coding_exception');
get_entity_generator::execute('foo');
}
/**
* Attempt to get a generator form a plugin that does not exist.
*
* @return void
*/
public function test_execute_invalid_plugin(): void {
$this->expectException('coding_exception');
get_entity_generator::execute('foo > bar');
}
/**
* Attempt to get a generator for an entity that does not exist, from a plugin that does.
*
* @return void
*/
public function test_execute_invalid_plugin_entity(): void {
$this->expectException('coding_exception');
get_entity_generator::execute('mod_book > bar');
}
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2022041900; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2022041901; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2022041200; // Requires this Moodle version.
$plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics)
@@ -81,6 +81,30 @@ $activity-icon-colors: (
);
{{</ highlight >}}
### Custom activity icons
Some activities allow icons to be customised. This can be done by implementing callback XXX_get_coursemodule_info() returning instance of object e.g. mod/lti/lib.php
{{< php >}}
$info = new cached_cm_info();
$info->iconurl = new moodle_url('https://moodle.org/theme/moodleorg/pix/moodle_logo_small.svg');
{{< /php >}}
To get this customised icon, use:
{{< php >}}
$iconurl = get_fast_modinfo($courseid)->get_cm($cmid)->get_icon_url()->out(false);
{{< /php >}}
<div class="media mb-3">
<div class="activityiconcontainer lti mr-3">
<img alt="lti icon" title="lti icon" src="https://moodle.org/theme/moodleorg/pix/moodle_logo_small.svg" class="activityicon "> </div>
<div class="media-body align-self-center">
<div class="text-uppercase small">external</div>
<div class="activityname"><a href="#">External tool module</a></div>
</div>
</div>
## Examples
<div class="media mb-3">
+6 -5
View File
@@ -36,7 +36,7 @@ Useful for uploading custom langstrings to AMOS or importing or syncing them to
Options:
-l, --lang Comma seperated language ids to export, default: all
-c, --components Comma seperated components to export, default: all
-t, --target Target to copy the zip files to, default: $CFG->tempdir/customlang
-t, --target Target directory to copy the zip files to, default: $CFG->tempdir/customlang
-o, --overwrite Overwrite existing files in the target folder.
Note: If the target is not set, the files are always overwritten!
-h, --help Print out this help
@@ -73,9 +73,10 @@ if ($options['help']) {
echo $usage;
die;
}
if (!file_exists($options['target'])) {
mkdir($options['target'], 0777, true);
}
// Ensure target directory exists.
$options['target'] = rtrim($options['target'], '/') . '/';
check_dir_exists($options['target']);
cli_writeln(get_string('cliexportheading', 'tool_customlang'));
$langs = [];
@@ -90,7 +91,7 @@ foreach ($langs as $lang) {
$filename = $options['target'] . get_string('exportzipfilename', 'tool_customlang', ['lang' => $lang]);
// If the file exists and we are not using the temp folder it requires an ovewrite.
if ($options['target'] != $dafaulttarget && file_exists($filename) && !$options['overwrite']) {
cli_problem(get_string('cliexportfileexists', 'tool_customlang', $lang));
cli_problem(get_string('cliexportfileexists', 'tool_customlang', ['lang' => $lang]));
continue;
}
cli_heading(get_string('cliexportstartexport', 'tool_customlang', $lang));
+10
View File
@@ -160,6 +160,16 @@ foreach ($langfiles as $lng => $files) {
cli_heading(get_string('clifiles', 'tool_customlang', $lng));
// If we intend to check in any changes, we must first check them out.
if ($checkin) {
cli_writeln(get_string('checkout', 'tool_customlang'));
$progressbar = new progress_bar();
$progressbar->create();
tool_customlang_utils::checkout($lng, $progressbar);
}
foreach ($files as $file) {
// Generate a valid stored_file from this file.
$record = (object)[
@@ -50,6 +50,7 @@ $string['customlang:export'] = 'Export local translation';
$string['customlang:view'] = 'View local translation';
$string['export'] = 'Export custom strings';
$string['exportfilter'] = 'Select component(s) to export';
$string['exportzipfilename'] = 'customlang-export-{$a->lang}.zip';
$string['editlangpack'] = 'Edit language pack';
$string['filter'] = 'Filter strings';
$string['filtercomponent'] = 'Show strings of these components';
+3 -1
View File
@@ -89,7 +89,9 @@ class tool_customlang_utils {
* @param progress_bar $progressbar optionally, the given progress bar can be updated
*/
public static function checkout($lang, progress_bar $progressbar = null) {
global $DB;
global $DB, $CFG;
require_once("{$CFG->libdir}/adminlib.php");
// For behat executions we are going to load only a few components in the
// language customisation structures. Using the whole "en" langpack is
+1 -1
View File
@@ -5,6 +5,6 @@
* @copyright 2018 Adrian Greeve
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/expand_contract",["jquery","core/url","core/str"],(function($,url,str){var expandedImage=$('<img alt="" src="'+url.imageUrl("t/expanded")+'"/>'),collapsedImage=$('<img alt="" src="'+url.imageUrl("t/collapsed")+'"/>'),CLASSES_EXPAND="fa-caret-right",CLASSES_COLLAPSE="fa-caret-down";return{expandCollapse:function(targetnode,thisnode){targetnode.hasClass("hide")?(targetnode.removeClass("hide"),targetnode.addClass("visible"),targetnode.attr("aria-expanded",!0),thisnode.find(":header i.fa").removeClass(CLASSES_EXPAND),thisnode.find(":header i.fa").addClass(CLASSES_COLLAPSE),thisnode.find(":header img.icon").attr("src",expandedImage.attr("src"))):(targetnode.removeClass("visible"),targetnode.addClass("hide"),targetnode.attr("aria-expanded",!1),thisnode.find(":header i.fa").removeClass(CLASSES_COLLAPSE),thisnode.find(":header i.fa").addClass(CLASSES_EXPAND),thisnode.find(":header img.icon").attr("src",collapsedImage.attr("src")))},expandCollapseAll:function(nextstate){var currentstate="visible"==nextstate?"hide":"visible",ariaexpandedstate="visible"==nextstate,iconclassnow="visible"==nextstate?CLASSES_EXPAND:CLASSES_COLLAPSE,iconclassnext="visible"==nextstate?CLASSES_COLLAPSE:CLASSES_EXPAND,imagenow="visible"==nextstate?expandedImage.attr("src"):collapsedImage.attr("src");$("."+currentstate).each((function(){$(this).removeClass(currentstate),$(this).addClass(nextstate),$(this).attr("aria-expanded",ariaexpandedstate)})),$(".tool_dataprivacy-expand-all").data("visibilityState",currentstate),str.get_string(currentstate,"tool_dataprivacy").then((function(langString){$(".tool_dataprivacy-expand-all").html(langString)})).catch(Notification.exception),$(":header i.fa").each((function(){$(this).removeClass(iconclassnow),$(this).addClass(iconclassnext)})),$(":header img.icon").each((function(){$(this).attr("src",imagenow)}))}}}));
define("tool_dataprivacy/expand_contract",["jquery","core/url","core/str","core/notification"],(function($,url,str,Notification){var expandedImage=$('<img alt="" src="'+url.imageUrl("t/expanded")+'"/>'),collapsedImage=$('<img alt="" src="'+url.imageUrl("t/collapsed")+'"/>'),CLASSES_EXPAND="fa-caret-right",CLASSES_COLLAPSE="fa-caret-down";return{expandCollapse:function(targetnode,thisnode){targetnode.hasClass("hide")?(targetnode.removeClass("hide"),targetnode.addClass("visible"),targetnode.attr("aria-expanded",!0),thisnode.find(":header i.fa").removeClass(CLASSES_EXPAND),thisnode.find(":header i.fa").addClass(CLASSES_COLLAPSE),thisnode.find(":header img.icon").attr("src",expandedImage.attr("src"))):(targetnode.removeClass("visible"),targetnode.addClass("hide"),targetnode.attr("aria-expanded",!1),thisnode.find(":header i.fa").removeClass(CLASSES_COLLAPSE),thisnode.find(":header i.fa").addClass(CLASSES_EXPAND),thisnode.find(":header img.icon").attr("src",collapsedImage.attr("src")))},expandCollapseAll:function(nextstate){var currentstate="visible"==nextstate?"hide":"visible",ariaexpandedstate="visible"==nextstate,iconclassnow="visible"==nextstate?CLASSES_EXPAND:CLASSES_COLLAPSE,iconclassnext="visible"==nextstate?CLASSES_COLLAPSE:CLASSES_EXPAND,imagenow="visible"==nextstate?expandedImage.attr("src"):collapsedImage.attr("src");$("."+currentstate).each((function(){$(this).removeClass(currentstate),$(this).addClass(nextstate),$(this).attr("aria-expanded",ariaexpandedstate)})),$(".tool_dataprivacy-expand-all").data("visibilityState",currentstate),str.get_string(currentstate,"tool_dataprivacy").then((function(langString){$(".tool_dataprivacy-expand-all").html(langString)})).catch(Notification.exception),$(":header i.fa").each((function(){$(this).removeClass(iconclassnow),$(this).addClass(iconclassnext)})),$(":header img.icon").each((function(){$(this).attr("src",imagenow)}))}}}));
//# sourceMappingURL=expand_contract.min.js.map
File diff suppressed because one or more lines are too long
@@ -21,7 +21,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['jquery', 'core/url', 'core/str'], function($, url, str) {
define(['jquery', 'core/url', 'core/str', 'core/notification'], function($, url, str, Notification) {
var expandedImage = $('<img alt="" src="' + url.imageUrl('t/expanded') + '"/>');
var collapsedImage = $('<img alt="" src="' + url.imageUrl('t/collapsed') + '"/>');
@@ -22,8 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_httpsreplace\tests;
namespace tool_httpsreplace;
defined('MOODLE_INTERNAL') || die();
@@ -124,6 +124,12 @@ class controller {
}
if ($rm1 or $rm2) {
// Set the default site language to en if the deleted language pack is the default site language.
if ($CFG->lang === $lang) {
set_config('lang', 'en');
// Fix the user's current language to the default site language.
fix_current_language($CFG->lang);
}
$this->info[] = get_string('langpackremoved', 'tool_langimport', $lang);
event\langpack_removed::event_with_langcode($lang)->trigger();
return true;
+14 -1
View File
@@ -79,6 +79,19 @@ class locale {
* @return string|false Returns the new current locale, or FALSE on error.
*/
protected function set_locale(int $category = LC_ALL, string $locale = '0') {
return setlocale($category, $locale);
if (strlen($locale) <= 255 || PHP_OS_FAMILY === 'BSD' || PHP_OS_FAMILY === 'Darwin') {
// We can set the whole locale all together.
return setlocale($category, $locale);
}
// Too long locale with linux or windows, let's split it into known and supported categories.
$split = explode(';', $locale);
foreach ($split as $element) {
[$category, $value] = explode('=', $element);
if (defined($category)) { // Only if the category exists, there are OS differences.
setlocale(constant($category), $value);
}
}
return setlocale(LC_ALL, 0); // Finally, return the complete configured locale.
}
}
+101 -11
View File
@@ -14,14 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Tests for \tool_langimport\locale class.
*
* @package tool_langimport
* @copyright 2018 Université Rennes 2 {@link https://www.univ-rennes2.fr}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_langimport;
/**
@@ -29,6 +21,7 @@ namespace tool_langimport;
*
* @package tool_langimport
* @category test
* @coversDefaultClass \tool_langimport\locale
* @copyright 2018 Université Rennes 2 {@link https://www.univ-rennes2.fr}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -36,6 +29,7 @@ class locale_test extends \advanced_testcase {
/**
* Test that \tool_langimport\locale::check_locale_availability() works as expected.
*
* @covers ::check_locale_availability
* @return void
*/
public function test_check_locale_availability() {
@@ -43,7 +37,7 @@ class locale_test extends \advanced_testcase {
// - first setlocale() call which backup current locale
// - second setlocale() call which try to set new 'es' locale
// - third setlocale() call which restore locale.
$mock = $this->getMockBuilder(\tool_langimport\locale::class)
$mock = $this->getMockBuilder(locale::class)
->onlyMethods(['set_locale'])
->getMock();
$mock->method('set_locale')->will($this->onConsecutiveCalls('en', 'es', 'en'));
@@ -56,7 +50,7 @@ class locale_test extends \advanced_testcase {
// - first setlocale() call which backup current locale
// - second setlocale() call which fail to set new locale
// - third setlocale() call which restore locale.
$mock = $this->getMockBuilder(\tool_langimport\locale::class)
$mock = $this->getMockBuilder(locale::class)
->onlyMethods(['set_locale'])
->getMock();
$mock->method('set_locale')->will($this->onConsecutiveCalls('en', false, 'en'));
@@ -66,8 +60,104 @@ class locale_test extends \advanced_testcase {
$this->assertFalse($result);
// Test an invalid parameter.
$locale = new \tool_langimport\locale();
$locale = new locale();
$this->expectException(\coding_exception::class);
$locale->check_locale_availability('');
}
/**
* Test \tool_langimport\locale::set_locale() own logic.
*
* We have to explicitly test set_locale() own logic and results,
* that effectively sets the current locale, so we need to restore
* the original locale after every test (ugly, from a purist unit test
* point of view, but needed).
*
* @dataProvider set_locale_provider
* @covers ::set_locale
*
* @param string $set locale string to be set.
* @param string $ret expected results returned after setting the locale.
*/
public function test_set_locale(string $set, string $ret) {
// Make set_locale() public.
$loc = new locale();
$rc = new \ReflectionClass(locale::class);
$rm = $rc->getMethod('set_locale');
$rm->setAccessible(true);
// Capture current locale for later restore (funnily, using the set_locale() method itself.
$originallocale = $rm->invokeArgs($loc, [LC_ALL, 0]);
// Assert we get the locale defined as expected.
$this->assertEquals($ret, $rm->invokeArgs($loc, [LC_ALL, $set]));
// We have finished, restore the original locale, so this doesn't affect other tests at distance.
// (again, funnily, using the very same set_locale() method).
$rm->invokeArgs($loc, [LC_ALL, $originallocale]);
}
/**
* Data provider for test_set_locale().
*
* Provides a locale to be set (as 'set') and a expected return value (as 'ret'). Note that
* some of the locales are OS dependent, so only the ones matching the OS will be provided.
*
* We make extensive use of the en_AU.UTF-8/English_Australia.1252 locale that is mandatory to
* be installed in any system running PHPUnit tests.
*/
public function set_locale_provider(): array {
// Let's list the allowed categories by OS.
$bsdallowed = ['LC_COLLATE', 'LC_CTYPE', 'LC_MESSAGES', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME'];
$winallowed = ['LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME'];
$linuxallowed = [
'LC_COLLATE', 'LC_CTYPE', 'LC_MESSAGES', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME',
'LC_PAPER', 'LC_NAME', 'LC_ADDRESS', 'LC_TELEPHONE', 'LC_MEASUREMENT', 'LC_IDENTIFICATION'
];
// The base locale name is also OS dependent.
$baselocale = get_string('locale', 'langconfig');
if (PHP_OS_FAMILY === 'Windows') {
$baselocale = get_string('localewin', 'langconfig');
}
// Here we'll go accumulating cases to be provided.
$cases = [];
// First, the simplest case, just pass a locale name, without categories.
$cases['rawlocale'] = [
'set' => $baselocale,
'ret' => $baselocale,
];
// Now, let's fill ALL LC categories, we should get back the locale name if all them are set with same value.
// Note that this case is the one that, under Linux only, covers the changes performed to the set_locale() method.
// Pick the correct categories depending on the OS.
$oscategories = $bsdallowed; // Default to BSD/Dawrwin ones because they are the standard 6 supported by PHP.
if (PHP_OS_FAMILY === 'Windows') {
$oscategories = $winallowed;
} else if (PHP_OS_FAMILY === 'Linux') {
$oscategories = $linuxallowed;
}
$localestr = '';
foreach ($oscategories as $category) {
// Format is different by OS too, so let build the string conditionally.
if (PHP_OS_FAMILY === 'BSD' || PHP_OS_FAMILY === 'Darwin') {
// BSD uses slashes (/) separated list of the 6 values in exact order.
$localestr .= '/' . $baselocale;
} else {
// Linux/Windows use semicolon (;) separated list of category=value pairs.
$localestr .= ';' . $category . '=' . $baselocale;
}
}
$cases['allcategories'] = [
'set' => trim($localestr, ';/'),
'ret' => $baselocale,
];
// Return all the built cases.
return $cases;
}
}
+1 -1
View File
@@ -57,7 +57,7 @@ trait store {
throw new \coding_exception("Store $called doesn't define classes in correct namespaces.");
}
$this->component = $parts[0];
$this->store = str_replace('logstore_', '', $this->store);
$this->store = str_replace('logstore_', '', $this->component);
}
/**
+1 -1
View File
@@ -278,7 +278,7 @@ class external extends external_api {
));
$competency = api::read_competency($params['competencyid']);
$framework = api::read_framework($competency->get_competencyframeworkid());
$framework = api::read_framework($competency->get('competencyframeworkid'));
self::validate_context($framework->get_context());
$renderable = new output\competency_summary($competency, $framework, $params['includerelated'], $params['includecourses']);
$renderer = $PAGE->get_renderer('tool_lp');
+2 -2
View File
@@ -229,7 +229,7 @@ class page_helper {
$PAGE->set_pagelayout('standard');
$PAGE->set_url($url);
$PAGE->set_title($title);
$PAGE->set_heading($title);
$PAGE->set_heading(fullname($user));
if (!empty($plan)) {
$PAGE->navbar->add($title, $planurl);
@@ -303,7 +303,7 @@ class page_helper {
$PAGE->set_pagelayout('standard');
$PAGE->set_url($url);
$PAGE->set_title($title);
$PAGE->set_heading($title);
$PAGE->set_heading(fullname($user));
if (!empty($evidence)) {
$PAGE->navbar->add($title, $evidenceurl);
@@ -77,9 +77,10 @@
ucw.registerEvents('[data-region="user-competency-status"]');
ucw.on('status-changed', infoReloader.reload.bind(infoReloader));
ucw.on('error-occured', infoReloader.reload.bind(infoReloader));
var inlineGrader = new mod('#rate_{{uniqid}}', '{{competency.scaleid}}', '{{competency.competency.id}}', '{{user.id}}', '{{plan.id}}', '', '{{#str}}chooserating, tool_lp{{/str}}');
inlineGrader.on('competencyupdated', infoReloader.reload.bind(infoReloader));
{{#cangrade}}
var inlineGrader = new mod('#rate_{{uniqid}}', '{{competency.scaleid}}', '{{competency.competency.id}}', '{{user.id}}', '{{plan.id}}', '', '{{#str}}chooserating, tool_lp{{/str}}');
inlineGrader.on('competencyupdated', infoReloader.reload.bind(infoReloader));
{{/cangrade}}
});
{{/js}}
{{/usercompetency}}
@@ -95,13 +95,14 @@
{{#js}}
require(['jquery', 'tool_lp/grade_user_competency_inline', 'tool_lp/user_competency_info'], function($, mod, info) {
var inlineGrader = new mod('#rate_{{uniqid}}', '{{competency.scaleid}}', '{{competency.competency.id}}', '{{user.id}}', '', '{{course.id}}', '{{#str}}chooserating, tool_lp{{/str}}');
var competencyElement = $('[data-region-id="{{uniqid}}"]');
var displayuser = ('{{displayuser}}' == 'true') ? true : false;
var infoReloader = new info(competencyElement, '{{competency.competency.id}}', '{{user.id}}', '', '{{course.id}}', displayuser);
inlineGrader.on('competencyupdated', infoReloader.reload.bind(infoReloader));
{{#cangrade}}
var inlineGrader = new mod('#rate_{{uniqid}}', '{{competency.scaleid}}', '{{competency.competency.id}}', '{{user.id}}', '', '{{course.id}}', '{{#str}}chooserating, tool_lp{{/str}}');
inlineGrader.on('competencyupdated', infoReloader.reload.bind(infoReloader));
{{/cangrade}}
});
{{/js}}
+1 -1
View File
@@ -125,7 +125,7 @@ $string['qrcodetypeurl'] = 'QR code with site URL';
$string['qrcodetypelogin'] = 'QR code with automatic login';
$string['qrkeyttl'] = 'QR authentication key duration';
$string['qrkeyttl_desc'] = 'The length of time for which a QR code for automatic login is valid.';
$string['readingthisemailgettheapp'] = 'Reading this in an email? <a href="{$a}">Download the mobile app and receive notifications on your mobile device</a>.';
$string['readingthisemailgettheapp'] = 'Are you reading this in an email? <a href="{$a}">Download the mobile app and receive notifications on your mobile device</a>.';
$string['remoteaddons'] = 'Remote add-ons';
$string['scanqrcode'] = 'Scan QR code';
$string['selfsignedoruntrustedcertificatewarning'] = 'It seems that the HTTPS certificate is self-signed or not trusted. The mobile app will only work with trusted sites. Please use any online SSL checker to diagnose the problem. If it indicates that your certificate is OK, you can ignore this warning.';
-18
View File
@@ -105,24 +105,6 @@ function xmldb_tool_moodlenet_upgrade(int $oldversion) {
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2021052501) {
// Find out if there are users with MoodleNet profiles set.
$sql = "SELECT u.*
FROM {user} u
WHERE u.moodlenetprofile IS NOT NULL";
$records = $DB->get_records_sql($sql);
foreach ($records as $record) {
// Force clean user value just incase there is something malicious.
$record->moodlenetprofile = clean_text($record->moodlenetprofile, PARAM_NOTAGS);
$DB->update_record('user', $record);
}
upgrade_plugin_savepoint(true, 2021052501, 'tool', 'moodlenet');
}
if ($oldversion < 2022021600) {
// This is a special case for if MoodleNet integration has never been enabled,
// or if defaultmoodlenet is not set for whatever reason.
@@ -14,24 +14,19 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the import_handler_info class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_moodlenet\local\tests;
namespace tool_moodlenet\local;
use tool_moodlenet\local\import_handler_info;
use tool_moodlenet\local\import_strategy;
use tool_moodlenet\local\import_strategy_file;
defined('MOODLE_INTERNAL') || die();
/**
* Class tool_moodlenet_import_handler_info_testcase, providing test cases for the import_handler_info class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_handler_info_test extends \advanced_testcase {
@@ -14,15 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the import_handler_registry class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_moodlenet\local\tests;
namespace tool_moodlenet\local;
use tool_moodlenet\local\import_handler_registry;
use tool_moodlenet\local\import_handler_info;
@@ -31,10 +23,13 @@ use tool_moodlenet\local\import_strategy_link;
use tool_moodlenet\local\remote_resource;
use tool_moodlenet\local\url;
defined('MOODLE_INTERNAL') || die();
/**
* Class tool_moodlenet_import_handler_registry_testcase, providing test cases for the import_handler_registry class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_handler_registry_test extends \advanced_testcase {
@@ -14,24 +14,19 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the import_info class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_moodlenet\local\tests;
namespace tool_moodlenet\local;
use tool_moodlenet\local\import_info;
use tool_moodlenet\local\remote_resource;
use tool_moodlenet\local\url;
defined('MOODLE_INTERNAL') || die();
/**
* Class tool_moodlenet_import_info_testcase, providing test cases for the import_info class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_info_test extends \advanced_testcase {
@@ -14,15 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the import_processor class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_moodlenet\local\tests;
namespace tool_moodlenet\local;
use tool_moodlenet\local\import_handler_registry;
use tool_moodlenet\local\import_processor;
@@ -31,10 +23,13 @@ use tool_moodlenet\local\import_strategy_link;
use tool_moodlenet\local\remote_resource;
use tool_moodlenet\local\url;
defined('MOODLE_INTERNAL') || die();
/**
* Class tool_moodlenet_import_processor_testcase, providing test cases for the import_processor class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_processor_test extends \advanced_testcase {
@@ -14,24 +14,19 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace tool_moodlenet\local;
use tool_moodlenet\local\remote_resource;
use tool_moodlenet\local\url;
/**
* Unit tests for the remote_resource class.
* Class tool_moodlenet_remote_resource_testcase, providing test cases for the remote_resource class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_moodlenet\local\tests;
use tool_moodlenet\local\remote_resource;
use tool_moodlenet\local\url;
defined('MOODLE_INTERNAL') || die();
/**
* Class tool_moodlenet_remote_resource_testcase, providing test cases for the remote_resource class.
*/
class remote_resource_test extends \advanced_testcase {
/**
@@ -14,23 +14,18 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace tool_moodlenet\local;
use tool_moodlenet\local\url;
/**
* Unit tests for the url class.
* Class tool_moodlenet_url_testcase, providing test cases for the url class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_moodlenet\local\tests;
use tool_moodlenet\local\url;
defined('MOODLE_INTERNAL') || die();
/**
* Class tool_moodlenet_url_testcase, providing test cases for the url class.
*/
class url_test extends \advanced_testcase {
/**
@@ -135,7 +135,6 @@ Feature: Basic OAuth2 functionality
And I set the following fields to these values:
| Name | Testing service modified |
And I press "Save changes"
And I should see "Could not discover service endpoints"
And I should see "Testing service modified"
And I click on "Delete" "link" in the "Testing service modified" "table_row"
And I should see "Are you sure you want to delete the identity issuer \"Testing service modified\"?"
@@ -240,13 +239,12 @@ Feature: Basic OAuth2 functionality
And I press "Save changes"
And "Do not allow login" "icon" should exist in the "Valid custom" "table_row"
And "Allow services" "icon" should exist in the "Valid custom" "table_row"
And "Service discovery successful" "icon" should exist in the "Valid custom" "table_row"
And I should see "-" in the "Valid custom" "table_row"
And I click on "Edit" "link" in the "Valid custom service" "table_row"
And I set the following fields to these values:
| Name | Invalid custom service |
| Service base URL | https://dc.imsglobal.org/ |
And I press "Save changes"
Then I should see "Could not discover end points for identity issuer: Invalid custom service"
And I should see "-" in the "Invalid custom service" "table_row"
And I click on "Delete" "link" in the "Invalid custom service" "table_row"
And I should see "Are you sure you want to delete the identity issuer \"Invalid custom service\"?"
@@ -282,13 +280,12 @@ Feature: Basic OAuth2 functionality
And I press "Save changes"
And "Do not allow login" "icon" should exist in the "Valid custom" "table_row"
And "Allow services" "icon" should exist in the "Valid custom" "table_row"
And "Service discovery successful" "icon" should exist in the "Valid custom" "table_row"
And I should see "-" in the "Valid custom" "table_row"
And I click on "Edit" "link" in the "Valid custom service" "table_row"
And I set the following fields to these values:
| Name | Invalid custom service |
| Service base URL | https://dc.imsglobal.org/ |
And I press "Save changes"
Then I should see "Could not discover end points for identity issuer: Invalid custom service"
And I should see "-" in the "Invalid custom service" "table_row"
And I click on "Edit" "link" in the "Invalid custom service" "table_row"
And I set the following fields to these values:
@@ -352,9 +349,12 @@ Feature: Basic OAuth2 functionality
And I should see "Custom display name" in the "Empty custom service" "table_row"
And "Not configured" "icon" should exist in the "Empty custom service" "table_row"
And "Do not allow services" "icon" should exist in the "Empty custom service" "table_row"
And I click on "Edit" "link" in the "Empty custom service" "table_row"
And I click on "Configure endpoints" "link" in the "Empty custom service" "table_row"
And I press "Create new endpoint for issuer \"Empty custom service\""
And I set the following fields to these values:
| Service base URL | https://accounts.google.com |
| Name | userinfo_endpoint |
| URL | https://example.com/userinfo |
And I press "Save changes"
And I navigate to "Server > OAuth 2 services" in site administration
And "Allow login" "icon" should exist in the "Empty custom service" "table_row"
And "Do not allow services" "icon" should exist in the "Empty custom service" "table_row"
@@ -19,7 +19,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -53,7 +53,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -98,7 +98,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -157,7 +157,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -210,7 +210,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -522,7 +522,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
When I press "Create my new account"
Then I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -647,7 +647,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -716,7 +716,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -858,7 +858,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -86,7 +86,7 @@ Feature: Optional policies
| Email address | user3@address.invalid |
| Email (again) | user3@address.invalid |
| First name | User3 |
| Surname | L3 |
| Last name | L3 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user3@address.invalid"
+6
View File
@@ -51,6 +51,12 @@ if ($listurl) {
$PAGE->navbar->add($listurl, $listurlnav);
}
// Add a new nav item to make $listurl clickable for the Boost theme.
if (isset($script)) {
$lastrunnav = get_string('lastrun', 'tool_profiling');
$PAGE->navbar->add($lastrunnav);
}
// Header
echo $OUTPUT->header();
@@ -41,6 +41,7 @@ $string['importok'] = 'File "{$a}" imported successfully.';
$string['importprefix'] = 'Import prefix';
$string['importproblem'] = 'Some problem happened importing the file "{$a}".';
$string['lastrunof'] = 'Summary of last run of {$a}';
$string['lastrun'] = 'Summary of last run';
$string['markreferencerun'] = 'Mark as reference run/comment';
$string['memory'] = 'Memory used';
$string['pluginname'] = 'Profiling runs';
@@ -243,6 +243,16 @@ class category_bin extends base_bin {
throw new \moodle_exception("Could not create course to restore into.");
}
// As far as recycle bin is using MODE_AUTOMATED, it observes the General restore settings.
// For recycle bin we want to ensure that backup files are always restore the users and groups information.
// In order to achieve that, we hack the setting here via $CFG->forced_plugin_settings,
// so it won't interfere other operations.
// See MDL-65218 and MDL-35773 for more information.
// This hack will be removed once recycle bin switches to use its own backup mode, with
// own preferences and 100% separate from MOODLE_AUTOMATED.
// TODO: Remove this as part of MDL-65228.
$CFG->forced_plugin_settings['restore'] = ['restore_general_users' => 1, 'restore_general_groups' => 1];
// Define the import.
$controller = new \restore_controller(
$tempdir,
@@ -277,6 +287,10 @@ class category_bin extends base_bin {
// Run the import.
$controller->execute_plan();
// We don't need the forced setting anymore, hence unsetting it.
// TODO: Remove this as part of MDL-65228.
unset($CFG->forced_plugin_settings['restore']);
// Have finished with the controller, let's destroy it, freeing mem and resources.
$controller->destroy();
@@ -234,6 +234,16 @@ class course_bin extends base_bin {
$fb = get_file_packer('application/vnd.moodle.backup');
$fb->extract_to_pathname($file, $fulltempdir);
// As far as recycle bin is using MODE_AUTOMATED, it observes the General restore settings.
// For recycle bin we want to ensure that backup files are always restore the users and groups information.
// In order to achieve that, we hack the setting here via $CFG->forced_plugin_settings,
// so it won't interfere other operations.
// See MDL-65218 and MDL-35773 for more information.
// This hack will be removed once recycle bin switches to use its own backup mode, with
// own preferences and 100% separate from MOODLE_AUTOMATED.
// TODO: Remove this as part of MDL-65228.
$CFG->forced_plugin_settings['restore'] = ['restore_general_users' => 1, 'restore_general_groups' => 1];
// Define the import.
$controller = new \restore_controller(
$tempdir,
@@ -264,6 +274,10 @@ class course_bin extends base_bin {
// Run the import.
$controller->execute_plan();
// We don't need the forced setting anymore, hence unsetting it.
// TODO: Remove this as part of MDL-65228.
unset($CFG->forced_plugin_settings['restore']);
// Have finished with the controller, let's destroy it, freeing mem and resources.
$controller->destroy();
@@ -22,35 +22,30 @@ Feature: Backup user data
And the following "activities" exist:
| activity | course | section | name | intro |
| quiz | C1 | 1 | Quiz 1 | Test quiz description |
And the following "question categories" exist:
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist:
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And quiz "Quiz 1" contains the following questions:
| question | page |
| TF1 | 1 |
| TF2 | 1 |
@javascript
Scenario: Delete and restore a quiz with user data
Given I am on the "Quiz 1" "quiz activity" page logged in as teacher1
And I add a "True/False" question to the "Quiz 1" quiz with:
| Question name | TF1 |
| Question text | First question |
| General feedback | Thank you, this is the general feedback |
| Correct answer | False |
| Feedback for the response 'True'. | So you think it is true |
| Feedback for the response 'False'. | So you think it is false |
And I add a "True/False" question to the "Quiz 1" quiz with:
| Question name | TF2 |
| Question text | Second question |
| General feedback | Thank you, this is the general feedback |
| Correct answer | False |
| Feedback for the response 'True'. | So you think it is true |
| Feedback for the response 'False'. | So you think it is false |
And I set the field "maxgrade" to "10.0"
And I press "savechanges"
And I log out
When I am on the "Quiz 1" "quiz activity" page logged in as student1
Scenario Outline: Delete and restore a quiz with user data
Given the following config values are set as admin:
| restore_general_users | <include_user> | restore |
And I am on the "Quiz 1" "quiz activity" page logged in as student1
And I press "Attempt quiz"
And I click on "True" "radio" in the "First question" "question"
And I click on "False" "radio" in the "Second question" "question"
And I press "Finish attempt"
And I press "Submit all and finish"
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue"
And I should see "5.00 out of 10.00"
And I should see "50.00 out of 100.00"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
@@ -63,5 +58,10 @@ Feature: Backup user data
And I log in as "student1"
And I am on "Course 1" course homepage
When I navigate to "User report" in the course gradebook
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5"
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "50"
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50"
Examples:
| include_user | case_explanation |
| 1 | Checked |
| 1 | Unchecked |
@@ -190,6 +190,11 @@ class category_bin_test extends \advanced_testcase {
(object)['plugin' => 'backup', 'name' => 'backup_auto_storage', 'value' => 2],
(object)['plugin' => 'backup', 'name' => 'backup_auto_destination', 'value' => true],
]],
'restore/restore_general_users moodle' => [[
(object)['plugin' => 'restore', 'name' => 'restore_general_users', 'value' => 0],
(object)['plugin' => 'restore', 'name' => 'restore_general_groups', 'value' => 0],
]],
];
}
@@ -187,6 +187,11 @@ class course_bin_test extends \advanced_testcase {
(object)['plugin' => 'backup', 'name' => 'backup_auto_storage', 'value' => 2],
(object)['plugin' => 'backup', 'name' => 'backup_auto_destination', 'value' => true],
]],
'restore/restore_general_users moodle' => [[
(object)['plugin' => 'restore', 'name' => 'restore_general_users', 'value' => 0],
(object)['plugin' => 'restore', 'name' => 'restore_general_groups', 'value' => 0],
]],
];
}
+2 -3
View File
@@ -213,10 +213,9 @@ class tool_task_renderer extends plugin_renderer_base {
* @return string HTML.
*/
public function next_run_time(scheduled_task $task): string {
$plugininfo = core_plugin_manager::instance()->get_plugin_info($task->get_component());
$nextrun = $task->get_next_run_time();
if ($plugininfo && $plugininfo->is_enabled() === false && !$task->get_run_if_component_disabled()) {
if (!$task->is_component_enabled() && !$task->get_run_if_component_disabled()) {
$nextrun = get_string('plugindisabled', 'tool_task');
} else if ($task->get_disabled()) {
$nextrun = get_string('taskdisabled', 'tool_task');
@@ -66,14 +66,10 @@ Feature: Upload users
@javascript
Scenario: Upload users with custom profile fields
# Create user profile field.
Given I log in as "admin"
And I navigate to "Users > Accounts > User profile fields" in site administration
And I click on "Create a new profile field" "link"
And I click on "Text area" "link"
And I set the following fields to these values:
| Short name | superfield |
| Name | Super field |
And I click on "Save changes" "button"
Given the following "custom profile fields" exist:
| datatype | shortname | name |
| text | superfield | Super field |
And I log in as "admin"
# Upload users.
When I navigate to "Users > Accounts > Upload users" in site administration
And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+127 -4
View File
@@ -44,7 +44,7 @@ import {prefetchStrings} from 'core/prefetch';
* @constant
* @type {number}
*/
const MINSPACING = 50;
const MINSPACING = 10;
/**
* A user tour.
@@ -83,6 +83,12 @@ const Tour = class {
// Apply configuration.
this.configure.apply(this, arguments);
// Unset recalculate state.
this.possitionNeedToBeRecalculated = false;
// Unset recalculate count.
this.recalculatedNo = 0;
try {
this.storage = window.sessionStorage;
this.storageKey = 'tourstate_' + this.tourName;
@@ -396,6 +402,11 @@ const Tour = class {
return false;
}
// Check if the CSS styles are allowed on the browser or not.
if (!this.isCSSAllowed()) {
return false;
}
let target = this.getStepTarget(stepConfig);
if (target && target.length && target.is(':visible')) {
// Without a target, there can be no step.
@@ -405,6 +416,22 @@ const Tour = class {
return false;
}
/**
* Is the browser actually allow CSS styles?
*
* @returns {boolean} True if the browser is allowing CSS styles
*/
isCSSAllowed() {
const testCSSElement = document.createElement('div');
testCSSElement.classList.add('hide');
document.body.appendChild(testCSSElement);
const styles = window.getComputedStyle(testCSSElement);
const isAllowed = styles.display === 'none';
testCSSElement.remove();
return isAllowed;
}
/**
* Go to the next step in the tour.
*
@@ -924,6 +951,7 @@ const Tour = class {
// Configure ARIA attributes on the target.
let target = this.getStepTarget(stepConfig);
if (target) {
target.data('original-tabindex', target.attr('tabindex'));
if (!target.attr('tabindex')) {
target.attr('tabindex', 0);
}
@@ -1150,6 +1178,12 @@ const Tour = class {
if (target.data('original-tabindex')) {
target.attr('tabindex', target.data('tabindex'));
} else {
// If the target does not have the tabindex attribute at the beginning. We need to remove it.
// We should wait a little here before removing the attribute to prevent the browser from adding it again.
window.setTimeout(() => {
target.removeAttr('tabindex');
}, 400);
}
}
@@ -1296,6 +1330,7 @@ const Tour = class {
*/
positionStep(stepConfig) {
let content = this.currentStepNode;
let thisT = this;
if (!content || !content.length) {
// Unable to find the step node.
return this;
@@ -1335,9 +1370,15 @@ const Tour = class {
},
onCreate: function(data) {
recalculateArrowPosition(data);
recalculateStepPosition(data);
},
onUpdate: function(data) {
recalculateArrowPosition(data);
if (thisT.possitionNeedToBeRecalculated) {
thisT.recalculatedNo++;
thisT.possitionNeedToBeRecalculated = false;
recalculateStepPosition(data);
}
},
};
@@ -1387,6 +1428,90 @@ const Tour = class {
}
};
const recalculateStepPosition = function(data) {
const placement = data.placement.split('-')[0];
const isVertical = ['left', 'right'].indexOf(placement) !== -1;
const popperElement = $(data.instance.popper);
const targetElement = $(data.instance.reference);
const arrowElement = popperElement.find('[data-role="arrow"]');
const stepElement = popperElement.find('[data-role="flexitour-step"]');
const viewportHeight = $(window).height();
const viewportWidth = $(window).width();
const arrowHeight = parseFloat(arrowElement.outerHeight(true));
const popperHeight = parseFloat(popperElement.outerHeight(true));
const targetHeight = parseFloat(targetElement.outerHeight(true));
const arrowWidth = parseFloat(arrowElement.outerWidth(true));
const popperWidth = parseFloat(popperElement.outerWidth(true));
const targetWidth = parseFloat(targetElement.outerWidth(true));
let maxHeight;
if (thisT.recalculatedNo > 1) {
// The current screen is too small, and cannot fit with the original placement.
// We should set the placement to auto so the PopperJS can calculate the perfect placement.
thisT.currentStepPopper.options.placement = isVertical ? 'auto-left' : 'auto-bottom';
}
if (thisT.recalculatedNo > 2) {
// Return here to prevent recursive calling.
return;
}
if (isVertical) {
// Find the best place to put the tour: Left of right.
const leftSpace = targetElement.offset().left > 0 ? targetElement.offset().left : 0;
const rightSpace = viewportWidth - leftSpace - targetWidth;
const remainingSpace = leftSpace >= rightSpace ? leftSpace : rightSpace;
maxHeight = viewportHeight - MINSPACING * 2;
if (remainingSpace < (popperWidth + arrowWidth)) {
const maxWidth = remainingSpace - MINSPACING - arrowWidth;
if (maxWidth > 0) {
popperElement.css({
'max-width': maxWidth + 'px',
});
// Not enough space, flag true to make Popper to recalculate the position.
thisT.possitionNeedToBeRecalculated = true;
}
} else if (maxHeight < popperHeight) {
// Check if the Popper's height can fit the viewport height or not.
// If not, set the correct max-height value for the Popper element.
popperElement.css({
'max-height': maxHeight + 'px',
});
}
} else {
// Find the best place to put the tour: Top of bottom.
const topSpace = targetElement.offset().top > 0 ? targetElement.offset().top : 0;
const bottomSpace = viewportHeight - topSpace - targetHeight;
const remainingSpace = topSpace >= bottomSpace ? topSpace : bottomSpace;
maxHeight = remainingSpace - MINSPACING - arrowHeight;
if (remainingSpace < (popperHeight + arrowHeight)) {
// Not enough space, flag true to make Popper to recalculate the position.
thisT.possitionNeedToBeRecalculated = true;
}
}
// Check if the Popper's height can fit the viewport height or not.
// If not, set the correct max-height value for the body.
const currentStepBody = stepElement.find('[data-placeholder="body"]').first();
const headerEle = stepElement.find('.modal-header').first();
const footerEle = stepElement.find('.modal-footer').first();
const headerHeight = headerEle.outerHeight(true) ?? 0;
const footerHeight = footerEle.outerHeight(true) ?? 0;
maxHeight = maxHeight - headerHeight - footerHeight;
if (maxHeight > 0) {
headerEle.removeClass('minimal');
footerEle.removeClass('minimal');
currentStepBody.css({
'max-height': maxHeight + 'px',
'overflow': 'auto',
});
} else {
headerEle.addClass('minimal');
footerEle.addClass('minimal');
}
// Call the Popper update method to update the position.
thisT.currentStepPopper.update();
};
let background = $('[data-flexitour="step-background"]');
if (background.length) {
target = background;
@@ -1503,9 +1628,7 @@ const Tour = class {
}
let targetPosition = this.calculatePosition(targetNode);
if (targetPosition === 'fixed') {
background.css('top', 0);
} else if (targetPosition === 'absolute') {
if (targetPosition === 'absolute') {
background.css('position', 'fixed');
}
+6
View File
@@ -14,6 +14,12 @@ span[data-flexitour="container"] .modal-dialog .modal-content .modal-header {
border-bottom: 0;
}
span[data-flexitour="container"] .modal-dialog .modal-content .modal-header.minimal,
span[data-flexitour="container"] .modal-dialog .modal-content .modal-footer.minimal {
padding-top: 0;
padding-bottom: 0;
}
span[data-flexitour="container"] .modal-dialog .modal-content .modal-footer {
justify-content: flex-start;
border-top: 0;
@@ -58,7 +58,7 @@ Feature: Apply content type to a tour
And I click on "New step" "link"
And I set the field "Title" to "tour_activityinfo_course_teacher_title,tool_usertours"
And I select "Manual" from the "Content type" singleselect
And I set the field "id_content" to "<b>Test content</b>"
And I set the field "id_content" to "<p><strong>Test content</strong></p>"
And I press "Save changes"
And I should see "New: Activity information"
And I should see "Test content"
@@ -66,7 +66,7 @@ Feature: Apply content type to a tour
And I should see "Editing \"New: Activity information\""
And I should not see "Language string ID" in the "#fitem_id_contentlangstring" "css_element"
And the field "Title" matches value "tour_activityinfo_course_teacher_title,tool_usertours"
And the field "id_content" matches value "<b>Test content</b>"
And the field "id_content" matches value "<p><strong>Test content</strong></p>"
@javascript
Scenario: Tour name and description can be translatable
+23 -6
View File
@@ -22,6 +22,8 @@
* @package core
*/
use core_user\fields;
define('NO_OUTPUT_BUFFERING', true);
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
@@ -37,7 +39,7 @@ if (empty($SESSION->bulk_users)) {
}
if ($dataformat) {
$fields = array('id' => 'id',
$originfields = array('id' => 'id',
'username' => 'username',
'email' => 'email',
'firstname' => 'firstname',
@@ -51,8 +53,10 @@ if ($dataformat) {
'country' => 'country');
$extrafields = profile_get_user_fields_with_data(0);
$profilefields = [];
foreach ($extrafields as $formfield) {
$fields['profile_field_'.$formfield->get_shortname()] = 'profile_field_'.$formfield->get_shortname();
$profilefields[fields::PROFILE_FIELD_PREFIX . $formfield->get_shortname()] = fields::PROFILE_FIELD_PREFIX .
$formfield->get_shortname();
}
$filename = clean_filename(get_string('users'));
@@ -60,17 +64,17 @@ if ($dataformat) {
$downloadusers = new ArrayObject($SESSION->bulk_users);
$iterator = $downloadusers->getIterator();
\core\dataformat::download_data($filename, $dataformat, $fields, $iterator, function($userid, $supportshtml)
use ($extrafields, $fields) {
\core\dataformat::download_data($filename, $dataformat, array_merge($originfields, $profilefields), $iterator,
function($userid, $supportshtml) use ($originfields) {
global $DB;
if (!$user = $DB->get_record('user', array('id' => $userid))) {
return null;
}
profile_load_data($user);
$userprofiledata = array();
foreach ($fields as $field => $unused) {
foreach ($originfields as $field) {
// Custom user profile textarea fields come in an array
// The first element is the text and the second is the format.
// We only take the text.
@@ -82,6 +86,19 @@ if ($dataformat) {
$userprofiledata[$field] = $user->$field;
}
}
// Formatting extra field if transform is true.
$extrafields = profile_get_user_fields_with_data($userid);
foreach ($extrafields as $field) {
$fieldkey = fields::PROFILE_FIELD_PREFIX . $field->get_shortname();
if ($field->is_transform_supported()) {
$userprofiledata[$fieldkey] = $field->display_data();
} else {
$userprofiledata[$fieldkey] = $field->data;
}
}
return $userprofiledata;
});
+3 -3
View File
@@ -18,7 +18,7 @@ Feature: User must accept policy when logging in and signing up
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
@@ -48,7 +48,7 @@ Feature: User must accept policy when logging in and signing up
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| Last name | L1 |
| I understand and agree | 1 |
And I press "Create my new account"
And I should see "Confirm your account"
@@ -81,7 +81,7 @@ Feature: User must accept policy when logging in and signing up
| Email address | <email1> |
| Email (again) | <email2> |
| First name | Jane |
| Surname | Doe |
| Last name | Doe |
And I press "Create my new account"
Then I should <expect> "This email address is already registered. Perhaps you created an account in the past?"
And I should <expect2> "Invalid email address"
+2 -2
View File
@@ -59,8 +59,8 @@ $string['privacy:metadata:mnet_external:institution'] = 'The institution that th
$string['privacy:metadata:mnet_external:lang'] = 'A user preference for the language shown.';
$string['privacy:metadata:mnet_external:lastaccess'] = 'The time that the user last accessed the site.';
$string['privacy:metadata:mnet_external:lastlogin'] = 'The last login of this user.';
$string['privacy:metadata:mnet_external:lastname'] = 'The surname of the user.';
$string['privacy:metadata:mnet_external:lastnamephonetic'] = 'The phonetic details about the user\'s surname.';
$string['privacy:metadata:mnet_external:lastname'] = 'The last name of the user.';
$string['privacy:metadata:mnet_external:lastnamephonetic'] = 'The phonetic details of the user\'s last name.';
$string['privacy:metadata:mnet_external:maildigest'] = 'A setting for the mail digest for this user.';
$string['privacy:metadata:mnet_external:maildisplay'] = 'A preference for the user about displaying their email address to other users.';
$string['privacy:metadata:mnet_external:middlename'] = 'The middle name of the user';
+2 -2
View File
@@ -86,7 +86,7 @@ Please log in as before, using the link on the login page.
{$a->admin}';
$string['emailpasswordchangeinfosubject'] = '{$a}: Change password information';
$string['info'] = 'External account';
$string['issuer'] = 'OAuth 2 Service';
$string['issuer'] = 'OAuth 2 service';
$string['issuernologin'] = 'This issuer can not be used to login';
$string['linkedlogins'] = 'Linked logins';
$string['linkedloginshelp'] = 'Help with linked logins';
@@ -95,7 +95,7 @@ $string['loginerror_nouserinfo'] = 'No user information was returned. The OAuth
$string['loginerror_invaliddomain'] = 'The email address is not allowed at this site.';
$string['loginerror_authenticationfailed'] = 'The authentication process failed.';
$string['loginerror_cannotcreateaccounts'] = 'An account with your email address could not be found.';
$string['noissuersavailable'] = 'None of the configured OAuth2 services allow you to link login accounts';
$string['noissuersavailable'] = 'None of the configured OAuth 2 services allow you to link login accounts.';
$string['notloggedindebug'] = 'The login attempt failed. Reason: {$a}';
$string['notwhileloggedinas'] = 'Linked logins cannot be managed while logged in as another user.';
$string['oauth2:managelinkedlogins'] = 'Manage own linked login accounts';
@@ -32,7 +32,7 @@ Feature: Confirm that availability_completion works with previous activity setti
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
And I click on "Displayed greyed-out if user does not meet this condition Click to hide" "link"
And I click on "Displayed if student doesn't meet this condition Click to hide" "link"
And I set the field "Activity or resource" to "Previous activity with completion"
And I press "Save and return to course"
Then I should see "Not available unless: The previous activity with completion" in the "region-main" "region"
@@ -58,7 +58,7 @@ Feature: Confirm that availability_completion works with previous activity setti
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
And I click on "Displayed greyed-out if user does not meet this condition Click to hide" "link"
And I click on "Displayed if student doesn't meet this condition Click to hide" "link"
And I set the field "Activity or resource" to "Previous activity with completion"
And I press "Save and return to course"
Then I should see "Not available unless: The previous activity with completion" in the "region-main" "region"
@@ -83,7 +83,7 @@ Feature: Confirm that availability_completion works with previous activity setti
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
And I click on "Displayed greyed-out if user does not meet this condition Click to hide" "link"
And I click on "Displayed if student doesn't meet this condition Click to hide" "link"
And I set the field "Activity or resource" to "Previous activity with completion"
And I press "Save and return to course"
Then I should see "Not available unless: The previous activity with completion" in the "region-main" "region"
@@ -112,7 +112,7 @@ Feature: Confirm that availability_completion works with previous activity setti
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
And I click on "Displayed greyed-out if user does not meet this condition Click to hide" "link"
And I click on "Displayed if student doesn't meet this condition Click to hide" "link"
And I set the field "Activity or resource" to "Previous activity with completion"
And I press "Save changes"
Then I should see "Not available unless: The previous activity with completion" in the "region-main" "region"
@@ -138,7 +138,7 @@ Feature: Confirm that availability_completion works with previous activity setti
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
And I click on "Displayed greyed-out if user does not meet this condition Click to hide" "link"
And I click on "Displayed if student doesn't meet this condition Click to hide" "link"
Then the "Activity or resource" select box should not contain "Previous activity with completion"
# Set Page2 restriction to Previous Activity with completion and delete Page1.
@@ -148,7 +148,7 @@ Feature: Confirm that availability_completion works with previous activity setti
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
And I click on "Displayed greyed-out if user does not meet this condition Click to hide" "link"
And I click on "Displayed if student doesn't meet this condition Click to hide" "link"
And I set the field "Activity or resource" to "Previous activity with completion"
And I press "Save and return to course"
Then I should see "Not available unless: The previous activity with completion" in the "region-main" "region"
@@ -170,7 +170,7 @@ Feature: Confirm that availability_completion works with previous activity setti
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
And I click on "Displayed greyed-out if user does not meet this condition Click to hide" "link"
And I click on "Displayed if student doesn't meet this condition Click to hide" "link"
And I set the field "Activity or resource" to "Previous activity with completion"
And I press "Save changes"
Then I should see "Not available unless: The previous activity with completion" in the "region-main" "region"
@@ -184,7 +184,7 @@ Feature: Confirm that availability_completion works with previous activity setti
And I expand all fieldsets
And I click on "Add restriction..." "button"
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
And I click on "Displayed greyed-out if user does not meet this condition Click to hide" "link"
And I click on "Displayed if student doesn't meet this condition Click to hide" "link"
And I set the field "Activity or resource" to "Previous activity with completion"
And I press "Save changes"
Then I should see "Not available unless: The previous activity with completion" in the "region-main" "region"
@@ -49,7 +49,7 @@ class frontend extends \core_availability\frontend {
protected function get_javascript_strings() {
return array('ajaxerror', 'direction_before', 'direction_from', 'direction_until',
'direction_label');
'direction_label', 'error_dateconflict');
}
/**
@@ -28,6 +28,7 @@ $string['direction_from'] = 'from';
$string['direction_label'] = 'Direction';
$string['direction_until'] = 'until';
$string['description'] = 'Prevent access until (or from) a specified date and time.';
$string['error_dateconflict'] = 'Conflicts with other date restrictions';
$string['full_from'] = 'It is after <strong>{$a}</strong>';
$string['full_from_date'] = 'It is on or after <strong>{$a}</strong>';
$string['full_until'] = 'It is before <strong>{$a}</strong>';
@@ -142,5 +142,84 @@ M.availability_date.form.fillValue = function(value, node) {
value.t = parseInt(node.getData('time'), 10);
};
/**
* List out Date node value in an array node.
*
* This will go through all array node and list from earlier date node to current date node.
*
* @method convertTreeDateValue
* @param {array} tree Tree node to convert
* @param {array} arrayDateNode
* @param {array} currentNode current node.
*
* @return {array} arrayDateNode
*/
M.availability_date.form.convertTreeDateValue = function(tree, arrayDateNode, currentNode) {
var shouldSkip = false;
tree.forEach(function(node) {
if (shouldSkip) {
return;
}
if (node.type === 'date') {
// We go through all tree node, if we meet the current node then return.
if (node.t === parseInt(currentNode.getData('time'), 10)
&& currentNode.one('select[name=direction]').get('value') == node.d) {
shouldSkip = true;
return;
}
arrayDateNode.push(node);
} else if (node.type === undefined) {
M.availability_date.form.convertTreeDateValue(node.c, arrayDateNode, currentNode);
}
});
return arrayDateNode;
};
/**
* Check current node.
*
* This will check current date node with all date node in tree node.
*
* @method checkConditionDate
* @param {array} currentNode The curent node.
*
* @return {boolean} error Return true if the date is conflict.
*/
M.availability_date.form.checkConditionDate = function(currentNode) {
var error = false;
if (M.core_availability.form.rootList.getValue().op === '&') {
var jsValue = M.core_availability.form.rootList.getValue().c;
var arrayDateNode = M.availability_date.form.convertTreeDateValue(jsValue, [], currentNode);
var currentNodeDirection = currentNode.one('select[name=direction]').get('value');
var currentNodeTime = parseInt(currentNode.getData('time'), 10);
arrayDateNode.forEach(function(checkNode) {
// Validate if the date is conflict.
if (checkNode.d === '<') {
if (currentNodeDirection === '>=' && currentNodeTime >= checkNode.t) {
error = true;
}
} else {
if (currentNodeDirection === '<' && currentNodeTime <= checkNode.t) {
error = true;
}
}
return error;
});
return error;
} else {
if (currentNode.one('div > .badge-warning')) {
currentNode.one('div > .badge-warning').remove();
}
return error;
}
};
M.availability_date.form.fillErrors = function(errors, node) {
var error = M.availability_date.form.checkConditionDate(node);
if (error) {
errors.push('availability_date:error_dateconflict');
}
};
}, '@VERSION@', {"requires": ["base", "node", "event", "io", "moodle-core_availability-form"]});
@@ -1 +1 @@
YUI.add("moodle-availability_date-form",function(o,e){M.availability_date=M.availability_date||{},M.availability_date.form=o.Object(M.core_availability.plugin),M.availability_date.form.initInner=function(e,a){this.html=e,this.defaultTime=a},M.availability_date.form.getNode=function(e){var t,i,a='<span class="col-form-label pr-3">'+M.util.get_string("direction_before","availability_date")+'</span> <span class="availability-group"><label><span class="accesshide">'+M.util.get_string("direction_label","availability_date")+' </span><select name="direction" class="custom-select"><option value="&gt;=">'+M.util.get_string("direction_from","availability_date")+'</option><option value="&lt;">'+M.util.get_string("direction_until","availability_date")+"</option></select></label></span> "+this.html,n=o.Node.create("<span>"+a+"</span>");return e.t!==undefined?(n.setData("time",e.t),n.all("select:not([name=direction])").each(function(e){e.set("disabled",!0)}),a=M.cfg.wwwroot+"/availability/condition/date/ajax.php?action=fromtime&time="+e.t,o.io(a,{on:{success:function(e,a){var t,i,l=o.JSON.parse(a.responseText);for(t in l)(i=n.one("select[name=x\\["+t+"\\]]")).set("value",""+l[t]),i.set("disabled",!1)},failure:function(){window.alert(M.util.get_string("ajaxerror","availability_date"))}}})):n.setData("time",this.defaultTime),e.d!==undefined&&n.one("select[name=direction]").set("value",e.d),M.availability_date.form.addedEvents||(M.availability_date.form.addedEvents=!0,(a=o.one(".availability-field")).delegate("change",function(){M.core_availability.form.update()},".availability_date select[name=direction]"),a.delegate("change",function(){M.availability_date.form.updateTime(this.ancestor("span.availability_date"))},".availability_date select:not([name=direction])")),n.one("a[href=#]")&&(M.form.dateselector.init_single_date_selector(n),t=n.one("select[name=x\\[year\\]]"),i=t.set,t.set=function(e,a){i.call(t,e,a),"selectedIndex"===e&&setTimeout(function(){M.availability_date.form.updateTime(n)},0)}),n},M.availability_date.form.updateTime=function(t){var e=M.cfg.wwwroot+"/availability/condition/date/ajax.php?action=totime&year="+t.one("select[name=x\\[year\\]]").get("value")+"&month="+t.one("select[name=x\\[month\\]]").get("value")+"&day="+t.one("select[name=x\\[day\\]]").get("value")+"&hour="+t.one("select[name=x\\[hour\\]]").get("value")+"&minute="+t.one("select[name=x\\[minute\\]]").get("value");o.io(e,{on:{success:function(e,a){t.setData("time",a.responseText),M.core_availability.form.update()},failure:function(){window.alert(M.util.get_string("ajaxerror","availability_date"))}}})},M.availability_date.form.fillValue=function(e,a){e.d=a.one("select[name=direction]").get("value"),e.t=parseInt(a.getData("time"),10)}},"@VERSION@",{requires:["base","node","event","io","moodle-core_availability-form"]});
YUI.add("moodle-availability_date-form",function(o,e){M.availability_date=M.availability_date||{},M.availability_date.form=o.Object(M.core_availability.plugin),M.availability_date.form.initInner=function(e,a){this.html=e,this.defaultTime=a},M.availability_date.form.getNode=function(e){var t,i,a='<span class="col-form-label pr-3">'+M.util.get_string("direction_before","availability_date")+'</span> <span class="availability-group"><label><span class="accesshide">'+M.util.get_string("direction_label","availability_date")+' </span><select name="direction" class="custom-select"><option value="&gt;=">'+M.util.get_string("direction_from","availability_date")+'</option><option value="&lt;">'+M.util.get_string("direction_until","availability_date")+"</option></select></label></span> "+this.html,n=o.Node.create("<span>"+a+"</span>");return e.t!==undefined?(n.setData("time",e.t),n.all("select:not([name=direction])").each(function(e){e.set("disabled",!0)}),a=M.cfg.wwwroot+"/availability/condition/date/ajax.php?action=fromtime&time="+e.t,o.io(a,{on:{success:function(e,a){var t,i,l=o.JSON.parse(a.responseText);for(t in l)(i=n.one("select[name=x\\["+t+"\\]]")).set("value",""+l[t]),i.set("disabled",!1)},failure:function(){window.alert(M.util.get_string("ajaxerror","availability_date"))}}})):n.setData("time",this.defaultTime),e.d!==undefined&&n.one("select[name=direction]").set("value",e.d),M.availability_date.form.addedEvents||(M.availability_date.form.addedEvents=!0,(a=o.one(".availability-field")).delegate("change",function(){M.core_availability.form.update()},".availability_date select[name=direction]"),a.delegate("change",function(){M.availability_date.form.updateTime(this.ancestor("span.availability_date"))},".availability_date select:not([name=direction])")),n.one("a[href=#]")&&(M.form.dateselector.init_single_date_selector(n),t=n.one("select[name=x\\[year\\]]"),i=t.set,t.set=function(e,a){i.call(t,e,a),"selectedIndex"===e&&setTimeout(function(){M.availability_date.form.updateTime(n)},0)}),n},M.availability_date.form.updateTime=function(t){var e=M.cfg.wwwroot+"/availability/condition/date/ajax.php?action=totime&year="+t.one("select[name=x\\[year\\]]").get("value")+"&month="+t.one("select[name=x\\[month\\]]").get("value")+"&day="+t.one("select[name=x\\[day\\]]").get("value")+"&hour="+t.one("select[name=x\\[hour\\]]").get("value")+"&minute="+t.one("select[name=x\\[minute\\]]").get("value");o.io(e,{on:{success:function(e,a){t.setData("time",a.responseText),M.core_availability.form.update()},failure:function(){window.alert(M.util.get_string("ajaxerror","availability_date"))}}})},M.availability_date.form.fillValue=function(e,a){e.d=a.one("select[name=direction]").get("value"),e.t=parseInt(a.getData("time"),10)},M.availability_date.form.convertTreeDateValue=function(e,a,t){var i=!1;return e.forEach(function(e){i||("date"===e.type?e.t!==parseInt(t.getData("time"),10)||t.one("select[name=direction]").get("value")!=e.d?a.push(e):i=!0:e.type===undefined&&M.availability_date.form.convertTreeDateValue(e.c,a,t))}),a},M.availability_date.form.checkConditionDate=function(e){var a,t,i,l=!1;return"&"===M.core_availability.form.rootList.getValue().op?(a=M.core_availability.form.rootList.getValue().c,a=M.availability_date.form.convertTreeDateValue(a,[],e),t=e.one("select[name=direction]").get("value"),i=parseInt(e.getData("time"),10),a.forEach(function(e){return"<"===e.d?">="===t&&i>=e.t&&(l=!0):"<"===t&&i<=e.t&&(l=!0),l})):e.one("div > .badge-warning")&&e.one("div > .badge-warning").remove(),l},M.availability_date.form.fillErrors=function(e,a){M.availability_date.form.checkConditionDate(a)&&e.push("availability_date:error_dateconflict")}},"@VERSION@",{requires:["base","node","event","io","moodle-core_availability-form"]});
@@ -142,5 +142,84 @@ M.availability_date.form.fillValue = function(value, node) {
value.t = parseInt(node.getData('time'), 10);
};
/**
* List out Date node value in an array node.
*
* This will go through all array node and list from earlier date node to current date node.
*
* @method convertTreeDateValue
* @param {array} tree Tree node to convert
* @param {array} arrayDateNode
* @param {array} currentNode current node.
*
* @return {array} arrayDateNode
*/
M.availability_date.form.convertTreeDateValue = function(tree, arrayDateNode, currentNode) {
var shouldSkip = false;
tree.forEach(function(node) {
if (shouldSkip) {
return;
}
if (node.type === 'date') {
// We go through all tree node, if we meet the current node then return.
if (node.t === parseInt(currentNode.getData('time'), 10)
&& currentNode.one('select[name=direction]').get('value') == node.d) {
shouldSkip = true;
return;
}
arrayDateNode.push(node);
} else if (node.type === undefined) {
M.availability_date.form.convertTreeDateValue(node.c, arrayDateNode, currentNode);
}
});
return arrayDateNode;
};
/**
* Check current node.
*
* This will check current date node with all date node in tree node.
*
* @method checkConditionDate
* @param {array} currentNode The curent node.
*
* @return {boolean} error Return true if the date is conflict.
*/
M.availability_date.form.checkConditionDate = function(currentNode) {
var error = false;
if (M.core_availability.form.rootList.getValue().op === '&') {
var jsValue = M.core_availability.form.rootList.getValue().c;
var arrayDateNode = M.availability_date.form.convertTreeDateValue(jsValue, [], currentNode);
var currentNodeDirection = currentNode.one('select[name=direction]').get('value');
var currentNodeTime = parseInt(currentNode.getData('time'), 10);
arrayDateNode.forEach(function(checkNode) {
// Validate if the date is conflict.
if (checkNode.d === '<') {
if (currentNodeDirection === '>=' && currentNodeTime >= checkNode.t) {
error = true;
}
} else {
if (currentNodeDirection === '<' && currentNodeTime <= checkNode.t) {
error = true;
}
}
return error;
});
return error;
} else {
if (currentNode.one('div > .badge-warning')) {
currentNode.one('div > .badge-warning').remove();
}
return error;
}
};
M.availability_date.form.fillErrors = function(errors, node) {
var error = M.availability_date.form.checkConditionDate(node);
if (error) {
errors.push('availability_date:error_dateconflict');
}
};
}, '@VERSION@', {"requires": ["base", "node", "event", "io", "moodle-core_availability-form"]});
+79
View File
@@ -139,3 +139,82 @@ M.availability_date.form.fillValue = function(value, node) {
value.d = node.one('select[name=direction]').get('value');
value.t = parseInt(node.getData('time'), 10);
};
/**
* List out Date node value in an array node.
*
* This will go through all array node and list from earlier date node to current date node.
*
* @method convertTreeDateValue
* @param {array} tree Tree node to convert
* @param {array} arrayDateNode
* @param {array} currentNode current node.
*
* @return {array} arrayDateNode
*/
M.availability_date.form.convertTreeDateValue = function(tree, arrayDateNode, currentNode) {
var shouldSkip = false;
tree.forEach(function(node) {
if (shouldSkip) {
return;
}
if (node.type === 'date') {
// We go through all tree node, if we meet the current node then return.
if (node.t === parseInt(currentNode.getData('time'), 10)
&& currentNode.one('select[name=direction]').get('value') == node.d) {
shouldSkip = true;
return;
}
arrayDateNode.push(node);
} else if (node.type === undefined) {
M.availability_date.form.convertTreeDateValue(node.c, arrayDateNode, currentNode);
}
});
return arrayDateNode;
};
/**
* Check current node.
*
* This will check current date node with all date node in tree node.
*
* @method checkConditionDate
* @param {array} currentNode The curent node.
*
* @return {boolean} error Return true if the date is conflict.
*/
M.availability_date.form.checkConditionDate = function(currentNode) {
var error = false;
if (M.core_availability.form.rootList.getValue().op === '&') {
var jsValue = M.core_availability.form.rootList.getValue().c;
var arrayDateNode = M.availability_date.form.convertTreeDateValue(jsValue, [], currentNode);
var currentNodeDirection = currentNode.one('select[name=direction]').get('value');
var currentNodeTime = parseInt(currentNode.getData('time'), 10);
arrayDateNode.forEach(function(checkNode) {
// Validate if the date is conflict.
if (checkNode.d === '<') {
if (currentNodeDirection === '>=' && currentNodeTime >= checkNode.t) {
error = true;
}
} else {
if (currentNodeDirection === '<' && currentNodeTime <= checkNode.t) {
error = true;
}
}
return error;
});
return error;
} else {
if (currentNode.one('div > .badge-warning')) {
currentNode.one('div > .badge-warning').remove();
}
return error;
}
};
M.availability_date.form.fillErrors = function(errors, node) {
var error = M.availability_date.form.checkConditionDate(node);
if (error) {
errors.push('availability_date:error_dateconflict');
}
};
@@ -34,11 +34,11 @@ $string['option_min'] = 'must be &#x2265;';
$string['option_max'] = 'must be <';
$string['pluginname'] = 'Restriction by grades';
$string['requires_any'] = 'You have a grade in <strong>{$a}</strong>';
$string['requires_max'] = 'You get an appropriate score in <strong>{$a}</strong>';
$string['requires_min'] = 'You achieve a required score in <strong>{$a}</strong>';
$string['requires_max'] = 'You achieve lower than a certain score in <strong>{$a}</strong>';
$string['requires_min'] = 'You achieve higher than a certain score in <strong>{$a}</strong>';
$string['requires_notany'] = 'You do not have a grade in <strong>{$a}</strong>';
$string['requires_notgeneral'] = 'You do not get certain scores in <strong>{$a}</strong>';
$string['requires_range'] = 'You get a particular score in <strong>{$a}</strong>';
$string['requires_range'] = 'You achieve a score within a certain range in <strong>{$a}</strong>';
$string['missing'] = '(missing activity)';
$string['title'] = 'Grade';
$string['privacy:metadata'] = 'The Restriction by grades plugin does not store any personal data.';
@@ -159,5 +159,5 @@ Feature: availability_grade
# Student sees information about no access to group, with group name in correct language.
When I am on the "C1" "Course" page logged in as "student1"
Then I should see "Not available unless: You achieve a required score in A-One"
Then I should see "Not available unless: You achieve higher than a certain score in A-One"
And I should not see "A-Un"
@@ -77,7 +77,7 @@ class condition_test extends \advanced_testcase {
$this->assertFalse($cond->is_available(false, $info, true, $user->id));
$information = $cond->get_description(false, false, $info);
$information = \core_availability\info::format_info($information, $course);
$this->assertMatchesRegularExpression('~achieve a required score.*Test!~', $information);
$this->assertMatchesRegularExpression('~achieve higher than.*Test!~', $information);
$this->assertTrue($cond->is_available(true, $info, true, $user->id));
// Min grade (success).
@@ -95,7 +95,7 @@ class condition_test extends \advanced_testcase {
$this->assertFalse($cond->is_available(false, $info, true, $user->id));
$information = $cond->get_description(false, false, $info);
$information = \core_availability\info::format_info($information, $course);
$this->assertMatchesRegularExpression('~get an appropriate score.*Test!~', $information);
$this->assertMatchesRegularExpression('~achieve lower than a certain score in.*Test!~', $information);
$this->assertTrue($cond->is_available(true, $info, true, $user->id));
// Max grade (success).
@@ -113,7 +113,7 @@ class condition_test extends \advanced_testcase {
$this->assertFalse($cond->is_available(false, $info, true, $user->id));
$information = $cond->get_description(false, false, $info);
$information = \core_availability\info::format_info($information, $course);
$this->assertMatchesRegularExpression('~get a particular score.*Test!~', $information);
$this->assertMatchesRegularExpression('~achieve a score within a certain range.*Test!~', $information);
$this->assertTrue($cond->is_available(true, $info, true, $user->id));
// Still fail (other end).
@@ -64,7 +64,7 @@ class frontend extends \core_availability\frontend {
global $DB;
if ($courseid != $this->allgroupingscourseid) {
$this->allgroupings = $DB->get_records('groupings',
array('courseid' => $courseid), 'id, name');
['courseid' => $courseid], 'name');
$this->allgroupingscourseid = $courseid;
}
return $this->allgroupings;
@@ -62,15 +62,10 @@ Feature: availability_profile
@javascript
Scenario: Test with custom user profile field
# Add custom field.
Given I log in as "admin"
And I navigate to "Users > Accounts > User profile fields" in site administration
And I click on "Create a new profile field" "link"
And I click on "Text input" "link"
And I set the following fields to these values:
| Short name | superfield |
| Name | Super field |
And I click on "Save changes" "button"
Given the following "custom profile fields" exist:
| datatype | shortname | name |
| text | superfield | Super field |
And I log in as "admin"
# Set field value for user.
And I navigate to "Users > Accounts > Browse list of users" in site administration
@@ -86,13 +86,13 @@ Feature: edit_availability
And I should see "Date" in the "Restrict access" "fieldset"
And ".availability-item .availability-eye img" "css_element" should be visible
And ".availability-item .availability-delete img" "css_element" should be visible
And the "alt" attribute of ".availability-item .availability-eye img" "css_element" should contain "Displayed greyed-out"
And the "alt" attribute of ".availability-item .availability-eye img" "css_element" should contain "Displayed if student"
# Toggle the eye icon.
When I click on ".availability-item .availability-eye img" "css_element"
Then the "alt" attribute of ".availability-item .availability-eye img" "css_element" should contain "Hidden entirely"
When I click on ".availability-item .availability-eye img" "css_element"
Then the "alt" attribute of ".availability-item .availability-eye img" "css_element" should contain "Displayed greyed-out"
Then the "alt" attribute of ".availability-item .availability-eye img" "css_element" should contain "Displayed if student"
# Click the delete button.
When I click on ".availability-item .availability-delete img" "css_element"

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