Compare commits

..

666 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 49648fdf30 Moodle release 3.8.9 2021-05-08 16:40:36 +02:00
Eloy Lafuente (stronk7) 210635e015 weekly release 3.8.8+ 2021-05-07 16:54:43 +02:00
Eloy Lafuente (stronk7) c1c224d602 NOBUG: Fixed SVG browser compatibility 2021-05-07 16:54:43 +02:00
Eloy Lafuente (stronk7) 5d14a3a27b Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2021-05-07 16:54:42 +02:00
Mathew May 2f6ff54b11 MDL-70622 mod_lti: Tighten redirect param typing 2021-05-07 11:47:28 +08:00
Adam Olley 7ec37a051e MDL-70622 mod_lti: Prevent xss on lti 1.3 authentication script
Without this, people can craft URLs that other users might use not realising
what they do - and as a XSS vulnerability, it could do any number of things the
clicking-user has access to do on the site.

Change-Id: I82adc71e8706d8929011b4b24523d5b62b8ccea1
2021-05-07 11:47:20 +08:00
Sara Arjona 85778f5ee3 Merge branch 'MDL-71420_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2021-05-06 17:58:55 +02:00
Sara Arjona 03ef84c148 Merge branch 'MDL-71390-38' of git://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2021-05-06 08:05:28 +02:00
AMOS bot 7fd07a352e Automatically generated installer lang files 2021-05-06 00:07:49 +00:00
Eloy Lafuente (stronk7) f3fa3d90c2 MDL-71420 environment: Lower sodium requirement to recommended 2021-05-05 23:06:26 +02:00
Víctor Déniz 42fa42b715 Merge branch 'MDL-71460-38' of git://github.com/peterRd/moodle into MOODLE_38_STABLE 2021-05-05 10:52:21 +01:00
Peter Dias d776693f92 MDL-71460 hub: Use checkboxes instead of dropdowns
Change the yes/no dropdowns to a checkbox. Defaults to unchecked.
2021-05-05 10:28:11 +08:00
AMOS bot b9cd521f6a Automatically generated installer lang files 2021-05-04 00:07:50 +00:00
Paul Holden 2a10e1c6b0 MDL-71359 mod_forum: empty forums shouldn't export anything. 2021-05-03 17:34:08 +02:00
Marina Glancy 2976ff42b9 MDL-71390 core: raise max_input_vars requirement for Moodle 3.11 2021-05-03 13:30:38 +02:00
Sara Arjona cd89f55a46 MDL-71408 lib: Add required changes after lib upgrade
- The pull-request for fixing some minor PHP7.4 problems has been
integrated so this patch is not required
2021-04-30 19:14:10 +01:00
Sara Arjona 45cd4e36fb MDL-71408 lib: Upgrade H5P core library to 1.24.02 2021-04-30 19:14:10 +01:00
Huong Nguyen f799c3042c MDL-70720 Quiz: Improve capability checks when fetching users' best grades 2021-04-30 14:18:24 +02:00
Shamim Rezaie be93a16c16 MDL-69028 repository: Put a rate limit on draft file uploads 2021-04-30 14:18:24 +02:00
Paul Holden c4106464c6 MDL-71130 quiz_grading: escape user idnumber on display. 2021-04-30 14:18:24 +02:00
David Mudrák 8f746357c0 MDL-70804 mnet: Use proper DML method to get records from the table
This improves the code and avoids the risk of SQL injection through the
malicious XML-RPC request from the MNet peer.
2021-04-30 14:18:24 +02:00
Víctor Déniz 57a347a748 weekly release 3.8.8+ 2021-04-30 12:54:22 +01:00
Paul Holden f49cb04ca5 MDL-70763 core: export preferences for correct user.
Ensure we are using the ID of the given user rather than falling
back to that of the current user during privacy export.
2021-04-28 12:31:01 +02:00
Paul Holden a305ee2485 MDL-70763 quiz_overview: export preferences for correct user. 2021-04-28 12:30:56 +02:00
Paul Holden e313b4b446 MDL-70763 gradereport_grader: export preferences for correct user. 2021-04-28 12:30:52 +02:00
Sara Arjona 8ed413eaf9 weekly release 3.8.8+ 2021-04-20 15:51:22 +02:00
Sara Arjona 5013939aa2 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2021-04-20 15:51:21 +02:00
AMOS bot acde050775 Automatically generated installer lang files 2021-04-20 00:07:44 +00:00
Eloy Lafuente (stronk7) 52aa1e4c99 Merge branch 'MDL-69256-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2021-04-20 00:06:04 +02:00
AMOS bot 0da32cf406 Automatically generated installer lang files 2021-04-18 00:07:41 +00:00
AMOS bot ba21297ca7 Automatically generated installer lang files 2021-04-15 00:07:55 +00:00
AMOS bot ea63088252 Automatically generated installer lang files 2021-04-14 00:07:49 +00:00
AMOS bot 7066bec864 Automatically generated installer lang files 2021-04-09 00:07:50 +00:00
AMOS bot 1fe517b522 Automatically generated installer lang files 2021-04-06 00:07:58 +00:00
AMOS bot fcd0785e3f Automatically generated installer lang files 2021-04-04 00:07:56 +00:00
AMOS bot d08501d58e Automatically generated installer lang files 2021-04-02 00:07:42 +00:00
AMOS bot 3a8088c2ad Automatically generated installer lang files 2021-04-01 00:07:45 +00:00
AMOS bot 3e6c1f2f97 Automatically generated installer lang files 2021-03-29 00:07:42 +00:00
AMOS bot e3055df4b8 Automatically generated installer lang files 2021-03-28 00:07:40 +00:00
AMOS bot 2dafc14703 Automatically generated installer lang files 2021-03-25 00:07:48 +00:00
Víctor Déniz f5afb04143 weekly release 3.8.8+ 2021-03-24 14:20:54 +00:00
Víctor Déniz 09756b8b41 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2021-03-24 14:20:52 +00:00
Andrew Nicols 39ad2de97e MDL-69256 tests: Fix random slow test failures in completion cron 2021-03-23 08:08:48 +08:00
Chris Brown 432e0ca9a6 MDL-71139 trademark: Improve the trademark messaging 2021-03-22 12:01:35 +08:00
AMOS bot 041aeab494 Automatically generated installer lang files 2021-03-18 00:07:42 +00:00
AMOS bot c51f4c9dd2 Automatically generated installer lang files 2021-03-13 00:07:43 +00:00
Sara Arjona acd8c191fe weekly release 3.8.8+ 2021-03-11 17:18:58 +01:00
Sara Arjona a0902ad740 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2021-03-11 17:18:57 +01:00
Eloy Lafuente (stronk7) a3ad581e52 Merge branch 'MDL-70726-3.8' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_38_STABLE 2021-03-11 00:12:31 +01:00
AMOS bot 83ce32a4be Automatically generated installer lang files 2021-03-10 00:07:36 +00:00
Amaia Anabitarte bdd8caa90e MDL-70726 behat: Fixing existing fail tests
Some of the current behat tests were wrong but not failing because of the bug in 'should not exist' step.
Once the bug is fixed, we must fix also wrong behats.
2021-03-08 18:57:54 +07:00
Thong Bui bfcae1607c MDL-70726 behat: should_not_exist function does not work correctly 2021-03-08 18:57:54 +07:00
AMOS bot b6f2f2bcef Automatically generated installer lang files 2021-03-07 00:07:38 +00:00
Eloy Lafuente (stronk7) 6f7e3ca2f7 Moodle release 3.8.8 2021-03-06 18:03:50 +01:00
AMOS bot b2c0deeae8 Automatically generated installer lang files 2021-03-06 00:07:41 +00:00
Sara Arjona 43222b3990 weekly release 3.8.7+ 2021-03-05 16:01:47 +01:00
Sara Arjona 552c8dfaee Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2021-03-05 16:01:46 +01:00
Ilya Tregubov 72ce91171d MDL-69680 lib: Fix behat test backup_and_restore.feature 2021-03-04 22:51:52 +01:00
Ilya Tregubov a5d39f81c8 MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:47:34 +08:00
Ilya Tregubov f020baba0d MDL-69680 lib: Update jQuery version in Moodle files 2021-03-04 12:47:34 +08:00
Ilya Tregubov 3044e7f136 MDL-69680 lib: Upgrade jQuery lib to 3.5.1 2021-03-04 12:47:34 +08:00
Ilya Tregubov a8bfd397d7 MDL-70767 feedback: Prevent xss in feedback answer text. 2021-03-03 23:09:42 +01:00
Paul Holden 02fecb2c1e MDL-65552 block_activity_results: correct Behat tests for idnumbers.
Teachers can see user idnumber fields only when they are configured
identity fields. Students cannot.
2021-03-03 23:14:31 +08:00
Marina Glancy e99235d097 MDL-65552 user: escape idnumber and email in table_sql 2021-03-03 23:14:31 +08:00
Paul Holden 74706d5f30 MDL-65552 user: escape idnumber field on output.
This commit also corrects parameter definition of the field to
match core_user.
2021-03-03 23:14:31 +08:00
AMOS bot 050f6c9c08 Automatically generated installer lang files 2021-03-03 00:07:37 +00:00
Paul Holden 955f74c2e4 MDL-70822 enrol: respect capability to view other users profile.
When retrieving courses of another user via web services, we should
respect the capability to view that users profile in a given course.
2021-03-02 16:48:29 +01:00
Sander Wind 9cb1dd4e5d MDL-70668 auth: Fix secret validation during user confirmation
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
2021-03-02 16:48:29 +01:00
Peter Dias d5eea29933 MDL-59293 block_onlineusers: Update behat tests 2021-03-02 16:37:37 +01:00
Peter Dias 671f2b2eab MDL-59293 block_onlineusers: Check whether current user can view online users
- Removed block from site admin.
- Blocked guest from viewuserlist cap
2021-03-02 16:37:37 +01:00
AMOS bot 4295aad82a Automatically generated installer lang files 2021-03-02 00:07:35 +00:00
Sara Arjona 363c471929 Merge branch 'MDL-68735_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2021-03-01 16:17:59 +01:00
AMOS bot 72e54c8125 Automatically generated installer lang files 2021-03-01 00:07:38 +00:00
AMOS bot 91c5e66892 Automatically generated installer lang files 2021-02-28 00:07:35 +00:00
AMOS bot 9feac7b454 Automatically generated installer lang files 2021-02-27 00:07:42 +00:00
AMOS bot 9f2d67adcf Automatically generated installer lang files 2021-02-25 00:07:39 +00:00
AMOS bot a0cfe03ab7 Automatically generated installer lang files 2021-02-22 00:07:38 +00:00
AMOS bot 410364509e Automatically generated installer lang files 2021-02-19 00:07:51 +00:00
AMOS bot 3958c324f7 Automatically generated installer lang files 2021-02-17 00:07:45 +00:00
AMOS bot 6f555e3dc5 Automatically generated installer lang files 2021-02-16 00:07:42 +00:00
Eloy Lafuente (stronk7) 8a3908b13e MDL-68735 env: Moodle 3.8.x, 3.9.x and 3.10.x do not support PHP 8.0 2021-02-13 12:57:56 +01:00
AMOS bot d1084fb368 Automatically generated installer lang files 2021-02-13 00:07:50 +00:00
AMOS bot ae201b9bb9 Automatically generated installer lang files 2021-02-11 00:07:42 +00:00
AMOS bot d2a181feb2 Automatically generated installer lang files 2021-02-06 00:07:43 +00:00
AMOS bot 8b1a5d6cfe Automatically generated installer lang files 2021-02-04 00:07:48 +00:00
AMOS bot b6288afc2f Automatically generated installer lang files 2021-02-01 00:07:46 +00:00
AMOS bot 0d53af4307 Automatically generated installer lang files 2021-01-31 00:07:42 +00:00
AMOS bot 855457ad33 Automatically generated installer lang files 2021-01-27 00:07:46 +00:00
AMOS bot c5d829351d Automatically generated installer lang files 2021-01-23 00:07:43 +00:00
AMOS bot 48410fa3b4 Automatically generated installer lang files 2021-01-17 00:07:45 +00:00
Eloy Lafuente (stronk7) 323c12674a Moodle release 3.8.7 2021-01-16 16:58:20 +01:00
Sara Arjona 37057940b0 weekly release 3.8.6+ 2021-01-15 08:25:58 +01:00
Sara Arjona b494696246 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2021-01-15 08:25:56 +01:00
Sara Arjona 1689e0d02d Merge branch 'MDL-69308_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2021-01-14 12:04:29 +01:00
AMOS bot a2ecb5fee0 Automatically generated installer lang files 2021-01-14 00:07:41 +00:00
Eloy Lafuente (stronk7) ce6c648a5c MDL-69308 environment: Apply agreed changes
- PHP 7.3 required.
- Moodle 3.6 required.
- SQL*Server 2017 (aka, 14.0) required.
- Sodium PHP extension required.
2021-01-13 19:30:50 +01:00
Eloy Lafuente (stronk7) 708708389a MDL-69308 environment: 3.11 base information
This is a direct copy of the 3.10 branch to have
the changes under control in next commits.
2021-01-13 19:30:46 +01:00
Mihail Geshoski 882240bea8 MDL-68486 auth_shibboleth: Reset convert_data if it uses dataroot file
Upgrade step that resets the 'Data modification API' (convert_data)
setting to its default value if this setting is currently configured
to use a file located within the $CFG->dataroot directory.
2021-01-13 12:35:56 +08:00
Mihail Geshoski 586b1a6f42 MDL-68486 auth_shibboleth: Prevent using dataroot files in convert_data
Prevents configuring the 'Data modification API' (convert_data) setting
to use files located within the $CFG->dataroot directory as it exposes
the site to security risks.
2021-01-13 12:35:56 +08:00
AMOS bot a1e9aac687 Automatically generated installer lang files 2021-01-13 00:07:42 +00:00
AMOS bot f043935fe9 Automatically generated installer lang files 2021-01-12 00:07:51 +00:00
AMOS bot 87ff32287f Automatically generated installer lang files 2021-01-11 00:08:56 +00:00
AMOS bot 614af534e9 Automatically generated installer lang files 2021-01-09 00:07:46 +00:00
Michael Hawkins f0bb4a442a MDL-69911 core: Clean content passed through TeX filter 2021-01-08 05:18:21 +01:00
Ferran Recio 680cb4c2bc MDL-67782 message: fix messages max length 2021-01-08 05:18:21 +01:00
Juan Segarra Montesinos bbf25a740b MDL-69797 core_grades: Implement authorization into fetch method 2021-01-08 05:18:21 +01:00
Juan Segarra Montesinos fdf9d2c0d7 MDL-69797 core_grades: Implement authorization into fetch method 2021-01-08 05:18:21 +01:00
Juan Segarra Montesinos 38a5690419 MDL-69797 gradingform_rubric: Implement authorization into fetch method 2021-01-08 05:18:21 +01:00
Juan Segarra Montesinos 38aec55521 MDL-69797 gradingform_guide: Implement authorization into fetch method 2021-01-08 05:18:21 +01:00
Jun Pataleta b820cbd7b2 weekly release 3.8.6+ 2021-01-08 12:15:08 +08:00
Jun Pataleta 7595f8d9f1 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2021-01-08 12:15:06 +08:00
AMOS bot 9134ec4414 Automatically generated installer lang files 2021-01-08 00:07:40 +00:00
Eloy Lafuente (stronk7) 4ca510ef8f Merge branch 'MDL-70584-38' of git://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2021-01-07 23:31:33 +01:00
Marina Glancy 2eb25578d7 MDL-70584 core_iplookup: increase tolerance in test 2021-01-07 16:36:07 +01:00
AMOS bot 40b559b8a2 Automatically generated installer lang files 2020-12-27 00:07:43 +00:00
AMOS bot 9b7dec7967 Automatically generated installer lang files 2020-12-24 00:07:47 +00:00
Eloy Lafuente (stronk7) 540c5032ec weekly release 3.8.6+ 2020-12-23 20:24:44 +01:00
Eloy Lafuente (stronk7) 2f627b199a Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-12-23 20:24:41 +01:00
AMOS bot 9590644949 Automatically generated installer lang files 2020-12-22 00:07:41 +00:00
Sara Arjona b3eb0b4ed8 Merge branch 'MDL-69107-38-2' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-12-18 15:22:55 +01:00
Sara Arjona 9e09004bf9 weekly release 3.8.6+ 2020-12-17 15:53:02 +01:00
Sara Arjona ac62bf1f10 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-12-17 15:53:00 +01:00
Andrew Nicols da7a9d4a5b MDL-69107 behat: Update field normalisation 2020-12-17 07:50:21 +08:00
Andrew Nicols 15deb6037a MDL-69107 user: Fix autocomplete usages 2020-12-16 08:11:58 +08:00
Paul Holden 7ba62ce566 MDL-70422 restore: fix for undefined question answer ordering in test. 2020-12-15 16:43:37 +01:00
Andrew Nicols 6fb9ff4a8d MDL-69107 form_autocomplete: Rewrite item selection
The form_autocomplete is essentially a custom element. Unfortunately the
`setValue()` function in Mink has undesired actions so it is necessary
to write our own handling for it.

The standard Mink `setValue()` function focuses the element, sets a
value, and then blurs the element. In the case of the autocomplete this
can cause the autocomplete suggestions list to be closed in some
situations. Instead of using the setValue we click, and type the value,
but do not immediately blur.
2020-12-15 20:34:19 +08:00
AMOS bot c1b5bd5f2c Automatically generated installer lang files 2020-12-15 00:07:42 +00:00
Sara Arjona 90645731dd Merge branch 'MDL-70397-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-12-14 17:12:51 +01:00
AMOS bot 617a39a855 Automatically generated installer lang files 2020-12-13 00:07:42 +00:00
AMOS bot 733a066172 Automatically generated installer lang files 2020-12-12 00:07:51 +00:00
AMOS bot ef5abe6f1a Merge branch 'MOODLE_38_STABLE' into install_38_STABLE 2020-12-12 00:07:50 +00:00
AMOS bot 997a6d6aea Automatically generated installer lang files 2020-12-11 00:07:49 +00:00
Víctor Déniz 782d9e0a70 weekly release 3.8.6+ 2020-12-10 21:10:26 +00:00
Víctor Déniz 899ebabd4a Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-12-10 21:10:20 +00:00
Jake Dallimore 979acac249 Merge branch 'MDL-70151-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-12-09 14:46:57 +08:00
Jake Dallimore 68636f2c58 Merge branch 'MDL-70285_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-12-08 16:34:34 +08:00
AMOS bot 88642c8f8d Automatically generated installer lang files 2020-12-08 00:07:40 +00:00
AMOS bot fa5227be64 Automatically generated installer lang files 2020-12-06 00:07:46 +00:00
Andrew Nicols 5460610eab MDL-70397 behat: Prevent browser restarting after initial start 2020-12-04 12:07:51 +08:00
Jake Dallimore f00ea29c80 weekly release 3.8.6+ 2020-12-04 08:42:54 +08:00
Jake Dallimore 10bf4c6c69 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-12-04 08:42:51 +08:00
Adrian Greeve 4cd4d59006 Merge branch 'MDL-70167-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-12-03 09:55:33 +08:00
AMOS bot 461552b315 Automatically generated installer lang files 2020-12-03 00:07:45 +00:00
AMOS bot d2e4b192ec Automatically generated installer lang files 2020-12-02 00:07:41 +00:00
AMOS bot 8cfd3f2b72 Automatically generated installer lang files 2020-12-01 00:07:47 +00:00
Sara Arjona 885cb5e157 weekly release 3.8.6+ 2020-11-27 07:51:00 +01:00
Sara Arjona 4f6fe6ceb1 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-11-27 07:50:56 +01:00
AMOS bot 8a3b7b90e8 Automatically generated installer lang files 2020-11-27 06:21:27 +00:00
Sara Arjona fd2c79545f Merge branch 'MDL-70276_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-11-26 15:05:03 +01:00
Eloy Lafuente (stronk7) e1bb0014c1 MDL-70276 github actions: First cut, phpunit and grunt checks
First working version, supports phpunit (using build matrix):

- php71 (lowest), running mysql.
- php74 (highest), running postgres.

Also verifies that the branch has been "gruntified" and there
isn't any missing change (build js/css files).

TODO: Verify the remaining checks currently in .travis.yml, namely:
 - CITEST
 - Add caching
 - Better health-check for DB images.
 - Support from the tracker (satus badges and enable check).
 - Support from CiBoT (status and enable check).
 - Consider moving both the common setup (git, composer...)
   and the database (mysql, postgres) to own actions for
   easier tweaking.
2020-11-26 00:20:22 +01:00
Sara Arjona bcfa789822 Merge branch 'MDL-70265_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-11-25 15:47:11 +01:00
Tim Hunt e9cb4f23a5 MDL-70285 completion upgrade: fix performance of the MDL-69687 code 2020-11-23 22:55:09 +00:00
Eloy Lafuente (stronk7) a476c8f0bd MDL-70265 travis: Completely remove the UPGRADE check
It was broken since ages ago, see MDL-64874, so no sense
to keep it eating minutes for nothing.
2020-11-23 14:23:31 +01:00
Adrian Greeve 50285a5011 Merge branch 'MDL-67668-38-2' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-11-23 15:35:43 +08:00
Andrew Nicols 069e41e2e0 MDL-70151 assign: Fix bulk change for behat
Behat does not play well with confirmation dialogues and in some
situations it does not wait for the page to reload before starting the
next step.

This change adds a pending_js call which is only resolved if the cancel
button was pressed, otherwise it remains in-progress until the page
reloads resetting the entire state of it.
2020-11-23 11:12:28 +08:00
Andrew Nicols 2f842d0d45 MDL-70167 behat: Rewrite attribute check steps
This commit updates the following steps to use the
`the_attribute_of_should_be_set` step under the hood:
- the [element] [type] should be disabled
- the [element] [type] should be enabled
- the [element] [type] should be readonly
- the [element] [type] should not be readonly

This reduces unnecssary code duplication.
2020-11-23 11:07:11 +08:00
Andrew Nicols 6e7d2022d1 MDL-70167 behat: Boolean attributes should either exist or not 2020-11-23 11:07:09 +08:00
Andrew Nicols 161a902514 MDL-67668 behat: Update tests for inplace editable field type 2020-11-23 09:00:46 +08:00
Andrew Nicols 4c4c49036c MDL-67668 behat: Add inplace editable field type
This commit promotes the Inplace Editable field to a first-class form
element by introducing a new partial selector for inplace editable
fields, and teaching the field manager how to recognise these, then
introducing a new field type which can handle setting values for this
field.
2020-11-23 09:00:46 +08:00
Andrew Nicols 6aeca2cc3b MDL-67668 behat: Share behat_behat functionality with forms
Behat form fields are implemented in a way completely isolated from the
rest of the Behat Context system. Whereas regular step definitions have
access to execute steps, to call `find`, check for JS running, and other
related functionality, the Moodle implementation of a field type does
not have any access to this.

By moving the core functionality of behat_base to a new trait, and the
constants to a new interface, the functionality can also be used in
behat form fields in the same way as elsewhere.
2020-11-23 09:00:46 +08:00
Andrew Nicols 85ca7d98de MDL-67668 behat: Correct js pending check
Pending checks should only run when JS is running, but some uses were
not apply this check.
2020-11-23 09:00:46 +08:00
Andrew Nicols cc724b40f1 MDL-67668 behat: Support NodeElement when fetching node in container
This is similar to change made in MDL-69136 to allow an already-fetched
NodeElement to be provided to the get_node_in_container() function and
makes it easier to be deterministic when writing steps.
2020-11-23 09:00:46 +08:00
Eloy Lafuente (stronk7) be139ca945 MDL-70265 travis: Only run highest phpunit if configured via env
By default only lowest php version will be executed, and only pgsql.

This default behavior can be changed with a new variable:

MOODLE_PHP = [all]
MOODLE_DATABASE = [pgsql | mysqli | all]
2020-11-21 11:28:22 +01:00
Eloy Lafuente (stronk7) 3cb4a45cb4 weekly release 3.8.6+ 2020-11-20 23:16:58 +01:00
Eloy Lafuente (stronk7) dee26a0fbd Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-11-20 23:16:55 +01:00
Sara Arjona 6cacbf2d63 Merge branch 'MDL-70148_38' of git://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-11-19 13:21:32 +01:00
Eloy Lafuente (stronk7) 56c8c6b292 MDL-70148 behat: Added missing step definition that was lost in backport 2020-11-19 12:54:09 +01:00
Sam Hemelryk 1db6212c68 MDL-68896 mod_scorm: improved sendBeacon use when unloading 2020-11-18 10:06:21 +08:00
Eloy Lafuente (stronk7) 29bf8d5176 Merge branch 'MDL-70148-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-11-17 23:13:36 +01:00
Andrew Nicols 581c909321 MDL-70148 gradereport_grader: Improve reliability of keyboard usage
In some browsers the ajax grade select does not properly update the
grade after setting values. The previous solution was to press the
[enter] key, but doing this with the new key type step opens the select
box again. This is what happens when a real user presses enter on the
select.

This is the last possible field in the report, so pressing the tab key
to move to the next gradable element does not work.

