Compare commits

...

1987 Commits

Author SHA1 Message Date
Jun Pataleta f89a47eff8 Moodle release 3.9.18 2022-11-12 12:55:12 +08:00
Sara Arjona 6a16596f78 weekly release 3.9.17+ 2022-11-11 15:02:06 +01:00
Mathew May 7e22b75c28 MDL-71920 libraries: Migrate LTI lib away from pure curl 2022-11-11 12:55:19 +08:00
Mathew May 7d547f726f MDL-71920 core: update filelib opt name definition 2022-11-11 12:55:19 +08:00
Paul Holden 75c9e608ce MDL-75862 backup: omit sesskey for continue buttons using get method.
It's automatically added by the rendered single_button instance when
using post method, so no need to add it unconditionally.
2022-11-10 10:17:50 +08:00
Jun Pataleta fa8591ea3e Merge branch 'MDL-76054_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-11-09 20:08:49 +08:00
David Woloszyn ae8c5e16e9 MDL-76091 lib: Add additional check to local URLs params 2022-11-09 19:24:56 +08:00
Eloy Lafuente (stronk7) 5425233b37 MDL-76054 environment: Remove the php-xmlrpc extension check
For Moodle 4.1 and up, the php-xmlrpc is not needed anymore:
- All the MNet stuff has been moved to use php library (MDL-76055).
- The webservice/xmlrpc has been moved from core to contrib (MDL-76052).

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

No lang string changes in this branch, only in master (4.1dev).
2022-11-08 16:47:53 +01:00
Stevani Andolo dcc561762b MDL-75278 VideoJS: Update VideoJS to use validation helper 2022-11-08 13:57:20 +00:00
Víctor Déniz 6307f8dd89 weekly release 3.9.17+ 2022-11-08 13:44:57 +00:00
Jun Pataleta 1a3e679835 Merge branch 'MDL-76207-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-11-08 10:25:12 +08:00
Andrew Nicols 6cfdd1bbae Merge branch 'MDL-75880_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-11-07 21:57:45 +08:00
Andrew Nicols 56a368facf MDL-76207 contentbank: Switch to opened window 2022-11-06 21:00:33 +08:00
Eloy Lafuente (stronk7) 4842ae967c MDL-75880 phpunit: fix all @coversDefaultClass missing @covers
Because @coversDefaultClass doesn't indicate any coverage (it's
just an alias to avoid having to write the class name in @covers),
this commit fixes all the files that were using that annotation
and missing any @covers.

Basically, replacing one by the other and done.
2022-11-04 16:51:36 +01:00
Sara Arjona 6f62e05a96 weekly release 3.9.17+ 2022-11-04 14:52:11 +01:00
Jun Pataleta 6f23e028dd Merge branch 'MDL-76103-39' of https://github.com/junpataleta/moodle into MOODLE_39_STABLE 2022-11-04 11:34:02 +08:00
Marina Glancy ff013438d6 MDL-76103 search: skip solr behat tests if solr is not installed 2022-11-04 11:22:27 +08:00
Jun Pataleta 3e0941fb5b Merge branch 'MDL-76072-39' of https://github.com/lameze/moodle into MOODLE_39_STABLE 2022-11-04 10:37:19 +08:00
Simey Lameze e667c191f8 MDL-76072 tool_lp: only init inlineGrader module if user can grade 2022-11-04 08:04:30 +08:00
Sara Arjona 4566a44f14 Merge branch 'MDL-76169-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-11-03 17:06:28 +01:00
Andrew Nicols 8b2c0d969d MDL-76169 behat: Normalise exception message in should (not) steps
These steps have accepted a NodeElement instance as an argument for some
time, but were trying to cast it to string when formulating exception
messages, making it harder to debug and, in the case of the 'should see'
step, not work at all.

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

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

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

Unfortunately these steps cannot be used to replace the existing steps
without manual intervention.
2022-11-03 13:28:51 +08:00
Sara Arjona 4e1d36c8bc weekly release 3.9.17+ 2022-10-28 14:09:25 +02:00
Víctor Déniz 87c2aae85c Merge branch 'MDL-75969-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-10-27 15:45:39 +01:00
Jun Pataleta 8c6831f0fe weekly release 3.9.17+ 2022-10-25 17:17:19 +08:00
Andrew Nicols 5dbc672825 Merge branch 'MDL-76049_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2022-10-25 11:50:46 +08:00
Ilya Tregubov b97d313c11 weekly release 3.9.17+ 2022-10-21 15:33:55 +03:00
Tim Hunt ee0b0b4fc8 MDL-76049 quiz generator: update calendar events for new overrides 2022-10-20 23:44:54 +01:00
Andrew Nicols 5b707aa422 MDL-75985 behat: Return newline character for \n
Somehow part of this commit was lost during the push and/or squash.
2022-10-19 22:02:55 +08:00
Sara Arjona 519ba9e103 Merge branch 'MDL-76010_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-10-19 12:56:39 +02:00
Jun Pataleta c3a318e16a Merge branch 'MDL-75985-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-10-19 10:55:28 +08:00
Eloy Lafuente (stronk7) faf63d076d MDL-76010 behat: New scenario to verify that manual attempts work
This is basically the manual background that was removed in the
previous commit, with 4 attempts here. Note it includes the 2
waits that are REQUIRED to make it pass in too-quick environments.

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

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

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

Also, little detail, amend a dupe scenario name.
2022-10-18 14:28:14 +02:00
Sara Arjona 651a97efc0 weekly release 3.9.17+ 2022-10-18 13:10:01 +02:00
Víctor Déniz cd8af2d23a Merge branch 'MDL-75983_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-10-18 01:09:35 +01:00
Sara Arjona 8b75bb1772 Merge branch 'MDL-72836-39' of https://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2022-10-17 16:40:07 +02:00
Andrew Nicols b672263e04 MDL-75969 behat: Allow the editor field to request a save
Some editors do not immediately store their content to the textarea they
represent and only do so when the form is submitted or they are
requested to.

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

This allows for a wider variety of valid editor output to be handled
using the standard value matching steps in Behat, thus supporting
editors other than Atto better.
2022-10-14 23:44:11 +08:00
Eloy Lafuente (stronk7) c463d72821 MDL-75983 gha: Update used actions to be node16 compatible
Node12 is being deprecated in github for actions:

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

So we need to ensure we are using node16 actions.
2022-10-14 13:28:33 +02:00
Sara Arjona 162053448e weekly release 3.9.17+ 2022-10-14 12:49:26 +02:00
Sara Arjona 2034d440af Merge branch 'MDL-75959-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-10-13 16:03:50 +02:00
Jun Pataleta 70f7efe0fe Merge branch 'MDL-75887-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-10-12 09:22:17 +08:00
Simey Lameze f1447db751 MDL-75887 behat: Add ability to set value regardless of the editor
Prior to this commit, the behat_form_editor integration was hard-coded
to use Atto.

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

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

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

Please note: Behat is unable to determine the current editor in use on
the page automatically.
2022-10-12 06:44:30 +08:00
Andrew Nicols 7fc01a94e2 MDL-75959 customfield: Correct inappropriate class import
I suspect this was an incorrect tab completion import by an IDE which
was missed.
2022-10-12 06:40:26 +08:00
Jun Pataleta 568e72e7dc weekly release 3.9.17+ 2022-10-11 23:16:45 +08:00
Jun Pataleta 5d4db3dce3 Merge branch 'MDL-75909-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-10-10 18:07:58 +08:00
Jun Pataleta e5c7b50d85 Merge branch 'MDL-75922-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-10-10 14:54:04 +08:00
Jun Pataleta 9fda41582c Merge branch 'MDL-75910-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-10-10 11:06:49 +08:00
Simey Lameze bddacfd5d7 MDL-75922 behat: Apply @editor_atto tag to tests requiring Atto
These steps are currently using Atto-specific UI features and must
therefore make use of the @editor_atto tag to ensure that they continue
to run using Atto.

A new issue will be raised to migrate each of these to be
editor-agnostic.
2022-10-09 20:28:07 +08:00
Michael Hawkins f3d9759375 MDL-72836 core: Updated security.txt expiry and policy URL 2022-10-07 14:12:23 +08:00
Andrew Nicols 1d776476b6 weekly release 3.9.17+ 2022-10-07 13:04:06 +08:00
Simey Lameze fca9778023 MDL-75910 core_form: Allow editor field to set a hidden label
When an editor is used in a form as part of a group, it is missing its
label element.

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

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

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

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

This is important in the context of MDL-75887.
2022-10-06 21:49:08 +08:00
Shamim Rezaie 91f43dd47f Merge branch 'MDL-75886-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-10-06 12:25:07 +11:00
Andrew Nicols fa9ba48533 MDL-75886 atto: Always use Atto for @atto tests
This change, which should be easy to mimic for other editors.

This will ensure that the correct editor is used for tests relating to
that editor, or its subplugins.
2022-10-05 09:57:54 +08:00
Jake Dallimore 141657a483 weekly release 3.9.17+ 2022-09-30 10:17:43 +08:00
Jun Pataleta c8be5a9ab3 Merge branch 'MDL-75559-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-09-29 10:53:14 +08:00
Jun Pataleta 507f737266 Merge branch 'MDL-75726_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-09-28 08:12:26 +08:00
Jun Pataleta 6d75761b94 Merge branch 'MDL-75776_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-09-28 08:06:32 +08:00
Eloy Lafuente (stronk7) 52a9113c6d MDL-75726 ci: Bump GHA to Ubuntu 22.04
Have tried to also bump Travis to 22.04 (jammy) but it
was not working ok, with problems trying to find both
PHP and PostgreSQL versions.

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

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

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

Generated using the instructions @ https://docs.moodle.org/dev/Composer
and using PHP 7.2 (always the min version supported) to generate the
lock file.
2022-09-22 17:44:51 +02:00
Eloy Lafuente (stronk7) d9ceef45de weekly release 3.9.17+ 2022-09-22 17:05:56 +02:00
Jun Pataleta 1ad332bbde Merge branch 'MDL-75757_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-09-19 13:01:43 +08:00
Eloy Lafuente (stronk7) d23efa1ff2 MDL-75757 phpunit: Add some tolerance to a few failing assertions
Recently, PHPUnit (all versions) did some changes about how the
comparators worked and this has caused some float comparisons
to stop working.

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

0.00001 has been decided. And applied to all the similar assertions
within the unittest function, so if more cases are added to them
better be copied with the agreed tolerance.
2022-09-18 16:02:18 +02:00
Andrew Nicols bf1ebf3b44 MDL-75559 behat: Sort behat_hooks to top of context list 2022-09-12 12:33:46 +08:00
Eloy Lafuente (stronk7) 33e9b8c394 Moodle release 3.9.17 2022-09-10 12:15:47 +02:00
Jun Pataleta 5bb0f00c0e weekly release 3.9.16+ 2022-09-09 08:36:54 +08:00
Paul Holden 670b636c47 MDL-72012 mod_h5pactivity: respect user access when getting report. 2022-09-08 21:17:57 +08:00
Paul Holden e48460c8cc MDL-75695 mod_h5pactivity: add group filter to attempts report.
This is a backport from MDL-71662.
2022-09-08 17:14:00 +04:00
Michael Hawkins ad5bc5b5ca MDL-68066 output: Apply disable lambda rendering to Mustache renderer 2022-09-07 23:57:05 +08:00
Lars Bonczek 013cb2fb64 MDL-68066 output: Mustache - Add option to disable lambda rendering
This commit is based on an outstanding pull request to the Mustache repo
2022-09-07 23:57:05 +08:00
stevando c4df60bb8d MDL-75283 admin: Update admin user fetching to use sort helper 2022-09-07 13:18:55 +08:00
Paul Holden 786a4956dd MDL-75405 block_html: safer unserialize during old block conversion. 2022-09-06 17:57:15 +02:00
Jun Pataleta 323e272c85 Merge branch 'MDL-75231-39' of https://github.com/lameze/moodle into MOODLE_39_STABLE 2022-09-06 23:49:01 +08:00
Sara Arjona 6e769797fd Merge branch 'MDL-75550-39' of https://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2022-09-05 08:57:43 +02:00
Jun Pataleta 0a48ddad8f Merge branch 'MDL-75641_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-09-05 14:37:02 +08:00
Eloy Lafuente (stronk7) c939cd4b6d MDL-75641 core_lang: Add string for new Europe/Kyiv timezone
With IANA TZDB (timezone database) release 2022b, Europe/Kiev
has been renamed to Europe/Kyiv. So we need to add this string
to our list to keep tests passing.

Note that the old Europe/Kiev continues working (is an alias) and,
also, there are places in core where we are using it. Just we cannot
remove/replace those uses in core until we ensure that everybody is
using PHP 8.0.23 (TZDB 2022b) or more recent versions. Hence,
not changing those uses now.
2022-09-04 10:06:39 +02:00
Ilya Tregubov fd27acfcb1 weekly release 3.9.16+ 2022-09-02 08:49:23 +04:00
Jun Pataleta 9ae0e4a58b Merge branch 'MDL-75019-39' of https://github.com/andelacruz/moodle into MOODLE_39_STABLE 2022-08-31 20:24:37 +08:00
Ilya Tregubov 874472a85d Merge branch 'MDL-74861-39' of https://github.com/andelacruz/moodle into MOODLE_39_STABLE 2022-08-31 11:51:54 +04:00
Michael Hawkins 5f893f890f MDL-75550 lib: Update Mustache const to reflect correct version
Mustache version 2.14.1 is already included, but the VERSION const
incorrectly listed 2.14.0 in the tagged Mustache release. A later
upstream commit corrected this in the library, which this now matches.
2022-08-31 15:29:59 +08:00
Simey Lameze 69e03eacba MDL-75231 files: make bucket calculations more precise
This commit changes changes the unit test calculations to
keep track of the time the bucket starts/finishes bursting
and use milliseconds instead of seconds to have a precise
time to sleep.
2022-08-22 14:24:09 +08:00
Sara Arjona d369112db4 Moodle release 3.9.16 2022-08-19 09:50:36 +02:00
Sara Arjona 62d603a054 weekly release 3.9.15+ 2022-08-18 14:54:24 +02:00
Laurent David 4cb39164fa MDL-75210 mod_quiz: fix sequential quiz access
* As a student I should only be able to access the next question or the current question
* The API should not show more than the current question
* Once the quiz is previewed we can see the question in any order (existing behaviour)
* Related to ticket MDL-71728

Co-authored-by: Rajneel Totaram <rjnlfj@yahoo.com>
Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
2022-08-18 08:08:50 +04:00
Sara Arjona d5e8561011 Merge branch 'MDL-72178-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2022-08-16 16:58:50 +02:00
Mark Johnson 944455bcce MDL-75388 lib: Update mustache to 2.14.1
MDL-67114 local change removed as it is now available upstream.
2022-08-12 04:17:17 +02:00
Petr Skoda ee888615ea MDL-75237 core: improve PARAM_SAFEPATH docs 2022-08-12 04:17:17 +02:00
Petr Skoda 3f58d35337 MDL-75237 qformat_blackboard_six: sanitise blackboard import file paths 2022-08-12 04:17:17 +02:00
Petr Skoda 6983a17fc0 MDL-75237 core: Revert MDL-72029
This reverts commit 9f270d956e.
2022-08-12 04:17:17 +02:00
Petr Skoda ce2d88a951 MDL-75237 qformat_blackboard_six: Revert MDL-72029
This reverts commit 47c211ba0e.
2022-08-12 04:17:17 +02:00
Shamim Rezaie 5a4f73d144 weekly release 3.9.15+ 2022-08-12 11:53:00 +10:00
Noel De Martin 1c8396e2b5 MDL-72178 feedback: Implement behat generators
Based on Andrew's WIP from https://github.com/andrewnicols/moodle/commit/b3d40cb20d1f0edf0bf21077c8f94bce5dec56db

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2022-08-11 10:59:09 +02:00
Jun Pataleta 5668055015 Merge branch 'MDL-74636_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2022-08-09 11:01:00 +08:00
Angelia Dela Cruz 1dfd13841a MDL-74861 behat: H5P behat generators use UI
Replace steps that manually add H5Pactivity instances via the UI
and use Behat generators. This improves the speed of the Behat test
runs.

Co-authored-by: Simey Lameze <simey@moodle.com>
2022-08-08 12:54:02 +08:00
Jun Pataleta 405cd4fb35 Merge branch 'MDL-74211-39' of https://github.com/lameze/moodle into MOODLE_39_STABLE 2022-08-08 11:15:15 +08:00
Ilya Tregubov 2f4b6bd2d7 Merge branch 'MDL-74475-39' of https://github.com/aanabit/moodle into MOODLE_39_STABLE 2022-08-05 13:21:21 +04:00
Ilya Tregubov acf70635c6 weekly release 3.9.15+ 2022-08-05 13:06:07 +04:00
Angelia Dela Cruz 5d15e96a98 MDL-75019 behat: Folder behat generators use UI
Replace steps that manually add Folder instances via the UI and
use Behat generators. This improves the speed of the Behat test
runs.
2022-08-05 15:53:57 +08:00
Marina Glancy e3b1e103bd MDL-74502 behat: when setting a field value it may not be visible
for example in case of editor field, the textarea element is hidden by wysiwyg widget but we still need to be able to set it
2022-08-04 11:10:43 +08:00
Andrew Nicols 8d1867cdcc Merge branch 'MDL-75080-39' of https://github.com/andelacruz/moodle into MOODLE_39_STABLE 2022-08-04 10:45:25 +08:00
Simey Lameze 2cfa9817b1 MDL-74211 behat: convert few more steps to use new data generators 2022-08-04 10:43:36 +08:00
Andrew Nicols 641b8c31ee Merge branch 'MDL-74655-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2022-08-04 10:09:22 +08:00
Noel De Martin 6ce1d39f4e MDL-74655 competency: Implement behat generators 2022-08-03 10:49:41 +02:00
Amaia Anabitarte 9d4fb0a3ad MDL-74475 core_badges: Behat test using new step 2022-08-03 10:30:53 +02:00
Amaia Anabitarte 4110054b51 MDL-74475 behat: Option to jump to course edit page 2022-08-03 10:30:53 +02:00
Tim Hunt dd4d110c9b MDL-74636 behat: step to skip this scenario if a plugin isn't installed 2022-07-29 09:50:56 +01:00
Simey Lameze 017f8ff6bf MDL-74211 behat: replace steps to use new categories page type 2022-07-29 13:24:44 +08:00
Simey Lameze 1ff7beef8f MDL-74211 behat: add course question categories page type 2022-07-29 13:24:35 +08:00
Simey Lameze 35783784b3 MDL-74211 quiz: make use of question data generators 2022-07-29 13:13:46 +08:00
Angelia Dela Cruz 194ca4970a MDL-75080 behat: Chat behat generators use UI
Replace steps that manually add Chat instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2022-07-29 11:51:46 +08:00
Jun Pataleta d4f3852dd2 weekly release 3.9.15+ 2022-07-29 10:56:51 +08:00
Andrew Nicols 3fbbc7a86b Merge branch 'MDL-73788-39' of https://github.com/andelacruz/moodle into MOODLE_39_STABLE 2022-07-26 11:39:02 +08:00
Jun Pataleta 7cff4e8bc1 Merge branch 'MDL-74057-39-fix' of https://github.com/junpataleta/moodle into MOODLE_39_STABLE 2022-07-26 11:11:23 +08:00
Jun Pataleta 827803ea3d MDL-74057 mod_scorm: Fix unnecessary whitespaces at the end of the file 2022-07-26 11:09:00 +08:00
Jun Pataleta ccb639002f Merge branch 'MDL-74057-39' of https://github.com/andelacruz/moodle into MOODLE_39_STABLE 2022-07-26 11:01:37 +08:00
Angelia Dela Cruz df62f09a4c MDL-74057 behat: SCORM behat generators use UI
Replace steps that manually add SCORM instances via the UI and use
Behat generators. This improves the speed of Behat test runs.
2022-07-25 18:01:00 +08:00
Angelia Dela Cruz 7c0a982958 MDL-73788 behat: URL behat generators use UI
Replace steps that manually add URL instances via the UI and use
Behat generators. This improves the speed of Behat test runs.
2022-07-19 09:18:53 +08:00
Víctor Déniz 940e4da0fa weekly release 3.9.15+ 2022-07-14 12:06:16 +01:00
Jun Pataleta ae531ae852 Merge branch 'MDL-71747_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-07-12 10:51:13 +08:00
Jake Dallimore 84d3ae1b08 Moodle release 3.9.15 2022-07-08 11:28:28 +08:00
Eloy Lafuente (stronk7) d51f307ffa MDL-71747 environment: Ensure that check_xmlrpc_usage is in >=39
This is a partial backport of MDL-73270 to ensure that the
check_xmlrpc_usage custom check is present in all the supported
branches and it's applied to all branches able to run php80:

- MOODLE_311_STABLE
- MOODLE_400_STABLE
- master (aka, 4.1 and up)

Note that the whole patch has not been backported, only the
environmental check (xml file and check implementation).
2022-07-07 23:44:36 +02:00
Eloy Lafuente (stronk7) a4018fbcdd MDL-71747 environment: Apply agreed changes
- PHP 7.4 required.
- Moodle 3.9 required.
- MariaDB 10.4 required.
- PostgreSQL 12 required.
- Oracle 19c required.
2022-07-07 19:19:57 +02:00
Eloy Lafuente (stronk7) 2dd34c5ae4 MDL-71747 environment: 4.1 base information
This is a direct copy of the 4.0 information, to
have the changes under control in the next commit.
2022-07-07 19:19:57 +02:00
Jun Pataleta 71f83af13c weekly release 3.9.14+ 2022-07-07 21:33:14 +08:00
Víctor Déniz d587d8b242 Merge branch 'MDL-74835-M39_update-nodejs-version-in-travis-integration-to-lts-gallium' of https://github.com/ziegenberg/moodle into MOODLE_39_STABLE 2022-07-06 12:13:40 +01:00
stevando f1b1570b02 MDL-72171 tool_mobile: Ensure auto login URL is always local 2022-07-06 14:29:10 +08:00
Mihail Geshoski f9ca67a78d MDL-71921 scorm: Sanitize element names before outputting track details 2022-07-01 12:47:18 +02:00
Alex Morris c8f9140e70 MDL-75044 assignfeedback_editpdf: Add SAFER option to GS command
Adds the SAFER option to the Ghostscript command to limit interaction
with IO and OS commands
2022-07-01 12:47:18 +02:00
Huong Nguyen 47c211ba0e MDL-72029 Lesson: Prevent arbitrary file read when importing lesson questions in blackboard format 2022-07-01 12:47:18 +02:00
Huong Nguyen 9f270d956e MDL-72029 lib: Prevent path traversal for clean_param with PARAM_SAFEPATH 2022-07-01 12:47:18 +02:00
Laurent David 32ee8e3d34 MDL-74473 core_analytics: Upgrade ML Backend to 2.6.6 2022-07-01 12:47:18 +02:00
Jake Dallimore 77a1413fa0 MDL-72299 mod_lti: fix html escaping when reposting cross site posts 2022-07-01 12:47:18 +02:00
Víctor Déniz 14760d9787 weekly release 3.9.14+ 2022-07-01 11:28:53 +01:00
Jun Pataleta 03b6b93589 Merge branch 'MDL-74613-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2022-06-30 20:23:48 +08:00
Noel De Martin 47402416fd MDL-74613 grade: Fix undefined behat step 2022-06-30 11:32:35 +02:00
Andrew Nicols 0087cede97 Merge branch 'MDL-75084-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2022-06-30 11:14:09 +08:00
Andrew Nicols 264c405192 Merge branch 'MDL-74613-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2022-06-30 11:05:38 +08:00
Andrew Nicols 1742e0c27c Merge branch 'MDL-74220-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2022-06-30 11:00:59 +08:00
Andrew Nicols 7371cb4838 Merge branch 'MDL-74744-39' of https://github.com/andelacruz/moodle into MOODLE_39_STABLE 2022-06-30 10:56:19 +08:00
Andrew Nicols c1512e8d89 Merge branch 'MDL-74841-39' of https://github.com/andelacruz/moodle into MOODLE_39_STABLE 2022-06-30 10:45:12 +08:00
Jake Dallimore e5aaeed609 Merge branch 'MDL-74674-39' of https://github.com/alfonso-salces/moodle into MOODLE_39_STABLE 2022-06-29 16:45:23 +08:00
Alfonso Salces a950ed04a7 MDL-74674 core: create notification generators 2022-06-29 10:29:33 +02:00
Noel De Martin 964c98c8d9 MDL-75084 blog: Implement behat generators 2022-06-29 09:38:55 +02:00
Jake Dallimore 635389b235 Merge branch 'MDL-74864-39' of https://github.com/dpalou/moodle into MOODLE_39_STABLE 2022-06-29 13:41:31 +08:00
Dani Palou 1385e3bc09 MDL-74864 forum: Allow specifying group in discussions generator 2022-06-28 07:00:18 +02:00
Jun Pataleta 2dc581f717 weekly release 3.9.14+ 2022-06-17 15:30:38 +08:00
Víctor Déniz 4f8369c3f1 Merge branch 'MDL-74242-39-randomize_update_check' of https://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2022-06-14 09:48:51 +01:00
Jun Pataleta 730b405d68 Merge branch 'MDL-74816-39' of https://github.com/dpalou/moodle into MOODLE_39_STABLE 2022-06-14 13:58:29 +08:00
Angelia Dela Cruz 87c04f1e0b MDL-74841 behat: Label behat generators use UI
Replace steps that manually add Label instances via the UI and use
Behat generators. This improves the speed of Behat test runs.
2022-06-10 13:58:46 +08:00
Andrew Nicols f4df13fb6c weekly release 3.9.14+ 2022-06-03 11:06:38 +08:00
Paul Holden 4a8abf77ac MDL-71276 message_email: include alternate email in privacy export. 2022-06-01 18:48:11 +02:00
Noel De Martin 7e48ec1820 MDL-74613 grade: Add missing generators 2022-05-31 18:15:23 +02:00
Jake Dallimore 05087afd40 weekly release 3.9.14+ 2022-05-27 10:02:16 +08:00
Noel De Martin 56afed9678 MDL-74220 data: Implement behat generators 2022-05-26 10:39:38 +02:00
Paul Holden af8c168f78 MDL-73801 backup: set predictably ordered backup next start time.
Prior to this change, the testcase would assert ordering based on
identical fields which could lead to random failures. Set distinct
next start time of course backup, and also remove random ordering
by sorting on defined course order (all other fields being equal).
2022-05-26 12:10:49 +08:00
Dani Palou 4c52746b41 MDL-74816 mod_resource: Allow specify default file name in generator 2022-05-25 10:41:43 +02:00
Angelia Dela Cruz 7768a35366 MDL-74744 behat: Quiz behat generators use UI
Replace steps that manually add Quiz instances via the UI and use
Behat generators. This improves the speed of Behat test runs.
2022-05-24 11:23:21 +08:00
Daniel Ziegenberg 05847affc1 MDL-74835 ci: Update nodejs version in travis integration to lts/gallium
In MDL-73915 the nodejs version was switched to lts/gallium but the
travis integration was not updated.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-05-22 23:55:08 +02:00
Jun Pataleta a63efe42d1 Moodle release 3.9.14 2022-05-07 19:34:47 +08:00
Eloy Lafuente (stronk7) f4b45aa02c weekly release 3.9.13+ 2022-05-06 15:58:44 +02:00
Víctor Déniz 0a2fdafe37 Merge branch 'MDL-74612-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2022-05-05 13:27:03 +01:00
Jake Dallimore fa855204af 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:27:58 +06:00
Michael Hawkins 70cf2159d4 MDL-74333 badges: Check profile criteria valid when reviewing 2022-05-04 12:58:43 +08:00
Ferran Recio 55e08c48c7 MDL-71623 core_search: fix user document visibility 2022-05-02 16:42:02 +06:00
Amaia Anabitarte 8f954b91f4 MDL-74318 core_user: Description field as hidden on profile 2022-05-02 12:27:15 +02:00
Paul Holden bbd4540075 MDL-74204 mod_assign: escape identity fields in allocate marker form. 2022-05-02 12:27:15 +02:00
Víctor Déniz 780a8aa0aa Merge branch 'MDL-73951-39' of https://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2022-05-02 11:13:46 +01:00
Paul Holden c55b5aa305 MDL-74612 cohort: use data generator for populating cohort members. 2022-04-29 16:23:43 +01:00
Michael Hawkins bb822f465a MDL-73951 core: Updated security.txt expiry date
Also updated expiry date format to meet latest standard.
2022-04-29 19:03:10 +08:00
Ilya Tregubov ec1282cd7f weekly release 3.9.13+ 2022-04-08 16:39:57 +06:00
Víctor Déniz 9d0ac7d6ed Merge branch 'MDL-74189-39' of https://github.com/mihailges/moodle into MOODLE_39_STABLE 2022-04-06 22:57:26 +01:00
Mihail Geshoski 9164c896c4 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:40:49 +08:00
Mihail Geshoski 398bcbce55 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:40:49 +08:00
Sara Arjona 7890567fad weekly release 3.9.13+ 2022-04-05 13:24:53 +02:00
Jun Pataleta 41b456e1a2 Merge branch 'MDL-70014_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-04-04 13:56:00 +08:00
Jun Pataleta ce9c32a016 Merge branch 'MDL-74096-39' of https://github.com/ilyatregubov/moodle into MOODLE_39_STABLE 2022-04-04 13:05:21 +08:00
Ilya Tregubov 600b2f01fa MDL-74096 mlbackend_python: Update mlbackend version. 2022-04-04 09:16:44 +06:00
Eloy Lafuente (stronk7) c94868ba12 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:26 +02:00
Sara Arjona db6f627bad weekly release 3.9.13+ 2022-04-01 16:40:51 +02:00
Andrew Nicols c61c666667 Merge branch 'MDL-72446_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-03-31 22:34:20 +08:00
Eloy Lafuente (stronk7) b41d588695 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:22:52 +02:00
Víctor Déniz 48b4929c23 weekly release 3.9.13+ 2022-03-25 15:00:37 +00:00
Sara Arjona 501a4fc35c 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:08 +01:00
David Mudrák f652a2b613 MDL-74242 task: Fix calculation of random minute in the task schedule
The random minute was incorrectly set to a random value from the range
0 - 23 instead of 0 - 59 due to this copy & paste mistake.

This is a backport of MDL-73765 already present in 3.11.
2022-03-20 17:06:51 +01:00
David Mudrák 04d4cbde78 MDL-74242 admin: Check for available updates daily on random time
It's been a mistake to make every Moodle site out there to check for
available update every two hours, on the hour. We are experiencing
server load peaks that are harder and harder to deal with.

The patch addresses this by (1) checking for available updates just once
a day and (2) distributing the checking times randomly around the clock.

This is a backport of MDL-73748 already present in 3.11.
2022-03-20 17:06:51 +01:00
Sara Arjona e9f0baf90e weekly release 3.9.13+ 2022-03-18 16:28:22 +01:00
Sara Arjona 9ce9388c8d 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:49 +01:00
Eloy Lafuente (stronk7) 497f4ee8b9 Merge branch 'MDL-74116-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-03-16 22:19:50 +01:00
Andrew Nicols 6955a9b618 MDL-74116 behat: Fix browser instantiation for Selenium 4 2022-03-16 22:28:29 +08:00
Sara Arjona b75b238591 Merge branch 'MDL-74130_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2022-03-15 12:19:35 +01:00
Jun Pataleta 4e2c4bfaed Moodle release 3.9.13 2022-03-12 12:39:22 +08:00
Ilya Tregubov 7c52eaaf18 weekly release 3.9.12+ 2022-03-11 16:19:54 +06:00
Tim Hunt 47acac9180 MDL-74130 question behat: Update tests to use the new navigation steps 2022-03-10 12:13:44 +00:00
Tim Hunt 351ad0c0e9 MDL-74130 question behat: support I am on ... page or key qbank pages 2022-03-10 09:31:59 +00:00
Jake Dallimore 7c1a3ed76f Merge branch 'MDL-73899-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-03-10 15:35:26 +08:00
Amaia Anabitarte 1cdc2e81f8 MDL-74075 core_badges: Check accepted criterias 2022-03-09 12:31:56 +01:00
Michael Hawkins 5f1b314b50 MDL-74074 badges: Ensure profile criteria exists before completion check 2022-03-08 12:09:16 +00:00
Paul Holden 861b56413f MDL-72972 tool_uploaduser: observe capability to delete users. 2022-03-01 17:24:23 +01:00
cescobedo adad13e029 MDL-71722 h5plib_v124: Add required changes after lib upgrade 2022-02-28 17:29:20 +01:00
cescobedo 0681ffb33a MDL-71722 h5plib_v124: Upgrade ckeditor to 4.17.1 2022-02-28 17:29:20 +01:00
Ilya Tregubov 600029a98c MDL-71703 lib: update phpmailer to 6.5.3 2022-02-25 18:27:16 +01:00
Ilya Tregubov 5adfd0fa46 weekly release 3.9.12+ 2022-02-25 19:23:46 +02:00
Jun Pataleta 62031a875b Merge branch 'MDL-73915-39-terser' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-02-24 16:44:42 +08:00
Andrew Nicols 3140ab71b8 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 6ce5070675 weekly release 3.9.12+ 2022-02-22 11:12:56 +01:00
Andrew Nicols 34638813f1 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:00:41 +08:00
Sara Arjona 44de681d9e Merge branch 'MDL-73883-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2022-02-21 15:35:33 +01:00
Andrew Nicols 466ca1079d MDL-73915 js: Upgrade babel and eslint 2022-02-18 08:52:45 +08:00
Andrew Nicols 97e9f81aa0 MDL-73915 js: Upgrade packages 2022-02-18 08:41:02 +08:00
Andrew Nicols de97a73ede MDL-73915 js: Switch to nodejs lts/gallium 2022-02-18 08:26:17 +08:00
Andrew Nicols bd7971aca9 MDL-73915 js: Upgrade node-sass 2022-02-18 08:21:01 +08:00
Andrew Nicols 9f40a833fb 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:36 +08:00
Sara Arjona bb743c2358 weekly release 3.9.12+ 2022-02-04 18:18:34 +01:00
Jun Pataleta 3c2dc443a6 Merge branch 'MDL-73711_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-02-03 11:14:58 +08:00
Eloy Lafuente (stronk7) 97f2585ea4 MDL-73711 behat: Bump to Behat 3.10.x
Generated with php72, following the instructions at:

https://docs.moodle.org/dev/Composer
2022-01-29 16:20:40 +01:00
Ilya Tregubov 392abd6324 weekly release 3.9.12+ 2022-01-28 20:17:03 +02:00
Sara Arjona b72afc29a0 Merge branch 'MDL-73588_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2022-01-27 17:05:58 +01:00
Eloy Lafuente (stronk7) 18a85f8cbd 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:23:20 +01:00
Frode Petterson e3240e8431 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:52 +01:00
Sara Arjona 3bd1f38249 weekly release 3.9.12+ 2022-01-21 15:00:55 +01:00
Jun Pataleta 1c283d1105 Merge branch 'MDL-73021-39' of git://github.com/andelacruz/moodle into MOODLE_39_STABLE 2022-01-21 11:18:15 +08:00
Eloy Lafuente (stronk7) 983c94d341 Moodle release 3.9.12 2022-01-15 12:14:18 +01:00
Sara Arjona d340080d73 weekly release 3.9.11+ 2022-01-14 11:14:08 +01:00
Paul Holden d6aeb11f74 MDL-72772 gradereport_overview: account for users with parent roles. 2022-01-12 14:20:04 +01:00
Paul Holden 311d7ce594 MDL-72772 gradereport_overview: access checks for viewing grades. 2022-01-12 13:44:21 +08:00
Paul Holden 3f91f38f54 MDL-72367 badges: require sesskey to remove badge alignment. 2022-01-11 14:37:16 +01:00
Dongsheng Cai f64e54a2f3 MDL-71239 calendar: disallow manager role users edit user events 2022-01-11 14:37:16 +01:00
Jun Pataleta e03a5c24ca weekly release 3.9.11+ 2022-01-11 21:29:53 +08:00
Jun Pataleta 9a993a7bed Merge branch 'MDL-69061-39' of https://github.com/junpataleta/moodle into MOODLE_39_STABLE 2022-01-11 11:56:29 +08:00
Adam Pawełczak 63abb48e56 MDL-69061 core: Fix admin path replacement with path to $CFG->admin 2022-01-11 11:33:38 +08:00
Shamim Rezaie 6c70a26c41 Merge branch 'MDL-73272/3.9' of https://github.com/skodak/moodle into MOODLE_39_STABLE 2022-01-07 17:46:42 +11:00
Petr Skoda 99c49bb067 MDL-73272 behat: move behat extension to core 2021-12-31 09:46:30 +13:00
Sara Arjona 504f784ae6 weekly release 3.9.11+ 2021-12-30 11:24:17 +01:00
Víctor Déniz 3b8eb088f3 Merge branch 'MDL-73269/3.9' of https://github.com/skodak/moodle into MOODLE_39_STABLE 2021-12-27 15:26:39 +00:00
Sara Arjona 7e5e4bd6c7 weekly release 3.9.11+ 2021-12-23 16:29:46 +01:00
Jun Pataleta 3adfa34acb Merge branch 'MDL-72701-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-12-23 12:11:15 +08:00
Petr Skoda 61118a9796 MDL-73269 dev: add requirements to composer.json 2021-12-23 07:25:17 +13:00
Angelia Dela Cruz 2cf0f41cba 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 17:09:44 +08:00
Andrew Nicols 80df50ae38 MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:06 +08:00
Shamim Rezaie 8e12159d85 Merge branch 'MDL-73175-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2021-12-20 11:01:00 +11:00
Noel De Martin 1069559e8f MDL-73175 mod_glossary: Add behat generators 2021-12-17 07:53:03 +01:00
Ilya Tregubov 55a40f54c2 weekly release 3.9.11+ 2021-12-07 14:59:46 +02:00
Jun Pataleta 17cc89b121 Merge branch 'MDL-73202-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2021-12-07 10:38:48 +08:00
Eloy Lafuente (stronk7) 22bb5242b3 Merge branch 'MDL-73253-39' of https://github.com/vmdef/moodle into MOODLE_39_STABLE 2021-12-03 18:52:59 +01:00
Víctor Déniz e7823df844 MDL-73253 ci: use setup-node action in GHA 2021-12-03 16:07:19 +00:00
Sara Arjona 6b18b86b4b weekly release 3.9.11+ 2021-12-03 10:26:36 +01:00
Andrew Nicols 55dfe56aae Merge branch 'MDL-72846-39' of https://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2021-12-03 08:30:38 +08:00
Eloy Lafuente (stronk7) 48b85b536e Merge branch 'MDL-72728-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-12-02 18:57:33 +01:00
Noel De Martin 74a6ebbd7b MDL-72846 testing: Add default block generators 2021-12-02 14:56:20 +01:00
Andrew Nicols cee9f65fa6 Merge branch 'MDL-73070_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-12-02 11:25:18 +08:00
Eloy Lafuente (stronk7) a367a3b412 weekly release 3.9.11+ 2021-11-30 19:01:21 +01:00
Noel De Martin f2f320b763 MDL-73202 mod_forum: Add behat generators 2021-11-30 10:08:54 +01:00
Jun Pataleta 0b27697301 Merge branch 'MDL-70274-39-2' of https://github.com/lameze/moodle into MOODLE_39_STABLE 2021-11-29 12:25:37 +08:00
Simey Lameze c80f562a4c MDL-70274 core: fix Validate HTML and WCAG Check links 2021-11-29 12:24:49 +08:00
Paul Holden 43a7584e37 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:55 +00:00
Tim Hunt 99611eff5f MDL-73070 Behat: stop using no-longer-existant classes in behat_hooks 2021-11-23 11:00:07 +00:00
Eloy Lafuente (stronk7) 448a2aa60c weekly release 3.9.11+ 2021-11-19 19:15:33 +01:00
Eloy Lafuente (stronk7) a3066f443a Merge branch 'MDL-71882-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-11-18 23:52:44 +01:00
Andrew Nicols 3723049a5c 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:21:04 +08:00
Eloy Lafuente (stronk7) be9a8bdacb weekly release 3.9.11+ 2021-11-16 14:00:05 +01:00
Eloy Lafuente (stronk7) 88c0d68ffa Merge branch 'MDL-72096-39' of https://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2021-11-15 19:14:14 +01:00
Michael Hawkins 2abc1a4130 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 20:10:05 +08:00
Eloy Lafuente (stronk7) 530c2ac613 weekly release 3.9.11+ 2021-11-12 13:40:41 +01:00
Eloy Lafuente (stronk7) a86e2db5bb Merge branch 'MDL-72696-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-11-10 19:21:32 +01:00
Paul Holden 623e72a092 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:36 +00:00
Andrew Nicols 64a540241c Merge branch 'MDL-73014-39' of https://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-11-08 11:41:45 +08:00
Luca Bösch 1aef32324f MDL-73014 core_lang: Add string for new timezone Pacific/Kanton 2021-11-06 11:33:44 +01:00
Eloy Lafuente (stronk7) b02dd253b8 Moodle release 3.9.11 2021-11-06 10:34:10 +01:00
Ilya Tregubov af1d8d3780 weekly release 3.9.10+ 2021-11-05 19:18:39 +02:00
Huong Nguyen 49c0337a9a MDL-71918 Calendar: Improve capability checks when fetching events 2021-11-05 13:16:15 +08:00
Paul Holden 9bd64d6e0f MDL-70823 qtype_ddwtos: new method for safer feedback unserializing. 2021-11-03 16:58:52 +01:00
Paul Holden a405697840 MDL-70823 mod: safely parse module display options array. 2021-11-03 16:58:52 +01:00
Paul Holden c4010ec81f MDL-70823 blocks: safer unserializing during block restore. 2021-11-03 16:58:52 +01:00
Paul Holden ad524085cd MDL-70823 core: safer alternative for unserializing objects. 2021-11-03 16:58:52 +01:00
Paul Holden 6db35f03c7 MDL-72370 badges: require sesskey to remove related badge. 2021-10-29 17:27:17 +02:00
Ilya Tregubov 2a7beaad88 MDL-70887 mlbackend_python: Update to latest version. 2021-10-29 17:27:17 +02:00
Simey Lameze 9d0d93a9c4 MDL-72571 tool_filetypes: change extension param to PARAM_ALPHANUMEXT 2021-10-29 17:27:17 +02:00
Eloy Lafuente (stronk7) 419ad88eda weekly release 3.9.10+ 2021-10-29 17:10:20 +02:00
Eloy Lafuente (stronk7) 9bf0d5e7d2 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-10-29 17:10:18 +02:00
Shamim Rezaie e6079323bf Merge branch 'MDL-72874-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-10-29 03:37:15 +11:00
Eloy Lafuente (stronk7) a800e3135f Merge branch 'MDL-72913-39' of git://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2021-10-26 17:22:26 +02:00
Noel De Martin 51a1858ed7 MDL-72913 course: Fix require statement 2021-10-26 08:54:44 +02:00
AMOS bot c3892e8746 Automatically generated installer lang files 2021-10-24 00:07:31 +00:00
Ilya Tregubov 114f603d0b weekly release 3.9.10+ 2021-10-22 12:49:08 +02:00
Ilya Tregubov d39bf19539 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-10-22 12:49:08 +02:00
Andrew Nicols 88908f1730 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:30 +08:00
Eloy Lafuente (stronk7) 28fa7418e8 Merge branch 'MDL-72849-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2021-10-19 22:17:31 +02:00
sam marshall 96aad743ea 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 14:30:48 +01:00
Ilya Tregubov 36e130869d Merge branch 'MDL-71270-39' of git://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2021-10-19 14:47:42 +02:00
Michael Hawkins c0dbeb50ba MDL-71270 core: Updated security.txt expiry 2021-10-18 17:14:28 +08:00
AMOS bot 6d716397d6 Automatically generated installer lang files 2021-10-16 00:07:38 +00:00
Shamim Rezaie 8d38d0cee1 weekly release 3.9.10+ 2021-10-16 00:29:29 +11:00
Shamim Rezaie fea492ca6d Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-10-16 00:29:28 +11:00
Jun Pataleta e586a0e678 Merge branch 'MDL-72623_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-10-15 09:46:51 +08:00
Jun Pataleta 3671ba02a1 Merge branch 'MDL-72807_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-10-15 09:08:09 +08:00
Eloy Lafuente (stronk7) 566b0efb80 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:41 +02:00
AMOS bot b0c901e2ee Automatically generated installer lang files 2021-10-13 00:07:27 +00:00
Eloy Lafuente (stronk7) be3202003b 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-08 15:00:19 +02:00
Sara Arjona da908fe1be weekly release 3.9.10+ 2021-10-08 12:43:27 +02:00
Sara Arjona 08da0dbb81 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-10-08 12:43:26 +02:00
AMOS bot 3db0b363bf Automatically generated installer lang files 2021-10-08 00:07:30 +00:00
Eloy Lafuente (stronk7) e7335a9112 Merge branch 'MDL-72621-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-10-07 21:11:04 +02:00
AMOS bot b02efb33f4 Automatically generated installer lang files 2021-10-07 00:07:27 +00:00
Andrew Nicols b2d9a6f57e Merge branch 'MDL-72515-39' of git://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2021-10-06 13:21:38 +08:00
Eloy Lafuente (stronk7) bbbed68f9b weekly release 3.9.10+ 2021-10-02 22:05:21 +02:00
Eloy Lafuente (stronk7) daa742888d Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-10-02 22:05:20 +02:00
Eloy Lafuente (stronk7) c63b8134bf Merge branch 'MDL-72714_39' of git://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-10-02 15:30:19 +02:00
Eloy Lafuente (stronk7) 6c32a7872c 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:10:10 +02:00
Eloy Lafuente (stronk7) ae39d6ba6a 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 11:02:35 +02:00
Andrew Nicols deb231aeaa Merge branch 'MDL-72496-39_assert_tag' of https://github.com/call-learning/moodle into MOODLE_39_STABLE 2021-10-01 07:56:29 +08:00
Víctor Déniz cbbdd85bd8 Merge branch 'MDL-72399_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-09-30 16:10:43 +01:00
Laurent David 0e73be46c0 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:13:06 +02:00
AMOS bot d075ff3b0b Automatically generated installer lang files 2021-09-30 00:07:29 +00:00
Andrew Nicols a96d456b63 MDL-72621 admin: Add environment check for admin deprecation 2021-09-29 22:39:32 +08:00
AMOS bot 0f6a06114d Automatically generated installer lang files 2021-09-28 00:07:47 +00:00
AMOS bot 49baa2bc23 Automatically generated installer lang files 2021-09-24 00:07:48 +00:00
Eloy Lafuente (stronk7) c5f328c546 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 814c80da13.
2021-09-23 19:38:01 +02:00
Ilya Tregubov 921bc07f2b weekly release 3.9.10+ 2021-09-23 18:21:56 +02:00
Ilya Tregubov b32c766da2 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-09-23 18:21:56 +02:00
AMOS bot 793724ef9f Automatically generated installer lang files 2021-09-23 00:07:44 +00:00
Eloy Lafuente (stronk7) 1195705939 Merge branch 'MDL-72593-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-09-22 10:48:37 +02:00
AMOS bot 986440230e Automatically generated installer lang files 2021-09-22 00:07:45 +00:00
Eloy Lafuente (stronk7) e1a3eb2810 Merge branch 'MDL-69364-39-alt' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-09-21 18:19:56 +02:00
Andrew Nicols 6138b34e01 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:59 +08:00
Andrew Nicols bbf30c6751 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:58 +08:00
Andrew Nicols 96edd40beb MDL-69364 enrol: Improve setting of save button 2021-09-20 12:08:09 +08:00
Andrew Nicols b05a56602c MDL-69364 enrol: Improve cohort test 2021-09-20 12:08:09 +08:00
Ilya Tregubov 7e96939f68 weekly release 3.9.10+ 2021-09-17 08:58:38 +02:00
Ilya Tregubov 1b1ffafaa2 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-09-17 08:58:37 +02:00
Ilya Tregubov 25ba14abdd Merge branch 'MDL-72173-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-09-16 15:02:32 +02:00
Andrew Nicols 89fe559d75 MDL-72173 behat: Respect login page preference 2021-09-16 20:47:18 +08:00
Jun Pataleta 2defce84e2 Merge branch 'MDL-72173-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-09-16 15:40:01 +08:00
Andrew Nicols 6b7f92954c MDL-72173 behat: Fix typo Logout <> Log out 2021-09-16 15:03:07 +08:00
Jun Pataleta 1ee5d46c3e Merge branch 'MDL-72173-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-09-16 12:23:25 +08:00
Andrew Nicols d710bba114 MDL-72173 behat: Add tests for login/logout steps 2021-09-16 12:20:37 +08:00
Andrew Nicols ba46337d52 MDL-72173 behat: Automatically log user out on behat login 2021-09-16 12:13:26 +08:00
Andrew Nicols 9448cb11d2 MDL-72173 behat: Add and use behat logout URL 2021-09-16 12:13:25 +08:00
Jun Pataleta 7ea626b4dd Merge branch 'MDL-72589_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-09-16 09:45:39 +08:00
AMOS bot 131ee1d0f0 Automatically generated installer lang files 2021-09-16 00:07:43 +00:00
Eloy Lafuente (stronk7) 7949d265c7 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:29:54 +02:00
Eloy Lafuente (stronk7) 48adc21e71 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:29:47 +02:00
Marina Glancy c4614455f2 MDL-72515 admin: do not call curl unnecessary on plugins page 2021-09-15 11:56:58 +02:00
Andrew Nicols c59450fde9 MDL-72173 behat: Switch to behat login URL 2021-09-13 11:20:35 +08:00
gthomas2 962570b2fd MDL-72173 behat: Add alternative login file for behat 2021-09-13 11:14:01 +08:00
Eloy Lafuente (stronk7) 0ec02c2a67 Moodle release 3.9.10 2021-09-12 12:37:18 +02:00
Eloy Lafuente (stronk7) 8a709503ac weekly release 3.9.9+ 2021-09-11 12:12:28 +02:00
Eloy Lafuente (stronk7) 2c7f5745c6 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-09-11 12:12:27 +02:00
Shamim Rezaie 9a18af46d7 MDL-71240 filter_tex: Add allowlist for filter_tex_sanitize_formula 2021-09-10 18:10:52 +02:00
Jun Pataleta e09160b6db Merge branch 'MDL-72494_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-09-10 23:09:22 +08:00
Mikel Martín 884a9b9706 MDL-72494 theme_boost: Use 'scroll-margin-top' for anchor links
Current anchor link offset fix is not working with 'display:flex' elements

Note this is a backport of MDL-71152 exclusively to 39_STABLE because
the original issue already has been applied to 310, 311 and master.

And seems to workaround a bug in Chrome 93 that is hitting Moodle.
2021-09-10 15:31:26 +02:00
AMOS bot 753b2fb53e Automatically generated installer lang files 2021-09-09 00:07:41 +00:00
AMOS bot 7806835569 Automatically generated installer lang files 2021-09-07 00:07:43 +00:00
Paul Holden a937101b06 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-03 17:07:40 +02:00
Sujith Haridasan 8596b6a299 MDL-71160 auth_db: Use strict comaprison
Use strict comparison to avoid type juggling.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-09-03 17:07:40 +02:00
Paul Holden b5c8188961 MDL-71976 auth_shibboleth: consistent session parsing during logout. 2021-09-03 17:07:40 +02:00
Shamim Rezaie ed3ee9dd5c 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-03 17:07:40 +02:00
Shamim Rezaie 87aaffc3d1 MDL-71240 filter_tex: Support paranoid mode for openin_any in latex 2021-09-03 17:07:40 +02:00
Huong Nguyen 4fae57fc97 MDL-71797 quiz: Improve the checks when fetching user's attempts 2021-09-03 17:07:40 +02:00
Eloy Lafuente (stronk7) 9b9237fde1 Merge branch 'MDL-72478-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-09-03 17:03:32 +02:00
Sara Arjona 6f3450ef1e 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:11 +02:00
Sara Arjona 089f5bb0ec weekly release 3.9.9+ 2021-09-02 11:51:29 +02:00
Jun Pataleta 0391a4afc7 Merge branch 'MDL-72440_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-09-02 09:52:20 +08:00
Eloy Lafuente (stronk7) 0b26fce0b6 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:22:16 +02:00
Andrew Nicols 361070ef5d weekly release 3.9.9+ 2021-08-27 12:00:30 +08:00
Andrew Nicols 81cb18a67c Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-08-27 12:00:29 +08:00
Heena Agheda f4b92ca799 MDL-72187 logstore: record log store's visibility change 2021-08-26 12:57:38 +08:00
sam marshall e563d32ca2 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-08-26 11:37:27 +08:00
Andrew Nicols 2575add511 Merge branch 'MDL-72312_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-08-26 11:28:34 +08:00
AMOS bot 61b3c4b453 Automatically generated installer lang files 2021-08-26 00:07:45 +00:00
Andrew Nicols d82d2bd6d6 Merge branch 'MDL-72014_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-08-24 09:17:17 +08:00
Eloy Lafuente (stronk7) a7a8db38aa Merge branch 'MDL-71055-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-08-23 23:22:51 +02:00
Eloy Lafuente (stronk7) a4e45e8159 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:50:18 +02:00
Eloy Lafuente (stronk7) 814c80da13 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:49:59 +02:00
Andrew Nicols f7ffb41db4 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:47:22 +08:00
AMOS bot c9efe1b1ac Automatically generated installer lang files 2021-08-18 00:07:41 +00:00
AMOS bot 82c845d8d3 Automatically generated installer lang files 2021-08-14 00:07:43 +00:00
Eloy Lafuente (stronk7) 30da75a460 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-12 20:07:10 +02:00
Ilya Tregubov fdb7aa8035 weekly release 3.9.9+ 2021-08-12 16:50:21 +02:00
Ilya Tregubov 4e14e2631c Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-08-12 16:50:20 +02:00
Eloy Lafuente (stronk7) 2ae147c9af Merge branch 'MDL-72265_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-08-12 00:06:21 +02:00
AMOS bot 6cacc0a4a3 Automatically generated installer lang files 2021-08-06 00:07:47 +00:00
Víctor Déniz c66c1a04b5 weekly release 3.9.9+ 2021-08-05 16:27:35 +01:00
Víctor Déniz 06001d9c9d Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-08-05 16:27:34 +01:00
Tim Hunt 9f01ded64e 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 15:50:31 +01:00
Víctor Déniz 7bd088e443 Merge branch 'MDL-72262-39' of git://github.com/ilyatregubov/moodle into MOODLE_39_STABLE 2021-08-04 12:44:23 +01:00
Ilya Tregubov f67020d1c2 MDL-72262 behat: Make alias shorter to fix Oracle failures. 2021-08-02 08:26:50 +02:00
AMOS bot 2bc1e50886 Automatically generated installer lang files 2021-07-31 00:07:46 +00:00
Jun Pataleta a2fe75a270 Moodle release 3.9.9 2021-07-29 10:01:07 +08:00
Ilya Tregubov 6b632fef09 weekly release 3.9.8+ 2021-07-28 16:48:25 +02:00
Ilya Tregubov bc3e140d8b Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-07-28 16:48:25 +02:00
Jun Pataleta b53f12d8c9 Merge branch 'MDL-72203-39' of git://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2021-07-28 11:27:48 +08:00
AMOS bot f9c700eb9f Automatically generated installer lang files 2021-07-28 00:07:44 +00:00
Michael Hawkins 0d3495e6b2 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:27:02 +08:00
David Mudrák 72eac30148 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:22:21 +08:00
David Mudrák e19f451723 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:22:21 +08:00
David Mudrák db0073291b 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:22:21 +08:00
David Mudrák 984e3fc510 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:22:21 +08:00
Ilya Tregubov 698142b1f5 Merge branch 'MDL-72179-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-07-27 12:39:02 +02:00
Andrew Nicols 8669b0ebb7 MDL-72179 behat: Make use of page resolvers 2021-07-24 18:56:38 +08:00
Andrew Nicols 2204ea8afe MDL-72179 behat: Add page resolvers for activity roles/perms 2021-07-23 20:44:26 +08:00
Andrew Nicols 142e12bee7 MDL-72179 behat: Add page resolver for activity names 2021-07-23 20:32:44 +08:00
Andrew Nicols 2bdebbf6e7 MDL-72179 behat: Add activity editing page resolution 2021-07-23 20:32:15 +08:00
Andrew Nicols f47ec5d0a9 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 52da2d6eaa 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 78b0f6e204 MDL-72179 behat: Lowercase all page instance resolvers 2021-07-23 20:28:14 +08:00
Andrew Nicols 7030fa5972 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 2bd53efc1b weekly release 3.9.8+ 2021-07-23 11:31:05 +02:00
Ilya Tregubov 9ccb3a2af9 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-07-23 11:31:04 +02:00
AMOS bot 3354f46fd6 Automatically generated installer lang files 2021-07-22 00:07:52 +00:00
Ilya Tregubov 9fb1e3d300 Merge branch 'MDL-72125-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-07-21 08:02:52 +02:00
Andrew Nicols e4b11bf852 MDL-72125 mod_assign: Use assign submission data generators 2021-07-21 07:37:59 +08:00
Andrew Nicols 28cf3f9119 MDL-72125 mod_assign: Add data generator for assign submissions 2021-07-20 21:38:47 +08:00
Andrew Nicols 1a885a1756 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-20 21:38:47 +08:00
Andrew Nicols 753035e090 MDL-72125 behat: Add get_activity_id() behat generators helper 2021-07-20 21:38:46 +08:00
Andrew Nicols cb98541563 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-20 21:38:46 +08:00
Andrew Nicols 2729301721 MDL-72125 testing: Add helper to run generators as a user 2021-07-20 21:38:46 +08:00
abgreeve 54a2d7df22 weekly release 3.9.8+ 2021-07-16 10:16:44 +08:00
abgreeve 59f97a627f Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-07-16 10:16:43 +08:00
AMOS bot 362c67f84d Automatically generated installer lang files 2021-07-16 00:07:46 +00:00
Eloy Lafuente (stronk7) cbe5ec5a51 Merge branch 'MDL-72139-39' of git://github.com/cescobedo/moodle into MOODLE_39_STABLE 2021-07-14 14:50:10 +02:00
cescobedo 201eff4d98 MDL-72139 core_message: Fix encoding UTF-8 in prevent unclosed tags 2021-07-14 07:41:33 +02:00
Sara Arjona 22e52ebb55 Merge branch 'MDL-71782_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-07-13 16:44:53 +02:00
Jun Pataleta 493d3c218e Merge branch 'MDL-72036-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-07-13 16:04:57 +08:00
Sara Arjona 97ff875c83 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:57 +02:00
AMOS bot 8a5601722d Automatically generated installer lang files 2021-07-11 00:07:43 +00:00
Eloy Lafuente (stronk7) 68aa19ba73 Moodle release 3.9.8 2021-07-10 18:55:57 +02:00
Eloy Lafuente (stronk7) c8d12c3217 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:51:07 +02:00
AMOS bot f9d08701fb Automatically generated installer lang files 2021-07-09 00:07:52 +00:00
Eloy Lafuente (stronk7) 324e1fbb78 weekly release 3.9.7+ 2021-07-08 23:44:00 +02:00
Eloy Lafuente (stronk7) b58a4e8da4 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-07-08 23:43:58 +02:00
Jun Pataleta e7c0ddb942 Merge branch 'MDL-71919-39-fix' of https://github.com/cescobedo/moodle into MOODLE_39_STABLE 2021-07-08 23:34:54 +02:00
Jun Pataleta e9d63ac29c Merge branch 'MDL-70594_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-07-08 23:34:54 +02:00
cescobedo fce440eeed MDL-71919 core_message: Fix tests in message_send 2021-07-08 23:34:54 +02:00
Huong Nguyen 5fae2fc7a1 MDL-71922 file: Enhance endless recursion requests protection 2021-07-08 23:34:54 +02:00
cescobedo 913eb31830 MDL-71919 core_message: Fix unclosed html tags in email notification 2021-07-08 23:34:54 +02:00
Paul Holden 68fbcaf303 MDL-71957 auth_shibboleth: safer session retrieval during logout. 2021-07-08 23:34:54 +02:00
Dongsheng Cai 20403e0e43 MDL-71978 core_calendar: only allow owner to edit user subscriptions 2021-07-08 23:34:54 +02:00
Adrian Greeve 2740e06920 Merge branch 'MDL-71887-39' of https://github.com/snake/moodle into MOODLE_39_STABLE 2021-07-08 23:34:53 +02:00
Mihail Geshoski a84b51046a MDL-58393 core: Remove firstname argument from emailconfirmation string 2021-07-08 23:34:53 +02:00
Sujith Haridasan a19092e71c MDL-71241 course: Validate and sanitize sort arguments
Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-07-08 23:34:39 +02:00
Mihail Geshoski b41a748a98 MDL-71242 core_course: Fix failing unit test 2021-07-08 23:34:39 +02:00
Mihail Geshoski cd96cb300e 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:34:39 +02:00
Mihail Geshoski e3c031023f 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:34:39 +02:00
Mihail Geshoski c5b4da7257 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:34:26 +02:00
Claude Vervoort 7edc33a8ce MDL-71887 mod_lti: repost when no cookie due to crosssite request 2021-07-07 14:19:00 +08:00
Michael Hawkins 61e9318339 MDL-71916 lib: Check cURL redirects for blocked URLs before following 2021-07-06 23:45:24 +02:00
cescobedo f254b2b88f MDL-71917 core_message: Use $USER in WS delete_message_for_all_users 2021-07-06 13:32:08 +08:00
Paul Holden 264fe69743 MDL-71981 user: escape identity fields if writer supports HTML. 2021-07-06 09:29:44 +08:00
Paul Holden 80e2f8473e MDL-71981 dataformat: indicate HTML support in writer callback. 2021-07-06 09:29:44 +08:00
Eloy Lafuente (stronk7) b9b5f4b489 MDL-70594 environment: Apply agreed changes
- PostgreSQL 10 required.
- Exif PHP extension recommended.
2021-07-01 22:42:30 +02:00
Eloy Lafuente (stronk7) dc871f251e 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:42:30 +02:00
AMOS bot f972485484 Automatically generated installer lang files 2021-06-23 00:07:48 +00:00
AMOS bot 1f9488ccb5 Automatically generated installer lang files 2021-06-19 00:07:49 +00:00
Víctor Déniz 1d8512bc0e weekly release 3.9.7+ 2021-06-17 14:55:05 +01:00
Víctor Déniz b751583087 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-06-17 14:55:04 +01:00
Andrew Nicols 94b897a176 Merge branch 'MDL-71939_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-06-16 13:14:34 +08:00
Jun Pataleta 4c6b771c2f MDL-71939 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-71876 that is a backport of MDL-71337
2021-06-15 23:34:32 +02:00
Andrew Nicols b8122e1de3 Merge branch 'MDL-71804_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-06-15 11:28:45 +08:00
AMOS bot a9eae7edf4 Automatically generated installer lang files 2021-06-10 00:07:42 +00:00
Eloy Lafuente (stronk7) a7a9150b62 MDL-71804 travis: Bump to bionic 2021-05-29 10:26:34 +02:00
AMOS bot c283ed04e0 Automatically generated installer lang files 2021-05-29 00:07:42 +00:00
AMOS bot f65e706662 Automatically generated installer lang files 2021-05-27 00:07:43 +00:00
AMOS bot 49e1731fbe Automatically generated installer lang files 2021-05-24 00:07:43 +00:00
AMOS bot cd320b32b5 Automatically generated installer lang files 2021-05-23 00:07:40 +00:00
Sara Arjona 8dea153c6b weekly release 3.9.7+ 2021-05-20 11:09:11 +02:00
Sara Arjona ae9fea0b47 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-05-20 11:09:10 +02:00
Jun Pataleta dc9258574d Merge branch 'MDL-71157-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-05-20 12:29:36 +08:00
Eloy Lafuente (stronk7) 5b94aaed06 Merge branch 'MDL-67935-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-05-19 22:50:53 +02:00
Sara Arjona a099c8d921 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:38:28 +02:00
Andrew Nicols 36a3c41b8b MDL-71157 core: Pending JS in paged content bars 2021-05-19 12:38:27 +02:00
AMOS bot d7208f8dd0 Automatically generated installer lang files 2021-05-18 00:07:55 +00:00
Sara Arjona df9c7f755d MDL-67935 tool_lp: fix random errors with login/logout 2021-05-14 10:53:25 +02:00
AMOS bot a76583296b Automatically generated installer lang files 2021-05-14 00:07:50 +00:00
Sara Arjona b56affcfe6 weekly release 3.9.7+ 2021-05-11 12:42:36 +02:00
Sara Arjona 4799f8b7c4 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-05-11 12:42:35 +02:00
AMOS bot 62758b8224 Automatically generated installer lang files 2021-05-11 00:07:51 +00:00
Víctor Déniz cf6aeae427 Merge branch 'MDL-71060-39' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_39_STABLE 2021-05-10 23:43:30 +01:00
Thong Bui 8ea5b30a5d MDL-71060 Questions: Duplicates 'Current category' text. 2021-05-10 00:25:38 +07:00
Eloy Lafuente (stronk7) 270f52bf55 Moodle release 3.9.7 2021-05-08 16:40:39 +02:00
Eloy Lafuente (stronk7) 1affa30299 weekly release 3.9.6+ 2021-05-07 16:54:47 +02:00
Eloy Lafuente (stronk7) f61b2edde0 NOBUG: Fixed SVG browser compatibility 2021-05-07 16:54:46 +02:00
Eloy Lafuente (stronk7) d1b2674eea Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-05-07 16:54:46 +02:00
abgreeve 849f392f3b Merge branch 'MDL-68747-39' of https://github.com/dcai/moodle into MOODLE_39_STABLE 2021-05-07 11:46:50 +08:00
Mathew May 2c73122c60 MDL-70622 mod_lti: Tighten redirect param typing 2021-05-07 11:46:50 +08:00
Adam Olley 3b6104d6dc MDL-70622 mod_lti: Prevent xss on lti 1.3 authentication script
Without this, people can craft URLs that other users might use not realising
what they do - and as a XSS vulnerability, it could do any number of things the
clicking-user has access to do on the site.

Change-Id: I82adc71e8706d8929011b4b24523d5b62b8ccea1
2021-05-07 11:46:41 +08:00
Jun Pataleta be2eb84be9 Merge branch 'MDL-71395-39-2' of git://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2021-05-07 10:30:52 +08:00
abgreeve 711b1a5ae9 Merge branch 'MDL-70181_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-05-07 10:22:50 +08:00
Víctor Déniz df136f7535 Merge branch 'MDL-71303-39' of https://github.com/StudiUM/moodle into MOODLE_39_STABLE 2021-05-06 23:34:49 +01:00
Eloy Lafuente (stronk7) 6c996b1570 Merge branch 'MDL-70049-39_count_submissions' of https://github.com/agrowe/moodle into MOODLE_39_STABLE 2021-05-06 23:27:31 +02:00
Eloy Lafuente (stronk7) f01179355c Merge branch 'MDL-70772-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-05-06 23:20:20 +02:00
Eloy Lafuente (stronk7) 414102ed74 Merge branch 'MDL-71313_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-05-06 23:15:18 +02:00
Eloy Lafuente (stronk7) 24cd545eb8 Merge branch 'MDL-71343-m39' of https://github.com/rjnl/moodle into MOODLE_39_STABLE 2021-05-06 23:07:54 +02:00
Sara Arjona bcf349ed45 MDL-70110 mod_assign: make phpunit test DB order agnostic 2021-05-06 19:38:57 +02:00
Sara Arjona ae221af121 Merge branch 'MDL-71491-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-05-06 18:42:41 +02:00
Marina Glancy 4f87b28436 MDL-71395 core: fix bug in google lib wrapper
because of changes in PHP8 the '' == 0 is no longer true and the error in the google api wrapper was discovered
2021-05-06 18:38:42 +02:00
Sara Arjona b3a66b1484 Merge branch 'MDL-71420_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-05-06 17:58:40 +02:00
Víctor Déniz 52b5aa5a18 Merge branch 'MDL-71402-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-05-06 16:47:12 +01:00
Marina Glancy de6a44d7d0 MDL-71395 block_tag_youtube: sometimes exception may have empty message 2021-05-06 17:41:47 +02:00
Paul Holden 21941c6c2a MDL-71491 repository_flickr: return more file data.
See also 643b0cca.
2021-05-06 16:37:19 +01:00
Sara Arjona 54da1506a1 Merge branch 'MDL-71268-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-05-06 17:11:45 +02:00
Paul Holden 7f3a1dff28 MDL-71402 availability: fix group restriction button in mod form.
* The button to "Add group/grouping access restriction" under
   common module settings should only be present if corresponding
   availability plugins are enabled; and
 * Prevent the same button behaving as a submit button, which
   intercepted the user hitting return in the form and added a
   restriction without deliberate action taken by the user.
2021-05-06 14:20:29 +01:00
Sara Arjona 818182879a Merge branch 'MDL-70110-39' of https://github.com/septatrix/moodle into MOODLE_39_STABLE 2021-05-06 13:16:20 +02:00
Víctor Déniz e995073997 Merge branch 'MDL-71434-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-05-06 11:15:29 +01:00
Sara Arjona bc47266a65 Merge branch 'MDL-71390-39' of git://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2021-05-06 08:05:26 +02:00
Adrian Greeve 799e988f80 Merge branch 'MDL-70786-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-05-06 10:04:26 +08:00
AMOS bot 9bae0ce6a7 Automatically generated installer lang files 2021-05-06 00:07:53 +00:00
Eloy Lafuente (stronk7) d6a633d7a8 MDL-71420 environment: Lower sodium requirement to recommended 2021-05-05 23:06:22 +02:00
Sara Arjona 16dff14e56 Merge branch 'MDL-71517-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-05-05 12:18:03 +02:00
Sara Arjona c0d26fff0d Merge branch 'MDL-71187-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-05-05 12:14:23 +02:00
Víctor Déniz 3698f34fc3 Merge branch 'MDL-71460-39' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2021-05-05 10:45:53 +01:00
Paul Holden e52ec9edd4 MDL-71517 mod_data: remove invalid form custom data access.
On PHP7.4, trying to access array offsets of NULL triggers a notice.
2021-05-05 10:18:18 +01:00
Luca Bösch 63b4929729 MDL-71187 quizaccess_seb: Change "Launch Safe Exam Browser" to a href.
In order to allow for correct seb:// or sebs:// calls without browser
warnings of insecure links, it is not possible to send a get request
with an attached cmid parameter to the unknown seb:// or sebs://
URL via a form button.
We've got to use a <a href> link outside a form to circumvent
browsers warning of an insecure link and call Safe Exam Browser
correctly.
2021-05-05 10:54:24 +02:00
Leon Stringer 3afbffe6a0 MDL-70181 database: Quote database object names
Table names and database name now enclosed in backticks.
admin/cli/mysql_collation.php failed if $CFG->prefix was blank with
MySQL 8.0 because table 'groups' conflicted with a new reserved word.

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

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

Also, when testing this patch https://tracker.moodle.org/browse/MDL-71512
was discovered and will need to be fixed to make core 100% compliant
with MySQL 8.0 and MariaDB 10.6 and up.
2021-05-05 10:16:59 +02:00
Peter Dias 1dd574efd8 MDL-71460 hub: Use checkboxes instead of dropdowns
Change the yes/no dropdowns to a checkbox. Defaults to unchecked.
2021-05-05 10:28:02 +08:00
Víctor Déniz a426320c54 Merge branch 'MDL-70864-39-zip_packer_windows' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2021-05-05 00:04:07 +01:00
Eloy Lafuente (stronk7) 3dea860e64 Merge branch 'MDL-71425-39-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2021-05-04 23:40:20 +02:00
Paul Holden 69f3e0753e MDL-71359 mod_forum: empty forums shouldn't export anything. 2021-05-04 17:23:49 +02:00
Sara Arjona 690bad040a MDL-71408 h5plib_v124: Add required changes after lib upgrade
- The mbstring extension is required since Moodle 3.9 onwards so
the upgrading steps have been removed because they are not
required any more.
- The pull-request for fixing some minor PHP7.4 problems has been
integrated so this patch is not required.
2021-05-04 17:23:49 +02:00
Sara Arjona 22c30c160e MDL-71408 h5plib_v124: Upgrade H5P core library to 1.24.02 2021-05-04 17:23:49 +02:00
Huong Nguyen b28b6066b4 MDL-70720 Quiz: Improve capability checks when fetching users' best grades 2021-05-04 17:23:49 +02:00
Shamim Rezaie c4e993d546 MDL-69028 repository: Put a rate limit on draft file uploads 2021-05-04 17:23:49 +02:00
Paul Holden 5b7d2a1992 MDL-71130 quiz_grading: escape user idnumber on display. 2021-05-04 17:23:49 +02:00
David Mudrák 23846c5450 MDL-70804 mnet: Use proper DML method to get records from the table
This improves the code and avoids the risk of SQL injection through the
malicious XML-RPC request from the MNet peer.
2021-05-04 17:23:49 +02:00
Sara Arjona b6d65c77cf Merge branch 'MDL-71274-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2021-05-04 17:10:55 +02:00
David Mudrák f77ec5e7fd MDL-71425 lang: Fix reworded strings in tests 2021-05-04 16:59:21 +02:00
Helen Foster 9031cf789d MDL-71425 lang: Import fixed English strings (en_fix) 2021-05-04 16:59:04 +02:00
Luca Bösch 010aa5ee16 MDL-70786 report_loglive: respect fullname setting. 2021-05-04 14:30:33 +02:00
Luca Bösch 2014c08636 MDL-70786 report_log: respect fullname setting. 2021-05-04 14:30:33 +02:00
Luca Bösch f5531458aa MDL-70786 report_completion: respect fullname setting. 2021-05-04 14:30:33 +02:00
Luca Bösch a6e2d950e7 MDL-70786 report_competency: respect fullname setting. 2021-05-04 14:30:33 +02:00
Luca Bösch dddc4cc410 MDL-70786 report_progress: respect fullname setting. 2021-05-04 14:30:33 +02:00
Luca Bösch 2e16fca0f1 MDL-71268 graphics: Use new Moodle logo for RSS feeds by Moodle 2021-05-04 14:14:10 +02:00
Sara Arjona 30d1832f45 weekly release 3.9.6+ 2021-05-04 13:27:53 +02:00
Sara Arjona 24c44b38be Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-05-04 13:27:52 +02:00
Adrian Greeve d848c604dd Merge branch 'MDL-66673-MOODLE_39_STABLE' of https://github.com/ScottVerbeek/moodle into MOODLE_39_STABLE 2021-05-04 15:47:08 +08:00
AMOS bot 9a4034f3bf Automatically generated installer lang files 2021-05-04 00:07:53 +00:00
Paul Holden 4c1d448b5b MDL-71463 dml: escape square brackets for SQL Server LIKE operator. 2021-05-03 19:01:24 +02:00
David Mudrák f92e83fe36 MDL-70864 files: Fix zip_packer extracting files with trailing dots
File and folder names cannot end with dots on Windows. So replace the
trailing dots with underscore consistently with how some other zip tools
(such as 7-zip) handle this case.
2021-05-03 18:15:44 +02:00
Marina Glancy d500b5c62d MDL-71390 core: raise max_input_vars requirement for Moodle 3.11 2021-05-03 13:29:52 +02:00
Adrian Greeve 65fad5f93f Merge branch 'MDL-71440-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2021-05-03 16:04:05 +08:00
Mihail Geshoski 7ea8dc7112 MDL-71440 mod_assign: New capability for viewing the submission summary
Creates a new capability mod/assign:viewownsubmissionsummary which will
be required in order to display the submission summary to the user in
the assignment page.
2021-05-03 15:33:55 +08:00
Jake Dallimore 276476233d Merge branch 'MDL-52724-39' of git://github.com/merrill-oakland/moodle into MOODLE_39_STABLE 2021-05-03 13:25:51 +08:00
Víctor Déniz a565c5d93d Merge branch 'MDL-69956-39' of https://github.com/dcai/moodle into MOODLE_39_STABLE 2021-05-01 13:43:55 +01:00
Víctor Déniz a72e1f1e0d weekly release 3.9.6+ 2021-04-30 12:54:26 +01:00
Rajneel Totaram 2d86d87012 MDL-71343 core_h5p: Convert all line-endings to UNIX format 2021-04-30 23:32:05 +12:00
Andrew Nicols 27ea958dfe MDL-71343 core_h5p: Add unit test for helper::parse_js_array
Signed-off-by: Rajneel Totaram <rjnlfj@yahoo.com>
2021-04-30 23:31:37 +12:00
Dongsheng Cai 2410df1fd2 MDL-69956 forum: throw exception when advanced grading is not ready 2021-04-30 14:59:42 +10:00
Adrian Greeve ccb1a3b39f Merge branch 'MDL-71481-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-30 11:20:17 +08:00
Jun Pataleta ce2058c4c2 Merge branch 'MDL-70947-39' of git://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2021-04-30 10:34:30 +08:00
Sara Arjona b7fb146cca Merge branch 'MDL-60331-39_take3' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-04-29 17:50:06 +02:00
Amaia Anabitarte 2695a394fe MDL-71274 analytics: Don't generate insight for hidden courses
Hidden courses can be used for training
but we do not want to generate insights for them
because students do not have access to hidden courses.
This was fixed in MDL-66806 for "Students at risk" model.
Fixed for "Students who have not accessed the course recently" in this issue.
2021-04-29 11:14:12 +02:00
Paul Holden 05e9ae07cd MDL-71481 repository_flickr_public: return more file data.
A HTTP HEAD request is required to get the image filesize.
The remaining data can be obtained from existing calls to
the Flickr API.
2021-04-29 09:49:24 +01:00
Sara Arjona c14603ecd1 Merge branch 'MDL-71016-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-29 09:21:58 +02:00
Jun Pataleta 5d2d5bc542 Merge branch 'MDL-70863-39' of git://github.com/jleyva/moodle into MOODLE_39_STABLE 2021-04-29 15:05:22 +08:00
Andrew Nicols 3d92acac8a Merge branch 'MDL-56609_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-04-29 09:42:14 +08:00
Víctor Déniz ac115326f9 Merge branch 'MDL-71200-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-28 20:57:59 +01:00
Paul Holden cb94a54412 MDL-71016 gradeexport_xml: ensure user/grade idnumbers are encoded. 2021-04-28 19:04:03 +01:00
Luca Bösch 0c2e30809a MDL-60331 questions: prevent double escaping question categories. 2021-04-28 17:59:59 +02:00
Sara Arjona a6c9132e73 Merge branch 'MDL-70979-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-28 13:06:30 +02:00
Sara Arjona 323276969f Merge branch 'MDL-71127-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-28 12:58:35 +02:00
Sara Arjona 18a99edcb9 Merge branch 'MDL-70763-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-28 12:31:13 +02:00
Septatrix 9d6fff9671 MDL-70110 assign: add group submission attemptnumber test 2021-04-28 11:49:53 +02:00
Sara Arjona c4dad5b5e6 Merge branch 'MDL-71244-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-04-28 09:17:46 +02:00
Andrew Nicols 9c4204c96b Merge branch 'MDL-71168-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-28 10:50:33 +08:00
Andrew Nicols 15da5ba48e MDL-70909 mod_h5pactivity: Whitespace fix 2021-04-28 10:34:00 +08:00
Andrew Nicols c7e65064b1 Merge branch 'MDL-70909-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2021-04-28 10:33:54 +08:00
Andrew Nicols 32702452e7 Merge branch 'MDL-71386-39' of git://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2021-04-28 10:16:02 +08:00
Eloy Lafuente (stronk7) 2e1151bbb3 MDL-56609 phpunit: Fix bogus expectation on DST changes day
Current test works ok every day of the year but the day of
DST begin changes (last Sunday of March currently).

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

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

Note this only happens for the current test on DST begins, the
opposite change (DST ends), happening the last Sunday of October
is not affected, because, at all effects, 01:00 is a perfectly normal
and existing hour.
2021-04-27 18:31:05 +02:00
Luca Bösch 2e7cc5e17c MDL-71244 enrol_manual: Add bootstrap classes to buttons 2021-04-27 17:24:51 +02:00
Ferran Recio 513ac0c086 MDL-70909 mod_h5pactivity: fix reports on freeze context 2021-04-27 15:44:25 +02:00
Ferran Recio 9f7752d6bc MDL-70909 behat: context freeze and not freeze steps 2021-04-27 15:44:25 +02:00
Ferran Recio 79071cdd87 MDL-70909 core: add cannotmatchanyrows to capabilities join 2021-04-27 15:44:25 +02:00
Sara Arjona 69962f36d7 weekly release 3.9.6+ 2021-04-27 15:14:56 +02:00
Víctor Déniz 76ef9c5d1a Merge branch 'MDL-65687-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-27 01:13:36 +01:00
Víctor Déniz b67b742e40 Merge branch 'MDL-71003-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-27 00:38:48 +01:00
Sara Arjona eece2df651 Merge branch 'MDL-70917-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-26 15:18:17 +02:00
Sara Arjona 61ef211525 Merge branch 'MDL-71416-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-26 12:35:56 +02:00
Eloy Lafuente (stronk7) 535fcef31e Merge branch 'MDL-70446-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2021-04-26 10:45:26 +02:00
Paul Holden 817757c088 MDL-71434 mod_data: add form control class to template textarea. 2021-04-25 18:35:05 +01:00
Tim Schroeder 054d5c0f04 MDL-70110 assign: fixed ws get_submissions for groups 2021-04-24 12:12:01 +02:00
Paul Holden adcd50bea0 MDL-71416 report_log: user context header should show users name.
Co-Authored-By: Luca Bösch <luca.boesch@bfh.ch>
2021-04-23 20:24:39 +01:00
Sara Arjona 3018a35249 weekly release 3.9.6+ 2021-04-23 10:47:01 +02:00
Jun Pataleta 1d217301ad Merge branch 'MDL-71171_39' of git://github.com/mdjnelson/moodle into MOODLE_39_STABLE 2021-04-23 12:40:29 +08:00
Mark Nelson 4dc6c7a79d MDL-71171 customfield_text: ensure we set defaults properly 2021-04-23 12:37:49 +08:00
Andrew Nicols 6d6a39e34d Merge branch 'MOODLE_39_STABLE-MDL-71376' of https://github.com/rjnl/moodle into MOODLE_39_STABLE 2021-04-23 11:53:36 +08:00
Andrew Nicols 1b169c82be Merge branch 'MDL-70970-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-23 11:39:52 +08:00
ScottVerbeek 91376cdb69 MDL-66673 groups: Stop notice when messaging system is disabled 2021-04-23 08:55:09 +10:00
Sara Arjona 3f5477f8a0 Merge branch 'MDL-71136_39' of https://github.com/TomoTsuyuki/moodle into MOODLE_39_STABLE 2021-04-22 13:56:55 +02:00
Sara Arjona 2166e3e681 Merge branch 'MDL-71400-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2021-04-22 13:16:44 +02:00
Jun Pataleta 9e3b15f31e Merge branch 'MDL-71170_39' of git://github.com/mdjnelson/moodle into MOODLE_39_STABLE 2021-04-22 18:54:41 +08:00
Noel De Martin dfe187a59d MDL-71386 behat: Support for 3.9.5+ mobile app 2021-04-22 12:16:25 +02:00
Paul Holden 45725c2408 MDL-71200 mod_folder: ensure "Download folder" option is backed up. 2021-04-22 10:29:04 +01:00
Paul Holden 8aea2ef66b MDL-70979 search: validate external user search parameters.
Clean return value in unit test for same.
2021-04-22 10:23:10 +01:00
Mihail Geshoski f065061f08 MDL-71400 assignfeedback_offline: Fix message after worksheet upload 2021-04-22 13:08:59 +08:00
Jun Pataleta 92df285f49 Merge branch 'MDL-71156-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2021-04-22 11:53:53 +08:00
Simey Lameze c72839d6d0 MDL-71156 core: machinery to recover orphaned calendar events
The machinery to fix orphaned calendar events that were broken by MDL-67494.

The solution consists of:

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

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

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

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

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

4) Unit tests and helper functions to generate calendar events. We have decided to
   keep the tests simple, testing only true and false and not using data generators because
   the code is purely to recover the calendar events and won't turn into an API or something
   and also due to the urgency of this issue.
   The helpers have been created in calendar/tests/helpers.php since there are no data generators
   for calendar.
2021-04-22 10:45:27 +08:00
Andrew Nicols f33b8bb576 Merge branch 'MDL-70412-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2021-04-22 10:07:40 +08:00
Sara Arjona 7ccf8f2fe4 Merge branch 'MDL-64336-m39' of https://github.com/NeillM/moodle into MOODLE_39_STABLE 2021-04-21 17:15:23 +02:00
Sara Arjona 0997a89e39 Merge branch 'MDL-62244_39_label_view' of https://github.com/sheesania/moodle into MOODLE_39_STABLE 2021-04-20 17:45:12 +02:00
Sara Arjona f63aed03b8 weekly release 3.9.6+ 2021-04-20 15:51:17 +02:00
Sara Arjona cf3215cff4 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-04-20 15:51:16 +02:00
Paul Holden d26512cb63 MDL-70970 quizaccess_seb: consistent property array sorting by key.
In PHP8.0 using `ksort` was producing incorrect results by sorting
keys differing only in case in the wrong order. This change makes
sorting consistent between PHP versions.

Co-Authored-By: Tim Hunt <T.J.Hunt@open.ac.uk>
2021-04-20 14:36:22 +01:00
Rajneel Totaram b4ccc75a03 MDL-71376 mod_quiz: fix undefined object reference 2021-04-20 20:14:53 +12:00
Jun Pataleta 49f994fb03 Merge branch 'MDL-71364_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-04-20 09:23:14 +08:00
AMOS bot ebd1eb3726 Automatically generated installer lang files 2021-04-20 00:07:48 +00:00
Víctor Déniz 88d21b999c Merge branch 'MDL-71087-39' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_39_STABLE 2021-04-19 23:45:29 +01:00
Eloy Lafuente (stronk7) 946cbedf54 Merge branch 'MDL-69256-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-04-20 00:05:14 +02:00
Víctor Déniz 6ec958e639 Merge branch 'MOODLE_39_STABLE_fix_gradeimport_csv' of https://github.com/intrajp/moodle into MOODLE_39_STABLE 2021-04-19 22:49:51 +01:00
Dongsheng Cai 737682c750 MDL-68747 mod_quiz: force LTR for quiz grading overview chart 2021-04-19 21:06:31 +10:00
Sara Arjona 138e5b9996 Merge branch 'MDL-71365_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-04-19 10:18:46 +02:00
Paul Holden f3f7f28015 MDL-71127 mod_quiz: fix thrown exception for invalid question columns. 2021-04-19 09:07:24 +01:00
Paul Holden 2bada93f17 MDL-71168 report_participation: fix select all users checkbox. 2021-04-19 09:05:06 +01:00
Sara Arjona a5d64155ad Merge branch 'MDL-66475-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-19 09:49:29 +02:00
Sara Arjona e511a7fdc4 Merge branch 'MDL-65553-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2021-04-19 08:53:51 +02:00
AMOS bot 767c610be1 Automatically generated installer lang files 2021-04-18 00:07:44 +00:00
Eloy Lafuente (stronk7) c0f4d9e170 MDL-71365 grunt: fix ignores missing LF @ EOF 2021-04-18 00:42:52 +02:00
Eloy Lafuente (stronk7) e4c7028c20 MDL-71364 behat: fix randomness causes by "now" advancing
Some recent tests do set a date time element
to ##now## or tomorrow and, immediately after that
the look if, effectively, ##now## and #tomorrow#
have been set (with minutes resolution).

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

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

So, instead of that... we are setting the 2 now and tomorrow
cases to be "today noon" and "tomorrow noon" (12:00:00) so
we ensure they won't be ever in the risk of jumping of minute.
2021-04-17 12:34:03 +02:00
Eloy Lafuente (stronk7) 375ec1c034 Merge branch 'MDL-70099-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-17 09:40:45 +02:00
Sara Arjona 1c3b9af49a weekly release 3.9.6+ 2021-04-16 17:03:31 +02:00
Sara Arjona d4d2ef9119 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-04-16 17:03:30 +02:00
Andrew Nicols fdcc9383b1 Merge branch 'MDL-60490-missing_close_div-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2021-04-16 11:55:01 +08:00
Andrew Nicols d1d57dc12d Merge branch 'MDL-69415-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-04-16 11:27:42 +08:00
Amaia Anabitarte 27a6bf394d MDL-70412 groups: Improving create_group data generator
Increasing the size of the name for generated groups
to ensure we don't have problems with ordering.
2021-04-15 16:57:23 +02:00
Amaia Anabitarte 5e4aab248f MDL-65553 core_analytics: Don't allow to flag predictions several times
Even if a prediction is hidden from the report once is flagged,
it can be flagged several times if the user visits detailed view via URL.
We remove the checkbox to select a prediction and flag it
once it has already been flagged.
2021-04-15 16:39:09 +02:00
Jake Dallimore c32142cf80 Merge branch 'MDL-71338-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-15 14:43:28 +08:00
Jake Dallimore ea90581cb1 Merge branch 'MDL-71119-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-04-15 08:33:03 +08:00
AMOS bot 505366bed8 Automatically generated installer lang files 2021-04-15 00:07:59 +00:00
Paul Holden a6a5130a65 MDL-71338 tool_usertours: correct Content-Type on tour export.
Replace existing code with standard file serving mechanism, in
turn correcting the previously incorrect Content-Type header.
2021-04-14 21:12:03 +01:00
sam marshall a53238a07b MDL-70446 search_solr: File indexing can fail due to multipart upload
Due to Solr bug SOLR-15039, uploading files for indexing can fail if
it uses multipart upload. This changes it to use direct binary upload.

Unfortunately, the direct binary version in PHP curl only supports a
string, so we have to load the file into memory. I added extra code to
restrict the size of files indexed to (memory limit - 100MB), which is
usually 284MB unless configured differently because cron runs under
MEMORY_EXTRA.
2021-04-14 13:19:08 +01:00
Eloy Lafuente (stronk7) e085678bf2 Merge branch 'MDL-70616-39-fix' of https://github.com/izendegi/moodle into MOODLE_39_STABLE 2021-04-14 12:45:31 +02:00
Iñigo Zendegi ad3ac443a9 MDL-70616 gradingform_rubric: Filters not applied to rubric name 2021-04-14 11:48:58 +02:00
Sara Arjona 81da134c2c MDL-71119 core_badges: Add more information to errors
Some errors raised when calling external services were ignored.
Displaying this information helps to debug and find the real reasons
why some action, like connecting to an external backpack, can't be
done.
2021-04-14 11:04:28 +02:00
Sara Arjona dc4a36c3b1 MDL-71119 core_badges: Use basicauth and remove urlencode
Basic authorization header is required to get token. Besides, client
id and secret shouldn't call urlencode.
2021-04-14 11:04:28 +02:00
Sara Arjona 946120eeee MDL-71119 core_badges: Initialise scopes param in backpack-connect.php
The scopes parameter should be passed when creating the OAuth2 badges
client. As it is an optional parameter, when it's empty, it will
be initilised with the supported scopes for the backpack issuer.

It will happen, for instance, when a call is done to oauth2callback.php
because, as defined in RFC6749, OAuth2 authorization response only
supports code and state.
2021-04-14 11:04:28 +02:00
Paul Holden 82d35db47a MDL-70772 mod_forum: check for valid usernode before making active. 2021-04-14 09:20:26 +01:00
Andrew Nicols 83c3d04702 Merge branch 'MDL-71154_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-04-14 12:11:46 +08:00
AMOS bot 16736110d8 Automatically generated installer lang files 2021-04-14 00:07:53 +00:00
Eloy Lafuente (stronk7) 22f1a27aa3 MDL-71154 ci: Prevent upstream branches and tags to be built
Both for travis and GHA:

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

won't lead to a build anymore.
2021-04-13 16:55:54 +02:00
Eloy Lafuente (stronk7) 30e6bf75dd weekly release 3.9.6+ 2021-04-13 10:26:35 +02:00
Eloy Lafuente (stronk7) 9c4a0b8490 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-04-13 10:26:34 +02:00
Eloy Lafuente (stronk7) da03cf8972 Merge branch 'MDL-71059-39' of git://github.com/abias/moodle into MOODLE_39_STABLE 2021-04-13 00:42:42 +02:00
Tim Hunt 0b3e3d7c54 MDL-71313 repositories: warn if get_instances context is wrong type 2021-04-12 20:32:07 +01:00
Sara Arjona 1b8ced636c Merge branch 'MDL-68716-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-12 17:24:52 +02:00
Sara Arjona 2c73fbfc3d Merge branch 'MDL-71264_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-04-12 16:40:25 +02:00
Sara Arjona 5e3c934691 Merge branch 'MDL-70595-39' of git://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2021-04-12 16:01:49 +02:00
Sara Arjona df3efafbcf Merge branch 'MDL-71107-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2021-04-12 12:41:24 +02:00
Eloy Lafuente (stronk7) e2f2de4885 Merge branch 'MDL-69102-39' of https://github.com/martygilbert/moodle into MOODLE_39_STABLE 2021-04-12 00:02:14 +02:00
Eloy Lafuente (stronk7) 5279159083 MDL-69102 phpunit: Add test to cover ALL cohort criteria
That way we can check that the expectations are
working ok for every database. Previously only the
ANY case was being tested.

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

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

Behat changes are a fix for setting multiline strings in Atto, and
creating a multiline match step.
2021-04-08 15:37:24 -04:00
Eloy Lafuente (stronk7) 471d1a4b6d Merge branch 'MDL-70802-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-04-08 18:38:58 +02:00
Víctor Déniz 3db93ec2a2 Merge branch 'MDL-71116-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-04-08 01:06:30 +01:00
Amaia Anabitarte ff6ac0b2fd MDL-71107 core_contentbank: Behat test. Authoring when copying a course 2021-04-07 10:03:37 +02:00
Amaia Anabitarte 57d5be04f8 MDL-71107 core_contentbank: Fill content author when copying a course
'usercreated' and 'usermodified' fields can not be always mapped.
We are filling those fields with 'old' users when working on the same
site, or with current user when working on a different instance.
2021-04-07 10:03:37 +02:00
Alex Rowe c9d3c97e74 MDL-70049 assign: count_submissions_need_grading call when can't grade 2021-04-07 08:56:10 +10:00
Eloy Lafuente (stronk7) a772325afc Merge branch 'MDL-70959-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2021-04-06 22:29:58 +02:00
Eloy Lafuente (stronk7) 4c1c1aa6c6 Merge branch 'MDL-68635-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-06 22:23:50 +02:00
Víctor Déniz 05e79651b6 Merge branch 'MDL-71128-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-04-06 19:51:32 +01:00
Michael Hawkins a8c569c368 MDL-70595 core: Updated security.txt expiry 2021-04-06 13:14:01 +08:00
AMOS bot 12afd60ba2 Automatically generated installer lang files 2021-04-06 00:08:03 +00:00
Paul Holden c4fb2a2141 MDL-70099 enrol: increase accuracy of current enrolments by date.
By rounding the current time it was possible that the most recently
created user enrolments (e.g. self enrolments) were being excluded.

This would manifest itself in a user being enrolled on a course,
but it not appearing under "My courses" navigation or on their own
Dashboard until the rounded time had caught up with the current
time.
2021-04-05 19:32:07 +01:00
Paul Holden 97d63b6272 MDL-71003 user: fix alignment of autocomplete participant filters. 2021-04-04 23:21:33 +01:00
Paul Holden 39944aee16 MDL-70917 tool_behat: fix profile/replace option comparison.
The `isset` call always returned true for the 'replace' option,
because even if not specified it receives a non-null value. The
`strpos` call now does a strict equality check rather than
greater-than-or-equal (which always returns true).
2021-04-04 23:18:44 +01:00
Paul Holden 3284f1fe7e MDL-70763 core: export preferences for correct user.
Ensure we are using the ID of the given user rather than falling
back to that of the current user during privacy export.
2021-04-04 23:15:51 +01:00
Paul Holden a96ad13616 MDL-70763 quiz_overview: export preferences for correct user. 2021-04-04 23:15:51 +01:00
Paul Holden 3c872b34c6 MDL-70763 gradereport_grader: export preferences for correct user. 2021-04-04 23:15:51 +01:00
Paul Holden 4699142c9b MDL-66475 task: fix random timing failures in logger cleanup test. 2021-04-04 23:12:27 +01:00
AMOS bot 613e7f8a88 Automatically generated installer lang files 2021-04-04 00:08:01 +00:00
Eloy Lafuente (stronk7) b240173b66 MDL-71264 behat: Change date(time) element update order
This includes 2 change to the order date(time) elements are filled,
each one addressing one type of problem, where current order is
problematic and can lead to unexpected dates.

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

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

This test covers all the critical changes (day, month and year),
back and forth. All times are Perth/Australia.
2021-04-03 11:00:04 +02:00
Huong Nguyen 0273fc7731 MDL-70947 File upload: Upload protection
Interacts badly with double-submit protection, and not all uploads protected
2021-04-02 15:27:29 +07:00
AMOS bot eecb28b386 Automatically generated installer lang files 2021-04-02 00:07:46 +00:00
Marty Gilbert 88f81cf8d1 MDL-69102 badge: Fixes broken WHERE clause
When buildilng the 'WHERE' clause, the SQL generated
a query that selected any user who was a member of the
**last** group, not all of the groups.

I believe the query has to be re-worked so that it only
returns users who are in ALL of the groups. This can
be done by a GROUP BY and HAVING.
2021-04-01 14:51:27 -04:00
Alison Blomenberg fe177d5dec MDL-62244 Resource: label view redirects to label, not course 2021-04-01 11:53:53 -06:00
Leon Stringer d80644a986 MDL-60490 tool_lp: Missing div close
Mustache template had opening <div> with missing </div>.
2021-04-01 12:17:24 +01:00
AMOS bot bfe2779cea Automatically generated installer lang files 2021-04-01 00:07:48 +00:00
Juan Leyva 39916b12fd MDL-70863 mod_forum: Allow NULL in timecreated 2021-03-31 17:51:20 +02:00
Neill Magill b861c1dec7 MDL-64336 assign: Add missing PHP doc 2021-03-31 08:46:28 +01:00
Neill Magill 808a335c90 MDL-64336 assign: Teachers should be able to see all submissions
Before this change a teacher would be able to see users listed if:

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

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

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

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

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

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

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

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

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

Tests based on ones created by Andrew Nicols
2021-03-31 08:46:06 +01:00
Víctor Déniz a2e4730a35 weekly release 3.9.6+ 2021-03-30 15:37:38 +01:00
Víctor Déniz 7c2b6ed44f Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-03-30 15:37:37 +01:00
Paul Holden 3c4d30bcf4 MDL-65687 message: increase confirmation dialog zindex.
Make sure that confirmation dialogs (such as block/unblock user,
delete conversation) are shown with prominence in the messaging
drawer.
2021-03-30 10:50:57 +01:00
Tomo Tsuyuki c34c6a75df MDL-71136 backup: Fix moodle_exception path. 2021-03-30 10:55:38 +11:00
Paul Holden 0464ae85ca MDL-68635 tool_cohortroles: observe user initial table filter. 2021-03-29 14:12:01 +01:00
Paul Holden 3211454a2a MDL-68716 mod_forum: extra column sorting options in privacy export.
Accounts for extra sort options that were added in bc23cbaf.
2021-03-29 14:05:27 +01:00
Eloy Lafuente (stronk7) 06bebd6820 Merge branch 'MDL-70963-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-03-29 12:40:07 +02:00
Andrew Nicols 3f0cc3d712 Merge branch 'MDL-71004_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-03-29 11:54:53 +08:00
AMOS bot f71bfc90b1 Automatically generated installer lang files 2021-03-29 00:07:45 +00:00
AMOS bot ae29d57085 Automatically generated installer lang files 2021-03-28 00:07:43 +00:00
Víctor Déniz a2cf272e00 Merge branch 'MDL-70537-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2021-03-26 20:16:22 +00:00
Sara Arjona 4736877c43 MDL-70963 core_badges: Use expected JSON format for OBv2.1
This patch adds some changes to guarantee that OpenBadges 2.1 (OBv2.1)
will return always the same JSON format that OBv2.0 (because the only
difference between both versions it's the BadgeConnect API).
2021-03-26 09:02:41 +01:00
Shintaro Fujiwara aa6c15c975 MDL-69304 gradeimport_csv: Validate if the user id is numerical. 2021-03-26 04:26:51 +09:00
Víctor Déniz d7d8a654f3 Merge branch 'MDL-71194-39' of git://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2021-03-25 15:15:26 +00:00
Noel De Martin 2794943d3c MDL-71194 behat: Fix app tests 2021-03-25 13:50:27 +01:00
Andrew Nicols 8c62673dc5 Merge branch 'MDL-70980-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2021-03-25 08:07:54 +08:00
AMOS bot f7a80e3f2b Automatically generated installer lang files 2021-03-25 00:07:53 +00:00
Eloy Lafuente (stronk7) 773e7cd612 Moodle release 3.9.6 2021-03-24 20:12:40 +01:00
Eloy Lafuente (stronk7) 8f23a60ba8 MDL-71004 git: Ignore moodle-plugin-ci.phar in any directory 2021-03-24 20:10:38 +01:00
Víctor Déniz ce059497ac weekly release 3.9.5+ 2021-03-24 14:20:57 +00:00
Eloy Lafuente (stronk7) 6c712c9caf Merge branch 'MDL-71182-39-2' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2021-03-24 10:51:13 +01:00
Simey Lameze 6cfed9eebb MDL-71182 calendar: add logic for category events in get_context
This commit adds the missing logic for category events in
get_context() method. Without this fix, users will get errors
if they have category events with userid set to 0.
2021-03-24 17:35:09 +08:00
Andrew Nicols 2370d0c629 MDL-70802 javascript: Normalise component consistently in templates 2021-03-24 11:18:33 +08:00
Simey Lameze 7cae4c7570 MDL-71182 calendar: Revert "Merge branch 'MDL-67494-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE"
This reverts commit c0c9be6d03, reversing
changes made to 226a690c0d.
2021-03-24 09:31:36 +08:00
Víctor Déniz 86f6671fe6 Merge branch 'MDL-71022-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-03-23 23:02:22 +00:00
Thinh Pham 91a40ccce5 MDL-70727 Behat: function scrollIntoView not working in the app 2021-03-23 17:59:27 +00:00
Thinh Pham 20c93ebb6f MDL-71087 File picker: Focus lost after 'Create folder' 2021-03-23 10:44:25 +07:00
Andrew Nicols 62ee8fd5c8 Merge branch 'MDL-71039-39' of git://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2021-03-23 11:18:52 +08:00
Andrew Nicols 35c6838f14 Merge branch 'MDL-69036-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-03-23 09:56:57 +08:00
Andrew Nicols 596e7c7b0c Merge branch 'MDL-67870-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2021-03-23 09:25:04 +08:00
Andrew Nicols 1720bef450 MDL-69256 tests: Fix random slow test failures in completion cron 2021-03-23 08:08:37 +08:00
Mark Nelson c197d3f14b MDL-71170 customfield_text: use correct error string 2021-03-22 21:57:02 +08:00
Sara Arjona 42934afbed MDL-69415 core_h5p: prepend H5P libraries in autoloader
Core and mod_hvp are using the same namespace for some H5P
libraries. This is causing some random errors.
In order to get the expected behaviour in Moodle core, this patch
prepends H5P libraries in order to guarantee they are loaded first.
Plugins using same libraries will need to use a different namespace
if they overlap and a different version of these libraries should
be used.
2021-03-22 12:41:08 +01:00
Ferran Recio a97de58aa7 MDL-70980 mod_h5pactivity: fix review mode 2021-03-22 10:58:04 +01:00
Mihail Geshoski 47d87f7243 MDL-67870 backup: Skip value change if setting is locked by hierarchy
The given condition in the if statement did not take into account cases
when the setting is locked by hierarchy. Settings which are locked by
hierarchy should should keep their current values which were inherited
from the parent.
2021-03-22 15:33:57 +08:00
Chris Brown 56f849dcc6 MDL-71139 trademark: Improve the trademark messaging 2021-03-22 12:00:44 +08:00
Sara Arjona 3784dcc912 MDL-71116 core_badges: Backpack URLs with more than 50 chars
Backpack URLs (web and API) can have up to 255. However, the form
for creating/editing them, doesn't allow URLs with more than 50
characters. This patch align limitation to DB value (255).
2021-03-19 15:09:12 +01:00
Eloy Lafuente (stronk7) 2ad3d1a7f1 weekly release 3.9.5+ 2021-03-19 14:06:29 +01:00
Eloy Lafuente (stronk7) 3265a02f6c Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-03-19 14:06:28 +01:00
Jun Pataleta 6bc25f23fd MDL-70959 completion: Fix completion_info::get_data() unit tests
* Fixed inverted $sameuser test data.
* Fixed caching expectation check. Caching only relies on whether the
user accessing the completion data is the same user or not.
* Fixed checking for the caching of other modules. Should have been
checking cm ID and not instance ID.
* Additional test case when whole course parameter is passed as
true, but the requesting user is different from the target user.
2021-03-19 11:52:23 +08:00
Jun Pataleta 42631c3e34 MDL-70959 completion: Fix unit tests for get_data()
The unit tests for completion_info::get_data() does not make a lot of
sense with mocking being incorrectly used and the actual functionality
is not being properly tested. I have rewritten the test to use actual
cm_info instances and data providers for better coverage.
2021-03-19 11:52:23 +08:00
Jun Pataleta 4e75827d72 MDL-70959 completion: Documentation improvements
* Fix typo in $cm parameter's type in PHPDoc
* Improve the comment to better explain the logic why fetching the
completion data for the whole course can only be done when caching is
used.
Even if $wholecourse is set to true, there's no point in fetching the
completion data for all the course modules unless we're caching the
results.
2021-03-19 11:52:23 +08:00
sam marshall 6b06a36646 MDL-70537 Availability: Avoid recursive calls to $cm->name
These recursive calls didn't work in PHP 7.3 and below, but in PHP
7.4 they also cause a fatal error which means if you have invalid
availability data, the whole page might die.
2021-03-18 15:56:55 +00:00
sangnguyen bbf96cb595 MDL-70992 Folder: Unnecessary tab stops to the left of files 2021-03-18 12:24:23 +08:00
Adrian Greeve 918d45dfbd Merge branch 'MDL-70924-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-03-18 11:51:20 +08:00
Adrian Greeve 35b29cf219 Merge branch 'MDL-71048-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-03-18 11:08:55 +08:00
Adrian Greeve 6f5266c717 Merge branch 'MDL-70977-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-03-18 10:26:16 +08:00
Adrian Greeve 841fd94499 Merge branch 'MDL-71068-protectusername-confirmed-MOODLE_39_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_39_STABLE 2021-03-18 09:26:13 +08:00
AMOS bot 3c8abccaaa Automatically generated installer lang files 2021-03-18 00:07:45 +00:00
Brendan Heywood 23cc13e8ef MDL-71068 login: Fix edge cases with $CFG->protectusernames 2021-03-17 17:40:01 +11:00
Paul Holden b665e5aa33 MDL-71128 mod_quiz: escape question idnumber on display. 2021-03-16 20:28:50 +00:00
Sara Arjona 5fc3b83497 Merge branch 'MDL-44613-integration-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2021-03-16 08:27:09 +01:00
Mihail Geshoski 56fdffa68e MDL-44613 mod_assign: Fix behat failure in classic
The link to the calendar page is missing in the navigation block in
classic which causes a behat failure in the 'Set availibility dates
for an assignment' feature. The fix includes adding the calendar block
to the Course page which can be used to navigate to the calendar page.
2021-03-16 11:57:26 +08:00
Adrian Greeve 2b442c2fb7 Merge branch 'MDL-70780-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-03-16 11:26:22 +08:00
Sara Arjona 7215c71486 Merge branch 'MDL-44613-39-1' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2021-03-15 15:54:05 +01:00
Paul Holden 9b3a8f7bd1 MDL-70977 mod_forum: fix empty equality check updating post content.
Using the external method for updating posts, the check for empty
subject/message content wasn't correct (disallowed the string '0'),
in addition to being impossible to set a posts message format
property to FORMAT_MOODLE (integer 0).
2021-03-15 12:49:12 +00:00
Paul Holden 51b2acfae3 MDL-70924 course: ensure required fields present when getting courses. 2021-03-15 12:46:58 +00:00
Mihail Geshoski 5dbf93200a MDL-44613 mod_assign: Automate testing of the assignment availability 2021-03-15 20:05:25 +08:00
Mihail Geshoski 4b987e5f7a MDL-44613 tool_behat: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in tool_behat behat tests.
2021-03-15 20:05:25 +08:00
Mihail Geshoski 337704e555 MDL-44613 core_message: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in core_message behat tests.
2021-03-15 20:05:25 +08:00
Mihail Geshoski 9f01cf6122 MDL-44613 behat: strftime format in time to timestamp transformation
Modifies the 'string time to timestamp' behat trasformation to use
userdate() instead of date(). The userdate() method is generally used
throught Moodle for constructing formatted date strings and this change
will provide more consistency and prevent any potential behat failures.
Therefore, if the date format is defined in the given trasformation, it
has to be strftime compatible. Example:
'I should see "##tomorrow noon##%A, %d %B %Y, %I:%M %p##"'
2021-03-15 20:05:25 +08:00
Adrian Greeve 8872202049 Merge branch 'MDL-70306-39' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2021-03-15 11:13:47 +08:00
Peter Dias 855b9e504b MDL-70306 auth: Update the thirdpartylib.xml 2021-03-15 11:10:34 +08:00
AMOS bot f253fa7f7e Automatically generated installer lang files 2021-03-13 00:07:46 +00:00
Sara Arjona 8ee6f49384 weekly release 3.9.5+ 2021-03-11 17:18:47 +01:00
Sara Arjona f4f6534b40 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-03-11 17:18:47 +01:00
Adrian Greeve 1d70790168 Merge branch 'MDL-66025-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-03-11 11:38:07 +08:00
Adrian Greeve 17a5e73a9b Merge branch 'MDL-71026-39' of git://github.com/ilyatregubov/moodle into MOODLE_39_STABLE 2021-03-11 11:01:52 +08:00
Eloy Lafuente (stronk7) 5987bed350 Merge branch 'MDL-70726-3.9' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_39_STABLE 2021-03-11 00:12:19 +01:00
Eloy Lafuente (stronk7) b6d0dec01e Merge branch 'MDL-70789-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-03-10 23:50:22 +01:00
Eloy Lafuente (stronk7) c0d519b426 Merge branch 'MDL-70759_39' of https://github.com/ffhs/moodle into MOODLE_39_STABLE 2021-03-10 23:42:25 +01:00
Eloy Lafuente (stronk7) 05c66fcebd Merge branch 'MDL-70967-39' of git://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2021-03-10 23:35:33 +01:00
AMOS bot 5c545ca2ff Automatically generated installer lang files 2021-03-10 00:07:39 +00:00
Paul Holden 4037bdd825 MDL-69036 theme_boost: consistent table row hovering for links.
When hovering over table rows with the `dimmed_text` class we
should consistently set the text/link colour.

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

This change introduces some additional pending JS tracking to prevent
this.
2021-03-09 07:52:24 +08:00
AMOS bot ff27bc6c5a Automatically generated installer lang files 2021-03-07 00:07:42 +00:00
Eloy Lafuente (stronk7) 02a2e649e9 Moodle release 3.9.5 2021-03-06 18:03:54 +01:00
AMOS bot 8dcc813d0b Automatically generated installer lang files 2021-03-06 00:07:46 +00:00
Sara Arjona 329a5109b8 weekly release 3.9.4+ 2021-03-05 16:01:38 +01:00
Sara Arjona 108bfe3f52 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-03-05 16:01:38 +01:00
Alexander Bias bab8ea6608 MDL-71059 repository_contentbank: set default returntype
The content bank was designed for making easier to reuse content.
So "Link to the file" should be the default option when using the
contentbank repository, in order to let teachers modify their
content in the content bank and update automatically it everywhere
is used.
2021-03-05 14:20:38 +01:00
Sara Arjona 4501c37045 MDL-70759 core_h5p: add renderer to let personalize styles
This is a backport of MDL-69087

Existing mod_hvp pluging has a renderer to let Moodle instances
alter styles, Javascript, semantics (fields in the editor) and
content: https://github.com/h5p/moodle-mod_hvp/blob/stable/renderer.php

The approach for core_h5p is exactly the same, to let people
to reuse their existing code.
2021-03-05 14:07:18 +01:00
Ilya Tregubov b0679c1103 MDL-69680 lib: Fix behat test backup_and_restore.feature 2021-03-04 22:51:41 +01:00
Paul Holden b8322f7dd1 MDL-71048 lang: fix null equality check of lang string args. 2021-03-04 19:43:54 +00:00
Marina Glancy a2221d6d8d MDL-71039 core_form: support valuehtmlcallback in autocomplete inline 2021-03-04 13:39:56 +01:00
Ilya Tregubov 472fdf0603 MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:47:44 +08:00
Ilya Tregubov a5edc8cb89 MDL-69680 lib: Update jQuery version in Moodle files 2021-03-04 12:47:44 +08:00
Ilya Tregubov c2cddf3c25 MDL-69680 lib: Upgrade jQuery lib to 3.5.1 2021-03-04 12:47:44 +08:00
Eloy Lafuente (stronk7) 8d748b3401 Merge branch 'MDL-70424-auth-avoid-changes-MOODLE_39_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_39_STABLE 2021-03-04 00:32:34 +01:00
Brendan Heywood 6feb10dd53 MDL-70424 auth: Avoid random changes to $CFG->auth 2021-03-04 09:31:51 +11:00
Ilya Tregubov ff431a76cd MDL-70767 feedback: Prevent xss in feedback answer text. 2021-03-03 23:09:26 +01:00
Sara Arjona e49f38f6d2 Merge branch 'MDL-68721-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2021-03-03 17:51:41 +01:00
Ferran Recio 7381719f54 MDL-68721 mod_h5pactivity: report acceptance tests 2021-03-03 17:23:27 +01:00
Paul Holden ddb31238a1 MDL-65552 block_activity_results: correct Behat tests for idnumbers.
Teachers can see user idnumber fields only when they are configured
identity fields. Students cannot.
2021-03-03 23:14:37 +08:00
Marina Glancy 009b90a43b MDL-65552 user: escape idnumber and email in table_sql 2021-03-03 23:14:37 +08:00
Paul Holden 7afca3b34a MDL-65552 user: escape idnumber field on output.
This commit also corrects parameter definition of the field to
match core_user.
2021-03-03 23:14:37 +08:00
Sara Arjona 882734c99f Merge branch 'MDL-70125_39-3' of git://github.com/mdjnelson/moodle into MOODLE_39_STABLE 2021-03-03 15:47:45 +01:00
Sara Arjona c0c9be6d03 Merge branch 'MDL-67494-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2021-03-03 11:51:18 +01:00
Sara Arjona 226a690c0d Merge branch 'MDL-67119-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2021-03-03 11:11:47 +01:00
Ilya Tregubov f702707ef7 MDL-71026 user: Fix incorrect get_string call. 2021-03-03 11:44:30 +02:00
Jun Pataleta d1bec1e23b Merge branch 'MDL-70987-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-03-03 16:41:56 +08:00
Simey Lameze 497c016518 MDL-67494 calendar: user_delete_user should delete all user events 2021-03-03 16:32:58 +08:00
Simey Lameze 078f59faf8 MDL-67494 calendar: privacy provider should not delete shared events 2021-03-03 16:32:58 +08:00
Simey Lameze df4f869af7 MDL-67494 calendar: shared subscriptions should not set userid to 0 2021-03-03 16:32:58 +08:00
Simey Lameze 0a4092bc27 MDL-67494 calendar: only user overrides should retain userid 2021-03-03 16:32:58 +08:00
Simey Lameze 31a7410a90 MDL-67494 calendar: set userid to zero for shared events 2021-03-03 16:32:58 +08:00
Simey Lameze 793289f905 MDL-67494 calendar: step to set userid 0 to all shared events 2021-03-03 16:32:56 +08:00
Simey Lameze cd009c0c51 MDL-67494 calendar: add logic for category events in get_context 2021-03-03 16:27:08 +08:00
Jun Pataleta 60900a8066 Merge branch 'MDL-71009_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-03-03 16:22:29 +08:00
Sara Arjona dde73f5fb5 Merge branch 'MDL-69097-390' of https://github.com/inigozendegi/moodle into MOODLE_39_STABLE 2021-03-03 09:07:04 +01:00
Jun Pataleta 44fe2370b7 Merge branch 'MDL-70995-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-03-03 15:05:07 +08:00
Jun Pataleta 5d09a5f6b0 Merge branch 'MDL-69883-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-03-03 14:33:43 +08:00
Andrew Nicols 3944872103 Merge branch 'MDL-70268-39-2' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2021-03-03 12:22:11 +08:00
Peter Dias 5db25124ef MDL-70268 core: Update the oauthlib to exclude scope if none provided 2021-03-03 12:06:37 +08:00
AMOS bot b17f7fd443 Automatically generated installer lang files 2021-03-03 00:07:40 +00:00
Paul Holden 787485d9eb MDL-70822 enrol: respect capability to view other users profile.
When retrieving courses of another user via web services, we should
respect the capability to view that users profile in a given course.
2021-03-02 23:37:35 +01:00
Sander Wind 299fb2f158 MDL-70668 auth: Fix secret validation during user confirmation
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
2021-03-02 23:37:35 +01:00
Eloy Lafuente (stronk7) 71f444e82d Merge branch 'MDL-70340-39' of git://github.com/jleyva/moodle into MOODLE_39_STABLE 2021-03-02 23:33:25 +01:00
Víctor Déniz 1e0f448b3e Merge branch 'MDL-70676-39' of git://github.com/ilyatregubov/moodle into MOODLE_39_STABLE
Fixed mod/workshop/db/upgrade.php: \xmldb_field::getNotNull()
does not verify if the column is nullable in the database.
2021-03-02 18:43:37 +00:00
Peter Dias d1a71ec909 MDL-59293 block_onlineusers: Update behat tests 2021-03-02 16:13:12 +00:00
Peter Dias 9c4f2a55b6 MDL-59293 block_onlineusers: Check whether current user can view online users
- Removed block from site admin.
- Blocked guest from viewuserlist cap
2021-03-02 16:13:12 +00:00
Ilya Tregubov a0ec66dc6b MDL-70676 workshop: Allow empty grades. 2021-03-02 13:43:48 +02:00
Sara Arjona b08b4a2bdc Merge branch 'MDL-67515-39' of git://github.com/vmdef/moodle into MOODLE_39_STABLE 2021-03-02 11:21:39 +01:00
Jun Pataleta 0d355a0e8d Merge branch 'MDL-70457_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-03-02 17:38:28 +08:00
Víctor Déniz 382250e60e Merge branch 'MDL-70172-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2021-03-02 09:17:18 +00:00
Paul Holden 71bb7f306e MDL-71022 gradereport_history: prevent double escaping of users.
The user identity fields are already escaped by the AJAX endpoint
that returns them, we don't need to do it again at the client.
2021-03-02 09:14:42 +00:00
Víctor Déniz 6864463dc4 MDL-67515 tool_customlang: Ignore invalid component strings
After uninstalling a plugin, the translated strings remain in
tool_customlang table, throwing an exception when trying to localise
any strings. Currently there is no mechanism to
clean up customlang tables and files during the uninstall process,
so with this patch the invalid components will be ignored.
2021-03-02 09:09:25 +00:00
AMOS bot b5db1d43f6 Automatically generated installer lang files 2021-03-02 00:07:39 +00:00
Eloy Lafuente (stronk7) c50c1fd745 Merge branch 'MDL-67974-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-03-01 22:33:48 +01:00
Shamim Rezaie 9aad72e85b MDL-70172 output: pages with main logo should have a first-level header 2021-03-02 05:42:23 +11:00
Shamim Rezaie 2e4198ab76 MDL-70172 output: Fix empty links
The approach taken is inline with font-awesome documentation:
https://fontawesome.com/how-to-use/on-the-web/other-topics/accessibility
2021-03-02 05:42:23 +11:00
Eloy Lafuente (stronk7) dc6da3f20e Merge branch 'MDL-70912-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-03-01 16:47:59 +01:00
Sara Arjona 52777e6a56 Merge branch 'MDL-68735_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-03-01 16:17:48 +01:00
Eloy Lafuente (stronk7) 4b53207d34 Merge branch 'MDL-70913-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-03-01 14:32:07 +01:00
Sara Arjona 6d0a928b64 MDL-70913 core_badges: Use and update properly sortorder
Sortorder field in badge_external_backpack was updated with a wrong
value. This patch fixes this behaviour and adds sortorder as
sorting criteria for displaying the list of site backpacks.
2021-03-01 13:12:20 +01:00
Amaia Anabitarte 616935475b MDL-70726 behat: Fixing existing fail tests
Some of the current behat tests were wrong but not failing because of the bug in 'should not exist' step.
Once the bug is fixed, we must fix also wrong behats.
2021-03-01 16:09:20 +07:00
Thong Bui 8d6cbcb248 MDL-70726 behat: should_not_exist function does not work correctly 2021-03-01 16:09:20 +07:00
Eloy Lafuente (stronk7) 35d42cc6a7 Merge branch 'MDL-70931-39-xmldbeol' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2021-03-01 10:01:22 +01:00
Eloy Lafuente (stronk7) 6030e5ce3d Merge branch 'MDL-70941-39' of git://github.com/dravek/moodle into MOODLE_39_STABLE 2021-03-01 09:54:25 +01:00
Eloy Lafuente (stronk7) 1d0b0ebb15 Merge branch 'MDL-70910-39' of git://github.com/dravek/moodle into MOODLE_39_STABLE 2021-03-01 09:50:23 +01:00
Eloy Lafuente (stronk7) 2a2d658d84 Merge branch 'MDL-70964-39-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2021-03-01 09:34:18 +01:00
AMOS bot 1e1c3622e3 Automatically generated installer lang files 2021-03-01 00:07:42 +00:00
AMOS bot 68242c6a84 Automatically generated installer lang files 2021-02-28 00:07:38 +00:00
AMOS bot eae9427f8f Automatically generated installer lang files 2021-02-27 00:07:46 +00:00
Tim Hunt f906c7cadc MDL-71009 question bank: escape idnumbers when displayed 2021-02-26 12:48:28 +00:00
Eloy Lafuente (stronk7) c302886845 MDL-68735 env: Moodle 3.8.x, 3.9.x and 3.10.x do not support PHP 8.0 2021-02-26 13:08:11 +01:00
David Matamoros 3afaa0d81c MDL-70941 contentbank: fix empty equality check when renaming content 2021-02-26 12:08:41 +01:00
David Matamoros ba69ad868a MDL-70910 contentbank: fix for using contentid not validated 2021-02-26 12:02:50 +01:00
Eloy Lafuente (stronk7) bc509f6d8c MDL-70457 forms: php74 fix for the (not used in core) date element
Curly brackets to access by index to strings or arrays is
deprecated since php74.
2021-02-26 11:55:37 +01:00
Amaia Anabitarte 120b877cb6 MDL-67119 core_analytics: Analyse users once per course
User's activity in a course should be analysed only once
no matter the number of enrolments the user has in that course.
2021-02-26 11:48:09 +01:00
Jun Pataleta f32754319e weekly release 3.9.4+ 2021-02-26 13:42:49 +08:00
Jun Pataleta 3e91d27f5e Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-02-26 13:42:49 +08:00
David Mudrák d6adfa6446 MDL-70964 lang: Use the fixed strings in tests 2021-02-25 19:28:14 +01:00
Helen Foster 58bdf28392 MDL-70964 lang: Import fixed English strings (en_fix) 2021-02-25 16:37:34 +01:00
Jun Pataleta bde3b82720 Merge branch 'MDL-70169-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2021-02-25 12:28:46 +08:00
AMOS bot 7111921105 Automatically generated installer lang files 2021-02-25 00:07:42 +00:00
Paul Holden 67e1e3107a MDL-69883 message: fix lazy loading of conversations.
Set max-height on each container section rather than the container
itself, so that each can respond to the scrollBottom event within
the lazy loading module (which handles the overflow itself).
2021-02-24 22:01:40 +00:00
Paul Holden fac00d7e8c MDL-70995 user: format group names in course participants filter. 2021-02-24 19:26:12 +00:00
Iñigo Zendegi bbbb211c71 MDL-69097 mod_forum: Apply filters to whole forum grading 2021-02-24 17:12:56 +01:00
Víctor Déniz 54beada930 Merge branch 'MDL-51111-muc-reset-MOODLE_39_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_39_STABLE 2021-02-24 14:08:41 +00:00
Brendan Heywood af3e51fa82 MDL-51111 cache: Don't lock and write the config file if unchanged 2021-02-24 12:47:34 +11:00
Andrew Nicols 78adf434d4 MDL-70987 core_form: Use correct id for elementid during validation
The id of the formid was being passed instead of the elementid.
2021-02-24 09:06:48 +08:00
Sara Arjona cc7bc38cc1 MDL-67974 core_badges: Recovered expired stamp
Expired stamp icon displayed over the badge images has been added
again to CSS (it was lost at any point).
2021-02-23 15:33:06 +01:00
Sara Arjona 4c4c74c13b MDL-67974 core_badges: Badge expiry date when hover
Text displayed for expired badges when the user hovers over the
warning (!) icon has been fixed in the "Issued badge information"
page.
2021-02-23 15:33:06 +01:00
Eloy Lafuente (stronk7) cb13db88a3 Merge branch 'MDL-43697' of https://github.com/praxisdigital/moodle into MOODLE_39_STABLE 2021-02-22 23:10:28 +01:00
Marina Glancy 31b1a9601f MDL-70967 enrol_meta: fix error in unittest 2021-02-22 18:06:49 +01:00
Mark Nelson 1e10d9328e MDL-70125 core_grade: do not change overridden status during regrading 2021-02-22 19:36:38 +08:00
AMOS bot cf3b76b980 Automatically generated installer lang files 2021-02-22 00:07:41 +00:00
Andrew Nicols f1f578cd7a Merge branch 'MDL-70879_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-02-22 07:51:56 +08:00
Daniel Kristian Steffensen 8b16724fef MDL-43697 backup: Archived badges are restored during course restore 2021-02-19 15:49:33 +01:00
Eloy Lafuente (stronk7) ecdd8bf487 MDL-70879 behat: Bump to Behat 3.8.x 2021-02-19 14:49:23 +01:00
Víctor Déniz 713b28c2a5 weekly release 3.9.4+ 2021-02-19 12:39:11 +00:00
Víctor Déniz c2d1a1eb60 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-02-19 12:39:09 +00:00
AMOS bot d76dddea87 Automatically generated installer lang files 2021-02-19 00:07:54 +00:00
Jun Pataleta 28fca52bd4 Merge branch 'MDL-47410-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-02-18 11:29:51 +08:00
Andrew Nicols 4d3c0a9d82 MDL-47410 behat: Perform exact match for date_time selectors 2021-02-18 11:29:20 +08:00
David Mudrák 5334972a73 MDL-70931 xmldb: Generate install.xml files with EOL and EOF
As discussed in MDLSITE-6397, all Moodle code files should end with
single Unix-style end of line character. Files created and edited
through the XMLDB editor should follow this rule, too.
2021-02-17 21:06:09 +01:00
Víctor Déniz d62a536a2c Merge branch 'MOODLE_39_MDL-70752' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2021-02-17 16:57:49 +00:00
Eloy Lafuente (stronk7) 240d414aba Merge branch 'MDL-70552-39' of git://github.com/ilyatregubov/moodle into MOODLE_39_STABLE 2021-02-17 10:26:57 +01:00
Ilya Tregubov 8d4930ab11 MDL-70552 core_message: Show popup for teachers when anonymous
user completed feedback.
2021-02-17 08:43:35 +02:00
Andrew Nicols 41cf8a2f42 Merge branch 'MDL-47410-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2021-02-17 09:41:59 +08:00
AMOS bot 80223d703c Automatically generated installer lang files 2021-02-17 00:07:49 +00:00
Andrew Nicols 0782c3c18d Merge branch 'MDL-70264-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-02-17 07:27:13 +08:00
Eloy Lafuente (stronk7) cf1546a472 Merge branch 'MDL-69562_39' of https://github.com/dvdcastro/moodle into MOODLE_39_STABLE 2021-02-16 22:39:49 +01:00
Eloy Lafuente (stronk7) 6d1ec7c38d Merge branch 'MDL-70525_39' of https://github.com/TomoTsuyuki/moodle into MOODLE_39_STABLE 2021-02-16 19:56:38 +01:00
Sara Arjona 379d21c8cb MDL-70912 mod_data: Add filepicker to the H5P Atto button
The filepicker wasn't displayed fot the H5P Atto button when a text
area database field was created because some options were missing
in the textarea field class.
2021-02-16 18:17:41 +01:00
AMOS bot d2f7b36caa Automatically generated installer lang files 2021-02-16 00:07:45 +00:00
Paul Holden b70b06bc61 MDL-66025 user: require message content in bulk action.
Also import missing 'core/notification' dependency.
2021-02-14 20:10:38 +00:00
AMOS bot 96f41c3d99 Automatically generated installer lang files 2021-02-13 00:07:54 +00:00
Simey Lameze 8eb4a14e44 MDL-70169 login: fix accessibility issues 2021-02-12 13:14:51 +08:00
Paul Holden f8811d5661 MDL-70789 theme_boost: fix double click on drawer hiding content.
If the drawer toggle button was clicked in quick succession to close
and then re-open, then the delayed Aria.hide method would be called
which hid the drawer content when it finished opening.
2021-02-11 21:49:14 +00:00
Sara Arjona a3f78dbd7a MDL-70264 badges: remove badges/oauth2callback.php
File badges/oauth2callback.php has been removed and now badges
API will use admin/oauth2callback.php because it makes no sense having
it twice.

Credits go to Andrew Nicols for raising it!
2021-02-11 16:58:55 +01:00
Sara Arjona 1d17c73e9e weekly release 3.9.4+ 2021-02-11 14:54:44 +01:00
Sara Arjona b21076309d Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-02-11 14:54:42 +01:00
Mihail Geshoski c34c00a762 MDL-47410 mod_assign: Update mod_assign behat tests
Updates the mod_assign behat tests to utilize the ability to
conviniently populate the datetime selector fields.
2021-02-11 12:15:45 +08:00
Mihail Geshoski 3d87e93f02 MDL-47410 behat: Support selection from the datetime selector element
Adds behat support for selecting date and time from a datetime selector
element. The passed values should represent a textual date and time
description wrapped in '##' (e.g. '##first day of January 2020 08:00##',
'##1 Jan 2020 10:30##'). Also, the value 'disabled' is valid and can be
used to disable the datetime selector element.
2021-02-11 12:15:45 +08:00
Mihail Geshoski 76f2dc1f14 MDL-47410 tool_licensemanager: Update tool_licensemanager behat tests
Updates the tool_licensemanager behat tests to utilize the ability to
conviniently populate the date selector fields.
2021-02-11 12:15:45 +08:00
Mihail Geshoski 77e578a91a MDL-47410 behat: Support date selection from the date selector element
Adds behat support for selecting a date from the date selector element.
The passed values should represent a textual date description wrapped
in '##' (e.g. '##first day of January 2020##', '##1 Jan 2020##'). Also,
the value 'disabled' is valid and can be used to disable the date
selector element.
2021-02-11 12:15:44 +08:00
Mihail Geshoski eb0e5a1297 MDL-47410 behat: Create custom selector for the date and datetime fields
Creates a custom field selector to locate the requested date or datetime
form fields.
2021-02-11 12:11:18 +08:00
Mihail Geshoski 8844095259 MDL-47410 behat: Move logic from guess_type() to a separate method
Moves the logic from guess_type() to a separate protected method
get_field_instance_for_element(). This would be quite useful for
form field classes as they can now use this method when there is
a need to determine the type of a given node element.
2021-02-11 12:11:18 +08:00
Mihail Geshoski 4b58966938 MDL-47410 behat: Use data-fieldtype attribute to guess the field type
The data-fieldtype attribute (if present) should be also utilized in
guess_field_type() and match the behavior in get_field_node_type().
2021-02-11 12:11:18 +08:00
Mihail Geshoski 69ec780e95 MDL-47410 form: Add data-fieldtype attribute to checkbox inline element
Includes the data-fieldtype attribute to the checkbox inline form
element. This element does not extend the parent inline element
template due to its specific nature and therefore this attribute was
missing.
2021-02-11 12:11:18 +08:00
Adrian Greeve e539a0aa30 Merge branch 'MDL-70513_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-02-11 10:05:29 +08:00
Adrian Greeve 7116f5fde8 Merge branch 'MDL-69867-39_display_grade_with_scale' of git://github.com/moffe42/moodle into MOODLE_39_STABLE 2021-02-11 09:25:19 +08:00
AMOS bot aba0e6b70d Automatically generated installer lang files 2021-02-11 00:07:45 +00:00
Sara Arjona 37136525d9 Merge branch 'MDL-70732-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2021-02-10 17:20:43 +01:00
Sara Arjona 8e6d2ba38d Merge branch 'MDL-70796_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-02-10 16:50:20 +01:00
Sara Arjona f418bf8c96 Merge branch 'MDL-69101_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-02-10 15:12:12 +01:00
Sara Arjona 8a40250c49 Merge branch 'MDL-70631-39-unzip' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2021-02-10 12:38:24 +01:00
Sara Arjona e516a662c5 Merge branch 'MDL-70736_MOODLE_39_STABLE' of https://github.com/TomoTsuyuki/moodle into MOODLE_39_STABLE 2021-02-10 08:28:32 +01:00
Jacob Christiansen 4adfbf3cba MDL-69867 mod_assign: Display current grade with scale value
When using workflow we show the current grade with its scale value
instead of the internal index
2021-02-10 08:10:55 +01:00
John Yao ecafdc45d0 MDL-65390 accessibility: correct focus after "Show more" clicked 2021-02-09 15:11:37 +01:00
Sara Arjona 499bf7df7d Merge branch 'MDL-70173-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2021-02-09 08:29:34 +01:00
Sara Arjona 378725c05f Merge branch 'MDL-70377_39' of https://github.com/mkassaei/moodle into MOODLE_39_STABLE 2021-02-09 08:23:43 +01:00
Shamim Rezaie e3142ca2e2 MDL-70173 core: Use a meaningful first level header 2021-02-09 16:33:44 +11:00
Shamim Rezaie 23ed4c4440 MDL-70173 theme_boost: Fix empty link issue on the "Go to top" button
On behat, we have to use a more specific test step if we are looking
for a "Go" button on a modal. The reason is that the html of the modal
content is put after the html of the "Go to top" button, so behat
may find the "Go to top" button if we just look for "Go".
2021-02-09 16:33:44 +11:00
Shamim Rezaie 4ac8ae1be7 MDL-70173 theme_boost: Increase the size of notification counter
WAVE considers any text with the size of 10px or below really small.
Increasing the font size of the navbar counter by 1px should not make a
big negative impact on the design, but improves accessibility.
2021-02-09 16:33:44 +11:00
Shamim Rezaie 254aa09f40 MDL-70173 output: All pages should have a heading
In MDL-63040, it was decided that the page header for the dashboad page
should be removed.
However, Based on Success Criteria 1.3.1 and 2.4.6 from the WebAIM's
WCAG 2 Checklist, all pages should have an <h1> element.
So I put an sr-only heading on the dashboard and all other pages, where
no page header is shown.
2021-02-09 16:33:44 +11:00
Shamim Rezaie d27c60a90a MDL-70173 dashboard: ARIA role presentation conflicted the empty alt
The markup <img role="presentation" alt="alt text"> is contradictory.

According to https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/examples/presentation/PresentationRoleExamples.html
 It is recommended that authors instead use empty alt text (alt="")
 where they use role="presentation".
2021-02-09 16:33:43 +11:00
Shamim Rezaie 5fae9c213d MDL-70173 message: Fix empty link 2021-02-09 16:33:43 +11:00
Shamim Rezaie e7a160da9a MDL-70173 output: use an empty alt to hide user pic from screen readers
There is no need to use WAI-ARIA to hide images from screen readers.
See https://www.w3.org/WAI/tutorials/images/decorative/
2021-02-09 16:33:43 +11:00
Tomo Tsuyuki ac1402d552 MDL-70525 tool_profiling: Cannot import profiling file
Change type from int to integer to be able to have big numbers
2021-02-09 10:17:56 +11:00
Mahmoud Kassaei 2c5adf1c5b MDL-70377 qtype_essay: When reviewing an attempt as a teacher
In the Response history table, Action Saved: does not display the value
of $a in the language string.
2021-02-08 17:08:17 +00:00
Andrew Nicols 4d54712518 Merge branch 'MDL-70614-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-02-08 10:47:23 +08:00
Andrew Nicols 853cbc5973 Merge branch 'MDL-70725-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2021-02-08 10:30:51 +08:00
AMOS bot 630325a4e4 Automatically generated installer lang files 2021-02-06 00:07:46 +00:00
Tim Hunt 842e7aa041 MDL-70796 count_words: match the count from LibraOffice & MS Word 2021-02-05 15:27:15 +00:00
Amaia Anabitarte 46916975a2 MDL-70732 behat: Adding second parameter to ExpectationException() 2021-02-05 11:01:44 +01:00
Sara Arjona 8fc5c6214a weekly release 3.9.4+ 2021-02-04 14:56:17 +01:00
Sara Arjona 263419e10d Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-02-04 14:56:15 +01:00
Mikhail Golenkov f4024153e1 MDL-70752 restore: Fix remote file recovery 2021-02-04 19:23:23 +11:00
Tomo Tsuyuki 61752e9e0f MDL-70736 gradingform_guide: Fix loading marking guide template issue
Do not check grade item name if it is from shared template.
2021-02-04 16:08:05 +11:00
Andrew Nicols d9e13438d1 Merge branch 'MDL-69748-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2021-02-04 11:52:41 +08:00
Shamim Rezaie 6a7750a141 MDL-69748 core: Fix hideif issue with array elements
Changed the element selector to get all array elements,
whether named or unnamed. The previus selector was only
working for elements that thir names were like name="something[]".
It was not working for name="something[a]" elements.
2021-02-04 14:39:04 +11:00
AMOS bot f025935c1c Automatically generated installer lang files 2021-02-04 00:07:51 +00:00
Eloy Lafuente (stronk7) 4640d8f9ca MDL-70741 capability overview: missing whitespace after placeholder 2021-02-04 00:01:03 +01:00
Tim Hunt c420408522 MDL-70513 quiz manual grading: use formchangechecker to avoid dataloss 2021-02-03 16:11:18 +00:00
David Mudrák 2020498bd5 MDL-70631 files: Replace hard-coded value with FL_ENC_RAW constant
This is not related to the issue but I noticed it while trying to debug
it.

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

The patch changes the implementation to use ZipArchive::extractTo()
unless the extracted entry path contains a folder name ending with dot
(such as some/path./to/file.txt). There is a known upstream bug in the
PHP ZIP extension #77214 (also #74619 and #69477) so that we fall back
to keep using the stream in those cases.
2021-02-03 16:11:00 +01:00
Sara Arjona 994e833c20 Merge branch 'MDL-70705-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-02-03 15:33:26 +01:00
Luca Bösch ab3f29f739 MDL-70705 block_blog_recent: support multilang blog entry titles 2021-02-03 15:15:43 +01:00
Sara Arjona fb298c2209 Merge branch 'MDL-70741_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-02-03 14:49:57 +01:00
David Castro 10126a1325 MDL-69562 admin: Allow getting IP from all sources. 2021-02-03 07:23:12 -05:00
Eloy Lafuente (stronk7) 6bd3ffdf25 Merge branch 'MDL-70711-M39' of git://github.com/kordan/moodle into MOODLE_39_STABLE 2021-02-03 13:04:22 +01:00
Sara Arjona d1f40013d9 Merge branch 'MDL-67959-39-2' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2021-02-03 10:50:54 +01:00
Tim Hunt 2386b44490 MDL-69101 Essay/Moodle XML: recent new settings not imported/exported 2021-02-03 08:15:26 +00:00
Sara Arjona dffd5de050 Merge branch 'MDL-70621-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-02-03 09:03:05 +01:00
Sara Arjona fdf5ac3dfb Merge branch 'MDL-68970_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-02-03 08:51:29 +01:00
Luca Bösch 70cfba0496 MDL-70621 mod_glossary: use glossary rsstype string. 2021-02-03 08:34:24 +01:00
Luca Bösch 92e4d6c028 MDL-70621 mod_forum: use forum rsstype string. 2021-02-03 08:34:24 +01:00
Andrew Nicols 3a88c22eb1 Merge branch 'MDL-56772-39' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2021-02-03 10:58:05 +08:00
Andrew Nicols ac4fe16003 Merge branch 'MDL-66932_M39' of https://github.com/nadavkav/moodle into MOODLE_39_STABLE 2021-02-03 10:24:12 +08:00
Andrew Nicols 0e0a753346 Merge branch 'MDL-68893-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-02-03 09:41:28 +08:00
Andrew Nicols 0f21f23c05 Merge branch 'MDL-68958-39' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2021-02-03 09:38:08 +08:00
Andrew Nicols 7171c9fc0a Merge branch 'MDL-70339-39' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2021-02-03 09:09:30 +08:00
Víctor Déniz 0322232dd4 Merge branch 'MDL-59782-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2021-02-02 09:35:29 +00:00
Sara Arjona f5590ad1c0 Merge branch 'MDL-70574_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-02-02 08:20:45 +01:00
Sara Arjona dcaf627cfe Merge branch 'MDL-70288-39-2' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2021-02-02 07:59:49 +01:00
Jun Pataleta 6aa1c3dfcb MDL-70288 qtype: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 14:22:30 +08:00
Jun Pataleta 6c97f9d1f5 MDL-70288 mod_lti: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 14:22:30 +08:00
Jun Pataleta 8a2a5f1a89 MDL-70288 core: Remove duplicate labels for checkbox elements
* If there's a label, the text will serve as the description of  the
element.
2021-02-02 14:22:30 +08:00
Jun Pataleta 9bce6baf62 MDL-70288 theme_boost: Manage aria-describedby on form validation
* The aria-describedby attribute can be a list of element IDs that
describe the element. On form validation, the ID of the error message
container is added to this attribute which may already be containing
another ID. So we need to properly add/remove the error message ID
so that we don't delete any existing ID(s) in the aria-describedby
attribute during form validation.
2021-02-02 14:22:30 +08:00
Eloy Lafuente (stronk7) f7f7755067 Merge branch 'MDL-46256_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-02-01 23:20:33 +01:00
Sara Arjona 9ac848c738 Merge branch 'MDL-70625-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2021-02-01 15:37:17 +01:00
Sara Arjona db9934a625 Merge branch 'MDL-70734-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-02-01 12:30:29 +01:00
Sara Arjona 6b3cb904d0 Merge branch 'MDL-70740-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-02-01 11:25:31 +01:00
Paul Holden c43f9136f3 MDL-70614 user: consistent roles spacing in course profile. 2021-02-01 07:54:13 +00:00
Andrew Nicols 01fc4b40f0 MDL-70734 behat: Increase the WebDriver Curl timeout 2021-02-01 09:50:20 +08:00
AMOS bot f5152d30c3 Automatically generated installer lang files 2021-02-01 00:07:49 +00:00
Andrew Nicols 3827885984 MDL-70740 behat: Composer bump for new version of Mink Driver 2021-01-31 20:26:35 +08:00
AMOS bot bc84eabfc6 Automatically generated installer lang files 2021-01-31 00:07:45 +00:00
Luca Bösch 6735a694e2 MDL-68893 mod_data: use own RSS feed string.
AMOS BEGIN
 CPY [rsstype,core],[rsstype,mod_data]
AMOS END
2021-01-29 23:18:36 +01:00
Tim Hunt 186fd5b847 MDL-70741 capability overview: avoid errors from orphan contexts 2021-01-29 20:51:08 +00:00
Víctor Déniz 0f1f18d8a4 weekly release 3.9.4+ 2021-01-29 17:13:10 +00:00
Víctor Déniz c3589fee83 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-01-29 17:13:03 +00:00
Jake Dallimore 6e74df2344 Merge branch 'MDL-66979-39-7' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-01-29 15:45:03 +08:00
Andrew Nicols 42bb84db9f MDL-66979 behat: Mark some tests as being slow
Uses of the httpsreplace and customlang tools are known to be extremely
slow.

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

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

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

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

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-28 17:12:28 +01:00
Bas Brands feea5e5cbd MDL-59782 core_question: improve questionbank highlighting 2021-01-28 11:08:07 +01:00
Kordan 78855e618c MDL-70711 form: deleted useless if block
get_magic_quotes_gpc() always return false since PHP 5.3 so (1 == get_magic_quotes_gpc()) is never verified.
This allows me to safetly delete what I dropped out.
2021-01-28 09:28:34 +01:00
Eloy Lafuente (stronk7) 01f6f99349 Merge branch 'MDL-66979-39-7' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-01-28 09:09:09 +01:00
Andrew Nicols 63a322b0e7 MDL-66979 behat: Set script timeout with timeout factor 2021-01-28 15:27:49 +08:00
Andrew Nicols 9a92ca5e75 MDL-66979 behat: Correct selenium2 reference in config-dist 2021-01-28 15:08:10 +08:00
Andrew Nicols 209768c9bc MDL-66979 behat: Handle driver stop failure properly
An case was found where the webdriver stop() call could fail in an
AfterScenario hook, leading to a complete rerun if no other errors were
experienced.
2021-01-28 15:07:52 +08:00
Andrew Nicols 8e1f02568a Merge branch 'MDL-70048-39' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2021-01-28 08:05:26 +08:00
Peter Dias 8039e01ef7 MDL-70048 dropbox: Augmented unit tests to account for additional params 2021-01-28 07:32:47 +08:00
Peter Dias 1dc927aea7 MDL-70048 dropbox: Update the dropbox search URL.
- Update fetch_dropbox_data to allow different result nodes and version
- Update search to the new URL with new params
- Update the get entities function to account for the change in structure.
2021-01-28 07:32:47 +08:00
Sara Arjona f03fd2f6b7 MDL-70725 oauth2: move expectException to separate method 2021-01-27 17:54:23 +01:00
AMOS bot ea17a4cbd6 Automatically generated installer lang files 2021-01-27 00:07:50 +00:00
Eloy Lafuente (stronk7) 9a9fde8aa5 Merge branch 'MDL-66979-39-7' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2021-01-26 22:46:08 +01:00
Víctor Déniz aa741e8795 Merge branch 'MDL-70528-39' of git://github.com/ilyatregubov/moodle into MOODLE_39_STABLE 2021-01-26 14:04:35 +00:00
Ilya Tregubov 1ca2e36ecf MDL-70528 h5pactivity: Fix block can't be added to h5pactivity page. 2021-01-26 15:21:18 +02:00
Tim Hunt 99b37e2c3b MDL-68970 quiz: prevent page caching during attempts
This ensures that the page reloads if the student uses
the Back or Forwards buttons within an attempt. This
avoids questions being in a stale state, or
the timer showing the wrong time.

Thanks to Jake Dallimore and Russell Boyatt for suggestions
which lead to this fix.
2021-01-25 18:35:38 +00:00
Peter Dias 2d7f1d7470 MDL-70339 mod_lti: Use the convenience function to get the right img 2021-01-25 13:39:24 +08:00
Peter Dias ff146ed37d MDL-68958 mod_imscp: Return manifestfilename as default response. 2021-01-25 13:23:38 +08:00
Peter Dias 2b9db93f78 MDL-56772 core: Update the picker styles for rtl langs 2021-01-25 11:36:56 +08:00
Andrew Nicols 985f4d1e48 MDL-66979 behat: Warn about old behat.yml file location 2021-01-23 20:45:06 +08:00
AMOS bot 77475c93fd Automatically generated installer lang files 2021-01-23 00:07:47 +00:00
Andrew Nicols 6a9f05742e MDL-66979 behat: Rename and warn on old config 2021-01-22 14:52:22 +08:00
Andrew Nicols 1116c64d44 MDL-66979 behat: Pad messaging drawer
This works around an issue highlighted by MDL-70411 whereby some of the
messaging links are covered by the scrollbar in Firefox on MacOS.
2021-01-22 14:52:22 +08:00
Andrew Nicols 5d211ff68a MDL-66979 behat: Work around weird gradebook focus behaviour
I can't expand this one in a sane fashion but the older JS is doing some
weird and wonderful things with focus.

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

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

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

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

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

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

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

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

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

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

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

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

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

Most of these changes relate to use of features of WebDriver which we
are required to use directly rather than through the Mink Driver.
2021-01-22 14:52:21 +08:00
Andrew Nicols c2c71b28eb MDL-66979 behat: Switch to new W3C Behat driver
This commit updates the composer dependencies to make use of the updated
version of moodlehq/moodle-behat-extension which depends upon the
php-webdriver/webdriver and relevant Mink WebDriver.
2021-01-22 14:52:21 +08:00
Jake Dallimore db6d34630f weekly release 3.9.4+ 2021-01-22 11:30:51 +08:00
Jake Dallimore 88a9d4cff1 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-01-22 11:30:49 +08:00
Tim Hunt 96c8ad66f9 MDL-46256 count_words: fix handling of paragraphs 2021-01-21 09:55:19 +00:00
Tim Hunt fbb0428179 MDL-46256 count_letters: an unit tests and fix HTML editity handling 2021-01-21 09:55:19 +00:00
Tim Hunt 82592f0c84 MDL-46256 word count: Convert existing tests to a data provider 2021-01-21 09:55:18 +00:00
Adrian Greeve aa3118999a Merge branch 'MDL-57020-39-allow_delete_unused_scale' of https://github.com/sharidas/moodle into MOODLE_39_STABLE 2021-01-21 12:03:26 +08:00
Nadav Kavalerchik 80de5d08ee MDL-66932 theme/boost: Use LTR directionality to display user % grades 2021-01-20 09:33:23 +02:00
AMOS bot 1d457c78f5 Automatically generated installer lang files 2021-01-17 00:07:49 +00:00
Eloy Lafuente (stronk7) de301d4237 Moodle release 3.9.4 2021-01-16 16:58:25 +01:00
Sujith Haridasan e2c94750fb MDL-57020 scales: Allow deletion of unused scales in forum
Allow deletion of unused scales used in a
forum for the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-01-15 15:05:51 +05:30
Sara Arjona e2c8f4ad1b weekly release 3.9.3+ 2021-01-15 08:25:45 +01:00
Sara Arjona 8c1455d220 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-01-15 08:25:44 +01:00
Sara Arjona 7b85e141da Merge branch 'MDL-69308_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-01-14 12:04:13 +01:00
Jake Dallimore cd744ba504 Merge branch 'MDL-69877-39' of git://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2021-01-14 14:52:36 +08:00
Michael Hawkins 974c63505b MDL-69877 core: Added security.txt 2021-01-14 14:31:01 +08:00
AMOS bot 724210c4f7 Automatically generated installer lang files 2021-01-14 00:07:44 +00:00
Eloy Lafuente (stronk7) ae9d510288 MDL-69308 environment: Apply agreed changes
- PHP 7.3 required.
- Moodle 3.6 required.
- SQL*Server 2017 (aka, 14.0) required.
- Sodium PHP extension required.
2021-01-13 19:30:15 +01:00
Eloy Lafuente (stronk7) 981f750b81 MDL-69308 environment: 3.11 base information
This is a direct copy of the 3.10 branch to have
the changes under control in next commits.
2021-01-13 19:30:10 +01:00
Shamim Rezaie e49f9e46aa MDL-70625 core_calendar: Fix whitespace appearance in the id attribute 2021-01-14 01:59:18 +11:00
Mihail Geshoski 721d57228f MDL-68486 auth_shibboleth: Reset convert_data if it uses dataroot file
Upgrade step that resets the 'Data modification API' (convert_data)
setting to its default value if this setting is currently configured
to use a file located within the $CFG->dataroot directory.
2021-01-13 12:35:42 +08:00
Mihail Geshoski 3c25c373d9 MDL-68486 auth_shibboleth: Prevent using dataroot files in convert_data
Prevents configuring the 'Data modification API' (convert_data) setting
to use files located within the $CFG->dataroot directory as it exposes
the site to security risks.
2021-01-13 12:35:42 +08:00
AMOS bot 17eb41c270 Automatically generated installer lang files 2021-01-13 00:07:45 +00:00
Michael Hawkins af6e65f221 MDL-69911 core: Clean content passed through TeX filter 2021-01-12 10:27:31 +01:00
Ferran Recio 8bbc064e29 MDL-67782 message: fix messages max length 2021-01-12 10:27:31 +01:00
Juan Segarra Montesinos 78b18c00bf MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 10:27:31 +01:00
Juan Segarra Montesinos 4b3b4b7d78 MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 10:27:31 +01:00
Juan Segarra Montesinos 557d1c8820 MDL-69797 gradingform_rubric: Implement authorization into fetch method 2021-01-12 10:27:31 +01:00
Juan Segarra Montesinos 698e1f7823 MDL-69797 gradingform_guide: Implement authorization into fetch method 2021-01-12 10:27:31 +01:00
Sara Arjona 5b4702a6b6 Merge branch 'MDL-70009-39' of git://github.com/ilyatregubov/moodle into MOODLE_39_STABLE 2021-01-12 10:21:20 +01:00
Jake Dallimore 77c0b16613 Merge branch 'MDL-69431_Validate_section_arg_modedit' of git://github.com/watson8/moodle into MOODLE_39_STABLE 2021-01-12 17:09:29 +08:00
Ilya Tregubov 9adef8af21 MDL-70009 h5pactivity: Split get_pluginfile_hash in two methods. 2021-01-12 09:11:04 +02:00
AMOS bot cc45df637f Automatically generated installer lang files 2021-01-12 00:07:54 +00:00
Tim Hunt 9055c9e213 MDL-70574 qtype_multianswer: fractional scores should be possible 2021-01-11 17:38:10 +00:00
Sara Arjona 13655cd5ea Merge branch 'MDL-70034_39' of git://github.com/mdjnelson/moodle into MOODLE_39_STABLE 2021-01-11 15:19:39 +01:00
Sara Arjona ea3f1d19b9 Merge branch 'MDL-70567-MOODLE_39_STABLE' of https://github.com/dmitriim/moodle into MOODLE_39_STABLE 2021-01-11 13:09:56 +01:00
Sara Arjona 8256ebd431 Merge branch 'MDL-70578-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2021-01-11 12:58:28 +01:00
Sara Arjona 8ba97d0104 Merge branch 'MDL-70352-MOODLE_39_STABLE' of https://github.com/dmitriim/moodle into MOODLE_39_STABLE 2021-01-11 12:24:12 +01:00
AMOS bot 71ee378a69 Automatically generated installer lang files 2021-01-11 00:08:59 +00:00
David Watson 8208453a14 MDL-69431 course: validate section url param against maxsections 2021-01-10 17:11:50 +00:00
Eloy Lafuente (stronk7) 7c6e9b37b3 Merge branch 'MDL-70550-39-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2021-01-09 13:18:02 +01:00
Mark Nelson 19dc872bca MDL-70034 gradingform_guide: use new API to retrieve grade item name 2021-01-09 14:31:18 +08:00
AMOS bot 0a51214fb3 Automatically generated installer lang files 2021-01-09 00:07:50 +00:00
Sara Arjona 6910afa56f Merge branch 'MDL-70558-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2021-01-08 17:07:29 +01:00
Sara Arjona 5e5e82621c Merge branch 'MDL-70102-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2021-01-08 15:51:14 +01:00
David Mudrák 2edff57e63 MDL-70550 lang: Use the fixed strings in Behat tests, too 2021-01-08 09:17:03 +01:00
Helen Foster 3b8bb4d4c1 MDL-70550 lang: Import fixed English strings (en_fix) 2021-01-08 09:16:38 +01:00
Jun Pataleta 920763ad00 Merge branch 'MDL-70310-39' of git://github.com/ilyatregubov/moodle into MOODLE_39_STABLE 2021-01-08 14:47:05 +08:00
Luca Bösch 1acd3cac07 MDL-70578 cohorts: Add bootstrap classes to buttons 2021-01-08 07:28:02 +01:00
Jun Pataleta 7de4119fe2 weekly release 3.9.3+ 2021-01-08 12:14:52 +08:00
Jun Pataleta 6fb2fa9859 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2021-01-08 12:14:51 +08:00
AMOS bot 1d54d21ec0 Automatically generated installer lang files 2021-01-08 00:07:44 +00:00
Eloy Lafuente (stronk7) c87ed01b17 Merge branch 'MDL-70245-MOODLE_39_STABLE' of https://github.com/TomoTsuyuki/moodle into MOODLE_39_STABLE 2021-01-07 23:50:05 +01:00
Eloy Lafuente (stronk7) 23541c936a Merge branch 'MDL-70584-39' of git://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2021-01-07 23:30:53 +01:00
sam marshall b7490a205f MDL-70102 PHPunit: Core test fails with weird added modules
Specifically it fails if the modules have unusual default capabilities
so that editingteacher doesn't have addinstance.
2021-01-07 16:12:30 +00:00
Marina Glancy 8415e0461b MDL-70584 core_iplookup: increase tolerance in test 2021-01-07 14:23:33 +01:00
Ilya Tregubov 9ee41118b0 MDL-70310 user: Remove yahoo icon since domain no longer exists. 2021-01-07 09:15:35 +02:00
Jun Pataleta 137b10b378 Merge branch 'MDL-70374_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-01-07 12:23:34 +08:00
Eloy Lafuente (stronk7) bb9e3ec1ff Merge branch 'MDL-70476_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-01-07 00:28:16 +01:00
Eloy Lafuente (stronk7) 7152b05700 Merge branch 'MOODLE_39_MDL-70520' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2021-01-07 00:19:23 +01:00
Dmitrii Metelkin 087ccaff4f MDL-70567 task: fix broken result filter on logs page 2021-01-06 14:28:38 +11:00
Dmitrii Metelkin 3fb245f481 MDL-70352 core: attach modal to a specific element 2021-01-06 11:09:01 +11:00
Paul Holden 8de31cf961 MDL-70558 tool_langimport: sort available language packs. 2021-01-04 23:56:05 +00:00
AMOS bot 88e7da61cd Automatically generated installer lang files 2020-12-27 00:07:46 +00:00
AMOS bot 3648b629ed Automatically generated installer lang files 2020-12-24 00:07:52 +00:00
Eloy Lafuente (stronk7) 0d833e248a weekly release 3.9.3+ 2020-12-23 20:24:49 +01:00
Eloy Lafuente (stronk7) 783fba428f Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-12-23 20:24:46 +01:00
Eloy Lafuente (stronk7) 514c7ee639 Merge branch 'MDL-56119-390' of https://github.com/inigozendegi/moodle into MOODLE_39_STABLE 2020-12-23 01:07:59 +01:00
Eloy Lafuente (stronk7) fa35b9506f Merge branch 'MDL-70279-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-12-23 00:47:09 +01:00
Eloy Lafuente (stronk7) 29f7630b75 Merge branch 'MDL-70436-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-12-22 18:30:03 +01:00
Eloy Lafuente (stronk7) 7a2a47d9e8 Merge branch 'MDL-70386-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-12-22 18:22:10 +01:00
Jake Dallimore 17211224a1 Merge branch 'MDL-69422-39-2' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-12-22 16:03:33 +08:00
Jake Dallimore 2394a675dd Merge branch 'MDL-70426-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-12-22 15:17:02 +08:00
Mikhail Golenkov 449c835fe2 MDL-70520 mod_assign: Use task API to get scheduled task lastruntime 2020-12-22 15:31:42 +11:00
Mikhail Golenkov 322afa9f4f MDL-70520 tasks: Keep lastruntime when a scheduled task is reset 2020-12-22 15:31:38 +11:00
AMOS bot 1d0777dbe4 Automatically generated installer lang files 2020-12-22 00:07:45 +00:00
Víctor Déniz cd94f2bc2e Merge branch 'MDL-70355-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-12-21 23:18:49 +00:00
Sara Arjona e899fd5c02 Merge branch 'MDL-69107-39-2' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-12-18 15:22:41 +01:00
Tim Hunt 438b2ac8c2 MDL-70374 qtype_multichoice: improve alignment of choices 2020-12-18 13:09:41 +00:00
Tim Hunt f6ae03bf41 MDL-70476 permission overrides: role names double-escaped in tool tip 2020-12-18 13:09:02 +00:00
Luca Bösch fc52aaf319 MDL-70355 calendar: Filter popuptext for calendar entries. 2020-12-17 17:42:42 +01:00
Sara Arjona ef8eb8ef1a weekly release 3.9.3+ 2020-12-17 15:52:48 +01:00
Sara Arjona f1c6cf8b26 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-12-17 15:52:46 +01:00
Víctor Déniz e68cea5747 Merge branch 'MDL-70261-39' of git://github.com/ilya-catalyst/moodle into MOODLE_39_STABLE 2020-12-16 12:36:13 +00:00
Sara Arjona 3f797704ea Merge branch 'MDL-70373_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-12-16 12:40:58 +01:00
Jun Pataleta aae57db8d2 Merge branch 'MDL-54907_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-12-16 10:01:04 +08:00
Andrew Nicols 8c3091e5f3 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Sara Arjona b52ad05038 Merge branch 'MDL-70422-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-12-15 16:43:14 +01:00
Sara Arjona ec5d807139 Merge branch 'MDL-70409-39' of git://github.com/merrill-oakland/moodle into MOODLE_39_STABLE 2020-12-15 16:15:59 +01:00
Sara Arjona 1f00b5d9bb Merge branch 'MDL-70342-39' of git://github.com/abias/moodle into MOODLE_39_STABLE 2020-12-15 15:29:28 +01:00
Sara Arjona 0f53bd6b8e Merge branch 'MDL-70357-39-cronlibthrowables' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-12-15 14:56:12 +01:00
Ilya Tregubov bf29fea4bb MDL-70261 course: Allow update locked course custom fields
on course upload.
2020-12-15 14:43:18 +02:00
Jake Dallimore 8a733bc85f Merge branch 'MDL-67623-39_blocks_myoverview_pagination_regression' of https://github.com/tomdickman/moodle into MOODLE_39_STABLE 2020-12-15 18:22:28 +08:00
Andrew Nicols 1b87f634a8 MDL-69107 form_autocomplete: Rewrite item selection
The form_autocomplete is essentially a custom element. Unfortunately the
`setValue()` function in Mink has undesired actions so it is necessary
to write our own handling for it.

The standard Mink `setValue()` function focuses the element, sets a
value, and then blurs the element. In the case of the autocomplete this
can cause the autocomplete suggestions list to be closed in some
situations. Instead of using the setValue we click, and type the value,
but do not immediately blur.
2020-12-15 09:08:05 +08:00
AMOS bot 9260dad3b3 Automatically generated installer lang files 2020-12-15 00:07:45 +00:00
Sara Arjona 6002a1454f Merge branch 'MDL-70397-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-12-14 17:12:15 +01:00
Jake Dallimore cef3216f2a Merge branch 'MDL-70324-3.9' of https://github.com/JBThong/moodle into MOODLE_39_STABLE 2020-12-14 11:30:32 +08:00
Tom Dickman bed6bfe7d4 MDL-67623 block overview: fix pagination regression
Fixed a regression caused by MDL-64194 resulting in Dashboard - Course
overview pagination not working from second page of courses onwards.

Course overview block should now do the following:
- Display no pagination controls when user has no courses
- Display no pagination controls when less than 12 courses to display
- Only display pagination controls up to the number of courses user is
enrolled in
- Work correctly when on a page greater than the second page.
2020-12-14 13:34:38 +11:00
AMOS bot 1c39517553 Automatically generated installer lang files 2020-12-13 00:07:45 +00:00
AMOS bot e92846ce18 Automatically generated installer lang files 2020-12-12 00:07:55 +00:00
AMOS bot 31d0ccb078 Merge branch 'MOODLE_39_STABLE' into install_39_STABLE 2020-12-12 00:07:54 +00:00
AMOS bot fc7fa7f72c Automatically generated installer lang files 2020-12-11 00:07:53 +00:00
Víctor Déniz 6994f63eef weekly release 3.9.3+ 2020-12-10 21:10:36 +00:00
Víctor Déniz c28c0ed466 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-12-10 21:10:30 +00:00
Huong Nguyen 479b0f0eaa MDL-70426 qtype_ddmarker: infinite markers keep duplicating 2020-12-10 15:55:24 +07:00
Shamim Rezaie 7b96e8a413 MDL-69301 theme_boost: Remove the special handling of Escape key 2020-12-10 14:56:46 +08:00
Tomo Tsuyuki 2321fe4da9 MDL-70245 core_grade: Fix grade_get_setting unit test failures
To fix the phpunit issue, change from static variable to use cache
2020-12-10 16:46:54 +11:00
Jake Dallimore 3aa05048cf Merge branch 'MDL-70320-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-12-10 12:02:53 +08:00
Andrew Nicols 17d6ecd26d MDL-70320 behat: User full path to page admin node 2020-12-10 07:56:58 +08:00
Bas Brands 7d5c5fad77 MDL-70386 theme_boost: quizes correctness badges 2020-12-09 18:09:27 +01:00
Bas Brands c1296560bf MDL-70436 theme_boost: closebutton styles in moodle-dialog-fullscreen 2020-12-09 14:59:50 +01:00
Víctor Déniz 93e25f8657 Merge branch 'MDL-63683-39' of https://github.com/dravek/moodle into MOODLE_39_STABLE 2020-12-09 12:46:18 +00:00
Jake Dallimore f43de821c6 Merge branch 'MDL-70151-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-12-09 14:46:36 +08:00
Andrew Nicols 1b0690a7f1 Merge branch 'MDL-70320_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-12-09 12:07:32 +08:00
Andrew Nicols e003e8a6ff Merge branch 'MDL-62707-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-12-09 08:58:12 +08:00
Jake Dallimore 1e8f432437 Merge branch 'MDL-70285_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-12-08 16:34:10 +08:00
AMOS bot 51d7849f08 Automatically generated installer lang files 2020-12-08 00:07:43 +00:00
Paul Holden ede7d22dc7 MDL-70422 restore: fix for undefined question answer ordering in test. 2020-12-07 10:15:55 +00:00
Adrian Greeve 4355451e2f Merge branch 'MDL-69301-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-12-07 09:23:27 +08:00
AMOS bot 5e102fa8c3 Automatically generated installer lang files 2020-12-06 00:07:50 +00:00
Eric Merrill 1925b641e2 MDL-70409 chat: Use require_once to import lib.php 2020-12-04 10:46:16 -05:00
Paul Holden 377da86151 MDL-70279 tool_templatelibrary: preserve component search field value. 2020-12-04 14:55:28 +00:00
Paul Holden 9a2db9e2ec MDL-62707 search: account for no matching courses when listing areas.
When limiting the list of courses during retrieval of the search areas
the user can access, make sure we have some contexts before looking
for blocks.
2020-12-04 09:43:27 +00:00
inigozendegi 844637b880 MDL-56119 gradingform_rubric: Rubric display layout issue 2020-12-04 09:41:40 +01:00
David Matamoros 9e597d3658 MDL-63683 enrol: Fix plugin settings when no role has student archetype 2020-12-04 09:27:20 +01:00
Andrew Nicols 0e25936c0d MDL-70397 behat: Prevent browser restarting after initial start 2020-12-04 12:07:36 +08:00
Jake Dallimore 627e14727e weekly release 3.9.3+ 2020-12-04 08:42:43 +08:00
Jake Dallimore ffe84e977f Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-12-04 08:42:40 +08:00
Andrew Nicols 7bc67e92e2 Merge branch 'MDL-70080-39' of git://github.com/jleyva/moodle into MOODLE_39_STABLE 2020-12-03 11:55:54 +08:00
Andrew Nicols dd96341354 Merge branch 'MDL-70327-39' of git://github.com/cescobedo/moodle into MOODLE_39_STABLE 2020-12-03 11:52:06 +08:00
Andrew Nicols 1714cb74b3 Merge branch 'MDL-70321_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-12-03 11:40:24 +08:00
Jake Dallimore c94c579aa6 Merge branch 'MDL-69411-39' of git://github.com/dravek/moodle into MOODLE_39_STABLE 2020-12-03 11:37:17 +08:00
Jake Dallimore 16bcd8f057 Merge branch 'MDL-67460-39_profile_secure' of https://github.com/beenet-dev/moodle into MOODLE_39_STABLE 2020-12-03 11:16:52 +08:00
Andrew Nicols 5e65d02eab Merge branch 'MDL-70157_39' of https://github.com/rlorenzo/moodle into MOODLE_39_STABLE 2020-12-03 11:01:21 +08:00
Adrian Greeve 1b8bfedaa9 Merge branch 'wip_MDL-70267_m39' of git://github.com/gjb2048/moodle into MOODLE_39_STABLE 2020-12-03 10:55:54 +08:00
Adrian Greeve 7b920d2d7b Merge branch 'MDL-70167-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-12-03 09:56:42 +08:00
AMOS bot 63b0a865dd Automatically generated installer lang files 2020-12-03 00:07:48 +00:00
Andrew Nicols 7766af18a5 Merge branch 'MDL-69868-39' of git://github.com/ilya-catalyst/moodle into MOODLE_39_STABLE 2020-12-03 07:48:59 +08:00
Tim Hunt 14d68d98b5 MDL-70373 qtype_essay: missing border on atto input 2020-12-02 20:10:15 +00:00
Shamim Rezaie 8676a67888 MDL-69301 course: Remove custom keyboard navigation code 2020-12-02 23:11:27 +11:00
Shamim Rezaie 8af16c5709 MDL-69301 core: Enhanced WAI-ARIA support for tab elements 2020-12-02 23:08:13 +11:00
Shamim Rezaie 7f74dc1c16 MDL-69301 theme_boost: convert aria.js to es6 module 2020-12-02 23:08:13 +11:00
Jake Dallimore 5bdc07a3b6 Merge branch 'MDL-67514-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-12-02 16:24:30 +08:00
AMOS bot bccfc48b94 Automatically generated installer lang files 2020-12-02 00:07:44 +00:00
Thong Bui 95c3de0877 MDL-70324 Question: get_all_response_file_areas() not work correctly 2020-12-01 16:16:45 +07:00
AMOS bot d833fc2131 Automatically generated installer lang files 2020-12-01 00:07:51 +00:00
David Mudrák 6e04f9f294 MDL-70357 cron: Catch Throwables not just Exceptions when running tasks
Starting from PHP 7, most language errors throw Error exceptions. We
want to deal with those equally as with any other exception so we need
to catch all Throwables here.
2020-11-30 17:37:39 +01:00
Alexander Bias 7f45f9ab3e MDL-70342 block_timeline: Get rid of double quotes
This commit gets rid of double quotes around the activity name and course name
which have sneaked into block_timeline's view in MDL-65183.
2020-11-30 13:18:40 +01:00
Gareth Barnard 547a6dcdde MDL-70267 ux, theme: Course user profile inconsistent page layout. 2020-11-29 23:52:32 +00:00
AMOS bot 28fff43d2b Automatically generated installer lang files 2020-11-29 00:07:54 +00:00
Tim Hunt 7565cda9c6 MDL-54907 quiz unit tests: clean up code style in attempts_test.php 2020-11-27 18:30:19 +00:00
Tim Hunt 90fa490de7 MDL-54907 quiz: better timefinish for attempts finished asynchronously
There are serveral ways a quiz attempt can be submitted:

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

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

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

   Now, in this situation, the finsh time for the quiz attempt is
   recorded as the time when the time limit ran out. This is not
   just less confusing for teachers looking at the quiz report,
   it is also more accurate. That is the latest time at which
   students could have made any changes to their responses.
2020-11-27 18:30:19 +00:00
Tim Hunt 5f9ddb348e MDL-54907 quiz generator: defaults should match a new Moodle install 2020-11-27 18:30:18 +00:00
Tim Hunt ff8da7e008 MDL-54907 dml: Correct incorrect PHPdoc 2020-11-27 18:30:18 +00:00
Juan Leyva dde5a7882c MDL-70340 mod_workshop: Do not apply format to peer comments
This text is not directly output to final users, it is used just in the textarea in both the site and the app.
Applying format, case issues like adding glossary links etc...
2020-11-27 18:16:31 +01:00
Jun Pataleta a6ab91786f MDL-69422 mod_data: Export form accessibility fixes
* Set appropriate heading element IDs
* Replace usages of deprecated HTML tag acronym with abbr instead.
* Add a label for the export fields fieldset.
* Move the CSV delimiter list outside the radio group.
* Fix div under a label element and duplicate labels
for the checkboxes of the fields to be exported by showing the field
name and type together.
* Group the fields to be exported as a fieldset.
* Move unsupported fields into a separate list.
* Move export options into its own section and group the options as a
fieldset.
2020-11-27 23:24:26 +08:00
Jun Pataleta 0a43bdcc6c MDL-69422 core: Convert required and help button container to div
* A span element cannot have a div as a child.
2020-11-27 23:24:26 +08:00
Juan Leyva b1a4bd579a MDL-70080 tool_mobile: Return support contact information via WS 2020-11-27 10:19:15 +01:00
Sara Arjona 4825c139ef weekly release 3.9.3+ 2020-11-27 07:50:43 +01:00
Sara Arjona d207a2ad02 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-11-27 07:50:40 +01:00
AMOS bot ccc6b4d00b Automatically generated installer lang files 2020-11-27 06:21:32 +00:00
Tim Hunt cc3a909810 MDL-70320 permission overrides: role names were double-escaped 2020-11-26 20:37:18 +00:00
Sara Arjona c93de36436 Merge branch 'MDL-70276_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-11-26 15:04:48 +01:00
Ilya Tregubov da3ebf216e MDL-69868 h5pactivity: Prevent breaking $USER when seeing
attempt report.
2020-11-26 12:40:33 +02:00
Andrew Nicols 7c8fd0d417 Merge branch 'MDL-70242-39' of git://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2020-11-26 10:49:32 +08:00
Andrew Nicols 558ace5997 Merge branch 'MDL-65852-39' of git://github.com/ilya-catalyst/moodle into MOODLE_39_STABLE 2020-11-26 10:04:23 +08:00
Eloy Lafuente (stronk7) 98254ccd1a MDL-70276 github actions: First cut, phpunit and grunt checks
First working version, supports phpunit (using build matrix):

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

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

TODO: Verify the remaining checks currently in .travis.yml, namely:
 - CITEST
 - Add caching
 - Better health-check for DB images.
 - Support from the tracker (satus badges and enable check).
 - Support from CiBoT (status and enable check).
 - Consider moving both the common setup (git, composer...)
   and the database (mysql, postgres) to own actions for
   easier tweaking.
2020-11-26 00:23:49 +01:00
cescobedo 5be02868af MDL-70327 core_h5p: Add preventredirect to the player 2020-11-25 16:30:50 +01:00
Sara Arjona a36b3ec48f Merge branch 'MDL-70248-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-11-25 16:23:07 +01:00
Sara Arjona ea4e0ae3cb Merge branch 'MDL-70265_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-11-25 15:47:01 +01:00
Ilya Tregubov 68c3eb8aa9 MDL-65852 user: Fix permission check to download course participants. 2020-11-25 11:27:31 +02:00
Tim Hunt 331b9947a3 MDL-70321 question backup: fix MDL-47178 unit tests
They were failing if you had CodeRunner installed
2020-11-24 15:29:55 +00:00
Simon Mok 4e8d58374e MDL-67460 profile: User profile link to use HTTPS 2020-11-24 20:49:35 +08:00
Tim Hunt 86669b0564 MDL-70285 completion upgrade: fix performance of the MDL-69687 code 2020-11-23 21:02:08 +00:00
David Matamoros e80e613f65 MDL-69411 core_message: Fix return structure for empty result set
Passing a timefrom higher than last message timecreated needs to
return a formatted response so it does not break ws.
2020-11-23 19:25:44 +01:00
Eloy Lafuente (stronk7) 81410615ed MDL-70265 travis: Completely remove the UPGRADE check
It was broken since ages ago, see MDL-64874, so no sense
to keep it eating minutes for nothing.
2020-11-23 13:43:15 +01:00
Adrian Greeve 1d0bd0cfdf Merge branch 'MDL-67668-39-2' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-11-23 15:36:55 +08:00
Jake Dallimore b4f40ae78e Merge branch 'MDL-70160-function-cache-39' of https://github.com/Peterburnett/moodle into MOODLE_39_STABLE 2020-11-23 15:23:10 +08:00
Andrew Nicols 556611a864 MDL-70151 assign: Fix bulk change for behat
Behat does not play well with confirmation dialogues and in some
situations it does not wait for the page to reload before starting the
next step.

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

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

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

This default behavior can be changed with a new variable:

MOODLE_PHP = [all]
MOODLE_DATABASE = [pgsql | mysqli | all]
2020-11-21 11:28:27 +01:00
Charles Fulton ed46bff4ae MDL-70157 dml: add support for aurora mysql 2020-11-20 15:21:22 -08:00
Eloy Lafuente (stronk7) 87bcff8c6e weekly release 3.9.3+ 2020-11-20 23:17:02 +01:00
Huong Nguyen 81c2fe97a3 MDL-70248 qtype_ddimageortext: Drop zones have UI issue in Editing form 2020-11-19 17:16:23 +07:00
Adrian Greeve 8b53812c8f Merge branch 'MOODLE_39_STABLE-MDL-67636' of https://github.com/yao9394/moodle into MOODLE_39_STABLE 2020-11-19 11:56:28 +08:00
John Yao 78aeaf17e7 MDL-67636 gradebook: Prevent exposing hidden grade in locked category 2020-11-19 14:34:43 +11:00
Adrian Greeve 662d20869a Merge branch 'MDL-56653-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-11-19 11:02:18 +08:00
Jun Pataleta f66c4fa42d Merge branch 'MDL-70094-39' of https://github.com/SangNguyen2601/moodle into MOODLE_39_STABLE 2020-11-19 09:35:43 +08:00
Eloy Lafuente (stronk7) 76a830b058 Merge branch 'MDL-69201-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-11-18 23:00:30 +01:00
sangnguyen 2f9582d754 MDL-70094 Question: Technical info section expands if click help icon 2020-11-18 17:30:49 +07:00
Vitaly 12d4c82f98 MDL-56653 enrol_meta: a single DB query in edit_instance_validation
The 'edit_instance_validation()' method checks for existing meta enrolment instances.
The fix replaces DB queries in a loop for each course with a single query for all courses.
Also, a new testing method 'test_edit_instance_validation_with_existing_courses()'
was added to /enrol/meta/tests/plugin_test.php to test if the new implementation
returns an error in case of trying to save the already linked courses in the 'customint1' field.
2020-11-18 15:05:31 +08:00
Andrew Nicols 3648ffdc8e Merge branch '39_MDL-68896' of git://github.com/danmarsden/moodle into MOODLE_39_STABLE 2020-11-18 10:06:41 +08:00
Eloy Lafuente (stronk7) 1194dde152 Merge branch 'MDL-70148-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-11-17 23:13:27 +01:00
Paul Holden f727dad657 MDL-67514 customfield: correct external usescategories return type. 2020-11-17 22:13:19 +00:00
Marina Glancy 985d5a5824 MDL-70242 auth_oauth2: set page context and url 2020-11-17 16:48:06 +01:00
Andrew Nicols 0210ab0005 MDL-70148 gradereport_grader: Improve reliability of keyboard usage
In some browsers the ajax grade select does not properly update the
grade after setting values. The previous solution was to press the
[enter] key, but doing this with the new key type step opens the select
box again. This is what happens when a real user presses enter on the
select.

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

The solution uses a shift-tab to move the focus away to the previous
gradale element. In this case it must also be moved to an earlier step
because the previously selected value must be checked in the Then
section of the test and if it is selected then its value cannot be
checked.
2020-11-17 15:14:43 +08:00
Andrew Nicols 99cf35e681 MDL-70148 qtype: Update qtype steps to new key interaction
Note: The ddmarker question type was previously getting the number of
keypresses wrong. This was because it was using both keyDown/keyUp, and
also keyPress. As a result each keypress was essentially happening two
times.
2020-11-17 15:14:43 +08:00
Andrew Nicols 61d0134488 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Andrew Nicols 2369ad7737 MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
Andrew Nicols 71dcd85182 Merge branch 'MDL-69526-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-11-17 14:55:32 +08:00
Adrian Greeve f5d19447e0 Merge branch 'MDL-50955-39' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2020-11-17 13:10:08 +08:00
Andrew Nicols b276f33850 Merge branch 'MDL-69964-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-11-17 10:23:01 +08:00
Paul Holden b932b798f1 MDL-69964 course: toggle participant checkboxes in root element.
For a given toggleGroup, the relevant action elements are not
necessarily descendants of the same tableRoot element, on the
course participants page.
2020-11-16 17:44:26 +00:00
Andrew Nicols 14cecfa4c0 MDL-67513 core: Only move modal to body if currently attached
A previous change as part of this commitset was intended to move the
modal to the document.body, but where the modal had been destroyed it
was instead added back to the body.
2020-11-16 09:40:43 +01:00
Peter Dias 9582b85c16 MDL-50955 core: Reset lessons completion criteria if grade type is none 2020-11-16 16:37:28 +08:00
Andrew Nicols f920fdced0 Merge branch 'MDL-67513-m39' of https://github.com/NeillM/moodle into MOODLE_39_STABLE 2020-11-16 08:39:21 +08:00
Luca Bösch 53836d2035 MDL-69526 block_myoverview: custom course fields natural sorting 2020-11-13 00:56:26 +01:00
Eloy Lafuente (stronk7) ff2b655928 weekly release 3.9.3+ 2020-11-12 22:11:37 +01:00
Eloy Lafuente (stronk7) 706f6c93ae Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-11-12 22:11:34 +01:00
Neill Magill 6028dc3924 MDL-67513 forum: View conversations while fullscreen grading
Before this change when a modal was shown and an element on the page
was fullscreen the modal would be created behind it.

This change ensures that the modal will be inside an element that is
fullscreen so that it will be correctly displayed.
2020-11-12 08:34:59 +00:00
Adrian Greeve fd34a36514 Merge branch 'MDL-69453-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-11-12 12:00:36 +08:00
Andrew Nicols 27da8851f6 Merge branch 'MDL-70067-39_theme_classic' of https://github.com/alexmorrisnz/moodle into MOODLE_39_STABLE 2020-11-12 10:30:45 +08:00
Adrian Greeve 248ab7a4b3 Merge branch 'MOODLE_39_MDL-70117' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-11-12 09:25:39 +08:00
Eloy Lafuente (stronk7) fcf07d64c8 Merge branch 'MDL-65941-39' of https://github.com/snake/moodle into MOODLE_39_STABLE 2020-11-12 00:18:51 +01:00
Eloy Lafuente (stronk7) 897cfd7c81 Merge branch 'MDL-70023-39' of git://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2020-11-11 23:57:35 +01:00
Alex Morris 193aa32b88 MDL-70067 report_insights: Replace BS3 column naming
Bootstrap 4 removed col-xs- and replaced it with col-
2020-11-12 08:57:29 +13:00
Sara Arjona 78908d7757 Merge branch 'MDL-70063-39-1' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-11-11 16:30:34 +01:00
Jun Pataleta 896c962160 Merge branch 'MDL-68257-M39' of https://github.com/ised-isde-canada/moodle into MOODLE_39_STABLE 2020-11-11 22:12:53 +08:00
Jun Pataleta 1178406516 Merge branch 'MDL-70072-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-11-11 22:09:21 +08:00
Mihail Geshoski 409f92b75d MDL-70063 block_tag_youtube: Add behat tests 2020-11-11 21:49:38 +08:00
Mihail Geshoski 6ea0b003d7 MDL-70063 block_tag_youtube: Fix category config in existing instances
Upgrade step that fixes the category configuration of existing
tag_youtube block instances.
2020-11-11 21:49:38 +08:00
Mihail Geshoski 918b60d700 MDL-70063 block_tag_youtube: Update category config to use category ID
In YouTube Data API v3, the API call to fetch the videos related to a
certain category expects the category ID to be passed to the
videoCategoryId parameter, instead of the category name. Therefore, the
category config should store the category ID.
2020-11-11 21:49:37 +08:00
Bas Brands b997786180 MDL-69453 core_form: improve form UI icons and alignment 2020-11-11 14:05:00 +01:00
Sara Arjona 3e8447fe9a Merge branch 'MDL-70141-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2020-11-11 08:39:37 +01:00
Michael Aherne 28a1f0943d MDL-65941 cache: Prevent cache config failure on redis problems. 2020-11-11 14:50:43 +08:00
Andrew Nicols 7a2d0fb5dc Merge branch 'MDL-70126-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-11-11 10:26:14 +08:00
Andrew Nicols 28de3d7db9 Merge branch 'MDL-70065_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-11-11 10:10:45 +08:00
AMOS bot 9fa04e3f2e Automatically generated installer lang files 2020-11-11 00:07:45 +00:00
Mikhail Golenkov 1d41237ae8 MDL-70117 dataformat_pdf: Fix content overflow when headers are involved 2020-11-11 10:53:20 +11:00
Sara Arjona b0a9faf1c6 Merge branch 'MDL-70106-icon-cache-39' of https://github.com/Peterburnett/moodle into MOODLE_39_STABLE 2020-11-10 16:53:46 +01:00
Peter Burnett e9961085eb MDL-70160 cache: plugin_functions checks for function_exists() 2020-11-10 16:04:49 +10:00
Jun Pataleta 766376261a Merge branch 'MDL-69930-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE
# Conflicts:
#	question/type/ddimageortext/amd/build/question.min.js
#	question/type/ddimageortext/amd/build/question.min.js.map
#	question/type/ddimageortext/amd/src/question.js
2020-11-10 14:03:19 +08:00
Jun Pataleta 8e2e459daa Merge branch 'MDL-68349-39' of git://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2020-11-10 10:14:28 +08:00
Jake Dallimore fedd703ce1 Merge branch 'MDL-69841-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-11-10 09:33:47 +08:00
Víctor Déniz a1216eb05b Merge branch 'MDL-69955-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-11-09 21:47:45 +00:00
Paul Holden e49e58a924 MDL-69201 core: consistent table primary sort column/order. 2020-11-09 19:45:28 +00:00
Paul Holden 97a03ba74d MDL-70126 tag: correct thrown exception class name. 2020-11-09 19:43:31 +00:00
Neill Magill ba43374d96 MDL-67513 forum: Test that discussions can be viewed while grading 2020-11-09 14:26:21 +00:00
AMOS bot 09d078c3b8 Automatically generated installer lang files 2020-11-09 00:07:54 +00:00
Eloy Lafuente (stronk7) a8e089a8c8 Moodle release 3.9.3 2020-11-07 16:48:07 +01:00
AMOS bot 3e8043f3f4 Automatically generated installer lang files 2020-11-07 00:07:48 +00:00
Eloy Lafuente (stronk7) 70f695d068 weekly release 3.9.2+ 2020-11-06 22:55:50 +01:00
Eloy Lafuente (stronk7) e83cad80b1 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-11-06 22:55:47 +01:00
Víctor Déniz d727c1eafd Merge branch 'MDL-70137-39-2' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-11-06 19:17:44 +00:00
Andrew Nicols 463b232453 MDL-70137 cache: Write config to temp file and move into place 2020-11-06 19:17:43 +00:00
Andrew Nicols 02a8be1f80 MDL-70137 cache: Use sensible default when reading MUC config
When we read the MUC configuration, a file which exists but is empty
will not error, but will cause all configuration to be empty.

We already perform an {{is_array()}} check on the {{$configuration}}
variable, but the default value for {{$configuration}} is an empty
array. In the case where the file exists, but is empty, no errors occur
when the file is loaded, and the initial {{$configuration}} value is
not overwritten, leading to the file being replaced with an empty copy.
2020-11-06 19:17:34 +00:00
Eloy Lafuente (stronk7) 7bc714ac09 Merge branch 'MDL-70139-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-11-06 19:24:40 +01:00
sam marshall 3accc543ec MDL-70141 core_block: Web service set $PAGE url to avoid warnings 2020-11-06 17:40:02 +00:00
Sara Arjona 481c57cabe MDL-70139 core_badges: fix invalid request when sending to backpack
Having mixed $data in badge exporters is causing some issues.
As all these exporters are using $data as an object, $data can be
converted to object in the constructor, to avoid errors and get
the expected behaviour always.
2020-11-06 16:21:34 +01:00
Shamim Rezaie c0256a7351 MDL-70072 core: Fix always displaying date in Gregorian 2020-11-06 19:23:22 +11:00
AMOS bot f8287cb170 Automatically generated installer lang files 2020-11-06 00:09:55 +00:00
Eloy Lafuente (stronk7) 621cd70b4c weekly release 3.9.2+ 2020-11-05 12:16:29 +01:00
Marina Glancy 7e2acbfb55 MDL-70023 core_course: improve performance of recently accessed courses 2020-11-05 09:54:54 +01:00
Jun Pataleta c87ccd3111 Merge branch 'MDL-70075-39-2' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-11-05 12:45:24 +08:00
Andrew Nicols 06be826b2e Merge branch 'MDL-70066-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-11-05 10:09:48 +08:00
Simey Lameze 06a4390060 MDL-70066 badges: change usages of array_key_exists to isset 2020-11-05 10:06:39 +08:00
Andrew Nicols 126cbbff7c MDL-70075 core: Autocomplete selection should always have an active item
Ensure that there is always one active element in the list of selected
autocomplete elements.

Without this we have issues beacuse clicking on the link makes the first
one active if one is not already active, and this turns a click event
into a drag event, which means that it is not deleted.
2020-11-05 09:05:40 +08:00
Sara Arjona f252b08433 Merge branch 'MDL-70114-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-11-04 20:15:21 +01:00
Víctor Déniz fae048b402 Merge branch 'MDL-68749-39-2' of git://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2020-11-04 15:24:23 +00:00
Sara Arjona 0408008fbe Merge branch 'MDL-70119-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-11-04 15:20:03 +01:00
Bas Brands 0ff5242a3c MDL-70114 mod_data: add border for to textarea 2020-11-04 13:30:19 +00:00
Ferran Recio 2488fe37ca MDL-70119 core_badges: fix tab names 2020-11-04 12:57:24 +01:00
Andrew Nicols 4edad07619 MDL-70075 core: Do not return a value in an event handler
Returning a value of `false` in an event handler has the effect of
calling event.preventDefault() and event.stopPropagation().

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

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

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

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

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

There should be no functional change with this patch, except to support
Firefox fully.
2020-11-04 15:09:35 +08:00
Peter Burnett d8bfd5b747 MDL-70106 cache: Set icon localstorage cache to use theme localisation 2020-11-04 13:36:14 +10:00
Huong Nguyen 0d9c49d8d6 MDL-69955 qtype_ddimageortext: drop zone disappear in special case 2020-11-04 09:53:23 +07:00
Jake Dallimore 4d9ffaae34 Merge branch 'MOODLE_39_MDL-70093' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-11-04 09:00:49 +08:00
Mihail Geshoski 21cfc35074 MDL-67837 backup: Add unit tests 2020-11-03 12:27:34 +01:00
Mihail Geshoski 5d0b569ba1 MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:27:34 +01:00
andreasschenkel fd7db38d8b MDL-69844 user: Fix no email in download_participants_table
Only include eMail in download_participants_table 
if selected in showuseridentity 
($identityfieldsselect)
2020-11-03 12:27:34 +01:00
Juan Leyva 2f9f0b0fcc MDL-67015 mod_data: Prevent users adding entries to other groups 2020-11-03 12:27:34 +01:00
Amaia Anabitarte 14aaba1b72 MDL-69046 core_contentbank: Escape quotes when showing name 2020-11-03 12:27:34 +01:00
Ferran Recio 629657363d MDL-69378 tool_uploadcourse: fix enrolment methods uploads 2020-11-03 12:27:34 +01:00
Peter Dias 498c54d1de MDL-56310 restore: Confirm user has permission to change capabilities 2020-11-03 12:27:34 +01:00
Eloy Lafuente (stronk7) a3f72b3972 weekly release 3.9.2+ 2020-11-03 12:21:21 +01:00
Michael Hawkins 098f09b638 MDL-68749 theme: Fix bootstrap toggle switches in RTL layout
Co-authored-by: Bas Brands <bas@moodle.com>
2020-11-03 15:24:48 +08:00
Eloy Lafuente (stronk7) 99732c4c3b Merge branch 'MDL-70081-39' of git://github.com/jleyva/moodle into MOODLE_39_STABLE 2020-11-03 01:26:11 +01:00
Sara Arjona 905d3939f5 Merge branch 'MDL-69973_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-11-02 15:45:09 +01:00
Mikhail Golenkov 051cad238b MDL-70093 dataformat_pdf: Fix row height calculation with high cells 2020-11-02 22:27:08 +11:00
Alexander 6a4bf785cc MDL-70067 theme_classic: Use col-12 as col-xs-12 was removed in BS4 2020-11-02 09:07:05 +13:00
Juan Leyva 223f7cc0b4 MDL-70081 airnotifier: Add missing device type in token registration 2020-10-31 13:08:05 +01:00
Eloy Lafuente (stronk7) 287ed73429 MDL-69973 xmldb: Ensure all reports use fresh metadata (not cached) 2020-10-30 19:27:18 +01:00
Eloy Lafuente (stronk7) db1368926a MDL-69973 xmldb: Fix problem with MariaDB >= 10.2.7 metadata defaults
With MariaDB 10.2.7 the driver was incorrectly returning '' (empty
string) as default for all the columns having null (meaning, no
default).

Also, cover the case in unit tests, it seems that we were already
testing other defaults but not the null case.
2020-10-30 19:27:18 +01:00
Marina Glancy ec19837b79 MDL-68349 auth_db: user_created event should be triggered later 2020-10-30 14:18:41 +01:00
Eloy Lafuente (stronk7) 3b0d958065 weekly release 3.9.2+ 2020-10-30 13:49:12 +01:00
Eloy Lafuente (stronk7) 6722a6b105 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-10-30 13:49:09 +01:00
Jun Pataleta 920b4dd6ab Merge branch 'MDL-68167-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-10-30 13:16:48 +08:00
Shamim Rezaie 898bdfdd67 MDL-68167 lib: autocomplete focos should not be removed on blur
See https://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-rearrangeable.html
2020-10-30 16:11:16 +11:00
Shamim Rezaie ed7485277e MDL-68167 lib: Do not set aria-expanded if it should not be set 2020-10-30 16:11:16 +11:00
Shamim Rezaie eb238722da MDL-68167 user: Fix missing label for participants filter input fields 2020-10-30 16:11:16 +11:00
Shamim Rezaie da1f204a0a MDL-68167 lib: Clear single-select autocomplete elements with keyboard
Following MDL-57680, it should be possible to clear the selected option
using keyboard as well.
2020-10-30 16:11:16 +11:00
Shamim Rezaie 5dd385d522 MDL-68167 user: Fix a hardcoded string to be read from lang pack 2020-10-30 16:11:16 +11:00
Shamim Rezaie dca6513b8a MDL-68167 lib: Fix label for autocomplete selection/suggestion box
The content of the autocomplete selection div is purged by javascript
so we have to move its label outside of it. aria-labeledby is the way
to go.

Each time the suggestion box is expanded, autocomplete js renders the
autocomplete suggestions template. So the label cannot be outside the
suggestions ul.
2020-10-30 16:11:08 +11:00
Shamim Rezaie 6484e89188 MDL-68167 user: filter elements should listen to accessibleChange event 2020-10-30 14:58:54 +11:00
Shamim Rezaie 9312e7389a MDL-68167 lib: The accessibleChange custom event now supports bubbling
The change event bubbles so the accessibleChange shoud bubble as well.
2020-10-30 14:58:54 +11:00
Shamim Rezaie 0218859c3e MDL-68167 theme_boost: make focus outline accessible for autocompletes 2020-10-30 14:58:53 +11:00
Shamim Rezaie 18702b5869 MDL-68167 lib: Autocomplete selection to use listbox aria role
The aria-selected state cannot be used for the listitem role. The
autocomplete widget highly uses the aria-selected state internally.
2020-10-30 14:56:39 +11:00
Shamim Rezaie d0ab1d1540 MDL-68167 user: Improve keyboard navigation on autocomplete fields 2020-10-30 14:56:39 +11:00
Shamim Rezaie 7d25143979 Merge branch 'MDL-69390-39' of git://github.com/bmbrands/moodle into MDL-69390-39-test 2020-10-30 14:56:03 +11:00
Andrew Nicols a067cc5ada Merge branch 'MDL-69156_39' of https://github.com/ffhs/moodle into MOODLE_39_STABLE 2020-10-30 11:52:35 +08:00
Huong Nguyen ea68407895 MDL-69841 Quiz: Review options 'Help' icons do not work correctly 2020-10-30 10:28:59 +07:00
AMOS bot 03f5e32712 Automatically generated installer lang files 2020-10-30 00:09:48 +00:00
Víctor Déniz c0b0649582 Merge branch 'MDL-70032-39-2' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-10-29 22:24:21 +00:00
Tim Hunt 72cd24d3c9 MDL-70065 quiz: fix paging when adding questions from the bank 2020-10-29 20:29:58 +00:00
Paul Holden d16aa74359 MDL-69156 backup: correct behaviour of course copy idnumber field.
When a given user doesn't have the capability to change the idnumber
field during course copy, freeze the field value.
2020-10-29 14:10:09 +01:00
Adrian Perez 7e52e95d8d MDL-69156 course_copy: set defaults for idnumber when not permitted 2020-10-29 13:52:48 +01:00
Jun Pataleta 42f3862b91 MDL-70032 qtype_multichoice: Use custom partial named selector
* With the removal of the label element, Behat now has to click on the
answer text. In order to achieve this, the custom partial named selector
"qtype_multichoice > Answer" was now added and have replaced the
instances where the label of the answer's checkbox/radio button is
being clicked.
2020-10-29 16:22:08 +08:00
Jun Pataleta 556648db0b MDL-70032 qtype_multichoice: Fix answer labelling
* Discard the use of the label element in order to be able to render
multiple choice answers as they are and have these act as the radio
button/checkbox' label through the aria-labelledby attribute.
* New JS module qtype_multichoice/answers that listens for click events
on the answer text container and selects the appropriate answer radio
button/checkbox.
2020-10-29 16:22:08 +08:00
Andrew Nicols 6026aa7b3c Merge branch 'MDL-68722-39' of https://github.com/matt-catalyst/moodle into MOODLE_39_STABLE 2020-10-29 14:03:29 +08:00
Jake Dallimore 8e5782b848 Merge branch 'MDL-69716-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-10-29 12:40:23 +08:00
Jake Dallimore f38e17f16f Merge branch 'MDL-70041-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-10-29 11:49:40 +08:00
Adrian Greeve 465cc9e91a Merge branch 'm39_MDL-70042_Progress_Bar_Upgrade_Message_Popup' of https://github.com/scara/moodle into MOODLE_39_STABLE 2020-10-29 08:32:16 +08:00
Matteo Scaramuccia faa76ee29a MDL-70042 message_popup: Trivial savepoint comment cleanup 2020-10-28 23:03:34 +01:00
Matteo Scaramuccia d6491a67c8 MDL-70042 message_popup: progress bar on upgrade only when necessary 2020-10-28 23:03:26 +01:00
Jun Pataleta 27db5c5024 Merge branch 'MDL-69390-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-10-28 22:44:02 +08:00
Bas Brands e6b274a542 MDL-69390 theme_boost: dropdown menu accessibility
- display a dot before the active element
- use the active colour for the hover colour
2020-10-28 14:10:45 +01:00
Jun Pataleta 6f317a983e Merge branch 'MDL-69815-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-10-28 14:19:09 +08:00
Andrew Nicols a5293c4ed8 Merge branch 'MDL-70004-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-10-28 13:14:23 +08:00
Jake Dallimore 66e77f8173 Merge branch 'MDL-64723-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-10-28 12:12:52 +08:00
Mihail Geshoski 4ba58ac02f MDL-70041 filepicker: Make sure the user has a recently used license 2020-10-28 12:06:43 +08:00
Jake Dallimore 21f5c148fc Merge branch 'MDL-65792-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-10-28 12:00:34 +08:00
Andrew Nicols 2e026689c6 MDL-69815 core: Bump Node to v14.15.0 (LTS/Fermium) 2020-10-28 09:34:31 +08:00
Eloy Lafuente (stronk7) 3a718d620e Merge branch 'MDL-69998-39-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-10-28 00:42:25 +01:00
Eloy Lafuente (stronk7) beff06190a weekly release 3.9.2+ 2020-10-27 23:47:40 +01:00
David Mudrák 975081c367 MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:29:12 +01:00
Helen Foster 9417cedd78 MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:29:12 +01:00
Bas Brands 19343c7bd1 MDL-65792 mod_forum: show release time on timed posts 2020-10-27 08:41:38 +01:00
Jun Pataleta 64dd473559 MDL-70004 qtype_multichoice: Set appropriate clear my choice role 2020-10-27 09:57:48 +08:00
Paul Holden 9e4a19af6c MDL-64723 tool_mobile: workaround for invalid certificate parsing.
This is to account for specific server configuration that are affected
by one of the following issues, which results in certificate signature
algorithms being incorrectly parsed:

 * https://bugs.php.net/bug.php?id=77548
 * https://github.com/curl/curl/issues/3706
2020-10-26 23:06:14 +00:00
Matt Clarkson eeba9c1dc5 MDL-68722 atto_equation: fix for form elements with special characters
Element id's containing characters such as ':' would break the tab
selector in bootstrap.

This specifically affects the essay question type.
2020-10-27 11:08:47 +13:00
Eloy Lafuente (stronk7) 55a465c445 Merge branch 'MDL-69993-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-10-26 10:43:02 +01:00
Andrew Nicols d1d52a3399 Merge branch 'MDL-69995-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-10-26 16:01:07 +08:00
Huong Nguyen ad7b38f3ff MDL-69930 qtype_ddimageortext: Duplication items in drag-onto-image question 2020-10-25 20:15:27 +07:00
Luca Bösch a22b74872c MDL-69995 backup: padding before activity icons. 2020-10-25 02:04:52 +02:00
Amaia Anabitarte 1af998d32c MDL-69716 mod_quiz: No timestamp for in progress attempts 2020-10-23 16:03:03 +02:00
Eloy Lafuente (stronk7) 4d9ab4ca48 weekly release 3.9.2+ 2020-10-23 14:40:50 +02:00
Eloy Lafuente (stronk7) 55189f02ee Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-10-23 14:40:45 +02:00
Paul Holden 115f703440 MDL-69993 output: correct navigation node type for user reports. 2020-10-23 08:25:47 +01:00
Adrian Greeve 5cd7b5cad0 Merge branch 'MDL-67650-forced-checkbox-textarea-MOODLE_39_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_39_STABLE 2020-10-23 09:01:07 +08:00
Eloy Lafuente (stronk7) fb81664dc3 Merge branch 'MDL-69729-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-10-22 19:05:22 +02:00
Víctor Déniz 8cbc470f2a Merge branch 'MDL-68664-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-10-22 12:25:43 +01:00
Sara Arjona 1bc92d37f2 Merge branch 'MDL-69553-m39' of https://github.com/NeillM/moodle into MOODLE_39_STABLE 2020-10-22 08:56:19 +02:00
Brendan Heywood 348e338a21 MDL-67650 admin: Consistently show forced config settings 2020-10-22 13:17:17 +11:00
Jake Dallimore bf854f5f24 Merge branch 'MDL-68438_39' of https://github.com/t-schroeder/moodle into MOODLE_39_STABLE 2020-10-22 09:31:02 +08:00
Jun Pataleta b861165753 Merge branch 'MDL-69657-39' of git://github.com/merrill-oakland/moodle into MOODLE_39_STABLE 2020-10-22 09:24:08 +08:00
Adrian Greeve 3c2208cc24 Merge branch 'MDL-69788-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-10-22 09:06:53 +08:00
AMOS bot 2d1fcf6cce Automatically generated installer lang files 2020-10-22 00:08:01 +00:00
Eloy Lafuente (stronk7) 2f502066cb Merge branch 'MDL-66392-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-10-21 19:48:20 +02:00
Sara Arjona 41cd0c4d3a Merge branch 'm39_MDL-68536_Notice_Undefined_Property_CFG_branch' of https://github.com/scara/moodle into MOODLE_39_STABLE 2020-10-21 18:33:15 +02:00
Paul Holden 0efc7095e3 MDL-66392 analytics: make model output directory default to empty.
Falling back to path within $CFG->dataroot/models.
2020-10-21 17:32:29 +01:00
Víctor Déniz 6178388d94 Merge branch 'MDL-69392-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-10-21 16:26:35 +01:00
Tim Schroeder f0e9fa2a7b MDL-68438 message: fixed email format change with messaging disabled 2020-10-21 12:47:53 +02:00
Paul Holden c651779095 MDL-69788 admin: validate language menu configuration. 2020-10-21 11:24:18 +01:00
Jun Pataleta ce5efbc1da Merge branch 'MDL-37226-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-10-21 17:46:38 +08:00
Neill Magill e9506c638b MDL-69553 output: Handle pre-loading multiline string defines
Before this patch strings that were declared over multiple lines in
a template would not be parsed correctly.

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

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

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

would have been been parsed to get_string('', 'core')
2020-10-21 10:08:23 +01:00
Neill Magill bb3f9ee492 MDL-69553 output: Unit tests for loading multiline string defines 2020-10-21 10:08:22 +01:00
Jun Pataleta 14017f40b9 Merge branch 'MDL-69945-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-10-21 16:03:04 +08:00
Jun Pataleta 413736095b MDL-69392 question: Fix Try again button styling 2020-10-21 14:57:58 +08:00
Jun Pataleta f78101f638 MDL-69392 theme_boost: Improve question colour contrast
* Lighten info container.
* Fix colour contrast for the question container by
  - Lightening the background a bit
  - Darkening the text colour a bit
  - Making sure the link colour has good colour contrast against the
  question text.
* Fix colour contrast for the comments container by
  - Lightening the text colour a bit
  - Darkening the link colour a bit for better colour contrast against
  the feedback text.
2020-10-21 14:57:57 +08:00
Jun Pataleta 105e40d377 MDL-69392 theme_classic: Darken red, blue and green colours
The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)
2020-10-21 14:57:57 +08:00
Jun Pataleta ce2f6179cd MDL-69392 theme_boost: Darken red, blue and green colours
The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)
2020-10-21 14:57:57 +08:00
Adrian Greeve 47ff67ec29 \Merge branch 'MDL-69807-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-10-21 14:22:19 +08:00
Adrian Greeve 3fb1660734 Merge branch 'MDL-68766-M39' of https://github.com/ised-isde-canada/moodle into MOODLE_39_STABLE 2020-10-21 12:49:18 +08:00
Jake Dallimore 6e7c392d84 Merge branch 'MDL-68983-recent-session-lock-ro-MOODLE_39_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_39_STABLE 2020-10-21 12:46:11 +08:00
Jake Dallimore 806e6bec59 Merge branch 'MDL-69902-39' of https://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2020-10-21 10:57:53 +08:00
Jake Dallimore 8d7fe960a0 Merge branch 'MDL-69751-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-10-21 10:04:31 +08:00
Eloy Lafuente (stronk7) 8d1cbe3a35 weekly release 3.9.2+ 2020-10-21 00:50:42 +02:00
Sara Arjona 197ec7e822 MDL-69729 h5p: move temporary editor files to draft area
This is a backport of MDL-68909
2020-10-20 09:59:09 +02:00
Sara Arjona fbab65f86b MDL-69729 h5p: upgrade step to remove files in editor filearea
As temporary editor files have been moved from core_h5p/editor to
user/draft, they can be removed (to clean unused DB entries).

This is a backport of MDL-68909
2020-10-20 09:18:16 +02:00
Adrian Greeve cd054d77f1 MDL-68284 gradebook: Fix use of get_recordset in upgrade code. 2020-10-20 14:15:20 +08:00
Jake Dallimore 6168569323 Merge branch 'MDL-67695-MOODLE_39_STABLE_get_lti_proxies' of https://github.com/andrewmadden/moodle into MOODLE_39_STABLE 2020-10-20 11:09:11 +08:00
Mihail Geshoski 5da2fa002e MDL-69751 core: Restore deleted guest user and add missing context
This upgrade step fixes the cases where the current guest user is
labelled as 'deleted' and the related user context is missing.
2020-10-20 08:43:52 +08:00
Adrian Greeve 4b137eb20c Merge branch 'MOODLE_39_STABLE-MDL-68284' of https://github.com/yao9394/moodle into MOODLE_39_STABLE 2020-10-20 08:41:09 +08:00
Mihail Geshoski 34ffdc2c81 MDL-69751 course: Handle missing guest user context
Makes sure the guest user context exists when fetching
the recommended modules. If the context does not exist
an exception is being thrown describing the problem.
2020-10-20 08:39:24 +08:00
Simey Lameze 83d478ce93 MDL-68664 theme: remove right margin from form-inline class 2020-10-20 08:32:57 +08:00
Andrew Nicols 565bc965b1 Merge branch 'MDL-69687-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2020-10-20 08:02:46 +08:00
Jake Dallimore e2cdcc563d Merge branch 'MDL-69726_39' of git://github.com/aolley/moodle into MOODLE_39_STABLE 2020-10-20 07:46:23 +08:00
Paul Holden ae61985191 MDL-69807 blocks: remove redundant sesskey loading edit/delete page. 2020-10-19 22:40:43 +01:00
Eloy Lafuente (stronk7) 2b169e9b31 Merge branch 'MDL-69906-39-searchsimpledb' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-10-19 22:56:40 +02:00
Eloy Lafuente (stronk7) ccbd35915c Merge branch 'MDL-57756-text-customparams-39' of https://github.com/cengage/moodle into MOODLE_39_STABLE 2020-10-19 22:32:10 +02:00
Sara Arjona 114d1a051e Merge branch 'MDL-69897-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-10-19 18:15:07 +02:00
Sara Arjona 856c31cc32 Merge branch 'MDL-69900-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-10-19 13:42:13 +02:00
sam marshall 25049f4f19 MDL-69687 Course: remove_course_contents orphaned completion data
The remove_course_contents function did not delete data from
course_module_completion table in most cases, resulting in large
quantities of orphaned data.
2020-10-19 10:21:12 +01:00
Sara Arjona 00a46671fa Merge branch 'MOODLE_39_MDL-69791' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-10-19 10:08:08 +02:00
Sara Arjona d008aa7c99 Merge branch 'MDL-69736-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-10-19 09:04:06 +02:00
Sagar Ghimire 2d462ee8bd MDL-68284 gradebook: Prevent exposing hidden quiz grade item 2020-10-19 16:22:37 +11:00
Andrew Nicols 3f50f83dc1 Merge branch 'MDL-69687-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2020-10-19 13:20:25 +08:00
Andrew Madden 41121d705f MDL-67695 mod_lti: Use correct return structure for get_tool_proxies.
* Use tool_proxy_return_structure for each proxy.
* Added tests for getting all proxies and orphaned proxies.
2020-10-19 15:16:44 +11:00
sam marshall cc2faa2c90 MDL-69687 Course: Improve removal of completion data on MySQL 2020-10-16 18:23:41 +01:00
sam marshall ae4f9b31f7 MDL-69687 DB: Add API for deleting data based on subquery
The new API works on normal databases (by deleting data based on the
subquery) and also on MySQL (by deleting the data using a weird join
on the subquery).
2020-10-16 18:23:41 +01:00
Luca Bösch 01f3495a46 MDL-37226 assign: align select all header checkbox 2020-10-16 16:08:48 +02:00
Paul Holden c4c328565d MDL-69788 lang: fallback to all translations if misconfigured.
If given translation list contains only invalid entries, fallback
to returning the complete list of available language translations.
2020-10-16 14:38:07 +01:00
Luca Bösch 7961a36b76 MDL-69945 core_calendar: let circles appear as circles 2020-10-16 14:15:56 +02:00
Sara Arjona eda7eb44b3 weekly release 3.9.2+ 2020-10-16 13:18:43 +02:00
Jake Dallimore 6589c3cdd6 Merge branch 'MOODLE_39_MDL-47178' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-10-16 11:52:58 +08:00
Jun Pataleta eeb76ddd3f Merge branch 'MDL-69266-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-10-16 10:09:30 +08:00
Huong Nguyen 14ea69c07c MDL-69266 qtype_ddwtos: 'unlimited' options fail in 3.9 2020-10-15 20:07:02 +07:00
Eloy Lafuente (stronk7) 9f0400b74d Merge branch 'MDL-69813-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-10-14 22:47:23 +02:00
Eloy Lafuente (stronk7) f68a64d50b MDL-68070 messaging: Ensure that error is shown on first messages
Before there is a conversation, messages between users are sent
using core_message_send_instant_messages instead of
core_message_send_messages_to_conversation.

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

This just adds the same error than already existing conversations do,
but returning it as warning, for BC, JS will show it.
2020-10-14 18:57:43 +02:00
Eloy Lafuente (stronk7) d82acd309b MDL-68070 messaging: Amend lang string to be clearer for any user.
Credit goes to Helen Foster for the improvement, thanks!
2020-10-14 16:54:48 +02:00
Víctor Déniz 22f34e807d Merge branch 'MDL-68900-m39' of https://github.com/sumitnegi933/moodle into MOODLE_39_STABLE 2020-10-14 12:22:49 +01:00
Jake Dallimore 31d3a656d6 Merge branch 'MOODLE_39_MDL-69848' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-10-14 09:43:03 +08:00
Eloy Lafuente (stronk7) 3d41104fab Merge branch 'MDL-68070-39_messaging_fix' of https://github.com/beenet-dev/moodle into MOODLE_39_STABLE 2020-10-13 23:41:03 +02:00
Sara Arjona 523f308a9a weekly release 3.9.2+ 2020-10-13 13:24:20 +02:00
Sara Arjona e4d03a9257 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-10-13 13:24:17 +02:00
Brendan Heywood cedf141cc3 MDL-68983 cache: Fix bug with readonly session combined with lock debug 2020-10-13 14:53:11 +11:00
Andrew Nicols b4d51d67a9 Merge branch 'MDL-67654-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-10-13 08:01:08 +08:00
Jenkins Automation 9763c99f87 MDL-69726 calendar: fix raw event fetcher under postgres
Without this, there's a code path that under the right circumstances is hit and
results in a query with `FROM (mdl_event) ev` in it - which is not valid syntax
under postgres.
2020-10-13 09:35:03 +10:30
Paul Holden 56be61d4f6 MDL-67654 mod_forum: formchangechecker for discussion inline replies. 2020-10-12 23:32:38 +01:00
Simon Mok 6de6fe9590 MDL-68070 messaging: Fix error when personal notification is disabled 2020-10-12 21:43:48 +08:00
Michael Milette 754440d796 MDL-68766 auth: Login form: 'Log in using...' should be h3, not h6 2020-10-12 09:32:25 -04:00
Michael Milette 1ddaad70ad MDL-68257 book: Fix display of table of contents in IE11. 2020-10-12 09:21:28 -04:00
Adrian Greeve c954e18a99 Merge branch 'MOODLE_39_MDL-69818' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-10-12 14:47:52 +08:00
Jake Dallimore e0a366fa0a Merge branch 'MDL-68292-admin-sesskey-MOODLE_39_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_39_STABLE 2020-10-12 14:37:40 +08:00
Brendan Heywood 2e5daf9108 MDL-68292 core: Remove sesskey leakage on module pages 2020-10-12 17:11:48 +11:00
Adrian Greeve 5281e10e77 Merge branch 'MDL-69649-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-10-12 10:16:15 +08:00
Jake Dallimore aae7a2b206 Merge branch 'MDL-69910-calendar-protectusername-MOODLE_39_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_39_STABLE 2020-10-12 10:06:06 +08:00
AMOS bot 419ff44b78 Automatically generated installer lang files 2020-10-11 00:08:29 +00:00
Brendan Heywood c4a8787574 MDL-69910 calendar: Fix export exception when both params are sent 2020-10-11 09:20:21 +11:00
David Mudrák 834a1d64c5 MDL-69906 admin: Display Setup search engine as link only if it is valid
We use auto-generated admin section name here so we need to check that
the target section actually exists.
2020-10-09 14:04:55 +02:00
Sara Arjona 496e6ac804 weekly release 3.9.2+ 2020-10-09 11:11:56 +02:00
Sara Arjona 7eb0f97113 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-10-09 11:11:53 +02:00
Marina Glancy 9f1df0f2e4 MDL-69902 core_search: fix error in the custom fields indexing 2020-10-09 08:47:28 +02:00
Adrian Greeve 8fc60dd25d Merge branch 'MDL-68384-fix-spec-violations-39' of https://github.com/cengage/moodle into MOODLE_39_STABLE 2020-10-09 12:04:22 +08:00
Jun Pataleta 558a30dc7d Merge branch 'MDL-69257-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-10-09 11:12:08 +08:00
Mihail Geshoski 9773b4b079 MDL-69257 core_h5p: Move $maxsize outside the foreach loop
There is no reason to repeatedly obtain the maximum size for uploading
files as a part of foreach loop.
2020-10-09 10:36:11 +08:00
Martin Gauk d686ee8faa MDL-69257 H5P: Check size of uploaded files and virus scan 2020-10-09 10:36:11 +08:00
Stephen Bourget 5cb1cf7695 MDL-69900 core_backup: Allow IMSCC v1.0 restore to finish 2020-10-09 09:06:37 +08:00
Paul Holden 465f3b477b MDL-69897 repository: add heading to delete file modal. 2020-10-08 20:29:51 +01:00
Amaia Anabitarte ad00d91851 MDL-69712 core_h5p: Remove 'whitelist' key uses 2020-10-08 16:27:57 +02:00
Sara Arjona 1eed96dec7 Merge branch 'MDL-64657-39' of git://github.com/jleyva/moodle into MOODLE_39_STABLE 2020-10-08 14:15:50 +02:00
Sumit Negi 2e21c78006 MDL-68900 mod_forum: permission check for user who is viewing timed post
Pass current user object to post builder as argument, so that the permission to view timed post
will check with current user, who is viewing the posts instead of user who made that post.
2020-10-08 12:45:33 +05:30
Adrian Greeve aba9644393 Merge branch 'MDL-69805-39' of https://github.com/dravek/moodle into MOODLE_39_STABLE 2020-10-08 14:59:28 +08:00
Adrian Greeve 4aa6b89ead Merge branch 'MDL-69798_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-10-08 13:32:23 +08:00
Víctor Déniz f8bce36ef2 Merge branch 'MDL-69759-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2020-10-07 22:26:06 +01:00
Victor Deniz Falcon fce2b0008c MDL-52407 travis: use Travis default notifications(email) 2020-10-07 16:32:58 +08:00
Andrew Nicols c2bd0a7d31 Merge branch 'MDL-67275-39-post_noun_verb' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-10-07 12:38:55 +08:00
AMOS bot 2d7a59d060 Automatically generated installer lang files 2020-10-07 00:07:45 +00:00
Eloy Lafuente (stronk7) 57e0a20dec Merge branch 'wip-MDL-68808-MOODLE_39_STABLE' of https://github.com/jason-platts/moodle into MOODLE_39_STABLE 2020-10-06 23:12:19 +02:00
Ferran Recio 3fe455fab4 MDL-69736 core_h5p: enable player reporting 2020-10-06 13:05:24 +02:00
Paul Holden ca743b6a95 MDL-69813 h5p: fix undefined addon ordering in framework test. 2020-10-06 10:48:10 +01:00
Eloy Lafuente (stronk7) 5ea37637b7 weekly release 3.9.2+ 2020-10-06 10:20:46 +02:00
Eloy Lafuente (stronk7) 75bae1a55b Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-10-06 10:20:43 +02:00
Mikhail Golenkov f3db3d30e0 MDL-47178 question: Retain question authors when restoring backups. 2020-10-06 09:36:42 +11:00
Eloy Lafuente (stronk7) 7714ea42ec Merge branch 'MDL-69772-39-allcountrycodes' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-10-06 00:04:13 +02:00
Eloy Lafuente (stronk7) 12c103b21a Merge branch 'MDL-65074-39' of https://github.com/hitteshahuja/moodle into MOODLE_39_STABLE 2020-10-05 23:12:33 +02:00
Sara Arjona ec157a3052 Merge branch 'MDL-69355-39-filebuffer' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-10-05 18:34:02 +02:00
Jun Pataleta 57bb2fdaac Merge branch 'MDL-69704-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-10-05 23:12:50 +08:00
Sara Arjona e437183098 Merge branch 'MDL-69641-MOODLE_39_STABLE' of https://github.com/dmitriim/moodle into MOODLE_39_STABLE 2020-10-05 13:38:06 +02:00
Eloy Lafuente (stronk7) 3af8f89e58 Merge branch 'MOODLE_39-MDL-69752' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-10-05 10:55:10 +02:00
Mikhail Golenkov 52b1184468 MDL-69791 gradereport: Fix error message when invalid grade is entered 2020-10-05 15:00:20 +11:00
Mikhail Golenkov 99d0308e4b MDL-69848 upgrade: Delete notifications in chunks 2020-10-05 13:14:26 +11:00
Mikhail Golenkov 3ae46b2a93 MDL-69818 mod_feedback: Fix item dependency during activity restoration 2020-10-04 18:29:45 +11:00
Mikhail Golenkov 5fce0b3f5d MDL-69752 mod_data: Format module intro on Database activities page 2020-10-04 13:49:35 +11:00
AMOS bot b3ebbb61f4 Automatically generated installer lang files 2020-10-03 00:08:29 +00:00
Sara Arjona 16689245e8 weekly release 3.9.2+ 2020-10-02 13:43:27 +02:00
Eloy Lafuente (stronk7) 98280a4c8c Merge branch 'MDL-69758-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2020-10-01 23:44:26 +02:00
Claude Vervoort 171e55f304 MDL-57756 mod_lti: params change to text type 2020-10-01 17:34:39 -04:00
Sara Arjona f1fed72bda MDL-69704 course: catch exception when calling get_course_content_items
When plugins are removed from disk, an exception is thrown when
calling component_callback_exists.
This exception should be catched here in order to load properly
the activity chooser (otherwise, the exception will be displayed
and no activity will appear).
2020-10-01 19:56:41 +02:00
Tim Hunt 07674eb12f MDL-69798 XML question export: excape special chars in idnumbers 2020-10-01 17:10:58 +01:00
Amaia Anabitarte 2308a02324 MDL-69672 core_contentbank: is_context_allowed unit tests 2020-10-01 17:56:38 +02:00
Eloy Lafuente (stronk7) 1da6703d6d Merge branch 'MDL-69672-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-10-01 17:49:23 +02:00
Eloy Lafuente (stronk7) 27a62292ad Merge branch 'MDL-69586-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-10-01 17:12:53 +02:00
David Mudrák 271b94ff4f MDL-69772 admin: Better validation for the allcountrycodes setting
The patch introduces a new admin_setting fiela type that can be used for
specifying comma separated list of countries. The field has inbuilt
validation so that only valid country codes can be inserted.
2020-10-01 13:37:51 +02:00
Jason Platts 315ec3bad6 MDL-68808 forms: autocomplete throwing error in IE11 2020-10-01 12:11:11 +01:00
Sara Arjona 4cb342ef34 Merge branch 'MDL-68098-39' of git://github.com/dpalou/moodle into MOODLE_39_STABLE 2020-10-01 12:56:31 +02:00
Dani Palou e7bb7aa9a2 MDL-68098 tests: Reset FILTERLIB_PRIVATE after tests 2020-10-01 12:50:00 +02:00
Dani Palou 7aca3ebb3c MDL-68098 ws: Add unit tests to test mathjax in WS 2020-10-01 12:50:00 +02:00
David Matamoros 61bb2c70c2 MDL-69805 mod_data: Freeze comment field if comments disabled 2020-09-30 15:53:29 +02:00
Matteo Scaramuccia d84da184c5 MDL-68536 core: Fix notice about undefined prop 'branch' in $CFG 2020-09-30 14:47:20 +02:00
Adrian Greeve f612465b53 Merge branch 'MDL-37802-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-30 13:50:03 +08:00
Dan Marsden 4727970abd MDL-69641 grade: fix slow query.
This is a backport of MDL-69190
2020-09-30 15:00:35 +10:00
Adrian Greeve 88c700bd2c Merge branch 'MDL-69359_39' of https://github.com/adpe/moodle into MOODLE_39_STABLE 2020-09-30 11:43:16 +08:00
Sara Arjona b354694012 Merge branch 'MDL-69342-39_profile_picture_deletion' of https://github.com/vtos/moodle into MOODLE_39_STABLE 2020-09-29 19:01:19 +02:00
Amaia Anabitarte a9bccc9dbc MDL-69672 core_contentbank: Check used context level 2020-09-29 12:44:48 +02:00
Eloy Lafuente (stronk7) 7c52a27375 weekly release 3.9.2+ 2020-09-29 10:48:33 +02:00
Eloy Lafuente (stronk7) 300d9ca23d Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-09-29 10:48:29 +02:00
Claude Vervoort 00b2219fd4 MDL-68384 mod_lti: fix spec violations bo claim name and dl value type 2020-09-28 17:04:07 -04:00
Víctor Déniz 8b9d73dad8 Merge branch 'MDL-69644-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-28 20:34:26 +01:00
Shamim Rezaie 9029eb0e71 MDL-69649 form: Fix labels for defaultcustom form elements 2020-09-28 23:21:50 +10:00
Shamim Rezaie d54b3447e6 MDL-69649 backup: Fix missing labels
- The backup details page uses a table to show a sumary of the backup
  content. Used role attribute to denote the tabular format of the
  summary.
- The backup details page displays activity name next to each activity
  icon. Therefore the icons are only decorative and do not need to have
  any title or even alt text.
- Form labels should be associated with form controls.  A div element is
  not a form control.
- The from attribute of the form labels should be equal to the id
  attribute of an element. Therefore, we first create a label and an
  input elements and associate them to each other, and then pass them to
  backup_detail_pair() when a label is needed.
2020-09-28 23:21:50 +10:00
sam marshall 39d542eeb4 MDL-69759 Web services: app checks to token.php cause log errors 2020-09-28 11:55:56 +01:00
AMOS bot 2cf6b7cc41 Automatically generated installer lang files 2020-09-26 00:07:59 +00:00
adpe 5651e88dc9 MDL-69359 admin_cli: show only contributed plugins in uninstall plugins 2020-09-25 17:03:31 +02:00
Hittesh Ahuja 5a90580646 MDL-65074 mod_quiz: Quiz navigation buttons shouldnt use btn-secondary
Removing .btn-secondary as plain.scss and default.scss in bootstrap hide the button from view.
2020-09-25 15:17:10 +01:00
Paul Holden c98428aab3 MDL-37802 repository: return error if unzipping files fails.
For instance, when a user tried to unzip a password protected zip
archive using the file manager.
2020-09-25 09:34:01 +01:00
Paul Holden dc780e3eb1 MDL-69586 tool_usertours: use specified user in privacy prefs export. 2020-09-25 09:13:39 +01:00
David Mudrák d75844ea12 MDL-69772 admin: Fix legacy coding style on Location settings admin page
No actual change here. Just polishing the coding style and adding
fulltree check.
2020-09-24 18:14:12 +02:00
David Mudrák 11e5003bd6 MDL-69772 lang: Ignore misconfigured allcountrycodes filter
If the allcountrycodes filter contains only invalid values, ignore the
whole filter setting and make get_list_of_countries() return the full
list of all known countries, rather than empty list.
2020-09-24 18:14:12 +02:00
Víctor Déniz a348c5f420 weekly release 3.9.2+ 2020-09-24 16:27:32 +01:00
Víctor Déniz 4b651226d5 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-09-24 16:27:27 +01:00
Eloy Lafuente (stronk7) e33c554aaa Merge branch 'MDL-69698-39-licensecache' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-09-24 16:50:47 +02:00
Paul Holden 31937c4b0e MDL-69644 tool_dataprivacy: fix focus outline of contact DPO link.
The link class attribute is a leftover from 7258bf0b, which was mostly
removed in 3b2f691f. It no longer serves a purpose and interferes with
the element focus outline.
2020-09-24 11:51:15 +01:00
Vitaly 141216f94c MDL-69342 core_user: fixed user picture updating
When editing a user and checking the 'Delete picture' checkbox to delete
the old picture and uploading a new one at a time, the new one didn't appear
in the user profile. This happened due to the 'if/else' statement
in the 'core_user::update_picture()' method which allowed either to delete
the old picture or to upload a new one.
The fix removes the 'else' part of the 'if/else' statement to force
checking for a new uploaded picture no matter if a user checked
the 'Delete picture' checkbox or not.
2020-09-24 10:55:29 +03:00
Dani Palou fba96f096b MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-23 16:23:19 +02:00
Eloy Lafuente (stronk7) 7148c9d35e Merge branch 'MDL-68229-39' of git://github.com/jleyva/moodle into MOODLE_39_STABLE 2020-09-23 11:51:30 +02:00
Eloy Lafuente (stronk7) 8193ba9da9 Merge branch 'MDL-69014-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-22 23:10:53 +02:00
Juan Leyva 6bf314500a MDL-64657 course: Return hidden section names when configured 2020-09-22 12:25:58 +02:00
AMOS bot ee034c39e5 Automatically generated installer lang files 2020-09-22 00:07:13 +00:00
Eloy Lafuente (stronk7) 46aea33b69 Merge branch 'MDL-66648-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-21 23:36:30 +02:00
Eloy Lafuente (stronk7) e0f9ca6787 Merge branch 'MDL-69667-MOODLE_39_STABLE' of https://github.com/comete-upn/moodle into MOODLE_39_STABLE 2020-09-21 23:20:35 +02:00
David Mudrák 976f8f0c52 MDL-67275 forum: Fix language and accessibility issues with buttons
There were inconsistencies with the text shown on the submit button,
depending on the where the button was shown.

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

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

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

* Inline reply textarea's title was hard-coded English "post" text.
  Changed to "Message" to provide advisory information related to the
  element.
* Buttons contained title attribute with the same value as the explicit
  button text. This goes against accessibility guidelines.
2020-09-21 22:48:20 +02:00
sam marshall 767be5d8c1 MDL-69758 Web services: core_get_course_contents PHP warnings
Calls to core_get_course_contents can cause PHP warnings in the server
log if there are any URL instances in the course with sketchy URLs.
This is because url_export_contents incorrectly returns null instead
of an empty array if there is an error.
2020-09-21 15:28:47 +01:00
Juan Leyva 94140b11e8 MDL-68229 tool_mobile: Add missing option to disable tags in the app 2020-09-18 15:30:55 +02:00
Eloy Lafuente (stronk7) a45e6838ef weekly release 3.9.2+ 2020-09-17 19:04:23 +02:00
Eloy Lafuente (stronk7) ae17678a1c Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-09-17 19:04:20 +02:00
Eloy Lafuente (stronk7) 3ae39301b9 Merge branch 'MDL-69395_39' of github.com:stronk7/moodle into MOODLE_39_STABLE 2020-09-17 17:03:10 +02:00
Eloy Lafuente (stronk7) 422fcb70ca MDL-69395 theme_classic: remove superfluous selector already in boost 2020-09-17 13:06:06 +02:00
David Mudrák 29a396fe4e MDL-69355 file: Do not attempt to set headers after output started
It was found out that in certain situations there may be some content
in to output handlers buffers. Let's allow that to happen given that:

* default handler's buffer is not sent as a part of the file and an
  error is reported into the server log.
* other handlers' buffer is sent with the assumption that it is required
  for the correct serving of the file.
2020-09-17 11:42:33 +02:00
Eloy Lafuente (stronk7) af777f92a0 Merge branch 'MDL-62387-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-17 08:58:46 +02:00
Eloy Lafuente (stronk7) 6f35d6536d Merge branch 'MDL-69395-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-09-17 08:58:46 +02:00
Jun Pataleta 36cde1e295 Merge branch 'MDL-69663-m39' of https://github.com/sammarshallou/moodle into MOODLE_39_STABLE 2020-09-17 08:58:46 +02:00
AMOS bot 05a1532e88 Automatically generated installer lang files 2020-09-16 00:07:11 +00:00
David Mudrák 91ae4ab5db MDL-69698 licenses: Improve the performance of the licenses cache
The cache uses a single simple key and there is no need to hash it.
2020-09-15 10:22:57 +02:00
David Mudrák 2cc3588b77 MDL-69698 licenses: Do not cache the localised licenses fullnames
The localisation must happen only after loading the list of licenses
from cache so that the name is displayed in the current user's preferred
language, not in the language of the user who initiated the cache
rebuild.
2020-09-15 10:19:46 +02:00
Paul Holden 222aefb456 MDL-62387 tool_lp: switch to core 'cohort' form element.
The autocomplete AJAX is identical to the version in tool_lp, but also
includes support for excluding suggestions (i.e. cohorts already
synced with the current learning plan).
2020-09-15 08:06:37 +01:00
comete-upn 94160c9ad0 MDL-69667 competencies: fix competencies count always 0 in frameworks. 2020-09-15 08:37:50 +02:00
Jun Pataleta 9c7ab777d9 Merge branch 'MDL-42012-39-alt' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-09-15 11:52:50 +08:00
Andrew Nicols 7818990010 MDL-42012 cache: Fix missing return value 2020-09-15 11:46:31 +08:00
Eloy Lafuente (stronk7) 17a035ac59 Merge branch 'MDL-42012-39-alt' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-09-14 23:29:04 +02:00
Eloy Lafuente (stronk7) abe11a9ace Merge branch 'MDL-69658-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-14 22:56:55 +02:00
Paul Holden bfab0d603c MDL-69014 tool_usertours: clean up user preferences of deleted tours. 2020-09-14 20:36:26 +01:00
Paul Holden 070454489f MDL-66648 user: consistent checks for linking to full profile.
The access checks for displaying a link to a users' full profile
now match the checks performed on the full profile page itself.
2020-09-14 20:22:03 +01:00
AMOS bot e32a114998 Automatically generated installer lang files 2020-09-13 00:07:51 +00:00
AMOS bot 3db28cdebd Automatically generated installer lang files 2020-09-12 00:07:33 +00:00
Jun Pataleta ccd4ef8ddd Moodle release 3.9.2 2020-09-11 10:41:59 +08:00
sam marshall 51b0a67bd2 MDL-69663 Web services: override_webservice_execution not honoured
If two different plugin types (e.g. theme, local) implement
override_webservice_execution callbacks, then all of them except
the 'last' plugin type do not work correctly.
2020-09-10 09:51:16 +01:00
Sara Arjona b9371d7bf6 weekly release 3.9.1+ 2020-09-10 08:52:10 +02:00
Sara Arjona 1ec406cbd7 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-09-10 08:52:07 +02:00
Sara Arjona b1c1119743 Merge branch 'MDL-69466-3.9' of https://github.com/JBThong/moodle into MOODLE_39_STABLE 2020-09-09 11:39:30 +02:00
Sara Arjona 3d45f2c083 Merge branch 'MDL-69645-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-09-09 11:01:00 +02:00
Thong Bui 1f5da975e2 MDL-69466 Autocomplete widget: Improve keyboard accessibility 2020-09-09 13:50:04 +07:00
Andrew Nicols 7156a01a0c MDL-42012 cache: Valid definitions are required even when disabled 2020-09-09 14:05:19 +08:00
Andrew Nicols db22846df6 MDL-42012 cache: Fully disable cache for disabled cache factory 2020-09-09 14:05:19 +08:00
Andrew Nicols ef6e3bfd77 MDL-42012 cache: Allow data sources to work when caching is disabled 2020-09-09 14:05:19 +08:00
Eloy Lafuente (stronk7) ee0106f70b Merge branch 'MDL-69116-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-09-08 23:16:43 +02:00
Paul Holden 36ee886a12 MDL-69658 quizaccess_seb: progress bar on install only when necessary. 2020-09-08 19:32:36 +01:00
Sara Arjona 97e0452344 MDL-69657 mod_h5pactivity: component passed always
The $component = 'mod_h5pactivity' will be passed always to the H5P
player because it's required for being able to call these activities
from outside using embed code. The xAPI implementation checks whether
the information should be tracked or not.

Backport of MDL-69174
2020-09-08 13:08:44 -04:00
Sara Arjona 874bdf2035 MDL-69657 h5p: add component to the embed H5P code
When the Moodle component is passed to the player, xAPI tracking
is enabled so, if the component implements required xAPI API methods
(for instance, mod_h5pactivity does), grades and responses are sent.
Adding this component to the embed code will help to add
the embed code from a mod_h5pactivity to any other place (such as label,
page or book), and being able to track the responses to the original
mod_h5pactivity.

Backport from MDL-69174
2020-09-08 13:08:13 -04:00
Sara Arjona ab43412ae9 Merge branch 'MDL-69525-39-1' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-09-08 14:22:04 +02:00
Michael Hawkins 3d01fc77de MDL-69340 tag: Correct the filter input HTML in the tag manager 2020-09-08 08:47:20 +02:00
Mihail Geshoski 08d7552f4d MDL-69048 book: Sanitize previous chapter value in add new chapter page 2020-09-08 08:47:20 +02:00
Andrew Nicols 8983d50bd1 MDL-68974 calendar: Use page context for block check 2020-09-08 08:47:20 +02:00
Andrew Nicols 9fb8221fb3 MDL-68974 blocks: Check permission before generating content 2020-09-08 08:47:20 +02:00
Mihail Geshoski 4b60cede1e MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:47:20 +02:00
Mihail Geshoski 4514918c33 MDL-65115 core_files: Add get_total_content_size() in stored_file class
New function get_total_content_size() is introduced in the stored_file
class. The puprose of this function is to calculate and return the
total size (in bytes) of the content of an archive file.
2020-09-08 08:47:20 +02:00
Andrew Nicols 86d6bdf079 MDL-68974 admin: Unit tests for context parent/child test 2020-09-08 08:47:20 +02:00
Andrew Nicols f5d75c8e24 MDL-68974 admin: Unit tests for loginas 2020-09-08 08:47:20 +02:00
Andrew Nicols bfeb6f3bac MDL-68974 admin: Prevent login as outside of the desired context 2020-09-08 08:47:20 +02:00
Sara Arjona ec52cca8b1 Merge branch 'MDL-68344-3.9' of https://github.com/JBThong/moodle into MOODLE_39_STABLE 2020-09-08 08:45:19 +02:00
Jun Pataleta 6bbb402129 Merge branch 'MDL-69492-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-08 12:56:19 +08:00
AMOS bot 7375466f51 Automatically generated installer lang files 2020-09-08 00:07:50 +00:00
Eloy Lafuente (stronk7) 8635e2cefa Merge branch 'MDL-69262-39-2' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-09-07 23:43:04 +02:00
Eloy Lafuente (stronk7) 52bad33356 Merge branch 'MDL-69448-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-07 23:26:21 +02:00
Luca Bösch 5c155ba8f7 MDL-69645 quizaccess: Set allowPreferencesWindow to false in manual conf
Signed-off-by: Luca Bösch <luca.boesch@bfh.ch>
2020-09-07 21:26:11 +02:00
Mathew May ffa17ad17d MDL-69240 tool_moodlenet: Clean MoodleNet profile field
Amended by: Eloy Lafuente (stronk7) <stronk7@moodle.org>
- adjust versions for every branch.
- modify verify_webfinger->profileurl external to PARAM_NOTAGS.
2020-09-07 17:25:13 +02:00
Sara Arjona 5d6fcc67cf Merge branch 'MDL-67468-MOODLE_39_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_39_STABLE 2020-09-07 13:20:06 +02:00
Paul Holden a37dc94598 MDL-69492 auth_cas: normalise member distinguished name config. 2020-09-04 08:36:13 +01:00
Paul Holden 1e08e046e2 MDL-69492 auth_ldap: normalise member distinguished name config. 2020-09-04 08:36:13 +01:00
Paul Holden 4ff5d5ef17 MDL-69448 backup: fix capability checks when unable to copy user data.
When a given user doesn't have the capability to "Include user data"
during course copying, freeze the form element rather than not adding
it at all.

This caused problems as the element was required before preceding with
the course copy.
2020-09-04 08:20:13 +01:00
Nathan Nguyen 84ef6eb8d9 MDL-67468 filter_activitynames: use MUC 2020-09-04 15:41:46 +10:00
Thong Bui 3b45e0db41 MDL-68344 filepicker: File Picker focus lost on upload 2020-09-04 10:09:22 +07:00
Sara Arjona 535523f21f weekly release 3.9.1+ 2020-09-03 17:09:26 +02:00
Sara Arjona 9c50ccbf7e NOBUG: Fixed SVG browser compatibility 2020-09-03 17:09:24 +02:00
Bas Brands 6c39b7890e MDL-69395 theme_boost: improve colour contrast for form input fields
- for this issue the atto styles.css was moved into theme boost so
we can use our preset variable for $gray-500
2020-09-03 11:09:02 +02:00
Andrew Nicols b676817a64 Merge branch 'MDL-69391-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-09-03 11:48:49 +08:00
Andrew Nicols 8eca15c5f1 Merge branch 'MDL-69360-39' of git://github.com/NoelDeMartin/moodle into MOODLE_39_STABLE 2020-09-03 10:52:15 +08:00
Andrew Nicols 1bb4c59adc Merge branch 'MDL-69246_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-09-03 10:40:12 +08:00
Andrew Nicols 2332ac5f87 Merge branch 'MDL-55340-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-09-03 10:14:13 +08:00
Andrew Nicols 0700b8510f Merge branch 'MDL-69069-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-09-03 09:34:08 +08:00
Eloy Lafuente (stronk7) 7bc82ad672 Merge branch 'MDL-69608-39' of https://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2020-09-02 23:50:09 +02:00
Sara Arjona 92b9900d6e Merge branch 'MDL-68680-MOODLE_39_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_39_STABLE 2020-09-02 17:16:09 +02:00
Marina Glancy 312ca07bb7 MDL-69608 core_form: frozen forms do not have form tag 2020-09-02 11:40:22 +02:00
Noel De Martin bea621d6c6 MDL-69360 behat: Fix js ready checks for non-moodle sites 2020-09-02 10:20:52 +02:00
Andrew Nicols 28a8eb3856 Merge branch 'MDL-68892-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-09-02 09:49:21 +08:00
Eloy Lafuente (stronk7) fb39317a64 Merge branch 'wip_MDL-69491_m39' of git://github.com/gjb2048/moodle into MOODLE_39_STABLE 2020-09-02 00:27:43 +02:00
Sara Arjona 6e7f80363b Merge branch 'MDL-64525-m39' of https://github.com/NeillM/moodle into MOODLE_39_STABLE 2020-09-01 14:18:20 +02:00
Sara Arjona 82bd2ff5a9 Merge branch 'MDL-51709-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-09-01 09:04:24 +02:00
Mihail Geshoski e657192d31 MDL-69525 core: Publish a single event when toggling slave checkboxes 2020-09-01 14:54:07 +08:00
Sara Arjona 85782cffd7 Merge branch 'MDL-69394-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-09-01 06:45:26 +02:00
Tim Hunt fac004cfe9 MDL-69507 duration form field: should return an int number of seconds 2020-09-01 11:31:36 +08:00
Tim Hunt 221c293ac7 MDL-69507 duration form field: modernise coding style 2020-09-01 11:31:10 +08:00
Andrew Nicols 5ad20a0633 Merge branch 'MDL-69387-39-2' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-09-01 10:59:51 +08:00
Andrew Nicols d63bdf9bb9 Merge branch 'MDL-69505-39' of https://github.com/snake/moodle into MOODLE_39_STABLE 2020-09-01 07:29:23 +08:00
Andrew Nicols bc29f1c98a Merge branch 'MDL-56595-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-09-01 07:29:23 +08:00
Luca Bösch 4830f55122 MDL-51709 gradebook: Name display in single view. 2020-08-31 18:18:26 +02:00
Shamim Rezaie 48508e4ecc MDL-69116 qtype_multichoice: accessibility improvement
- Screen-readers should not see 'clear my choice' when it is not visible
- 'clear my choice' option should only become visible when a choice is
selected
2020-08-31 23:55:49 +10:00
Shamim Rezaie fbb2d6592d MDL-69116 qtype_mutichoice: Use label for the "clear my choice" link 2020-08-31 23:55:49 +10:00
Bas Brands 581a497189 MDL-69069 theme_boost: color contrast for custom alerts 2020-08-31 08:46:39 +02:00
Jake Dallimore 3d3314d433 MDL-69505 core_form: fix js min/max date restriction in dateselector
This was using the yui2-calendar attribute, not the yui 3 attribute.
2020-08-31 08:05:37 +08:00
Gareth Barnard a1f21bad0d MDL-69491 themes: No 'fontsize' setting in Boost causes unit conflict. 2020-08-28 14:10:54 +01:00
Marina Glancy 189810269a MDL-55340 mod_feedback: export question labels
This was present in export in 3.0 but got lost during export
refactoring in 3.1
2020-08-28 12:25:17 +02:00
Andrew Nicols e592c6dd9d Merge branch 'MDL-69112-39' of git://github.com/merrill-oakland/moodle into MOODLE_39_STABLE 2020-08-28 13:26:05 +08:00
Nathan Nguyen 563cfa0e1e MDL-68680 core_grades: check grade item before trigger delete event 2020-08-28 11:40:24 +10:00
Paul Holden 863fb96ffa MDL-56595 tool_usertours: set page params when configuring tours/steps. 2020-08-27 23:08:07 +01:00
Tim Hunt 10f03d2a99 MDL-69246 questions: allow for float issues when validating manual marks
As well as fixing the bug, I also rewrote the test to use
data providers, which should lead to more useful failure messages.

And, I moved the magic number we used as the float tolerence to
be a named constant.
2020-08-27 17:41:02 +01:00
Sara Arjona b3b04e083b weekly release 3.9.1+ 2020-08-27 17:36:31 +02:00
Sara Arjona 9262b490ee Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-08-27 17:36:29 +02:00
Jun Pataleta f37d0629ea MDL-69262 core: Use core/action_menu_link in core/action_menu_trigger
* Introduce the "actionmenulinkclasses" block in the action_menu_link
template so other templates importing it can have the option to override
its classes.
* Have the action menu trigger template use the action menu link
template to reduce code duplication.
2020-08-27 13:30:46 +08:00
Jun Pataleta 6d9518cf56 MDL-69262 core: Make instance count variable as a static class variable
With the static function variable $instance, calls to
\action_menu_link::export_for_template() from its subclasses are stored
in different variables. This causes duplicate IDs when different
implementations of action menu links are rendered on the action menu
trigger/link template. (e.g. action_menu_link and
action_menu_link_secondary both rendered on the same page).
To make the incrementing uniform for the action_menu_link class and its
implementations, the $instance variable is moved out of the
export_to_template() method and is now made to a static class variable.
2020-08-27 13:30:46 +08:00
Andrew Nicols 0d8bf37407 Merge branch 'MDL-69458-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-08-27 12:43:10 +08:00
Andrew Nicols 159115b7c7 Merge branch 'MDL-69501-39-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-08-27 11:31:17 +08:00
eWallah 930dba73c3 MDL-67413 competencies: do nothing upon activity completion 2020-08-27 11:09:57 +08:00
Andrew Nicols 22217ac42f Merge branch 'MOODLE_39_MDL-69358' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-08-27 10:57:57 +08:00
Justin Hunt d46ee17722 MDL-66810 mod_lti: Reinstate deprecated default permissions on iframe
microphone, webcam, camera, midi, encrypted-media, geolocation
2020-08-27 10:26:38 +08:00
Adrian Greeve 5f1d9df828 Merge branch 'MDL-69419-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-08-27 08:07:18 +08:00
AMOS bot 95cc0d562b Automatically generated installer lang files 2020-08-27 00:07:08 +00:00
Sara Arjona 3584cd786a Merge branch 'MDL-69389-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-08-26 18:03:06 +02:00
Sara Arjona fa92e6a809 Merge branch 'MDL-69114-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-26 16:28:49 +02:00
Jun Pataleta 1257e39d92 MDL-69389 theme_classic: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:08:28 +08:00
Jun Pataleta 65c7339199 MDL-69389 theme_boost: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:08:28 +08:00
Jun Pataleta 2cb720a3d2 MDL-69387 pix: Create PNG versions of the darkened completion icons
Thanks to Barbara Ramiro <barbara@moodle.com> for the help in
generating these PNG versions of the darkened completion icons!
2020-08-26 11:03:18 +08:00
Jun Pataleta 138ed9c1fa MDL-69387 pix: Darken completion icons
Darkened the fills of completion icons in order to meet the required
minimum contrast ratio of 3:1.
* Changed gray fills (#999) to #949494.
* Changed blue fills (#76A1F0) to #6393ee
* Changed green fills (#9C3) to #79a128

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

This can lead to some random test failures.

Actively specifying a test which does not make use of the 'R' random
field time addresses this issue.
2020-08-26 09:58:35 +08:00
AMOS bot 122ed3beaf Automatically generated installer lang files 2020-08-26 00:07:28 +00:00
Jun Pataleta b58a45df37 MDL-69391 theme: Darken course selector text colour
Use $gray-600 for a darker text colour in the course select box.
This also makes the colour consistent with the view selector which
also uses $gray-600.
2020-08-25 14:40:34 +08:00
Jun Pataleta 2d450e9a3b MDL-69391 theme: Darken navbar-light colour
Increase the opacity for the sass variable $navbar-light-color a
little bit in order to achieve an acceptable colour contrast against
the white background.
2020-08-25 14:40:34 +08:00
Adrian Greeve 3513964883 Merge branch 'MDL-68921-39' of git://github.com/vmdef/moodle into MOODLE_39_STABLE 2020-08-25 10:37:58 +08:00
Victor Deniz Falcon fde9d44286 MDL-68921 core_h5p: Add H5P libraries metadata settings
An upgrade step updates installed H5P libraries
2020-08-25 00:35:59 +01:00
Neill Magill ba8185cb2a MDL-64525 comments: Should not be able to delete frozen comments
Before this change in a frozen context a user would be able to delete
their own comments.

After this change a user will only be able to delete their own comments
if they still have the capability to post new comments or the capability
to delete comments from any user.
2020-08-24 08:00:36 +01:00
Neill Magill 362c598d1b MDL-64525 comments: Tests for deleting frozen comments 2020-08-24 08:00:35 +01:00
Mihail Geshoski 185fc93ed5 MDL-69458 report_insights: Respect perpage value in pagination bar 2020-08-24 09:30:46 +08:00
Eloy Lafuente (stronk7) 8b254440d6 Merge branch 'MDL-69493-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-22 17:09:43 +02:00
AMOS bot 5989a94787 Automatically generated installer lang files 2020-08-22 00:07:52 +00:00
Eloy Lafuente (stronk7) e290345cd6 weekly release 3.9.1+ 2020-08-21 20:43:20 +02:00
Helen Foster 4c48bccbad MDL-69501 lang: Import fixed English strings (en_fix)
Significant string change: error:nobadges,core_badges - Additional info
explaining that site badges can only have other site badges as criteria
2020-08-21 14:06:31 +02:00
Jun Pataleta ef1bb2b193 Merge branch 'MDL-66818-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-08-21 11:32:35 +08:00
Andrew Nicols 9e103451e2 MDL-66818 mod_forum: Use cap manager to check exportability 2020-08-21 08:17:16 +08:00
Andrew Nicols 832f5f7019 MDL-42434 chat: Disable stylelint important check 2020-08-21 07:38:06 +08:00
Sara Arjona 40f92ac55d MDL-42434 mod_chat: styles for chat themes to view help-icon properly
The styles for the bubble and the compact themes have been reviewed
because there weren't enough contrast for the help icon.
2020-08-20 23:42:56 +01:00
Sara Arjona 887efbd939 MDL-42434 mod_chat: display the whole help text
When testing this issue was raised that the help text was cut-off.
This patch should fix this issue changing the placement from
right/left to top.
2020-08-20 23:42:56 +01:00
Ferran Recio 6305c7b83c MDL-68892 mod_h5pactivity: add required to package 2020-08-20 17:20:13 +02:00
Adrian Greeve 6bbb4e4df2 Merge branch 'MDL-69055-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 12:02:49 +08:00
Andrew Nicols 79e98f6ac4 Merge branch 'MDL-69375_39' of https://github.com/Cvmcosta/moodle into MOODLE_39_STABLE 2020-08-20 11:51:08 +08:00
Adrian Greeve 1c1a96981d Merge branch 'MDL-68964-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-20 11:42:30 +08:00
Adrian Greeve 6e9d203e52 Merge branch 'MDL-42434-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 11:24:43 +08:00
Adrian Greeve c02fc98d06 Merge branch 'MDL-68683-39-fix' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-08-20 10:24:42 +08:00
Andrew Nicols 895e5748e1 Merge branch 'MDL-69449-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-20 09:25:19 +08:00
Andrew Nicols 96805ec18e Merge branch 'MDL-68889-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-20 09:19:22 +08:00
Simey Lameze 010f1eff60 MDL-68683 competencies: fix query to delete stale files 2020-08-20 09:13:15 +08:00
Simey Lameze a713a68af8 MDL-68683 competencies: step to delete orphaned evidence files 2020-08-20 09:09:37 +08:00
Simey Lameze 1547225e52 MDL-68683 core: fix DML exception on upgrade step 2020-08-20 09:02:50 +08:00
Andrew Nicols cc52ff7703 Merge branch 'MDL-67415_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-08-20 08:30:11 +08:00
Andrew Nicols 3f51798192 Merge branch 'MDL-66818-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-08-20 08:17:01 +08:00
Simey Lameze 8578e19aff MDL-66818 mod_forum: remove unnecessary behat steps 2020-08-20 08:05:00 +08:00
gthomas2 e4ffa5f3f6 MDL-66818 mod_forum: hide portfolio export button based on caps 2020-08-20 08:05:00 +08:00
Andrew Nicols 8cc9ebea1e Merge branch 'MDL-66900-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-20 07:54:30 +08:00
Andrew Nicols 2cb5248ac3 Merge branch 'MDL-69473-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 07:44:12 +08:00
Andrew Nicols 43a9717a33 Merge branch 'MDL-69271_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-08-20 07:35:40 +08:00
Andrew Nicols 4fd5a7bfcb Merge branch 'MDL-69054-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 07:32:03 +08:00
Andrew Nicols 3c2c15d4dc Merge branch 'MDL-61215-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE 2020-08-20 07:17:13 +08:00
Andrew Nicols 7969cfb39f Merge branch 'MDL-69401-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-08-20 07:03:36 +08:00
Victor Deniz Falcon f2fe8b1664 Merge branch 'MDL-69297-39' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2020-08-19 23:45:32 +01:00
Eloy Lafuente (stronk7) 23dc056578 MDL-63375 workshop: apply specific IE10/11 fix
Credit goes to Matt Davidson (Syxton)
2020-08-19 17:54:45 +02:00
Sam Hemelryk 3e9dadc85e MDL-68896 mod_scorm: improved sendBeacon use when unloading 2020-08-19 20:30:49 +12:00
Peter Dias 6e37e120fc MDL-69297 assign: Check whether there is content for a submission
Confirm there is some content to be submitted for an assignment when processing it.
2020-08-19 15:48:42 +08:00
Adrian Greeve 091a6ca62e Merge branch 'MDL-66665-39-POC2' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2020-08-19 14:29:06 +08:00
Peter Dias a8cdc38272 MDL-66665 assign: Check whether a modified user could actually grade 2020-08-19 13:41:12 +08:00
Adrian Greeve 2296b4b16e Merge branch 'MDL-68683-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-08-19 12:57:04 +08:00
Adrian Greeve 4e873c2ab6 Merge branch 'MDL-69475_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-08-19 10:44:23 +08:00
Andrew Nicols 130d29bb5f Merge branch 'MDL-26401-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-08-19 08:52:02 +08:00
Andrew Nicols 3ae4d6e824 Merge branch 'MDL-69089-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-08-19 08:20:00 +08:00
Eloy Lafuente (stronk7) be1847d075 Merge branch 'MDL-65847-auth_db_error_handling-39' of git://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-08-19 00:35:37 +02:00
Eloy Lafuente (stronk7) 68810e04c6 Merge branch 'MDL-69095-39' of git://github.com/jleyva/moodle into MOODLE_39_STABLE 2020-08-19 00:19:51 +02:00
Eloy Lafuente (stronk7) b8b894dd36 Merge branch 'MDL-63375-39' of https://github.com/syxton/moodle into MOODLE_39_STABLE 2020-08-19 00:13:13 +02:00
Eloy Lafuente (stronk7) a12b0aff07 Merge branch 'MDL-68444-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-08-18 19:15:13 +02:00
Eloy Lafuente (stronk7) 3523edfd90 MDL-69475 backup: Proper handling of backup::RELEASE versions
1) Remove any floatval() casting. They are breaking / killing
   .10 versions (converting them to .1). Since Moodle 2.0 all the
   backup::RELEASE have been 100% numerical values.
2) Use version_compare() always to compare backup::RELEASE values.
   They are always versions and the function is aware of versions
   > .9, able to clean/ignore alpha chars... and everything else.

Note that I've also changed a couple of cases in formats (topics and
weeks) that were correct, but just added the same comment and used
the same version_compare() comparison parameters style, so all uses
in core are consistent (and safe to be copied out there).
2020-08-18 16:24:57 +02:00
Eloy Lafuente (stronk7) fbaab99733 Merge branch 'MDL-69273-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-08-18 10:59:37 +02:00
Simey Lameze 6408db6427 MDL-68683 competencies: step to delete orphaned evidence files 2020-08-18 16:05:59 +08:00
Simey Lameze 2cd36e8ea0 MDL-68683 core: fix DML exception on upgrade step 2020-08-18 16:04:32 +08:00
Andrew Nicols 6a930e2c88 MDL-69273 travis: Use exttests for https too 2020-08-18 07:50:48 +08:00
Andrew Nicols 78079c3f2b MDL-69273 travis: Move exttests check to after_script
The result of the final command `script` phase determines the build
result.

The cleanup belongs in the `after_script` phase.
2020-08-18 07:40:14 +08:00
Paul Holden a88c706d98 MDL-69493 cohort: remove escaping of return URL params. 2020-08-17 21:30:14 +01:00
Amaia Anabitarte b9d20f8481 MDL-69089 core_contentbank: Tests for empty content names 2020-08-17 15:56:35 +02:00
Amaia Anabitarte 545b24fa52 MDL-69089 core_contentbank: Empty content names are not allowed 2020-08-17 15:56:35 +02:00
Andrew Nicols 2f6437ec5c Merge branch 'MDL-69414_M39' of https://github.com/nadavkav/moodle into MOODLE_39_STABLE 2020-08-17 14:52:46 +08:00
Mihail Geshoski 806042d58a MDL-69401 book: Limit character length in chapter title 2020-08-17 09:04:02 +08:00
carlos 58e66823a2 MDL-69375 mod_lti: Fix Names and Roles Link header format
- Changed line 469 of memberships.php to build Link header according to the Web Linking specification RFC8288.
2020-08-14 17:15:47 -03:00
Sara Arjona 119010b16d MDL-42434 mod_chat: add again the usingchat help icon
In Moodle 2.4 the help icon displayed in the chat window was
removed. It has been added to gui_ajax and gui_basic in order to help users.
2020-08-14 17:13:06 +02:00
Sara Arjona c6895d7dd4 MDL-69055 core_badges: display password/oauth fields properly 2020-08-14 17:10:33 +02:00
Sara Arjona 1f7f5e368d MDL-69054 core_badges: allow editing OBv1.0 backpacks 2020-08-14 17:09:45 +02:00
Sara Arjona b80006b600 MDL-61215 core_user: use the new optimised_image filetype group
For the user profile picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:57 +02:00
Sara Arjona 9e42721660 MDL-61215 core_badges: use the new optimised_image filetype group
For the badge picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:57 +02:00
Sara Arjona 0f13aee6fb MDL-61215 core_files: add new optimised_image group
Currently, PHP getimagesize method doesn't support SVG images.
As some features, such as badges, processs and optimise the images
before using them, a new filetype group has been created to exclude
SVG from there: optimised_image.
SVG can't be removed from web_image because then users won't be
able to add SVG images to their courses using labels, pages...
2020-08-14 17:06:57 +02:00
Eloy Lafuente (stronk7) 8cc4708c2a MDL-69271 auth_ldap: Don't assume any ordering, just verify matches
Both ldap or the DB can return information in a non-consistent
ordering leading to events to be generated in different order.

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

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

So we just do the tests ordering immune, verifying that all the
expected events have been triggered and done. Irrespectively of their order.
2020-08-14 13:40:09 +02:00
Sara Arjona 507d51eebf MDL-69473 contentbank: change incorrect ref to size in type column 2020-08-14 08:54:20 +02:00
Andrew Nicols 89d8f73703 weekly release 3.9.1+ 2020-08-14 14:42:37 +08:00
Andrew Nicols f0f37cb2e7 NOBUG: Fixed SVG browser compatibility 2020-08-14 14:42:35 +08:00
Andrew Nicols 62cd827dc5 Merge branch 'MDL-68666-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-13 15:21:28 +08:00
Bas Brands 1b682b3b6a MDL-68666 core_pix: add missing fallback icons 2020-08-13 08:49:27 +02:00
Andrew Nicols 5e372ecd61 Merge branch 'MDL-69253_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-08-13 11:52:32 +08:00
Andrew Nicols 4401c891e8 Merge branch 'MDL-60492-tagcloud_html-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-08-13 11:45:10 +08:00
Andrew Nicols 61a17c94be Merge branch 'MDL-69381-39' of https://github.com/marinaglancy/moodle into MOODLE_39_STABLE 2020-08-13 11:29:09 +08:00
Adrian Greeve 75911e67bd Merge branch 'MDL-68423-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-13 11:05:37 +08:00
Andrew Nicols 3a2eb35800 Merge branch 'MDL-68932-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-08-13 10:52:26 +08:00
Andrew Nicols 5ae88aba9d Merge branch 'MDL-69421-39' of git://github.com/noeldemartin/moodle into MOODLE_39_STABLE 2020-08-13 09:35:59 +08:00
Andrew Nicols dbd0a1dbf7 Merge branch 'MDL-67991-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-08-13 09:04:15 +08:00
Andrew Nicols d1e4c0fecc Merge branch 'MDL-69241-39' of git://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2020-08-13 08:47:03 +08:00
Andrew Nicols 522dd18e62 Merge branch 'MDL-60260-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-13 07:55:21 +08:00
Andrew Nicols 563bfb4582 Merge branch 'MDL-69143-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-13 07:45:44 +08:00
Eloy Lafuente (stronk7) f03d9e1aab MDL-67415 environment: change requirements
- mysql requirement up to 5.7
- postgres requirement up to 9.6
2020-08-13 01:30:01 +02:00
Eloy Lafuente (stronk7) 454a93cbbf MDL-67415 environment: 3.10 base information
This is a direct copy of the 3.9 branch to have
changes under control easier for next commits.
2020-08-13 01:30:00 +02:00
Eloy Lafuente (stronk7) a64f376595 Merge branch 'MDL-68860-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-13 01:08:32 +02:00
Eloy Lafuente (stronk7) f620bbf2f5 Merge branch 'MDL-68558-39-plugindepscheckdeadend' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-08-13 00:40:17 +02:00
Eloy Lafuente (stronk7) 4ddbc1ee38 Merge branch 'MDL-67394-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-13 00:29:15 +02:00
Eloy Lafuente (stronk7) f9bd169b6e Merge branch 'MDL-67002_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-08-13 00:26:09 +02:00
Ferran Recio 332fdda507 MDL-68964 mod_chat: fix theme param 2020-08-12 17:30:02 +02:00
Ferran Recio 77f46da53a MDL-69143 contentbank: catching Exception on file upload 2020-08-12 16:58:26 +02:00
Bas Brands ebacd8353f MDL-68889 block_recentlyaccessedcourses: small viewport issues
- on small devices the recentlyaccessedcourses does not show any courses
2020-08-12 13:05:13 +02:00
Paul Holden a97c45a15d MDL-66900 course: don't clean category description when editing. 2020-08-12 11:48:29 +01:00
Simey Lameze f307dc23d7 MDL-26401 group: change import to use csv_import_reader class 2020-08-12 16:35:56 +08:00
Simey Lameze b21f182106 MDL-26401 group: add delimiter and encoding fields to import 2020-08-12 16:35:56 +08:00
Paul Holden 0991b0a091 MDL-69449 block_timeline: use dayslimit context data in template.
Ensures the correct value is used when initially rendering the
course timeline.
2020-08-12 09:19:29 +01:00
Andrew Nicols 54eb1f8f23 Merge branch 'MDL-68618-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-12 13:41:00 +08:00
Andrew Nicols 97df1db020 Merge branch 'MDL-69353-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-12 11:22:40 +08:00
Andrew Nicols 8c1eb6cfd3 Merge branch 'MDL-68334-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-08-12 11:14:05 +08:00
Andrew Nicols 4eeb1bbd8f Merge branch 'MDL-69296-m39' of https://github.com/NeillM/moodle into MOODLE_39_STABLE 2020-08-12 10:29:58 +08:00
Mikhail Golenkov 5778aa1fa1 MDL-69358 backup: Do not clean up records for incomplete adhoc tasks.
Co-authored-by: Heena Agheda <heenaagheda@catalyst-au.net>
2020-08-12 12:07:28 +10:00
Andrew Nicols a0c582342c Merge branch 'MDL-68731_39' of https://github.com/jonof/moodle into MOODLE_39_STABLE 2020-08-12 09:11:25 +08:00
Andrew Nicols cf13f285e4 Merge branch 'MDL-69143-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-11 14:34:10 +08:00
Andrew Nicols 08d7dd1db4 Merge branch 'MDL-69168_recently-accessed-items-block-uses-stock-lti-icon__MOODLE_39_STABLE' of https://github.com/stopfstedt/moodle into MOODLE_39_STABLE 2020-08-11 13:00:36 +08:00
Adrian Greeve a6908c3ee8 Merge branch 'MDL-69204-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-11 08:45:14 +08:00
Paul Holden cc91fe0988 MDL-68618 mod_forum: stop reverting idnumber when updating instance. 2020-08-10 09:11:12 +01:00
Paul Holden f66e6749ae MDL-68860 mod_lti: Oracle support for retrieving shared secrets.
Thanks to Mark van Hoek!
2020-08-10 09:06:07 +01:00
Adrian Greeve f3fd372584 Merge branch 'MDL-60493-grader_span_tag-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-08-10 09:22:18 +08:00
Nadav Kavalerchik e29a887814 MDL-69414 qtype/ddimageortext: Fix dropzones display in RTL mode 2020-08-09 11:45:21 +03:00
Luca Bösch f1743d9179 MDL-68334 user: Display name in footer as elsewhere. 2020-08-08 10:38:40 +02:00
Stefan Topfstedt 73827e8eda MDL-69168 block_recentlyaccesseditems: apply custom icon
Overwrite the default mod icon with the configured icon url if
applicable.
2020-08-07 09:15:05 -07:00
Matt Davidson abb81c79d7 MDL-63375 workshop: fix rubric grid view 2020-08-07 08:48:41 -04:00
Amaia Anabitarte 8b55712485 MDL-67991 availability: Fix access restrictions labels 2020-08-07 10:02:25 +02:00
Michael Hawkins f967acc533 MDL-69241 lib: Reset dynamic tables to page 1 when filtering or sorting
This ensures consistency and that the page will always exist, which may
not be true for later pages if applying filters returns fewer results.
2020-08-07 12:53:26 +08:00
Eloy Lafuente (stronk7) 61d4bf3f88 weekly release 3.9.1+ 2020-08-06 20:51:32 +02:00
Noel De Martin 94dc00614c MDL-69421 behat: Revert app behat navigation to call session visit 2020-08-06 12:15:51 +02:00
Jun Pataleta 976ec609bc Merge branch 'MDL-60501-h4_close_tag-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-08-06 12:11:18 +08:00
Jun Pataleta 7cc4f8883a Merge branch 'MDL-69111-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-06 11:36:48 +08:00
Adrian Greeve 9b48e7420e Merge branch 'MDL-40227-39-1' of git://github.com/peterRd/moodle into MOODLE_39_STABLE 2020-08-06 11:28:34 +08:00
Peter eae4f24877 MDL-40227 mod_lesson: Use localised float formatting
* Leverage PARAM_LOCALISEDFLOAT
* Store all numbers with standard '.' dec formatting
* Show all numbers based on locale settings
* Behat test to cover different cases using numeric questions and modified locale setting
2020-08-06 10:44:59 +08:00
Adrian Greeve 72e24ec057 Merge branch 'MDL-69311-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-06 09:49:32 +08:00
Adrian Greeve da2cb39c15 Merge branch 'MOODLE_39_MDL-66626' of https://github.com/golenkovm/moodle into MOODLE_39_STABLE 2020-08-06 09:07:26 +08:00
Eloy Lafuente (stronk7) 695b470305 Merge branch 'MDL-66670-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-06 00:58:26 +02:00
Leon Stringer 076bbff5a7 MDL-60492 core_tag: Fix title attribute
Attribute 'title' was specified inside a condition but closing `"` was
outside condition possibly resulting in <a href="..." class="..." ">.
Also moved </a> outside of condition to match <a>.
2020-08-05 12:55:02 +01:00
Shamim Rezaie 023064558f MDL-68932 core: showhidesettings to work with multiple hideIf()s 2020-08-05 19:08:27 +10:00
Adrian Greeve a934784741 Merge branch 'MDL-68647-39-forumprivacysql' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-08-05 14:22:22 +08:00
Adrian Greeve 13a31a6b83 Merge branch 'MDL-60932-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-08-05 10:08:50 +08:00
Eloy Lafuente (stronk7) f29c1bee74 Merge branch 'MDL-67831-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-08-05 00:47:33 +02:00
Tim Hunt 3c5ba23f7f MDL-69253 mod_quiz: unit test for the last commit 2020-08-04 14:50:57 +01:00
Josh Ebarvia 777c810671 MDL-69253 mod_quiz: Fix timecreated is 0 when creating a quiz activity 2020-08-04 14:50:57 +01:00
Jun Pataleta 9a642c49e1 Merge branch 'MDL-60574_39' of https://github.com/t-schroeder/moodle into MOODLE_39_STABLE 2020-08-04 19:51:20 +08:00
Eloy Lafuente (stronk7) a5708767a0 Merge branch 'MDL-55299-39' of git://github.com/ferranrecio/moodle into MOODLE_39_STABLE 2020-08-04 12:34:06 +02:00
Jun Pataleta 1117eb6579 Merge branch 'MDL-69336-39' of git://github.com/mickhawkins/moodle into MOODLE_39_STABLE 2020-08-04 16:54:21 +08:00
Tim Schroeder f131e22bc4 MDL-60574 atto_undo: fixed redo erasing content
When you'd hit ctrl-y with nothing on the redo stack the entire
content of Atto would get deleted with no way of getting it back.
2020-08-04 09:25:00 +02:00
Michael Hawkins 76fd40f2f9 MDL-69336 lib: Correctly return promises when table show/hide columns
Previously showColumn and HideColumn were returning nothing, so
attempts to catch exceptions were themselves throwing errors in the
browser console.
2020-08-04 15:20:29 +08:00
Michael Hawkins 52925cb9df MDL-69336 lib: Reinstating tablelib column show/hide functionality
Also added behat testing for hide/show columns in participants table.
2020-08-04 15:20:29 +08:00
Eloy Lafuente (stronk7) 3d68237956 Merge branch 'MDL-69367-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-03 16:29:09 +02:00
Leon Stringer b79b33c664 MDL-65847 auth_db: user_update() handle errors
The external database authentication plugin (auth_db) can update the
external database if mapped fields are set to Update external: On
update.  This change adds error handling in case this update fails.
2020-08-03 11:49:55 +01:00
Eloy Lafuente (stronk7) 8a6b5024a1 Merge branch 'MDL-62980-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-08-03 12:38:25 +02:00
Bas Brands f51dcd3c96 MDL-69114 theme_boost: improve the color contrast for .*-info classes 2020-08-03 11:36:48 +02:00
Eric Merrill 7a4f10ddda MDL-69112 assign: Improve parsing of uploaded feedback names 2020-07-31 19:08:27 -04:00
Marina Glancy 2d7f517b5b MDL-69381 core_backup: make progressbar selector more specific 2020-07-31 13:30:07 +02:00
Amaia Anabitarte 3161583d89 MDL-60932 core_user: Fix docs link for participants page
Co-authored by: David Mudrák <david@moodle.com>
2020-07-31 10:30:18 +02:00
Neill Magill 9e3b1f2d7e MDL-69296 resource: Pressing cancel should always exit settings form
Before this change if a user used navigated to a resource activity
from another activity and then edited the settings it was likely
that using the cancel button would result in file downloading,
rather than being returned to their last page.

After this change the user will be back on the page they came from.
2020-07-31 07:57:29 +01:00
Paul Holden ff2d425711 MDL-67394 dml: improve thrown exception when Oracle can't parse query. 2020-07-30 16:23:00 +01:00
Victor Deniz Falcon 95c4f624c8 weekly release 3.9.1+ 2020-07-30 12:54:18 +01:00
Victor Deniz Falcon 7882fff01a Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-30 12:54:12 +01:00
Paul Holden d68848383e MDL-62980 tool_dataprivacy: show persistent errors inside form. 2020-07-30 08:23:19 +01:00
AMOS bot f395c5b238 Automatically generated installer lang files 2020-07-30 00:09:02 +00:00
Eloy Lafuente (stronk7) a9782addfc Merge branch 'MDL-63252-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-07-30 00:47:57 +02:00
Victor Deniz Falcon d093887447 Merge branch 'MDL-66707-39' of git://github.com/rezaies/moodle into MOODLE_39_STABLE 2020-07-29 23:17:25 +01:00
Victor Deniz Falcon f0be299db3 Merge branch 'MDL-68968-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-07-29 22:02:28 +01:00
Paul Holden 6a3edc34bd MDL-60260 course: validate external fields on create/update course.
Ensure course fullname/shortname fields are not empty.
2020-07-29 19:57:22 +01:00
Victor Deniz Falcon 135dfe2144 Merge branch 'MDL-68706-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-07-29 19:05:02 +01:00
Ferran Recio 13de4b94dc MDL-69143 contentbank: fix tests when extra plugins installed 2020-07-29 17:52:26 +02:00
Ferran Recio c6ec3c048e MDL-69143 contentbank: add import file method to content 2020-07-29 17:52:26 +02:00
Victor Deniz Falcon 6d1680998d Merge branch 'MDL-69199-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-07-29 11:54:46 +01:00
Jonathon Fowler bbfcb91b1f MDL-68731 forum: fix digests not correctly updating post read statuses 2020-07-29 15:41:31 +10:00
Jun Pataleta 7d1f5e81ea Merge branch 'MDL-69252-close_tag-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-07-29 11:17:40 +08:00
Eloy Lafuente (stronk7) 5f9d183b46 Merge branch 'MDL-69319-39' of https://github.com/snake/moodle into MOODLE_39_STABLE 2020-07-29 00:20:37 +02:00
Paul Holden 646ebff5dd MDL-69367 quizaccess_seb: correct foreign key table reference. 2020-07-28 13:33:59 +01:00
Juan Leyva 8f6f312d65 MDL-69095 tool_mobile: Display warning if not allowed to use qr login 2020-07-28 13:55:21 +02:00
Juan Leyva 5762e5ec3e MDL-69095 tool_mobile: Avoid non-https sites using qrlogin by default 2020-07-28 13:55:21 +02:00
Leon Stringer 52dbe51339 MDL-60493 mod_assign: Unused JS variables
Removed unused JavaScript variables fixing CI warning "ESLint error
[no-unused-vars]".
2020-07-28 12:04:03 +01:00
Leon Stringer dfaad3e8ca MDL-60493 mod_assign: Remove rogue </span>
In the grading interface (/mod/assign/view.php?id=2&action=grader)
there was a rogue </span> with no opening <span>.  Also changed
<span><form> to <div><form> in included template fixing CiBoT HTML
Validation error.
2020-07-28 12:03:29 +01:00
Jun Pataleta 7da6f2675d Merge branch 'MDL-65453-39' of git://github.com/lameze/moodle into MOODLE_39_STABLE 2020-07-28 11:42:17 +08:00
Simey Lameze 9ae2623d89 MDL-65453 core: fix behaviour of --skip-database option on install 2020-07-28 11:27:30 +08:00
Paul Holden e64f37c3c5 MDL-69204 tool_dataprivacy: summary link only on current user profile. 2020-07-27 17:25:02 +01:00
Jun Pataleta b39ed13500 Merge branch 'MDL-66755-39' of https://github.com/SergioComeron/moodle into MOODLE_39_STABLE 2020-07-27 16:55:43 +08:00
Adrian Greeve 532a81f846 Merge branch 'MDL-69079-39-1' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-27 08:54:26 +08:00
AMOS bot 2b96f7b343 Automatically generated installer lang files 2020-07-27 00:07:30 +00:00
AMOS bot 6a07b3c08c Automatically generated installer lang files 2020-07-27 00:07:30 +00:00
Mikhail Golenkov 744726275d MDL-66626 assignfeedback_editpdf: Check page count for attempt.
Co-Authored-By: John Yao <johnyao@catalyst-au.net>
2020-07-27 09:51:11 +10:00
Mikhail Golenkov 07afdeedac MDL-66626 assignfeedback_editpdf: Count files outside of foreach loop.
Co-Authored-By: John Yao <johnyao@catalyst-au.net>
2020-07-27 09:51:11 +10:00
AMOS bot b8c3fefd02 Automatically generated installer lang files 2020-07-25 00:07:55 +00:00
Paul Holden ac7cb0921b MDL-68706 customfield_textarea: allow field content to be cleared. 2020-07-24 13:44:48 +01:00
Paul Holden 6b6a083916 MDL-69353 admin: set page title when prompting for upgrade key. 2020-07-24 13:30:27 +01:00
Tim Hunt 6acd719f0f MDL-67002 quiz reports: fix sorting on Oracle in the responses report 2020-07-24 11:45:02 +01:00
Sergio Comerón 455e7f50d8 MDL-66755 forum: Subscription cancel when edit a message 2020-07-24 09:04:25 +02:00
Mihail Geshoski f49fe84488 MDL-69079 core: Restore and set missing guest user 2020-07-24 11:11:42 +08:00
Mihail Geshoski 5ce4bd05df MDL-69079 course: Handle missing guest when fetching recommended modules 2020-07-24 11:09:31 +08:00
Mihail Geshoski b9f2e3d99b MDL-69079 course: Handle fetch module data failures in activity chooser 2020-07-24 11:09:28 +08:00
AMOS bot 42bcf62000 Automatically generated installer lang files 2020-07-24 00:09:19 +00:00
Sam Marshall 86f5acdc88 MDL-63252 tool_xmldb: convert default to float to avoid false positives 2020-07-24 07:53:52 +08:00
Simey Lameze 45aa8db99d MDL-68968 core: fix wrong phpdoc on admin_externalpage 2020-07-24 07:46:22 +08:00
Amaia Anabitarte d35fc78761 MDL-69199 mod_quiz: Show timefinish in user Complete report 2020-07-23 18:54:05 +02:00
Victor Deniz Falcon d8b0be3eb3 weekly release 3.9.1+ 2020-07-23 16:10:40 +01:00
Victor Deniz Falcon 12e884c5b3 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-23 16:10:34 +01:00
David Mudrák 115d6033fc MDL-68558 admin: Allow to go back to plugins check page on failed deps
Once the admin reaches the Plugin dependencies check with a failed
plugin dependency, the "Continue" button should take him/her to the
previous page where the dependency can be sorted out, or the plugin
installation cancelled. Also the "Cancel this installation" should work
on this page, too.

None of this was happening correctly because the page with failed
dependencies is loaded with "confirmplugincheck" set to 1 as a result
of confirming the previous step. We must explicitly override it back to
0 to navigate the user back to the previous step.
2020-07-23 17:02:31 +02:00
Bas Brands 9ffeab1ad1 MDL-67831 core_message: use space available for message index page
- the prevents the message reply box from being out of view when
a user has many conversations.
2020-07-23 11:34:44 +02:00
AMOS bot 7bad9a9f15 Automatically generated installer lang files 2020-07-23 00:07:49 +00:00
Victor Deniz Falcon 5a003a1da9 Merge branch 'MDL-65819-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-07-22 19:00:14 +01:00
Ferran Recio 9e96129104 MDL-55299 mod_feedback: fix quoted values donwload 2020-07-22 19:23:46 +02:00
Paul Holden 5068d59b13 MDL-69311 dataformat: correct license docblock.
When this class was implemented in 8844cb82, it incorrectly set the
license to Moodle Workplace.
2020-07-22 10:44:38 +01:00
Andrew Nicols bf9c4ab68a MDL-69138 behat: Update session->visit() to use visit step 2020-07-22 16:46:51 +08:00
Andrew Nicols 44022305cc MDL-69138 behat: Add "I visit :localurl" step 2020-07-22 16:46:51 +08:00
Jun Pataleta 0595cfb07d Merge branch 'MDL-52052-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-22 13:47:06 +08:00
Jun Pataleta c8098c7a80 Merge branch 'MDL-68178-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-22 12:58:58 +08:00
Eloy Lafuente (stronk7) 2e71c132fe Merge branch 'MDL-69160-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-21 23:29:36 +02:00
Bas Brands 7c3522f902 MDL-69111 mod_forum: forum grading on small viewports
- changes to make the forum grading UI accessible in small
viewports to meet criterion 1.4.10 Reflow.
2020-07-21 17:43:03 +02:00
David Mudrák 4dcb3165e7 MDL-68647 forum: Add index over posts privatereplyto field
This is to further improve the performance of searching of posts related
to the given user. Once both userid and privatereplyto are indexed, the
query planner can use the merged index to search for posts records.
2020-07-21 11:51:20 +02:00
David Mudrák 4fbe8bec4a MDL-68647 forum: Improve the SQL performance in the privacy provider
The idea here is to replace the existing LEFT JOINs and
OR / IS NOT NULL conditions with INNER JOINs and ANDs. So we gather the
discussions data from all three areas in individual queries, make their
UNION. The GROUP BY was present before and maybe it is not even needed
any more (due to how UNION works) but it should not hurt to keep it.

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

Not directly related to the issue, but noticed while working on it.
2020-07-21 11:48:35 +02:00
Adrian Greeve 592b8980aa Merge branch 'MDL-67657-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-21 14:48:10 +08:00
Ferran Recio 1e63a97698 MDL-68423 message: avoid self-xss when send a message 2020-07-20 19:52:58 +02:00
Eloy Lafuente (stronk7) 9d41810bed Merge branch 'm39_MDL-67440' of https://github.com/danmarsden/moodle into MOODLE_39_STABLE 2020-07-20 17:08:21 +02:00
Leon Stringer 8cdebcf4e0 MDL-60501 themes: Fix closing <h4> in template
In site admin pages (/admin/search.php) <h4> elements were generated
with an incorrect second opening <h4> instead of a closing </h4>.
2020-07-20 15:48:50 +01:00
Bas Brands 9744e6e8cb MDL-66670 theme_boost: list bullet styling
Ensure lists with bullets are not cut off
2020-07-20 14:49:08 +02:00
Jake Dallimore f4d6bd1188 MDL-69319 mod_lti: style and docs changes in external tests 2020-07-20 15:00:25 +08:00
Jake Dallimore d8c8c75ec4 MDL-69319 mod_lti: replace try/catch with expectException in ext tests 2020-07-20 15:00:25 +08:00
Jake Dallimore 9eaaa8997b MDL-69319 mod_lti: remove unused vars from externallib_test 2020-07-20 15:00:24 +08:00
Jake Dallimore ef2a7d7302 MDL-69319 mod_lti: move test data generation out of common setup 2020-07-20 15:00:24 +08:00
Jake Dallimore b660b92b3f MDL-69319 mod_lti: call clean_returnvalue in external tests 2020-07-20 15:00:24 +08:00
Mihail Geshoski 87ae4833c4 MDL-68178 auth: CSRF protection for the resend confirmation email form
Credit to Chandra Kishor.
2020-07-20 12:36:29 +08:00
Adrian Greeve 4f9d34da81 Merge branch 'MDL-69113_39' of https://github.com/jonof/moodle into MOODLE_39_STABLE 2020-07-20 10:37:03 +08:00
Mihail Geshoski 13ad9d1f5b MDL-52052 gradeimport_csv: Do not skip rows with blank user fields 2020-07-20 08:55:05 +08:00
Eloy Lafuente (stronk7) 8cf328dc54 Merge branch 'MDL-69278-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-18 11:56:01 +02:00
Paul Holden af1f371aa7 MDL-65819 message: send contact requests using recipient language. 2020-07-17 13:33:20 +01:00
Sara Arjona 3e78b603a5 weekly release 3.9.1+ 2020-07-16 21:28:34 +02:00
Andrew Nicols 50da793d5b MDL-67657 behat: Open course with editing using URL
This is a huge performance improvement for behat.

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

This can take a substantial period.

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

There is not loss in testing functionality because the actual testing of
the Turn editing functionality is tested in other places sufficiently.
2020-07-16 11:06:43 +08:00
Andrew Nicols 4affbe94be MDL-67657 behat: Convert existing uses of executeScript 2020-07-16 11:06:31 +08:00
Andrew Nicols d18eacbd35 MDL-67657 behat: Add wrapper for JS execution 2020-07-16 11:05:32 +08:00
Jun Pataleta 3de3755281 Merge branch 'MDL-69215-39-2' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-16 09:42:52 +08:00
Andrew Nicols 04a1611139 MDL-69278 behat: Correct variable name 2020-07-16 08:29:57 +08:00
Andrew Nicols 0b5889d299 MDL-69278 behat: Mark tests as failed when unable to start Session 2020-07-16 08:29:57 +08:00
Andrew Nicols aa6bf0f367 MDL-69215 output: Correct use of icon_system::instance 2020-07-16 07:30:32 +08:00
Andrew Nicols 7164e1626e MDL-69215 output: Correct font awesome for themes 2020-07-16 07:30:32 +08:00
Eloy Lafuente (stronk7) a869415180 Merge branch 'MDL-69214-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-07-16 00:01:19 +02:00
Eloy Lafuente (stronk7) b39f2de8ad Merge branch 'MDL-69165-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-07-15 23:47:24 +02:00
Charles Fulton b02b1f3ea9 MDL-69074 admin: ensure consistent default for getremoteaddrconf 2020-07-15 19:05:52 +02:00
Sara Arjona 72ad5d94ea Merge branch 'MDL-68605_39' of https://github.com/t-schroeder/moodle into MOODLE_39_STABLE 2020-07-15 18:52:46 +02:00
Sara Arjona 1c2358de43 Merge branch 'MDL-68210-39' of https://github.com/snake/moodle into MOODLE_39_STABLE 2020-07-15 18:19:44 +02:00
Shamim Rezaie ba56dfb574 MDL-66707 mod_forum: do not blindly mark discussion replies as read 2020-07-15 22:27:10 +10:00
Sara Arjona da48e72353 Merge branch 'MDL-67671_39_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_39_STABLE 2020-07-15 14:11:46 +02:00
Sara Arjona 3c5757b0e2 Merge branch 'MDL-57678-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-07-15 12:56:20 +02:00
Jun Pataleta e1a310bde7 MDL-57678 core_course: Remove padding of nbsp's on category names
Padding nested course categories by space to make them render in a tree
structure does not really make a lot of sense as they are already being
rendered as full paths. It's simpler to show them without the
indentation.
2020-07-15 18:27:02 +08:00
Sara Arjona a040f29f03 Merge branch 'MDL-69068-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-15 12:20:30 +02:00
Andrew Nicols 3f3262c76e MDL-69068 behat: Allow singular, pivotted data generators 2020-07-15 15:27:31 +08:00
Andrew Nicols 5018c4e4db MDL-69068 behat: New step to support singular generators 2020-07-15 15:27:31 +08:00
Jake Dallimore 6e5ae126af Merge branch 'MDL-69206-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-15 10:29:28 +08:00
Sara Arjona a0b8d8c0ff Merge branch 'MDL-68715-39' of https://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-07-14 14:31:55 +02:00
Shamim Rezaie 1636ee5980 MDL-68444 calendar: Improve how screenreaders say week titles
Also removed the scope attribute from the mini-calendar table
because according to https://www.w3.org/TR/WCAG20-TECHS/H63.html
it was not needed:
  Note 1: For simple tables that have the headers in the first row
  or column then it is sufficient to simply use the TH elements without
  scope.
2020-07-14 22:12:49 +10:00
Shamim Rezaie a092131b73 MDL-68444 calendar: Improve how screenreaders read day titles
Screenreaders now know if each day has any event or not
2020-07-14 22:12:49 +10:00
Paul Holden b4a73ff47f MDL-68715 completion: fix form default value for course prerequisites.
Adds filtering on the completion criteria form to ensure we are only
selecting actual course instances of this type. Prior to this change
we would also get NULL values from unrelated criteria types.
2020-07-14 12:45:58 +01:00
Sara Arjona 73c4f6c2a5 Merge branch 'MDL-69228-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-14 12:41:23 +02:00
Mihail Geshoski d8a886d75a MDL-69206 course: Tidy up behat test to avoid potential failures 2020-07-14 12:11:50 +08:00
Mihail Geshoski 480f26720d MDL-69206 course: Tidy up unit test to avoid potential failures 2020-07-14 12:11:50 +08:00
Sara Arjona 333d17b8e1 Merge branch 'MDL-69115-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-07-13 14:24:15 +02:00
Andrew Nicols f78caa59d2 MDL-69160 workshop: Ensure steps are chained 2020-07-13 14:22:32 +08:00
Andrew Nicols 1f09dea479 MDL-69160 behat: Add form field setter step 2020-07-13 14:22:31 +08:00
Eloy Lafuente (stronk7) 8e619076cb Moodle release 3.9.1 2020-07-12 12:13:02 +02:00
Leon Stringer d80e9d463d MDL-69252 templates: Invalid HTML
Invalid HTML generated when the page count exceeded the maximum number
of page links to display: <span>...</a>.  Also added example context.
2020-07-11 12:52:28 +01:00
AMOS bot 6a17f29147 Automatically generated installer lang files 2020-07-10 19:52:47 +00:00
Eloy Lafuente (stronk7) cafc042bf6 weekly release 3.9+ 2020-07-10 20:22:25 +02:00
Eloy Lafuente (stronk7) d2e303436b Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-10 20:22:18 +02:00
Jake Dallimore fb0d5acf4c Merge branch 'MDL-69232-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-10 15:12:29 +08:00
Andrew Nicols 376d34142f MDL-69232 behat: Simplify hooks
The behat hooks were needlessly complicated which made them much harder
to read, and understand, leading to bugs during development.

These have been significantly simplified to favour clarity over
overloading.
2020-07-10 08:40:30 +08:00
Andrew Nicols 8eb7f7e366 MDL-69232 behat: Make selenium start more fault tolerant
The session was previously only started once, but has now been moved to
restart between each test. Because of this the `$session->start()` is
now called more frequently which exposes a pre-existing issue whereby
Selenium will periodically fail to start.

When the session was only started at the beginning of the test, and at
occasional other times, it made sense to always stop the test runner
because it signified an issue with obtaining the session at all.

Since the session is restarted more frequently, and now between every
test, it no longer makes sense to do this. The test should only be
_stopped_ if the first attempt to obtain the Session fails. Once a
Session has been retrieved at least once it no longer makes sense to
assume that the failure was a configuration failure, but a connection
failure. Therefore subsequent tests should be attempted.
2020-07-10 08:40:29 +08:00
Mark Johnson 762e8afa6f MDL-67671 backup: Fix modname display on backup form 2020-07-09 10:11:52 +01:00
Jake Dallimore c3018e9ee7 Merge branch 'MDL-69135-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-09 10:38:21 +08:00
Michael Hawkins 996c94fd08 MDL-68426 theme: Set a limit on paths length in yui_combo
The maximum paths length is now consistent with the YUI loader.
This fix also removes any duplicate paths, so each file is only ever
fetched once.
2020-07-09 10:23:44 +08:00
Andrew Nicols fd7c3c4834 MDL-69232 behat: Add debugging information to Selenium fails 2020-07-09 09:45:32 +08:00
Andrew Nicols c3b7f2f974 MDL-69232 behat: Move suite tests to BeforeSuite hook 2020-07-09 09:45:32 +08:00
Eloy Lafuente (stronk7) 8589fbda8c Merge branch 'MDL-69134-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-08 20:53:22 +02:00
Jake Dallimore f1a681c983 Merge branch 'MDL-69104-39' of https://github.com/HuongNV13/moodle into MOODLE_39_STABLE 2020-07-08 13:07:01 +08:00
Huong Nguyen a17188f51c MDL-69165 Questions: Incorrect id used in init_submit_button function 2020-07-08 11:47:24 +07:00
Andrew Nicols 8a66849a57 Merge branch 'MDL-68784-39' of https://github.com/Peterburnett/moodle into MOODLE_39_STABLE 2020-07-08 12:37:27 +08:00
Andrew Nicols 20318b8b7d Merge branch 'm39_MDL-66322_Travis_Run_Using_Docker_ExtTests-v2' of https://github.com/scara/moodle into MOODLE_39_STABLE 2020-07-08 12:20:52 +08:00
Peter Burnett d84d6f57a3 MDL-68784: Updated variable for graph report 2020-07-08 14:06:23 +10:00
Andrew Nicols 619e11c07a MDL-69228 tool_mobile: Hide dependant settings 2020-07-08 11:44:31 +08:00
Juan Leyva 01ec0ee85b MDL-69031 tool_mobile: Add missing features that can be disabled in 3.9 2020-07-08 09:36:44 +08:00
Andrew Nicols 91b23a2caa Merge branch 'MDL-60494-stray_img_end-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2020-07-08 09:24:05 +08:00
Andrew Nicols 053a433d74 MDL-69134 competencies: Behat fails randomly opening dialogues 2020-07-08 09:21:51 +08:00
Jake Dallimore 3725a41b39 MDL-68210 mod_lesson: fix random failure in override behat test 2020-07-08 09:07:06 +08:00
Jake Dallimore fe5ca8e768 MDL-68210 overrides: allow copy and delete of inactive overrides
This brings lesson and assign in line with the expected behaviour
already implemented in quiz. When an override is inactive, all controls
are shown.
2020-07-08 09:06:58 +08:00
Marina Glancy b1a2e67326 MDL-69109 theme: try to load icons from the current theme 2020-07-08 08:40:52 +08:00
Marina Glancy 40553ed459 MDL-69109 core: use different cache keys for FA icon maps 2020-07-08 08:40:51 +08:00
Matt Clarkson ae9e1f1888 MDL-67440 analytics: optimse delete's in clean up task. 2020-07-08 11:18:20 +12:00
Matteo Scaramuccia 9127c17778 MDL-66322 travis: Configure a local copy of 'exttests' 2020-07-07 21:34:06 +02:00
Andrew Nicols 8f28fbee11 MDL-69086 theme_boost: Improve pendingJs checks for bootstrap
Where an element, like an `alert`, is closed it is removed from the DOM
before the event fires (this is a correct behaviour).

This means that the final event confirming that the action happened
(i.e. close => closed) fires, but does not bubble up the DOM to the
document.body.

This change moves the end event listener to only be added after a start
event has been fired, and to attach directly to the HTMLElement where it
will be fired. This means that the Event handler will still be called,
even though it has been removed from the DOM, because it does not need
to bubble up to the body.
2020-07-07 20:01:02 +02:00
Eloy Lafuente (stronk7) be7bda671e Merge branch 'm39_MDL-68588_Hide_Backuptempdir_From_Message_And_Debuginfo' of https://github.com/scara/moodle into MOODLE_39_STABLE 2020-07-07 19:10:41 +02:00
Eloy Lafuente (stronk7) c58101cde3 Merge branch 'MDL-68784-39' of https://github.com/Peterburnett/moodle into MOODLE_39_STABLE 2020-07-07 18:52:27 +02:00
Paul Holden 4a16804df7 MDL-69214 user: correct participant table forced group SQL. 2020-07-07 14:37:23 +01:00
Tim Schroeder ff92024ec2 MDL-68605 mod_assign: return grp submissns from ws
Co-authored-by: Septatrix <24257556+Septatrix@users.noreply.github.com>
2020-07-07 12:55:54 +02:00
Víctor Déniz Falcón 6e5b0b5c20 MDL-69093 enrol_manual: added check for allowed roles a user can assign 2020-07-07 08:33:08 +02:00
Andrew Nicols c201456f20 Merge branch 'MDL-69106-39' of git.in.moodle.com:cameron/moodle into MOODLE_39_STABLE 2020-07-07 14:15:54 +08:00
Eloy Lafuente (stronk7) 02b3d5aacf Merge branch 'MDL-60827-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-07-07 00:17:26 +02:00
Andrew Nicols dde1ead9fe MDL-69110 table: Remove commented code 2020-07-06 13:26:28 +08:00
Andrew Nicols 3915147b9b Merge branch 'MDL-69110-39' of git://github.com/junpataleta/moodle into MOODLE_39_STABLE 2020-07-06 13:26:00 +08:00
Andrew Nicols 55c7fe15a0 Merge branch 'MDL-69158-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-07-06 12:12:12 +08:00
Jake Dallimore 82dba4d510 Merge branch 'MDL-69136-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-06 10:44:34 +08:00
Mihail Geshoski 9ecff3766a MDL-60827 oauth2: Consider requireconfirmation setting on login 2020-07-06 10:05:16 +08:00
Michael Hawkins 4fb85c9c9f MDL-69128 admin: Convert HTML entities when populating tasklogs filter 2020-07-06 10:04:17 +08:00
AMOS bot 6ea5922916 Automatically generated installer lang files 2020-07-06 00:08:30 +00:00
Leon Stringer 287e8f16e6 MDL-60494 mod_lti: Invalid </img>, example context
<img> was followed by an invalid </img>.  Also added example context for
template so it passes CI checks.
2020-07-05 15:57:42 +01:00
Matteo Scaramuccia 846422a90f MDL-68588 Backup: Hide ->backuptempdir in exception info 2020-07-03 21:18:30 +02:00
Jun Pataleta ea6621e00e MDL-69110 core: Unset the correct sort data element 2020-07-04 00:50:21 +08:00
Eloy Lafuente (stronk7) 44ffa8a801 weekly release 3.9+ 2020-07-03 18:41:38 +02:00
Eloy Lafuente (stronk7) a1d5911159 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-07-03 18:41:32 +02:00
Jake Dallimore c38e38d6b4 Merge branch 'MDL-69130-39-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-07-02 12:08:37 +08:00
Jake Dallimore f5b5f97f56 Merge branch 'MDL-69149-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-02 11:57:18 +08:00
Jake Dallimore 5528302282 Merge branch 'MDL-69122-39' of git://github.com/bmbrands/moodle into MOODLE_39_STABLE 2020-07-02 11:49:19 +08:00
AMOS bot 995f0a3a58 Automatically generated installer lang files 2020-07-02 00:08:08 +00:00
Eloy Lafuente (stronk7) 894ebe38a2 Merge branch 'MDL-69072-39' of git://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-07-01 23:23:45 +02:00
Andrew Nicols 0609febf16 MDL-69072 behat: Remove restart_browser_after feature
This is no longer required as the Mink session is restarted after every
test regardless.
2020-07-01 23:23:39 +02:00
Luca Bösch 1d6c1cc0ae MDL-68584 core_question: flexbox compatible separator for question types
* the br tag does not work well in a flexbox context, a 100% with div
works in both classic and boost.
2020-07-01 16:42:50 +08:00
Jun Pataleta 50b076c4af MDL-69115 course: More course management accessibility fixes
* Added aria-label for category single select element when on Courses
view mode.
* Fix correct labelling of custom control checkboxes. Instead of adding
aria-label in the label element, add an sr-only span within the label.
* Remove inappropriate 'group' role for the list of courses.
The list of courses is not being rendered as a tree structure
so adding a 'group' role to the list of courses is not really
necessary.
* Add aria-label for the search courses field.
* Add legend for the search courses fieldset.
* Use the primary colour for the category selection highlight instead
of the info colour.
* Changed the labels for the up/down icons using moveup/movedown
lang strings.
2020-07-01 14:45:26 +08:00
Paul Holden d783f12861 MDL-69150 message_airnotifier: correct apps portal link. 2020-07-01 08:39:47 +08:00
Paul Holden f324c2d16c MDL-69151 message_airnotifier: start output before accesskey request.
This allows debugging generated by the request to be shown on the
page.
2020-07-01 08:32:34 +08:00
Huong Nguyen 5486975097 MDL-69104 Questions: Drag and drop question family don't work with iOS
- Drag and Drop marker question type
 - Drag and Drop onto image question type
 - Drag and Drop into text question type
2020-06-30 14:48:47 +07:00
Cameron Ball d4b6b26f4f MDL-69106 assignfeedback_editpdf: Keep files in conversion queue
In some circumstances, a submission waiting to be converted needs to persist
in the conversion queue so that it can be polled on subsequent cron runs.
2020-06-30 13:56:57 +08:00
Peter Burnett 996dd0b0b9 MDL-68784 scorm: Removed limit on allowed scorm users in report 2020-06-30 15:17:51 +10:00
Luca Bösch b44588aaba MDL-69158 block_blog_menu: format search form. 2020-06-29 11:13:55 +02:00
Andrew Nicols 95fbf4d8e5 MDL-69136 behat: Improve reliability of navigation steps 2020-06-29 11:36:36 +08:00
Andrew Nicols 6f78024717 MDL-69136 behat: Support find on a NodeElement 2020-06-29 11:36:30 +08:00
Andrew Nicols 7b2e257157 MDL-69072 mod_scorm: Stop mink reset after tests
This is now done for all scenarios. It is no longer necessary to do so
specifically for mod_scorm.
2020-06-26 21:17:23 +08:00
Andrew Nicols bb344d07e7 MDL-69072 behat: Relaunch browser session between scenarios 2020-06-26 21:17:22 +08:00
Andrew Nicols 959c2cb84e MDL-69149 core_grade: Correct xpath attribute selector 2020-06-26 19:59:56 +08:00
Andrew Nicols ee7b438f61 MDL-69135 core_calendar: PendingJS for event filtering 2020-06-26 07:58:36 +08:00
Helen Foster dc0241306b MDL-69130 lang: Import fixed English strings (en_fix)
Significant string change:

- presentationoraltrequired,atto_image - wording changed to mention
  'decorative only' checkbox
2020-06-25 21:52:35 +02:00
Eloy Lafuente (stronk7) 89ce4db476 weekly release 3.9+ 2020-06-25 18:06:36 +02:00
Eloy Lafuente (stronk7) 55a1405a84 Merge branch 'install_39_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_39_STABLE 2020-06-25 18:06:31 +02:00
Jonathon Fowler fb21fc9274 MDL-69113 assign: save grader app workflow/marker filters correctly 2020-06-25 14:40:07 +10:00
Bas Brands 57b920b8b7 MDL-69122 report_competency: fix clearfix
- a misplaced clearfix caused part of the recontrols to be
inaccessible
2020-06-24 09:15:28 +02:00
Nicolas Martignoni bae07c1bfb MDL-68992 Privacy: Update default minimal digital age of consent
Updating default minimal digital age of consent according to current legislation,
that was updated for several countries since 2018.
2020-06-24 10:14:53 +08:00
Peter Dias 4f7016f2da MDL-69065 course: Provide the id for the sr param
* Pass the section return id to the activity chooser
* Additional behat test to cover the case
2020-06-24 10:14:51 +08:00
Andrew Nicols 7af8441403 MDL-66568 behat: Reset theme CSS between scenarios 2020-06-23 18:03:52 +02:00
Andrew Nicols 7ba95339a6 MDL-66568 behat: Support building of themes for behat 2020-06-23 18:03:52 +02:00
Andrew Nicols b6c37f2926 MDL-66568 core_output: Return built theme CSS 2020-06-23 18:03:52 +02:00
AMOS bot b8408c3582 Automatically generated installer lang files 2020-06-23 12:25:17 +00:00
Bas Brands fb625069cf MDL-69021 theme_boost: improve link styles in alerts
- provide default styles for links in alerts if the .alert-link
css class is omitted.
2020-06-23 11:31:23 +08:00
hiendinh d4297993a4 MDL-68841 Modal dialogs: Wrong behavior of popup 2020-06-23 09:45:44 +08:00
Víctor Déniz Falcón 2104324ded Merge branch 'MDL-69099-39-disabledtasks' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2020-06-22 17:20:10 +01:00
David Mudrák 153b2cb484 MDL-69099 tasks: Do not mark the non-enabled plugin's task as disabled
The `core\plugininfo\base::is_enabled()` uses three-state logic for its
return value. It can return null as a valid value as per its
documentation. We need to test for the explicit false value in this
case.

To make the attached Behat test able to identify the table, the caption
is added. It seems to be helpful for all users so I leave it displayed
without using the accesshide mechanism.
2020-06-22 10:10:15 +02:00
Jake Dallimore c72adaa749 Merge branch 'MDL-69047-39' of git://github.com/aanabit/moodle into MOODLE_39_STABLE 2020-06-22 12:41:28 +08:00
Adrian Greeve 3c2ed1533c Merge branch 'MDL-69077_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-06-22 10:41:47 +08:00
Jun Pataleta b9518bf811 MDL-69008 core: Fix accessibility issues in paged content templates
* Added menuitem role for the "Show x per page" menu.
* Added appropriate aria-labels for the links in the paging bar.
2020-06-19 16:49:03 +02:00
Amaia Anabitarte 4f0f1bd84f MDL-69047 core_contentbank: Hard coding status messages 2020-06-18 18:07:41 +02:00
Sara Arjona e2ef786003 weekly release 3.9+ 2020-06-18 14:14:00 +02:00
Russell Boyatt 5b134b5de5 MDL-66899 quiz: Adding test for regrading quiz event. 2020-06-18 04:52:47 +01:00
Russell Boyatt 62c4da281a MDL-66899 quiz: Log a regrading event when quiz attempt is regraded. 2020-06-18 04:52:47 +01:00
Víctor Déniz Falcón 4c27f858b9 Merge branch 'MDL-69060-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-06-17 23:44:40 +01:00
Tim Hunt 6ced5c26d0 MDL-69077 questions: question tag capabilties are relevant 2020-06-17 13:07:30 +01:00
hiendinh ccd504115d MDL-68890 progressbar: prevent display exist file's progress bar 2020-06-17 19:54:06 +08:00
Jake Dallimore 647e5d8021 Merge branch 'MDL-68215-39' of git://github.com/lucaboesch/moodle into MOODLE_39_STABLE 2020-06-17 14:58:35 +08:00
Tim Hunt 6a7042d980 MDL-68971 webservice: errors should give enough info to find the problem 2020-06-17 11:36:46 +08:00
Jun Pataleta 7532b032bb Merge branch 'MDL-67294-39' of git://github.com/mihailges/moodle into MOODLE_39_STABLE 2020-06-17 10:36:14 +08:00
Jun Pataleta b5c1d17da5 MDL-69049 tool_dataprivacy: Add possibly missing comment format columns
The earlier CONTRIB plugin versions of the tool (<33.2.0, <34.2.0) were
missing the following columns in the data requests table:
* commentsformat
* dpocommentformat
And the upgrade scripts for the merged tool failed in
Moodle 3.3.8+/3.3.0+ failed to add these columns.
So a site which uses the CONTRIB plugin and eventually upgrading to 3.9
will encounter an error during upgrade because of the missing
dpocommentformat column.
2020-06-16 17:59:03 +01:00
Mihail Geshoski 56a7d91066 MDL-67294 assignsubmission_file: Make sure record exists before updating 2020-06-17 00:55:46 +08:00
Tim Hunt 93d636a95b MDL-68436 atto_recordrtc: only works once per page 2020-06-16 14:40:35 +08:00
Víctor Déniz Falcón 7ca771e4ac Merge branch 'MDL-69044_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2020-06-15 17:36:32 +01:00
Luca Bösch 6e7e7e1241 MDL-68215 block_activity_result: Format elements more nicely. 2020-06-15 15:26:13 +02:00
Luca Bösch 8b43f32f8c MDL-69060 core_contentbank: fix contenbank typos. 2020-06-15 13:37:00 +02:00
Eloy Lafuente (stronk7) a30eb7d16c MDL-69044 upgrade: add 3.9.0 separation line to all upgrade scripts 2020-06-14 13:09:13 +02:00
3520 changed files with 70069 additions and 33682 deletions
+1 -1
View File
@@ -89,4 +89,4 @@ theme/boost/amd/src/bootstrap/toast.js
theme/boost/amd/src/bootstrap/tooltip.js
theme/boost/amd/src/bootstrap/util.js
theme/boost/amd/src/tether.js
theme/boost/scss/fontawesome/
theme/boost/scss/fontawesome/
+3 -2
View File
@@ -211,7 +211,7 @@
},
// 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',
@@ -242,7 +242,8 @@
},
parserOptions: {
'ecmaVersion': 9,
'sourceType': 'module'
'sourceType': 'module',
'requireConfigFile': false,
}
}
]
+71
View File
@@ -0,0 +1,71 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Template configuraton file for github actions CI/CD.
*
* @package core
* @copyright 2020 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com}
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This cannot be used out from a github actions workflow, so just exit.
getenv('GITHUB_WORKFLOW') || die; // phpcs:ignore moodle.Files.MoodleInternal.MoodleInternalGlobalState
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('dbtype');
$CFG->dblibrary = 'native';
$CFG->dbhost = '127.0.0.1';
$CFG->dbname = 'test';
$CFG->dbuser = 'test';
$CFG->dbpass = 'test';
$CFG->prefix = 'm_';
$CFG->dboptions = ['dbcollation' => 'utf8mb4_bin'];
$host = 'localhost';
$CFG->wwwroot = "http://{$host}";
$CFG->dataroot = realpath(dirname(__DIR__)) . '/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
// Debug options - possible to be controlled by flag in future.
$CFG->debug = (E_ALL | E_STRICT); // DEBUG_DEVELOPER.
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
$CFG->debugpageinfo = 1;
$CFG->allowthemechangeonurl = 1;
$CFG->passwordpolicy = 0;
$CFG->cronclionly = 0;
$CFG->pathtophp = getenv('pathtophp');
$CFG->phpunit_dataroot = realpath(dirname(__DIR__)) . '/phpunitdata';
$CFG->phpunit_prefix = 't_';
define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://localhost:8080');
define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://localhost:8080');
define('TEST_SESSION_REDIS_HOST', 'localhost');
define('TEST_CACHESTORE_REDIS_TESTSERVERS', 'localhost');
// TODO: add others (solr, mongodb, memcached, ldap...).
// Too much for now: define('PHPUNIT_LONGTEST', true); // Only leaves a few tests out and they are run later by CI.
require_once(__DIR__ . '/lib/setup.php');
+110
View File
@@ -0,0 +1,110 @@
name: Core
on:
push:
branches-ignore:
- master
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
env:
php: 7.4
jobs:
Grunt:
runs-on: ubuntu-22.04
steps:
- name: Checking out code
uses: actions/checkout@v3
- name: Configuring node & npm
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Installing node stuff
run: npm install
- name: Running grunt
run: npx grunt
- name: Looking for uncommitted changes
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
run: |
git add .
git reset -- npm-shrinkwrap.json
git diff --cached --exit-code
PHPUnit:
runs-on: ${{ matrix.os }}
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
php: 7.2
db: mysqli
- os: ubuntu-22.04
php: 7.4
db: pgsql
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: johanmeiring/mysql-action@tmpfs-patch
with:
collation server: utf8mb4_bin
mysql version: 5.7
mysql database: test
mysql user: test
mysql password: test
use tmpfs: true
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 9.6
postgresql db: test
postgresql user: test
postgresql password: test
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v4
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v3
- name: Setting up PHPUnit
env:
dbtype: ${{ matrix.db }}
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
sudo locale-gen en_AU.UTF-8
php admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
run: vendor/bin/phpunit -v
+1
View File
@@ -44,3 +44,4 @@ composer.phar
/lib/yuilib/*/*/*-coverage.js
atlassian-ide-plugin.xml
/node_modules/
moodle-plugin-ci.phar
+1 -1
View File
@@ -1 +1 @@
v14.0.0
lts/gallium
+1 -1
View File
@@ -90,4 +90,4 @@ theme/boost/amd/src/bootstrap/toast.js
theme/boost/amd/src/bootstrap/tooltip.js
theme/boost/amd/src/bootstrap/util.js
theme/boost/amd/src/tether.js
theme/boost/scss/fontawesome/
theme/boost/scss/fontawesome/
+50 -71
View File
@@ -2,44 +2,28 @@
# process (which uses our internal CI system) this file is here for the benefit
# of community developers git clones - see MDL-51458.
# We currently disable Travis notifications entirely until https://github.com/travis-ci/travis-ci/issues/4976
# is fixed.
notifications:
email: false
email:
if: env(MOODLE_EMAIL) != no
language: php
os: linux
dist: xenial
dist: bionic
services:
- mysql
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.4
- 7.2
- docker
addons:
postgresql: "9.6"
env:
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
# start first so that the total run time is not too high.
#
# We only run MySQL on PHP 7.2, so run that first.
# CI Tests should be second-highest in priority as these only take <= 60 seconds to run under normal circumstances.
# Postgres is significantly is pretty reasonable in its run-time.
# Run CI Tests without running PHPUnit.
- DB=none TASK=CITEST
# Run unit tests on Postgres
- DB=pgsql TASK=PHPUNIT
# Perform an upgrade test too.
- DB=pgsql TASK=UPGRADE
branches:
except:
- master
- /MOODLE_[0-9]+_STABLE/
- /^v[0-9]+\.[0-9]+\.[0-9]+.*/
jobs:
# Enable fast finish.
@@ -48,12 +32,35 @@ jobs:
fast_finish: true
include:
# Run mysql only on highest - it's just too slow
- php: 7.4
# First all the lowest php ones (7.2)
- php: 7.2
env: DB=none TASK=CITEST
- php: 7.2
env: DB=none TASK=GRUNT NVM_VERSION='lts/gallium'
- if: env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present
php: 7.2
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all"
php: 7.2
env: DB=mysqli TASK=PHPUNIT
# Then, conditionally, all the highest php ones (7.4)
- if: env(MOODLE_PHP) = "all"
php: 7.4
env: DB=none TASK=CITEST
- if: env(MOODLE_PHP) = "all"
php: 7.4
env: DB=none TASK=GRUNT NVM_VERSION='lts/gallium'
- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present)
php: 7.4
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all")
php: 7.4
env: DB=mysqli TASK=PHPUNIT
# Run grunt/npm install on highest version too ('node' is an alias for the latest node.js version.)
- php: 7.4
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
cache:
directories:
@@ -61,8 +68,9 @@ cache:
- $HOME/.npm
before_install:
- docker run -d -p 127.0.0.1:8080:80 --name exttests moodlehq/moodle-exttests
# Avoid IPv6 default binding as service (causes redis not to start).
sudo service redis-server start --bind 127.0.0.1
- sudo service redis-server start --bind 127.0.0.1
install:
- >
@@ -112,7 +120,7 @@ install:
before_script:
- phpenv config-rm xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
if [ "$TASK" = 'PHPUNIT' ];
then
# Copy generic configuration in place.
cp config-dist.php config.php ;
@@ -169,6 +177,12 @@ before_script:
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
config.php ;
# Enable test external resources
sed -i \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://127.0.0.1:8080');" \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://127.0.0.1:8080');" \
config.php ;
# Redis cache store tests
sed -i \
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
@@ -217,32 +231,6 @@ before_script:
export phpcmd=`which php`;
fi
########################################################################
# Upgrade test
########################################################################
- >
if [ "$TASK" = 'UPGRADE' ];
then
# We need the official upstream.
git remote add upstream https://github.com/moodle/moodle.git;
# Checkout 30 STABLE branch (the first version compatible with PHP 7.x)
git fetch upstream MOODLE_30_STABLE;
git checkout MOODLE_30_STABLE;
# Perform the upgrade
php admin/cli/install_database.php --agree-license --adminpass=Password --adminemail=admin@example.com --fullname="Upgrade test" --shortname=Upgrade;
# Return to the previous commit
git checkout -;
# Perform the upgrade
php admin/cli/upgrade.php --non-interactive --allow-unstable ;
# The local_ci repository can be used to check upgrade savepoints.
git clone https://github.com/moodlehq/moodle-local_ci.git local/ci ;
fi
script:
- >
if [ "$TASK" = 'PHPUNIT' ];
@@ -268,19 +256,10 @@ script:
git diff --cached --exit-code ;
fi
########################################################################
# Upgrade test
########################################################################
after_script:
- >
if [ "$TASK" = 'UPGRADE' ];
if [ "$TASK" = 'PHPUNIT' ];
then
cp local/ci/check_upgrade_savepoints/check_upgrade_savepoints.php ./check_upgrade_savepoints.php
result=`php check_upgrade_savepoints.php`;
# Check if there are problems
count=`echo "$result" | grep -P "ERROR|WARN" | wc -l` ;
if (($count > 0));
then
echo "$result"
exit 1 ;
fi
EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
fi
+125 -48
View File
@@ -285,6 +285,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 +366,66 @@ 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
}]
}
}],
},
},
sass: {
dist: {
@@ -424,7 +500,7 @@ module.exports = function(grunt) {
'*/**/yui/src/*/meta/',
'*/**/build/',
].concat(thirdPartyPaths);
grunt.file.write('.eslintignore', eslintIgnores.join('\n'));
grunt.file.write('.eslintignore', eslintIgnores.join('\n') + '\n');
// Generate .stylelintignore.
const stylelintIgnores = [
@@ -433,7 +509,7 @@ module.exports = function(grunt) {
'theme/boost/style/moodle.css',
'theme/classic/style/moodle.css',
].concat(thirdPartyPaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n'));
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
};
/**
@@ -834,7 +910,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-stylelint');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-rollup');
// Rename the grunt-contrib-watch "watch" task because we're going to wrap it.
grunt.renameTask('watch', 'watch-grunt');
@@ -845,7 +922,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', ['eslint:amd', 'rollup']);
grunt.registerTask('js', ['amd', 'yui']);
// Register CSS tasks.
+1
View File
@@ -0,0 +1 @@
mod/forum/tests/behat/forum_subscriptions_default.feature
+1 -1
View File
@@ -2,7 +2,7 @@ MOODLE TRADEMARKS POLICY
========================
The word "Moodle" is trademarked in many countries around the world. The word
was originally an acronym: Modular Object-Oriented Dynamic Learning
was originally coined as an acronym: Modular Object-Oriented Dynamic Learning
Environment. The trademark is owned by Martin Dougiamas, Founder and Director
of Moodle.
@@ -178,6 +178,7 @@ class filesize extends \admin_setting {
'id' => $this->get_id(),
'name' => $this->get_full_name(),
'value' => $data['v'],
'readonly' => $this->is_readonly(),
'options' => array_map(function($unit, $title) use ($data, $defaultunit) {
return [
'value' => $unit,
+138
View File
@@ -0,0 +1,138 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Fix orphaned calendar events that were broken by MDL-67494.
*
* This script will look for all the calendar events which userids
* where broken by a wrong upgrade step, affecting to Moodle 3.9.5
* and up.
*
* It performs checks to both:
* a) Detect if the site was affected (ran the wrong upgrade step).
* b) Look for orphaned calendar events, categorising them as:
* - standard: site / category / course / group / user events
* - subscription: events created via subscriptions.
* - action: normal action events, created to show common important dates.
* - override: user and group override events, particular, that some activities support.
* - custom: other events, not being any of the above, common or particular.
* By specifying it (--fix) try to recover as many broken events (missing userid) as
* possible. Standard, subscription, action, override events in core are fully supported but
* override or custom events should be fixed by each plugin as far as there isn't any standard
* API (plugin-wise) to launch a rebuild of the calendar events.
*
* @package core
* @copyright 2021 onwards Simey Lameze <simey@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir . "/clilib.php");
require_once($CFG->libdir . '/db/upgradelib.php');
// Supported options.
$long = ['fix' => false, 'help' => false];
$short = ['f' => 'fix', 'h' => 'help'];
// CLI options.
[$options, $unrecognized] = cli_get_params($long, $short);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help = <<<EOT
Fix orphaned calendar events.
This script detects calendar events that have had their
userid lost. By default it will perform various checks
and report them, showing the site status in an easy way.
Also, optionally (--fix), it wil try to recover as many
lost userids as possible from different sources. Note that
this script aims to process well-know events in core,
leaving custom events in 3rd part plugins mostly unmodified
because there isn't any consistent way to regenerate them.
For more details: https://tracker.moodle.org/browse/MDL-71156
Options:
-h, --help Print out this help.
-f, --fix Fix the orphaned calendar events in the DB.
If not specified only check and report problems to STDERR.
Usage:
- Only report: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php
- Report and fix: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php -f
EOT;
cli_writeln($help);
die;
}
// Check various usual pre-requisites.
if (empty($CFG->version)) {
cli_error('Database is not yet installed.');
}
$admin = get_admin();
if (!$admin) {
cli_error('Error: No admin account was found.');
}
if (moodle_needs_upgrading()) {
cli_error('Moodle upgrade pending, script execution suspended.');
}
// Do everything as admin by default.
\core\session\manager::set_user($admin);
// Report current site status.
cli_heading('Checking the site status');
$needsfix = upgrade_calendar_site_status();
// Report current calendar events status.
cli_heading('Checking the calendar events status');
$info = upgrade_calendar_events_status();
$hasbadevents = $info['total']->bad > 0 || $info['total']->bad != $info['other']->bad;
$needsfix = $needsfix || $hasbadevents;
// If, selected, fix as many calendar events as possible.
if ($options['fix']) {
// If the report has told us that the fix was not needed... ask for confirmation!
if (!$needsfix) {
cli_writeln("This site DOES NOT NEED to run the calendar events fix.");
$input = cli_input('Are you completely sure that you want to run the fix? (y/N)', 'N', ['y', 'Y', 'n', 'N']);
if (strtolower($input) != 'y') {
exit(0);
}
cli_writeln("");
}
cli_heading('Fixing as many as possible calendar events');
upgrade_calendar_events_fix_remaining($info);
// Report current (after fix) calendar events status.
cli_heading('Checking the calendar events status (after fix)');
upgrade_calendar_events_status();
} else if ($needsfix) {
// Fix option was not provided but problem events have been found. Notify the user and provide info how to fix these events.
cli_writeln("This site NEEDS to run the calendar events fix!");
cli_writeln("To fix the calendar events, re-run this script with the --fix option.");
}
+100 -90
View File
@@ -215,6 +215,7 @@ define('SITEID', 1);
//Database types
$databases = array('mysqli' => moodle_database::get_driver_instance('mysqli', 'native'),
'auroramysql' => moodle_database::get_driver_instance('auroramysql', 'native'),
'mariadb'=> moodle_database::get_driver_instance('mariadb', 'native'),
'pgsql' => moodle_database::get_driver_instance('pgsql', 'native'),
'oci' => moodle_database::get_driver_instance('oci', 'native'),
@@ -266,6 +267,7 @@ list($options, $unrecognized) = cli_get_params(
);
$interactive = empty($options['non-interactive']);
$skipdatabase = $options['skip-database'];
// set up language
$lang = clean_param($options['lang'], PARAM_SAFEDIR);
@@ -637,96 +639,100 @@ do {
}
} while ($hintdatabase !== '');
// ask for fullname
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
// If --skip-database option is provided, we do not need to ask for site fullname, shortname, adminuser, adminpass, adminemail.
// These fields will be requested during the database install part.
if (!$skipdatabase) {
// Ask for fullname.
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
} else {
$prompt = get_string('clitypevalue', 'admin');
if (empty($options['fullname'])) {
$a = (object)['option' => 'fullname', 'value' => $options['fullname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
} else {
if (empty($options['fullname'])) {
$a = (object)array('option'=>'fullname', 'value'=>$options['fullname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for shortname.
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
// ask for shortname
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
$prompt = get_string('clitypevalue', 'admin');
if (empty($options['shortname'])) {
$a = (object)['option' => 'shortname', 'value' => $options['shortname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
if (empty($options['shortname'])) {
$a = (object)array('option'=>'shortname', 'value'=>$options['shortname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user name
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
// Ask for admin user name.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if ((empty($options['adminuser']) || $options['adminuser'] === 'guest')) {
$a = (object)['option' => 'adminuser', 'value' => $options['adminuser']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for admin user password.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if ((empty($options['adminpass']) or $options['adminpass'] === 'admin')) {
$a = (object)['option' => 'adminpass', 'value' => $options['adminpass']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if (empty($options['adminuser']) or $options['adminuser'] === 'guest') {
$a = (object)array('option'=>'adminuser', 'value'=>$options['adminuser']);
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object)['option' => 'adminemail', 'value' => $options['adminemail']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user password
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if (empty($options['adminpass']) or $options['adminpass'] === 'admin') {
$a = (object)array('option'=>'adminpass', 'value'=>$options['adminpass']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object) array('option' => 'adminemail', 'value' => $options['adminemail']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
// Ask for the upgrade key.
if ($interactive) {
cli_separator();
@@ -745,22 +751,26 @@ if ($options['upgradekey'] !== '') {
$CFG->upgradekey = $options['upgradekey'];
}
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
// The user does not also need to pass agree-license when --skip-database is provided as the user will need to accept
// the license again in the database install part.
if (!$skipdatabase) {
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
}
}
} else {
if (!$options['agree-license'] && !$skipdatabase) {
cli_error(get_string('climustagreelicense', 'install'));
}
}
} else {
if (!$options['agree-license']) {
cli_error(get_string('climustagreelicense', 'install'));
}
}
@@ -809,7 +819,7 @@ if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_error(get_string('pluginschecktodo', 'admin'));
}
if (!$options['skip-database']) {
if (!$skipdatabase) {
install_cli_database($options, $interactive);
// This needs to happen at the end to ensure it occurs after all caches
// have been purged for the last time.
+8 -8
View File
@@ -119,7 +119,7 @@ if (!empty($options['collation'])) {
if ($dbcollation->value !== $collation || $dbcharset->value !== $charset) {
// Try to convert the DB.
echo "Converting database to '$collation' for $CFG->wwwroot:\n";
$sql = "ALTER DATABASE $CFG->dbname DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
$sql = "ALTER DATABASE `$CFG->dbname` DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
try {
$DB->change_database_structure($sql);
} catch (exception $e) {
@@ -146,7 +146,7 @@ if (!empty($options['collation'])) {
} else {
try {
$DB->change_database_structure("ALTER TABLE $table->name CONVERT TO CHARACTER SET $charset COLLATE $collation");
$DB->change_database_structure("ALTER TABLE `$table->name` CONVERT TO CHARACTER SET $charset COLLATE $collation");
echo "CONVERTED\n";
$converted++;
} catch (ddl_exception $e) {
@@ -163,7 +163,7 @@ if (!empty($options['collation'])) {
}
}
$sql = "SHOW FULL COLUMNS FROM $table->name WHERE collation IS NOT NULL";
$sql = "SHOW FULL COLUMNS FROM `$table->name` WHERE collation IS NOT NULL";
$rs2 = $DB->get_recordset_sql($sql);
foreach ($rs2 as $column) {
$column = (object)array_change_key_case((array)$column, CASE_LOWER);
@@ -181,7 +181,7 @@ if (!empty($options['collation'])) {
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
$default = (!is_null($column->default) and $column->default !== '') ? "DEFAULT '$column->default'" : '';
// primary, unique and inc are not supported for texts
$sql = "ALTER TABLE $table->name
$sql = "ALTER TABLE `$table->name`
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
@@ -192,11 +192,11 @@ if (!empty($options['collation'])) {
$default = !is_null($column->default) ? "DEFAULT '$column->default'" : '';
if ($rowformat != '') {
$sql = "ALTER TABLE $table->name $rowformat";
$sql = "ALTER TABLE `$table->name` $rowformat";
$DB->change_database_structure($sql);
}
$sql = "ALTER TABLE $table->name
$sql = "ALTER TABLE `$table->name`
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
@@ -315,8 +315,8 @@ function mysql_set_row_format($tablename, $charset, $collation, $engine) {
if ($rs->row_format == 'Compact' || $rs->row_format == 'Redundant') {
$rowformat = $DB->get_row_format_sql($engine, $collation);
// Try to convert to compressed format and then try updating the collation again.
$DB->change_database_structure("ALTER TABLE $tablename $rowformat");
$DB->change_database_structure("ALTER TABLE $tablename CONVERT TO CHARACTER SET $charset COLLATE $collation");
$DB->change_database_structure("ALTER TABLE `$tablename` $rowformat");
$DB->change_database_structure("ALTER TABLE `$tablename` CONVERT TO CHARACTER SET $charset COLLATE $collation");
} else {
// Row format may not be the problem. Can not diagnose problem. Send fail reply.
return false;
+2 -2
View File
@@ -158,7 +158,7 @@ if (!empty($options['info'])) {
}
foreach ($fixtables as $table) {
$DB->change_database_structure("ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed");
$DB->change_database_structure("ALTER TABLE `{$prefix}$table` ROW_FORMAT=Compressed");
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT) . " ... Compressed\n";
}
@@ -189,7 +189,7 @@ if (!empty($options['info'])) {
echo "SET GLOBAL innodb_file_per_table=1;\n";
echo "SET GLOBAL innodb_file_format=Barracuda;\n";
foreach ($fixtables as $table) {
echo "ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed;\n";
echo "ALTER TABLE `{$prefix}$table` ROW_FORMAT=Compressed;\n";
}
echo "\n";
exit(0);
+10 -2
View File
@@ -34,6 +34,7 @@ $help = "Command line tool to uninstall plugins.
Options:
-h --help Print this help.
--show-all Displays a list of all installed plugins.
--show-contrib Displays a list of all third-party installed plugins.
--show-missing Displays a list of plugins missing from disk.
--purge-missing Uninstall all missing from disk plugins.
--plugins=<plugin name> A comma separated list of plugins to be uninstalled. E.g. mod_assign,mod_forum
@@ -44,6 +45,9 @@ Examples:
# php uninstall_plugins.php --show-all
Prints tab-separated list of all installed plugins.
# php uninstall_plugins.php --show-contrib
Prints tab-separated list of all third-party installed plugins.
# php uninstall_plugins.php --show-missing
Prints tab-separated list of all missing from disk plugins.
@@ -63,6 +67,7 @@ Examples:
list($options, $unrecognised) = cli_get_params([
'help' => false,
'show-all' => false,
'show-contrib' => false,
'show-missing' => false,
'purge-missing' => false,
'plugins' => false,
@@ -84,12 +89,15 @@ if ($options['help']) {
$pluginman = core_plugin_manager::instance();
$plugininfo = $pluginman->get_plugins();
if ($options['show-all'] || $options['show-missing']) {
if ($options['show-all'] || $options['show-missing'] || $options['show-contrib']) {
foreach ($plugininfo as $type => $plugins) {
foreach ($plugins as $name => $plugin) {
if ($options['show-contrib'] && $plugin->is_standard()) {
continue;
}
$pluginstring = $plugin->component . "\t" . $plugin->displayname;
if ($options['show-all']) {
if ($options['show-all'] || $options['show-contrib']) {
cli_writeln($pluginstring);
} else {
if ($plugin->get_status() === core_plugin_manager::PLUGIN_STATUS_MISSING) {
+759
View File
@@ -2815,6 +2815,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2996,6 +2997,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -3161,6 +3163,763 @@
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_igbinary322_version" level="optional">
<FEEDBACK>
<ON_CHECK message="igbinary322buggyversion" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.10" requires="3.5">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="9.6" />
<VENDOR name="mssql" version="11.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_igbinary322_version" level="optional">
<FEEDBACK>
<ON_CHECK message="igbinary322buggyversion" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.11" requires="3.6">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="9.6" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="optional"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.0" requires="3.6">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="10" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="optional"/>
<PHP_EXTENSION name="exif" level="optional"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
<FEEDBACK>
<ON_CHECK message="iscustomadminwarnings" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.1" requires="3.9">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.4" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="12" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="7.4.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="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_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+4 -2
View File
@@ -509,7 +509,8 @@ if (!$cache and $version > $CFG->version) { // upgrade
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed, $CFG->branch)) {
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
die();
}
unset($failed);
@@ -701,7 +702,8 @@ if (!$cache and moodle_needs_upgrading()) {
$failed = array();
if (!$pluginman->all_plugins_ok($version, $failed, $CFG->branch)) {
$output = $PAGE->get_renderer('core', 'admin');
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
die();
}
unset($failed);
+4 -2
View File
@@ -49,6 +49,7 @@
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
if (!empty($show) and confirm_sesskey()) {
@@ -66,6 +67,7 @@
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
echo $OUTPUT->header();
@@ -121,8 +123,8 @@
$count = -1;
}
if ($count>0) {
$countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
"&amp;sesskey=".sesskey()."\" title=\"$strshowmodulecourse\">$count</a>";
$countlink = $OUTPUT->action_link(new moodle_url('/course/search.php', ['modulelist' => $module->name]),
$count, null, ['title' => $strshowmodulecourse]);
} else if ($count < 0) {
$countlink = get_string('error');
} else {
+1 -1
View File
@@ -53,7 +53,6 @@ $pageurl = new moodle_url('/admin/plugins.php', $pageparams);
$pluginman = core_plugin_manager::instance();
if ($uninstall) {
require_sesskey();
if (!$confirmed) {
admin_externalpage_setup('pluginsoverview', '', $pageparams);
@@ -92,6 +91,7 @@ if ($uninstall) {
exit();
} else {
require_sesskey();
$SESSION->pluginuninstallreturn = $pluginfo->get_return_url_after_uninstall($return);
$progress = new progress_trace_buffer(new text_progress_trace(), false);
$pluginman->uninstall_plugin($pluginfo->component, $progress);
+18 -15
View File
@@ -1110,7 +1110,7 @@ class core_admin_renderer extends plugin_renderer_base {
if (!empty($installabortable[$plugin->component])) {
$status .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstall' => $plugin->component)),
new moodle_url($this->page->url, array('abortinstall' => $plugin->component, 'confirmplugincheck' => 0)),
get_string('cancelinstallone', 'core_plugin'),
'post',
array('class' => 'actionbutton cancelinstallone d-block mt-1')
@@ -1209,7 +1209,7 @@ class core_admin_renderer extends plugin_renderer_base {
if ($installabortable) {
$out .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstallx' => 1)),
new moodle_url($this->page->url, array('abortinstallx' => 1, 'confirmplugincheck' => 0)),
get_string('cancelinstallall', 'core_plugin', count($installabortable)),
'post',
array('class' => 'singlebutton cancelinstallall mr-1')
@@ -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)),
+3 -8
View File
@@ -131,15 +131,10 @@ if ($hassiteconfig && \core_analytics\manager::is_analytics_enabled()) {
$timesplittingdefaults, $timesplittingoptions)
);
// Predictions processor output dir.
$defaultmodeloutputdir = rtrim($CFG->dataroot, '/') . DIRECTORY_SEPARATOR . 'models';
if (empty(get_config('analytics', 'modeloutputdir')) && !file_exists($defaultmodeloutputdir) &&
is_writable($defaultmodeloutputdir)) {
// Automatically create the dir for them so users don't see the invalid value red cross.
mkdir($defaultmodeloutputdir, $CFG->directorypermissions, true);
}
// Predictions processor output dir - specify default in setting description (used if left blank).
$defaultmodeloutputdir = \core_analytics\model::default_output_dir();
$settings->add(new admin_setting_configdirectory('analytics/modeloutputdir', new lang_string('modeloutputdir', 'analytics'),
new lang_string('modeloutputdirinfo', 'analytics'), $defaultmodeloutputdir));
new lang_string('modeloutputdirwithdefaultinfo', 'analytics', $defaultmodeloutputdir), ''));
// Disable web interface evaluation and get predictions.
$settings->add(new admin_setting_configcheckbox('analytics/onlycli', new lang_string('onlycli', 'analytics'),
+50 -14
View File
@@ -1,21 +1,57 @@
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
/**
* Define administration settings on the Location settings page.
*
* @package core
* @category admin
* @copyright 2006 Martin Dougiamas <martin@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// "locations" settingpage
$temp = new admin_settingpage('locationsettings', new lang_string('locationsettings', 'admin'));
$temp->add(new admin_setting_servertimezone());
$temp->add(new admin_setting_forcetimezone());
$temp->add(new admin_settings_country_select('country', new lang_string('country', 'admin'), new lang_string('configcountry', 'admin'), 0));
$temp->add(new admin_setting_configtext('defaultcity', new lang_string('defaultcity', 'admin'), new lang_string('defaultcity_help', 'admin'), ''));
defined('MOODLE_INTERNAL') || die();
$temp->add(new admin_setting_heading('iplookup', new lang_string('iplookup', 'admin'), new lang_string('iplookupinfo', 'admin')));
$temp->add(new admin_setting_configfile('geoip2file', new lang_string('geoipfile', 'admin'),
new lang_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLite2-City.mmdb'));
$temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'admin'), new lang_string('googlemapkey3_help', 'admin'), '', PARAM_RAW, 60));
if ($hassiteconfig) {
$temp = new admin_settingpage('locationsettings', new lang_string('locationsettings', 'core_admin'));
$temp->add(new admin_setting_configtext('allcountrycodes', new lang_string('allcountrycodes', 'admin'), new lang_string('configallcountrycodes', 'admin'), '', '/^(?:\w+(?:,\w+)*)?$/'));
if ($ADMIN->fulltree) {
$temp->add(new admin_setting_servertimezone());
$temp->add(new admin_setting_forcetimezone());
$temp->add(new admin_settings_country_select('country', new lang_string('country', 'core_admin'),
new lang_string('configcountry', 'core_admin'), 0));
$temp->add(new admin_setting_configtext('defaultcity', new lang_string('defaultcity', 'core_admin'),
new lang_string('defaultcity_help', 'core_admin'), ''));
$temp->add(new admin_setting_heading('iplookup', new lang_string('iplookup', 'core_admin'),
new lang_string('iplookupinfo', 'core_admin')));
$temp->add(new admin_setting_configfile('geoip2file', new lang_string('geoipfile', 'core_admin'),
new lang_string('configgeoipfile', 'core_admin', $CFG->dataroot . '/geoip/'),
$CFG->dataroot . '/geoip/GeoLite2-City.mmdb'));
$temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'core_admin'),
new lang_string('googlemapkey3_help', 'core_admin'), '', PARAM_RAW, 60));
$temp->add(new admin_setting_countrycodes('allcountrycodes', new lang_string('allcountrycodes', 'core_admin'),
new lang_string('configallcountrycodes', 'core_admin')));
}
$ADMIN->add('location', $temp);
} // end of speedup
}
+3 -3
View File
@@ -645,14 +645,14 @@ if ($hassiteconfig) {
// Content bank content types.
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('contenbanksettings', new lang_string('contentbank')));
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
$temp->add(new admin_setting_managecontentbankcontenttypes());
$ADMIN->add('contenbanksettings', $temp);
$ADMIN->add('contentbanksettings', $temp);
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
foreach ($plugins as $plugin) {
/** @var \core\plugininfo\contentbank $plugin */
$plugin->load_settings($ADMIN, 'contenbanksettings', $hassiteconfig);
$plugin->load_settings($ADMIN, 'contentbanksettings', $hassiteconfig);
}
}
+1 -1
View File
@@ -94,7 +94,7 @@ $options = array(
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'REMOTE_ADDR');
$temp->add(new admin_setting_configselect('getremoteaddrconf', new lang_string('getremoteaddrconf', 'admin'),
new lang_string('configgetremoteaddrconf', 'admin'),
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP, $options));
GETREMOTEADDR_SKIP_DEFAULT, $options));
$temp->add(new admin_setting_configtext('reverseproxyignore', new lang_string('reverseproxyignore', 'admin'), new lang_string('configreverseproxyignore', 'admin'), ''));
$temp->add(new admin_setting_heading('webproxy', new lang_string('webproxy', 'admin'), new lang_string('webproxyinfo', 'admin')));
+18
View File
@@ -261,10 +261,28 @@ if ($hassiteconfig) {
$temp->add($setting);
// See {@link https://gdpr-info.eu/art-8-gdpr/}.
// See {@link https://www.betterinternetforkids.eu/web/portal/practice/awareness/detail?articleId=3017751}.
$ageofdigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'AT, 14',
'BE, 13',
'BG, 14',
'CY, 14',
'CZ, 15',
'DK, 13',
'EE, 13',
'ES, 14',
'FI, 13',
'FR, 15',
'GB, 13',
'GR, 15',
'IT, 14',
'LT, 14',
'LV, 13',
'MT, 13',
'NO, 13',
'PT, 13',
'SE, 13',
'US, 13'
]);
$setting = new admin_setting_agedigitalconsentmap('agedigitalconsentmap',
+2 -1
View File
@@ -32,6 +32,7 @@ $result = optional_param('result', null, PARAM_INT);
$pageurl = new \moodle_url('/admin/tasklogs.php');
$pageurl->param('filter', $filter);
$pageurl->param('result', $result);
$PAGE->set_url($pageurl);
$PAGE->set_context(context_system::instance());
@@ -66,7 +67,7 @@ echo $OUTPUT->header();
// Output the search form.
echo $OUTPUT->render_from_template('core_admin/tasklogs', (object) [
'action' => $pageurl->out(),
'filter' => $filter,
'filter' => htmlentities($filter),
'resultfilteroptions' => [
(object) [
'value' => -1,
@@ -25,6 +25,7 @@
* value - yes value
* id - element id
* checked - boole
* readonly - bool
Example context (json):
{
@@ -32,10 +33,11 @@
"no": "False",
"value": "True",
"id": "test0",
"checked": "checked"
"checked": "checked",
"readonly": false
}
}}
<div class="form-checkbox defaultsnext">
<input type="hidden" name="{{name}}" value="{{no}}">
<input type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
<input {{#readonly}}disabled{{/readonly}} type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
</div>
@@ -25,6 +25,7 @@
* id - element id
* value - element value
* haspreviewconfig - show preview of selected color
* readonly - bool
Example context (json):
{
@@ -32,6 +33,7 @@
"name": "name0",
"id": "id0",
"value": "#555655",
"readonly": false,
"haspreviewconfig": false
}
}}
@@ -44,7 +46,7 @@
{{>core/pix_icon}}
{{/icon}}
</div>
<input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12" class="form-control text-ltr">
<input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
{{#haspreviewconfig}}
<input type="button" id="{{id}}_preview" value={{#quote}}{{#str}}preview{{/str}}{{/quote}} class="admin_colourpicker_preview">
{{/haspreviewconfig}}
@@ -33,7 +33,7 @@
"name": "test",
"value": "/my-super-secret-path/",
"id": "test0",
"readonly": true,
"readonly": false,
"showvalidity": true,
"valid": false
}
@@ -23,6 +23,7 @@
* name - form element name
* options - list of options for units containing name, value, selected
* value - yes
* readonly - bool
* id - element id
Example context (json):
@@ -30,6 +31,7 @@
"name": "test",
"value": "5",
"id": "test0",
"readonly": false,
"options": [ { "name": "Minutes", "value": "mins", "selected": true } ]
}
}}
@@ -38,9 +40,9 @@
}}
<div class="form-duration defaultsnext">
<div class="form-inline">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select">
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -33,7 +33,7 @@
"name": "test",
"value": "/usr/bin/cowsay",
"id": "test0",
"readonly": true,
"readonly": false,
"showvalidity": true,
"valid": false
}
+3 -1
View File
@@ -26,6 +26,7 @@
* readonly - Make the field readonly
* value - value
* showvalidity - Show a green check if the path is readable
* readonly - bool
* valid - True if the path is readable
Example context (json):
@@ -33,8 +34,9 @@
"name": "test",
"value": "/my-super-secret-path/file",
"id": "test0",
"readonly": true,
"readonly": false,
"showvalidity": true,
"readonly": false,
"valid": false
}
}}
@@ -24,12 +24,14 @@
* options - list of options for units containing name, value, selected
* value - yes
* id - element id
* readonly - bool
Example context (json):
{
"name": "test",
"value": "5",
"id": "test0",
"readonly": false,
"options": [ { "name": "KB", "value": "1024", "selected": true } ]
}
}}
@@ -38,9 +40,9 @@
}}
<div class="form-filesize defaultsnext">
<div class="form-inline">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select">
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -24,11 +24,13 @@
* id - element id
* size - element size
* options - list of options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"size": "3",
"options": [ { "name": "Option 1", "value": "V", "selected": true },
{ "name": "Option 2", "value": "V", "selected": true } ]
@@ -39,7 +41,7 @@
}}
<div class="form-select">
<input type="hidden" name="{{name}}[xxxxx]" value="1">
<select id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -25,11 +25,13 @@
* size - element size
* options - list of options not grouped
* optgroups - list of options grouped containing the group label and for each option: name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"size": "3",
"options": [
{ "name": "Option 1", "value": "V", "selected": false },
@@ -58,7 +60,7 @@
}}
<div class="form-select">
<input type="hidden" name="{{name}}[xxxxx]" value="1">
<select id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -24,7 +24,7 @@
* size - form element size
* value - form element value
* id - element id
* forced - has value been defined in config.php
* readonly - has value been defined in config.php
Example context (json):
{
@@ -32,10 +32,10 @@
"id": "test0",
"size": "8",
"value": "secret",
"forced": false
"readonly": false
}
}}
{{#forced}}
{{#readonly}}
<div class="form-password">
<input type="text"
name = "{{ name }}"
@@ -46,8 +46,8 @@
disabled
>
</div>
{{/forced}}
{{^forced}}
{{/readonly}}
{{^readonly}}
<div class="form-password">
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
<span data-passwordunmask="editor">
@@ -76,4 +76,4 @@ require(['core_form/passwordunmask'], function(PasswordUnmask) {
new PasswordUnmask("{{ id }}");
});
{{/js}}
{{/forced}}
{{/readonly}}
@@ -23,11 +23,13 @@
* name - form element name
* id - element id
* options - list of options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"options": [
{ "name": "Option 1", "value": "V", "selected": true },
{ "name": "Option 2", "value": "V", "selected": true }
@@ -38,7 +40,7 @@
Setting configselect.
}}
<div class="form-select defaultsnext">
<select id="{{id}}" name="{{name}}" class="custom-select">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -22,6 +22,7 @@
Context variables required for this template:
* name - form element name
* id - element id
* readonly - bool
* options - list of options (not grouped)
* optgroups - list of options grouped containing the group label and for each option: name, value, selected
@@ -29,6 +30,7 @@
{
"name": "test",
"id": "test0",
"readonly": false,
"options": [
{ "name": "Option 1", "value": "V", "selected": false },
{ "name": "Option 2", "value": "V", "selected": false }
@@ -55,7 +57,7 @@
Setting configselect with optgroup support.
}}
<div class="form-select defaultsnext">
<select id="{{id}}" name="{{name}}" class="custom-select">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
+3 -1
View File
@@ -26,6 +26,7 @@
* size - element size
* forceltr - always display as ltr
* attributes - list of additional attributes containing name, value
* readonly - bool
Example context (json):
{
@@ -34,6 +35,7 @@
"value": "A tall, dark stranger will have more fun than you.",
"size": "21",
"forceltr": false,
"readonly": false,
"attributes": [ { "name": "readonly", "value": "readonly" } ]
}
}}
@@ -41,5 +43,5 @@
Setting configtext.
}}
<div class="form-text defaultsnext">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}" {{#readonly}}disabled{{/readonly}}>
</div>
@@ -33,6 +33,7 @@
"cols": "30",
"rows": "3",
"value": "Excellent day for putting Slinkies on an escalator.",
"readonly": false,
"id": "test0"
}
}}
@@ -40,5 +41,5 @@
Setting configtextarea.
}}
<div class="form-textarea">
<textarea rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
<textarea {{#readonly}}disabled{{/readonly}} rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
</div>
+4 -2
View File
@@ -24,11 +24,13 @@
* id - element id
* hours - list of valid hour options containing name, value, selected
* minutes - list of valid minute options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"minutes": [
{ "name": "00", "value": "0", "selected": true },
{ "name": "01", "value": "1", "selected": false }
@@ -45,13 +47,13 @@
<div class="form-time defaultsnext">
<div class="form-inline text-ltr">
<label class="sr-only" for="{{id}}h">{{#str}}hours{{/str}}</label>
<select id="{{id}}h" name="{{name}}[h]" class="custom-select">
<select id="{{id}}h" name="{{name}}[h]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#hours}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/hours}}
</select>:
<label class="sr-only" for="{{id}}m">{{#str}}minutes{{/str}}</label>
<select id="{{id}}m" name="{{name}}[m]" class="custom-select">
<select id="{{id}}m" name="{{name}}[m]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#minutes}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/minutes}}
+2 -5
View File
@@ -53,11 +53,8 @@ class behat_admin extends behat_base {
}
foreach ($data as $label => $value) {
$this->execute('behat_navigation::i_select_from_flat_navigation_drawer', [get_string('administrationsite')]);
// Search by label.
$this->execute('behat_forms::i_set_the_field_to', [get_string('query', 'admin'), $label]);
$this->execute("behat_forms::press_button", get_string('search', 'admin'));
// Navigate straight to the search results fo rthis label.
$this->execute('behat_general::i_visit', ["/admin/search.php?query=" . urlencode($label)]);
// Admin settings does not use the same DOM structure than other moodle forms
// but we also need to use lib/behat/form_field/* to deal with the different moodle form elements.
+4 -2
View File
@@ -14,6 +14,10 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And the following "cohorts" exist:
| name | idnumber |
| Cohort 1 | CH1 |
And the following "cohort members" exist:
| user | cohort |
| user2 | CH1 |
| user3 | CH1 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
@@ -23,8 +27,6 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
| user2 | C1 | student |
| user3 | C1 | student |
And I log in as "admin"
And I add "User Two (two@example.com)" user to "CH1" cohort members
And I add "User Three (three@example.com)" user to "CH1" cohort members
And I navigate to "Users > Accounts > Browse list of users" in site administration
Scenario: Filter user accounts by role and cohort
@@ -0,0 +1,29 @@
@core @core_admin
Feature: Administrator is warned and when trying to set invalid allcountrycodes value.
In order to avoid misconfiguration of the country selector fields
As an admin
I want to be warned when I try to set an invalid country code in the allcountrycodes field
Scenario: Attempting to set allcountrycodes field with valid country codes
Given I log in as "admin"
And I navigate to "Location > Location settings" in site administration
When I set the following administration settings values:
| All country codes | CZ,BE,GB,ES |
Then I should not see "Invalid country code"
Scenario: Attempting to set allcountrycodes field with invalid country code
Given I log in as "admin"
And I navigate to "Location > Location settings" in site administration
When I set the following administration settings values:
| All country codes | CZ,BE,FOOBAR,GB,ES |
Then I should see "Invalid country code: FOOBAR"
Scenario: Attempting to unset allcountrycodes field
Given I log in as "admin"
And I navigate to "Location > Location settings" in site administration
And I set the following administration settings values:
| All country codes | CZ,BE,GB,ES |
And I navigate to "Location > Location settings" in site administration
When I set the following administration settings values:
| All country codes | |
Then I should not see "Invalid country code"
@@ -0,0 +1,34 @@
@core @core_admin
Feature: Configure language settings for the site
In order to configure language settings for the site
As an admin
I want to set language settings relevant to my site users
Scenario: Set languages on language menu
Given I log in as "admin"
And I navigate to "Language > Language settings" in site administration
When I set the field "Languages on language menu" to "en"
And I press "Save changes"
Then I should not see "Invalid language code"
Scenario: Reset languages on language menu
Given I log in as "admin"
And I navigate to "Language > Language settings" in site administration
When I set the field "Languages on language menu" to ""
And I press "Save changes"
Then I should not see "Invalid language code"
Scenario Outline: Set languages on language menu with invalid language
Given I log in as "admin"
And I navigate to "Language > Language settings" in site administration
When I set the field "Languages on language menu" to "<fieldvalue>"
And I press "Save changes"
Then I should see "Invalid language code: <invalidlang>"
Examples:
| fieldvalue | invalidlang |
| xx | xx |
| xx\|Bad | xx |
| en,qq | qq |
| en,qq\|Bad | qq |
| en$$ | en$$ |
| en$$\|Bad | en$$ |
+12 -2
View File
@@ -1,2 +1,12 @@
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
* @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
*/
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 * @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"],"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,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
+12 -2
View File
@@ -1,2 +1,12 @@
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
* @class potential-contexts
* @package tool_analytics
* @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 * @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"],"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":";;;;;;;;;AAyBAA,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"}
+5 -4
View File
@@ -45,7 +45,7 @@ list($options, $unrecognised) = cli_get_params(
array(
'stop-on-failure' => 0,
'verbose' => false,
'replace' => false,
'replace' => '',
'help' => false,
'tags' => '',
'profile' => '',
@@ -70,7 +70,7 @@ $help = "
Behat utilities to run behat tests in parallel
Usage:
php run.php [--BEHAT_OPTION=\"value\"] [--feature=\"value\"] [--replace] [--fromrun=value --torun=value] [--help]
php run.php [--BEHAT_OPTION=\"value\"] [--feature=\"value\"] [--replace=\"{run}\"] [--fromrun=value --torun=value] [--help]
Options:
--BEHAT_OPTION Any combination of behat option specified in http://behat.readthedocs.org/en/v2.5/guides/6.cli.html
@@ -144,9 +144,10 @@ $extraopts = $unrecognised;
if ($options['profile']) {
$profile = $options['profile'];
// If profile passed is not set, then exit.
// If profile passed is not set, then exit (note we skip if the 'replace' option is found within the 'profile' value).
if (!isset($CFG->behat_config[$profile]) && !isset($CFG->behat_profiles[$profile]) &&
!(isset($options['replace']) && (strpos($options['profile'], $options['replace']) >= 0 ))) {
!($options['replace'] && (strpos($profile, (string) $options['replace']) !== false))) {
echo "Invalid profile passed: " . $profile . PHP_EOL;
exit(1);
}
+6
View File
@@ -164,6 +164,8 @@ if ($options['install']) {
mtrace("Acceptance tests site installed");
}
// Note: Do not build the themes here. This is done during the 'enable' stage.
} else if ($options['drop']) {
// Ensure no tests are running.
test_lock::acquire('behat');
@@ -182,6 +184,10 @@ if ($options['install']) {
// Enable test mode.
behat_util::start_test_mode($options['add-core-features-to-theme'], $options['optimize-runs'], $parallel, $run);
// Themes are only built in the 'enable' command.
behat_util::build_themes();
mtrace("Testing environment themes built");
// This is only displayed once for parallel install.
if (empty($run)) {
// Notify user that 2.5 profile has been converted to 3.5.
+1
View File
@@ -46,6 +46,7 @@ $string['stepsdefinitionstype'] = 'Type';
$string['theninfo'] = 'Then. Checkings to ensure the outcomes are the expected ones';
$string['unknownexceptioninfo'] = 'There was a problem with Selenium or your browser. Please ensure you are using the latest version of Selenium. Error:';
$string['viewsteps'] = 'Filter';
$string['warndirrootconfigfound'] = 'A configuration file was found at {$a}. This file is not automatically updated and may become stale. We recommend removing this file.';
$string['wheninfo'] = 'When. Action that provokes an event';
$string['wrongbehatsetup'] = 'Something is wrong with the behat setup and so step definitions cannot be listed: <b>{$a->errormsg}</b><br/><br/>Please check:<ul>
<li>$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot are set in config.php with different values from $CFG->dataroot, $CFG->prefix and $CFG->wwwroot.</li>
@@ -156,7 +156,7 @@ Feature: Set up contextual data for tests
And I log in as "user5"
And I should see "You are logged in as"
And I am on "Course 1" course homepage
And I should see "You can not enrol yourself in this course."
And I should see "You cannot enrol yourself in this course."
Scenario: Add modules
Given the following "courses" exist:
@@ -21,5 +21,5 @@ Feature: Transform date time string arguments
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should see "##yesterday##l, j F Y##"
And I should see "##yesterday##%A, %d %B %Y##"
And I log out
@@ -6,14 +6,18 @@ Feature: Edit capabilities
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| username | firstname | lastname |
| teacher1 | Teacher | 1 |
| tutor | Teaching | Assistant |
| student | Student | One |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| user | course | role |
| teacher1 | C1 | editingteacher |
| tutor | C1 | teacher |
| student | C1 | student |
Scenario: Default system capabilities modification
Given I log in as "admin"
@@ -60,3 +64,25 @@ Feature: Edit capabilities
Then "mod/forum:deleteanypost" capability has "Prohibit" permission
And "mod/forum:editanypost" capability has "Prevent" permission
And "mod/forum:addquestion" capability has "Allow" permission
@javascript
Scenario: Edit permissions escapes role names correctly
When I am on the "C1" "Course" page logged in as "admin"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Your word for 'Teacher' | Teacher >= editing |
| Your word for 'Non-editing teacher' | Teacher < "editing" |
| Your word for 'Student' | Studier & 'learner' |
And I press "Save and display"
And I navigate to course participants
Then I should see "Teacher >= editing" in the "Teacher 1" "table_row"
And I should see "Teacher < \"editing\"" in the "Teaching Assistant" "table_row"
And I should see "Studier & 'learner'" in the "Student One" "table_row"
And I navigate to "Users > Permissions" in current page administration
And I should see "Teacher >= editing" in the "mod/forum:replypost" "table_row"
And I should see "Teacher < \"editing\"" in the "mod/forum:replypost" "table_row"
And I should see "Studier & 'learner'" in the "mod/forum:replypost" "table_row"
And I follow "Prohibit"
And "Teacher >= editing" "button" in the "Prohibit role" "dialogue" should be visible
And "Teacher < \"editing\"" "button" in the "Prohibit role" "dialogue" should be visible
And "Studier & 'learner'" "button" in the "Prohibit role" "dialogue" should be visible
@@ -48,7 +48,7 @@ Feature: Verify that all form fields values can be get and set
And the "Unenrol users" select box should not contain "Baker"
And the "Unenrol users" select box should not contain "President, Baker"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I press "Create page"
# Text (textarea & editor) & Select (multi-select) - Checking "I set the following fields to these values".
When I set the following fields to these values:
@@ -61,8 +61,7 @@ Feature: Verify that all form fields values can be get and set
# Checkbox - Checking "I set the field" and "The field matches value" ticked.
And I set the field "Force format" to "1"
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "Force format" matches value "1"
@@ -70,8 +69,7 @@ Feature: Verify that all form fields values can be get and set
# Checkbox - Checking "I set the field" and "The field matches value" unticked.
And I set the field "Force format" to ""
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "Force format" matches value ""
@@ -80,8 +78,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Force format | 1 |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the following fields match these values:
@@ -92,8 +89,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Force format | |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I am on the "Test this one" "wiki activity" page
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the following fields match these values:
@@ -115,20 +111,21 @@ Feature: Verify that all form fields values can be get and set
| Wiki name | Test this one baby |
| Default format | HTML |
And I press "Cancel"
And I am on "Course 1" course homepage
# Radio - Checking "I set the field" and "the field matches value".
And I add a "Choice" to section "1" and I fill the form with:
| Choice name | Test choice name |
| Description | Test choice description |
| Allow choice to be updated | Yes |
| Option 1 | one |
| Option 2 | two |
| Option 3 | three |
And I follow "Test choice name"
And I set the field "one" to "1"
And the following "activity" exists:
| activity | choice |
| course | C1 |
| idnumber | choice1 |
| intro | Test choice description |
| name | Test choice name |
| option | Option 1, Option 2, Option 3 |
| section | 1 |
| allowupdate | 1 |
And I am on the "Test choice name" "choice activity" page
And I set the field "Option 1" to "1"
And I press "Save my choice"
And the field "one" matches value "1"
And the field "two" matches value ""
And the field "Option 1" matches value "1"
And the field "Option 2" matches value ""
# Check if field xpath set/match works.
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
@@ -174,31 +171,23 @@ Feature: Verify that all form fields values can be get and set
And I press "Cancel"
# Advanced checkbox requires real browser to allow uncheck to work. MDL-58681. MDL-55386.
# Advanced checkbox - Checking "I set the field" and "The field matches value" ticked.
And I am on "Course 1" course homepage
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And I set the field "Display description on course page" to "1"
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the field "Display description on course page" matches value "1"
And the field "Display description on course page" does not match value ""
# Advanced checkbox - Checking "I set the field" and "The field matches value" unticked.
And I set the field "Display description on course page" to ""
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the field "Display description on course page" matches value ""
And the field "Display description on course page" does not match value "1"
# Advanced checkbox - Checking "I set the following fields to these values:" and "The following fields match these values" ticked.
And I set the following fields to these values:
| Display description on course page | 1 |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the following fields match these values:
| Display description on course page | 1 |
And the following fields do not match these values:
@@ -207,9 +196,7 @@ Feature: Verify that all form fields values can be get and set
And I set the following fields to these values:
| Display description on course page | |
And I press "Save and return to course"
And I should see "Test this one"
And I follow "Test this one"
And I navigate to "Edit settings" in current page administration
And I am on the "Test choice name" "choice activity editing" page
And the following fields match these values:
| Display description on course page | |
And the following fields do not match these values:
@@ -7,8 +7,8 @@ Feature: Behat steps for interacting with form work
@javascript
Scenario: Test fields in containers
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
| fullname | shortname | summary | summaryformat |
| Course 1 | C1 | Red | 1 |
When I log in as "admin"
And I am on "Course 1" course homepage
# Just get to any form.
@@ -17,11 +17,15 @@ Feature: Behat steps for interacting with form work
And I set the following fields in the "Appearance" "fieldset" to these values:
| Show activity reports | Yes |
| Number of announcements | 1 |
And I set the following fields in the "Description" "fieldset" to these values:
| Course summary | Green |
Then the field "Show activity reports" in the "Appearance" "fieldset" matches value "Yes"
And the field "Show activity reports" in the "Appearance" "fieldset" does not match value "No"
And the following fields in the "region-main" "region" match these values:
| Course full name | Frog |
| Number of announcements | 1 |
| Course summary | Green |
And the following fields in the "region-main" "region" do not match these values:
| Course full name | Course 1 |
| Number of announcements | 5 |
| Course summary | Red |
@@ -0,0 +1,85 @@
@tool @tool_behat
Feature: Use core page resolvers for the I am on the page steps
In order to write tests correctly
As a developer
I need to have steps which take me straight to a page
Scenario Outline: When I am on an instance
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "course" exists:
| fullname | Economics 101 |
| shortname | ECON101 |
| idnumber | 2021-econ101 |
And the following "activity" exists:
| course | ECON101 |
| activity | forum |
| name | Fundamentals of Economics |
| idnumber | fundamentalsofeconomics |
And I log in as "admin"
When I am on the <identifier> <type> page
Then I should see "<shouldsee>"
Examples:
| description | identifier | type | shouldsee |
| Course Category idnumber | CAT1 | category | Add a new course |
| Course Category name | "Cat 1" | Category | Add a new course |
| Course Full name | "Economics 101" | course | Fundamentals of Economics |
| Course Short name | ECON101 | COURSE | Fundamentals of Economics |
| Course idnumber | "2021-econ101" | Course | Fundamentals of Economics |
| Forum idnumber | fundamentalsofeconomics | Activity | Add a new discussion |
| Generic activity editing | fundamentalsofeconomics | "Activity editing" | Updating: Forum |
| Forum name | "Fundamentals of Economics" | "Forum activity" | Add a new discussion |
| Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Updating: Forum |
| Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun |
| Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun |
Scenario Outline: When I am on an instance logged in as
Given the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "course" exists:
| fullname | Economics 101 |
| shortname | ECON101 |
| idnumber | 2021-econ101 |
And the following "activity" exists:
| course | ECON101 |
| activity | forum |
| name | Fundamentals of Economics |
| idnumber | fundamentalsofeconomics |
When I am on the <identifier> <type> page logged in as admin
Then I should see "<shouldsee>"
Examples:
| description | identifier | type | shouldsee |
| Course Category idnumber | CAT1 | category | Add a new course |
| Course Category name | "Cat 1" | Category | Add a new course |
| Course Full name | "Economics 101" | course | Fundamentals of Economics |
| Course Short name | ECON101 | COURSE | Fundamentals of Economics |
| Course idnumber | "2021-econ101" | Course | Fundamentals of Economics |
| Forum idnumber | fundamentalsofeconomics | Activity | Add a new discussion |
| Generic activity editing | fundamentalsofeconomics | "Activity editing" | Updating: Forum |
| Forum name | "Fundamentals of Economics" | "Forum activity" | Add a new discussion |
| Forum name editing | "Fundamentals of Economics" | "Forum activity editing" | Updating: Forum |
| Forum name permissions | "Fundamentals of Economics" | "Forum activity permissions" | Permissions in Forum: Fun |
| Forum name roles | "Fundamentals of Economics" | "Forum activity roles" | Assign roles in Forum: Fun |
Scenario Outline: When I am on a named page
Given I log in as "admin"
When I am on the <identifier> page
Then I should see "<shouldsee>"
Examples:
| description | identifier | shouldsee |
| Admin page | "Admin notifications" | Check for available updates |
| Home page | Homepage | Recently accessed courses |
Scenario Outline: When I am on a named page logged in as
When I am on the <identifier> page logged in as admin
Then I should see "<shouldsee>"
Examples:
| description | identifier | shouldsee |
| Admin page | "Admin notifications" | Check for available updates |
| Home page | Homepage | Recently accessed courses |
@@ -0,0 +1,30 @@
@tool_behat
Feature: Verify that the inplace editable field works as expected
In order to use behat step definitions
As a test write
I need to ensure that the inplace editable works in forms
Background:
Given the following "course" exists:
| fullname | Course 1 |
| shortname | C1 |
And the following "activities" exist:
| activity | course | name | idnumber |
| forum | C1 | My first forum | forum1 |
| assign | C1 | My first assignment | assign1 |
| quiz | C1 | My first quiz | quiz1 |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
@javascript
Scenario: Using an inplace editable updates the name of an activity
When I set the field "Edit title" in the "My first assignment" "activity" to "Coursework submission"
Then I should see "Coursework submission"
And I should not see "My first assignment"
But I should see "My first forum"
And I should see "My first quiz"
And I set the field "Edit title" in the "Coursework submission" "activity" to "My first assignment"
And I should not see "Coursework submission"
But I should see "My first assignment"
And I should see "My first forum"
And I should see "My first quiz"
@@ -0,0 +1,52 @@
@tool_behat
Feature: Verify that keyboard steps work as expected
In order to use behat step definitions
As a test writer
I need to verify that the keyboard steps work as expected
@javascript
Scenario: Typing keys into a field causes them to be input
Given the following "users" exist:
| username | email | firstname | lastname | password |
| saffronr | saffron.rutledge@example.com | Saffron | Rutledge | flowerpower |
Given I click on "Log in" "link"
And I click on "Username" "field"
When I type "saffronr"
And I press the tab key
And I type "flowerpower"
And I press enter
Then I should see "You are logged in as Saffron Rutledge"
@javascript
Scenario: Using tab changes focus to the next or previous field
Given I click on "Log in" "link"
And I click on "Username" "field"
And the focused element is "Username" "field"
When I press the tab key
Then the focused element is "Password" "field"
And I press the shift tab key
And the focused element is "Username" "field"
@javascript
Scenario: Using the arrow keys allows me to navigate through menus
Given the following "users" exist:
| username | email | firstname | lastname |
| saffronr | saffron.rutledge@example.com | Saffron | Rutledge |
And I log in as "saffronr"
And I click on "Saffron Rutledge" "link" in the ".usermenu" "css_element"
When I press the up key
Then the focused element is "Log out" "link"
@javascript
Scenario: The escape key can be used to close a dialogue
Given the following "course" exists:
| fullname | C1|
| shortname | C1 |
And I log in as "admin"
And I am on "C1" course homepage
And I navigate to course participants
And I press "Enrol users"
And "Enrol users" "dialogue" should be visible
When I press the escape key
Then "Enrol users" "dialogue" should not be visible
@@ -0,0 +1,110 @@
@tool_behat
Feature: Verify that the behat login and logout steps work as expected
In order to use behat login and log out steps
As a test writer
I need to verify that login and logout happen when the steps are used
Scenario: Log in as a user using the step
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
When I log in as "traverst1"
Then I should see "Thomas Travers"
@javascript
Scenario: Log in as a user using the step (javascript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
When I log in as "traverst1"
Then I should see "Thomas Travers"
Scenario: Log out using the log out step
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
And I am logged in as traverst1
When I log out
Then I should not see "Thomas Travers"
And I should see "You are not logged in"
@javascript
Scenario: Log out using the log out step (javascript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
And I am logged in as traverst1
When I log out
Then I should not see "Thomas Travers"
And I should see "You are not logged in"
Scenario: Log in step should automatically log user out if already logged in
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
| emeryj | Jane | Emery |
And I am logged in as traverst1
When I log in as "emeryj"
Then I should not see "Thomas Travers"
And I should see "Jane Emery"
@javascript
Scenario: Log in step should automatically log user out if already logged in (javascript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
| emeryj | Jane | Emery |
And I am logged in as traverst1
When I log in as "emeryj"
Then I should not see "Thomas Travers"
And I should see "Jane Emery"
Scenario: I am on page logged in as should redirect to correct page
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
And the following "course" exists:
| fullname | Life, the Universe, and Everything |
| shortname | hhgttg |
When I am on the hhgttg Course page logged in as traverst1
Then I should see "Thomas Travers"
And I should see "Life, the Universe, and Everything"
@javascript
Scenario: I am on page logged in as should redirect to correct page (javascript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
And the following "course" exists:
| fullname | Life, the Universe, and Everything |
| shortname | hhgttg |
When I am on the hhgttg Course page logged in as traverst1
Then I should see "Thomas Travers"
And I should see "Life, the Universe, and Everything"
Scenario: I am on page logged in as should redirect to correct page when automatically logging a user out
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
| emeryj | Jane | Emery |
And the following "course" exists:
| fullname | Life, the Universe, and Everything |
| shortname | hhgttg |
And I am logged in as emeryj
When I am on the hhgttg Course page logged in as traverst1
Then I should see "Thomas Travers"
And I should see "Life, the Universe, and Everything"
@javascript
Scenario: I am on page logged in as should redirect to correct page when automatically logging a user out (javacript)
Given the following "users" exist:
| username | firstname | lastname |
| traverst1 | Thomas | Travers |
| emeryj | Jane | Emery |
And the following "course" exists:
| fullname | Life, the Universe, and Everything |
| shortname | hhgttg |
And I am logged in as emeryj
When I am on the hhgttg Course page logged in as traverst1
Then I should see "Thomas Travers"
And I should see "Life, the Universe, and Everything"
@@ -14,17 +14,16 @@ Feature: Forms manipulation
Then the field "First name" matches value "Field value"
And the "Select a country" select box should contain "Japan"
And the field "New password" matches value "TestPass"
And I take focus off "Update profile" "button"
And I press "Update profile"
@javascript
Scenario: Expand all fieldsets and advanced elements
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "Quiz" to section "1"
And the following "activities" exist:
| activity | course | section | name |
| quiz | C1 | 1 | Quiz 1 |
And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
When I expand all fieldsets
Then I should see "Close the quiz"
And I should see "Group mode"
@@ -60,12 +60,12 @@ class tool_capability_settings_form extends moodleform {
$form->addElement('select', 'roles', get_string('roleslabel', 'tool_capability'), $roles, $attributes);
$form->setType('roles', PARAM_TEXT);
$form->addElement('checkbox', 'onlydiff',
get_string('filters', 'tool_capability'),
get_string('onlydiff', 'tool_capability'));
$filters = [];
$filters[] = $form->createElement('checkbox', 'onlydiff', get_string('onlydiff', 'tool_capability'));
$form->setType('onlydiff', PARAM_BOOL);
$form->addGroup($filters, 'filters', get_string('filters', 'tool_capability'), array('<br>'), false);
$form->addElement('submit', 'submitbutton', get_string('getreport', 'tool_capability'));
}
}
}
+11 -2
View File
@@ -53,7 +53,12 @@ function tool_capability_calculate_role_data($capability, array $roles) {
$sql = 'SELECT DISTINCT con.path, 1
FROM {context} con
JOIN {role_capabilities} rc ON rc.contextid = con.id
WHERE capability = ? '.$sqlroletest;
WHERE capability = ? ' .
$sqlroletest .
// Context path should never be null, but can happen in old database with
// bad data (e.g. a course_module where the corresponding course no longer exists).
// We need to leave these out of the report to prevent errors.
' AND con.path IS NOT NULL';
$relevantpaths = $DB->get_records_sql_menu($sql, $params);
$requiredcontexts = array($systemcontext->id);
foreach ($relevantpaths as $path => $notused) {
@@ -88,6 +93,10 @@ function tool_capability_calculate_role_data($capability, array $roles) {
// Put the role capabilities into the context tree.
foreach ($rolecaps as $rolecap) {
if (!isset($contexts[$rolecap->contextid])) {
// Skip capabilities in orphaned contexts that are not in the tree.
continue;
}
$contexts[$rolecap->contextid]->rolecapabilities[$rolecap->roleid] = $rolecap->permission;
}
@@ -99,4 +108,4 @@ function tool_capability_calculate_role_data($capability, array $roles) {
}
return $contexts;
}
}
@@ -0,0 +1,88 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Tests for the capability overview helper functions.
*
* @package tool_capability
* @copyright 2021 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later.
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/capability/locallib.php');
/**
* Tests for the capability overview helper functions.
*/
class tool_capability_locallib_testcase extends advanced_testcase {
/**
* Test the function that gets the data - simple case.
*/
public function test_tool_capability_calculate_role_data() {
global $DB;
$data = tool_capability_calculate_role_data('mod/quiz:attempt', get_all_roles());
$systcontext = context_system::instance();
$studentroleid = $DB->get_field('role', 'id', ['shortname' => 'student']);
$this->assertArrayHasKey($systcontext->id, $data);
$this->assertCount(1, $data);
foreach ($data[$systcontext->id]->rolecapabilities as $roleid => $permission) {
if ($roleid == $studentroleid) {
$this->assertEquals(CAP_ALLOW, $permission);
} else {
$this->assertEquals(CAP_INHERIT, $permission);
}
}
}
/**
* Test the function that gets the data - simple case.
*/
public function test_tool_capability_calculate_role_data_orphan_contexts() {
global $DB;
$this->resetAfterTest();
// This simulates a situation that seems to happen sometimes, where
// we end up with contexts with path = NULL in the database.
$systcontext = context_system::instance();
$generator = $this->getDataGenerator();
$course = $generator->create_course();
$coursecontext = context_course::instance($course->id);
$studentroleid = $DB->get_field('role', 'id', ['shortname' => 'student']);
role_change_permission($studentroleid, $coursecontext, 'mod/quiz:attempt', CAP_PREVENT);
// This is where we simulate the breakage.
$DB->set_field('context', 'path', null, ['id' => $coursecontext->id]);
// Now call the function. We mainly just want to know there is no exception.
$data = tool_capability_calculate_role_data('mod/quiz:attempt', get_all_roles());
$this->assertArrayHasKey($systcontext->id, $data);
$this->assertCount(1, $data);
foreach ($data[$systcontext->id]->rolecapabilities as $roleid => $permission) {
if ($roleid == $studentroleid) {
$this->assertEquals(CAP_ALLOW, $permission);
} else {
$this->assertEquals(CAP_INHERIT, $permission);
}
}
}
}
@@ -1 +1 @@
YUI.add("moodle-tool_capability-search",function(i,t){var e=function(){e.superclass.constructor.apply(this,arguments)};e.prototype={form:null,select:null,selectoptions:{},input:null,button:null,lastsearch:null,initializer:function(){this.form=i.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=i.Node.create('<div id="capabilitysearchui" data-fieldtype="text"></div>'),e=i.Node.create('<label for="capabilitysearch">'+this.get("strsearch")+"</label>");this.input=i.Node.create('<input type="text" id="capabilitysearch" />'),t.append(e).append(this.input),this.select.insert(t,"before"),this.input.on("keyup",this.typed,this),this.select.on("change",this.validate,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"),i=0,s=null;for(t in this.lastsearch&&this.lastsearch.set("value",e),this.select.all("option").remove(),this.selectoptions)0<=t.indexOf(e)&&(i++,s=this.selectoptions[t],this.select.append(this.selectoptions[t]));0===i?this.input.addClass("error"):(this.input.removeClass("error"),1===i&&s.set("selected",!0)),this.validate()}},i.extend(e,i.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(i,t){var e=function(){e.superclass.constructor.apply(this,arguments)};i.extend(e,i.Base,e.prototype={form:null,select:null,selectoptions:{},input:null,button:null,lastsearch:null,initializer:function(){this.form=i.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=i.Node.create('<div id="capabilitysearchui" data-fieldtype="text"></div>'),e=i.Node.create('<label for="capabilitysearch">'+this.get("strsearch")+"</label>");this.input=i.Node.create('<input type="text" id="capabilitysearch" />'),t.append(e).append(this.input),this.select.insert(t,"before"),this.input.on("keyup",this.typed,this),this.select.on("change",this.validate,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"),i=0,s=null;for(t in this.lastsearch&&this.lastsearch.set("value",e),this.select.all("option").remove(),this.selectoptions)0<=t.indexOf(e)&&(i++,s=this.selectoptions[t],this.select.append(this.selectoptions[t]));0===i?this.input.addClass("error"):(this.input.removeClass("error"),1===i&&s.set("selected",!0)),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"]});
@@ -189,7 +189,12 @@ class cohort_role_assignments_table extends table_sql {
FROM {tool_cohortroles} uca
JOIN {user} u ON u.id = uca.userid
JOIN {cohort} c ON c.id = uca.cohortid";
$params = array();
// Check if any additional filtering is required.
[$sqlwhere, $params] = $this->get_sql_where();
if ($sqlwhere) {
$sql .= " WHERE {$sqlwhere}";
}
// Add order by if needed.
if (!$count && $sqlsort = $this->get_sql_sort()) {
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_cohortroles_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2020020600, 'tool', 'cohortroles');
}
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -2
View File
@@ -86,8 +86,8 @@ if ($removeid) {
$title = get_string('existingcohortroles', 'tool_cohortroles');
echo $output->heading($title);
$url = new moodle_url('/admin/tool/cohortroles/index.php');
$table = new tool_cohortroles\output\cohort_role_assignments_table(uniqid(), $url);
$table = new tool_cohortroles\output\cohort_role_assignments_table('cohort-role-assignments', $pageurl);
echo $table->out(50, true);
echo $output->spacer();
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -36,7 +36,7 @@ $string['customlang:view'] = 'View local translation';
$string['filter'] = 'Filter strings';
$string['filtercomponent'] = 'Show strings of these components';
$string['filtercustomized'] = 'Customised only';
$string['filtermodified'] = 'Modified only';
$string['filtermodified'] = 'Modified in this session only';
$string['filteronlyhelps'] = 'Help only';
$string['filtershowstrings'] = 'Show strings';
$string['filterstringid'] = 'String identifier';
+43 -26
View File
@@ -36,10 +36,10 @@ 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 */
protected static $components = null;
private static $components = null;
/**
* This class can not be instantiated
@@ -54,28 +54,30 @@ class tool_customlang_utils {
*/
public static function list_components() {
$list['moodle'] = 'core';
if (self::$components === null) {
$list['moodle'] = 'core';
$coresubsystems = core_component::get_core_subsystems();
ksort($coresubsystems); // should be but just in case
foreach ($coresubsystems as $name => $location) {
$list[$name] = 'core_'.$name;
}
$coresubsystems = core_component::get_core_subsystems();
ksort($coresubsystems); // Should be but just in case.
foreach ($coresubsystems as $name => $location) {
$list[$name] = 'core_' . $name;
}
$plugintypes = core_component::get_plugin_types();
foreach ($plugintypes as $type => $location) {
$pluginlist = core_component::get_plugin_list($type);
foreach ($pluginlist as $name => $ununsed) {
if ($type == 'mod') {
// Plugin names are now automatically validated.
$list[$name] = $type.'_'.$name;
} else {
$list[$type.'_'.$name] = $type.'_'.$name;
$plugintypes = core_component::get_plugin_types();
foreach ($plugintypes as $type => $location) {
$pluginlist = core_component::get_plugin_list($type);
foreach ($pluginlist as $name => $ununsed) {
if ($type == 'mod') {
// Plugin names are now automatically validated.
$list[$name] = $type . '_' . $name;
} else {
$list[$type . '_' . $name] = $type . '_' . $name;
}
}
}
self::$components = $list;
}
return $list;
return self::$components;
}
/**
@@ -89,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;
@@ -101,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));
}
@@ -211,14 +226,18 @@ class tool_customlang_utils {
return false;
}
// get all customized strings from updated components
list($insql, $inparams) = $DB->get_in_or_equal(self::list_components());
// Get all customized strings from updated valid components.
$sql = "SELECT s.*, c.name AS component
FROM {tool_customlang} s
JOIN {tool_customlang_components} c ON s.componentid = c.id
WHERE s.lang = ?
AND (s.local IS NOT NULL OR s.modified = 1)
AND c.name $insql
ORDER BY componentid, stringid";
$strings = $DB->get_records_sql($sql, array($lang));
array_unshift($inparams, $lang);
$strings = $DB->get_records_sql($sql, $inparams);
$files = array();
foreach ($strings as $string) {
@@ -336,11 +355,9 @@ EOF
* @return string|boolean filename eg 'moodle.php' or 'workshop.php', false if not found
*/
protected static function get_component_filename($component) {
if (is_null(self::$components)) {
self::$components = self::list_components();
}
$return = false;
foreach (self::$components as $legacy => $normalized) {
foreach (self::list_components() as $legacy => $normalized) {
if ($component === $normalized) {
$return = $legacy.'.php';
break;
+11 -2
View File
@@ -1,2 +1,11 @@
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
* @package tool_dataprivacy
* @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
+11 -2
View File
@@ -1,2 +1,11 @@
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
* @package tool_dataprivacy
* @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
+11 -2
View File
@@ -1,2 +1,11 @@
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
* @package tool_dataprivacy
* @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
+11 -2
View File
@@ -1,2 +1,11 @@
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
* @package tool_dataprivacy
* @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
+11 -2
View File
@@ -1,2 +1,11 @@
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
* @package tool_dataprivacy
* @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,11 @@
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
* @package tool_dataprivacy
* @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 * @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"],"names":["define","$","SELECTORS","EffectiveRetentionPeriod","purposeRetentionPeriods","registerEventListeners","prototype","on","ev","selected","currentTarget","val","selectedPurpose","this","text","bind","init","off"],"mappings":";;;;;;;;AAuBAA,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"}
+12 -2
View File
@@ -1,2 +1,12 @@
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
* @class events
* @package tool_dataprivacy
* @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 * @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"],"names":["define","approve","bulkApprove","deny","bulkDeny","complete"],"mappings":";;;;;;;;;AAwBAA,iCAAO,IAAI,iBACA,CACHC,QAAS,wCACTC,YAAa,6CACbC,KAAM,qCACNC,SAAU,0CACVC,SAAU"}
+12 -2
View File
@@ -1,2 +1,12 @@
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
* @class page-expand-contract
* @package tool_dataprivacy
* @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
+12 -2
View File
@@ -1,2 +1,12 @@
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
* @class form-user-selector
* @package tool_dataprivacy
* @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 * @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"],"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":";;;;;;;;;AAyBAA,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"}
+11 -2
View File
@@ -1,2 +1,11 @@
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
* @package tool_dataprivacy
* @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

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