Compare commits

...

2492 Commits

Author SHA1 Message Date
Jun Pataleta 3c33177dd2 Moodle release 3.10.11 2022-05-07 19:34:45 +08:00
Eloy Lafuente (stronk7) 4120b71be6 weekly release 3.10.10+ 2022-05-06 15:58:40 +02:00
Eloy Lafuente (stronk7) 519e708127 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-05-06 15:58:38 +02:00
Víctor Déniz d91780c1b6 Merge branch 'MDL-74612-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2022-05-05 13:26:26 +01:00
Jake Dallimore eabd853d0f MDL-73736 core_auth: Fix concurrency issue in login_attempt_failed()
This patch wraps the login_failed_count logic in a resource lock and
forces a user preferences cache reload. Each thread must wait for the
lock and must fetch the current count before incrementing it. This
ensures that login_failed_count is correct across threads and that the
lockout threshold is correctly honoured.

Co-Authored-By: Sujith Haridasan <sujith@moodle.com>
2022-05-04 16:28:04 +06:00
Michael Hawkins e294189099 MDL-74333 badges: Check profile criteria valid when reviewing 2022-05-04 12:58:29 +08:00
Ferran Recio 977f196c11 MDL-71623 core_search: fix user document visibility 2022-05-02 16:41:41 +06:00
Paul Holden c6e412ab60 MDL-74612 cohort: use data generator for populating cohort members. 2022-04-29 16:23:41 +01:00
AMOS bot 2eecdbaab6 Automatically generated installer lang files 2022-04-23 00:07:30 +00:00
AMOS bot 2647dabbab Automatically generated installer lang files 2022-04-12 00:07:31 +00:00
Amaia Anabitarte 27723d2ec9 MDL-74318 core_user: Description field as hidden on profile 2022-04-08 12:44:17 +02:00
Paul Holden 7e24859635 MDL-74204 mod_assign: escape identity fields in allocate marker form. 2022-04-08 12:44:16 +02:00
Ilya Tregubov 51206b0790 weekly release 3.10.10+ 2022-04-08 16:39:55 +06:00
Ilya Tregubov 0759e2fc12 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-04-08 16:39:55 +06:00
AMOS bot 8c1efcbcbf Automatically generated installer lang files 2022-04-07 00:07:28 +00:00
Víctor Déniz ab2231f94d Merge branch 'MDL-74189-310' of https://github.com/mihailges/moodle into MOODLE_310_STABLE 2022-04-06 22:56:50 +01:00
Mihail Geshoski d47c96ed35 MDL-74189 tool_moodlenet: Add upgrade step to remove irrelevant data
Upgrade step to identify all existing cases where users have linked
their MoodleNet profile on the site and remove the related data from
the database. Due to some recent changes on the MoodleNet platform,
this data is now irrelevant and can no longer be used to authenticate
on the MoodleNet platform.
2022-04-06 23:41:19 +08:00
Mihail Geshoski 66fc5bbf77 MDL-74189 tool_moodlenet: Update language strings
Updates the existing language strings in order to provide more accurate
instructions on how users can link existing their MoodleNet profile on
the site.
2022-04-06 23:41:19 +08:00
AMOS bot ca097ab63e Automatically generated installer lang files 2022-04-06 00:07:26 +00:00
Sara Arjona c56a642260 weekly release 3.10.10+ 2022-04-05 13:24:51 +02:00
Sara Arjona ec8a7f4b9c Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-04-05 13:24:51 +02:00
Jun Pataleta d0e8babdca Merge branch 'MDL-70014_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2022-04-04 13:56:14 +08:00
Jun Pataleta e4457963f0 Merge branch 'MDL-74096-310' of https://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2022-04-04 13:05:36 +08:00
Ilya Tregubov db50738df0 MDL-74096 mlbackend_python: Update mlbackend version. 2022-04-04 09:17:49 +06:00
AMOS bot 732383048f Automatically generated installer lang files 2022-04-04 00:07:25 +00:00
Eloy Lafuente (stronk7) 8b372e611e MDL-70014 tool_customlang: Workaround to make behat happier
This is a BEHAT_RUNNING only hack, so it doesn't affect normal
operations at all. What it achieves is to reduce the number of
strings loaded when customising a lang pack from current 31K ones
to the just needed ones for Behat testing purposes.

That way we avoid the random failures that are happening more and
more (while the "en" lang pack grows) and also save some precious
minutes in every behat run.

Also, unrelated, a couple of tiny changes:
- Modified constant (that was really outdated) to current number
  of lang strings (so the progress bar behaves better).
- Remove an elseif occurrence because it was hurting my eyes.
2022-04-01 23:57:17 +02:00
Sara Arjona bb1b6fd5e8 weekly release 3.10.10+ 2022-04-01 16:40:50 +02:00
Sara Arjona 6966a51f15 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-04-01 16:40:49 +02:00
Andrew Nicols 7ef52704de Merge branch 'MDL-72446_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2022-03-31 22:34:05 +08:00
Eloy Lafuente (stronk7) cb050b49f8 MDL-72446 behat: Ensure that the day reset happens on enabled element
Before this change we were setting the month day to 1 unconditionally
and that was working ok for enabled by default elements.

But in a number or cases we were doing that against disabled elements
so the day reset was not happening. Now we wait for the element to
be enabled and only then proceed with the day reset.

Backed with tests using disabled form elements, so we have now
both enabled and disabled fields covered.
2022-03-31 12:23:46 +02:00
AMOS bot 56a1925885 Automatically generated installer lang files 2022-03-31 00:07:28 +00:00
AMOS bot 16186b6e5d Automatically generated installer lang files 2022-03-26 00:07:24 +00:00
Víctor Déniz 9a5aedeb3c weekly release 3.10.10+ 2022-03-25 15:00:31 +00:00
Víctor Déniz 60f6a0b35b Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-03-25 15:00:30 +00:00
AMOS bot 5303132a08 Automatically generated installer lang files 2022-03-23 00:07:22 +00:00
Sara Arjona ff695e069e MDL-74184 behat: Unrelated, remove the @skip_interim tag
This commit is UNRELATED to the MDL-74184, but we need the
@skip_interim tag removed to a couple of scenarios that were
causing lots of noise and failures @ci infrastructure.
MDL-74265 was created to deal with this issue but these jobs
are now passing, and nothing has been changed...

So we are using MDL-74184 (this extra commit) to remove that
tag (sorry for the noise).
2022-03-22 17:24:34 +01:00
AMOS bot d3017ef9b3 Automatically generated installer lang files 2022-03-22 00:07:25 +00:00
Sara Arjona 1d9394a73c weekly release 3.10.10+ 2022-03-18 16:28:20 +01:00
Sara Arjona ac166e5e0f MDL-74116 behat: Unrelated, add the @skip_interim tag
This commit is UNRELATED to the MDL-74116, but we need the
@skip_interim tag added to a couple of scenarios that are
causing lots of noise and failures  @CI infrastructure.
MDL-74265 has been created to deal with this issue.

So we are using MDL-74116 (this extra commit) to add that tag
(sorry for the noise).
2022-03-18 13:46:32 +01:00
Eloy Lafuente (stronk7) e050328677 Merge branch 'MDL-74116-310' of https://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2022-03-16 22:19:36 +01:00
Andrew Nicols 5f4c92404c MDL-74116 behat: Fix browser instantiation for Selenium 4 2022-03-16 22:29:00 +08:00
Sara Arjona 7f273e3905 Merge branch 'MDL-74130_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2022-03-15 12:19:26 +01:00
Jun Pataleta 4495c3351c Moodle release 3.10.10 2022-03-12 12:39:19 +08:00
Jun Pataleta f72fea5dcf Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-03-12 12:39:18 +08:00
AMOS bot 8b90c334d5 Automatically generated installer lang files 2022-03-12 00:07:25 +00:00
Ilya Tregubov 3a515cc067 weekly release 3.10.9+ 2022-03-11 16:19:52 +06:00
Tim Hunt 2b13b00703 MDL-74130 question behat: Update tests to use the new navigation steps 2022-03-10 12:09:13 +00:00
Tim Hunt 49f8c0213f MDL-74130 question behat: support I am on ... page or key qbank pages 2022-03-10 09:31:13 +00:00
Jake Dallimore ef376a6793 Merge branch 'MDL-73899-310' of https://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2022-03-10 15:35:04 +08:00
Amaia Anabitarte 3b47042a4a MDL-74075 core_badges: Check accepted criterias 2022-03-09 12:31:47 +01:00
Michael Hawkins 6b670477f7 MDL-74074 badges: Ensure profile criteria exists before completion check 2022-03-08 12:07:58 +00:00
Paul Holden 4a625b5b78 MDL-72972 tool_uploaduser: observe capability to delete users. 2022-03-08 10:04:28 +01:00
cescobedo 2d5f48e2dd MDL-71722 h5plib_v124: Add required changes after lib upgrade 2022-03-08 10:04:28 +01:00
cescobedo c92c3c3f61 MDL-71722 h5plib_v124: Upgrade ckeditor to 4.17.1 2022-03-08 10:04:28 +01:00
Ilya Tregubov 7b2d71da98 MDL-71703 lib: update phpmailer to 6.5.3 2022-03-08 10:04:28 +01:00
Eloy Lafuente (stronk7) 87776ba114 weekly release 3.10.9+ 2022-03-08 10:02:01 +01:00
Eloy Lafuente (stronk7) 629922ff59 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-03-08 10:02:00 +01:00
Eloy Lafuente (stronk7) 82b8735c48 Merge branch 'MDL-74042-310' of https://github.com/jleyva/moodle into MOODLE_310_STABLE 2022-03-04 12:20:28 +01:00
Juan Leyva bd8c5d8afd MDL-74042 vimeo: Support security hash for restricted videos 2022-03-01 13:33:00 +01:00
AMOS bot f25e9da915 Automatically generated installer lang files 2022-03-01 00:07:31 +00:00
AMOS bot 695b7f4c07 Automatically generated installer lang files 2022-02-26 00:07:31 +00:00
Ilya Tregubov 78c9316c3c weekly release 3.10.9+ 2022-02-25 19:23:43 +02:00
Ilya Tregubov 035dfeecdd Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-02-25 19:23:43 +02:00
Jun Pataleta f74b3efbe0 Merge branch 'MDL-73915-310-terser' of https://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2022-02-24 16:56:13 +08:00
AMOS bot 4a4084f432 Automatically generated installer lang files 2022-02-24 00:07:31 +00:00
Andrew Nicols eaf5ab0793 MDL-73899 behat: Fix coding style issues to change third-party status
This commit removes the moodle-behat-extension from the list of
third-party libraries.

In order to do this properly, all pending coding-style issues are fixed.
In addition the following niceties have also been included:
* convert long form array() syntax to short form
* alphabetically sort class imports (use)
* remove unused class imports
* correct documentation
* Normalise whitespace in concat operators
* Remove unnecessary file docblocks
2022-02-23 08:19:30 +08:00
Sara Arjona e0e8802023 weekly release 3.10.9+ 2022-02-22 11:12:54 +01:00
Sara Arjona 7291454129 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-02-22 11:12:53 +01:00
Andrew Nicols 2528569425 MDL-73915 js: Switch amd minification to terser
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.

Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.

Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.

The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.

Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
2022-02-22 14:16:08 +08:00
Andrew Nicols 26a5300b6b MDL-73915 js: Upgrade babel and eslint 2022-02-22 14:16:04 +08:00
Sara Arjona 787687a19c Merge branch 'MDL-73883-310' of https://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2022-02-21 15:35:27 +01:00
AMOS bot af54ee60be Automatically generated installer lang files 2022-02-21 00:07:31 +00:00
Sara Arjona 7517c55f1d weekly release 3.10.9+ 2022-02-18 15:03:43 +01:00
Sara Arjona cd1d6c2aa0 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-02-18 15:03:42 +01:00
Andrew Nicols cbc811f039 MDL-73915 js: Upgrade packages 2022-02-18 08:41:02 +08:00
Andrew Nicols b74c2d4890 MDL-73915 js: Switch to nodejs lts/gallium 2022-02-18 08:26:17 +08:00
Andrew Nicols b62f0258b3 MDL-73915 js: Upgrade node-sass 2022-02-18 08:21:01 +08:00
AMOS bot 17979c5200 Automatically generated installer lang files 2022-02-17 00:07:28 +00:00
Sara Arjona bac7569b82 Merge branch 'MDL-72762_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2022-02-16 11:50:24 +01:00
Andrew Nicols f4955d77fc MDL-73883 behat: Display actual step during testing
Because of the way in which we check for exceptions, we always show the
following string during behat pretty output:

    behat_hooks::i_look_for_exceptions()

We can easily modify this to only show this value when the
i_look_for_exceptions() test itself fails, but otherwise to show the
actual step that is run.
2022-02-15 15:01:28 +08:00
AMOS bot b7d7a055ee Automatically generated installer lang files 2022-02-10 00:07:46 +00:00
AMOS bot 173a8f68eb Automatically generated installer lang files 2022-02-09 00:07:31 +00:00
Eloy Lafuente (stronk7) 9b085ae35e MDL-72762 backup: Accept empty and whitespace-only UI labels.
This was causing problems when sections or activity names where
set to be empty or whitespace-only, with the PARAM_CLEANHTML
leading to exception.

Now they are supported and handled like &nbsp; (0xc2a0) to
allow the process to continue.

Added a few extra tests to confirm the behaviour.
2022-02-07 15:59:13 +01:00
Sara Arjona 2c45077ae5 weekly release 3.10.9+ 2022-02-04 18:18:32 +01:00
Sara Arjona cad93ab90e Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-02-04 18:18:31 +01:00
Jun Pataleta d520264814 Merge branch 'MDL-73711_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2022-02-03 11:14:44 +08:00
Eloy Lafuente (stronk7) 95a3759f18 MDL-73711 behat: Bump to Behat 3.10.x
Generated with php72, following the instructions at:

https://docs.moodle.org/dev/Composer

Note this also comes with a minor PHPUnit bump to 8.5.23.
2022-01-29 16:21:44 +01:00
AMOS bot 361ba37179 Automatically generated installer lang files 2022-01-29 00:07:26 +00:00
Ilya Tregubov 85045cc9d4 weekly release 3.10.9+ 2022-01-28 20:17:01 +02:00
Ilya Tregubov 9243089573 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-01-28 20:17:01 +02:00
Sara Arjona f63a38260b Merge branch 'MDL-73588_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2022-01-27 17:06:13 +01:00
Eloy Lafuente (stronk7) 6bfb557169 MDL-73588 phpunit: Fix assertion to PHPUnit 8.5 one
This issue was backported from 311_STABLE that uses
PHPUnit 9.5, were the regexp assertion was renamed.

This just moves it back to the 8.5 one for 39 and 310 stables.
2022-01-27 16:12:53 +01:00
Frode Petterson 1a03e46f96 MDL-73588 curl: Fix expected CURLOPT_FILE behavior
After cbf9dfb the CURLOPT_FILE no longer behaves as expected. All
redirect responses are appended to the same stream resource.  This fix
reverts back to the old behavior by setting the stream pointer back to
the beginning for each subsequent redirect.
2022-01-27 12:18:26 +01:00
AMOS bot 9e5569b89d Automatically generated installer lang files 2022-01-26 00:07:33 +00:00
Sara Arjona 996bea908e weekly release 3.10.9+ 2022-01-21 15:00:52 +01:00
Sara Arjona f0713bab89 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-01-21 15:00:51 +01:00
Jun Pataleta f13a8dcef7 Merge branch 'MDL-73021-310' of git://github.com/andelacruz/moodle into MOODLE_310_STABLE 2022-01-21 11:18:28 +08:00
AMOS bot 6aff2b7c8d Automatically generated installer lang files 2022-01-21 00:07:36 +00:00
AMOS bot 322c3d3bae Automatically generated installer lang files 2022-01-19 00:07:32 +00:00
Eloy Lafuente (stronk7) bdb0364a3d Moodle release 3.10.9 2022-01-15 12:14:14 +01:00
Sara Arjona 52ddc92739 weekly release 3.10.8+ 2022-01-14 11:14:06 +01:00
Sara Arjona a2eb0d703b Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-01-14 11:14:06 +01:00
Paul Holden 261bcced5b MDL-72772 gradereport_overview: account for users with parent roles. 2022-01-12 14:19:45 +01:00
Eloy Lafuente (stronk7) eb4b0ac719 Merge branch 'MDL-70348-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2022-01-12 10:18:05 +01:00
Paul Holden b76e653518 MDL-72772 gradereport_overview: access checks for viewing grades. 2022-01-12 13:44:09 +08:00
AMOS bot 715fbb88c5 Automatically generated installer lang files 2022-01-12 00:07:34 +00:00
Paul Holden 46e45e7a64 MDL-72367 badges: require sesskey to remove badge alignment. 2022-01-11 14:34:16 +01:00
Dongsheng Cai 1b2ec27efc MDL-71239 calendar: disallow manager role users edit user events 2022-01-11 14:34:16 +01:00
Jun Pataleta bd7f72c777 weekly release 3.10.8+ 2022-01-11 21:29:59 +08:00
Jun Pataleta 70b9287643 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2022-01-11 21:29:58 +08:00
Jun Pataleta bd2a63dc74 Merge branch 'MDL-69061-310' of https://github.com/junpataleta/moodle into MOODLE_310_STABLE 2022-01-11 11:56:38 +08:00
Adam Pawełczak de33b20c79 MDL-69061 core: Fix admin path replacement with path to $CFG->admin 2022-01-11 11:33:54 +08:00
AMOS bot 14fc6d807f Automatically generated installer lang files 2022-01-11 00:07:28 +00:00
AMOS bot d41932a504 Automatically generated installer lang files 2022-01-08 00:07:25 +00:00
Shamim Rezaie 622ea0d721 Merge branch 'MDL-73272/3.10' of https://github.com/skodak/moodle into MOODLE_310_STABLE 2022-01-07 17:46:12 +11:00
AMOS bot 01bd38278b Automatically generated installer lang files 2022-01-07 00:07:33 +00:00
Ilya Tregubov a9e8056784 weekly release 3.10.8+ 2022-01-06 20:50:52 +02:00
Jun Pataleta e484778b3e Merge branch 'MDL-69700-310' of https://github.com/junpataleta/moodle into MOODLE_310_STABLE 2022-01-06 12:01:13 +08:00
Paul Holden 46b42dd297 MDL-69700 tests: clarify expected exceptions in unit tests.
Resolves some leftovers from MDL-67673, see d95c3787.
2022-01-06 11:43:03 +08:00
Petr Skoda 3f62bef6a6 MDL-73272 behat: move behat extension to core 2021-12-31 09:50:42 +13:00
Sara Arjona 4e79bd7530 weekly release 3.10.8+ 2021-12-30 11:24:14 +01:00
Sara Arjona fa3d437a07 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-12-30 11:24:13 +01:00
AMOS bot cb5c97043b Automatically generated installer lang files 2021-12-30 00:07:22 +00:00
AMOS bot afe05bf9f6 Automatically generated installer lang files 2021-12-28 00:07:21 +00:00
Víctor Déniz 434955ccf1 Merge branch 'MDL-73269/3.10' of https://github.com/skodak/moodle into MOODLE_310_STABLE 2021-12-27 15:26:14 +00:00
AMOS bot 121d43c8e3 Automatically generated installer lang files 2021-12-27 00:07:24 +00:00
AMOS bot ad884ebc90 Automatically generated installer lang files 2021-12-26 00:07:21 +00:00
Sara Arjona 5a042a256b weekly release 3.10.8+ 2021-12-23 16:29:44 +01:00
Sara Arjona 1dc92804be Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-12-23 16:29:43 +01:00
Jun Pataleta 23bb57ec47 Merge branch 'MDL-72701-310' of https://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-12-23 12:10:59 +08:00
AMOS bot f91a523dcc Automatically generated installer lang files 2021-12-23 00:07:23 +00:00
Petr Skoda fc764a1b23 MDL-73269 dev: add requirements to composer.json 2021-12-23 07:24:33 +13:00
Sara Arjona 3fbee249bf Merge branch 'MDL-73405_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-12-22 17:20:58 +01:00
Angelia Dela Cruz 078a510ed2 MDL-73021 behat: Use assign generators
Replace steps that manually add assignment instances via the UI
and use Behat generators. This improves the speed of Behat test
runs.
2021-12-22 15:07:32 +08:00
AMOS bot 856e46c884 Automatically generated installer lang files 2021-12-22 00:07:26 +00:00
Andrew Nicols 3235ad2a37 MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:06 +08:00
AMOS bot af2e3bc4df Automatically generated installer lang files 2021-12-21 00:07:23 +00:00
Shamim Rezaie 94a17a6b82 Merge branch 'MDL-73175-310' of https://github.com/NoelDeMartin/moodle into MOODLE_310_STABLE 2021-12-20 11:00:40 +11:00
Eloy Lafuente (stronk7) 464f2ea460 MDL-73405 phpunit: dataset fixes
This was detected when working in the renaming of test names:
- Fix file name, it was incorrectly named .test.php, now _test.php.
- Add namespace and rename testcase name to match file name.
- Fix php80 deprecation message about optional and required params
  order.
2021-12-19 12:52:49 +01:00
AMOS bot 1b47cc00bb Automatically generated installer lang files 2021-12-19 00:07:22 +00:00
Noel De Martin 2e88f5385e MDL-73175 mod_glossary: Add behat generators 2021-12-17 07:52:27 +01:00
Paul Holden 2932170119 MDL-70348 core: fix upgrade note referring to $CFG->localrequestdir.
The change in 9fabe1dd referred to incorrect config property.
2021-12-15 08:56:35 +00:00
AMOS bot 5be8691162 Automatically generated installer lang files 2021-12-15 00:07:23 +00:00
Ilya Tregubov 6d35e4a7c2 weekly release 3.10.8+ 2021-12-14 17:42:59 +02:00
Ilya Tregubov 1a684e2af2 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-12-14 17:42:59 +02:00
AMOS bot 5160019c8c Automatically generated installer lang files 2021-12-13 00:07:22 +00:00
AMOS bot 142e789a1d Automatically generated installer lang files 2021-12-12 00:07:20 +00:00
AMOS bot 220f5ab3a0 Automatically generated installer lang files 2021-12-11 00:07:23 +00:00
Ilya Tregubov 489b23ffa1 Merge branch 'MDL-73278_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-12-10 18:52:20 +02:00
AMOS bot 855f45838d Automatically generated installer lang files 2021-12-10 00:07:21 +00:00
Eloy Lafuente (stronk7) 035f282739 MDL-73278 phpunit: Add missing payment subsystem and fix dataprovider
While testing the changed unit tests one by one, the
payment/tests/helper_test.php was failing because of a mismatch
between the dataProvider data and the param type.

That made me think why that error was not popping in complete runs
and the answer is that the new (3.10) subsystem is not in the
phpunit.xml.dist file.

Hence, adding it and fixing the dataProvider mismatch.

Finally, it has been detected that some old ICU versions (< 62)
have an incorrect behaviour, not adding the required non-breaking
white-space between the currency abbreviation and the value. So
we are skipping some payment tests if that's found.
2021-12-09 10:39:37 +01:00
AMOS bot e074f62ca3 Automatically generated installer lang files 2021-12-09 00:07:18 +00:00
Ilya Tregubov 2e98ffb59d weekly release 3.10.8+ 2021-12-07 14:59:44 +02:00
Ilya Tregubov 20e865ad07 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-12-07 14:59:43 +02:00
Jun Pataleta a501c7520a Merge branch 'MDL-73202-310' of https://github.com/NoelDeMartin/moodle into MOODLE_310_STABLE 2021-12-07 10:38:41 +08:00
AMOS bot 560afbe855 Automatically generated installer lang files 2021-12-07 00:07:24 +00:00
Eloy Lafuente (stronk7) d9d5d01201 Merge branch 'MDL-73253-310' of https://github.com/vmdef/moodle into MOODLE_310_STABLE 2021-12-03 18:52:43 +01:00
Víctor Déniz 62dd86c8a8 MDL-73253 ci: use setup-node action in GHA 2021-12-03 16:07:07 +00:00
Sara Arjona c86c9797b3 weekly release 3.10.8+ 2021-12-03 10:26:34 +01:00
Andrew Nicols 4be6379b25 Merge branch 'MDL-73195-310' of https://github.com/lameze/moodle into MOODLE_310_STABLE 2021-12-03 14:19:22 +08:00
Andrew Nicols eaf44f06d6 Merge branch 'MDL-72846-310' of https://github.com/NoelDeMartin/moodle into MOODLE_310_STABLE 2021-12-03 08:30:23 +08:00
Eloy Lafuente (stronk7) 57c7cd7c22 Merge branch 'MDL-72728-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-12-02 18:57:24 +01:00
Noel De Martin 3dcae6c702 MDL-72846 testing: Add default block generators 2021-12-02 14:57:05 +01:00
Jun Pataleta 708a613e94 Merge branch 'MDL-72785-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-12-02 17:06:23 +08:00
Simey Lameze c82692e7a8 MDL-73195 mod_url: prevent invalid urls from breaking the course 2021-12-02 16:58:27 +08:00
Andrew Nicols e8d99e4b76 Merge branch 'MDL-73070_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-12-02 11:24:47 +08:00
Eloy Lafuente (stronk7) ceae073d1d weekly release 3.10.8+ 2021-11-30 19:01:17 +01:00
Eloy Lafuente (stronk7) bd20aea403 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-11-30 19:01:16 +01:00
Noel De Martin 83954781a9 MDL-73202 mod_forum: Add behat generators 2021-11-30 10:08:13 +01:00
Jun Pataleta 1b8a325038 Merge branch 'MDL-70274-310-2' of https://github.com/lameze/moodle into MOODLE_310_STABLE 2021-11-29 12:25:32 +08:00
Simey Lameze ada5c7e6af MDL-70274 core: fix Validate HTML and WCAG Check links 2021-11-29 12:24:09 +08:00
AMOS bot df2a779dba Automatically generated installer lang files 2021-11-27 00:07:32 +00:00
Paul Holden 3e965458f0 MDL-72728 behat: switch import course steps to native execute method.
The previous iteration using the behat_form_field class directly
didn't explicitly require the file that defines this class, and in
Goutte runs this led to fatal errors (class not found).
2021-11-26 19:07:53 +00:00
Paul Holden 85a741a6f6 MDL-72785 course: remove double validation during category deletion.
Fixes issue from 0645319e that meant the category "Move into" field
was required even when user selected to "Delete all content".
2021-11-26 11:14:57 +00:00
AMOS bot a5e4d03df8 Automatically generated installer lang files 2021-11-25 00:07:21 +00:00
Tim Hunt 8a762403bd MDL-73070 Behat: stop using no-longer-existant classes in behat_hooks 2021-11-23 10:59:48 +00:00
Eloy Lafuente (stronk7) c942855732 weekly release 3.10.8+ 2021-11-19 19:15:30 +01:00
Eloy Lafuente (stronk7) 035de9a5f4 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-11-19 19:15:29 +01:00
AMOS bot 2dcea341d7 Automatically generated installer lang files 2021-11-19 00:07:22 +00:00
Eloy Lafuente (stronk7) 7f20a0b509 Merge branch 'MDL-71882-310' of https://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-11-18 23:48:32 +01:00
AMOS bot bc1dbf8323 Automatically generated installer lang files 2021-11-18 00:07:20 +00:00
Andrew Nicols e4cc11f11a MDL-71882 grunt: Replace module names
When a third-party AMD module is provided with an included name we must
replace it with a name that we are able to use.

The structure of an AMD module define function is:

    [name], [dependencies], [callback]
    String, Array,          Function

Each of these is (strangely) optional.

We know that the name is the only String and will always be the first,
and we can use AST to remove a provided name before adding the
Moodle-specific name.

This should be a safe change and not lead to any changes in built code,
but will make it easier to include third-party code.

An additional logging line is also included to inform developers that a
change was made.
2021-11-17 09:20:54 +08:00
AMOS bot 5de0c8c99d Automatically generated installer lang files 2021-11-17 00:07:24 +00:00
Eloy Lafuente (stronk7) bcb3b58f22 weekly release 3.10.8+ 2021-11-16 14:00:01 +01:00
Eloy Lafuente (stronk7) 76e6c563f4 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-11-16 13:59:59 +01:00
AMOS bot 9602d39728 Automatically generated installer lang files 2021-11-16 00:07:21 +00:00
Eloy Lafuente (stronk7) 872ab24bc3 Merge branch 'MDL-72096-310' of https://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-11-15 19:13:54 +01:00
Michael Hawkins 281f826009 MDL-72096 core: Add safe ORDER BY helpers for db sorting from user input
The new get_safe_orderby() and get_safe_orderby_multiple() methods
provide a centralised safe way for user submitted sorting values to be
incorporated into SQL ORDER BY. They do this by removing the need for
user submitted data to pass in any SQL and not allowing arbitrary
column values, instead using string keys which map to a predefined
list of allowed sortable columns.
2021-11-15 19:50:42 +08:00
Eloy Lafuente (stronk7) 61209fdec1 weekly release 3.10.8+ 2021-11-12 13:40:37 +01:00
Eloy Lafuente (stronk7) ee9e1b9b64 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-11-12 13:40:35 +01:00
Eloy Lafuente (stronk7) b33da0a812 Merge branch 'MDL-72696-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-11-10 19:21:20 +01:00
AMOS bot acc141535c Automatically generated installer lang files 2021-11-09 00:07:24 +00:00
Paul Holden 9bd876e243 MDL-72696 behat: support inplace editable fields of type select.
If an inplace editable field is using the "select" type, we should
treat it as a select field when setting it's value during scenarios.
2021-11-08 13:12:33 +00:00
Eloy Lafuente (stronk7) 08534dff50 Moodle release 3.10.8 2021-11-06 10:34:22 +01:00
Ilya Tregubov b6936f521b weekly release 3.10.7+ 2021-11-05 19:18:36 +02:00
Ilya Tregubov bf29fabccd Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-11-05 19:18:35 +02:00
Huong Nguyen 05ffb4680d MDL-71918 Calendar: Improve capability checks when fetching events 2021-11-05 13:16:04 +08:00
Jun Pataleta 47a3349629 Merge branch 'MDL-72667-310-fix' of https://github.com/lameze/moodle into MOODLE_310_STABLE 2021-11-05 12:45:04 +08:00
Simey Lameze 2cc0e5e744 MDL-72667 assign: change overdue message to darker red 2021-11-05 12:42:23 +08:00
Jun Pataleta 064306fd31 Merge branch 'MDL-72679-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-11-05 12:41:01 +08:00
Andrew Nicols 03430b4e2f Merge branch 'MDL-72990-310' of https://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-11-05 11:58:52 +08:00
Andrew Nicols 415de33156 MDL-71439 core_grade: Coding style tidyup 2021-11-05 11:33:34 +08:00
Andrew Nicols 41a4a08a07 Merge branch 'MDL-71439_310' of https://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-11-05 11:33:27 +08:00
Jun Pataleta 33e0235236 Merge branch 'MDL-72688-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-11-05 11:23:50 +08:00
Víctor Déniz 10477794b9 Merge branch 'MDL-72945-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-11-05 01:48:04 +00:00
Shamim Rezaie c562f8bb87 MDL-72688 contentbank: Some accessibility improvements described below
- Label the table/list with aria-label
- Hide sort buttons from screen-readers and use aria-sort instead
- Remove the redundant title from decorative thumbnails
2021-11-05 12:43:52 +11:00
Shamim Rezaie f9053d932e MDL-72688 contentbank: Add and maintain appropriate aria roles
Also moved header text into the sorting button as per the example at
https://dequeuniversity.com/library/aria/table-sortable
2021-11-05 12:38:32 +11:00
Víctor Déniz 47e5bf72af Merge branch 'MDL-72969-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-11-05 01:20:10 +00:00
AMOS bot ba40dbce29 Automatically generated installer lang files 2021-11-05 00:07:22 +00:00
Jun Pataleta 55f08b61ca Merge branch 'MDL-72667-310' of https://github.com/lameze/moodle into MOODLE_310_STABLE 2021-11-04 22:06:10 +08:00
Simey Lameze 17f1558a63 MDL-72667 message: fix contrast issue in the drawer 2021-11-04 21:21:12 +08:00
Simey Lameze 623b759934 MDL-72667 notifications: improve colour contrast 2021-11-04 21:21:11 +08:00
Simey Lameze 2afc498820 MDL-72667 lesson: improve colour contrast of correct text 2021-11-04 21:20:33 +08:00
Simey Lameze bee3b5656a MDL-72667 assign: improve contrast of not graded text 2021-11-04 21:20:33 +08:00
Jun Pataleta 6e8eb03e59 Merge branch 'MDL-72672-310' of https://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-11-04 18:23:10 +08:00
Simey Lameze cb57a6569a MDL-72672 lesson: make edit collapsed table responsive 2021-11-04 18:20:54 +08:00
Simey Lameze 898dbbb0ed MDL-72672 lesson: make detailed stats table responsive 2021-11-04 18:20:53 +08:00
Simey Lameze 9d83452a4c MDL-72672 lesson: make attempts table responsive 2021-11-04 18:20:52 +08:00
Simey Lameze fa90465f37 MDL-72672 lesson: add label for true/false checkboxes 2021-11-04 18:20:50 +08:00
Simey Lameze 4546974e30 MDL-72672 lesson: add label for multichoice checkboxes 2021-11-04 18:20:49 +08:00
Simey Lameze 516ca4373d MDL-72672 lesson: remove unnecessary nowrap
This commit also remove some deprecated table properties as well.
2021-11-04 18:20:48 +08:00
Simey Lameze baa337515e MDL-72672 mod_lesson: add aria-label to actions select element 2021-11-04 18:20:47 +08:00
Sara Arjona 1e9568597f Merge branch 'MDL-72949-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-11-04 10:33:41 +01:00
Nathan Nguyen e10cbb53f6 MDL-72679 qtype_ddmarker: Fix incorrect positions in multiple viewportss
Co-authored-by: Huong Nguyen <huongnv13@gmail.com>
2021-11-04 14:44:48 +07:00
Jun Pataleta c5cd2bbb13 Merge branch 'MDL-72668-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-11-04 12:04:27 +08:00
Shamim Rezaie 0843836725 MDL-72990 badges: Use imagecaption as alternative text for badge image 2021-11-04 15:04:14 +11:00
Shamim Rezaie b9a9967996 MDL-72668 block_badges: Add alt attribute to badge images 2021-11-04 14:20:10 +11:00
Shamim Rezaie 105cd1d7a0 MDL-72668 core: Highlight the focused tree item in a tree. 2021-11-04 14:20:10 +11:00
Shamim Rezaie 2d3e43ec62 MDL-72668 block_private_files: Switched from YUI to core/tree AMD 2021-11-04 14:20:07 +11:00
Víctor Déniz df9d3c744f Merge branch 'MDL-72895-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-11-04 01:50:56 +00:00
Paul Holden e36157f765 MDL-70823 qtype_ddwtos: new method for safer feedback unserializing. 2021-11-03 16:57:24 +01:00
Paul Holden f43285a28d MDL-70823 mod: safely parse module display options array. 2021-11-03 16:57:24 +01:00
Paul Holden f18f500a11 MDL-70823 blocks: safer unserializing during block restore. 2021-11-03 16:57:24 +01:00
Paul Holden dd66a550cb MDL-70823 core: safer alternative for unserializing objects. 2021-11-03 16:57:24 +01:00
sangnguyena 802f1a7a87 MDL-72949 WS: Return coursegraceperiod setting in tool_mobile_get_config 2021-11-03 16:09:53 +07:00
Ilya Tregubov 90a83f1ef3 Merge branch 'MOODLE_310_MDL-72953' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-11-03 10:35:50 +02:00
Andrew Nicols 209f4292fc MDL-72894 courseexport: Whitespace fix 2021-11-03 16:12:01 +08:00
Andrew Nicols 34696d4a36 Merge branch 'MDL-72894-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-11-03 16:11:55 +08:00
Sara Arjona 46f2c2471f Merge branch 'MDL-72977-310' of https://github.com/juancs/moodle into MOODLE_310_STABLE 2021-11-03 09:04:07 +01:00
Ilya Tregubov 662639ba34 Merge branch 'MDL-71872-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-11-03 09:27:39 +02:00
Jun Pataleta 106ac6b81e Merge branch 'MDL-72687-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-11-03 11:57:22 +08:00
Mikhail Golenkov 1b158e1e45 MDL-72953 core_lang: Add string for new timezone Pacific/Kanton 2021-11-03 11:40:10 +11:00
AMOS bot 4251c2a010 Automatically generated installer lang files 2021-11-03 00:07:22 +00:00
Paul Holden fc42ef155a MDL-72370 badges: require sesskey to remove related badge. 2021-11-02 18:04:16 +01:00
Ilya Tregubov faabe30597 MDL-70887 mlbackend_python: Update to latest version. 2021-11-02 18:04:16 +01:00
Simey Lameze 1dcb4f9aa3 MDL-72571 tool_filetypes: change extension param to PARAM_ALPHANUMEXT 2021-11-02 18:04:16 +01:00
Sara Arjona 4d084e8a11 Merge branch 'MDL-72857-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-11-02 18:01:41 +01:00
Eloy Lafuente (stronk7) 58f859fda6 weekly release 3.10.7+ 2021-11-02 14:07:57 +01:00
Eloy Lafuente (stronk7) ebfa38561a Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-11-02 14:07:56 +01:00
Juan Segarra Montesinos 297edf518d MDL-72977 qtype_essay: Honor Information for graders text format. 2021-11-02 12:22:22 +01:00
Simey Lameze f6eddf3ef8 MDL-72687 assign: move labels for toggle zoom icons to the <a> 2021-11-02 13:56:57 +08:00
Simey Lameze 4b2d40ec24 MDL-72687 assign: move labels for collapse buttons to the button 2021-11-02 13:56:57 +08:00
Simey Lameze 6fc89d13f2 MDL-72687 assign: remove title attr from view all submissions link 2021-11-02 13:56:56 +08:00
Simey Lameze 6b5eb6c2f4 MDL-72687 assign: move label from the edit settings icon to <a> 2021-11-02 13:56:56 +08:00
Simey Lameze 5ab92e459c MDL-72687 assign: remove presentation role from profile image 2021-11-02 13:56:56 +08:00
Simey Lameze aaea00fac4 MDL-72687 assign: fix email and due date cut off whem zooming 2021-11-02 13:56:56 +08:00
Simey Lameze 8af2a0d1e5 MDL-72687 assign: fix colour picker broken aria menu 2021-11-02 13:56:56 +08:00
Simey Lameze d823a6a109 MDL-72687 assign: fix stamp picker broken aria menu 2021-11-02 13:56:56 +08:00
Simey Lameze 9bde57d68b MDL-72687 assign: fix change filter element tab navigation 2021-11-02 13:56:56 +08:00
Simey Lameze 6d46bde5df MDL-72687 assign: use correct aria role for toolbar 2021-11-02 13:56:56 +08:00
Simey Lameze af6ac19818 MDL-72687 assign: add missing label to change user element 2021-11-02 13:56:55 +08:00
Simey Lameze 8e9a244acb MDL-72687 assign: display a more friendly link when not graded 2021-11-02 13:56:55 +08:00
Simey Lameze bff8d68915 MDL-72687 assign: add missing aria-label to prev/next arrows 2021-11-02 13:56:55 +08:00
Simey Lameze a852f9c33c MDL-72687 form: only add legend tag if a label is set 2021-11-02 13:56:55 +08:00
Andrew Nicols 6046c252e6 Merge branch 'MDL-72884-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-11-02 11:34:11 +08:00
Andrew Nicols 0af5f15eb7 Merge branch 'MDL-72767-m310' of https://github.com/NeillM/moodle into MOODLE_310_STABLE 2021-11-02 11:29:04 +08:00
AMOS bot f890546135 Automatically generated installer lang files 2021-11-02 00:07:23 +00:00
Paul Holden 6ad94202c3 MDL-72969 output: correct ansi colour format codes for check results. 2021-11-01 17:12:21 +00:00
Huong Nguyen 7ffc6c9e09 MDL-71872 Questions: The placeholder disappears when double-clicking 2021-11-01 17:30:24 +07:00
Paul Holden 13f3015dd6 MDL-72857 badges: filter site/course name when showing issued badge. 2021-11-01 10:20:45 +00:00
Neill Magill a83bc1c40c MDL-72767 forum: Stop duplicate digests being created
This change is to stop there being a possibility of 2 digests tasks
being created for a user on the day that MDL-72767 is applied.
2021-11-01 08:51:26 +00:00
Neill Magill cda586322e MDL-72767 forum: Ensure digests are sent
Before this change if a new post was made after the digest time but
before todays daily digest had been sent the run time on the digest
would be set to the next day resulting in no digest being sent to
the user.

By adding the server midnight to the custom data on the task we
ensure that in this case a new adhoc task is created for the next
day leaving the current one to get processed.

Server midnight is used so that if the digest time setting is
changed we would not get two tasks queued for the same day.
2021-11-01 08:51:25 +00:00
Neill Magill 9761c06bd4 MDL-72767 forum: Fix PHPDoc 2021-11-01 08:51:25 +00:00
Andrew Nicols 7e528a6da8 Merge branch 'MDL-72921_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-11-01 08:56:00 +08:00
AMOS bot fbbddaa3e5 Automatically generated installer lang files 2021-10-30 00:07:21 +00:00
Eloy Lafuente (stronk7) 2b140aac6c MDL-72921 generators: exported users now match the plan size definition
Before this patch the exported users (to csv file that jmeter consumes)
were all the enrolled users in the test course. And that's ok when the
number of users enrolled match the number of concurrent threads planned
for a jmeter plan (each thread is a user).

But when both numbers don't match, that can lead to the jmeter plan
not behaving as expected, because it iterates over the excessive users
in the file, leading to some users having run 5 loops, others 4...

The only way to make results more consistent is to, always, ensure that
the number of users exported for the plan match the plan size and not
the site size.

And that's what this issue exactly does, restrict the export to the
number of threads that the plan will have. So every user always runs
the very same number of loops.
2021-10-29 18:03:50 +02:00
Eloy Lafuente (stronk7) 96911f0c1a weekly release 3.10.7+ 2021-10-29 17:10:15 +02:00
Eloy Lafuente (stronk7) b45b272a45 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-10-29 17:10:14 +02:00
Eloy Lafuente (stronk7) 06eb5a762f MDL-72743 phpunit: Skip test until MDL-72950 is fixed
It's good to keep the test because it's not easy to
reproduce the issue to be fixed. Part of the fix will
be to remove this skip.
2021-10-29 14:00:41 +02:00
Huong Nguyen 6742fa55be MDL-72895 Assignment: Fix colour contrast for grading navigation 2021-10-29 18:53:22 +08:00
Shamim Rezaie c0d9cbcced Merge branch 'MDL-72874-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-10-29 03:35:33 +11:00
Shamim Rezaie c72f637d37 Merge branch 'MDL-72924-fix-component-initialisation-for-performance-checks-MOODLE_310_STABLE' of https://github.com/keevan/moodle into MOODLE_310_STABLE 2021-10-29 02:57:23 +11:00
Sara Arjona 054d49fe3d MDL-72945 badges: use default issuer contact
The defaultissuercontact was ignored if the sitebackpack email was set
to empty string..
2021-10-28 17:45:10 +02:00
Víctor Déniz dab1898dd1 Merge branch 'MDL-72912_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-10-28 15:45:40 +01:00
Víctor Déniz dfe37f0c6b Merge branch 'MDL-72901_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-10-28 13:49:25 +01:00
Eloy Lafuente (stronk7) d16a375088 MDL-72743 tests: tidy up the new test with NS/name/covers
Ideally any new test should be using a class name matching
the file name, and to use namespace when clearly belonging to
a component (sub-namespace also allowed for better accuracy).

And, also, adding a @covers label to indicate which class
(preferred, method is also possible) is being covered with the test.
2021-10-28 13:11:51 +02:00
Eloy Lafuente (stronk7) 2572fdc856 Merge branch 'MDL-72743-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-10-28 13:11:47 +02:00
Andrew Nicols c5e217856a Merge branch 'MDL-72871_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-10-28 14:16:32 +08:00
Jun Pataleta dda001d3d3 Merge branch 'MDL-72316-310-2' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-10-28 13:50:35 +08:00
Michael Hawkins 29cfeda7b5 MDL-72316 filelib: Add ability for modules to directly load SVG images
This also implements the functionality for SCORM packages, which may
have SVG images embedded within their content which require loading
directly (and are only created by users with appropriate risk flag).
2021-10-28 13:06:07 +08:00
Kevin Pham 48f390046d MDL-72924 check: Fix component initialisation for performance checks 2021-10-28 14:22:41 +11:00
Eloy Lafuente (stronk7) 6a6e407f70 Merge branch 'MDL-72879-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-10-27 22:12:41 +02:00
Jun Pataleta 955800114b Merge branch 'MDL-72669-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-10-27 15:07:52 +08:00
Mark Nelson e89ba50b71 MDL-71439 core_grades: return a blank mustache template for letters 2021-10-27 12:20:34 +08:00
Mark Nelson 569024b0d9 MDL-71439 mod_forum: display user grade from web service 2021-10-27 12:20:34 +08:00
Mark Nelson ef9594be52 MDL-71439 core_grades: return result of new method in web services 2021-10-27 12:20:34 +08:00
Mark Nelson a93e25a05f MDL-71439 core_grades: add new method 'get_formatted_grade_for_user' 2021-10-27 12:20:34 +08:00
Mark Nelson d46acf02fa MDL-71439 core_grades: fixed undefined class issues 2021-10-27 12:20:33 +08:00
Mark Nelson dd7d81b872 MDL-71439 core_grades: remove returning null when not possible
The method explicitly declares 'stdClass' as the return type.
2021-10-27 12:20:33 +08:00
AMOS bot fb4878f231 Automatically generated installer lang files 2021-10-27 00:07:22 +00:00
Eloy Lafuente (stronk7) 612f688949 Merge branch 'MDL-72913-310' of git://github.com/NoelDeMartin/moodle into MOODLE_310_STABLE 2021-10-26 17:22:17 +02:00
Eloy Lafuente (stronk7) 9424c7464e MDL-72871 cleanup: Remove incorrect whitespace from codebase
Differences can be checked with git diff --ignore-all-space and
that will show that the only non-whitespace change is in a test
in the git lib/tests/html2text_test.php file. In that case the
whitespace has been replaced by a quoted string (of whitespaces)
keeping the test 100% equivalent and workarrounding the whitespace.
2021-10-26 17:19:22 +02:00
Víctor Déniz 9fd7f2c0be weekly release 3.10.7+ 2021-10-26 13:44:11 +01:00
Víctor Déniz c4372bb149 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-10-26 13:44:09 +01:00
Tim Hunt 466b94469e MDL-72912 questions: fix type of question_display_options::$context 2021-10-26 08:06:37 +01:00
Noel De Martin ee3caf8593 MDL-72913 course: Fix require statement 2021-10-26 08:53:22 +02:00
Helen Foster a7b0d7cb7b MDL-72879 lang: Import fixed English strings (en_fix) 2021-10-25 21:01:52 +02:00
Paul Holden 8f592b3e3b MDL-72894 course: format name and summary data for download.
The names and summaries of course elements (i.e. the course
itself, plus sections and modules) included when downloading
it's content are now passed through appropriate methods to
format their values.
2021-10-25 08:07:58 +01:00
Andrew Nicols 35bbdfbef5 Merge branch 'MDL-71750-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-10-25 13:58:46 +08:00
AMOS bot 3287734e73 Automatically generated installer lang files 2021-10-24 00:07:24 +00:00
Tim Hunt 0260a426c8 MDL-72901 question: add missing {$a} in string attemptfinishedsubmitting 2021-10-22 23:16:44 +01:00
Ilya Tregubov 01bdec3021 weekly release 3.10.7+ 2021-10-22 12:49:06 +02:00
Shamim Rezaie 6bf3f5f911 MDL-72669 qtype_multianswer: Replace empty option with NBSP 2021-10-22 16:02:32 +11:00
Víctor Déniz 884bf887b2 Merge branch 'MDL-72607-fix_media_vimeo_url_parser' of https://github.com/praxisdigital/moodle into MOODLE_310_STABLE 2021-10-22 00:03:34 +01:00
Paul Holden d42c4f2fff MDL-72884 atto_image: improve svg support in editor dialogue.
Where the dimensions of an image are not present, we should use
sensible defaults so that the dialogue is still usable.
2021-10-21 23:58:37 +01:00
Paul Holden 08076fbff0 MDL-72743 mod_quiz: verify user mapping prior to restoring attempts. 2021-10-21 08:26:33 +01:00
Eloy Lafuente (stronk7) d277a76ec0 Merge branch 'MDL-72013-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-10-21 09:17:17 +02:00
Andrew Nicols aac3479ad8 Merge branch 'MDL-72507-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-10-21 13:00:32 +08:00
Andrew Nicols 04ce020099 MDL-72874 behat: Allow behat window sizes to be modified during run
In some situations it is useful to modify the requested screensize by a
modifier. This allows for failing tests to be rerun at a different
screensize, where the original screensize triggered a failure for some
size-related reason.
2021-10-21 10:26:16 +08:00
Andrew Nicols e7c219aa59 MDL-72013 js: Configure eslint-jsdoc plugin
This change adds configuration for the eslint-jsdoc plugin in order to
detect the following errors with jsdoc blocks:
* missing params
* params in incorrect order
* params with no type defined
* properties incorrectly defined
* incorrect use of @package
* incorrect values for @access

In addition, warnings will be thrown where indentation is incorrect.
2021-10-21 08:52:57 +08:00
Andrew Nicols bc301d0b55 MDL-72013 js: Add eslint-jsdoc plugin 2021-10-21 08:52:57 +08:00
Andrew Nicols e7f1069aa3 MDL-72013 js: Fix jsdocs to meet stricter eslint 2021-10-21 08:52:57 +08:00
Ilya Tregubov 8dbfccfaf4 Merge branch 'MDL-72639-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-10-20 13:01:36 +02:00
Eloy Lafuente (stronk7) 551584fdb5 Merge branch 'MDL-72849-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-10-19 22:17:23 +02:00
sam marshall 908175aa5a MDL-72849 tool_behat: Use of xpath name() not compatible with Firefox
The xpath name() function returns upper-case e.g. 'IMG' in Firefox and
lower-case e.g. 'img' in Chrome.
2021-10-19 13:50:49 +01:00
Ilya Tregubov 81c2310aec Merge branch 'MDL-71270-310' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-10-19 14:46:56 +02:00
Eloy Lafuente (stronk7) cce486dfc5 weekly release 3.10.7+ 2021-10-19 12:51:53 +02:00
Eloy Lafuente (stronk7) 84aa260b18 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-10-19 12:51:51 +02:00
Andrew Nicols e909b6ac53 MDL-71785 mod_quiz: Correct string as per reviewer feedback 2021-10-19 11:20:57 +08:00
Andrew Nicols d98071bad5 Merge branch 'MDL-71785_310' of https://github.com/StudiUM/moodle into MOODLE_310_STABLE 2021-10-19 11:20:55 +08:00
Sara Arjona d0e4af123c Merge branch 'MDL-72590-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-10-18 17:38:45 +02:00
Luca Bösch 1d5a547027 MDL-72590 enrol: Course in success message after unenroll passes filter 2021-10-18 16:38:19 +02:00
Sara Arjona 281b23d7d2 Merge branch 'MDL-72064-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-10-18 12:59:51 +02:00
Michael Hawkins 33a68275a3 MDL-71270 core: Updated security.txt expiry 2021-10-18 17:14:17 +08:00
Sam Møller 6b93cb6a3a MDL-72607 media_vimeo: Fix vimeo URL parser
Fix vimeo URL parser to support the new vimeo URL format with privacy
settings (the video with password or domain restricted setting).
For example "https://vimeo.com/123456789/2bffff0000" the plugin must
parse the URL "https://player.vimeo.com/video/123456789?h=2bffff0000"
to the iframe source to make it compatible with the new vimeo URL
format.
See more about vimeo video privacy settings at
https://vimeo.com/blog/post/video-privacy-explained/
2021-10-18 08:43:08 +02:00
Andrew Nicols 61e3074574 Merge branch 'MDL-65943-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-10-18 14:05:29 +08:00
Huong Nguyen 0df31d4324 MDL-65943 media_videojs: add videojs-ogvjs plugin
VideoJS now support to play Ogg Vorbis/Opus/Theora and WebM VP8/VP9/AV1 video on:
 - Safari on Mac OS
 - Safari on iPhone OS
 - Safari on iPad OS
2021-10-18 12:00:37 +07:00
AMOS bot 14b8cba9f3 Automatically generated installer lang files 2021-10-16 00:07:29 +00:00
Shamim Rezaie cede428cc4 weekly release 3.10.7+ 2021-10-16 00:29:25 +11:00
Shamim Rezaie 30837de74c Merge branch 'MDL-71344-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-10-15 14:27:42 +11:00
Jun Pataleta b26ee161cb Merge branch 'MDL-72623_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-10-15 09:47:03 +08:00
Jun Pataleta cc259e05d1 Merge branch 'MDL-72807_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-10-15 09:08:15 +08:00
Eloy Lafuente (stronk7) 3d207d282c Merge branch 'MDL-26633-310-workshopnumofreviews' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-10-14 22:41:02 +02:00
Eloy Lafuente (stronk7) d3b0abf253 Merge branch 'MDL-68325-310' of git://github.com/odeialba/moodle into MOODLE_310_STABLE 2021-10-14 22:19:40 +02:00
Eloy Lafuente (stronk7) 56297afaf4 Merge branch 'MDL-72464-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-10-14 22:02:36 +02:00
Eloy Lafuente (stronk7) 344ff84559 MDL-72807 behat: Add a few more @skip_chrome_zerosize tags
This is the 3rd round adding the tags to some scenarios
detected to be failing with zerosize problems lately.

Note that @ MDL-71108, the final solution will happen, say
switching to own webdriver till the upstream one is fixed
or whatever. Our @skip_chrome_zerosize solution is just a
workaround to have all those scenarios detected and ignored
by normal runs.
2021-10-14 16:17:20 +02:00
Eloy Lafuente (stronk7) ea0adf9302 MDL-72623 nodejs: Bump from v14.15.0 to v14.18.0
Without modifying any installed package or dependency
because, after trying to do so, the updated stuff is huge
and leads to some JS validation / minimisation problems.
2021-10-13 09:49:58 +02:00
Andrew Nicols 2805514fb4 weekly release 3.10.7+ 2021-10-13 09:40:53 +08:00
Andrew Nicols 1699daee3b Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-10-13 09:40:52 +08:00
AMOS bot 037c988ffa Automatically generated installer lang files 2021-10-13 00:07:21 +00:00
Víctor Déniz fc5b9dcd66 Merge branch 'MDL-72498-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-10-12 15:34:49 +08:00
Huong Nguyen b7adb5da3f MDL-71344 questions: Improve event handler for Drag n Drop family 2021-10-11 11:05:23 +07:00
Andrew Nicols c8530a1956 Merge branch 'MDL-66203-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-10-11 08:37:37 +08:00
Paul Holden fac4ab52e0 MDL-72639 admin: consistent primary buttons during site upgrade. 2021-10-10 20:43:26 +01:00
Paul Holden 9e1cc7c039 MDL-72498 report_eventlist: use core component API for event list.
The previous method of hardcoded filepaths, specifically for events
belonging to core, meant that any events belongs to core subsystems
were omitted (core_customfield, core_h5p, core_payment, etc).
2021-10-10 20:41:49 +01:00
Paul Holden 2163c70d1c MDL-72464 webservice: fix detection of non-expiring external tokens. 2021-10-10 20:40:47 +01:00
David Mudrák f5bb18e153 MDL-26633 workshop: Allow to randomly allocate more than 30 reviews
For classes with many students, there may be valid cases for having more
than 30 reviews per submission / reviewer.

The patch changes the type of the input field so that it can freely
editable to any integer value.
2021-10-08 17:35:43 +02:00
Sara Arjona 7cef80d284 weekly release 3.10.7+ 2021-10-08 12:43:24 +02:00
Sara Arjona 63f8c08bb6 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-10-08 12:43:23 +02:00
AMOS bot 571e9516b4 Automatically generated installer lang files 2021-10-08 00:07:23 +00:00
Víctor Déniz 815c4943fa Merge branch 'MOODLE_310_MDL-64576' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-10-07 22:28:24 +01:00
Eloy Lafuente (stronk7) 37cbcfabc3 Merge branch 'MDL-71306-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-10-07 23:10:17 +02:00
Eloy Lafuente (stronk7) 36f64e7023 Merge branch 'MDL-72674-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-10-07 22:54:14 +02:00
Eloy Lafuente (stronk7) 49e05ee653 Merge branch 'MDL-72309-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-10-07 22:43:05 +02:00
Eloy Lafuente (stronk7) dba8c123ad Merge branch 'MDL-72635-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-10-07 22:39:12 +02:00
Eloy Lafuente (stronk7) a2a370818d Merge branch 'MDL-72621-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-10-07 21:10:45 +02:00
AMOS bot be04192910 Automatically generated installer lang files 2021-10-07 00:07:21 +00:00
Jun Pataleta be71182f32 Merge branch 'MDL-72339-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-10-06 22:44:26 +08:00
sam marshall ca7b088d44 MDL-72339 core_availability: Unsafe to use format_string in description
The availability condition get_description method is called while
gathering data for the modinfo object. As such it is not safe to
call other functions which might rely on modinfo, such as format_string
(if using filters which access modinfo).

This change provides a mechanism to call format_string later, and also
a general callback to do other stuff later as well if needed. It uses
the same approach already taken to make activity names work correctly
in the availability_condition class.
2021-10-06 11:27:42 +01:00
Andrew Nicols ad360f54fd Merge branch 'MDL-72515-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-10-06 13:17:37 +08:00
Ilya Tregubov c1e2d9c2ff Merge branch 'MDL-72452-resource-filter-310' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE 2021-10-06 10:56:21 +07:00
Andrew Nicols fc79234d6d Merge branch 'MDL-72599-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-10-06 09:13:27 +08:00
Eloy Lafuente (stronk7) 278c3dfb4d weekly release 3.10.7+ 2021-10-06 00:24:55 +02:00
Ilya Tregubov 586d84ad0b Merge branch 'MDL-56773-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-10-05 23:32:54 +02:00
Jun Pataleta d92ed8b795 Merge branch 'MDL-39324-moodle310' of https://github.com/kiratskitizing/moodle into MOODLE_310_STABLE 2021-10-05 23:32:54 +02:00
Simey Lameze b7c34fb5e3 MDL-72635 calendar: fix typo in data attribute 2021-10-05 06:30:57 +08:00
Paul Holden a9046afce1 MDL-71306 cohort: ignore empty values in form autocomplete element. 2021-10-04 21:14:53 +01:00
Joshua Ebarvia 51e35ec47d MDL-39324 mod_url: Fix icon when URL has params 2021-10-04 20:02:02 +10:30
Marina Glancy 374717d6ec MDL-72515 admin: do not call curl unnecessary on plugins page 2021-10-04 10:01:18 +02:00
Paul Holden 56f275036b MDL-72309 course: make category a required field in forms.
Course category fields were changed en masse from simple select
elements to autocompletes in 93d72205, but weren't defined as
required fields. This could lead to exceptions and/or unexpected
behaviour if their values were cleared prior to form submission.
2021-10-04 08:11:47 +01:00
Mikhail Golenkov 3f128992d2 MDL-64576 completion: Fix criteria and course completion dates 2021-10-04 10:53:34 +11:00
Shamim Rezaie 85f18da71d MDL-66203 mod_assign: Reset submission status when removing a submission 2021-10-04 02:13:54 +11:00
Eloy Lafuente (stronk7) e57b280e00 weekly release 3.10.7+ 2021-10-02 22:05:17 +02:00
Eloy Lafuente (stronk7) 1c38736a13 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-10-02 22:05:16 +02:00
Eloy Lafuente (stronk7) 0009f62945 Merge branch 'MDL-72714_310' of git://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-10-02 15:29:53 +02:00
Eloy Lafuente (stronk7) e29998cf8e MDL-72714 behat: Add new @skip_chrome_zerosize labels
With the move from Chrome 93 to 94 a few new "zerosize" cases
have appeared, this just protect us from them, so they
are run apart.
2021-10-02 12:17:25 +02:00
Eloy Lafuente (stronk7) e2d9c69819 MDL-72714 behat: fix problem with button on the edge and failing
Surprise came with Chrome 94, so applying the usual trick by
changing window size. Hopefully some day we'll be able to
revert all them (Chrome 123).
2021-10-02 12:17:25 +02:00
abgreeve 3b8c9e1a99 Merge branch 'MDL-69682-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-10-01 11:27:09 +08:00
Jun Pataleta 2e9e4ca1df MDL-72674 core: Add indicator that feedback link opens in new window
* New pix icon i/externallink
* New lang string opensinnewwindow
* Use the external link pix icon with "Opens in new window" lang string
 as its alt text and add it to the "Give feedback about this software"
 link.
* Update cta template to indicate whether the link opens in new window.
2021-10-01 10:40:18 +08:00
Andrew Nicols b21aa1e011 Merge branch 'MDL-72673-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-10-01 10:24:09 +08:00
Eloy Lafuente (stronk7) a5a7b1d2c5 Merge branch 'MDL-72484-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-09-30 23:19:24 +02:00
Víctor Déniz 8645227c34 Merge branch 'MDL-72399_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-09-30 16:10:18 +01:00
Víctor Déniz d62f2e79b7 Merge branch 'MDL-72496-310_assert_tag' of https://github.com/call-learning/moodle into MOODLE_310_STABLE 2021-09-30 15:40:49 +01:00
Laurent David 5d5cd02239 MDL-72496 question tests: fix assertTag if tag not found
* The basic_test::assertTag method will issue a warning as $tag is not
found, failing the PHP Unit test that uses this method.
* Add tests to check that assertTag is working
2021-09-30 13:14:51 +02:00
Thong Bui f28abb53e0 MDL-72507 Quiz: Quiz auto-save does not detect uploaded files 2021-09-30 12:18:44 +07:00
abgreeve edafd88b34 Merge branch 'MDL-72275-310-2' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-09-30 10:08:26 +08:00
AMOS bot d126cf25ae Automatically generated installer lang files 2021-09-30 00:07:22 +00:00
Eloy Lafuente (stronk7) 0eeec9ead8 Merge branch 'MDL-71970-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-09-29 23:27:34 +02:00
Andrew Nicols 82d04b0144 MDL-72621 admin: Add environment check for admin deprecation 2021-09-29 22:39:32 +08:00
Shamim Rezaie 89e834ef1e Merge branch 'MDL-72060-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-09-28 20:13:41 +10:00
Adrian Perez 3399c49298 MDL-72060 mod_lti: fix comparison if user is gradable 2021-09-28 17:26:25 +08:00
AMOS bot 708943ec2e Automatically generated installer lang files 2021-09-28 00:07:29 +00:00
Paul Holden 88c1da303c MDL-72484 report_eventlist: looser check for event 'other' docs. 2021-09-27 18:21:27 +01:00
Sara Arjona 23fb47e2cf MDL-71970 h5plib_v124: Replace references to new Moodle\H5Pxxx namespace
The joubel/core and joubel/editor libraries have been moved to Moodle
namespace.
This commit adds the new namespace to the places where these classes
are used.
Besides, a couple of minor changes have been done to replace the _test.php
classname and remove some unnecessary defined('MOODLE_INTERNAL').
2021-09-27 11:43:37 +02:00
Sara Arjona f8cffbbf7e MDL-71970 h5plib_v124: Add namespace to H5P editor library
The joubel/editor is a third-party library. A namespace has been added to
avoid collision with other plugins using it (such as mod_hvp).
That way, they will be able to have a different version without
side effects.
2021-09-27 11:43:37 +02:00
Sara Arjona ae3066690c MDL-71970 h5plib_v124: Add namespace to H5P core library
The joubel/core is a third-party library. A namespace has been added to
avoid collision with other plugins using it (such as mod_hvp).
That way, they will be able to have a different version without
side effects.
2021-09-27 11:43:37 +02:00
Jun Pataleta d09bbc9f14 MDL-72673 mod_glossary: Generate unique ID for Keywords select element 2021-09-24 18:31:34 +08:00
Paul Holden 9a0e343654 MDL-69682 theme_boost: remove minimum height of tables.
The change that introduced this property (a3124b15) is no longer
required, and it caused visual glitches on tables containing a
single row.
2021-09-24 08:22:52 +01:00
Michael Hawkins 0f65d529fd MDL-72275 timeline: Add default offset to template
This value was being passed in the template, but the template
had 0 hardcoded instead of injecting the context value. With the other
bug fixes in this issue correctly loading the "All" view properly on
page load, this uncovered that at load time, the course view would not
load overdue items, which also meant a behat test was failing.
2021-09-24 11:24:49 +08:00
Michael Hawkins e65db9fe04 MDL-72275 timeline: Make time dropdown options display consistently
The 6 month option was highlighted on load if previously selected,
which was not the case for any other options. This has been removed
so it behaves consistently.
2021-09-24 11:24:49 +08:00
Michael Hawkins 1b29aea633 MDL-72275 timeline: Fixed non-loading issue in dates sort
Incorrect setting/getting of the "seen" data attribute resulted in no
information being fetched when switching from course view back to dates
view.
2021-09-24 11:24:49 +08:00
Michael Hawkins dcf2239198 MDL-72275 timeline: Display "all" time on page load fix
When the timeframe filter was set to "all" when the timeline
block was initially loaded, an incorrect value rendered into
the template meant the timeframe limit was set to 0 (which will
return no results) instead of setting no limit (which would fetch all
 action events, as intended).
2021-09-24 11:24:49 +08:00
AMOS bot 83b6ed8fd1 Automatically generated installer lang files 2021-09-24 00:07:28 +00:00
Eloy Lafuente (stronk7) 9675c9e914 MDL-72399 GHA: Go back to use upstream igbinary extension
With igbinary >=3.2.6 already built, see

https://launchpad.net/~ondrej/+archive/ubuntu/php/+packages?field.name_filter=igbinary&field.status_filter=published

We can revert the temporal workaround applied few weeks ago (that
sometimes is failing). So this is a simple revert of the original commit.

Revert "MDL-72312 GHA: Force use of igbinary working version"

This reverts commit ced1550177.
2021-09-23 19:37:55 +02:00
Ilya Tregubov 0360329c46 weekly release 3.10.7+ 2021-09-23 18:21:54 +02:00
Ilya Tregubov d9dfcb86a3 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-09-23 18:21:54 +02:00
Jun Pataleta 3ee6448d1d Merge branch 'MDL-72426-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-09-23 12:24:00 +08:00
Thong Bui 5e8baa62f3 MDL-71750 File upload: Disable submittion when uploading multiple files 2021-09-23 09:13:02 +07:00
AMOS bot 9a2ab7641a Automatically generated installer lang files 2021-09-23 00:07:24 +00:00
Eloy Lafuente (stronk7) f0b48631c1 Merge branch 'MDL-72110-310' of https://github.com/sharidas/moodle into MOODLE_310_STABLE 2021-09-22 20:12:27 +02:00
Eloy Lafuente (stronk7) 7268b98f0d Merge branch 'MDL-72593-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-09-22 10:48:28 +02:00
Jun Pataleta 63706d6044 Merge branch 'MDL-51165-moodle310' of https://github.com/kiratskitizing/moodle into MOODLE_310_STABLE 2021-09-22 10:51:52 +08:00
AMOS bot 0ca10e3942 Automatically generated installer lang files 2021-09-22 00:07:25 +00:00
Eloy Lafuente (stronk7) fdfbf416b3 Merge branch 'MDL-71352-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-09-21 23:19:47 +02:00
Eloy Lafuente (stronk7) 70d5ba992d Merge branch 'MDL-69364-310-alt' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-09-21 18:19:43 +02:00
Andrew Nicols 24d9c5e6ce MDL-72593 behat: Improve behat handling of file manager buttons
When using a try/catch for a find if the first match is not met then we
have an implicit 6 second delay waiting for the search to time out.

We can avoid this by combining the searches in a comma-separated
selection.

I have also taken the opportunity to convert the use of ->click() to the
i_click_on function which has the benefit of supporting wait for
pendingJS.
2021-09-21 16:00:50 +08:00
Andrew Nicols 3d82fe756c MDL-72593 behat: Load the Field node content locally for processing
The standard NodeElement functions for getAttribute, getTagName,
getParent, and friends go back to WebDriver and parse the DOM for each
request. This is insanely slow per request, and in the case of forms we
do a lot of checking to determine the field type.

This change modifies the form field detection to copy the entire node
content into a DOMDocument and parse the document locally.

This is significantly faster - in some cases where there are large
documents minutes faster.

I believe that this should be a safe change as the document fetched from
the browser is normalised to match the doctype specified.
2021-09-21 16:00:49 +08:00
Andrew Nicols 4d5b16b22b MDL-69364 enrol: Improve setting of save button 2021-09-20 12:07:58 +08:00
Andrew Nicols 871ee28e3b MDL-69364 enrol: Improve cohort test 2021-09-20 12:07:58 +08:00
Joshua Ebarvia 843988882f MDL-51165 mod_url: allow directory index url direct access 2021-09-19 12:07:28 +09:30
Marie-Eve Lévesque f2c42a1fe3 MDL-71785 core_quiz: Empty quiz section name behaves like new page 2021-09-17 11:32:52 -04:00
Paul Holden 8825279be6 MDL-72599 blocks: handle editing/deletion on admin notification page.
This was broken by changes in fdd5aef0, as the sesskey URL parameter
was required on admin/index.php in order for block related actions
to be performed uninterrupted by any redirections.
2021-09-17 12:21:54 +01:00
Luca Bösch e3958e5a8c MDL-71352 gradereport_grader: Add icons for pass/fail. 2021-09-17 12:12:29 +02:00
Ilya Tregubov 41cfb8996a weekly release 3.10.7+ 2021-09-17 08:58:36 +02:00
Ilya Tregubov 0ccf676b79 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-09-17 08:58:35 +02:00
Ilya Tregubov 5ee956d6c9 Merge branch 'MDL-72173-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-09-16 15:02:17 +02:00
Andrew Nicols eacfa23bcc MDL-72173 behat: Respect login page preference 2021-09-16 20:47:18 +08:00
Jun Pataleta 5f644ae3ad Merge branch 'MDL-72173-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-09-16 15:39:56 +08:00
Andrew Nicols 5e2b248b20 MDL-72173 behat: Fix typo Logout <> Log out 2021-09-16 15:03:07 +08:00
Jun Pataleta 52cfb19f05 Merge branch 'MDL-71602-310-2' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-09-16 12:57:41 +08:00
Jun Pataleta 4619f8c4d0 Merge branch 'MDL-72173-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-09-16 12:23:03 +08:00
Andrew Nicols a4e338dd60 MDL-72173 behat: Add tests for login/logout steps 2021-09-16 12:20:37 +08:00
Andrew Nicols fe0af7ad54 MDL-72173 behat: Automatically log user out on behat login 2021-09-16 12:13:26 +08:00
Andrew Nicols f9888aca4e MDL-72173 behat: Add and use behat logout URL 2021-09-16 12:13:26 +08:00
Jake Dallimore 877288e0c1 Merge branch 'MDL-71860-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-09-16 11:03:20 +08:00
Jun Pataleta b0835ce1d4 Merge branch 'MDL-72589_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-09-16 09:46:42 +08:00
AMOS bot 1acba692e3 Automatically generated installer lang files 2021-09-16 00:07:24 +00:00
Leon Stringer 2a785a209a MDL-71860 core: Migrate lang string
Corresponding move of language string invalidpersistenterror following
move of class invalid_persistent_exception in MDL-57273.

AMOS BEGIN
 CPY [invalidpersistenterror,core_competencies],[invalidpersistenterror,core_error]
AMOS END
2021-09-16 07:01:42 +08:00
Eloy Lafuente (stronk7) 5923a1baaa Merge branch 'MDL-72432-MOODLE_310_STABLE' of https://github.com/katerynadegtyariova/moodle into MOODLE_310_STABLE 2021-09-16 00:37:29 +02:00
Eloy Lafuente (stronk7) cfbefac189 MDL-72589 behat: Create course with 3 sections (workaround)
With the default 5 sections course, after editing the activities, the
"log out" link is exactly on the edge of the view port. It's one of
those cases where Chrome fails to click/press it (have tried both).

So just make the course to have 3 sections is enough to avoid the
problem. Some day Chrome will fix that problem but, until then...
we cannot do much apart from changing the window size or try to
configure things to show differently.
2021-09-15 20:28:31 +02:00
Eloy Lafuente (stronk7) 905741ee47 MDL-72589 behat: Add @skip_chrome_zerosize to failing scenarios
All the scenarios failing with Chrome zero-size errors are
getting the @skip_chrome_zerosize to be able to keep them apart from
regular runs. See MDL-71108 for more information about
that error.

They will be run by another job, specifically using that tag to
keep them failing and under control.
2021-09-15 20:28:26 +02:00
Jake Dallimore 9fbff304da Merge branch 'MDL-71550-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2021-09-15 10:50:01 +08:00
Jake Dallimore 548b2e7921 Merge branch 'MDL-71137-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-09-15 10:12:30 +08:00
Eloy Lafuente (stronk7) 8cadc4dcca Merge branch '71093-moodle310-backup-honor-formatstringstriptags' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_310_STABLE 2021-09-14 22:22:28 +02:00
Eloy Lafuente (stronk7) 248c791132 Merge branch 'MDL-72192-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-09-14 22:17:41 +02:00
Ilya Tregubov 7326bc1246 Merge branch 'MDL-71961-310' of git://github.com/nguyenphuctien/moodle into MOODLE_310_STABLE 2021-09-14 12:09:37 +02:00
Ilya Tregubov a81035a211 Merge branch 'MDL-71846-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-09-13 13:44:41 +02:00
Tien Nguyen da619ac46f MDL-71961 Quiz: Disable quiz navigation buttons when files are uploading 2021-09-13 17:42:33 +07:00
Odei Alba 4c1894aa97 MDL-68325 completion: Add validation to course completion form 2021-09-13 12:12:53 +02:00
Andrew Nicols 07e69d234e MDL-72173 behat: Switch to behat login URL 2021-09-13 11:20:35 +08:00
gthomas2 5fad08121e MDL-72173 behat: Add alternative login file for behat 2021-09-13 11:14:02 +08:00
Eloy Lafuente (stronk7) 5af6e79b38 Moodle release 3.10.7 2021-09-12 12:37:31 +02:00
Eloy Lafuente (stronk7) afa3c2a13f weekly release 3.10.6+ 2021-09-11 12:12:23 +02:00
Eloy Lafuente (stronk7) 10e6791ee0 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-09-11 12:12:21 +02:00
Shamim Rezaie 194b964dc5 MDL-71240 filter_tex: Add allowlist for filter_tex_sanitize_formula 2021-09-10 18:10:26 +02:00
Eloy Lafuente (stronk7) 3d94d6fb6a Merge branch 'MDL-71385-310-3' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-09-09 13:01:37 +02:00
Eloy Lafuente (stronk7) 83e94a25cf Merge branch 'MDL-63207-310' of git://github.com/cescobedo/moodle into MOODLE_310_STABLE 2021-09-09 13:01:37 +02:00
Eloy Lafuente (stronk7) 60a4c78f98 Merge branch 'MDL-69855-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-09-09 13:01:37 +02:00
Jun Pataleta 0095f26934 MDL-71385 theme: Fix contrast for dimmed text against striped table rows
In order to achieve good colour contrast between dimmed text and striped
table rows, the background colour of the striped rows are being
lightened to 0.03 alpha. While $gray-600 is being adjusted to a bit
darker shade of #6a737b. This gives a colour contrast ratio of 4.5:1
between the dimmed text colour and the striped table row background
which meets WCAG 2.1 Level AA requirements.

Comparing the normal font colour (#212529) with the adjusted dimmed text
colour gives a contrast ratio of 3.20:1 which meets WCAG 2.1 Level AA
requirements and still makes them distinguishable from one another.
2021-09-09 16:02:58 +08:00
AMOS bot 18678fc78e Automatically generated installer lang files 2021-09-09 00:07:22 +00:00
Eloy Lafuente (stronk7) b5366af358 Merge branch 'MDL-72216-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-09-08 11:29:16 +02:00
Eloy Lafuente (stronk7) 90e0a2c746 Merge branch 'MDL-72499-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-09-07 23:52:09 +02:00
Eloy Lafuente (stronk7) 45a7e77e6c Merge branch 'MDL-72071-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-09-07 23:30:04 +02:00
Eloy Lafuente (stronk7) 0110d5a4ad Merge branch 'MDL-72488-310-importdatastring' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-09-07 23:00:23 +02:00
cescobedo f01cff47d2 MDL-63207 auth_ldap: Update user profile if field is empty 2021-09-07 22:57:02 +02:00
Eloy Lafuente (stronk7) 83b771c9be Merge branch 'MDL-69504-310' of https://github.com/snake/moodle into MOODLE_310_STABLE 2021-09-07 20:04:22 +02:00
Eloy Lafuente (stronk7) a85148d645 Merge branch 'MDL-67610-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-09-07 19:25:35 +02:00
Jun Pataleta d65f46103a MDL-67610 mod_forum: Do not include private replies in unread count
Fetching the counts of unread posts should only include unread regular
posts or unread private reply posts directed to the user unless the user
has the capability to read private replies.
In order to retrieve the correct counts, we also need to loop through
each forum instance in the course to check the capability of the user to
read private replies in each forum.
2021-09-07 23:20:33 +08:00
AMOS bot 98679b981c Automatically generated installer lang files 2021-09-07 00:07:23 +00:00
Paul Holden ec4c5a0e35 MDL-71726 course: respect user access when exporting participants.
We should ensure that users being exported are enrolled on the
course being exported from. In courses where the current user can't
access all groups we should ensure that users being exported belong
to the same groups as them.
2021-09-07 00:14:39 +02:00
Sujith Haridasan 4ffc17be15 MDL-71160 auth_db: Use strict comaprison
Use strict comparison to avoid type juggling.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-09-07 00:14:39 +02:00
Paul Holden e2b3d5fec5 MDL-71976 auth_shibboleth: consistent session parsing during logout. 2021-09-07 00:14:39 +02:00
Shamim Rezaie 1b6f1756f6 MDL-71240 filter_tex: Sanitize the whole latex document
LaTeX documents have a preamble section and admins can use a \newcommand
statement to define new commands there (or to give an alias to another
command). This commit makes sure no blocked command can escape
sanitization by being used in a new seemingly harmless command that is
defined in the LaTeX preamble.
2021-09-07 00:14:39 +02:00
Shamim Rezaie cd7fa2e513 MDL-71240 filter_tex: Support paranoid mode for openin_any in latex 2021-09-07 00:14:39 +02:00
Huong Nguyen 0cd2cbccfb MDL-71797 quiz: Improve the checks when fetching user's attempts 2021-09-07 00:14:39 +02:00
Eloy Lafuente (stronk7) c05d2669bd Merge branch 'MDL-72286-310-test' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-09-06 23:58:25 +02:00
David Mudrák c755938aa3 MDL-72488 lang: Fix hard-coded English string at grades import form
Also adding a help tooltip as this seems to be the most important field
in the form and yet it was the only one without a help.
2021-09-06 17:41:50 +02:00
Paul Holden 55deada25a MDL-72499 event: add/correct event language strings as required. 2021-09-06 11:16:45 +01:00
Thong Bui 75eff1bf89 MDL-71137 File upload: progress bar issues display when D&D multi files 2021-09-06 14:12:51 +07:00
Eloy Lafuente (stronk7) 536876611d Merge branch 'MDL-72428-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-09-03 19:10:45 +02:00
Eloy Lafuente (stronk7) 7aded627d8 Merge branch 'MDL-72478-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-09-03 17:03:19 +02:00
Shamim Rezaie aa7bc64c05 MDL-56773 atto_equation: The equation editor should always be rtl
Also re-applied the border that was added to the preview area as part of
MDL-44778. The class name that's used no longer exists.
2021-09-03 17:58:49 +10:00
Sara Arjona 9fa81da1f2 MDL-72478 calendar: Fix PHPUnit failure with offset
Before PHP 8.0.10, the time is lost when datetime->modify() is used
with weekdays. However, with PHP 8.0.10, the time is kept.
In consequence, the test_yearly_every_20th_monday_forever method
started failing.
For fixing it, the offset has been removed and the time has been set
to 00:00, so the behaviour will be the same regardless the PHP
version.
2021-09-03 09:35:00 +02:00
Simey Lameze 3ae9fb6a95 MDL-72426 theme: fix message and notification count colour contrast 2021-09-03 12:26:45 +08:00
Peter Burnett 96d14175e4 MDL-72452 resource: Filter resource media embed output 2021-09-03 09:30:13 +10:00
Luca Bösch 4a47a0a0d6 MDL-72216 questions: Don't stick buttons together in preview. 2021-09-02 13:35:45 +02:00
Sara Arjona 3e6900105a weekly release 3.10.6+ 2021-09-02 11:51:27 +02:00
Jun Pataleta cf687ae49f Merge branch 'MDL-72440_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-09-02 09:52:11 +08:00
David Mudrák 2cce6c76af MDL-72428 lang: Use the fixed strings in the tests 2021-09-01 22:04:58 +02:00
Helen Foster 32b25556e1 MDL-72428 lang: Import fixed English strings (en_fix) 2021-09-01 22:04:04 +02:00
Sara Arjona 8d0457447a Merge branch 'MDL-72169-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-09-01 17:46:52 +02:00
Sara Arjona cfb69b6578 Merge branch 'MDL-71375-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-09-01 17:09:39 +02:00
Sara Arjona 54d1702e97 Merge branch 'MDL-70376-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-09-01 16:52:14 +02:00
Sara Arjona 87cf2ed706 Merge branch 'MDL-71674-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-09-01 11:36:47 +02:00
Dongsheng Cai 1da0e42f0f MDL-71674 editor_atto: more assessible errors 2021-09-01 18:35:59 +10:00
Eloy Lafuente (stronk7) a7733c35b4 Merge branch 'MDL-71999-310' of https://github.com/danielneis/moodle into MOODLE_310_STABLE 2021-08-31 23:16:24 +02:00
Eloy Lafuente (stronk7) adcfb52c1e Merge branch 'MDL-71121-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-31 23:13:15 +02:00
Jun Pataleta b7d4a858f4 Merge branch 'MDL-71778-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-08-31 22:58:29 +08:00
Paul Holden 4dc7f8e76e MDL-72296 admin: style form when prompting for upgrade key. 2021-08-31 13:53:03 +02:00
Paul Holden 24d4dacf1f MDL-72192 user: observe fullname capability in selector context. 2021-08-31 12:17:08 +01:00
Paul Holden a4d85aa8d7 MDL-71846 group: consistent escaping of user/group names. 2021-08-31 12:15:58 +01:00
Paul Holden c3be0cca40 MDL-72071 message: preserve window scroll opening processor modal. 2021-08-31 11:57:15 +01:00
Paul Holden 63fea60126 MDL-72169 privacy: format course name/summary during export. 2021-08-31 11:56:12 +01:00
Eloy Lafuente (stronk7) 12026abb03 MDL-72440 js: reconcile npm installed stuff
When npm-shrinkwrap.json was regenerated few days ago by MDL-72014
running audit-fix on it, it seems that some checksums in the "lodash"
package were missing.

Now they are properly set and that's leading to npm-shrinkwrap.json
changes when people runs npm install (note npm ci is the recommended
way to install all the dev dependencies).

So, just reconcile the file to include the new checksums.
2021-08-31 11:21:16 +02:00
cperves e9e2d3188a MDL-71778 admin: patch for hard-set check filter 2021-08-31 12:34:42 +08:00
Peter Dias a290e721e3 MDL-70376 mod_assign: Reintroduce pdf orientation check
Reintroduce the orientation check and sizing when importing an image
2021-08-31 12:29:27 +08:00
Jake Dallimore 465120ed76 Merge branch 'MDL-70433-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-08-30 10:42:36 +08:00
Simeon Naydenov 40adf6defd MDL-71375 lib: Fix tooltip in show_hide_icon in flexible table 2021-08-30 09:42:39 +08:00
Luca Bösch dab7b02b86 MDL-70433 grades: prevent double escaping in titles 2021-08-27 10:55:53 +02:00
Andrew Nicols 6259988cb6 weekly release 3.10.6+ 2021-08-27 12:00:24 +08:00
Andrew Nicols 0c1e6cc4b3 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-08-27 12:00:23 +08:00
Sujith Haridasan 9f96657f4c MDL-72110 core_navigation: home page preference
Admin should respect the home page preference set
just like any other user.
2021-08-27 07:31:23 +05:30
Sara Arjona 14f831490a Merge branch 'MDL-71029-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-08-26 07:12:35 +02:00
Andrew Nicols 38cf23f98f Merge branch 'MDL-72403-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-08-26 13:02:27 +08:00
Heena Agheda e8bdb79b95 MDL-72187 logstore: record log store's visibility change 2021-08-26 12:57:15 +08:00
Andrew Nicols 36ef1de379 Merge branch 'MDL-70176_310' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-08-26 12:16:44 +08:00
Andrew Nicols c651c43de9 Merge branch 'MDL-72271_310' of https://github.com/larsbonczek/moodle into MOODLE_310_STABLE 2021-08-26 11:45:38 +08:00
Andrew Nicols 6c4be982c2 Merge branch 'MDL-72152-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-08-26 11:36:25 +08:00
Andrew Nicols ea67397163 Merge branch 'MDL-72153-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-26 11:32:13 +08:00
Andrew Nicols 554958612b Merge branch 'MDL-72312_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-08-26 11:26:54 +08:00
AMOS bot 528df7870c Automatically generated installer lang files 2021-08-26 00:07:26 +00:00
Sara Arjona d56f16671d Merge branch 'MDL-72106-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-25 18:38:45 +02:00
Eloy Lafuente (stronk7) 3c5ce312d3 Merge branch 'MDL-72163-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-08-24 20:12:39 +02:00
Sara Arjona 5ee12998e4 Merge branch '310_MDL-70006' of git://github.com/danmarsden/moodle into MOODLE_310_STABLE 2021-08-24 13:13:21 +02:00
Shamim Rezaie 194379a0f8 MDL-72403 calendar: prereserve courseid after form submit 2021-08-24 18:05:12 +10:00
Jake Dallimore 3c64ea8d3c MDL-69504 mod_lti: check role switches when setting lti roles on launch
is_siteadmin isn't aware of role switches, so make sure we're not in a
switched role before calling that method.
2021-08-24 14:35:16 +08:00
Andrew Nicols 5b3b01f1c4 Merge branch 'MDL-72014_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-08-24 09:17:05 +08:00
Andrew Nicols f5708eee2c Merge branch 'MDL-72207-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2021-08-24 09:10:07 +08:00
Kateryna Degtyariova 33abdf813b MDL-72342 groups: Use get_columns() to handle BOM in CSV
Ensuring that BOM was properly removed from input CSV file by using get_columns() instead of parsing the raw data.
2021-08-24 10:45:51 +10:00
Eloy Lafuente (stronk7) 2e7f57f975 Merge branch 'MDL-71055-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-08-23 23:22:40 +02:00
Sara Arjona 5666d8e792 Merge branch 'MDL-72257-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-23 17:52:33 +02:00
Shamim Rezaie 6227246c3f MDL-71602 qtype_essay: label essay question's answer area 2021-08-24 01:06:34 +10:00
Eloy Lafuente (stronk7) 525b10b861 MDL-72312 environment: Add new optional custom check for igbinary
This optional environmental check will look if:

- the site is running php72.
- the site has igbinary extension enabled.
- the igbinary extension version is a buggy one >=3.2.2 <= 3.2.4
- the bug is reproducible.

And will warn if all the conditions are met.
2021-08-23 15:51:57 +02:00
Eloy Lafuente (stronk7) ced1550177 MDL-72312 GHA: Force use of igbinary working version
And also remove memcached and redis that have dependencies on it.

Versions 3.2.2 - 3.2.4 have a bug returning
arrays with index messed up. This affects
key() and next() operations when reading
information serialised with igbinary.

Notably Moodle's MUC uses igbinary when
available and was leading to some wrong
operations and test failures.

Once a fixed version is used by GHA this
can be reverted. See MDL-72399.

Note this only affects to php72, newer php
versions are not affected.
2021-08-23 15:51:22 +02:00
Andrew Nicols 30de8275c0 MDL-71055 behat: Update core settings to use generator
These changes have only been applied to settings which were already
using settings names and values, but which were still using the UI.
2021-08-23 12:23:03 +08:00
Eloy Lafuente (stronk7) bfaeecb183 Merge branch 'MDL-71973-310' of https://github.com/mohalisad/moodle into MOODLE_310_STABLE 2021-08-20 19:06:47 +02:00
Eloy Lafuente (stronk7) c5be7c53c6 MDL-72014 nodejs: audit fix to solve some security reports
Simply run npm audit fix that updates these main packages:

- xmldom 0.6.0
- grunt 1.4.1
- gherkin-lint 4.2.2

(and also a bunch of dependencies)
2021-08-20 13:49:56 +02:00
Ilya Tregubov 65b6e86406 weekly release 3.10.6+ 2021-08-20 13:24:35 +02:00
Ilya Tregubov 029e68e619 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-08-20 13:24:35 +02:00
Tomo Tsuyuki add4186322 MDL-70176 mod_forum: Grading respects separate groups filter 2021-08-20 13:36:28 +10:00
Ilya Tregubov bf0795c567 MDL-49202 core: Comment broken test.
Should be fixed properly as part of MDL-72377.
2021-08-19 17:20:48 +02:00
Ilya Tregubov 7c749fba9c Merge branch 'MDL-49202_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-08-19 17:17:04 +02:00
Mark Nelson bbe8be25fc MDL-49202 core: fix failing unit tests
See MDL-72377.
2021-08-19 20:15:59 +08:00
Mark Nelson 4527f760ea MDL-49202 core_grades: add Behat tests 2021-08-19 20:15:59 +08:00
Juan Leyva bfc0fabe44 MDL-72207 assign: Support all participants in get_submission_status WS 2021-08-19 14:12:08 +02:00
Mark Nelson 10963bad39 MDL-49202 core_grades: perform same action on categories in form
When you click on 'Edit' then 'Hide' on a grade item like a course category
that contains many grade items, the course and the grade items are set to
hidden. However, if you use the 'hidden' option on the 'Edit settings'
page it only hides that item and none of the items (assignment etc)
under that course category. We want them to be consistent.
2021-08-19 17:44:11 +08:00
Mark Nelson 1ae7e18d55 MDL-49202 core_grades: perform same action on items in form
When you click on 'Edit' then 'Hide' on a grade item like an
assignment it also hides the grades. However, If you use the
'hidden' option on the 'Edit settings' page it just hides that
item and doesn't hide grades as well. We want them to be
consistent.
2021-08-19 17:44:11 +08:00
Julien Boulen 6c661edffb MDL-71093 backup: fix backup when activity names use HTML tags 2021-08-19 11:24:21 +02:00
Thong Bui 53446defe6 MDL-72064 Questions: response selection area enough 2021-08-19 14:52:17 +07:00
Bas Brands d7ebcac861 MDL-71550 theme_boost: improve dropdown hover styles 2021-08-19 09:17:27 +02:00
Andrew Nicols 67284dfc05 Merge branch 'MDL-72282-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-08-19 11:15:28 +08:00
Andrew Nicols 28d9031e44 Merge branch 'MDL-68639-3.10' of https://github.com/xcaro/moodle into MOODLE_310_STABLE 2021-08-19 10:07:41 +08:00
Eloy Lafuente (stronk7) ddcd34612f Merge branch 'MDL-72206-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-08-18 19:32:47 +02:00
Andrew Nicols 43cc0d43f7 Merge branch 'MDL-69451-shared-temptables-3.10' of https://github.com/srdjan-catalyst/moodle into MOODLE_310_STABLE 2021-08-18 21:41:09 +08:00
Víctor Déniz cbe888148d Merge branch 'MOODLE_310_MDL-72239-v2' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-08-18 13:57:54 +01:00
Mikhail Golenkov a4f657d846 MDL-72239 phpunit: Assert the number of db queries to be less or equal
The course unit test assumes the number of db call. This assumption
is correct in vanilla moodle only. Once some plugins installed their
observers may do extra db calls. Due to caching the number of actual
db calls in the unit test may be fewer.
2021-08-18 21:35:38 +10:00
Víctor Déniz f6f0f5bb6a Merge branch 'MDL-71487-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-18 09:55:04 +01:00
AMOS bot aea79216ce Automatically generated installer lang files 2021-08-18 00:07:22 +00:00
Nhan Vo 26420f609a MDL-68639 HTML Editor (Atto): Invalid HTML for nested lists 2021-08-18 04:16:21 +07:00
Dongsheng Cai 1b35161c37 MDL-72282 accessibility: update tree attributes to pass a11y check
- Move aria-* atrributes from <p> to <li>
- Move "role" attribute from <p> to <li>
- Update behat tests

Based on reference implementation from:
- https://www.w3.org/TR/wai-aria-practices-1.1/examples/treeview/treeview-2/treeview-2a.html
- https://www.w3.org/WAI/GL/wiki/Using_ARIA_trees
2021-08-17 16:28:00 +10:00
Dongsheng Cai 55eddd9989 MDL-72282 accessibility: update color to increase contrast 2021-08-17 16:27:06 +10:00
Frédéric Massart 78a5927d4d MDL-72286 editor_atto: Declare type on plugins button groups 2021-08-17 12:00:33 +10:00
Ilya Tregubov 350b022f8d Merge branch 'MDL-71814-310' of git://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-08-16 13:57:34 +02:00
Jun Pataleta 0548156a3f MDL-69855 mod_forum: Don't show reply link in email for private replies 2021-08-16 17:46:25 +08:00
Thach Le Huy 16d8b84472 MDL-71814 Atto: File picker – file info panel focus issue 2021-08-16 16:37:01 +07:00
AMOS bot 45429deb00 Automatically generated installer lang files 2021-08-14 00:07:22 +00:00
Paul Holden 1d3aa1b798 MDL-72153 privacy: correctly export user description/files. 2021-08-13 12:40:52 +01:00
Ilya Tregubov f88c85056c Merge branch 'MDL-72035-excel_csv_bom-310' of git://github.com/leonstr/moodle into MOODLE_310_STABLE 2021-08-13 11:25:58 +02:00
Jun Pataleta a393c543e1 Merge branch 'MDL-72330-310' of git://github.com/vmdef/moodle into MOODLE_310_STABLE 2021-08-13 11:00:55 +08:00
Andrew Nicols 90638ef08f Merge branch 'MDL-72325-310-tourspolicy' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-08-13 10:01:42 +08:00
Víctor Déniz a7dba247cf MDL-72330 behat: revert previous incorrect change 2021-08-13 00:02:50 +01:00
Ilya Tregubov fa2e1ed7ec weekly release 3.10.6+ 2021-08-12 16:50:19 +02:00
Ilya Tregubov f98d542d0d Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-08-12 16:50:19 +02:00
David Mudrák 41d2fb93c8 MDL-72325 user: Do not show user tours without site policy agreed
Fetching user tours used to fail on external_api::validate_context() and
require_login() calls if the user did not have the site policy agreed.

The patch introduces a check to see if the user is fully set up and
ready to use the site before attempting to load the tours.
2021-08-12 13:26:47 +02:00
Víctor Déniz cdcf1e7ee3 MDL-71500 calendar_threemonth: fix wrong behat step 2021-08-12 11:43:06 +01:00
Andrew Nicols d7da1d28a7 Merge branch 'MDL-72252-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-12 10:27:16 +08:00
Andrew Nicols 824cb06df8 Merge branch 'MDL-71844-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-12 10:25:47 +08:00
Eloy Lafuente (stronk7) e246c8b7da Merge branch 'MDL-72265_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-08-12 00:05:53 +02:00
Eloy Lafuente (stronk7) ede634df91 Merge branch 'MDL-71500-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-08-11 20:17:43 +02:00
Eloy Lafuente (stronk7) 4c690bb1cf Merge branch 'MDL-71945-M310S' of https://github.com/lucisgit/moodle into MOODLE_310_STABLE 2021-08-11 11:47:18 +02:00
Eloy Lafuente (stronk7) de211d92c7 Merge branch 'MDL-72242-310-svgforcedfilter' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-08-11 11:40:18 +02:00
Eloy Lafuente (stronk7) 8389fcb9fc Merge branch 'MDL-71656-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-08-10 19:09:50 +02:00
Eloy Lafuente (stronk7) fb03c9640d Merge branch 'MDL-70165-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-10 18:53:24 +02:00
Ilya Tregubov 6ee1ffa200 Merge branch 'MDL-72033-310' of git://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-08-10 16:09:35 +02:00
Tony Butler 025e5e9970 MDL-71945 mod_assign: Remove unneccesary call to assign_update_grades()
The update_grade() call achieves the same thing with additional checks.
2021-08-10 11:08:38 +01:00
Lars Bonczek 1148377a5c MDL-72271 mod_quiz: fix secure_window close function 2021-08-10 11:54:11 +02:00
Paul Holden 5b30467894 MDL-72106 calendar: redirect to same page post-subscription process.
Avoid issues when reloading page/re-sending POST data.
2021-08-10 09:41:01 +01:00
Paul Holden 21df5bc50e MDL-71844 tool_task: preserve navigation when executing task. 2021-08-09 10:45:00 +01:00
Paul Holden a23c3e4507 MDL-71487 admin: ensure filesize settings don't overflow integer. 2021-08-09 10:35:57 +01:00
Paul Holden 2833bafefb MDL-70165 course: always import inplace editable module.
It's required on the course participants table for the roles/groups
columns, but isn't always loaded after adding the first participant.
2021-08-09 10:30:06 +01:00
AMOS bot 98c3a5912f Automatically generated installer lang files 2021-08-06 00:07:24 +00:00
Srdjan 93f70c9d9d MDL-69451 dml: use same temptables for both rw and ro database handle
moodle_read_slave_trait: when creating another handle, restore temptables
property that is clobbered by raw_connect().

Also a better condition for temptable related queries detection in
pgsql_native_moodle_database.

dml_pgsql_read_slave_test::test_temp_table(): use real db connection
if possible, otherwise skip the test.
2021-08-06 10:02:08 +10:00
Tim Hunt 94026281ed MDL-72265 backup: fix checking of override capabilites on restore
Thanks to Peter Dias <peter@moodle.com> for his help with the unit test.
2021-08-05 17:01:02 +01:00
Víctor Déniz 3a3060a08e weekly release 3.10.6+ 2021-08-05 16:27:30 +01:00
Víctor Déniz 7ee56a2016 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-08-05 16:27:29 +01:00
Víctor Déniz e4640f986d Merge branch 'MDL-71835-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-04 23:32:25 +01:00
Víctor Déniz 27603ce747 Merge branch 'MDL-71152-310' of git://github.com/roland04/moodle into MOODLE_310_STABLE 2021-08-04 20:38:10 +01:00
Víctor Déniz 5443767af6 Merge branch 'MDL-72262-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-08-04 12:44:35 +01:00
abgreeve b597ecfbcd Merge branch 'MDL-71050-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-04 15:51:28 +08:00
abgreeve 811e47e0b4 Merge branch 'MDL-67833-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-08-03 10:24:39 +08:00
Dan Marsden c231cb5e64 MDL-70006 analytics: Don't send notifications to suspended enrolments. 2021-08-03 10:55:48 +12:00
Paul Holden bfe5e85895 MDL-71121 backup: apply config defaults for async backups. 2021-08-02 23:35:10 +01:00
David Mudrák 7b81244786 MDL-72242 files: Do not force text filtering of SVG files
It was a mistake to force filtering of SVG files in MDL-55243. It can
easily lead to corrupted SVG files.

The patch removes that forced filtering and clarifies the inline comment
of what and why we need to do.
2021-08-02 15:19:35 +02:00
Paul Holden 6ab27a723f MDL-72257 gradeexport_xml: detect absense of grade items to export.
Where there are no grade items with idnumbers for selection, then
nothing should be exported. Currently, this is being interpreted as
the user exporting all grade items.
2021-08-02 10:24:12 +01:00
Ilya Tregubov c23589a218 MDL-72262 behat: Make alias shorter to fix Oracle failures. 2021-08-02 08:26:44 +02:00
AMOS bot d652bad225 Automatically generated installer lang files 2021-07-31 00:07:26 +00:00
Víctor Déniz a5285d5c88 Merge branch 'MDL-72085-MOODLE_310_STABLE' of https://github.com/dmitriim/moodle into MOODLE_310_STABLE 2021-07-30 08:56:22 +01:00
Dmitrii Metelkin 07e6488a88 MDL-72085 core_phpunit: reset session notifications 2021-07-30 10:03:57 +10:00
Paul Holden f076f88211 MDL-72252 core: remove TODO file from 82e63108. 2021-07-29 08:58:05 +01:00
Jun Pataleta a0942c97ea Moodle release 3.10.6 2021-07-29 10:01:58 +08:00
Ilya Tregubov e8b0373b93 weekly release 3.10.5+ 2021-07-28 16:48:24 +02:00
Ilya Tregubov d888097b07 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-07-28 16:48:23 +02:00
Ilya Tregubov cdc89ce2f9 Merge branch 'MDL-71672-310-2' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-07-28 11:17:30 +02:00
Jun Pataleta 785e26ff0d Merge branch 'MDL-72203-310' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-07-28 11:27:31 +08:00
AMOS bot b21898443a Automatically generated installer lang files 2021-07-28 00:07:25 +00:00
Michael Hawkins 4425f819ae MDL-72203 curl: Improve redirect unit testing and update upgrade.txt
lib/upgrade.txt was updated to reflect the fact that all cURL redirects
will be emulated.
2021-07-27 23:20:34 +08:00
David Mudrák 3c1788abc8 MDL-72203 curl: Remove duplicate unit tests for emulated redirects
Before, we had each redirect test duplicated: one for the native
redirects via native cURL, second for our emulated implementation. Now
all redirects are always emulated so there is no need to have them
tested twice.
2021-07-27 23:15:59 +08:00
David Mudrák 150c5eabe6 MDL-72203 curl: Check each URL in redirect chain to see if it is blocked
The security problem here was that only the first and the last URL in
the redirect chain was checked by the security helper. This patch forces
the curl wrapper to always emulate cURL redirects and check every
redirect URL in the chain before actually visiting it.
2021-07-27 23:15:59 +08:00
David Mudrák 4598f2265c MDL-72203 curl: Warn if someone actually started to use $maxredirects
The new parameter of curl_security_helper::url_is_blocked() introduced
in MDL-71916 became part of the API. Even if we reverted it quickly,
someone can use a released Moodle version that has that parameter in
place. For that reason and also to avoid potential troubles in the
future (e.g. when yet another argument would be added to this method),
we need to make it clear that the second parameter of this method should
never be used again.

Poor $maxredirects, you did not live long with us. Oh well.
2021-07-27 23:15:59 +08:00
David Mudrák 775c03ad2e MDL-72203 curl: Revert original fix of redirects to blocked URLs
This reverts the original fix introduced in MDL-71916. It introduced an
extra native cURL call inside curl_security_helper to check if the given
URL triggers a redirect to a blocked URL or not.

Shortly after the release, a couple of regressions were reported as a
result of the integrated solution. It was agreed to revert the fix and
progress with implementing an alternative approach.
2021-07-27 23:15:59 +08:00
Ilya Tregubov 19c6d9a089 Merge branch 'MDL-72179-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-07-27 12:38:27 +02:00
Andrew Nicols 82e63108fa MDL-72179 behat: Make use of page resolvers 2021-07-24 18:56:38 +08:00
Andrew Nicols 9f99c226dd MDL-72179 behat: Add page resolvers for activity roles/perms 2021-07-23 20:44:26 +08:00
Andrew Nicols 6f6b16f5b2 MDL-72179 behat: Add page resolver for activity names 2021-07-23 20:32:44 +08:00
Andrew Nicols 15c819ad90 MDL-72179 behat: Add activity editing page resolution 2021-07-23 20:32:15 +08:00
Andrew Nicols bfdf25df86 MDL-72179 behat: Fix page resolvers to remove ambiguity
The simple pattern matches were conflicting in some situations. To make
this backwards compatable we need to convert it to a Regex pattern match
instead, and provide the quoted and unquoted variants.
2021-07-23 20:31:45 +08:00
Andrew Nicols 18f9fd70a0 MDL-72179 behat: Correct course category page resolving
There were two issues here:
* I am on the [categoryname] category page page (duplicated page)
* the wrong URL was being used

Since an incorrect URL was used I felt it safe to rename the step from
'category page page' to 'category page'.
2021-07-23 20:28:15 +08:00
Andrew Nicols 79b1f0e924 MDL-72179 behat: Lowercase all page instance resolvers 2021-07-23 20:28:14 +08:00
Andrew Nicols 6eac0da6ad MDL-72179 behat: Improve core page resolvers
This commit makes the following improvements to core page resolverss:
* allows for mixed case naming (course, Course, etc.)
* allows fields other than the idnumber to be specified:
** course: idnumber, shortname, fullname
** course category: idnumber, name

Whilst some of these fields are not unique, they will typically be
unique in most test scenarios. Where they are not then the idnumber
should be used in preference.
2021-07-23 20:28:10 +08:00
Ilya Tregubov 887bb33d11 weekly release 3.10.5+ 2021-07-23 11:31:03 +02:00
Ilya Tregubov 13173cc241 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-07-23 11:31:02 +02:00
Jun Pataleta 44d24acd6d MDL-72206 theme_boost: Have env check classes extend alert classes
To achieve good colour contrast and consistency with other parts of
Moodle, the environment check classes need to extend the alert-*
classes.
2021-07-23 15:08:11 +08:00
Jun Pataleta 66b23fbbe5 Merge branch 'MDL-72125-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-07-23 09:50:23 +08:00
Andrew Nicols b8fd3da2a8 MDL-72125 mod_assign: Correct step usage of undef step
This was due to an incorrectly resolved conflict when backporting from
3.11.
2021-07-23 08:36:43 +08:00
Andrew Nicols 7e2b291e34 Merge branch 'MDL-70427-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-07-22 11:23:11 +08:00
AMOS bot 7fba84f746 Automatically generated installer lang files 2021-07-22 00:07:30 +00:00
Víctor Déniz f1b64fb742 Merge branch 'MDL-72108-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-07-21 19:29:59 +01:00
Ilya Tregubov 3440e4155d Merge branch 'MDL-72125-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-07-19 14:02:35 +02:00
Andrew Nicols 729ee696fc MDL-72125 mod_assign: Use assign submission data generators 2021-07-19 18:41:31 +08:00
Andrew Nicols 0397710c44 MDL-72125 mod_assign: Add data generator for assign submissions 2021-07-19 18:41:31 +08:00
Andrew Nicols fc457581a4 MDL-72125 testing: Make global $CFG available when including generators
This will remove the requirement to add the global $CFG call to the top
of generator scripts.
2021-07-19 18:41:31 +08:00
Shamim Rezaie faa1b7e640 MDL-71672 javascript: Fix the markup in the header of YUI dialogs
Move the close button out of the element that is set as the
aria-labelledby for the dialog.
Also used h5 for the dialog titles so they are consistent with
AMD modals.
2021-07-19 16:42:05 +10:00
Shamim Rezaie 987166f5e0 MDL-71672 atto_equation: Fix the markup and the initial focused element
The initial focused element should be the first operator button.
This commit also fixes the accessibility issues that previously were
wrongly fixed by a redundant click on the first tab using javascript.
2021-07-19 16:42:05 +10:00
Shamim Rezaie 0fdf326b17 MDL-71672 atto_managefiles: Focus the first file manager button 2021-07-19 16:42:05 +10:00
Shamim Rezaie c47395c1ea MDL-71672 atto_emojipicker: Focus the search bar initially 2021-07-19 16:42:05 +10:00
Shamim Rezaie 136312c3ce MDL-71672 atto_recordrtc: focus Atto button after hide 2021-07-19 16:42:04 +10:00
Shamim Rezaie d227e72aa4 MDL-71672 javascript: Fix the issue of focusOnShowSelector being ignored
When focusOnShowSelector is not present, as a fallback, focus the first
focusable element in YUI dialogues
Ref:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role
2021-07-19 16:42:04 +10:00
Mikel Martín b4c09b497c MDL-71152 theme_boost: Use 'scroll-margin-top' for anchor links
Current anchor link offset fix is not working with 'display:flex' elements
2021-07-16 11:56:17 +02:00
boygr49p ec8fa5fc20 MDL-71500 calendar_threemonth: add behat step and coverage 2021-07-16 15:08:42 +08:00
boygr49p f3600e52cf MDL-71500 calendar_threemonth: clicking in a diff day should refresh day view
Clicking in a day in the three month block replaces the div with id starting
with calendar- so we can do so repeatedly and successfully and test that it does (with behat).
2021-07-16 15:08:41 +08:00
Andrew Nicols 6d0a3915c1 MDL-72163 admin: Plugins overview page should link to categories 2021-07-16 13:49:55 +08:00
Andrew Nicols 1858a98a22 MDL-72125 behat: Add get_activity_id() behat generators helper 2021-07-16 12:33:56 +08:00
Andrew Nicols be00aebefe MDL-72125 testing: Set a default idnumber when creating activities
The activity generator currently requires an idnumber when creating
activities, but this is not a requirement when creating the same
activity through the UI. The requirement comes because we want to
provide a way to refer to activities in subsequent steps.

This commit modifies the behaviour such that the generator uses the name
of the activity as the default idnumber.

This has two  main benefits:
1. it simplfies generation of activities; and
2. it makes the language used when writing behat tests much more natural.

With this change, steps will refer to the activity by its idnumber/title
in all cases, rather than sometimes by an idnumber which bears no
relevance to the title.
2021-07-16 12:33:56 +08:00
Andrew Nicols 1ab6cd84c2 MDL-72125 testing: Add helper to run generators as a user 2021-07-16 12:33:56 +08:00
Thach Le Huy 5c8bd91162 MDL-72033 User tours: step placement issues if screen too narrow 2021-07-16 11:24:48 +07:00
abgreeve 2e1212eeae weekly release 3.10.5+ 2021-07-16 10:16:41 +08:00
abgreeve e660067a9f Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-07-16 10:16:40 +08:00
AMOS bot 32648ae6a5 Automatically generated installer lang files 2021-07-16 00:07:26 +00:00
sam marshall c5d0f7605a MDL-72152 Behat: No way to test key shortcuts with letter keys
Extends the existing step 'And I press the Shift Left key' so that
it supports letter/other keys: 'And I press the Ctrl C key'.
2021-07-15 10:48:49 +01:00
Jun Pataleta 4560e11858 Merge branch 'MDL-63770-310' of /home/jun/moodles/stable_310/moodle into MOODLE_310_STABLE 2021-07-15 16:16:38 +08:00
Matteo Scaramuccia abc35abf38 MDL-63770 core: 'port' should be an integer like in parse_url()
Plus trivial comment cleanup.
2021-07-15 11:39:38 +08:00
Dmitri Pisarev 19e7915818 MDL-63770 core: Fix a false-positive in reverseproxyabused check
A `reverseproxyabused` error is wrongly triggered when external port number doesn't equal internal.
2021-07-15 11:39:38 +08:00
Eloy Lafuente (stronk7) 2ae51fd4de Merge branch 'MDL-67338-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-07-15 00:35:18 +02:00
Paul Holden ae097fe1f5 MDL-67338 message: re-implement block page type patterns.
The `page_type_list` method for the message component was deprecated
in 5b0769db as part of MDL-54744. However it is still required when
trying to configure blocks on any messaging pages.
2021-07-14 19:31:33 +01:00
Eloy Lafuente (stronk7) 99d77f27c5 Merge branch 'MDL-72139-310' of git://github.com/cescobedo/moodle into MOODLE_310_STABLE 2021-07-14 14:00:08 +02:00
cescobedo dc8a28e4f0 MDL-72139 core_message: Fix encoding UTF-8 in prevent unclosed tags 2021-07-14 07:41:28 +02:00
Sara Arjona 426dbce03c Merge branch 'MDL-71782_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-07-13 16:44:46 +02:00
Jun Pataleta b8592dc8ee Merge branch 'MDL-72036-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-07-13 16:05:27 +08:00
Sara Arjona 62bc9cda28 MDL-72036 atto_h5p: Random error with external URL
After a major upgrade was done in h5p.com, some random errors appeared
in the "H5P options are ignored for H5P URLs" scenario.
They have been fixed replacing the URL for different (which should
load quicker). As we're checking external content, no other improvement
can be done on the Moodle site.
2021-07-13 08:37:50 +02:00
Huong Nguyen 38ea26fe41 MDL-71656 atto: Add meaningful labels to colour items
Colour chooser supported:
 - atto_fontcolor
 - atto_backcolor
2021-07-13 13:07:17 +07:00
Paul Holden aa6e48c6be MDL-70427 task: correct missing component when queuing adhoc task.
If the task belongs to a component, and doesn't have it's own
component property set then we can lazy-load it based on class
namespace.
2021-07-12 20:46:56 +01:00
Paul Holden cc341d85fd MDL-70427 admin: remove plugin adhoc tasks during uninstall. 2021-07-12 20:46:47 +01:00
Paul Holden d93f29fa56 MDL-71050 h5p: account for parent languages retrieving translations.
Take account of parent languages when requesting given library
translation. For example if we are currently using "de_kids" as the
current language, we need to recurse each language pack looking for
a matching H5P translation ("de_kids" -> "de_du" -> "de").
2021-07-12 13:17:12 +01:00
AMOS bot c00e4a02e2 Automatically generated installer lang files 2021-07-11 00:07:21 +00:00
Eloy Lafuente (stronk7) acd4236df9 Moodle release 3.10.5 2021-07-10 18:56:08 +02:00
Eloy Lafuente (stronk7) 4f8f170f54 MDL-71782 behat: Ensure page after saving changes is there
A similar approach was followed @ MDL-67935, although the
case doesn't seem to be the same.

In any case, it's curious that all local execution are
100% passing and only CIs fail so often. Just guessing if,
maybe, there is some Chrome version factor around (we
are running older, sticky, versions @ CIs.
2021-07-10 15:50:48 +02:00
Paul Holden e203e89891 MDL-71835 report_log: correct query returning user fullname from DB. 2021-07-09 13:54:27 +01:00
Paul Holden 74f366c50a MDL-67833 tool_customlang: break long text in component column. 2021-07-09 11:37:11 +01:00
AMOS bot e47bf9a095 Automatically generated installer lang files 2021-07-09 00:07:29 +00:00
Eloy Lafuente (stronk7) f577c9f128 weekly release 3.10.4+ 2021-07-08 23:44:10 +02:00
Jun Pataleta 39a8d3ada6 Merge branch 'MDL-71919-310-fix' of https://github.com/cescobedo/moodle into MOODLE_310_STABLE 2021-07-08 23:33:31 +02:00
Jun Pataleta 7bcaff1f45 Merge branch 'MDL-70594_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-07-08 23:33:31 +02:00
cescobedo 2ad0a4d863 MDL-71919 core_message: Fix tests in message_send 2021-07-08 23:33:31 +02:00
Huong Nguyen 625703c176 MDL-71922 file: Enhance endless recursion requests protection 2021-07-08 23:33:31 +02:00
cescobedo 045fe3f45f MDL-71919 core_message: Fix unclosed html tags in email notification 2021-07-08 23:33:31 +02:00
Paul Holden a2bd7e21df MDL-71957 auth_shibboleth: safer session retrieval during logout. 2021-07-08 23:33:31 +02:00
Eloy Lafuente (stronk7) f83598d827 MDL-70335 behat: Ensure the scenario passes under all themes
Also, get rid of not needed @javascript tag
2021-07-08 23:33:31 +02:00
Dongsheng Cai 1e199ea63d MDL-71978 core_calendar: only allow owner to edit user subscriptions 2021-07-08 23:33:31 +02:00
Adrian Greeve 2a26fa5c33 Merge branch 'MDL-71887-310' of https://github.com/snake/moodle into MOODLE_310_STABLE 2021-07-08 23:33:31 +02:00
Mihail Geshoski 0d340b657d MDL-58393 core: Remove firstname argument from emailconfirmation string 2021-07-08 23:33:31 +02:00
Sujith Haridasan 9c621d53e9 MDL-71241 course: Validate and sanitize sort arguments
Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-07-08 23:33:25 +02:00
Mihail Geshoski 50c9a3f3ee MDL-71242 core_course: Fix failing unit test 2021-07-08 23:33:25 +02:00
Mihail Geshoski 717f81810e MDL-71242 core_course: Test the validation of the sort value
Adds new unit test, test_course_get_recent_courses_sort_validation(),
which is reponsible for testing the validation of the sort value in
course_get_recent_courses().
2021-07-08 23:33:24 +02:00
Mihail Geshoski 4bad6006b4 MDL-71242 core_course: Update test_course_get_recent_courses() unit test
Adds additional assertions in test_course_get_recent_courses() test to
ensure that the sort funcionality works as expected.
2021-07-08 23:33:24 +02:00
Mihail Geshoski 97a56d77a9 MDL-71242 core_course: Validate the value of the sort argument
This change validates the value of the sort argument in
course_get_recent_courses().
2021-07-08 23:33:07 +02:00
Andrew Nicols 3359f00688 MDL-72108 js: Fix incorrect jsdoc examples for core/ajax 2021-07-08 10:39:53 +08:00
Claude Vervoort 89feb325b7 MDL-71887 mod_lti: repost when no cookie due to crosssite request 2021-07-07 14:18:23 +08:00
Michael Hawkins 582b013046 MDL-71916 lib: Check cURL redirects for blocked URLs before following 2021-07-06 23:43:06 +02:00
Eloy Lafuente (stronk7) 09c13ae3b7 Merge branch 'MDL-70638-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-07-06 20:21:34 +02:00
Eloy Lafuente (stronk7) a7f7dfa156 Merge branch 'MDL-70335-310' of https://github.com/juancs/moodle into MOODLE_310_STABLE 2021-07-06 20:18:40 +02:00
Eloy Lafuente (stronk7) 98b86f78f6 Merge branch 'MDL-71537-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-07-06 20:16:37 +02:00
Paul Holden 175389ba3f MDL-70638 user: correct access checks when serving profile files.
Requests for files from a users profile file area should follow
the same access checks as for the profile itself.
2021-07-06 10:28:19 +01:00
cescobedo 5cf7b4bd09 MDL-71917 core_message: Use $USER in WS delete_message_for_all_users 2021-07-06 13:33:02 +08:00
Thach Le Huy adedf35e4c MDL-71537 User tours: Minor display errors on mobile 2021-07-06 09:36:28 +07:00
Paul Holden 2725f7a7fe MDL-71981 user: escape identity fields if writer supports HTML. 2021-07-06 09:28:46 +08:00
Paul Holden 61b4283c22 MDL-71981 dataformat: indicate HTML support in writer callback. 2021-07-06 09:28:46 +08:00
Eloy Lafuente (stronk7) 2feb383659 Merge branch 'MDL-72063-310-en_fix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-07-04 11:02:46 +02:00
Juan Segarra Montesinos 3de775ae41 MDL-70335 mod_forum: Subscribe users from Forced to Auto mode
When a teacher changes the subscription mode from forced
subscription to auto subscription using the "cog" icon in the
forum page, users are not seen in the Show/edit current
subscribers" page.

This does not happens when done from the Edit settings page.
2021-07-03 09:54:19 +02:00
Eloy Lafuente (stronk7) 6ff56f63f1 MDL-70594 environment: Apply agreed changes
- PostgreSQL 10 required.
- Exif PHP extension recommended.
2021-07-01 22:41:57 +02:00
Eloy Lafuente (stronk7) a0beffc03f MDL-70594 environment: 4.0 base information
This is a direct copy of the 3.11 branch to have
the changes under control in next commits.
2021-07-01 22:41:56 +02:00
David Mudrák 242bda330f MDL-72063 lang: Use fixed strings in tests, too 2021-07-01 19:32:13 +02:00
Helen Foster da5fce12a1 MDL-72063 lang: Import fixed English strings (en_fix) 2021-07-01 19:31:33 +02:00
Ilya Tregubov 773984295b weekly release 3.10.4+ 2021-07-01 16:42:05 +02:00
Bas Brands b2e353c169 MDL-71366 core_question: prevent question options overflow 2021-07-01 11:56:59 +08:00
Bas Brands 2e7109d7ae MDL-71366 core_question: prevent shrinking of input radio 2021-07-01 11:56:49 +08:00
Andrew Nicols 11831dd9f3 Merge branch 'MDL-72010_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-07-01 11:11:21 +08:00
Paul Holden 5e12c0a717 MDL-71314 course: add category record snapshot to deletion event. 2021-07-01 10:32:23 +08:00
Andrew Nicols 55877ad94e Merge branch 'MDL-68003_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-07-01 09:54:11 +08:00
Sara Arjona 83046e5063 Merge branch 'MDL-67208-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-06-30 16:55:45 +02:00
Simey Lameze bb5253b923 MDL-71789 calendar: fix subscription url validation 2021-06-30 16:30:15 +02:00
Sara Arjona c645a1b933 Merge branch 'MDL-71971-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-06-30 16:16:20 +02:00
Sara Arjona 4dfbcd7954 Merge branch 'MDL-71991_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-06-30 16:09:44 +02:00
Leon Stringer 0eb14ac1d4 MDL-72035 csvlib: Write BOM for Excel
Add option to class csv_export_writer to prefix CSV file with UTF-8 byte
order mark (BOM).  This helps Microsoft Excel detect the file's character
encoding.
2021-06-30 14:59:15 +01:00
Eloy Lafuente (stronk7) 1eee862487 Merge branch 'MDL-71947-310' of https://github.com/bmbrands/moodle into MOODLE_310_STABLE 2021-06-29 18:30:44 +02:00
Tim Hunt ce80aa2a90 MDL-68003 session timeout warning: don't show in iframes 2021-06-29 17:00:12 +01:00
Sara Arjona b304fa4a85 Merge branch 'MDL-71777-310' of https://github.com/appalachianstate/moodle into MOODLE_310_STABLE 2021-06-28 11:33:32 +02:00
Fred Woolard 99eae85be4 MDL-71777 antivirus: Use hash_from_path (sha1_file) 2021-06-25 09:52:14 -04:00
Luca Bösch bd041244f4 MDL-71971 mod_quiz: separate "Repaginate" and "Select multiple items" 2021-06-25 00:03:27 +02:00
Eloy Lafuente (stronk7) 017dce9cc3 weekly release 3.10.4+ 2021-06-24 23:03:17 +02:00
Eloy Lafuente (stronk7) 40b13110aa NOBUG: Fixed SVG browser compatibility 2021-06-24 23:03:17 +02:00
Eloy Lafuente (stronk7) 81e044debf Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-06-24 23:03:16 +02:00
Tim Hunt dedfc451f3 MDL-72010 quiz: prevent session timeouts during attempts 2021-06-24 12:25:36 +01:00
Bas Brands 4ef81f5510 MDL-71947 core_quiz: vertical forms for access rule popups 2021-06-24 12:32:12 +02:00
Bas Brands c5381e8756 MDL-71947 theme_boost: fix styles for vertical forms 2021-06-24 12:32:12 +02:00
Simey Lameze 09902461b6 MDL-67208 calendar: fix manage subscription redirection
This patch fix the subcription page only adding the course parameter
only when viewing the calendar on course context. It also passes the
url to the form instance, so we have the course parameter on the
form action attribute.
2021-06-24 17:00:20 +08:00
Tony Butler 8cbd95be5b MDL-71694 assignfeedback_comments: Behat test for feedback preservation
Including efficiency improvements from https://github.com/davosmith
2021-06-24 12:03:02 +08:00
Tony Butler 0474ebc970 MDL-71694 assignfeedback_comments: Fill latest submitted comment data
Otherwise if grading validation fails, any new/updated comments are
lost and replaced with previously saved data (or an empty editor).
2021-06-24 12:03:02 +08:00
Andrew Nicols 3cb27b509e Merge branch 'MDL-71837-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-06-24 11:00:45 +08:00
Andrew Nicols b9080a4a47 Merge branch 'MDL-55243-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-06-24 10:56:49 +08:00
Huong Nguyen a9ad30810f MDL-55243 files: Make is_valid_image support SVG files 2021-06-24 09:03:37 +07:00
Daniel Neis Araujo 3e62c6c272 MDL-71999 enrol: enrol_imsenterprise_allow_group_member_remove global 2021-06-23 13:19:46 -03:00
Andrew Nicols e978c39359 MDL-71669 editor_atto: Rebuild editor_atto/events 2021-06-23 14:48:16 +08:00
Andrew Nicols ed3413ec91 Merge branch 'MDL-71669-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-06-23 14:08:12 +08:00
Jun Pataleta a26f14d314 MDL-71669 atto_table: Set appropriate ARIA roles for table button
The table button can become a menu button when the cursor's position
in the editor is within a table. So we'd need to update the button with
ARIA attributes appropriate for a menu button.
This is best done when the button's highlight gets toggled, so we're
adding an event listener for when this happens and add/remove the ARIA
attributes accordingly.
2021-06-23 13:13:08 +08:00
Jun Pataleta 17d75afab7 MDL-71669 editor_atto: Fire custom event when toggling button highlight 2021-06-23 13:13:07 +08:00
Jun Pataleta d402b62a06 MDL-71669 editor_atto: Create an events module for the atto editor 2021-06-23 13:13:07 +08:00
Jun Pataleta a42008f2ae MDL-71669 editor_atto: Set proper roles to toolbar menus
* Menu button fix
  - Added aria-haspopup, aria-controls, and aria-expanded attributes.
* Menu fixes
  - Added aria-labelledby that points to the menu button label.
  - Removed the dialog role in the menu's container.
  - The ul tag needs the "menu" role.
  - The li tag needs the role "none" instead of the "presentation" role

Reference:
https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton
2021-06-23 13:13:07 +08:00
AMOS bot 85f55e8931 Automatically generated installer lang files 2021-06-23 00:07:28 +00:00
Dongsheng Cai baa2eb2619 MDL-71029 forum: fix post count for users have more than 1 enrolment 2021-06-23 09:43:56 +10:00
Tim Hunt 898e36baf6 MDL-71991 files: check return value of rename when writing files 2021-06-22 19:37:08 +01:00
Sara Arjona c356cbfc23 Merge branch 'MDL-70750-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-06-22 10:21:13 +02:00
Andrew Nicols 5343c8a720 Merge branch 'MDL-70233-alternative-disabled-cache-310' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE 2021-06-22 15:47:54 +08:00
mohalisad fd7ce03fd2 MDL-71973 analytics cli: fix enabling model bug
Fix the exception at line 143 caused by wrong argument for constructor in line 140
2021-06-21 18:51:51 +04:30
Ilya Tregubov d4ba29cac0 MDL-70750 mod_survey: Fix warning for undefined offset. 2021-06-21 08:42:38 +02:00
Eloy Lafuente (stronk7) 84733bcf4f Merge branch 'MDL-71113-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-06-19 18:05:41 +02:00
AMOS bot 52898c2980 Automatically generated installer lang files 2021-06-19 00:07:30 +00:00
Andrew Nicols 9df1e30267 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols e5454f31ab MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Andrew Nicols 4c826a2d4c MDL-71113 js: Bare minimum fixes to build jsdoc 2021-06-18 09:38:04 +08:00
Andrew Nicols c57cf0d660 MDL-71113 js: Add jsdoc configuration and Grunt 2021-06-18 09:38:04 +08:00
AMOS bot ac94b4d787 Automatically generated installer lang files 2021-06-18 00:07:27 +00:00
Víctor Déniz 10daae7ab7 weekly release 3.10.4+ 2021-06-17 14:55:00 +01:00
Andrew Nicols 98b1fd1dfc Merge branch 'MDL-71813-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-06-17 11:28:54 +08:00
Eloy Lafuente (stronk7) 7c5cde9a01 Merge branch 'MDL-71896-310' of git://github.com/merrill-oakland/moodle into MOODLE_310_STABLE 2021-06-17 00:11:49 +02:00
Eloy Lafuente (stronk7) e62b152f53 Merge branch 'MDL-71888-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-06-17 00:08:20 +02:00
Eloy Lafuente (stronk7) 1cc8179bba Merge branch 'MDL-71736-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-06-17 00:01:59 +02:00
Andrew Nicols 042963a6d9 Merge branch 'MDL-71804_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-06-15 11:27:48 +08:00
Eloy Lafuente (stronk7) 02aa7d8974 MDL-71804 travis: Bump to bionic 2021-06-13 22:53:41 +02:00
abgreeve dbf0d0bfae weekly release 3.10.4+ 2021-06-11 13:52:15 +08:00
abgreeve b5908813d3 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-06-11 13:52:15 +08:00
Eric Merrill 9cc18365e0 MDL-71896 dml: Add auroramysql to config-dist 2021-06-10 15:30:37 -04:00
Sujith Haridasan 593b55fa7d MDL-68915 core_form: Fix the behat test failure
Fix the behat test failure for the forum when
grades exist.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-06-10 15:01:46 +08:00
Adrian Greeve 79bd8050be Merge branch 'MDL-71369-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-06-10 11:49:27 +08:00
Andrew Nicols 4d592de0f7 Merge branch 'MDL-71838_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-06-10 11:43:06 +08:00
Adrian Greeve e3b6806a51 Merge branch 'MDL-68915-310' of https://github.com/sharidas/moodle into MOODLE_310_STABLE 2021-06-10 11:36:57 +08:00
Adrian Greeve 0aef9ee01b Merge branch 'MDL-64236-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-06-10 11:28:04 +08:00
Sujith Haridasan f3b98362da MDL-68915 lesson: Do not allow maxgrade change
Do not allow maxgrade change when some of the
users are already graded. As of now this is applicable
to the following activities:
1. Forum
2. Database
3. Lesson
4. Glossary

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-06-10 08:33:37 +05:30
Andrew Nicols bc1d555be5 Merge branch 'MDL-71876_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-06-10 08:51:19 +08:00
AMOS bot d899937724 Automatically generated installer lang files 2021-06-10 00:07:23 +00:00
Paul Holden 9d02f9212e MDL-71888 admin: define clitablesexist string used by CLI installer. 2021-06-09 22:06:17 +01:00
Andrew Nicols 9d95615ae2 MDL-71736 javascript: Run the ignorefiles command more liberally 2021-06-09 19:08:53 +08:00
abgreeve f91cedfb08 Merge branch 'MDL-67975-310' of https://github.com/sharidas/moodle into MOODLE_310_STABLE 2021-06-09 16:10:53 +08:00
Sujith Haridasan 2dbd9a9554 MDL-67975 nextcloud: Add support for Link to file
This change set would bring the following new additions
to the nextcloud repo:
1. Create a new radio button in filepicker: "Link to file"
2. When user clicks this radio button a warning message
   would be created, saying this file would become public.
   Meaning a public link is created in the nextcloud server.
3. Created a sync_reference method to sync the files downloaded
   from nextcloud server. The sync/refresh time given is 1 day/24 hours.
4. Made sure that when the file is downloaded, we use the file
   from moodledata file pool.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-06-09 13:38:38 +05:30
Andrew Nicols f8b76db001 Merge branch 'MDL-65637-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-06-09 13:35:33 +08:00
Jun Pataleta 3688154f92 MDL-71876 mod_h5pactivity: Increase window size during test
The addition of the activity information moves the h5p content down
out of the window view on Firefox which causes the Check button to be
unclickable. This patch increases the window size to ensure that the
check button is visible and clickable.

Credits to Eloy <stronk7@moodle.org> for the thorough investigation
of the root cause of this issue :)

This is a backport of MDL-71337
2021-06-09 00:53:03 +02:00
Eloy Lafuente (stronk7) 03dea98563 Merge branch 'MOODLE_310_MDL-71471_v2' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-06-07 20:15:15 +02:00
Mikhail Golenkov db6764cf87 MDL-71471 assign: Remove submission from queue when converted in web 2021-06-04 15:28:30 +10:00
Eloy Lafuente (stronk7) 2d7386420c weekly release 3.10.4+ 2021-06-03 23:56:14 +02:00
Eloy Lafuente (stronk7) f7b500148d Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-06-03 23:56:13 +02:00
hiendinh 8b70552460 MDL-71813 filepicker: view file not available using keyboard (Enter) 2021-06-03 14:16:58 +07:00
Andrew Nicols 4b279c7ab5 Merge branch 'MDL-71741-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-06-03 11:51:57 +08:00
Huong Nguyen 8a125028fb MDL-71741 portfolio: Reset header information between requests
The reset process also removes the CURLFile option in the HTTP object,
which will avoid the serialisation issue on PHP7.4 and upward
2021-06-03 10:51:24 +07:00
Huong Nguyen db1a7003e6 MDL-71741 portfolio: Use the correct configurations 2021-06-03 10:51:24 +07:00
abgreeve 1402a4acfc Merge branch 'MDL-71284-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-06-03 11:42:05 +08:00
Andrew Nicols 4da9df136f Merge branch 'MDL-71668-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-06-03 11:34:34 +08:00
Andrew Nicols 75780c347b Merge branch 'MDL-71737-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-06-03 11:10:23 +08:00
abgreeve 266b8e2901 Merge branch 'MDL-71693-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-06-03 10:19:17 +08:00
abgreeve 8d79b80f47 Merge branch 'MDL-71644-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-06-03 09:21:39 +08:00
Eloy Lafuente (stronk7) ac452323f0 Merge branch 'MOODLE_310_MDL-71438_v2' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-06-02 23:52:51 +02:00
Paul Holden 43c60cbb8a MDL-71837 calendar: turn off export form double submit protection. 2021-06-02 19:53:08 +01:00
Tim Hunt 1e36bf1e39 MDL-71838 quiz reports: average rows calc can run out of memory
Should not use get_records when you mean record_exists.
2021-06-02 16:49:09 +01:00
Mikhail Golenkov 55fa7c84ec MDL-71438 blocks: Add index on mdl_user_preferences.name 2021-06-02 22:13:58 +10:00
Shamim Rezaie 8864520742 MDL-71668 editor_atto: Accissibility focus styling for Atto buttons
Make all Atto buttons consistent in the way they show the focus outline
2021-06-02 17:11:59 +10:00
Peter Dias e0fdddf5e9 MDL-65637 core_oauth2: Introduce a new custom linkedin oauth2 client 2021-06-02 10:24:43 +08:00
Peter Dias d1c0acdd55 MDL-65637 core_oauth2: Create new oauth2 mapping function
Separated userinfo mapping into a function and new unit test
2021-06-02 08:08:59 +08:00
Andrew Nicols d4b3f6cd30 Merge branch 'MDL-71731_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-06-01 12:48:04 +08:00
AMOS bot 6b0b076f34 Automatically generated installer lang files 2021-05-29 00:07:23 +00:00
Huong Nguyen bbe22a4f2f MDL-71737 portfolio: Make is_valid_image become internal function 2021-05-28 15:07:29 +07:00
Luca Bösch 82b3ed3939 MDL-71284 assign: prevent double escaping assignment name. 2021-05-27 20:29:48 +02:00
Eloy Lafuente (stronk7) deae0eb7e4 MDL-71731 phpunit: isolate tests requiring lots of peak mem
It's mostly addDocuments(), used by test_add_document_batch_large()
with 100 big documents what requires a lot of ram
although apparently, it's freed (partially) once ended.
Just the peak usage remains high. In any case, isolating that
test to avoid the non-freed side of it to consume too
much memory for the rest. (We allow "only" 2GB).

Still, I think that there is a good work about to detect which
tests are leaking / consuming too much, I'd bet there are
a bunch running completely out of control.
2021-05-27 19:42:31 +02:00
Sara Arjona 232d668264 weekly release 3.10.4+ 2021-05-27 17:45:12 +02:00
Sara Arjona 992cbc3c8f Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-27 17:45:12 +02:00
Sara Arjona 8f1eda6b69 Merge branch 'MDL-69703-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-27 12:25:07 +02:00
Paul Holden 6479736323 MDL-69703 theme_boost: ensure multi-select options take all space. 2021-05-27 10:45:55 +01:00
Sara Arjona 809a73137f Merge branch 'MDL-71145-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-05-27 11:37:16 +02:00
Huong Nguyen 897ebd28df MDL-71145 qtype_ddmarker: Fix Behat failure 2021-05-27 15:29:35 +07:00
Andrew Nicols f62ba9c05e Merge branch 'MDL-69703-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-27 12:06:36 +08:00
Andrew Nicols 950871f25a Merge branch 'MDL-71637-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-05-27 11:53:47 +08:00
Andrew Nicols 86e10b6960 Merge branch 'MDL-71047-3.10' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-05-27 11:20:14 +08:00
Andrew Nicols ada3626996 Merge branch 'MDL-71462-MOODLE_310_STABLE' of https://github.com/SysBind/moodle into MOODLE_310_STABLE 2021-05-27 09:54:22 +08:00
Andrew Nicols 20f8c8579d Merge branch 'MDL-67771-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-05-27 09:45:27 +08:00
Andrew Nicols 2679fa4597 Merge branch 'MDL-71145-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-05-27 09:40:52 +08:00
AMOS bot 1168bf97e3 Automatically generated installer lang files 2021-05-27 00:07:24 +00:00
Eloy Lafuente (stronk7) 161c0985a9 Merge branch 'MDL-71159-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-05-26 18:48:05 +02:00
Peter Dias 0685644add MDL-71637 core: Set default for mb_substitute_character 2021-05-26 14:20:09 +08:00
Mihail Geshoski ac70df2f3c MDL-64236 gradereport_grader: Add padding to content in grader report
In certain operative systems the browser's scrollbar may partly cover
the content in the student header and user cells when horizontally
scrolling through the table contents. This is most noticeable when in
RTL mode. Adding slight padding on the left (or right in RTL mode) to
the content in these cells would fix this UI issue.
2021-05-26 13:47:48 +08:00
Sara Arjona 1a6d336a33 Merge branch 'MDL-68925_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-05-25 15:34:40 +02:00
Paul Holden 09abf0ed7d MDL-69703 theme_boost: remove right padding for multi-selects.
This removes the whitespace obscuring longer option elements when
selected, particularly on narrow screens.
2021-05-24 15:56:40 +01:00
avi 9ead5f3307 MDL-71462 core: Add phpstorm metadata file to gitignore 2021-05-24 15:52:37 +03:00
AMOS bot 84c98d3f7f Automatically generated installer lang files 2021-05-24 00:07:22 +00:00
AMOS bot 02a705975d Automatically generated installer lang files 2021-05-23 00:07:20 +00:00
Andrew Nicols cfad9c36f7 MDL-71369 admin: Apply form change checker to admin/category view 2021-05-21 09:58:25 +08:00
Huong Nguyen 47e6948847 MDL-71145 qtype_ddmarker: Incorrect marker positions in responsive mode 2021-05-21 08:47:51 +07:00
Jun Pataleta 00738cf40f Merge branch 'MDL-60431_310' of https://github.com/jonof/moodle into MOODLE_310_STABLE 2021-05-21 08:57:33 +08:00
Jonathon Fowler 56a1e134f2 MDL-60431 qtype_calculated: handle NAN and INF calculation outcomes
With significant-digits presentation mode, NAN would be formatted as
'NAN' followed by zeroes, which looks silly, and +INF would cause an
execution timeout as Moodle tries to divide +∞ by 10 until it becomes
less than 1, which can happen in a divide-by-zero situation.

Note that the user can't answer NAN or INF to any question, but at this
at least now looks consistent and also doesn't break Moodle in the case
of +INF.
2021-05-21 09:35:24 +10:00
Paul Holden f7a4eefd9b MDL-71693 admin: set default for debugdisplay to off.
The previous default value for this config was based on the
PHP ini file `display_error` property (6349a3ba). However we
override this propertly during page setup (25338300) according
to the value of the configuration itself.

This had the effect of always setting the default value for
this config to it's current value.
2021-05-20 21:39:41 +01:00
Sara Arjona a3b8da0903 weekly release 3.10.4+ 2021-05-20 11:09:07 +02:00
Sara Arjona aa6662b806 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-20 11:09:06 +02:00
Peter Dias dd4d3bdb98 MDL-67771 theme: Add side-post to incourse views 2021-05-20 15:15:22 +08:00
Mark Nelson c5e6f13143 MDL-68925 assignfeedback_editpdf: avoid hiding comments with a menu open
Co-authored by: Jonathon Fowler <fowlerj@usq.edu.au>
2021-05-20 13:16:16 +08:00
Jun Pataleta f5fb4467ab Merge branch 'MDL-71157-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-05-20 12:29:44 +08:00
abgreeve 0653fc49d4 Merge branch 'MDL-65203-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-05-20 11:02:04 +08:00
Thong Bui f8ce721ac4 MDL-71644 Quiz: The issues outstanding from MDL-70947.
Issue 1: While essay question's uploading progress, we need to disable submit
buttons to prevent submit form event.

Issue 2: Enable buttons after pressing cancel button on the popup
confirming overwrite file existed.
2021-05-20 08:34:01 +07:00
Andrew Nicols 1df8590b76 Merge branch 'MDL-71626-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-20 09:32:37 +08:00
Eloy Lafuente (stronk7) 450b231952 Merge branch 'MDL-71126-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-05-19 23:03:26 +02:00
Eloy Lafuente (stronk7) 987f0de317 Merge branch 'MDL-67935-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-05-19 22:50:30 +02:00
Eloy Lafuente (stronk7) 7a1f813852 Merge branch 'MDL-71373-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-19 19:41:06 +02:00
Sara Arjona 7efc2aeaba MDL-71157 block_myoverview: remove wait from behat
The step "And I wait until ".block_myoverview
[data-control='next']" "css_element" exists" is not correct
because this [data-control='next'] element exists before and
after the step so, in some cases, it might cause the following
step will start earlier than expected.
As pending JS has been added, this wait steps are not required
any more.
2021-05-19 12:37:09 +02:00
Andrew Nicols 63b5b5be49 MDL-71157 core: Pending JS in paged content bars 2021-05-19 12:37:09 +02:00
Luca Bösch 8d8c21f99e MDL-71373 tool_usertours: localize "previous"/"next" in user tours.
AMOS BEGIN
        CPY [previous,core],[previousstep,tool_usertours]
        CPY [next,core],[nextstep,tool_usertours]
       AMOS END
2021-05-19 09:56:01 +02:00
Luca Bösch 5abddbe868 MDL-71373 core_enrol: localize "close" in role manager. 2021-05-19 09:56:01 +02:00
Luca Bösch b773189d3b MDL-71373 tool_usertours: localize "previous"/"next" in user tours. 2021-05-19 09:56:01 +02:00
Luca Bösch 8ce33c5431 MDL-71373 core_table: localize "previous"/"next" in pagination. 2021-05-19 09:56:01 +02:00
Eloy Lafuente (stronk7) 3c4c7d39ad Merge branch 'MDL-71619-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-18 22:59:36 +02:00
Eloy Lafuente (stronk7) 6d1e2c4411 Merge branch 'MDL-71373-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-18 22:54:37 +02:00
Dongsheng Cai 960050454d MDL-65203 template: tab should be quoted to produce valid json 2021-05-18 20:41:57 +10:00
Nhan Vo 16fe2bdc5e MDL-71047 HTML Editor (Atto): Cursor position is not correct when paste 2021-05-18 10:05:48 +07:00
AMOS bot 6c7f328f20 Automatically generated installer lang files 2021-05-18 00:07:32 +00:00
Luca Bösch 4db2773881 MDL-71373 core_enrol: localize "close" in role manager. 2021-05-14 14:16:37 +02:00
Luca Bösch d0562bd5c5 MDL-71373 tool_usertours: localize "previous"/"next" in user tours. 2021-05-14 14:16:37 +02:00
Luca Bösch ea7c3d6b8f MDL-71373 core_table: localize "previous"/"next" in pagination. 2021-05-14 14:16:37 +02:00
Huong Nguyen 03aa22e05c MDL-71126 Quiz: Manual grading page size preference can get stuck at 0
Including in this change:
 - New positiveint regex rule to check if the value is a positive integer
2021-05-14 17:02:35 +07:00
Sara Arjona 486ba9af35 weekly release 3.10.4+ 2021-05-14 11:06:23 +02:00
Sara Arjona c638f70bf8 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-14 11:06:22 +02:00
Sara Arjona feede81204 MDL-67935 tool_lp: fix random errors with login/logout 2021-05-14 10:53:19 +02:00
AMOS bot 89fb13c3f1 Automatically generated installer lang files 2021-05-14 00:07:30 +00:00
Paul Holden da35a2374b MDL-71626 admin: filter site fullname in CLI maintenance script. 2021-05-13 20:28:14 +01:00
Paul Holden e7d1363565 MDL-71619 privacy: extend correct class in provider testcases.
Extending the privacy provider testcase means that it's tearDown
method will reset the request writer.
2021-05-13 20:25:10 +01:00
Eloy Lafuente (stronk7) 954c20c521 Merge branch 'MDL-71580-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-05-12 23:00:14 +02:00
Helen Foster d13badc089 MDL-71580 lang: Import fixed English strings (en_fix) 2021-05-12 11:08:09 +02:00
Sara Arjona 183348c219 weekly release 3.10.4+ 2021-05-11 12:42:34 +02:00
Sara Arjona c394fc970d Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-11 12:42:34 +02:00
AMOS bot 158054b3bd Automatically generated installer lang files 2021-05-11 00:07:30 +00:00
Víctor Déniz 595b858da0 Merge branch 'MDL-71060-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-05-10 23:42:52 +01:00
Thong Bui dcd5dfd22c MDL-71060 Questions: Duplicates 'Current category' text. 2021-05-10 00:24:28 +07:00
Eloy Lafuente (stronk7) 237f4ccada Moodle release 3.10.4 2021-05-08 16:40:42 +02:00
Eloy Lafuente (stronk7) f674b77d34 weekly release 3.10.3+ 2021-05-07 16:54:50 +02:00
Eloy Lafuente (stronk7) 9215f9d294 NOBUG: Fixed SVG browser compatibility 2021-05-07 16:54:50 +02:00
Eloy Lafuente (stronk7) b72be5f142 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-07 16:54:49 +02:00
abgreeve 5ed11926a6 Merge branch 'MDL-68747-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-05-07 11:45:45 +08:00
Mathew May e4274d80a4 MDL-70622 mod_lti: Tighten redirect param typing 2021-05-07 11:45:45 +08:00
Adam Olley 87883bb43c 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:45:34 +08:00
Jun Pataleta cd83b3732e Merge branch 'MDL-71395-310-2' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-05-07 10:30:39 +08:00
abgreeve c6ec73b12e Merge branch 'MDL-70181_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-05-07 10:22:28 +08:00
Víctor Déniz 3c23c78500 Merge branch 'MDL-71303-310' of https://github.com/StudiUM/moodle into MOODLE_310_STABLE 2021-05-06 23:34:33 +01:00
Eloy Lafuente (stronk7) 1b22f24666 Merge branch 'MDL-70049-310_count_submissions' of https://github.com/agrowe/moodle into MOODLE_310_STABLE 2021-05-06 23:27:20 +02:00
Eloy Lafuente (stronk7) 0656fb0d19 Merge branch 'MDL-70772-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-06 23:20:13 +02:00
Eloy Lafuente (stronk7) d13532e364 Merge branch 'MDL-71313_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-05-06 23:15:06 +02:00
Eloy Lafuente (stronk7) 0e077d9b68 Merge branch 'MDL-71343-m310' of https://github.com/rjnl/moodle into MOODLE_310_STABLE 2021-05-06 23:07:46 +02:00
Sara Arjona 35fbf2b4af MDL-70110 mod_assign: make phpunit test DB order agnostic 2021-05-06 19:38:45 +02:00
Sara Arjona 3938b91363 Merge branch 'MDL-71491-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-06 18:42:32 +02:00
Marina Glancy d87d0973f5 MDL-71395 core: fix bug in google lib wrapper
because of changes in PHP8 the '' == 0 is no longer true and the error in the google api wrapper was discovered
2021-05-06 18:39:10 +02:00
Sara Arjona c5298a3d9a Merge branch 'MDL-71420_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-05-06 17:58:29 +02:00
Marina Glancy 83dda7ae04 MDL-71395 block_tag_youtube: sometimes exception may have empty message 2021-05-06 17:49:14 +02:00
Víctor Déniz 2561b61d81 Merge branch 'MDL-71402-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-06 16:47:02 +01:00
Paul Holden 119c201a10 MDL-71491 repository_flickr: return more file data.
See also 643b0cca.
2021-05-06 16:36:35 +01:00
Sara Arjona 3cdb182a70 Merge branch 'MDL-71268-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-06 17:11:31 +02:00
Paul Holden 5e6e118a2e MDL-71402 availability: fix group restriction button in mod form.
* The button to "Add group/grouping access restriction" under
   common module settings should only be present if corresponding
   availability plugins are enabled; and
 * Prevent the same button behaving as a submit button, which
   intercepted the user hitting return in the form and added a
   restriction without deliberate action taken by the user.
2021-05-06 14:20:32 +01:00
Sara Arjona cd0b5a63fa Merge branch 'MDL-70110-310' of https://github.com/septatrix/moodle into MOODLE_310_STABLE 2021-05-06 13:16:13 +02:00
Víctor Déniz afc3b1dd3d Merge branch 'MDL-71434-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-06 11:15:18 +01:00
Sara Arjona d1983c3ce1 Merge branch 'MDL-71390-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-05-06 08:07:40 +02:00
Adrian Greeve 0094d8e66e Merge branch 'MDL-70786-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-06 10:05:02 +08:00
AMOS bot b34246ca19 Automatically generated installer lang files 2021-05-06 00:07:32 +00:00
Juan Leyva 5e29bd67e6 MDL-71513 mobile: Fix last access visibility 2021-05-05 22:49:07 +01:00
Eloy Lafuente (stronk7) ad7c296dc9 MDL-71420 environment: Lower sodium requirement to recommended 2021-05-05 23:06:18 +02:00
Sara Arjona 9aad1581bc Merge branch 'MDL-71517-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-05 12:17:43 +02:00
Sara Arjona 56882a76d1 Merge branch 'MDL-71187-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-05-05 12:14:13 +02:00
Víctor Déniz 14c8b8bd56 Merge branch 'MDL-71460-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-05-05 10:43:08 +01:00
Luca Bösch e66bf8a5c1 MDL-71187 quizaccess_seb: Change "Launch Safe Exam Browser" to a href.
In order to allow for correct seb:// or sebs:// calls without browser
warnings of insecure links, it is not possible to send a get request
with an attached cmid parameter to the unknown seb:// or sebs://
URL via a form button.
We've got to use a <a href> link outside a form to circumvent
browsers warning of an insecure link and call Safe Exam Browser
correctly.
2021-05-05 10:54:34 +02:00
Leon Stringer 01aee79df0 MDL-70181 database: Quote database object names
Table names and database name now enclosed in backticks.
admin/cli/mysql_collation.php failed if $CFG->prefix was blank with
MySQL 8.0 because table 'groups' conflicted with a new reserved word.

Note that this quotes both mysql_collation.php and mysql_compressed_rows.php
but only the former was mal-functioning.

The case of mysql_compressed_rows.php is a little bit special because
not all tables are processed, only those having big rows. And the groups
table is not one of them. In any case, better add the quotes there for
any future case.

Also, when testing this patch https://tracker.moodle.org/browse/MDL-71512
was discovered and will need to be fixed to make core 100% compliant
with MySQL 8.0 and MariaDB 10.6 and up.
2021-05-05 10:16:54 +02:00
Peter Dias e3b4f6d3fd MDL-71460 hub: Use checkboxes instead of dropdowns
Change the yes/no dropdowns to a checkbox. Defaults to unchecked.
2021-05-05 10:27:28 +08:00
Víctor Déniz 73d36ebafa Merge branch 'MDL-70864-310-zip_packer_windows' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-05-05 00:03:40 +01:00
Eloy Lafuente (stronk7) d73d9dd99f Merge branch 'MDL-71425-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-05-04 23:39:50 +02:00
Paul Holden 301f78c282 MDL-71359 mod_forum: empty forums shouldn't export anything. 2021-05-04 17:22:47 +02:00
Sara Arjona 373c263482 MDL-71408 h5plib_v124: Add required changes after lib upgrade
- The mbstring extension is required since Moodle 3.9 onwards so
the upgrading steps have been removed because they are not
required any more.
- The pull-request for fixing some minor PHP7.4 problems has been
integrated so this patch is not required.
2021-05-04 17:22:47 +02:00
Sara Arjona ac7cd6c603 MDL-71408 h5plib_v124: Upgrade H5P core library to 1.24.02 2021-05-04 17:22:47 +02:00
Huong Nguyen 62b4ebab51 MDL-70720 Quiz: Improve capability checks when fetching users' best grades 2021-05-04 17:22:47 +02:00
Shamim Rezaie abbda5d025 MDL-69028 repository: Put a rate limit on draft file uploads 2021-05-04 17:22:47 +02:00
Paul Holden 0debb3cac0 MDL-71130 quiz_grading: escape user idnumber on display. 2021-05-04 17:22:47 +02:00
David Mudrák 9f4404e80d 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-05-04 17:22:47 +02:00
Sara Arjona d9af87d70a Merge branch 'MDL-71274-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-05-04 17:10:48 +02:00
David Mudrák 804f1f5ac7 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 16:56:09 +02:00
Helen Foster 23f0d09ec7 MDL-71425 lang: Import fixed English strings (en_fix) 2021-05-04 16:48:21 +02:00
Paul Holden 641b678d4b MDL-71517 mod_data: remove invalid form custom data access.
On PHP7.4, trying to access array offsets of NULL triggers a notice.
2021-05-04 15:35:46 +01:00
Luca Bösch 5183181f94 MDL-70786 report_loglive: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch b74abdbea1 MDL-70786 report_log: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch a11c2cb391 MDL-70786 report_completion: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch 204748856a MDL-70786 report_competency: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch 8962bd76c3 MDL-70786 report_progress: respect fullname setting. 2021-05-04 14:19:17 +02:00
Luca Bösch 8a07e2f53d MDL-71268 graphics: Use new Moodle logo for RSS feeds by Moodle 2021-05-04 14:15:29 +02:00
Sara Arjona 3de329785d weekly release 3.10.3+ 2021-05-04 13:27:55 +02:00
Sara Arjona 63a4a88dd1 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-05-04 13:27:55 +02:00
Adrian Greeve 4f46b8449b Merge branch 'MDL-66673-MOODLE_310_STABLE' of https://github.com/ScottVerbeek/moodle into MOODLE_310_STABLE 2021-05-04 15:47:33 +08:00
AMOS bot 72c300facf Automatically generated installer lang files 2021-05-04 00:07:31 +00:00
Eloy Lafuente (stronk7) c96074aafd Merge branch 'MDL-71463-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-05-03 19:01:01 +02:00
David Mudrák 7f507d94d9 MDL-70864 files: Fix zip_packer extracting files with trailing dots
File and folder names cannot end with dots on Windows. So replace the
trailing dots with underscore consistently with how some other zip tools
(such as 7-zip) handle this case.
2021-05-03 18:14:17 +02:00
Marina Glancy 6211bc0be5 MDL-71390 core: raise max_input_vars requirement for Moodle 3.11 2021-05-03 13:25:36 +02:00
Adrian Greeve 6dc0b43072 Merge branch 'MDL-71440-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-05-03 16:04:36 +08:00
Mihail Geshoski 502076cde6 MDL-71440 mod_assign: New capability for viewing the submission summary
Creates a new capability mod/assign:viewownsubmissionsummary which will
be required in order to display the submission summary to the user in
the assignment page.
2021-05-03 15:32:21 +08:00
Jake Dallimore 79368aaa6a Merge branch 'MDL-52724-310' of git://github.com/merrill-oakland/moodle into MOODLE_310_STABLE 2021-05-03 13:25:36 +08:00
Víctor Déniz 5431063238 Merge branch 'MDL-69956-310' of https://github.com/dcai/moodle into MOODLE_310_STABLE 2021-05-01 13:43:19 +01:00
Víctor Déniz 36764c36c0 weekly release 3.10.3+ 2021-04-30 12:54:29 +01:00
Rajneel Totaram f902e75bae MDL-71343 core_h5p: Convert all line-endings to UNIX format 2021-04-30 23:45:21 +12:00
Andrew Nicols 8fd5eb7be5 MDL-71343 core_h5p: Add unit test for helper::parse_js_array
Signed-off-by: Rajneel Totaram <rjnlfj@yahoo.com>
2021-04-30 23:40:49 +12:00
Dongsheng Cai 8399b45fd0 MDL-69956 forum: throw exception when advanced grading is not ready 2021-04-30 14:59:36 +10:00
Adrian Greeve dc783d3d5e Merge branch 'MDL-71481-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-30 11:19:46 +08:00
Jun Pataleta aaaf3abc4d Merge branch 'MDL-70947-310' of git://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2021-04-30 10:34:24 +08:00
Sara Arjona 9a36fe6886 Merge branch 'MDL-60331-310_take3' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-04-29 17:49:55 +02:00
Paul Holden 1b8ccba1f2 MDL-71463 dml: escape square brackets for SQL Server LIKE operator. 2021-04-29 13:49:28 +01:00
Amaia Anabitarte 723ffea626 MDL-71274 analytics: Don't generate insight for hidden courses
Hidden courses can be used for training
but we do not want to generate insights for them
because students do not have access to hidden courses.
This was fixed in MDL-66806 for "Students at risk" model.
Fixed for "Students who have not accessed the course recently" in this issue.
2021-04-29 11:13:02 +02:00
Paul Holden 0c57ffc2b5 MDL-71481 repository_flickr_public: return more file data.
A HTTP HEAD request is required to get the image filesize.
The remaining data can be obtained from existing calls to
the Flickr API.
2021-04-29 09:49:16 +01:00
Huong Nguyen f3ae9f9d45 MDL-70947 File upload: Upload protection
Interacts badly with double-submit protection, and not all uploads protected
2021-04-29 15:32:12 +07:00
Sara Arjona 3bffbfabb5 Merge branch 'MDL-71016-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-29 09:21:52 +02:00
Jun Pataleta 3afeaed3ff Merge branch 'MDL-70863-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2021-04-29 15:05:15 +08:00
Andrew Nicols c05862dc9a Merge branch 'MDL-56609_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-29 09:41:59 +08:00
Víctor Déniz 9cd78a8b4f Merge branch 'MDL-71200-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 20:53:49 +01:00
Paul Holden 8f630db213 MDL-71016 gradeexport_xml: ensure user/grade idnumbers are encoded. 2021-04-28 19:03:56 +01:00
Luca Bösch 689d10b02b MDL-60331 questions: prevent double escaping question categories. 2021-04-28 17:32:27 +02:00
Sara Arjona 71f40d0018 Merge branch 'MDL-70979-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 13:06:18 +02:00
Sara Arjona b9f9758f5e Merge branch 'MDL-71127-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 12:58:28 +02:00
Sara Arjona 9e19f3c1f5 Merge branch 'MDL-70763-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 12:36:36 +02:00
Septatrix 8f0daf43b7 MDL-70110 assign: add group submission attemptnumber test 2021-04-28 11:50:24 +02:00
Sara Arjona fa72038987 Merge branch 'MDL-71244-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-04-28 09:17:39 +02:00
Andrew Nicols 6679c41c89 Merge branch 'MDL-71168-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-28 10:50:19 +08:00
Andrew Nicols 1ed97439dd MDL-70909 mod_h5pactivity: Whitespace fix 2021-04-28 10:33:29 +08:00
Andrew Nicols 17625bd5b2 Merge branch 'MDL-70909-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2021-04-28 10:26:41 +08:00
Andrew Nicols 475ea093b4 Merge branch 'MDL-71386-310' of git://github.com/NoelDeMartin/moodle into MOODLE_310_STABLE 2021-04-28 10:15:54 +08:00
Eloy Lafuente (stronk7) 40d45ede41 MDL-56609 phpunit: Fix bogus expectation on DST changes day
Current test works ok every day of the year but the day of
DST begin changes (last Sunday of March currently).

That day, 01:00 Europe/London simply doesn't exist, because
the time is moved forward by 60 minutes.

Hence the expectation for the next cron execution is not 1 "normal"
day (24h) but 1 less hour.

Note this only happens for the current test on DST begins, the
opposite change (DST ends), happening the last Sunday of October
is not affected, because, at all effects, 01:00 is a perfectly normal
and existing hour.
2021-04-27 18:31:01 +02:00
Luca Bösch 6651b3f940 MDL-71244 enrol_manual: Add bootstrap classes to buttons 2021-04-27 17:26:24 +02:00
Ferran Recio e1ac84a458 MDL-70909 mod_h5pactivity: fix reports on freeze context 2021-04-27 15:35:39 +02:00
Sara Arjona ff833a08de weekly release 3.10.3+ 2021-04-27 15:14:58 +02:00
Adrian Greeve d426ee3ccc Merge branch 'MDL-71329-310' of https://github.com/Chocolate-lightning/moodle into MOODLE_310_STABLE 2021-04-27 09:35:52 +08:00
Víctor Déniz 813338182c Merge branch 'MDL-65687-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-27 01:13:18 +01:00
Víctor Déniz 5e7f937481 Merge branch 'MDL-71003-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-27 00:37:00 +01:00
Sara Arjona 1bbfbd7444 Merge branch 'MDL-70917-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-26 15:18:12 +02:00
Sara Arjona 0f308b0df1 Merge branch 'MDL-71416-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-26 12:35:50 +02:00
Eloy Lafuente (stronk7) fea40706b1 Merge branch 'MDL-70446-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-04-26 10:45:16 +02:00
Paul Holden eb60ece090 MDL-71434 mod_data: add form control class to template textarea. 2021-04-25 18:35:04 +01:00
Tim Schroeder 062dc30ffd MDL-70110 assign: fixed ws get_submissions for groups 2021-04-24 12:11:15 +02:00
Paul Holden a834862ce4 MDL-71416 report_log: user context header should show users name.
Co-Authored-By: Luca Bösch <luca.boesch@bfh.ch>
2021-04-23 20:24:34 +01:00
Sara Arjona e148629f48 weekly release 3.10.3+ 2021-04-23 10:47:03 +02:00
Mathew May 8e750158a0 MDL-71329 tool_moodlenet: Check to see if we get errors before curl 2021-04-23 15:49:55 +08:00
Jun Pataleta 78ea26ad7b Merge branch 'MDL-71171_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-04-23 12:40:47 +08:00
Mark Nelson b58a1b9e34 MDL-71171 customfield_text: ensure we set defaults properly 2021-04-23 12:37:38 +08:00
Andrew Nicols 298a70eba1 Merge branch 'MOODLE_310_STABLE-MDL-71376' of https://github.com/rjnl/moodle into MOODLE_310_STABLE 2021-04-23 11:53:24 +08:00
Andrew Nicols 0e301e88a5 Merge branch 'MDL-70970-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-23 11:39:04 +08:00
ScottVerbeek 4b9b0839b6 MDL-66673 groups: Stop notice when messaging system is disabled 2021-04-23 08:54:38 +10:00
Ferran Recio d7d94cf30f MDL-70909 behat: context freeze and not freeze steps 2021-04-22 15:51:36 +02:00
Sara Arjona 72b6d0be84 Merge branch 'MDL-71136_310' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-04-22 13:56:49 +02:00
Sara Arjona fa2d1ab5d3 Merge branch 'MDL-71400-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-04-22 13:16:38 +02:00
Ferran Recio 78aabd1e28 MDL-70909 core: add cannotmatchanyrows to capabilities join 2021-04-22 13:10:37 +02:00
Jun Pataleta 72e7b87b92 Merge branch 'MDL-71170_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-04-22 18:55:12 +08:00
Noel De Martin 3a83f57043 MDL-71386 behat: Support for 3.9.5+ mobile app 2021-04-22 12:16:01 +02:00
Paul Holden 2a706c3e5c MDL-71200 mod_folder: ensure "Download folder" option is backed up. 2021-04-22 10:29:12 +01:00
Paul Holden faaa25b5cc MDL-70979 search: validate external user search parameters.
Clean return value in unit test for same.
2021-04-22 10:22:57 +01:00
Mihail Geshoski 6b5a1b02fe MDL-71400 assignfeedback_offline: Fix message after worksheet upload 2021-04-22 13:08:52 +08:00
Jun Pataleta 96ddfecda3 Merge branch 'MDL-71156-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-04-22 11:53:39 +08:00
Simey Lameze 94259f8a7d MDL-71156 core: machinery to recover orphaned calendar events
The machinery to fix orphaned calendar events that were broken by MDL-67494.

The solution consists of:

1) Upgrade step that checks if this site has executed the problematic upgrade steps and
   if positive, it will schedule a new run for calendar_fix_orphaned_events adhoc task.

2) Adhoc task that will self-spawn calling the recovery machinery, running until
   all the orphaned calendar events are fixed. It also sets the maximum runtime of
   60 seconds. It is also possible to override that number by specifing the desired
   number setting the ->calendareventsmaxseconds in your config.php

3) CLI script that will look for all the calendar events which userids
   where broken by a wrong upgrade step, affecting to Moodle 3.9.5
   and up.

   It performs checks to both:
     a) Detect if the site was affected (ran the wrong upgrade step).
     b) Look for orphaned calendar events, categorising them as:
       - standard: site / category / course / group / user events
       - subscription: events created via subscriptions.
       - action: normal action events, created to show common important dates.
       - override: user and group override events, particular, that some activities support.
       - custom: other events, not being any of the above, common or particular.

   By specifying it (--fix) try to recover as many broken events (missing userid) as
   possible. Standard, subscription, action, override events in core are fully supported but
   override or custom events should be fixed by each plugin as far as there isn't any standard
   API (plugin-wise) to launch a rebuild of the calendar events.

4) Unit tests and helper functions to generate calendar events. We have decided to
   keep the tests simple, testing only true and false and not using data generators because
   the code is purely to recover the calendar events and won't turn into an API or something
   and also due to the urgency of this issue.
   The helpers have been created in calendar/tests/helpers.php since there are no data generators
   for calendar.
2021-04-22 10:43:37 +08:00
Andrew Nicols 855e7e9ede Merge branch 'MDL-70412-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-04-22 10:07:57 +08:00
Neill Magill e6725b8cbb MDL-64336 assign: Add missing PHP doc 2021-04-21 17:21:19 +02:00
Neill Magill bd80f68c11 MDL-64336 assign: Teachers should be able to see all submissions
Before this change a teacher would be able to see users listed if:

* They have an active enrolment and can submit
* They have an an inactive enrolment for a role that can submit

After this change they will additonally be able to see users listed:

* That have an active enrolment and have submitted
* That have an inactive enrolment and have submitted

This means that if an assignment has it's context frozen all users
that have made some form of submission will still be listed.

It will also apply if the submission capability is removed from a
user.

If a user's enrolment is deleted they will not be listed.

The submission and grading counts have also been updated so
they will reflect the new rules.
2021-04-21 17:15:54 +02:00
Neill Magill dbcfda9641 MDL-64336 assign: Submissions should be visible while frozen
Before this change if a student visited an assignment that is
frozen they would only see the title and description even if
they had made a submission to it.

After the change they will be able to see the status of their
submission and any feedback and grades they have recived.

It will also make the Moodle app recognise that submission
should not happen because the assignment is frozen.

Tests based on ones created by Andrew Nicols
2021-04-21 17:15:45 +02:00
Sara Arjona b62526d0ad Merge branch 'MDL-62244_310_label_view' of https://github.com/sheesania/moodle into MOODLE_310_STABLE 2021-04-20 17:45:06 +02:00
Sara Arjona d9293c77bc weekly release 3.10.3+ 2021-04-20 15:51:19 +02:00
Sara Arjona 6f9415fea0 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-04-20 15:51:18 +02:00
Paul Holden 647020f584 MDL-70970 quizaccess_seb: consistent property array sorting by key.
In PHP8.0 using `ksort` was producing incorrect results by sorting
keys differing only in case in the wrong order. This change makes
sorting consistent between PHP versions.

Co-Authored-By: Tim Hunt <T.J.Hunt@open.ac.uk>
2021-04-20 14:36:19 +01:00
Rajneel Totaram afc20e7caa MDL-71376 mod_quiz: fix undefined object reference 2021-04-20 20:13:40 +12:00
Jun Pataleta 6d82a01438 Merge branch 'MDL-71364_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-20 09:23:43 +08:00
AMOS bot 3e47cdda94 Automatically generated installer lang files 2021-04-20 00:07:27 +00:00
Víctor Déniz 7ccaf08d5a Merge branch 'MDL-71087-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-04-19 23:45:02 +01:00
Eloy Lafuente (stronk7) 5d309ef2a8 Merge branch 'MDL-69256-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-04-20 00:05:05 +02:00
Víctor Déniz ce023afec9 Merge branch 'MOODLE_310_STABLE_fix_gradeimport_csv' of https://github.com/intrajp/moodle into MOODLE_310_STABLE 2021-04-19 22:49:09 +01:00
Dongsheng Cai fdb9a664f6 MDL-68747 mod_quiz: force LTR for quiz grading overview chart 2021-04-19 21:06:37 +10:00
Sara Arjona 79d705df64 Merge branch 'MDL-71365_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-19 10:18:39 +02:00
Paul Holden 73e9259c10 MDL-71127 mod_quiz: fix thrown exception for invalid question columns. 2021-04-19 09:07:13 +01:00
Paul Holden 785cf4fb22 MDL-71168 report_participation: fix select all users checkbox. 2021-04-19 09:05:13 +01:00
Sara Arjona c30923d77d Merge branch 'MDL-66475-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-19 09:49:23 +02:00
Sara Arjona ea388d74ab Merge branch 'MDL-65553-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-04-19 08:53:45 +02:00
AMOS bot 61d1af0818 Automatically generated installer lang files 2021-04-18 00:07:25 +00:00
Eloy Lafuente (stronk7) 93960101e9 MDL-71365 grunt: fix ignores missing LF @ EOF 2021-04-18 00:44:06 +02:00
Eloy Lafuente (stronk7) 26e8b4a0fa MDL-71364 behat: fix randomness causes by "now" advancing
Some recent tests do set a date time element
to ##now## or tomorrow and, immediately after that
the look if, effectively, ##now## and #tomorrow#
have been set (with minutes resolution).

Problem is that, between the field is set and the field
is verified, it can happen that the time advances to
next minute (from H:M:59 to H:M+1:00) and then the
assertion fails.

To avoid this, we could have lowered the resolution to be
hours... but that doesn't solve the problem just makes it
to happen less often.

So, instead of that... we are setting the 2 now and tomorrow
cases to be "today noon" and "tomorrow noon" (12:00:00) so
we ensure they won't be ever in the risk of jumping of minute.
2021-04-17 12:33:32 +02:00
Eloy Lafuente (stronk7) a1523774bc Merge branch 'MDL-70099-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-17 09:40:37 +02:00
Sara Arjona 7c1feb97b2 weekly release 3.10.3+ 2021-04-16 17:03:33 +02:00
Sara Arjona 26e00f4640 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-04-16 17:03:32 +02:00
Andrew Nicols bf4038a971 Merge branch 'MOODLE_310_MDL-71233' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-04-16 12:08:51 +08:00
Andrew Nicols 10c4a67760 Merge branch 'MDL-60490-missing_close_div-310' of https://github.com/leonstr/moodle into MOODLE_310_STABLE 2021-04-16 11:54:13 +08:00
Andrew Nicols def3f4a074 Merge branch 'MDL-69415-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-04-16 11:27:06 +08:00
Amaia Anabitarte 71613b1055 MDL-70412 groups: Improving create_group data generator
Increasing the size of the name for generated groups
to ensure we don't have problems with ordering.
2021-04-15 16:57:23 +02:00
Amaia Anabitarte db374d6a80 MDL-65553 core_analytics: Don't allow to flag predictions several times
Even if a prediction is hidden from the report once is flagged,
it can be flagged several times if the user visits detailed view via URL.
We remove the checkbox to select a prediction and flag it
once it has already been flagged.
2021-04-15 16:39:09 +02:00
Jake Dallimore 6958a078a6 Merge branch 'MDL-71338-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-15 14:42:44 +08:00
Jake Dallimore 5566bfe436 Merge branch 'MDL-71119-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-04-15 08:32:29 +08:00
AMOS bot 40cdfc58fc Automatically generated installer lang files 2021-04-15 00:07:34 +00:00
Paul Holden 416b25fc77 MDL-71338 tool_usertours: correct Content-Type on tour export.
Replace existing code with standard file serving mechanism, in
turn correcting the previously incorrect Content-Type header.
2021-04-14 21:12:02 +01:00
Eloy Lafuente (stronk7) ae88411798 Merge branch 'MDL-70616-310-fixed' of https://github.com/izendegi/moodle into MOODLE_310_STABLE 2021-04-14 12:45:23 +02:00
Iñigo Zendegi 909c977e00 MDL-70616 gradingform_rubric: Filters not applied to rubric name 2021-04-14 11:51:11 +02:00
Sara Arjona 3306411314 MDL-71119 core_badges: Add more information to errors
Some errors raised when calling external services were ignored.
Displaying this information helps to debug and find the real reasons
why some action, like connecting to an external backpack, can't be
done.
2021-04-14 11:04:06 +02:00
Sara Arjona 4203a0389e MDL-71119 core_badges: Use basicauth and remove urlencode
Basic authorization header is required to get token. Besides, client
id and secret shouldn't call urlencode.
2021-04-14 11:01:27 +02:00
Sara Arjona 2d308243f4 MDL-71119 core_badges: Initialise scopes param in backpack-connect.php
The scopes parameter should be passed when creating the OAuth2 badges
client. As it is an optional parameter, when it's empty, it will
be initilised with the supported scopes for the backpack issuer.

It will happen, for instance, when a call is done to oauth2callback.php
because, as defined in RFC6749, OAuth2 authorization response only
supports code and state.
2021-04-14 11:01:27 +02:00
Paul Holden 6a7baaced0 MDL-70772 mod_forum: check for valid usernode before making active. 2021-04-14 09:20:20 +01:00
Andrew Nicols 0c611e0a13 Merge branch 'MDL-71154_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-14 12:11:21 +08:00
AMOS bot 905511e816 Automatically generated installer lang files 2021-04-14 00:07:28 +00:00
Eloy Lafuente (stronk7) d883536e6f MDL-71154 ci: Prevent upstream branches and tags to be built
Both for travis and GHA:

- master and MOODLE_XXX_STABLE branches
- any vX.Y.Z tag

won't lead to a build anymore.
2021-04-13 16:55:50 +02:00
Eloy Lafuente (stronk7) 653d6f0229 weekly release 3.10.3+ 2021-04-13 10:26:39 +02:00
Eloy Lafuente (stronk7) 4ab41d6090 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-04-13 10:26:38 +02:00
Eloy Lafuente (stronk7) c50d68cfd9 Merge branch 'MDL-71059-310' of git://github.com/abias/moodle into MOODLE_310_STABLE 2021-04-13 00:42:34 +02:00
Tim Hunt 33d6929e1f MDL-71313 repositories: warn if get_instances context is wrong type 2021-04-12 20:35:02 +01:00
Sara Arjona f4a604e4e2 Merge branch 'MDL-68716-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-12 17:24:46 +02:00
Sara Arjona 0ecc30eb85 Merge branch 'MDL-71264_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-04-12 16:40:16 +02:00
Sara Arjona 4de37cf603 Merge branch 'MDL-70595-310' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-04-12 16:01:40 +02:00
Sara Arjona dda7890857 Merge branch 'MDL-71107-10' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-04-12 12:41:16 +02:00
Eloy Lafuente (stronk7) b470f7b246 Merge branch 'MDL-69102-310' of https://github.com/martygilbert/moodle into MOODLE_310_STABLE 2021-04-12 00:02:05 +02:00
Eloy Lafuente (stronk7) f5087ef548 MDL-69102 phpunit: Add test to cover ALL cohort criteria
That way we can check that the expectations are
working ok for every database. Previously only the
ANY case was being tested.

Also, convert them to course badges and check, via
review_all_criteria() that the SQL structures returned
by award_criteria_cohort->get_completed_criteria_sql()
doesn't fail and return the expected counters.
2021-04-10 12:38:46 -04:00
Issam Taboubi 7e146f752a MDL-71303 core: HTML not escaped in block skip link 2021-04-09 17:31:27 -04:00
AMOS bot ece30526dd Automatically generated installer lang files 2021-04-09 00:07:31 +00:00
Eric Merrill a3fa31fa21 MDL-52724 editor_atto: Scrub atto html for invalid ol, ul, and li tags
Try to correct broken ul/ol/li tags, as they have an outsized impact
on course layout. Uses basic regex and loops to track open and closed
tags.

Also adds a deep clean option to the HTML cleaner, that runs less
frequent, more intensive cleanings. This is because normally _cleanHTML
gets called after each keystroke, which could cause problems with
large content on weak systems.

Behat changes are a fix for setting multiline strings in Atto, and
creating a multiline match step.
2021-04-08 15:30:50 -04:00
Eloy Lafuente (stronk7) 06b3ac6ca1 Merge branch 'MDL-70802-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-04-08 18:37:39 +02:00
Víctor Déniz 4c8c9a4c4b Merge branch 'MDL-71116-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-04-08 01:05:55 +01:00
Amaia Anabitarte 538c8eddb5 MDL-71107 core_contentbank: Behat test. Authoring when copying a course 2021-04-07 10:03:37 +02:00
Amaia Anabitarte fafed9dc90 MDL-71107 core_contentbank: Fill content author when copying a course
'usercreated' and 'usermodified' fields can not be always mapped.
We are filling those fields with 'old' users when working on the same
site, or with current user when working on a different instance.
2021-04-07 10:03:37 +02:00
Peter Burnett c2661e3ffc MDL-70233 cache: Disabled factory now gets writer from parent 2021-04-07 15:32:44 +10:00
Alex Rowe 1611b30b1c MDL-70049 assign: count_submissions_need_grading call when can't grade 2021-04-07 08:57:05 +10:00
Eloy Lafuente (stronk7) 69455d835c Merge branch 'MDL-70959-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-04-06 22:29:07 +02:00
Eloy Lafuente (stronk7) c33060d008 Merge branch 'MDL-68635-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-06 22:23:42 +02:00
Víctor Déniz 10f934e300 Merge branch 'MDL-71128-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-04-06 19:51:02 +01:00
Michael Hawkins 9d63efed82 MDL-70595 core: Updated security.txt expiry 2021-04-06 13:13:45 +08:00
AMOS bot da5111e321 Automatically generated installer lang files 2021-04-06 00:07:37 +00:00
Paul Holden ebfe1d5945 MDL-70099 enrol: increase accuracy of current enrolments by date.
By rounding the current time it was possible that the most recently
created user enrolments (e.g. self enrolments) were being excluded.

This would manifest itself in a user being enrolled on a course,
but it not appearing under "My courses" navigation or on their own
Dashboard until the rounded time had caught up with the current
time.
2021-04-05 19:32:15 +01:00
Paul Holden 359cc7e787 MDL-71003 user: fix alignment of autocomplete participant filters. 2021-04-04 23:21:25 +01:00
Paul Holden 981784000d MDL-70917 tool_behat: fix profile/replace option comparison.
The `isset` call always returned true for the 'replace' option,
because even if not specified it receives a non-null value. The
`strpos` call now does a strict equality check rather than
greater-than-or-equal (which always returns true).
2021-04-04 23:18:37 +01:00
Paul Holden 542a7490f2 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-04 23:15:43 +01:00
Paul Holden e44ae4df58 MDL-70763 quiz_overview: export preferences for correct user. 2021-04-04 23:15:43 +01:00
Paul Holden e89432fb19 MDL-70763 gradereport_grader: export preferences for correct user. 2021-04-04 23:15:43 +01:00
Paul Holden 3e30dffa31 MDL-66475 task: fix random timing failures in logger cleanup test. 2021-04-04 23:12:38 +01:00
AMOS bot e084f4c0b4 Automatically generated installer lang files 2021-04-04 00:07:33 +00:00
Eloy Lafuente (stronk7) 215851c4c0 MDL-71264 behat: Change date(time) element update order
This includes 2 change to the order date(time) elements are filled,
each one addressing one type of problem, where current order is
problematic and can lead to unexpected dates.

1) Changing date, when current month only has X days and target
   month has more than X days. Example, being 1 April, change
   the date to 31 May.
     This is solved by changing the order of introduction
     from current D => M => Y to Y => M => D.
2) Changing date, when target month only has X days and current
   month has more that X days. Example, being 31 March, change
   the date to 28 Feb.
     This is solved by always setting the D to 1, before the
     Y => M => D sequence commented @ 1) begins.
2021-04-03 18:10:04 +02:00
Eloy Lafuente (stronk7) f751383a15 MDL-71264 behat: New feature covering all day/month/year date changes
Because of the order that dates and datetimes are filled by behat
sometimes there are some intermediate results that are impossible
and then the form (javascript) automatically reacts and fixes the
date, ultimate leading to a different date that the one we wanted
to set with Behat.

This is noticeable when switching between months (with some day
being the last day of the month) and the 2 months have a different
number of days. For example April date => March date (or the opposite).

This test covers all the critical changes (day, month and year),
back and forth. All times are Perth/Australia.
2021-04-03 10:59:45 +02:00
AMOS bot ab1207e8eb Automatically generated installer lang files 2021-04-02 00:07:25 +00:00
Marty Gilbert 5ef3241ae3 MDL-69102 badge: Fixes broken WHERE clause
When buildilng the 'WHERE' clause, the SQL generated
a query that selected any user who was a member of the
**last** group, not all of the groups.

I believe the query has to be re-worked so that it only
returns users who are in ALL of the groups. This can
be done by a GROUP BY and HAVING.
2021-04-01 14:51:21 -04:00
Alison Blomenberg eebc6ba6a8 MDL-62244 Resource: label view redirects to label, not course 2021-04-01 11:54:48 -06:00
Leon Stringer 6cd746cb4d MDL-60490 tool_lp: Missing div close
Mustache template had opening <div> with missing </div>.
2021-04-01 12:18:13 +01:00
sam marshall 6877043d8c MDL-70446 search_solr: File indexing can fail due to multipart upload
Due to Solr bug SOLR-15039, uploading files for indexing can fail if
it uses multipart upload. This changes it to use direct binary upload.

Unfortunately, the direct binary version in PHP curl only supports a
string, so we have to load the file into memory. I added extra code to
restrict the size of files indexed to (memory limit - 100MB), which is
usually 284MB unless configured differently because cron runs under
MEMORY_EXTRA.
2021-04-01 11:40:36 +01:00
AMOS bot 2c249dbee1 Automatically generated installer lang files 2021-04-01 00:07:27 +00:00
Juan Leyva 6c14348b41 MDL-70863 mod_forum: Allow NULL in timecreated 2021-03-31 17:49:58 +02:00
Víctor Déniz c7b4cf91f8 weekly release 3.10.3+ 2021-03-30 15:37:42 +01:00
Víctor Déniz 3bc49b14bf Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-03-30 15:37:41 +01:00
Paul Holden f4e28ca6c2 MDL-65687 message: increase confirmation dialog zindex.
Make sure that confirmation dialogs (such as block/unblock user,
delete conversation) are shown with prominence in the messaging
drawer.
2021-03-30 10:50:48 +01:00
Tomo Tsuyuki ed1ce9cf9b MDL-71136 backup: Fix moodle_exception path. 2021-03-30 10:56:09 +11:00
Mikhail Golenkov 31530a2730 MDL-71233 backup: Fix Moodle version for MDL-69418 2021-03-30 10:45:14 +11:00
Paul Holden 82babe08ea MDL-68635 tool_cohortroles: observe user initial table filter. 2021-03-29 14:12:17 +01:00
Paul Holden 76e39a9c2a MDL-68716 mod_forum: extra column sorting options in privacy export.
Accounts for extra sort options that were added in bc23cbaf.
2021-03-29 14:05:37 +01:00
Eloy Lafuente (stronk7) f41360dd50 Merge branch 'MDL-70963-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-03-29 12:39:56 +02:00
Andrew Nicols 838190a43a Merge branch 'MDL-71004_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-03-29 11:54:27 +08:00
AMOS bot e2b34c37bd Automatically generated installer lang files 2021-03-29 00:07:26 +00:00
AMOS bot 250afa688f Automatically generated installer lang files 2021-03-28 00:07:23 +00:00
Víctor Déniz 325915ef34 Merge branch 'MDL-70537-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-03-26 20:15:29 +00:00
Sara Arjona fec16e68c9 MDL-70963 core_badges: Use expected JSON format for OBv2.1
This patch adds some changes to guarantee that OpenBadges 2.1 (OBv2.1)
will return always the same JSON format that OBv2.0 (because the only
difference between both versions it's the BadgeConnect API).
2021-03-26 09:02:18 +01:00
Shintaro Fujiwara c906a33e1e MDL-69304 gradeimport_csv: Validate if the user id is numerical. 2021-03-26 10:31:40 +09:00
Víctor Déniz e8a5efe835 Merge branch 'MDL-71194-310' of git://github.com/NoelDeMartin/moodle into MOODLE_310_STABLE 2021-03-25 15:15:09 +00:00
Noel De Martin aa07315267 MDL-71194 behat: Fix app tests 2021-03-25 13:51:01 +01:00
Andrew Nicols d4de6e594d Merge branch 'MDL-70980-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2021-03-25 08:07:41 +08:00
AMOS bot 14138237ee Automatically generated installer lang files 2021-03-25 00:07:27 +00:00
Eloy Lafuente (stronk7) ef7fcf4261 Moodle release 3.10.3 2021-03-24 20:13:09 +01:00
Eloy Lafuente (stronk7) 0e74a6c0c5 MDL-71004 git: Ignore moodle-plugin-ci.phar in any directory 2021-03-24 20:10:34 +01:00
Víctor Déniz fa85c3b806 weekly release 3.10.2+ 2021-03-24 14:21:00 +00:00
Eloy Lafuente (stronk7) 8518f6307f Merge branch 'MDL-71182-310-2' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-03-24 10:50:23 +01:00
Simey Lameze 0c799ad2e1 MDL-71182 calendar: add logic for category events in get_context
This commit adds the missing logic for category events in
get_context() method. Without this fix, users will get errors
if they have category events with userid set to 0.
2021-03-24 17:34:31 +08:00
Andrew Nicols 06c9de6b05 MDL-70802 javascript: Normalise component consistently in templates 2021-03-24 11:18:33 +08:00
Simey Lameze 7a09d64104 MDL-71182 calendar: Revert "Merge branch 'MDL-67494-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE"
This reverts commit 5a407772c7, reversing
changes made to 82f2fe02e6.
2021-03-24 09:22:04 +08:00
Víctor Déniz 5f7136f17c Merge branch 'MDL-71022-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-23 23:01:31 +00:00
Víctor Déniz 3278f5ca50 Merge branch 'MDL-70727-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-03-23 18:24:19 +00:00
Andrew Nicols 43520e3eaa Merge branch 'MDL-71039-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-03-23 11:18:39 +08:00
Andrew Nicols 107244cf20 Merge branch 'MDL-69036-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-23 09:54:42 +08:00
Andrew Nicols 7cb384756e Merge branch 'MDL-67870-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-03-23 09:24:54 +08:00
Andrew Nicols a8d18f88a1 MDL-69256 tests: Fix random slow test failures in completion cron 2021-03-23 08:08:29 +08:00
Mark Nelson a87f5b6e8c MDL-71170 customfield_text: use correct error string 2021-03-22 21:56:48 +08:00
Sara Arjona 9e52a6a0e1 MDL-69415 core_h5p: prepend H5P libraries in autoloader
Core and mod_hvp are using the same namespace for some H5P
libraries. This is causing some random errors.
In order to get the expected behaviour in Moodle core, this patch
prepends H5P libraries in order to guarantee they are loaded first.
Plugins using same libraries will need to use a different namespace
if they overlap and a different version of these libraries should
be used.
2021-03-22 12:41:02 +01:00
Ferran Recio e21872130d MDL-70980 mod_h5pactivity: fix review mode 2021-03-22 10:58:00 +01:00
Mihail Geshoski 65aceea7ed MDL-67870 backup: Skip value change if setting is locked by hierarchy
The given condition in the if statement did not take into account cases
when the setting is locked by hierarchy. Settings which are locked by
hierarchy should should keep their current values which were inherited
from the parent.
2021-03-22 15:33:47 +08:00
Thinh Pham 3567998cfd MDL-71087 File picker: Focus lost after 'Create folder' 2021-03-22 14:30:43 +07:00
Andrew Nicols 76c6d2f225 MDL-71159 output: Do not run content prefetch during install 2021-03-22 13:15:17 +08:00
Chris Brown 61d4fcc812 MDL-71139 trademark: Improve the trademark messaging 2021-03-22 12:00:28 +08:00
Sara Arjona 0820e24c18 MDL-71116 core_badges: Backpack URLs with more than 50 chars
Backpack URLs (web and API) can have up to 255. However, the form
for creating/editing them, doesn't allow URLs with more than 50
characters. This patch align limitation to DB value (255).
2021-03-19 15:09:07 +01:00
Eloy Lafuente (stronk7) 2b260526fc weekly release 3.10.2+ 2021-03-19 14:06:33 +01:00
Eloy Lafuente (stronk7) 1d38f7c3eb Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-03-19 14:06:31 +01:00
Jun Pataleta 35f368a1b4 MDL-70959 completion: Fix completion_info::get_data() unit tests
* Fixed inverted $sameuser test data.
* Fixed caching expectation check. Caching only relies on whether the
user accessing the completion data is the same user or not.
* Fixed checking for the caching of other modules. Should have been
checking cm ID and not instance ID.
* Additional test case when whole course parameter is passed as
true, but the requesting user is different from the target user.
2021-03-19 11:50:14 +08:00
sam marshall 31aedd4c1c MDL-70537 Availability: Avoid recursive calls to $cm->name
These recursive calls didn't work in PHP 7.3 and below, but in PHP
7.4 they also cause a fatal error which means if you have invalid
availability data, the whole page might die.
2021-03-18 15:56:28 +00:00
Jun Pataleta 348d2c66df Merge branch 'MDL-70992-310' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-03-18 12:23:27 +08:00
Adrian Greeve cdc875c25c Merge branch 'MDL-70924-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-18 11:51:59 +08:00
Adrian Greeve a3c38be96b Merge branch 'MDL-71048-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-18 11:10:13 +08:00
Adrian Greeve 2f1b88412d Merge branch 'MDL-70977-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-18 10:27:24 +08:00
Adrian Greeve a688fc9d6c Merge branch 'MDL-71068-protectusername-confirmed-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2021-03-18 09:46:21 +08:00
AMOS bot 401c241450 Automatically generated installer lang files 2021-03-18 00:07:25 +00:00
Brendan Heywood 6b7850290b MDL-71068 login: Fix edge cases with $CFG->protectusernames 2021-03-17 17:39:43 +11:00
sangnguyen ba0a487685 MDL-70992 Folder: Unnecessary tab stops to the left of files 2021-03-17 09:37:21 +07:00
Paul Holden 147a25d87f MDL-71128 mod_quiz: escape question idnumber on display. 2021-03-16 20:28:48 +00:00
Sara Arjona 0e462101e0 Merge branch 'MDL-44613-integration-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-03-16 08:27:03 +01:00
Mihail Geshoski fae4570571 MDL-44613 mod_assign: Fix behat failure in classic
The link to the calendar page is missing in the navigation block in
classic which causes a behat failure in the 'Set availibility dates
for an assignment' feature. The fix includes adding the calendar block
to the Course page which can be used to navigate to the calendar page.
2021-03-16 11:32:36 +08:00
Adrian Greeve 096b28dee9 Merge branch 'MDL-70780-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-03-16 11:24:29 +08:00
Sara Arjona 4a4912ecbf Merge branch 'MDL-44613-310-1' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-03-15 15:53:58 +01:00
Paul Holden 8c276d003c MDL-70977 mod_forum: fix empty equality check updating post content.
Using the external method for updating posts, the check for empty
subject/message content wasn't correct (disallowed the string '0'),
in addition to being impossible to set a posts message format
property to FORMAT_MOODLE (integer 0).
2021-03-15 12:49:06 +00:00
Paul Holden 23fd19658d MDL-70924 course: ensure required fields present when getting courses. 2021-03-15 12:46:49 +00:00
Mihail Geshoski 2551709dbd MDL-44613 mod_assign: Automate testing of the assignment availability 2021-03-15 20:01:36 +08:00
Mihail Geshoski 9d2f8acfb4 MDL-44613 tool_behat: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in tool_behat behat tests.
2021-03-15 20:01:36 +08:00
Mihail Geshoski 6484e5ae81 MDL-44613 core_message: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in core_message behat tests.
2021-03-15 20:01:36 +08:00
Mihail Geshoski 7726160ef3 MDL-44613 behat: strftime format in time to timestamp transformation
Modifies the 'string time to timestamp' behat trasformation to use
userdate() instead of date(). The userdate() method is generally used
throught Moodle for constructing formatted date strings and this change
will provide more consistency and prevent any potential behat failures.
Therefore, if the date format is defined in the given trasformation, it
has to be strftime compatible. Example:
'I should see "##tomorrow noon##%A, %d %B %Y, %I:%M %p##"'
2021-03-15 20:01:36 +08:00
Adrian Greeve 936f22755c Merge branch 'MDL-70306-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-03-15 11:14:51 +08:00
Peter Dias d199b23598 MDL-70306 auth: Update the thirdpartylib.xml 2021-03-15 11:10:23 +08:00
AMOS bot f2ff9d8256 Automatically generated installer lang files 2021-03-13 00:07:27 +00:00
Jun Pataleta 7eb9ddc5ae MDL-70959 completion: Fix unit tests for get_data()
The unit tests for completion_info::get_data() does not make a lot of
sense with mocking being incorrectly used and the actual functionality
is not being properly tested. I have rewritten the test to use actual
cm_info instances and data providers for better coverage.
2021-03-12 13:34:58 +08:00
Jun Pataleta 3afc0edaf9 MDL-70959 completion: Documentation improvements
* Fix typo in $cm parameter's type in PHPDoc
* Improve the comment to better explain the logic why fetching the
completion data for the whole course can only be done when caching is
used.
Even if $wholecourse is set to true, there's no point in fetching the
completion data for all the course modules unless we're caching the
results.
2021-03-12 13:34:55 +08:00
Sara Arjona 6b804f9e1f weekly release 3.10.2+ 2021-03-11 17:18:50 +01:00
Sara Arjona 201734b465 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-03-11 17:18:49 +01:00
Adrian Greeve cb8a282e05 Merge branch 'MDL-66025-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-11 11:40:39 +08:00
Adrian Greeve 3f1a70c171 Merge branch 'MDL-71026-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-03-11 11:02:44 +08:00
Eloy Lafuente (stronk7) dc9f2d2509 Merge branch 'MDL-70726-3.10' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_310_STABLE 2021-03-11 00:11:52 +01:00
Eloy Lafuente (stronk7) acd3b26df0 Merge branch 'MDL-70789-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-10 23:52:54 +01:00
Eloy Lafuente (stronk7) d5e880ca73 Merge branch 'MDL-70967-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-03-10 23:35:08 +01:00
AMOS bot f1e7a22672 Automatically generated installer lang files 2021-03-10 00:07:21 +00:00
Paul Holden 2730c1a987 MDL-69036 theme_boost: consistent table row hovering for links.
When hovering over table rows with the `dimmed_text` class we
should consistently set the text/link colour.

Co-Authored-By: Mikel Martín <mikel@moodle.com>
2021-03-09 16:22:42 +00:00
Andrew Nicols 3f87850bc2 MDL-70780 customfield: Address random behat fails
A number of behat fails have been creeping in with the customfield code
as behat is moving onto the next step before the current step finishes.

This change introduces some additional pending JS tracking to prevent
this.
2021-03-09 07:52:24 +08:00
AMOS bot a7e720be5f Automatically generated installer lang files 2021-03-07 00:07:20 +00:00
Eloy Lafuente (stronk7) 15f3dddd04 Moodle release 3.10.2 2021-03-06 18:03:57 +01:00
AMOS bot b0aa3ba6af Automatically generated installer lang files 2021-03-06 00:07:19 +00:00
Sara Arjona c6f3ecb4f0 weekly release 3.10.1+ 2021-03-05 16:01:41 +01:00
Sara Arjona 573158a4f3 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-03-05 16:01:40 +01:00
Alexander Bias e1fcbc9d3d MDL-71059 repository_contentbank: set default returntype
The content bank was designed for making easier to reuse content.
So "Link to the file" should be the default option when using the
contentbank repository, in order to let teachers modify their
content in the content bank and update automatically it everywhere
is used.
2021-03-05 11:34:38 +01:00
Amaia Anabitarte f8b584f09a 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-05 14:08:55 +07:00
Ilya Tregubov b33790d932 MDL-69680 lib: Fix behat test backup_and_restore.feature 2021-03-04 22:51:28 +01:00
Paul Holden 627fcc0ebc MDL-71048 lang: fix null equality check of lang string args. 2021-03-04 19:43:55 +00:00
Marina Glancy 37ff88f18d MDL-71039 core_form: support valuehtmlcallback in autocomplete inline 2021-03-04 13:39:51 +01:00
Thinh Pham bbdd616d5c MDL-70727 Behat: function scrollIntoView not working in the app 2021-03-04 13:37:13 +07:00
Ilya Tregubov 0e0b494d4a MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:47:56 +08:00
Ilya Tregubov b61c7fe0f9 MDL-69680 lib: Update jQuery version in Moodle files 2021-03-04 12:47:56 +08:00
Ilya Tregubov 044754dddb MDL-69680 lib: Upgrade jQuery lib to 3.5.1 2021-03-04 12:47:56 +08:00
Eloy Lafuente (stronk7) c25ae6986c Merge branch 'MDL-70424-auth-avoid-changes-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2021-03-04 00:29:21 +01:00
Brendan Heywood f5e822222d MDL-70424 auth: Avoid random changes to $CFG->auth 2021-03-04 09:30:17 +11:00
Ilya Tregubov 67aa4abd73 MDL-70767 feedback: Prevent xss in feedback answer text. 2021-03-03 23:09:09 +01:00
Sara Arjona f3e6ed90d0 Merge branch 'MDL-68721-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2021-03-03 17:51:31 +01:00
Ferran Recio cfd58aae3e MDL-68721 mod_h5pactivity: report acceptance tests 2021-03-03 17:23:24 +01:00
Paul Holden 822eea5638 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:47 +08:00
Marina Glancy 9c29fcaae0 MDL-65552 user: escape idnumber and email in table_sql 2021-03-03 23:14:47 +08:00
Paul Holden bee5d9d27e 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:47 +08:00
Sara Arjona 695e05f1e8 Merge branch 'MDL-70125_310-3' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-03-03 15:47:37 +01:00
Sara Arjona 5a407772c7 Merge branch 'MDL-67494-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-03-03 11:49:20 +01:00
Sara Arjona 82f2fe02e6 Merge branch 'MDL-67119-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-03-03 11:11:41 +01:00
Ilya Tregubov f81bc6488d MDL-71026 user: Fix incorrect get_string call. 2021-03-03 11:44:23 +02:00
Jun Pataleta b9a6effccb Merge branch 'MDL-70987-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-03-03 16:42:03 +08:00
Simey Lameze 7108bf827d MDL-67494 calendar: user_delete_user should delete all user events 2021-03-03 16:31:24 +08:00
Simey Lameze e5ce3297ba MDL-67494 calendar: privacy provider should not delete shared events 2021-03-03 16:31:24 +08:00
Simey Lameze 0f7ba5c1d2 MDL-67494 calendar: shared subscriptions should not set userid to 0 2021-03-03 16:31:24 +08:00
Simey Lameze 45266a3611 MDL-67494 calendar: only user overrides should retain userid 2021-03-03 16:31:24 +08:00
Simey Lameze bc6fa0ad98 MDL-67494 calendar: set userid to zero for shared events 2021-03-03 16:31:24 +08:00
Simey Lameze b528e38d53 MDL-67494 calendar: step to set userid 0 to all shared events 2021-03-03 16:31:22 +08:00
Simey Lameze d6d923a26a MDL-67494 calendar: add logic for category events in get_context 2021-03-03 16:27:05 +08:00
Jun Pataleta 970fc5dfd5 Merge branch 'MDL-71009_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-03-03 16:22:37 +08:00
Sara Arjona d7136fa135 Merge branch 'MDL-69097_310' of https://github.com/inigozendegi/moodle into MOODLE_310_STABLE 2021-03-03 09:06:58 +01:00
Jun Pataleta 14f98eefcf Merge branch 'MDL-70995-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-03 15:05:15 +08:00
Jun Pataleta 15f6a8977a Merge branch 'MDL-69883-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-03-03 14:34:44 +08:00
Andrew Nicols cd10e95fd9 Merge branch 'MDL-70268-310-2' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-03-03 12:22:34 +08:00
Peter Dias f50885a3a4 MDL-70268 core: Update the oauthlib to exclude scope if none provided 2021-03-03 12:06:24 +08:00
AMOS bot 17f6e10e4e Automatically generated installer lang files 2021-03-03 00:07:21 +00:00
Paul Holden 69dc0ef1cf 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 23:44:24 +01:00
Sander Wind 3f9d4a08a5 MDL-70668 auth: Fix secret validation during user confirmation
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
2021-03-02 23:44:24 +01:00
Eloy Lafuente (stronk7) 5d6e97dabb Merge branch 'MDL-70340-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2021-03-02 23:33:08 +01:00
Víctor Déniz 45a7f417ce Merge branch 'MDL-70676-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE
Fixed mod/workshop/db/upgrade.php: \xmldb_field::getNotNull()
does not verify if the column is nullable in the database.
2021-03-02 22:10:14 +00:00
Peter Dias 62d098d787 MDL-59293 block_onlineusers: Update behat tests 2021-03-02 16:09:07 +00:00
Peter Dias 6cc044522a 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:09:07 +00:00
Ilya Tregubov ff09683e6c MDL-70676 workshop: Allow empty grades. 2021-03-02 13:44:54 +02:00
Sara Arjona d65a32ba29 Merge branch 'MDL-67515-310' of git://github.com/vmdef/moodle into MOODLE_310_STABLE 2021-03-02 11:21:33 +01:00
Jun Pataleta 4ddc2a627c Merge branch 'MDL-70457_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-03-02 17:39:20 +08:00
Víctor Déniz aa0d546355 Merge branch 'MDL-70172-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-03-02 09:17:10 +00:00
Paul Holden 7bbab5d400 MDL-71022 gradereport_history: prevent double escaping of users.
The user identity fields are already escaped by the AJAX endpoint
that returns them, we don't need to do it again at the client.
2021-03-02 09:14:40 +00:00
Víctor Déniz ae9785389a MDL-67515 tool_customlang: Ignore invalid component strings
After uninstalling a plugin, the translated strings remain in
tool_customlang table, throwing an exception when trying to localise
any strings. Currently there is no mechanism to
clean up customlang tables and files during the uninstall process,
so with this patch the invalid components will be ignored.
2021-03-02 09:09:16 +00:00
AMOS bot 5f4af646ee Automatically generated installer lang files 2021-03-02 00:07:19 +00:00
Eloy Lafuente (stronk7) c228509061 Merge branch 'MDL-67974-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-03-01 22:33:39 +01:00
Shamim Rezaie 8ec7ddb92b MDL-70172 output: pages with main logo should have a first-level header 2021-03-02 05:41:50 +11:00
Shamim Rezaie af390c4495 MDL-70172 output: Fix empty links
The approach taken is inline with font-awesome documentation:
https://fontawesome.com/how-to-use/on-the-web/other-topics/accessibility
2021-03-02 05:39:49 +11:00
Eloy Lafuente (stronk7) ded345c09a Merge branch 'MDL-70912-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-03-01 16:47:47 +01:00
Sara Arjona 5ecae0a17e Merge branch 'MDL-68735_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-03-01 16:17:40 +01:00
Eloy Lafuente (stronk7) 16deaaf095 Merge branch 'MDL-70913-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-03-01 14:22:23 +01:00
Sara Arjona 91d3150e6a MDL-70913 core_badges: Use and update properly sortorder
Sortorder field in badge_external_backpack was updated with a wrong
value. This patch fixes this behaviour and adds sortorder as
sorting criteria for displaying the list of site backpacks.

In the phpunit method reviewed for covering this, a couple of
assertEquals() calls have been changed too to put the expected value
first.
2021-03-01 13:10:37 +01:00
Thong Bui 1de403d9b7 MDL-70726 behat: should_not_exist function does not work correctly 2021-03-01 17:50:36 +07:00
Eloy Lafuente (stronk7) 930c1a303f Merge branch 'MDL-70931-310-xmldbeol' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-03-01 10:01:14 +01:00
Eloy Lafuente (stronk7) aacb7a3cda Merge branch 'MDL-70941-310' of git://github.com/dravek/moodle into MOODLE_310_STABLE 2021-03-01 09:54:18 +01:00
Eloy Lafuente (stronk7) 6e43990254 Merge branch 'MDL-70910-310' of git://github.com/dravek/moodle into MOODLE_310_STABLE 2021-03-01 09:50:16 +01:00
Eloy Lafuente (stronk7) 7556d45c17 Merge branch 'MDL-70964-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-03-01 09:34:09 +01:00
AMOS bot d19433e901 Automatically generated installer lang files 2021-03-01 00:07:22 +00:00
AMOS bot 08dae87267 Automatically generated installer lang files 2021-02-28 00:07:20 +00:00
AMOS bot 565a9c2af5 Automatically generated installer lang files 2021-02-27 00:07:24 +00:00
David Matamoros fefdb9ad68 MDL-70941 contentbank: fix empty equality check when renaming content 2021-02-26 14:34:42 +01:00
Tim Hunt 5f0e09f367 MDL-71009 question bank: escape idnumbers when displayed 2021-02-26 12:48:11 +00:00
Eloy Lafuente (stronk7) 5bb3ac5c9a MDL-68735 env: Moodle 3.8.x, 3.9.x and 3.10.x do not support PHP 8.0 2021-02-26 13:08:07 +01:00
David Matamoros 384e6b03b1 MDL-70910 contentbank: fix for using contentid not validated 2021-02-26 12:02:25 +01:00
Eloy Lafuente (stronk7) d921a644ba MDL-70457 forms: php74 fix for the (not used in core) date element
Curly brackets to access by index to strings or arrays is
deprecated since php74.
2021-02-26 11:55:32 +01:00
Amaia Anabitarte 60fcd69368 MDL-67119 core_analytics: Analyse users once per course
User's activity in a course should be analysed only once
no matter the number of enrolments the user has in that course.
2021-02-26 11:48:09 +01:00
Jun Pataleta 3799c7f535 weekly release 3.10.1+ 2021-02-26 13:42:53 +08:00
Jun Pataleta e8425ed3af Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-02-26 13:42:52 +08:00
David Mudrák 4fc700ec96 MDL-70964 lang: Use the fixed strings in tests 2021-02-25 16:35:58 +01:00
Helen Foster c9ee7a2092 MDL-70964 lang: Import fixed English strings (en_fix) 2021-02-25 16:35:34 +01:00
Jun Pataleta 54a1d40758 Merge branch 'MDL-70169-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-02-25 12:29:30 +08:00
AMOS bot 92a8afc1e4 Automatically generated installer lang files 2021-02-25 00:07:24 +00:00
Paul Holden 46a52c6ad2 MDL-69883 message: fix lazy loading of conversations.
Set max-height on each container section rather than the container
itself, so that each can respond to the scrollBottom event within
the lazy loading module (which handles the overflow itself).
2021-02-24 22:01:37 +00:00
Paul Holden ab5e184301 MDL-70995 user: format group names in course participants filter. 2021-02-24 19:26:10 +00:00
Iñigo Zendegi 8b8c96ff3c MDL-69097 mod_forum: Apply filters to whole forum grading 2021-02-24 17:12:02 +01:00
Víctor Déniz ae9cf72fb6 Merge branch 'MDL-51111-muc-reset-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2021-02-24 14:08:25 +00:00
Brendan Heywood 42ddf9c0da MDL-51111 cache: Don't lock and write the config file if unchanged 2021-02-24 12:44:38 +11:00
Andrew Nicols 00f23b218a MDL-70987 core_form: Use correct id for elementid during validation
The id of the formid was being passed instead of the elementid.
2021-02-24 09:06:37 +08:00
Sara Arjona 07685e8116 MDL-67974 core_badges: Recovered expired stamp
Expired stamp icon displayed over the badge images has been added
again to CSS (it was lost at any point).
2021-02-23 15:32:57 +01:00
Sara Arjona 729b244321 MDL-67974 core_badges: Badge expiry date when hover
Text displayed for expired badges when the user hovers over the
warning (!) icon has been fixed in the "Issued badge information"
page.
2021-02-23 15:32:57 +01:00
Eloy Lafuente (stronk7) 147cd2557c Merge branch 'MDL-43697-310' of https://github.com/praxisdigital/moodle into MOODLE_310_STABLE 2021-02-22 23:10:12 +01:00
Marina Glancy 6578994426 MDL-70967 enrol_meta: fix error in unittest 2021-02-22 18:06:43 +01:00
Mark Nelson fbef841ee3 MDL-70125 core_grade: do not change overridden status during regrading 2021-02-22 17:35:38 +08:00
AMOS bot 6a4f5a7d80 Automatically generated installer lang files 2021-02-22 00:07:22 +00:00
Andrew Nicols 4e25ca4aad Merge branch 'MDL-70879_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-02-22 07:51:00 +08:00
Daniel Kristian Steffensen 8fd59d9009 MDL-43697 backup: Archived badges are restored during course restore 2021-02-19 15:50:13 +01:00
Eloy Lafuente (stronk7) eda36d1eab MDL-70879 behat: Bump to Behat 3.8.x 2021-02-19 14:49:19 +01:00
Víctor Déniz 9b2400e94e weekly release 3.10.1+ 2021-02-19 12:39:15 +00:00
Víctor Déniz 051b9b8317 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-02-19 12:39:14 +00:00
AMOS bot 1f27baf216 Automatically generated installer lang files 2021-02-19 00:07:32 +00:00
Jun Pataleta 28d5ee7876 Merge branch 'MDL-47410-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-02-18 11:24:07 +08:00
Andrew Nicols 6aadb04fe1 MDL-47410 behat: Perform exact match for date_time selectors 2021-02-18 09:35:23 +08:00
David Mudrák fe6470b852 MDL-70931 xmldb: Generate install.xml files with EOL and EOF
As discussed in MDLSITE-6397, all Moodle code files should end with
single Unix-style end of line character. Files created and edited
through the XMLDB editor should follow this rule, too.
2021-02-17 21:06:00 +01:00
Víctor Déniz 858078a374 Merge branch 'MOODLE_310_MDL-70752' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-02-17 16:57:36 +00:00
Eloy Lafuente (stronk7) 317af7632a Merge branch 'MDL-70552-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-02-17 10:26:48 +01:00
Ilya Tregubov 53fcd633e5 MDL-70552 core_message: Show popup for teachers when anonymous
user completed feedback.
2021-02-17 08:43:28 +02:00
Andrew Nicols 40e11ee44a Merge branch 'MDL-47410-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2021-02-17 09:41:40 +08:00
AMOS bot 875ee2f1d2 Automatically generated installer lang files 2021-02-17 00:07:28 +00:00
Andrew Nicols 3b9d4c2cc8 Merge branch 'MDL-70264-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-02-17 07:26:56 +08:00
Eloy Lafuente (stronk7) 296e9ed320 Merge branch 'MDL-69562_310' of https://github.com/dvdcastro/moodle into MOODLE_310_STABLE 2021-02-16 22:39:36 +01:00
Eloy Lafuente (stronk7) be526048f6 Merge branch 'MDL-70525_310' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-02-16 19:56:30 +01:00
Sara Arjona 9f2a875b0f MDL-70912 mod_data: Add filepicker to the H5P Atto button
The filepicker wasn't displayed fot the H5P Atto button when a text
area database field was created because some options were missing
in the textarea field class.
2021-02-16 18:17:26 +01:00
AMOS bot 8f86550c41 Automatically generated installer lang files 2021-02-16 00:07:25 +00:00
Paul Holden 7b4f2014c3 MDL-66025 user: require message content in bulk action.
Also import missing 'core/notification' dependency.
2021-02-14 20:10:35 +00:00
AMOS bot 579a25273d Automatically generated installer lang files 2021-02-13 00:07:29 +00:00
Simey Lameze 9ff0798864 MDL-70169 login: fix accessibility issues 2021-02-12 12:12:58 +08:00
Paul Holden fd80c7a6b7 MDL-70789 theme_boost: fix double click on drawer hiding content.
If the drawer toggle button was clicked in quick succession to close
and then re-open, then the delayed Aria.hide method would be called
which hid the drawer content when it finished opening.
2021-02-11 21:45:51 +00:00
Sara Arjona dcee7949db MDL-70264 badges: remove badges/oauth2callback.php
File badges/oauth2callback.php has been removed and now badges
API will use admin/oauth2callback.php because it makes no sense having
it twice.

Credits go to Andrew Nicols for raising it!
2021-02-11 16:58:48 +01:00
Sara Arjona 2e96a6508e weekly release 3.10.1+ 2021-02-11 14:54:47 +01:00
Sara Arjona 81e59a9ae7 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-02-11 14:54:45 +01:00
Mihail Geshoski 880224da1b MDL-47410 mod_assign: Update mod_assign behat tests
Updates the mod_assign behat tests to utilize the ability to
conviniently populate the datetime selector fields.
2021-02-11 12:13:04 +08:00
Mihail Geshoski 07d73cc416 MDL-47410 behat: Support selection from the datetime selector element
Adds behat support for selecting date and time from a datetime selector
element. The passed values should represent a textual date and time
description wrapped in '##' (e.g. '##first day of January 2020 08:00##',
'##1 Jan 2020 10:30##'). Also, the value 'disabled' is valid and can be
used to disable the datetime selector element.
2021-02-11 12:13:04 +08:00
Mihail Geshoski c68967af02 MDL-47410 tool_licensemanager: Update tool_licensemanager behat tests
Updates the tool_licensemanager behat tests to utilize the ability to
conviniently populate the date selector fields.
2021-02-11 12:13:04 +08:00
Mihail Geshoski 7a868e586f MDL-47410 behat: Support date selection from the date selector element
Adds behat support for selecting a date from the date selector element.
The passed values should represent a textual date description wrapped
in '##' (e.g. '##first day of January 2020##', '##1 Jan 2020##'). Also,
the value 'disabled' is valid and can be used to disable the date
selector element.
2021-02-11 12:13:02 +08:00
Mihail Geshoski c9ecca60c1 MDL-47410 behat: Create custom selector for the date and datetime fields
Creates a custom field selector to locate the requested date or datetime
form fields.
2021-02-11 12:11:15 +08:00
Mihail Geshoski 8031c68d12 MDL-47410 behat: Move logic from guess_type() to a separate method
Moves the logic from guess_type() to a separate protected method
get_field_instance_for_element(). This would be quite useful for
form field classes as they can now use this method when there is
a need to determine the type of a given node element.
2021-02-11 12:11:15 +08:00
Mihail Geshoski 41d8472136 MDL-47410 behat: Use data-fieldtype attribute to guess the field type
The data-fieldtype attribute (if present) should be also utilized in
guess_field_type() and match the behavior in get_field_node_type().
2021-02-11 12:11:15 +08:00
Mihail Geshoski d2304bfbe5 MDL-47410 form: Add data-fieldtype attribute to checkbox inline element
Includes the data-fieldtype attribute to the checkbox inline form
element. This element does not extend the parent inline element
template due to its specific nature and therefore this attribute was
missing.
2021-02-11 12:11:15 +08:00
Adrian Greeve 26ec6b3f69 Merge branch 'MDL-70513_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-11 10:05:51 +08:00
Adrian Greeve a057e10630 Merge branch 'MDL-69867-310_display_grade_with_scale' of git://github.com/moffe42/moodle into MOODLE_310_STABLE 2021-02-11 09:24:38 +08:00
AMOS bot 47373b3d37 Automatically generated installer lang files 2021-02-11 00:07:24 +00:00
Sara Arjona b21bbfbb53 Merge branch 'MDL-70732-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2021-02-10 17:20:36 +01:00
Sara Arjona 9dd33a7e4a Merge branch 'MDL-70796_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-10 16:50:15 +01:00
Sara Arjona 4205f0d819 Merge branch 'MDL-69101_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-10 15:12:05 +01:00
Sara Arjona eb7c0f7d12 Merge branch 'MDL-70631-310-unzip' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-02-10 12:38:18 +01:00
Sara Arjona 064c3f2b4b Merge branch 'MDL-70736_MOODLE_310_STABLE' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-02-10 08:28:26 +01:00
Jacob Christiansen 17d2e4a79d MDL-69867 mod_assign: Display current grade with scale value
When using workflow we show the current grade with its scale value
instead of the internal index
2021-02-10 08:08:58 +01:00
John Yao c6df8dc20b MDL-65390 accessibility: correct focus after "Show more" clicked 2021-02-09 15:11:12 +01:00
Sara Arjona 8f66f8807d Merge branch 'MDL-70173-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-02-09 08:29:26 +01:00
Sara Arjona 94fa7da52a Merge branch 'MDL-70377_310' of https://github.com/mkassaei/moodle into MOODLE_310_STABLE 2021-02-09 08:23:36 +01:00
Shamim Rezaie c61b50e6a0 MDL-70173 core: Use a meaningful first level header 2021-02-09 16:32:45 +11:00
Shamim Rezaie 950e44c82f MDL-70173 theme_boost: Fix empty link issue on the "Go to top" button
On behat, we have to use a more specific test step if we are looking
for a "Go" button on a modal. The reason is that the html of the modal
content is put after the html of the "Go to top" button, so behat
may find the "Go to top" button if we just look for "Go".
2021-02-09 16:32:45 +11:00
Shamim Rezaie 71b49a5b87 MDL-70173 theme_boost: Increase the size of notification counter
WAVE considers any text with the size of 10px or below really small.
Increasing the font size of the navbar counter by 1px should not make a
big negative impact on the design, but improves accessibility.
2021-02-09 16:32:45 +11:00
Shamim Rezaie e7b0985d5e MDL-70173 output: All pages should have a heading
In MDL-63040, it was decided that the page header for the dashboad page
should be removed.
However, Based on Success Criteria 1.3.1 and 2.4.6 from the WebAIM's
WCAG 2 Checklist, all pages should have an <h1> element.
So I put an sr-only heading on the dashboard and all other pages, where
no page header is shown.
2021-02-09 16:32:45 +11:00
Shamim Rezaie ac4b7f1193 MDL-70173 dashboard: ARIA role presentation conflicted the empty alt
The markup <img role="presentation" alt="alt text"> is contradictory.

According to https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/examples/presentation/PresentationRoleExamples.html
 It is recommended that authors instead use empty alt text (alt="")
 where they use role="presentation".
2021-02-09 16:32:45 +11:00
Shamim Rezaie 30354e039a MDL-70173 message: Fix empty link 2021-02-09 16:32:40 +11:00
Shamim Rezaie a9c9d74fa0 MDL-70173 output: use an empty alt to hide user pic from screen readers
There is no need to use WAI-ARIA to hide images from screen readers.
See https://www.w3.org/WAI/tutorials/images/decorative/
2021-02-09 16:15:57 +11:00
Tomo Tsuyuki 0570323dab MDL-70525 tool_profiling: Cannot import profiling file
Change type from int to integer to be able to have big numbers
2021-02-09 10:15:48 +11:00
Mahmoud Kassaei fc538e946a MDL-70377 qtype_essay: When reviewing an attempt as a teacher
In the Response history table, Action Saved: does not display the value
of $a in the language string.
2021-02-08 16:52:48 +00:00
Andrew Nicols 17c85b704c Merge branch 'MDL-70614-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-08 10:36:15 +08:00
Andrew Nicols 340bd2726a Merge branch 'MDL-70725-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-02-08 10:30:28 +08:00
AMOS bot 0ad3e036d2 Automatically generated installer lang files 2021-02-06 00:07:24 +00:00
Tim Hunt cfcfaba862 MDL-70796 count_words: match the count from LibraOffice & MS Word 2021-02-05 15:28:34 +00:00
Amaia Anabitarte 582f636756 MDL-70732 behat: Adding second parameter to ExpectationException() 2021-02-05 11:01:38 +01:00
Sara Arjona 726d5dfc65 weekly release 3.10.1+ 2021-02-04 14:56:20 +01:00
Sara Arjona de8df592c9 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-02-04 14:56:18 +01:00
Mikhail Golenkov 30646de80a MDL-70752 restore: Fix remote file recovery 2021-02-04 19:21:45 +11:00
Tomo Tsuyuki bf7f52d775 MDL-70736 gradingform_guide: Fix loading marking guide template issue
Do not check grade item name if it is from shared template.
2021-02-04 16:15:44 +11:00
Andrew Nicols b1cf84453d Merge branch 'MDL-69748-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-02-04 11:52:21 +08:00
Shamim Rezaie e0f895ea8e MDL-69748 core: Fix hideif issue with array elements
Changed the element selector to get all array elements,
whether named or unnamed. The previus selector was only
working for elements that thir names were like name="something[]".
It was not working for name="something[a]" elements.
2021-02-04 14:38:53 +11:00
Andrew Nicols 975c9f7a82 Merge branch 'MDL-70579-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-04 09:30:20 +08:00
AMOS bot 32e56d6e65 Automatically generated installer lang files 2021-02-04 00:07:29 +00:00
Eloy Lafuente (stronk7) adc56c3df0 MDL-70741 capability overview: missing whitespace after placeholder 2021-02-04 00:01:12 +01:00
Tim Hunt 546ca90251 MDL-70513 quiz manual grading: use formchangechecker to avoid dataloss 2021-02-03 16:10:30 +00:00
David Mudrák 1d32d1d64f MDL-70631 files: Replace hard-coded value with FL_ENC_RAW constant
This is not related to the issue but I noticed it while trying to debug
it.

Back when this line was introduced in 9c140a681e, the ZipArchive had
not yet exposed this flag as a constant. It was added later with PHP
7.0.8 and we can switch to using it now.
2021-02-03 16:10:28 +01:00
David Mudrák 31f71d93b9 MDL-70631 files: Fix performance of zip_packer::extract_to_pathname()
The original implementation was based on ZipArchive::getStream() which
turns out to be very slow and if the archive contains many files, the
unzipping performance is very slow.

The patch changes the implementation to use ZipArchive::extractTo()
unless the extracted entry path contains a folder name ending with dot
(such as some/path./to/file.txt). There is a known upstream bug in the
PHP ZIP extension #77214 (also #74619 and #69477) so that we fall back
to keep using the stream in those cases.
2021-02-03 16:10:28 +01:00
Sara Arjona eb8938e15b Merge branch 'MDL-70705-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-02-03 15:33:19 +01:00
Luca Bösch d49c11e4ec MDL-70705 block_blog_recent: support multilang blog entry titles 2021-02-03 15:15:25 +01:00
Sara Arjona a0183a8251 Merge branch 'MDL-70741_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-03 14:49:51 +01:00
David Castro 6c4989dca7 MDL-69562 admin: Allow getting IP from all sources. 2021-02-03 07:22:48 -05:00
Eloy Lafuente (stronk7) 656fc5e11b Merge branch 'MDL-70711-M310' of git://github.com/kordan/moodle into MOODLE_310_STABLE 2021-02-03 13:04:11 +01:00
Sara Arjona fec01c3415 Merge branch 'MDL-70163-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-03 12:25:41 +01:00
Sara Arjona 27bdf9b710 Merge branch 'MDL-70535-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-03 11:19:35 +01:00
Sara Arjona e6803f9345 Merge branch 'MDL-67959-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-02-03 10:50:47 +01:00
Tim Hunt 7015334d6d MDL-69101 Essay/Moodle XML: recent new settings not imported/exported 2021-02-03 08:14:00 +00:00
Sara Arjona b6f7ebe5e6 Merge branch 'MDL-70621-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-02-03 09:02:59 +01:00
Sara Arjona 5f2879986a Merge branch 'MDL-68970_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-03 08:51:23 +01:00
Luca Bösch b53915eabb MDL-70621 mod_glossary: use glossary rsstype string. 2021-02-03 08:34:46 +01:00
Luca Bösch a4cc053dd1 MDL-70621 mod_forum: use forum rsstype string. 2021-02-03 08:34:46 +01:00
Andrew Nicols 101667dc59 Merge branch 'MDL-56772-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-02-03 10:57:51 +08:00
Andrew Nicols c25da3ed87 Merge branch 'MDL-66932_M310' of https://github.com/nadavkav/moodle into MOODLE_310_STABLE 2021-02-03 10:23:58 +08:00
Andrew Nicols 82e32d8012 Merge branch 'MDL-68893-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-02-03 09:41:09 +08:00
Andrew Nicols 73822e2790 Merge branch 'MDL-68958-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-02-03 09:37:49 +08:00
Andrew Nicols a6f3c28afd Merge branch 'MDL-70339-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-02-03 09:09:22 +08:00
Víctor Déniz ed48cfd287 Merge branch 'MDL-59782-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2021-02-02 09:35:40 +00:00
Sara Arjona a9d19d3f20 Merge branch 'MDL-70574_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-02 08:20:34 +01:00
Sara Arjona 4a1748a0d8 Merge branch 'MDL-70288-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-02-02 07:59:42 +01:00
Jun Pataleta 399ed2ef31 MDL-70288 qtype: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 14:21:57 +08:00
Jun Pataleta 14710e4652 MDL-70288 mod_lti: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 14:21:57 +08:00
Jun Pataleta 72c7ab1fcd MDL-70288 core: Remove duplicate labels for checkbox elements
* If there's a label, the text will serve as the description of  the
element.
2021-02-02 14:21:57 +08:00
Jun Pataleta 1feb3e130d MDL-70288 theme_boost: Manage aria-describedby on form validation
* The aria-describedby attribute can be a list of element IDs that
describe the element. On form validation, the ID of the error message
container is added to this attribute which may already be containing
another ID. So we need to properly add/remove the error message ID
so that we don't delete any existing ID(s) in the aria-describedby
attribute during form validation.
2021-02-02 14:21:57 +08:00
Eloy Lafuente (stronk7) 120ab864a1 Merge branch 'MDL-46256_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-01 23:20:23 +01:00
Eloy Lafuente (stronk7) 4be8f22e59 Merge branch 'MDL-70648-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-02-01 19:19:46 +01:00
Sara Arjona 63c16676ff Merge branch 'MDL-70625-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-02-01 15:37:09 +01:00
Sara Arjona 66de72d17f Merge branch 'MDL-70734-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-02-01 12:30:21 +01:00
Sara Arjona fc6d356416 Merge branch 'MDL-70740-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-02-01 11:25:22 +01:00
Paul Holden e2d9c997d5 MDL-70614 user: consistent roles spacing in course profile. 2021-02-01 07:54:21 +00:00
Andrew Nicols a7d8af4a9e MDL-70734 behat: Increase the WebDriver Curl timeout 2021-02-01 09:50:08 +08:00
AMOS bot 901e09e890 Automatically generated installer lang files 2021-02-01 00:07:28 +00:00
Andrew Nicols 1cb8980be0 MDL-70740 behat: Composer bump for new version of Mink Driver 2021-01-31 20:26:35 +08:00
AMOS bot 57efb76aba Automatically generated installer lang files 2021-01-31 00:07:24 +00:00
Luca Bösch 3394914940 MDL-68893 mod_data: use own RSS feed string.
AMOS BEGIN
 CPY [rsstype,core],[rsstype,mod_data]
AMOS END
2021-01-29 23:19:57 +01:00
Tim Hunt 78bcf502a3 MDL-70741 capability overview: avoid errors from orphan contexts 2021-01-29 20:50:41 +00:00
Víctor Déniz cd2e91aa18 weekly release 3.10.1+ 2021-01-29 17:13:20 +00:00
Víctor Déniz f72bb528e8 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-01-29 17:13:14 +00:00
Jake Dallimore 629905943f Merge branch 'MDL-66979-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-01-29 15:44:01 +08:00
Andrew Nicols 1f4b80c9f1 MDL-66979 behat: Mark some tests as being slow
Uses of the httpsreplace and customlang tools are known to be extremely
slow.

In our CI infrastructure on slwoer DBs, the customlang tool can take
over 90 seconds to load the page, whilst the httpsreplace tool can take
up to about 60 seconds.

These changes set appropriate timeout factors to increase the timeout
accordingly.
2021-01-29 14:18:54 +08:00
Andrew Nicols 9cb46e24f2 MDL-66979 behat: Add a step to set a timeout factor for a test 2021-01-29 14:18:54 +08:00
Eloy Lafuente (stronk7) 0db430c5a7 MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
Also, change:

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-29 14:18:46 +08:00
Jun Pataleta b8a0eb2472 MDL-67959 mod_forum: Display group pictures in forum only if available
Displaying a default group picture in forum posts leads to confusion,
so better to not display a default group picture when the group
picture is not set for the group.
2021-01-29 12:30:19 +08:00
AMOS bot 45978714d4 Automatically generated installer lang files 2021-01-29 00:07:27 +00:00
Eloy Lafuente (stronk7) 219694730c MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
Also, change:

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-28 17:12:15 +01:00
Bas Brands b36bc055d4 MDL-59782 core_question: improve questionbank highlighting 2021-01-28 11:08:05 +01:00
Eloy Lafuente (stronk7) d2a001ed67 Merge branch 'MDL-66979-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-01-28 09:09:01 +01:00
Kordan 1f6f68ad16 MDL-70711 form: deleted useless if block
get_magic_quotes_gpc() always return false since PHP 5.3 so (1 == get_magic_quotes_gpc()) is never verified.
This allows me to safetly delete what I dropped out.
2021-01-28 08:45:36 +01:00
Andrew Nicols 3a0d042395 MDL-66979 behat: Set script timeout with timeout factor 2021-01-28 15:27:49 +08:00
Andrew Nicols 889c9ca8d6 MDL-66979 behat: Correct selenium2 reference in config-dist 2021-01-28 15:08:10 +08:00
Andrew Nicols ebd36d2ac2 MDL-66979 behat: Handle driver stop failure properly
An case was found where the webdriver stop() call could fail in an
AfterScenario hook, leading to a complete rerun if no other errors were
experienced.
2021-01-28 15:07:52 +08:00
Andrew Nicols 46e121473f Merge branch 'MDL-70048-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2021-01-28 08:04:51 +08:00
Peter Dias c1f73e72b4 MDL-70048 dropbox: Augmented unit tests to account for additional params 2021-01-28 07:32:35 +08:00
Peter Dias 276e963f29 MDL-70048 dropbox: Update the dropbox search URL.
- Update fetch_dropbox_data to allow different result nodes and version
- Update search to the new URL with new params
- Update the get entities function to account for the change in structure.
2021-01-28 07:32:35 +08:00
Sara Arjona c856a7f9bb MDL-70725 oauth2: move expectException to separate method 2021-01-27 17:54:17 +01:00
Víctor Déniz b6aed6feaa Merge branch 'MDL-70585-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-27 10:52:31 +00:00
AMOS bot 7a3233a7ca Automatically generated installer lang files 2021-01-27 00:07:27 +00:00
Eloy Lafuente (stronk7) cf7eab3db1 Merge branch 'MDL-66979-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-01-26 22:45:23 +01:00
Víctor Déniz 75b7539e32 Merge branch 'MDL-70528-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-01-26 14:05:10 +00:00
Ilya Tregubov 90d42dfc84 MDL-70528 h5pactivity: Fix block can't be added to h5pactivity page. 2021-01-26 15:45:55 +02:00
Paul Holden 92d60b64a8 MDL-70163 core: fix attachment validation when localrequestdir absent.
Switch the order of operations performed when collating list of paths
from which a user can include attachments.

First collect all normalised/absolute paths then filter empty entries,
which fixes an issue where $CFG->localrequestdir could be defined but
not exist. This would lead to an empty string being passed to strpos
which triggered a PHP warning.

Co-authored-by: Peter Burnett <peterburnett@catalyst-au.net>
2021-01-25 19:53:53 +00:00
Tim Hunt dce2e6c03a MDL-68970 quiz: prevent page caching during attempts
This ensures that the page reloads if the student uses
the Back or Forwards buttons within an attempt. This
avoids questions being in a stale state, or
the timer showing the wrong time.

Thanks to Jake Dallimore and Russell Boyatt for suggestions
which lead to this fix.
2021-01-25 18:35:22 +00:00
Peter Dias 6c364c0011 MDL-70339 mod_lti: Use the convenience function to get the right img 2021-01-25 13:39:14 +08:00
Peter Dias b6c5df8181 MDL-68958 mod_imscp: Return manifestfilename as default response. 2021-01-25 13:23:26 +08:00
Peter Dias 120c2ee7a6 MDL-56772 core: Update the picker styles for rtl langs 2021-01-25 11:36:45 +08:00
Andrew Nicols 058394a412 MDL-66979 behat: Warn about old behat.yml file location 2021-01-23 20:44:53 +08:00
AMOS bot 2acb070a39 Automatically generated installer lang files 2021-01-23 00:07:23 +00:00
Paul Holden 52bc8499aa MDL-70585 course: deeper clean of path names in course export.
This fixes an issue on those systems that don't fully support unicode
characters within zip structures, which subsequently led to broken
links when browsing downloaded course content.
2021-01-22 08:15:32 +00:00
Andrew Nicols ef4a652abe MDL-66979 behat: Rename and warn on old config 2021-01-22 14:52:14 +08:00
Andrew Nicols 5282a67615 MDL-66979 behat: Uncomment step disabled for old firefox 2021-01-22 14:52:14 +08:00
Andrew Nicols d44fdcf54c MDL-66979 behat: Pad messaging drawer
This works around an issue highlighted by MDL-70411 whereby some of the
messaging links are covered by the scrollbar in Firefox on MacOS.
2021-01-22 14:52:14 +08:00
Andrew Nicols 30e2579222 MDL-66979 behat: Work around weird gradebook focus behaviour
I can't expand this one in a sane fashion but the older JS is doing some
weird and wonderful things with focus.

The only way I could get this to behave correctly was to move away from
the field, move back to it, and then move away again. Other combinations
failed in different browsers for different reasons.
2021-01-22 14:52:14 +08:00
Andrew Nicols ce30baea59 MDL-66979 behat: availability field extends textarea
The availability behat field extends the textarea type, and therefore
needs to include this type.
2021-01-22 14:52:13 +08:00
Andrew Nicols c56395fba6 MDL-66979 behat: Improve chromeOptions configuration
Simplify the chromeOptions configuration to improve readability.
2021-01-22 14:52:13 +08:00
Andrew Nicols dabca5c457 MDL-66979 question: Improve behat test reliability
Expand all fieldsets rather than individual fieldsets.

This can fail in some situations where the page moves as the first
fieldset opens and HTML transitions take effect. This causes subsequent
fieldsets to move after WebDriver has calculated the click target.
2021-01-22 14:52:13 +08:00
Andrew Nicols 5e077b8a2b MDL-66979 mod_assign: Stop clicking the user filters
Remove the documented hack which was re-opening a popup because it
"closes for some reason". It no longer randomly closes.
2021-01-22 14:52:13 +08:00
Andrew Nicols 7984048d45 MDL-66979 behat: Switch to generators
These steps were creating content manually in an unnecessary fashion. I
had to debug some issues with features in these areas so took the time
to update them to make use of data generators, which are significantly
faster.
2021-01-22 14:52:13 +08:00
Andrew Nicols 767c5f4512 MDL-66979 behat: Remove unused var 2021-01-22 14:52:13 +08:00
Andrew Nicols 73e428979d MDL-66979 behat: Whitespace fix 2021-01-22 14:52:13 +08:00
Andrew Nicols cbb2547c32 MDL-66979 behat: Remove manually triggered events
Behat should not trigger Synthetic browser events. It is incorrect to do
so as the UI should be used to trigger events correctly.

The W3C WebDriver specification explicitly states when and where these
events will be triggered from (the browser) and therefore there is no
ambiguity and no need to synthetically trigger them from Behat.
2021-01-22 14:52:13 +08:00
Andrew Nicols 2b0b259d09 MDL-66979 group: Replace direct element interaction with steps
The W3C WebDriver leads to faster operation of individual steps which
highlights where WebDriver is moving to a new step faster than the
browser can process it.

The solution here is to use the `execute` function to interact with the
browsers as this makes use of the various wait and check steps.
2021-01-22 14:52:13 +08:00
Andrew Nicols 084973f8a2 MDL-66979 behat: Remove unnecessary steps which fail
These steps were completely pointless and were failing with the W3C
Webdriver becuase focus was never on the Update Profile button in the
first place.

At a minimum we should remove the Focus change step as it not valid, but
the following step is also pointless.
2021-01-22 14:52:13 +08:00
Andrew Nicols ac0f7dd2ab MDL-66979 scorm: Increase behat window size
On Firefox there can be some issues with ensuring that all nodes are
visible in order to click them.

This is likely an upstream geckodriver bug and not one that can be
easily addressed across all of Moodle.

In this instance the "Next" button is just outside the Visible Window,
but it is in an iFrame which is fully visible. In this situation
Firefox is unable to click the button but does not error.
2021-01-22 14:52:13 +08:00
Andrew Nicols 035d4eb72a MDL-66979 behat: Scroll nodes into view before hover
The W3C Specification does not require that a NodeElement be in the
current viewport before triggering a mouseOver. As a result the
mouseOver will generate an Exception because the element is not in the
viewport, and the X/Y co-ordinates are invalid.

To handle this the node is scrolled into view.
2021-01-22 14:52:13 +08:00
Andrew Nicols eec766f375 MDL-66979 behat: Fix window switching
Normalise switching of window contexts by setting the main window name
to a null.

Where the window has no name (null/empty), then the root context is
selected.
2021-01-22 14:52:13 +08:00
Andrew Nicols 5212bfc961 MDL-66979 behat: Use tab to blur current focus
The focus should be on something, rather than removed.

The way in which focus removal works can lead to side effects.
2021-01-22 14:52:13 +08:00
Andrew Nicols d1e52f7086 MDL-66979 behat: Update passwordunmask form field control
Update the passwordunmask form field type for behat to interact with the
form element as a human would rather than via synthetic event triggers.
2021-01-22 14:52:13 +08:00
Andrew Nicols 330b665f82 MDL-66979 behat: iFrames must have a name for switchTo
The W3C WebDriver protocol supports switching of contexts using a named
context, and not the class asscoiated with that context.
2021-01-22 14:52:13 +08:00
Andrew Nicols e89be896df MDL-66979 mod_data: Improve behat chart data step
Charts data visibility is more reliable when checked via the
aria-expanded attribute.

The isVisible attribute can cause some failures under Firefox.
2021-01-22 14:52:13 +08:00
Andrew Nicols ca2acd10c9 MDL-66979 behat: Handle JS on elements better
This change introduces a new function to execute Javascript directly on
a node.

This should not, ordinarily, be used directly by steps, but may be
required in other parts of the Behat interaction.
2021-01-22 14:52:13 +08:00
Andrew Nicols 863d68a344 MDL-66979 behat: Rename selenium config to webdriver
The PHP WebDriver Mink Driver does not necessarily require Selenium. It
supports Selenium 3 upwards, and can be used directly with ChromeDriver,
EdgeDriver, SafariDriver, GeckoDriver, and others.

It therefore uses a slightly different configuraitno path.
2021-01-22 14:52:13 +08:00
Andrew Nicols c816ca79fa MDL-66979 behat: Core updates for W3C WebDriver
This commit updates core Behat features to make use of the
php-webdriver/webdriver library instead of the legacy Instaclick
library.

Most of these changes relate to use of features of WebDriver which we
are required to use directly rather than through the Mink Driver.
2021-01-22 14:52:13 +08:00
Andrew Nicols fc021f968a MDL-66979 behat: Switch to new W3C Behat driver
This commit updates the composer dependencies to make use of the updated
version of moodlehq/moodle-behat-extension which depends upon the
php-webdriver/webdriver and relevant Mink WebDriver.
2021-01-22 14:52:13 +08:00
Jake Dallimore 2477b04d12 weekly release 3.10.1+ 2021-01-22 11:30:57 +08:00
Jake Dallimore a6af5fd054 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-01-22 11:30:54 +08:00
Tim Hunt 8321e49c8a MDL-46256 count_words: fix handling of paragraphs 2021-01-21 09:54:36 +00:00
Tim Hunt 509eef8fcf MDL-46256 count_letters: an unit tests and fix HTML editity handling 2021-01-21 09:54:36 +00:00
Tim Hunt cb9c2320b6 MDL-46256 word count: Convert existing tests to a data provider 2021-01-21 09:54:36 +00:00
Adrian Greeve b11792ac11 Merge branch 'MDL-57020-310-allow_delete_unused_scale' of https://github.com/sharidas/moodle into MOODLE_310_STABLE 2021-01-21 12:02:49 +08:00
Nadav Kavalerchik dc8a751815 MDL-66932 theme/boost: Use LTR directionality to display user % grades 2021-01-20 09:31:12 +02:00
Simey Lameze 8e6cbc6e18 MDL-70648 calendar: upgrade step to delete wrong cat events 2021-01-20 09:28:54 +08:00
Simey Lameze 33a8c2d06a MDL-70648 calendar: add form validation for category events 2021-01-20 09:26:48 +08:00
AMOS bot 9c4379153f Automatically generated installer lang files 2021-01-17 00:07:26 +00:00
Eloy Lafuente (stronk7) 00821c744c Moodle release 3.10.1 2021-01-16 16:58:29 +01:00
Paul Holden 390326fd17 MDL-70535 media_videojs: fallback to English language video player.
When current language doesn't have accompanying videojs language file
we should fallback to displaying the player in English, otherwise the
web service returns empty and a Javascript exception is triggered.
2021-01-15 13:50:47 +00:00
Sujith Haridasan cbc2b593e7 MDL-57020 scales: Allow deletion of unused scales in forum
Allow deletion of unused scales used in a
forum for the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-01-15 15:06:19 +05:30
Sara Arjona f420af1016 weekly release 3.10+ 2021-01-15 08:25:49 +01:00
Sara Arjona 67150560b2 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-01-15 08:25:47 +01:00
Sara Arjona 9fac7a8d59 Merge branch 'MDL-69308_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2021-01-14 12:03:52 +01:00
Jake Dallimore e1ca7e93d9 Merge branch 'MDL-69877-310' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2021-01-14 14:52:18 +08:00
Michael Hawkins 8bd6cfb4c4 MDL-69877 core: Added security.txt 2021-01-14 14:30:50 +08:00
AMOS bot a3afe546fd Automatically generated installer lang files 2021-01-14 00:07:23 +00:00
Eloy Lafuente (stronk7) db30a623bf 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:29:44 +01:00
Eloy Lafuente (stronk7) 3afcb70b3d 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:29:39 +01:00
Shamim Rezaie f9b58dd719 MDL-70625 core_calendar: Fix whitespace appearance in the id attribute 2021-01-14 01:59:08 +11:00
Sara Arjona 9ca6f8199e Merge branch 'MDL-70394-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-01-13 15:31:26 +01:00
Mihail Geshoski 4fec7a276d 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:00 +08:00
Mihail Geshoski b70a1c71e1 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:00 +08:00
Jun Pataleta 90c450839d Merge branch 'MDL-70580-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-13 10:19:51 +08:00
AMOS bot b7a62b4286 Automatically generated installer lang files 2021-01-13 00:07:25 +00:00
Paul Holden 33427c7c5d MDL-70580 core: retrieve closest tree node in click handler. 2021-01-12 20:17:32 +00:00
Michael Hawkins 8fa9d159bc MDL-69911 core: Clean content passed through TeX filter 2021-01-12 10:24:26 +01:00
Ferran Recio f8f154236d MDL-67782 message: fix messages max length 2021-01-12 10:24:26 +01:00
Juan Segarra Montesinos d54cc8fbd7 MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 10:24:26 +01:00
Juan Segarra Montesinos 7e6fc779c7 MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 10:24:26 +01:00
Juan Segarra Montesinos 3467d87c80 MDL-69797 gradingform_rubric: Implement authorization into fetch method 2021-01-12 10:24:26 +01:00
Juan Segarra Montesinos 855957180a MDL-69797 gradingform_guide: Implement authorization into fetch method 2021-01-12 10:24:26 +01:00
Sara Arjona 8862b80c56 Merge branch 'MDL-70009-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-01-12 10:21:09 +01:00
Jake Dallimore 8b8142d8d9 Merge branch 'MDL-69431_Moodle_310_Validate_section_arg_modedit' of git://github.com/watson8/moodle into MOODLE_310_STABLE 2021-01-12 17:09:01 +08:00
Ilya Tregubov f0260219fa MDL-70009 h5pactivity: Split get_pluginfile_hash in two methods. 2021-01-12 09:10:57 +02:00
Jun Pataleta be36ead8b0 Merge branch 'MDL-70580-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-12 13:15:43 +08:00
AMOS bot f270bd8c8e Automatically generated installer lang files 2021-01-12 00:07:34 +00:00
Andrew Nicols 357909b23b MDL-70580 core: Tree nodes should check if they were clicked directly 2021-01-11 23:43:28 +00:00
Tim Hunt 84302e4a76 MDL-70574 qtype_multianswer: fractional scores should be possible 2021-01-11 17:37:25 +00:00
Michael Hawkins 2c45443ad7 MDL-70571 lib: Added additional escaping to search_input template 2021-01-11 16:20:32 +01:00
Sara Arjona 77d7480096 Merge branch 'MDL-70034_310' of git://github.com/mdjnelson/moodle into MOODLE_310_STABLE 2021-01-11 15:19:32 +01:00
Sara Arjona b57b9b41cd Merge branch 'MDL-70567-MOODLE_310_STABLE' of https://github.com/dmitriim/moodle into MOODLE_310_STABLE 2021-01-11 13:09:49 +01:00
Sara Arjona cfa2b28de6 Merge branch 'MDL-70578-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2021-01-11 12:58:20 +01:00
Sara Arjona e22723680d Merge branch 'MDL-70352-MOODLE_310_STABLE' of https://github.com/dmitriim/moodle into MOODLE_310_STABLE 2021-01-11 12:24:05 +01:00
AMOS bot db2a9784ef Automatically generated installer lang files 2021-01-11 00:08:40 +00:00
David Watson 06d7da192b MDL-69431 course: validate section url param against maxsections 2021-01-10 17:14:58 +00:00
Eloy Lafuente (stronk7) 586a6da356 Merge branch 'MDL-70550-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2021-01-09 13:17:50 +01:00
Mark Nelson 2ab950039c MDL-70034 gradingform_guide: use new API to retrieve grade item name 2021-01-09 14:31:09 +08:00
AMOS bot 3b3c246aaa Automatically generated installer lang files 2021-01-09 00:07:26 +00:00
Sara Arjona b3b476ce3c Merge branch 'MDL-70558-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-08 17:07:23 +01:00
Sara Arjona 682ee99293 Merge branch 'MDL-70102-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2021-01-08 15:51:05 +01:00
David Mudrák b8069c3372 MDL-70550 lang: Use the fixed strings in Behat tests, too 2021-01-08 09:11:38 +01:00
Helen Foster 992d1b29b4 MDL-70550 lang: Import fixed English strings (en_fix) 2021-01-08 09:11:38 +01:00
Jun Pataleta ceab4136aa Merge branch 'MDL-70310-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-01-08 14:47:14 +08:00
Luca Bösch 8241aa75d5 MDL-70578 cohorts: Add bootstrap classes to buttons 2021-01-08 07:28:15 +01:00
Jun Pataleta f186074a54 weekly release 3.10+ 2021-01-08 12:14:56 +08:00
Jun Pataleta 8585fe1404 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2021-01-08 12:14:55 +08:00
AMOS bot d4dff59b82 Automatically generated installer lang files 2021-01-08 00:07:23 +00:00
Eloy Lafuente (stronk7) af4b97f57a Merge branch 'MDL-70245-MOODLE_310_STABLE' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-01-07 23:49:47 +01:00
Eloy Lafuente (stronk7) c3341dea30 Merge branch 'MDL-70584-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2021-01-07 23:31:24 +01:00
sam marshall 2b0b250162 MDL-70102 PHPunit: Core test fails with weird added modules
Specifically it fails if the modules have unusual default capabilities
so that editingteacher doesn't have addinstance.
2021-01-07 16:11:55 +00:00
Marina Glancy dd17f6b1bf MDL-70584 core_iplookup: increase tolerance in test 2021-01-07 14:17:19 +01:00
Ilya Tregubov 4e1786f27f MDL-70310 user: Remove yahoo icon since domain no longer exists. 2021-01-07 09:15:28 +02:00
Jun Pataleta 247437ce25 Merge branch 'MDL-70374_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-01-07 12:24:18 +08:00
Eloy Lafuente (stronk7) 8d306e640f Merge branch 'MDL-70476_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-01-07 00:28:08 +01:00
Eloy Lafuente (stronk7) 17d296f1ea Merge branch 'MOODLE_310_MDL-70520' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-01-07 00:19:12 +01:00
Paul Holden b8948751f9 MDL-70579 course: filter site fullname when exporting course content. 2021-01-06 21:30:33 +00:00
Dmitrii Metelkin c9dfaec749 MDL-70567 task: fix broken result filter on logs page 2021-01-06 14:29:17 +11:00
Adrian Greeve 304aaf2b7b Merge branch 'MDL-70482_310_STABLE' of https://github.com/sebmehr/moodle into MOODLE_310_STABLE 2021-01-06 11:23:47 +08:00
Dmitrii Metelkin 34153bcc77 MDL-70352 core: attach modal to a specific element 2021-01-06 11:19:57 +11:00
Paul Holden 65ef2f90bf MDL-70558 tool_langimport: sort available language packs. 2021-01-04 23:56:03 +00:00
AMOS bot b12ab80cf5 Automatically generated installer lang files 2020-12-27 00:07:25 +00:00
Sébastien Mehr 9ee975f3a9 MDL-70482 template: add missing closing bracket 2020-12-24 14:04:54 +01:00
AMOS bot fb02551622 Automatically generated installer lang files 2020-12-24 00:07:25 +00:00
Eloy Lafuente (stronk7) 64db9dc75a weekly release 3.10+ 2020-12-23 20:24:53 +01:00
Eloy Lafuente (stronk7) 9d5931b6e2 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-12-23 20:24:51 +01:00
Eloy Lafuente (stronk7) 0369198637 Merge branch 'MDL-56119-310' of https://github.com/inigozendegi/moodle into MOODLE_310_STABLE 2020-12-23 01:27:07 +01:00
Eloy Lafuente (stronk7) 62b9a44045 Merge branch 'MDL-70279-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-12-23 00:47:00 +01:00
Eloy Lafuente (stronk7) 1251f26d67 Merge branch 'MDL-70436-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-12-22 18:29:55 +01:00
Eloy Lafuente (stronk7) 77a6c383bf Merge branch 'MDL-70386-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-12-22 18:22:00 +01:00
Jake Dallimore 53e81c00fa Merge branch 'MDL-70459-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-12-22 16:51:36 +08:00
Jake Dallimore 9480706466 Merge branch 'MDL-69422-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-12-22 16:03:17 +08:00
Jake Dallimore bb48ca47ef Merge branch 'MDL-70426-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2020-12-22 15:16:41 +08:00
Mikhail Golenkov 93b2fe7d38 MDL-70520 mod_assign: Use task API to get scheduled task lastruntime 2020-12-22 15:30:50 +11:00
Mikhail Golenkov 6ba4712549 MDL-70520 tasks: Keep lastruntime when a scheduled task is reset 2020-12-22 15:30:45 +11:00
AMOS bot b192dc7c64 Automatically generated installer lang files 2020-12-22 00:07:24 +00:00
Víctor Déniz 2d9922f388 Merge branch 'MDL-70355-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-12-21 23:19:20 +00:00
Eloy Lafuente (stronk7) 639f6143e7 Merge branch 'MDL-70430-310-oauth2refreshtoken' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-12-22 00:07:00 +01:00
Víctor Déniz 0a27966b67 Merge branch 'MDL-70284-dynreg-bug-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-12-21 16:33:17 +00:00
Sara Arjona 79b89c2d42 Merge branch 'MDL-69107-310-2' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-18 15:22:24 +01:00
Tim Hunt 591107c208 MDL-70374 qtype_multichoice: improve alignment of choices 2020-12-18 13:10:13 +00:00
Tim Hunt ccfc9f7bc9 MDL-70476 permission overrides: role names double-escaped in tool tip 2020-12-18 13:04:16 +00:00
Luca Bösch 06bf0c89d6 MDL-70355 calendar: Filter popuptext for calendar entries. 2020-12-17 17:44:04 +01:00
Sara Arjona c25f0087f7 weekly release 3.10+ 2020-12-17 15:52:52 +01:00
Sara Arjona 12830e4214 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-12-17 15:52:50 +01:00
Shamim Rezaie 2e1b2cf30e MDL-70394 paygw_paypal: Fix the incorrect foreign key 2020-12-17 00:26:48 +11:00
Víctor Déniz 0bfb0a58a0 Merge branch 'MDL-70261-310' of git://github.com/ilya-catalyst/moodle into MOODLE_310_STABLE 2020-12-16 12:34:29 +00:00
Sara Arjona 50ba1375e8 Merge branch 'MDL-70373_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-16 12:40:52 +01:00
Shamim Rezaie 5f57b10712 MDL-70459 enrol_fee: Sort the list of currencies when displaying 2020-12-16 22:30:52 +11:00
Shamim Rezaie ec6720a836 MDL-70459 core_payment: use array_merge to merge currencies 2020-12-16 22:30:52 +11:00
Sara Arjona e00b006d51 Merge branch 'MDL-70322-310' of git://github.com/roland04/moodle into MOODLE_310_STABLE 2020-12-16 12:04:22 +01:00
Jun Pataleta 7ce3918e83 Merge branch 'MDL-54907_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-16 10:26:58 +08:00
Andrew Nicols aa1c7e0a64 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Sara Arjona cc87756c10 Merge branch 'MDL-70422-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-12-15 16:43:02 +01:00
Sara Arjona e7a53e9410 Merge branch 'MDL-70409-310' of git://github.com/merrill-oakland/moodle into MOODLE_310_STABLE 2020-12-15 16:15:50 +01:00
Sara Arjona a050d3f41b Merge branch 'MDL-70342-310' of git://github.com/abias/moodle into MOODLE_310_STABLE 2020-12-15 15:29:18 +01:00
Sara Arjona bc103afb53 Merge branch 'MDL-70357-310-cronlibthrowables' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-12-15 14:56:04 +01:00
Ilya Tregubov 50d1003bb7 MDL-70261 course: Allow update locked course custom fields
on course upload.
2020-12-15 14:43:11 +02:00
Jake Dallimore 5c899c722c Merge branch 'MDL-67623-310_blocks_myoverview_pagination_regression' of https://github.com/tomdickman/moodle into MOODLE_310_STABLE 2020-12-15 18:22:11 +08:00
Jun Pataleta 73ad678e73 Merge branch 'MDL-70361-dlrlid-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-12-15 11:17:25 +08:00
Andrew Nicols 22a5445346 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 09:08:05 +08:00
AMOS bot 3ca8535203 Automatically generated installer lang files 2020-12-15 00:07:24 +00:00
Sara Arjona 7697ac6538 Merge branch 'MDL-70397-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-14 17:12:05 +01:00
Jake Dallimore c97eb87506 Merge branch 'MDL-70324-3.10' of https://github.com/JBThong/moodle into MOODLE_310_STABLE 2020-12-14 11:30:16 +08:00
Tom Dickman 66b3c79275 MDL-67623 block overview: fix pagination regression
Fixed a regression caused by MDL-64194 resulting in Dashboard - Course
overview pagination not working from second page of courses onwards.

Course overview block should now do the following:
- Display no pagination controls when user has no courses
- Display no pagination controls when less than 12 courses to display
- Only display pagination controls up to the number of courses user is
enrolled in
- Work correctly when on a page greater than the second page.
2020-12-14 13:28:11 +11:00
AMOS bot 773db77081 Automatically generated installer lang files 2020-12-13 00:07:25 +00:00
AMOS bot a07acd9464 Automatically generated installer lang files 2020-12-12 00:07:28 +00:00
AMOS bot 12b20cbf3b Merge branch 'MOODLE_310_STABLE' into install_310_STABLE 2020-12-12 00:07:27 +00:00
Mikel Martín fa31950c6a MDL-70322 core_search: consistent search icon 2020-12-11 15:40:45 +01:00
AMOS bot 6ef5f4ced0 Automatically generated installer lang files 2020-12-11 00:07:31 +00:00
Víctor Déniz c537ed7fed weekly release 3.10+ 2020-12-10 21:10:47 +00:00
Víctor Déniz f3b2f604e2 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-12-10 21:10:40 +00:00
Huong Nguyen f987001a61 MDL-70426 qtype_ddmarker: infinite markers keep duplicating 2020-12-10 15:52:46 +07:00
Shamim Rezaie f1ec340cca MDL-69301 theme_boost: Remove the special handling of Escape key 2020-12-10 14:59:55 +08:00
Tomo Tsuyuki 6998cbfad4 MDL-70245 core_grade: Fix grade_get_setting unit test failures
To fix the phpunit issue, change from static variable to use cache
2020-12-10 16:47:51 +11:00
Jake Dallimore 655f4d4f3f Merge branch 'MDL-70320-310' of https://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-10 12:01:48 +08:00
Andrew Nicols d9e22f40b4 MDL-70320 behat: User full path to page admin node 2020-12-10 07:55:50 +08:00
Bas Brands df8a5aeab5 MDL-70386 theme_boost: quizes correctness badges 2020-12-09 18:07:29 +01:00
Bas Brands 17cc12c381 MDL-70436 theme_boost: closebutton styles in moodle-dialog-fullscreen 2020-12-09 14:59:44 +01:00
Víctor Déniz e76c5c764b Merge branch 'MDL-63683-310' of https://github.com/dravek/moodle into MOODLE_310_STABLE 2020-12-09 12:47:52 +00:00
Jake Dallimore be45f4c47f Merge branch 'MDL-70151-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-09 14:46:14 +08:00
Shamim Rezaie fa7e218546 MDL-69301 behat: comment a test out
The e.key is not filled correctly by Geckodriver on the verssion of
Firefox that we use.
2020-12-09 13:40:04 +08:00
Andrew Nicols 5c0a5a531d Merge branch 'MDL-70320_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-09 12:06:22 +08:00
Andrew Nicols 200ec6b6ac Merge branch 'MDL-62707-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-12-09 08:53:27 +08:00
David Mudrák 0e7dc879de MDL-70430 oauth2: Fix storing of the new refresh token
There was a typo - missing underscore. As a result, the new refresh
token was never updated in the database. Depending on the issuer and
whether or when theyu invalidate issued refresh tokens, this might or
might not make the token refresh stop working.
2020-12-08 11:24:27 +01:00
Jake Dallimore 70fe644191 Merge branch 'MDL-70285_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-08 16:33:43 +08:00
AMOS bot 5178b349e8 Automatically generated installer lang files 2020-12-08 00:07:22 +00:00
Paul Holden c8e335fbe3 MDL-70422 restore: fix for undefined question answer ordering in test. 2020-12-07 10:15:53 +00:00
Adrian Greeve 567e587dbb Merge branch 'MDL-69301-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-12-07 09:29:24 +08:00
AMOS bot 37348f1c2e Automatically generated installer lang files 2020-12-06 00:07:27 +00:00
Eric Merrill e2feddadd9 MDL-70409 chat: Use require_once to import lib.php 2020-12-04 10:45:59 -05:00
Paul Holden 0a62138795 MDL-70279 tool_templatelibrary: preserve component search field value. 2020-12-04 14:55:32 +00:00
Paul Holden c24a16a819 MDL-62707 search: account for no matching courses when listing areas.
When limiting the list of courses during retrieval of the search areas
the user can access, make sure we have some contexts before looking
for blocks.
2020-12-04 09:43:17 +00:00
inigozendegi 8091ab8078 MDL-56119 gradingform_rubric: Rubric display layout issue 2020-12-04 09:41:42 +01:00
David Matamoros 12b9c6051e MDL-63683 enrol: Fix plugin settings when no role has student archetype 2020-12-04 09:25:54 +01:00
Andrew Nicols 92e6eb437c MDL-70397 behat: Prevent browser restarting after initial start 2020-12-04 12:07:20 +08:00
Jake Dallimore 32866a1758 weekly release 3.10+ 2020-12-04 08:42:48 +08:00
Jake Dallimore 9ce415b207 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-12-04 08:42:45 +08:00
Jake Dallimore ec69ae5929 Merge branch 'MDL-70326-MOODLE_310_STABLE' of https://github.com/durzo/moodle into MOODLE_310_STABLE 2020-12-03 11:54:18 +08:00
Andrew Nicols f5545b5c0e Merge branch 'MDL-70327-310' of git://github.com/cescobedo/moodle into MOODLE_310_STABLE 2020-12-03 11:51:59 +08:00
Andrew Nicols 7c22b71916 Merge branch 'MDL-70321_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-03 11:39:54 +08:00
Jake Dallimore b5414af214 Merge branch 'MDL-69411-310' of git://github.com/dravek/moodle into MOODLE_310_STABLE 2020-12-03 11:37:00 +08:00
Jake Dallimore 686b5beb23 Merge branch 'MDL-67460-310_profile_secure' of https://github.com/beenet-dev/moodle into MOODLE_310_STABLE 2020-12-03 11:16:31 +08:00
Adrian Greeve af87a57052 Merge branch 'wip_MDL-70267_m310' of git://github.com/gjb2048/moodle into MOODLE_310_STABLE 2020-12-03 10:56:37 +08:00
Adrian Greeve dec6e261e2 Merge branch 'MDL-70167-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-03 09:57:42 +08:00
AMOS bot 24058ace40 Automatically generated installer lang files 2020-12-03 00:07:26 +00:00
Andrew Nicols d552427f61 Merge branch 'MDL-69868-310' of git://github.com/ilya-catalyst/moodle into MOODLE_310_STABLE 2020-12-03 07:47:48 +08:00
Tim Hunt 0eeb391472 MDL-70373 qtype_essay: missing border on atto input 2020-12-02 20:09:57 +00:00
Shamim Rezaie 433556de1f MDL-69301 theme_boost: Use event.key in aria.js
Both event.which and event.keyCode are deprecated. So
We switched to using event.key. We can only do so now
because IE is no longer supported.
2020-12-03 04:22:09 +11:00
Shamim Rezaie b24f13eca2 MDL-69301 course: Remove custom keyboard navigation code 2020-12-03 04:22:09 +11:00
Shamim Rezaie 65a9b26791 MDL-69301 core: Enhanced WAI-ARIA support for tab elements 2020-12-03 04:22:09 +11:00
Shamim Rezaie 2cc04e2b29 MDL-69301 theme_boost: convert aria.js to es6 module 2020-12-03 04:22:09 +11:00
Jake Dallimore 6be44e7d06 Merge branch 'MDL-67514-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-12-02 16:23:54 +08:00
AMOS bot 93b3efa5a7 Automatically generated installer lang files 2020-12-02 00:07:23 +00:00
Thong Bui 2908ed5405 MDL-70324 Question: get_all_response_file_areas() not work correctly 2020-12-01 16:11:21 +07:00
AMOS bot 966c8a37cb Automatically generated installer lang files 2020-12-01 00:07:30 +00:00
Claude Vervoort c8637d645e MDL-70361 mod_lti: deeplinking multiple preserve resourceid and tag 2020-11-30 14:59:54 -05:00
David Mudrák b427f21cca MDL-70357 cron: Catch Throwables not just Exceptions when running tasks
Starting from PHP 7, most language errors throw Error exceptions. We
want to deal with those equally as with any other exception so we need
to catch all Throwables here.
2020-11-30 17:37:25 +01:00
Alexander Bias 25a0001b9f MDL-70342 block_timeline: Get rid of double quotes
This commit gets rid of double quotes around the activity name and course name
which have sneaked into block_timeline's view in MDL-65183.
2020-11-30 13:20:05 +01:00
Gareth Barnard 843cc0ee8d MDL-70267 ux, theme: Course user profile inconsistent page layout. 2020-11-29 23:51:01 +00:00
AMOS bot 0172d13163 Automatically generated installer lang files 2020-11-29 00:07:31 +00:00
Tim Hunt 78bddace2c MDL-54907 quiz unit tests: clean up code style in attempts_test.php 2020-11-27 18:30:43 +00:00
Tim Hunt 779c1687a4 MDL-54907 quiz: better timefinish for attempts finished asynchronously
There are serveral ways a quiz attempt can be submitted:

1. The student click the Submit and finish button. In this case,
   no problem. We record the current time as the finish time
   for the quiz attempt.

2. The student is activly working away at the quiz, and the
   count-down timer reachers zero. In this case, we also record
   the current time. Note that, if the server is under high load,
   then this could well end up being a few seconds after the
   theoretical end time, so you could have a quiz with a 30 minute
   time limit, with an attempt that lasted 30:07. However, this
   is just an accurate reflection of what happened, so should
   be recorded like this.

3. If the student is offline when the time expires, then
   (depending on the quiz settings) the attempt may be
   automatically submitted by cron, but this will happen with
   at least some delay (to prevent race conditions between cron
   and a student working online) and if cron is running slow
   on the server, it could be a lot later. Previously, this led
   to, say, a 30 minute quiz where an attempt seemed to have
   lasted 67 minutes, which confused people.

   Now, in this situation, the finsh time for the quiz attempt is
   recorded as the time when the time limit ran out. This is not
   just less confusing for teachers looking at the quiz report,
   it is also more accurate. That is the latest time at which
   students could have made any changes to their responses.
2020-11-27 18:30:43 +00:00
Tim Hunt c99a83bc5c MDL-54907 quiz generator: defaults should match a new Moodle install 2020-11-27 18:30:43 +00:00
Tim Hunt 0b523e6031 MDL-54907 dml: Correct incorrect PHPdoc 2020-11-27 18:30:42 +00:00
Juan Leyva 4e5dee71b4 MDL-70340 mod_workshop: Do not apply format to peer comments
This text is not directly output to final users, it is used just in the textarea in both the site and the app.
Applying format, case issues like adding glossary links etc...
2020-11-27 18:16:39 +01:00
Jun Pataleta 8cd8daa285 MDL-69422 mod_data: Export form accessibility fixes
* Set appropriate heading element IDs
* Replace usages of deprecated HTML tag acronym with abbr instead.
* Add a label for the export fields fieldset.
* Move the CSV delimiter list outside the radio group.
* Fix div under a label element and duplicate labels
for the checkboxes of the fields to be exported by showing the field
name and type together.
* Group the fields to be exported as a fieldset.
* Move unsupported fields into a separate list.
* Move export options into its own section and group the options as a
fieldset.
2020-11-27 23:24:13 +08:00
Jun Pataleta 1bd007e815 MDL-69422 core: Convert required and help button container to div
* A span element cannot have a div as a child.
2020-11-27 23:24:13 +08:00
Sara Arjona 9c35064345 weekly release 3.10+ 2020-11-27 07:50:48 +01:00
Sara Arjona 5945a1a926 Merge branch 'install_310_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_310_STABLE 2020-11-27 07:50:45 +01:00
AMOS bot fac91d11d8 Automatically generated installer lang files 2020-11-27 06:21:03 +00:00
Sara Arjona 9fcd6522ce Merge branch 'MDL-70276_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-26 15:04:30 +01:00
Andrew Nicols 85673c859e MDL-70153 qtype_essay: Whitespace/behat fixes 2020-11-26 12:54:26 +01:00
Andrew Nicols 4dba8e8359 Merge branch 'MDL-70153-310' of git://github.com/dpalou/moodle into MOODLE_310_STABLE 2020-11-26 12:54:26 +01:00
Andrew Nicols f03c875cf3 Merge branch 'MDL-70237-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-11-26 12:54:26 +01:00
Andrew Nicols 9fcb5ece12 Merge branch 'MDL-70242-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-11-26 12:54:26 +01:00
Andrew Nicols b07833ddf4 Merge branch 'MDL-65852-310' of git://github.com/ilya-catalyst/moodle into MOODLE_310_STABLE 2020-11-26 12:54:26 +01:00
Sara Arjona 333f6cb753 Merge branch 'MDL-70248-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2020-11-26 12:54:25 +01:00
Sara Arjona 1c594e729b Merge branch 'MDL-70265_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-26 12:54:25 +01:00
Ilya Tregubov d8c8f544b3 MDL-69868 h5pactivity: Prevent breaking $USER when seeing
attempt report.
2020-11-26 12:40:28 +02:00
Eloy Lafuente (stronk7) a284ced9a1 MDL-70276 github actions: First cut, phpunit and grunt checks
First working version, supports phpunit (using build matrix):

- php72 (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:23:22 +01:00
Tim Hunt cb82824f6a MDL-70320 permission overrides: role names were double-escaped 2020-11-25 21:21:28 +00:00
Claude Vervoort 613c37d54b MDL-70284 mod_lti: dynreg fix response claims 2020-11-25 10:51:08 -05:00
cescobedo 53f9417795 MDL-70327 core_h5p: Add preventredirect to the player 2020-11-25 16:30:46 +01:00
Jordan Tomkinson 407807df6b MDL-70326 antivirus: fixing regression in MDL-66222 2020-11-25 11:28:56 +01:00
Ilya Tregubov 7c80e15392 MDL-65852 user: Fix permission check to download course participants. 2020-11-25 11:27:36 +02:00
Tim Hunt e95c0a90ac MDL-70321 question backup: fix MDL-47178 unit tests
They were failing if you had CodeRunner installed
2020-11-24 15:29:41 +00:00
Simon Mok 48905f6b75 MDL-67460 profile: User profile link to use HTTPS 2020-11-24 20:48:52 +08:00
Tim Hunt b5b562b7ee MDL-70285 completion upgrade: fix performance of the MDL-69687 code 2020-11-23 20:59:08 +00:00
David Matamoros 4a82e72b00 MDL-69411 core_message: Fix return structure for empty result set
Passing a timefrom higher than last message timecreated needs to
return a formatted response so it does not break ws.
2020-11-23 19:25:43 +01:00
Eloy Lafuente (stronk7) ef95f5262f 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:28:33 +01:00
Adrian Greeve e2d911c07b Merge branch 'MDL-67668-310-2' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-23 15:37:44 +08:00
Jake Dallimore 71bae0da0f Merge branch 'MDL-70160-function-cache-310' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE 2020-11-23 15:22:49 +08:00
Andrew Nicols e7bfbaf7b2 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:03 +08:00
Andrew Nicols 6882d7399b 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:03:28 +08:00
Andrew Nicols 80bf03d583 MDL-70167 behat: Boolean attributes should either exist or not 2020-11-23 11:03:28 +08:00
Andrew Nicols 1039537d83 MDL-67668 behat: Update tests for inplace editable field type 2020-11-23 09:00:46 +08:00
Andrew Nicols 0214c50b18 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 e29e8373e6 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 9e11009eb1 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 a01ca7a600 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) 6a662825f7 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:31 +01:00
Eloy Lafuente (stronk7) 03e3219884 weekly release 3.10+ 2020-11-20 23:17:06 +01:00
Huong Nguyen 681b7f4e78 MDL-70248 qtype_ddimageortext: Drop zones have UI issue in Editing form 2020-11-19 17:03:49 +07:00
Adrian Greeve f098f28d01 Merge branch 'MOODLE_310_STABLE-MDL-67636' of https://github.com/yao9394/moodle into MOODLE_310_STABLE 2020-11-19 11:57:33 +08:00
John Yao bf17d50cf6 MDL-67636 gradebook: Prevent exposing hidden grade in locked category 2020-11-19 14:33:26 +11:00
Adrian Greeve 8e0f036b29 Merge branch 'MDL-56653-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2020-11-19 11:10:48 +08:00
Andrew Nicols 51c6924206 Merge branch 'MDL-69809-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-11-19 10:47:46 +08:00
Jun Pataleta f589a25459 Merge branch 'MDL-70094-310' of https://github.com/SangNguyen2601/moodle into MOODLE_310_STABLE 2020-11-19 09:36:53 +08:00
Eloy Lafuente (stronk7) dee389dff6 Merge branch 'MDL-69201-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-11-18 23:00:18 +01:00
Shamim Rezaie a9b83b3c01 MDL-70237 payment: Allow html tags in gateway description 2020-11-18 23:25:06 +11:00
sangnguyen2601 0ab0a293a8 MDL-70094 Question: Technical info section expands if click help icon 2020-11-18 17:32:40 +07:00
Dani Palou b76093e90c MDL-70153 qtype_essay: Add behat test for attachments max size 2020-11-18 10:48:17 +01:00
Dani Palou 8f0d40a39c MDL-70153 qtype_essay: Fix max size displayed for attachments 2020-11-18 10:48:17 +01:00
Vitaly 3a2d8a175e MDL-56653 enrol_meta: a single DB query in edit_instance_validation
The 'edit_instance_validation()' method checks for existing meta enrolment instances.
The fix replaces DB queries in a loop for each course with a single query for all courses.
Also, a new testing method 'test_edit_instance_validation_with_existing_courses()'
was added to /enrol/meta/tests/plugin_test.php to test if the new implementation
returns an error in case of trying to save the already linked courses in the 'customint1' field.
2020-11-18 15:05:42 +08:00
Andrew Nicols ff72ca7340 Merge branch '310_MDL-68896' of git://github.com/danmarsden/moodle into MOODLE_310_STABLE 2020-11-18 09:33:06 +08:00
Eloy Lafuente (stronk7) 4e346470a5 Merge branch 'MDL-70148-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-17 23:13:17 +01:00
Paul Holden 13c76cc295 MDL-67514 customfield: correct external usescategories return type. 2020-11-17 22:13:16 +00:00
Marina Glancy 2c4426bb10 MDL-70242 auth_oauth2: set page context and url 2020-11-17 16:47:59 +01:00
Andrew Nicols d3a9e2935d 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 2adc010b85 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 c330c9276c MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Andrew Nicols e9b443b3a1 MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
Andrew Nicols 7bb692666b Merge branch 'MDL-69526-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-11-17 14:55:10 +08:00
Adrian Greeve 5e924f295a Merge branch 'MDL-50955-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2020-11-17 13:08:48 +08:00
Andrew Nicols 739cbcf7e9 Merge branch 'MDL-69964-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-11-17 10:22:38 +08:00
Paul Holden 22df02089a MDL-69964 course: toggle participant checkboxes in root element.
For a given toggleGroup, the relevant action elements are not
necessarily descendants of the same tableRoot element, on the
course participants page.
2020-11-16 17:44:23 +00:00
Andrew Nicols be2afb52c1 MDL-67513 core: Only move modal to body if currently attached
A previous change as part of this commitset was intended to move the
modal to the document.body, but where the modal had been destroyed it
was instead added back to the body.
2020-11-16 09:37:48 +01:00
Peter Dias 09520f8e0d MDL-50955 core: Reset lessons completion criteria if grade type is none 2020-11-16 16:35:33 +08:00
Andrew Nicols d661fbfbc1 Merge branch 'MDL-67513-m310' of https://github.com/NeillM/moodle into MOODLE_310_STABLE 2020-11-16 08:27:35 +08:00
Luca Bösch e29069d45b MDL-69526 block_myoverview: custom course fields natural sorting 2020-11-13 00:57:42 +01:00
Eloy Lafuente (stronk7) f86b5e3545 weekly release 3.10+ 2020-11-12 22:11:40 +01:00
Neill Magill a2dcfd5bf6 MDL-67513 forum: View conversations while fullscreen grading
Before this change when a modal was shown and an element on the page
was fullscreen the modal would be created behind it.

This change ensures that the modal will be inside an element that is
fullscreen so that it will be correctly displayed.
2020-11-12 08:30:54 +00:00
Adrian Greeve dd74c34e36 Merge branch 'MDL-69453-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-11-12 11:56:29 +08:00
Andrew Nicols 5f3b5fdadf Merge branch 'MDL-70067-310_theme_classic' of https://github.com/alexmorrisnz/moodle into MOODLE_310_STABLE 2020-11-12 10:27:27 +08:00
Adrian Greeve 029f061e60 Merge branch 'MOODLE_310_MDL-70117' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-11-12 09:27:08 +08:00
Eloy Lafuente (stronk7) 14ea8ed50a Merge branch 'MDL-65941-310' of https://github.com/snake/moodle into MOODLE_310_STABLE 2020-11-12 00:18:39 +01:00
Eloy Lafuente (stronk7) 28b14d17c2 Merge branch 'MDL-70023-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-11-11 23:57:25 +01:00
Alex Morris ce69ce2db5 MDL-70067 report_insights: Replace BS3 column naming
Bootstrap 4 removed col-xs- and replaced it with col-
2020-11-12 08:57:02 +13:00
Sara Arjona 7ca7076c1b Merge branch 'MDL-70063-310-1' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-11-11 16:30:21 +01:00
Jun Pataleta 4c1fbc320f Merge branch 'MDL-70072-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-11-11 22:09:07 +08:00
Mihail Geshoski 7b5a1a1967 MDL-70063 block_tag_youtube: Add behat tests 2020-11-11 21:45:09 +08:00
Mihail Geshoski 2a5d1ba26e MDL-70063 block_tag_youtube: Fix category config in existing instances
Upgrade step that fixes the category configuration of existing
tag_youtube block instances.
2020-11-11 21:45:09 +08:00
Mihail Geshoski 6e4c5bf0a2 MDL-70063 block_tag_youtube: Update category config to use category ID
In YouTube Data API v3, the API call to fetch the videos related to a
certain category expects the category ID to be passed to the
videoCategoryId parameter, instead of the category name. Therefore, the
category config should store the category ID.
2020-11-11 21:45:09 +08:00
Bas Brands e6ebfa4baa MDL-69453 core_form: improve form UI icons and alignment 2020-11-11 14:04:54 +01:00
Sara Arjona 5a29867e2d Merge branch 'MDL-70141-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2020-11-11 08:39:23 +01:00
Michael Aherne bbb83614d2 MDL-65941 cache: Prevent cache config failure on redis problems. 2020-11-11 14:49:15 +08:00
Sara Arjona 0ab938d309 Merge branch 'MDL-69823-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-11-11 07:41:31 +01:00
Andrew Nicols 6882790684 Merge branch 'MDL-70126-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-11-11 10:25:04 +08:00
Andrew Nicols e78929087e Merge branch 'MDL-70065_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-11-11 10:10:24 +08:00
Mikhail Golenkov 10a0ea20ac MDL-70117 dataformat_pdf: Fix content overflow when headers are involved 2020-11-11 10:52:01 +11:00
Juan Leyva d0b4b6fa2f MDL-69823 qtype: Support core question types 2020-11-10 19:21:32 +01:00
Juan Leyva a5dcaee31c MDL-69823 mod_quiz: Return question options via WS 2020-11-10 19:21:32 +01:00
Sara Arjona 05ef5c3c48 Merge branch 'MDL-70106-icon-cache-310' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE 2020-11-10 16:53:37 +01:00
Jun Pataleta e803a24401 Merge branch 'MDL-69930-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE
# Conflicts:
#	question/type/ddimageortext/amd/build/question.min.js
#	question/type/ddimageortext/amd/build/question.min.js.map
#	question/type/ddimageortext/amd/src/question.js
2020-11-10 14:08:57 +08:00
Peter Burnett ebe19aa434 MDL-70160 cache: plugin_functions checks for function_exists() 2020-11-10 16:03:53 +10:00
Jun Pataleta 4b0988f014 Merge branch 'MDL-68349-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-11-10 10:14:37 +08:00
Jake Dallimore 56ec88ca1c Merge branch 'MDL-69841-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2020-11-10 09:33:06 +08:00
Víctor Déniz 849c7704f7 Merge branch 'MDL-69955-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2020-11-09 21:47:22 +00:00
Paul Holden 898dd7bf5b MDL-69201 core: consistent table primary sort column/order. 2020-11-09 19:45:41 +00:00
Paul Holden f5e374c278 MDL-70126 tag: correct thrown exception class name. 2020-11-09 19:43:38 +00:00
Neill Magill 4423581f8d MDL-67513 forum: Test that discussions can be viewed while grading 2020-11-09 14:24:56 +00:00
Andrew Nicols d0295d8ff2 Merge branch 'MDL-70146_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-09 10:01:19 +08:00
Eloy Lafuente (stronk7) 4aa83d92bf MDL-70146 upgrade: add 3.10.0 separation line to all upgrade scripts 2020-11-07 23:26:09 +01:00
Eloy Lafuente (stronk7) ec58cefefb Moodle release 3.10 2020-11-07 17:24:12 +01:00
Eloy Lafuente (stronk7) e4cda88e76 Moodle release 3.10rc2 2020-11-06 22:56:08 +01:00
Víctor Déniz 8752df87ed Merge branch 'MDL-70137-310-2' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-06 19:16:52 +00:00
Andrew Nicols 511dab1cd3 MDL-70137 cache: Write config to temp file and move into place 2020-11-06 19:16:51 +00:00
Andrew Nicols b26a5e5e08 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:16:44 +00:00
Eloy Lafuente (stronk7) fcb699808c Merge branch 'MDL-70143-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-11-06 19:51:54 +01:00
Eloy Lafuente (stronk7) f9dc16ca05 Merge branch 'MDL-70139-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-11-06 18:56:00 +01:00
sam marshall 72ad8e6919 MDL-70141 core_block: Web service set $PAGE url to avoid warnings 2020-11-06 17:39:06 +00:00
Marina Glancy a350376b65 MDL-70143 tool_uploaduser: fix wrong cache reference 2020-11-06 18:07:24 +01:00
Sara Arjona 29f7a9a210 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:36:52 +01:00
Shamim Rezaie f6b7ed422a MDL-70072 core: Fix always displaying date in Gregorian 2020-11-06 19:23:11 +11:00
Jun Pataleta 022a019637 Merge branch 'MDL-70130-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-06 11:27:54 +08:00
Andrew Nicols 50f5563c1f MDL-70130 core: Compare realpaths for file attachment checks
Rather than using the provided path, the `realpath` must be used to
ensure that the use of symlinks in paths is normalised.
2020-11-06 11:00:30 +08:00
Andrew Nicols 1c0b8f8c50 MDL-70130 core: Simplify attachment handling in email_to_suer 2020-11-06 11:00:29 +08:00
Marina Glancy c879cb24df MDL-70130 core: allow to attach files from localrequestdir to emails
Co-authored-by: Paul Holden <paulh@moodle.com>
2020-11-06 11:00:29 +08:00
Andrew Nicols 6890ad18e3 Merge branch 'MDL-70131-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-11-06 09:27:33 +08:00
Andrew Nicols b88679e3a1 Merge branch 'MDL-70120-assign-stamp-expires-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-11-06 09:26:01 +08:00
Marina Glancy 8c1917588d MDL-70131 cli: only allow to negate existing keys 2020-11-05 18:10:13 +01:00
Eloy Lafuente (stronk7) c50c904c9e Moodle release 3.10rc1 2020-11-05 12:16:53 +01:00
Marina Glancy 65d419b204 MDL-70023 core_course: improve performance of recently accessed courses 2020-11-05 09:55:15 +01:00
Jun Pataleta 9023021ae0 Merge branch 'MDL-70075-310-2' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-11-05 12:51:23 +08:00
Andrew Nicols 919ead58fe Merge branch 'MDL-70066-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2020-11-05 10:01:18 +08:00
Andrew Nicols 27de77007b MDL-70075 core: Autocomplete selection should always have an active item
Ensure that there is always one active element in the list of selected
autocomplete elements.

Without this we have issues beacuse clicking on the link makes the first
one active if one is not already active, and this turns a click event
into a drag event, which means that it is not deleted.
2020-11-05 09:05:38 +08:00
Andrew Nicols 34d1c23668 MDL-70075 core: Do not return a value in an event handler
Returning a value of `false` in an event handler has the effect of
calling event.preventDefault() and event.stopPropagation().

This is neither obvious, nor desirable in this situation.
2020-11-05 09:05:38 +08:00
Andrew Nicols dc7ca062ca MDL-70075 core: jQuery.attr() does not accept a bool value
The documented values that jQuery.attr() accepts are String, Number, or
null. For some reason, when we pass a Boolean value, the subsequent
click handler does not work in some situations.

Changing this to take a Number, and unsetting it when empty, resolves
this issue.
2020-11-05 09:05:38 +08:00
Andrew Nicols 8100d46f85 MDL-70075 core: Listen for change in accessibleChange event
The accessibleChange custom interaction event was only listening for
blur and focus, however some OS/browser combinations do not emit these
events until the element is explicitly blurred. This is notably
different on Firefox on some Operating Systems.

Recent changes in MDL-68167 explicitly moved the user participants page
filter module to use the accessibleChange event, which means that the
selections are now only triggered on an explicit blur when using
Firefox. This highlight a bug whereby, when the mouse is used to make a
selection, the event is not triggered until the element is blurred.

This change modifies the accessibleChange event to ignore the `change`
event where it was triggered by the keyboard and where that keybaord
event was not a [return] or [escape] keypress, but to otherwise respect
the native change event.
2020-11-05 09:05:38 +08:00
Andrew Nicols f4dfe66ea8 MDL-70075 core: Listen for the focus and blur events again
The `blur` event does not bubble, but the `focusout` events are not
available in all supported versions of Firefox.

Rather than switching event, this patch using event capture to
effectively achieve the same result and bubble the event up through the
DOM to the delegated listener.

There should be no functional change with this patch, except to support
Firefox fully.
2020-11-05 09:05:38 +08:00
Eloy Lafuente (stronk7) e92c6b19b8 Merge branch 'MDL-70100-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-11-04 22:40:54 +01:00
Víctor Déniz fa79a1876c Merge branch 'MDL-70112_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-11-04 19:17:34 +00:00
Sara Arjona c9ab02b0cc Merge branch 'MDL-70114-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-11-04 20:15:04 +01:00
Víctor Déniz 9c2241dee4 Merge branch 'MDL-68749-310-2' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2020-11-04 15:24:08 +00:00
Sara Arjona 8028bf10dc Merge branch 'MDL-70119-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2020-11-04 15:19:44 +01:00
Bas Brands 04704c2108 MDL-70114 mod_data: add border for to textarea 2020-11-04 13:30:11 +00:00
Brendan Heywood fbe13d55f3 MDL-70120 assignfeedback_editpdf: Stamp files should be cached 2020-11-04 23:06:02 +11:00
Ferran Recio 75d6582fef MDL-70119 core_badges: fix tab names 2020-11-04 12:57:30 +01:00
Simey Lameze 7ca4fd97d9 MDL-70066 badges: change usages of array_key_exists to isset 2020-11-04 16:05:45 +08:00
Jun Pataleta 940ed72017 Merge branch 'MDL-70089_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-04 13:05:47 +08:00
Peter Burnett 3885c566aa MDL-70106 cache: Set icon localstorage cache to use theme localisation 2020-11-04 13:33:23 +10:00
Huong Nguyen ab542b6e98 MDL-69955 qtype_ddimageortext: drop zone disappear in special case 2020-11-04 09:52:31 +07:00
Jake Dallimore 477cd8b5fe Merge branch 'MOODLE_310_MDL-70093' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-11-04 09:00:26 +08:00
Tim Hunt a8efb07714 MDL-70112 drag-drop qtypes: fix form preview 2020-11-03 21:36:00 +00:00
Eloy Lafuente (stronk7) 51c9ea5194 MDL-70089 versions: main version bump 2020-11-03 19:38:27 +01:00
Eloy Lafuente (stronk7) b0a1b4ce8b MDL-70089 versions: bump all versions and requires near release
version = 2020110900 release version
requires= 2020110300 current beta+ (week6roll1) version

Note that, because we are under parallel development period,
this is being done in the branch that is going to be released
(MOODLE_310_STABLE already existing) for Moodle 3.10.0 and
not in master, that is the one getting the bump under normal
(non-parallel) periods.
2020-11-03 19:34:52 +01:00
Mihail Geshoski 3d9175f6f1 MDL-67837 backup: Add unit tests 2020-11-03 12:34:28 +01:00
Mihail Geshoski fd2427746f MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:34:28 +01:00
andreasschenkel 49afa008f4 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:34:28 +01:00
Juan Leyva 551892e2a7 MDL-67015 mod_data: Prevent users adding entries to other groups 2020-11-03 12:34:28 +01:00
Amaia Anabitarte 45c339ef09 MDL-69046 core_contentbank: Escape quotes when showing name 2020-11-03 12:34:28 +01:00
Ferran Recio e9fe9f4ae3 MDL-69378 tool_uploadcourse: fix enrolment methods uploads 2020-11-03 12:34:28 +01:00
Peter Dias 1d1b148ca9 MDL-56310 restore: Confirm user has permission to change capabilities 2020-11-03 12:34:28 +01:00
Eloy Lafuente (stronk7) 15b4174a9f on-demand release 3.10beta+ 2020-11-03 12:23:48 +01:00
Bas Brands 99ab172211 MDL-70100 theme_boost: quiztimer zindex fix 2020-11-03 10:36:11 +01:00
Michael Hawkins 5cc9f3448c MDL-68749 theme: Fix bootstrap toggle switches in RTL layout
Co-authored-by: Bas Brands <bas@moodle.com>
2020-11-03 14:47:58 +08:00
Andrew Nicols 4dd870de20 Merge branch 'MDL-70059-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-11-03 12:05:19 +08:00
Jun Pataleta c353963ef8 Merge branch 'MDL-70033-310-2' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2020-11-03 12:01:33 +08:00
Michael Hawkins 60585523ad MDL-70033 course: Update download content event handling for Classic 2020-11-03 11:54:56 +08:00
Michael Hawkins eeaf19eb5c MDL-70033 core: Update tree.js event handlers to replace stopPropagation
Also added support to allow links to override action keys (enter/space)

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2020-11-03 11:54:56 +08:00
Juan Leyva 63da614e4f MDL-70081 airnotifier: Add missing device type in token registration 2020-11-03 01:25:57 +01:00
Jun Pataleta 73372330a9 Merge branch 'MDL-69975_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-03 00:00:25 +08:00
Sara Arjona 5f3de24306 Merge branch 'MDL-69973_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-02 15:44:54 +01:00
Mikhail Golenkov c15eac212b MDL-70093 dataformat_pdf: Fix row height calculation with high cells 2020-11-02 22:25:24 +11:00
Sara Arjona 01c8c8828b MDL-70059 core_badges: avoid duplicate key error
When 2 or more backpack were created without credentials,
a "Duplicate key value violates unique constraint" error
was raised because externalbackpackid was not taking the
correct value.
Other improvements have been done to the code too in order
to make it more readable.
2020-11-02 10:48:06 +01:00
Jake Dallimore 2dbe5f54f1 Merge branch 'MDL-70073-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2020-11-02 13:57:35 +08:00
Jun Pataleta bcf59d235b Merge branch 'MDL-70074-add-authendpoint-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-11-02 10:04:31 +08:00
Alexander 62530e097b MDL-70067 theme_classic: Use col-12 as col-xs-12 was removed in BS4 2020-11-02 09:08:07 +13:00
Peter Dias 32574e9cae MDL-70073 badges: Fix the backpack-add to match current master 2020-11-01 22:33:28 +08:00
Brendan Heywood 256f8a261c MDL-69975 core: Fix paths longer than 260 chars on windows
Also, ensure that remove_dir() only processes directories,
because sometimes it was being called by shutdown managers
with files, leading to PHP warnings.

Co-authored-by: Eloy Lafuente (stronk7) <stronk7@moodle.org>
Co-authored-by: Jun Pataleta <jun@moodle.com>
2020-11-01 11:09:39 +01:00
Claude Vervoort 60232d2b9b MDL-70074 mod_lti: add authorization_endpoint 2020-10-30 18:08:18 -04:00
Eloy Lafuente (stronk7) 864ddb77c5 MDL-69973 xmldb: Ensure all reports use fresh metadata (not cached) 2020-10-30 19:27:14 +01:00
Eloy Lafuente (stronk7) 462fe3e925 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:14 +01:00
Marina Glancy 937c7eeef1 MDL-68349 auth_db: user_created event should be triggered later 2020-10-30 14:21:06 +01:00
Eloy Lafuente (stronk7) 6bb7478e8d on-demand release 3.10beta+ 2020-10-30 13:49:20 +01:00
Jun Pataleta 03960b96cb Merge branch 'MDL-68167-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-10-30 13:16:55 +08:00
Shamim Rezaie 4d00ebae7a MDL-68167 lib: autocomplete focos should not be removed on blur
See https://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-rearrangeable.html
2020-10-30 16:08:56 +11:00
Shamim Rezaie 352e2f7787 MDL-68167 lib: Do not set aria-expanded if it should not be set 2020-10-30 16:08:56 +11:00
Shamim Rezaie 2d2b8d9170 MDL-68167 user: Fix missing label for participants filter input fields 2020-10-30 16:08:56 +11:00
Shamim Rezaie 53f2acb263 MDL-68167 lib: Clear single-select autocomplete elements with keyboard
Following MDL-57680, it should be possible to clear the selected option
using keyboard as well.
2020-10-30 16:08:56 +11:00
Shamim Rezaie 3ea25c3b77 MDL-68167 user: Fix a hardcoded string to be read from lang pack 2020-10-30 16:08:55 +11:00
Shamim Rezaie 7931148cbb MDL-68167 lib: Fix label for autocomplete selection/suggestion box
The content of the autocomplete selection div is purged by javascript
so we have to move its label outside of it. aria-labeledby is the way
to go.

Each time the suggestion box is expanded, autocomplete js renders the
autocomplete suggestions template. So the label cannot be outside the
suggestions ul.
2020-10-30 16:08:40 +11:00
Shamim Rezaie 1031836d89 MDL-68167 user: filter elements should listen to accessibleChange event 2020-10-30 15:01:39 +11:00
Shamim Rezaie ec1e1fd01a MDL-68167 lib: The accessibleChange custom event now supports bubbling
The change event bubbles so the accessibleChange shoud bubble as well.
2020-10-30 15:01:39 +11:00
Shamim Rezaie b5a04a9fe2 MDL-68167 theme_boost: make focus outline accessible for autocompletes 2020-10-30 15:01:39 +11:00
Shamim Rezaie be7b73a24b MDL-68167 lib: Autocomplete selection to use listbox aria role
The aria-selected state cannot be used for the listitem role. The
autocomplete widget highly uses the aria-selected state internally.
2020-10-30 14:59:50 +11:00
Shamim Rezaie 0c438b4d3e MDL-68167 user: Improve keyboard navigation on autocomplete fields 2020-10-30 14:59:50 +11:00
Shamim Rezaie 3f0373cb7e Merge branch 'MDL-69390-310' of git://github.com/bmbrands/moodle into MDL-69390-310-test 2020-10-30 14:59:34 +11:00
Andrew Nicols 6a64b9c5b7 Merge branch 'MDL-69156_310' of https://github.com/ffhs/moodle into MOODLE_310_STABLE 2020-10-30 11:52:07 +08:00
Huong Nguyen 7e47aca045 MDL-69841 Quiz: Review options 'Help' icons do not work correctly 2020-10-30 10:25:43 +07:00
Víctor Déniz 04569f819f Merge branch 'MDL-70032-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-10-29 22:26:35 +00:00
Tim Hunt c611f94e04 MDL-70065 quiz: fix paging when adding questions from the bank 2020-10-29 20:29:26 +00:00
Paul Holden a850fa5de8 MDL-69156 backup: correct behaviour of course copy idnumber field.
When a given user doesn't have the capability to change the idnumber
field during course copy, freeze the field value.
2020-10-29 14:15:04 +01:00
Adrian Perez 8d0d0b1f59 MDL-69156 course_copy: set defaults for idnumber when not permitted 2020-10-29 14:15:00 +01:00
Jun Pataleta 8ea746fa79 MDL-70032 qtype_multichoice: Use custom partial named selector
* With the removal of the label element, Behat now has to click on the
answer text. In order to achieve this, the custom partial named selector
"qtype_multichoice > Answer" was now added and have replaced the
instances where the label of the answer's checkbox/radio button is
being clicked.
2020-10-29 16:21:53 +08:00
Jun Pataleta 5d7bd0208a MDL-70032 qtype_multichoice: Fix answer labelling
* Discard the use of the label element in order to be able to render
multiple choice answers as they are and have these act as the radio
button/checkbox' label through the aria-labelledby attribute.
* New JS module qtype_multichoice/answers that listens for click events
on the answer text container and selects the appropriate answer radio
button/checkbox.
2020-10-29 16:21:53 +08:00
Andrew Nicols 52ad601de1 Merge branch 'MDL-68722-310' of https://github.com/matt-catalyst/moodle into MOODLE_310_STABLE 2020-10-29 14:03:15 +08:00
Jake Dallimore 2e02b4d678 Merge branch 'MDL-69716-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2020-10-29 12:40:06 +08:00
Jake Dallimore 859578b0d5 Merge branch 'MDL-70041-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-10-29 11:49:20 +08:00
Adrian Greeve 761b8a95f9 Merge branch 'm310_MDL-70042_Progress_Bar_Upgrade_Message_Popup' of https://github.com/scara/moodle into MOODLE_310_STABLE 2020-10-29 08:33:33 +08:00
Matteo Scaramuccia 4ca3d0a0ae MDL-70042 message_popup: Trivial savepoint comment cleanup 2020-10-28 23:00:48 +01:00
Matteo Scaramuccia 75c793f830 MDL-70042 message_popup: progress bar on upgrade only when necessary 2020-10-28 23:00:32 +01:00
Jun Pataleta d546f308d2 Merge branch 'MDL-69390-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-10-28 22:44:08 +08:00
Bas Brands 74f37f98ad MDL-69390 theme_boost: dropdown menu accessibility
- display a dot before the active element
- use the active colour for the hover colour
2020-10-28 14:03:06 +01:00
Jun Pataleta aead807ce6 Merge branch 'MDL-69815-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-10-28 14:19:23 +08:00
Andrew Nicols f7ad3eaca3 Merge branch 'MDL-70004-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-10-28 13:14:12 +08:00
Jake Dallimore da4fc1e256 Merge branch 'MDL-64723-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-28 12:10:47 +08:00
Mihail Geshoski 35364e22fc MDL-70041 filepicker: Make sure the user has a recently used license 2020-10-28 12:06:34 +08:00
Jake Dallimore b1ef67ba62 Merge branch 'MDL-65792-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-10-28 12:00:16 +08:00
Jake Dallimore 461bf54590 Merge branch 'MDL-70010_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-10-28 11:07:52 +08:00
Andrew Nicols 6ba76c0097 MDL-69815 core: Bump Node to v14.15.0 (LTS/Fermium) 2020-10-28 09:34:31 +08:00
Eloy Lafuente (stronk7) 323ea697c3 Merge branch 'MDL-69998-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-10-28 00:42:05 +01:00
Eloy Lafuente (stronk7) 46f6bae002 Moodle release 3.10beta 2020-10-27 23:48:46 +01:00
Eloy Lafuente (stronk7) 8aacc3fa2b NOBUG: Fixed file access permissions 2020-10-27 23:48:45 +01:00
Eloy Lafuente (stronk7) 0715960dd8 NOBUG: Fixed SVG browser compatibility 2020-10-27 23:48:43 +01:00
Sara Arjona 65084e7371 MDL-69166 enrol_fee: fix behat string from fee to enrolment by payment 2020-10-27 15:01:47 +01:00
Sara Arjona da4b94e012 MDL-69166 enrol_fee: define default value to currency setting 2020-10-27 15:01:47 +01:00
David Mudrák 05679468c5 MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:20:03 +01:00
Helen Foster 0a64b2ed99 MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:20:03 +01:00
Andrew Nicols e243810142 Merge branch 'MDL-69166-310-4' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-10-27 16:35:58 +08:00
Bas Brands a5fa563757 MDL-65792 mod_forum: show release time on timed posts 2020-10-27 08:41:28 +01:00
Shamim Rezaie f018e92334 MDL-69166 core: Fix missing lang strings 2020-10-27 18:15:09 +11:00
Andrew Nicols 46e3cfa354 Merge branch 'MDL-69166-310-4' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-10-27 12:59:25 +08:00
Shamim Rezaie 25cf4fa5ca MDL-69166 core_payment: Add privacy implementation 2020-10-27 15:45:25 +11:00
Shamim Rezaie 0fb7847e09 MDL-69166 core_payment: Use promises instead of callbacks 2020-10-27 15:45:25 +11:00
Shamim Rezaie b63f17b5f1 MDL-69166 core_payment: Addressing various integration points
- Add help for 'payment account' field in the enrol instance form
- Remove MOODLE_INTERNALs when not necessary
- Add $userid to deliver_order
- Check if provider classes implement the provider interface
- Rename get_cost to get_payable
- get_payable returns payable object
- Improve registerEventListeners and added init
- Rename payment\provider to payment\service_provider
2020-10-27 15:45:25 +11:00
Shamim Rezaie 52305c9a2e MDL-69166 core_payment: Rename componentid to itemid 2020-10-27 15:45:25 +11:00
Shamim Rezaie 6b3d163a56 MDL-69166 core_payment: Renamed plugintype name from pg to paygw 2020-10-27 15:45:23 +11:00
Marina Glancy efc576fc5c MDL-69166 core_payment: addressing integration review 2020-10-27 15:45:00 +11:00
Marina Glancy 90fbc58de6 MDL-69166 core_payment: rename some functions 2020-10-27 15:45:00 +11:00
Shamim Rezaie 087845bb30 MDL-69166 Replace all upgrade steps with just "create_table" steps 2020-10-27 15:45:00 +11:00
Shamim Rezaie 7d10f35278 MDL-69166 core_payment: Add paymentarea to the payment subsystem 2020-10-27 15:45:00 +11:00
Marina Glancy 9476b48942 MDL-69166 core_payment: archiving accounts, triggering events, tests 2020-10-27 15:45:00 +11:00
Shamim Rezaie 7e11261633 MDL-69166 core_payment: Show cost on the modal when no gateway is chosen 2020-10-27 15:45:00 +11:00
Marina Glancy 15a4e4c87c MDL-69166 core_payment: improvements to api, small fixes 2020-10-27 15:45:00 +11:00
Marina Glancy 895f38cc76 MDL-69166 core_payment: add payment accounts 2020-10-27 15:45:00 +11:00
Shamim Rezaie acd1c82403 MDL-69166 enrol_fee: Show a warning when no currency is supported 2020-10-27 15:44:59 +11:00
Shamim Rezaie c9271eba7c MDL-69166 enrol_fee: Prevent adding instance if no currency is supported 2020-10-27 15:44:59 +11:00
Shamim Rezaie 0cf4bb2afc MDL-69166 pg_paypal: only prevent closing during autorisation 2020-10-27 15:44:59 +11:00
Shamim Rezaie 58a89a46e4 MDL-69166 core-payment: Autoselect gateway when there is only one 2020-10-27 15:44:59 +11:00
Shamim Rezaie 1882bb4792 MDL-69166 core_payment: payment gateways can have a surcharge 2020-10-27 15:44:59 +11:00
Shamim Rezaie bb7d679395 MDL-69166 core_payment: show cost on the modal 2020-10-27 15:44:59 +11:00
Shamim Rezaie 048a652106 MDL-69166 pg_paypal: capture payment directly 2020-10-27 15:44:59 +11:00
Shamim Rezaie 23e24a504e MDL-69166 pg_paypal: New helper to get order details from PayPal 2020-10-27 15:44:59 +11:00
Marina Glancy 761898c876 MDL-69166 core_form: allow modals to prevent closing on accidental click 2020-10-27 15:44:59 +11:00
Shamim Rezaie dc976fba1e MDL-69166 core_payment: ES6-ifying modal_gateways 2020-10-27 15:44:59 +11:00
Shamim Rezaie e2faf67247 MDL-69166 core_payment: Use a custom modal type for gateway selector 2020-10-27 15:44:59 +11:00
Shamim Rezaie b97899634c MDL-69166 pg_paypal: Support multiple currencies on the same page 2020-10-27 15:44:59 +11:00
Shamim Rezaie 2427b92114 MDL-69166 enrol_fee: use template for payment btn & properly format cost 2020-10-27 15:44:59 +11:00
Shamim Rezaie 34770016ee MDL-69166 core_payment: es6-ify 2020-10-27 15:44:59 +11:00
Shamim Rezaie d00c00dd4f MDL-69166 core_payment: add a callback for when payment is done 2020-10-27 15:44:59 +11:00
Shamim Rezaie ed1cc02522 MDL-69166 pg_paypal: Display PayPal buttons in a modal 2020-10-27 15:44:59 +11:00
Shamim Rezaie e1151bf6f5 MDL-69166 pg_paypal: handle paypal checkout callbacks 2020-10-27 15:44:59 +11:00
Shamim Rezaie bbb887f6ae MDL-69166 pg_paypal: Ability to connect to sandbox or live environment 2020-10-27 15:44:59 +11:00
Shamim Rezaie 4403b8f60d MDL-69166 pg_paypal: Process after payment 2020-10-27 15:44:59 +11:00
Shamim Rezaie 3c3b43a58c MDL-69166 core_payment: Save general payment information 2020-10-27 15:44:59 +11:00
Shamim Rezaie 04e2dc7c3b MDL-69166 pg_paypal: paypal helper class to work with API 2020-10-27 15:44:59 +11:00
Shamim Rezaie 05574af1a6 MDL-69166 enrol_fee: Implement callback functions for payment subsystem 2020-10-27 15:44:59 +11:00
Shamim Rezaie 5337ca485c MDL-69166 core_payment: helper methods to get cost and to deliver order
Also create the infrastructure to let components know when they have to
deliver what they sold. We are going to use namespace functions instead
of traditional callbacks.
2020-10-27 15:44:59 +11:00
Shamim Rezaie 3b0034cc91 MDL-69166 enrol_fee: set a description for enrolment 2020-10-27 15:44:59 +11:00
Shamim Rezaie ab6ca27571 MDL-69166 core_payment: send a purchase description to payment gateways
We truncate description to 127 chars as per PayPal requirement
2020-10-27 15:44:59 +11:00
Shamim Rezaie 149e530cc1 MDL-69166 pg_paypal: render PayPal buttons and set up transaction
We truncate brand_name to 127 chars as per PayPal requirement.
2020-10-27 15:44:59 +11:00
Shamim Rezaie 9a7aed4a25 MDL-69166 pg_paypal: WS and AMD to return some settings to be used in js 2020-10-27 15:44:59 +11:00
Shamim Rezaie ed04c3824c MDL-69166 core_payment: post to process payment 2020-10-27 15:44:59 +11:00
Shamim Rezaie 97e8cb0de4 MDL-69166 core_payment: display an image for each gateway 2020-10-27 15:44:59 +11:00
Shamim Rezaie a435c63e16 MDL-69166 core_payment: some basic styling 2020-10-27 15:44:59 +11:00
Shamim Rezaie c2321a263b MDL-69166 core_payment: display the gateways modal 2020-10-27 15:44:58 +11:00
Shamim Rezaie f3d7526419 MDL-69166 core_payment: WS to get list of gateways supporting a currency 2020-10-27 15:44:58 +11:00
Shamim Rezaie d3432a883c MDL-69166 enrol_fee: An enrolment plugin that supports payments 2020-10-27 15:44:58 +11:00
Shamim Rezaie e1cab8e18e MDL-69166 pg_paypal: A new payment gateway is born 2020-10-27 15:44:56 +11:00
Shamim Rezaie bc28c05995 MDL-69166 core: list settings page in the admin tree 2020-10-27 15:05:23 +11:00
Shamim Rezaie 4865d2a0ae MDL-69166 core_payment: basic gateway skeleton 2020-10-27 15:05:23 +11:00
Shamim Rezaie 8317134779 MDL-69166 core: define payment as a subsystem and pg as a plugin type 2020-10-27 15:05:23 +11:00
Michael Hawkins fbac2e9296 MDL-69559 course: Fix course download cap checks when creating courses 2020-10-27 12:01:09 +08:00
Jun Pataleta c978fa26e2 MDL-70004 qtype_multichoice: Set appropriate clear my choice role 2020-10-27 09:57:32 +08:00
Michael Hawkins 599eed0f95 MDL-69559 core: Removed stopPropagation from tree click handling
It was preventing JS click event handlers being reached on some
elements, such as course admin items in Classic
(eg download course content for teachers).
2020-10-27 08:02:20 +08:00
Michael Hawkins 7d52d5def6 MDL-69559 course: Fixed behat navigation in download course content 2020-10-27 08:01:48 +08:00
Paul Holden 8813318d61 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:04:43 +00:00
Sara Arjona 0459910b53 MDL-65959 core_badges: fix unique index in upgrade.php
There was an error when creating the unique index. Apart from that,
the code has been reorganised to copy data in the new structure only
if password field hasn't been removed.
2020-10-26 23:56:46 +01:00
Matt Clarkson adeaafd59d 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-27 11:10:58 +13:00
Sara Arjona 0dd7bb8374 Merge branch 'MDL-65959-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2020-10-26 22:44:05 +01:00
Peter Dias bcba1347f8 MDL-65959 badges: Allow cross domain/protocol functionality - obv2 2020-10-26 18:36:26 +08:00
Peter Dias b0e1edd427 MDL-65959 badge: Enable OB2.1 *connection* with cross domain ability 2020-10-26 18:36:26 +08:00
Peter Dias b0007a154c MDL-65959 badge: Reset external_identifiers if backpack details modified 2020-10-26 18:36:26 +08:00
Peter Dias 8c9d3695e3 MDL-65959 badge: Confirm assertion data is updated before awarding 2020-10-26 18:36:26 +08:00
Peter Dias 184944ce6a MDL-65959 badges: Unit and Behat tests 2020-10-26 18:36:26 +08:00
Peter Dias ad9f9e54a3 MDL-65959 badges: Do not use badge user preference after verification 2020-10-26 18:36:26 +08:00
Peter Dias 943b261760 MDL-65959 badges: Update the implementation to use admin set backpack 2020-10-26 18:36:25 +08:00
Peter 8dbc7c6532 MDL-65959 core_badges: Allow ability to upload badges cross domain. 2020-10-26 18:35:36 +08:00
Peter 6f7fe5df9c MDL-65959 core_badges: Unrestricted user's badger account
* Restructure the email to be backpack specific
* Amended table defintion and functions
2020-10-26 18:35:35 +08:00
Eloy Lafuente (stronk7) 7e5f0e1fe6 MDL-70010 core: reconcile MOODLE_310_STABLE and master
There are some unexpected differences between 310 and master,
better reconcile them now. Note this is not 100% critical but,
as far as nothing exclusively for 4.0 has landed to master yet
only branch/version differences should exist.
2020-10-26 11:03:40 +01:00
Eloy Lafuente (stronk7) 11b6df58db Merge branch 'MDL-69993-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-26 10:42:51 +01:00
Andrew Nicols 36beec930e Merge branch 'MDL-69995-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-10-26 16:00:38 +08:00
Adrian Greeve 750fe24949 MDL-69559 core_course: Fix to bad behat test formatting. 2020-10-26 13:28:10 +08:00
Adrian Greeve cc718b59d0 Merge branch 'MDL-69559-310-7' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2020-10-26 13:05:33 +08:00
Jun Pataleta 4dcc2d37c6 Merge branch 'MDL-67301-dynreg-squashed-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-10-26 12:40:23 +08:00
Michael Hawkins d358b91e2b MDL-69559 course: Add course setting and cap to control course downloads 2020-10-26 10:25:37 +08:00
Michael Hawkins c053b93f0c MDL-69559 course: Add course content download UI and execution page 2020-10-26 10:19:39 +08:00
Michael Hawkins cdf91cc236 MDL-69559 course: Add capability and access checks for course download 2020-10-26 10:19:33 +08:00
Michael Hawkins fab34222ca MDL-69559 admin: Add course download admin settings and lang strings 2020-10-26 10:19:27 +08:00
Huong Nguyen ef6f42a825 MDL-69930 qtype_ddimageortext: Duplication items in drag-onto-image question 2020-10-25 20:14:43 +07:00
Luca Bösch a9f5f8094c MDL-69995 backup: padding before activity icons. 2020-10-25 02:07:26 +02:00
Claude Vervoort 10e16c69c8 MDL-67301 mod_lti: dynamic registration 2020-10-24 09:28:32 -04:00
Amaia Anabitarte e66e3740a7 MDL-69716 mod_quiz: No timestamp for in progress attempts 2020-10-23 16:02:25 +02:00
Eloy Lafuente (stronk7) 6594c54b2e on-demand release 3.10dev+ 2020-10-23 14:41:20 +02:00
Paul Holden 6dc336a5d4 MDL-69993 output: correct navigation node type for user reports. 2020-10-23 08:25:40 +01:00
Adrian Greeve 39128991d7 Merge branch 'MDL-67650-forced-checkbox-textarea-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-10-23 09:01:59 +08:00
Víctor Déniz e1990f2f33 Merge branch 'MDL-68664-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2020-10-22 12:25:51 +01:00
Sara Arjona 1ce223c7e1 Merge branch 'MDL-69553-m310' of https://github.com/NeillM/moodle into MOODLE_310_STABLE 2020-10-22 08:56:05 +02:00
Brendan Heywood 6694715840 MDL-67650 admin: Consistently show forced config settings 2020-10-22 13:17:49 +11:00
Jake Dallimore 0a43a459ba Merge branch 'MDL-68438_310' of https://github.com/t-schroeder/moodle into MOODLE_310_STABLE 2020-10-22 09:30:48 +08:00
Adrian Greeve 7e0bcbfb19 Merge branch 'MDL-69788-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-22 09:07:54 +08:00
Eloy Lafuente (stronk7) eaf89f7754 Merge branch 'MDL-66392-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-21 19:45:26 +02:00
Paul Holden 5bbfcc25c0 MDL-66392 analytics: make model output directory default to empty.
Falling back to path within $CFG->dataroot/models.
2020-10-21 18:04:20 +01:00
Sara Arjona 4a495d66b8 Merge branch 'm310_MDL-68536_Notice_Undefined_Property_CFG_branch' of https://github.com/scara/moodle into MOODLE_310_STABLE 2020-10-21 18:32:47 +02:00
Sara Arjona b13ec3c353 Merge branch 'MDL-67673_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-10-21 17:38:16 +02:00
Víctor Déniz 5903054142 Merge branch 'MDL-69392-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-10-21 16:26:44 +01:00
Víctor Déniz 2dd9b53fd6 Merge branch 'MDL-69513-dkim-settings-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-10-21 11:56:54 +01:00
Eloy Lafuente (stronk7) 7f20e2071c MDL-67673 phpunit: Document all the changes in upgrade.txt
This includes:

- Breaking changes (return void + PHP 7.1 min requirement).
- Deprecations and removals.
- Specifically DbUnit and its replacement.
- Printer showing how to rerun tests removed.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) 0ab106f41c MDL-67673 phpunit: Remove the rerun hint on failed test cases
That custom printer was using some hacks to be able to intercept
configuration switches, reflection and other tricks to be able to
print the:

To re-run:
 vendor/bin/phpunit --verbose "core_setuplib_testcase" lib/tests/setuplib_test.php

line on every failed/exceptional/skipped test. After some internal
discussion it was agreed that the normal phpunit output:

1) core_setuplib_testcase::test_localcachedir
Time is lower that allowed start value
Failed asserting that 1601976686 is equal to 1601976687 or is greater than 1601976687.

/var/www/html/lib/phpunit/classes/advanced_testcase.php:446
/var/www/html/lib/tests/setuplib_test.php:170
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

has already all the information at hand about how to rerun a test:

- vendor/bin/phpunit lib/tests/setuplib_test.php
- vendor/bin/phpunit --filter core_setuplib_testcase::test_localcachedir
- vendor/bin/phpunit --filter ::test_localcachedir
- vendor/bin/phpunit --testsuite componentname_testsuite
- vendor/bin/phpunit --config <<compoenent directory>>
- use --cache-result to get failed tests rerun with ease.
- ...

So better, let's use standard phpunit output and done. Also, note that,
with the upgrade to phpunit 8.5, the printer was not working correctly
any more, causing some switches, like --verbose ... to be ignored. Sure
it could have been fixed but, as commented above, no real need for all
that "parapheranlia" to print the rerun information.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) 9f82c9aece MDL-67673 phpunit: deprecate old phpunit/dbunit stuff
Apply the standard deprecation procedure to the old APIs, to
be removed in Moodle 4.2 (MDL-69882). Existing unit tests
cover the deprecation debugging.

Originally MDL-64600
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) 1f13dff1a7 MDL-67673 phpunit: Move tests to use new phpunit_dataset
- Make advanced_testcase old methods to use new ones internally.
- Fix advanced_testcase, statslib, mod/quiz and mod/data tests.

Originally MDL-64600
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) be396eddf0 MDL-67673 phpunit: Introduce a new, lightweight phpunit_dataset
In charge of taking over the, now removed/archived, phpunit/dbunit
package. It supports loading of CSV/XML files and strings and
PHP arrays, allowing to send the loaded information to database.

Perform some basic controls about the consistency of information,
surely not super-exhaustive but fair enough.

100% covered with unit test.

Planned like an "interim" replacement for phpunit/dbunit uses in
core that, ideally, should be moved to generators stuff at some
point.

Note, expect a few tests in core to fail with this commit, I've
changed some fixtures around. Next commit will fix existing uses.

Originally MDL-64600
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) 4af4d709a4 MDL-67673 phpunit: Disable phpunit results cache by default
It can be enabled if desired from CLI using the --cache-result
option (or modifying the phpunit.xml cacheResult to true).

That will create the .phpunit.result.cache files that,
later, can be used to easily repeat failed (defects) tests or
run the slow ones first and more. See the --order-by option
to know more about all the available criteria. For example:

./vendor/bin/phpunit --order-by=defects --stop-on-defect

(will run all the failed ones first, stopping on problem, useful
for TDD and other scenarios, not so much for complete runs or CI).

Also, added to .gitignore so they won't be committed ever.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) 46606b3ddd MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) 35bc26b516 MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) 106c64ac24 MDL-67673 phpunit: Remove deprecated non-public attribute assertions
With PHPUnit 8 a good number of assertions, all them related with
operations on non-public attributes have been deprecated. And will
be removed with PHPUnit 9.

The main point is that unit tests shouldn't be testing non-public
APIs (good practice) and those assertions were an error originally.

See https://github.com/sebastianbergmann/phpunit/issues/3338 for
the complete list and other details.

When possible (the attributes being checked are public), the change
is simple, just switching to normal assertions.

When the attributes are not public we need to find a workaround
to be able to test the same using public APIs, or use Reflection,
or remove the tests.

For the records, this is the regexp used to find all the cases:

ag '>(assertAttribute|attribute\(|readAttributte|getStaticAttribute| \
    getObjectAttribute)' -G "test.php"
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) ddf72dd60d MDL-67673 phpunit: Remove expectedException annotations
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

The annotations `@expectedException`, `@expectedExceptionCode`,
`@expectedExceptionMessage`, and `@expectedExceptionMessageRegExp`
are now deprecated.
Using these annotations will trigger a deprecation warning
in PHPUnit 8 and in PHPUnit 9 these annotations will be removed.

Also, all uses of expectExceptionMessageRegExp() has been moved
to expectExceptionMessageMatches(). See https://github.com/sebastianbergmann/phpunit/issues/3957

TODO: Various weirdness found while doing the changes with these tests:
- vendor/bin/phpunit lib/tests/exporter_test.php (created MDL-69700)
- vendor/bin/phpunit competency/tests/external_test.php (same issue than prev one)
- vendor/bin/phpunit question/engine/tests/questionengine_test.php (created MDL-69624)
- vendor/bin/phpunit lib/tests/event_test.php (created MDL-69688)
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) 0ae27225f5 MDL-67673 phpunit: Remove deprecated assertArraySubset()
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

assertArraySubset() is deprecated and will be removed in PHPUnit 9.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) a6674bf8a4 MDL-67673 phpunit: Remove deprecated assertInternalType()
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

assertInternalType() is deprecated and will be removed in
PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(),
assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(),
assertIsResource(), assertIsString(), assertIsScalar(),
assertIsCallable(), or assertIsIterable() instead.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7) dc87fd4b3f MDL-67673 phpunit: phpunit_constraint_object_is_equal_with_exceptions
Constraints are now declared final, so we cannot extend them anymore.

Hence, instead of extending PHPUnit\Framework\Constraint\IsEqual we
are just wrapping it into our constraint.
2020-10-21 12:46:04 +02:00
Eloy Lafuente (stronk7) d81a94807b MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:46:04 +02:00
Eloy Lafuente (stronk7) c611109ed7 MDL-67673 phpunit: Bump to PHPUnit 8.5 and remove DBunit
This makes everything to break, but it's what we'll be fixing
in the next commits, heh. :-)

Generated with php72 (min version supported), following the
instructions @ https://docs.moodle.org/dev/Composer
2020-10-21 12:46:04 +02:00
Paul Holden 74ef7dc5b1 MDL-69788 admin: validate language menu configuration. 2020-10-21 11:24:22 +01:00
Jun Pataleta 8996ed98c7 Merge branch 'MDL-37226-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-10-21 17:46:48 +08:00
Tim Schroeder 3fcba4be5e MDL-68438 message: fixed email format change with messaging disabled 2020-10-21 11:29:15 +02:00
Neill Magill 55d463b9f2 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:06:26 +01:00
Neill Magill bbb58b10ad MDL-69553 output: Unit tests for loading multiline string defines 2020-10-21 10:06:25 +01:00
Jun Pataleta f266c852c3 Merge branch 'MDL-69945-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-10-21 16:03:14 +08:00
Jun Pataleta b14daeaa9a MDL-69392 mod_forum: Colour contrast check for locked discussions 2020-10-21 14:54:25 +08:00
Jun Pataleta 8e083da3d5 MDL-69392 block_myoverview: Basic contrast check for the dashboard 2020-10-21 14:54:25 +08:00
Jun Pataleta 8312eeacb0 MDL-69392 question: Fix Try again button styling 2020-10-21 14:54:24 +08:00
Jun Pataleta 0ce40927cf 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:54:05 +08:00
Jun Pataleta 0cdfaccd4e 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:54:03 +08:00
Jun Pataleta d386d21360 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:53:44 +08:00
Adrian Greeve 5429ece3f8 Merge branch 'MDL-69807-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-21 14:18:02 +08:00
Adrian Greeve 32f99bc4d1 Merge branch 'MDL-68766-M310' of https://github.com/michael-milette/moodle into MOODLE_310_STABLE 2020-10-21 12:54:02 +08:00
Jake Dallimore df0df3110d Merge branch 'MDL-68983-recent-session-lock-ro-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-10-21 12:45:55 +08:00
Jake Dallimore 2ced8c6674 Merge branch 'MDL-69902-310' of https://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-10-21 10:57:35 +08:00
Jake Dallimore 17056bf206 Merge branch 'MDL-69751-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-10-21 10:02:47 +08:00
Eloy Lafuente (stronk7) 27b09acf75 on-demand release 3.10dev+ 2020-10-21 00:51:10 +02:00
Luca Bösch d159c32b84 MDL-65448 block_site_main_menu: Restyle moving. 2020-10-20 17:26:14 +02:00
Jake Dallimore 221f0e16d0 Merge branch 'MDL-67695-MOODLE_310_STABLE_get_lti_proxies' of https://github.com/andrewmadden/moodle into MOODLE_310_STABLE 2020-10-20 11:08:46 +08:00
Adrian Greeve 55189def65 Merge branch 'MOODLE_310_STABLE-MDL-68284' of https://github.com/yao9394/moodle into MOODLE_310_STABLE 2020-10-20 08:49:06 +08:00
Mihail Geshoski 086a2adc35 MDL-69751 core: Restore deleted guest user and add missing context
This upgrade step fixes the cases where the current guest user is
labelled as 'deleted' and the related user context is missing.
2020-10-20 08:41:35 +08:00
Mihail Geshoski 3c315a874a MDL-69751 course: Handle missing guest user context
Makes sure the guest user context exists when fetching
the recommended modules. If the context does not exist
an exception is being thrown describing the problem.
2020-10-20 08:39:17 +08:00
Simey Lameze b4a8a99898 MDL-68664 theme: remove right margin from form-inline class 2020-10-20 08:32:45 +08:00
Katie Ransom 08e8205d6f MDL-69962 tool_usertours: Fix increase in included files 2020-10-20 01:29:47 +01:00
Andrew Nicols 0a54a501eb Merge branch 'MDL-69687-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2020-10-20 08:02:22 +08:00
Jenkins Automation 213ea00afe MDL-69726 calendar: fix raw event fetcher under postgres
Without this, there's a code path that under the right circumstances is hit and
results in a query with `FROM (mdl_event) ev` in it - which is not valid syntax
under postgres.
2020-10-20 07:46:00 +08:00
Paul Holden 9428e33d55 MDL-69807 blocks: remove redundant sesskey loading edit/delete page. 2020-10-19 22:40:45 +01:00
Eloy Lafuente (stronk7) 31a98b3fb2 Merge branch 'MDL-69906-310-searchsimpledb' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-10-19 22:56:31 +02:00
Eloy Lafuente (stronk7) ae6da7d6a0 Merge branch 'MDL-57756-text-customparams-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-10-19 22:32:02 +02:00
Andrew Madden 4d5bc273ce MDL-67695 mod_lti: Use correct return structure for get_tool_proxies.
* Deprecated serialise_tool_proxy() as no longer used.
* Use tool_proxy_return_structure for each proxy.
* Added tests for getting all proxies and orphaned proxies.
2020-10-20 04:09:44 +11:00
Sara Arjona 33c7881448 Merge branch 'MDL-69897-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-19 18:14:54 +02:00
Sara Arjona b7146b655a Merge branch 'MDL-69900-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-10-19 13:41:59 +02:00
sam marshall 178d5a0e23 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:24:44 +01:00
Sara Arjona f576390bd2 Merge branch 'MOODLE_310_MDL-69791' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-10-19 10:07:21 +02:00
Andrew Nicols 7ed7afad98 Merge branch 'MDL-65448-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-10-19 15:54:36 +08:00
Luca Bösch a7e12a77b1 MDL-65448 block_social_activities: Restyle moving. 2020-10-19 09:50:20 +02:00
Luca Bösch 09e02634d4 MDL-65448 core_course: Restyle non-JS activity moving. 2020-10-19 09:50:20 +02:00
Luca Bösch be019636d1 MDL-65448 gradebook: Remove erraneous dev .movehere class left over. 2020-10-19 09:50:19 +02:00
Luca Bösch 7789be4030 MDL-65448 core_course: Restyle non-JS activity moving. 2020-10-19 09:50:19 +02:00
Luca Bösch 91c9ca0f49 MDL-65448 block_site_main_menu: Restyle moving. 2020-10-19 09:50:18 +02:00
Luca Bösch 7c0923a3e4 MDL-65448 block_social_activities: Restyle moving. 2020-10-19 09:50:18 +02:00
Luca Bösch 83cba7b9b0 MDL-65448 gradebook: Restyle moving. 2020-10-19 09:50:18 +02:00
Sara Arjona cb4418bc5b Merge branch 'MDL-69736-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2020-10-19 09:03:51 +02:00
Brendan Heywood 4db3403481 MDL-69513 email: Add support for email DKIM signatures 2020-10-19 16:20:42 +11:00
Andrew Nicols 9296086653 Merge branch 'MDL-69687-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2020-10-19 13:19:28 +08:00
Andrew Nicols 38d4a1b75f Merge branch 'MDL-65448-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-10-19 10:07:45 +08:00
Michael Milette 1b4ef7cd88 MDL-68766 auth: Login form: 'Log in using...' should be h3, not h6 2020-10-17 03:59:35 -04:00
sam marshall 3576eb4835 MDL-69687 Course: Improve removal of completion data on MySQL 2020-10-16 18:22:51 +01:00
sam marshall 39eb58c754 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:22:51 +01:00
Luca Bösch c6731f8045 MDL-37226 assign: align select all header checkbox 2020-10-16 16:08:58 +02:00
Paul Holden 252f95e1b7 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-16 14:38:03 +01:00
Luca Bösch c24c9e174b MDL-65448 block_site_main_menu: Restyle moving. 2020-10-16 14:50:11 +02:00
Luca Bösch 199333208d MDL-65448 block_social_activities: Restyle moving. 2020-10-16 14:50:10 +02:00
Luca Bösch 91557080d7 MDL-65448 core_course: Restyle non-JS activity moving. 2020-10-16 14:50:10 +02:00
Luca Bösch 3370b20e3c MDL-65448 gradebook: Restyle moving. 2020-10-16 14:50:10 +02:00
Luca Bösch 2c98bfc4f4 MDL-69945 core_calendar: let circles appear as circles 2020-10-16 14:22:47 +02:00
Sara Arjona 36f0c3d531 on-demand release 3.10dev+ 2020-10-16 13:18:54 +02:00
Sagar Ghimire 1ebbd18b82 MDL-68284 gradebook: Prevent exposing hidden quiz grade item 2020-10-16 15:06:34 +11:00
Jake Dallimore 04a02b5bd9 Merge branch 'MOODLE_310_MDL-47178' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-10-16 11:52:29 +08:00
Jun Pataleta 506df9bdbd Merge branch 'MDL-69266-310' of https://github.com/HuongNV13/moodle into MOODLE_310_STABLE 2020-10-16 10:09:40 +08:00
Huong Nguyen 873b4847f5 MDL-69266 qtype_ddwtos: 'unlimited' options fail in 3.9 2020-10-15 20:05:52 +07:00
Adrian Greeve a2aa548af7 Merge branch 'MDL-69549-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-10-15 15:11:29 +08:00
Jun Pataleta d0c89df9ee Merge branch 'MDL-69583-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2020-10-15 13:56:58 +08:00
Jun Pataleta 30eccfabaa Merge branch 'MDL-69520-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-10-15 13:53:36 +08:00
Simey Lameze 63e2c543ae MDL-69549 mod_resource: content export implementation 2020-10-15 13:46:25 +08:00
Andrew Nicols a69b38d604 MDL-69549 mod_page: Content export implementation 2020-10-15 13:46:25 +08:00
Andrew Nicols 0ea391d1eb MDL-69549 mod_folder: Content export implementation 2020-10-15 13:46:25 +08:00
Andrew Nicols 17d4bc49f6 MDL-69549 core: Add context export API 2020-10-15 13:46:25 +08:00
Katie Ransom 57a13a5971 MDL-69739 tool_usertours: Add tour-level CSS selector 2020-10-15 13:35:32 +08:00
Eloy Lafuente (stronk7) 12fce2a4bd Merge branch 'MDL-69813-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-14 22:47:12 +02:00
Eloy Lafuente (stronk7) b68dd3a121 Merge branch 'MDL-63805-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-10-14 21:22:08 +02:00
Eloy Lafuente (stronk7) eb4c7963c0 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:57:29 +02:00
Sara Arjona dde0818f6c MDL-69520 core_h5p: unit tests for covering example and tutorial 2020-10-14 18:35:52 +02:00
Sara Arjona ad28920d0b MDL-69520 core_h5p: add example and tutorial links 2020-10-14 18:35:50 +02:00
Eloy Lafuente (stronk7) a5cde22a26 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:54:26 +02:00
Víctor Déniz 44719d2ad9 Merge branch 'MDL-68900-m310' of https://github.com/sumitnegi933/moodle into MOODLE_310_STABLE 2020-10-14 12:22:22 +01:00
Juan Leyva 784c09c834 MDL-63805 glossary: New WS mod_glossary_prepare_entry_for_edition 2020-10-14 12:57:33 +02:00
Juan Leyva 004be78003 MDL-63805 glossary: New WS mod_glossary_update_entry 2020-10-14 12:56:52 +02:00
Juan Leyva 7fae5f61ef MDL-63805 glossary: Glossary API refactor 2020-10-14 12:56:43 +02:00
Ferran Recio d7cadcc244 MDL-69583 tool_customlang: add CLI import 2020-10-14 11:59:33 +02:00
Jake Dallimore 2cb45addb1 Merge branch 'MOODLE_310_MDL-69848' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-10-14 09:42:43 +08:00
Víctor Déniz 5ea92799c4 Merge branch 'MDL-69779-better-x-redirect-by-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-10-13 23:41:59 +01:00
Víctor Déniz 55c9482171 Merge branch 'MDL-68440-310' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE 2020-10-13 23:15:48 +01:00
Simon Mok 1a7928173b MDL-68070 messaging: Fix error when personal notification is disabled 2020-10-13 23:40:46 +02:00
Eloy Lafuente (stronk7) c3299761f7 Merge branch 'MDL-63806-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-10-13 22:26:35 +02:00
Sara Arjona 9aeb59af73 on-demand release 3.10dev+ 2020-10-13 13:25:30 +02:00
Ferran Recio 3759daa952 MDL-69583 tool_customlang: add customization import 2020-10-13 12:33:13 +02:00
Brendan Heywood 15044cea7f MDL-68983 cache: Fix bug with readonly session combined with lock debug 2020-10-13 14:53:26 +11:00
Andrew Nicols 1170a8b694 Merge branch 'MDL-66928-request-dir-purge-bug-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-10-13 11:49:10 +08:00
Brendan Heywood 69959c371f MDL-66928 core: Move request dirs to system tmp instead of localcache 2020-10-13 14:29:30 +11:00
Andrew Nicols ec46b18e13 Merge branch 'MDL-67654-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-13 07:58:20 +08:00
Paul Holden f1acce7bef MDL-67654 mod_forum: formchangechecker for discussion inline replies. 2020-10-12 23:32:44 +01:00
Paul Holden 9597baa6e8 MDL-69809 mod_folder: include forcedownload setting in WS responses. 2020-10-12 12:28:26 +01:00
Adrian Greeve 1c6e578db4 Merge branch 'MOODLE_310_MDL-69818' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-10-12 14:48:48 +08:00
Jake Dallimore a7ea95030c Merge branch 'MDL-68292-admin-sesskey-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-10-12 14:37:07 +08:00
Brendan Heywood 3f04dbee09 MDL-68292 core: Remove sesskey leakage on module pages 2020-10-12 17:11:59 +11:00
Adrian Greeve 6a91117d4a Merge branch 'MDL-65743-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2020-10-12 13:41:44 +08:00
Simey Lameze cfe9f53e91 MDL-65743 lib: update moodle library docs 2020-10-12 13:10:12 +08:00
Simey Lameze decd480c42 MDL-65743 lib: add XMPPHP namespace and update calls 2020-10-12 13:10:12 +08:00
Simey Lameze d947f53d4c MDL-65743 lib: upgrade XMPPHP library to v2.2 2020-10-12 13:10:12 +08:00
Andrew Nicols 00877bf283 Merge branch 'MDL-69776-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-10-12 12:33:51 +08:00
Adrian Greeve 6f86e933ed Merge branch 'MDL-69649-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-10-12 10:15:41 +08:00
Jake Dallimore 6d7b36da59 Merge branch 'MDL-69910-calendar-protectusername-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-10-12 10:05:43 +08:00
Jake Dallimore 7924191691 Merge branch 'MDL-69707-redis-avoid-write-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-10-12 09:57:46 +08:00
Peter Burnett 0628d11380 MDL-68440 cache: Added counting of default mappings 2020-10-12 11:57:17 +10:00
Jake Dallimore 151a63b4cc Merge branch 'MDL-68406-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-10-12 09:51:51 +08:00
Adrian Greeve 4ebfbfe88c Merge branch 'MDL-69825-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-12 08:09:47 +08:00
Brendan Heywood 93a60507fc MDL-69779 core: Improved the X-Redirect-By header when debugging is on 2020-10-11 09:50:21 +11:00
Brendan Heywood 0a8371c690 MDL-69910 calendar: Fix export exception when both params are sent 2020-10-10 19:28:45 +11:00
Paul Holden 604f19afd6 MDL-69825 admin: externalpage class using a callback for access check.
Co-Authored-By: Marina Glancy <marina@moodle.com>
2020-10-09 15:09:05 +01:00
David Mudrák bda1473afa 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:29 +02:00
Sara Arjona d70cfda576 on-demand release 3.10dev+ 2020-10-09 11:12:48 +02:00
Juan Leyva 3dc820a057 MDL-68406 tool_mobile: Allow users to log-out from the app
In this commit, we also reorganised how the Mobile box is displayed in the user profile.
We are allowing now site admins to see the user last access time.
2020-10-09 09:59:43 +02:00
Juan Leyva 4b64516b0e MDL-63806 glossary: New WS mod_glossary_delete_entry 2020-10-09 09:50:38 +02:00
Juan Leyva e8496407e9 MDL-63806 glossary: Return user permissions for entries in WS 2020-10-09 09:49:59 +02:00
Juan Leyva 0ab3fd7958 MDL-63806 glossary: Move delete code to API function 2020-10-09 09:49:59 +02:00
Marina Glancy d103bdba3d MDL-69902 core_search: fix error in the custom fields indexing 2020-10-09 08:52:47 +02:00
Adrian Greeve cf1d32e9c5 Merge branch 'MDL-68384-fix-spec-violations-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-10-09 12:05:34 +08:00
Jun Pataleta b5fe033b18 Merge branch 'MDL-69740_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-10-09 11:56:44 +08:00
Jun Pataleta 05a3e35677 Merge branch 'MDL-69257-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-10-09 11:12:16 +08:00
Mihail Geshoski 03058394f2 MDL-69257 core_h5p: Move $maxsize outside the foreach loop
There is no reason to repeatedly obtain the maximum size for uploading
files as a part of foreach loop.
2020-10-09 10:36:01 +08:00
Martin Gauk 1a80427018 MDL-69257 H5P: Check size of uploaded files and virus scan 2020-10-09 10:36:01 +08:00
Stephen Bourget a2b727d7bc MDL-69900 core_backup: Allow IMSCC v1.0 restore to finish 2020-10-09 09:06:26 +08:00
Eloy Lafuente (stronk7) b2a382016f Merge branch 'MDL-69582-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2020-10-08 22:44:29 +02:00
Paul Holden 31efbf2e0e MDL-69897 repository: add heading to delete file modal. 2020-10-08 20:29:48 +01:00
Thomas Wedekind 3540343ceb MDL-69582 tool_customlang: export cli script 2020-10-08 19:30:26 +02:00
Thomas Wedekind 78076a621f MDL-69582 tool_customlang: add export langstring feature 2020-10-08 19:30:26 +02:00
Eloy Lafuente (stronk7) ca80e9a68d Merge branch 'MDL-69810-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-10-08 16:58:34 +02:00
Eloy Lafuente (stronk7) 9b9b38f44e Merge branch 'MDL-69712-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2020-10-08 16:25:35 +02:00
Sara Arjona 8e5b007c3e Merge branch 'MDL-64657-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-10-08 14:15:38 +02:00
Sara Arjona d487ee2240 Merge branch 'MDL-69146_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-10-08 12:43:29 +02:00
Sumit Negi 300e4aef4c 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:46:17 +05:30
Adrian Greeve eefa5c928f Merge branch 'MDL-69805-310' of https://github.com/dravek/moodle into MOODLE_310_STABLE 2020-10-08 15:00:29 +08:00
Adrian Greeve 407dcd4922 Merge branch 'MDL-69798_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-10-08 13:34:30 +08:00
Jake Dallimore 8d9a36fb8a Merge branch 'MDL-69192-310-behat' of https://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-10-08 09:22:40 +08:00
Andrew Nicols b2d43a7db1 MDL-68665 assignfeedback_editpdf: Coding style fixes 2020-10-08 08:24:07 +08:00
Andrew Nicols 876a5c143b Merge branch 'MDL-68665-310-assign-stamp-cache' of https://github.com/jamie-catalyst/moodle into MOODLE_310_STABLE 2020-10-08 08:23:36 +08:00
Andrew Nicols c562848596 MDL-69192 mod_assign: Stop clicking OK on non-existent modal 2020-10-08 08:04:43 +08:00
Eloy Lafuente (stronk7) 74efdb135d Merge branch 'MDL-69760-MOODLE_310_STABLE' of https://github.com/inkjet2000/moodle into MOODLE_310_STABLE 2020-10-08 00:25:14 +02:00
Víctor Déniz 46d1546c6e Merge branch 'MDL-69759-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2020-10-07 22:24:58 +01:00
Jamie Stamp c2ba78902c MDL-68665 assignfeedback_editpdf: Fix systemsstamp URLs 2020-10-07 16:23:18 +01:00
Jamie Stamp 12fb5964f2 MDL-68665 assignfeedback_editpdf: Add filearea to persist stamps 2020-10-07 16:21:18 +01:00
Justin Merrill 52a84caaaa MDL-69760 core: add mdl_event index for assign adhoc tasks 2020-10-07 09:18:24 -04:00
Sara Arjona 524f6a656b Merge branch 'MDL-65451-310' of https://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-10-07 09:39:58 +02:00
Andrew Nicols 86e69ea7b2 Merge branch 'MDL-69192-310' of https://github.com/willob99/moodle into MOODLE_310_STABLE 2020-10-07 13:18:41 +08:00
Andrew Nicols 12820e3a56 Merge branch 'MDL-67275-310-post_noun_verb' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-10-07 12:38:02 +08:00
Victor Deniz Falcon 36905f42b8 MDL-52407 travis: use Travis default notifications(email) 2020-10-07 10:45:54 +08:00
Adrian Greeve fd532533dd Merge branch 'MDL-59510-310' of https://github.com/snake/moodle into MOODLE_310_STABLE 2020-10-07 09:58:52 +08:00
Víctor Déniz d6806beb3e Merge branch 'MDL-62678-core-fetch-notifications-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-10-06 22:58:45 +01:00
Eloy Lafuente (stronk7) 9ab387d707 Merge branch 'MDL-69746-MOODLE_310_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_310_STABLE 2020-10-06 23:53:22 +02:00
Marina Glancy 2a4d1c64bf MDL-65451 tool_uploaduser: move code away from index.php, add CLI script 2020-10-06 15:53:13 +02:00
Ferran Recio a0999ab66f MDL-69736 core_h5p: enable player reporting 2020-10-06 13:05:33 +02:00
Paul Holden 7e3f7e3d7c MDL-69813 h5p: fix undefined addon ordering in framework test. 2020-10-06 10:48:06 +01:00
Eloy Lafuente (stronk7) 823bc36276 on-demand release 3.10dev+ 2020-10-06 10:21:14 +02:00
Mikhail Golenkov 1f3aacf8fc MDL-47178 question: Retain question authors when restoring backups. 2020-10-06 09:33:56 +11:00
Eloy Lafuente (stronk7) 38bcf316ee Merge branch 'MDL-69772-310-allcountrycodes' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-10-06 00:04:05 +02:00
Eloy Lafuente (stronk7) f993881244 Merge branch 'MDL-65074-310' of https://github.com/hitteshahuja/moodle into MOODLE_310_STABLE 2020-10-05 23:12:25 +02:00
Víctor Déniz 3277fc9db6 Merge branch 'MDL-69625-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-05 19:21:12 +01:00
Sara Arjona ef3720efbd Merge branch 'MDL-69355-310-filebuffer' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-10-05 18:33:45 +02:00
Jun Pataleta 41bc6b9400 Merge branch 'MDL-69704-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-10-05 23:12:57 +08:00
Paul Holden b9f8e3e114 MDL-69625 course: return raw custom field value in external method.
For clients that wish to consume the original value of the custom
field (e.g. timestamps for date fields), rather than the formatted
version, add a new "valueraw" property to the returned data.
2020-10-05 10:40:33 +01:00
Eloy Lafuente (stronk7) 355d07e0b4 Merge branch 'MOODLE_310-MDL-69752' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-10-05 10:54:56 +02:00
Amaia Anabitarte 5af206ad2a MDL-69712 core_h5p: Remove 'whitelist' key uses 2020-10-05 10:28:07 +02:00
Jun Pataleta 5ec265b48d Merge branch 'MOODLE_310_MDL-53966' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-10-05 13:24:04 +08:00
Mikhail Golenkov 35b29ce7d9 MDL-69791 gradereport: Fix error message when invalid grade is entered 2020-10-05 14:59:41 +11:00
Mikhail Golenkov bec49592ce MDL-69848 upgrade: Delete notifications in chunks 2020-10-05 13:13:51 +11:00
Jake Dallimore 57bb99edd4 MDL-59510 core_oauth2: autorefresh google drive, nextcloud and onedrive
Request additional offline access, allowing the repository to sign in
automatically each time, including across different user sessions, until
either the refresh token is invalidated or the user logs out of the
repository.
2020-10-05 09:17:14 +08:00
Jake Dallimore eb6b828b81 MDL-59510 core: report oauth2_refresh_token table in core provider 2020-10-05 09:17:14 +08:00
Jake Dallimore 8b09853319 MDL-59510 core_oauth2: add autorefresh mode to oauth2\client
Changes:
- The client can now be instantiated with the new mode enabled.
- A user refresh token will be stored if returned as part of the
authorization_code grant but only if the user is authenticated and only
if the mode is enabled.
- If the mode permits it, attempt to exchange a stored refresh token for
a new access token during login checks, allowing access to continue
across sessions without the need to re-grant consent every time.
- Purge all refresh tokens for a given user, issuer and scope on client
log out. This makes sure logout persists across logins.
2020-10-05 09:17:14 +08:00
Jake Dallimore fe1031244b MDL-59510 core_oauth2: add oauth2_refresh_token table 2020-10-05 09:17:14 +08:00
Mikhail Golenkov 03de8ed6d9 MDL-69818 mod_feedback: Fix item dependency during activity restoration 2020-10-04 18:27:32 +11:00
Mikhail Golenkov 6fae5e65e9 MDL-69752 mod_data: Format module intro on Database activities page 2020-10-04 13:46:32 +11:00
Mikhail Golenkov d7157063c3 MDL-53966 lesson: Allow maximum number of attempts to be unlimited 2020-10-04 13:18:45 +11:00
Tim Hunt 477fb6c9d6 MDL-69740 Behat init: more progress info at the end of the install 2020-10-02 23:16:23 +01:00
Juan Leyva c50b024463 MDL-69810 tool_mobile: Return support contact information via WS 2020-10-02 21:02:37 +02:00
Eloy Lafuente (stronk7) fadd2915eb MDL-69146 composer: bump to moodle-behat-extension 3.310.0
Generated following the instructions @:

https://docs.moodle.org/dev/Composer#How_to_prepare_and_submit_composer_changes

(using php72)

Note that here we are jumping to 3-digit branches (for all branches > 39),
exactly how we have done for moodle.git branches (310, 311, 400, 401...)
2020-10-02 15:07:01 +02:00
Sara Arjona c71355941b on-demand release 3.10dev+ 2020-10-02 13:44:05 +02:00
Nathan Nguyen 18871c74e2 MDL-69746 tool_replace: additional skip tables 2020-10-02 15:00:18 +10:00
Víctor Déniz 5cffc7f78b Merge branch 'MDL-69087-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-10-01 23:42:20 +01:00
Nathan Nguyen 946159a554 MDL-69572 mod_book : add bookid index to book_chapters 2020-10-01 23:28:21 +01:00
Eloy Lafuente (stronk7) 8d371859dc Merge branch 'MDL-69758-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2020-10-01 23:44:15 +02:00
Claude Vervoort aad6afe979 MDL-57756 mod_lti: params change to text type 2020-10-01 17:32:44 -04:00
Sara Arjona d12c1406df MDL-69704 course: catch exception when calling get_course_content_items
When plugins are removed from disk, an exception is thrown when
calling component_callback_exists.
This exception should be catched here in order to load properly
the activity chooser (otherwise, the exception will be displayed
and no activity will appear).
2020-10-01 19:56:34 +02:00
Víctor Déniz 5130127a3e Merge branch 'MDL-69613-MOODLE_310_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_310_STABLE 2020-10-01 17:39:51 +01:00
Tim Hunt 651dbb729c MDL-69798 XML question export: excape special chars in idnumbers 2020-10-01 17:10:28 +01:00
Jamie Stamp 2c8db06e7a MDL-68665 assignfeedback_editpdf: Improve caching on stamps 2020-10-01 16:52:48 +01:00
Eloy Lafuente (stronk7) e98d18241f Merge branch 'MDL-69672-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2020-10-01 17:49:15 +02:00
Eloy Lafuente (stronk7) 3e460f45ac Merge branch 'MDL-69586-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-01 17:12:43 +02:00
Sara Arjona d5e30e0108 Merge branch 'MDL-69638_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-10-01 15:01:56 +02:00
Sara Arjona 7db1a61a72 Merge branch 'MDL-69050-310-allowlist' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-10-01 14:51:12 +02:00
David Mudrák d335530a28 MDL-69772 admin: Better validation for the allcountrycodes setting
The patch introduces a new admin_setting fiela 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:38:48 +02:00
Sara Arjona 6fe5bb1b96 MDL-69050 lang: Fix few remaining places spotted during integration 2020-10-01 13:01:58 +02:00
Sara Arjona e2a73965ca Merge branch 'MDL-68098-310' of git://github.com/dpalou/moodle into MOODLE_310_STABLE 2020-10-01 12:56:23 +02:00
Ferran Recio ccd0b96591 MDL-69582 tool_customlang: fix options layout 2020-10-01 11:04:10 +02:00
Ferran Recio 851f0d3354 MDL-69582 tool_customlang: add label to textarea 2020-10-01 11:04:10 +02:00
Sara Arjona 5576a97713 Merge branch 'MDL-67473-multipledeeplinking-squashed-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-10-01 10:28:12 +02:00
Jake Dallimore b235c3a5a7 Merge branch 'MDL-69573-MOODLE_310_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_310_STABLE 2020-10-01 12:20:29 +08:00
Adrian Greeve c00b8b7cab Merge branch 'MDL-54956-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-10-01 11:17:44 +08:00
willob99 b19f178e0d MDL-69192 mod_assign: replace grading confirmation popup 2020-09-30 11:08:11 -07:00
David Matamoros 56b28e8e0b MDL-69805 mod_data: Freeze comment field if comments disabled 2020-09-30 15:51:02 +02:00
Matteo Scaramuccia 6658d9fba1 MDL-68536 core: Fix notice about undefined prop 'branch' in $CFG 2020-09-30 14:43:42 +02:00
Claude Vervoort 09dabe003a MDL-67473 mod_lti: deeplinking multiple support
AMOS BEGIN
 CPY [contentitem_help,mod_lti],[contentitem_deeplinking_help,mod_lti]
AMOS END
2020-09-30 08:04:53 -04:00
Nathan Nguyen 85f136094b MDL-69573 core_course: Make MAX_COURSES_IN_CATEGORY configurable 2020-09-30 16:04:55 +10:00
Adrian Greeve 1c55d84794 Merge branch 'MDL-37802-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-30 13:51:31 +08:00
Brendan Heywood 3ac504fd3d MDL-62678 core: Improve efficiency of notifications and avoid ajax call 2020-09-30 13:56:29 +10:00
Jake Dallimore 1f25df48b1 Merge branch 'MDL-68845-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-09-30 11:45:43 +08:00
Adrian Greeve 64ba1753a8 Merge branch 'MDL-68562_310' of https://github.com/mkassaei/moodle into MOODLE_310_STABLE 2020-09-30 11:12:34 +08:00
Eloy Lafuente (stronk7) 0e8d14f4e9 MDL-69638 install: update the list of stale files for 3.10 2020-09-29 22:37:56 +02:00
Víctor Déniz 9c28e07d31 Merge branch 'MDL-67841-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-09-29 18:33:48 +01:00
Sara Arjona 4ea44f96e5 Merge branch 'MDL-69342-310_profile_picture_deletion' of https://github.com/vtos/moodle into MOODLE_310_STABLE 2020-09-29 19:01:05 +02:00
Amaia Anabitarte c5c1b8b121 MDL-69672 core_contentbank: is_context_allowed unit tests 2020-09-29 17:47:37 +02:00
Amaia Anabitarte 3490f29ad9 MDL-69672 core_contentbank: Check used context level 2020-09-29 17:47:36 +02:00
Jun Pataleta 3b03a3da47 Merge branch 'MDL-69600-divertemails-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-09-29 20:27:36 +08:00
Sara Arjona a6aefe15f0 Merge branch 'MDL-65976-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-09-29 14:09:26 +02:00
Juan Leyva b294665c21 MDL-65976 completion: New course completion message provider 2020-09-29 13:41:49 +02:00
Brendan Heywood 2b50abffa2 MDL-69707 session: Avoid redis writes if the session is unchanged 2020-09-29 20:46:25 +10:00
Brendan Heywood acb848cdce MDL-69600 core: Expose divertallemails config in UI 2020-09-29 20:30:09 +10:00
Jun Pataleta 7cd362b873 Merge branch 'MDL-41492-310' of https://github.com/peterburnett/moodle into MOODLE_310_STABLE 2020-09-29 18:07:18 +08:00
Juan Leyva cc16de4ccc MDL-68845 calendar: New WS get_calendar_export_token 2020-09-29 10:56:29 +02:00
Juan Leyva c0af823086 MDL-68845 calendar: Move duplicated code to function 2020-09-29 10:54:05 +02:00
Eloy Lafuente (stronk7) 8b026809c5 on-demand release 3.10dev+ 2020-09-29 10:48:59 +02:00
Jun Pataleta 2dbc9a5005 Merge branch 'MDL-69283-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-09-29 13:53:53 +08:00
Claude Vervoort d224506353 MDL-68384 mod_lti: fix spec violations bo claim name and dl value type 2020-09-28 17:02:40 -04:00
Juan Leyva 0d1187b052 MDL-67841 tool_mobile: Inform about last access with the app 2020-09-28 21:40:54 +02:00
Víctor Déniz a2e3aa6806 Merge branch 'MDL-69644-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-28 20:34:01 +01:00
Shamim Rezaie adac2a9e55 MDL-69649 form: Fix labels for defaultcustom form elements 2020-09-28 23:43:01 +10:00
Shamim Rezaie 2fca843e49 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:43:01 +10:00
Sara Arjona 157a497a3e Merge branch 'MDL-69695-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-28 13:03:21 +02:00
sam marshall 4f0fc4f45b MDL-69759 Web services: app checks to token.php cause log errors 2020-09-28 11:55:14 +01:00
Sara Arjona 27b1425eb2 Merge branch 'MDL-68935-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-09-28 11:41:01 +02:00
Peter Burnett 40e41c1997 MDL-41492 cache: Added ability for alternate cache config 2020-09-28 15:14:30 +10:00
Nathan Nguyen 89ce0b387e MDL-69613 gradereport: confirm message if override none is selected 2020-09-28 10:40:06 +10:00
Juan Leyva 9b64c178dd MDL-69283 webservice: New external setting for forcing timezone 2020-09-25 19:09:50 +02:00
Hittesh Ahuja 69cc1d1dd5 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:14:06 +01:00
Juan Leyva 39c8e99e67 MDL-69776 files: New WS core_files_delete_draft_files 2020-09-25 10:38:25 +02:00
Paul Holden 833ab0ea9f 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:33:54 +01:00
Paul Holden 2b87250347 MDL-69586 tool_usertours: use specified user in privacy prefs export. 2020-09-25 09:13:28 +01:00
Mahmoud Kassaei 95d1f1f18d MDL-68562 Qtype_essay: Adding file-size limit to the attachment files 2020-09-25 08:52:59 +01:00
Sara Arjona d23f05828f MDL-69087 core_h5p: add renderer to let personalize styles
Existing mod_hvp pluging has a renderer to let Moodle instances
alter styles, Javascript, semantics (fields in the editor) and
content: https://github.com/h5p/moodle-mod_hvp/blob/stable/renderer.php

The approach for core_h5p is exactly the same, to let people
to reuse their existing code.
2020-09-24 19:56:42 +02:00
David Mudrák 972340b678 MDL-69050 lang: Stop using the term blacklist in mustache output engine 2020-09-24 19:39:36 +02:00
David Mudrák 3971892bd3 MDL-69050 lang: Fix the variable name in the admin/cli/svgtool.php 2020-09-24 19:33:36 +02:00
David Mudrák b18b714165 MDL-69050 lang: Fix variable name and comment in core-notification YUI 2020-09-24 19:33:36 +02:00
David Mudrák 781545d34d MDL-69050 lang: Rename and deprecate filetypes_util methods 2020-09-24 19:33:32 +02:00
David Mudrák 19fe7f27a8 MDL-69050 lang: Improve the wording of the comments
Stop using the terms whitelist/blacklist when used to allow/deny things.
2020-09-24 19:32:40 +02:00
David Mudrák bd686af064 MDL-69050 lang: Fix the variable name in the Essay question type 2020-09-24 19:32:40 +02:00
David Mudrák fd18dc14ff MDL-69050 lang: Rename the filetypesnotwhitelisted string
Rename the string identifier to filetypesnotallowed, copy all the
existing translations in AMOS and deprecate the original string to be
eventually removed.

AMOS BEGIN
 CPY [filetypesnotwhitelisted,core_form],[filetypesnotallowed,core_form]
AMOS END
2020-09-24 19:32:40 +02:00
David Mudrák e840b14f4c MDL-69050 lang: Fix the variable name in the TeX filter library 2020-09-24 19:32:39 +02:00
David Mudrák 730aa1dcb0 MDL-69050 lang: Rename the whitelist variable in the Workshop locallib 2020-09-24 19:32:39 +02:00
David Mudrák 9ef6492e5d MDL-69050 lang: Fix variables and methods names in curl_security_helper
The code has been using terms that were found exclusive and potentially
derogatory. Fixing the terms and making the variables and methods
consistent with the related admin settings.
2020-09-24 19:32:39 +02:00
David Mudrák 41ad54e182 MDL-69050 lang: Fix placeholder in the err_wrongfileextension string
The name of the placeholder has been found exclusive and potentially
derogatory. Also the name of variable that was used to populate the
placeholder value. That was not the intention.
2020-09-24 19:32:39 +02:00
David Mudrák 2a1fb5b5e7 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 18:14:29 +02:00
David Mudrák 56adf1f3d8 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 18:14:29 +02:00
Víctor Déniz a36870c175 weekly release 3.10dev 2020-09-24 16:27:15 +01:00
Eloy Lafuente (stronk7) a0f377cf2b Merge branch 'MDL-69698-310-licensecache' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-09-24 16:50:39 +02:00
Eloy Lafuente (stronk7) 7905d70497 Merge branch 'MDL-69718-display-size-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE 2020-09-24 16:39:26 +02:00
Paul Holden d0a55062f9 MDL-69644 tool_dataprivacy: fix focus outline of contact DPO link.
The link class attribute is a leftover from 7258bf0b, which was mostly
removed in 3b2f691f. It no longer serves a purpose and interferes with
the element focus outline.
2020-09-24 11:53:29 +01:00
Vitaly 7f177d440c 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:29:31 +03:00
Bas Brands 8730ffcbe1 MDL-66587 mod_quiz: visible quiz timer 2020-09-24 11:32:18 +08:00
Bas Brands 486aa319c2 MDL-69454 core_search: consistent backup search 2020-09-23 17:36:15 +02:00
Bas Brands 6fa8e1c86f MDL-69454 core_search: consistent cohort search 2020-09-23 17:36:15 +02:00
Bas Brands dcfb713ca6 MDL-69454 core_search: consistent content bank search 2020-09-23 17:36:15 +02:00
Bas Brands 9d82cdb62e MDL-69454 core_search: consistent activity chooser search 2020-09-23 17:36:15 +02:00
Bas Brands a88f50d1b2 MDL-69454 core_search: consistent template library search 2020-09-23 17:36:15 +02:00
Bas Brands 94adb3429b MDL-69454 core_search: consistent capability search 2020-09-23 17:36:15 +02:00
Bas Brands bd516bf05c MDL-69454 core_search: consistent tag search 2020-09-23 17:36:15 +02:00
Bas Brands 02829c03c1 MDL-69454 core_search: message search 2020-09-23 17:36:14 +02:00
Bas Brands e9435e8f6d MDL-69454 core_search: consistent mod searches 2020-09-23 17:36:14 +02:00
Bas Brands 6a750d283d MDL-69454 core_search: consistent block searches 2020-09-23 17:36:14 +02:00
Bas Brands b5e39191fc MDL-69454 core_search: consistent course management search 2020-09-23 17:36:14 +02:00
Bas Brands 42c1cf3b03 MDL-69454 core_search: consistent frontpage course search 2020-09-23 17:36:14 +02:00
Bas Brands a5cd815635 MDL-69454 core_search: consistent admin search 2020-09-23 17:36:14 +02:00
Bas Brands 1fdb4fda4a MDL-69454 core_search: consistent navbar search 2020-09-23 17:36:14 +02:00
Juan Leyva 61772eb89b MDL-54956 quiz: Fix WS to support files submission 2020-09-23 12:52:45 +02:00
Juan Leyva e49ccc92c4 MDL-54956 quiz: Return response files in attempts 2020-09-23 12:52:45 +02:00
Dani Palou f9f289f69d MDL-68098 tests: Reset FILTERLIB_PRIVATE after tests 2020-09-23 12:09:08 +02:00
Dani Palou e16b858ff9 MDL-68098 ws: Add unit tests to test mathjax in WS 2020-09-23 12:08:52 +02:00
Dani Palou f4bdb898c7 MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-23 12:08:40 +02:00
Eloy Lafuente (stronk7) 2d502fd749 Merge branch 'MDL-68229-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-09-23 11:51:16 +02:00
Eloy Lafuente (stronk7) b552d604ff Merge branch 'MDL-69014-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-22 23:04:57 +02:00
Eloy Lafuente (stronk7) 6d73afb2bf Merge branch 'MDL-66934-coursehistory-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE 2020-09-22 14:40:12 +02:00
Juan Leyva 0ad2d843d7 MDL-64657 course: Return hidden section names when configured 2020-09-22 11:53:04 +02:00
Eloy Lafuente (stronk7) 82a1e8fae7 Merge branch 'MDL-66648-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-21 23:36:22 +02:00
Eloy Lafuente (stronk7) a2c1a20055 Merge branch 'MDL-69667-MOODLE_310_STABLE' of https://github.com/comete-upn/moodle into MOODLE_310_STABLE 2020-09-21 23:20:05 +02:00
David Mudrák 76c3dc5f6b 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:50:43 +02:00
sam marshall 62ea8b1cae 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:28:11 +01:00
Brendan Heywood c36d5093e3 MDL-69718 core: Added support for TB and PT to display_size 2020-09-21 12:55:44 +10:00
Claude Vervoort fae57261e7 MDL-66934 mod_lti: support context history param 2020-09-18 14:06:58 -04:00
Juan Leyva 11a49b08e7 MDL-68229 tool_mobile: Add missing option to disable tags in the app 2020-09-18 15:31:03 +02:00
Sara Arjona a730c334c7 MDL-69548 grunt: build ignorefiles 2020-09-18 09:56:22 +02:00
Sara Arjona fb5e3957be Merge branch 'MDL-69548-310' of git://github.com/mickhawkins/moodle into MOODLE_310_STABLE 2020-09-18 09:41:10 +02:00
Michael Hawkins 54524f1ff0 MDL-69548 core: Adding the http-message library
This is a dependency of ZipStream
2020-09-18 10:03:22 +08:00
Michael Hawkins bbfbe8e260 MDL-69548 core: Adding the php-enum library
This is a dependency of ZipStream
2020-09-18 10:03:22 +08:00
Michael Hawkins cfe02e4d3e MDL-69548 core: Adding the ZipStream library
This allows downloading of zip files as a stream, and will be used by
the Download course content project (MDL-69540).
2020-09-18 10:03:22 +08:00
Eloy Lafuente (stronk7) 611399214b weekly release 3.10dev 2020-09-17 19:04:13 +02:00
David Mudrák 321de29e93 MDL-69355 file: Do not attempt to set headers after output started
It was found out that in certain situations there may be some content
in to output handlers buffers. Let's allow that to happen given that:

* default handler's buffer is not sent as a part of the file and an
  error is reported into the server log.
* other handlers' buffer is sent with the assumption that it is required
  for the correct serving of the file.
2020-09-17 17:37:28 +02:00
Eloy Lafuente (stronk7) f200ba55f8 Merge branch 'MDL-69395_310' of github.com:stronk7/moodle into MOODLE_310_STABLE 2020-09-17 17:02:08 +02:00
Eloy Lafuente (stronk7) 8d791e12ba MDL-69395 theme_classic: remove superfluous selector already in boost 2020-09-17 13:05:40 +02:00
Jun Pataleta 8923308d47 Merge branch 'MDL-69630-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-09-17 09:17:23 +02:00
Eloy Lafuente (stronk7) 0e97e40e5a Merge branch 'MDL-62387-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-17 09:17:23 +02:00
Eloy Lafuente (stronk7) 7254648363 Merge branch 'MDL-68909-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE
Bump version to 2020091000.02 (01 was already current)
2020-09-17 09:17:20 +02:00
Eloy Lafuente (stronk7) c3176af430 Merge branch 'MDL-69664-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-09-17 09:16:52 +02:00
Eloy Lafuente (stronk7) cb82c4d901 Merge branch 'MDL-69395-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-09-17 09:16:52 +02:00
Sara Arjona bf127517b3 Merge branch 'MDL-68688-310' of git://github.com/aanabit/moodle into MOODLE_310_STABLE 2020-09-17 09:16:52 +02:00
Jun Pataleta 29e56fef72 Merge branch 'MDL-69663-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2020-09-17 09:16:52 +02:00
Sara Arjona b249ab9df4 Merge branch 'MDL-68564_before_footer' of git://github.com/davosmith/moodle into MOODLE_310_STABLE 2020-09-17 09:16:52 +02:00
Sara Arjona 7805d0bb44 MDL-68909 h5p: move temporary editor files to draft area 2020-09-17 09:16:51 +02:00
Sara Arjona 6fcc509ed1 MDL-68909 h5p: upgrade step to remove files in editor filearea
As temporary editor files have been moved from core_h5p/editor to
user/draft, they can be removed (to clean unused DB entries).
2020-09-17 09:16:49 +02:00
Mihail Geshoski ebd136ca12 MDL-69630 format_social: Fix behat tests 2020-09-17 12:24:39 +08:00
Stephen Bourget c96a155937 MDL-69630 format_social: Add ajax support 2020-09-17 12:24:39 +08:00
Juan Leyva fdb7f85140 MDL-68935 course: Return context data in get_content WS 2020-09-16 12:43:53 +02:00
David Mudrák fbae45d7c9 MDL-69698 licenses: Improve the performance of the licenses cache
The cache uses a single simple key and there is no need to hash it.
2020-09-15 10:35:34 +02:00
David Mudrák a398a60092 MDL-69698 licenses: Do not cache the localised licenses fullnames
The localisation must happen only after loading the list of licenses
from cache so that the name is displayed in the current user's preferred
language, not in the language of the user who initiated the cache
rebuild.
2020-09-15 10:35:34 +02:00
Paul Holden de0e594a10 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:08:11 +01:00
comete-upn 93097192e6 MDL-69667 competencies: fix competencies count always 0 in frameworks. 2020-09-15 08:37:53 +02:00
Jun Pataleta 1427573cde Merge branch 'MDL-68702-MOODLE_310_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_310_STABLE 2020-09-15 11:56:28 +08:00
Jun Pataleta 28790a42ad Merge branch 'MDL-42012-310-alt' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-09-15 11:52:56 +08:00
Andrew Nicols e5f0085cdb MDL-42012 cache: Fix missing return value 2020-09-15 11:46:31 +08:00
Eloy Lafuente (stronk7) 682593054d Merge branch 'MDL-42012-310-alt' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-09-14 23:28:54 +02:00
Eloy Lafuente (stronk7) 8fba6189fe Merge branch 'MDL-69658-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-14 22:56:42 +02:00
Paul Holden 31188e93d6 MDL-69695 mod_folder: use forcedownload setting during inline display. 2020-09-14 21:40:38 +01:00
Paul Holden 9bc368f71c MDL-69014 tool_usertours: clean up user preferences of deleted tours. 2020-09-14 20:36:28 +01:00
Paul Holden 1aa7c68c6f 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:22:05 +01:00
Davo Smith 23efc7337a MDL-68564 outputrenderers: extend before_footer hook to allow output 2020-09-14 11:00:36 +01:00
Nathan Nguyen cf4b6c8c94 MDL-68702 core_backup: exclude legacy course files 2020-09-11 10:59:28 +10:00
Amaia Anabitarte abb2037b0f MDL-68688 core_contentbank: Empty content bank notification 2020-09-10 11:58:53 +02:00
sam marshall c94b6b2ab7 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:50:50 +01:00
Sara Arjona ab5d361c80 weekly release 3.10dev 2020-09-10 08:52:01 +02:00
Jun Pataleta 334333b6c7 MDL-69664 mod_lti: Apply correct badge class to tool card 2020-09-09 23:34:39 +08:00
Bas Brands 3d08cd2272 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-09 13:41:32 +02:00
Sara Arjona 83a5ed90ce Merge branch 'MDL-69466-3.10' of https://github.com/JBThong/moodle into MOODLE_310_STABLE 2020-09-09 11:39:16 +02:00
Sara Arjona d945333b47 Merge branch 'MDL-69645-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-09-09 11:00:49 +02:00
Jun Pataleta da84b731c7 Merge branch 'MDL-57682-310-fix' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-09-09 16:06:02 +08:00
Andrew Nicols 36f3b1e418 MDL-57682 mediaplayer_videojs: Improve in-page caching of lang strings 2020-09-09 15:37:54 +08:00
Andrew Nicols a3cc6898e9 MDL-57682 mediaplayer_videojs: Login not required for lang fetch 2020-09-09 15:37:52 +08:00
Thong Bui fcbca18c7b MDL-69466 Autocomplete widget: Improve keyboard accessibility 2020-09-09 13:44:23 +07:00
Tien Nguyen c0280f4405 MDL-68797 Administration: Add auto complete setting 2020-09-09 14:37:34 +08:00
Sara Arjona c83543095a Merge branch 'MDL-69521_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-09-09 08:08:29 +02:00
Andrew Nicols 13e34fb428 MDL-42012 cache: Valid definitions are required even when disabled 2020-09-09 14:05:03 +08:00
Andrew Nicols c705434a62 MDL-42012 cache: Fully disable cache for disabled cache factory 2020-09-09 14:05:03 +08:00
Andrew Nicols cfe1a9a8d8 MDL-42012 cache: Allow data sources to work when caching is disabled 2020-09-09 14:05:03 +08:00
Andrew Nicols 94d05a5bfb MDL-68797 tool_mobile: Version bump 2020-09-09 12:43:55 +08:00
Tien Nguyen 2562b9f3a3 MDL-68797 Administration: Setting for mobile file type exclusion list 2020-09-09 12:29:06 +08:00
Andrew Nicols e8b05c6cb4 Merge branch 'MDL-57682-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-09-09 12:23:33 +08:00
Eloy Lafuente (stronk7) 8f0297915c Merge branch 'MDL-69116-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-09-08 23:16:24 +02:00
Paul Holden b25763e875 MDL-69658 quizaccess_seb: progress bar on install only when necessary. 2020-09-08 19:32:24 +01:00
Eloy Lafuente (stronk7) 84bcfbb0d5 MDL-69521 core: Move all comments in code from 4.4 to 4.2 2020-09-08 19:01:42 +02:00
Eloy Lafuente (stronk7) e419e7acba MDL-69521 core: Move all comments in code from 4.3 to 4.1 2020-09-08 19:01:41 +02:00
Eloy Lafuente (stronk7) 309aad5a82 MDL-69521 core: Move all comments in code from 4.2 to 4.0 2020-09-08 19:01:41 +02:00
Eloy Lafuente (stronk7) 8452418666 MDL-69521 core: Move all comments in code from 4.1 to 3.11 2020-09-08 19:01:36 +02:00
Eloy Lafuente (stronk7) 5ba67416e6 Merge branch 'MDL-69510-310' of https://github.com/snake/moodle into MOODLE_310_STABLE 2020-09-08 15:28:33 +02:00
Sara Arjona bd0de2d965 Merge branch 'MDL-69525-310-1' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-09-08 14:21:46 +02:00
Sara Arjona db54910ce2 Merge branch 'MDL-28501-310' of https://github.com/mackensen/moodle into MOODLE_310_STABLE 2020-09-08 13:28:51 +02:00
Michael Hawkins 9d356676c3 MDL-69340 tag: Correct the filter input HTML in the tag manager 2020-09-08 08:54:33 +02:00
Mihail Geshoski a9d3f4b96c MDL-69048 book: Sanitize previous chapter value in add new chapter page 2020-09-08 08:54:33 +02:00
Andrew Nicols ca6cf0bd21 MDL-68974 calendar: Use page context for block check 2020-09-08 08:54:33 +02:00
Andrew Nicols 7d990ee185 MDL-68974 blocks: Check permission before generating content 2020-09-08 08:54:33 +02:00
Mihail Geshoski e2a11dc2aa MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:54:33 +02:00
Mihail Geshoski a2a6303397 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:54:33 +02:00
Andrew Nicols 6c4cdd6d96 MDL-68974 admin: Unit tests for context parent/child test 2020-09-08 08:54:33 +02:00
Andrew Nicols 4bb41b4e5a MDL-68974 admin: Unit tests for loginas 2020-09-08 08:54:33 +02:00
Andrew Nicols a937d4d807 MDL-68974 admin: Prevent login as outside of the desired context 2020-09-08 08:54:33 +02:00
Thong Bui 2301f9bfaa MDL-68344 filepicker: File Picker focus lost on upload 2020-09-08 08:45:09 +02:00
Jun Pataleta 0e9c755896 Merge branch 'MDL-69492-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-08 12:56:38 +08:00
Eloy Lafuente (stronk7) 3452156e6e Merge branch 'MDL-69262-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-09-07 23:42:53 +02:00
Eloy Lafuente (stronk7) 6ef1780225 Merge branch 'MDL-69448-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-07 23:26:08 +02:00
Eloy Lafuente (stronk7) a8c60a4c31 Merge branch 'MDL-69577-310' of git://github.com/crazyserver/moodle into MOODLE_310_STABLE 2020-09-07 23:09:37 +02:00
Luca Bösch b2995f7a29 MDL-69645 quizaccess: Set allowPreferencesWindow to false in manual conf
Signed-off-by: Luca Bösch <luca.boesch@bfh.ch>
2020-09-07 22:40:58 +02:00
Charles Fulton 51201bc672 MDL-28501 mod_folder: make force downloading behavior configuable 2020-09-07 14:40:40 -04:00
Mathew May aa13890df0 MDL-69240 tool_moodlenet: Clean MoodleNet profile field
Amended by: Eloy Lafuente (stronk7) <stronk7@moodle.org>
- adjust versions for every branch.
- modify verify_webfinger->profileurl external to PARAM_NOTAGS.
2020-09-07 17:36:22 +02:00
Sara Arjona 644b80410d Merge branch 'MDL-69632-310-adminserversettings' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-09-07 13:44:03 +02:00
Sara Arjona b36a28b37a Merge branch 'MDL-67468-MOODLE_310_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_310_STABLE 2020-09-07 13:19:56 +02:00
Mathew May 386223bd86 MDL-62609 lang: Final removal of deprecated strings 2020-09-07 08:06:32 +02:00
Sara Arjona 95359bf9e7 Merge branch 'MDL-63261-310' of https://github.com/Chocolate-lightning/moodle into MOODLE_310_STABLE 2020-09-07 07:30:17 +02:00
Mathew May 1bc2a3b345 MDL-63261 messaging: Final 3.6 deprecations 2020-09-07 09:09:07 +08:00
Eloy Lafuente (stronk7) 709b46dbfd MDL-69521 core: Move all comments in code from 4.0 to 3.10 2020-09-06 17:23:58 +02:00
Shamim Rezaie 94c19e0fea MDL-57682 media_videojs: Cache videojs languages in the localstorage 2020-09-04 18:55:16 +10:00
Shamim Rezaie 4a60349a8a MDL-57682 media_videojs: webservice to get the language pack of videojs 2020-09-04 18:51:37 +10:00
Shamim Rezaie 2189db9c86 MDL-57682 media_videojs: convert videojs loader to es6 2020-09-04 18:51:37 +10:00
David Mudrák f54cb0c257 MDL-69632 admin: Fix the legacy coding style at the server section
No actual changes to the file made, only reformatted and cleaned up to
follow the recent coding guidelines.
2020-09-04 10:23:06 +02:00
Paul Holden 95e0ff974c MDL-69492 auth_ldap: normalise member distinguished name config. 2020-09-04 08:25:58 +01:00
Paul Holden db361e09e7 MDL-69492 auth_cas: normalise member distinguished name config. 2020-09-04 08:25:58 +01:00
Paul Holden f2b1242364 MDL-69448 backup: fix capability checks when unable to copy user data.
When a given user doesn't have the capability to "Include user data"
during course copying, freeze the form element rather than not adding
it at all.

This caused problems as the element was required before preceding with
the course copy.
2020-09-04 08:20:04 +01:00
Nathan Nguyen d0fd7bc58c MDL-67468 filter_activitynames: use MUC 2020-09-04 15:41:52 +10:00
Sara Arjona 916809d995 weekly release 3.10dev 2020-09-03 17:09:17 +02:00
Sara Arjona e22ac10067 NOBUG: Fixed SVG browser compatibility 2020-09-03 17:09:12 +02:00
Andrew Nicols f558127d0e MDL-69391 behat: Grammar correction in feature 2020-09-03 11:35:08 +08:00
Andrew Nicols fc1d22ea70 Merge branch 'MDL-69391-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-09-03 11:35:04 +08:00
Jun Pataleta 5d1979c911 MDL-69391 calendar: Accessibility tests for calendar 2020-09-03 11:11:29 +08:00
Jun Pataleta fe346f0afb MDL-69391 auth: Colour contrast accessibility test for login page 2020-09-03 11:11:29 +08:00
Jun Pataleta 8d5470145d 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-09-03 11:11:29 +08:00
Jun Pataleta 61d32ad081 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-09-03 11:11:29 +08:00
Dmitrii Metelkin 558ef4f778 MDL-69418 backup: attach data to grade items 2020-09-03 11:08:00 +08:00
Andrew Nicols c8221dedcd Merge branch 'MDL-69360-310' of git://github.com/NoelDeMartin/moodle into MOODLE_310_STABLE 2020-09-03 10:52:02 +08:00
Andrew Nicols 5265491a8f Merge branch 'MDL-69246_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-09-03 10:39:58 +08:00
Jake Dallimore b96e85feac MDL-69510 admin: make ldap configuration warnings clear 2020-09-03 10:26:00 +08:00
Andrew Nicols 817d6dcdbb Merge branch 'MDL-55340-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-09-03 10:13:49 +08:00
Andrew Nicols de1a942280 Merge branch 'MDL-69069-310' of git://github.com/bmbrands/moodle into MOODLE_310_STABLE 2020-09-03 09:33:05 +08:00
Andrew Nicols 3e1c856bd9 MDL-69117 output: Correct remove_dir usage 2020-09-03 09:01:43 +08:00
Bas Brands cce23499e6 MDL-69117 theme_boost: themedesigner source maps 2020-09-03 08:40:41 +08:00
Bas Brands 74160de2cb MDL-69117 theme_boost: deprecate the autoprefixer 2020-09-03 08:40:41 +08:00
Eloy Lafuente (stronk7) 4ca7232b1f Merge branch 'MDL-55971-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-03 00:51:33 +02:00
Peter Burnett ded581156a MDL-67306 webservices: Added webservice for Grade category creation 2020-09-03 00:21:44 +02:00
Marina Glancy 4cfc74d176 MDL-69608 core_form: frozen forms do not have form tag 2020-09-02 23:48:39 +02:00
Sara Arjona 893cf77d33 Merge branch '67278-moodle-310-categories-selector' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_310_STABLE 2020-09-02 17:37:24 +02:00
Sara Arjona e66f450c8f Merge branch 'MDL-68680-MOODLE_310_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_310_STABLE 2020-09-02 17:16:01 +02:00
Julien Boulen f9f41f5061 MDL-67278 course: Use autocomplete widget for course category selector 2020-09-02 16:00:20 +02:00
Eloy Lafuente (stronk7) 76e2d15794 Merge branch 'MDL-69174-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-09-02 13:14:34 +02:00
Sara Arjona 31d3fd27fc MDL-69174 mod_h5pactivity: component passed always
The $component = 'mod_h5pactivity' will be passed always to the H5P
player because it's required for being able to call these activities
from outside using embed code. The xAPI implementation checks whether
the information should be tracked or not.
2020-09-02 12:12:25 +02:00
Sara Arjona 2874c6d5a1 MDL-69174 h5p: add component to the embed H5P code
When the Moodle component is passed to the player, xAPI tracking
is enabled so, if the component implements required xAPI API methods
(for instance, mod_h5pactivity does), grades and responses are sent.
Adding this component to the embed code will help to add
the embed code from a mod_h5pactivity to any other place (such as label,
page or book), and being able to track the responses to the original
mod_h5pactivity.
2020-09-02 12:12:25 +02:00
Noel De Martin d8892dcca3 MDL-69360 behat: Fix js ready checks for non-moodle sites 2020-09-02 10:20:28 +02:00
Andrew Nicols 85a1c2c99e Merge branch 'MDL-68892-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2020-09-02 09:48:59 +08:00
Dan Marsden 58bf730494 MDL-69190 grade: fix slow query. 2020-09-02 09:31:28 +08:00
Farhan Karmali d179137f1b MDL-67419 admin: New admin setting for lang during user creation 2020-09-02 08:54:47 +08:00
Eloy Lafuente (stronk7) 8eafd115cc Merge branch 'wip_MDL-69491_m310' of git://github.com/gjb2048/moodle into MOODLE_310_STABLE 2020-09-02 00:27:36 +02:00
Eloy Lafuente (stronk7) 3b111cf8a0 Merge branch 'MDL-69174-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-09-02 00:21:55 +02:00
Sara Arjona a244344e2e Merge branch 'MDL-63387-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-01 16:58:15 +02:00
Pau Ferrer Ocaña 23fed91412 MDL-69577 forum: Add courseid, forumid on get_discussion_posts response 2020-09-01 14:26:08 +02:00
Sara Arjona dee4097c9d Merge branch 'MDL-64525-m310' of https://github.com/NeillM/moodle into MOODLE_310_STABLE 2020-09-01 14:18:05 +02:00
Paul Holden 7665c701fd MDL-63387 course: use renamed role names, update Behat tests.
Specify that we want both role names (renamed course role plus
original).
2020-09-01 12:05:26 +01:00
Paul Holden 3827cbe523 MDL-63387 user: show both role names on course participants page. 2020-09-01 12:05:26 +01:00
Paul Holden f6a2d57b3e MDL-63387 enrol_cohort: show both roles names in instance config form. 2020-09-01 12:05:25 +01:00
Paul Holden 35a5c1adda MDL-63387 enrol_manual: show both role names in enrol users dialog. 2020-09-01 12:05:25 +01:00
Paul Holden e4d86a6ec4 MDL-63387 access: add parameter to define how role names are returned. 2020-09-01 12:04:47 +01:00
Sara Arjona 8d2229db48 Merge branch 'MDL-51709-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE 2020-09-01 09:04:13 +02:00
Mihail Geshoski 4d6b3406c5 MDL-69525 core: Publish a single event when toggling slave checkboxes 2020-09-01 14:53:54 +08:00
Sara Arjona 11a58dd4b0 Merge branch 'MDL-69394-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-09-01 06:45:12 +02:00
Andrew Nicols 0713666486 Merge branch 'MDL-69507_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-09-01 11:15:55 +08:00
Andrew Nicols 260e9753d4 Merge branch 'MDL-69387-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-09-01 10:59:37 +08:00
Sara Arjona e83fad7382 Merge branch 'MDL-38350-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE 2020-09-01 07:28:40 +08:00
Andrew Nicols c7e5431086 Merge branch 'MDL-69505-310' of https://github.com/snake/moodle into MOODLE_310_STABLE 2020-09-01 07:28:27 +08:00
Andrew Nicols 10ba6d0aa1 Merge branch 'MDL-69270-310' of git://github.com/ferranrecio/moodle into MOODLE_310_STABLE 2020-09-01 07:28:27 +08:00
Andrew Nicols a4f4cbf095 MDL-69269 contentbank: Fix issues identified in integration 2020-09-01 07:28:27 +08:00
Andrew Nicols 66c757f689 Merge branch 'MDL-69269-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-09-01 07:28:27 +08:00
Andrew Nicols 2f7236aa3c Merge branch 'MDL-68569-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-01 07:28:26 +08:00
Andrew Nicols a704b87f8b Merge branch 'MDL-56595-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-09-01 07:28:26 +08:00
Luca Bösch 59f48908aa MDL-51709 gradebook: Name display in single view. 2020-08-31 17:58:53 +02:00
Shamim Rezaie e6f0b5a3a3 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-08-31 23:53:54 +10:00
Shamim Rezaie 7a85cc6d2e MDL-69116 qtype_mutichoice: Use label for the "clear my choice" link 2020-08-31 23:53:54 +10:00
Bas Brands 3d08c7d396 MDL-69069 theme_boost: color contrast for custom alerts 2020-08-31 08:21:27 +02:00
Nathan Nguyen f809bca508 MDL-33981 repository_equella: support internal copy 2020-08-31 10:39:49 +08:00
Jake Dallimore fbcc91236e 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 07:57:50 +08:00
Ferran Recio 2dab18e681 MDL-69270 contentbank: replace content with file 2020-08-28 17:59:18 +02:00
Ferran Recio 3565a77362 MDL-68892 mod_h5pactivity: add required to package 2020-08-28 17:50:40 +02:00
Gareth Barnard cbecc140f7 MDL-69491 themes: No 'fontsize' setting in Boost causes unit conflict. 2020-08-28 14:14:38 +01:00
Sara Arjona c3a4859c7d MDL-69269 contentbank: add support to download content 2020-08-28 12:29:03 +02:00
Sara Arjona 330ba8cb10 MDL-69174 h5p: add component to the embed H5P code
When the Moodle component is passed to the player, xAPI tracking
is enabled so, if the component implements required xAPI API methods
(for instance, mod_h5pactivity does), grades and responses are sent.
Adding this component to the embed code will help to add
the embed code from a mod_h5pactivity to any other place (such as label,
page or book), and being able to track the responses to the original
mod_h5pactivity.
2020-08-28 12:26:38 +02:00
Marina Glancy 4e32add0ac 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:09 +02:00
Eric Merrill e48fecc679 MDL-69112 assign: Improve parsing of uploaded feedback names 2020-08-28 13:29:20 +08:00
Nathan Nguyen d7113bee4e MDL-68680 core_grades: check grade item before trigger delete event 2020-08-28 11:40:31 +10:00
Paul Holden 61ce84f178 MDL-56595 tool_usertours: set page params when configuring tours/steps. 2020-08-27 23:08:15 +01:00
Tim Hunt e3bfcb1cde 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:39:15 +01:00
Sara Arjona 4a6a2636a0 weekly release 3.10dev 2020-08-27 17:36:21 +02:00
Jun Pataleta 09646d7b53 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:30:32 +08:00
Jun Pataleta 9211552660 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:30:32 +08:00
Andrew Nicols f51678c56a Merge branch 'MOODLE_310_MDL-67211_v6' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-08-27 12:48:33 +08:00
Mihail Geshoski fa3b387185 MDL-69458 report_insights: Respect perpage value in pagination bar 2020-08-27 12:42:57 +08:00
Adrian Greeve dddff390da Merge branch 'MDL-69479-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-08-27 11:40:11 +08:00
Andrew Nicols 6bcc070827 Merge branch 'MDL-69501-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-08-27 11:30:53 +08:00
eWallah e1e362b7ff MDL-67413 competencies: do nothing upon activity completion 2020-08-27 11:11:08 +08:00
Mikhail Golenkov ae12edc741 MDL-67211 phpunit: Do not test the order of the running adhoc tasks. 2020-08-27 13:03:49 +10:00
Mikhail Golenkov 5934444b27 MDL-69358 backup: Do not clean up records for incomplete adhoc tasks.
Co-authored-by: Heena Agheda <heenaagheda@catalyst-au.net>
2020-08-27 10:57:48 +08:00
Andrew Nicols c187594e5b Merge branch 'MDL-66810-310' of git://github.com/peterRd/moodle into MOODLE_310_STABLE 2020-08-27 10:23:25 +08:00
Justin Hunt f9f0f1cc26 MDL-66810 mod_lti: Reinstate deprecated default permissions on iframe
microphone, webcam, camera, midi, encrypted-media, geolocation
2020-08-27 09:44:47 +08:00
Andrew Nicols f0b7948c96 MDL-66222 report_antivirus: Correct version number 2020-08-27 09:44:24 +08:00
Andrew Nicols 3114d04721 Merge branch 'MDL-66222-antivirus-reporting' of https://github.com/Peterburnett/moodle into MOODLE_310_STABLE 2020-08-27 09:36:33 +08:00
Adrian Greeve e78b9f9574 Merge branch 'MDL-69419-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-08-27 08:08:07 +08:00
Sara Arjona b0d96c297b Merge branch 'MDL-69389-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-08-26 18:02:55 +02:00
Bas Brands 54d32ce4a9 MDL-69114 theme_boost: improve the color contrast for .*-info classes 2020-08-26 16:28:34 +02:00
Andrew Nicols 71f44b0611 Merge branch 'MOODLE_310_MDL-69307_v4' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-08-26 15:03:01 +08:00
Mikhail Golenkov b8a0258357 MDL-69307 restore: Add CLI script to restore a course.
Co-authored-by: Matt Porritt <mattp@catalyst-au.net>
2020-08-26 14:39:41 +10:00
Jun Pataleta db8fea04f5 MDL-69389 auth: Add wcag141 test for the login page accessibility test 2020-08-26 11:05:27 +08:00
Jun Pataleta 227281d355 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:05:27 +08:00
Jun Pataleta fb6460ca98 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:05:27 +08:00
Jun Pataleta 424c5df1eb 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:06 +08:00
Jun Pataleta 64c4074699 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:06 +08:00
Jun Pataleta b4ab127434 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:00:22 +08:00
Andrew Nicols 4d03cc37b2 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:22 +08:00
Andrew Nicols 195e7c9cf1 Merge branch 'MOODLE_310_MDL-67211_v6' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2020-08-26 09:41:07 +08:00
Paul Holden 1ffb6b09ee MDL-55971 dataformat: method to write exports to file storage. 2020-08-25 17:30:51 +01:00
Paul Holden 06411e3689 MDL-68569 customfield_select: get field options via instance method.
Deprecate the previous static method, which was only called from
instantiated field classes.
2020-08-25 15:08:12 +01:00
Mikhail Golenkov e419e18f0d MDL-67211 Tasks: Add cron_enabled setting.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:01:00 +10:00
Mikhail Golenkov 3263daba84 MDL-67211 Tasks: Front-end to display currently running tasks.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:00:46 +10:00
Mikhail Golenkov 59a5923924 MDL-67211 Tasks: Record when a task is running.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 16:59:47 +10:00
Andrew Nicols f2602288eb MDL-69464 core_output: Whitespace fix 2020-08-25 13:22:36 +08:00
Marina Glancy 4413ca209f MDL-69464 core_output: allow to avoid formatting in page->set_heading 2020-08-25 13:22:36 +08:00
Adrian Greeve 427f046cff Merge branch 'MDL-68921-310' of git://github.com/vmdef/moodle into MOODLE_310_STABLE 2020-08-25 09:43:31 +08:00
Victor Deniz Falcon e29edbe89e MDL-68921 core_h5p: Add H5P libraries metadata settings
An upgrade step updates installed H5P libraries
2020-08-25 00:30:02 +01:00
Helen Foster e9df0c43bc MDL-69501 lang: Import fixed English strings (en_fix) 2020-08-24 09:53:02 +02:00
Neill Magill d71659dd6d 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:00:10 +01:00
Neill Magill fb6c682850 MDL-64525 comments: Tests for deleting frozen comments 2020-08-24 08:00:10 +01:00
Mihail Geshoski 356a8ee948 MDL-69479 core: Change 4.0 to 3.10 in theme/upgrade.txt 2020-08-24 14:08:46 +08:00
Eloy Lafuente (stronk7) fe9ecef92b MDL-69479 upgrade: Change all 4.0 occurrences to 3.10
Under parallel development, when something is worth being commented
in upgrade.txt notes, it will be applied to all the development branches
using the "earliest" one to be released. So, if something changes
in 3.10 (and also is applied to master), the upgrade.txt notes will
show 3.10 in both branches.

Of course, if something only goes to one dev branch (say master), then the
master version will be used in the notes (4.0 in this case).
2020-08-24 14:08:46 +08:00
Paul Holden 9c1f7874d8 MDL-69493 cohort: remove escaping of return URL params. 2020-08-22 17:09:23 +02:00
Eloy Lafuente (stronk7) 96fac6d9ce weekly release 3.10dev 2020-08-21 20:42:59 +02:00
Adrian Greeve 4b327e1109 MDL-68683 competencies: Update previous bad bump update.
I made a mistake with the previous version bump and updated the
line below what I should have changed. This fixes it to the
intended version numbers.
2020-08-21 14:41:09 +08:00
Jun Pataleta f649cd722f Merge branch 'MDL-66818-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-08-21 11:32:21 +08:00
Andrew Nicols 03e84b68a1 MDL-66818 mod_forum: Use cap manager to check exportability 2020-08-21 08:17:01 +08:00
Andrew Nicols 51dc7d230f MDL-42434 chat: Disable stylelint important check 2020-08-21 07:39:24 +08:00
Sara Arjona 1044e94507 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:48 +01:00
Sara Arjona c4303bba51 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:47 +01:00
Andrew Nicols 9d32114bf6 MDL-68705 testing: New CLI args to disable composer features
This commit introduces the following new flags:

  --no-composer-self-update   Disable composer self-update of the
                              composer.phar utility

  --no-composer-upgrade       Disable upgrade of development
                              dependencies using Composer.

  --disable-composer          Disable both composer self-update and
                              composer upgrade
2020-08-20 20:14:54 +02:00
Andrew Nicols 8ddb17b641 MDL-68705 testing: Allow composer updates to be disabled 2020-08-20 20:14:50 +02:00
sam marshall 30990ac512 MDL-38350 Lib: Rename directory before removing it, to reduce races 2020-08-20 16:57:06 +01:00
Tim Hunt 0c6f661def MDL-69507 duration form field: should return an int number of seconds 2020-08-20 11:31:28 +01:00
Tim Hunt 24d0335a0a MDL-69507 duration form field: modernise coding style 2020-08-20 11:31:28 +01:00
Sara Arjona 52836faa5b MDL-69055 core_badges: display password/oauth fields properly 2020-08-20 12:01:49 +08:00
Peter Burnett 64f64e44d8 MDL-69486 webservices: Added user and grade idnumber to grade items 2020-08-20 11:59:41 +08:00
carlos a133b89976 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-20 11:50:54 +08:00
Ferran Recio 93fec2c58c MDL-68964 mod_chat: fix theme param 2020-08-20 11:41:10 +08:00
Sara Arjona 3db6d44feb 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-20 11:23:03 +08:00
Adrian Greeve 83aa08c7e1 MDL-68683 competencies: Fix bad version bump. 2020-08-20 11:01:31 +08:00
Simey Lameze 79082f8b6b MDL-68683 competencies: fix query to delete stale files 2020-08-20 10:21:00 +08:00
Paul Holden 544c7d68b6 MDL-69449 block_timeline: use dayslimit context data in template.
Ensures the correct value is used when initially rendering the
course timeline.
2020-08-20 09:24:46 +08:00
Bas Brands 699a82df1a MDL-68889 block_recentlyaccessedcourses: small viewport issues
- on small devices the recentlyaccessedcourses does not show any courses
2020-08-20 09:16:38 +08:00
Peter Burnett d369c098be MDL-69170 task: Added timecreated field to adhoc task table 2020-08-20 08:50:42 +08:00
Sara Arjona 191448afc5 MDL-68975 contentbank: add author field to file details view 2020-08-20 08:42:20 +08:00
Eloy Lafuente (stronk7) 606fbca6b4 MDL-67415 environment: change requirements
- mysql requirement up to 5.7
- postgres requirement up to 9.6
2020-08-20 08:29:43 +08:00
Eloy Lafuente (stronk7) 050eb97c33 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-20 08:29:43 +08:00
Simey Lameze f6f824597a MDL-66818 mod_forum: remove unnecessary behat steps 2020-08-20 08:16:49 +08:00
gthomas2 f2b4fba61e MDL-66818 mod_forum: hide portfolio export button based on caps 2020-08-20 08:16:49 +08:00
Paul Holden 3a394dd671 MDL-66900 course: don't clean category description when editing. 2020-08-20 07:54:13 +08:00
Sara Arjona 98480b3932 MDL-69473 contentbank: change incorrect ref to size in type column 2020-08-20 07:43:56 +08:00
Eloy Lafuente (stronk7) e010b2e75c 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-20 07:35:59 +08:00
Sara Arjona aa3a9c7895 MDL-69054 core_badges: allow editing OBv1.0 backpacks 2020-08-20 07:31:48 +08:00
Sara Arjona f075ec01ca 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-20 07:16:41 +08:00
Sara Arjona c4c770f48c 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-20 07:16:41 +08:00
Sara Arjona 24ce9b8a10 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-20 07:16:41 +08:00
Mihail Geshoski adebc5f811 MDL-69401 book: Limit character length in chapter title 2020-08-20 07:03:24 +08:00
Peter Dias afc19a201c 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 23:42:27 +01:00
Sam Hemelryk 04073c7e31 MDL-68896 mod_scorm: improved sendBeacon use when unloading 2020-08-19 20:30:17 +12:00
Peter Dias aa7707cd52 MDL-66665 assign: Check whether a modified user could actually grade 2020-08-19 14:27:59 +08:00
Simey Lameze 676c840c5c MDL-68683 competencies: step to delete orphaned evidence files 2020-08-19 12:55:53 +08:00
Simey Lameze 1222c2125e MDL-68683 core: fix DML exception on upgrade step 2020-08-19 12:55:35 +08:00
Simey Lameze 776b4a85d1 MDL-26401 group: add delimiter and encoding fields to import 2020-08-19 11:11:14 +08:00
Amaia Anabitarte 29fe254b17 MDL-69089 core_contentbank: Empty content names are not allowed 2020-08-19 10:51:58 +08:00
Adrian Greeve bf84a08900 Merge branch 'MDL-69475_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-08-19 10:42:51 +08:00
Simey Lameze 97043c76b7 MDL-26401 group: change import to use csv_import_reader class 2020-08-19 08:51:32 +08:00
Andrew Nicols c1813ed818 MDL-67735 theme_boost: Fix incorrect whitespace 2020-08-19 08:39:15 +08:00
Bas Brands 49f1803c9d MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-19 08:29:50 +08:00
Amaia Anabitarte 157f8a87b4 MDL-69089 core_contentbank: Tests for empty content names 2020-08-19 08:19:44 +08:00
Leon Stringer c66bf80bd8 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-19 00:36:21 +02:00
Juan Leyva ad25efc776 MDL-69095 tool_mobile: Display warning if not allowed to use qr login 2020-08-19 00:20:54 +02:00
Juan Leyva 1019a2b5ba MDL-69095 tool_mobile: Avoid non-https sites using qrlogin by default 2020-08-19 00:20:54 +02:00
Matt Davidson 7404858689 MDL-63375 workshop: fix rubric grid view 2020-08-19 00:13:54 +02:00
Shamim Rezaie 7b313f407a 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-08-18 19:13:37 +02:00
Shamim Rezaie 931fc89e13 MDL-68444 calendar: Improve how screenreaders read day titles
Screenreaders now know if each day has any event or not
2020-08-18 19:13:27 +02:00
Mathew May fbbfe9aa00 MDL-68928 core_course: Select activity chooser footer 2020-08-18 19:02:25 +02:00
Victor Deniz Falcon b81952a23d Merge branch 'MDL-69477_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-08-18 12:48:09 +01:00
Eloy Lafuente (stronk7) 12ffcc5097 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 12:49:20 +02:00
Andrew Nicols bd1eaea02b MDL-69273 travis: Use exttests for https too 2020-08-18 10:59:13 +02:00
Andrew Nicols 99a8358b85 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 10:59:13 +02:00
Eloy Lafuente (stronk7) 0a352c4790 MDL-69477 install: Ensure CFG variables are set before using them
On installation (or also phpunit/behat unit) some CFG variables
were being used (on setting validation) before being set.

So this commit just verifies they are set before using them. Note that,
strictly speaking, only one of them ($CFG->searchenginequeryonly)
required the extra check, but I think it's better to apply it to all
them, as a reference and in case validations are run in any other order.
2020-08-17 10:53:38 +02:00
Nadav Kavalerchik 67dfb55d49 MDL-69414 qtype/ddimageortext: Fix dropzones display in RTL mode 2020-08-17 14:53:20 +08:00
Mihail Geshoski 12bd4bc5ad MDL-67943 core: Update timezone list in core_date 2020-08-17 10:36:01 +08:00
Adrian Greeve 22ec6995ea Merge branch 'MDL-69475_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-08-17 09:49:54 +08:00
Eloy Lafuente (stronk7) ae3af1d860 MDL-69475 install: Version, env. and minimal changes before branching
- Also bump travis to get builds against 310_STABLE.
- And backup release to match 3.10

Note this doesn't aim to be a complete change-set, but just the
minimum to switch to 3-digit $branches and keep installation, checks
and tests running and passing.
2020-08-17 00:12:30 +02:00
5424 changed files with 117595 additions and 51471 deletions
-92
View File
@@ -1,92 +0,0 @@
# Generated by "grunt ignorefiles"
*/**/yui/src/*/meta/
*/**/build/
node_modules/
vendor/
admin/tool/policy/amd/src/jquery-eu-cookie-law-popup.js
auth/cas/CAS/
cache/stores/mongodb/MongoDB/
enrol/lti/ims-blti/
filter/algebra/AlgParser.pm
filter/tex/mimetex.*
h5p/h5plib/v124/joubel/core/
h5p/h5plib/v124/joubel/editor/
lib/editor/atto/plugins/html/yui/src/codemirror/
lib/editor/atto/plugins/html/yui/src/beautify/
lib/editor/atto/yui/src/rangy/js/*.*
lib/editor/tinymce/plugins/pdw/tinymce/
lib/editor/tinymce/plugins/spellchecker/rpc.php
lib/editor/tinymce/tiny_mce/
lib/mlbackend/php/phpml/
lib/adodb/
lib/behat/axe/
lib/bennu/
lib/evalmath/
lib/phpspreadsheet/
lib/google/
lib/htmlpurifier/
lib/jabber/
lib/minify/matthiasmullie-minify/
lib/minify/matthiasmullie-pathconverter/
lib/pear/HTML/Common.php
lib/pear/HTML/QuickForm.php
lib/pear/HTML/QuickForm/
lib/pear/PEAR.php
lib/phpmailer/
lib/simplepie/
lib/tcpdf/
lib/typo3/
lib/yuilib/
lib/yuilib/gallery/
lib/jquery/
lib/html2text/
lib/markdown/
lib/xhprof/
lib/horde/
lib/requirejs/
lib/amd/src/loglevel.js
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
lib/php-css-parser/
lib/rtlcss/
lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
lib/amd/src/truncate.js
lib/fonts/
lib/amd/src/adapter.js
lib/validateurlsyntax.php
lib/amd/src/popper.js
lib/geopattern-php/
lib/php-jwt/
lib/babel-polyfill/
lib/polyfills/
lib/emoji-data/
lib/plist/
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
media/player/videojs/amd/src/videojs-flash-lazy.js
media/player/videojs/videojs/video-js.swf
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
theme/boost/scss/bootstrap/
theme/boost/amd/src/bootstrap/alert.js
theme/boost/amd/src/bootstrap/button.js
theme/boost/amd/src/bootstrap/carousel.js
theme/boost/amd/src/bootstrap/collapse.js
theme/boost/amd/src/bootstrap/dropdown.js
theme/boost/amd/src/bootstrap/index.js
theme/boost/amd/src/bootstrap/modal.js
theme/boost/amd/src/bootstrap/popover.js
theme/boost/amd/src/bootstrap/tools/sanitizer.js
theme/boost/amd/src/bootstrap/scrollspy.js
theme/boost/amd/src/bootstrap/tab.js
theme/boost/amd/src/bootstrap/toast.js
theme/boost/amd/src/bootstrap/tooltip.js
theme/boost/amd/src/bootstrap/util.js
theme/boost/scss/fontawesome/
+65 -6
View File
@@ -2,6 +2,7 @@
'plugins': [
'babel',
'promise',
'jsdoc',
],
'env': {
'browser': true,
@@ -191,7 +192,6 @@
'property': 'str',
'message': 'Use AMD module "core/str" or M.util.get_string()'
}],
},
overrides: [
{
@@ -200,18 +200,34 @@
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
'no-unused-expressions': 'off'
'no-unused-expressions': 'off',
// === JSDocs ===
"jsdoc/check-access": 'off',
"jsdoc/check-alignment": 'off',
"jsdoc/check-param-names": 'off',
"jsdoc/check-property-names": 'off',
"jsdoc/empty-tags": 'off',
"jsdoc/implements-on-classes": 'off',
"jsdoc/multiline-blocks": 'off',
"jsdoc/require-jsdoc": 'off',
"jsdoc/require-param": 'off',
"jsdoc/require-param-name": 'off',
"jsdoc/require-param-type": 'off',
"jsdoc/require-property": 'off',
"jsdoc/require-property-name": 'off',
"jsdoc/require-property-type": 'off',
}
},
{
files: ["**/amd/src/*.js", "**/amd/src/**/*.js", "Gruntfile*.js", "babel-plugin-add-module-to-define.js"],
files: ["**/amd/src/*.js", "**/amd/src/**/*.js", "Gruntfile*.js", "babel-plugin-add-module-to-define.js", "jsdoc.conf.js"],
// We support es6 now. Woot!
env: {
es6: true
},
// We're using babel transpiling so use their parser
// for linting.
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
// Check AMD with some slightly stricter rules.
rules: {
'no-unused-vars': 'error',
@@ -238,11 +254,54 @@
// === Promises ===
// We have Promise now that we're using ES6.
'promise/no-native': 'off',
'promise/avoid-new': 'off'
'promise/avoid-new': 'off',
// === JSDocs ===
"jsdoc/check-access": [
'error',
],
"jsdoc/check-alignment": 1, // Recommended.
"jsdoc/check-param-names": [
'error',
],
"jsdoc/check-property-names": [
'error',
],
"jsdoc/empty-tags": [
'error',
],
"jsdoc/implements-on-classes": [
'error',
],
"jsdoc/multiline-blocks": [
'error',
],
"jsdoc/require-jsdoc": [
'error',
],
"jsdoc/require-param": [
'error',
],
"jsdoc/require-param-name": [
'error',
],
"jsdoc/require-param-type": [
'error',
],
"jsdoc/require-property": [
'error',
],
"jsdoc/require-property-name": [
'error',
],
"jsdoc/require-property-type": [
'error',
],
},
parserOptions: {
'ecmaVersion': 9,
'sourceType': 'module'
'sourceType': 'module',
'requireConfigFile': false,
}
}
]
+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');
+110
View File
@@ -0,0 +1,110 @@
name: Core
on:
push:
branches-ignore:
- master
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
env:
php: 7.4
jobs:
Grunt:
runs-on: ubuntu-18.04
steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Configuring node & npm
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
- 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.2
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
+6
View File
@@ -26,6 +26,7 @@
/cscope.*
/.patches/
/.idea/
.phpstorm.*
/nbproject/
CVS
.DS_Store
@@ -33,6 +34,7 @@ CVS
/.project
/.buildpath
/.cache
.phpunit.result.cache
phpunit.xml
# Composer support. Do not ignore composer.json, or composer.lock. These should be shipped by us.
composer.phar
@@ -45,3 +47,7 @@ composer.phar
atlassian-ide-plugin.xml
/node_modules/
/.vscode/
moodle-plugin-ci.phar
.eslintignore
.stylelintignore
/jsdoc
+19
View File
@@ -0,0 +1,19 @@
# Moodle JavaScript Documentation
```
.-..-.
_____ | || |
/____/-.---_ .---. .---. .-.| || | .---.
| | _ _ |/ _ \/ _ \/ _ || |/ __ \
* | | | | | || |_| || |_| || |_| || || |___/
|_| |_| |_|\_____/\_____/\_____||_|\_____)
Moodle - the world's open source learning platform
```
## About
This generated documentation includes API documentation for JavaScript written in the AMD and ES2015 module formats within Moodle.
## Related information
See [https://docs.moodle.org/dev](https://docs.moodle.org/dev) for other related Developer Documentation.
+131
View File
@@ -0,0 +1,131 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Helper functions for working with Moodle component names, directories, and sources.
*
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
// Do not include any plugins as stanard.
const plugins = [];
plugins.push('plugins/markdown');
/**
* Get the source configuration.
*
* @return {Object}
*/
const getSource = () => {
const glob = require('glob');
const path = require('path');
const ComponentList = require(path.resolve('GruntfileComponents.js'));
const thirdPartyPaths = ComponentList.getThirdPartyPaths();
const source = {
include: [],
includePattern: ".+\\.js$",
};
let includeList = [];
ComponentList.getAmdSrcGlobList().forEach(async pattern => {
includeList.push(...glob.sync(pattern));
});
const cwdLength = process.cwd().length + 1;
includeList.forEach(path => {
if (source.include.indexOf(path) !== -1) {
// Ensure no duplicates.
return;
}
const relPath = path.substring(cwdLength);
if (thirdPartyPaths.indexOf(relPath) !== -1) {
return;
}
source.include.push(path);
});
source.include.push('.grunt/jsdoc/README.md');
return source;
};
const tags = {
// Allow the use of unknown tags.
// We have a lot of legacy uses of these.
allowUnknownTags: true,
// We make use of jsdoc and closure dictionaries as standard.
dictionaries: [
'jsdoc',
'closure',
],
};
// Template configuraiton.
const templates = {
cleverLinks: false,
monospaceLinks: false,
};
module.exports = {
opts: {
destination: "./jsdoc/",
template: "node_modules/docdash",
},
plugins,
recurseDepth: 10,
source: getSource(),
sourceType: 'module',
tags,
templates,
docdash: {
collapse: true,
search: true,
sort: true,
sectionOrder: [
"Namespaces",
"Modules",
"Events",
"Classes",
"Externals",
"Mixins",
"Tutorials",
"Interfaces"
],
"menu": {
"Developer Docs": {
href: "https://docs.moodle.org/dev",
target: "_blank",
"class": "menu-item",
id: "devdocs"
},
"MDN Docs": {
href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript",
target: "_blank",
"class": "menu-item",
id: "mdndocs",
},
},
typedefs: true,
},
};
+1 -1
View File
@@ -1 +1 @@
v14.0.0
lts/gallium
-93
View File
@@ -1,93 +0,0 @@
# Generated by "grunt ignorefiles"
**/yui/build/*
theme/boost/style/moodle.css
theme/classic/style/moodle.css
node_modules/
vendor/
admin/tool/policy/amd/src/jquery-eu-cookie-law-popup.js
auth/cas/CAS/
cache/stores/mongodb/MongoDB/
enrol/lti/ims-blti/
filter/algebra/AlgParser.pm
filter/tex/mimetex.*
h5p/h5plib/v124/joubel/core/
h5p/h5plib/v124/joubel/editor/
lib/editor/atto/plugins/html/yui/src/codemirror/
lib/editor/atto/plugins/html/yui/src/beautify/
lib/editor/atto/yui/src/rangy/js/*.*
lib/editor/tinymce/plugins/pdw/tinymce/
lib/editor/tinymce/plugins/spellchecker/rpc.php
lib/editor/tinymce/tiny_mce/
lib/mlbackend/php/phpml/
lib/adodb/
lib/behat/axe/
lib/bennu/
lib/evalmath/
lib/phpspreadsheet/
lib/google/
lib/htmlpurifier/
lib/jabber/
lib/minify/matthiasmullie-minify/
lib/minify/matthiasmullie-pathconverter/
lib/pear/HTML/Common.php
lib/pear/HTML/QuickForm.php
lib/pear/HTML/QuickForm/
lib/pear/PEAR.php
lib/phpmailer/
lib/simplepie/
lib/tcpdf/
lib/typo3/
lib/yuilib/
lib/yuilib/gallery/
lib/jquery/
lib/html2text/
lib/markdown/
lib/xhprof/
lib/horde/
lib/requirejs/
lib/amd/src/loglevel.js
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
lib/php-css-parser/
lib/rtlcss/
lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
lib/amd/src/truncate.js
lib/fonts/
lib/amd/src/adapter.js
lib/validateurlsyntax.php
lib/amd/src/popper.js
lib/geopattern-php/
lib/php-jwt/
lib/babel-polyfill/
lib/polyfills/
lib/emoji-data/
lib/plist/
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
media/player/videojs/amd/src/videojs-flash-lazy.js
media/player/videojs/videojs/video-js.swf
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
theme/boost/scss/bootstrap/
theme/boost/amd/src/bootstrap/alert.js
theme/boost/amd/src/bootstrap/button.js
theme/boost/amd/src/bootstrap/carousel.js
theme/boost/amd/src/bootstrap/collapse.js
theme/boost/amd/src/bootstrap/dropdown.js
theme/boost/amd/src/bootstrap/index.js
theme/boost/amd/src/bootstrap/modal.js
theme/boost/amd/src/bootstrap/popover.js
theme/boost/amd/src/bootstrap/tools/sanitizer.js
theme/boost/amd/src/bootstrap/scrollspy.js
theme/boost/amd/src/bootstrap/tab.js
theme/boost/amd/src/bootstrap/toast.js
theme/boost/amd/src/bootstrap/tooltip.js
theme/boost/amd/src/bootstrap/util.js
theme/boost/scss/fontawesome/
+44 -73
View File
@@ -2,45 +2,28 @@
# 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
os: linux
dist: xenial
dist: bionic
services:
- mysql
- docker
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.4
- 7.2
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
branches:
except:
- master
- /MOODLE_[0-9]+_STABLE/
- /^v[0-9]+\.[0-9]+\.[0-9]+.*/
jobs:
# Enable fast finish.
@@ -49,12 +32,35 @@ 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.2)
- php: 7.2
env: DB=none TASK=CITEST
- php: 7.2
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.2
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all"
php: 7.2
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 +120,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 +180,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');" \
@@ -212,7 +220,7 @@ before_script:
# We need the official upstream for comparison
git remote add upstream https://github.com/moodle/moodle.git;
git fetch upstream master;
git fetch upstream MOODLE_310_STABLE;
export GIT_PREVIOUS_COMMIT="`git merge-base FETCH_HEAD $TRAVIS_COMMIT`";
export GIT_COMMIT="$TRAVIS_COMMIT";
export UPSTREAM_FETCH_HEAD=`git rev-parse FETCH_HEAD`
@@ -223,39 +231,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 +256,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
+135 -49
View File
@@ -122,9 +122,10 @@ const registerStyleLintTasks = (grunt, files, fullRunDir) => {
if (hasScss) {
scssTasks.unshift('stylelint:scss');
}
scssTasks.unshift('ignorefiles');
grunt.registerTask('scss', scssTasks);
const cssTasks = [];
const cssTasks = ['ignorefiles'];
if (hasCss) {
cssTasks.push('stylelint:css');
}
@@ -285,6 +286,71 @@ module.exports = function(grunt) {
return ['**/tests/behat/*.feature'];
};
const babelTransform = require('@babel/core').transform;
const babel = (options = {}) => {
return {
name: 'babel',
transform: (code, id) => {
grunt.log.debug(`Transforming ${id}`);
options.filename = id;
const transformed = babelTransform(code, options);
return {
code: transformed.code,
map: transformed.map
};
}
};
};
// Note: We have to use a rate limit plugin here because rollup runs all tasks asynchronously and in parallel.
// When we kick off a full run, if we kick off a rollup of every file this will fork-bomb the machine.
// To work around this we use a concurrent Promise queue based on the number of available processors.
const rateLimit = () => {
const queue = [];
let queueRunner;
const startQueue = () => {
if (queueRunner) {
return;
}
queueRunner = setTimeout(() => {
const limit = Math.max(1, require('os').cpus().length / 2);
grunt.log.debug(`Starting rollup with queue size of ${limit}`);
runQueue(limit);
}, 100);
};
// The queue runner will run the next `size` items in the queue.
const runQueue = (size = 1) => {
queue.splice(0, size).forEach(resolve => {
resolve();
});
};
return {
name: 'ratelimit',
// The options hook is run in parallel.
// We can return an unresolved Promise which is queued for later resolution.
options: async() => {
return new Promise(resolve => {
queue.push(resolve);
startQueue();
});
},
// When an item in the queue completes, start the next item in the queue.
buildEnd: () => {
runQueue();
},
};
};
const terser = require('rollup-plugin-terser').terser;
// Project configuration.
grunt.initConfig({
eslint: {
@@ -301,55 +367,73 @@ module.exports = function(grunt) {
// Check YUI module source files.
yui: {src: files ? files : yuiSrc},
},
babel: {
options: {
sourceMaps: true,
comments: false,
plugins: [
'transform-es2015-modules-amd-lazy',
'system-import-transformer',
// This plugin modifies the Babel transpiling for "export default"
// so that if it's used then only the exported value is returned
// by the generated AMD module.
//
// It also adds the Moodle plugin name to the AMD module definition
// so that it can be imported as expected in other modules.
path.resolve('babel-plugin-add-module-to-define.js'),
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
['@babel/plugin-proposal-class-properties', {'loose': false}],
'@babel/plugin-proposal-json-strings'
],
presets: [
['minify', {
// This minification plugin needs to be disabled because it breaks the
// source map generation and causes invalid source maps to be output.
simplify: false,
builtIns: false
}],
['@babel/preset-env', {
targets: {
browsers: [
">0.25%",
"last 2 versions",
"not ie <= 10",
"not op_mini all",
"not Opera > 0",
"not dead"
]
},
modules: false,
useBuiltIns: false
}]
]
},
rollup: {
dist: {
options: {
format: 'esm',
dir: 'output',
sourcemap: true,
treeshake: false,
context: 'window',
plugins: [
rateLimit({initialDelay: 0}),
babel({
sourceMaps: true,
comments: false,
compact: false,
plugins: [
'transform-es2015-modules-amd-lazy',
'system-import-transformer',
// This plugin modifies the Babel transpiling for "export default"
// so that if it's used then only the exported value is returned
// by the generated AMD module.
//
// It also adds the Moodle plugin name to the AMD module definition
// so that it can be imported as expected in other modules.
path.resolve('babel-plugin-add-module-to-define.js'),
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
['@babel/plugin-proposal-class-properties', {'loose': false}],
'@babel/plugin-proposal-json-strings'
],
presets: [
['@babel/preset-env', {
targets: {
browsers: [
">0.25%",
"last 2 versions",
"not ie <= 10",
"not op_mini all",
"not Opera > 0",
"not dead"
]
},
modules: false,
useBuiltIns: false
}]
]
}),
terser({
// Do not mangle variables.
// Makes debugging easier.
mangle: false,
}),
],
},
files: [{
expand: true,
src: files ? files : amdSrc,
rename: babelRename
}]
}
}],
},
},
jsdoc: {
dist: {
options: {
configure: ".grunt/jsdoc/jsdoc.conf.js",
},
},
},
sass: {
dist: {
@@ -424,7 +508,7 @@ module.exports = function(grunt) {
'*/**/yui/src/*/meta/',
'*/**/build/',
].concat(thirdPartyPaths);
grunt.file.write('.eslintignore', eslintIgnores.join('\n'));
grunt.file.write('.eslintignore', eslintIgnores.join('\n') + '\n');
// Generate .stylelintignore.
const stylelintIgnores = [
@@ -433,7 +517,7 @@ module.exports = function(grunt) {
'theme/boost/style/moodle.css',
'theme/classic/style/moodle.css',
].concat(thirdPartyPaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n'));
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
};
/**
@@ -834,7 +918,9 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-stylelint');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-rollup');
grunt.loadNpmTasks('grunt-jsdoc');
// Rename the grunt-contrib-watch "watch" task because we're going to wrap it.
grunt.renameTask('watch', 'watch-grunt');
@@ -845,7 +931,7 @@ module.exports = function(grunt) {
grunt.registerTask('ignorefiles', 'Generate ignore files for linters', tasks.ignorefiles);
grunt.registerTask('watch', 'Run tasks on file changes', tasks.watch);
grunt.registerTask('yui', ['eslint:yui', 'shifter']);
grunt.registerTask('amd', ['eslint:amd', 'babel']);
grunt.registerTask('amd', ['ignorefiles', 'eslint:amd', 'rollup']);
grunt.registerTask('js', ['amd', 'yui']);
// Register CSS tasks.
+45
View File
@@ -140,6 +140,50 @@ const getThirdPartyLibsList = relativeTo => {
.sort();
};
/**
* Get the list of thirdparty library paths.
*
* @returns {array}
*/
const getThirdPartyPaths = () => {
const DOMParser = require('xmldom').DOMParser;
const fs = require('fs');
const path = require('path');
const xpath = require('xpath');
const thirdpartyfiles = getThirdPartyLibsList(fs.realpathSync('./'));
const libs = ['node_modules/', 'vendor/'];
const addLibToList = lib => {
if (!lib.match('\\*') && fs.statSync(lib).isDirectory()) {
// Ensure trailing slash on dirs.
lib = lib.replace(/\/?$/, '/');
}
// Look for duplicate paths before adding to array.
if (libs.indexOf(lib) === -1) {
libs.push(lib);
}
};
thirdpartyfiles.forEach(function(file) {
const dirname = path.dirname(file);
const xmlContent = fs.readFileSync(file, 'utf8');
const doc = new DOMParser().parseFromString(xmlContent);
const nodes = xpath.select("/libraries/library/location/text()", doc);
nodes.forEach(function(node) {
let lib = path.posix.join(dirname, node.toString());
addLibToList(lib);
});
});
return libs;
};
/**
* Find the name of the component matching the specified path.
*
@@ -185,4 +229,5 @@ module.exports = {
getOwningComponentDirectory,
getYuiSrcGlobList,
getThirdPartyLibsList,
getThirdPartyPaths,
};
+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.
+5
View File
@@ -158,4 +158,9 @@ echo $outputhtml;
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');
$PAGE->requires->yui_module('moodle-core-formchangechecker', 'M.core_formchangechecker.init', [[
'formid' => 'adminsettings'
]]);
$PAGE->requires->string_for_js('changesmadereallygoaway', 'moodle');
echo $OUTPUT->footer();
@@ -43,7 +43,7 @@ class testoutgoingmailconf_form extends \moodleform {
$mform = $this->_form;
// Recipient.
$options = ['maxlength' => '100', 'size' => '25'];
$options = ['maxlength' => '100', 'size' => '25', 'autocomplete' => 'email'];
$mform->addElement('text', 'recipient', get_string('testoutgoingmailconf_toemail', 'admin'), $options);
$mform->setType('recipient', PARAM_EMAIL);
$mform->addRule('recipient', get_string('required'), 'required');
@@ -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/>.
/**
* External admin page class that allows a callback to be provided to determine whether page can be accessed
*
* @package core_admin
* @copyright 2019 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\externalpage;
use admin_externalpage;
defined('MOODLE_INTERNAL') || die();
require_once("{$CFG->libdir}/adminlib.php");
/**
* Admin externalpage class
*
* @package core_admin
* @copyright 2019 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class accesscallback extends admin_externalpage {
/** @var callable $accesscheckcallback */
protected $accesscheckcallback;
/**
* Class constructor
*
* @param string $name
* @param string $visiblename
* @param string $url
* @param callable $accesscheckcallback The callback method that will be executed to check whether user has access to
* this page. The setting instance ($this) is passed as an argument to the callback. Should return boolean value
* @param bool $hidden
*/
public function __construct(string $name, string $visiblename, string $url, callable $accesscheckcallback,
bool $hidden = false) {
$this->accesscheckcallback = $accesscheckcallback;
parent::__construct($name, $visiblename, $url, [], $hidden);
}
/**
* Determines if the current user has access to this external page based on access callback
*
* @return bool
*/
public function check_access() {
return ($this->accesscheckcallback)($this);
}
}
@@ -0,0 +1,206 @@
<?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/>.
/**
* Auto complete admin setting.
*
* @package core_admin
* @copyright 2020 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/adminlib.php');
/**
* Auto complete setting class.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright 2020 The Open University
*/
class autocomplete extends \admin_setting_configmultiselect {
/** @var boolean Should we allow typing new entries to the field? */
protected $tags = false;
/** @var string Name of an AMD module to send/process ajax requests. */
protected $ajax = '';
/** @var string Placeholder text for an empty list. */
protected $placeholder = '';
/** @var bool Whether the search has to be case-sensitive. */
protected $casesensitive = false;
/** @var bool Show suggestions by default - but this can be turned off. */
protected $showsuggestions = true;
/** @var string String that is shown when there are no selections. */
protected $noselectionstring = '';
/** @var string Delimiter to store values in database. */
protected $delimiter = ',';
/** @var string Should be multiple choices? */
protected $multiple = true;
/** @var string The link to manage choices. */
protected $manageurl = true;
/** @var string The text to display in manage link. */
protected $managetext = true;
/**
* Constructor
*
* @param string $name unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting'
* for ones in config_plugins.
* @param string $visiblename localised
* @param string $description long localised info
* @param array $defaultsetting array of selected items
* @param array $choices options for autocomplete field
* @param array $attributes settings for autocomplete field
*/
public function __construct($name, $visiblename, $description, $defaultsetting, $choices, $attributes = null) {
if ($attributes === null) {
$attributes = [];
}
$this->placeholder = get_string('search');
$this->noselectionstring = get_string('noselection', 'form');
$defaultattributes = [
'tags',
'showsuggestions',
'placeholder',
'noselectionstring',
'ajax',
'casesensitive',
'delimiter',
'multiple',
'manageurl',
'managetext'
];
foreach ($defaultattributes as $attributename) {
if (isset($attributes[$attributename])) {
$this->$attributename = $attributes[$attributename];
}
}
parent::__construct($name, $visiblename, $description, $defaultsetting, $choices);
}
/**
* Returns the select setting(s)
*
* @return mixed null or array. Null if no settings else array of setting(s)
*/
public function get_setting() {
$result = $this->config_read($this->name);
if (is_null($result)) {
return null;
}
if ($result === '') {
return [];
}
return explode($this->delimiter, $result);
}
/**
* Saves setting(s) provided through $data
*
* @param array $data
*/
public function write_setting($data) {
if (!is_array($data)) {
return ''; // Ignore it.
}
if (!$this->load_choices() || empty($this->choices)) {
return '';
}
unset($data['xxxxx']);
$save = [];
foreach ($data as $value) {
if (!array_key_exists($value, $this->choices)) {
continue; // Ignore it.
}
$save[] = $value;
}
return ($this->config_write($this->name, implode($this->delimiter, $save)) ? '' : get_string('errorsetting', 'admin'));
}
/**
* Returns XHTML autocomplete field
*
* @param array $data Array of values to select by default
* @param string $query
* @return string XHTML autocomplete field
*/
public function output_html($data, $query = '') {
global $OUTPUT;
if (!$this->load_choices() or empty($this->choices)) {
return '';
}
$default = $this->get_defaultsetting();
if (empty($default)) {
$default = [];
}
if (is_null($data)) {
$data = [];
}
$context = [
'id' => $this->get_id(),
'name' => $this->get_full_name()
];
$defaults = [];
$options = [];
$template = 'core_admin/local/settings/autocomplete';
foreach ($this->choices as $value => $name) {
if (in_array($value, $default)) {
$defaults[] = $name;
}
$options[] = [
'value' => $value,
'text' => $name,
'selected' => in_array($value, $data),
'disabled' => false
];
}
$context['options'] = $options;
$context['tags'] = $this->tags;
$context['placeholder'] = $this->placeholder;
$context['casesensitive'] = $this->casesensitive;
$context['multiple'] = $this->multiple;
$context['showsuggestions'] = $this->showsuggestions;
$context['manageurl'] = $this->manageurl;
$context['managetext'] = $this->managetext;
if (is_null($default)) {
$defaultinfo = null;
} if (!empty($defaults)) {
$defaultinfo = implode(', ', $defaults);
} else {
$defaultinfo = get_string('none');
}
$element = $OUTPUT->render_from_template($template, $context);
return format_admin_setting($this, $this->visiblename, $element, $this->description, true, '', $defaultinfo, $query);
}
}
+4 -1
View File
@@ -126,6 +126,7 @@ class filesize extends \admin_setting {
if (is_null($bytes)) {
return null;
}
$bytes = intval($bytes);
return self::parse_bytes($bytes);
}
@@ -145,9 +146,10 @@ class filesize extends \admin_setting {
return get_string('errorsetting', 'admin');
}
// Calculate size in bytes, ensuring we don't overflow PHP_INT_MAX.
$bytes = $data['v'] * $data['u'];
$result = (is_int($bytes) && $this->config_write($this->name, $bytes));
$result = $this->config_write($this->name, $bytes);
return ($result ? '' : get_string('errorsetting', 'admin'));
}
@@ -178,6 +180,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,
@@ -0,0 +1,74 @@
<?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/>.
/**
* Payment gateway admin setting.
*
* @package core_admin
* @copyright 2020 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
/**
* Generic class for managing plugins in a table that allows re-ordering and enable/disable of each plugin.
*/
class manage_payment_gateway_plugins extends \admin_setting_manage_plugins {
/**
* Get the admin settings section title (use get_string).
*
* @return string
*/
public function get_section_title() {
return get_string('type_paygw_plural', 'plugin');
}
/**
* Get the type of plugin to manage.
*
* @return string
*/
public function get_plugin_type() {
return 'paygw';
}
/**
* Get the name of the second column.
*
* @return string
*/
public function get_info_column_name() {
return get_string('supportedcurrencies', 'core_payment');
}
/**
* Get the type of plugin to manage.
*
* @param plugininfo The plugin info class.
* @return string
*/
public function get_info_column($plugininfo) {
$codes = $plugininfo->get_supported_currencies();
$currencies = [];
foreach ($codes as $c) {
$currencies[$c] = new \lang_string($c, 'core_currencies');
}
return implode(get_string('listsep', 'langconfig') . ' ', $currencies);
}
}
+3
View File
@@ -57,6 +57,8 @@ class task_log_table extends \table_sql {
'userid' => get_string('user', 'admin'),
'timestart' => get_string('task_starttime', 'admin'),
'duration' => get_string('task_duration', 'admin'),
'hostname' => get_string('hostname', 'tool_task'),
'pid' => get_string('pid', 'tool_task'),
'db' => get_string('task_dbstats', 'admin'),
'result' => get_string('task_result', 'admin'),
'actions' => '',
@@ -132,6 +134,7 @@ class task_log_table extends \table_sql {
$sql = "SELECT
tl.id, tl.type, tl.component, tl.classname, tl.userid, tl.timestart, tl.timeend,
tl.hostname, tl.pid,
tl.dbreads, tl.dbwrites, tl.result,
tl.dbreads + tl.dbwrites AS db,
tl.timeend - tl.timestart AS duration,
+9
View File
@@ -37,11 +37,13 @@ list($options, $unrecognized) = cli_get_params(
'showsql' => false,
'showdebugging' => false,
'ignorelimits' => false,
'force' => false,
], [
'h' => 'help',
'e' => 'execute',
'k' => 'keep-alive',
'i' => 'ignorelimits',
'f' => 'force',
]
);
@@ -61,6 +63,7 @@ Options:
-e, --execute Run all queued adhoc tasks
-k, --keep-alive=N Keep this script alive for N seconds and poll for new adhoc tasks
-i --ignorelimits Ignore task_adhoc_concurrency_limit and task_adhoc_max_runtime limits
-f, --force Run even if cron is disabled
Example:
\$sudo -u www-data /usr/bin/php admin/cli/adhoc_task.php --execute
@@ -92,6 +95,12 @@ if (moodle_needs_upgrading()) {
if (empty($options['execute'])) {
exit(0);
}
if (!get_config('core', 'cron_enabled') && !$options['force']) {
mtrace('Cron is disabled. Use --force to override.');
exit(1);
}
if (empty($options['keep-alive'])) {
$options['keep-alive'] = 0;
}
+8 -1
View File
@@ -120,7 +120,14 @@ if ($options['unset'] || $options['set'] !== null) {
}
// Check that the variable is not hard-set in the main config.php already.
if (array_key_exists($options['name'], $CFG->config_php_settings)) {
$component = $options['component'];
if (!empty($component)) {
$componentsettings = $CFG->forced_plugin_settings[$component] ?? [];
$settinginconfig = array_key_exists($options['name'], $componentsettings);
} else {
$settinginconfig = array_key_exists($options['name'], $CFG->config_php_settings);
}
if ($settinginconfig) {
cli_error('The configuration variable is hard-set in the config.php, unable to change.', 4);
}
+105 -6
View File
@@ -36,14 +36,23 @@ require_once($CFG->libdir.'/cronlib.php');
// now get cli options
list($options, $unrecognized) = cli_get_params(
array(
[
'help' => false,
'stop' => false,
),
array(
'list' => false,
'force' => false,
'enable' => false,
'disable' => false,
'disable-wait' => false,
], [
'h' => 'help',
's' => 'stop',
)
'l' => 'list',
'f' => 'force',
'e' => 'enable',
'd' => 'disable',
'w' => 'disable-wait',
]
);
if ($unrecognized) {
@@ -56,8 +65,13 @@ if ($options['help']) {
"Execute periodic cron actions.
Options:
-h, --help Print out this help
-s, --stop Notify all other running cron processes to stop after the current task
-h, --help Print out this help
-s, --stop Notify all other running cron processes to stop after the current task
-l, --list Show the list of currently running tasks and how long they have been running
-f, --force Execute task even if cron is disabled
-e, --enable Enable cron
-d, --disable Disable cron
-w, --disable-wait=600 Disable cron and wait until all tasks finished or fail after N seconds (optional param)
Example:
\$sudo -u www-data /usr/bin/php admin/cli/cron.php
@@ -74,6 +88,91 @@ if ($options['stop']) {
die;
}
if ($options['enable']) {
set_config('cron_enabled', 1);
mtrace('Cron has been enabled for the site.');
exit(0);
}
if ($options['disable']) {
set_config('cron_enabled', 0);
\core\task\manager::clear_static_caches();
mtrace('Cron has been disabled for the site.');
exit(0);
}
if ($options['list']) {
$tasks = \core\task\manager::get_running_tasks();
mtrace('The list of currently running tasks:');
$format = "%7s %-12s %-9s %-20s %-52s\n";
printf ($format,
'PID',
'HOST',
'TYPE',
'TIME',
'CLASSNAME'
);
foreach ($tasks as $task) {
printf ($format,
$task->pid,
substr($task->hostname, 0, 12),
$task->type,
format_time(time() - $task->timestarted),
substr($task->classname, 0, 52)
);
}
exit(0);
}
if ($wait = $options['disable-wait']) {
$started = time();
if (true === $wait) {
// Default waiting time.
$waitsec = 600;
} else {
$waitsec = $wait;
$wait = true;
}
set_config('cron_enabled', 0);
\core\task\manager::clear_static_caches();
mtrace('Cron has been disabled for the site.');
mtrace('Allocating '. format_time($waitsec) . ' for the tasks to finish.');
$lastcount = 0;
while ($wait) {
$tasks = \core\task\manager::get_running_tasks();
if (count($tasks) == 0) {
mtrace('');
mtrace('All scheduled and adhoc tasks finished.');
exit(0);
}
if (time() - $started >= $waitsec) {
mtrace('');
mtrace('Wait time ('. format_time($waitsec) . ') elapsed, but ' . count($tasks) . ' task(s) still running.');
mtrace('Exiting with code 1.');
exit(1);
}
if (count($tasks) !== $lastcount) {
mtrace('');
mtrace(count($tasks) . " tasks currently running.", '');
$lastcount = count($tasks);
} else {
mtrace('.', '');
}
sleep(1);
}
}
if (!get_config('core', 'cron_enabled') && !$options['force']) {
mtrace('Cron is disabled. Use --force to override.');
exit(1);
}
\core\local\cli\shutdown::script_supports_graceful_exit();
cron_run();
+138
View File
@@ -0,0 +1,138 @@
<?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/>.
/**
* Fix orphaned calendar events that were broken by MDL-67494.
*
* This script will look for all the calendar events which userids
* where broken by a wrong upgrade step, affecting to Moodle 3.9.5
* and up.
*
* It performs checks to both:
* a) Detect if the site was affected (ran the wrong upgrade step).
* b) Look for orphaned calendar events, categorising them as:
* - standard: site / category / course / group / user events
* - subscription: events created via subscriptions.
* - action: normal action events, created to show common important dates.
* - override: user and group override events, particular, that some activities support.
* - custom: other events, not being any of the above, common or particular.
* By specifying it (--fix) try to recover as many broken events (missing userid) as
* possible. Standard, subscription, action, override events in core are fully supported but
* override or custom events should be fixed by each plugin as far as there isn't any standard
* API (plugin-wise) to launch a rebuild of the calendar events.
*
* @package core
* @copyright 2021 onwards Simey Lameze <simey@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir . "/clilib.php");
require_once($CFG->libdir . '/db/upgradelib.php');
// Supported options.
$long = ['fix' => false, 'help' => false];
$short = ['f' => 'fix', 'h' => 'help'];
// CLI options.
[$options, $unrecognized] = cli_get_params($long, $short);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help = <<<EOT
Fix orphaned calendar events.
This script detects calendar events that have had their
userid lost. By default it will perform various checks
and report them, showing the site status in an easy way.
Also, optionally (--fix), it wil try to recover as many
lost userids as possible from different sources. Note that
this script aims to process well-know events in core,
leaving custom events in 3rd part plugins mostly unmodified
because there isn't any consistent way to regenerate them.
For more details: https://tracker.moodle.org/browse/MDL-71156
Options:
-h, --help Print out this help.
-f, --fix Fix the orphaned calendar events in the DB.
If not specified only check and report problems to STDERR.
Usage:
- Only report: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php
- Report and fix: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php -f
EOT;
cli_writeln($help);
die;
}
// Check various usual pre-requisites.
if (empty($CFG->version)) {
cli_error('Database is not yet installed.');
}
$admin = get_admin();
if (!$admin) {
cli_error('Error: No admin account was found.');
}
if (moodle_needs_upgrading()) {
cli_error('Moodle upgrade pending, script execution suspended.');
}
// Do everything as admin by default.
\core\session\manager::set_user($admin);
// Report current site status.
cli_heading('Checking the site status');
$needsfix = upgrade_calendar_site_status();
// Report current calendar events status.
cli_heading('Checking the calendar events status');
$info = upgrade_calendar_events_status();
$hasbadevents = $info['total']->bad > 0 || $info['total']->bad != $info['other']->bad;
$needsfix = $needsfix || $hasbadevents;
// If, selected, fix as many calendar events as possible.
if ($options['fix']) {
// If the report has told us that the fix was not needed... ask for confirmation!
if (!$needsfix) {
cli_writeln("This site DOES NOT NEED to run the calendar events fix.");
$input = cli_input('Are you completely sure that you want to run the fix? (y/N)', 'N', ['y', 'Y', 'n', 'N']);
if (strtolower($input) != 'y') {
exit(0);
}
cli_writeln("");
}
cli_heading('Fixing as many as possible calendar events');
upgrade_calendar_events_fix_remaining($info);
// Report current (after fix) calendar events status.
cli_heading('Checking the calendar events status (after fix)');
upgrade_calendar_events_status();
} else if ($needsfix) {
// Fix option was not provided but problem events have been found. Notify the user and provide info how to fix these events.
cli_writeln("This site NEEDS to run the calendar events fix!");
cli_writeln("To fix the calendar events, re-run this script with the --fix option.");
}
+8 -8
View File
@@ -119,7 +119,7 @@ if (!empty($options['collation'])) {
if ($dbcollation->value !== $collation || $dbcharset->value !== $charset) {
// Try to convert the DB.
echo "Converting database to '$collation' for $CFG->wwwroot:\n";
$sql = "ALTER DATABASE $CFG->dbname DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
$sql = "ALTER DATABASE `$CFG->dbname` DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
try {
$DB->change_database_structure($sql);
} catch (exception $e) {
@@ -146,7 +146,7 @@ if (!empty($options['collation'])) {
} else {
try {
$DB->change_database_structure("ALTER TABLE $table->name CONVERT TO CHARACTER SET $charset COLLATE $collation");
$DB->change_database_structure("ALTER TABLE `$table->name` CONVERT TO CHARACTER SET $charset COLLATE $collation");
echo "CONVERTED\n";
$converted++;
} catch (ddl_exception $e) {
@@ -163,7 +163,7 @@ if (!empty($options['collation'])) {
}
}
$sql = "SHOW FULL COLUMNS FROM $table->name WHERE collation IS NOT NULL";
$sql = "SHOW FULL COLUMNS FROM `$table->name` WHERE collation IS NOT NULL";
$rs2 = $DB->get_recordset_sql($sql);
foreach ($rs2 as $column) {
$column = (object)array_change_key_case((array)$column, CASE_LOWER);
@@ -181,7 +181,7 @@ if (!empty($options['collation'])) {
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
$default = (!is_null($column->default) and $column->default !== '') ? "DEFAULT '$column->default'" : '';
// primary, unique and inc are not supported for texts
$sql = "ALTER TABLE $table->name
$sql = "ALTER TABLE `$table->name`
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
@@ -192,11 +192,11 @@ if (!empty($options['collation'])) {
$default = !is_null($column->default) ? "DEFAULT '$column->default'" : '';
if ($rowformat != '') {
$sql = "ALTER TABLE $table->name $rowformat";
$sql = "ALTER TABLE `$table->name` $rowformat";
$DB->change_database_structure($sql);
}
$sql = "ALTER TABLE $table->name
$sql = "ALTER TABLE `$table->name`
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
@@ -315,8 +315,8 @@ function mysql_set_row_format($tablename, $charset, $collation, $engine) {
if ($rs->row_format == 'Compact' || $rs->row_format == 'Redundant') {
$rowformat = $DB->get_row_format_sql($engine, $collation);
// Try to convert to compressed format and then try updating the collation again.
$DB->change_database_structure("ALTER TABLE $tablename $rowformat");
$DB->change_database_structure("ALTER TABLE $tablename CONVERT TO CHARACTER SET $charset COLLATE $collation");
$DB->change_database_structure("ALTER TABLE `$tablename` $rowformat");
$DB->change_database_structure("ALTER TABLE `$tablename` CONVERT TO CHARACTER SET $charset COLLATE $collation");
} else {
// Row format may not be the problem. Can not diagnose problem. Send fail reply.
return false;
+2 -2
View File
@@ -158,7 +158,7 @@ if (!empty($options['info'])) {
}
foreach ($fixtables as $table) {
$DB->change_database_structure("ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed");
$DB->change_database_structure("ALTER TABLE `{$prefix}$table` ROW_FORMAT=Compressed");
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT) . " ... Compressed\n";
}
@@ -189,7 +189,7 @@ if (!empty($options['info'])) {
echo "SET GLOBAL innodb_file_per_table=1;\n";
echo "SET GLOBAL innodb_file_format=Barracuda;\n";
foreach ($fixtables as $table) {
echo "ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed;\n";
echo "ALTER TABLE `{$prefix}$table` ROW_FORMAT=Compressed;\n";
}
echo "\n";
exit(0);
+109
View File
@@ -0,0 +1,109 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script allows to restore a course from CLI.
*
* @package core
* @subpackage cli
* @copyright 2020 Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', 1);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir . '/clilib.php');
require_once($CFG->dirroot . "/backup/util/includes/restore_includes.php");
list($options, $unrecognized) = cli_get_params([
'file' => '',
'categoryid' => '',
'showdebugging' => false,
'help' => false,
], [
'f' => 'file',
'c' => 'categoryid',
's' => 'showdebugging',
'h' => 'help',
]);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help'] || !($options['file']) || !($options['categoryid'])) {
$help = <<<EOL
Restore backup into provided category.
Options:
-f, --file=STRING Path to the backup file.
-c, --categoryid=INT ID of the category to restore too.
-s, --showdebugging Show developer level debugging information
-h, --help Print out this help.
Example:
\$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/file.mbz --categoryid=1\n
EOL;
echo $help;
exit(0);
}
if ($options['showdebugging']) {
set_debugging(DEBUG_DEVELOPER, true);
}
if (!$admin = get_admin()) {
print_error('noadmins');
}
if (!file_exists($options['file'])) {
print_error('filenotfound');
}
if (!$category = $DB->get_record('course_categories', ['id' => $options['categoryid']], 'id')) {
print_error('invalidcategoryid');
}
$backupdir = "restore_" . uniqid();
$path = $CFG->tempdir . DIRECTORY_SEPARATOR . "backup" . DIRECTORY_SEPARATOR . $backupdir;
cli_heading(get_string('extractingbackupfileto', 'backup', $path));
$fp = get_file_packer('application/vnd.moodle.backup');
$fp->extract_to_pathname($options['file'], $path);
cli_heading(get_string('preprocessingbackupfile'));
try {
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoringcourse', 'backup'),
get_string('restoringcourseshortname', 'backup'));
$courseid = restore_dbops::create_new_course($fullname, $shortname, $category->id);
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
backup::MODE_GENERAL, $admin->id, backup::TARGET_NEW_COURSE);
$rc->execute_precheck();
$rc->execute_plan();
$rc->destroy();
} catch (Exception $e) {
cli_heading(get_string('cleaningtempdata'));
fulldelete($path);
print_error('generalexceptionmessage', 'error', '', $e->getMessage());
}
cli_heading(get_string('restoredcourseid', 'backup', $courseid));
exit(0);
+19 -2
View File
@@ -30,8 +30,17 @@ require_once("$CFG->libdir/clilib.php");
require_once("$CFG->libdir/cronlib.php");
list($options, $unrecognized) = cli_get_params(
array('help' => false, 'list' => false, 'execute' => false, 'showsql' => false, 'showdebugging' => false),
array('h' => 'help')
[
'help' => false,
'list' => false,
'execute' => false,
'showsql' => false,
'showdebugging' => false,
'force' => false,
], [
'h' => 'help',
'f' => 'force',
]
);
if ($unrecognized) {
@@ -49,6 +58,7 @@ if ($options['help'] or (!$options['list'] and !$options['execute'])) {
--showsql Show sql queries before they are executed
--showdebugging Show developer level debugging information
-h, --help Print out this help
-f, --force Execute task even if cron is disabled
Example:
\$sudo -u www-data /usr/bin/php admin/cli/scheduled_task.php --execute=\\core\\task\\session_cleanup_task
@@ -121,6 +131,13 @@ if ($execute = $options['execute']) {
exit(1);
}
if (!get_config('core', 'cron_enabled') && !$options['force']) {
mtrace('Cron is disabled. Use --force to override.');
exit(1);
}
\core\task\manager::scheduled_task_starting($task);
// Increase memory limit.
raise_memory_limit(MEMORY_EXTRA);
+7 -7
View File
@@ -38,17 +38,17 @@ if ($unrecognized) {
}
// If necessary add files that should be ignored - such as in 3rd party plugins.
$blacklist = array();
$ignorelist = array();
$path = $options['path'];
if (!file_exists($path)) {
cli_error("Invalid path $path");
}
if ($options['ie9fix']) {
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_ie9fix', $blacklist);
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_ie9fix', $ignorelist);
} else if ($options['noaspectratio']) {
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_noaspectratio', $blacklist);
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_noaspectratio', $ignorelist);
} else {
$help =
@@ -153,9 +153,9 @@ function core_admin_svgtool_noaspectratio($file) {
* @param string $base
* @param string $sub
* @param string $filecallback
* @param array $blacklist
* @param array $ignorelist List of files to be ignored and skipped.
*/
function core_admin_recurse_svgs($base, $sub, $filecallback, $blacklist) {
function core_admin_recurse_svgs($base, $sub, $filecallback, $ignorelist) {
if (is_dir("$base/$sub")) {
$items = new DirectoryIterator("$base/$sub");
foreach ($items as $item) {
@@ -163,7 +163,7 @@ function core_admin_recurse_svgs($base, $sub, $filecallback, $blacklist) {
continue;
}
$file = $item->getFilename();
core_admin_recurse_svgs("$base/$sub", $file, $filecallback, $blacklist);
core_admin_recurse_svgs("$base/$sub", $file, $filecallback, $ignorelist);
}
unset($item);
unset($items);
@@ -174,7 +174,7 @@ function core_admin_recurse_svgs($base, $sub, $filecallback, $blacklist) {
return;
}
$file = realpath("$base/$sub");
if (in_array($file, $blacklist)) {
if (in_array($file, $ignorelist)) {
return;
}
$filecallback($file);
+568
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>
@@ -3161,6 +3163,572 @@
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_igbinary322_version" level="optional">
<FEEDBACK>
<ON_CHECK message="igbinary322buggyversion" />
</FEEDBACK>
</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_CHECK file="lib/upgradelib.php" function="check_igbinary322_version" level="optional">
<FEEDBACK>
<ON_CHECK message="igbinary322buggyversion" />
</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>
<MOODLE version="4.0" 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="10" />
<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_EXTENSION name="exif" level="optional"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="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_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
<FEEDBACK>
<ON_CHECK message="iscustomadminwarnings" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+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);
+27 -16
View File
@@ -220,7 +220,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->container_end();
}
$button = new single_button($continueurl, get_string('upgradestart', 'admin'), 'get');
$button = new single_button($continueurl, get_string('upgradestart', 'admin'), 'get', true);
$button->class = 'continuebutton';
$output .= $this->render($button);
$output .= $this->footer();
@@ -1616,12 +1616,18 @@ class core_admin_renderer extends plugin_renderer_base {
$plugininfo = $pluginman->get_plugins();
$numtotal = $numextension = $numupdatable = 0;
$numtotal = $numextension = $numupdatable = $numinstallable = 0;
foreach ($plugininfo as $type => $plugins) {
foreach ($plugins as $name => $plugin) {
if ($plugin->available_updates()) {
if ($res = $plugin->available_updates()) {
$numupdatable++;
foreach ($res as $updateinfo) {
if ($pluginman->is_remote_plugin_installable($updateinfo->component, $updateinfo->version, $reason, false)) {
$numinstallable++;
break;
}
}
}
if ($plugin->get_status() === core_plugin_manager::PLUGIN_STATUS_MISSING) {
continue;
@@ -1664,16 +1670,13 @@ class core_admin_renderer extends plugin_renderer_base {
$out .= $this->output->heading(get_string('overviewext', 'core_plugin'), 3);
}
if ($numupdatable) {
$installableupdates = $pluginman->filter_installable($pluginman->available_updates());
if ($installableupdates) {
$out .= $this->output->single_button(
new moodle_url($this->page->url, array('installupdatex' => 1)),
get_string('updateavailableinstallall', 'core_admin', count($installableupdates)),
'post',
array('class' => 'singlebutton updateavailableinstallall')
);
}
if ($numinstallable) {
$out .= $this->output->single_button(
new moodle_url($this->page->url, array('installupdatex' => 1)),
get_string('updateavailableinstallall', 'core_admin', $numinstallable),
'post',
array('class' => 'singlebutton updateavailableinstallall')
);
}
$out .= html_writer::div($infoall, 'info info-all').
@@ -1907,7 +1910,7 @@ class core_admin_renderer extends plugin_renderer_base {
'infos'
);
if ($pluginman->is_remote_plugin_installable($updateinfo->component, $updateinfo->version, $reason)) {
if ($pluginman->is_remote_plugin_installable($updateinfo->component, $updateinfo->version, $reason, false)) {
$box .= $this->output->single_button(
new moodle_url($this->page->url, array('installupdate' => $updateinfo->component,
'installupdateversion' => $updateinfo->version)),
@@ -2127,8 +2130,16 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->container_start('upgradekeyreq');
$output .= $this->heading(get_string('upgradekeyreq', 'core_admin'));
$output .= html_writer::start_tag('form', array('method' => 'POST', 'action' => $url));
$output .= html_writer::empty_tag('input', array('name' => 'upgradekey', 'type' => 'password'));
$output .= html_writer::empty_tag('input', array('value' => get_string('submit'), 'type' => 'submit'));
$output .= html_writer::empty_tag('input', [
'name' => 'upgradekey',
'type' => 'password',
'class' => 'form-control w-auto',
]);
$output .= html_writer::empty_tag('input', [
'type' => 'submit',
'value' => get_string('submit'),
'class' => 'btn btn-primary mt-3',
]);
$output .= html_writer::end_tag('form');
$output .= $this->container_end();
$output .= $this->footer();
+7 -7
View File
@@ -536,7 +536,7 @@ class core_role_privacy_testcase extends provider_testcase {
$user1->id,
$admin->id
];
$this->assertEquals($expected, $userlist2->get_userids(), '', 0.0, 10, true);
$this->assertEqualsCanonicalizing($expected, $userlist2->get_userids());
// The user list for coursecontext1 should user1, user2 and admin (role creator).
$userlist3 = new \core_privacy\local\request\userlist($coursecontext1, $component);
@@ -547,7 +547,7 @@ class core_role_privacy_testcase extends provider_testcase {
$user2->id,
$admin->id
];
$this->assertEquals($expected, $userlist3->get_userids(), '', 0.0, 10, true);
$this->assertEqualsCanonicalizing($expected, $userlist3->get_userids());
// The user list for coursecatcontext should user2 and admin (role creator).
$userlist4 = new \core_privacy\local\request\userlist($coursecatcontext, $component);
@@ -557,7 +557,7 @@ class core_role_privacy_testcase extends provider_testcase {
$user2->id,
$admin->id
];
$this->assertEquals($expected, $userlist4->get_userids(), '', 0.0, 10, true);
$this->assertEqualsCanonicalizing($expected, $userlist4->get_userids());
// The user list for systemcontext should user1 and admin (role creator).
$userlist6 = new \core_privacy\local\request\userlist($systemcontext, $component);
@@ -567,7 +567,7 @@ class core_role_privacy_testcase extends provider_testcase {
$user1->id,
$admin->id
];
$this->assertEquals($expected, $userlist6->get_userids(), '', 0.0, 10, true);
$this->assertEqualsCanonicalizing($expected, $userlist6->get_userids());
// The user list for cmcontext should user1, user2 and admin (role creator).
$userlist7 = new \core_privacy\local\request\userlist($cmcontext, $component);
@@ -578,7 +578,7 @@ class core_role_privacy_testcase extends provider_testcase {
$user2->id,
$admin->id
];
$this->assertEquals($expected, $userlist7->get_userids(), '', 0.0, 10, true);
$this->assertEqualsCanonicalizing($expected, $userlist7->get_userids());
// The user list for blockcontext should user1 and admin (role creator).
$userlist8 = new \core_privacy\local\request\userlist($blockcontext, $component);
@@ -588,7 +588,7 @@ class core_role_privacy_testcase extends provider_testcase {
$user1->id,
$admin->id
];
$this->assertEquals($expected, $userlist8->get_userids(), '', 0.0, 10, true);
$this->assertEqualsCanonicalizing($expected, $userlist8->get_userids());
}
/**
@@ -744,4 +744,4 @@ class core_role_privacy_testcase extends provider_testcase {
}
return $rolesnames;
}
}
}
+10 -3
View File
@@ -68,9 +68,16 @@ if ($errormsg !== '') {
$showsettingslinks = true;
if ($hassiteconfig) {
require_once("admin_settings_search_form.php");
$form = new admin_settings_search_form();
$form->display();
$data = [
'action' => new moodle_url('/admin/search.php'),
'btnclass' => 'btn-primary',
'inputname' => 'query',
'searchstring' => get_string('search'),
'query' => $query,
'extraclasses' => 'd-flex justify-content-center'
];
echo $OUTPUT->render_from_template('core/search_input', $data);
echo '<hr>';
if ($query) {
echo admin_search_settings_html($query);
+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'),
+67
View File
@@ -22,6 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
use core_admin\local\settings\filesize;
$capabilities = array(
'moodle/backup:backupcourse',
'moodle/category:manage',
@@ -75,6 +77,17 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp->add(new admin_setting_configselect('moodlecourse/visible', new lang_string('visible'), new lang_string('visible_help'),
1, $choices));
// Enable/disable download course content.
$choices = [
DOWNLOAD_COURSE_CONTENT_DISABLED => new lang_string('no'),
DOWNLOAD_COURSE_CONTENT_ENABLED => new lang_string('yes'),
];
$downloadcontentsitedefault = new admin_setting_configselect('moodlecourse/downloadcontentsitedefault',
new lang_string('enabledownloadcoursecontent', 'course'),
new lang_string('downloadcoursecontent_help', 'course'), 0, $choices);
$downloadcontentsitedefault->add_dependent_on('downloadcoursecontentallowed');
$temp->add($downloadcontentsitedefault);
// Course format.
$temp->add(new admin_setting_heading('courseformathdr', new lang_string('type_format', 'plugin'), ''));
@@ -161,6 +174,21 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$ADMIN->add('courses', $temp);
// Download course content.
$downloadcoursedefaulturl = new moodle_url('/admin/settings.php', ['section' => 'coursesettings']);
$temp = new admin_settingpage('downloadcoursecontent', new lang_string('downloadcoursecontent', 'course'));
$temp->add(new admin_setting_configcheckbox('downloadcoursecontentallowed',
new lang_string('downloadcoursecontentallowed', 'admin'),
new lang_string('downloadcoursecontentallowed_desc', 'admin', $downloadcoursedefaulturl->out()), 0));
// 50MB default maximum size per file when downloading course content.
$defaultmaxdownloadsize = 50 * filesize::UNIT_MB;
$temp->add(new filesize('maxsizeperdownloadcoursefile', new lang_string('maxsizeperdownloadcoursefile', 'admin'),
new lang_string('maxsizeperdownloadcoursefile_desc', 'admin'), $defaultmaxdownloadsize, filesize::UNIT_MB));
$temp->hide_if('maxsizeperdownloadcoursefile', 'downloadcoursecontentallowed');
$ADMIN->add('courses', $temp);
// "courserequests" settingpage.
$temp = new admin_settingpage('courserequest', new lang_string('courserequest'));
$temp->add(new admin_setting_configcheckbox('enablecourserequests',
@@ -184,6 +212,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
// Add a category for the Activity Chooser.
$ADMIN->add('courses', new admin_category('activitychooser', new lang_string('activitychoosercategory', 'course')));
$temp = new admin_settingpage('activitychoosersettings', new lang_string('activitychoosersettings', 'course'));
// Tab mode for the activity chooser.
$temp->add(
new admin_setting_configselect(
'activitychoosertabmode',
@@ -197,6 +226,31 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
]
)
);
// Build a list of plugins that use the footer callback.
$pluginswithfunction = get_plugins_with_function('custom_chooser_footer', 'lib.php');
$pluginsoptions = [];
$pluginsoptions[COURSE_CHOOSER_FOOTER_NONE] = get_string('activitychooserhidefooter', 'course');
if ($pluginswithfunction) {
foreach ($pluginswithfunction as $plugintype => $plugins) {
foreach ($plugins as $pluginname => $pluginfunction) {
$plugin = $plugintype.'_'.$pluginname;
$pluginsoptions[$plugin] = get_string('pluginname', $plugin);
}
}
}
// Select what plugin to show in the footer.
$temp->add(
new admin_setting_configselect(
'activitychooseractivefooter',
new lang_string('activitychooseractivefooter', 'course'),
new lang_string('activitychooseractivefooter_desc', 'course'),
COURSE_CHOOSER_FOOTER_NONE,
$pluginsoptions
)
);
$ADMIN->add('activitychooser', $temp);
$ADMIN->add('activitychooser',
new admin_externalpage('activitychooserrecommended', new lang_string('activitychooserrecommendations', 'course'),
@@ -259,6 +313,9 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
['value' => 1, 'locked' => 0])
);
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_legacyfiles',
new lang_string('generallegacyfiles', 'backup'),
new lang_string('configlegacyfiles', 'backup'), array('value' => 1, 'locked' => 0)));
$ADMIN->add('backups', $temp);
// Create a page for general import configuration and defaults.
@@ -285,6 +342,9 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
new lang_string('configgeneralcontentbankcontent', 'backup'),
['value' => 1, 'locked' => 0])
);
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_import_legacyfiles',
new lang_string('generallegacyfiles', 'backup'),
new lang_string('configlegacyfiles', 'backup'), array('value' => 1, 'locked' => 0)));
$ADMIN->add('backups', $temp);
@@ -411,6 +471,10 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
1)
);
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_legacyfiles',
new lang_string('generallegacyfiles', 'backup'),
new lang_string('configlegacyfiles', 'backup'), 1));
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_messages', new lang_string('messages', 'message'), new lang_string('backupmessageshelp','message'), 0));
//$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blogs', new lang_string('blogs', 'blog'), new lang_string('backupblogshelp','blog'), 0));
@@ -473,6 +537,9 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp->add(new admin_setting_configcheckbox_with_lock('restore/restore_general_contentbankcontent',
new lang_string('generalcontentbankcontent', 'backup'),
new lang_string('configrestorecontentbankcontent', 'backup'), array('value' => 1, 'locked' => 0)));
$temp->add(new admin_setting_configcheckbox_with_lock('restore/restore_general_legacyfiles',
new lang_string('generallegacyfiles', 'backup'),
new lang_string('configlegacyfiles', 'backup'), array('value' => 1, 'locked' => 0)));
// Restore defaults when merging into another course.
$temp->add(new admin_setting_heading('mergerestoredefaults', new lang_string('mergerestoredefaults', 'backup'), ''));
+2 -1
View File
@@ -38,7 +38,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// "debugging" settingpage
$temp = new admin_settingpage('debugging', new lang_string('debugging', 'admin'));
$temp->add(new admin_setting_special_debug());
$temp->add(new admin_setting_configcheckbox('debugdisplay', new lang_string('debugdisplay', 'admin'), new lang_string('configdebugdisplay', 'admin'), ini_get_bool('display_errors')));
$temp->add(new admin_setting_configcheckbox('debugdisplay', new lang_string('debugdisplay', 'admin'),
new lang_string('configdebugdisplay', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('perfdebug', new lang_string('perfdebug', 'admin'), new lang_string('configperfdebug', 'admin'), '7', '15', '7'));
$temp->add(new admin_setting_configcheckbox('debugstringids', new lang_string('debugstringids', 'admin'), new lang_string('debugstringids_desc', 'admin'), 0));
$temp->add(new admin_setting_configselect('debugsqltrace',
+2
View File
@@ -8,6 +8,8 @@ if ($hassiteconfig) {
$temp = new admin_settingpage('langsettings', new lang_string('languagesettings', 'admin'));
$temp->add(new admin_setting_configcheckbox('autolang', new lang_string('autolang', 'admin'), new lang_string('configautolang', 'admin'), 1));
$temp->add(new admin_setting_configselect('lang', new lang_string('lang', 'admin'), new lang_string('configlang', 'admin'), current_language(), get_string_manager()->get_list_of_translations())); // $CFG->lang might be set in installer already, default en is in setup.php
$temp->add(new admin_setting_configcheckbox('autolangusercreation', new lang_string('autolangusercreation', 'admin'),
new lang_string('configautolangusercreation', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('langmenu', new lang_string('langmenu', 'admin'), new lang_string('configlangmenu', 'admin'), 1));
$temp->add(new admin_setting_langlist());
$temp->add(new admin_setting_configcheckbox('langcache', new lang_string('langcache', 'admin'), new lang_string('langcache_desc', 'admin'), 1));
+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
}
+29
View File
@@ -0,0 +1,29 @@
<?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/>.
/**
* Adds payments links to the admin tree
*
* @package core
* @copyright 2020 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$ADMIN->add('payment', new admin_externalpage(
'paymentaccounts',
new lang_string('paymentaccounts', 'payment'),
new moodle_url("/payment/accounts.php"),
['moodle/payment:manageaccounts', 'moodle/payment:viewpayments']));
+21 -2
View File
@@ -280,6 +280,25 @@ if ($hassiteconfig) {
$plugin->load_settings($ADMIN, 'mediaplayers', $hassiteconfig);
}
// Payment gateway plugins.
$ADMIN->add('modules', new admin_category('paymentgateways', new lang_string('type_paygw_plural', 'plugin')));
$temp = new admin_settingpage('managepaymentgateways', new lang_string('type_paygwmanage', 'plugin'));
$temp->add(new \core_admin\local\settings\manage_payment_gateway_plugins());
$temp->add(new admin_setting_description(
'managepaymentgatewayspostfix',
'',
new lang_string('gotopaymentaccounts', 'payment',
html_writer::link(new moodle_url('/payment/accounts.php'), get_string('paymentaccounts', 'payment')))
));
$ADMIN->add('paymentgateways', $temp);
$plugins = core_plugin_manager::instance()->get_plugins_of_type('paygw');
core_collator::asort_objects_by_property($plugins, 'displayname');
foreach ($plugins as $plugin) {
/** @var \core\plugininfo\paygw $plugin */
$plugin->load_settings($ADMIN, 'paymentgateways', $hassiteconfig);
}
// Data format settings.
$ADMIN->add('modules', new admin_category('dataformatsettings', new lang_string('dataformats')));
$temp = new admin_settingpage('managedataformats', new lang_string('managedataformats'));
@@ -591,7 +610,7 @@ if ($hassiteconfig) {
global $CFG;
// Check nobody's setting the indexing and query-only server to the same one.
if ($CFG->searchenginequeryonly === $value) {
if (isset($CFG->searchenginequeryonly) && $CFG->searchenginequeryonly === $value) {
return get_string('searchenginequeryonlysame', 'admin');
} else {
return '';
@@ -661,7 +680,7 @@ if ($hassiteconfig) {
global $CFG;
// Check nobody's setting the indexing and query-only server to the same one.
if ($CFG->searchengine === $value) {
if (isset($CFG->searchengine) && $CFG->searchengine === $value) {
return get_string('searchenginequeryonlysame', 'admin');
} else {
return '';
+457 -318
View File
@@ -1,162 +1,225 @@
<?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/>.
// This file defines settingpages and externalpages under the "server" category
/**
* Defines settingpages and externalpages under the "server" category.
*
* @package core
* @category admin
* @copyright 2006 Martin Dougiamas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
defined('MOODLE_INTERNAL') || die();
// "systempaths" settingpage
$temp = new admin_settingpage('systempaths', new lang_string('systempaths','admin'));
$temp->add(new admin_setting_configexecutable('pathtophp', new lang_string('pathtophp', 'admin'),
new lang_string('configpathtophp', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('pathtodu', new lang_string('pathtodu', 'admin'), new lang_string('configpathtodu', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('aspellpath', new lang_string('aspellpath', 'admin'), new lang_string('edhelpaspellpath'), ''));
$temp->add(new admin_setting_configexecutable('pathtodot', new lang_string('pathtodot', 'admin'), new lang_string('pathtodot_help', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('pathtogs', new lang_string('pathtogs', 'admin'), new lang_string('pathtogs_help', 'admin'), '/usr/bin/gs'));
$temp->add(new admin_setting_configexecutable('pathtopython', new lang_string('pathtopython', 'admin'),
new lang_string('pathtopythondesc', 'admin'), ''));
$ADMIN->add('server', $temp);
if ($hassiteconfig) {
// System paths.
$temp = new admin_settingpage('systempaths', new lang_string('systempaths', 'admin'));
$temp->add(new admin_setting_configexecutable('pathtophp', new lang_string('pathtophp', 'admin'),
new lang_string('configpathtophp', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('pathtodu', new lang_string('pathtodu', 'admin'),
new lang_string('configpathtodu', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('aspellpath', new lang_string('aspellpath', 'admin'),
new lang_string('edhelpaspellpath'), ''));
$temp->add(new admin_setting_configexecutable('pathtodot', new lang_string('pathtodot', 'admin'),
new lang_string('pathtodot_help', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('pathtogs', new lang_string('pathtogs', 'admin'),
new lang_string('pathtogs_help', 'admin'), '/usr/bin/gs'));
$temp->add(new admin_setting_configexecutable('pathtopython', new lang_string('pathtopython', 'admin'),
new lang_string('pathtopythondesc', 'admin'), ''));
$ADMIN->add('server', $temp);
// Support contact.
$temp = new admin_settingpage('supportcontact', new lang_string('supportcontact', 'admin'));
$primaryadmin = get_admin();
if ($primaryadmin) {
$primaryadminemail = $primaryadmin->email;
$primaryadminname = fullname($primaryadmin, true);
} else {
// No defaults during installation - admin user must be created first.
$primaryadminemail = null;
$primaryadminname = null;
}
$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'),
new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
$setting = new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'),
new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_EMAIL);
$setting->set_force_ltr(true);
$temp->add($setting);
$temp->add(new admin_setting_configtext('supportpage', new lang_string('supportpage', 'admin'),
new lang_string('configsupportpage', 'admin'), '', PARAM_URL));
$ADMIN->add('server', $temp);
// Session handling.
$temp = new admin_settingpage('sessionhandling', new lang_string('sessionhandling', 'admin'));
if (empty($CFG->session_handler_class) and $DB->session_lock_supported()) {
$temp->add(new admin_setting_configcheckbox('dbsessions', new lang_string('dbsessions', 'admin'),
new lang_string('configdbsessions', 'admin'), 0));
}
// "supportcontact" settingpage
$temp = new admin_settingpage('supportcontact', new lang_string('supportcontact','admin'));
$primaryadmin = get_admin();
if ($primaryadmin) {
$primaryadminemail = $primaryadmin->email;
$primaryadminname = fullname($primaryadmin, true);
} else {
// no defaults during installation - admin user must be created first
$primaryadminemail = NULL;
$primaryadminname = NULL;
}
$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'),
new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
$setting = new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'),
new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_EMAIL);
$setting->set_force_ltr(true);
$temp->add($setting);
$temp->add(new admin_setting_configtext('supportpage', new lang_string('supportpage', 'admin'), new lang_string('configsupportpage', 'admin'), '', PARAM_URL));
$ADMIN->add('server', $temp);
$temp->add(new admin_setting_configduration('sessiontimeout', new lang_string('sessiontimeout', 'admin'),
new lang_string('configsessiontimeout', 'admin'), 8 * 60 * 60));
$temp->add(new admin_setting_configtext('sessioncookie', new lang_string('sessioncookie', 'admin'),
new lang_string('configsessioncookie', 'admin'), '', PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('sessioncookiepath', new lang_string('sessioncookiepath', 'admin'),
new lang_string('configsessioncookiepath', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('sessioncookiedomain', new lang_string('sessioncookiedomain', 'admin'),
new lang_string('configsessioncookiedomain', 'admin'), '', PARAM_RAW, 50));
$ADMIN->add('server', $temp);
// "sessionhandling" settingpage
$temp = new admin_settingpage('sessionhandling', new lang_string('sessionhandling', 'admin'));
if (empty($CFG->session_handler_class) and $DB->session_lock_supported()) {
$temp->add(new admin_setting_configcheckbox('dbsessions', new lang_string('dbsessions', 'admin'), new lang_string('configdbsessions', 'admin'), 0));
}
// Statistics.
$temp = new admin_settingpage('stats', new lang_string('stats'), 'moodle/site:config', empty($CFG->enablestats));
$temp->add(new admin_setting_configselect('statsfirstrun', new lang_string('statsfirstrun', 'admin'),
new lang_string('configstatsfirstrun', 'admin'), 'none',
[
'none' => new lang_string('none'),
60 * 60 * 24 * 7 => new lang_string('numweeks', 'moodle', 1),
60 * 60 * 24 * 14 => new lang_string('numweeks', 'moodle', 2),
60 * 60 * 24 * 21 => new lang_string('numweeks', 'moodle', 3),
60 * 60 * 24 * 28 => new lang_string('nummonths', 'moodle', 1),
60 * 60 * 24 * 56 => new lang_string('nummonths', 'moodle', 2),
60 * 60 * 24 * 84 => new lang_string('nummonths', 'moodle', 3),
60 * 60 * 24 * 112 => new lang_string('nummonths', 'moodle', 4),
60 * 60 * 24 * 140 => new lang_string('nummonths', 'moodle', 5),
60 * 60 * 24 * 168 => new lang_string('nummonths', 'moodle', 6),
'all' => new lang_string('all')
]
));
$temp->add(new admin_setting_configselect('statsmaxruntime', new lang_string('statsmaxruntime', 'admin'),
new lang_string('configstatsmaxruntime3', 'admin'), 0,
[
0 => new lang_string('untilcomplete'),
60 * 30 => '10 ' . new lang_string('minutes'),
60 * 30 => '30 ' . new lang_string('minutes'),
60 * 60 => '1 ' . new lang_string('hour'),
60 * 60 * 2 => '2 ' . new lang_string('hours'),
60 * 60 * 3 => '3 ' . new lang_string('hours'),
60 * 60 * 4 => '4 ' . new lang_string('hours'),
60 * 60 * 5 => '5 ' . new lang_string('hours'),
60 * 60 * 6 => '6 ' . new lang_string('hours'),
60 * 60 * 7 => '7 ' . new lang_string('hours'),
60 * 60 * 8 => '8 ' . new lang_string('hours'),
]
));
$temp->add(new admin_setting_configtext('statsruntimedays', new lang_string('statsruntimedays', 'admin'),
new lang_string('configstatsruntimedays', 'admin'), 31, PARAM_INT));
$temp->add(new admin_setting_configtext('statsuserthreshold', new lang_string('statsuserthreshold', 'admin'),
new lang_string('configstatsuserthreshold', 'admin'), 0, PARAM_INT));
$ADMIN->add('server', $temp);
$temp->add(new admin_setting_configduration('sessiontimeout', new lang_string('sessiontimeout', 'admin'),
new lang_string('configsessiontimeout', 'admin'), 8 * 60 * 60));
// HTTP.
$temp = new admin_settingpage('http', new lang_string('http', 'admin'));
$temp->add(new admin_setting_configcheckbox('slasharguments', new lang_string('slasharguments', 'admin'),
new lang_string('configslasharguments', 'admin'), 1));
$temp->add(new admin_setting_heading('reverseproxy', new lang_string('reverseproxy', 'admin'), '', ''));
$options = [
0 => 'HTTP_CLIENT_IP, HTTP_X_FORWARDED_FOR, REMOTE_ADDR',
GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'HTTP_X_FORWARDED_FOR, REMOTE_ADDR',
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR => 'HTTP_CLIENT, REMOTE_ADDR',
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));
$temp->add(new admin_setting_configtext('reverseproxyignore', new lang_string('reverseproxyignore', 'admin'),
new lang_string('configreverseproxyignore', 'admin'), ''));
$temp->add(new admin_setting_configtext('sessioncookie', new lang_string('sessioncookie', 'admin'), new lang_string('configsessioncookie', 'admin'), '', PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('sessioncookiepath', new lang_string('sessioncookiepath', 'admin'), new lang_string('configsessioncookiepath', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('sessioncookiedomain', new lang_string('sessioncookiedomain', 'admin'), new lang_string('configsessioncookiedomain', 'admin'), '', PARAM_RAW, 50));
$ADMIN->add('server', $temp);
$temp->add(new admin_setting_heading('webproxy', new lang_string('webproxy', 'admin'),
new lang_string('webproxyinfo', 'admin')));
$temp->add(new admin_setting_configtext('proxyhost', new lang_string('proxyhost', 'admin'),
new lang_string('configproxyhost', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('proxyport', new lang_string('proxyport', 'admin'),
new lang_string('configproxyport', 'admin'), 0, PARAM_INT));
$options = ['HTTP' => 'HTTP'];
if (defined('CURLPROXY_SOCKS5')) {
$options['SOCKS5'] = 'SOCKS5';
}
$temp->add(new admin_setting_configselect('proxytype', new lang_string('proxytype', 'admin'),
new lang_string('configproxytype', 'admin'), 'HTTP', $options));
$temp->add(new admin_setting_configtext('proxyuser', new lang_string('proxyuser', 'admin'),
new lang_string('configproxyuser', 'admin'), ''));
$temp->add(new admin_setting_configpasswordunmask('proxypassword', new lang_string('proxypassword', 'admin'),
new lang_string('configproxypassword', 'admin'), ''));
$temp->add(new admin_setting_configtext('proxybypass', new lang_string('proxybypass', 'admin'),
new lang_string('configproxybypass', 'admin'), 'localhost, 127.0.0.1'));
$ADMIN->add('server', $temp);
$temp = new admin_settingpage('maintenancemode', new lang_string('sitemaintenancemode', 'admin'));
$options = [0 => new lang_string('disable'), 1 => new lang_string('enable')];
$temp->add(new admin_setting_configselect('maintenance_enabled', new lang_string('sitemaintenancemode', 'admin'),
new lang_string('helpsitemaintenance', 'admin'), 0, $options));
$temp->add(new admin_setting_confightmleditor('maintenance_message', new lang_string('optionalmaintenancemessage', 'admin'),
'', ''));
$ADMIN->add('server', $temp);
// "stats" settingpage
$temp = new admin_settingpage('stats', new lang_string('stats'), 'moodle/site:config', empty($CFG->enablestats));
$temp->add(new admin_setting_configselect('statsfirstrun', new lang_string('statsfirstrun', 'admin'), new lang_string('configstatsfirstrun', 'admin'), 'none', array('none' => new lang_string('none'),
60*60*24*7 => new lang_string('numweeks','moodle',1),
60*60*24*14 => new lang_string('numweeks','moodle',2),
60*60*24*21 => new lang_string('numweeks','moodle',3),
60*60*24*28 => new lang_string('nummonths','moodle',1),
60*60*24*56 => new lang_string('nummonths','moodle',2),
60*60*24*84 => new lang_string('nummonths','moodle',3),
60*60*24*112 => new lang_string('nummonths','moodle',4),
60*60*24*140 => new lang_string('nummonths','moodle',5),
60*60*24*168 => new lang_string('nummonths','moodle',6),
'all' => new lang_string('all') )));
$temp->add(new admin_setting_configselect('statsmaxruntime', new lang_string('statsmaxruntime', 'admin'), new lang_string('configstatsmaxruntime3', 'admin'), 0, array(0 => new lang_string('untilcomplete'),
60*30 => '10 '.new lang_string('minutes'),
60*30 => '30 '.new lang_string('minutes'),
60*60 => '1 '.new lang_string('hour'),
60*60*2 => '2 '.new lang_string('hours'),
60*60*3 => '3 '.new lang_string('hours'),
60*60*4 => '4 '.new lang_string('hours'),
60*60*5 => '5 '.new lang_string('hours'),
60*60*6 => '6 '.new lang_string('hours'),
60*60*7 => '7 '.new lang_string('hours'),
60*60*8 => '8 '.new lang_string('hours') )));
$temp->add(new admin_setting_configtext('statsruntimedays', new lang_string('statsruntimedays', 'admin'), new lang_string('configstatsruntimedays', 'admin'), 31, PARAM_INT));
$temp->add(new admin_setting_configtext('statsuserthreshold', new lang_string('statsuserthreshold', 'admin'), new lang_string('configstatsuserthreshold', 'admin'), 0, PARAM_INT));
$ADMIN->add('server', $temp);
// Cleanup.
$temp = new admin_settingpage('cleanup', new lang_string('cleanup', 'admin'));
$temp->add(new admin_setting_configselect('deleteunconfirmed', new lang_string('deleteunconfirmed', 'admin'),
new lang_string('configdeleteunconfirmed', 'admin'), 168,
[
0 => new lang_string('never'),
168 => new lang_string('numdays', '', 7),
144 => new lang_string('numdays', '', 6),
120 => new lang_string('numdays', '', 5),
96 => new lang_string('numdays', '', 4),
72 => new lang_string('numdays', '', 3),
48 => new lang_string('numdays', '', 2),
24 => new lang_string('numdays', '', 1),
12 => new lang_string('numhours', '', 12),
6 => new lang_string('numhours', '', 6),
1 => new lang_string('numhours', '', 1),
]
));
$temp->add(new admin_setting_configselect('deleteincompleteusers', new lang_string('deleteincompleteusers', 'admin'),
new lang_string('configdeleteincompleteusers', 'admin'), 0,
[
0 => new lang_string('never'),
168 => new lang_string('numdays', '', 7),
144 => new lang_string('numdays', '', 6),
120 => new lang_string('numdays', '', 5),
96 => new lang_string('numdays', '', 4),
72 => new lang_string('numdays', '', 3),
48 => new lang_string('numdays', '', 2),
24 => new lang_string('numdays', '', 1),
]
));
// "http" settingpage
$temp = new admin_settingpage('http', new lang_string('http', 'admin'));
$temp->add(new admin_setting_configcheckbox('slasharguments', new lang_string('slasharguments', 'admin'), new lang_string('configslasharguments', 'admin'), 1));
$temp->add(new admin_setting_heading('reverseproxy', new lang_string('reverseproxy', 'admin'), '', ''));
$options = array(
0 => 'HTTP_CLIENT_IP, HTTP_X_FORWARDED_FOR, REMOTE_ADDR',
GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'HTTP_X_FORWARDED_FOR, REMOTE_ADDR',
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR => 'HTTP_CLIENT, REMOTE_ADDR',
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_DEFAULT, $options));
$temp->add(new admin_setting_configtext('reverseproxyignore', new lang_string('reverseproxyignore', 'admin'), new lang_string('configreverseproxyignore', 'admin'), ''));
$temp->add(new admin_setting_configcheckbox('disablegradehistory', new lang_string('disablegradehistory', 'grades'),
new lang_string('disablegradehistory_help', 'grades'), 0));
$temp->add(new admin_setting_heading('webproxy', new lang_string('webproxy', 'admin'), new lang_string('webproxyinfo', 'admin')));
$temp->add(new admin_setting_configtext('proxyhost', new lang_string('proxyhost', 'admin'), new lang_string('configproxyhost', 'admin'), '', PARAM_HOST));
$temp->add(new admin_setting_configtext('proxyport', new lang_string('proxyport', 'admin'), new lang_string('configproxyport', 'admin'), 0, PARAM_INT));
$options = array('HTTP'=>'HTTP');
if (defined('CURLPROXY_SOCKS5')) {
$options['SOCKS5'] = 'SOCKS5';
}
$temp->add(new admin_setting_configselect('proxytype', new lang_string('proxytype', 'admin'), new lang_string('configproxytype','admin'), 'HTTP', $options));
$temp->add(new admin_setting_configtext('proxyuser', new lang_string('proxyuser', 'admin'), new lang_string('configproxyuser', 'admin'), ''));
$temp->add(new admin_setting_configpasswordunmask('proxypassword', new lang_string('proxypassword', 'admin'), new lang_string('configproxypassword', 'admin'), ''));
$temp->add(new admin_setting_configtext('proxybypass', new lang_string('proxybypass', 'admin'), new lang_string('configproxybypass', 'admin'), 'localhost, 127.0.0.1'));
$ADMIN->add('server', $temp);
$temp->add(new admin_setting_configselect('gradehistorylifetime', new lang_string('gradehistorylifetime', 'grades'),
new lang_string('gradehistorylifetime_help', 'grades'), 0,
[
0 => new lang_string('neverdeletehistory', 'grades'),
1000 => new lang_string('numdays', '', 1000),
365 => new lang_string('numdays', '', 365),
180 => new lang_string('numdays', '', 180),
150 => new lang_string('numdays', '', 150),
120 => new lang_string('numdays', '', 120),
90 => new lang_string('numdays', '', 90),
60 => new lang_string('numdays', '', 60),
30 => new lang_string('numdays', '', 30),
]
));
$temp = new admin_settingpage('maintenancemode', new lang_string('sitemaintenancemode', 'admin'));
$options = array(0=>new lang_string('disable'), 1=>new lang_string('enable'));
$temp->add(new admin_setting_configselect('maintenance_enabled', new lang_string('sitemaintenancemode', 'admin'),
new lang_string('helpsitemaintenance', 'admin'), 0, $options));
$temp->add(new admin_setting_confightmleditor('maintenance_message', new lang_string('optionalmaintenancemessage', 'admin'),
'', ''));
$ADMIN->add('server', $temp);
$temp = new admin_settingpage('cleanup', new lang_string('cleanup', 'admin'));
$temp->add(new admin_setting_configselect('deleteunconfirmed', new lang_string('deleteunconfirmed', 'admin'), new lang_string('configdeleteunconfirmed', 'admin'), 168, array(0 => new lang_string('never'),
168 => new lang_string('numdays', '', 7),
144 => new lang_string('numdays', '', 6),
120 => new lang_string('numdays', '', 5),
96 => new lang_string('numdays', '', 4),
72 => new lang_string('numdays', '', 3),
48 => new lang_string('numdays', '', 2),
24 => new lang_string('numdays', '', 1),
12 => new lang_string('numhours', '', 12),
6 => new lang_string('numhours', '', 6),
1 => new lang_string('numhours', '', 1))));
$temp->add(new admin_setting_configselect('deleteincompleteusers', new lang_string('deleteincompleteusers', 'admin'), new lang_string('configdeleteincompleteusers', 'admin'), 0, array(0 => new lang_string('never'),
168 => new lang_string('numdays', '', 7),
144 => new lang_string('numdays', '', 6),
120 => new lang_string('numdays', '', 5),
96 => new lang_string('numdays', '', 4),
72 => new lang_string('numdays', '', 3),
48 => new lang_string('numdays', '', 2),
24 => new lang_string('numdays', '', 1))));
$temp->add(new admin_setting_configcheckbox('disablegradehistory', new lang_string('disablegradehistory', 'grades'),
new lang_string('disablegradehistory_help', 'grades'), 0));
$temp->add(new admin_setting_configselect('gradehistorylifetime', new lang_string('gradehistorylifetime', 'grades'),
new lang_string('gradehistorylifetime_help', 'grades'), 0, array(0 => new lang_string('neverdeletehistory', 'grades'),
1000 => new lang_string('numdays', '', 1000),
365 => new lang_string('numdays', '', 365),
180 => new lang_string('numdays', '', 180),
150 => new lang_string('numdays', '', 150),
120 => new lang_string('numdays', '', 120),
90 => new lang_string('numdays', '', 90),
60 => new lang_string('numdays', '', 60),
30 => new lang_string('numdays', '', 30))));
$temp->add(new admin_setting_configselect('tempdatafoldercleanup', new lang_string('tempdatafoldercleanup', 'admin'),
new lang_string('configtempdatafoldercleanup', 'admin'), 168, array(
$temp->add(new admin_setting_configselect('tempdatafoldercleanup', new lang_string('tempdatafoldercleanup', 'admin'),
new lang_string('configtempdatafoldercleanup', 'admin'), 168,
[
1 => new lang_string('numhours', '', 1),
3 => new lang_string('numhours', '', 3),
6 => new lang_string('numhours', '', 6),
@@ -166,227 +229,303 @@ $temp->add(new admin_setting_configselect('tempdatafoldercleanup', new lang_stri
24 => new lang_string('numhours', '', 24),
48 => new lang_string('numdays', '', 2),
168 => new lang_string('numdays', '', 7),
)));
]
));
$ADMIN->add('server', $temp);
$ADMIN->add('server', $temp);
$temp->add(new admin_setting_configduration('filescleanupperiod',
new lang_string('filescleanupperiod', 'admin'),
new lang_string('filescleanupperiod_help', 'admin'),
86400));
$ADMIN->add('server', new admin_externalpage('environment', new lang_string('environment','admin'), "$CFG->wwwroot/$CFG->admin/environment.php"));
$ADMIN->add('server', new admin_externalpage('phpinfo', new lang_string('phpinfo'), "$CFG->wwwroot/$CFG->admin/phpinfo.php"));
$ADMIN->add('server', new admin_externalpage('testoutgoingmailconf', new lang_string('testoutgoingmailconf', 'admin'),
new moodle_url("$CFG->wwwroot/$CFG->admin/testoutgoingmailconf.php"), 'moodle/site:config', true));
// Environment.
$ADMIN->add('server', new admin_externalpage('environment', new lang_string('environment', 'admin'),
"{$CFG->wwwroot}/{$CFG->admin}/environment.php"));
// PHP info.
$ADMIN->add('server', new admin_externalpage('phpinfo', new lang_string('phpinfo'),
"{$CFG->wwwroot}/{$CFG->admin}/phpinfo.php"));
// "performance" settingpage
$temp = new admin_settingpage('performance', new lang_string('performance', 'admin'));
// Test outgoing mail configuration (hidden, accessed via direct link from the settings page).
$ADMIN->add('server', new admin_externalpage('testoutgoingmailconf', new lang_string('testoutgoingmailconf', 'admin'),
new moodle_url('/admin/testoutgoingmailconf.php'), 'moodle/site:config', true));
// Memory limit options for large administration tasks.
$memoryoptions = array(
'64M' => '64M',
'128M' => '128M',
'256M' => '256M',
'512M' => '512M',
'1024M' => '1024M',
'2048M' => '2048M');
// Performance.
$temp = new admin_settingpage('performance', new lang_string('performance', 'admin'));
// Allow larger memory usage for 64-bit sites only.
if (PHP_INT_SIZE === 8) {
$memoryoptions['3072M'] = '3072M';
$memoryoptions['4096M'] = '4096M';
}
// Memory limit options for large administration tasks.
$memoryoptions = [
'64M' => '64M',
'128M' => '128M',
'256M' => '256M',
'512M' => '512M',
'1024M' => '1024M',
'2048M' => '2048M',
];
$temp->add(new admin_setting_configselect('extramemorylimit', new lang_string('extramemorylimit', 'admin'),
new lang_string('configextramemorylimit', 'admin'), '512M',
$memoryoptions));
$temp->add(new admin_setting_configtext('maxtimelimit', new lang_string('maxtimelimit', 'admin'),
// Allow larger memory usage for 64-bit sites only.
if (PHP_INT_SIZE === 8) {
$memoryoptions['3072M'] = '3072M';
$memoryoptions['4096M'] = '4096M';
}
$temp->add(new admin_setting_configselect('extramemorylimit', new lang_string('extramemorylimit', 'admin'),
new lang_string('configextramemorylimit', 'admin'), '512M', $memoryoptions));
$temp->add(new admin_setting_configtext('maxtimelimit', new lang_string('maxtimelimit', 'admin'),
new lang_string('maxtimelimit_desc', 'admin'), 0, PARAM_INT));
$temp->add(new admin_setting_configtext('curlcache', new lang_string('curlcache', 'admin'),
new lang_string('configcurlcache', 'admin'), 120, PARAM_INT));
$temp->add(new admin_setting_configtext('curlcache', new lang_string('curlcache', 'admin'),
new lang_string('configcurlcache', 'admin'), 120, PARAM_INT));
$temp->add(new admin_setting_configtext('curltimeoutkbitrate', new lang_string('curltimeoutkbitrate', 'admin'),
new lang_string('curltimeoutkbitrate_help', 'admin'), 56, PARAM_INT));
$temp->add(new admin_setting_configtext('curltimeoutkbitrate', new lang_string('curltimeoutkbitrate', 'admin'),
new lang_string('curltimeoutkbitrate_help', 'admin'), 56, PARAM_INT));
$ADMIN->add('server', $temp);
$ADMIN->add('server', $temp);
// Tasks.
$ADMIN->add('server', new admin_category('taskconfig', new lang_string('taskadmintitle', 'admin')));
$ADMIN->add('server', new admin_category('taskconfig', new lang_string('taskadmintitle', 'admin')));
$temp = new admin_settingpage('taskprocessing', new lang_string('taskprocessing','admin'));
$temp->add(
new admin_setting_configtext(
'task_scheduled_concurrency_limit',
new lang_string('task_scheduled_concurrency_limit', 'admin'),
new lang_string('task_scheduled_concurrency_limit_desc', 'admin'),
3,
PARAM_INT
)
);
// Task processing.
$temp = new admin_settingpage('taskprocessing', new lang_string('taskprocessing', 'admin'));
$temp->add(
new admin_setting_configduration(
'task_scheduled_max_runtime',
new lang_string('task_scheduled_max_runtime', 'admin'),
new lang_string('task_scheduled_max_runtime_desc', 'admin'),
30 * MINSECS
)
);
$temp->add(
new admin_setting_configtext(
'task_adhoc_concurrency_limit',
new lang_string('task_adhoc_concurrency_limit', 'admin'),
new lang_string('task_adhoc_concurrency_limit_desc', 'admin'),
3,
PARAM_INT
)
);
$temp->add(
new admin_setting_configduration(
'task_adhoc_max_runtime',
new lang_string('task_adhoc_max_runtime', 'admin'),
new lang_string('task_adhoc_max_runtime_desc', 'admin'),
30 * MINSECS
)
);
$ADMIN->add('taskconfig', $temp);
$temp = new admin_settingpage('tasklogging', new lang_string('tasklogging','admin'));
$temp->add(
new admin_setting_configselect(
'task_logmode',
new lang_string('task_logmode', 'admin'),
new lang_string('task_logmode_desc', 'admin'),
\core\task\logmanager::MODE_ALL,
[
\core\task\logmanager::MODE_ALL => new lang_string('task_logmode_all', 'admin'),
\core\task\logmanager::MODE_FAILONLY => new lang_string('task_logmode_failonly', 'admin'),
\core\task\logmanager::MODE_NONE => new lang_string('task_logmode_none', 'admin'),
]
)
);
$temp->add(
new admin_setting_configcheckbox(
'task_logtostdout',
new lang_string('task_logtostdout', 'admin'),
new lang_string('task_logtostdout_desc', 'admin'),
$setting = new admin_setting_configcheckbox(
'cron_enabled',
new lang_string('cron_enabled', 'admin'),
new lang_string('cron_enabled_desc', 'admin'),
1
)
);
);
$setting->set_updatedcallback('theme_reset_static_caches');
$temp->add($setting);
$temp->add(
new admin_setting_configtext(
'task_scheduled_concurrency_limit',
new lang_string('task_scheduled_concurrency_limit', 'admin'),
new lang_string('task_scheduled_concurrency_limit_desc', 'admin'),
3,
PARAM_INT
)
);
if (\core\task\logmanager::uses_standard_settings()) {
$temp->add(
new admin_setting_configduration(
'task_logretention',
new \lang_string('task_logretention', 'admin'),
new \lang_string('task_logretention_desc', 'admin'),
28 * DAYSECS
'task_scheduled_max_runtime',
new lang_string('task_scheduled_max_runtime', 'admin'),
new lang_string('task_scheduled_max_runtime_desc', 'admin'),
30 * MINSECS
)
);
$temp->add(
new admin_setting_configtext(
'task_logretainruns',
new \lang_string('task_logretainruns', 'admin'),
new \lang_string('task_logretainruns_desc', 'admin'),
20,
'task_adhoc_concurrency_limit',
new lang_string('task_adhoc_concurrency_limit', 'admin'),
new lang_string('task_adhoc_concurrency_limit_desc', 'admin'),
3,
PARAM_INT
)
);
}
$ADMIN->add('taskconfig', $temp);
if (\core\task\logmanager::uses_standard_settings()) {
$ADMIN->add('taskconfig', new admin_externalpage(
'tasklogs',
new lang_string('tasklogs','admin'),
"{$CFG->wwwroot}/{$CFG->admin}/tasklogs.php"
));
}
$temp->add(
new admin_setting_configduration(
'task_adhoc_max_runtime',
new lang_string('task_adhoc_max_runtime', 'admin'),
new lang_string('task_adhoc_max_runtime_desc', 'admin'),
30 * MINSECS
)
);
$ADMIN->add('taskconfig', $temp);
// E-mail settings.
$ADMIN->add('server', new admin_category('email', new lang_string('categoryemail', 'admin')));
// Task log configuration.
$temp = new admin_settingpage('tasklogging', new lang_string('tasklogging', 'admin'));
$temp->add(
new admin_setting_configselect(
'task_logmode',
new lang_string('task_logmode', 'admin'),
new lang_string('task_logmode_desc', 'admin'),
\core\task\logmanager::MODE_ALL,
[
\core\task\logmanager::MODE_ALL => new lang_string('task_logmode_all', 'admin'),
\core\task\logmanager::MODE_FAILONLY => new lang_string('task_logmode_failonly', 'admin'),
\core\task\logmanager::MODE_NONE => new lang_string('task_logmode_none', 'admin'),
]
)
);
$temp->add(
new admin_setting_configcheckbox(
'task_logtostdout',
new lang_string('task_logtostdout', 'admin'),
new lang_string('task_logtostdout_desc', 'admin'),
1
)
);
$temp = new admin_settingpage('outgoingmailconfig', new lang_string('outgoingmailconfig', 'admin'));
if (\core\task\logmanager::uses_standard_settings()) {
$temp->add(
new admin_setting_configduration(
'task_logretention',
new \lang_string('task_logretention', 'admin'),
new \lang_string('task_logretention_desc', 'admin'),
28 * DAYSECS
)
);
$temp->add(new admin_setting_heading('smtpheading', new lang_string('smtp', 'admin'),
new lang_string('smtpdetail', 'admin')));
$temp->add(new admin_setting_configtext('smtphosts', new lang_string('smtphosts', 'admin'),
new lang_string('configsmtphosts', 'admin'), '', PARAM_RAW));
$options = array('' => new lang_string('none', 'admin'), 'ssl' => 'SSL', 'tls' => 'TLS');
$temp->add(new admin_setting_configselect('smtpsecure', new lang_string('smtpsecure', 'admin'),
new lang_string('configsmtpsecure', 'admin'), '', $options));
$authtypeoptions = array('LOGIN' => 'LOGIN', 'PLAIN' => 'PLAIN', 'NTLM' => 'NTLM', 'CRAM-MD5' => 'CRAM-MD5');
$temp->add(new admin_setting_configselect('smtpauthtype', new lang_string('smtpauthtype', 'admin'),
new lang_string('configsmtpauthtype', 'admin'), 'LOGIN', $authtypeoptions));
$temp->add(new admin_setting_configtext('smtpuser', new lang_string('smtpuser', 'admin'),
new lang_string('configsmtpuser', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configpasswordunmask('smtppass', new lang_string('smtppass', 'admin'),
new lang_string('configsmtpuser', 'admin'), ''));
$temp->add(new admin_setting_configtext('smtpmaxbulk', new lang_string('smtpmaxbulk', 'admin'),
new lang_string('configsmtpmaxbulk', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_heading('noreplydomainheading', new lang_string('noreplydomain', 'admin'),
$temp->add(
new admin_setting_configtext(
'task_logretainruns',
new \lang_string('task_logretainruns', 'admin'),
new \lang_string('task_logretainruns_desc', 'admin'),
20,
PARAM_INT
)
);
}
$ADMIN->add('taskconfig', $temp);
// Task logs.
if (\core\task\logmanager::uses_standard_settings()) {
$ADMIN->add('taskconfig', new admin_externalpage(
'tasklogs',
new lang_string('tasklogs', 'admin'),
"{$CFG->wwwroot}/{$CFG->admin}/tasklogs.php"
));
}
// Email.
$ADMIN->add('server', new admin_category('email', new lang_string('categoryemail', 'admin')));
// Outgoing mail configuration.
$temp = new admin_settingpage('outgoingmailconfig', new lang_string('outgoingmailconfig', 'admin'));
$temp->add(new admin_setting_heading('smtpheading', new lang_string('smtp', 'admin'),
new lang_string('smtpdetail', 'admin')));
$temp->add(new admin_setting_configtext('smtphosts', new lang_string('smtphosts', 'admin'),
new lang_string('configsmtphosts', 'admin'), '', PARAM_RAW));
$options = [
'' => new lang_string('none', 'admin'),
'ssl' => 'SSL',
'tls' => 'TLS',
];
$temp->add(new admin_setting_configselect('smtpsecure', new lang_string('smtpsecure', 'admin'),
new lang_string('configsmtpsecure', 'admin'), '', $options));
$authtypeoptions = [
'LOGIN' => 'LOGIN',
'PLAIN' => 'PLAIN',
'NTLM' => 'NTLM',
'CRAM-MD5' => 'CRAM-MD5',
];
$temp->add(new admin_setting_configselect('smtpauthtype', new lang_string('smtpauthtype', 'admin'),
new lang_string('configsmtpauthtype', 'admin'), 'LOGIN', $authtypeoptions));
$temp->add(new admin_setting_configtext('smtpuser', new lang_string('smtpuser', 'admin'),
new lang_string('configsmtpuser', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configpasswordunmask('smtppass', new lang_string('smtppass', 'admin'),
new lang_string('configsmtpuser', 'admin'), ''));
$temp->add(new admin_setting_configtext('smtpmaxbulk', new lang_string('smtpmaxbulk', 'admin'),
new lang_string('configsmtpmaxbulk', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_heading('noreplydomainheading', new lang_string('noreplydomain', 'admin'),
new lang_string('noreplydomaindetail', 'admin')));
$temp->add(new admin_setting_configtext('noreplyaddress', new lang_string('noreplyaddress', 'admin'),
new lang_string('confignoreplyaddress', 'admin'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_EMAIL));
$temp->add(new admin_setting_configtextarea('allowedemaildomains',
$temp->add(new admin_setting_configtext('noreplyaddress', new lang_string('noreplyaddress', 'admin'),
new lang_string('confignoreplyaddress', 'admin'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_EMAIL));
$temp->add(new admin_setting_configtextarea('allowedemaildomains',
new lang_string('allowedemaildomains', 'admin'),
new lang_string('configallowedemaildomains', 'admin'),
''));
$url = new moodle_url('/admin/testoutgoingmailconf.php');
$link = html_writer::link($url, get_string('testoutgoingmailconf', 'admin'));
$temp->add(new admin_setting_heading('testoutgoinmailc', new lang_string('testoutgoingmailconf', 'admin'),
$temp->add(new admin_setting_heading('divertallemailsheading', new lang_string('divertallemails', 'admin'),
new lang_string('divertallemailsdetail', 'admin')));
$temp->add(new admin_setting_configtext('divertallemailsto',
new lang_string('divertallemailsto', 'admin'),
new lang_string('divertallemailsto_desc', 'admin'),
''));
$temp->add(new admin_setting_configtextarea('divertallemailsexcept',
new lang_string('divertallemailsexcept', 'admin'),
new lang_string('divertallemailsexcept_desc', 'admin'),
'', PARAM_RAW, '50', '4'));
$noreplyaddress = isset($CFG->noreplyaddress) ? $CFG->noreplyaddress : 'noreply@example.com';
$dkimdomain = substr(strrchr($noreplyaddress, "@"), 1);
$dkimselector = empty($CFG->emaildkimselector) ? '[selector]' : $CFG->emaildkimselector;
$pempath = "\$CFG->dataroot/dkim/{$dkimdomain}/{$dkimselector}.private";
$temp->add(new admin_setting_heading('emaildkim', new lang_string('emaildkim', 'admin'),
new lang_string('emaildkiminfo', 'admin', ['path' => $pempath, 'docs' => \get_docs_url('Mail_configuration#DKIM')])));
$temp->add(new admin_setting_configtext('emaildkimselector', new lang_string('emaildkimselector', 'admin'),
new lang_string('configemaildkimselector', 'admin'), '', PARAM_FILE));
$url = new moodle_url('/admin/testoutgoingmailconf.php');
$link = html_writer::link($url, get_string('testoutgoingmailconf', 'admin'));
$temp->add(new admin_setting_heading('testoutgoinmailc', new lang_string('testoutgoingmailconf', 'admin'),
new lang_string('testoutgoingmaildetail', 'admin', $link)));
$temp->add(new admin_setting_heading('emaildoesnotfit', new lang_string('doesnotfit', 'admin'),
$temp->add(new admin_setting_heading('emaildoesnotfit', new lang_string('doesnotfit', 'admin'),
new lang_string('doesnotfitdetail', 'admin')));
$charsets = get_list_of_charsets();
unset($charsets['UTF-8']); // Not needed here.
$options = array();
$options['0'] = 'UTF-8';
$options = array_merge($options, $charsets);
$temp->add(new admin_setting_configselect('sitemailcharset', new lang_string('sitemailcharset', 'admin'),
new lang_string('configsitemailcharset','admin'), '0', $options));
$temp->add(new admin_setting_configcheckbox('allowusermailcharset', new lang_string('allowusermailcharset', 'admin'),
new lang_string('configallowusermailcharset', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowattachments', new lang_string('allowattachments', 'admin'),
new lang_string('configallowattachments', 'admin'), 1));
$options = array('LF' => 'LF', 'CRLF' => 'CRLF');
$temp->add(new admin_setting_configselect('mailnewline', new lang_string('mailnewline', 'admin'),
new lang_string('configmailnewline', 'admin'), 'LF', $options));
$choices = array(new lang_string('never', 'admin'),
new lang_string('always', 'admin'),
new lang_string('onlynoreply', 'admin'));
$temp->add(new admin_setting_configselect('emailfromvia', new lang_string('emailfromvia', 'admin'),
new lang_string('configemailfromvia', 'admin'), 1, $choices));
$charsets = get_list_of_charsets();
unset($charsets['UTF-8']);
$options = [
'0' => 'UTF-8',
];
$options = array_merge($options, $charsets);
$temp->add(new admin_setting_configselect('sitemailcharset', new lang_string('sitemailcharset', 'admin'),
new lang_string('configsitemailcharset', 'admin'), '0', $options));
$temp->add(new admin_setting_configtext('emailsubjectprefix', new lang_string('emailsubjectprefix', 'admin'),
$temp->add(new admin_setting_configcheckbox('allowusermailcharset', new lang_string('allowusermailcharset', 'admin'),
new lang_string('configallowusermailcharset', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowattachments', new lang_string('allowattachments', 'admin'),
new lang_string('configallowattachments', 'admin'), 1));
$options = [
'LF' => 'LF',
'CRLF' => 'CRLF',
];
$temp->add(new admin_setting_configselect('mailnewline', new lang_string('mailnewline', 'admin'),
new lang_string('configmailnewline', 'admin'), 'LF', $options));
$choices = [
new lang_string('never', 'admin'),
new lang_string('always', 'admin'),
new lang_string('onlynoreply', 'admin'),
];
$temp->add(new admin_setting_configselect('emailfromvia', new lang_string('emailfromvia', 'admin'),
new lang_string('configemailfromvia', 'admin'), 1, $choices));
$temp->add(new admin_setting_configtext('emailsubjectprefix', new lang_string('emailsubjectprefix', 'admin'),
new lang_string('configemailsubjectprefix', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtextarea('emailheaders', new lang_string('emailheaders', 'admin'),
$temp->add(new admin_setting_configtextarea('emailheaders', new lang_string('emailheaders', 'admin'),
new lang_string('configemailheaders', 'admin'), '', PARAM_RAW, '50', '3'));
$ADMIN->add('email', $temp);
$ADMIN->add('email', $temp);
// "update notifications" settingpage
if (empty($CFG->disableupdatenotifications)) {
$temp = new admin_settingpage('updatenotifications', new lang_string('updatenotifications', 'core_admin'));
$temp->add(new admin_setting_configcheckbox('updateautocheck', new lang_string('updateautocheck', 'core_admin'),
new lang_string('updateautocheck_desc', 'core_admin'), 1));
$temp->add(new admin_setting_configselect('updateminmaturity', new lang_string('updateminmaturity', 'core_admin'),
new lang_string('updateminmaturity_desc', 'core_admin'), MATURITY_STABLE,
array(
MATURITY_ALPHA => new lang_string('maturity'.MATURITY_ALPHA, 'core_admin'),
MATURITY_BETA => new lang_string('maturity'.MATURITY_BETA, 'core_admin'),
MATURITY_RC => new lang_string('maturity'.MATURITY_RC, 'core_admin'),
MATURITY_STABLE => new lang_string('maturity'.MATURITY_STABLE, 'core_admin'),
)));
$temp->add(new admin_setting_configcheckbox('updatenotifybuilds', new lang_string('updatenotifybuilds', 'core_admin'),
new lang_string('updatenotifybuilds_desc', 'core_admin'), 0));
$ADMIN->add('server', $temp);
// Update notifications.
if (empty($CFG->disableupdatenotifications)) {
$temp = new admin_settingpage('updatenotifications', new lang_string('updatenotifications', 'core_admin'));
$temp->add(new admin_setting_configcheckbox('updateautocheck', new lang_string('updateautocheck', 'core_admin'),
new lang_string('updateautocheck_desc', 'core_admin'), 1));
$temp->add(new admin_setting_configselect('updateminmaturity', new lang_string('updateminmaturity', 'core_admin'),
new lang_string('updateminmaturity_desc', 'core_admin'), MATURITY_STABLE,
[
MATURITY_ALPHA => new lang_string('maturity'.MATURITY_ALPHA, 'core_admin'),
MATURITY_BETA => new lang_string('maturity'.MATURITY_BETA, 'core_admin'),
MATURITY_RC => new lang_string('maturity'.MATURITY_RC, 'core_admin'),
MATURITY_STABLE => new lang_string('maturity'.MATURITY_STABLE, 'core_admin'),
]
));
$temp->add(new admin_setting_configcheckbox('updatenotifybuilds', new lang_string('updatenotifybuilds', 'core_admin'),
new lang_string('updatenotifybuilds_desc', 'core_admin'), 0));
$ADMIN->add('server', $temp);
}
}
} // end of speedup
+1
View File
@@ -39,6 +39,7 @@ $ADMIN->add('root', new admin_category('license', new lang_string('license')));
$ADMIN->add('root', new admin_category('location', new lang_string('location','admin')));
$ADMIN->add('root', new admin_category('language', new lang_string('language')));
$ADMIN->add('root', new admin_category('messaging', new lang_string('messagingcategory', 'admin')));
$ADMIN->add('root', new admin_category('payment', new lang_string('payments', 'payment')));
$ADMIN->add('root', new admin_category('modules', new lang_string('plugins', 'admin')));
$ADMIN->add('root', new admin_category('security', new lang_string('security','admin')));
$ADMIN->add('root', new admin_category('appearance', new lang_string('appearance','admin')));
+1
View File
@@ -32,6 +32,7 @@ $result = optional_param('result', null, PARAM_INT);
$pageurl = new \moodle_url('/admin/tasklogs.php');
$pageurl->param('filter', $filter);
$pageurl->param('result', $result);
$PAGE->set_url($pageurl);
$PAGE->set_context(context_system::instance());
@@ -0,0 +1,87 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_admin\local\settings\autocomplete
Admin setting auto complete.
Context variables required for this template:
* name - element name
* id - element id
* options - choices
* multiple - is multiple choices?
* manageurl - url to manage choices
* managetext - string to display manage url
* tags - Should we allow typing new entries to the field?
* ajax - Name of an AMD module to send/process ajax requests
* placeholder - Placeholder text for an empty list
* casesensitive - Whether the search has to be case-sensitive
* showsuggestions - Show suggestions by default - but this can be turned off
* noselectionstring - String that is shown when there are no selections
Example context (json):
{
"name": "name0",
"id": "id0",
"options": [{
"value": "1",
"text": "option 1",
"selected": true,
"disabled": false
}],
"multiple": true,
"manageurl": "",
"managetext": "",
"tags": false,
"ajax": "",
"placeholder": "",
"casesensitive": false,
"showsuggestions": true,
"noselectionstring": ""
}
}}
{{!
Setting autocomplete.
}}
<div class="form-select defaultsnext">
<input type="hidden" name="{{name}}[xxxxx]" value="_qf__force_multiselect_submission">
<select class="custom-select" name="{{name}}[]"
id="{{id}}"
{{#multiple}}multiple{{/multiple}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{{text}}}</option>
{{/options}}
</select>
{{#manageurl}}
<a href="{{manageurl}}">{{managetext}}</a>
{{/manageurl}}
</div>
<br/>
{{#js}}
require(['core/form-autocomplete'], function(module) {
module.enhance({{#quote}}#{{id}}{{/quote}},
{{tags}},
{{#quote}}{{ajax}}{{/quote}},
{{#quote}}{{placeholder}}{{/quote}},
{{casesensitive}},
{{showsuggestions}},
{{#quote}}{{noselectionstring}}{{/quote}});
});
{{/js}}
@@ -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,7 +24,7 @@
* size - form element size
* value - form element value
* id - element id
* forced - has value been defined in config.php
* readonly - has value been defined in config.php
Example context (json):
{
@@ -32,10 +32,10 @@
"id": "test0",
"size": "8",
"value": "secret",
"forced": false
"readonly": false
}
}}
{{#forced}}
{{#readonly}}
<div class="form-password">
<input type="text"
name = "{{ name }}"
@@ -46,8 +46,8 @@
disabled
>
</div>
{{/forced}}
{{^forced}}
{{/readonly}}
{{^readonly}}
<div class="form-password">
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
<span data-passwordunmask="editor">
@@ -76,4 +76,4 @@ require(['core_form/passwordunmask'], function(PasswordUnmask) {
new PasswordUnmask("{{ id }}");
});
{{/js}}
{{/forced}}
{{/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}}
+2 -5
View File
@@ -53,11 +53,8 @@ class behat_admin extends behat_base {
}
foreach ($data as $label => $value) {
$this->execute('behat_navigation::i_select_from_flat_navigation_drawer', [get_string('administrationsite')]);
// Search by label.
$this->execute('behat_forms::i_set_the_field_to', [get_string('query', 'admin'), $label]);
$this->execute("behat_forms::press_button", get_string('search', 'admin'));
// Navigate straight to the search results fo rthis label.
$this->execute('behat_general::i_visit', ["/admin/search.php?query=" . urlencode($label)]);
// Admin settings does not use the same DOM structure than other moodle forms
// but we also need to use lib/behat/form_field/* to deal with the different moodle form elements.
+4 -2
View File
@@ -14,6 +14,10 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And the following "cohorts" exist:
| name | idnumber |
| Cohort 1 | CH1 |
And the following "cohort members" exist:
| user | cohort |
| user2 | CH1 |
| user3 | CH1 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
@@ -23,8 +27,6 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
| user2 | C1 | student |
| user3 | C1 | student |
And I log in as "admin"
And I add "User Two (two@example.com)" user to "CH1" cohort members
And I add "User Three (three@example.com)" user to "CH1" cohort members
And I navigate to "Users > Accounts > Browse list of users" in site administration
Scenario: Filter user accounts by role and cohort
@@ -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$$ |
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_analytics/log_info",["jquery","core/str","core/modal_factory","core/notification"],function(a,b,c,d){return{loadInfo:function loadInfo(e,f){var g=a("[data-model-log-id=\""+e+"\"]");b.get_string("loginfo","tool_analytics").then(function(b){var d=a("<ul>");f.forEach(function(a){d.append("<li>"+a+"</li>")});d.append("</ul>");return c.create({title:b,body:d.html(),large:!0},g)}).catch(d.exception)}}});
//# sourceMappingURL=log_info.min.js.map
/**
* Shows a dialogue with info about this logs.
*
* @module tool_analytics/log_info
* @copyright 2017 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_analytics/log_info",["jquery","core/str","core/modal_factory","core/notification"],(function($,str,ModalFactory,Notification){return{loadInfo:function(id,info){var link=$('[data-model-log-id="'+id+'"]');str.get_string("loginfo","tool_analytics").then((function(langString){var bodyInfo=$("<ul>");return info.forEach((function(item){bodyInfo.append("<li>"+item+"</li>")})),bodyInfo.append("</ul>"),ModalFactory.create({title:langString,body:bodyInfo.html(),large:!0},link)})).catch(Notification.exception)}}}));
//# sourceMappingURL=log_info.min.js.map
@@ -1 +1 @@
{"version":3,"sources":["../src/log_info.js"],"names":["define","$","str","ModalFactory","Notification","loadInfo","id","info","link","get_string","then","langString","bodyInfo","forEach","item","append","create","title","body","html","large","catch","exception"],"mappings":"AAwBAA,OAAM,2BAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,oBAAvB,CAA6C,mBAA7C,CAAD,CAAoE,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA+BC,CAA/B,CAA6C,CAEnH,MAAoD,CAShDC,QAAQ,CAAE,kBAASC,CAAT,CAAaC,CAAb,CAAmB,CAEzB,GAAIC,CAAAA,CAAI,CAAGP,CAAC,CAAC,wBAAyBK,CAAzB,CAA8B,KAA/B,CAAZ,CACAJ,CAAG,CAACO,UAAJ,CAAe,SAAf,CAA0B,gBAA1B,EAA4CC,IAA5C,CAAiD,SAASC,CAAT,CAAqB,CAElE,GAAIC,CAAAA,CAAQ,CAAGX,CAAC,CAAC,MAAD,CAAhB,CACAM,CAAI,CAACM,OAAL,CAAa,SAASC,CAAT,CAAe,CACxBF,CAAQ,CAACG,MAAT,CAAgB,OAASD,CAAT,CAAgB,OAAhC,CACH,CAFD,EAGAF,CAAQ,CAACG,MAAT,CAAgB,OAAhB,EAEA,MAAOZ,CAAAA,CAAY,CAACa,MAAb,CAAoB,CACvBC,KAAK,CAAEN,CADgB,CAEvBO,IAAI,CAAEN,CAAQ,CAACO,IAAT,EAFiB,CAGvBC,KAAK,GAHkB,CAApB,CAIJZ,CAJI,CAMV,CAdD,EAcGa,KAdH,CAcSjB,CAAY,CAACkB,SAdtB,CAeH,CA3B+C,CA6BvD,CA/BK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Shows a dialogue with info about this logs.\n *\n * @module tool_analytics/log_info\n * @class log_info\n * @package tool_analytics\n * @copyright 2017 David Monllao {@link http://www.davidmonllao.com}\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/str', 'core/modal_factory', 'core/notification'], function($, str, ModalFactory, Notification) {\n\n return /** @alias module:tool_analytics/log_info */ {\n\n /**\n * Prepares a modal info for a log's results.\n *\n * @method loadInfo\n * @param {int} id\n * @param {string[]} info\n */\n loadInfo: function(id, info) {\n\n var link = $('[data-model-log-id=\"' + id + '\"]');\n str.get_string('loginfo', 'tool_analytics').then(function(langString) {\n\n var bodyInfo = $(\"<ul>\");\n info.forEach(function(item) {\n bodyInfo.append('<li>' + item + '</li>');\n });\n bodyInfo.append(\"</ul>\");\n\n return ModalFactory.create({\n title: langString,\n body: bodyInfo.html(),\n large: true,\n }, link);\n\n }).catch(Notification.exception);\n }\n };\n});\n"],"file":"log_info.min.js"}
{"version":3,"file":"log_info.min.js","sources":["../src/log_info.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Shows a dialogue with info about this logs.\n *\n * @module tool_analytics/log_info\n * @copyright 2017 David Monllao {@link http://www.davidmonllao.com}\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/str', 'core/modal_factory', 'core/notification'], function($, str, ModalFactory, Notification) {\n\n return /** @alias module:tool_analytics/log_info */ {\n\n /**\n * Prepares a modal info for a log's results.\n *\n * @method loadInfo\n * @param {int} id\n * @param {string[]} info\n */\n loadInfo: function(id, info) {\n\n var link = $('[data-model-log-id=\"' + id + '\"]');\n str.get_string('loginfo', 'tool_analytics').then(function(langString) {\n\n var bodyInfo = $(\"<ul>\");\n info.forEach(function(item) {\n bodyInfo.append('<li>' + item + '</li>');\n });\n bodyInfo.append(\"</ul>\");\n\n return ModalFactory.create({\n title: langString,\n body: bodyInfo.html(),\n large: true,\n }, link);\n\n }).catch(Notification.exception);\n }\n };\n});\n"],"names":["define","$","str","ModalFactory","Notification","loadInfo","id","info","link","get_string","then","langString","bodyInfo","forEach","item","append","create","title","body","html","large","catch","exception"],"mappings":";;;;;;;AAsBAA,iCAAO,CAAC,SAAU,WAAY,qBAAsB,sBAAsB,SAASC,EAAGC,IAAKC,aAAcC,oBAEjD,CAShDC,SAAU,SAASC,GAAIC,UAEfC,KAAOP,EAAE,uBAAyBK,GAAK,MAC3CJ,IAAIO,WAAW,UAAW,kBAAkBC,MAAK,SAASC,gBAElDC,SAAWX,EAAE,eACjBM,KAAKM,SAAQ,SAASC,MAClBF,SAASG,OAAO,OAASD,KAAO,YAEpCF,SAASG,OAAO,SAETZ,aAAaa,OAAO,CACvBC,MAAON,WACPO,KAAMN,SAASO,OACfC,OAAO,GACRZ,SAEJa,MAAMjB,aAAakB"}
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_analytics/model",["jquery","core/str","core/log","core/notification","core/modal_factory","core/modal_events","core/templates"],function(b,c,d,e,f,g,h){var i={clear:{title:{key:"clearpredictions",component:"tool_analytics"},body:{key:"clearmodelpredictions",component:"tool_analytics"}},delete:{title:{key:"delete",component:"tool_analytics"},body:{key:"deletemodelconfirmation",component:"tool_analytics"}}},j=function(a){var c=b(a).closest("[data-model-name]");if(c.length){return c.attr("data-model-name")}else{d.error("Unexpected DOM error - unable to obtain the model name");return""}};return{confirmAction:function confirmAction(a,h){b("[data-action-id=\""+a+"\"]").on("click",function(k){k.preventDefault();var l=b(k.currentTarget);if("undefined"==typeof i[h]){d.error("Action \""+h+"\" is not allowed.");return}var a=[i[h].title,i[h].body];a[1].param=j(l);var m=c.get_strings(a),n=f.create({type:f.types.SAVE_CANCEL});b.when(m,n).then(function(a,b){b.setTitle(a[0]);b.setBody(a[1]);b.setSaveButtonText(a[0]);b.getRoot().on(g.save,function(){window.location.href=l.attr("href")});b.show();return b}).fail(e.exception)})},selectEvaluationOptions:function selectEvaluationOptions(a,d){b("[data-action-id=\""+a+"\"]").on("click",function(i){i.preventDefault();var j=b(i.currentTarget),a=b(this).attr("data-timesplitting-methods"),k=c.get_strings([{key:"evaluatemodel",component:"tool_analytics"},{key:"evaluate",component:"tool_analytics"}]),l=f.create({type:f.types.SAVE_CANCEL}),m=h.render("tool_analytics/evaluation_options",{trainedexternally:d,timesplittingmethods:JSON.parse(a)});b.when(k,l).then(function(a,c){c.getRoot().on(g.hidden,c.destroy.bind(c));c.setTitle(a[0]);c.setSaveButtonText(a[1]);c.setBody(m);c.getRoot().on(g.save,function(){var a=b("input[name='evaluationmode']:checked").val();if("trainedmodel"==a){j.attr("href",j.attr("href")+"&mode=trainedmodel")}var c=b("#id-evaluation-timesplitting").val();j.attr("href",j.attr("href")+"&timesplitting="+c);window.location.href=j.attr("href")});c.show();return c}).fail(e.exception)})},selectExportOptions:function selectExportOptions(a,d){b("[data-action-id=\""+a+"\"]").on("click",function(i){i.preventDefault();var j=b(i.currentTarget);if(!d){j.attr("href",j.attr("href")+"&action=exportmodel&includeweights=0");window.location.href=j.attr("href");return}var a=c.get_strings([{key:"export",component:"tool_analytics"}]),k=f.create({type:f.types.SAVE_CANCEL}),l=h.render("tool_analytics/export_options",{});b.when(a,k).then(function(a,c){c.getRoot().on(g.hidden,c.destroy.bind(c));c.setTitle(a[0]);c.setSaveButtonText(a[0]);c.setBody(l);c.getRoot().on(g.save,function(){var a=b("input[name='exportoption']:checked").val();if("exportdata"==a){j.attr("href",j.attr("href")+"&action=exportdata")}else{j.attr("href",j.attr("href")+"&action=exportmodel");if(b("#id-includeweights").is(":checked")){j.attr("href",j.attr("href")+"&includeweights=1")}else{j.attr("href",j.attr("href")+"&includeweights=0")}}window.location.href=j.attr("href")});c.show();return c}).fail(e.exception)})}}});
//# sourceMappingURL=model.min.js.map
/**
* AMD module for model actions confirmation.
*
* @module tool_analytics/model
* @copyright 2017 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_analytics/model",["jquery","core/str","core/log","core/notification","core/modal_factory","core/modal_events","core/templates"],(function($,Str,log,Notification,ModalFactory,ModalEvents,Templates){var actionsList={clear:{title:{key:"clearpredictions",component:"tool_analytics"},body:{key:"clearmodelpredictions",component:"tool_analytics"}},delete:{title:{key:"delete",component:"tool_analytics"},body:{key:"deletemodelconfirmation",component:"tool_analytics"}}};return{confirmAction:function(actionId,actionType){$('[data-action-id="'+actionId+'"]').on("click",(function(ev){ev.preventDefault();var a=$(ev.currentTarget);if(void 0!==actionsList[actionType]){var wrap,reqStrings=[actionsList[actionType].title,actionsList[actionType].body];reqStrings[1].param=(wrap=$(a).closest("[data-model-name]")).length?wrap.attr("data-model-name"):(log.error("Unexpected DOM error - unable to obtain the model name"),"");var stringsPromise=Str.get_strings(reqStrings),modalPromise=ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL});$.when(stringsPromise,modalPromise).then((function(strings,modal){return modal.setTitle(strings[0]),modal.setBody(strings[1]),modal.setSaveButtonText(strings[0]),modal.getRoot().on(ModalEvents.save,(function(){window.location.href=a.attr("href")})),modal.show(),modal})).fail(Notification.exception)}else log.error('Action "'+actionType+'" is not allowed.')}))},selectEvaluationOptions:function(actionId,trainedOnlyExternally){$('[data-action-id="'+actionId+'"]').on("click",(function(ev){ev.preventDefault();var a=$(ev.currentTarget),timeSplittingMethods=$(this).attr("data-timesplitting-methods"),stringsPromise=Str.get_strings([{key:"evaluatemodel",component:"tool_analytics"},{key:"evaluate",component:"tool_analytics"}]),modalPromise=ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL}),bodyPromise=Templates.render("tool_analytics/evaluation_options",{trainedexternally:trainedOnlyExternally,timesplittingmethods:JSON.parse(timeSplittingMethods)});$.when(stringsPromise,modalPromise).then((function(strings,modal){return modal.getRoot().on(ModalEvents.hidden,modal.destroy.bind(modal)),modal.setTitle(strings[0]),modal.setSaveButtonText(strings[1]),modal.setBody(bodyPromise),modal.getRoot().on(ModalEvents.save,(function(){"trainedmodel"==$("input[name='evaluationmode']:checked").val()&&a.attr("href",a.attr("href")+"&mode=trainedmodel");var timeSplittingMethod=$("#id-evaluation-timesplitting").val();a.attr("href",a.attr("href")+"&timesplitting="+timeSplittingMethod),window.location.href=a.attr("href")})),modal.show(),modal})).fail(Notification.exception)}))},selectExportOptions:function(actionId,isTrained){$('[data-action-id="'+actionId+'"]').on("click",(function(ev){ev.preventDefault();var a=$(ev.currentTarget);if(!isTrained)return a.attr("href",a.attr("href")+"&action=exportmodel&includeweights=0"),void(window.location.href=a.attr("href"));var stringsPromise=Str.get_strings([{key:"export",component:"tool_analytics"}]),modalPromise=ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL}),bodyPromise=Templates.render("tool_analytics/export_options",{});$.when(stringsPromise,modalPromise).then((function(strings,modal){return modal.getRoot().on(ModalEvents.hidden,modal.destroy.bind(modal)),modal.setTitle(strings[0]),modal.setSaveButtonText(strings[0]),modal.setBody(bodyPromise),modal.getRoot().on(ModalEvents.save,(function(){"exportdata"==$("input[name='exportoption']:checked").val()?a.attr("href",a.attr("href")+"&action=exportdata"):(a.attr("href",a.attr("href")+"&action=exportmodel"),$("#id-includeweights").is(":checked")?a.attr("href",a.attr("href")+"&includeweights=1"):a.attr("href",a.attr("href")+"&includeweights=0")),window.location.href=a.attr("href")})),modal.show(),modal})).fail(Notification.exception)}))}}}));
//# sourceMappingURL=model.min.js.map
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_analytics/potential-contexts",["jquery","core/ajax"],function(a,b){return{processResults:function processResults(b,c){var d=[];if(a.isArray(c)){a.each(c,function(a,b){d.push({value:b.id,label:b.name})});return d}else{return c}},transport:function transport(c,d,e,f){var g,h=a(c).attr("modelid")||null;g=b.call([{methodname:"tool_analytics_potential_contexts",args:{query:d,modelid:h}}]);g[0].then(e).fail(f)}}});
//# sourceMappingURL=potential-contexts.min.js.map
/**
* Potential contexts selector module.
*
* @module tool_analytics/potential-contexts
* @copyright 2019 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_analytics/potential-contexts",["jquery","core/ajax"],(function($,Ajax){return{processResults:function(selector,results){var contexts=[];return $.isArray(results)?($.each(results,(function(index,context){contexts.push({value:context.id,label:context.name})})),contexts):results},transport:function(selector,query,success,failure){var modelid=$(selector).attr("modelid")||null;Ajax.call([{methodname:"tool_analytics_potential_contexts",args:{query:query,modelid:modelid}}])[0].then(success).fail(failure)}}}));
//# sourceMappingURL=potential-contexts.min.js.map
@@ -1 +1 @@
{"version":3,"sources":["../src/potential-contexts.js"],"names":["define","$","Ajax","processResults","selector","results","contexts","isArray","each","index","context","push","value","id","label","name","transport","query","success","failure","promise","modelid","attr","call","methodname","args","then","fail"],"mappings":"AAyBAA,OAAM,qCAAC,CAAC,QAAD,CAAW,WAAX,CAAD,CAA0B,SAASC,CAAT,CAAYC,CAAZ,CAAkB,CAE9C,MAA8D,CAE1DC,cAAc,CAAE,wBAASC,CAAT,CAAmBC,CAAnB,CAA4B,CACxC,GAAIC,CAAAA,CAAQ,CAAG,EAAf,CACA,GAAIL,CAAC,CAACM,OAAF,CAAUF,CAAV,CAAJ,CAAwB,CACpBJ,CAAC,CAACO,IAAF,CAAOH,CAAP,CAAgB,SAASI,CAAT,CAAgBC,CAAhB,CAAyB,CACrCJ,CAAQ,CAACK,IAAT,CAAc,CACVC,KAAK,CAAEF,CAAO,CAACG,EADL,CAEVC,KAAK,CAAEJ,CAAO,CAACK,IAFL,CAAd,CAIH,CALD,EAMA,MAAOT,CAAAA,CAEV,CATD,IASO,CACH,MAAOD,CAAAA,CACV,CACJ,CAhByD,CAkB1DW,SAAS,CAAE,mBAASZ,CAAT,CAAmBa,CAAnB,CAA0BC,CAA1B,CAAmCC,CAAnC,CAA4C,IAC/CC,CAAAA,CAD+C,CAG/CC,CAAO,CAAGpB,CAAC,CAACG,CAAD,CAAD,CAAYkB,IAAZ,CAAiB,SAAjB,GAA+B,IAHM,CAInDF,CAAO,CAAGlB,CAAI,CAACqB,IAAL,CAAU,CAAC,CACjBC,UAAU,CAAE,mCADK,CAEjBC,IAAI,CAAE,CACFR,KAAK,CAAEA,CADL,CAEFI,OAAO,CAAEA,CAFP,CAFW,CAAD,CAAV,CAAV,CAQAD,CAAO,CAAC,CAAD,CAAP,CAAWM,IAAX,CAAgBR,CAAhB,EAAyBS,IAAzB,CAA8BR,CAA9B,CACH,CA/ByD,CAmCjE,CArCK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Potential contexts selector module.\n *\n * @module tool_analytics/potential-contexts\n * @class potential-contexts\n * @package tool_analytics\n * @copyright 2019 David Monllao\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/ajax'], function($, Ajax) {\n\n return /** @alias module:tool_analytics/potential-contexts */ {\n\n processResults: function(selector, results) {\n var contexts = [];\n if ($.isArray(results)) {\n $.each(results, function(index, context) {\n contexts.push({\n value: context.id,\n label: context.name\n });\n });\n return contexts;\n\n } else {\n return results;\n }\n },\n\n transport: function(selector, query, success, failure) {\n var promise;\n\n let modelid = $(selector).attr('modelid') || null;\n promise = Ajax.call([{\n methodname: 'tool_analytics_potential_contexts',\n args: {\n query: query,\n modelid: modelid\n }\n }]);\n\n promise[0].then(success).fail(failure);\n }\n\n };\n\n});\n"],"file":"potential-contexts.min.js"}
{"version":3,"file":"potential-contexts.min.js","sources":["../src/potential-contexts.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Potential contexts selector module.\n *\n * @module tool_analytics/potential-contexts\n * @copyright 2019 David Monllao\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/ajax'], function($, Ajax) {\n\n return /** @alias module:tool_analytics/potential-contexts */ {\n\n processResults: function(selector, results) {\n var contexts = [];\n if ($.isArray(results)) {\n $.each(results, function(index, context) {\n contexts.push({\n value: context.id,\n label: context.name\n });\n });\n return contexts;\n\n } else {\n return results;\n }\n },\n\n transport: function(selector, query, success, failure) {\n var promise;\n\n let modelid = $(selector).attr('modelid') || null;\n promise = Ajax.call([{\n methodname: 'tool_analytics_potential_contexts',\n args: {\n query: query,\n modelid: modelid\n }\n }]);\n\n promise[0].then(success).fail(failure);\n }\n\n };\n\n});\n"],"names":["define","$","Ajax","processResults","selector","results","contexts","isArray","each","index","context","push","value","id","label","name","transport","query","success","failure","modelid","attr","call","methodname","args","then","fail"],"mappings":";;;;;;;AAuBAA,2CAAO,CAAC,SAAU,cAAc,SAASC,EAAGC,YAEsB,CAE1DC,eAAgB,SAASC,SAAUC,aAC3BC,SAAW,UACXL,EAAEM,QAAQF,UACVJ,EAAEO,KAAKH,SAAS,SAASI,MAAOC,SAC5BJ,SAASK,KAAK,CACVC,MAAOF,QAAQG,GACfC,MAAOJ,QAAQK,UAGhBT,UAGAD,SAIfW,UAAW,SAASZ,SAAUa,MAAOC,QAASC,aAGtCC,QAAUnB,EAAEG,UAAUiB,KAAK,YAAc,KACnCnB,KAAKoB,KAAK,CAAC,CACjBC,WAAY,oCACZC,KAAM,CACFP,MAAOA,MACPG,QAASA,YAIT,GAAGK,KAAKP,SAASQ,KAAKP"}
-2
View File
@@ -17,8 +17,6 @@
* Shows a dialogue with info about this logs.
*
* @module tool_analytics/log_info
* @class log_info
* @package tool_analytics
* @copyright 2017 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,8 +17,6 @@
* Potential contexts selector module.
*
* @module tool_analytics/potential-contexts
* @class potential-contexts
* @package tool_analytics
* @copyright 2019 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -64,7 +64,7 @@ class models_list implements \renderable, \templatable {
$data = new \stdClass();
$newmodelmenu = new \action_menu();
$newmodelmenu->set_menu_trigger(get_string('newmodel', 'tool_analytics'), 'btn btn-default');
$newmodelmenu->set_menu_trigger(get_string('newmodel', 'tool_analytics'), 'btn btn-secondary');
$newmodelmenu->set_alignment(\action_menu::TL, \action_menu::BL);
$newmodelmenu->add(new \action_menu_link(
+1 -1
View File
@@ -137,7 +137,7 @@ if (!empty($validdatasets) && !$model->is_enabled() && $options['non-interactive
}
// Refresh the instance to prevent unexpected issues.
$model = new \core_analytics\model($modelobj);
$model = new \core_analytics\model($options['modelid']);
// Set the time splitting method file and enable it.
$model->enable($input);
@@ -57,10 +57,10 @@
{{/trainedexternally}}
{{! Hidden by default if #trainedexternally as the default option is trainedmodel in this case.}}
<div id="id-evaluation-timesplitting-container" class="m-t-1 {{#trainedexternally}}hidden{{/trainedexternally}}">
<div id="id-evaluation-timesplitting-container" class="mt-3 {{#trainedexternally}}hidden{{/trainedexternally}}">
{{#str}} selecttimesplittingforevaluation, tool_analytics {{/str}}
<div>
<select id="id-evaluation-timesplitting" name="timesplitting" class="custom-select m-t-1">
<select id="id-evaluation-timesplitting" name="timesplitting" class="custom-select mt-3">
{{#timesplittingmethods}}
<option value="{{id}}">{{text}}</option>
{{/timesplittingmethods}}
@@ -39,7 +39,7 @@
<input class="custom-control-input" type="radio" name="exportoption" id="id-mode-exportmodel" value="exportmodel" checked>
<label class="custom-control-label" for="id-mode-exportmodel">{{#str}} exportmodel, tool_analytics {{/str}}</label>
</div>
<div class="custom-control custom-checkbox m-l-2" id="id-includeweights-container">
<div class="custom-control custom-checkbox ml-5" id="id-includeweights-container">
<input class="custom-control-input" type="checkbox" id="id-includeweights" value="1" checked>
<label class="custom-control-label" for="id-includeweights">{{#str}} exportincludeweights, tool_analytics {{/str}}</label>
</div>
+1 -2
View File
@@ -66,8 +66,6 @@ class tool_analytics_external_testcase extends externallib_advanced_testcase {
/**
* test_potential_contexts description
*
* @expectedException required_capability_exception
*/
public function test_potential_contexts_no_manager() {
$this->resetAfterTest();
@@ -75,6 +73,7 @@ class tool_analytics_external_testcase extends externallib_advanced_testcase {
$user = $this->getDataGenerator()->create_user();
$this->setUser($user);
$this->expectException(required_capability_exception::class);
$this->assertCount(2, \tool_analytics\external::potential_contexts());
}
}
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2020061500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2020060900; // Requires this Moodle version.
$plugin->version = 2020110900; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2020110300; // Requires this Moodle version.
$plugin->component = 'tool_analytics'; // Full name of the plugin (used for diagnostics).
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2020061500;
$plugin->requires = 2020060900;
$plugin->version = 2020110900;
$plugin->requires = 2020110300;
$plugin->component = 'tool_availabilityconditions';
+38 -11
View File
@@ -50,6 +50,9 @@ list($options, $unrecognized) = cli_get_params(
'optimize-runs' => '',
'add-core-features-to-theme' => false,
'axe' => false,
'disable-composer' => false,
'composer-upgrade' => true,
'composer-self-update' => true,
),
array(
'j' => 'parallel',
@@ -65,19 +68,36 @@ $help = "
Behat utilities to initialise behat tests
Usage:
php init.php [--parallel=value [--maxruns=value] [--fromrun=value --torun=value]] [--help]
php init.php [--parallel=value [--maxruns=value] [--fromrun=value --torun=value]]
[--axe] [-o | --optimize-runs] [-a | --add-core-features-to-theme]
[--no-composer-self-update] [--no-composer-upgrade]
[--disable-composer]
[--help]
Options:
-j, --parallel Number of parallel behat run to initialise
-m, --maxruns Max parallel processes to be executed at one time.
--fromrun Execute run starting from (Used for parallel runs on different vms)
--torun Execute run till (Used for parallel runs on different vms)
--axe Include axe accessibility tests
-j, --parallel Number of parallel behat run to initialise
-m, --maxruns Max parallel processes to be executed at one time
--fromrun Execute run starting from (Used for parallel runs on different vms)
--torun Execute run till (Used for parallel runs on different vms)
--axe Include axe accessibility tests
-o, --optimize-runs Split features with specified tags in all parallel runs.
-a, --add-core-features-to-theme Add all core features to specified theme's
-o, --optimize-runs
Split features with specified tags in all parallel runs.
-h, --help Print out this help
-a, --add-core-features-to-theme
Add all core features to specified theme's
--no-composer-self-update
Prevent upgrade of the composer utility using its self-update command
--no-composer-upgrade
Prevent update development dependencies using composer
--disable-composer
A shortcut to disable composer self-update and dependency update
Note: Installation of composer and/or dependencies will still happen as required
-h, --help Print out this help
Example from Moodle root directory:
\$ php admin/tool/behat/cli/init.php --parallel=2
@@ -120,8 +140,15 @@ if ($options['parallel'] && $options['parallel'] > 1) {
$cwd = getcwd();
$output = null;
// If behat dependencies not downloaded then do it first, else symfony/process can't be used.
testing_update_composer_dependencies();
if ($options['disable-composer']) {
// Disable self-update and upgrade easily.
// Note: Installation will still occur regardless of this setting.
$options['composer-self-update'] = false;
$options['composer-upgrade'] = false;
}
// Install and update composer and dependencies as required.
testing_update_composer_dependencies($options['composer-self-update'], $options['composer-upgrade']);
// Check whether the behat test environment needs to be updated.
chdir(__DIR__);
+5 -4
View File
@@ -45,7 +45,7 @@ list($options, $unrecognised) = cli_get_params(
array(
'stop-on-failure' => 0,
'verbose' => false,
'replace' => false,
'replace' => '',
'help' => false,
'tags' => '',
'profile' => '',
@@ -70,7 +70,7 @@ $help = "
Behat utilities to run behat tests in parallel
Usage:
php run.php [--BEHAT_OPTION=\"value\"] [--feature=\"value\"] [--replace] [--fromrun=value --torun=value] [--help]
php run.php [--BEHAT_OPTION=\"value\"] [--feature=\"value\"] [--replace=\"{run}\"] [--fromrun=value --torun=value] [--help]
Options:
--BEHAT_OPTION Any combination of behat option specified in http://behat.readthedocs.org/en/v2.5/guides/6.cli.html
@@ -144,9 +144,10 @@ $extraopts = $unrecognised;
if ($options['profile']) {
$profile = $options['profile'];
// If profile passed is not set, then exit.
// If profile passed is not set, then exit (note we skip if the 'replace' option is found within the 'profile' value).
if (!isset($CFG->behat_config[$profile]) && !isset($CFG->behat_profiles[$profile]) &&
!(isset($options['replace']) && (strpos($options['profile'], $options['replace']) >= 0 ))) {
!($options['replace'] && (strpos($profile, (string) $options['replace']) !== false))) {
echo "Invalid profile passed: " . $profile . PHP_EOL;
exit(1);
}
+4 -1
View File
@@ -187,10 +187,13 @@ if ($options['install']) {
behat_config_manager::set_behat_run_config_value('axe', $options['axe']);
// Enable test mode.
$timestart = microtime(true);
mtrace('Creating Behat configuration ...', '');
behat_util::start_test_mode($options['add-core-features-to-theme'], $options['optimize-runs'], $parallel, $run);
mtrace(' done in ' . round(microtime(true) - $timestart, 2) . ' seconds.');
// Themes are only built in the 'enable' command.
behat_util::build_themes();
behat_util::build_themes(true);
mtrace("Testing environment themes built");
// This is only displayed once for parallel install.
+1
View File
@@ -46,6 +46,7 @@ $string['stepsdefinitionstype'] = 'Type';
$string['theninfo'] = 'Then. Checkings to ensure the outcomes are the expected ones';
$string['unknownexceptioninfo'] = 'There was a problem with Selenium or your browser. Please ensure you are using the latest version of Selenium. Error:';
$string['viewsteps'] = 'Filter';
$string['warndirrootconfigfound'] = 'A configuration file was found at {$a}. This file is not automatically updated and may become stale. We recommend removing this file.';
$string['wheninfo'] = 'When. Action that provokes an event';
$string['wrongbehatsetup'] = 'Something is wrong with the behat setup and so step definitions cannot be listed: <b>{$a->errormsg}</b><br/><br/>Please check:<ul>
<li>$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot are set in config.php with different values from $CFG->dataroot, $CFG->prefix and $CFG->wwwroot.</li>
@@ -156,7 +156,7 @@ Feature: Set up contextual data for tests
And I log in as "user5"
And I should see "You are logged in as"
And I am on "Course 1" course homepage
And I should see "You can not enrol yourself in this course."
And I should see "You cannot enrol yourself in this course."
Scenario: Add modules
Given the following "courses" exist:
@@ -21,5 +21,5 @@ Feature: Transform date time string arguments
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should see "##yesterday##l, j F Y##"
And I should see "##yesterday##%A, %d %B %Y##"
And I log out
@@ -6,14 +6,18 @@ Feature: Edit capabilities
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| username | firstname | lastname |
| teacher1 | Teacher | 1 |
| tutor | Teaching | Assistant |
| student | Student | One |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| user | course | role |
| teacher1 | C1 | editingteacher |
| tutor | C1 | teacher |
| student | C1 | student |
Scenario: Default system capabilities modification
Given I log in as "admin"
@@ -60,3 +64,25 @@ Feature: Edit capabilities
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
And "mod/forum:editanypost" capability has "Prevent" permission
And "mod/forum:addquestion" capability has "Allow" permission
@javascript
Scenario: Edit permissions escapes role names correctly
When I am on the "C1" "Course" page logged in as "admin"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Your word for 'Teacher' | Teacher >= editing |
| Your word for 'Non-editing teacher' | Teacher < "editing" |
| Your word for 'Student' | Studier & 'learner' |
And I press "Save and display"
And I navigate to course participants
Then I should see "Teacher >= editing (Teacher)" in the "Teacher 1" "table_row"
And I should see "Teacher < \"editing\" (Non-editing teacher)" in the "Teaching Assistant" "table_row"
And I should see "Studier & 'learner' (Student)" in the "Student One" "table_row"
And I navigate to "Users > Permissions" in current page administration
And I should see "Teacher >= editing" in the "mod/forum:replypost" "table_row"
And I should see "Teacher < \"editing\"" in the "mod/forum:replypost" "table_row"
And I should see "Studier & 'learner'" in the "mod/forum:replypost" "table_row"
And I follow "Prohibit"
And "Teacher >= editing" "button" in the "Prohibit role" "dialogue" should be visible
And "Teacher < \"editing\"" "button" in the "Prohibit role" "dialogue" should be visible
And "Studier & 'learner'" "button" in the "Prohibit role" "dialogue" should be visible
@@ -48,7 +48,7 @@ Feature: Verify that all form fields values can be get and set
And the "Unenrol users" select box should not contain "Baker"
And the "Unenrol users" select box should not contain "President, Baker"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I press "Create page"
# Text (textarea & editor) & Select (multi-select) - Checking "I set the following fields to these values".
When I set the following fields to these values:
@@ -61,8 +61,7 @@ Feature: Verify that all form fields values can be get and set
# Checkbox - Checking "I set the field" and "The field matches value" ticked.
And I set the field "Force format" to "1"
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "Force format" matches value "1"
@@ -70,8 +69,7 @@ Feature: Verify that all form fields values can be get and set
# Checkbox - Checking "I set the field" and "The field matches value" unticked.
And I set the field "Force format" to ""
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "Force format" matches value ""
@@ -80,8 +78,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Force format | 1 |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the following fields match these values:
@@ -92,8 +89,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Force format | |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the following fields match these values:
@@ -115,20 +111,21 @@ Feature: Verify that all form fields values can be get and set
| Wiki name | Test this one baby |
| Default format | HTML |
And I press "Cancel"
And I am on "Course 1" course homepage
# Radio - Checking "I set the field" and "the field matches value".
And I add a "Choice" to section "1" and I fill the form with:
| Choice name | Test choice name |
| Description | Test choice description |
| Allow choice to be updated | Yes |
| Option 1 | one |
| Option 2 | two |
| Option 3 | three |
And I follow "Test choice name"
And I set the field "one" to "1"
And the following "activity" exists:
| activity | choice |
| course | C1 |
| idnumber | choice1 |
| intro | Test choice description |
| name | Test choice name |
| option | Option 1, Option 2, Option 3 |
| section | 1 |
| allowupdate | 1 |
And I am on the "Test choice name" "choice activity" page
And I set the field "Option 1" to "1"
And I press "Save my choice"
And the field "one" matches value "1"
And the field "two" matches value ""
And the field "Option 1" matches value "1"
And the field "Option 2" matches value ""
# Check if field xpath set/match works.
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
@@ -174,31 +171,23 @@ Feature: Verify that all form fields values can be get and set
And I press "Cancel"
# Advanced checkbox requires real browser to allow uncheck to work. MDL-58681. MDL-55386.
# Advanced checkbox - Checking "I set the field" and "The field matches value" ticked.
And I am on "Course 1" course homepage
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And I set the field "Display description on course page" to "1"
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the field "Display description on course page" matches value "1"
And the field "Display description on course page" does not match value ""
# Advanced checkbox - Checking "I set the field" and "The field matches value" unticked.
And I set the field "Display description on course page" to ""
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the field "Display description on course page" matches value ""
And the field "Display description on course page" does not match value "1"
# Advanced checkbox - Checking "I set the following fields to these values:" and "The following fields match these values" ticked.
And I set the following fields to these values:
| Display description on course page | 1 |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the following fields match these values:
| Display description on course page | 1 |
And the following fields do not match these values:
@@ -207,9 +196,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Display description on course page | |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the following fields match these values:
| Display description on course page | |
And the following fields do not match these values:
@@ -0,0 +1,85 @@
@tool @tool_behat
Feature: Use core page resolvers for the I am on the page steps
In order to write tests correctly
As a developer
I need to have steps which take me straight to a page
Scenario Outline: When I am on an instance
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "course" exists:
| fullname | Economics 101 |
| shortname | ECON101 |
| idnumber | 2021-econ101 |
And the following "activity" exists:
| course | ECON101 |
| activity | forum |
| name | Fundamentals of Economics |
| idnumber | fundamentalsofeconomics |
And I log in as "admin"
When I am on the <identifier> <type> page
Then I should see "<shouldsee>"
Examples:
| description | identifier | type | shouldsee |
| Course Category idnumber | CAT1 | category | Add a new course |
| Course Category name | "Cat 1" | Category | Add a new course |
| Course Full name | "Economics 101" | course | Fundamentals of Economics |
| Course Short name | ECON101 | COURSE | Fundamentals of Economics |
| Course idnumber | "2021-econ101" | Course | Fundamentals of Economics |
| Forum idnumber | fundamentalsofeconomics | Activity | Add a new discussion |
| Generic activity editing | fundamentalsofeconomics | "Activity editing" | Updating: Forum |
| Forum name | "Fundamentals of Economics" | "Forum activity" | Add a new discussion |
| Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Updating: Forum |
| Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun |
| Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun |
Scenario Outline: When I am on an instance logged in as
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "course" exists:
| fullname | Economics 101 |
| shortname | ECON101 |
| idnumber | 2021-econ101 |
And the following "activity" exists:
| course | ECON101 |
| activity | forum |
| name | Fundamentals of Economics |
| idnumber | fundamentalsofeconomics |
When I am on the <identifier> <type> page logged in as admin
Then I should see "<shouldsee>"
Examples:
| description | identifier | type | shouldsee |
| Course Category idnumber | CAT1 | category | Add a new course |
| Course Category name | "Cat 1" | Category | Add a new course |
| Course Full name | "Economics 101" | course | Fundamentals of Economics |
| Course Short name | ECON101 | COURSE | Fundamentals of Economics |
| Course idnumber | "2021-econ101" | Course | Fundamentals of Economics |
| Forum idnumber | fundamentalsofeconomics | Activity | Add a new discussion |
| Generic activity editing | fundamentalsofeconomics | "Activity editing" | Updating: Forum |
| Forum name | "Fundamentals of Economics" | "Forum activity" | Add a new discussion |
| Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Updating: Forum |
| Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun |
| Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun |
Scenario Outline: When I am on a named page
Given I log in as "admin"
When I am on the <identifier> page
Then I should see "<shouldsee>"
Examples:
| description | identifier | shouldsee |
| Admin page | "Admin notifications" | Check for available updates |
| Home page | Homepage | Recently accessed courses |
Scenario Outline: When I am on a named page logged in as
When I am on the <identifier> page logged in as admin
Then I should see "<shouldsee>"
Examples:
| description | identifier | shouldsee |
| Admin page | "Admin notifications" | Check for available updates |
| Home page | Homepage | Recently accessed courses |
@@ -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
@@ -0,0 +1,110 @@
@tool_behat
Feature: Verify that the behat login and logout steps work as expected
In order to use behat login and log out steps
As a test writer
I need to verify that login and logout happen when the steps are used
Scenario: Log in as a user using the step
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
When I log in as "traverst1"
Then I should see "Thomas Travers"
@javascript
Scenario: Log in as a user using the step (javascript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
When I log in as "traverst1"
Then I should see "Thomas Travers"
Scenario: Log out using the log out step
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
And I am logged in as traverst1
When I log out
Then I should not see "Thomas Travers"
And I should see "You are not logged in"
@javascript
Scenario: Log out using the log out step (javascript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
And I am logged in as traverst1
When I log out
Then I should not see "Thomas Travers"
And I should see "You are not logged in"
Scenario: Log in step should automatically log user out if already logged in
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
| emeryj | Jane | Emery |
And I am logged in as traverst1
When I log in as "emeryj"
Then I should not see "Thomas Travers"
And I should see "Jane Emery"
@javascript
Scenario: Log in step should automatically log user out if already logged in (javascript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
| emeryj | Jane | Emery |
And I am logged in as traverst1
When I log in as "emeryj"
Then I should not see "Thomas Travers"
And I should see "Jane Emery"
Scenario: I am on page logged in as should redirect to correct page
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
And the following "course" exists:
| fullname | Life, the Universe, and Everything |
| shortname | hhgttg |
When I am on the hhgttg Course page logged in as traverst1
Then I should see "Thomas Travers"
And I should see "Life, the Universe, and Everything"
@javascript
Scenario: I am on page logged in as should redirect to correct page (javascript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
And the following "course" exists:
| fullname | Life, the Universe, and Everything |
| shortname | hhgttg |
When I am on the hhgttg Course page logged in as traverst1
Then I should see "Thomas Travers"
And I should see "Life, the Universe, and Everything"
Scenario: I am on page logged in as should redirect to correct page when automatically logging a user out
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
| emeryj | Jane | Emery |
And the following "course" exists:
| fullname | Life, the Universe, and Everything |
| shortname | hhgttg |
And I am logged in as emeryj
When I am on the hhgttg Course page logged in as traverst1
Then I should see "Thomas Travers"
And I should see "Life, the Universe, and Everything"
@javascript
Scenario: I am on page logged in as should redirect to correct page when automatically logging a user out (javacript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
| emeryj | Jane | Emery |
And the following "course" exists:
| fullname | Life, the Universe, and Everything |
| shortname | hhgttg |
And I am logged in as emeryj
When I am on the hhgttg Course page logged in as traverst1
Then I should see "Thomas Travers"
And I should see "Life, the Universe, and Everything"
@@ -14,8 +14,6 @@ Feature: Forms manipulation
Then the field "First name" matches value "Field value"
And the "Select a country" select box should contain "Japan"
And the field "New password" matches value "TestPass"
And I take focus off "Update profile" "button"
And I press "Update profile"
@javascript
Scenario: Expand all fieldsets and advanced elements
+15 -15
View File
@@ -87,7 +87,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
/**
* Setup test.
*/
public function setup() {
public function setUp(): void {
global $CFG;
$this->resetAfterTest();
@@ -165,7 +165,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
@@ -219,7 +219,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
@@ -264,7 +264,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
@@ -295,7 +295,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
// Check contexts.
@@ -324,7 +324,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
// Check contexts.
@@ -368,7 +368,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
// Check contexts.
@@ -399,7 +399,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
// Check contexts.
@@ -428,7 +428,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
// Check contexts.
@@ -532,7 +532,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
// Check contexts.
@@ -611,7 +611,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
// Check contexts.
@@ -646,7 +646,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
@@ -662,7 +662,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
@@ -678,7 +678,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
@@ -693,7 +693,7 @@ class tool_behat_manager_util_testcase extends advanced_testcase {
$this->assertCount(count($paths), $suites[$themename]['paths']);
foreach ($paths as $key => $feature) {
$this->assertContains($feature, $suites[$themename]['paths'][$key]);
$this->assertStringContainsString($feature, $suites[$themename]['paths'][$key]);
}
}
}
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2020061500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2020060900; // Requires this Moodle version
$plugin->version = 2020110900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2020110300; // Requires this Moodle version
$plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics)
@@ -60,12 +60,12 @@ class tool_capability_settings_form extends moodleform {
$form->addElement('select', 'roles', get_string('roleslabel', 'tool_capability'), $roles, $attributes);
$form->setType('roles', PARAM_TEXT);
$form->addElement('checkbox', 'onlydiff',
get_string('filters', 'tool_capability'),
get_string('onlydiff', 'tool_capability'));
$filters = [];
$filters[] = $form->createElement('checkbox', 'onlydiff', get_string('onlydiff', 'tool_capability'));
$form->setType('onlydiff', PARAM_BOOL);
$form->addGroup($filters, 'filters', get_string('filters', 'tool_capability'), array('<br>'), false);
$form->addElement('submit', 'submitbutton', get_string('getreport', 'tool_capability'));
}
}
}
+11 -2
View File
@@ -53,7 +53,12 @@ function tool_capability_calculate_role_data($capability, array $roles) {
$sql = 'SELECT DISTINCT con.path, 1
FROM {context} con
JOIN {role_capabilities} rc ON rc.contextid = con.id
WHERE capability = ? '.$sqlroletest;
WHERE capability = ? ' .
$sqlroletest .
// Context path should never be null, but can happen in old database with
// bad data (e.g. a course_module where the corresponding course no longer exists).
// We need to leave these out of the report to prevent errors.
' AND con.path IS NOT NULL';
$relevantpaths = $DB->get_records_sql_menu($sql, $params);
$requiredcontexts = array($systemcontext->id);
foreach ($relevantpaths as $path => $notused) {
@@ -88,6 +93,10 @@ function tool_capability_calculate_role_data($capability, array $roles) {
// Put the role capabilities into the context tree.
foreach ($rolecaps as $rolecap) {
if (!isset($contexts[$rolecap->contextid])) {
// Skip capabilities in orphaned contexts that are not in the tree.
continue;
}
$contexts[$rolecap->contextid]->rolecapabilities[$rolecap->roleid] = $rolecap->permission;
}
@@ -99,4 +108,4 @@ function tool_capability_calculate_role_data($capability, array $roles) {
}
return $contexts;
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ class tool_capability_events_testcase extends advanced_testcase {
/**
* Setup testcase.
*/
public function setUp() {
public function setUp(): void {
$this->setAdminUser();
$this->resetAfterTest();
}
@@ -0,0 +1,88 @@
<?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/>.
/**
* Tests for the capability overview helper functions.
*
* @package tool_capability
* @copyright 2021 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/capability/locallib.php');
/**
* Tests for the capability overview helper functions.
*/
class tool_capability_locallib_testcase extends advanced_testcase {
/**
* Test the function that gets the data - simple case.
*/
public function test_tool_capability_calculate_role_data() {
global $DB;
$data = tool_capability_calculate_role_data('mod/quiz:attempt', get_all_roles());
$systcontext = context_system::instance();
$studentroleid = $DB->get_field('role', 'id', ['shortname' => 'student']);
$this->assertArrayHasKey($systcontext->id, $data);
$this->assertCount(1, $data);
foreach ($data[$systcontext->id]->rolecapabilities as $roleid => $permission) {
if ($roleid == $studentroleid) {
$this->assertEquals(CAP_ALLOW, $permission);
} else {
$this->assertEquals(CAP_INHERIT, $permission);
}
}
}
/**
* Test the function that gets the data - simple case.
*/
public function test_tool_capability_calculate_role_data_orphan_contexts() {
global $DB;
$this->resetAfterTest();
// This simulates a situation that seems to happen sometimes, where
// we end up with contexts with path = NULL in the database.
$systcontext = context_system::instance();
$generator = $this->getDataGenerator();
$course = $generator->create_course();
$coursecontext = context_course::instance($course->id);
$studentroleid = $DB->get_field('role', 'id', ['shortname' => 'student']);
role_change_permission($studentroleid, $coursecontext, 'mod/quiz:attempt', CAP_PREVENT);
// This is where we simulate the breakage.
$DB->set_field('context', 'path', null, ['id' => $coursecontext->id]);
// Now call the function. We mainly just want to know there is no exception.
$data = tool_capability_calculate_role_data('mod/quiz:attempt', get_all_roles());
$this->assertArrayHasKey($systcontext->id, $data);
$this->assertCount(1, $data);
foreach ($data[$systcontext->id]->rolecapabilities as $roleid => $permission) {
if ($roleid == $studentroleid) {
$this->assertEquals(CAP_ALLOW, $permission);
} else {
$this->assertEquals(CAP_INHERIT, $permission);
}
}
}
}
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2020061500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2020060900; // Requires this Moodle version.
$plugin->version = 2020110900; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2020110300; // Requires this Moodle version.
$plugin->component = 'tool_capability'; // Full name of the plugin (used for diagnostics).

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