The solution uses a shift-tab to move the focus away to the previous
gradale element. In this case it must also be moved to an earlier step
because the previously selected value must be checked in the Then
section of the test and if it is selected then its value cannot be
checked.
2020-11-17 15:14:43 +08:00
Andrew Nicols 7cbdc8a996 MDL-70148 qtype: Update qtype steps to new key interaction
Note: The ddmarker question type was previously getting the number of
keypresses wrong. This was because it was using both keyDown/keyUp, and
also keyPress. As a result each keypress was essentially happening two
times.
2020-11-17 15:14:43 +08:00
Andrew Nicols fd62f6e03e MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Andrew Nicols 8ae2fb1773 MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
AMOS bot f577d6f6c3 Automatically generated installer lang files 2020-11-11 00:07:49 +00:00
AMOS bot ae166e60bb Automatically generated installer lang files 2020-11-09 00:07:57 +00:00
Eloy Lafuente (stronk7) 24459b780e Moodle release 3.8.6 2020-11-07 16:48:02 +01:00
AMOS bot d476304b38 Automatically generated installer lang files 2020-11-07 00:07:52 +00:00
Eloy Lafuente (stronk7) 1bd64473f0 weekly release 3.8.5+ 2020-11-06 22:55:45 +01:00
Eloy Lafuente (stronk7) bb9129ae61 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-11-06 22:55:42 +01:00
Víctor Déniz 08c25c25fe Merge branch 'MDL-70137-38-2' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-11-06 19:20:10 +00:00
Andrew Nicols 63c147d6b1 MDL-70137 cache: Write config to temp file and move into place 2020-11-06 19:20:10 +00:00
Andrew Nicols 9101b9006e MDL-70137 cache: Use sensible default when reading MUC config
When we read the MUC configuration, a file which exists but is empty
will not error, but will cause all configuration to be empty.

We already perform an {{is_array()}} check on the {{$configuration}}
variable, but the default value for {{$configuration}} is an empty
array. In the case where the file exists, but is empty, no errors occur
when the file is loaded, and the initial {{$configuration}} value is
not overwritten, leading to the file being replaced with an empty copy.
2020-11-06 19:19:57 +00:00
Eloy Lafuente (stronk7) deab3d8e45 Merge branch 'MDL-70139-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-11-06 19:08:47 +01:00
Sara Arjona c482ea0df5 MDL-70139 core_badges: fix invalid request when sending to backpack
Having mixed $data in badge exporters is causing some issues.
As all these exporters are using $data as an object, $data can be
converted to object in the constructor, to avoid errors and get
the expected behaviour always.
2020-11-06 16:21:41 +01:00
AMOS bot 1402cad6fd Automatically generated installer lang files 2020-11-06 00:09:59 +00:00
Eloy Lafuente (stronk7) 17fa0a030e weekly release 3.8.5+ 2020-11-05 12:16:23 +01:00
Andrew Nicols 1620feb69f Merge branch 'MDL-70066-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-11-05 10:02:18 +08:00
Sara Arjona 46353d4017 Merge branch 'MDL-70114-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-11-04 20:15:32 +01:00
Sara Arjona 224efa43c6 Merge branch 'MDL-70119-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2020-11-04 15:20:14 +01:00
Bas Brands 20d6adc2ad MDL-70114 mod_data: add border for to textarea 2020-11-04 13:30:26 +00:00
Ferran Recio 5daa405eaa MDL-70119 core_badges: fix tab names 2020-11-04 12:57:18 +01:00
Simey Lameze bf91c850ec MDL-70066 badges: change usages of array_key_exists to isset 2020-11-04 16:05:58 +08:00
Mihail Geshoski 57fb23822b MDL-67837 backup: Add unit tests 2020-11-03 12:28:21 +01:00
Mihail Geshoski 2dfebe709e MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:28:21 +01:00
andreasschenkel 130707d4e2 MDL-69844 user: Fix no email in download_participants_table
Only include eMail in download_participants_table 
if selected in showuseridentity 
($identityfieldsselect)
2020-11-03 12:28:21 +01:00
Juan Leyva 8658c28687 MDL-67015 mod_data: Prevent users adding entries to other groups 2020-11-03 12:28:21 +01:00
Ferran Recio 64372b6d2f MDL-69378 tool_uploadcourse: fix enrolment methods uploads 2020-11-03 12:28:21 +01:00
Peter Dias c5c5e74568 MDL-56310 restore: Confirm user has permission to change capabilities 2020-11-03 12:28:21 +01:00
Eloy Lafuente (stronk7) 8a60f4ba20 weekly release 3.8.5+ 2020-11-03 12:21:15 +01:00
Eloy Lafuente (stronk7) 06eeb0fb89 Merge branch 'MDL-70081-38' of git://github.com/jleyva/moodle into MOODLE_38_STABLE 2020-11-03 01:26:23 +01:00
Sara Arjona 7d6d3ee26f Merge branch 'MDL-69973_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-11-02 15:45:25 +01:00
Juan Leyva 6ba22833e2 MDL-70081 airnotifier: Add missing device type in token registration 2020-10-31 13:08:14 +01:00
Eloy Lafuente (stronk7) 87dca5dfd7 MDL-69973 xmldb: Ensure all reports use fresh metadata (not cached) 2020-10-30 19:27:23 +01:00
Eloy Lafuente (stronk7) f93c934043 MDL-69973 xmldb: Fix problem with MariaDB >= 10.2.7 metadata defaults
With MariaDB 10.2.7 the driver was incorrectly returning '' (empty
string) as default for all the columns having null (meaning, no
default).

Also, cover the case in unit tests, it seems that we were already
testing other defaults but not the null case.
2020-10-30 19:27:23 +01:00
Eloy Lafuente (stronk7) 37757a69cd weekly release 3.8.5+ 2020-10-30 13:49:07 +01:00
Eloy Lafuente (stronk7) bda7205584 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-10-30 13:49:05 +01:00
AMOS bot 76e8f1f260 Automatically generated installer lang files 2020-10-30 00:09:51 +00:00
Matt Clarkson 4ac4c9a6c9 MDL-68722 atto_equation: fix for form elements with special characters
Element id's containing characters such as ':' would break the tab
selector in bootstrap.

This specifically affects the essay question type.
2020-10-29 14:23:44 +08:00
Jake Dallimore 46fcf48619 Merge branch 'MDL-69716-38' of git://github.com/aanabit/moodle into MOODLE_38_STABLE 2020-10-29 12:40:41 +08:00
Jun Pataleta 57c5a07aaa Merge branch 'MDL-69815-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-10-28 14:18:58 +08:00
Andrew Nicols b7f6f951ca Merge branch 'MDL-70004-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-10-28 13:15:31 +08:00
Jake Dallimore ccc768d30b Merge branch 'MDL-64723-38' of git://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-28 12:13:12 +08:00
Jake Dallimore 483ff0bb44 Merge branch 'MDL-65792-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-10-28 12:00:54 +08:00
Andrew Nicols 6f54a6cdd3 MDL-69815 core: Bump Node to v14.15.0 (LTS/Fermium) 2020-10-28 09:34:31 +08:00
Eloy Lafuente (stronk7) e1ee9ea78c Merge branch 'MDL-69998-38-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-10-28 00:42:41 +01:00
Eloy Lafuente (stronk7) b7d173d89e weekly release 3.8.5+ 2020-10-27 23:47:35 +01:00
David Mudrák 3eb031e018 MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:30:42 +01:00
Helen Foster cdfc0502fa MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:30:42 +01:00
Jun Pataleta 7670873a09 MDL-70004 theme_boost: Do not extend alert style for question containers 2020-10-27 17:17:02 +08:00
Jun Pataleta f61badb187 MDL-70004 qtype_multichoice: Set appropriate clear my choice role 2020-10-27 17:12:14 +08:00
Bas Brands db8aa0eda1 MDL-65792 mod_forum: show release time on timed posts 2020-10-27 09:10:48 +01:00
Paul Holden 4f05d0ecb7 MDL-64723 tool_mobile: workaround for invalid certificate parsing.
This is to account for specific server configuration that are affected
by one of the following issues, which results in certificate signature
algorithms being incorrectly parsed:

 * https://bugs.php.net/bug.php?id=77548
 * https://github.com/curl/curl/issues/3706
2020-10-26 23:06:19 +00:00
Eloy Lafuente (stronk7) d66ced33a2 Merge branch 'MDL-69993-38' of git://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-26 10:43:10 +01:00
Andrew Nicols baa6a41975 Merge branch 'MDL-69995-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-10-26 16:01:35 +08:00
Luca Bösch 4cf56a012d MDL-69995 backup: padding before activity icons. 2020-10-25 02:03:35 +02:00
Amaia Anabitarte 3b96a8b88b MDL-69716 mod_quiz: No timestamp for in progress attempts 2020-10-23 16:03:48 +02:00
Eloy Lafuente (stronk7) 5d357f9849 weekly release 3.8.5+ 2020-10-23 14:40:42 +02:00
Eloy Lafuente (stronk7) 5d9a5d8fef Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-10-23 14:40:37 +02:00
Paul Holden 0e75bc4ded MDL-69993 output: correct navigation node type for user reports. 2020-10-23 08:25:49 +01:00
Adrian Greeve 08c84a9d72 Merge branch 'MDL-67650-forced-checkbox-textarea-MOODLE_38_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_38_STABLE 2020-10-23 08:59:42 +08:00
Víctor Déniz 2dc4c36983 Merge branch 'MDL-68664-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-10-22 12:24:44 +01:00
Sara Arjona f3ffadb77b Merge branch 'MDL-69553-m38' of https://github.com/NeillM/moodle into MOODLE_38_STABLE 2020-10-22 08:56:27 +02:00
Brendan Heywood 251803de94 MDL-67650 admin: Consistently show forced config settings 2020-10-22 13:13:40 +11:00
Jake Dallimore 1c067b30a7 Merge branch 'MDL-68438_38' of https://github.com/t-schroeder/moodle into MOODLE_38_STABLE 2020-10-22 09:31:30 +08:00
Adrian Greeve 80878e887f Merge branch 'MDL-69788-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-22 09:05:15 +08:00
AMOS bot e2c2d15f09 Automatically generated installer lang files 2020-10-22 00:08:05 +00:00
Eloy Lafuente (stronk7) 988f42c05a Merge branch 'MDL-66392-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-21 19:49:39 +02:00
Paul Holden 4051117877 MDL-66392 analytics: make model output directory default to empty.
Falling back to path within $CFG->dataroot/models.
2020-10-21 17:34:11 +01:00
Víctor Déniz b98729c600 Merge branch 'MDL-69392-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-10-21 16:26:21 +01:00
Jun Pataleta 6fbebf7cd7 Merge branch 'MDL-69945-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-10-21 21:34:36 +08:00
Paul Holden 9f4b10f606 MDL-69788 admin: validate language menu configuration. 2020-10-21 11:25:54 +01:00
Paul Holden f743468808 MDL-69788 lang: fallback to all translations if misconfigured.
If given translation list contains only invalid entries, fallback
to returning the complete list of available language translations.
2020-10-21 11:25:44 +01:00
Jun Pataleta a6ca410069 Merge branch 'MDL-37226-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-10-21 17:46:31 +08:00
Tim Schroeder 482d85942f MDL-68438 message: fixed email format change with messaging disabled 2020-10-21 11:24:38 +02:00
Neill Magill 7b6fbd9861 MDL-69553 output: Handle pre-loading multiline string defines
Before this patch strings that were declared over multiple lines in
a template would not be parsed correctly.

