Compare commits

...

887 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
Peter Burnett c2661e3ffc MDL-70233 cache: Disabled factory now gets writer from parent 2021-04-07 15:32:44 +10:00
Andrew Nicols 76c6d2f225 MDL-71159 output: Do not run content prefetch during install 2021-03-22 13:15:17 +08:00
2686 changed files with 48011 additions and 25433 deletions
-95
View File
@@ -1,95 +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/
lib/zipstream/
lib/php-enum/
lib/http-message/
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,
}
}
]
+3 -2
View File
@@ -20,8 +20,9 @@ jobs:
uses: actions/checkout@v2
- name: Configuring node & npm
shell: bash -l {0}
run: nvm install
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
- name: Installing node stuff
run: npm install
+4
View File
@@ -26,6 +26,7 @@
/cscope.*
/.patches/
/.idea/
.phpstorm.*
/nbproject/
CVS
.DS_Store
@@ -47,3 +48,6 @@ 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.15.0
lts/gallium
-96
View File
@@ -1,96 +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/
lib/zipstream/
lib/php-enum/
lib/http-message/
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/
+1 -1
View File
@@ -10,7 +10,7 @@ language: php
os: linux
dist: xenial
dist: bionic
services:
- mysql
+133 -47
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: {
@@ -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,
};
+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();
+3 -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'));
}
+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);
}
+200
View File
@@ -3163,6 +3163,11 @@
<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">
@@ -3345,6 +3350,11 @@
<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">
@@ -3531,4 +3541,194 @@
</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>
+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();
+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 -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('search'), $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
+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
*/
+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);
@@ -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,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"
@@ -1 +1 @@
YUI.add("moodle-tool_capability-search",function(s,t){var e=function(){e.superclass.constructor.apply(this,arguments)};e.prototype={form:null,select:null,selectoptions:{},input:null,button:null,cancel:null,lastsearch:null,initializer:function(){this.form=s.one("#capability-overview-form"),this.select=this.form.one("select[data-search=capability]"),this.select.setStyle("minWidth",this.select.get("offsetWidth")),this.select.get("options").each(function(t){var e=t.get("value");this.selectoptions[e]=t},this),this.button=this.form.all("input[type=submit]"),this.lastsearch=this.form.one("input[name=search]");var t=s.Node.create('<div id="capabilitysearchui" class="input-group simplesearchform mb-2"data-fieldtype="text"></div>'),e=s.Node.create('<label for="capabilitysearch"><span class="sr-only"'+this.get("strsearch")+"</span></label>");this.cancel=s.Node.create('<a class="btn btn-clear d-none icon-no-margin"><i class="icon fa fa-times fa-fw " aria-hidden="true"></i></a>'),this.input=s.Node.create('<input type="text" class="form-control withclear" placeholder="'+this.get("strsearch")+'"id="capabilitysearch" />'),t.append(e).append(this.input).append(this.cancel),this.select.insert(t,"before"),this.input.on("keyup",this.typed,this),this.select.on("change",this.validate,this),this.cancel.on("click",function(){this.input.set("value",""),this.typed()},this),this.lastsearch&&(this.input.set("value",this.lastsearch.get("value")),this.typed(),this.select.one("option[selected]")&&this.select.set("scrollTop",this.select.one("option[selected]").get("getX"))),this.validate()},validate:function(){this.button.set("disabled",""===this.select.get("value"))},typed:function(){var t,e=this.input.get("value"),s=0,i=null;for(t in this.lastsearch&&this.lastsearch.set("value",e),this.select.all("option").remove(),this.selectoptions)0<=t.indexOf(e)&&(s++,i=this.selectoptions[t],this.select.append(this.selectoptions[t]));0===s?this.input.addClass("error"):(this.input.removeClass("error"),1===s&&i.set("selected",!0)),""!==e?this.cancel.removeClass("d-none"):this.cancel.addClass("d-none"),this.validate()}},s.extend(e,s.Base,e.prototype,{NAME:"tool_capability-search",ATTRS:{strsearch:{}}}),M.tool_capability=M.tool_capability||{},M.tool_capability.init_capability_search=function(t){new e(t)}},"@VERSION@",{requires:["base","node"]});
YUI.add("moodle-tool_capability-search",function(s,t){var e=function(){e.superclass.constructor.apply(this,arguments)};s.extend(e,s.Base,e.prototype={form:null,select:null,selectoptions:{},input:null,button:null,cancel:null,lastsearch:null,initializer:function(){this.form=s.one("#capability-overview-form"),this.select=this.form.one("select[data-search=capability]"),this.select.setStyle("minWidth",this.select.get("offsetWidth")),this.select.get("options").each(function(t){var e=t.get("value");this.selectoptions[e]=t},this),this.button=this.form.all("input[type=submit]"),this.lastsearch=this.form.one("input[name=search]");var t=s.Node.create('<div id="capabilitysearchui" class="input-group simplesearchform mb-2"data-fieldtype="text"></div>'),e=s.Node.create('<label for="capabilitysearch"><span class="sr-only"'+this.get("strsearch")+"</span></label>");this.cancel=s.Node.create('<a class="btn btn-clear d-none icon-no-margin"><i class="icon fa fa-times fa-fw " aria-hidden="true"></i></a>'),this.input=s.Node.create('<input type="text" class="form-control withclear" placeholder="'+this.get("strsearch")+'"id="capabilitysearch" />'),t.append(e).append(this.input).append(this.cancel),this.select.insert(t,"before"),this.input.on("keyup",this.typed,this),this.select.on("change",this.validate,this),this.cancel.on("click",function(){this.input.set("value",""),this.typed()},this),this.lastsearch&&(this.input.set("value",this.lastsearch.get("value")),this.typed(),this.select.one("option[selected]")&&this.select.set("scrollTop",this.select.one("option[selected]").get("getX"))),this.validate()},validate:function(){this.button.set("disabled",""===this.select.get("value"))},typed:function(){var t,e=this.input.get("value"),s=0,i=null;for(t in this.lastsearch&&this.lastsearch.set("value",e),this.select.all("option").remove(),this.selectoptions)0<=t.indexOf(e)&&(s++,i=this.selectoptions[t],this.select.append(this.selectoptions[t]));0===s?this.input.addClass("error"):(this.input.removeClass("error"),1===s&&i.set("selected",!0)),""!==e?this.cancel.removeClass("d-none"):this.cancel.addClass("d-none"),this.validate()}},{NAME:"tool_capability-search",ATTRS:{strsearch:{}}}),M.tool_capability=M.tool_capability||{},M.tool_capability.init_capability_search=function(t){new e(t)}},"@VERSION@",{requires:["base","node"]});
+15 -2
View File
@@ -36,7 +36,7 @@ class tool_customlang_utils {
* Rough number of strings that are being processed during a full checkout.
* This is used to estimate the progress of the checkout.
*/
const ROUGH_NUMBER_OF_STRINGS = 16500;
const ROUGH_NUMBER_OF_STRINGS = 30000;
/** @var array cache of {@link self::list_components()} results */
private static $components = null;
@@ -91,9 +91,22 @@ class tool_customlang_utils {
public static function checkout($lang, progress_bar $progressbar = null) {
global $DB;
// For behat executions we are going to load only a few components in the
// language customisation structures. Using the whole "en" langpack is
// too much slow (leads to Selenium 30s timeouts, especially on slow
// environments) and we don't really need the whole thing for tests. So,
// apart from escaping from the timeouts, we are also saving some good minutes
// in tests. See MDL-70014 and linked issues for more info.
$behatneeded = ['core', 'core_langconfig', 'tool_customlang'];
// make sure that all components are registered
$current = $DB->get_records('tool_customlang_components', null, 'name', 'name,version,id');
foreach (self::list_components() as $component) {
// Filter out unwanted components when running behat.
if (defined('BEHAT_SITE_RUNNING') && !in_array($component, $behatneeded)) {
continue;
}
if (empty($current[$component])) {
$record = new stdclass();
$record->name = $component;
@@ -103,7 +116,7 @@ class tool_customlang_utils {
$record->version = $version;
}
$DB->insert_record('tool_customlang_components', $record);
} elseif ($version = get_component_version($component)) {
} else if ($version = get_component_version($component)) {
if (is_null($current[$component]->version) or ($version > $current[$component]->version)) {
$DB->set_field('tool_customlang_components', 'version', $version, array('id' => $current[$component]->id));
}
@@ -97,7 +97,7 @@
{{#modified}}list-group-item-info{{/modified}}"
>
<div class="row">
<div class="col-sm-4 col-md-2">
<div class="col-sm-4 col-md-2 text-break">
<div class="d-md-none">
<strong>{{#str}}headingcomponent, tool_customlang{{/str}}</strong>
</div>
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/add_category",["jquery","core/str","core/ajax","core/notification","core/modal_factory","core/modal_events","core/fragment"],function(a,b,c,d,e,f,g){var h={CATEGORY_LINK:"[data-add-element=\"category\"]"},i=function(a){this.contextId=a;this.strings=b.get_strings([{key:"addcategory",component:"tool_dataprivacy"},{key:"save",component:"admin"}]);this.registerEventListeners()};i.prototype.contextId=0;i.prototype.strings=0;i.prototype.registerEventListeners=function(){var b=a(h.CATEGORY_LINK);b.on("click",function(){return this.strings.then(function(a){e.create({type:e.types.SAVE_CANCEL,title:a[0],body:""},b).done(function(b){this.setupFormModal(b,a[1])}.bind(this))}.bind(this)).fail(d.exception)}.bind(this))};i.prototype.getBody=function(a){var b=null;if("undefined"!=typeof a){b={jsonformdata:JSON.stringify(a)}}return g.loadFragment("tool_dataprivacy","addcategory_form",this.contextId,b)};i.prototype.setupFormModal=function(a,b){a.setLarge();a.setSaveButtonText(b);a.getRoot().on(f.hidden,this.destroy.bind(this));a.setBody(this.getBody());a.getRoot().on(f.save,this.submitForm.bind(this));a.getRoot().on("submit","form",this.submitFormAjax.bind(this));this.modal=a;a.show()};i.prototype.submitForm=function(a){a.preventDefault();this.modal.getRoot().find("form").submit()};i.prototype.submitFormAjax=function(a){a.preventDefault();var b=this.modal.getRoot().find("form").serialize();c.call([{methodname:"tool_dataprivacy_create_category_form",args:{jsonformdata:JSON.stringify(b)},done:function(a){if(a.validationerrors){this.modal.setBody(this.getBody(b))}else{this.close()}}.bind(this),fail:d.exception}])};i.prototype.close=function(){this.destroy();document.location.reload()};i.prototype.destroy=function(){Y.use("moodle-core-formchangechecker",function(){M.core_formchangechecker.reset_form_dirty_state()});this.modal.destroy()};i.prototype.removeListeners=function(){a(h.CATEGORY_LINK).off("click")};return{getInstance:function getInstance(a){return new i(a)}}});
//# sourceMappingURL=add_category.min.js.map
/**
* Module to add categories.
*
* @module tool_dataprivacy/add_category
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/add_category",["jquery","core/str","core/ajax","core/notification","core/modal_factory","core/modal_events","core/fragment"],(function($,Str,Ajax,Notification,ModalFactory,ModalEvents,Fragment){var SELECTORS_CATEGORY_LINK='[data-add-element="category"]',AddCategory=function(contextId){this.contextId=contextId;this.strings=Str.get_strings([{key:"addcategory",component:"tool_dataprivacy"},{key:"save",component:"admin"}]),this.registerEventListeners()};return AddCategory.prototype.contextId=0,AddCategory.prototype.strings=0,AddCategory.prototype.registerEventListeners=function(){var trigger=$(SELECTORS_CATEGORY_LINK);trigger.on("click",function(){return this.strings.then(function(strings){ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL,title:strings[0],body:""},trigger).done(function(modal){this.setupFormModal(modal,strings[1])}.bind(this))}.bind(this)).fail(Notification.exception)}.bind(this))},AddCategory.prototype.getBody=function(formdata){var params=null;return void 0!==formdata&&(params={jsonformdata:JSON.stringify(formdata)}),Fragment.loadFragment("tool_dataprivacy","addcategory_form",this.contextId,params)},AddCategory.prototype.setupFormModal=function(modal,saveText){modal.setLarge(),modal.setSaveButtonText(saveText),modal.getRoot().on(ModalEvents.hidden,this.destroy.bind(this)),modal.setBody(this.getBody()),modal.getRoot().on(ModalEvents.save,this.submitForm.bind(this)),modal.getRoot().on("submit","form",this.submitFormAjax.bind(this)),this.modal=modal,modal.show()},AddCategory.prototype.submitForm=function(e){e.preventDefault(),this.modal.getRoot().find("form").submit()},AddCategory.prototype.submitFormAjax=function(e){e.preventDefault();var formData=this.modal.getRoot().find("form").serialize();Ajax.call([{methodname:"tool_dataprivacy_create_category_form",args:{jsonformdata:JSON.stringify(formData)},done:function(data){data.validationerrors?this.modal.setBody(this.getBody(formData)):this.close()}.bind(this),fail:Notification.exception}])},AddCategory.prototype.close=function(){this.destroy(),document.location.reload()},AddCategory.prototype.destroy=function(){Y.use("moodle-core-formchangechecker",(function(){M.core_formchangechecker.reset_form_dirty_state()})),this.modal.destroy()},AddCategory.prototype.removeListeners=function(){$(SELECTORS_CATEGORY_LINK).off("click")},{getInstance:function(contextId){return new AddCategory(contextId)}}}));
//# sourceMappingURL=add_category.min.js.map
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/add_purpose",["jquery","core/str","core/ajax","core/notification","core/modal_factory","core/modal_events","core/fragment"],function(a,b,c,d,e,f,g){var h={PURPOSE_LINK:"[data-add-element=\"purpose\"]"},i=function(a){this.contextId=a;this.strings=b.get_strings([{key:"addpurpose",component:"tool_dataprivacy"},{key:"save",component:"admin"}]);this.registerEventListeners()};i.prototype.contextId=0;i.prototype.strings=0;i.prototype.registerEventListeners=function(){var b=a(h.PURPOSE_LINK);b.on("click",function(){return this.strings.then(function(a){e.create({type:e.types.SAVE_CANCEL,title:a[0],body:""},b).done(function(b){this.setupFormModal(b,a[1])}.bind(this))}.bind(this)).fail(d.exception)}.bind(this))};i.prototype.getBody=function(a){var b=null;if("undefined"!=typeof a){b={jsonformdata:JSON.stringify(a)}}return g.loadFragment("tool_dataprivacy","addpurpose_form",this.contextId,b)};i.prototype.setupFormModal=function(a,b){a.setLarge();a.setSaveButtonText(b);a.getRoot().on(f.hidden,this.destroy.bind(this));a.setBody(this.getBody());a.getRoot().on(f.save,this.submitForm.bind(this));a.getRoot().on("submit","form",this.submitFormAjax.bind(this));this.modal=a;a.show()};i.prototype.submitForm=function(a){a.preventDefault();this.modal.getRoot().find("form").submit()};i.prototype.submitFormAjax=function(a){a.preventDefault();var b=this.modal.getRoot().find("form").serialize();c.call([{methodname:"tool_dataprivacy_create_purpose_form",args:{jsonformdata:JSON.stringify(b)},done:function(a){if(a.validationerrors){this.modal.setBody(this.getBody(b))}else{this.close()}}.bind(this),fail:d.exception}])};i.prototype.close=function(){this.destroy();document.location.reload()};i.prototype.destroy=function(){Y.use("moodle-core-formchangechecker",function(){M.core_formchangechecker.reset_form_dirty_state()});this.modal.destroy()};i.prototype.removeListeners=function(){a(h.PURPOSE_LINK).off("click")};return{getInstance:function getInstance(a){return new i(a)}}});
//# sourceMappingURL=add_purpose.min.js.map
/**
* Module to add purposes.
*
* @module tool_dataprivacy/add_purpose
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/add_purpose",["jquery","core/str","core/ajax","core/notification","core/modal_factory","core/modal_events","core/fragment"],(function($,Str,Ajax,Notification,ModalFactory,ModalEvents,Fragment){var SELECTORS_PURPOSE_LINK='[data-add-element="purpose"]',AddPurpose=function(contextId){this.contextId=contextId;this.strings=Str.get_strings([{key:"addpurpose",component:"tool_dataprivacy"},{key:"save",component:"admin"}]),this.registerEventListeners()};return AddPurpose.prototype.contextId=0,AddPurpose.prototype.strings=0,AddPurpose.prototype.registerEventListeners=function(){var trigger=$(SELECTORS_PURPOSE_LINK);trigger.on("click",function(){return this.strings.then(function(strings){ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL,title:strings[0],body:""},trigger).done(function(modal){this.setupFormModal(modal,strings[1])}.bind(this))}.bind(this)).fail(Notification.exception)}.bind(this))},AddPurpose.prototype.getBody=function(formdata){var params=null;return void 0!==formdata&&(params={jsonformdata:JSON.stringify(formdata)}),Fragment.loadFragment("tool_dataprivacy","addpurpose_form",this.contextId,params)},AddPurpose.prototype.setupFormModal=function(modal,saveText){modal.setLarge(),modal.setSaveButtonText(saveText),modal.getRoot().on(ModalEvents.hidden,this.destroy.bind(this)),modal.setBody(this.getBody()),modal.getRoot().on(ModalEvents.save,this.submitForm.bind(this)),modal.getRoot().on("submit","form",this.submitFormAjax.bind(this)),this.modal=modal,modal.show()},AddPurpose.prototype.submitForm=function(e){e.preventDefault(),this.modal.getRoot().find("form").submit()},AddPurpose.prototype.submitFormAjax=function(e){e.preventDefault();var formData=this.modal.getRoot().find("form").serialize();Ajax.call([{methodname:"tool_dataprivacy_create_purpose_form",args:{jsonformdata:JSON.stringify(formData)},done:function(data){data.validationerrors?this.modal.setBody(this.getBody(formData)):this.close()}.bind(this),fail:Notification.exception}])},AddPurpose.prototype.close=function(){this.destroy(),document.location.reload()},AddPurpose.prototype.destroy=function(){Y.use("moodle-core-formchangechecker",(function(){M.core_formchangechecker.reset_form_dirty_state()})),this.modal.destroy()},AddPurpose.prototype.removeListeners=function(){$(SELECTORS_PURPOSE_LINK).off("click")},{getInstance:function(contextId){return new AddPurpose(contextId)}}}));
//# sourceMappingURL=add_purpose.min.js.map
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/categoriesactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var g={DELETE:"[data-action=\"deletecategory\"]"},h=function(){this.registerEvents()};h.prototype.registerEvents=function(){a(g.DELETE).click(function(g){g.preventDefault();var h=a(this).data("id"),i=a(this).data("name");d.get_strings([{key:"deletecategory",component:"tool_dataprivacy"},{key:"deletecategorytext",component:"tool_dataprivacy",param:i},{key:"delete"}]).then(function(d){var g=d[0],i=d[1],j=d[2];return e.create({title:g,body:i,type:e.types.SAVE_CANCEL}).then(function(d){d.setSaveButtonText(j);d.getRoot().on(f.save,function(){b.call([{methodname:"tool_dataprivacy_delete_category",args:{id:h}}])[0].done(function(b){if(b.result){a("tr[data-categoryid=\""+h+"\"]").remove()}else{c.addNotification({message:b.warnings[0].message,type:"error"})}}).fail(c.exception)});d.getRoot().on(f.hidden,function(){d.destroy()});return d})}).done(function(a){a.show()}).fail(c.exception)})};return{init:function init(){return new h}}});
//# sourceMappingURL=categoriesactions.min.js.map
/**
* AMD module for categories actions.
*
* @module tool_dataprivacy/categoriesactions
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/categoriesactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],(function($,Ajax,Notification,Str,ModalFactory,ModalEvents){var ACTIONS_DELETE='[data-action="deletecategory"]',CategoriesActions=function(){this.registerEvents()};return CategoriesActions.prototype.registerEvents=function(){$(ACTIONS_DELETE).click((function(e){e.preventDefault();var id=$(this).data("id"),stringkeys=[{key:"deletecategory",component:"tool_dataprivacy"},{key:"deletecategorytext",component:"tool_dataprivacy",param:$(this).data("name")},{key:"delete"}];Str.get_strings(stringkeys).then((function(langStrings){var title=langStrings[0],confirmMessage=langStrings[1],buttonText=langStrings[2];return ModalFactory.create({title:title,body:confirmMessage,type:ModalFactory.types.SAVE_CANCEL}).then((function(modal){return modal.setSaveButtonText(buttonText),modal.getRoot().on(ModalEvents.save,(function(){var request={methodname:"tool_dataprivacy_delete_category",args:{id:id}};Ajax.call([request])[0].done((function(data){data.result?$('tr[data-categoryid="'+id+'"]').remove():Notification.addNotification({message:data.warnings[0].message,type:"error"})})).fail(Notification.exception)})),modal.getRoot().on(ModalEvents.hidden,(function(){modal.destroy()})),modal}))})).done((function(modal){modal.show()})).fail(Notification.exception)}))},{init:function(){return new CategoriesActions}}}));
//# sourceMappingURL=categoriesactions.min.js.map
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/data_deletion",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var h={MARK_FOR_DELETION:"[data-action=\"markfordeletion\"]",SELECT_ALL:"[data-action=\"selectall\"]"},i={SELECTCONTEXT:".selectcontext"},j=function(){this.registerEvents()};j.prototype.registerEvents=function(){a(h.MARK_FOR_DELETION).click(function(b){b.preventDefault();var c=[];a(i.SELECTCONTEXT).each(function(){var b=a(this);if(b.is(":checked")){c.push(b.val())}});g(c)});a(h.SELECT_ALL).change(function(b){b.preventDefault();var c=a(this);if(c.is(":checked")){a(i.SELECTCONTEXT).attr("checked","checked")}else{a(i.SELECTCONTEXT).removeAttr("checked")}})};function g(a){var g="";d.get_strings([{key:"confirm",component:"moodle"},{key:"confirmcontextdeletion",component:"tool_dataprivacy"}]).then(function(a){g=a[0];var b=a[1];return e.create({title:g,body:b,type:e.types.SAVE_CANCEL})}).then(function(d){d.setSaveButtonText(g);d.getRoot().on(f.save,function(){b.call([{methodname:"tool_dataprivacy_confirm_contexts_for_deletion",args:{ids:a}}])[0].done(function(a){if(a.result){window.location.reload()}else{c.addNotification({message:a.warnings[0].message,type:"error"})}}).fail(c.exception)});d.getRoot().on(f.hidden,function(){d.destroy()});return d}).done(function(a){a.show()}).fail(c.exception)}return j});
//# sourceMappingURL=data_deletion.min.js.map
/**
* Request actions.
*
* @module tool_dataprivacy/data_deletion
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/data_deletion",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],(function($,Ajax,Notification,Str,ModalFactory,ModalEvents){var ACTIONS_MARK_FOR_DELETION='[data-action="markfordeletion"]',ACTIONS_SELECT_ALL='[data-action="selectall"]',SELECTORS_SELECTCONTEXT=".selectcontext",DataDeletionActions=function(){this.registerEvents()};return DataDeletionActions.prototype.registerEvents=function(){$(ACTIONS_MARK_FOR_DELETION).click((function(e){e.preventDefault();var ids,keys,wsfunction,modalTitle,selectedIds=[];$(SELECTORS_SELECTCONTEXT).each((function(){var checkbox=$(this);checkbox.is(":checked")&&selectedIds.push(checkbox.val())})),ids=selectedIds,keys=[{key:"confirm",component:"moodle"},{key:"confirmcontextdeletion",component:"tool_dataprivacy"}],wsfunction="tool_dataprivacy_confirm_contexts_for_deletion",modalTitle="",Str.get_strings(keys).then((function(langStrings){modalTitle=langStrings[0];var confirmMessage=langStrings[1];return ModalFactory.create({title:modalTitle,body:confirmMessage,type:ModalFactory.types.SAVE_CANCEL})})).then((function(modal){return modal.setSaveButtonText(modalTitle),modal.getRoot().on(ModalEvents.save,(function(){var request={methodname:wsfunction,args:{ids:ids}};Ajax.call([request])[0].done((function(data){data.result?window.location.reload():Notification.addNotification({message:data.warnings[0].message,type:"error"})})).fail(Notification.exception)})),modal.getRoot().on(ModalEvents.hidden,(function(){modal.destroy()})),modal})).done((function(modal){modal.show()})).fail(Notification.exception)})),$(ACTIONS_SELECT_ALL).change((function(e){e.preventDefault(),$(this).is(":checked")?$(SELECTORS_SELECTCONTEXT).attr("checked","checked"):$(SELECTORS_SELECTCONTEXT).removeAttr("checked")}))},DataDeletionActions}));
//# sourceMappingURL=data_deletion.min.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/data_request_modal",["jquery","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","tool_dataprivacy/events"],function(a,b,c,d,e,f){var g=!1,h={APPROVE_BUTTON:"[data-action=\"approve\"]",DENY_BUTTON:"[data-action=\"deny\"]",COMPLETE_BUTTON:"[data-action=\"complete\"]"},i=function(a){d.call(this,a)};i.TYPE="tool_dataprivacy-data_request";i.prototype=Object.create(d.prototype);i.prototype.constructor=i;i.prototype.registerEventListeners=function(){d.prototype.registerEventListeners.call(this);this.getModal().on(c.events.activate,h.APPROVE_BUTTON,function(b,c){var d=a.Event(f.approve);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){this.hide();c.originalEvent.preventDefault()}}.bind(this));this.getModal().on(c.events.activate,h.DENY_BUTTON,function(b,c){var d=a.Event(f.deny);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){this.hide();c.originalEvent.preventDefault()}}.bind(this));this.getModal().on(c.events.activate,h.COMPLETE_BUTTON,function(b,c){var d=a.Event(f.complete);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){this.hide();c.originalEvent.preventDefault()}}.bind(this))};if(!g){e.register(i.TYPE,i,"tool_dataprivacy/data_request_modal");g=!0}return i});
//# sourceMappingURL=data_request_modal.min.js.map
/**
* Request actions.
*
* @module tool_dataprivacy/data_request_modal
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/data_request_modal",["jquery","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","tool_dataprivacy/events"],(function($,Notification,CustomEvents,Modal,ModalRegistry,DataPrivacyEvents){var registered=!1,SELECTORS_APPROVE_BUTTON='[data-action="approve"]',SELECTORS_DENY_BUTTON='[data-action="deny"]',SELECTORS_COMPLETE_BUTTON='[data-action="complete"]',ModalDataRequest=function(root){Modal.call(this,root)};return ModalDataRequest.TYPE="tool_dataprivacy-data_request",(ModalDataRequest.prototype=Object.create(Modal.prototype)).constructor=ModalDataRequest,ModalDataRequest.prototype.registerEventListeners=function(){Modal.prototype.registerEventListeners.call(this),this.getModal().on(CustomEvents.events.activate,SELECTORS_APPROVE_BUTTON,function(e,data){var approveEvent=$.Event(DataPrivacyEvents.approve);this.getRoot().trigger(approveEvent,this),approveEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault())}.bind(this)),this.getModal().on(CustomEvents.events.activate,SELECTORS_DENY_BUTTON,function(e,data){var denyEvent=$.Event(DataPrivacyEvents.deny);this.getRoot().trigger(denyEvent,this),denyEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault())}.bind(this)),this.getModal().on(CustomEvents.events.activate,SELECTORS_COMPLETE_BUTTON,function(e,data){var completeEvent=$.Event(DataPrivacyEvents.complete);this.getRoot().trigger(completeEvent,this),completeEvent.isDefaultPrevented()||(this.hide(),data.originalEvent.preventDefault())}.bind(this))},registered||(ModalRegistry.register(ModalDataRequest.TYPE,ModalDataRequest,"tool_dataprivacy/data_request_modal"),registered=!0),ModalDataRequest}));
//# sourceMappingURL=data_request_modal.min.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/effective_retention_period",["jquery"],function(a){var b={PURPOSE_SELECT:"#id_purposeid",RETENTION_FIELD:"#fitem_id_retention_current [data-fieldtype=static]"},c=function(a){this.purposeRetentionPeriods=a;this.registerEventListeners()},d=function(){a(b.PURPOSE_SELECT).off("change")};c.prototype.purposeRetentionPeriods=[];c.prototype.registerEventListeners=function(){a(b.PURPOSE_SELECT).on("change",function(c){var d=a(c.currentTarget).val(),e=this.purposeRetentionPeriods[d];a(b.RETENTION_FIELD).text(e)}.bind(this))};return{init:function init(a){d();return new c(a)}}});
//# sourceMappingURL=effective_retention_period.min.js.map
/**
* Module to update the displayed retention period.
*
* @module tool_dataprivacy/effective_retention_period
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/effective_retention_period",["jquery"],(function($){var SELECTORS_PURPOSE_SELECT="#id_purposeid",SELECTORS_RETENTION_FIELD="#fitem_id_retention_current [data-fieldtype=static]",EffectiveRetentionPeriod=function(purposeRetentionPeriods){this.purposeRetentionPeriods=purposeRetentionPeriods,this.registerEventListeners()};return EffectiveRetentionPeriod.prototype.purposeRetentionPeriods=[],EffectiveRetentionPeriod.prototype.registerEventListeners=function(){$(SELECTORS_PURPOSE_SELECT).on("change",function(ev){var selected=$(ev.currentTarget).val(),selectedPurpose=this.purposeRetentionPeriods[selected];$(SELECTORS_RETENTION_FIELD).text(selectedPurpose)}.bind(this))},{init:function(purposeRetentionPeriods){return $(SELECTORS_PURPOSE_SELECT).off("change"),new EffectiveRetentionPeriod(purposeRetentionPeriods)}}}));
//# sourceMappingURL=effective_retention_period.min.js.map
@@ -1 +1 @@
{"version":3,"sources":["../src/effective_retention_period.js"],"names":["define","$","SELECTORS","PURPOSE_SELECT","RETENTION_FIELD","EffectiveRetentionPeriod","purposeRetentionPeriods","registerEventListeners","removeListeners","off","prototype","on","ev","selected","currentTarget","val","selectedPurpose","text","bind","init"],"mappings":"AAuBAA,OAAM,+CAAC,CAAC,QAAD,CAAD,CACF,SAASC,CAAT,CAAY,IAEJC,CAAAA,CAAS,CAAG,CACZC,cAAc,CAAE,eADJ,CAEZC,eAAe,CAAE,qDAFL,CAFR,CAYJC,CAAwB,CAAG,SAASC,CAAT,CAAkC,CAC7D,KAAKA,uBAAL,CAA+BA,CAA/B,CACA,KAAKC,sBAAL,EACH,CAfO,CAsBJC,CAAe,CAAG,UAAW,CAC7BP,CAAC,CAACC,CAAS,CAACC,cAAX,CAAD,CAA4BM,GAA5B,CAAgC,QAAhC,CACH,CAxBO,CA8BRJ,CAAwB,CAACK,SAAzB,CAAmCJ,uBAAnC,CAA6D,EAA7D,CAOAD,CAAwB,CAACK,SAAzB,CAAmCH,sBAAnC,CAA4D,UAAW,CAEnEN,CAAC,CAACC,CAAS,CAACC,cAAX,CAAD,CAA4BQ,EAA5B,CAA+B,QAA/B,CAAyC,SAASC,CAAT,CAAa,IAC9CC,CAAAA,CAAQ,CAAGZ,CAAC,CAACW,CAAE,CAACE,aAAJ,CAAD,CAAoBC,GAApB,EADmC,CAE9CC,CAAe,CAAG,KAAKV,uBAAL,CAA6BO,CAA7B,CAF4B,CAGlDZ,CAAC,CAACC,CAAS,CAACE,eAAX,CAAD,CAA6Ba,IAA7B,CAAkCD,CAAlC,CACH,CAJwC,CAIvCE,IAJuC,CAIlC,IAJkC,CAAzC,CAKH,CAPD,CASA,MAAwE,CACpEC,IAAI,CAAE,cAASb,CAAT,CAAkC,CAEpCE,CAAe,GACf,MAAO,IAAIH,CAAAA,CAAJ,CAA6BC,CAA7B,CACV,CALmE,CAO3E,CAtDC,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 * Module to update the displayed retention period.\n *\n * @module tool_dataprivacy/effective_retention_period\n * @package tool_dataprivacy\n * @copyright 2018 David Monllao\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery'],\n function($) {\n\n var SELECTORS = {\n PURPOSE_SELECT: '#id_purposeid',\n RETENTION_FIELD: '#fitem_id_retention_current [data-fieldtype=static]',\n };\n\n /**\n * Constructor for the retention period display.\n *\n * @param {Array} purposeRetentionPeriods Associative array of purposeids with effective retention period at this context\n */\n var EffectiveRetentionPeriod = function(purposeRetentionPeriods) {\n this.purposeRetentionPeriods = purposeRetentionPeriods;\n this.registerEventListeners();\n };\n\n /**\n * Removes the current 'change' listeners.\n *\n * Useful when a new form is loaded.\n */\n var removeListeners = function() {\n $(SELECTORS.PURPOSE_SELECT).off('change');\n };\n\n /**\n * @var {Array} purposeRetentionPeriods\n * @private\n */\n EffectiveRetentionPeriod.prototype.purposeRetentionPeriods = [];\n\n /**\n * Add purpose change listeners.\n *\n * @method registerEventListeners\n */\n EffectiveRetentionPeriod.prototype.registerEventListeners = function() {\n\n $(SELECTORS.PURPOSE_SELECT).on('change', function(ev) {\n var selected = $(ev.currentTarget).val();\n var selectedPurpose = this.purposeRetentionPeriods[selected];\n $(SELECTORS.RETENTION_FIELD).text(selectedPurpose);\n }.bind(this));\n };\n\n return /** @alias module:tool_dataprivacy/effective_retention_period */ {\n init: function(purposeRetentionPeriods) {\n // Remove previously attached listeners.\n removeListeners();\n return new EffectiveRetentionPeriod(purposeRetentionPeriods);\n }\n };\n }\n);\n\n"],"file":"effective_retention_period.min.js"}
{"version":3,"file":"effective_retention_period.min.js","sources":["../src/effective_retention_period.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 * Module to update the displayed retention period.\n *\n * @module tool_dataprivacy/effective_retention_period\n * @copyright 2018 David Monllao\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery'],\n function($) {\n\n var SELECTORS = {\n PURPOSE_SELECT: '#id_purposeid',\n RETENTION_FIELD: '#fitem_id_retention_current [data-fieldtype=static]',\n };\n\n /**\n * Constructor for the retention period display.\n *\n * @param {Array} purposeRetentionPeriods Associative array of purposeids with effective retention period at this context\n */\n var EffectiveRetentionPeriod = function(purposeRetentionPeriods) {\n this.purposeRetentionPeriods = purposeRetentionPeriods;\n this.registerEventListeners();\n };\n\n /**\n * Removes the current 'change' listeners.\n *\n * Useful when a new form is loaded.\n */\n var removeListeners = function() {\n $(SELECTORS.PURPOSE_SELECT).off('change');\n };\n\n /**\n * @var {Array} purposeRetentionPeriods\n * @private\n */\n EffectiveRetentionPeriod.prototype.purposeRetentionPeriods = [];\n\n /**\n * Add purpose change listeners.\n *\n * @method registerEventListeners\n */\n EffectiveRetentionPeriod.prototype.registerEventListeners = function() {\n\n $(SELECTORS.PURPOSE_SELECT).on('change', function(ev) {\n var selected = $(ev.currentTarget).val();\n var selectedPurpose = this.purposeRetentionPeriods[selected];\n $(SELECTORS.RETENTION_FIELD).text(selectedPurpose);\n }.bind(this));\n };\n\n return /** @alias module:tool_dataprivacy/effective_retention_period */ {\n init: function(purposeRetentionPeriods) {\n // Remove previously attached listeners.\n removeListeners();\n return new EffectiveRetentionPeriod(purposeRetentionPeriods);\n }\n };\n }\n);\n\n"],"names":["define","$","SELECTORS","EffectiveRetentionPeriod","purposeRetentionPeriods","registerEventListeners","prototype","on","ev","selected","currentTarget","val","selectedPurpose","this","text","bind","init","off"],"mappings":";;;;;;;AAsBAA,qDAAO,CAAC,WACJ,SAASC,OAEDC,yBACgB,gBADhBA,0BAEiB,sDAQjBC,yBAA2B,SAASC,8BAC/BA,wBAA0BA,6BAC1BC,iCAgBTF,yBAAyBG,UAAUF,wBAA0B,GAO7DD,yBAAyBG,UAAUD,uBAAyB,WAExDJ,EAAEC,0BAA0BK,GAAG,SAAU,SAASC,QAC1CC,SAAWR,EAAEO,GAAGE,eAAeC,MAC/BC,gBAAkBC,KAAKT,wBAAwBK,UACnDR,EAAEC,2BAA2BY,KAAKF,kBACpCG,KAAKF,QAG6D,CACpEG,KAAM,SAASZ,gCAxBfH,EAAEC,0BAA0Be,IAAI,UA2BrB,IAAId,yBAAyBC"}
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/events",[],function(){return{approve:"tool_dataprivacy-data_request:approve",bulkApprove:"tool_dataprivacy-data_request:bulk_approve",deny:"tool_dataprivacy-data_request:deny",bulkDeny:"tool_dataprivacy-data_request:bulk_deny",complete:"tool_dataprivacy-data_request:complete"}});
//# sourceMappingURL=events.min.js.map
/**
* Contain the events the data privacy tool can fire.
*
* @module tool_dataprivacy/events
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/events",[],(function(){return{approve:"tool_dataprivacy-data_request:approve",bulkApprove:"tool_dataprivacy-data_request:bulk_approve",deny:"tool_dataprivacy-data_request:deny",bulkDeny:"tool_dataprivacy-data_request:bulk_deny",complete:"tool_dataprivacy-data_request:complete"}}));
//# sourceMappingURL=events.min.js.map
@@ -1 +1 @@
{"version":3,"sources":["../src/events.js"],"names":["define","approve","bulkApprove","deny","bulkDeny","complete"],"mappings":"AAwBAA,OAAM,2BAAC,EAAD,CAAK,UAAW,CAClB,MAAO,CACHC,OAAO,CAAE,uCADN,CAEHC,WAAW,CAAE,4CAFV,CAGHC,IAAI,CAAE,oCAHH,CAIHC,QAAQ,CAAE,yCAJP,CAKHC,QAAQ,CAAE,wCALP,CAOV,CARK,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 * Contain the events the data privacy tool can fire.\n *\n * @module tool_dataprivacy/events\n * @class events\n * @package tool_dataprivacy\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([], function() {\n return {\n approve: 'tool_dataprivacy-data_request:approve',\n bulkApprove: 'tool_dataprivacy-data_request:bulk_approve',\n deny: 'tool_dataprivacy-data_request:deny',\n bulkDeny: 'tool_dataprivacy-data_request:bulk_deny',\n complete: 'tool_dataprivacy-data_request:complete'\n };\n});\n"],"file":"events.min.js"}
{"version":3,"file":"events.min.js","sources":["../src/events.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 * Contain the events the data privacy tool can fire.\n *\n * @module tool_dataprivacy/events\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([], function() {\n return {\n approve: 'tool_dataprivacy-data_request:approve',\n bulkApprove: 'tool_dataprivacy-data_request:bulk_approve',\n deny: 'tool_dataprivacy-data_request:deny',\n bulkDeny: 'tool_dataprivacy-data_request:bulk_deny',\n complete: 'tool_dataprivacy-data_request:complete'\n };\n});\n"],"names":["define","approve","bulkApprove","deny","bulkDeny","complete"],"mappings":";;;;;;;AAsBAA,iCAAO,IAAI,iBACA,CACHC,QAAS,wCACTC,YAAa,6CACbC,KAAM,qCACNC,SAAU,0CACVC,SAAU"}
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/expand_contract",["jquery","core/url","core/str"],function(a,b,c){var d=a("<img alt=\"\" src=\""+b.imageUrl("t/expanded")+"\"/>"),e=a("<img alt=\"\" src=\""+b.imageUrl("t/collapsed")+"\"/>"),f={EXPAND:"fa-caret-right",COLLAPSE:"fa-caret-down"};return{expandCollapse:function expandCollapse(a,b){if(a.hasClass("hide")){a.removeClass("hide");a.addClass("visible");a.attr("aria-expanded",!0);b.find(":header i.fa").removeClass(f.EXPAND);b.find(":header i.fa").addClass(f.COLLAPSE);b.find(":header img.icon").attr("src",d.attr("src"))}else{a.removeClass("visible");a.addClass("hide");a.attr("aria-expanded",!1);b.find(":header i.fa").removeClass(f.COLLAPSE);b.find(":header i.fa").addClass(f.EXPAND);b.find(":header img.icon").attr("src",e.attr("src"))}},expandCollapseAll:function expandCollapseAll(b){var g="visible"==b?"hide":"visible",h="visible"==b?!0:!1,i="visible"==b?f.EXPAND:f.COLLAPSE,j="visible"==b?f.COLLAPSE:f.EXPAND,k="visible"==b?d.attr("src"):e.attr("src");a("."+g).each(function(){a(this).removeClass(g);a(this).addClass(b);a(this).attr("aria-expanded",h)});a(".tool_dataprivacy-expand-all").data("visibilityState",g);c.get_string(g,"tool_dataprivacy").then(function(b){a(".tool_dataprivacy-expand-all").html(b)}).catch(Notification.exception);a(":header i.fa").each(function(){a(this).removeClass(i);a(this).addClass(j)});a(":header img.icon").each(function(){a(this).attr("src",k)})}}});
//# sourceMappingURL=expand_contract.min.js.map
/**
* Potential user selector module.
*
* @module tool_dataprivacy/expand_contract
* @copyright 2018 Adrian Greeve
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/expand_contract",["jquery","core/url","core/str"],(function($,url,str){var expandedImage=$('<img alt="" src="'+url.imageUrl("t/expanded")+'"/>'),collapsedImage=$('<img alt="" src="'+url.imageUrl("t/collapsed")+'"/>'),CLASSES_EXPAND="fa-caret-right",CLASSES_COLLAPSE="fa-caret-down";return{expandCollapse:function(targetnode,thisnode){targetnode.hasClass("hide")?(targetnode.removeClass("hide"),targetnode.addClass("visible"),targetnode.attr("aria-expanded",!0),thisnode.find(":header i.fa").removeClass(CLASSES_EXPAND),thisnode.find(":header i.fa").addClass(CLASSES_COLLAPSE),thisnode.find(":header img.icon").attr("src",expandedImage.attr("src"))):(targetnode.removeClass("visible"),targetnode.addClass("hide"),targetnode.attr("aria-expanded",!1),thisnode.find(":header i.fa").removeClass(CLASSES_COLLAPSE),thisnode.find(":header i.fa").addClass(CLASSES_EXPAND),thisnode.find(":header img.icon").attr("src",collapsedImage.attr("src")))},expandCollapseAll:function(nextstate){var currentstate="visible"==nextstate?"hide":"visible",ariaexpandedstate="visible"==nextstate,iconclassnow="visible"==nextstate?CLASSES_EXPAND:CLASSES_COLLAPSE,iconclassnext="visible"==nextstate?CLASSES_COLLAPSE:CLASSES_EXPAND,imagenow="visible"==nextstate?expandedImage.attr("src"):collapsedImage.attr("src");$("."+currentstate).each((function(){$(this).removeClass(currentstate),$(this).addClass(nextstate),$(this).attr("aria-expanded",ariaexpandedstate)})),$(".tool_dataprivacy-expand-all").data("visibilityState",currentstate),str.get_string(currentstate,"tool_dataprivacy").then((function(langString){$(".tool_dataprivacy-expand-all").html(langString)})).catch(Notification.exception),$(":header i.fa").each((function(){$(this).removeClass(iconclassnow),$(this).addClass(iconclassnext)})),$(":header img.icon").each((function(){$(this).attr("src",imagenow)}))}}}));
//# sourceMappingURL=expand_contract.min.js.map
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/form-user-selector",["jquery","core/ajax","core/templates"],function(a,b,c){return{processResults:function processResults(b,c){var d=[];a.each(c,function(a,b){d.push({value:b.id,label:b._label})});return d},transport:function transport(d,e,f,g){var h=b.call([{methodname:"tool_dataprivacy_get_users",args:{query:e}}]);h[0].then(function(b){var d=[],e=0;a.each(b,function(a,b){d.push(c.render("tool_dataprivacy/form-user-selector-suggestion",b))});return a.when.apply(a.when,d).then(function(){var c=arguments;a.each(b,function(a,b){b._label=c[e];e++});f(b)})}).fail(g)}}});
//# sourceMappingURL=form-user-selector.min.js.map
/**
* Potential user selector module.
*
* @module tool_dataprivacy/form-user-selector
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/form-user-selector",["jquery","core/ajax","core/templates"],(function($,Ajax,Templates){return{processResults:function(selector,results){var users=[];return $.each(results,(function(index,user){users.push({value:user.id,label:user._label})})),users},transport:function(selector,query,success,failure){Ajax.call([{methodname:"tool_dataprivacy_get_users",args:{query:query}}])[0].then((function(results){var promises=[],i=0;return $.each(results,(function(index,user){promises.push(Templates.render("tool_dataprivacy/form-user-selector-suggestion",user))})),$.when.apply($.when,promises).then((function(){var args=arguments;$.each(results,(function(index,user){user._label=args[i],i++})),success(results)}))})).fail(failure)}}}));
//# sourceMappingURL=form-user-selector.min.js.map
@@ -1 +1 @@
{"version":3,"sources":["../src/form-user-selector.js"],"names":["define","$","Ajax","Templates","processResults","selector","results","users","each","index","user","push","value","id","label","_label","transport","query","success","failure","promise","call","methodname","args","then","promises","i","render","when","apply","arguments","fail"],"mappings":"AAyBAA,OAAM,uCAAC,CAAC,QAAD,CAAW,WAAX,CAAwB,gBAAxB,CAAD,CAA4C,SAASC,CAAT,CAAYC,CAAZ,CAAkBC,CAAlB,CAA6B,CAE3E,MAAgE,CAE5DC,cAAc,CAAE,wBAASC,CAAT,CAAmBC,CAAnB,CAA4B,CACxC,GAAIC,CAAAA,CAAK,CAAG,EAAZ,CACAN,CAAC,CAACO,IAAF,CAAOF,CAAP,CAAgB,SAASG,CAAT,CAAgBC,CAAhB,CAAsB,CAClCH,CAAK,CAACI,IAAN,CAAW,CACPC,KAAK,CAAEF,CAAI,CAACG,EADL,CAEPC,KAAK,CAAEJ,CAAI,CAACK,MAFL,CAAX,CAIH,CALD,EAMA,MAAOR,CAAAA,CACV,CAX2D,CAa5DS,SAAS,CAAE,mBAASX,CAAT,CAAmBY,CAAnB,CAA0BC,CAA1B,CAAmCC,CAAnC,CAA4C,CACnD,GAAIC,CAAAA,CAAO,CAEDlB,CAAI,CAACmB,IAAL,CAAU,CAAC,CACjBC,UAAU,CAAE,4BADK,CAEjBC,IAAI,CAAE,CACFN,KAAK,CAAEA,CADL,CAFW,CAAD,CAAV,CAFV,CASAG,CAAO,CAAC,CAAD,CAAP,CAAWI,IAAX,CAAgB,SAASlB,CAAT,CAAkB,CAC9B,GAAImB,CAAAA,CAAQ,CAAG,EAAf,CACIC,CAAC,CAAG,CADR,CAIAzB,CAAC,CAACO,IAAF,CAAOF,CAAP,CAAgB,SAASG,CAAT,CAAgBC,CAAhB,CAAsB,CAClCe,CAAQ,CAACd,IAAT,CAAcR,CAAS,CAACwB,MAAV,CAAiB,gDAAjB,CAAmEjB,CAAnE,CAAd,CACH,CAFD,EAKA,MAAOT,CAAAA,CAAC,CAAC2B,IAAF,CAAOC,KAAP,CAAa5B,CAAC,CAAC2B,IAAf,CAAqBH,CAArB,EAA+BD,IAA/B,CAAoC,UAAW,CAClD,GAAID,CAAAA,CAAI,CAAGO,SAAX,CACA7B,CAAC,CAACO,IAAF,CAAOF,CAAP,CAAgB,SAASG,CAAT,CAAgBC,CAAhB,CAAsB,CAClCA,CAAI,CAACK,MAAL,CAAcQ,CAAI,CAACG,CAAD,CAAlB,CACAA,CAAC,EACJ,CAHD,EAIAR,CAAO,CAACZ,CAAD,CAEV,CARM,CAUV,CApBD,EAoBGyB,IApBH,CAoBQZ,CApBR,CAqBH,CA5C2D,CAgDnE,CAlDK,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 user selector module.\n *\n * @module tool_dataprivacy/form-user-selector\n * @class form-user-selector\n * @package tool_dataprivacy\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/ajax', 'core/templates'], function($, Ajax, Templates) {\n\n return /** @alias module:tool_dataprivacy/form-user-selector */ {\n\n processResults: function(selector, results) {\n var users = [];\n $.each(results, function(index, user) {\n users.push({\n value: user.id,\n label: user._label\n });\n });\n return users;\n },\n\n transport: function(selector, query, success, failure) {\n var promise;\n\n promise = Ajax.call([{\n methodname: 'tool_dataprivacy_get_users',\n args: {\n query: query\n }\n }]);\n\n promise[0].then(function(results) {\n var promises = [],\n i = 0;\n\n // Render the label.\n $.each(results, function(index, user) {\n promises.push(Templates.render('tool_dataprivacy/form-user-selector-suggestion', user));\n });\n\n // Apply the label to the results.\n return $.when.apply($.when, promises).then(function() {\n var args = arguments;\n $.each(results, function(index, user) {\n user._label = args[i];\n i++;\n });\n success(results);\n return;\n });\n\n }).fail(failure);\n }\n\n };\n\n});\n"],"file":"form-user-selector.min.js"}
{"version":3,"file":"form-user-selector.min.js","sources":["../src/form-user-selector.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 user selector module.\n *\n * @module tool_dataprivacy/form-user-selector\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/ajax', 'core/templates'], function($, Ajax, Templates) {\n\n return /** @alias module:tool_dataprivacy/form-user-selector */ {\n\n processResults: function(selector, results) {\n var users = [];\n $.each(results, function(index, user) {\n users.push({\n value: user.id,\n label: user._label\n });\n });\n return users;\n },\n\n transport: function(selector, query, success, failure) {\n var promise;\n\n promise = Ajax.call([{\n methodname: 'tool_dataprivacy_get_users',\n args: {\n query: query\n }\n }]);\n\n promise[0].then(function(results) {\n var promises = [],\n i = 0;\n\n // Render the label.\n $.each(results, function(index, user) {\n promises.push(Templates.render('tool_dataprivacy/form-user-selector-suggestion', user));\n });\n\n // Apply the label to the results.\n return $.when.apply($.when, promises).then(function() {\n var args = arguments;\n $.each(results, function(index, user) {\n user._label = args[i];\n i++;\n });\n success(results);\n return;\n });\n\n }).fail(failure);\n }\n\n };\n\n});\n"],"names":["define","$","Ajax","Templates","processResults","selector","results","users","each","index","user","push","value","id","label","_label","transport","query","success","failure","call","methodname","args","then","promises","i","render","when","apply","arguments","fail"],"mappings":";;;;;;;AAuBAA,6CAAO,CAAC,SAAU,YAAa,mBAAmB,SAASC,EAAGC,KAAMC,iBAEA,CAE5DC,eAAgB,SAASC,SAAUC,aAC3BC,MAAQ,UACZN,EAAEO,KAAKF,SAAS,SAASG,MAAOC,MAC5BH,MAAMI,KAAK,CACPC,MAAOF,KAAKG,GACZC,MAAOJ,KAAKK,YAGbR,OAGXS,UAAW,SAASX,SAAUY,MAAOC,QAASC,SAGhCjB,KAAKkB,KAAK,CAAC,CACjBC,WAAY,6BACZC,KAAM,CACFL,MAAOA,UAIP,GAAGM,MAAK,SAASjB,aACjBkB,SAAW,GACXC,EAAI,SAGRxB,EAAEO,KAAKF,SAAS,SAASG,MAAOC,MAC5Bc,SAASb,KAAKR,UAAUuB,OAAO,iDAAkDhB,UAI9ET,EAAE0B,KAAKC,MAAM3B,EAAE0B,KAAMH,UAAUD,MAAK,eACnCD,KAAOO,UACX5B,EAAEO,KAAKF,SAAS,SAASG,MAAOC,MAC5BA,KAAKK,OAASO,KAAKG,GACnBA,OAEJP,QAAQZ,eAIbwB,KAAKX"}
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/myrequestactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates","core/pending"],function(a,b,c,d,e,f,g,h){var j={CANCEL_REQUEST:"[data-action=\"cancel\"]",CONTACT_DPO:"[data-action=\"contactdpo\"]"},k=function(){this.registerEvents()};k.prototype.registerEvents=function(){a(j.CANCEL_REQUEST).click(function(g){g.preventDefault();var h=a(this).data("requestid");d.get_strings([{key:"cancelrequest",component:"tool_dataprivacy"},{key:"cancelrequestconfirmation",component:"tool_dataprivacy"}]).then(function(a){var d=a[0],g=a[1];return e.create({title:d,body:g,type:e.types.SAVE_CANCEL}).then(function(a){a.setSaveButtonText(d);a.getRoot().on(f.save,function(){b.call([{methodname:"tool_dataprivacy_cancel_data_request",args:{requestid:h}}])[0].done(function(a){if(a.result){window.location.reload()}else{c.addNotification({message:a.warnings[0].message,type:"error"})}}).fail(c.exception)});a.getRoot().on(f.hidden,function(){a.destroy()});return a})}).done(function(a){a.show()}).fail(c.exception)});a(j.CONTACT_DPO).click(function(b){var j=new h("dataprivacy/crud:initModal:contactdpo");b.preventDefault();var k=a(this).data("replytoemail"),l="";d.get_strings([{key:"contactdataprotectionofficer",component:"tool_dataprivacy"},{key:"send",component:"tool_dataprivacy"}]).then(function(a){var b=a[0];l=a[1];return e.create({title:b,body:g.render("tool_dataprivacy/contact_dpo",{replytoemail:k}),type:e.types.SAVE_CANCEL,large:!0})}).then(function(b){b.setSaveButtonText(l);b.show();b.getRoot().on(f.save,function(b){var c=a("#message").val().trim();if(0===c.length){b.preventDefault();a("[data-region=\"messageinput\"]").addClass("has-danger notifyproblem");a("#id_error_message").removeAttr("hidden")}else{i(c)}});b.getRoot().on(f.hidden,function(){b.destroy()})}).then(j.resolve).catch(c.exception)})};function i(a){var e="success";b.call([{methodname:"tool_dataprivacy_contact_dpo",args:{message:a}}])[0].then(function(a){if(a.result){return d.get_string("requestsubmitted","tool_dataprivacy")}e="error";return a.warnings.join("<br>")}).done(function(a){c.addNotification({message:a,type:e})}).fail(c.exception)}return{init:function init(){return new k}}});
//# sourceMappingURL=myrequestactions.min.js.map
/**
* AMD module to enable users to manage their own data requests.
*
* @module tool_dataprivacy/myrequestactions
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/myrequestactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates","core/pending"],(function($,Ajax,Notification,Str,ModalFactory,ModalEvents,Templates,Pending){var ACTIONS_CANCEL_REQUEST='[data-action="cancel"]',ACTIONS_CONTACT_DPO='[data-action="contactdpo"]',MyRequestActions=function(){this.registerEvents()};return MyRequestActions.prototype.registerEvents=function(){$(ACTIONS_CANCEL_REQUEST).click((function(e){e.preventDefault();var requestId=$(this).data("requestid");Str.get_strings([{key:"cancelrequest",component:"tool_dataprivacy"},{key:"cancelrequestconfirmation",component:"tool_dataprivacy"}]).then((function(langStrings){var title=langStrings[0],confirmMessage=langStrings[1];return ModalFactory.create({title:title,body:confirmMessage,type:ModalFactory.types.SAVE_CANCEL}).then((function(modal){return modal.setSaveButtonText(title),modal.getRoot().on(ModalEvents.save,(function(){var request={methodname:"tool_dataprivacy_cancel_data_request",args:{requestid:requestId}};Ajax.call([request])[0].done((function(data){data.result?window.location.reload():Notification.addNotification({message:data.warnings[0].message,type:"error"})})).fail(Notification.exception)})),modal.getRoot().on(ModalEvents.hidden,(function(){modal.destroy()})),modal}))})).done((function(modal){modal.show()})).fail(Notification.exception)})),$(ACTIONS_CONTACT_DPO).click((function(e){var pendingPromise=new Pending("dataprivacy/crud:initModal:contactdpo");e.preventDefault();var replyToEmail=$(this).data("replytoemail"),sendButtonText="";Str.get_strings([{key:"contactdataprotectionofficer",component:"tool_dataprivacy"},{key:"send",component:"tool_dataprivacy"}]).then((function(langStrings){var modalTitle=langStrings[0];sendButtonText=langStrings[1];var context={replytoemail:replyToEmail};return ModalFactory.create({title:modalTitle,body:Templates.render("tool_dataprivacy/contact_dpo",context),type:ModalFactory.types.SAVE_CANCEL,large:!0})})).then((function(modal){modal.setSaveButtonText(sendButtonText),modal.show(),modal.getRoot().on(ModalEvents.save,(function(e){var message=$("#message").val().trim();0===message.length?(e.preventDefault(),$('[data-region="messageinput"]').addClass("has-danger notifyproblem"),$("#id_error_message").removeAttr("hidden")):function(message){var request={methodname:"tool_dataprivacy_contact_dpo",args:{message:message}},requestType="success";Ajax.call([request])[0].then((function(data){return data.result?Str.get_string("requestsubmitted","tool_dataprivacy"):(requestType="error",data.warnings.join("<br>"))})).done((function(message){Notification.addNotification({message:message,type:requestType})})).fail(Notification.exception)}(message)})),modal.getRoot().on(ModalEvents.hidden,(function(){modal.destroy()}))})).then(pendingPromise.resolve).catch(Notification.exception)}))},{init:function(){return new MyRequestActions}}}));
//# sourceMappingURL=myrequestactions.min.js.map
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/purposesactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var g={DELETE:"[data-action=\"deletepurpose\"]"},h=function(){this.registerEvents()};h.prototype.registerEvents=function(){a(g.DELETE).click(function(g){g.preventDefault();var h=a(this).data("id"),i=a(this).data("name");d.get_strings([{key:"deletepurpose",component:"tool_dataprivacy"},{key:"deletepurposetext",component:"tool_dataprivacy",param:i},{key:"delete"}]).then(function(d){var g=d[0],i=d[1],j=d[2];return e.create({title:g,body:i,type:e.types.SAVE_CANCEL}).then(function(d){d.setSaveButtonText(j);d.getRoot().on(f.save,function(){b.call([{methodname:"tool_dataprivacy_delete_purpose",args:{id:h}}])[0].done(function(b){if(b.result){a("tr[data-purposeid=\""+h+"\"]").remove()}else{c.addNotification({message:b.warnings[0].message,type:"error"})}}).fail(c.exception)});d.getRoot().on(f.hidden,function(){d.destroy()});return d})}).done(function(a){a.show()}).fail(c.exception)})};return{init:function init(){return new h}}});
//# sourceMappingURL=purposesactions.min.js.map
/**
* AMD module for purposes actions.
*
* @module tool_dataprivacy/purposesactions
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/purposesactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],(function($,Ajax,Notification,Str,ModalFactory,ModalEvents){var ACTIONS_DELETE='[data-action="deletepurpose"]',PurposesActions=function(){this.registerEvents()};return PurposesActions.prototype.registerEvents=function(){$(ACTIONS_DELETE).click((function(e){e.preventDefault();var id=$(this).data("id"),stringkeys=[{key:"deletepurpose",component:"tool_dataprivacy"},{key:"deletepurposetext",component:"tool_dataprivacy",param:$(this).data("name")},{key:"delete"}];Str.get_strings(stringkeys).then((function(langStrings){var title=langStrings[0],confirmMessage=langStrings[1],buttonText=langStrings[2];return ModalFactory.create({title:title,body:confirmMessage,type:ModalFactory.types.SAVE_CANCEL}).then((function(modal){return modal.setSaveButtonText(buttonText),modal.getRoot().on(ModalEvents.save,(function(){var request={methodname:"tool_dataprivacy_delete_purpose",args:{id:id}};Ajax.call([request])[0].done((function(data){data.result?$('tr[data-purposeid="'+id+'"]').remove():Notification.addNotification({message:data.warnings[0].message,type:"error"})})).fail(Notification.exception)})),modal.getRoot().on(ModalEvents.hidden,(function(){modal.destroy()})),modal}))})).done((function(modal){modal.show()})).fail(Notification.exception)}))},{init:function(){return new PurposesActions}}}));
//# sourceMappingURL=purposesactions.min.js.map
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_dataprivacy/request_filter",["jquery","core/form-autocomplete","core/str","core/notification"],function(a,b,c,d){var e={REQUEST_FILTERS:"#request-filters"},f=function init(){c.get_strings([{key:"filter",component:"moodle"},{key:"nofiltersapplied",component:"moodle"}]).then(function(a){var c=a[0],d=a[1];return b.enhance(e.REQUEST_FILTERS,!1,"",c,!1,!0,d,!0)}).fail(d.exception);var f=a(e.REQUEST_FILTERS).val();a(e.REQUEST_FILTERS).on("change",function(){var b=a(this).val();if(f.join(",")!==b.join(",")){if(0===b.length){a("#filters-cleared").val(1)}a(this.form).submit()}})};return{init:function init(){f()}}});
//# sourceMappingURL=request_filter.min.js.map
/**
* JS module for the data requests filter.
*
* @module tool_dataprivacy/request_filter
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_dataprivacy/request_filter",["jquery","core/form-autocomplete","core/str","core/notification"],(function($,Autocomplete,Str,Notification){var SELECTORS_REQUEST_FILTERS="#request-filters";return{init:function(){!function(){Str.get_strings([{key:"filter",component:"moodle"},{key:"nofiltersapplied",component:"moodle"}]).then((function(langstrings){var placeholder=langstrings[0],noSelectionString=langstrings[1];return Autocomplete.enhance(SELECTORS_REQUEST_FILTERS,!1,"",placeholder,!1,!0,noSelectionString,!0)})).fail(Notification.exception);var last=$(SELECTORS_REQUEST_FILTERS).val();$(SELECTORS_REQUEST_FILTERS).on("change",(function(){var current=$(this).val();last.join(",")!==current.join(",")&&(0===current.length&&$("#filters-cleared").val(1),$(this.form).submit())}))}()}}}));
//# sourceMappingURL=request_filter.min.js.map
@@ -1 +1 @@
{"version":3,"sources":["../src/request_filter.js"],"names":["define","$","Autocomplete","Str","Notification","SELECTORS","REQUEST_FILTERS","init","get_strings","key","component","then","langstrings","placeholder","noSelectionString","enhance","fail","exception","last","val","on","current","join","length","form","submit"],"mappings":"AAuBAA,OAAM,mCAAC,CAAC,QAAD,CAAW,wBAAX,CAAqC,UAArC,CAAiD,mBAAjD,CAAD,CAAwE,SAASC,CAAT,CAAYC,CAAZ,CAA0BC,CAA1B,CAA+BC,CAA/B,CAA6C,IAQnHC,CAAAA,CAAS,CAAG,CACZC,eAAe,CAAE,kBADL,CARuG,CAkBnHC,CAAI,CAAG,QAAPA,CAAAA,IAAO,EAAW,CAYlBJ,CAAG,CAACK,WAAJ,CAXiB,CACb,CACIC,GAAG,CAAE,QADT,CAEIC,SAAS,CAAE,QAFf,CADa,CAKb,CACID,GAAG,CAAE,kBADT,CAEIC,SAAS,CAAE,QAFf,CALa,CAWjB,EAA4BC,IAA5B,CAAiC,SAASC,CAAT,CAAsB,IAC/CC,CAAAA,CAAW,CAAGD,CAAW,CAAC,CAAD,CADsB,CAE/CE,CAAiB,CAAGF,CAAW,CAAC,CAAD,CAFgB,CAGnD,MAAOV,CAAAA,CAAY,CAACa,OAAb,CAAqBV,CAAS,CAACC,eAA/B,IAAuD,EAAvD,CAA2DO,CAA3D,OAAqFC,CAArF,IACV,CAJD,EAIGE,IAJH,CAIQZ,CAAY,CAACa,SAJrB,EAMA,GAAIC,CAAAA,CAAI,CAAGjB,CAAC,CAACI,CAAS,CAACC,eAAX,CAAD,CAA6Ba,GAA7B,EAAX,CACAlB,CAAC,CAACI,CAAS,CAACC,eAAX,CAAD,CAA6Bc,EAA7B,CAAgC,QAAhC,CAA0C,UAAW,CACjD,GAAIC,CAAAA,CAAO,CAAGpB,CAAC,CAAC,IAAD,CAAD,CAAQkB,GAAR,EAAd,CAEA,GAAID,CAAI,CAACI,IAAL,CAAU,GAAV,IAAmBD,CAAO,CAACC,IAAR,CAAa,GAAb,CAAvB,CAA0C,CAEtC,GAAuB,CAAnB,GAAAD,CAAO,CAACE,MAAZ,CAA0B,CACtBtB,CAAC,CAAC,kBAAD,CAAD,CAAsBkB,GAAtB,CAA0B,CAA1B,CACH,CACDlB,CAAC,CAAC,KAAKuB,IAAN,CAAD,CAAaC,MAAb,EACH,CACJ,CAVD,CAWH,CAhDsH,CAkDvH,MAAmD,CAM/ClB,IAAI,CAAE,eAAW,CACbA,CAAI,EACP,CAR8C,CAUtD,CA5DK,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 * JS module for the data requests filter.\n *\n * @module tool_dataprivacy/request_filter\n * @package tool_dataprivacy\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/form-autocomplete', 'core/str', 'core/notification'], function($, Autocomplete, Str, Notification) {\n\n /**\n * Selectors.\n *\n * @access private\n * @type {{REQUEST_FILTERS: string}}\n */\n var SELECTORS = {\n REQUEST_FILTERS: '#request-filters'\n };\n\n /**\n * Init function.\n *\n * @method init\n * @private\n */\n var init = function() {\n var stringkeys = [\n {\n key: 'filter',\n component: 'moodle'\n },\n {\n key: 'nofiltersapplied',\n component: 'moodle'\n }\n ];\n\n Str.get_strings(stringkeys).then(function(langstrings) {\n var placeholder = langstrings[0];\n var noSelectionString = langstrings[1];\n return Autocomplete.enhance(SELECTORS.REQUEST_FILTERS, false, '', placeholder, false, true, noSelectionString, true);\n }).fail(Notification.exception);\n\n var last = $(SELECTORS.REQUEST_FILTERS).val();\n $(SELECTORS.REQUEST_FILTERS).on('change', function() {\n var current = $(this).val();\n // Prevent form from submitting unnecessarily, eg. on blur when no filter is selected.\n if (last.join(',') !== current.join(',')) {\n // If we're submitting without filters, set the hidden input 'filters-cleared' to 1.\n if (current.length === 0) {\n $('#filters-cleared').val(1);\n }\n $(this.form).submit();\n }\n });\n };\n\n return /** @alias module:core/form-autocomplete */ {\n /**\n * Initialise the unified user filter.\n *\n * @method init\n */\n init: function() {\n init();\n }\n };\n});\n"],"file":"request_filter.min.js"}
{"version":3,"file":"request_filter.min.js","sources":["../src/request_filter.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 * JS module for the data requests filter.\n *\n * @module tool_dataprivacy/request_filter\n * @copyright 2018 Jun Pataleta\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/form-autocomplete', 'core/str', 'core/notification'], function($, Autocomplete, Str, Notification) {\n\n /**\n * Selectors.\n *\n * @access private\n * @type {{REQUEST_FILTERS: string}}\n */\n var SELECTORS = {\n REQUEST_FILTERS: '#request-filters'\n };\n\n /**\n * Init function.\n *\n * @method init\n * @private\n */\n var init = function() {\n var stringkeys = [\n {\n key: 'filter',\n component: 'moodle'\n },\n {\n key: 'nofiltersapplied',\n component: 'moodle'\n }\n ];\n\n Str.get_strings(stringkeys).then(function(langstrings) {\n var placeholder = langstrings[0];\n var noSelectionString = langstrings[1];\n return Autocomplete.enhance(SELECTORS.REQUEST_FILTERS, false, '', placeholder, false, true, noSelectionString, true);\n }).fail(Notification.exception);\n\n var last = $(SELECTORS.REQUEST_FILTERS).val();\n $(SELECTORS.REQUEST_FILTERS).on('change', function() {\n var current = $(this).val();\n // Prevent form from submitting unnecessarily, eg. on blur when no filter is selected.\n if (last.join(',') !== current.join(',')) {\n // If we're submitting without filters, set the hidden input 'filters-cleared' to 1.\n if (current.length === 0) {\n $('#filters-cleared').val(1);\n }\n $(this.form).submit();\n }\n });\n };\n\n return /** @alias module:core/form-autocomplete */ {\n /**\n * Initialise the unified user filter.\n *\n * @method init\n */\n init: function() {\n init();\n }\n };\n});\n"],"names":["define","$","Autocomplete","Str","Notification","SELECTORS","init","get_strings","key","component","then","langstrings","placeholder","noSelectionString","enhance","fail","exception","last","val","on","current","this","join","length","form","submit"],"mappings":";;;;;;;AAsBAA,yCAAO,CAAC,SAAU,yBAA0B,WAAY,sBAAsB,SAASC,EAAGC,aAAcC,IAAKC,kBAQrGC,0BACiB,yBAyC8B,CAM/CC,KAAM,YAtCC,WAYPH,IAAII,YAXa,CACb,CACIC,IAAK,SACLC,UAAW,UAEf,CACID,IAAK,mBACLC,UAAW,YAISC,MAAK,SAASC,iBAClCC,YAAcD,YAAY,GAC1BE,kBAAoBF,YAAY,UAC7BT,aAAaY,QAAQT,2BAA2B,EAAO,GAAIO,aAAa,GAAO,EAAMC,mBAAmB,MAChHE,KAAKX,aAAaY,eAEjBC,KAAOhB,EAAEI,2BAA2Ba,MACxCjB,EAAEI,2BAA2Bc,GAAG,UAAU,eAClCC,QAAUnB,EAAEoB,MAAMH,MAElBD,KAAKK,KAAK,OAASF,QAAQE,KAAK,OAET,IAAnBF,QAAQG,QACRtB,EAAE,oBAAoBiB,IAAI,GAE9BjB,EAAEoB,KAAKG,MAAMC,aAYjBnB"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -17,7 +17,6 @@
* Module to add categories.
*
* @module tool_dataprivacy/add_category
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Module to add purposes.
*
* @module tool_dataprivacy/add_purpose
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* AMD module for categories actions.
*
* @module tool_dataprivacy/categoriesactions
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Request actions.
*
* @module tool_dataprivacy/data_deletion
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Request actions.
*
* @module tool_dataprivacy/data_registry
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Request actions.
*
* @module tool_dataprivacy/data_request_modal
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* AMD module for data registry defaults actions.
*
* @module tool_dataprivacy/defaultsactions
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Module to update the displayed retention period.
*
* @module tool_dataprivacy/effective_retention_period
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-2
View File
@@ -17,8 +17,6 @@
* Contain the events the data privacy tool can fire.
*
* @module tool_dataprivacy/events
* @class events
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,8 +17,6 @@
* Potential user selector module.
*
* @module tool_dataprivacy/expand_contract
* @class page-expand-contract
* @package tool_dataprivacy
* @copyright 2018 Adrian Greeve
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,8 +17,6 @@
* Potential user selector module.
*
* @module tool_dataprivacy/form-user-selector
* @class form-user-selector
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* AMD module to enable users to manage their own data requests.
*
* @module tool_dataprivacy/myrequestactions
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* AMD module for purposes actions.
*
* @module tool_dataprivacy/purposesactions
* @package tool_dataprivacy
* @copyright 2018 David Monllao
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* JS module for the data requests filter.
*
* @module tool_dataprivacy/request_filter
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -17,7 +17,6 @@
* Request actions.
*
* @module tool_dataprivacy/requestactions
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -9,10 +9,8 @@ Feature: Manage data requests
| username | firstname | lastname | email |
| student1 | John | Doe | s1@example.com |
| student2 | Jane | Doe | s2@example.com |
And I log in as "admin"
And I set the following administration settings values:
| contactdataprotectionofficer | 1 |
And I log out
And the following config values are set as admin:
| contactdataprotectionofficer | 1 | tool_dataprivacy |
@javascript
Scenario: Marking general enquiries as complete
+1 -1
View File
@@ -27,7 +27,7 @@ require_once($CFG->libdir . '/adminlib.php');
admin_externalpage_setup('tool_filetypes');
$extension = required_param('extension', PARAM_RAW);
$extension = required_param('extension', PARAM_ALPHANUMEXT);
$redirecturl = new \moodle_url('/admin/tool/filetypes/index.php');
if (optional_param('revert', 0, PARAM_INT)) {
@@ -100,10 +100,12 @@ class tool_generator_testplan_backend extends tool_generator_backend {
*
* @param int $courseid The target course id
* @param bool $updateuserspassword Updates the course users password to $CFG->tool_generator_users_password
* @param int|null $size of the test plan. Used to limit the number of users exported
* to match the threads in the plan. For BC, defaults to null that means all enrolled users.
* @return stored_file
*/
public static function create_users_file($courseid, $updateuserspassword) {
$csvcontents = self::generate_users_file($courseid, $updateuserspassword);
public static function create_users_file($courseid, $updateuserspassword, ?int $size = null) {
$csvcontents = self::generate_users_file($courseid, $updateuserspassword, $size);
$fs = get_file_storage();
$filerecord = self::get_file_record('users', 'csv');
@@ -171,14 +173,18 @@ class tool_generator_testplan_backend extends tool_generator_backend {
*
* @param int $targetcourseid
* @param bool $updateuserspassword Updates the course users password to $CFG->tool_generator_users_password
* @param int|null $size of the test plan. Used to limit the number of users exported
* to match the threads in the plan. For BC, defaults to null that means all enrolled users.
* @return string The users csv file contents.
*/
protected static function generate_users_file($targetcourseid, $updateuserspassword) {
protected static function generate_users_file($targetcourseid, $updateuserspassword, ?int $size = null) {
global $CFG;
$coursecontext = context_course::instance($targetcourseid);
$users = get_enrolled_users($coursecontext, '', 0, 'u.id, u.username, u.auth', 'u.username ASC');
// If requested, get the number of users (threads) to use in the plan. We only need those in the exported file.
$planusers = self::$users[$size] ?? 0;
$users = get_enrolled_users($coursecontext, '', 0, 'u.id, u.username, u.auth', 'u.username ASC', 0, $planusers);
if (!$users) {
print_error('coursewithoutusers', 'tool_generator');
}
+1 -1
View File
@@ -98,7 +98,7 @@ if (empty($CFG->tool_generator_users_password) || is_bool($CFG->tool_generator_u
// Create files.
$courseid = $DB->get_field('course', 'id', array('shortname' => $shortname));
$usersfile = tool_generator_testplan_backend::create_users_file($courseid, !empty($options['updateuserspassword']));
$usersfile = tool_generator_testplan_backend::create_users_file($courseid, !empty($options['updateuserspassword']), $size);
$testplanfile = tool_generator_testplan_backend::create_testplan_file($courseid, $size);
// One file path per line so other CLI scripts can easily parse the output.
+1 -1
View File
@@ -51,7 +51,7 @@ if ($data = $mform->get_data()) {
// Creating both test plan and users files.
$testplanfile = tool_generator_testplan_backend::create_testplan_file($data->courseid, $data->size);
$usersfile = tool_generator_testplan_backend::create_users_file($data->courseid, $data->updateuserspassword);
$usersfile = tool_generator_testplan_backend::create_users_file($data->courseid, $data->updateuserspassword, $data->size);
// Test plan link.
$testplanurl = moodle_url::make_pluginfile_url(
+7
View File
@@ -1,6 +1,13 @@
This files describes API changes in core libraries and APIs,
information provided here is intended especially for developers.
=== 3.10.8 ===
* Function tool_generator_testplan_backend::create_users_file() now supports to pass the size of the testing plan,
that needs to be equal or smaller than the size of the generated site. That's used to effectively restrict the
exported number of users to the number of threads the jmeter plan will have (previously all the enrolled users
were being exported, with that leading to "false" loops (users not really looping X times).
=== 3.7 ===
* Function tool_generator_testplan_backend::get_course_options() is removed, the 'course' form element is used instead.
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_licensemanager/delete_license",["jquery","core/modal_factory","core/modal_events","core/url","core/str"],function(a,b,c,d,e){var f=a(".delete-license");b.create({type:b.types.SAVE_CANCEL,title:e.get_string("deletelicense","tool_licensemanager"),body:e.get_string("deletelicenseconfirmmessage","tool_licensemanager"),preShowCallback:function preShowCallback(b,c){b=a(b);var e={action:"delete",license:b.data("license")};c.deleteURL=d.relativeUrl("/admin/tool/licensemanager/index.php",e,!0)},large:!0},f).done(function(a){a.getRoot().on(c.save,function(b){b.preventDefault();window.location.href=a.deleteURL})})});
//# sourceMappingURL=delete_license.min.js.map
/**
* Modal for confirming deletion of a custom license.
*
* @module tool_licensemanager/delete_license
* @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_licensemanager/delete_license",["jquery","core/modal_factory","core/modal_events","core/url","core/str"],(function($,ModalFactory,ModalEvents,Url,String){var trigger=$(".delete-license");ModalFactory.create({type:ModalFactory.types.SAVE_CANCEL,title:String.get_string("deletelicense","tool_licensemanager"),body:String.get_string("deletelicenseconfirmmessage","tool_licensemanager"),preShowCallback:function(triggerElement,modal){var params={action:"delete",license:(triggerElement=$(triggerElement)).data("license")};modal.deleteURL=Url.relativeUrl("/admin/tool/licensemanager/index.php",params,!0)},large:!0},trigger).done((function(modal){modal.getRoot().on(ModalEvents.save,(function(e){e.preventDefault(),window.location.href=modal.deleteURL}))}))}));
//# sourceMappingURL=delete_license.min.js.map
@@ -1 +1 @@
{"version":3,"sources":["../src/delete_license.js"],"names":["define","$","ModalFactory","ModalEvents","Url","String","trigger","create","type","types","SAVE_CANCEL","title","get_string","body","preShowCallback","triggerElement","modal","params","data","deleteURL","relativeUrl","large","done","getRoot","on","save","e","preventDefault","window","location","href"],"mappings":"AAwBAA,OAAM,sCAAC,CAAC,QAAD,CAAW,oBAAX,CAAiC,mBAAjC,CAAsD,UAAtD,CAAkE,UAAlE,CAAD,CACF,SAASC,CAAT,CAAYC,CAAZ,CAA0BC,CAA1B,CAAuCC,CAAvC,CAA4CC,CAA5C,CAAoD,CAEhD,GAAIC,CAAAA,CAAO,CAAGL,CAAC,CAAC,iBAAD,CAAf,CACAC,CAAY,CAACK,MAAb,CAAoB,CAChBC,IAAI,CAAEN,CAAY,CAACO,KAAb,CAAmBC,WADT,CAEhBC,KAAK,CAAEN,CAAM,CAACO,UAAP,CAAkB,eAAlB,CAAmC,qBAAnC,CAFS,CAGhBC,IAAI,CAAER,CAAM,CAACO,UAAP,CAAkB,6BAAlB,CAAiD,qBAAjD,CAHU,CAIhBE,eAAe,CAAE,yBAASC,CAAT,CAAyBC,CAAzB,CAAgC,CAC7CD,CAAc,CAAGd,CAAC,CAACc,CAAD,CAAlB,CACA,GAAIE,CAAAA,CAAM,CAAG,CACT,OAAU,QADD,CAET,QAAWF,CAAc,CAACG,IAAf,CAAoB,SAApB,CAFF,CAAb,CAIAF,CAAK,CAACG,SAAN,CAAkBf,CAAG,CAACgB,WAAJ,CAAgB,sCAAhB,CAAwDH,CAAxD,IACrB,CAXe,CAYhBI,KAAK,GAZW,CAApB,CAaGf,CAbH,EAcKgB,IAdL,CAcU,SAASN,CAAT,CAAgB,CAClBA,CAAK,CAACO,OAAN,GAAgBC,EAAhB,CAAmBrB,CAAW,CAACsB,IAA/B,CAAqC,SAASC,CAAT,CAAY,CAE7CA,CAAC,CAACC,cAAF,GAEAC,MAAM,CAACC,QAAP,CAAgBC,IAAhB,CAAuBd,CAAK,CAACG,SAChC,CALD,CAMH,CArBL,CAsBH,CA1BC,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 * Modal for confirming deletion of a custom license.\n *\n * @module tool_licensemanager/delete_license\n * @class delete_license\n * @package tool_licensemanager\n * @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/modal_factory', 'core/modal_events', 'core/url', 'core/str'],\n function($, ModalFactory, ModalEvents, Url, String) {\n\n var trigger = $('.delete-license');\n ModalFactory.create({\n type: ModalFactory.types.SAVE_CANCEL,\n title: String.get_string('deletelicense', 'tool_licensemanager'),\n body: String.get_string('deletelicenseconfirmmessage', 'tool_licensemanager'),\n preShowCallback: function(triggerElement, modal) {\n triggerElement = $(triggerElement);\n let params = {\n 'action': 'delete',\n 'license': triggerElement.data('license')\n };\n modal.deleteURL = Url.relativeUrl('/admin/tool/licensemanager/index.php', params, true);\n },\n large: true,\n }, trigger)\n .done(function(modal) {\n modal.getRoot().on(ModalEvents.save, function(e) {\n // Stop the default save button behaviour which is to close the modal.\n e.preventDefault();\n // Redirect to delete url.\n window.location.href = modal.deleteURL;\n });\n });\n });\n"],"file":"delete_license.min.js"}
{"version":3,"file":"delete_license.min.js","sources":["../src/delete_license.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Modal for confirming deletion of a custom license.\n *\n * @module tool_licensemanager/delete_license\n * @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/modal_factory', 'core/modal_events', 'core/url', 'core/str'],\n function($, ModalFactory, ModalEvents, Url, String) {\n\n var trigger = $('.delete-license');\n ModalFactory.create({\n type: ModalFactory.types.SAVE_CANCEL,\n title: String.get_string('deletelicense', 'tool_licensemanager'),\n body: String.get_string('deletelicenseconfirmmessage', 'tool_licensemanager'),\n preShowCallback: function(triggerElement, modal) {\n triggerElement = $(triggerElement);\n let params = {\n 'action': 'delete',\n 'license': triggerElement.data('license')\n };\n modal.deleteURL = Url.relativeUrl('/admin/tool/licensemanager/index.php', params, true);\n },\n large: true,\n }, trigger)\n .done(function(modal) {\n modal.getRoot().on(ModalEvents.save, function(e) {\n // Stop the default save button behaviour which is to close the modal.\n e.preventDefault();\n // Redirect to delete url.\n window.location.href = modal.deleteURL;\n });\n });\n });\n"],"names":["define","$","ModalFactory","ModalEvents","Url","String","trigger","create","type","types","SAVE_CANCEL","title","get_string","body","preShowCallback","triggerElement","modal","params","data","deleteURL","relativeUrl","large","done","getRoot","on","save","e","preventDefault","window","location","href"],"mappings":";;;;;;;AAsBAA,4CAAO,CAAC,SAAU,qBAAsB,oBAAqB,WAAY,aACrE,SAASC,EAAGC,aAAcC,YAAaC,IAAKC,YAEpCC,QAAUL,EAAE,mBAChBC,aAAaK,OAAO,CAChBC,KAAMN,aAAaO,MAAMC,YACzBC,MAAON,OAAOO,WAAW,gBAAiB,uBAC1CC,KAAMR,OAAOO,WAAW,8BAA+B,uBACvDE,gBAAiB,SAASC,eAAgBC,WAElCC,OAAS,QACC,kBAFdF,eAAiBd,EAAEc,iBAGWG,KAAK,YAEnCF,MAAMG,UAAYf,IAAIgB,YAAY,uCAAwCH,QAAQ,IAEtFI,OAAO,GACRf,SACEgB,MAAK,SAASN,OACXA,MAAMO,UAAUC,GAAGrB,YAAYsB,MAAM,SAASC,GAE1CA,EAAEC,iBAEFC,OAAOC,SAASC,KAAOd,MAAMG"}
@@ -17,8 +17,6 @@
* Modal for confirming deletion of a custom license.
*
* @module tool_licensemanager/delete_license
* @class delete_license
* @package tool_licensemanager
* @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+2
View File
@@ -50,6 +50,7 @@ switch ($action) {
case 'disable':
unset($enabled[$enrol]);
set_config('enabled_stores', implode(',', array_keys($enabled)), 'tool_log');
add_to_config_log('tool_logstore_visibility', '1', '0', $enrol);
break;
case 'enable':
@@ -59,6 +60,7 @@ switch ($action) {
$enabled = array_keys($enabled);
$enabled[] = $enrol;
set_config('enabled_stores', implode(',', $enabled), 'tool_log');
add_to_config_log('tool_logstore_visibility', '0', '1', $enrol);
break;
case 'up':
@@ -0,0 +1,19 @@
@tool_log @report @report_configlog
Feature: In a report, admin can see logstore visibility changes
# Change log stores visibility so the report contains known data.
Background:
Given I log in as "admin"
And the following config values are set as admin:
| enabled_stores | logstore_standard | tool_log |
@javascript
Scenario: Display configuration changes report
When I navigate to "Plugins > Logging > Manage log stores" in site administration
And I click on "Disable" "icon" in the "Standard log" "table_row"
And I click on "Enable" "icon" in the "External database log" "table_row"
And I navigate to "Reports > Config changes" in site administration
Then the following should exist in the "report-configlog-report-table" table:
| User | Plugin | Setting | New value | Original value |
| Admin User | logstore_standard | tool_logstore_visibility | 0 | 1 |
| Admin User | logstore_database | tool_logstore_visibility | 1 | 0 |
+14 -2
View File
@@ -1,2 +1,14 @@
define ("tool_lp/actionselector",["jquery","core/notification","core/ajax","core/templates","tool_lp/dialogue","tool_lp/event_base"],function(a,b,c,d,e,f){var g=function(a,b,c,d,e){var g=this;f.prototype.constructor.apply(this,[]);g._title=a;g._message=b;g._actions=c;g._confirm=d;g._cancel=e;g._selectedValue=null;g._reset()};g.prototype=Object.create(f.prototype);g.prototype._selectedValue=null;g.prototype._popup=null;g.prototype._title=null;g.prototype._message=null;g.prototype._actions=null;g.prototype._confirm=null;g.prototype._cancel=null;g.prototype._afterRender=function(){var b=this;b._find("[data-action=\"action-selector-confirm\"]").attr("disabled","disabled");b._find("[data-region=\"action-selector-radio-buttons\"]").change(function(){b._selectedValue=a("input[type='radio']:checked").val();b._find("[data-action=\"action-selector-confirm\"]").removeAttr("disabled");b._refresh.bind(b)});b._find("[data-action=\"action-selector-cancel\"]").click(function(a){a.preventDefault();b.close()});b._find("[data-action=\"action-selector-confirm\"]").click(function(a){a.preventDefault();if(!b._selectedValue.length){return}b._trigger("save",{action:b._selectedValue});b.close()})};g.prototype.close=function(){var a=this;a._popup.close();a._reset()};g.prototype.display=function(){var a=this;return a._render().then(function(b){a._popup=new e(a._title,b,a._afterRender.bind(a))}).fail(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._refresh=function(){var a=this;return a._render().then(function(b){a._find("[data-region=\"action-selector\"]").replaceWith(b);a._afterRender()})};g.prototype._render=function(){var a=this,b=[];for(var c in a._actions){b.push(a._actions[c])}var e={message:a._message,choices:b,confirm:a._confirm,cancel:a._cancel};return d.render("tool_lp/action_selector",e)};g.prototype._reset=function(){this._popup=null;this._selectedValue=""};return g});
//# sourceMappingURL=actionselector.min.js.map
/**
* Action selector.
*
* To handle 'save' events use: actionselector.on('save')
* This will receive the information to display in popup.
* The actions have the format [{'text': sometext, 'value' : somevalue}].
*
* @module tool_lp/actionselector
* @copyright 2016 Serge Gauthier - <serge.gauthier.2@umontreal.ca>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_lp/actionselector",["jquery","core/notification","core/ajax","core/templates","tool_lp/dialogue","tool_lp/event_base"],(function($,Notification,Ajax,Templates,Dialogue,EventBase){var ActionSelector=function(title,message,actions,confirm,cancel){EventBase.prototype.constructor.apply(this,[]),this._title=title,this._message=message,this._actions=actions,this._confirm=confirm,this._cancel=cancel,this._selectedValue=null,this._reset()};return(ActionSelector.prototype=Object.create(EventBase.prototype))._selectedValue=null,ActionSelector.prototype._popup=null,ActionSelector.prototype._title=null,ActionSelector.prototype._message=null,ActionSelector.prototype._actions=null,ActionSelector.prototype._confirm=null,ActionSelector.prototype._cancel=null,ActionSelector.prototype._afterRender=function(){var self=this;self._find('[data-action="action-selector-confirm"]').attr("disabled","disabled"),self._find('[data-region="action-selector-radio-buttons"]').change((function(){self._selectedValue=$("input[type='radio']:checked").val(),self._find('[data-action="action-selector-confirm"]').removeAttr("disabled"),self._refresh.bind(self)})),self._find('[data-action="action-selector-cancel"]').click((function(e){e.preventDefault(),self.close()})),self._find('[data-action="action-selector-confirm"]').click((function(e){e.preventDefault(),self._selectedValue.length&&(self._trigger("save",{action:self._selectedValue}),self.close())}))},ActionSelector.prototype.close=function(){this._popup.close(),this._reset()},ActionSelector.prototype.display=function(){var self=this;return self._render().then((function(html){self._popup=new Dialogue(self._title,html,self._afterRender.bind(self))})).fail(Notification.exception)},ActionSelector.prototype._find=function(selector){return $(this._popup.getContent()).find(selector)},ActionSelector.prototype._refresh=function(){var self=this;return self._render().then((function(html){self._find('[data-region="action-selector"]').replaceWith(html),self._afterRender()}))},ActionSelector.prototype._render=function(){var choices=[];for(var i in this._actions)choices.push(this._actions[i]);var content={message:this._message,choices:choices,confirm:this._confirm,cancel:this._cancel};return Templates.render("tool_lp/action_selector",content)},ActionSelector.prototype._reset=function(){this._popup=null,this._selectedValue=""},ActionSelector}));
//# sourceMappingURL=actionselector.min.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_lp/competency_outcomes",["jquery","core/str"],function(a,b){return{NONE:0,EVIDENCE:1,COMPLETE:2,RECOMMEND:3,getAll:function getAll(){var a=this;return b.get_strings([{key:"competencyoutcome_none",component:"tool_lp"},{key:"competencyoutcome_evidence",component:"tool_lp"},{key:"competencyoutcome_recommend",component:"tool_lp"},{key:"competencyoutcome_complete",component:"tool_lp"}]).then(function(b){var c={};c[a.NONE]={code:a.NONE,name:b[0]};c[a.EVIDENCE]={code:a.EVIDENCE,name:b[1]};c[a.RECOMMEND]={code:a.RECOMMEND,name:b[2]};c[a.COMPLETE]={code:a.COMPLETE,name:b[3]};return c})},getString:function getString(b){var c=this,d=c.getAll();return d.then(function(c){if("undefined"==typeof c[b]){return a.Deferred().reject().promise()}return c[b].name})}}});
//# sourceMappingURL=competency_outcomes.min.js.map
/**
* Competency rule config.
*
* @module tool_lp/competency_outcomes
* @copyright 2015 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_lp/competency_outcomes",["jquery","core/str"],(function($,Str){return{NONE:0,EVIDENCE:1,COMPLETE:2,RECOMMEND:3,getAll:function(){var self=this;return Str.get_strings([{key:"competencyoutcome_none",component:"tool_lp"},{key:"competencyoutcome_evidence",component:"tool_lp"},{key:"competencyoutcome_recommend",component:"tool_lp"},{key:"competencyoutcome_complete",component:"tool_lp"}]).then((function(strings){var outcomes={};return outcomes[self.NONE]={code:self.NONE,name:strings[0]},outcomes[self.EVIDENCE]={code:self.EVIDENCE,name:strings[1]},outcomes[self.RECOMMEND]={code:self.RECOMMEND,name:strings[2]},outcomes[self.COMPLETE]={code:self.COMPLETE,name:strings[3]},outcomes}))},getString:function(id){return this.getAll().then((function(outcomes){return void 0===outcomes[id]?$.Deferred().reject().promise():outcomes[id].name}))}}}));
//# sourceMappingURL=competency_outcomes.min.js.map
@@ -1 +1 @@
{"version":3,"sources":["../src/competency_outcomes.js"],"names":["define","$","Str","NONE","EVIDENCE","COMPLETE","RECOMMEND","getAll","self","get_strings","key","component","then","strings","outcomes","code","name","getString","id","all","Deferred","reject","promise"],"mappings":"AAuBAA,OAAM,+BAAC,CAAC,QAAD,CACC,UADD,CAAD,CAEE,SAASC,CAAT,CAAYC,CAAZ,CAAiB,CAOrB,MAAwD,CAEpDC,IAAI,EAFgD,CAGpDC,QAAQ,EAH4C,CAIpDC,QAAQ,EAJ4C,CAKpDC,SAAS,EAL2C,CAapDC,MAAM,CAAE,iBAAW,CACf,GAAIC,CAAAA,CAAI,CAAG,IAAX,CACA,MAAON,CAAAA,CAAG,CAACO,WAAJ,CAAgB,CACnB,CAACC,GAAG,CAAE,wBAAN,CAAgCC,SAAS,CAAE,SAA3C,CADmB,CAEnB,CAACD,GAAG,CAAE,4BAAN,CAAoCC,SAAS,CAAE,SAA/C,CAFmB,CAGnB,CAACD,GAAG,CAAE,6BAAN,CAAqCC,SAAS,CAAE,SAAhD,CAHmB,CAInB,CAACD,GAAG,CAAE,4BAAN,CAAoCC,SAAS,CAAE,SAA/C,CAJmB,CAAhB,EAKJC,IALI,CAKC,SAASC,CAAT,CAAkB,CACtB,GAAIC,CAAAA,CAAQ,CAAG,EAAf,CACAA,CAAQ,CAACN,CAAI,CAACL,IAAN,CAAR,CAAsB,CAACY,IAAI,CAAEP,CAAI,CAACL,IAAZ,CAAkBa,IAAI,CAAEH,CAAO,CAAC,CAAD,CAA/B,CAAtB,CACAC,CAAQ,CAACN,CAAI,CAACJ,QAAN,CAAR,CAA0B,CAACW,IAAI,CAAEP,CAAI,CAACJ,QAAZ,CAAsBY,IAAI,CAAEH,CAAO,CAAC,CAAD,CAAnC,CAA1B,CACAC,CAAQ,CAACN,CAAI,CAACF,SAAN,CAAR,CAA2B,CAACS,IAAI,CAAEP,CAAI,CAACF,SAAZ,CAAuBU,IAAI,CAAEH,CAAO,CAAC,CAAD,CAApC,CAA3B,CACAC,CAAQ,CAACN,CAAI,CAACH,QAAN,CAAR,CAA0B,CAACU,IAAI,CAAEP,CAAI,CAACH,QAAZ,CAAsBW,IAAI,CAAEH,CAAO,CAAC,CAAD,CAAnC,CAA1B,CACA,MAAOC,CAAAA,CACV,CAZM,CAaV,CA5BmD,CAqCpDG,SAAS,CAAE,mBAASC,CAAT,CAAa,CACpB,GAAIV,CAAAA,CAAI,CAAG,IAAX,CACIW,CAAG,CAAGX,CAAI,CAACD,MAAL,EADV,CAGA,MAAOY,CAAAA,CAAG,CAACP,IAAJ,CAAS,SAASE,CAAT,CAAmB,CAC/B,GAA4B,WAAxB,QAAOA,CAAAA,CAAQ,CAACI,CAAD,CAAnB,CAAyC,CACrC,MAAOjB,CAAAA,CAAC,CAACmB,QAAF,GAAaC,MAAb,GAAsBC,OAAtB,EACV,CACD,MAAOR,CAAAA,CAAQ,CAACI,CAAD,CAAR,CAAaF,IACvB,CALM,CAMV,CA/CmD,CAkD3D,CA3DK,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 * Competency rule config.\n *\n * @package tool_lp\n * @copyright 2015 Frédéric Massart - FMCorz.net\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery',\n 'core/str'],\n function($, Str) {\n\n var OUTCOME_NONE = 0,\n OUTCOME_EVIDENCE = 1,\n OUTCOME_COMPLETE = 2,\n OUTCOME_RECOMMEND = 3;\n\n return /** @alias module:tool_lp/competency_outcomes */ {\n\n NONE: OUTCOME_NONE,\n EVIDENCE: OUTCOME_EVIDENCE,\n COMPLETE: OUTCOME_COMPLETE,\n RECOMMEND: OUTCOME_RECOMMEND,\n\n /**\n * Get all the outcomes.\n *\n * @return {Object} Indexed by outcome code, contains code and name.\n * @method getAll\n */\n getAll: function() {\n var self = this;\n return Str.get_strings([\n {key: 'competencyoutcome_none', component: 'tool_lp'},\n {key: 'competencyoutcome_evidence', component: 'tool_lp'},\n {key: 'competencyoutcome_recommend', component: 'tool_lp'},\n {key: 'competencyoutcome_complete', component: 'tool_lp'},\n ]).then(function(strings) {\n var outcomes = {};\n outcomes[self.NONE] = {code: self.NONE, name: strings[0]};\n outcomes[self.EVIDENCE] = {code: self.EVIDENCE, name: strings[1]};\n outcomes[self.RECOMMEND] = {code: self.RECOMMEND, name: strings[2]};\n outcomes[self.COMPLETE] = {code: self.COMPLETE, name: strings[3]};\n return outcomes;\n });\n },\n\n /**\n * Get the string for an outcome.\n *\n * @param {Number} id The outcome code.\n * @return {Promise} Resolved with the string.\n * @method getString\n */\n getString: function(id) {\n var self = this,\n all = self.getAll();\n\n return all.then(function(outcomes) {\n if (typeof outcomes[id] === 'undefined') {\n return $.Deferred().reject().promise();\n }\n return outcomes[id].name;\n });\n }\n };\n\n});\n"],"file":"competency_outcomes.min.js"}
{"version":3,"file":"competency_outcomes.min.js","sources":["../src/competency_outcomes.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 * Competency rule config.\n *\n * @module tool_lp/competency_outcomes\n * @copyright 2015 Frédéric Massart - FMCorz.net\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery',\n 'core/str'],\n function($, Str) {\n\n var OUTCOME_NONE = 0,\n OUTCOME_EVIDENCE = 1,\n OUTCOME_COMPLETE = 2,\n OUTCOME_RECOMMEND = 3;\n\n return {\n\n NONE: OUTCOME_NONE,\n EVIDENCE: OUTCOME_EVIDENCE,\n COMPLETE: OUTCOME_COMPLETE,\n RECOMMEND: OUTCOME_RECOMMEND,\n\n /**\n * Get all the outcomes.\n *\n * @return {Object} Indexed by outcome code, contains code and name.\n * @method getAll\n */\n getAll: function() {\n var self = this;\n return Str.get_strings([\n {key: 'competencyoutcome_none', component: 'tool_lp'},\n {key: 'competencyoutcome_evidence', component: 'tool_lp'},\n {key: 'competencyoutcome_recommend', component: 'tool_lp'},\n {key: 'competencyoutcome_complete', component: 'tool_lp'},\n ]).then(function(strings) {\n var outcomes = {};\n outcomes[self.NONE] = {code: self.NONE, name: strings[0]};\n outcomes[self.EVIDENCE] = {code: self.EVIDENCE, name: strings[1]};\n outcomes[self.RECOMMEND] = {code: self.RECOMMEND, name: strings[2]};\n outcomes[self.COMPLETE] = {code: self.COMPLETE, name: strings[3]};\n return outcomes;\n });\n },\n\n /**\n * Get the string for an outcome.\n *\n * @param {Number} id The outcome code.\n * @return {Promise} Resolved with the string.\n * @method getString\n */\n getString: function(id) {\n var self = this,\n all = self.getAll();\n\n return all.then(function(outcomes) {\n if (typeof outcomes[id] === 'undefined') {\n return $.Deferred().reject().promise();\n }\n return outcomes[id].name;\n });\n }\n };\n});\n"],"names":["define","$","Str","NONE","EVIDENCE","COMPLETE","RECOMMEND","getAll","self","this","get_strings","key","component","then","strings","outcomes","code","name","getString","id","Deferred","reject","promise"],"mappings":";;;;;;;AAuBAA,qCAAO,CAAC,SACA,aACA,SAASC,EAAGC,WAOT,CAEHC,KAPe,EAQfC,SAPmB,EAQnBC,SAPmB,EAQnBC,UAPoB,EAepBC,OAAQ,eACAC,KAAOC,YACJP,IAAIQ,YAAY,CACnB,CAACC,IAAK,yBAA0BC,UAAW,WAC3C,CAACD,IAAK,6BAA8BC,UAAW,WAC/C,CAACD,IAAK,8BAA+BC,UAAW,WAChD,CAACD,IAAK,6BAA8BC,UAAW,aAChDC,MAAK,SAASC,aACTC,SAAW,UACfA,SAASP,KAAKL,MAAQ,CAACa,KAAMR,KAAKL,KAAMc,KAAMH,QAAQ,IACtDC,SAASP,KAAKJ,UAAY,CAACY,KAAMR,KAAKJ,SAAUa,KAAMH,QAAQ,IAC9DC,SAASP,KAAKF,WAAa,CAACU,KAAMR,KAAKF,UAAWW,KAAMH,QAAQ,IAChEC,SAASP,KAAKH,UAAY,CAACW,KAAMR,KAAKH,SAAUY,KAAMH,QAAQ,IACvDC,aAWfG,UAAW,SAASC,WACLV,KACIF,SAEJM,MAAK,SAASE,sBACO,IAAjBA,SAASI,IACTlB,EAAEmB,WAAWC,SAASC,UAE1BP,SAASI,IAAIF"}
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_lp/competency_plan_navigation",["jquery"],function(a){var b=function(b,c,d,e,f){this._baseUrl=c;this._userId=d+"";this._competencyId=e+"";this._planId=f;this._ignoreFirstCompetency=!0;a(b).on("change",this._competencyChanged.bind(this))};b.prototype._competencyChanged=function(b){if(this._ignoreFirstCompetency){this._ignoreFirstCompetency=!1;return}var c=a(b.target).val(),d="?userid="+this._userId+"&planid="+this._planId+"&competencyid="+c;document.location=this._baseUrl+d};b.prototype._competencyId=null;b.prototype._userId=null;b.prototype._planId=null;b.prototype._baseUrl=null;b.prototype._ignoreFirstCompetency=null;return b});
//# sourceMappingURL=competency_plan_navigation.min.js.map
/**
* Event click on selecting competency in the competency autocomplete.
*
* @module tool_lp/competency_plan_navigation
* @copyright 2016 Issam Taboubi <issam.taboubi@umontreal.ca>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_lp/competency_plan_navigation",["jquery"],(function($){var CompetencyPlanNavigation=function(competencySelector,baseUrl,userId,competencyId,planId){this._baseUrl=baseUrl,this._userId=userId+"",this._competencyId=competencyId+"",this._planId=planId,this._ignoreFirstCompetency=!0,$(competencySelector).on("change",this._competencyChanged.bind(this))};return CompetencyPlanNavigation.prototype._competencyChanged=function(e){if(this._ignoreFirstCompetency)this._ignoreFirstCompetency=!1;else{var newCompetencyId=$(e.target).val(),queryStr="?userid="+this._userId+"&planid="+this._planId+"&competencyid="+newCompetencyId;document.location=this._baseUrl+queryStr}},CompetencyPlanNavigation.prototype._competencyId=null,CompetencyPlanNavigation.prototype._userId=null,CompetencyPlanNavigation.prototype._planId=null,CompetencyPlanNavigation.prototype._baseUrl=null,CompetencyPlanNavigation.prototype._ignoreFirstCompetency=null,CompetencyPlanNavigation}));
//# sourceMappingURL=competency_plan_navigation.min.js.map
@@ -1 +1 @@
{"version":3,"sources":["../src/competency_plan_navigation.js"],"names":["define","$","CompetencyPlanNavigation","competencySelector","baseUrl","userId","competencyId","planId","_baseUrl","_userId","_competencyId","_planId","_ignoreFirstCompetency","on","_competencyChanged","bind","prototype","e","newCompetencyId","target","val","queryStr","document","location"],"mappings":"AAuBAA,OAAM,sCAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAW3B,GAAIC,CAAAA,CAAwB,CAAG,SAASC,CAAT,CAA6BC,CAA7B,CAAsCC,CAAtC,CAA8CC,CAA9C,CAA4DC,CAA5D,CAAoE,CAC/F,KAAKC,QAAL,CAAgBJ,CAAhB,CACA,KAAKK,OAAL,CAAeJ,CAAM,CAAG,EAAxB,CACA,KAAKK,aAAL,CAAqBJ,CAAY,CAAG,EAApC,CACA,KAAKK,OAAL,CAAeJ,CAAf,CACA,KAAKK,sBAAL,IAEAX,CAAC,CAACE,CAAD,CAAD,CAAsBU,EAAtB,CAAyB,QAAzB,CAAmC,KAAKC,kBAAL,CAAwBC,IAAxB,CAA6B,IAA7B,CAAnC,CACH,CARD,CAgBAb,CAAwB,CAACc,SAAzB,CAAmCF,kBAAnC,CAAwD,SAASG,CAAT,CAAY,CAChE,GAAI,KAAKL,sBAAT,CAAiC,CAC7B,KAAKA,sBAAL,IACA,MACH,CAJ+D,GAK5DM,CAAAA,CAAe,CAAGjB,CAAC,CAACgB,CAAC,CAACE,MAAH,CAAD,CAAYC,GAAZ,EAL0C,CAM5DC,CAAQ,CAAG,WAAa,KAAKZ,OAAlB,CAA4B,UAA5B,CAAyC,KAAKE,OAA9C,CAAwD,gBAAxD,CAA2EO,CAN1B,CAOhEI,QAAQ,CAACC,QAAT,CAAoB,KAAKf,QAAL,CAAgBa,CACvC,CARD,CAWAnB,CAAwB,CAACc,SAAzB,CAAmCN,aAAnC,CAAmD,IAAnD,CAEAR,CAAwB,CAACc,SAAzB,CAAmCP,OAAnC,CAA6C,IAA7C,CAEAP,CAAwB,CAACc,SAAzB,CAAmCL,OAAnC,CAA6C,IAA7C,CAEAT,CAAwB,CAACc,SAAzB,CAAmCR,QAAnC,CAA8C,IAA9C,CAEAN,CAAwB,CAACc,SAAzB,CAAmCJ,sBAAnC,CAA4D,IAA5D,CAEA,MAA+DV,CAAAA,CAElE,CAlDK,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 * Event click on selecting competency in the competency autocomplete.\n *\n * @package tool_lp\n * @copyright 2016 Issam Taboubi <issam.taboubi@umontreal.ca>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery'], function($) {\n\n /**\n * CompetencyPlanNavigation\n *\n * @param {String} competencySelector The selector of the competency element.\n * @param {String} baseUrl The base url for the page (no params).\n * @param {Number} userId The user id\n * @param {Number} competencyId The competency id\n * @param {Number} planId The plan id\n */\n var CompetencyPlanNavigation = function(competencySelector, baseUrl, userId, competencyId, planId) {\n this._baseUrl = baseUrl;\n this._userId = userId + '';\n this._competencyId = competencyId + '';\n this._planId = planId;\n this._ignoreFirstCompetency = true;\n\n $(competencySelector).on('change', this._competencyChanged.bind(this));\n };\n\n /**\n * The competency was changed in the select list.\n *\n * @method _competencyChanged\n * @param {Event} e\n */\n CompetencyPlanNavigation.prototype._competencyChanged = function(e) {\n if (this._ignoreFirstCompetency) {\n this._ignoreFirstCompetency = false;\n return;\n }\n var newCompetencyId = $(e.target).val();\n var queryStr = '?userid=' + this._userId + '&planid=' + this._planId + '&competencyid=' + newCompetencyId;\n document.location = this._baseUrl + queryStr;\n };\n\n /** @type {Number} The id of the competency. */\n CompetencyPlanNavigation.prototype._competencyId = null;\n /** @type {Number} The id of the user. */\n CompetencyPlanNavigation.prototype._userId = null;\n /** @type {Number} The id of the plan. */\n CompetencyPlanNavigation.prototype._planId = null;\n /** @type {String} Plugin base url. */\n CompetencyPlanNavigation.prototype._baseUrl = null;\n /** @type {Boolean} Ignore the first change event for competencies. */\n CompetencyPlanNavigation.prototype._ignoreFirstCompetency = null;\n\n return /** @alias module:tool_lp/competency_plan_navigation */ CompetencyPlanNavigation;\n\n});\n"],"file":"competency_plan_navigation.min.js"}
{"version":3,"file":"competency_plan_navigation.min.js","sources":["../src/competency_plan_navigation.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 * Event click on selecting competency in the competency autocomplete.\n *\n * @module tool_lp/competency_plan_navigation\n * @copyright 2016 Issam Taboubi <issam.taboubi@umontreal.ca>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery'], function($) {\n\n /**\n * CompetencyPlanNavigation\n *\n * @class\n * @param {String} competencySelector The selector of the competency element.\n * @param {String} baseUrl The base url for the page (no params).\n * @param {Number} userId The user id\n * @param {Number} competencyId The competency id\n * @param {Number} planId The plan id\n */\n var CompetencyPlanNavigation = function(competencySelector, baseUrl, userId, competencyId, planId) {\n this._baseUrl = baseUrl;\n this._userId = userId + '';\n this._competencyId = competencyId + '';\n this._planId = planId;\n this._ignoreFirstCompetency = true;\n\n $(competencySelector).on('change', this._competencyChanged.bind(this));\n };\n\n /**\n * The competency was changed in the select list.\n *\n * @method _competencyChanged\n * @param {Event} e\n */\n CompetencyPlanNavigation.prototype._competencyChanged = function(e) {\n if (this._ignoreFirstCompetency) {\n this._ignoreFirstCompetency = false;\n return;\n }\n var newCompetencyId = $(e.target).val();\n var queryStr = '?userid=' + this._userId + '&planid=' + this._planId + '&competencyid=' + newCompetencyId;\n document.location = this._baseUrl + queryStr;\n };\n\n /** @property {Number} The id of the competency. */\n CompetencyPlanNavigation.prototype._competencyId = null;\n /** @property {Number} The id of the user. */\n CompetencyPlanNavigation.prototype._userId = null;\n /** @property {Number} The id of the plan. */\n CompetencyPlanNavigation.prototype._planId = null;\n /** @property {String} Plugin base url. */\n CompetencyPlanNavigation.prototype._baseUrl = null;\n /** @property {Boolean} Ignore the first change event for competencies. */\n CompetencyPlanNavigation.prototype._ignoreFirstCompetency = null;\n\n return CompetencyPlanNavigation;\n});\n"],"names":["define","$","CompetencyPlanNavigation","competencySelector","baseUrl","userId","competencyId","planId","_baseUrl","_userId","_competencyId","_planId","_ignoreFirstCompetency","on","this","_competencyChanged","bind","prototype","e","newCompetencyId","target","val","queryStr","document","location"],"mappings":";;;;;;;AAuBAA,4CAAO,CAAC,WAAW,SAASC,OAYpBC,yBAA2B,SAASC,mBAAoBC,QAASC,OAAQC,aAAcC,aAClFC,SAAWJ,aACXK,QAAUJ,OAAS,QACnBK,cAAgBJ,aAAe,QAC/BK,QAAUJ,YACVK,wBAAyB,EAE9BX,EAAEE,oBAAoBU,GAAG,SAAUC,KAAKC,mBAAmBC,KAAKF,eASpEZ,yBAAyBe,UAAUF,mBAAqB,SAASG,MACzDJ,KAAKF,4BACAA,wBAAyB,WAG9BO,gBAAkBlB,EAAEiB,EAAEE,QAAQC,MAC9BC,SAAW,WAAaR,KAAKL,QAAU,WAAaK,KAAKH,QAAU,iBAAmBQ,gBAC1FI,SAASC,SAAWV,KAAKN,SAAWc,WAIxCpB,yBAAyBe,UAAUP,cAAgB,KAEnDR,yBAAyBe,UAAUR,QAAU,KAE7CP,yBAAyBe,UAAUN,QAAU,KAE7CT,yBAAyBe,UAAUT,SAAW,KAE9CN,yBAAyBe,UAAUL,uBAAyB,KAErDV"}
+10 -2
View File
@@ -1,2 +1,10 @@
define ("tool_lp/competency_rule",["jquery"],function(a){var b=function(b){this._eventNode=a("<div>");this._ready=a.Deferred();this._tree=b};b.prototype._competency=null;b.prototype._eventNode=null;b.prototype._ready=null;b.prototype._tree=null;b.prototype.canConfig=function(){return this._tree.hasChildren(this._competency.id)};b.prototype.getConfig=function(){return null};b.prototype.getType=function(){throw new Error("Not implemented")};b.prototype.init=function(){return this._load()};b.prototype.injectTemplate=function(){return a.Deferred().reject().promise()};b.prototype.isValid=function(){return!1};b.prototype._load=function(){return a.when()};b.prototype.on=function(a,b){this._eventNode.on(a,b)};b.prototype.setTargetCompetency=function(a){this._competency=a};b.prototype._trigger=function(a,b){this._eventNode.trigger(a,[b])};b.prototype._triggerChange=function(){this._trigger("change",this)};return b});
//# sourceMappingURL=competency_rule.min.js.map
/**
* Competency rule base module.
*
* @module tool_lp/competencyrule
* @copyright 2015 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("tool_lp/competency_rule",["jquery"],(function($){var Rule=function(tree){this._eventNode=$("<div>"),this._ready=$.Deferred(),this._tree=tree};return Rule.prototype._competency=null,Rule.prototype._eventNode=null,Rule.prototype._ready=null,Rule.prototype._tree=null,Rule.prototype.canConfig=function(){return this._tree.hasChildren(this._competency.id)},Rule.prototype.getConfig=function(){return null},Rule.prototype.getType=function(){throw new Error("Not implemented")},Rule.prototype.init=function(){return this._load()},Rule.prototype.injectTemplate=function(){return $.Deferred().reject().promise()},Rule.prototype.isValid=function(){return!1},Rule.prototype._load=function(){return $.when()},Rule.prototype.on=function(type,handler){this._eventNode.on(type,handler)},Rule.prototype.setTargetCompetency=function(competency){this._competency=competency},Rule.prototype._trigger=function(type,data){this._eventNode.trigger(type,[data])},Rule.prototype._triggerChange=function(){this._trigger("change",this)},Rule}));
//# sourceMappingURL=competency_rule.min.js.map
File diff suppressed because one or more lines are too long

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