{{#str}}value,
mod_forum{{/str}}

would have been been parsed to get_string('value', 'core')

{{#str}}
value, mod_forum
{{/str}}

would have been been parsed to get_string('', 'core')
2020-10-21 10:07:23 +01:00
Neill Magill a49559f222 MDL-69553 output: Unit tests for loading multiline string defines 2020-10-21 10:07:22 +01:00
Luca Bösch 320c5ec06c MDL-69945 core_calendar: let circles appear as circles 2020-10-21 11:04:22 +02:00
Jun Pataleta 698f99209d Merge branch 'MDL-69945-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-10-21 16:02:57 +08:00
Jun Pataleta 89ef8cc223 MDL-69392 question: Fix Try again button styling 2020-10-21 14:59:29 +08:00
Jun Pataleta e3db7a4767 MDL-69392 theme_boost: Improve question colour contrast
* Lighten info container.
* Fix colour contrast for the question container by
  - Lightening the background a bit
  - Darkening the text colour a bit
  - Making sure the link colour has good colour contrast against the
  question text.
* Fix colour contrast for the comments container by
  - Lightening the text colour a bit
  - Darkening the link colour a bit for better colour contrast against
  the feedback text.
2020-10-21 14:59:29 +08:00
Jun Pataleta 22e41d742f MDL-69392 theme_classic: Darken red, blue and green colours
The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)
2020-10-21 14:59:29 +08:00
Jun Pataleta 22b4979999 MDL-69392 theme_boost: Darken red, blue and green colours
The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)
2020-10-21 14:59:29 +08:00
Paul Holden ded0ed9d37 MDL-69807 blocks: remove redundant sesskey loading edit/delete page. 2020-10-21 14:25:52 +08:00
Adrian Greeve 981bce6288 Merge branch 'MDL-68766-M38' of https://github.com/ised-isde-canada/moodle into MOODLE_38_STABLE 2020-10-21 12:48:05 +08:00
Jake Dallimore 3883bba766 Merge branch 'MDL-69902-38' of https://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2020-10-21 10:58:11 +08:00
Eloy Lafuente (stronk7) 9aaab50cd5 weekly release 3.8.5+ 2020-10-21 00:50:35 +02:00
Jake Dallimore 60ae32c162 Merge branch 'MDL-67695-MOODLE_38_STABLE_get_lti_proxies' of https://github.com/andrewmadden/moodle into MOODLE_38_STABLE 2020-10-20 11:09:28 +08:00
Adrian Greeve 261d79a5ed MDL-68284 gradebook: Fix use of get_recordset in upgrade code. 2020-10-20 09:13:58 +08:00
Adrian Greeve fd9db57264 Merge branch 'MOODLE_38_STABLE-MDL-68284' of https://github.com/yao9394/moodle into MOODLE_38_STABLE 2020-10-20 08:44:10 +08:00
Simey Lameze bc56a460b7 MDL-68664 theme: remove right margin from form-inline class 2020-10-20 08:33:10 +08:00
Andrew Nicols f6eafcae3e Merge branch 'MDL-69687-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-10-20 08:03:02 +08:00
Eloy Lafuente (stronk7) e7aa9549a5 Merge branch 'MDL-69906-38-searchsimpledb' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-10-19 22:56:48 +02:00
Eloy Lafuente (stronk7) 3a12cb5495 Merge branch 'MDL-57756-text-customparams-38' of https://github.com/cengage/moodle into MOODLE_38_STABLE 2020-10-19 22:32:20 +02:00
Claude Vervoort 6d79bed31b MDL-57756 mod_lti: params change to text type 2020-10-19 14:17:56 -04:00
Sara Arjona 34ea79f1d4 Merge branch 'MDL-69897-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-19 18:15:18 +02:00
Sara Arjona 444c2e1df1 Merge branch 'MDL-69900-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-10-19 13:42:24 +02:00
sam marshall 965846f005 MDL-69687 Course: remove_course_contents orphaned completion data
The remove_course_contents function did not delete data from
course_module_completion table in most cases, resulting in large
quantities of orphaned data.
2020-10-19 10:14:11 +01:00
Sara Arjona 3317f7aa94 Merge branch 'MOODLE_38_MDL-69791' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-10-19 10:08:22 +02:00
Sagar Ghimire e523e85462 MDL-68284 gradebook: Prevent exposing hidden quiz grade item 2020-10-19 16:25:29 +11:00
Andrew Nicols 82a400be59 Merge branch 'MDL-69687-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-10-19 13:20:55 +08:00
Andrew Madden 30268a1fe1 MDL-67695 mod_lti: Use correct return structure for get_tool_proxies.
* Use tool_proxy_return_structure for each proxy.
* Added tests for getting all proxies and orphaned proxies.
2020-10-19 15:15:52 +11:00
sam marshall 66de9e27be MDL-69687 Course: Improve removal of completion data on MySQL 2020-10-16 18:24:23 +01:00
sam marshall 2cd98f15b3 MDL-69687 DB: Add API for deleting data based on subquery
The new API works on normal databases (by deleting data based on the
subquery) and also on MySQL (by deleting the data using a weird join
on the subquery).
2020-10-16 18:24:23 +01:00
Luca Bösch e92ac3eaf7 MDL-37226 assign: align select all header checkbox 2020-10-16 16:08:30 +02:00
Luca Bösch a04cc0b511 MDL-69945 core_calendar: let circles appear as circles 2020-10-16 15:43:50 +02:00
Sara Arjona 81e84d2034 weekly release 3.8.5+ 2020-10-16 13:18:40 +02:00
Jake Dallimore 7af6028c51 Merge branch 'MOODLE_38_MDL-47178' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-10-16 11:53:26 +08:00
Eloy Lafuente (stronk7) e92ffed40d Merge branch 'MDL-69813-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-14 22:47:44 +02:00
Eloy Lafuente (stronk7) 9fad671e5d MDL-68070 messaging: Ensure that error is shown on first messages
Before there is a conversation, messages between users are sent
using core_message_send_instant_messages instead of
core_message_send_messages_to_conversation.

That method had an undefined $errormessage variable, ultimately
causing the problem detected on message_post_message()/message_send()
to never been returned by the external.

This just adds the same error than already existing conversations do,
but returning it as warning, for BC, JS will show it.
2020-10-14 18:58:00 +02:00
Eloy Lafuente (stronk7) 2020abe0d8 MDL-68070 messaging: Amend lang string to be clearer for any user.
Credit goes to Helen Foster for the improvement, thanks!
2020-10-14 16:55:08 +02:00
Víctor Déniz 8c461fc2be Merge branch 'MDL-68900-m38' of https://github.com/sumitnegi933/moodle into MOODLE_38_STABLE 2020-10-14 12:47:46 +01:00
Eloy Lafuente (stronk7) 064f9943a5 Merge branch 'MDL-68070-38_messaging_fix' of https://github.com/beenet-dev/moodle into MOODLE_38_STABLE 2020-10-13 23:41:12 +02:00
Sara Arjona 0df84ece36 weekly release 3.8.5+ 2020-10-13 13:24:15 +02:00
Sara Arjona 15a185340a Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-10-13 13:24:12 +02:00
Andrew Nicols b4b15278ea Merge branch 'MDL-67654-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-13 08:01:30 +08:00
Paul Holden cd258845b9 MDL-67654 mod_forum: formchangechecker for discussion inline replies. 2020-10-12 23:32:32 +01:00
Paul Holden f7500502cc MDL-69897 repository: add heading to delete file modal. 2020-10-12 23:07:08 +01:00
Simon Mok af2a02e460 MDL-68070 messaging: Fix error when personal notification is disabled 2020-10-12 19:33:18 +08:00
Adrian Greeve 73fe545030 Merge branch 'MOODLE_38_MDL-69818' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-10-12 14:46:35 +08:00
Jake Dallimore 3ee3bef023 Merge branch 'MDL-68292-admin-sesskey-MOODLE_38_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_38_STABLE 2020-10-12 14:38:05 +08:00
Brendan Heywood e2558ec396 MDL-68292 core: Remove sesskey leakage on module pages 2020-10-12 17:11:35 +11:00
Adrian Greeve 6a22d520ee Merge branch 'MDL-69649-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-10-12 10:16:42 +08:00
Jake Dallimore d5f01f6a98 Merge branch 'MDL-69910-calendar-protectusername-MOODLE_38_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_38_STABLE 2020-10-12 10:06:21 +08:00
AMOS bot 7400b95a23 Automatically generated installer lang files 2020-10-11 00:08:32 +00:00
Brendan Heywood 0df4a06a97 MDL-69910 calendar: Fix export exception when both params are sent 2020-10-11 09:21:41 +11:00
David Mudrák 49f5600cf5 MDL-69906 admin: Display Setup search engine as link only if it is valid
We use auto-generated admin section name here so we need to check that
the target section actually exists.
2020-10-09 14:16:22 +02:00
Sara Arjona 46000ff13a weekly release 3.8.5+ 2020-10-09 11:11:50 +02:00
Sara Arjona 6879b59ec1 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-10-09 11:11:46 +02:00
Marina Glancy df6b15c7dc MDL-69902 core_search: fix error in the custom fields indexing 2020-10-09 08:52:10 +02:00
Stephen Bourget c209325895 MDL-69900 core_backup: Allow IMSCC v1.0 restore to finish 2020-10-09 09:06:47 +08:00
Sara Arjona bfe808fd62 Merge branch 'MDL-64657-38' of git://github.com/jleyva/moodle into MOODLE_38_STABLE 2020-10-08 14:16:03 +02:00
Sumit Negi 19a6a2fcc0 MDL-68900 mod_forum: permission check for user who is viewing timed post
Pass current user object to post builder as argument, so that the permission to view timed post
will check with current user, who is viewing the posts instead of user who made that post.
2020-10-08 12:44:03 +05:30
Adrian Greeve 7c68554277 Merge branch 'MDL-69805-38' of https://github.com/dravek/moodle into MOODLE_38_STABLE 2020-10-08 14:58:39 +08:00
Adrian Greeve cf149b7e39 Merge branch 'MDL-69798_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-10-08 13:31:15 +08:00
Víctor Déniz 125cbf474e Merge branch 'MDL-69759-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-10-07 22:26:38 +01:00
Victor Deniz Falcon 1339e312a6 MDL-52407 travis: use Travis default notifications(email) 2020-10-07 16:33:06 +08:00
Andrew Nicols 10f88d9ab6 Merge branch 'MDL-67275-38-post_noun_verb' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-10-07 12:39:42 +08:00
AMOS bot 26b34e8570 Automatically generated installer lang files 2020-10-07 00:07:49 +00:00
Eloy Lafuente (stronk7) ba24d5c214 Merge branch 'wip-MDL-68808-MOODLE_38_STABLE' of https://github.com/jason-platts/moodle into MOODLE_38_STABLE 2020-10-06 23:12:33 +02:00
Paul Holden a007895a0a MDL-69813 h5p: fix undefined addon ordering in framework test. 2020-10-06 10:48:12 +01:00
Eloy Lafuente (stronk7) 973631628c weekly release 3.8.5+ 2020-10-06 10:20:41 +02:00
Mikhail Golenkov 9167c6d47c MDL-47178 question: Retain question authors when restoring backups. 2020-10-06 09:38:55 +11:00
Eloy Lafuente (stronk7) 7119de9e92 Merge branch 'MDL-69772-38-allcountrycodes' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-10-06 00:04:22 +02:00
Eloy Lafuente (stronk7) 00492277ae Merge branch 'MDL-65074-38' of https://github.com/hitteshahuja/moodle into MOODLE_38_STABLE 2020-10-05 23:12:42 +02:00
Sara Arjona b773f03809 Merge branch 'MDL-69641-MOODLE_38_STABLE' of https://github.com/dmitriim/moodle into MOODLE_38_STABLE 2020-10-05 13:38:17 +02:00
Eloy Lafuente (stronk7) 8fc32d4c3e Merge branch 'MOODLE_38-MDL-69752' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-10-05 10:55:19 +02:00
Mikhail Golenkov 19cce33460 MDL-69791 gradereport: Fix error message when invalid grade is entered 2020-10-05 15:01:09 +11:00
Mikhail Golenkov 323a15ba58 MDL-69818 mod_feedback: Fix item dependency during activity restoration 2020-10-04 18:30:58 +11:00
Mikhail Golenkov 8912dcbe15 MDL-69752 mod_data: Format module intro on Database activities page 2020-10-04 13:51:00 +11:00
Sara Arjona 3154901c1f weekly release 3.8.5+ 2020-10-02 13:43:22 +02:00
David Matamoros f24a2515cb MDL-69805 mod_data: Freeze comment field if comments disabled 2020-10-02 09:13:05 +02:00
Eloy Lafuente (stronk7) ffa8aa21b8 Merge branch 'MDL-69758-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-10-01 23:44:36 +02:00
Tim Hunt 8a15c4e0ca MDL-69798 XML question export: excape special chars in idnumbers 2020-10-01 17:11:26 +01:00
Eloy Lafuente (stronk7) 1eaf199454 Merge branch 'MDL-69586-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-01 17:13:05 +02:00
David Mudrák 47fe02cbea MDL-69772 admin: Better validation for the allcountrycodes setting
The patch introduces a new admin_setting field type that can be used for
specifying comma separated list of countries. The field has inbuilt
validation so that only valid country codes can be inserted.
2020-10-01 13:32:09 +02:00
Jason Platts 82a1f6cd33 MDL-68808 forms: autocomplete throwing error in IE11 2020-10-01 12:08:12 +01:00
Sara Arjona 80b632c94a Merge branch 'MDL-68098-38' of git://github.com/dpalou/moodle into MOODLE_38_STABLE 2020-10-01 12:56:42 +02:00
Dani Palou efcc68a5ce MDL-68098 tests: Reset FILTERLIB_PRIVATE after tests 2020-10-01 12:51:09 +02:00
Dani Palou 800f4dfb15 MDL-68098 ws: Add unit tests to test mathjax in WS 2020-10-01 12:51:09 +02:00
Adrian Greeve a1ebb252cb Merge branch 'MDL-37802-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-30 13:48:55 +08:00
Dan Marsden c673616612 MDL-69641 grade: fix slow query.
This is a backport of MDL-69190
2020-09-30 15:22:36 +10:00
Adrian Greeve 2262d926eb Merge branch 'MDL-69359_38' of https://github.com/adpe/moodle into MOODLE_38_STABLE 2020-09-30 11:42:22 +08:00
Sara Arjona deb0ad9b62 Merge branch 'MDL-69342-38_profile_picture_deletion' of https://github.com/vtos/moodle into MOODLE_38_STABLE 2020-09-29 19:01:30 +02:00
Eloy Lafuente (stronk7) 3b52d1658e weekly release 3.8.5+ 2020-09-29 10:48:26 +02:00
Shamim Rezaie dba8fdf878 MDL-69649 form: Fix labels for defaultcustom form elements 2020-09-28 23:22:10 +10:00
Shamim Rezaie 2178327a55 MDL-69649 backup: Fix missing labels
- The backup details page uses a table to show a sumary of the backup
  content. Used role attribute to denote the tabular format of the
  summary.
- The backup details page displays activity name next to each activity
  icon. Therefore the icons are only decorative and do not need to have
  any title or even alt text.
- Form labels should be associated with form controls.  A div element is
  not a form control.
- The from attribute of the form labels should be equal to the id
  attribute of an element. Therefore, we first create a label and an
  input elements and associate them to each other, and then pass them to
  backup_detail_pair() when a label is needed.
2020-09-28 23:22:10 +10:00
sam marshall bdb752aa39 MDL-69759 Web services: app checks to token.php cause log errors 2020-09-28 11:56:18 +01:00
AMOS bot 0a238780e7 Automatically generated installer lang files 2020-09-26 00:08:03 +00:00
adpe 91984f38f7 MDL-69359 admin_cli: show only contributed plugins in uninstall plugins 2020-09-25 16:50:52 +02:00
Hittesh Ahuja e01066d67c MDL-65074 mod_quiz: Quiz navigation buttons shouldnt use btn-secondary
Removing .btn-secondary as plain.scss and default.scss in bootstrap hide the button from view.
2020-09-25 15:22:29 +01:00
Paul Holden 7069947949 MDL-37802 repository: return error if unzipping files fails.
For instance, when a user tried to unzip a password protected zip
archive using the file manager.
2020-09-25 09:34:36 +01:00
Paul Holden 620e5285fe MDL-69586 tool_usertours: use specified user in privacy prefs export. 2020-09-25 09:13:47 +01:00
Víctor Déniz 99b1742961 weekly release 3.8.5+ 2020-09-24 16:27:24 +01:00
Víctor Déniz cf6005dc08 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-09-24 16:27:18 +01:00
David Mudrák cba7517ca7 MDL-69772 admin: Fix legacy coding style on Location settings admin page
No actual change here. Just polishing the coding style and adding
fulltree check.
2020-09-24 14:19:28 +02:00
David Mudrák ace99685b5 MDL-69772 lang: Ignore misconfigured allcountrycodes filter
If the allcountrycodes filter contains only invalid values, ignore the
whole filter setting and make get_list_of_countries() return the full
list of all known countries, rather than empty list.
2020-09-24 13:41:59 +02:00
Vitaly 979f22b0ea MDL-69342 core_user: fixed user picture updating
When editing a user and checking the 'Delete picture' checkbox to delete
the old picture and uploading a new one at a time, the new one didn't appear
in the user profile. This happened due to the 'if/else' statement
in the 'core_user::update_picture()' method which allowed either to delete
the old picture or to upload a new one.
The fix removes the 'else' part of the 'if/else' statement to force
checking for a new uploaded picture no matter if a user checked
the 'Delete picture' checkbox or not.
2020-09-24 10:58:17 +03:00
Dani Palou 4fc00c4b68 MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-23 16:24:02 +02:00
Eloy Lafuente (stronk7) 6018a70469 Merge branch 'MDL-68229-38' of git://github.com/jleyva/moodle into MOODLE_38_STABLE 2020-09-23 11:51:39 +02:00
Juan Leyva 5c2c14b32b MDL-68229 tool_mobile: Add missing option to disable tags in the app 2020-09-23 10:35:19 +02:00
Eloy Lafuente (stronk7) 53827dd118 Merge branch 'MDL-69014-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-22 23:11:44 +02:00
Juan Leyva ba7d2b6c05 MDL-64657 course: Return hidden section names when configured 2020-09-22 11:53:23 +02:00
AMOS bot ed55aff5c9 Automatically generated installer lang files 2020-09-22 00:07:16 +00:00
Eloy Lafuente (stronk7) f710fba95b Merge branch 'MDL-66648-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-21 23:36:38 +02:00
Eloy Lafuente (stronk7) 5b2fb7946a Merge branch 'MDL-69667-MOODLE_38_STABLE' of https://github.com/comete-upn/moodle into MOODLE_38_STABLE 2020-09-21 23:20:50 +02:00
David Mudrák 58e775946a MDL-67275 forum: Fix language and accessibility issues with buttons
There were inconsistencies with the text shown on the submit button,
depending on the where the button was shown.

* Inline reply forum displayed general "Submit".
* Experimental nested discussion view reply form displayed "Post"
  (post/core string) which acts as a noun in other contexts and cannot
  be used as such in many non-English languages.
* Advanced reply form displayed "Post to forum".

The patch fixes this and starts to show "Post to forum" in all three
places consistently.

While working on this, two more issues were noticed and fixed:

* Inline reply textarea's title was hard-coded English "post" text.
  Changed to "Message" to provide advisory information related to the
  element.
* Buttons contained title attribute with the same value as the explicit
  button text. This goes against accessibility guidelines.
2020-09-21 22:10:34 +02:00
sam marshall debc5e451d MDL-69758 Web services: core_get_course_contents PHP warnings
Calls to core_get_course_contents can cause PHP warnings in the server
log if there are any URL instances in the course with sketchy URLs.
This is because url_export_contents incorrectly returns null instead
of an empty array if there is an error.
2020-09-21 15:29:15 +01:00
Eloy Lafuente (stronk7) 09c7f259dc weekly release 3.8.5+ 2020-09-17 19:04:18 +02:00
Eloy Lafuente (stronk7) d6cb91de83 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-09-17 19:04:16 +02:00
Eloy Lafuente (stronk7) 64153ea77f Merge branch 'MDL-69395_38' of github.com:stronk7/moodle into MOODLE_38_STABLE 2020-09-17 17:03:59 +02:00
Eloy Lafuente (stronk7) 3a1f0f9641 MDL-69395 theme_classic: remove superfluous selector already in boost 2020-09-17 13:06:33 +02:00
Eloy Lafuente (stronk7) df4eab54cb Merge branch 'MDL-62387-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-17 00:10:00 +02:00
Eloy Lafuente (stronk7) 85cfba7f21 Merge branch 'MDL-69395-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-09-16 16:56:28 +02:00
Jun Pataleta bd7cfe1981 Merge branch 'MDL-69663-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-09-16 22:16:06 +08:00
AMOS bot 8849a99cc0 Automatically generated installer lang files 2020-09-16 00:07:14 +00:00
Paul Holden 4b6827d042 MDL-62387 tool_lp: switch to core 'cohort' form element.
The autocomplete AJAX is identical to the version in tool_lp, but also
includes support for excluding suggestions (i.e. cohorts already
synced with the current learning plan).
2020-09-15 08:07:23 +01:00
comete-upn eab36a73fb MDL-69667 competencies: fix competencies count always 0 in frameworks. 2020-09-15 08:37:46 +02:00
Jun Pataleta ff6939dce4 Merge branch 'MDL-42012-38-alt' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-09-15 11:48:24 +08:00
Andrew Nicols a13ccd39ec MDL-42012 cache: Fix missing return value 2020-09-15 11:46:31 +08:00
Eloy Lafuente (stronk7) b60c6b3bdf Merge branch 'MDL-42012-38-alt' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-09-14 23:29:15 +02:00
Paul Holden 71ca64f7f8 MDL-69014 tool_usertours: clean up user preferences of deleted tours. 2020-09-14 20:36:24 +01:00
Paul Holden 92111f008f MDL-66648 user: consistent checks for linking to full profile.
The access checks for displaying a link to a users' full profile
now match the checks performed on the full profile page itself.
2020-09-14 20:21:59 +01:00
AMOS bot 284baff563 Automatically generated installer lang files 2020-09-13 00:07:54 +00:00
AMOS bot 1fc9aa9cc4 Automatically generated installer lang files 2020-09-12 00:07:36 +00:00
Jun Pataleta b21d86f807 Moodle release 3.8.5 2020-09-11 10:41:55 +08:00
sam marshall 0268610d25 MDL-69663 Web services: override_webservice_execution not honoured
If two different plugin types (e.g. theme, local) implement
override_webservice_execution callbacks, then all of them except
the 'last' plugin type do not work correctly.
2020-09-10 09:51:47 +01:00
Sara Arjona 472d293a16 weekly release 3.8.4+ 2020-09-10 08:52:05 +02:00
Sara Arjona 168fa1dda1 Merge branch 'MDL-69466-3.8' of https://github.com/JBThong/moodle into MOODLE_38_STABLE 2020-09-09 11:39:42 +02:00
Thong Bui a8e70bad23 MDL-69466 Autocomplete widget: Improve keyboard accessibility 2020-09-09 13:52:53 +07:00
Andrew Nicols 2072b9a9e3 MDL-42012 cache: Valid definitions are required even when disabled 2020-09-09 14:05:32 +08:00
Andrew Nicols f15f0b1cdf MDL-42012 cache: Fully disable cache for disabled cache factory 2020-09-09 14:05:32 +08:00
Andrew Nicols d2dd04ff2d MDL-42012 cache: Allow data sources to work when caching is disabled 2020-09-09 14:05:32 +08:00
Eloy Lafuente (stronk7) 7ed55774f1 Merge branch 'MDL-69116-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-09-08 23:16:52 +02:00
Sara Arjona 784156217a Merge branch 'MDL-69525-38-1' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-09-08 14:22:16 +02:00
Michael Hawkins 0425db5a80 MDL-69340 tag: Correct the filter input HTML in the tag manager 2020-09-08 08:48:24 +02:00
Mihail Geshoski 6e1451fb39 MDL-69048 book: Sanitize previous chapter value in add new chapter page 2020-09-08 08:48:24 +02:00
Andrew Nicols 8c274e82f4 MDL-68974 calendar: Use page context for block check 2020-09-08 08:48:24 +02:00
Andrew Nicols 4a488b9a5c MDL-68974 blocks: Check permission before generating content 2020-09-08 08:48:24 +02:00
Mihail Geshoski 11e49d6676 MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:48:24 +02:00
Mihail Geshoski 6f4e2cb799 MDL-65115 core_files: Add get_total_content_size() in stored_file class
New function get_total_content_size() is introduced in the stored_file
class. The puprose of this function is to calculate and return the
total size (in bytes) of the content of an archive file.
2020-09-08 08:48:24 +02:00
Andrew Nicols 7790b6727a MDL-68974 admin: Unit tests for context parent/child test 2020-09-08 08:48:24 +02:00
Andrew Nicols 20f7e23af4 MDL-68974 admin: Unit tests for loginas 2020-09-08 08:48:24 +02:00
Andrew Nicols 52b6d73c03 MDL-68974 admin: Prevent login as outside of the desired context 2020-09-08 08:48:24 +02:00
Sara Arjona 78eacf034a Merge branch 'MDL-68344-3.8' of https://github.com/JBThong/moodle into MOODLE_38_STABLE 2020-09-08 08:45:28 +02:00
Jun Pataleta 67e3dbab7f Merge branch 'MDL-69492-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-08 12:56:09 +08:00
Eloy Lafuente (stronk7) ed3482f9cc Merge branch 'MDL-69262-38-2' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-09-07 23:43:17 +02:00
Sara Arjona 3852238df4 Merge branch 'MDL-67468-MOODLE_38_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_38_STABLE 2020-09-07 13:20:17 +02:00
Paul Holden 1c51eaa50c MDL-69492 auth_cas: normalise member distinguished name config. 2020-09-04 08:39:11 +01:00
Paul Holden c329d99d8a MDL-69492 auth_ldap: normalise member distinguished name config. 2020-09-04 08:39:11 +01:00
Nathan Nguyen f48f213e40 MDL-67468 filter_activitynames: use MUC 2020-09-04 15:41:36 +10:00
Thong Bui c2686daae4 MDL-68344 filepicker: File Picker focus lost on upload 2020-09-04 09:50:30 +07:00
Sara Arjona 28a155e712 weekly release 3.8.4+ 2020-09-03 17:09:22 +02:00
Sara Arjona f90459df6f NOBUG: Fixed SVG browser compatibility 2020-09-03 17:09:20 +02:00
Bas Brands 859a49e2ac MDL-69395 theme_boost: improve colour contrast for form input fields
- for this issue the atto styles.css was moved into theme boost so
we can use our preset variable for $gray-500
2020-09-03 16:05:35 +02:00
Andrew Nicols bf0778595f Merge branch 'MDL-69391-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-09-03 11:49:48 +08:00
Andrew Nicols 3a257a2808 Merge branch 'MDL-69360-38' of git://github.com/NoelDeMartin/moodle into MOODLE_38_STABLE 2020-09-03 10:52:27 +08:00
Andrew Nicols 45f5453b2a Merge branch 'MDL-69246_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-09-03 10:40:33 +08:00
Andrew Nicols b74d8568eb Merge branch 'MDL-55340-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-09-03 10:14:46 +08:00
Andrew Nicols 9f770c1be6 Merge branch 'MDL-69069-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-09-03 09:37:37 +08:00
Eloy Lafuente (stronk7) 049bb1d7a7 Merge branch 'MDL-69608-38' of https://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2020-09-03 00:03:51 +02:00
Sara Arjona 687047148f Merge branch 'MDL-68680-MOODLE_38_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_38_STABLE 2020-09-02 17:16:21 +02:00
Marina Glancy ab48f37f68 MDL-69608 core_form: frozen forms do not have form tag 2020-09-02 11:27:29 +02:00
Noel De Martin 6180264ae8 MDL-69360 behat: Fix js ready checks for non-moodle sites 2020-09-02 10:21:09 +02:00
Eloy Lafuente (stronk7) b7905dd4e0 Merge branch 'wip_MDL-69491_m38' of git://github.com/gjb2048/moodle into MOODLE_38_STABLE 2020-09-02 00:27:50 +02:00
Sara Arjona 8d470c5802 Merge branch 'MDL-64525-m38' of https://github.com/NeillM/moodle into MOODLE_38_STABLE 2020-09-01 14:20:44 +02:00
Mihail Geshoski 1d183e38b1 MDL-69525 core: Publish a single event when toggling slave checkboxes 2020-09-01 15:07:49 +08:00
Sara Arjona 80efaa9828 Merge branch 'MDL-51709-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-09-01 09:04:37 +02:00
Sara Arjona 25c47ba407 Merge branch 'MDL-69394-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-09-01 06:45:38 +02:00
Tim Hunt 33f880fba7 MDL-69507 duration form field: should return an int number of seconds 2020-09-01 11:38:36 +08:00
Andrew Nicols 9e9a1db47a Merge branch 'MDL-69387-38-2' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-09-01 11:00:04 +08:00
Andrew Nicols a711c69d8f Merge branch 'MDL-69505-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2020-09-01 07:30:40 +08:00
Andrew Nicols 2a98eedef0 Merge branch 'MDL-56595-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-01 07:30:40 +08:00
Luca Bösch dadccb9237 MDL-51709 gradebook: Name display in single view. 2020-08-31 18:26:01 +02:00
Shamim Rezaie 2ce0766cfc MDL-69116 qtype_multichoice: accessibility improvement
- Screen-readers should not see 'clear my choice' when it is not visible
- 'clear my choice' option should only become visible when a choice is
selected
2020-09-01 00:09:38 +10:00
Shamim Rezaie d456737d72 MDL-69116 qtype_mutichoice: Use label for the "clear my choice" link 2020-08-31 23:59:22 +10:00
Bas Brands cef948595b MDL-69069 theme_boost: color contrast for custom alerts 2020-08-31 08:47:25 +02:00
Jake Dallimore 24bf9c39d9 MDL-69505 core_form: fix js min/max date restriction in dateselector
This was using the yui2-calendar attribute, not the yui 3 attribute.
2020-08-31 08:11:59 +08:00
Gareth Barnard adca4fe505 MDL-69491 themes: No 'fontsize' setting in Boost causes unit conflict. 2020-08-28 14:08:27 +01:00
Marina Glancy a44ce9a024 MDL-55340 mod_feedback: export question labels
This was present in export in 3.0 but got lost during export
refactoring in 3.1
2020-08-28 12:25:24 +02:00
Andrew Nicols fde001145b Merge branch 'MDL-69112-38' of git://github.com/merrill-oakland/moodle into MOODLE_38_STABLE 2020-08-28 13:27:39 +08:00
Nathan Nguyen 85ffac56e8 MDL-68680 core_grades: check grade item before trigger delete event 2020-08-28 11:40:14 +10:00
Paul Holden 11b4e810fb MDL-56595 tool_usertours: set page params when configuring tours/steps. 2020-08-27 23:07:59 +01:00
Tim Hunt ab1545b20e MDL-69246 questions: allow for float issues when validating manual marks
As well as fixing the bug, I also rewrote the test to use
data providers, which should lead to more useful failure messages.

And, I moved the magic number we used as the float tolerence to
be a named constant.
2020-08-27 17:40:45 +01:00
Sara Arjona c3673a9be1 weekly release 3.8.4+ 2020-08-27 17:36:26 +02:00
Sara Arjona 9283ba7380 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-08-27 17:36:24 +02:00
Jun Pataleta bb41dd7921 MDL-69262 core: Use core/action_menu_link in core/action_menu_trigger
* Introduce the "actionmenulinkclasses" block in the action_menu_link
template so other templates importing it can have the option to override
its classes.
* Have the action menu trigger template use the action menu link
template to reduce code duplication.
2020-08-27 13:23:24 +08:00
Jun Pataleta 8305c3ce9a MDL-69262 core: Make instance count variable as a static class variable
With the static function variable $instance, calls to
\action_menu_link::export_for_template() from its subclasses are stored
in different variables. This causes duplicate IDs when different
implementations of action menu links are rendered on the action menu
trigger/link template. (e.g. action_menu_link and
action_menu_link_secondary both rendered on the same page).
To make the incrementing uniform for the action_menu_link class and its
implementations, the $instance variable is moved out of the
export_to_template() method and is now made to a static class variable.
2020-08-27 13:17:45 +08:00
Andrew Nicols 1592b68f0b Merge branch 'MDL-69458-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-08-27 12:43:48 +08:00
Andrew Nicols faf7b144a1 Merge branch 'MDL-69501-38-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-08-27 11:31:35 +08:00
eWallah 08c359f366 MDL-67413 competencies: do nothing upon activity completion 2020-08-27 11:09:09 +08:00
Andrew Nicols b03196fe78 Merge branch 'MOODLE_38_MDL-69358' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-08-27 10:58:17 +08:00
Justin Hunt ec92de9187 MDL-66810 mod_lti: Reinstate deprecated default permissions on iframe
microphone, webcam, camera, midi, encrypted-media, geolocation
2020-08-27 10:27:02 +08:00
AMOS bot c3fcedf205 Automatically generated installer lang files 2020-08-27 00:07:14 +00:00
Adrian Greeve d2dec45ec8 Merge branch 'MDL-69419-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-08-27 08:06:30 +08:00
Sara Arjona 84564c42c8 Merge branch 'MDL-69389-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-08-26 18:03:13 +02:00
Sara Arjona 1084eba9a8 Merge branch 'MDL-69114-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-26 16:29:01 +02:00
Jun Pataleta 6895074a62 MDL-69389 theme_classic: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:07:41 +08:00
Jun Pataleta d79cd16ae7 MDL-69389 theme_boost: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:07:41 +08:00
Jun Pataleta 9579c751ab MDL-69387 pix: Create PNG versions of the darkened completion icons
Thanks to Barbara Ramiro <barbara@moodle.com> for the help in
generating these PNG versions of the darkened completion icons!
2020-08-26 11:03:28 +08:00
Jun Pataleta 1cb1763216 MDL-69387 pix: Darken completion icons
Darkened the fills of completion icons in order to meet the required
minimum contrast ratio of 3:1.
* Changed gray fills (#999) to #949494.
* Changed blue fills (#76A1F0) to #6393ee
* Changed green fills (#9C3) to #79a128

Thanks to Barbara Ramiro <barbara@moodle.com> for the help in
updating the SVG icons!
2020-08-26 11:03:28 +08:00
Jun Pataleta 2fb006bfb1 MDL-69394 calendar: Fix event colour indicator contrast
* Darkened the link and clickable icon colours inside coloured events.
* Added borders around event colour indicators inside the month-view of
  the calendar for better contrast against the white background.
2020-08-26 11:01:17 +08:00
Andrew Nicols fbc937f4b4 MDL-69419 core: Task reset tests cannot use random test times
If a scheduled task which uses a 'R' field is picked, then the reset of
updated task times will not necessarily be correctly determined as the
randomisation is picked during reset.

This can lead to some random test failures.

Actively specifying a test which does not make use of the 'R' random
field time addresses this issue.
2020-08-26 09:58:49 +08:00
AMOS bot e30b6117f7 Automatically generated installer lang files 2020-08-26 00:07:33 +00:00
Jun Pataleta d0d16bd8fb MDL-69391 theme: Darken course selector text colour
Use $gray-600 for a darker text colour in the course select box.
This also makes the colour consistent with the view selector which
also uses $gray-600.
2020-08-25 14:48:40 +08:00
Jun Pataleta dc378c70e3 MDL-69391 theme: Darken navbar-light colour
Increase the opacity for the sass variable $navbar-light-color a
little bit in order to achieve an acceptable colour contrast against
the white background.
2020-08-25 14:47:51 +08:00
Neill Magill 15aa7e0b20 MDL-64525 comments: Should not be able to delete frozen comments
Before this change in a frozen context a user would be able to delete
their own comments.

After this change a user will only be able to delete their own comments
if they still have the capability to post new comments or the capability
to delete comments from any user.
2020-08-24 08:01:26 +01:00
Neill Magill 5192605a11 MDL-64525 comments: Tests for deleting frozen comments 2020-08-24 08:01:26 +01:00
Mihail Geshoski c6d2515534 MDL-69458 report_insights: Respect perpage value in pagination bar 2020-08-24 09:30:57 +08:00
Eloy Lafuente (stronk7) 4f3271c536 Merge branch 'MDL-69493-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-22 17:09:54 +02:00
AMOS bot b4025d8655 Automatically generated installer lang files 2020-08-22 00:07:58 +00:00
Eloy Lafuente (stronk7) a4ab0db4bd weekly release 3.8.4+ 2020-08-21 20:43:15 +02:00
Helen Foster 972f50ff90 MDL-69501 lang: Import fixed English strings (en_fix)
Significant string change: error:nobadges,core_badges - Additional info
explaining that site badges can only have other site badges as criteria
2020-08-21 13:58:56 +02:00
Jun Pataleta 5aeec826f8 Merge branch 'MDL-66818-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-08-21 11:32:57 +08:00
Andrew Nicols 94d2dcb8e1 MDL-66818 mod_forum: Use cap manager to check exportability 2020-08-21 08:17:27 +08:00
Andrew Nicols c8273f7d7f MDL-42434 chat: Disable stylelint important check 2020-08-21 07:38:06 +08:00
Sara Arjona affb1ae2ff MDL-42434 mod_chat: styles for chat themes to view help-icon properly
The styles for the bubble and the compact themes have been reviewed
because there weren't enough contrast for the help icon.
2020-08-20 23:44:00 +01:00
Sara Arjona fea72a6eb3 MDL-42434 mod_chat: display the whole help text
When testing this issue was raised that the help text was cut-off.
This patch should fix this issue changing the placement from
right/left to top.
2020-08-20 23:44:00 +01:00
Andrew Nicols 64d0d94aeb Merge branch 'MDL-69375_38' of https://github.com/Cvmcosta/moodle into MOODLE_38_STABLE 2020-08-20 11:51:24 +08:00
Adrian Greeve 9b4d87bcc2 Merge branch 'MDL-68964-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2020-08-20 11:43:33 +08:00
Adrian Greeve 18740e4938 Merge branch 'MDL-42434-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-08-20 11:25:35 +08:00
Adrian Greeve 261be42ab5 Merge branch 'MDL-68683-38-fix' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-08-20 10:25:59 +08:00
Andrew Nicols 181bef2ed6 Merge branch 'MDL-69449-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-20 09:26:59 +08:00
Andrew Nicols 94bd3452e4 Merge branch 'MDL-68889-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-20 09:20:01 +08:00
Simey Lameze fb9670a9b2 MDL-68683 competencies: fix query to delete stale files 2020-08-20 09:17:42 +08:00
Andrew Nicols 00cbbbc930 Merge branch 'MDL-67415_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-08-20 08:31:12 +08:00
Andrew Nicols bb31c5eb3e Merge branch 'MDL-66818-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-08-20 08:17:17 +08:00
Simey Lameze 9d5a987a97 MDL-66818 mod_forum: remove unnecessary behat steps 2020-08-20 08:05:13 +08:00
gthomas2 a1b7b8b98f MDL-66818 mod_forum: hide portfolio export button based on caps 2020-08-20 08:05:13 +08:00
Andrew Nicols 1e157fb528 Merge branch 'MDL-66900-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-20 07:55:34 +08:00
Andrew Nicols b5c1e5379e Merge branch 'MDL-69271_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-08-20 07:36:44 +08:00
Andrew Nicols c78a136be4 Merge branch 'MDL-61215-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-08-20 07:17:37 +08:00
Andrew Nicols 978fff44ab Merge branch 'MDL-69401-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-08-20 07:03:54 +08:00
Victor Deniz Falcon 3b212136de Merge branch 'MDL-69297-38' of git://github.com/peterRd/moodle into MOODLE_38_STABLE 2020-08-19 23:48:56 +01:00
Eloy Lafuente (stronk7) 9ffab782f7 MDL-63375 workshop: apply specific IE10/11 fix
Credit goes to Matt Davidson (Syxton)
2020-08-19 17:54:18 +02:00
Peter Dias 30ccbb075c MDL-69297 assign: Check whether there is content for a submission
Confirm there is some content to be submitted for an assignment when processing it.
2020-08-19 15:48:33 +08:00
Adrian Greeve 793823bca8 Merge branch 'MDL-66665-38-POC2' of git://github.com/peterRd/moodle into MOODLE_38_STABLE 2020-08-19 14:29:58 +08:00
Peter Dias dd8b086494 MDL-66665 assign: Check whether a modified user could actually grade 2020-08-19 13:41:02 +08:00
Adrian Greeve 30b2b58c27 Merge branch 'MDL-68683-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-08-19 12:58:27 +08:00
Adrian Greeve 8c5a8a25b5 Merge branch 'MDL-69475_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-08-19 10:46:01 +08:00
Andrew Nicols f6c9f72a76 Merge branch 'MDL-26401-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-08-19 08:52:43 +08:00
Eloy Lafuente (stronk7) 7e1223958c Merge branch 'MDL-65847-auth_db_error_handling-38' of git://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-08-19 00:35:48 +02:00
Eloy Lafuente (stronk7) 43362649e5 Merge branch 'MDL-63375-38' of https://github.com/syxton/moodle into MOODLE_38_STABLE 2020-08-19 00:13:24 +02:00
Eloy Lafuente (stronk7) bddf4eecf6 Merge branch 'MDL-68444-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-08-18 19:15:23 +02:00
Eloy Lafuente (stronk7) e881a516d0 MDL-69475 backup: Proper handling of backup::RELEASE versions
1) Remove any floatval() casting. They are breaking / killing
   .10 versions (converting them to .1). Since Moodle 2.0 all the
   backup::RELEASE have been 100% numerical values.
2) Use version_compare() always to compare backup::RELEASE values.
   They are always versions and the function is aware of versions
   > .9, able to clean/ignore alpha chars... and everything else.

Note that I've also changed a couple of cases in formats (topics and
weeks) that were correct, but just added the same comment and used
the same version_compare() comparison parameters style, so all uses
in core are consistent (and safe to be copied out there).
2020-08-18 16:25:55 +02:00
Eloy Lafuente (stronk7) 62c1a7b816 Merge branch 'MDL-69273-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-08-18 10:59:50 +02:00
Simey Lameze 0bca22b30f MDL-68683 competencies: step to delete orphaned evidence files 2020-08-18 16:07:08 +08:00
Simey Lameze 45d06fe9b6 MDL-68683 core: fix DML exception on upgrade step 2020-08-18 16:04:34 +08:00
Andrew Nicols 43930d5e8a MDL-69273 travis: Use exttests for https too 2020-08-18 07:50:48 +08:00
Andrew Nicols b226665e80 MDL-69273 travis: Move exttests check to after_script
The result of the final command `script` phase determines the build
result.

The cleanup belongs in the `after_script` phase.
2020-08-18 07:40:14 +08:00
Paul Holden edd91d16fa MDL-69493 cohort: remove escaping of return URL params. 2020-08-17 21:30:15 +01:00
Mihail Geshoski 5c3bdc9259 MDL-69401 book: Limit character length in chapter title 2020-08-17 09:04:36 +08:00
carlos 8dc60e1926 MDL-69375 mod_lti: Fix Names and Roles Link header format
- Changed line 469 of memberships.php to build Link header according to the Web Linking specification RFC8288.
2020-08-14 17:12:54 -03:00
Sara Arjona b91869f889 MDL-42434 mod_chat: add again the usingchat help icon
In Moodle 2.4 the help icon displayed in the chat window was
removed. It has been added to gui_ajax and gui_basic in order to help users.
2020-08-14 17:13:13 +02:00
Sara Arjona 25128d16aa MDL-61215 core_user: use the new optimised_image filetype group
For the user profile picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:51 +02:00
Sara Arjona 62cdf371df MDL-61215 core_badges: use the new optimised_image filetype group
For the badge picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:50 +02:00
Sara Arjona e6bf955210 MDL-61215 core_files: add new optimised_image group
Currently, PHP getimagesize method doesn't support SVG images.
As some features, such as badges, processs and optimise the images
before using them, a new filetype group has been created to exclude
SVG from there: optimised_image.
SVG can't be removed from web_image because then users won't be
able to add SVG images to their courses using labels, pages...
2020-08-14 17:06:50 +02:00
Eloy Lafuente (stronk7) 4ec7c29b30 MDL-69271 auth_ldap: Don't assume any ordering, just verify matches
Both ldap or the DB can return information in a non-consistent
ordering leading to events to be generated in different order.

And current tests are, right now, assuming a given order.

Note this is a rare random, but it's happening, so better
fix it, see the issue for some more details.

So we just do the tests ordering immune, verifying that all the
expected events have been triggered and done. Irrespectively of their order.
2020-08-14 13:40:13 +02:00
Andrew Nicols cf6cdd99d4 weekly release 3.8.4+ 2020-08-14 14:42:31 +08:00
Andrew Nicols 1ed9fa8f4a NOBUG: Fixed SVG browser compatibility 2020-08-14 14:42:29 +08:00
Andrew Nicols f520dbe674 Merge branch 'MDL-68666-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-13 15:21:52 +08:00
Bas Brands b61392fa53 MDL-68666 core_pix: add missing fallback icons 2020-08-13 08:51:18 +02:00
Andrew Nicols c4fc929e3f Merge branch 'MDL-69253_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-08-13 11:53:06 +08:00
Andrew Nicols ae320424ef Merge branch 'MDL-60492-tagcloud_html-38' of https://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-08-13 11:45:28 +08:00
Adrian Greeve 2d14596f5a Merge branch 'MDL-68423-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2020-08-13 11:06:30 +08:00
Andrew Nicols 11e171ffe5 Merge branch 'MDL-69421-38' of git://github.com/noeldemartin/moodle into MOODLE_38_STABLE 2020-08-13 09:36:14 +08:00
Andrew Nicols 3d5679803d Merge branch 'MDL-60260-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-13 07:55:52 +08:00
Eloy Lafuente (stronk7) bdea78ba61 MDL-67415 environment: change requirements
- mysql requirement up to 5.7
- postgres requirement up to 9.6
2020-08-13 01:30:26 +02:00
Eloy Lafuente (stronk7) c6fb7763bb MDL-67415 environment: 3.10 base information
This is a direct copy of the 3.9 branch to have
changes under control easier for next commits.
2020-08-13 01:30:26 +02:00
Eloy Lafuente (stronk7) 1d412ff1df Merge branch 'MDL-68860-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-13 01:08:43 +02:00
Eloy Lafuente (stronk7) 2e93f26f2f Merge branch 'MDL-68558-38-plugindepscheckdeadend' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-08-13 00:40:25 +02:00
Eloy Lafuente (stronk7) 81dfa11ba8 Merge branch 'MDL-67394-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-13 00:29:24 +02:00
Eloy Lafuente (stronk7) 6a6caa019f Merge branch 'MDL-67002_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-08-13 00:26:20 +02:00
Ferran Recio c1b3ba3e07 MDL-68964 mod_chat: fix theme param 2020-08-12 17:31:42 +02:00
Bas Brands 5d412e18e7 MDL-68889 block_recentlyaccessedcourses: small viewport issues
- on small devices the recentlyaccessedcourses does not show any courses
2020-08-12 13:06:20 +02:00
Paul Holden b73bb7b9c4 MDL-66900 course: don't clean category description when editing. 2020-08-12 11:48:35 +01:00
Simey Lameze d4d744d544 MDL-26401 group: change import to use csv_import_reader class 2020-08-12 16:36:05 +08:00
Simey Lameze 4cdcf3a407 MDL-26401 group: add delimiter and encoding fields to import 2020-08-12 16:36:05 +08:00
Paul Holden a0283e7bb3 MDL-69449 block_timeline: use dayslimit context data in template.
Ensures the correct value is used when initially rendering the
course timeline.
2020-08-12 09:19:47 +01:00
Andrew Nicols 0ae11f6123 Merge branch 'MDL-68618-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-12 13:41:21 +08:00
Andrew Nicols c1efa9acf4 Merge branch 'MDL-69353-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-12 11:22:59 +08:00
Andrew Nicols 5ed2aef513 Merge branch 'MDL-68334-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-08-12 11:14:35 +08:00
Andrew Nicols 1466bef278 Merge branch 'MDL-69296-m38' of https://github.com/NeillM/moodle into MOODLE_38_STABLE 2020-08-12 10:31:43 +08:00
Mikhail Golenkov 7132e1a398 MDL-69358 backup: Do not clean up records for incomplete adhoc tasks.
Co-authored-by: Heena Agheda <heenaagheda@catalyst-au.net>
2020-08-12 12:09:30 +10:00
Andrew Nicols 4328b93712 Merge branch 'MDL-68731_38' of https://github.com/jonof/moodle into MOODLE_38_STABLE 2020-08-12 09:12:37 +08:00
Andrew Nicols bdfc738c6f Merge branch 'MDL-69168_recently-accessed-items-block-uses-stock-lti-icon' of https://github.com/stopfstedt/moodle into MOODLE_38_STABLE 2020-08-11 13:00:54 +08:00
Adrian Greeve 07d4b70470 Merge branch 'MDL-69204-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-11 08:46:22 +08:00
Paul Holden de58d4b0a1 MDL-68618 mod_forum: stop reverting idnumber when updating instance. 2020-08-10 09:11:20 +01:00
Paul Holden 349ebe7f45 MDL-68860 mod_lti: Oracle support for retrieving shared secrets.
Thanks to Mark van Hoek!
2020-08-10 09:06:33 +01:00
Adrian Greeve fe39303913 Merge branch 'MDL-60493-grader_span_tag-38' of https://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-08-10 09:23:13 +08:00
Luca Bösch 7abc2da93b MDL-68334 user: Display name in footer as elsewhere. 2020-08-08 10:30:04 +02:00
Stefan Topfstedt bf9d8d79d5 MDL-69168 block_recentlyaccesseditems: apply custom icon
Overwrite the default mod icon with the configured icon url if
applicable.
2020-08-07 09:13:06 -07:00
Matt Davidson 155332f4aa MDL-63375 workshop: fix rubric grid view 2020-08-07 08:49:27 -04:00
Eloy Lafuente (stronk7) 24c68767e5 weekly release 3.8.4+ 2020-08-06 20:51:27 +02:00
Noel De Martin 5b38dd9e1e MDL-69421 behat: Revert app behat navigation to call session visit 2020-08-06 12:15:07 +02:00
Jun Pataleta 72f730972a Merge branch 'MDL-60501-h4_close_tag-38' of https://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-08-06 12:11:07 +08:00
Jun Pataleta f5c7fcd181 Merge branch 'MDL-69111-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-06 11:48:34 +08:00
Adrian Greeve 2d436520dc Merge branch 'MDL-40227-38-1' of git://github.com/peterRd/moodle into MOODLE_38_STABLE 2020-08-06 11:29:35 +08:00
Peter eb5d0d7d59 MDL-40227 mod_lesson: Use localised float formatting
* Leverage PARAM_LOCALISEDFLOAT
* Store all numbers with standard '.' dec formatting
* Show all numbers based on locale settings
* Behat test to cover different cases using numeric questions and modified locale setting
2020-08-06 10:44:48 +08:00
Adrian Greeve d158589158 Merge branch 'MOODLE_38_MDL-66626' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-08-06 09:08:26 +08:00
Eloy Lafuente (stronk7) 268e3b893a Merge branch 'MDL-66670-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-06 00:58:33 +02:00
Leon Stringer 54004f286e MDL-60492 core_tag: Fix title attribute
Attribute 'title' was specified inside a condition but closing `"` was
outside condition possibly resulting in <a href="..." class="..." ">.
Also moved </a> outside of condition to match <a>.
2020-08-05 12:56:02 +01:00
Adrian Greeve 12baca4b15 Merge branch 'MDL-68647-38-forumprivacysql' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-08-05 14:23:28 +08:00
Adrian Greeve 08e86bd7b1 Merge branch 'MDL-60932-38' of git://github.com/aanabit/moodle into MOODLE_38_STABLE 2020-08-05 10:09:44 +08:00
Eloy Lafuente (stronk7) 36e03f1596 Merge branch 'MDL-67831-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-05 00:48:31 +02:00
Tim Hunt b1341895b1 MDL-69253 mod_quiz: unit test for the last commit 2020-08-04 14:51:13 +01:00
Josh Ebarvia 6d3dca55f8 MDL-69253 mod_quiz: Fix timecreated is 0 when creating a quiz activity 2020-08-04 14:51:12 +01:00
Jun Pataleta d86741395e Merge branch 'MDL-60574_38' of https://github.com/t-schroeder/moodle into MOODLE_38_STABLE 2020-08-04 19:50:20 +08:00
Eloy Lafuente (stronk7) 0f6c21c836 Merge branch 'MDL-55299-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2020-08-04 12:34:15 +02:00
Tim Schroeder 8ae39ac69e MDL-60574 atto_undo: fixed redo erasing content
When you'd hit ctrl-y with nothing on the redo stack the entire
content of Atto would get deleted with no way of getting it back.
2020-08-04 09:25:23 +02:00
Leon Stringer 957baa0871 MDL-65847 auth_db: user_update() handle errors
The external database authentication plugin (auth_db) can update the
external database if mapped fields are set to Update external: On
update.  This change adds error handling in case this update fails.
2020-08-03 11:42:50 +01:00
Eloy Lafuente (stronk7) 678bcecc0d Merge branch 'MDL-62980-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-03 12:38:37 +02:00
Bas Brands 06f6b499eb MDL-69114 theme_boost: improve the color contrast for .*-info classes 2020-08-03 11:41:40 +02:00
Eric Merrill 88aa4e2071 MDL-69112 assign: Improve parsing of uploaded feedback names 2020-07-31 19:08:43 -04:00
Amaia Anabitarte 49403f979a MDL-60932 core_user: Fix docs link for participants page
Co-authored by: David Mudrák <david@moodle.com>
2020-07-31 10:30:43 +02:00
Neill Magill 28047fa3b1 MDL-69296 resource: Pressing cancel should always exit settings form
Before this change if a user used navigated to a resource activity
from another activity and then edited the settings it was likely
that using the cancel button would result in file downloading,
rather than being returned to their last page.

After this change the user will be back on the page they came from.
2020-07-31 07:58:16 +01:00
Paul Holden 98292864e8 MDL-67394 dml: improve thrown exception when Oracle can't parse query. 2020-07-30 16:23:02 +01:00
Victor Deniz Falcon 71f3a7fca9 weekly release 3.8.4+ 2020-07-30 12:54:08 +01:00
Victor Deniz Falcon 8a416d4e63 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-07-30 12:54:02 +01:00
Paul Holden 94f4f39ab7 MDL-62980 tool_dataprivacy: show persistent errors inside form. 2020-07-30 08:23:26 +01:00
Eloy Lafuente (stronk7) ad30b41f91 Merge branch 'MDL-63252-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-07-30 00:48:15 +02:00
Victor Deniz Falcon 7803827502 Merge branch 'MDL-66707-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-07-29 23:18:09 +01:00
Victor Deniz Falcon a6986b3e36 Merge branch 'MDL-68968-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-07-29 22:03:16 +01:00
Paul Holden 73b7597a8c MDL-60260 course: validate external fields on create/update course.
Ensure course fullname/shortname fields are not empty.
2020-07-29 19:57:30 +01:00
Victor Deniz Falcon 9b54ddd465 Merge branch 'MDL-68706-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-07-29 19:04:18 +01:00
Victor Deniz Falcon 39dc97aef9 Merge branch 'MDL-69199-38' of git://github.com/aanabit/moodle into MOODLE_38_STABLE 2020-07-29 11:56:08 +01:00
Jonathon Fowler 8351210984 MDL-68731 forum: fix digests not correctly updating post read statuses 2020-07-29 15:41:21 +10:00
Jun Pataleta bfce37757f Merge branch 'MDL-69252-close_tag-38' of https://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-07-29 11:17:32 +08:00
Eloy Lafuente (stronk7) b4d8be2042 Merge branch 'MDL-69319-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2020-07-29 00:20:53 +02:00
Leon Stringer 7d3b148e94 MDL-60493 mod_assign: Unused JS variables
Removed unused JavaScript variables fixing CI warning "ESLint error
[no-unused-vars]".
2020-07-28 12:05:49 +01:00
Leon Stringer 595e05d2a7 MDL-60493 mod_assign: Remove rogue </span>
In the grading interface (/mod/assign/view.php?id=2&action=grader)
there was a rogue </span> with no opening <span>.  Also changed
<span><form> to <div><form> in included template fixing CiBoT HTML
Validation error.
2020-07-28 12:05:12 +01:00
Jun Pataleta 4a776d2f67 Merge branch 'MDL-65453-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-07-28 11:41:46 +08:00
Simey Lameze 975c1d4438 MDL-65453 core: fix behaviour of --skip-database option on install 2020-07-28 11:27:39 +08:00
Paul Holden 019e7dd26c MDL-69204 tool_dataprivacy: summary link only on current user profile. 2020-07-27 17:24:48 +01:00
Jun Pataleta 1b479562cd Merge branch 'MDL-66755-38' of https://github.com/SergioComeron/moodle into MOODLE_38_STABLE 2020-07-27 17:07:38 +08:00
AMOS bot d2b35aea26 Automatically generated installer lang files 2020-07-27 00:07:37 +00:00
AMOS bot 3678ad0949 Automatically generated installer lang files 2020-07-27 00:07:37 +00:00
Mikhail Golenkov 8c4893ffdc MDL-66626 assignfeedback_editpdf: Check page count for attempt.
Co-Authored-By: John Yao <johnyao@catalyst-au.net>
2020-07-27 09:51:54 +10:00
Mikhail Golenkov bab00d9b8c MDL-66626 assignfeedback_editpdf: Count files outside of foreach loop.
Co-Authored-By: John Yao <johnyao@catalyst-au.net>
2020-07-27 09:51:54 +10:00
AMOS bot 88723a6a1d Automatically generated installer lang files 2020-07-25 00:08:02 +00:00
Paul Holden 035c042f1e MDL-68706 customfield_textarea: allow field content to be cleared. 2020-07-24 13:44:58 +01:00
Paul Holden 6ed3f966b7 MDL-69353 admin: set page title when prompting for upgrade key. 2020-07-24 13:30:34 +01:00
Tim Hunt a7f70278c8 MDL-67002 quiz reports: fix sorting on Oracle in the responses report 2020-07-24 11:44:43 +01:00
Sergio Comerón ae1e1dfbd6 MDL-66755 forum: Subscription cancel when edit a message 2020-07-24 09:03:07 +02:00
Sam Marshall 5f417739f3 MDL-63252 tool_xmldb: convert default to float to avoid false positives 2020-07-24 07:54:02 +08:00
Simey Lameze 0d2f34b40d MDL-68968 core: fix wrong phpdoc on admin_externalpage 2020-07-24 07:46:33 +08:00
Amaia Anabitarte e0aa753fe1 MDL-69199 mod_quiz: Show timefinish in user Complete report 2020-07-23 18:54:25 +02:00
Victor Deniz Falcon f001dc447e weekly release 3.8.4+ 2020-07-23 16:10:30 +01:00
Victor Deniz Falcon cc80dec71e Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-07-23 16:10:25 +01:00
David Mudrák b89ebd255c MDL-68558 admin: Allow to go back to plugins check page on failed deps
Once the admin reaches the Plugin dependencies check with a failed
plugin dependency, the "Continue" button should take him/her to the
previous page where the dependency can be sorted out, or the plugin
installation cancelled. Also the "Cancel this installation" should work
on this page, too.

None of this was happening correctly because the page with failed
dependencies is loaded with "confirmplugincheck" set to 1 as a result
of confirming the previous step. We must explicitly override it back to
0 to navigate the user back to the previous step.
2020-07-23 17:05:03 +02:00
Bas Brands 0c773a6a16 MDL-67831 core_message: use space available for message index page
- the prevents the message reply box from being out of view when
a user has many conversations.
2020-07-23 11:34:52 +02:00
AMOS bot b45835b7b8 Automatically generated installer lang files 2020-07-23 00:07:56 +00:00
Victor Deniz Falcon 5aacc83bc4 Merge branch 'MDL-65819-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-07-22 19:01:36 +01:00
Ferran Recio ebb0e91226 MDL-55299 mod_feedback: fix quoted values donwload 2020-07-22 19:23:35 +02:00
Andrew Nicols 3ecf4dff52 MDL-69138 behat: Update session->visit() to use visit step 2020-07-22 16:48:37 +08:00
Andrew Nicols 3f2b9661d8 MDL-69138 behat: Add "I visit :localurl" step 2020-07-22 16:48:37 +08:00
Jun Pataleta 6b3d7a34dd Merge branch 'MDL-52052-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-07-22 13:46:59 +08:00
Jun Pataleta 2e38a7cc40 Merge branch 'MDL-68178-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-07-22 12:58:38 +08:00
Eloy Lafuente (stronk7) 95269fdb77 Merge branch 'MDL-69160-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-21 23:29:48 +02:00
Bas Brands 5a1745b254 MDL-69111 mod_forum: forum grading on small viewports
- changes to make the forum grading UI accessible in small
viewports to meet criterion 1.4.10 Reflow.
2020-07-21 17:42:55 +02:00
David Mudrák e271e28e78 MDL-68647 forum: Add index over posts privatereplyto field
This is to further improve the performance of searching of posts related
to the given user. Once both userid and privatereplyto are indexed, the
query planner can use the merged index to search for posts records.
2020-07-21 11:45:56 +02:00
David Mudrák 9cfcb4bf8a MDL-68647 forum: Improve the SQL performance in the privacy provider
The idea here is to replace the existing LEFT JOINs and
OR / IS NOT NULL conditions with INNER JOINs and ANDs. So we gather the
discussions data from all three areas in individual queries, make their
UNION. The GROUP BY was present before and maybe it is not even needed
any more (due to how UNION works) but it should not hurt to keep it.

This leads to significantly improved performance.
2020-07-21 11:45:56 +02:00
David Mudrák f25f8f0701 MDL-68647 forum: Add missing advanced grading library inclusion
The method get_grading_manager() is called in the file so make sure the
library is loaded. Without it, the forum's privacy provider unit test
ended with error.

Not directly related to the issue, but noticed while working on it.
2020-07-21 11:45:55 +02:00
Adrian Greeve 03670af6da Merge branch 'MDL-67657-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-21 14:49:14 +08:00
Ferran Recio 13f06f7a8e MDL-68423 message: avoid self-xss when send a message 2020-07-20 19:56:13 +02:00
Eloy Lafuente (stronk7) a080d4c0df Merge branch 'm38_MDL-67440' of https://github.com/danmarsden/moodle into MOODLE_38_STABLE 2020-07-20 17:08:31 +02:00
Leon Stringer ab7849c105 MDL-60501 themes: Fix closing <h4> in template
In site admin pages (/admin/search.php) <h4> elements were generated
with an incorrect second opening <h4> instead of a closing </h4>.
2020-07-20 15:20:42 +01:00
Bas Brands 756e148f31 MDL-66670 theme_boost: list bullet styling
Ensure lists with bullets are not cut off
2020-07-20 14:49:04 +02:00
Jake Dallimore 5a2ca41bba MDL-69319 mod_lti: style and docs changes in external tests 2020-07-20 15:04:10 +08:00
Jake Dallimore c9d1d8141f MDL-69319 mod_lti: replace try/catch with expectException in ext tests 2020-07-20 15:04:10 +08:00
Jake Dallimore 34616581c5 MDL-69319 mod_lti: remove unused vars from externallib_test 2020-07-20 15:04:10 +08:00
Jake Dallimore 33ec9e3a37 MDL-69319 mod_lti: move test data generation out of common setup 2020-07-20 15:04:10 +08:00
Jake Dallimore 147b984630 MDL-69319 mod_lti: call clean_returnvalue in external tests 2020-07-20 15:04:09 +08:00
Mihail Geshoski 4a2a779e12 MDL-68178 auth: CSRF protection for the resend confirmation email form
Credit to Chandra Kishor.
2020-07-20 12:31:06 +08:00
Adrian Greeve 6364b15e24 Merge branch 'MDL-69113_38' of https://github.com/jonof/moodle into MOODLE_38_STABLE 2020-07-20 10:37:49 +08:00
Mihail Geshoski b71744bb4d MDL-52052 gradeimport_csv: Do not skip rows with blank user fields 2020-07-20 08:55:51 +08:00
Eloy Lafuente (stronk7) 241eacaa7a Merge branch 'MDL-69278-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-18 11:56:15 +02:00
Paul Holden 37f3c318ea MDL-65819 message: send contact requests using recipient language. 2020-07-17 13:38:08 +01:00
Sara Arjona 4a6de87cae weekly release 3.8.4+ 2020-07-16 21:28:30 +02:00
Andrew Nicols a89aaec1af MDL-67657 behat: Open course with editing using URL
This is a huge performance improvement for behat.

The current set of steps loads the page
It then looks for the Classic/Clean version of the settings menu
If it fails to find it looks for the Boost Cog
Then it clicks the "Turn editing on" button

This can take a substantial period.

We do not actually need to run these steps as we are able to jump
straight to the URL. We already have access to the sesskey value
required to do this.

There is not loss in testing functionality because the actual testing of
the Turn editing functionality is tested in other places sufficiently.
2020-07-16 11:06:43 +08:00
Andrew Nicols 00df049b9a MDL-67657 behat: Convert existing uses of executeScript 2020-07-16 11:06:31 +08:00
Andrew Nicols a37313a6d1 MDL-67657 behat: Add wrapper for JS execution 2020-07-16 11:05:32 +08:00
Jun Pataleta b3c5e4f5d7 Merge branch 'MDL-69215-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-16 09:42:42 +08:00
Andrew Nicols 5eb38638bb MDL-69278 behat: Correct variable name 2020-07-16 08:30:13 +08:00
Andrew Nicols aeb85b66f2 MDL-69278 behat: Mark tests as failed when unable to start Session 2020-07-16 08:30:13 +08:00
Andrew Nicols 7ba288d1d0 MDL-69215 output: Correct use of icon_system::instance 2020-07-16 07:30:32 +08:00
Andrew Nicols d7e8f35e91 MDL-69215 output: Correct font awesome for themes 2020-07-16 07:30:32 +08:00
Eloy Lafuente (stronk7) db6f80a784 Merge branch 'MDL-69165-38' of https://github.com/HuongNV13/moodle into MOODLE_38_STABLE 2020-07-15 23:47:52 +02:00
Charles Fulton b20a875381 MDL-69074 admin: ensure consistent default for getremoteaddrconf 2020-07-15 19:06:06 +02:00
Sara Arjona f3d6fa182b Merge branch 'MDL-68605_38' of https://github.com/t-schroeder/moodle into MOODLE_38_STABLE 2020-07-15 18:52:57 +02:00
Sara Arjona 68a6b6db8d Merge branch 'MDL-68210-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2020-07-15 18:19:54 +02:00
Shamim Rezaie 9a66680ae1 MDL-66707 mod_forum: do not blindly mark discussion replies as read 2020-07-15 22:27:22 +10:00
Sara Arjona 8d90570067 Merge branch 'MDL-67671_38_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_38_STABLE 2020-07-15 14:11:55 +02:00
Sara Arjona a30f7f13ea Merge branch 'MDL-57678-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-07-15 12:56:54 +02:00
Jun Pataleta d780b1866e MDL-57678 core_course: Remove padding of nbsp's on category names
Padding nested course categories by space to make them render in a tree
structure does not really make a lot of sense as they are already being
rendered as full paths. It's simpler to show them without the
indentation.
2020-07-15 18:28:10 +08:00
Sara Arjona 273ef0b4e3 Merge branch 'MDL-69068-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-15 12:20:39 +02:00
Andrew Nicols 8402724494 MDL-69068 behat: Allow singular, pivotted data generators 2020-07-15 15:27:31 +08:00
Andrew Nicols 83b5aea43c MDL-69068 behat: New step to support singular generators 2020-07-15 15:25:27 +08:00
Sara Arjona 51f4f8c612 Merge branch 'MDL-68715-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-07-14 14:32:10 +02:00
Shamim Rezaie 5d9fb70f70 MDL-68444 calendar: Improve how screenreaders say week titles
Also removed the scope attribute from the mini-calendar table
because according to https://www.w3.org/TR/WCAG20-TECHS/H63.html
it was not needed:
  Note 1: For simple tables that have the headers in the first row
  or column then it is sufficient to simply use the TH elements without
  scope.
2020-07-14 22:12:59 +10:00
Shamim Rezaie 0368c8e2a8 MDL-68444 calendar: Improve how screenreaders read day titles
Screenreaders now know if each day has any event or not
2020-07-14 22:12:59 +10:00
Paul Holden 9fea1cc6e4 MDL-68715 completion: fix form default value for course prerequisites.
Adds filtering on the completion criteria form to ensure we are only
selecting actual course instances of this type. Prior to this change
we would also get NULL values from unrelated criteria types.
2020-07-14 12:45:54 +01:00
Sara Arjona b09e569189 Merge branch 'MDL-69228-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-14 12:41:33 +02:00
Sara Arjona 9afc404947 Merge branch 'MDL-69115-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-07-13 14:24:26 +02:00
Andrew Nicols 70d6af63ba MDL-69160 workshop: Ensure steps are chained 2020-07-13 14:22:31 +08:00
Andrew Nicols 4338982098 MDL-69160 behat: Add form field setter step 2020-07-13 14:22:31 +08:00
Leon Stringer 678ca3ded7 MDL-69252 templates: Invalid HTML
Invalid HTML generated when the page count exceeded the maximum number
of page links to display: <span>...</a>.  Also added example context.
2020-07-11 12:54:43 +01:00
Mark Johnson 2b36e5be2e MDL-67671 backup: Fix modname display on backup form 2020-07-09 10:13:08 +01:00
Huong Nguyen 82ddfd7ea6 MDL-69165 Questions: Incorrect id used in init_submit_button function 2020-07-08 11:48:56 +07:00
Andrew Nicols da91dd3ea0 MDL-69228 tool_mobile: Hide dependant settings 2020-07-08 11:50:18 +08:00
Jake Dallimore 121373ec8f MDL-68210 mod_lesson: fix random failure in override behat test 2020-07-08 09:10:20 +08:00
Jake Dallimore 8fb613ee9f MDL-68210 overrides: allow copy and delete of inactive overrides
This brings lesson and assign in line with the expected behaviour
already implemented in quiz. When an override is inactive, all controls
are shown.
2020-07-08 09:10:20 +08:00
Matt Clarkson 63b646acb1 MDL-67440 analytics: optimse delete's in clean up task. 2020-07-08 11:19:09 +12:00
Tim Schroeder 8c3e24b46c MDL-68605 mod_assign: return grp submissns from ws
Co-authored-by: Septatrix <24257556+Septatrix@users.noreply.github.com>
2020-07-07 12:56:28 +02:00
Jun Pataleta 7a54747c9a MDL-69115 course: More course management accessibility fixes
* Added aria-label for category single select element when on Courses
view mode.
* Fix correct labelling of custom control checkboxes. Instead of adding
aria-label in the label element, add an sr-only span within the label.
* Remove inappropriate 'group' role for the list of courses.
The list of courses is not being rendered as a tree structure
so adding a 'group' role to the list of courses is not really
necessary.
* Add aria-label for the search courses field.
* Add legend for the search courses fieldset.
* Use the primary colour for the category selection highlight instead
of the info colour.
* Changed the labels for the up/down icons using moveup/movedown
lang strings.
2020-07-01 14:45:37 +08:00
Jonathon Fowler cd8c136c70 MDL-69113 assign: save grader app workflow/marker filters correctly 2020-06-25 14:39:54 +10:00
Michael Milette 67ba731f8f MDL-68766 auth: Login form: 'Log in using...' should be h3, not h6 2020-05-20 12:43:10 -04:00
1185 changed files with 17163 additions and 7291 deletions
+71
View File
@@ -0,0 +1,71 @@
<?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/>.
/**
* Template configuraton file for github actions CI/CD.
*
* @package core
* @copyright 2020 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com}
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This cannot be used out from a github actions workflow, so just exit.
getenv('GITHUB_WORKFLOW') || die; // phpcs:ignore moodle.Files.MoodleInternal.MoodleInternalGlobalState
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('dbtype');
$CFG->dblibrary = 'native';
$CFG->dbhost = '127.0.0.1';
$CFG->dbname = 'test';
$CFG->dbuser = 'test';
$CFG->dbpass = 'test';
$CFG->prefix = 'm_';
$CFG->dboptions = ['dbcollation' => 'utf8mb4_bin'];
$host = 'localhost';
$CFG->wwwroot = "http://{$host}";
$CFG->dataroot = realpath(dirname(__DIR__)) . '/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
// Debug options - possible to be controlled by flag in future.
$CFG->debug = (E_ALL | E_STRICT); // DEBUG_DEVELOPER.
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
$CFG->debugpageinfo = 1;
$CFG->allowthemechangeonurl = 1;
$CFG->passwordpolicy = 0;
$CFG->cronclionly = 0;
$CFG->pathtophp = getenv('pathtophp');
$CFG->phpunit_dataroot = realpath(dirname(__DIR__)) . '/phpunitdata';
$CFG->phpunit_prefix = 't_';
define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://localhost:8080');
define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://localhost:8080');
define('TEST_SESSION_REDIS_HOST', 'localhost');
define('TEST_CACHESTORE_REDIS_TESTSERVERS', 'localhost');
// TODO: add others (solr, mongodb, memcached, ldap...).
// Too much for now: define('PHPUNIT_LONGTEST', true); // Only leaves a few tests out and they are run later by CI.
require_once(__DIR__ . '/lib/setup.php');
+103
View File
@@ -0,0 +1,103 @@
name: Core
on: [push]
env:
php: 7.4
jobs:
Grunt:
runs-on: ubuntu-18.04
steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Configuring node & npm
shell: bash -l {0}
run: nvm install
- name: Installing node stuff
run: npm install
- name: Running grunt
run: npx grunt
- name: Looking for uncommitted changes
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
run: |
git add .
git reset -- npm-shrinkwrap.json
git diff --cached --exit-code
PHPUnit:
runs-on: ${{ matrix.os }}
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-18.04
php: 7.1
db: mysqli
- os: ubuntu-18.04
php: 7.4
db: pgsql
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: johanmeiring/mysql-action@tmpfs-patch
with:
collation server: utf8mb4_bin
mysql version: 5.7
mysql database: test
mysql user: test
mysql password: test
use tmpfs: true
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 9.6
postgresql db: test
postgresql user: test
postgresql password: test
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v3.x
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v2
- name: Setting up PHPUnit
env:
dbtype: ${{ matrix.db }}
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
sudo locale-gen en_AU.UTF-8
php admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
run: vendor/bin/phpunit -v
+1 -1
View File
@@ -1 +1 @@
v14.0.0
v14.15.0
+38 -72
View File
@@ -2,10 +2,9 @@
# process (which uses our internal CI system) this file is here for the benefit
# of community developers git clones - see MDL-51458.
# We currently disable Travis notifications entirely until https://github.com/travis-ci/travis-ci/issues/4976
# is fixed.
notifications:
email: false
email:
if: env(MOODLE_EMAIL) != no
language: php
@@ -17,31 +16,9 @@ services:
- mysql
- docker
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.4
- 7.1.30 # Make this sticky because current default version (7.1.11) has a bug with redis-extension output (MDL-66062)
addons:
postgresql: "9.6"
env:
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
# start first so that the total run time is not too high.
#
# We only run MySQL on PHP 7.2, so run that first.
# CI Tests should be second-highest in priority as these only take <= 60 seconds to run under normal circumstances.
# Postgres is significantly is pretty reasonable in its run-time.
# Run CI Tests without running PHPUnit.
- DB=none TASK=CITEST
# Run unit tests on Postgres
- DB=pgsql TASK=PHPUNIT
# Perform an upgrade test too.
- DB=pgsql TASK=UPGRADE
jobs:
# Enable fast finish.
# This will fail the build if a single job fails (except those in allow_failures).
@@ -49,12 +26,36 @@ jobs:
fast_finish: true
include:
# Run mysql only on highest - it's just too slow
- php: 7.4
# First all the lowest php ones (7.1.30)
# Make this sticky because current default version (7.1.11) has a bug with redis-extension output (MDL-66062)
- php: 7.1.30
env: DB=none TASK=CITEST
- php: 7.1.30
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
- if: env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present
php: 7.1.30
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all"
php: 7.1.30
env: DB=mysqli TASK=PHPUNIT
# Then, conditionally, all the highest php ones (7.4)
- if: env(MOODLE_PHP) = "all"
php: 7.4
env: DB=none TASK=CITEST
- if: env(MOODLE_PHP) = "all"
php: 7.4
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present)
php: 7.4
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all")
php: 7.4
env: DB=mysqli TASK=PHPUNIT
# Run grunt/npm install on highest version too ('node' is an alias for the latest node.js version.)
- php: 7.4
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
cache:
directories:
@@ -114,7 +115,7 @@ install:
before_script:
- phpenv config-rm xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
if [ "$TASK" = 'PHPUNIT' ];
then
# Copy generic configuration in place.
cp config-dist.php config.php ;
@@ -174,7 +175,9 @@ before_script:
# Enable test external resources
sed -i \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://127.0.0.1:8080');" \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://127.0.0.1:8080');" \
config.php ;
# Redis cache store tests
sed -i \
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
@@ -223,39 +226,11 @@ before_script:
export phpcmd=`which php`;
fi
########################################################################
# Upgrade test
########################################################################
- >
if [ "$TASK" = 'UPGRADE' ];
then
# We need the official upstream.
git remote add upstream https://github.com/moodle/moodle.git;
# Checkout 30 STABLE branch (the first version compatible with PHP 7.x)
git fetch upstream MOODLE_30_STABLE;
git checkout MOODLE_30_STABLE;
# Perform the upgrade
php admin/cli/install_database.php --agree-license --adminpass=Password --adminemail=admin@example.com --fullname="Upgrade test" --shortname=Upgrade;
# Return to the previous commit
git checkout -;
# Perform the upgrade
php admin/cli/upgrade.php --non-interactive --allow-unstable ;
# The local_ci repository can be used to check upgrade savepoints.
git clone https://github.com/moodlehq/moodle-local_ci.git local/ci ;
fi
script:
- >
if [ "$TASK" = 'PHPUNIT' ];
then
vendor/bin/phpunit --fail-on-risky --disallow-test-output --verbose;
EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
fi
- >
@@ -276,19 +251,10 @@ script:
git diff --cached --exit-code ;
fi
########################################################################
# Upgrade test
########################################################################
after_script:
- >
if [ "$TASK" = 'UPGRADE' ];
if [ "$TASK" = 'PHPUNIT' ];
then
cp local/ci/check_upgrade_savepoints/check_upgrade_savepoints.php ./check_upgrade_savepoints.php
result=`php check_upgrade_savepoints.php`;
# Check if there are problems
count=`echo "$result" | grep -P "ERROR|WARN" | wc -l` ;
if (($count > 0));
then
echo "$result"
exit 1 ;
fi
EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
fi
+1 -1
View File
@@ -2,7 +2,7 @@ MOODLE TRADEMARKS POLICY
========================
The word "Moodle" is trademarked in many countries around the world. The word
was originally an acronym: Modular Object-Oriented Dynamic Learning
was originally coined as an acronym: Modular Object-Oriented Dynamic Learning
Environment. The trademark is owned by Martin Dougiamas, Founder and Director
of Moodle.
@@ -178,6 +178,7 @@ class filesize extends \admin_setting {
'id' => $this->get_id(),
'name' => $this->get_full_name(),
'value' => $data['v'],
'readonly' => $this->is_readonly(),
'options' => array_map(function($unit, $title) use ($data, $defaultunit) {
return [
'value' => $unit,
+99 -90
View File
@@ -266,6 +266,7 @@ list($options, $unrecognized) = cli_get_params(
);
$interactive = empty($options['non-interactive']);
$skipdatabase = $options['skip-database'];
// set up language
$lang = clean_param($options['lang'], PARAM_SAFEDIR);
@@ -637,96 +638,100 @@ do {
}
} while ($hintdatabase !== '');
// ask for fullname
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
// If --skip-database option is provided, we do not need to ask for site fullname, shortname, adminuser, adminpass, adminemail.
// These fields will be requested during the database install part.
if (!$skipdatabase) {
// Ask for fullname.
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
} else {
$prompt = get_string('clitypevalue', 'admin');
if (empty($options['fullname'])) {
$a = (object)['option' => 'fullname', 'value' => $options['fullname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
} else {
if (empty($options['fullname'])) {
$a = (object)array('option'=>'fullname', 'value'=>$options['fullname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for shortname.
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
// ask for shortname
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
$prompt = get_string('clitypevalue', 'admin');
if (empty($options['shortname'])) {
$a = (object)['option' => 'shortname', 'value' => $options['shortname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
if (empty($options['shortname'])) {
$a = (object)array('option'=>'shortname', 'value'=>$options['shortname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user name
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
// Ask for admin user name.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if ((empty($options['adminuser']) || $options['adminuser'] === 'guest')) {
$a = (object)['option' => 'adminuser', 'value' => $options['adminuser']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for admin user password.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if ((empty($options['adminpass']) or $options['adminpass'] === 'admin')) {
$a = (object)['option' => 'adminpass', 'value' => $options['adminpass']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if (empty($options['adminuser']) or $options['adminuser'] === 'guest') {
$a = (object)array('option'=>'adminuser', 'value'=>$options['adminuser']);
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object)['option' => 'adminemail', 'value' => $options['adminemail']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user password
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if (empty($options['adminpass']) or $options['adminpass'] === 'admin') {
$a = (object)array('option'=>'adminpass', 'value'=>$options['adminpass']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object) array('option' => 'adminemail', 'value' => $options['adminemail']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
// Ask for the upgrade key.
if ($interactive) {
cli_separator();
@@ -745,22 +750,26 @@ if ($options['upgradekey'] !== '') {
$CFG->upgradekey = $options['upgradekey'];
}
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
// The user does not also need to pass agree-license when --skip-database is provided as the user will need to accept
// the license again in the database install part.
if (!$skipdatabase) {
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
}
}
} else {
if (!$options['agree-license'] && !$skipdatabase) {
cli_error(get_string('climustagreelicense', 'install'));
}
}
} else {
if (!$options['agree-license']) {
cli_error(get_string('climustagreelicense', 'install'));
}
}
@@ -809,7 +818,7 @@ if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_error(get_string('pluginschecktodo', 'admin'));
}
if (!$options['skip-database']) {
if (!$skipdatabase) {
install_cli_database($options, $interactive);
// This needs to happen at the end to ensure it occurs after all caches
// have been purged for the last time.
+10 -2
View File
@@ -34,6 +34,7 @@ $help = "Command line tool to uninstall plugins.
Options:
-h --help Print this help.
--show-all Displays a list of all installed plugins.
--show-contrib Displays a list of all third-party installed plugins.
--show-missing Displays a list of plugins missing from disk.
--purge-missing Uninstall all missing from disk plugins.
--plugins=<plugin name> A comma separated list of plugins to be uninstalled. E.g. mod_assign,mod_forum
@@ -44,6 +45,9 @@ Examples:
# php uninstall_plugins.php --show-all
Prints tab-separated list of all installed plugins.
# php uninstall_plugins.php --show-contrib
Prints tab-separated list of all third-party installed plugins.
# php uninstall_plugins.php --show-missing
Prints tab-separated list of all missing from disk plugins.
@@ -63,6 +67,7 @@ Examples:
list($options, $unrecognised) = cli_get_params([
'help' => false,
'show-all' => false,
'show-contrib' => false,
'show-missing' => false,
'purge-missing' => false,
'plugins' => false,
@@ -84,12 +89,15 @@ if ($options['help']) {
$pluginman = core_plugin_manager::instance();
$plugininfo = $pluginman->get_plugins();
if ($options['show-all'] || $options['show-missing']) {
if ($options['show-all'] || $options['show-missing'] || $options['show-contrib']) {
foreach ($plugininfo as $type => $plugins) {
foreach ($plugins as $name => $plugin) {
if ($options['show-contrib'] && $plugin->is_standard()) {
continue;
}
$pluginstring = $plugin->component . "\t" . $plugin->displayname;
if ($options['show-all']) {
if ($options['show-all'] || $options['show-contrib']) {
cli_writeln($pluginstring);
} else {
if ($plugin->get_status() === core_plugin_manager::PLUGIN_STATUS_MISSING) {
+368
View File
@@ -2815,6 +2815,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2996,6 +2997,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -3163,4 +3165,370 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.10" requires="3.5">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="9.6" />
<VENDOR name="mssql" version="11.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.11" requires="3.6">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="9.6" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="optional"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+4 -2
View File
@@ -509,7 +509,8 @@ if (!$cache and $version > $CFG->version) { // upgrade
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
die();
}
unset($failed);
@@ -701,7 +702,8 @@ if (!$cache and moodle_needs_upgrading()) {
$failed = array();
if (!$pluginman->all_plugins_ok($version, $failed)) {
$output = $PAGE->get_renderer('core', 'admin');
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
die();
}
unset($failed);
+4 -2
View File
@@ -49,6 +49,7 @@
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
if (!empty($show) and confirm_sesskey()) {
@@ -66,6 +67,7 @@
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
echo $OUTPUT->header();
@@ -121,8 +123,8 @@
$count = -1;
}
if ($count>0) {
$countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
"&amp;sesskey=".sesskey()."\" title=\"$strshowmodulecourse\">$count</a>";
$countlink = $OUTPUT->action_link(new moodle_url('/course/search.php', ['modulelist' => $module->name]),
$count, null, ['title' => $strshowmodulecourse]);
} else if ($count < 0) {
$countlink = get_string('error');
} else {
+1 -1
View File
@@ -53,7 +53,6 @@ $pageurl = new moodle_url('/admin/plugins.php', $pageparams);
$pluginman = core_plugin_manager::instance();
if ($uninstall) {
require_sesskey();
if (!$confirmed) {
admin_externalpage_setup('pluginsoverview', '', $pageparams);
@@ -92,6 +91,7 @@ if ($uninstall) {
exit();
} else {
require_sesskey();
$SESSION->pluginuninstallreturn = $pluginfo->get_return_url_after_uninstall($return);
$progress = new progress_trace_buffer(new text_progress_trace(), false);
$pluginman->uninstall_plugin($pluginfo->component, $progress);
+2 -2
View File
@@ -1098,7 +1098,7 @@ class core_admin_renderer extends plugin_renderer_base {
if (!empty($installabortable[$plugin->component])) {
$status .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstall' => $plugin->component)),
new moodle_url($this->page->url, array('abortinstall' => $plugin->component, 'confirmplugincheck' => 0)),
get_string('cancelinstallone', 'core_plugin'),
'post',
array('class' => 'actionbutton cancelinstallone d-block mt-1')
@@ -1194,7 +1194,7 @@ class core_admin_renderer extends plugin_renderer_base {
if ($installabortable) {
$out .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstallx' => 1)),
new moodle_url($this->page->url, array('abortinstallx' => 1, 'confirmplugincheck' => 0)),
get_string('cancelinstallall', 'core_plugin', count($installabortable)),
'post',
array('class' => 'singlebutton cancelinstallall mr-1')
+3 -8
View File
@@ -131,15 +131,10 @@ if ($hassiteconfig && \core_analytics\manager::is_analytics_enabled()) {
$timesplittingdefaults, $timesplittingoptions)
);
// Predictions processor output dir.
$defaultmodeloutputdir = rtrim($CFG->dataroot, '/') . DIRECTORY_SEPARATOR . 'models';
if (empty(get_config('analytics', 'modeloutputdir')) && !file_exists($defaultmodeloutputdir) &&
is_writable($defaultmodeloutputdir)) {
// Automatically create the dir for them so users don't see the invalid value red cross.
mkdir($defaultmodeloutputdir, $CFG->directorypermissions, true);
}
// Predictions processor output dir - specify default in setting description (used if left blank).
$defaultmodeloutputdir = \core_analytics\model::default_output_dir();
$settings->add(new admin_setting_configdirectory('analytics/modeloutputdir', new lang_string('modeloutputdir', 'analytics'),
new lang_string('modeloutputdirinfo', 'analytics'), $defaultmodeloutputdir));
new lang_string('modeloutputdirwithdefaultinfo', 'analytics', $defaultmodeloutputdir), ''));
// Disable web interface evaluation and get predictions.
$settings->add(new admin_setting_configcheckbox('analytics/onlycli', new lang_string('onlycli', 'analytics'),
+50 -14
View File
@@ -1,21 +1,57 @@
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
/**
* Define administration settings on the Location settings page.
*
* @package core
* @category admin
* @copyright 2006 Martin Dougiamas <martin@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// "locations" settingpage
$temp = new admin_settingpage('locationsettings', new lang_string('locationsettings', 'admin'));
$temp->add(new admin_setting_servertimezone());
$temp->add(new admin_setting_forcetimezone());
$temp->add(new admin_settings_country_select('country', new lang_string('country', 'admin'), new lang_string('configcountry', 'admin'), 0));
$temp->add(new admin_setting_configtext('defaultcity', new lang_string('defaultcity', 'admin'), new lang_string('defaultcity_help', 'admin'), ''));
defined('MOODLE_INTERNAL') || die();
$temp->add(new admin_setting_heading('iplookup', new lang_string('iplookup', 'admin'), new lang_string('iplookupinfo', 'admin')));
$temp->add(new admin_setting_configfile('geoip2file', new lang_string('geoipfile', 'admin'),
new lang_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLite2-City.mmdb'));
$temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'admin'), new lang_string('googlemapkey3_help', 'admin'), '', PARAM_RAW, 60));
if ($hassiteconfig) {
$temp = new admin_settingpage('locationsettings', new lang_string('locationsettings', 'core_admin'));
$temp->add(new admin_setting_configtext('allcountrycodes', new lang_string('allcountrycodes', 'admin'), new lang_string('configallcountrycodes', 'admin'), '', '/^(?:\w+(?:,\w+)*)?$/'));
if ($ADMIN->fulltree) {
$temp->add(new admin_setting_servertimezone());
$temp->add(new admin_setting_forcetimezone());
$temp->add(new admin_settings_country_select('country', new lang_string('country', 'core_admin'),
new lang_string('configcountry', 'core_admin'), 0));
$temp->add(new admin_setting_configtext('defaultcity', new lang_string('defaultcity', 'core_admin'),
new lang_string('defaultcity_help', 'core_admin'), ''));
$temp->add(new admin_setting_heading('iplookup', new lang_string('iplookup', 'core_admin'),
new lang_string('iplookupinfo', 'core_admin')));
$temp->add(new admin_setting_configfile('geoip2file', new lang_string('geoipfile', 'core_admin'),
new lang_string('configgeoipfile', 'core_admin', $CFG->dataroot . '/geoip/'),
$CFG->dataroot . '/geoip/GeoLite2-City.mmdb'));
$temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'core_admin'),
new lang_string('googlemapkey3_help', 'core_admin'), '', PARAM_RAW, 60));
$temp->add(new admin_setting_countrycodes('allcountrycodes', new lang_string('allcountrycodes', 'core_admin'),
new lang_string('configallcountrycodes', 'core_admin')));
}
$ADMIN->add('location', $temp);
} // end of speedup
}
+1 -1
View File
@@ -99,7 +99,7 @@ $options = array(
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'REMOTE_ADDR');
$temp->add(new admin_setting_configselect('getremoteaddrconf', new lang_string('getremoteaddrconf', 'admin'),
new lang_string('configgetremoteaddrconf', 'admin'),
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP, $options));
GETREMOTEADDR_SKIP_DEFAULT, $options));
$temp->add(new admin_setting_configtext('reverseproxyignore', new lang_string('reverseproxyignore', 'admin'), new lang_string('configreverseproxyignore', 'admin'), ''));
$temp->add(new admin_setting_heading('webproxy', new lang_string('webproxy', 'admin'), new lang_string('webproxyinfo', 'admin')));
@@ -25,6 +25,7 @@
* value - yes value
* id - element id
* checked - boole
* readonly - bool
Example context (json):
{
@@ -32,10 +33,11 @@
"no": "False",
"value": "True",
"id": "test0",
"checked": "checked"
"checked": "checked",
"readonly": false
}
}}
<div class="form-checkbox defaultsnext">
<input type="hidden" name="{{name}}" value="{{no}}">
<input type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
<input {{#readonly}}disabled{{/readonly}} type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
</div>
@@ -25,6 +25,7 @@
* id - element id
* value - element value
* haspreviewconfig - show preview of selected color
* readonly - bool
Example context (json):
{
@@ -32,6 +33,7 @@
"name": "name0",
"id": "id0",
"value": "#555655",
"readonly": false,
"haspreviewconfig": false
}
}}
@@ -44,7 +46,7 @@
{{>core/pix_icon}}
{{/icon}}
</div>
<input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12" class="form-control text-ltr">
<input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
{{#haspreviewconfig}}
<input type="button" id="{{id}}_preview" value={{#quote}}{{#str}}preview{{/str}}{{/quote}} class="admin_colourpicker_preview">
{{/haspreviewconfig}}
@@ -33,7 +33,7 @@
"name": "test",
"value": "/my-super-secret-path/",
"id": "test0",
"readonly": true,
"readonly": false,
"showvalidity": true,
"valid": false
}
@@ -23,6 +23,7 @@
* name - form element name
* options - list of options for units containing name, value, selected
* value - yes
* readonly - bool
* id - element id
Example context (json):
@@ -30,6 +31,7 @@
"name": "test",
"value": "5",
"id": "test0",
"readonly": false,
"options": [ { "name": "Minutes", "value": "mins", "selected": true } ]
}
}}
@@ -38,9 +40,9 @@
}}
<div class="form-duration defaultsnext">
<div class="form-inline">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select">
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -33,7 +33,7 @@
"name": "test",
"value": "/usr/bin/cowsay",
"id": "test0",
"readonly": true,
"readonly": false,
"showvalidity": true,
"valid": false
}
+3 -1
View File
@@ -26,6 +26,7 @@
* readonly - Make the field readonly
* value - value
* showvalidity - Show a green check if the path is readable
* readonly - bool
* valid - True if the path is readable
Example context (json):
@@ -33,8 +34,9 @@
"name": "test",
"value": "/my-super-secret-path/file",
"id": "test0",
"readonly": true,
"readonly": false,
"showvalidity": true,
"readonly": false,
"valid": false
}
}}
@@ -24,12 +24,14 @@
* options - list of options for units containing name, value, selected
* value - yes
* id - element id
* readonly - bool
Example context (json):
{
"name": "test",
"value": "5",
"id": "test0",
"readonly": false,
"options": [ { "name": "KB", "value": "1024", "selected": true } ]
}
}}
@@ -38,9 +40,9 @@
}}
<div class="form-filesize defaultsnext">
<div class="form-inline">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select">
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -24,11 +24,13 @@
* id - element id
* size - element size
* options - list of options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"size": "3",
"options": [ { "name": "Option 1", "value": "V", "selected": true },
{ "name": "Option 2", "value": "V", "selected": true } ]
@@ -39,7 +41,7 @@
}}
<div class="form-select">
<input type="hidden" name="{{name}}[xxxxx]" value="1">
<select id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -25,11 +25,13 @@
* size - element size
* options - list of options not grouped
* optgroups - list of options grouped containing the group label and for each option: name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"size": "3",
"options": [
{ "name": "Option 1", "value": "V", "selected": false },
@@ -58,7 +60,7 @@
}}
<div class="form-select">
<input type="hidden" name="{{name}}[xxxxx]" value="1">
<select id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -24,15 +24,30 @@
* size - form element size
* value - form element value
* id - element id
* readonly - has value been defined in config.php
Example context (json):
{
"name": "test",
"id": "test0",
"size": "8",
"value": "secret"
"value": "secret",
"readonly": false
}
}}
{{#readonly}}
<div class="form-password">
<input type="text"
name = "{{ name }}"
id="{{ id }}"
value="********"
size="{{ size }}"
class="form-control"
disabled
>
</div>
{{/readonly}}
{{^readonly}}
<div class="form-password">
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
<span data-passwordunmask="editor">
@@ -61,3 +76,4 @@ require(['core_form/passwordunmask'], function(PasswordUnmask) {
new PasswordUnmask("{{ id }}");
});
{{/js}}
{{/readonly}}
@@ -23,11 +23,13 @@
* name - form element name
* id - element id
* options - list of options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"options": [
{ "name": "Option 1", "value": "V", "selected": true },
{ "name": "Option 2", "value": "V", "selected": true }
@@ -38,7 +40,7 @@
Setting configselect.
}}
<div class="form-select defaultsnext">
<select id="{{id}}" name="{{name}}" class="custom-select">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -22,6 +22,7 @@
Context variables required for this template:
* name - form element name
* id - element id
* readonly - bool
* options - list of options (not grouped)
* optgroups - list of options grouped containing the group label and for each option: name, value, selected
@@ -29,6 +30,7 @@
{
"name": "test",
"id": "test0",
"readonly": false,
"options": [
{ "name": "Option 1", "value": "V", "selected": false },
{ "name": "Option 2", "value": "V", "selected": false }
@@ -55,7 +57,7 @@
Setting configselect with optgroup support.
}}
<div class="form-select defaultsnext">
<select id="{{id}}" name="{{name}}" class="custom-select">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
+3 -1
View File
@@ -26,6 +26,7 @@
* size - element size
* forceltr - always display as ltr
* attributes - list of additional attributes containing name, value
* readonly - bool
Example context (json):
{
@@ -34,6 +35,7 @@
"value": "A tall, dark stranger will have more fun than you.",
"size": "21",
"forceltr": false,
"readonly": false,
"attributes": [ { "name": "readonly", "value": "readonly" } ]
}
}}
@@ -41,5 +43,5 @@
Setting configtext.
}}
<div class="form-text defaultsnext">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}" {{#readonly}}disabled{{/readonly}}>
</div>
@@ -33,6 +33,7 @@
"cols": "30",
"rows": "3",
"value": "Excellent day for putting Slinkies on an escalator.",
"readonly": false,
"id": "test0"
}
}}
@@ -40,5 +41,5 @@
Setting configtextarea.
}}
<div class="form-textarea">
<textarea rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
<textarea {{#readonly}}disabled{{/readonly}} rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
</div>
+4 -2
View File
@@ -24,11 +24,13 @@
* id - element id
* hours - list of valid hour options containing name, value, selected
* minutes - list of valid minute options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"minutes": [
{ "name": "00", "value": "0", "selected": true },
{ "name": "01", "value": "1", "selected": false }
@@ -45,13 +47,13 @@
<div class="form-time defaultsnext">
<div class="form-inline text-ltr">
<label class="sr-only" for="{{id}}h">{{#str}}hours{{/str}}</label>
<select id="{{id}}h" name="{{name}}[h]" class="custom-select">
<select id="{{id}}h" name="{{name}}[h]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#hours}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/hours}}
</select>:
<label class="sr-only" for="{{id}}m">{{#str}}minutes{{/str}}</label>
<select id="{{id}}m" name="{{name}}[m]" class="custom-select">
<select id="{{id}}m" name="{{name}}[m]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#minutes}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/minutes}}
@@ -0,0 +1,29 @@
@core @core_admin
Feature: Administrator is warned and when trying to set invalid allcountrycodes value.
In order to avoid misconfiguration of the country selector fields
As an admin
I want to be warned when I try to set an invalid country code in the allcountrycodes field
Scenario: Attempting to set allcountrycodes field with valid country codes
Given I log in as "admin"
And I navigate to "Location > Location settings" in site administration
When I set the following administration settings values:
| All country codes | CZ,BE,GB,ES |
Then I should not see "Invalid country code"
Scenario: Attempting to set allcountrycodes field with invalid country code
Given I log in as "admin"
And I navigate to "Location > Location settings" in site administration
When I set the following administration settings values:
| All country codes | CZ,BE,FOOBAR,GB,ES |
Then I should see "Invalid country code: FOOBAR"
Scenario: Attempting to unset allcountrycodes field
Given I log in as "admin"
And I navigate to "Location > Location settings" in site administration
And I set the following administration settings values:
| All country codes | CZ,BE,GB,ES |
And I navigate to "Location > Location settings" in site administration
When I set the following administration settings values:
| All country codes | |
Then I should not see "Invalid country code"
@@ -0,0 +1,34 @@
@core @core_admin
Feature: Configure language settings for the site
In order to configure language settings for the site
As an admin
I want to set language settings relevant to my site users
Scenario: Set languages on language menu
Given I log in as "admin"
And I navigate to "Language > Language settings" in site administration
When I set the field "Languages on language menu" to "en"
And I press "Save changes"
Then I should not see "Invalid language code"
Scenario: Reset languages on language menu
Given I log in as "admin"
And I navigate to "Language > Language settings" in site administration
When I set the field "Languages on language menu" to ""
And I press "Save changes"
Then I should not see "Invalid language code"
Scenario Outline: Set languages on language menu with invalid language
Given I log in as "admin"
And I navigate to "Language > Language settings" in site administration
When I set the field "Languages on language menu" to "<fieldvalue>"
And I press "Save changes"
Then I should see "Invalid language code: <invalidlang>"
Examples:
| fieldvalue | invalidlang |
| xx | xx |
| xx\|Bad | xx |
| en,qq | qq |
| en,qq\|Bad | qq |
| en$$ | en$$ |
| en$$\|Bad | en$$ |
@@ -0,0 +1,30 @@
@tool_behat
Feature: Verify that the inplace editable field works as expected
In order to use behat step definitions
As a test write
I need to ensure that the inplace editable works in forms
Background:
Given the following "course" exists:
| fullname | Course 1 |
| shortname | C1 |
And the following "activities" exist:
| activity | course | name | idnumber |
| forum | C1 | My first forum | forum1 |
| assign | C1 | My first assignment | assign1 |
| quiz | C1 | My first quiz | quiz1 |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
@javascript
Scenario: Using an inplace editable updates the name of an activity
When I set the field "Edit title" in the "My first assignment" "activity" to "Coursework submission"
Then I should see "Coursework submission"
And I should not see "My first assignment"
But I should see "My first forum"
And I should see "My first quiz"
And I set the field "Edit title" in the "Coursework submission" "activity" to "My first assignment"
And I should not see "Coursework submission"
But I should see "My first assignment"
And I should see "My first forum"
And I should see "My first quiz"
@@ -0,0 +1,52 @@
@tool_behat
Feature: Verify that keyboard steps work as expected
In order to use behat step definitions
As a test writer
I need to verify that the keyboard steps work as expected
@javascript
Scenario: Typing keys into a field causes them to be input
Given the following "users" exist:
| username | email | firstname | lastname | password |
| saffronr | saffron.rutledge@example.com | Saffron | Rutledge | flowerpower |
Given I click on "Log in" "link"
And I click on "Username" "field"
When I type "saffronr"
And I press the tab key
And I type "flowerpower"
And I press enter
Then I should see "You are logged in as Saffron Rutledge"
@javascript
Scenario: Using tab changes focus to the next or previous field
Given I click on "Log in" "link"
And I click on "Username" "field"
And the focused element is "Username" "field"
When I press the tab key
Then the focused element is "Password" "field"
And I press the shift tab key
And the focused element is "Username" "field"
@javascript
Scenario: Using the arrow keys allows me to navigate through menus
Given the following "users" exist:
| username | email | firstname | lastname |
| saffronr | saffron.rutledge@example.com | Saffron | Rutledge |
And I log in as "saffronr"
And I click on "Saffron Rutledge" "link" in the ".usermenu" "css_element"
When I press the up key
Then the focused element is "Log out" "link"
@javascript
Scenario: The escape key can be used to close a dialogue
Given the following "course" exists:
| fullname | C1|
| shortname | C1 |
And I log in as "admin"
And I am on "C1" course homepage
And I navigate to course participants
And I press "Enrol users"
And "Enrol users" "dialogue" should be visible
When I press the escape key
Then "Enrol users" "dialogue" should not be visible
@@ -26,10 +26,11 @@ namespace tool_dataprivacy;
defined('MOODLE_INTERNAL') || die();
use lang_string;
use core\persistent;
/**
* Class for loading/storing competencies from the DB.
* Class for loading/storing data requests from the DB.
*
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -62,6 +63,7 @@ class data_request extends persistent {
],
'comments' => [
'type' => PARAM_TEXT,
'message' => new lang_string('errorinvalidrequestcomments', 'tool_dataprivacy'),
'default' => ''
],
'commentsformat' => [
@@ -75,7 +77,10 @@ class data_request extends persistent {
'default' => FORMAT_PLAIN
],
'userid' => [
'default' => 0,
'default' => function() {
global $USER;
return $USER->id;
},
'type' => PARAM_INT
],
'requestedby' => [
+1 -1
View File
@@ -1613,7 +1613,7 @@ class external extends external_api {
*/
private static function get_tree_node_structure($allowchildbranches = true) {
$fields = [
'text' => new external_value(PARAM_TEXT, 'The node text', VALUE_REQUIRED),
'text' => new external_value(PARAM_RAW, 'The node text', VALUE_REQUIRED),
'expandcontextid' => new external_value(PARAM_INT, 'The contextid this node expands', VALUE_REQUIRED),
'expandelement' => new external_value(PARAM_ALPHA, 'What element is this node expanded to', VALUE_REQUIRED),
'contextid' => new external_value(PARAM_INT, 'The node contextid', VALUE_REQUIRED),
+2 -2
View File
@@ -67,8 +67,8 @@ if (!$manage && !\tool_dataprivacy\api::can_contact_dpo()) {
redirect($returnurl, get_string('contactdpoviaprivacypolicy', 'tool_dataprivacy'), 0, \core\output\notification::NOTIFY_ERROR);
}
$mform = new tool_dataprivacy_data_request_form($url->out(false), ['manage' => !empty($manage)]);
$mform->set_data(['type' => $requesttype]);
$mform = new tool_dataprivacy_data_request_form($url->out(false), ['manage' => !empty($manage),
'persistent' => new \tool_dataprivacy\data_request(0, (object) ['type' => $requesttype])]);
// Data request cancelled.
if ($mform->is_cancelled()) {
@@ -23,6 +23,7 @@
*/
use tool_dataprivacy\api;
use tool_dataprivacy\data_request;
use tool_dataprivacy\local\helper;
defined('MOODLE_INTERNAL') || die();
@@ -36,7 +37,10 @@ require_once($CFG->libdir.'/formslib.php');
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package tool_dataprivacy
*/
class tool_dataprivacy_data_request_form extends moodleform {
class tool_dataprivacy_data_request_form extends \core\form\persistent {
/** @var string Name of the persistent class. */
protected static $persistentclass = data_request::class;
/** @var bool Flag to indicate whether this form is being rendered for managing data requests or for regular requests. */
protected $manage = false;
@@ -96,14 +100,13 @@ class tool_dataprivacy_data_request_form extends moodleform {
api::DATAREQUEST_TYPE_EXPORT => get_string('requesttypeexport', 'tool_dataprivacy'),
api::DATAREQUEST_TYPE_DELETE => get_string('requesttypedelete', 'tool_dataprivacy')
];
$mform->addElement('select', 'type', get_string('requesttype', 'tool_dataprivacy'), $options);
$mform->setType('type', PARAM_INT);
$mform->addHelpButton('type', 'requesttype', 'tool_dataprivacy');
// Request comments text area.
$textareaoptions = ['cols' => 60, 'rows' => 10];
$mform->addElement('textarea', 'comments', get_string('requestcomments', 'tool_dataprivacy'), $textareaoptions);
$mform->setType('type', PARAM_ALPHANUM);
$mform->addHelpButton('comments', 'requestcomments', 'tool_dataprivacy');
// Action buttons.
@@ -129,34 +132,49 @@ class tool_dataprivacy_data_request_form extends moodleform {
}
}
/**
* Get the default data. Unset the default userid if managing data requests
*
* @return stdClass
*/
protected function get_default_data() {
$data = parent::get_default_data();
if ($this->manage) {
unset($data->userid);
}
return $data;
}
/**
* Form validation.
*
* @param array $data
* @param stdClass $data
* @param array $files
* @param array $errors
* @return array
* @throws coding_exception
* @throws dml_exception
*/
public function validation($data, $files) {
public function extra_validation($data, $files, array &$errors) {
global $USER;
$errors = [];
$validrequesttypes = [
api::DATAREQUEST_TYPE_EXPORT,
api::DATAREQUEST_TYPE_DELETE
];
if (!in_array($data['type'], $validrequesttypes)) {
if (!in_array($data->type, $validrequesttypes)) {
$errors['type'] = get_string('errorinvalidrequesttype', 'tool_dataprivacy');
}
if (api::has_ongoing_request($data['userid'], $data['type'])) {
$userid = $data->userid;
if (api::has_ongoing_request($userid, $data->type)) {
$errors['type'] = get_string('errorrequestalreadyexists', 'tool_dataprivacy');
}
// Check if current user can create data deletion request.
$userid = $data['userid'];
if ($data['type'] == api::DATAREQUEST_TYPE_DELETE) {
if ($data->type == api::DATAREQUEST_TYPE_DELETE) {
if ($userid == $USER->id) {
if (!api::can_create_data_deletion_request_for_self()) {
$errors['type'] = get_string('errorcannotrequestdeleteforself', 'tool_dataprivacy');
@@ -130,6 +130,7 @@ $string['effectiveretentionperioduser'] = '{$a} (since the last time the user ac
$string['emailsalutation'] = 'Dear {$a},';
$string['errorcannotrequestdeleteforself'] = 'You don\'t have permission to create deletion request for yourself.';
$string['errorcannotrequestdeleteforother'] = 'You don\'t have permission to create deletion request for this user.';
$string['errorinvalidrequestcomments'] = 'The comments field may contain plain text only.';
$string['errorinvalidrequestcreationmethod'] = 'Invalid request creation method!';
$string['errorinvalidrequeststatus'] = 'Invalid request status!';
$string['errorinvalidrequesttype'] = 'Invalid request type!';
+1 -1
View File
@@ -95,7 +95,7 @@ function tool_dataprivacy_myprofile_navigation(tree $tree, $user, $iscurrentuser
$showsummary = true;
}
if ($showsummary) {
if ($showsummary && $iscurrentuser) {
$summaryurl = new moodle_url('/admin/tool/dataprivacy/summary.php');
$summarynode = new core_user\output\myprofile\node('privacyandpolicies', 'retentionsummary',
get_string('dataretentionsummary', 'tool_dataprivacy'), null, $summaryurl);
@@ -46,7 +46,7 @@ Feature: Manage data requests
And I open the action menu in "John Doe" "table_row"
And I should see "View the request"
But I should not see "Mark as complete"
And I press key "27" in ".moodle-actionmenu" "css_element"
And I press the escape key
And I open the action menu in "Jane Doe" "table_row"
And I choose "Mark as complete" in the open action menu
And I should see "Do you really want to mark this user enquiry as complete?"
@@ -10,16 +10,12 @@ Feature: Manage data storage purposes
And I open the action menu in "region-main" "region"
And I choose "Purposes" in the open action menu
And I press "Add purpose"
And I set the field "Name" to "Purpose 1"
And I set the field "Description" to "Purpose 1 description"
And I click on ".form-autocomplete-downarrow" "css_element" in the "Lawful bases" "form_row"
And I click on "Contract (GDPR Art. 6.1(b))" "list_item"
And I click on "Legal obligation (GDPR Art 6.1(c))" "list_item"
And I press key "27" in the field "Lawful bases"
And I click on ".form-autocomplete-downarrow" "css_element" in the "Sensitive personal data processing reasons" "form_row"
And I click on "Explicit consent (GDPR Art. 9.2(a))" "list_item"
And I press key "27" in the field "Sensitive personal data processing reasons"
And I set the field "retentionperiodnumber" to "2"
And I set the following fields to these values:
| Name | Purpose 1 |
| Description | Purpose 1 description |
| Lawful bases | Contract (GDPR Art. 6.1(b)),Legal obligation (GDPR Art 6.1(c)) |
| Sensitive personal data processing reasons | Explicit consent (GDPR Art. 9.2(a)) |
| retentionperiodnumber | 2 |
When I press "Save"
Then I should see "Purpose 1" in the "List of data purposes" "table"
And I should see "Contract (GDPR Art. 6.1(b))" in the "Purpose 1" "table_row"
@@ -31,14 +27,13 @@ Feature: Manage data storage purposes
Scenario: Update a data storage purpose
Given I open the action menu in "Purpose 1" "table_row"
And I choose "Edit" in the open action menu
And I set the field "Name" to "Purpose 1 edited"
And I set the field "Description" to "Purpose 1 description edited"
And I click on "Legal obligation (GDPR Art 6.1(c))" "text" in the ".form-autocomplete-selection" "css_element"
And I click on ".form-autocomplete-downarrow" "css_element" in the "Lawful bases" "form_row"
And I click on "Vital interests (GDPR Art. 6.1(d))" "list_item"
And I press key "27" in the field "Lawful bases"
And I set the field "retentionperiodnumber" to "3"
And I click on "protected" "checkbox"
And I set the following fields to these values:
| Name | Purpose 1 edited |
| Description | Purpose 1 description edited |
| Lawful bases | Contract (GDPR Art. 6.1(b)), Vital interests (GDPR Art. 6.1(d)) |
| Sensitive personal data processing reasons | Explicit consent (GDPR Art. 9.2(a)) |
| retentionperiodnumber | 3 |
| protected | 1 |
When I press "Save changes"
Then I should see "Purpose 1 edited" in the "List of data purposes" "table"
And I should see "Purpose 1 description edited" in the "Purpose 1 edited" "table_row"
@@ -26,7 +26,6 @@ namespace tool_lp\form;
defined('MOODLE_INTERNAL') || die();
use moodleform;
use core\form\persistent;
require_once($CFG->libdir . '/formslib.php');
@@ -39,17 +38,20 @@ require_once($CFG->libdir . '/formslib.php');
*/
class template_cohorts extends moodleform {
/**
* Form definition
*
* @return void
*/
public function definition() {
$mform = $this->_form;
$options = array(
'ajax' => 'tool_lp/form-cohort-selector',
'multiple' => true,
'data-contextid' => $this->_customdata['pagecontextid'],
'data-includes' => 'parents'
'exclude' => implode(',', $this->_customdata['excludecohorts']),
'contextid' => $this->_customdata['pagecontextid'],
);
$mform->addElement('autocomplete', 'cohorts', get_string('selectcohortstosync', 'tool_lp'), array(), $options);
$mform->addElement('cohort', 'cohorts', get_string('selectcohortstosync', 'tool_lp'), $options);
$mform->addElement('submit', 'submit', get_string('addcohorts', 'tool_lp'));
}
}
+13 -1
View File
@@ -54,7 +54,19 @@ if ($canmanagetemplate && ($removecohort = optional_param('removecohort', false,
}
// Capture the form submission.
$form = new \tool_lp\form\template_cohorts($url->out(false), array('pagecontextid' => $pagecontextid));
$existingcohortsql =
'SELECT c.id
FROM {' . \core_competency\template_cohort::TABLE . '} tc
JOIN {cohort} c ON c.id = tc.cohortid
WHERE tc.templateid = :templateid';
$existingcohorts = $DB->get_records_sql_menu($existingcohortsql, ['templateid' => $template->get('id')]);
$form = new \tool_lp\form\template_cohorts($url->out(false), [
'pagecontextid' => $pagecontextid,
'excludecohorts' => array_keys($existingcohorts),
]);
if ($canmanagetemplate && ($data = $form->get_data()) && !empty($data->cohorts)) {
$maxtocreate = 50;
$maxreached = false;
@@ -12,8 +12,8 @@ Feature: See the competencies for an activity on the course competencies page.
| Test-Comp1 | ID-FW1 |
| Test-Comp2 | ID-FW1 |
Given the following "courses" exist:
| shortname | fullname |
| C1 | Course 1 |
| shortname | fullname | enablecompletion |
| C1 | Course 1 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
@@ -21,9 +21,9 @@ Feature: See the competencies for an activity on the course competencies page.
| user | course | role |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| page | PageName1 | PageDesc1 | C1 | PAGE1 |
| page | PageName2 | PageDesc2 | C1 | PAGE2 |
| activity | name | intro | course | idnumber | completion | completionview |
| page | PageName1 | PageDesc1 | C1 | PAGE1 | 1 | 1 |
| page | PageName2 | PageDesc2 | C1 | PAGE2 | 1 | 1 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
@@ -53,11 +53,23 @@ Feature: See the competencies for an activity on the course competencies page.
Then I should see "Test-Comp1"
And I should see "Test-Comp2"
And I set the field "Filter competencies by resource or activity" to "PageName1"
And I press key "13" in the field "Filter competencies by resource or activity"
And I press the enter key
And I should see "Test-Comp1"
And I should not see "Test-Comp2"
And I set the field "Filter competencies by resource or activity" to "PageName2"
And I press key "13" in the field "Filter competencies by resource or activity"
And I press the enter key
And I should not see "Test-Comp1"
And I should not see "Test-Comp2"
And I should see "No competencies have been linked to this activity or resource."
@javascript
Scenario: None course competencies page.
When I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I follow "PageName1"
Then I should see "Test page content"
And I am on site homepage
And I follow "Course 1"
And I follow "PageName1"
Then I should see "Test page content"
+2 -4
View File
@@ -30,7 +30,7 @@ Feature: Manage plearning plan
And I click on ".template-userplans" "css_element" in the "Science template" "table_row"
And I open the autocomplete suggestions list
And I click on "Admin User" item in the autocomplete list
And I press key "27" in the field "Select users to create learning plans for"
And I press the escape key
When I click on "Create learning plans" "button"
Then I should see "A learning plan was created"
And I should see "Admin User" in the "Science template" "table_row"
@@ -53,9 +53,7 @@ Feature: Manage plearning plan
And I follow "Home"
And I navigate to "Competencies > Learning plan templates" in site administration
And I click on ".template-cohorts" "css_element" in the "Science template cohort" "table_row"
And I click on ".form-autocomplete-downarrow" "css_element"
And I click on "cohort plan" item in the autocomplete list
And I press key "27" in the field "Select cohorts to sync"
And I set the field "Select cohorts to sync" to "cohort plan"
When I click on "Add cohorts" "button"
Then I should see "2 learning plans were created."
And I follow "Learning plan templates"
+15 -1
View File
@@ -451,6 +451,7 @@ class api {
'$mmSideMenuDelegate_mmaCompetency' => new lang_string('myplans', 'tool_lp'),
'CoreMainMenuDelegate_AddonBlog' => new lang_string('blog', 'blog'),
'$mmSideMenuDelegate_mmaFiles' => new lang_string('files'),
'CoreMainMenuDelegate_CoreTag' => new lang_string('tags'),
'$mmSideMenuDelegate_website' => new lang_string('webpage'),
'$mmSideMenuDelegate_help' => new lang_string('help'),
),
@@ -552,8 +553,21 @@ class api {
$timenow = time();
$expectedissuer = null;
foreach ($info['certinfo'] as $cert) {
// Due to a bug in certain curl/openssl versions the signature algorithm isn't always correctly parsed.
// See https://github.com/curl/curl/issues/3706 for reference.
if (!array_key_exists('Signature Algorithm', $cert)) {
// The malformed field that does contain the algorithm we're looking for looks like the following:
// <WHITESPACE>Signature Algorithm: <ALGORITHM><CRLF><ALGORITHM>.
preg_match('/\s+Signature Algorithm: (?<algorithm>[^\s]+)/', $cert['Public Key Algorithm'], $matches);
$signaturealgorithm = $matches['algorithm'] ?? '';
} else {
$signaturealgorithm = $cert['Signature Algorithm'];
}
// Check if the signature algorithm is weak (Android won't work with SHA-1).
if ($cert['Signature Algorithm'] == 'sha1WithRSAEncryption' || $cert['Signature Algorithm'] == 'sha1WithRSA') {
if ($signaturealgorithm == 'sha1WithRSAEncryption' || $signaturealgorithm == 'sha1WithRSA') {
$warnings[] = ['insecurealgorithmwarning', 'tool_mobile'];
}
// Check certificate start date.
+1 -1
View File
@@ -138,7 +138,7 @@ class external extends external_api {
array(
'wwwroot' => new external_value(PARAM_RAW, 'Site URL.'),
'httpswwwroot' => new external_value(PARAM_RAW, 'Site https URL (if httpslogin is enabled).'),
'sitename' => new external_value(PARAM_TEXT, 'Site name.'),
'sitename' => new external_value(PARAM_RAW, 'Site name.'),
'guestlogin' => new external_value(PARAM_INT, 'Whether guest login is enabled.'),
'rememberusername' => new external_value(PARAM_INT, 'Values: 0 for No, 1 for Yes, 2 for optional.'),
'authloginviaemail' => new external_value(PARAM_INT, 'Whether log in via email is enabled.'),
+99 -86
View File
@@ -48,100 +48,113 @@ if ($hassiteconfig) {
$ADMIN->add('mobileapp', $temp);
// Show only mobile settings if the mobile service is enabled.
if (!empty($CFG->enablemobilewebservice)) {
// General notification about limited features due to app restrictions.
$notify = new \core\output\notification(
get_string('moodleappsportalfeatureswarning', 'tool_mobile', tool_mobile\api::MOODLE_APPS_PORTAL_URL),
\core\output\notification::NOTIFY_WARNING);
$featuresnotice = $OUTPUT->render($notify);
// General notification about limited features due to app restrictions.
$notify = new \core\output\notification(
get_string('moodleappsportalfeatureswarning', 'tool_mobile', tool_mobile\api::MOODLE_APPS_PORTAL_URL),
\core\output\notification::NOTIFY_WARNING);
$featuresnotice = $OUTPUT->render($notify);
// Type of login.
$temp = new admin_settingpage('mobileauthentication', new lang_string('mobileauthentication', 'tool_mobile'));
$options = array(
tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'),
);
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin',
new lang_string('typeoflogin', 'tool_mobile'),
new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
// Type of login.
$temp = new admin_settingpage(
'mobileauthentication',
new lang_string('mobileauthentication', 'tool_mobile'),
'moodle/site:config',
empty($CFG->enablemobilewebservice)
);
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), 'moodlemobile', PARAM_NOTAGS));
$options = array(
tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'),
);
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin',
new lang_string('typeoflogin', 'tool_mobile'),
new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
$temp->add(new admin_setting_configtext('tool_mobile/minimumversion',
new lang_string('minimumversion_key', 'tool_mobile'),
new lang_string('minimumversion', 'tool_mobile'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), 'moodlemobile', PARAM_NOTAGS));
$ADMIN->add('mobileapp', $temp);
$temp->add(new admin_setting_configtext('tool_mobile/minimumversion',
new lang_string('minimumversion_key', 'tool_mobile'),
new lang_string('minimumversion', 'tool_mobile'), '', PARAM_NOTAGS));
// Appearance related settings.
$temp = new admin_settingpage('mobileappearance', new lang_string('mobileappearance', 'tool_mobile'));
$ADMIN->add('mobileapp', $temp);
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesappearance', '', $featuresnotice));
// Appearance related settings.
$temp = new admin_settingpage(
'mobileappearance',
new lang_string('mobileappearance', 'tool_mobile'),
'moodle/site:config',
empty($CFG->enablemobilewebservice)
);
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'tool_mobile'),
new lang_string('configmobilecssurl', 'tool_mobile'), '', PARAM_URL));
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesappearance', '', $featuresnotice));
// Reference to Branded Mobile App.
if (empty($CFG->disableserviceads_branded)) {
$temp->add(new admin_setting_description('moodlebrandedappreference',
new lang_string('moodlebrandedapp', 'admin'),
new lang_string('moodlebrandedappreference', 'admin')
));
}
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'tool_mobile'),
new lang_string('configmobilecssurl', 'tool_mobile'), '', PARAM_URL));
$temp->add(new admin_setting_heading('tool_mobile/smartappbanners',
new lang_string('smartappbanners', 'tool_mobile'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/enablesmartappbanners',
new lang_string('enablesmartappbanners', 'tool_mobile'),
new lang_string('enablesmartappbanners_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_configtext('tool_mobile/iosappid', new lang_string('iosappid', 'tool_mobile'),
new lang_string('iosappid_desc', 'tool_mobile'), '633359593', PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('tool_mobile/androidappid', new lang_string('androidappid', 'tool_mobile'),
new lang_string('androidappid_desc', 'tool_mobile'), 'com.moodle.moodlemobile', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/setuplink', new lang_string('setuplink', 'tool_mobile'),
new lang_string('setuplink_desc', 'tool_mobile'), 'https://download.moodle.org/mobile', PARAM_URL));
$ADMIN->add('mobileapp', $temp);
// Features related settings.
$temp = new admin_settingpage('mobilefeatures', new lang_string('mobilefeatures', 'tool_mobile'));
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeatures', '', $featuresnotice));
$temp->add(new admin_setting_heading('tool_mobile/logout',
new lang_string('logout'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/forcelogout',
new lang_string('forcelogout', 'tool_mobile'),
new lang_string('forcelogout_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_heading('tool_mobile/features',
new lang_string('mobilefeatures', 'tool_mobile'), ''));
$options = tool_mobile\api::get_features_list();
$temp->add(new admin_setting_configmultiselect('tool_mobile/disabledfeatures',
new lang_string('disabledfeatures', 'tool_mobile'),
new lang_string('disabledfeatures_desc', 'tool_mobile'), array(), $options));
$temp->add(new admin_setting_configtextarea('tool_mobile/custommenuitems',
new lang_string('custommenuitems', 'tool_mobile'),
new lang_string('custommenuitems_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$temp->add(new admin_setting_heading('tool_mobile/language',
new lang_string('language'), ''));
$temp->add(new admin_setting_configtextarea('tool_mobile/customlangstrings',
new lang_string('customlangstrings', 'tool_mobile'),
new lang_string('customlangstrings_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$ADMIN->add('mobileapp', $temp);
// Reference to Branded Mobile App.
if (empty($CFG->disableserviceads_branded)) {
$temp->add(new admin_setting_description('moodlebrandedappreference',
new lang_string('moodlebrandedapp', 'admin'),
new lang_string('moodlebrandedappreference', 'admin')
));
}
$temp->add(new admin_setting_heading('tool_mobile/smartappbanners',
new lang_string('smartappbanners', 'tool_mobile'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/enablesmartappbanners',
new lang_string('enablesmartappbanners', 'tool_mobile'),
new lang_string('enablesmartappbanners_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_configtext('tool_mobile/iosappid', new lang_string('iosappid', 'tool_mobile'),
new lang_string('iosappid_desc', 'tool_mobile'), '633359593', PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('tool_mobile/androidappid', new lang_string('androidappid', 'tool_mobile'),
new lang_string('androidappid_desc', 'tool_mobile'), 'com.moodle.moodlemobile', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/setuplink', new lang_string('setuplink', 'tool_mobile'),
new lang_string('setuplink_desc', 'tool_mobile'), 'https://download.moodle.org/mobile', PARAM_URL));
$ADMIN->add('mobileapp', $temp);
// Features related settings.
$temp = new admin_settingpage(
'mobilefeatures',
new lang_string('mobilefeatures', 'tool_mobile'),
'moodle/site:config',
empty($CFG->enablemobilewebservice)
);
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeatures', '', $featuresnotice));
$temp->add(new admin_setting_heading('tool_mobile/logout',
new lang_string('logout'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/forcelogout',
new lang_string('forcelogout', 'tool_mobile'),
new lang_string('forcelogout_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_heading('tool_mobile/features',
new lang_string('mobilefeatures', 'tool_mobile'), ''));
$options = tool_mobile\api::get_features_list();
$temp->add(new admin_setting_configmultiselect('tool_mobile/disabledfeatures',
new lang_string('disabledfeatures', 'tool_mobile'),
new lang_string('disabledfeatures_desc', 'tool_mobile'), array(), $options));
$temp->add(new admin_setting_configtextarea('tool_mobile/custommenuitems',
new lang_string('custommenuitems', 'tool_mobile'),
new lang_string('custommenuitems_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$temp->add(new admin_setting_heading('tool_mobile/language',
new lang_string('language'), ''));
$temp->add(new admin_setting_configtextarea('tool_mobile/customlangstrings',
new lang_string('customlangstrings', 'tool_mobile'),
new lang_string('customlangstrings_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$ADMIN->add('mobileapp', $temp);
}
@@ -1,2 +1,2 @@
define ("tool_policy/acceptances_filter_datasource",["jquery","core/ajax","core/notification"],function(a,b,c){return{list:function list(b,c){var d=[],e=a(b),f=a(b).data("originaloptionsjson"),g=e.val();a.each(f,function(b,e){if(""!==a.trim(c)&&-1===e.label.toLocaleLowerCase().indexOf(c.toLocaleLowerCase())){return!0}if(-1<a.inArray(e.value,g)){return!0}d.push(e);return!0});var h=new a.Deferred;h.resolve(d);return h.promise()},processResults:function processResults(b,c){var d=[];a.each(c,function(a,b){d.push({value:b.value,label:b.label})});return d},transport:function transport(a,b,d){this.list(a,b).then(d).catch(c.exception)}}});
define ("tool_policy/acceptances_filter_datasource",["jquery","core/ajax","core/notification"],function(a,b,c){return{list:function list(b,c){var d=[],e=a(b),f=a(b).data("originaloptionsjson"),g=e.val();a.each(f,function(b,e){if(""!==c.trim()&&-1===e.label.toLocaleLowerCase().indexOf(c.toLocaleLowerCase())){return!0}if(-1<a.inArray(e.value,g)){return!0}d.push(e);return!0});var h=new a.Deferred;h.resolve(d);return h.promise()},processResults:function processResults(b,c){var d=[];a.each(c,function(a,b){d.push({value:b.value,label:b.label})});return d},transport:function transport(a,b,d){this.list(a,b).then(d).catch(c.exception)}}});
//# sourceMappingURL=acceptances_filter_datasource.min.js.map
File diff suppressed because one or more lines are too long
@@ -41,7 +41,7 @@ define(['jquery', 'core/ajax', 'core/notification'], function($, Ajax, Notificat
var selectedFilters = el.val();
$.each(originalOptions, function(index, option) {
// Skip option if it does not contain the query string.
if ($.trim(query) !== '' && option.label.toLocaleLowerCase().indexOf(query.toLocaleLowerCase()) === -1) {
if (query.trim() !== '' && option.label.toLocaleLowerCase().indexOf(query.toLocaleLowerCase()) === -1) {
return true;
}
// Skip filters that have already been selected.
@@ -641,6 +641,6 @@ class acceptances_table extends \table_sql {
}
return ''; // User agreed by themselves.
}
return null;
return parent::other_cols($column, $row);
}
}
+14 -19
View File
@@ -872,36 +872,31 @@ class tool_uploadcourse_course {
unset($method['delete']);
unset($method['disable']);
if (!empty($instance) && $todelete) {
if ($todelete) {
// Remove the enrolment method.
foreach ($instances as $instance) {
if ($instance->enrol == $enrolmethod) {
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->delete_instance($instance);
break;
}
if ($instance) {
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->delete_instance($instance);
}
} else if (!empty($instance) && $todisable) {
// Disable the enrolment.
foreach ($instances as $instance) {
if ($instance->enrol == $enrolmethod) {
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->update_status($instance, ENROL_INSTANCE_DISABLED);
$enrol_updated = true;
break;
}
}
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->update_status($instance, ENROL_INSTANCE_DISABLED);
$enrol_updated = true;
} else {
$plugin = null;
$status = ($todisable) ? ENROL_INSTANCE_DISABLED : ENROL_INSTANCE_ENABLED;
if (empty($instance)) {
$plugin = $enrolmentplugins[$enrolmethod];
$instance = new stdClass();
$instance->id = $plugin->add_default_instance($course);
$instanceid = $plugin->add_default_instance($course);
$instance = $DB->get_record('enrol', ['id' => $instanceid]);
$instance->roleid = $plugin->get_config('roleid');
$instance->status = ENROL_INSTANCE_ENABLED;
$plugin->update_status($instance, $status);
} else {
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->update_status($instance, ENROL_INSTANCE_ENABLED);
$plugin->update_status($instance, $status);
}
// Now update values.
@@ -0,0 +1,114 @@
@tool @tool_uploadcourse @_file_upload
Feature: An admin can update courses enrolments using a CSV file
In order to update courses enrolments using a CSV file
As an admin
I need to be able to upload a CSV file with enrolment methods for the courses
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
@javascript
Scenario: Creating enrolment method by enable it
Given I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Delete" "link" in the "Guest access" "table_row"
And I click on "Continue" "button"
And I should not see "Guest access" in the "generaltable" "table"
And I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_enable.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And "Disable" "icon" should exist in the "Guest access" "table_row"
@javascript
Scenario: Creating enrolment method by disabling it
Given I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Delete" "link" in the "Guest access" "table_row"
And I click on "Continue" "button"
And I should not see "Guest access" in the "generaltable" "table"
And I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_disable.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And "Enable" "icon" should exist in the "Guest access" "table_row"
@javascript
Scenario: Enabling enrolment method
Given I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_enable.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And "Disable" "icon" should exist in the "Guest access" "table_row"
@javascript
Scenario: Disable an enrolment method
Given I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Enable" "link" in the "Guest access" "table_row"
And "Disable" "icon" should exist in the "Guest access" "table_row"
And I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_disable.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And "Enable" "icon" should exist in the "Guest access" "table_row"
@javascript
Scenario: Delete an enrolment method
Given I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_delete.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I should not see "Guest access" in the "generaltable" "table"
@javascript
Scenario: Delete an unexistent enrolment method (nothing should change)
Given I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Delete" "link" in the "Guest access" "table_row"
And I click on "Continue" "button"
And I should not see "Guest access" in the "generaltable" "table"
And I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_delete.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I should not see "Guest access" in the "generaltable" "table"
@@ -0,0 +1,2 @@
shortname,category,enrolment_1,enrolment_1_delete
C1,1,guest,1
1 shortname category enrolment_1 enrolment_1_delete
2 C1 1 guest 1
@@ -0,0 +1,2 @@
shortname,category,enrolment_1,enrolment_1_disable
C1,1,guest,1
1 shortname category enrolment_1 enrolment_1_disable
2 C1 1 guest 1
@@ -0,0 +1,2 @@
shortname,category,enrolment_1,enrolment_1_disable
C1,1,guest,0
1 shortname category enrolment_1 enrolment_1_disable
2 C1 1 guest 0
@@ -132,12 +132,12 @@ Feature: Upload users
# Boost check.
And I log in as "jonest"
And I am on "Maths" course homepage
And "Turn editing on" "button" should not exist
And "Calendar" "link" should be visible
And I log out
# Classic check.
And I log in as "reznor"
And I am on "Maths" course homepage
And "Turn editing on" "button" should exist
And "Calendar" "link" should not be visible
@javascript
Scenario: Upload users setting their user theme when allowuserthemes is false
+1 -1
View File
@@ -293,7 +293,7 @@ class admin_uploaduser_form2 extends moodleform {
$mform->setAdvanced('url');
$mform->addElement('text', 'idnumber', get_string('idnumber'), 'maxlength="255" size="25"');
$mform->setType('idnumber', PARAM_NOTAGS);
$mform->setType('idnumber', core_user::get_property_type('idnumber'));
$mform->setForceLtr('idnumber');
$mform->addElement('text', 'institution', get_string('institution'), 'maxlength="255" size="25"');
+16 -1
View File
@@ -138,13 +138,28 @@ class manager {
*/
const CONFIG_SHIPPED_VERSION = 'shipped_version';
/**
* Helper method to initialize admin page, setting appropriate extra URL parameters
*
* @param string $action
*/
protected function setup_admin_externalpage(string $action): void {
admin_externalpage_setup('tool_usertours/tours', '', array_filter([
'action' => $action,
'id' => optional_param('id', 0, PARAM_INT),
'tourid' => optional_param('tourid', 0, PARAM_INT),
'direction' => optional_param('direction', 0, PARAM_INT),
]));
}
/**
* This is the entry point for this controller class.
*
* @param string $action The action to perform.
*/
public function execute($action) {
admin_externalpage_setup('tool_usertours/tours');
$this->setup_admin_externalpage($action);
// Add the main content.
switch($action) {
case self::ACTION_NEWTOUR:
@@ -47,7 +47,7 @@ class provider implements
/**
* Returns meta data about this system.
*
* @param collection $itemcollection The initialised item collection to add items to.
* @param collection $items The initialised item collection to add items to.
* @return collection A listing of user data stored through this system.
*/
public static function get_metadata(collection $items) : collection {
@@ -64,7 +64,7 @@ class provider implements
* @param int $userid The userid of the user whose data is to be exported.
*/
public static function export_user_preferences(int $userid) {
$preferences = get_user_preferences();
$preferences = get_user_preferences(null, null, $userid);
foreach ($preferences as $name => $value) {
$descriptionidentifier = null;
$tourid = null;
+14 -5
View File
@@ -557,9 +557,10 @@ class tour {
// Remove the configuration for the tour.
$DB->delete_records('tool_usertours_tours', array('id' => $this->id));
helper::reset_tour_sortorder();
$this->remove_user_preferences();
return null;
}
@@ -585,6 +586,16 @@ class tour {
return $this;
}
/**
* Remove stored user preferences for the tour
*/
protected function remove_user_preferences(): void {
global $DB;
$DB->delete_records('user_preferences', ['name' => self::TOUR_LAST_COMPLETED_BY_USER . $this->get_id()]);
$DB->delete_records('user_preferences', ['name' => self::TOUR_REQUESTED_BY_USER . $this->get_id()]);
}
/**
* Whether this tour should be displayed to the user.
*
@@ -665,11 +676,9 @@ class tour {
* @return $this
*/
public function mark_major_change() {
global $DB;
// Clear old reset and completion notes.
$DB->delete_records('user_preferences', ['name' => self::TOUR_LAST_COMPLETED_BY_USER . $this->get_id()]);
$DB->delete_records('user_preferences', ['name' => self::TOUR_REQUESTED_BY_USER . $this->get_id()]);
$this->remove_user_preferences();
$this->set_config('majorupdatetime', time());
$this->persist();
+22
View File
@@ -25,6 +25,7 @@
defined('MOODLE_INTERNAL') || die();
use tool_usertours\manager;
use tool_usertours\tour;
/**
* Upgrade the user tours plugin.
@@ -74,5 +75,26 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2019111801, 'tool', 'usertours');
}
if ($oldversion < 2019111802) {
// Clean up user preferences of deleted tours.
$select = $DB->sql_like('name', ':lastcompleted') . ' OR ' . $DB->sql_like('name', ':requested');
$params = [
'lastcompleted' => tour::TOUR_LAST_COMPLETED_BY_USER . '%',
'requested' => tour::TOUR_REQUESTED_BY_USER . '%',
];
$preferences = $DB->get_records_select('user_preferences', $select, $params, '', 'DISTINCT name');
foreach ($preferences as $preference) {
// Match tour ID at the end of the preference name, remove all of that preference type if tour ID doesn't exist.
if (preg_match('/(?<tourid>\d+)$/', $preference->name, $matches) &&
!$DB->record_exists('tool_usertours_tours', ['id' => $matches['tourid']])) {
$DB->delete_records('user_preferences', ['name' => $preference->name]);
}
}
upgrade_plugin_savepoint(true, 2019111802, 'tool', 'usertours');
}
return true;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

@@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the block_html implementation of the privacy API.
* Unit tests for the tool_usertours implementation of the privacy API.
*
* @package block_html
* @package tool_usertours
* @category test
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -27,18 +27,16 @@ defined('MOODLE_INTERNAL') || die();
use \core_privacy\local\metadata\collection;
use \core_privacy\local\request\writer;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\deletion_criteria;
use \tool_usertours\tour;
use \tool_usertours\privacy\provider;
/**
* Unit tests for the block_html implementation of the privacy API.
* Unit tests for the tool_usertours implementation of the privacy API.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_usertours_privacy_testcase extends \core_privacy\tests\provider_testcase {
class tool_usertours_privacy_provider_testcase extends \core_privacy\tests\provider_testcase {
/**
* Ensure that get_metadata exports valid content.
@@ -113,6 +111,40 @@ class tool_usertours_privacy_testcase extends \core_privacy\tests\provider_testc
$this->assertCount(2, (array) $prefs);
}
/**
* Make sure we are exporting preferences for the correct user
*/
public function test_export_user_preferences_correct_user(): void {
global $DB;
$this->resetAfterTest();
$alltours = $DB->get_records('tool_usertours_tours');
$tour = tour::instance(reset($alltours)->id);
// Create test user, mark them as having completed the tour.
$user = $this->getDataGenerator()->create_user();
$this->setUser($user);
$tour->mark_user_completed();
// Switch to admin user, mark them as having reset the tour.
$this->setAdminUser();
$tour->request_user_reset();
// Export test users preferences.
provider::export_user_preferences($user->id);
$writer = writer::with_context(\context_system::instance());
$this->assertTrue($writer->has_any_data());
$prefs = $writer->get_user_preferences('tool_usertours');
$this->assertCount(1, (array) $prefs);
// We should have received back the "completed tour" preference of the test user.
$this->assertStringStartsWith('You last marked the "' . $tour->get_name() . '" user tour as completed on',
reset($prefs)->description);
}
/**
* Ensure that export_user_preferences excludes deleted tours.
*/
+8 -3
View File
@@ -64,7 +64,7 @@ class tour_testcase extends advanced_testcase {
/**
* Helper to mock the database.
*
* @return moodle_database
* @return \PHPUnit\Framework\MockObject\MockObject
*/
public function mock_database() {
global $DB;
@@ -569,9 +569,14 @@ class tour_testcase extends advanced_testcase {
// Mock the database.
$DB = $this->mock_database();
$DB->expects($this->once())
$DB->expects($this->exactly(3))
->method('delete_records')
->with($this->equalTo('tool_usertours_tours'), $this->equalTo(['id' => $id]))
->withConsecutive(
[$this->equalTo('tool_usertours_tours'), $this->equalTo(['id' => $id])],
[$this->equalTo('user_preferences'), $this->equalTo(['name' => tour::TOUR_LAST_COMPLETED_BY_USER . $id])],
[$this->equalTo('user_preferences'), $this->equalTo(['name' => tour::TOUR_REQUESTED_BY_USER . $id])]
)
->willReturn(null)
;
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2019111801; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2019111802; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2019111200; // Requires this Moodle version.
$plugin->component = 'tool_usertours'; // Full name of the plugin (used for diagnostics).
@@ -149,7 +149,7 @@ abstract class XMLDBCheckAction extends XMLDBAction {
continue;
}
// Fetch metadata from physical DB. All the columns info.
if (!$metacolumns = $DB->get_columns($xmldb_table->getName())) {
if (!$metacolumns = $DB->get_columns($xmldb_table->getName(), false)) {
// / Skip table if no metacolumns is available for it
continue;
}
@@ -93,6 +93,17 @@ class check_defaults extends XMLDBCheckAction {
$physicaldefault = null;
}
// For number fields there are issues with type differences, so let's convert
// everything to a float.
if ($xmldbfield->getType() === XMLDB_TYPE_NUMBER) {
if ($physicaldefault !== null) {
$physicaldefault = (float) $physicaldefault;
}
if ($xmldbdefault !== null) {
$xmldbdefault = (float) $xmldbdefault;
}
}
// There *is* a default and it's wrong.
if ($physicaldefault !== $xmldbdefault) {
$xmldbtext = self::display_default($xmldbdefault);
+19 -3
View File
@@ -624,9 +624,25 @@ class manager {
LEFT JOIN {context} ctx ON ap.contextid = ctx.id
WHERE ctx.id IS NULL)");
$contextsql = "SELECT id FROM {context} ctx";
$DB->delete_records_select('analytics_predictions', "contextid NOT IN ($contextsql)");
$DB->delete_records_select('analytics_indicator_calc', "contextid NOT IN ($contextsql)");
// Cleanup analaytics predictions/calcs with MySQL friendly sub-select.
$DB->execute("DELETE FROM {analytics_predictions} WHERE id IN (
SELECT oldpredictions.id
FROM (
SELECT p.id
FROM {analytics_predictions} p
LEFT JOIN {context} ctx ON p.contextid = ctx.id
WHERE ctx.id IS NULL
) oldpredictions
)");
$DB->execute("DELETE FROM {analytics_indicator_calc} WHERE id IN (
SELECT oldcalcs.id FROM (
SELECT c.id
FROM {analytics_indicator_calc} c
LEFT JOIN {context} ctx ON c.contextid = ctx.id
WHERE ctx.id IS NULL
) oldcalcs
)");
// Clean up stuff that depends on analysable ids that do not exist anymore.
+12 -3
View File
@@ -1492,6 +1492,17 @@ class model {
$prediction->get_prediction_data()->contextid, $prediction->get_sample_data());
}
/**
* Returns the default output directory for prediction processors
*
* @return string
*/
public static function default_output_dir(): string {
global $CFG;
return $CFG->dataroot . DIRECTORY_SEPARATOR . 'models';
}
/**
* Returns the output directory for prediction processors.
*
@@ -1506,8 +1517,6 @@ class model {
* @return string
*/
public function get_output_dir($subdirs = array(), $onlymodelid = false) {
global $CFG;
$subdirstr = '';
foreach ($subdirs as $subdir) {
$subdirstr .= DIRECTORY_SEPARATOR . $subdir;
@@ -1516,7 +1525,7 @@ class model {
$outputdir = get_config('analytics', 'modeloutputdir');
if (empty($outputdir)) {
// Apply default value.
$outputdir = rtrim($CFG->dataroot, '/') . DIRECTORY_SEPARATOR . 'models';
$outputdir = self::default_output_dir();
}
// Append model id.
+1 -4
View File
@@ -55,10 +55,7 @@ Feature: Manage analytics models
And I choose "Create model" in the open action menu
And I set the field "Enabled" to "Enable"
And I select "__core_course__analytics__target__course_completion" from the "target" singleselect
And I open the autocomplete suggestions list
And I click on "Read actions amount" item in the autocomplete list
And I open the autocomplete suggestions list
And I click on "Any write action in the course" item in the autocomplete list
And I set the field "Indicators" to "Read actions amount, Any write action in the course"
And I select "__core__analytics__time_splitting__single_range" from the "timesplitting" singleselect
And I press "Save changes"
Then I should see "No predictions available yet" in the "Students at risk of not meeting the course completion conditions" "table_row"
+8
View File
@@ -57,5 +57,13 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2019111801) {
// Normalize the memberattribute_isdn plugin config.
set_config('memberattribute_isdn',
!empty(get_config('auth_cas', 'memberattribute_isdn')), 'auth_cas');
upgrade_plugin_savepoint(true, 2019111801, 'auth', 'cas');
}
return true;
}
+2 -2
View File
@@ -239,9 +239,9 @@ if ($ADMIN->fulltree) {
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));
// Member attribute uses dn.
$settings->add(new admin_setting_configtext('auth_cas/memberattribute_isdn',
$settings->add(new admin_setting_configselect('auth_cas/memberattribute_isdn',
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));
// Object class.
$settings->add(new admin_setting_configtext('auth_cas/objectclass',
+1 -1
View File
@@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2019111800; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2019111801; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2019111200; // Requires this Moodle version
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
+6 -3
View File
@@ -603,9 +603,12 @@ class auth_plugin_db extends auth_plugin_base {
}
}
if (!empty($update)) {
$authdb->Execute("UPDATE {$this->config->table}
SET ".implode(',', $update)."
WHERE {$this->config->fielduser}='".$this->ext_addslashes($extusername)."'");
$sql = "UPDATE {$this->config->table}
SET ".implode(',', $update)."
WHERE {$this->config->fielduser} = ?";
if (!$authdb->Execute($sql, array($this->ext_addslashes($extusername)))) {
print_error('auth_dbupdateerror', 'auth_db');
}
}
$authdb->Close();
return true;
+1
View File
@@ -74,5 +74,6 @@ $string['auth_dbcannotconnect'] = 'Cannot connect to external database.';
$string['auth_dbcannotreadtable'] = 'Cannot read external table.';
$string['auth_dbtableempty'] = 'External table is empty.';
$string['auth_dbcolumnlist'] = 'External table contains the following columns:<br />{$a}';
$string['auth_dbupdateerror'] = 'Error updating external database.';
$string['pluginname'] = 'External database';
$string['privacy:metadata'] = 'The External database authentication plugin does not store any personal data.';
+2 -4
View File
@@ -178,10 +178,10 @@ class auth_plugin_email extends auth_plugin_base {
if ($user->auth != $this->authtype) {
return AUTH_CONFIRM_ERROR;
} else if ($user->secret == $confirmsecret && $user->confirmed) {
} else if ($user->secret === $confirmsecret && $user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in
} else if ($user->secret === $confirmsecret) { // They have provided the secret key to get in
$DB->set_field("user", "confirmed", 1, array("id"=>$user->id));
if ($wantsurl = get_user_preferences('auth_email_wantsurl', false, $user)) {
@@ -257,5 +257,3 @@ class auth_plugin_email extends auth_plugin_base {
}
}
+2 -2
View File
@@ -147,12 +147,12 @@ class auth_email_external extends external_api {
array(
'id' => new external_value(PARAM_INT, 'Profile field id', VALUE_OPTIONAL),
'shortname' => new external_value(PARAM_ALPHANUMEXT, 'Profile field shortname', VALUE_OPTIONAL),
'name' => new external_value(PARAM_TEXT, 'Profield field name', VALUE_OPTIONAL),
'name' => new external_value(PARAM_RAW, 'Profield field name', VALUE_OPTIONAL),
'datatype' => new external_value(PARAM_ALPHANUMEXT, 'Profield field datatype', VALUE_OPTIONAL),
'description' => new external_value(PARAM_RAW, 'Profield field description', VALUE_OPTIONAL),
'descriptionformat' => new external_format_value('description'),
'categoryid' => new external_value(PARAM_INT, 'Profield field category id', VALUE_OPTIONAL),
'categoryname' => new external_value(PARAM_TEXT, 'Profield field category name', VALUE_OPTIONAL),
'categoryname' => new external_value(PARAM_RAW, 'Profield field category name', VALUE_OPTIONAL),
'sortorder' => new external_value(PARAM_INT, 'Profield field sort order', VALUE_OPTIONAL),
'required' => new external_value(PARAM_INT, 'Profield field required', VALUE_OPTIONAL),
'locked' => new external_value(PARAM_INT, 'Profield field locked', VALUE_OPTIONAL),
+1 -1
View File
@@ -49,6 +49,6 @@ class behat_auth_email extends behat_base {
$confirmationpath = $confirmationurl->out_as_local_url(false);
$url = $confirmationpath . '?' . 'data='. $secret .'/'. $username;
$this->getSession()->visit($this->locate_path($url));
$this->execute('behat_general::i_visit', [$url]);
}
}
+45
View File
@@ -93,6 +93,51 @@ class auth_email_external_testcase extends externallib_advanced_testcase {
$this->assertEquals('textarea', $namedarray['sometext']['datatype']);
}
/**
* Test get_signup_settings with mathjax in a profile field.
*/
public function test_get_signup_settings_with_mathjax_in_profile_fields() {
global $CFG, $DB;
require_once($CFG->dirroot . '/lib/externallib.php');
// Enable MathJax filter in content and headings.
$this->configure_filters([
['name' => 'mathjaxloader', 'state' => TEXTFILTER_ON, 'move' => -1, 'applytostrings' => true],
]);
// Create category with MathJax and a new field with MathJax.
$categoryname = 'Cat $$(a+b)=2$$';
$fieldname = 'Some text $$(a+b)=2$$';
$categoryid = $DB->insert_record('user_info_category', array('name' => $categoryname, 'sortorder' => 1));
$field3 = $DB->insert_record('user_info_field', array(
'shortname' => 'mathjaxname', 'name' => $fieldname, 'categoryid' => $categoryid,
'datatype' => 'textarea', 'signup' => 1, 'visible' => 1, 'required' => 1, 'sortorder' => 2));
$result = auth_email_external::get_signup_settings();
$result = external_api::clean_returnvalue(auth_email_external::get_signup_settings_returns(), $result);
// Format the original data.
$sitecontext = context_system::instance();
$categoryname = external_format_string($categoryname, $sitecontext->id);
$fieldname = external_format_string($fieldname, $sitecontext->id);
// Whip up a array with named entries to easily check against.
$namedarray = array();
foreach ($result['profilefields'] as $key => $value) {
$namedarray[$value['shortname']] = $value;
}
// Check the new profile field.
$this->assertArrayHasKey('mathjaxname', $namedarray);
$this->assertStringContainsString('<span class="filter_mathjaxloader_equation">',
$namedarray['mathjaxname']['categoryname']);
$this->assertStringContainsString('<span class="filter_mathjaxloader_equation">',
$namedarray['mathjaxname']['name']);
$this->assertEquals($categoryname, $namedarray['mathjaxname']['categoryname']);
$this->assertEquals($fieldname, $namedarray['mathjaxname']['name']);
}
public function test_signup_user() {
global $DB;
+2 -2
View File
@@ -598,10 +598,10 @@ class auth_plugin_ldap extends auth_plugin_base {
if ($user->auth != $this->authtype) {
return AUTH_CONFIRM_ERROR;
} else if ($user->secret == $confirmsecret && $user->confirmed) {
} else if ($user->secret === $confirmsecret && $user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in
} else if ($user->secret === $confirmsecret) { // They have provided the secret key to get in
if (!$this->user_activate($username)) {
return AUTH_CONFIRM_FAIL;
}
+8
View File
@@ -75,5 +75,13 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2019111801) {
// Normalize the memberattribute_isdn plugin config.
set_config('memberattribute_isdn',
!empty(get_config('auth_ldap', 'memberattribute_isdn')), 'auth_ldap');
upgrade_plugin_savepoint(true, 2019111801, 'auth', 'ldap');
}
return true;
}
+1 -1
View File
@@ -57,7 +57,7 @@ $string['auth_ldap_ldap_encoding'] = 'Encoding used by the LDAP server, most lik
$string['auth_ldap_ldap_encoding_key'] = 'LDAP encoding';
$string['auth_ldap_login_settings'] = 'Login settings';
$string['auth_ldap_memberattribute'] = 'Optional: Overrides user member attribute, when users belongs to a group. Usually \'member\'';
$string['auth_ldap_memberattribute_isdn'] = 'Optional: Overrides handling of member attribute values, either 0 or 1';
$string['auth_ldap_memberattribute_isdn'] = 'Overrides handling of member attribute values';
$string['auth_ldap_memberattribute_isdn_key'] = 'Member attribute uses dn';
$string['auth_ldap_memberattribute_key'] = 'Member attribute';
$string['auth_ldap_noconnect'] = 'LDAP-module cannot connect to server: {$a}';
+2 -2
View File
@@ -142,9 +142,9 @@ if ($ADMIN->fulltree) {
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));
// Member attribute uses dn.
$settings->add(new admin_setting_configtext('auth_ldap/memberattribute_isdn',
$settings->add(new admin_setting_configselect('auth_ldap/memberattribute_isdn',
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));
// Object class.
$settings->add(new admin_setting_configtext('auth_ldap/objectclass',
+19 -8
View File
@@ -108,16 +108,19 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$o['ou'] = 'users';
ldap_add($connection, 'ou='.$o['ou'].','.$topdn, $o);
$createdusers = array();
for ($i=1; $i<=5; $i++) {
$this->create_ldap_user($connection, $topdn, $i);
$createdusers[] = 'username' . $i;
}
// Set up creators group.
$assignedroles = array('username1', 'username2');
$o = array();
$o['objectClass'] = array('posixGroup');
$o['cn'] = 'creators';
$o['gidNumber'] = 1;
$o['memberUid'] = array('username1', 'username2');
$o['memberUid'] = $assignedroles;
ldap_add($connection, 'cn='.$o['cn'].','.$topdn, $o);
$creatorrole = $DB->get_record('role', array('shortname'=>'coursecreator'));
@@ -174,15 +177,23 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
// Check events, 5 users created with 2 users having roles.
$this->assertCount(7, $events);
foreach ($events as $index => $event) {
$usercreatedindex = array(0, 2, 4, 5, 6);
$roleassignedindex = array (1, 3);
if (in_array($index, $usercreatedindex)) {
$this->assertInstanceOf('\core\event\user_created', $event);
}
if (in_array($index, $roleassignedindex)) {
$this->assertInstanceOf('\core\event\role_assigned', $event);
$username = $DB->get_field('user', 'username', array('id' => $event->relateduserid)); // Get username.
if ($event->eventname === '\core\event\user_created') {
$this->assertContains($username, $createdusers);
unset($events[$index]); // Remove matching event.
} else if ($event->eventname === '\core\event\role_assigned') {
$this->assertContains($username, $assignedroles);
unset($events[$index]); // Remove matching event.
} else {
$this->fail('Unexpected event found: ' . $event->eventname);
}
}
// If all the user_created and role_assigned events have matched
// then the $events array should be now empty.
$this->assertCount(0, $events);
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(2, $DB->count_records('role_assignments'));
+1 -1
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2019111800; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2019111801; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2019111200; // Requires this Moodle version
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)
+1 -3
View File
@@ -716,9 +716,7 @@ class auth_plugin_mnet extends auth_plugin_base {
foreach($superArray as $subArray) {
$subArray = array_values($subArray);
$instring = "('".implode("', '",$subArray)."')";
$query = "select id, session_id, username from {mnet_session} where username in $instring";
$results = $DB->get_records_sql($query);
$results = $DB->get_records_list('mnet_session', 'username', $subArray, '', 'id, session_id, username');
if ($results == false) {
// We seem to have a username that breaks our query:
+2 -2
View File
@@ -372,10 +372,10 @@ class auth extends \auth_plugin_base {
if ($user->auth != $this->authtype) {
return AUTH_CONFIRM_ERROR;
} else if ($user->secret == $confirmsecret && $user->confirmed) {
} else if ($user->secret === $confirmsecret && $user->confirmed) {
return AUTH_CONFIRM_ALREADY;
} else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in.
} else if ($user->secret === $confirmsecret) { // They have provided the secret key to get in.
$DB->set_field("user", "confirmed", 1, array("id" => $user->id));
return AUTH_CONFIRM_OK;
}
+2 -1
View File
@@ -182,7 +182,8 @@ How to customize the way the Shibboleth user data is used in Moodle
Among the Shibboleth settings in Moodle there is a field that should contain a
path to a php file that can be used as data manipulation hook.
You can use this if you want to further process the way your Shibboleth
attributes are used in Moodle.
attributes are used in Moodle. Due to security reasons this file cannot be
located within the current site data directory ($CFG->dataroot).
Example 1: Your Shibboleth federation uses an attribute that specifies the
user's preferred language, but the content of this attribute is not
@@ -0,0 +1,75 @@
<?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/>.
/**
* Special setting for auth_shibboleth convert_data.
*
* @package auth_shibboleth
* @copyright 2020 Mihail Geshoski
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Admin settings class for the convert_data option.
*
* @package auth_shibboleth
* @copyright 2020 Mihail Geshoski
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class auth_shibboleth_admin_setting_convert_data extends admin_setting_configfile {
/**
* Constructor.
*
* @param string $name
* @param string $visiblename
* @param string $description
* @param mixed $defaultdirectory
*/
public function __construct($name, $visiblename, $description, $defaultdirectory) {
parent::__construct($name, $visiblename, $description, $defaultdirectory);
}
/**
* Validate the file path (location).
*
* This method ensures that the file defined as a data modification API exists and is not located in the site
* data directory ($CFG->dataroot). We should prohibit using files from the site data directory as this introduces
* security vulnerabilities.
*
* @param string $filepath The path to the file.
* @return mixed bool true for success or string:error on failure.
*/
public function validate($filepath) {
global $CFG;
if (empty($filepath)) {
return true;
}
// Fail if the file does not exist or it is not readable by the webserver process.
if (!is_readable($filepath)) {
return get_string('auth_shib_convert_data_warning', 'auth_shibboleth');
}
// Fail if the absolute file path matches the currently defined dataroot path.
if (preg_match('/' . preg_quote($CFG->dataroot, '/') . '/', realpath($filepath))) {
return get_string('auth_shib_convert_data_filepath_warning', 'auth_shibboleth');
}
return true;
}
}
+23 -1
View File
@@ -30,7 +30,7 @@ defined('MOODLE_INTERNAL') || die();
* @return bool result
*/
function xmldb_auth_shibboleth_upgrade($oldversion) {
global $CFG, $DB;
global $CFG, $DB, $OUTPUT;
if ($oldversion < 2017020700) {
// Convert info in config plugins from auth/shibboleth to auth_shibboleth.
@@ -57,5 +57,27 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2019111801) {
// The 'Data modification API' setting in the Shibboleth authentication plugin can no longer be configured
// to use files located within the site data directory, as it exposes the site to security risks. Therefore,
// we need to find every existing case and reset the 'Data modification API' setting to its default value.
$convertdataconfig = get_config('auth_shibboleth', 'convert_data');
if (preg_match('/' . preg_quote($CFG->dataroot, '/') . '/', realpath($convertdataconfig))) {
set_config('convert_data', '', 'auth_shibboleth');
$warn = 'Your \'Data modification API\' setting in the Shibboleth authentication plugin is currently
configured to use a file located within the current site data directory ($CFG->dataroot). You are no
longer able to use files from within this directory for this purpose as it exposes your site to security
risks. This setting has been reset to its default value. Please reconfigure it by providing a path
to a file which is not located within the site data directory.';
echo $OUTPUT->notification($warn, 'notifyproblem');
}
upgrade_plugin_savepoint(true, 2019111801, 'auth', 'shibboleth');
}
return true;
}
@@ -38,6 +38,7 @@ $string['auth_shibboleth_select_organization'] = 'For authentication via Shibbol
$string['auth_shib_convert_data'] = 'Data modification API';
$string['auth_shib_convert_data_description'] = 'You can use this API to further modify the data provided by Shibboleth. Read the <a href="{$a}">README</a> for further instructions.';
$string['auth_shib_convert_data_warning'] = 'The file does not exist or is not readable by the webserver process!';
$string['auth_shib_convert_data_filepath_warning'] = 'You cannot use a file that is located within the current site data directory ($CFG->dataroot) as the data modification API.';
$string['auth_shib_changepasswordurl'] = 'Password-change URL';
$string['auth_shib_idp_list'] = 'Identity providers';
$string['auth_shib_idp_list_description'] = 'Provide a list of Identity Provider entityIDs to let the user choose from on the login page.<br />On each line there must be a comma-separated tuple for entityID of the IdP (see the Shibboleth metadata file) and Name of IdP as it shall be displayed in the drop-down list.<br />As an optional third parameter you can add the location of a Shibboleth session initiator that shall be used in case your Moodle installation is part of a multi federation setup.';
+3 -2
View File
@@ -28,6 +28,7 @@ if ($ADMIN->fulltree) {
// We use a couple of custom admin settings since we need to massage the data before it is inserted into the DB.
require_once($CFG->dirroot.'/auth/shibboleth/classes/admin_setting_special_wayf_select.php');
require_once($CFG->dirroot.'/auth/shibboleth/classes/admin_setting_special_idp_configtextarea.php');
require_once($CFG->dirroot.'/auth/shibboleth/classes/admin_setting_special_convert_data_configfile.php');
// Introductory explanation.
$readmeurl = (new moodle_url('/auth/shibboleth/README.txt'))->out();
@@ -38,8 +39,8 @@ if ($ADMIN->fulltree) {
$settings->add(new admin_setting_configtext('auth_shibboleth/user_attribute', get_string('username'),
get_string('auth_shib_username_description', 'auth_shibboleth'), '', PARAM_RAW));
// COnvert Data configuration file.
$settings->add(new admin_setting_configfile('auth_shibboleth/convert_data',
// Convert Data configuration file.
$settings->add(new auth_shibboleth_admin_setting_convert_data('auth_shibboleth/convert_data',
get_string('auth_shib_convert_data', 'auth_shibboleth'),
get_string('auth_shib_convert_data_description', 'auth_shibboleth', $readmeurl), ''));
+5
View File
@@ -1,6 +1,11 @@
This files describes API changes in /auth/shibboleth/*,
information provided here is intended especially for developers.
=== 3.8.7 ===
* The 'Data modification API' (convert_data) setting can no longer be configured to use files located within the
current site data directory ($CFG->dataroot), as it exposes the site to security risks.
=== 3.5.2 ===
* Moved the public function unserializesession in auth/shibboleth/logout.php to auth/shibboleth/classes/helper.php and
+1 -1
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2019111800; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2019111801; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2019111200; // Requires this Moodle version
$plugin->component = 'auth_shibboleth'; // Full name of the plugin (used for diagnostics)
+1 -1
View File
@@ -58,7 +58,7 @@ class behat_auth extends behat_base {
}
// Visit login page.
$this->getSession()->visit($this->locate_path($loginurl->out_as_local_url()));
$this->execute('behat_general::i_visit', [$loginurl]);
// Enter username and password.
$this->execute('behat_forms::i_set_the_field_to', array('Username', $this->escape($username)));
+1 -1
View File
@@ -794,7 +794,7 @@ class cc2moodle {
}
}
protected function critical_error ($text) {
protected static function critical_error ($text) {
$path_to_log = static::log_file();

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