Compare commits

..

2569 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 9650f3f56f Moodle release 3.4.9 2019-05-11 23:17:37 +02:00
Eloy Lafuente (stronk7) d44c73e438 weekly release 3.4.8+ 2019-05-10 20:31:09 +02:00
Eloy Lafuente (stronk7) 3020929da8 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2019-05-10 20:31:07 +02:00
Michael Hawkins 3f4f2da9e0 MDL-61738 messageinbound: Fix quota checks & filesize for email uploads
Private files uploaded by email will now honour the file quota limit,
because the filesize is set correctly and checked against users'
remaining personal quota limit. Previously, attachment size was always
set to zero, and quota was checked against the draft area (this is
not valid for email uploads, because each file is moved out of the
draft area as it is processed, so multiple files totalling greater
than the remaining quota would still pass the check).
2019-05-07 10:17:57 +08:00
Dan Marsden 5a89ac9640 MDL-64708 cohort: Return url is not used anywhere in core. 2019-05-01 17:40:37 +02:00
AMOS bot 6bbf56b9e2 Automatically generated installer lang files 2019-04-30 00:12:42 +00:00
AMOS bot 6be97cb9ac Automatically generated installer lang files 2019-04-27 00:13:00 +00:00
AMOS bot 2fc307e4d4 Automatically generated installer lang files 2019-04-13 00:13:38 +00:00
AMOS bot c426429a08 Automatically generated installer lang files 2019-04-09 00:11:40 +00:00
AMOS bot b848c97164 Automatically generated installer lang files 2019-04-09 00:11:40 +00:00
AMOS bot df5502034a Automatically generated installer lang files 2019-03-29 00:15:44 +00:00
AMOS bot c2c3db84b1 Automatically generated installer lang files 2019-03-25 00:09:40 +00:00
Sara Arjona 52bd62f2be Moodle release 3.4.8 2019-03-08 11:03:07 +01:00
Sara Arjona 53392df219 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2019-03-08 11:03:06 +01:00
AMOS bot 344386f873 Automatically generated installer lang files 2019-03-08 00:15:41 +00:00
Andrew Nicols 8a2e9542c9 MDL-64971 access: Ensure that the capability exists when fetching 2019-03-06 10:18:03 +08:00
AMOS bot 1f01b678df Automatically generated installer lang files 2019-03-06 00:09:48 +00:00
Jun Pataleta 90740716be Merge branch 'MDL-64799_34' of https://github.com/timhunt/moodle into MOODLE_34_STABLE 2019-03-05 15:52:15 +08:00
Shamim Rezaie 2cebb87682 MDL-64830 core_calendar: Do cap check on event edit form 2019-03-05 04:17:42 +01:00
Damyon Wiese 907b377e51 MDL-64651 comments: Do not send referrer
Use blanktarget option on all comments to prevent malicious links.
2019-03-05 04:17:42 +01:00
Viktor b77dcd23d8 MDL-62702 core_lib: fix broken verification signature 2019-03-05 04:17:42 +01:00
Mark Nelson 1a3612bb5b MDL-62702 core_lib: updated the 'ltiprovider' readme_moodle.txt 2019-03-05 04:17:42 +01:00
Brendan Cox fba7dcd90a MDL-62702 core_lib: parameters in POST override other LTI values
This fixes an exploit where you could alter the 'Content-Type' of the
request and bypass the case-sensitive check 'strstr'. For example,
setting it to 'application/x-www-FORM-urlencoded'. However, changing
this to use 'stristr' was also not an acceptable approach as you
could also bypass it by setting the value to 'multipart/form-data'.
2019-03-05 04:17:42 +01:00
Ryan Wyllie e836242e1c MDL-63786 core_my: prevent dashboard access when logged in as
Stop a "logged in as" session from accessing the user's dashboard
to prevent user JavaScript from being executed in the logged in
as session
2019-03-05 04:17:42 +01:00
Jun Pataleta 6f05d22622 Merge branch 'MDL-64652-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2019-03-05 11:13:03 +08:00
Andrew Nicols 141271b726 MDL-64652 mod_data: Break LEFT JOINs to multiple INNER 2019-03-05 10:32:22 +08:00
Andrew Nicols aae3a2fdd4 MDL-64652 glossary: Break LEFT JOINs to multiple INNER 2019-03-05 10:32:22 +08:00
Andrew Nicols abd634d64c MDL-64652 forum: Use an inner join when fetching ratings 2019-03-05 10:32:22 +08:00
Andrew Nicols e24f8994b5 MDL-64652 rating: Add optional inner join option to sql 2019-03-05 10:32:20 +08:00
Andrew Nicols d16e730116 MDL-64652 mod_forum: Performance improvement for provider
There are possibly some further improvements that can be made to:
- export_discussion_data
- export_all_posts
2019-03-05 10:31:51 +08:00
AMOS bot 3cc11668c8 Automatically generated installer lang files 2019-03-04 00:09:59 +00:00
AMOS bot 3c72d44b18 Automatically generated installer lang files 2019-03-01 00:16:04 +00:00
AMOS bot 4546269170 Automatically generated installer lang files 2019-02-27 00:09:59 +00:00
Tim Hunt ad4dfb1e8c MDL-64799 qtype_random: orphaned random questions should be deleted
This is a back-port of MDL-63260

This fix is based on some original code written by Bo Pierce.
2019-02-26 15:59:05 +00:00
AMOS bot 4f6373bf05 Automatically generated installer lang files 2019-02-16 00:14:36 +00:00
Andrew Nicols 31c05704b8 weekly release 3.4.7+ 2019-02-15 08:29:19 +08:00
Andrew Nicols 384c4c29db Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2019-02-15 08:29:17 +08:00
Jun Pataleta 2282d6932b Merge branch 'MDL-63892-34-rework' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2019-02-13 21:00:24 +08:00
Michael Hawkins 47265ccf62 MDL-63892 mod_forum: Behat update for post order 2019-02-13 17:02:29 +08:00
Jun Pataleta 2d0d9a4748 Merge branch 'MDL-64835-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2019-02-13 16:26:51 +08:00
Andrew Nicols 0cbb46b944 Merge branch 'MDL-63892-34-rework' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2019-02-13 10:20:13 +08:00
Andrew Nicols 3dcf5f9930 MDL-64835 JS: Reduce cache invalidation checks
The cache invalidation check was previously occuring every time either
the `set` or `get` function was called on the cache. However, the cache
invalidation check is based on the jsrev which is static for the
lifetime of the page.

This change moved the invalidation to happen during the setup of the AMD
module such that it only happens one time per storage type (Local +
Session).
2019-02-13 10:14:33 +08:00
Andrew Nicols 3456505930 MDL-64835 JS: Stop using the jsrev in the jsrevPrefix
We only use the jsrevPrefix to determine if the cache should be
invalidated, but the prefix that we were using is based on the new
jsrev.

For example, the jsrevPrefix will be:

    hash(wwwroot + '/ + config.jsrev) + '/jsrev'

Where config.jsrev is the _current_ (new) jsrev.

As a result when searching for the jsrev used to store the data which is
currently in the storage cache, no key is returned, and we instead set
an 'initial' value and the cache is not cleared

This patch changes the jsrevPrefix to be:

    hash(wwwroot) + '/jsrev'

Since the wwwroot does not change, the key remains static for the
current site. As a result, when the jsrev is bumped via a Moodle cache
purge, we are able to correctly fetch the old jsrev from the cache,
determine that the jsrev has changed, and purge the cache.
2019-02-13 10:14:33 +08:00
AMOS bot 18c80ae8a5 Automatically generated installer lang files 2019-02-13 00:12:01 +00:00
Michael Hawkins 4fccbafa46 MDL-63892 mod_forum: Updating lib unit test 2019-02-12 17:28:23 +08:00
Michael Hawkins 11fc8b3d02 MDL-63892 mod_forum: Fix last post details in forum view 2019-02-12 17:28:17 +08:00
Michael Hawkins 4e190d7eae MDL-63892 mod_forum: Correction to timestamp added to edit strings 2019-02-12 17:28:07 +08:00
Eloy Lafuente (stronk7) acd27d90c8 Merge branch 'MDL-64725-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2019-02-11 17:06:15 +01:00
Jun Pataleta d81447751e Merge branch 'MDL-64644_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2019-02-11 16:46:21 +08:00
Andrew Nicols eb3df7ecad Merge branch 'MDL-64597-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2019-02-11 16:34:30 +08:00
Mark Nelson a9d153e61d MDL-64644 completion: fixed assertions in privacy test 2019-02-11 14:11:05 +08:00
Mark Nelson c2c8ce4b6d MDL-64644 completion: set status correctly in provider 2019-02-11 14:11:05 +08:00
Mark Nelson 27f608a5c9 MDL-64644 completion: ensure we return array for provider 2019-02-11 14:11:04 +08:00
AMOS bot 181cf34341 Automatically generated installer lang files 2019-02-10 00:10:33 +00:00
Jun Pataleta 56c15f5c99 MDL-64725 composer: Use lowercase for package name of dev dependencies 2019-02-04 09:07:48 +08:00
Jun Pataleta 87711249c3 weekly release 3.4.7+ 2019-02-01 08:57:05 +08:00
Jun Pataleta 0a03b2fd63 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2019-02-01 08:57:04 +08:00
Eloy Lafuente (stronk7) 398c4c107d Merge branch 'MDL-64737-34-attoprivacysql' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2019-01-31 22:47:07 +01:00
David Mudrák 5789961754 MDL-64737 editor_atto: Fix the privacy export_user_data() implementation
Multiple issues fixed:

* Fixed order of the statements to avoid access to undefined variables.
* Fixed population of the SQL query parameter to make sure they match
  the placeholder in the query.
* Fixed missing table aliases in the second query to make sure the query
  actually works as expected.
2019-01-31 12:51:19 +01:00
David Mudrák 587a8a9732 MDL-64737 privacy: Fix privacy provider testsuite file names
Only files ending with "_test.php" suffix are implicit part of a
testsuite. So these two were not actually executed.
2019-01-31 12:51:19 +01:00
AMOS bot 53d0efba1f Automatically generated installer lang files 2019-01-30 00:10:32 +00:00
Eloy Lafuente (stronk7) 16045c4846 Merge branch 'MDL-64424-34-expiredfrontpage' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2019-01-29 23:48:55 +01:00
Jun Pataleta 57d2a28425 MDL-64597 behat: Properly import behat_util when dropping parallel sites 2019-01-24 12:51:35 +08:00
David Mudrák 33cbe249dd MDL-64424 privacy: Use system context purpose on the front page, too
For activities on the site's front page, use the purpose and retention
periods as defined for the system context, not for the courses.
2019-01-23 11:09:02 +01:00
AMOS bot 82e23b9443 Automatically generated installer lang files 2019-01-22 00:10:14 +00:00
Eloy Lafuente (stronk7) ea1d1cf9e1 Moodle release 3.4.7 2019-01-12 13:25:52 +01:00
Sara Arjona 7bd7754ad0 weekly release 3.4.6+ 2019-01-10 17:51:42 +01:00
Sara Arjona 734ce33b99 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2019-01-10 17:51:42 +01:00
AMOS bot 4f19471b9e Automatically generated installer lang files 2019-01-10 00:08:57 +00:00
Eloy Lafuente (stronk7) 78275d44f0 Merge branch 'MDL-64285-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2019-01-09 00:03:59 +01:00
Michael Hawkins cfde0b8d38 MDL-64395 groups: Added XSS Risk to the manage groups capability 2019-01-08 00:07:45 +01:00
Michael Hawkins 74746ce412 MDL-64372 userpix: Escape fullname string on userpix index page 2019-01-08 00:07:45 +01:00
Sara Arjona 5dd590a3bd MDL-64222 badge: Removed backpackurl from the edit_form 2019-01-08 00:07:45 +01:00
Andrew Nicols 7b97be9f25 Merge branch 'MDL-63276_34' of https://github.com/stronk7/moodle into MOODLE_34_STABLE 2019-01-08 06:56:50 +08:00
Mathew aaf4b2b489 MDL-49651 mod_forum: Respect course visibility in cron
This checks the courses' current visibility and the users permissions.
If they have the permission to view the course when it is hidden they'll get messages.

We already have checks for the users enrolled & subscription status.
2019-01-03 10:50:39 +08:00
Eloy Lafuente (stronk7) 5b1d246758 MDL-63276 environment: PHP 7.1 and Moodle 3.2 required 2019-01-03 01:19:15 +01:00
Eloy Lafuente (stronk7) 3aef542a35 MDL-63276 environment: 3.7 base information
This is a direct copy of the 3.6 branch to
have changes under control easier in next commits.
2019-01-03 01:19:15 +01:00
AMOS bot 07b8bb1ae7 Automatically generated installer lang files 2018-12-19 00:09:24 +00:00
Jun Pataleta 18c55facc0 MDL-64285 core: Fix environment check test
* Looping the environment results and skipping some items mean that
if a test gets skipped, the rest of the environment results won't be
tested. It's better to use a data provider for this in order to
individually test each environment result.
2018-12-13 16:46:53 +08:00
AMOS bot e8a62dc4c2 Automatically generated installer lang files 2018-12-07 00:09:43 +00:00
Eloy Lafuente (stronk7) b63c41d762 weekly release 3.4.6+ 2018-11-30 18:02:05 +01:00
Eloy Lafuente (stronk7) 1aa56ceaca Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-11-30 18:02:03 +01:00
Jun Pataleta fdf3d59a00 Merge branch 'MDL-64214-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-11-30 09:43:50 +08:00
Jun Pataleta f648211569 MDL-64214 calendar: Populate the groups select box on page load 2018-11-30 09:26:41 +08:00
Simey Lameze f8de60ce57 MDL-64214 calendar: fix failing unit tests 2018-11-30 09:26:41 +08:00
Simey Lameze 48b2284317 MDL-64214 core_calendar: fix event types form element handling 2018-11-30 09:26:41 +08:00
AMOS bot 1720738ca9 Automatically generated installer lang files 2018-11-30 00:07:50 +00:00
AMOS bot f6d48eeb87 Automatically generated installer lang files 2018-11-29 00:08:36 +00:00
David Monllao 66774319b3 weekly release 3.4.6+ 2018-11-28 11:23:17 +01:00
Eloy Lafuente (stronk7) c3238ac39b Merge branch 'MDL-64220-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-11-27 16:44:38 +01:00
David Monllao a922416edb Merge branch 'MDL-64205-34-sarunconfirmeduser' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-11-27 08:10:29 +01:00
Damyon Wiese fef96d285e MDL-64220 privacy: Clean path params
We need to consistently clean the path params before we use them. This
shows a difference on windows where dir separators are different.
2018-11-27 15:02:54 +08:00
Jun Pataleta bd38b68684 Merge branch 'MDL-64181-34-fix' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-27 14:43:27 +08:00
Andrew Nicols 8a5095d453 MDL-64181 core: Ensure that self is included in parentage 2018-11-27 14:42:52 +08:00
Jun Pataleta c9cd95223a Merge branch 'MDL-64181-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-11-27 11:44:46 +08:00
Damyon Wiese 80221982fa MDL-64181 javascript: Recursive template fix
This change prevents template rendering from waiting for itself, but does
allow it to wait for another async call to render.
2018-11-27 08:43:28 +08:00
David Mudrák 03edaa4290 MDL-64205 privacy: Delete orphaned data request records on upgrade
As a result of the bug, some requests can be orphaned - the linked user
record may not exist any more. This is a cleanup of such records.
2018-11-26 14:18:31 +01:00
David Mudrák 0401ae362c MDL-64205 users: Do not delete the actual records of unconfirmed users
There is an automatic data privacy request created to get rid of all the
personal data upon the user deletion. With the actual user record
absent, the data privacy requests page throws an error. Let's do here
same as we do in `delete_incomplete_users_task` and let us not delete
the actual user record.
2018-11-25 07:27:10 +01:00
Eloy Lafuente (stronk7) f5fcf31947 weekly release 3.4.6+ 2018-11-23 16:36:43 +01:00
Eloy Lafuente (stronk7) e5e3cb4577 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-11-23 16:36:41 +01:00
Jun Pataleta 999c187559 Merge branch 'MDL-64030-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-23 11:15:20 +08:00
AMOS bot b5fa0b3893 Automatically generated installer lang files 2018-11-23 00:07:40 +00:00
Andrew Nicols 9e75d8d7fc MDL-64030 tool_dataprivacy: Process requests when system purpose not set 2018-11-23 07:55:28 +08:00
Jun Pataleta 0f908de1e3 Merge branch 'MDL-64119-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-11-22 20:26:10 +08:00
Sara Arjona bbd79a469a MDL-64119 output: Use context of renderer_base's page object 2018-11-22 12:44:44 +01:00
Jun Pataleta a67ed33ed3 Merge branch 'MDL-64119-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-11-22 09:51:45 +08:00
Sara Arjona f757055b9f MDL-64119 user: Display full names consistently for teachers
Fix an error with users with the moodle/site:viewfullnames capability
in a course context (like teachers), to display properly the full
names in pages like the participants one.
2018-11-20 19:48:52 +01:00
David Monllao 1b1465210b weekly release 3.4.6+ 2018-11-20 12:55:10 +01:00
Jun Pataleta f06b51262f Merge branch 'MDL-63994-34-castoken' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-11-19 15:45:18 +08:00
Eloy Lafuente (stronk7) e4a6f46527 weekly release 3.4.6+ 2018-11-16 12:03:05 +01:00
Jun Pataleta ec12901c8c Merge branch 'MDL-63660-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-11-16 11:06:37 +08:00
Jun Pataleta b871a7a7e1 MDL-63660 tool_dataprivacy: Fix illegal whitespaces 2018-11-16 11:04:22 +08:00
Jun Pataleta 876302149f Merge branch 'MDL-63660-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-11-16 10:52:45 +08:00
Jun Pataleta 1164fa8370 MDL-63660 tool_dataprivacy: Increase expected export file size 2018-11-16 10:34:47 +08:00
Eloy Lafuente (stronk7) e087069258 Merge branch 'MDL-64012_34' of https://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-11-16 01:03:56 +01:00
David Mudrák 8275b2d502 MDL-63994 auth_cas: Include the login token in the simulated login form
The CAS login process relies on the standard authenticate_user_login()
call to set up the user. So we need to inject the login token to pass
the validation.
2018-11-15 21:26:24 +01:00
David Mudrák c49c373209 MDL-63994 login: Improve the logintoken param input
The logintoken is supposed to arrive as a part of the login form ($frm)
together with the username and password. So it should be handled the
same way - including the opportunity for the auth plugins to provide the
form data via the loginpage_hook().

This also implies that only logintoken coming as a part of the POST
request are taken into account, which is a good thing and another thin
layer in this security mechanism.
2018-11-15 21:26:24 +01:00
David Mudrák 2e80552524 MDL-63994 login: Clarify inline comments on loginpage_hook() usage
While working on the issue, I found these inline comments outdated and
confusing. The auth plugin types can implement a loginpage_hook()
method, the purpose of which is to inject the $user and/or $frm into
this login/index.php script. The new comments should make it more clear.

Note the second comment mentioned a prelogin_hook() which was an old
name of what is now called loginpage_hook(). It had nothing to do with
the existing pre_loginpage_hook() and was only confusing.
2018-11-15 21:26:23 +01:00
Mark Johnson d9cab9de67 MDL-63660 privacy: Include CSS locally for data export 2018-11-14 16:12:38 +00:00
Tim Hunt 6546fd1043 MDL-64012 filters: activity name autolinking fails for names with () 2018-11-14 16:07:54 +00:00
Eloy Lafuente (stronk7) 4c39ccf8a3 Merge branch 'MDL-63842-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-14 16:12:13 +01:00
David Monllao 270ba66408 weekly release 3.4.6+ 2018-11-13 13:10:53 +01:00
David Monllao 8fdf8a4ed5 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-11-13 13:10:51 +01:00
Damyon Wiese 9d7e968130 Merge branch 'MDL-63927_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-11-13 11:58:33 +08:00
AMOS bot 668e1a2ade Automatically generated installer lang files 2018-11-13 00:07:47 +00:00
Eloy Lafuente (stronk7) 8e3bb05807 Merge branch 'MDL-63907-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-11-12 12:09:11 +01:00
David Monllao 6d67532717 Merge branch 'MDL-63925-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-11-12 11:58:00 +01:00
David Monllao 529d402ca6 Merge branch 'MDL-63940-34-recaptchaurl' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-11-12 10:56:18 +01:00
David Monllao 6c9d494f35 Merge branch 'MDL-63823-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-11-12 10:10:13 +01:00
Simey Lameze 327acfdadb MDL-63823 tool_lpimportcsv: supress progress bar debugging 2018-11-12 09:54:05 +08:00
Eloy Lafuente (stronk7) d1e834866e Moodle release 3.4.6 2018-11-10 20:36:22 +01:00
Eloy Lafuente (stronk7) fc8544f5a8 weekly release 3.4.5+ 2018-11-10 12:53:19 +01:00
Eloy Lafuente (stronk7) cdb82d9b38 Merge branch 'MDL-63960-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-10 10:28:26 +01:00
Andrew Nicols fb14aa9291 MDL-63960 dataprivacy: Do not perform strict type checks for id
When inherit is specified in the data registry it is stored as a
string and we cannot perform a strict comparison with it.

We should still compare strict comparison checks against null, or false,
but not for the NOTSET (0) or INHERIT values (-1).
2018-11-10 15:34:11 +08:00
Eloy Lafuente (stronk7) b8d51a20e4 MDL-63919 tool_dataprivacy: admin & notify fixes
This includes the following:

1) Replace $ADMIN->id by get_admin()->id. The former doesn't exist.
2) Only change the notify parameter when it has not been specified
   at creation time (null). If specified, observe it.
3) Set the current user in tests to admin, able to create those
   requests.
2018-11-10 11:01:08 +08:00
Eloy Lafuente (stronk7) 6e3c97c71c Merge branch 'MDL-63596-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-10 03:51:53 +01:00
Andrew Nicols b5b4734ba0 MDL-63596 backup: Add missing include 2018-11-10 10:49:47 +08:00
Eloy Lafuente (stronk7) 14b0c3f56c Merge branch 'MDL-63596-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-09 19:33:05 +01:00
Damyon Wiese 6a8a4cb217 MDL-63596 backup: Deal with controller types
For privacy requests, deal with all 3 controller types.
2018-11-09 17:56:22 +08:00
Mihail Geshoski ec9b96c5b3 MDL-63596 core_backup: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-11-09 17:56:22 +08:00
Andrew Nicols a273b993e9 MDL-62564 tool_dataprivacy: Do not delete deleted user
This also ensures that we do not call delete_user on an already deleted
user.
2018-11-09 17:36:11 +08:00
cescobedo 3758b9c6ab MDL-63907 core_message: Pass user object to show_online_status.
Fix create_contact() to pass user object as parameter in show_online_status.
2018-11-09 10:02:18 +01:00
Jun Pataleta 693929f632 Merge branch 'MDL-63867-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-11-09 15:29:54 +08:00
Michael Hawkins 529f4cff0e MDL-63867 tool_dataprivacy: Add site purpose checks to tasks
If a site purpose is not defined, requests cannot be processed.
2018-11-09 15:21:39 +08:00
Michael Hawkins 052d678465 MDL-63867 tool_dataprivacy: Fix context expired/unprotected user check
It now checks the system context has been defined, since that is
required for data privacy to be set up correctly, and the check
to be valid. This also fixes an error being thrown when checking
pending delete requests in cron.
2018-11-09 15:21:39 +08:00
Jun Pataleta f00facd901 Merge branch 'MDL-63946-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-09 13:41:21 +08:00
Andrew Nicols 2c8c29f2d5 MDL-63946 plagirism: Filename typo fix 2018-11-09 13:25:33 +08:00
Jun Pataleta ce6d64be15 Merge branch 'MDL-63924-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-09 11:56:10 +08:00
Jun Pataleta f08e3a0cb9 Merge branch 'MDL-63942-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-09 11:42:29 +08:00
Peter 6adc784d16 MDL-62415 repo_filepicker: Display search results in tree view
Disable overriding call to list all files in tree view and show search results instead
2018-11-09 10:55:10 +08:00
Andrew Nicols 054e9ecbe4 Merge branch 'MDL-63919-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-11-09 10:53:18 +08:00
Jun Pataleta 5190239c44 Merge branch 'MDL-62589-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-09 10:36:37 +08:00
Andrew Nicols e5e418338e MDL-63942 dataprivacy: Disable deleted user task by default 2018-11-09 09:39:35 +08:00
Damyon Wiese 1d56c59038 Merge branch 'MDL-63671-34-2' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-11-09 09:14:30 +08:00
David Mudrák db1002a36a MDL-63940 recaptcha: Use www.recaptcha.net in the service endpoint URL
There are countries where www.google.com is a being blocked and
recaptcha does not work there. As shown at
https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally
it is enough to simply use www.recaptcha.net in the service endpoint
URL.
2018-11-08 22:59:38 +01:00
Eloy Lafuente (stronk7) 8e8029a4d0 Merge branch 'MDL-62564-integration-34-1' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-11-08 16:50:29 +01:00
Andrew Nicols 22aabbbc48 MDL-63924 privacy: Add shared user providers to subsytsems 2018-11-08 21:27:47 +08:00
Andrew Nicols 18f218dc3a MDL-63924 core_privacy: Add shared_userlist provider 2018-11-08 21:27:47 +08:00
Eloy Lafuente (stronk7) e48cc26687 MDL-63927 performance: Update the plan to support the new login token 2018-11-08 10:27:16 +01:00
Mihail Geshoski 0c3857ca51 MDL-63671 tool_cohortroles: Limit data to the system context in provider 2018-11-08 16:07:57 +08:00
Michael Hawkins a5f813e039 MDL-63925 privacy: Fixed Moodle URL in template 2018-11-08 15:54:43 +08:00
Mihail Geshoski 6ac295cd26 MDL-63919 privacy: Store the creation method of the data request 2018-11-08 14:50:22 +08:00
Mihail Geshoski 41a0a8f97f MDL-63919 privacy: Disable notifications for auto created data requests 2018-11-08 14:50:22 +08:00
Jun Pataleta d59a7b781f Merge branch 'MDL-63902-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-08 13:38:44 +08:00
Andrew Nicols 6be14b1ff0 MDL-62589 dataprivacy: Add ability to resubmit a request 2018-11-08 11:45:35 +08:00
Jun Pataleta ce6f4feac9 Merge branch 'MDL-63840-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-11-08 11:21:36 +08:00
Mihail Geshoski 42487b3544 MDL-62564 privacy: Create request for deleted users when setting enabled 2018-11-08 10:15:23 +08:00
Mihail Geshoski cef56ddf5e MDL-62564 privacy: Improve bulk deletion 2018-11-08 10:14:39 +08:00
Mihail Geshoski 28bb3a62bb MDL-62564 privacy: Add unit tests 2018-11-08 10:14:39 +08:00
Andrew Nicols 0878ecb537 MDL-63902 dataprivacy: Check course children not the course
When checking the expiry and protected state of a context, we need to do
so knowing what kind of use that context has.

If it is used in the user context, then only the user context matters.
If it is used within a course, then that child context must be checked
in relation to the course.
2018-11-08 09:13:15 +08:00
Andrew Nicols 6997ab6b25 MDL-62589 dataprivacy: Correct not in sql 2018-11-08 09:03:31 +08:00
Luca Bösch ab192796be MDL-63840 theme: block menu cog size. 2018-11-07 18:08:51 +01:00
Eloy Lafuente (stronk7) 3623efa604 Merge branch 'MDL-62294-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-11-07 17:25:54 +01:00
Dan Marsden 2ac7cdf32a MDL-63800 mod_assign: don't show grade if not set. 2018-11-07 15:28:32 +08:00
Damyon Wiese 7fb9023bec Merge branch 'MDL-63839_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-11-07 14:28:33 +08:00
Damyon Wiese ea5f2ed91d Merge branch 'MDL-63451_34' of https://github.com/peterspicer-catalyst/moodle into MOODLE_34_STABLE 2018-11-07 13:04:54 +08:00
Jun Pataleta a8e3df906d MDL-63183 auth_shibboleth: Don't render page when already logged in 2018-11-07 00:17:48 +01:00
Jun Pataleta daf0893181 MDL-63183 auth_shibboleth: Add hidden login token in guest login form 2018-11-07 00:17:48 +01:00
Damyon Wiese 8f3b93f686 MDL-63183 auth: Login protection
CSRF protection for the login form. The authenticate_user_login function was
extended to validate the token (in \core\session\manager) but by default it
does not perform the extra validation. Existing uses of this function from
auth plugins and features like "change password" will continue to work without
changes. New config value $CFG->disablelogintoken can bypass this check.
2018-11-07 00:17:48 +01:00
Eloy Lafuente (stronk7) ed2d5791ed Merge branch 'm34_MDL-63789_Search_SOLR_Fixes_Proxy_Auth' of https://github.com/scara/moodle into MOODLE_34_STABLE 2018-11-07 00:08:32 +01:00
Eloy Lafuente (stronk7) 75bcad753d weekly release 3.4.5+ 2018-11-06 19:06:41 +01:00
Eloy Lafuente (stronk7) 8f57f1940f Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-11-06 19:06:39 +01:00
Andrew Nicols bacac1e7e0 Merge branch 'MDL-63711-34-fix' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-11-06 14:21:37 +08:00
Jun Pataleta 496281a0b9 MDL-63711 core_grade: Use canonicalize for checking userlist IDs 2018-11-06 14:17:09 +08:00
Andrew Nicols 4d82bfa076 Merge branch 'MDL-62563-34-3' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-11-06 10:02:15 +08:00
AMOS bot aa3befa1e1 Automatically generated installer lang files 2018-11-06 00:07:33 +00:00
David Monllao 7b7665f35f Merge branch 'MDL-63711-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-11-05 16:35:58 +01:00
Eloy Lafuente (stronk7) 273486c49e Merge branch 'MDL-63748-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-11-05 13:11:59 +01:00
David Monllao d85a4a9900 Merge branch 'MDL-63764-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-11-05 12:46:42 +01:00
David Monllao 0b62f4608f Merge branch 'MDL-63700-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-11-05 11:14:04 +01:00
Mihail Geshoski 2115bda424 MDL-62563 privacy: Create delete data request for existing deleted users 2018-11-05 16:25:47 +08:00
Mihail Geshoski 7db764172f MDL-62563 privacy: Add unit tests 2018-11-05 16:22:15 +08:00
Andrew Nicols 9faabb3400 Merge branch 'MDL-63689-34-workshopprivacy' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-11-05 15:01:15 +08:00
Damyon Wiese a168c3ed17 Merge branch 'MDL-63717-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-11-05 13:45:58 +08:00
Andrew Nicols 41a03384f7 Merge branch 'MDL-63564-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-11-05 13:23:41 +08:00
Mark Nelson ba27222184 MDL-63839 core_message: use component name for Behat tag 2018-11-05 10:36:51 +08:00
Andrew Nicols c80fbc1762 Merge branch 'MDL-63712-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-11-05 09:34:55 +08:00
Eloy Lafuente (stronk7) 1955206566 Merge branch 'MDL-63818-34-2' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-11-05 00:03:25 +01:00
Matteo Scaramuccia 3899e71bf2 MDL-63789 search_solr: use proxy creds, if any
Also use proxy port, IF any.
2018-11-02 23:35:37 +01:00
Eloy Lafuente (stronk7) ea40b6fb60 weekly release 3.4.5+ 2018-11-02 21:08:34 +01:00
Adrian Greeve e606b429f3 MDL-63711 core_grades: Delete data for specified users in a context. 2018-11-03 03:04:18 +08:00
Juan Leyva 3d4bef51fa MDL-63748 core_auth: Fix redirect parameter being ignored 2018-11-02 15:25:33 +01:00
Juan Leyva 95733c47af MDL-63717 tool_mobile: Ensure URLs are valid
We need to clean the URLs returned by the get_public_config WS because some old plugins didn't validate the stored data.
2018-11-02 14:35:41 +01:00
Mihail Geshoski 030cc62697 MDL-63564 core_question: Avoid using UNION in get_users_in_context() 2018-11-02 14:40:53 +08:00
Shamim Rezaie 465256bf63 MDL-63564 mod_quiz: Added delete_quizaccess_data_for_users to polyfill
This issue is a part of the MDL-62560 Epic.
2018-11-02 14:40:52 +08:00
Shamim Rezaie 80ea64da26 MDL-63564 mod_quiz: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-11-02 14:40:52 +08:00
Shamim Rezaie 92efc5c352 MDL-63564 mod_quiz: Added quizaccess_user_provider interface
This issue is a part of the MDL-62560 Epic.
2018-11-02 14:40:52 +08:00
Shamim Rezaie 53ccb0ac47 MDL-63564 question: Add helper to fetch users in context
This issue is a part of the MDL-62560 Epic.
2018-11-02 14:40:52 +08:00
Shamim Rezaie a04d18dbaa MDL-63564 core_question: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-11-02 14:40:51 +08:00
Andrew Nicols 7453948947 Merge branch 'MDL-63701-34-1' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-11-02 12:03:51 +08:00
Andrew Nicols f7f4e3022c Merge branch 'MDL-63666-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-11-02 10:53:13 +08:00
Mihail Geshoski 3725fa78d4 MDL-63666 logging: Rename delete_data_for_all_users() function 2018-11-02 09:42:32 +08:00
Adrian Greeve d86001b150 MDL-63666 logging: Add support for removal of context users.
This creates a new interface for the logging subplugins to
implement for the users to be deleted separately.
2018-11-02 09:42:32 +08:00
Andrew Nicols 622be7e630 MDL-63842 core_user: Remove unnecessary DB fetch 2018-11-02 09:08:07 +08:00
Andrew Nicols 99f56b6847 Merge branch 'MDL-63703-34-1' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-11-02 09:01:00 +08:00
Andrew Nicols d0851ea944 MDL-63702 core_block: Correct phpdoc for get_users 2018-11-02 08:35:07 +08:00
Andrew Nicols a6589f69f5 MDL-63422 blog: Correct phpdoc for get_users 2018-11-02 08:35:07 +08:00
Andrew Nicols 18a1d5100f Merge branch 'MDL-63816-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-11-02 08:01:06 +08:00
Eloy Lafuente (stronk7) b5d14e08a2 Merge branch 'MDL-63746-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-11-01 15:38:48 +01:00
Andrew Nicols 036efee8b5 MDL-63818 core: Add all relevant module context caps
This change ensures that all capabilities at module context level are
shown within a module, only filtering out those which belong to another
module or the subplugins of another module.

This has the effect that module-level capabilities are included
providing they relate to
- the module being queried
- any subplugin of that module
- any capability at module level which does not belong to another module
  or its subplugin
- any other explicitly included capability

This allows permissions to be defined on a capability at a context
level.
2018-11-01 20:52:20 +08:00
Michael Hawkins 9898c108a3 MDL-63712 core_message: Unit test improvements for fetching context/user
This issue is part of the MDL-62560 Epic.
2018-11-01 16:55:16 +08:00
Michael Hawkins a05d4df146 MDL-63712 core_message: Minor provider improvements
This issue is part of the MDL-62560 Epic.
2018-11-01 16:13:49 +08:00
Shamim Rezaie 23d4767f8c MDL-63712 core_message: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-11-01 14:52:28 +08:00
Shamim Rezaie 734d9f403b MDL-63712 core_message: Data should be in user context, not system
This issue is a part of the MDL-62560 Epic.
2018-11-01 14:52:18 +08:00
Mihail Geshoski 708dd97405 MDL-63701 editor_atto: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-11-01 14:21:26 +08:00
Mihail Geshoski dfc0106255 MDL-63703 core_role: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-11-01 12:14:07 +08:00
Damyon Wiese 39e707450a MDL-63746 boost: Dropdown menu styles
Show focus outlines when a menu button has focus.

Remove btn styling from menu buttons as the additional padding makes things not line up.
2018-11-01 11:07:40 +08:00
Andrew Nicols 850050ed87 Merge branch 'MDL-63566-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-11-01 10:16:32 +08:00
Adrian Greeve 63ca7583d6 MDL-63566 tool_dataprivacy: New interface check for userlist.
This adds another check to see if the plugins are implementing the
new core_userlist_provider.
2018-11-01 10:09:17 +08:00
Jun Pataleta bf81ba3456 Merge branch 'MDL-63826_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-11-01 09:28:13 +08:00
Eloy Lafuente (stronk7) 6a4e92da5c MDL-63826 tests: Don't rely on random array keys for testing 2018-11-01 00:34:55 +01:00
Andrew Nicols 7e163a6473 Merge branch 'm34_MDL-63727_Wrong_SCO_Launched_Link' of https://github.com/scara/moodle into MOODLE_34_STABLE 2018-11-01 07:02:36 +08:00
Matteo Scaramuccia 925c732053 MDL-63727 mod_scorm: Fixed typo in test_launch_sco() 2018-10-31 22:40:56 +01:00
Davo Smith 035c8b349c MDL-63727 mod_scorm: fix typo in sco_launched URL 2018-10-31 22:40:56 +01:00
David Monllao 39ce011f9d Merge branch 'MDL-63726-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-10-31 10:22:21 +01:00
Luca Bösch 4f32e3af8c MDL-63726 tool_dataprivacy: En-/disable 'Data retention summary' link 2018-10-31 09:10:40 +01:00
Andrew Nicols ae7c8cd2e0 Merge branch 'MDL-63684-34-1' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-31 15:18:09 +08:00
Mihail Geshoski d57c7e7c94 MDL-63684 core_calendar: Fix test_get_contexts_for_userid() test
This issue is part of the MDL-62560 Epic.
2018-10-31 14:12:20 +08:00
Mihail Geshoski 9b669f6787 MDL-63684 core_calendar: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-31 14:12:20 +08:00
Andrew Nicols 0cdf08265a Merge branch 'MDL-63702-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-31 14:07:48 +08:00
Michael Hawkins 684740b24e MDL-63700 core_analytics: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-31 13:48:33 +08:00
David Monllao a2890d9301 Merge branch 'MDL-62601-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-10-31 06:47:48 +01:00
Andrew Nicols e2f33953c8 MDL-62601 core_privacy: Ensure providers can handle deleted users 2018-10-31 13:45:00 +08:00
Andrew Nicols 534842a3a1 MDL-62601 editor_atto: Do not use context_user 2018-10-31 13:45:00 +08:00
Jun Pataleta e5a82f8e18 Merge branch 'MDL-63690-34-integration' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-31 12:52:09 +08:00
Michael Hawkins 646de1f8a8 MDL-63816 privacy: Corrected provider get_users_in_context descriptions 2018-10-31 12:14:41 +08:00
Michael Hawkins 51c8b3543f MDL-63816 privacy: Corrected interface get_users_in_context description 2018-10-31 12:14:41 +08:00
Mihail Geshoski 7aed850593 MDL-63690 core_blog: Handle when user blog posts are not being returned 2018-10-31 11:51:47 +08:00
Jun Pataleta ba6125b60f Merge branch 'MDL-60897-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-10-31 11:33:54 +08:00
Andrew Nicols 3f557f8beb Merge branch 'MDL-63624-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-31 11:22:29 +08:00
Mihail Geshoski 589bfad95e MDL-63624 tool_cohortroles: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-31 11:09:56 +08:00
Adrian Greeve 69e66bf86f MDL-63702 core_block: Update to use new userlist interface.
This allows user data to be deleted on a role basis.
2018-10-31 10:05:34 +08:00
Jun Pataleta 7a132e9418 MDL-60897 qtype_multianswer: Code style fixes
And Behat steps improvement, too!
2018-10-31 09:57:18 +08:00
Jean-Michel Vedrine 0a76c61d4e MDL-60897 qtype_multianswer: Invalid cloze-questions saved to db 2018-10-31 09:52:41 +08:00
Andrew Nicols 45def3e813 Merge branch 'MDL-63530-34-2' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-31 09:22:46 +08:00
Andrew Nicols 8c75fc2dd7 Merge branch 'MDL-63606-34-2' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-31 08:56:52 +08:00
Andrew Nicols f47eb4322a Merge branch 'MDL-63690-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-31 08:28:08 +08:00
Eloy Lafuente (stronk7) 4b681328f3 weekly release 3.4.5+ 2018-10-30 18:24:03 +01:00
David Mudrák 2ca0f3f174 MDL-63689 workshop: Add support for removal of multiple context users
The mod_workshop\privacy\provider now implements the new
core_userlist_provider interface. Deleting (erasing) data follows the
same principles as in other existing methods - we do not actually delete
data that might affect other users. Instead, we only erase the sensitive
owned personal information such as provided content.
2018-10-30 14:35:45 +01:00
Mihail Geshoski c2a596ba08 MDL-63606 core_badges: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-30 16:42:36 +08:00
Mihail Geshoski 66ec209ac6 MDL-63530 core_notes: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-30 16:19:40 +08:00
Andrew Nicols d2f8852662 Merge branch 'MDL-63634-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-10-30 12:05:58 +08:00
Andrew Nicols 1873af51cc Merge branch 'MDL-63626-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-10-30 10:59:54 +08:00
Jun Pataleta f54f0adc7f Merge branch 'MDL-63531-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-10-30 10:50:39 +08:00
Adrian Greeve 3a0288dfef MDL-63531 privacy: Update to comments provider to simplfy sql.
This updates the get_users_in_context_from_sql query to include
the context id to simplify the calls made from other components.
2018-10-30 09:47:14 +08:00
Adrian Greeve 45bcb6111e MDL-63531 assignfeedback: Update to use the new privacy interface.
This now uses the new interface to allow the deletion of users based
on a context.
2018-10-30 09:47:14 +08:00
Adrian Greeve cc678d7593 MDL-63531 assignsubmission: Update to use the new interface.
This updates the plugins to use the new inteface for deleting
data for users in a context.
2018-10-30 09:47:14 +08:00
Andrew Nicols 26babcb57b Merge branch 'MDL-63656-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-10-30 09:36:14 +08:00
Adrian Greeve da8d77b521 MDL-63531 mod_assign: Update mod assign to use new interface.
This introduces a new interface for assign sub-plugins and
updates the mod_assign provider to implement the new general
interface for deleting data for users in a context.
2018-10-30 08:48:07 +08:00
Eloy Lafuente (stronk7) 572bd2fb5e Merge branch 'MDL-63730-34-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-10-29 13:19:41 +01:00
David Monllao 4ab60c91f4 Merge branch 'MDL-63528-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-10-29 11:18:32 +01:00
Michael Hawkins ed40358c90 MDL-63656 tool_messageinbound: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-29 14:16:08 +08:00
Michael Hawkins 99eefdd8b2 MDL-63764 core_competency: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-29 13:03:13 +08:00
Michael Hawkins b463e023b2 MDL-63764 core_competency: Support bulk user delete course competencies
This issue is a part of the MDL-62560 Epic.
Also made user IDs optional, so user course competencies can be deleted by course ID only.
2018-10-29 13:03:13 +08:00
Jun Pataleta 747e8433e5 Merge branch 'MDL-63622-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-10-29 11:43:45 +08:00
Adrian Greeve 793f109279 MDL-63622 core_grading: Add support for removal of context users.
Core grading now implements the new core_userlist_provider
interface to allow for deletion of specific users in a context.
2018-10-29 09:20:37 +08:00
Andrew Nicols 7ce597a687 Merge branch 'MDL-63665-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-10-29 09:15:23 +08:00
Andrew Nicols 30c5170ec2 Merge branch 'MDL-63680-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-29 08:40:57 +08:00
Andrew Nicols 65c19b684c Merge branch 'MDL-63267-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-10-27 19:22:18 +08:00
Tim Lock e250be6d66 MDL-63267 tool_privacy: Handle modules without privacy support. 2018-10-26 18:33:01 -04:00
Adrian Greeve d7ac44446e MDL-63267 grading methods: Unit test update for fix. 2018-10-26 18:33:01 -04:00
Adrian Greeve 47e0ed7b3e MDL-63267 grading methods: Fix for multiple intances.
We were only exporting the one instance per item id.
Instead we should have been exporting all instances for each
item id.
2018-10-26 18:33:01 -04:00
Adrian Greeve f6020ec3aa MDL-63267 tool_dataprivacy: Registry shows deprecated interfaces. 2018-10-26 18:33:01 -04:00
Adrian Greeve a97a654851 MDL-63267 privacy: Create deprecated provider interface.
Any interfaces that have become deprecated should extend
this interface.
2018-10-26 18:33:01 -04:00
Adrian Greeve 8f31f87f2f MDL-63267 core_grading: Unit test for new methods. 2018-10-26 18:33:01 -04:00
Adrian Greeve 327707245c MDL-63267 mod_assign: Update to providers to include adv grading. 2018-10-26 18:33:01 -04:00
Adrian Greeve 152a5227b9 MDL-63267 core_grading: Update to providers and interface.
The previous interface was inadequate for retrieving user
information stored in the sub-plugins.

A new interface and methods have been added to successfully
deal with user data.
2018-10-26 18:33:01 -04:00
Eloy Lafuente (stronk7) a8c87c20e9 weekly release 3.4.5+ 2018-10-26 18:05:04 +02:00
David Mudrák 54944a93f7 MDL-63730 lang: Update Behat scenarios to use the new strings 2018-10-26 14:02:01 +02:00
Helen Foster 82047d18a6 MDL-63730 lang: Merge English strings from the en_fix language pack
Significant string changes:

* withselectedusers_help, core - removing mention of 'Add a common note'
  as the option no longer exists
* considereddigitalminor and digitalminor_desc, core - more
  child-friendly wording
* auth_dbtype, auth_db - fixed broken link
2018-10-26 14:00:43 +02:00
Shamim Rezaie 0eb0612886 MDL-63634 enrol_paypal: Improve query performance
This issue is a part of the MDL-62560 Epic.
2018-10-26 19:36:56 +11:00
Shamim Rezaie 9109e547ae MDL-63634 enrol_paypal: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-10-26 19:36:56 +11:00
Shamim Rezaie ded33b32cc MDL-63634 enrol_paypal: Fix a typo in unit tests
This issue is a part of the MDL-62560 Epic.
2018-10-26 19:36:56 +11:00
Eloy Lafuente (stronk7) 48bc997f74 Merge branch 'MDL-63765-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-26 10:22:49 +02:00
Damyon Wiese 7fa74a2020 MDL-63765 behat: Fix behat tests opening a menu
If javascript is disabled, we don't need to open the menus at all. If it is enabled
we should use the custom step where possible.

In some tests (user profile) we have to use link_or_button because
the element that opens the menu will be a link or a button in different themes.
2018-10-26 16:15:02 +08:00
Shamim Rezaie 821a5d9efb MDL-63665 mod_choice: no exception when course_modules doesn't exist
This issue is a part of the MDL-62560 Epic.
2018-10-26 18:49:51 +11:00
Shamim Rezaie 89c6cddff5 MDL-63665 mod_choice: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-10-26 18:49:51 +11:00
Mihail Geshoski 05aca6a266 MDL-63680 report_stats: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-26 13:09:43 +08:00
Andrew Nicols 323c407874 Merge branch 'MDL-63673-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-26 11:42:29 +08:00
Andrew Nicols 0ada140505 Merge branch 'MDL-63682-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-26 11:03:46 +08:00
Mihail Geshoski e936dd2040 MDL-63682 mnetservice_enrol: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-26 10:24:50 +08:00
Andrew Nicols d505813ce6 Merge branch 'MDL-63688-34-1' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-26 10:17:53 +08:00
Mihail Geshoski f41f2d53cf MDL-63690 core_privacy: Handle when add_users() receives an empty array 2018-10-26 09:28:03 +08:00
Adrian Greeve f32c037c7a MDL-63690 core_blog: Update providers for userlist deletion. 2018-10-26 09:27:44 +08:00
Eloy Lafuente (stronk7) f2d07ac911 Merge branch 'MDL-62904-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-10-26 00:04:01 +02:00
Andrew Nicols 01189bf5a4 Merge branch 'MDL-63552-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-10-25 15:45:31 +08:00
Andrew Nicols 632aac365f Merge branch 'MDL-63679-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-25 15:36:00 +08:00
Andrew Nicols fe3a63d8a4 Merge branch 'MDL-63655_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-10-25 14:57:37 +08:00
Michael Hawkins d22b87614d MDL-63552 search_solr: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-25 11:56:38 +08:00
Eloy Lafuente (stronk7) 6522b3d418 Merge branch 'MDL-62145-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-25 01:35:30 +02:00
Eloy Lafuente (stronk7) 526b2cfc90 Merge branch 'MDL-63714-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-10-25 00:11:09 +02:00
Mihail Geshoski 81fa52d9ca MDL-63688 core_tag: Add method that returns users in context
This issue is part of the MDL-62560 Epic.
2018-10-24 09:28:11 +08:00
Andrew Nicols bcbc20b6d9 MDL-63619 tool_dataprivacy: Cache purposes in form 2018-10-24 08:49:43 +08:00
Andrew Nicols 7646385cdc MDL-63619 tool_dataprivacy: Performance improvement 2018-10-24 08:49:43 +08:00
Andrew Nicols 737a2f46ce MDL-63619 tool_dataprivacy: Fix inheritance from parent contexts
Inheritance should behave such that all contexts inherit from their
parent context.

Prior to this fix, if the value was not set on a context, then it was
getting a default of 'Inherit', but instead of inheritting from the
parent context, it was inheritting from its parent context _level_ which
is just wrong.
2018-10-24 08:49:43 +08:00
Andrew Nicols 98e2aa1669 MDL-63714 javascript: Add new core/pending module 2018-10-24 08:44:06 +08:00
Andrew Nicols 5be7156473 MDL-63714 core: Wrap doRender in pendingjs 2018-10-24 08:44:06 +08:00
Andrew Nicols 4e30dbbef2 MDL-63714 javascript: Improve docs for pendingjs 2018-10-24 08:44:06 +08:00
Mihail Geshoski b36794f0f8 MDL-63673 fileconverter_googledrive: Support removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-24 07:04:50 +08:00
David Monllao 7fff8f46e8 weekly release 3.4.5+ 2018-10-23 16:39:23 +02:00
David Monllao 22f9a36ead Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-10-23 16:39:22 +02:00
David Monllao 50d6a67262 Merge branch 'MDL-62139-34-fix3' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-23 11:17:24 +02:00
Damyon Wiese 1d97b8af8a MDL-62139 behat: Invalid test
If javascript is disabled, we can't open the menu.
2018-10-23 16:35:03 +08:00
Damyon Wiese e93868b26e MDL-62139 output: Revert template changes
Revert accessibility changes for menus in standard themes.
2018-10-23 10:15:36 +02:00
Damyon Wiese c47dbbbd5d MDL-62139 output: Revert template changes
Revert accessibility changes for menus in standard themes.
2018-10-23 15:50:23 +08:00
Mihail Geshoski 73069b9b59 MDL-63679 ltiservice_memberships: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 13:37:05 +08:00
Andrew Nicols 65b16113c0 MDL-63657 completion: Coding style fix 2018-10-23 11:33:23 +08:00
Andrew Nicols a2572fb75c Merge branch 'MDL-63668-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-10-23 11:33:08 +08:00
Andrew Nicols 6d3187bec4 MDL-63657 core_files: Coding style fix 2018-10-23 11:27:56 +08:00
Andrew Nicols b25a9d2ce0 Merge branch 'MDL-63640-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-23 11:27:48 +08:00
Andrew Nicols 6e27e3201f MDL-63657 tool_mobile: Coding style fix 2018-10-23 11:22:43 +08:00
Andrew Nicols 7448bba870 Merge branch 'MDL-63657-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-10-23 11:22:25 +08:00
Andrew Nicols a83e5b8f03 MDL-63535 core_rss: Coding style fix 2018-10-23 11:17:53 +08:00
Andrew Nicols b3e8985ce9 Merge branch 'MDL-63535-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-10-23 11:17:11 +08:00
Michael Hawkins 61d6025b0e MDL-63657 tool_mobile: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-23 11:02:24 +08:00
Andrew Nicols d5ec4f8378 MDL-63664 tool_policy: Whitespace fix 2018-10-23 10:53:57 +08:00
Andrew Nicols c90f269158 Merge branch 'MDL-63664-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-10-23 10:52:04 +08:00
Michael Hawkins f2423ec4df MDL-63668 core_course: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-23 10:45:29 +08:00
Michael Hawkins ff3a01cdac MDL-63668 core_completion: Add get and delete by approved userlist.
This issue is a part of the MDL-62560 Epic.
2018-10-23 10:45:29 +08:00
Michael Hawkins 13bcb76d5a MDL-63664 tool_policy: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-23 10:40:13 +08:00
Mihail Geshoski 1ad86e27d0 MDL-63535 core_userkey: Add method that returns users in context
This issue is part of the MDL-62560 Epic.
2018-10-23 10:29:50 +08:00
Mihail Geshoski 8fbb8bc0fd MDL-63535 core_rss: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 10:29:50 +08:00
Andrew Nicols 83edd966a1 Merge branch 'MDL-63649-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-10-23 10:19:40 +08:00
Mihail Geshoski 5ee7ec1b9c MDL-63640 core_files: Add method that returns users in context
This issue is part of the MDL-62560 Epic.
2018-10-23 10:12:12 +08:00
Andrew Nicols b3ad855ded Merge branch 'MDL-63713-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-10-23 10:09:32 +08:00
Shamim Rezaie e5a542a73e MDL-63649 enrol_lti: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-10-23 13:06:46 +11:00
Shamim Rezaie 991aa49b7b MDL-63713 core: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 13:05:49 +11:00
Andrew Nicols a9564af46a MDL-62560 tool_dataprivacy: Behat fix for protected check 2018-10-23 09:21:56 +08:00
David Monllao 1378ac0662 Merge branch 'MDL-62144-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-22 16:35:33 +02:00
David Monllao 10dfab520c Merge branch 'MDL-61052-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-22 14:37:40 +02:00
David Monllao 6118d537c3 Merge branch 'MDL-62560-34' into MOODLE_34_STABLE 2018-10-22 13:01:36 +02:00
Andrew Nicols 674b262d9e MDL-62560 tool_dataprivacy: Add a purpose override cache 2018-10-22 13:01:18 +02:00
Andrew Nicols b8fa9168ba MDL-62560 tool_dataprivacy: Fetch user purpose once 2018-10-22 13:01:17 +02:00
Andrew Nicols aefebb9f84 MDL-62560 tool_dataprivacy: Add status logging 2018-10-22 13:01:17 +02:00
Andrew Nicols dc59b9475d MDL-62560 tool_dataprivacy: Add unit test for filtered userlist 2018-10-22 13:01:17 +02:00
Mihail Geshoski a4cca8f5e3 MDL-63636 block_recent_activity: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:16 +02:00
Mihail Geshoski 023ff07502 MDL-63621 core_cohort: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:16 +02:00
Mihail Geshoski 8f71325a00 MDL-63633 block_comments: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:15 +02:00
Mihail Geshoski 9a1fd38274 MDL-63635 block_community: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:15 +02:00
Mihail Geshoski 8bae3f76d8 MDL-63593 auth_mnet: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:14 +02:00
Mihail Geshoski 6882588c8f MDL-63592 auth_oauth2: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:14 +02:00
Mihail Geshoski 6372d0c328 MDL-63637 block_rss_client: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:13 +02:00
Mihail Geshoski f7c431b2a5 MDL-63638 block_tag_flickr: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:13 +02:00
Mihail Geshoski f359a73542 MDL-63639 core_fileconverter: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:12 +02:00
Shamim Rezaie fd239233c7 MDL-63647 enrol_flatfile: Improving existing unit tests
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:01:12 +02:00
Shamim Rezaie 88e2805888 MDL-63647 enrol_flatfile: support removal of multiple users in context
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:01:11 +02:00
Michael Hawkins c1d856ed28 MDL-63659 tool_monitor: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:01:11 +02:00
Mihail Geshoski fe3c821528 MDL-63615 message_airnotifier: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:10 +02:00
Mihail Geshoski 23d749161a MDL-63616 message_email: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:10 +02:00
Mihail Geshoski f335392b2f MDL-63617 message_jabber: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:01:10 +02:00
Adrian Greeve 5f136c284a MDL-63618 core_plagiarism: Added support to remove users in a context.
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:34 +02:00
Mihail Geshoski fdef31e3c5 MDL-63572 profilefield_checkbox: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:34 +02:00
Mihail Geshoski a33f0b6b18 MDL-63575 profilefield_datetime: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:33 +02:00
Mihail Geshoski 5b71e0236f MDL-63586 profilefield_menu: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:33 +02:00
Mihail Geshoski 376c39da69 MDL-63587 profilefield_text: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:32 +02:00
Mihail Geshoski 68eabea2f9 MDL-63588 profilefield_textarea: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:32 +02:00
Michael Hawkins fcdb29da6c MDL-63538 repository_onedrive: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:31 +02:00
Michael Hawkins 6840d1b424 MDL-63538 repository_youtube: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:31 +02:00
Michael Hawkins 20e16adcde MDL-63538 repository_wikimedia: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:30 +02:00
Michael Hawkins 9d8e74cc4a MDL-63538 repository_picasa: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:30 +02:00
Michael Hawkins edd54f38c3 MDL-63538 repository_merlot: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:30 +02:00
Michael Hawkins 6f0f9e9816 MDL-63538 repository_googledocs: Support removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:29 +02:00
Michael Hawkins 0967aa3fde MDL-63538 repository_flickr_public: Support removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:29 +02:00
Michael Hawkins fbfb768f07 MDL-63538 repository_flickr: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:28 +02:00
Michael Hawkins f4b06c4fb3 MDL-63538 repository_dropbox: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:28 +02:00
Michael Hawkins 19f8412015 MDL-63538 repository_boxnet: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:28 +02:00
Mihail Geshoski 7e6bcd9424 MDL-63536 core_repository: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:27 +02:00
Mihail Geshoski 4db5681054 MDL-63534 core_user: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:27 +02:00
Mihail Geshoski 4a973080dd MDL-63532 core_portfolio: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:26 +02:00
Mihail Geshoski 85439fc637 MDL-63529 core_enrol: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:26 +02:00
Michael Hawkins 1b8dd3096e MDL-63514 mod_wiki: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:26 +02:00
Michael Hawkins 461b388358 MDL-63510 mod_survey: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:25 +02:00
Michael Hawkins 7de1d37f80 MDL-63501 mod_scorm: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:25 +02:00
Michael Hawkins 200916ba98 MDL-63497 mod_lesson: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:24 +02:00
Michael Hawkins c79943ca14 MDL-63497 mod_feedback: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:24 +02:00
Michael Hawkins ebbf35d9a2 MDL-63497 mod_glossary: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
Also added missing ratings include and test to mod_glossary unit tests.
2018-10-22 13:00:24 +02:00
Michael Hawkins c445946955 MDL-63497 mod_data: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:23 +02:00
Michael Hawkins 2642039f65 MDL-63497 block_html: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:23 +02:00
Michael Hawkins 9e96c5292a MDL-63497 mod_chat: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:22 +02:00
Shamim Rezaie 518ebb3323 MDL-63554 cachestore_memcache: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:22 +02:00
Shamim Rezaie 1335e0bc3e MDL-63554 cachestore_session: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:22 +02:00
Shamim Rezaie 6ea63bc54c MDL-63554 cachestore_redis: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:21 +02:00
Shamim Rezaie e3b6fe667d MDL-63554 cachestore_mongodb: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:21 +02:00
Shamim Rezaie 699847af7b MDL-63554 cachestore_memcached: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:20 +02:00
Shamim Rezaie 5a49fe3f51 MDL-63500 enrol_cohort: refactoring get_contexts_for_userid
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:20 +02:00
Shamim Rezaie 3fcb71bd53 MDL-63500 enrol_meta: refactoring get_contexts_for_userid
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:19 +02:00
Shamim Rezaie 3afb545307 MDL-63500 core_group: get_contexts_for_userid should respect component
The get_contexts_for_userid method should not return contexts for all group memberships.
It should only return the contexts in where there is manual group
membership.

This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:19 +02:00
Shamim Rezaie cfe3ba39e8 MDL-63500 enrol_cohort: Support for removal of multiple context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:19 +02:00
Shamim Rezaie 1b0fc6098e MDL-63500 enrol_meta: Support for removal of multiple context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:18 +02:00
Shamim Rezaie 8f30bd5945 MDL-63500 core_group: support removal of multiple users in a context
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:18 +02:00
Mihail Geshoski 181da22a4d MDL-63533 core_webservice: Unit tests for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:17 +02:00
Mihail Geshoski 549232ade8 MDL-63533 core_webservice: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:17 +02:00
Adrian Greeve 7a5ad3c9f1 MDL-63513 mod_assignment: Add removal of context users.
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:17 +02:00
Michael Hawkins 1b78edeb44 MDL-63498 mod_lti: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 13:00:16 +02:00
Michael Hawkins 37dffc7b4d MDL-63495 comment: Added provider::get_users_in_context_from_sql
This issue is a part of the MDL-62560 Epic.
2018-10-22 13:00:07 +02:00
Damyon Wiese 1ec78d3549 MDL-61052 assign: Do not queue conversions
Identical submissions do not require individual conversions from the document converter. Text passing through
format_text cannot be trusted and is likely to be unique each time, even for the same text.
2018-10-22 12:03:40 +08:00
Zig Tan 3b34e951b9 MDL-61052 assign: Improve strip_images() to avoid HTML5 tags errors 2018-10-22 12:02:51 +08:00
Damyon Wiese 8be7d9a52f MDL-62145 theme_boost: Custom menu fixes
Make sure the site navigation element is labelled, actionmenu items
have correct role and actionmenu trigger controls the menu.
2018-10-22 11:05:28 +08:00
Damyon Wiese 4fa885d003 MDL-62144 user menu: Accessibility
Ensure user menu passes the accessibility tests.
2018-10-22 10:50:55 +08:00
Damyon Wiese 5cccea615a MDL-62139 output: Accessible action menus
Add label on the "gear" menu and default keyboard and focus controls.

S
2018-10-22 10:39:11 +08:00
Eloy Lafuente (stronk7) bb1e0fdbb9 weekly release 3.4.5+ 2018-10-22 10:39:11 +08:00
AMOS bot b859bed2eb Automatically generated installer lang files 2018-10-22 10:39:11 +08:00
AMOS bot 5f69056fe5 Automatically generated installer lang files 2018-10-22 10:39:11 +08:00
AMOS bot e670975845 Automatically generated installer lang files 2018-10-22 00:07:28 +00:00
Eloy Lafuente (stronk7) c757afbac1 weekly release 3.4.5+ 2018-10-19 17:10:52 +02:00
Eloy Lafuente (stronk7) a28eccf172 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-10-19 17:10:50 +02:00
AMOS bot 532bd1c768 Automatically generated installer lang files 2018-10-19 00:08:19 +00:00
Eloy Lafuente (stronk7) da1507c1dd Merge branch 'MDL-62920_34' of https://github.com/aanabit/moodle into MOODLE_34_STABLE 2018-10-18 23:52:00 +02:00
Eloy Lafuente (stronk7) 6270847e8f Merge branch 'MDL-60145-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-10-18 18:57:58 +02:00
Tim Hunt f777a0b0dc MDL-63403 filter_glossary: changes made during integration review 2018-10-18 18:45:38 +02:00
Tim Hunt 86543cb1db MDL-63403 filter_glossary: only create replacement HTML if needed 2018-10-18 18:44:37 +02:00
Tim Hunt 59045c0a75 MDL-63403 filter_glossary: only prepare the replacement if used 2018-10-18 18:44:32 +02:00
Tim Hunt 957e3dbbd6 MDL-63403 filter_glossary: clean up filterobject class
This is another preliminary commit, rationalising the ->work... fields
and also moving the code that sets them up into a separate function.
This is also to prepare for the next commit.
2018-10-18 18:44:26 +02:00
Tim Hunt 6f9e7f7989 MDL-63403 filter_glossary: only prepare_phrases_for_filtering once 2018-10-18 18:44:23 +02:00
Tim Hunt d6be60ed51 MDL-63403 filter_glossary: use preg features for fullmatch
This eliminates a lot of necessary string manipulation for something
that preg can just do with the \b assertion.

The change also extracts all the work to prepare ->work_phrase (renamed
->regexp) into a separate function. This is to pave the way for future
efficiency gains, but for now I have not done them, so it is easier to
verify by inspection that this commit does not change behaviour.

Also, some tidy-ups to the filterobject structure, to eliminate some
redundant fields.
2018-10-18 18:44:19 +02:00
Tim Hunt 1a710d2dd8 MDL-63403 filter_glossary: cache concept list in a MUC static cache
This is a slight improvement on a suggestion by David Monllaó
2018-10-18 18:44:15 +02:00
Tim Hunt 2e14a686ea MDL-63403 filter_glossary: Fix lang string concatenation 2018-10-18 18:44:11 +02:00
Tim Hunt 8b73e0f6fe MDL-63403 filter_glossary: $GLOSSARY_EXCLUDEENTRY shouldn't stop caching
Also, greatly improved unit tests, to test more cases of how the filter
should work.
2018-10-18 18:44:07 +02:00
Tim Hunt 6cb74724a3 MDL-63403 filterlib: Fix lots of coding style 2018-10-18 18:43:57 +02:00
Jun Pataleta 6871e90c9e Merge branch 'MDL-63667-34-fix2' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-18 14:39:31 +08:00
Andrew Nicols 0ede37a30c MDL-63667 amd: Check for parent template recursion 2018-10-18 12:12:43 +08:00
Damyon Wiese 1a3a8a9d6d MDL-63667 output: Fix for recursive templates
A template can include itself - e.g. by looping over the context children and rendering a tree.

Ensure this promise still resolves.

Example: admin/tool/lp/templates/competencies_tree.mustache.
2018-10-18 10:54:01 +08:00
Eloy Lafuente (stronk7) be3a6f83c2 Merge branch 'MDL-63632-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-10-18 02:39:33 +02:00
AMOS bot d15cbdd72f Automatically generated installer lang files 2018-10-18 00:07:35 +00:00
Andrew Nicols 7fa07866b7 MDL-63632 forum: Delete where not discussion author 2018-10-18 07:20:29 +08:00
Eloy Lafuente (stronk7) ab4d4619c2 Merge branch 'MDL-63068_34' of https://github.com/aanabit/moodle into MOODLE_34_STABLE 2018-10-18 00:40:16 +02:00
Jun Pataleta 8464779f2a MDL-62904 tool_dataprivacy: Add data request links in profile page 2018-10-17 16:42:56 +08:00
Jun Pataleta 5775e12509 Merge branch 'MDL-63667-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-17 15:03:50 +08:00
Ryan Wyllie 7ffafab4f7 MDL-63667 javascript: fix failed to pre-fetch the template error 2018-10-17 13:53:28 +08:00
Michael Hawkins b6a8e4db77 MDL-63495 comment: Added provider::delete_comments_for_users
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:55 +08:00
Andrew Nicols 121f12aa3c MDL-63495 mod_forum: Add intial support for removal of multiple context users
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:55 +08:00
Andrew Nicols 924881fba9 MDL-63495 core_rating: Add helper to fetch users in context
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:55 +08:00
Andrew Nicols b11130cf15 MDL-63496 tool_dataprivacy: Add configuration for per-role retention
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:55 +08:00
Andrew Nicols f3e39f4bce MDL-63496 tool_dataprivacy: Respect expiry with protected flag
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:54 +08:00
Andrew Nicols 037f741214 MDL-63496 tool_dataprivacy: Support for per-role retention
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:54 +08:00
Michael Hawkins c71a358c69 MDL-63497 tool_dataprivacy: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:54 +08:00
Andrew Nicols f2c6d5cc11 MDL-63495 privacy: Add support for removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:54 +08:00
Eloy Lafuente (stronk7) c600fd5712 weekly release 3.4.5+ 2018-10-16 16:05:34 +02:00
Eloy Lafuente (stronk7) 67634c4102 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-10-16 16:05:32 +02:00
Damyon Wiese 668934466b Merge branch 'MDL-62960-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-10-16 11:44:18 +08:00
Shamim Rezaie a183d18041 MDL-62960 calendar: Visuall indicator for valid course event drop zones 2018-10-16 13:14:36 +11:00
Shamim Rezaie c0e7ba026d MDL-62960 calendar: Rename get_module_timestamp_min/max_limit methods
The methods get_module_timestamp_min_limit() and get_module_timestamp_max_limit()
are doing generic stuff and can be used for other calendar event types as well.
I have renamed them to get_timestamp_min_limit() and get_timestamp_max_limit() respectively.
2018-10-16 13:14:26 +11:00
Shamim Rezaie 9211b03e86 MDL-62960 calendar: Implementing course events validity check callback 2018-10-16 13:12:57 +11:00
Shamim Rezaie b43f9b39fa MDL-62960 calendar: Added range check callback for course events
Added core_calendar_get_valid_event_timestart_range callback for course events
2018-10-16 13:12:57 +11:00
Andrew Nicols e098de35bc Merge branch 'MDL-63421_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-10-16 08:55:39 +08:00
Eloy Lafuente (stronk7) b6ff1269e8 Merge branch 'MDL-63583-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-10-16 00:29:28 +02:00
Eloy Lafuente (stronk7) 4f88dff731 Merge branch 'MDL-63456-34' of git://github.com/merrill-oakland/moodle into MOODLE_34_STABLE 2018-10-16 00:17:26 +02:00
Eloy Lafuente (stronk7) cdc68e910a Merge branch 'MDL-62319-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-16 00:07:23 +02:00
Andrew Nicols 1694162476 Merge branch 'MDL-63542-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-10-15 11:40:10 +08:00
AMOS bot c9e89351aa Automatically generated installer lang files 2018-10-15 00:07:27 +00:00
Eloy Lafuente (stronk7) a08235c914 MDL-63655 core: Fix miss-placed parenthesis 2018-10-15 01:03:04 +02:00
Amaia Anabitarte bcd99539b7 MDL-63068 user: Allow underscore for profile custom fields shortname 2018-10-11 16:40:34 +02:00
Amaia Anabitarte acca768961 MDL-62920 user: Uploading deleted user and adding to a cohort 2018-10-11 16:27:48 +02:00
Shamim Rezaie c5d2f4d0b3 MDL-63626 mod_quiz: Fixed a bug when there was no attempt on the quiz 2018-10-12 01:04:17 +11:00
Eloy Lafuente (stronk7) 0dfa4a3c18 weekly release 3.4.5+ 2018-10-11 13:22:49 +02:00
Eloy Lafuente (stronk7) c8ed9615de Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-10-11 13:22:47 +02:00
Damyon Wiese ffee9dcc59 MDL-62319 assignfeedback_editpdf: Disable touch scrolling
Assignment editpdf canvas provides it's own scroll tool and the native browser one breaks
the rest of the tools for the canvas. Turn it off.
2018-10-11 13:33:14 +08:00
Nathan Nguyen edbc4b5816 MDL-62319 Assign: Grading interface is broken when using iOS 11.3 devices 2018-10-11 13:33:11 +08:00
AMOS bot aa29f93afe Automatically generated installer lang files 2018-10-11 00:07:26 +00:00
Eloy Lafuente (stronk7) 7918ae0457 Merge branch 'MDL-62891-34-callable_name' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-10-10 23:33:20 +02:00
Eloy Lafuente (stronk7) 33b264e80a Merge branch 'MDL-63225-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-10-10 23:26:00 +02:00
Peter Spicer 7e4872e91e MDL-63451 core_message: Properly escape URLs for notification popup 2018-10-10 13:03:42 +01:00
Jake Dallimore 57429ec39b MDL-60145 course: fix bug with group restictions button during mod edit
If a mod doesn't support groups, then we remove the grouping element,
and now also the 'add group/group restriction' helper button too.
2018-10-10 08:43:46 +08:00
AMOS bot 837ac1b79d Automatically generated installer lang files 2018-10-10 00:07:22 +00:00
Eloy Lafuente (stronk7) 447b4bdf5a Merge branch 'MDL-63439-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-10 00:48:29 +02:00
Eloy Lafuente (stronk7) 3d92367a80 Merge branch 'MDL-62395-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-10-09 23:06:47 +02:00
Eloy Lafuente (stronk7) 957c839884 Merge branch 'MDL-63401-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-10-09 11:36:44 +02:00
David Monllao cde9c8ccc0 Merge branch 'MDL-62738_34' of https://github.com/mfabriczy/moodle into MOODLE_34_STABLE 2018-10-09 09:24:39 +02:00
David Monllao 8d6c617e59 Merge branch 'MDL-51969-MOODLE_34_STABLE' of https://github.com/dmitriim/moodle into MOODLE_34_STABLE 2018-10-09 09:21:14 +02:00
Jun Pataleta a474308f74 Merge branch 'MDL-62491-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-10-09 14:39:33 +08:00
Jun Pataleta 8dc8bfdb1d Merge branch 'MDL-63241-34-take2' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-10-09 12:48:27 +08:00
Adrian Greeve 42129c29b4 MDL-62491 navigation: Update to tree.js to allow callbacks. 2018-10-09 09:42:14 +08:00
Adrian Greeve bcad932ef8 MDL-62491 mod_assign: Fill in the rewrite plugin urls properly. 2018-10-09 09:42:04 +08:00
Adrian Greeve 40d08b4fb1 MDL-62491 core_privacy: Add html files to the user data export.
This adds html to the data export that allows for easier navigation
and reading of data.
2018-10-09 09:41:55 +08:00
Damyon Wiese f68ad5439b MDL-63439 assign: Unicode charsets for pdf
Prefer to use freesans font for generated pdfs as it has the biggest charset support.
2018-10-09 09:31:34 +08:00
Jun Pataleta 2d065b56c7 Merge branch 'MDL-63194_34' of https://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-10-09 08:55:00 +08:00
Andrew Nicols e5088f07a8 MDL-63401 tool_dataprivacy: Change default for require end date
We should preserve the existing behaviour.
2018-10-09 08:32:18 +08:00
Andrew Nicols bc09a4398c MDL-63401 tool_dataprivacy: Simplify where processing 2018-10-09 08:22:41 +08:00
Andrew Nicols 5e77c5f24f MDL-63401 tool_dataprivacy: Move final cap check to endpoint 2018-10-09 08:22:41 +08:00
Eric Merrill 372476328c MDL-63456 qtype_multichoice: Return a default options object if missing 2018-10-08 16:31:35 -04:00
Eric Merrill 98dec1b08c MDL-63456 question: Improve Aiken error handling and multichoice errors 2018-10-08 16:31:35 -04:00
Tim Hunt 474ee16ec7 MDL-63194 quiz editing: subtle drag-drop bug if moving between sections 2018-10-08 17:46:36 +01:00
Juan Leyva 4105b2d351 MDL-63583 course: Include course/lib.php always
core_course_get_courses_by_field WS must include always course/lib.php to not depend on functions including it.
2018-10-08 16:57:14 +02:00
Andrew Nicols ec259ef812 MDL-63401 tool_dataprivacy: Allow expiriration of users without end date 2018-10-08 20:52:45 +08:00
Andrew Nicols 3e90c7df33 MDL-63401 tool_dataprivacy: Rewrite expired deletion handling
This change rewrites the way in which expiry is calculated and addresses
a number of closely related issues:

Users can customise, and add blocks with data to, their dashboard.  When
a user had done so, the user could be flagged for deletion, but the
blocks in their Dashboard were subject to the default block retention
policy. In addition there is no way to override the retention policy for
user blocks.

This change modifies the structure of the expiry mechanism:
- to consider any subcontext of the user context to be a part of the user
  context during calculation. User child contexts are not the property
  of the system, and should not be treated separately.
- the way in which the context expiry mechanism worked was to select
  use a multiple different managers based solely on the context level.
  Because of the use of user blocks, this proved to be unreliable as
  blocks has been attributed purely to courses.
  This has been changed to a single manager which is aware of hierarchy
  and deletions as a whole.
- to prepare for upcoming work relating to more detailed expiry
  mechanisms, a new expiry_info class is introduced and used to
  merge the expiry of child contexts into a working in-memory view.

This changeset includes extensive unit tests.
2018-10-08 20:52:27 +08:00
Andrew Nicols 6b0512cc52 MDL-63401 core: Do not delete the user context
As long as we have a user record, we should not delete the context which
relates to it.
2018-10-08 20:52:27 +08:00
Andrew Nicols a9c0a87ffd MDL-63401 tool_dataprivacy: Move cap checks to endpoints from API 2018-10-08 20:52:27 +08:00
David Monllao 4de8dd37c7 Merge branch 'MDL-63323-34-wrong-classes-attribute-into-activity_navigation' of https://github.com/davidherney/moodle into MOODLE_34_STABLE 2018-10-08 11:30:27 +02:00
Luca Bösch 32052e77f8 MDL-63241 calendar: Add missing table alias in SQL query. 2018-10-07 21:45:53 +02:00
Marcus Fabriczy 35f6db9232 MDL-62738: editor_tinymce: Fix call stack size bug on Safari
The call stack size was being exceeded via a recursive loop brought
by MDL-61189.

To fix, this item removes MDL-36803 and MDL-41328 as the iOS keyboard works
nicely now on Safari with TinyMCE.
2018-10-06 17:30:20 +09:30
Juan Leyva c5ab666ece MDL-63542 core_course: Support stealth activities in WS 2018-10-05 14:51:31 +02:00
Eloy Lafuente (stronk7) 06579f587c MDL-63421 env: Moodle 3.4.x and 3.5.x do not support PHP 7.3 2018-10-05 13:38:00 +02:00
David Mudrák 152b534b6d MDL-62891 core: Stop using var_export() to describe callables
Make use of the newly added function get_callable_name() when reporting
that an exception happened during shutdown.
2018-10-05 08:53:20 +02:00
David Mudrák 4081f82d5c MDL-62891 core: Introduce new get_callable_name() function 2018-10-05 08:53:20 +02:00
Dmitrii Metelkin ef0688bf35 MDL-51969 mod_lti: Fixed missing tool proxy GUID 2018-10-05 15:15:33 +10:00
Jun Pataleta 57241c56c0 weekly release 3.4.5+ 2018-10-05 10:29:04 +08:00
Jun Pataleta 994d82f64d Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-10-05 10:29:03 +08:00
Jun Pataleta 4db4682464 MDL-62395 tool_dataprivacy: Purpose name and description in one column
* Show the purpose's name and description under one column.
2018-10-05 09:28:48 +08:00
Jun Pataleta 591a54cd72 Merge branch 'MDL-35788-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-10-04 12:46:07 +08:00
Jun Pataleta 0f6973ac13 MDL-63528 auth: Behat scenario for "Remember username" display 2018-10-04 12:25:15 +08:00
Jun Pataleta 8c9a724672 MDL-63528 auth: Show "Remember username" on login form only when needed 2018-10-04 12:25:15 +08:00
Andrew Nicols 1f700517cd MDL-35788 mod_forum: Move post creation fetch 2018-10-04 11:42:54 +08:00
AMOS bot 7a2da2f137 Automatically generated installer lang files 2018-10-04 00:07:29 +00:00
Eloy Lafuente (stronk7) 7277817938 Merge branch 'MDL-63141-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-10-04 00:24:30 +02:00
Eloy Lafuente (stronk7) 6187351760 Merge branch 'MDL-63142-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-10-04 00:18:53 +02:00
Eloy Lafuente (stronk7) f65a5b5f34 Merge branch 'MDL-63143-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-10-04 00:02:56 +02:00
David Monllao ef1e76b490 Merge branch 'MDL-62558-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-10-03 17:16:17 +02:00
Adrian Greeve df3cc8c9c5 MDL-62558 tool_dataprivacy: Create a summary page for users. 2018-10-03 10:40:34 +08:00
Jun Pataleta 9e026e05df Merge branch 'MDL-35788-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-10-03 10:12:43 +08:00
Eloy Lafuente (stronk7) ed19765c8d Merge branch 'MDL-60685-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-10-03 00:24:19 +02:00
Eloy Lafuente (stronk7) 31252432a1 Merge branch 'MDL-63435-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-10-02 23:48:27 +02:00
Juan Leyva d14393fb3d MDL-63225 webservice: Return proper debuginfo on WS exceptions
In order to make developers easy, we should give some clues about the type of the data generating exceptions.
2018-10-02 13:15:37 +02:00
Andrew Nicols 8fe630d49b MDL-35788 forum: Show post creation time not modified 2018-10-01 08:39:56 +08:00
Jun Pataleta bd7573e471 MDL-62395 tool_dataprivacy: Fix tables display
* Use standard Bootstrap4 table classes for the categories and purposes
  tables.
* Set 25% width for the name and description columns of the purposes
  table.
* Set 50% width for the description column of the categories table.
2018-09-28 14:33:55 +08:00
David Herney 571ee73a77 MDL-63323 course: Fixed wrong classes key in activity_navigation class
Replaced "classes" by "class" attribute, when the prev and next links are builded into the activity navigation.
2018-09-27 18:44:00 -05:00
Luca Bösch ce3f7aeb16 MDL-63435 gradebook: let activity icons re-appear. 2018-09-27 18:10:40 +02:00
Eloy Lafuente (stronk7) 75d95d140b weekly release 3.4.5+ 2018-09-27 15:17:55 +02:00
Eloy Lafuente (stronk7) 54b432fb4f Merge branch 'MDL-61981-34_nestedmath' of git://github.com/Mankro/moodle into MOODLE_34_STABLE 2018-09-25 23:41:03 +02:00
Eloy Lafuente (stronk7) 0c5279e4c5 Merge branch 'MDL-62279-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-09-25 23:26:51 +02:00
Eloy Lafuente (stronk7) 514dce5460 Merge branch 'MDL-62714-34-boost_course_visibility_in_navbar' of https://github.com/fskandalis/moodle into MOODLE_34_STABLE 2018-09-25 23:20:13 +02:00
Eloy Lafuente (stronk7) 8e20e22be9 Merge branch 'MDL-60028-34' of https://github.com/paulholden/moodle into MOODLE_34_STABLE 2018-09-25 16:58:44 +02:00
David Monllao 61859ec680 Merge branch 'MDL-63119-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-09-25 12:36:36 +02:00
David Monllao 816f9a560b Merge branch 'MDL-62717-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-09-25 12:19:00 +02:00
Andrew Nicols abb789b0fb Merge branch 'MDL-63346_34' of https://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-09-25 08:51:41 +08:00
Eloy Lafuente (stronk7) 0e7711084a MDL-63020 tests: ensure that searching for is null values also works ok 2018-09-24 17:43:19 +02:00
Tim Hunt 70b3253d46 MDL-63020 dml: improve the unit tests 2018-09-24 17:43:19 +02:00
Eloy Lafuente (stronk7) fd5cc5ee03 Merge branch 'MDL-63020_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-09-24 17:42:52 +02:00
Paul Holden 4f1725493d MDL-60028 enrol: fix counting of enrolled users in a given context.
Previously users enrolled in a course via multiple enrolment methods
would be counted multiple times.
2018-09-21 10:19:38 +01:00
Tim Hunt eb43bdbbb0 MDL-63020 ddl: fix nullable unique indexes in OCI and MS SQL
This works-around the default non-standard behaviour of these DB engines.
2018-09-20 17:50:30 +01:00
Tim Hunt a27808cd1b MDL-63020 xmldb: Improve PHPdoc comments for better IDE autocomplete 2018-09-20 17:50:28 +01:00
Luca Bösch 1157c4c29a MDL-62717 forum: Create announcements forum with HTML format intro. 2018-09-20 17:47:01 +02:00
Markku Riekkinen 65dc7eba8d MDL-61981 filter_mathjaxloader: add unit tests 2018-09-20 15:00:52 +03:00
Eloy Lafuente (stronk7) f05c493776 weekly release 3.4.5+ 2018-09-20 12:12:05 +02:00
Eloy Lafuente (stronk7) 761179ce00 MDL-63346 nodejs: Bump to created from scratch shrinkwrap file
Steps:

- remove node_modules & npm-shrinkwrap.json
- npm cache clear --force
- npm install
- npm shrinkwrap
2018-09-20 10:54:51 +02:00
Eloy Lafuente (stronk7) 3763566864 MDL-63346 travis: GRUNT job immune to npm-shrinkwrap.json changes
When upgrading nodejs/npm versions, there are modifications to
different packages or to the format of the npm-shrinkwrap.json
file. Usually that leads to failed jobs untill the bundled file
is updated.

To avoid that, we just ignore the npm-shrinkwrap.json file, so
just the REAL modifications in css/js/ignore stuff are considered.
2018-09-20 10:53:47 +02:00
Markku Riekkinen 5acd022bf6 MDL-61981 filter_mathjaxloader: nested math environments
The MathJax filter used to break mathematics if inline math was
used inside display math. Nolink spans were added around
the inline math even though it was nested inside another math
environment. This fix is aware of the nesting so that the spans
may be inserted only at the outer math environment. No regular
expressions are used because they do not support detecting
arbitrary, unlimited nesting of parentheses in the text, which
is now needed.
2018-09-19 15:36:37 +03:00
David Monllao 5bf7359a98 Merge branch 'MDL-63140-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-09-19 13:31:23 +02:00
David Monllao a0b0988443 Merge branch 'MDL-63135-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-09-19 13:13:25 +02:00
Eloy Lafuente (stronk7) cd475230e3 Merge branch 'MDL-63116-34-1' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-09-18 23:51:01 +02:00
Mihail Geshoski 7ef99fc213 MDL-61908 privacy: Fix heading in data privacy pages 2018-09-18 18:51:26 +02:00
Eloy Lafuente (stronk7) 39d9d254f8 Merge branch 'MDL-63109-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-09-18 18:32:17 +02:00
David Monllao cb5fb29cd7 Merge branch 'MDL-63138-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-09-18 16:41:23 +02:00
David Monllao 693959a524 Merge branch 'MDL-63139-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-09-18 16:37:54 +02:00
David Monllao 4a4f563f26 Merge branch 'MDL-63117-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-09-18 16:34:37 +02:00
Mihail Geshoski 2eccec9542 MDL-63109 privacy: Add behat tests 2018-09-18 15:08:21 +08:00
Mihail Geshoski 4c9c186fdc MDL-63109 privacy: Fix the initialisation of the policy acceptance modal 2018-09-18 15:05:01 +08:00
Tim Schroeder 0cd1bc0b67 MDL-63119 calendar: now showing event end in modal
When clicking on an event in the month view, a modal opens with
    information about it. That modal did previously only show the start time
    of the event. It now also shows the end (if the event has one).
2018-09-18 13:41:58 +08:00
Jun Pataleta 90a6d883b1 Merge branch 'm34_MDL-63319_MySQL_MSSQL_Rename_Field_Reserved_Word' of https://github.com/scara/moodle into MOODLE_34_STABLE 2018-09-18 13:41:39 +08:00
Eloy Lafuente (stronk7) c883e9bf96 Merge branch 'MDL-58781_34' of https://github.com/aanabit/moodle into MOODLE_34_STABLE 2018-09-17 23:43:35 +02:00
Eloy Lafuente (stronk7) 0b07e65fba Merge branch 'MDL-63009-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-09-17 23:31:13 +02:00
Eloy Lafuente (stronk7) 390dcea39c Merge branch 'MDL-63184-34-2' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-09-17 23:11:45 +02:00
Eloy Lafuente (stronk7) ae7dc5dcfb Merge branch 'MDL-63354-34' of https://github.com/HuongNV13/moodle into MOODLE_34_STABLE 2018-09-17 23:06:57 +02:00
Jun Pataleta b333c94a01 MDL-63184 tool_dataprivacy: Ensure PO roles have correct capability 2018-09-17 22:35:49 +08:00
David Monllao 6385c8f0b7 Merge branch 'MDL-62554-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-09-17 13:45:58 +02:00
Eloy Lafuente (stronk7) 8b16f4d7f2 Merge branch 'MDL-63215-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-09-17 10:43:28 +02:00
Mihail Geshoski 5f01d507cb MDL-63116 privacy: Add bulk actions to the privacy request table 2018-09-17 08:24:13 +08:00
Mihail Geshoski 449b4461ee MDL-63116 privacy: Add behat tests 2018-09-17 08:24:13 +08:00
Mihail Geshoski 980e81275b MDL-63116 privacy: Add unit tests 2018-09-17 08:24:13 +08:00
Michelle Melton aa21de4c84 MDL-63215 block_rss_client: Escaping tags in RSS entries 2018-09-16 23:46:05 +02:00
Matteo Scaramuccia da2d40de4c MDL-63319 ddl: Added getRenameFieldSQL() coverage 2018-09-14 22:45:01 +02:00
Matteo Scaramuccia 41e73ee448 MDL-63319 ddl: Improved rename_field() coverage
DB API should allow to rename fields, including renaming
those columns named using a reserved word.
2018-09-14 22:45:01 +02:00
Matteo Scaramuccia 5dca702169 MDL-63319 ddl: MSSQL should rename reserved words 2018-09-14 22:36:48 +02:00
Matteo Scaramuccia cd579c4b1a MDL-63319 ddl: MySQL should rename reserved words 2018-09-14 22:36:48 +02:00
Amaia Anabitarte ac97d778c7 MDL-58781 mod_feedback: Inconsistency in analysis exported to excel 2018-09-14 12:38:48 +02:00
Shamim Rezaie 308fda5fb1 MDL-63143 mod_lesson: Check if the module is visible to the user 2018-09-14 20:35:58 +10:00
Shamim Rezaie 6ebe20ee9b MDL-63143 mod_lesson: Add userid param to mod_lesson calendar callbacks 2018-09-14 20:35:58 +10:00
Eloy Lafuente (stronk7) 09b00ee19c weekly release 3.4.5+ 2018-09-14 11:06:50 +02:00
Shamim Rezaie 73fb05948f MDL-63142 mod_label: Check if the module is visible to the user 2018-09-14 17:56:11 +10:00
Shamim Rezaie 10da17c8b8 MDL-63142 mod_label: Add userid param to mod_label calendar callbacks 2018-09-14 17:56:11 +10:00
Shamim Rezaie 2b58ab0274 MDL-63141 mod_imscp: Check if the module is visible to the user 2018-09-14 17:50:37 +10:00
Shamim Rezaie e0f7f1ef95 MDL-63141 mod_imscp: Add userid param to mod_imscp calendar callbacks 2018-09-14 17:50:37 +10:00
Shamim Rezaie 9fc96f244c MDL-63140 mod_glossary: Check if the module is visible to the user 2018-09-14 17:44:56 +10:00
Shamim Rezaie 236636ea00 MDL-63140 mod_glossary: Add userid param to glossary calendar callbacks 2018-09-14 17:44:55 +10:00
Huong Nguyen a49d2c334a MDL-63354 Group: Rollover text on long group names is not consistent 2018-09-14 09:45:43 +07:00
Eloy Lafuente (stronk7) 8c4e26977c MDL-61169 iplookup: Change to another block still remaining to SF 2018-09-13 19:06:54 +02:00
Jun Pataleta 35e28afab4 MDL-62554 tool_dataprivacy: Integration review fixes 2018-09-13 14:52:34 +08:00
Michael Hawkins c718e9f671 MDL-63009 tool_dataprivacy: Added site name/link to request emails 2018-09-12 17:45:50 +08:00
Jun Pataleta 7eddff8e55 MDL-62294 lib: Take note of cherry-picked upstream commit
* Make a note of the applied upstream patch in
  lib/lessphp/moodle_readme.txt which fixes the PHP 7.2 compatibility
  issue when counting ruleset rules.
2018-09-12 16:46:37 +08:00
Michaël Marinetti da81219682 MDL-62294 lessphp: Fix for PHP 7.2 compatibility
From upstream commit:
https://github.com/oyejorge/less.php/commit/669acc51817a8da162b5f1b7137e79f0e4acc636
2018-09-12 16:46:37 +08:00
Jun Pataleta 43bd47b67a Merge branch 'mdl63321-moodle34' of https://github.com/tlock/moodle into MOODLE_34_STABLE 2018-09-12 15:33:21 +08:00
Jun Pataleta f251d75803 Merge branch 'MDL-63231-set-default-value-for-int-param-MOODLE_34' of https://github.com/guillalva06/moodle into MOODLE_34_STABLE 2018-09-12 09:58:39 +08:00
Jun Pataleta fc9a4136a7 Merge branch 'MDL-50314_34' of git://github.com/do-you-even-curl/moodle into MOODLE_34_STABLE 2018-09-12 09:43:26 +08:00
Tim Lock b0412aa454 MDL-63321 block: Fix warning in Calendar month block after MDL-60587 2018-09-12 08:31:02 +09:30
Eloy Lafuente (stronk7) 8fde61edd4 Merge branch 'MDL-63136-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-09-11 23:53:06 +02:00
Eloy Lafuente (stronk7) b736aab921 Merge branch 'MDL-62528-34' of git://github.com/bmbrands/moodle into MOODLE_34_STABLE 2018-09-11 23:05:44 +02:00
Guillermo Alvarez 95a0dce3d4 MDL-63231 filepicker: Skype validation for null values
In file_get_all_files_in_draftarea function an integer could get
a null value so it is necessary to execute this function only
when is called with a valid integer value.
2018-09-11 09:05:48 -05:00
Fotis Skandalis 21f3395f7a MDL-62714 theme_boost: Course visibility in navigation bar
Added check in navbar.mustache to add dimmed_text class if needed.
Added is_hidden() in navigationlib.php to return if the class needs
to be added.
2018-09-10 16:57:56 +03:00
Jun Pataleta d21dd7fbfc MDL-62554 tool_dataprivacy: Bump version for new WS functions 2018-09-10 12:18:55 +08:00
Jun Pataleta 2035a7a55e MDL-62554 tool_dataprivacy: Fix display of activity options 2018-09-10 12:18:55 +08:00
Jun Pataleta 3becb16f53 MDL-62554 tool_dataprivacy: Fix template for Bootstrapbase compatibility 2018-09-10 12:18:55 +08:00
Jun Pataleta cd6a9957fa MDL-62554 tool_dataprivacy: Remove defaults form
With the changes in this issue, this form is no longer being used.
2018-09-10 12:18:55 +08:00
Jun Pataleta 7b0cd65883 MDL-62554 tool_dataprivacy: Behat tests for managing registry defaults
* Also new step definitions and generator for:
  - Creating categories and purposes
  - Assigning category and purpose to context instances.
2018-09-10 12:18:55 +08:00
Jun Pataleta 402eec348e MDL-62554 tool_dataprivacy: Unit tests for new WS/API functions 2018-09-10 12:18:55 +08:00
Jun Pataleta 42e3825a92 MDL-62554 tool_dataprivacy: Fix fetching of default contexts
* We also need to handle default contexts for activities. If defaults
  for an activity is set, fetch that. If not, fetch the defaults for
  the context level.
2018-09-10 12:18:55 +08:00
Jun Pataleta d6c0be9438 MDL-62554 tool_dataprivacy: Allow setting of activity defaults
* Allow the setting of data registry defaults for activity modules.
* Rewrite the defaults page so that it uses templates.
* Use a tabbed layout for the defaults page that shows the default
  category and purpose per context level.
* New API and web service functions that enables the setting of the
  defaults.
2018-09-10 12:18:50 +08:00
Eloy Lafuente (stronk7) 28f6460de3 Moodle release 3.4.5 2018-09-08 16:49:46 +02:00
AMOS bot a63c88c57a Automatically generated installer lang files 2018-09-08 00:07:45 +00:00
Tim Schroeder 0d17150a0c MDL-50314 mod_quiz: removed hardcoded export columns
* The columns 'institution', 'department' and 'email' are no longer
  automatically included in all quiz result exports.
* These columns can still be used, but have to be configured under
  'showuseridentity'.
2018-09-07 14:16:41 +02:00
Shamim Rezaie b8d91beab4 MDL-63136 mod_data: Check if the module is visible to the user 2018-09-07 17:42:32 +10:00
Shamim Rezaie 8f8093ac0f MDL-63136 mod_data: Add userid param to mod_data calendar callbacks 2018-09-07 17:42:31 +10:00
Shamim Rezaie 5eae317838 MDL-63139 mod_forum: Check if the module is visible to the user 2018-09-07 16:56:44 +10:00
Shamim Rezaie 445be5614a MDL-63139 mod_forum: Add userid param to mod_forum calendar callbacks 2018-09-07 16:56:44 +10:00
Shamim Rezaie ae9af4e486 MDL-63138 mod_folder: Check if the module is visible to the user 2018-09-07 15:06:52 +10:00
Shamim Rezaie 08392add89 MDL-63138 mod_folder: Add userid param to mod_folder calendar callback 2018-09-07 15:06:52 +10:00
Jun Pataleta 1796e82ef3 weekly release 3.4.4+ 2018-09-07 11:12:18 +08:00
Jun Pataleta d6df81c983 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-09-07 11:11:55 +08:00
Shamim Rezaie 75bad7de80 MDL-63135 mod_choice: Check if the module is visible to the user 2018-09-06 20:15:16 +10:00
Shamim Rezaie 056dd08cd2 MDL-63135 mod_choice: Add userid param to mod_choice calendar callback 2018-09-06 20:15:16 +10:00
Shamim Rezaie 1f9034982e MDL-63135 mod_choice: Added choice_get_user_response function
A new function to return choice answers records of a given user in a given choice activity.
2018-09-06 20:15:15 +10:00
Shamim Rezaie ace999418c MDL-63117 mod_book: Check if the module is visible to the user 2018-09-06 17:46:32 +10:00
Shamim Rezaie 5892083e98 MDL-63117 mod_book: Add userid param to mod_book calendar callbacks 2018-09-06 17:46:29 +10:00
Jake Dallimore d7fbf4a33e Merge branch 'MDL-63302-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-09-06 09:23:55 +08:00
Jun Pataleta 165ce9437e MDL-63302 tool_dataprivacy: Increment version of the merged plugin
This is to distinguish the versions available from the plugins directory
from the versions that are part of Moodle standard distribution.
2018-09-06 08:51:52 +08:00
Eloy Lafuente (stronk7) eacb15b2b2 Merge branch 'MDL-63292-34-policyversion' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-09-05 21:10:23 +02:00
David Mudrák ae650468ed MDL-63292 tool_policy: Increment version of the merged plugin
This is to distinguish the versions available from the plugins directory
from the versions that are part of Moodle standard distribution.
2018-09-05 13:47:32 +02:00
Jake Dallimore dab2e7771f MDL-62947 mod_feedback: fix feedback so it correctly uses forms API
Feedback code was doing the following, which is incompatible with the
sec-patched quickforms lib:
- appending '[0]' to non-group element names, meaning type checks in
getCleanType() were falling back to PARAM_RAW instead of PARAM_INT,
and meaning _findValue() was comparing elements it thought to be arrays
with scalar submit values (worked with eval() implementation as the 0th
element of a string was the character, but not working when patched).
- external unit tests incorrectly testing multichoice questions in the
process_page tests - patched lib highlighted failures.

It was also doing the following:
- actively setting null as default element values instead of 0 for
radio buttons and dropdowns (for 'not selected'). This is incompatible
with more recent quickforms lib (see MDL-63070).
- creating groups using addElement instead of addGroup - not recommended

This patch addresses the above.
2018-09-05 12:13:52 +08:00
Jake Dallimore bd509e7575 MDL-62947 core_form: fix remote code execution exploit in QuickForms
Applies the patch found upstream:
https://github.com/pear/HTML_QuickForm/commit/
d3a6d5c44dedf3c164c6c79198e4ef479bcedcd2 and make util methods static
for php7 compatibility.
2018-09-05 12:13:52 +08:00
AMOS bot e6394e2eaa Automatically generated installer lang files 2018-09-05 00:07:38 +00:00
Damyon Wiese 40e3c83ec8 MDL-62748 course: maxsections is a limit
For course formats shipped with core, maxsections should be a limit to the number of sections
allowed in the course.
2018-09-04 22:37:50 +02:00
Mihail Geshoski 3ea7d116b8 MDL-62857 theme_boost: Better filtering on navbar / breadcrumbs 2018-09-04 22:37:50 +02:00
Tim Hunt cfc4393aa6 MDL-62880 qtype_ddwtos: drop support for legacy import format
It was more than 8 years since we wrote in that format.
2018-09-04 22:37:50 +02:00
Eloy Lafuente (stronk7) f477be8684 Merge branch 'MDL-63249-34-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-09-04 22:35:12 +02:00
Helen Foster 9d9d1b985f MDL-63249 lang: Merge English strings from the en_fix language pack
Significant string changes:

* completionpass_help, gradetopassnotset in mod_quiz - grade to pass
  set in quiz settings not gradebook
* namecolumnmissing,core_cohort - fixing incorrect message about adding
  users to a cohort
2018-09-04 15:14:50 +02:00
David Monllao bb5a6b610c Merge branch 'MDL-62342-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-09-04 14:34:13 +02:00
Neill Magill 2720c9570a MDL-62944 calendar: Clarify the intended use of $checkcapability 2018-09-04 12:19:07 +02:00
David Monllao 3955345d8c Merge branch 'MDL-62944-m34' of https://github.com/NeillM/moodle into MOODLE_34_STABLE 2018-09-04 12:16:15 +02:00
David Monllao 2df693e17d Merge branch 'MDL-55993-34' of https://github.com/albertolarah/moodle into MOODLE_34_STABLE 2018-09-04 10:53:40 +02:00
Jun Pataleta 929962527c Merge branch 'MDL-60901_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-09-04 10:17:45 +08:00
Dan Poltawski 8252dfbd00 MDL-48846 filter: Stop reffering to invalid moodle.org/download/mimetex 2018-09-03 23:45:16 +02:00
Eloy Lafuente (stronk7) de7cc3fbea Merge branch 'MDL-61325-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-09-03 23:34:02 +02:00
Eloy Lafuente (stronk7) 898d1beb5c Merge branch 'MDL-63255-34' of git://github.com/vmdef/moodle into MOODLE_34_STABLE 2018-09-03 23:31:21 +02:00
Eloy Lafuente (stronk7) eb19e3352a Merge branch 'MDL-62848-34-placeholderwidth' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-09-03 23:01:59 +02:00
David Monllao 0c8dfdcf0e Merge branch 'MDL-38301-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-09-03 12:45:06 +02:00
David Monllao f14acd208f Merge branch 'MDL-55744-34_atto_should_not_autosave_on_not_loggedin_users' of https://github.com/dravek/moodle into MOODLE_34_STABLE 2018-09-03 12:28:07 +02:00
Alberto Lara Hernández a5ca74838f Merge branch 'MDL-55993-34' of https://github.com/albertolarah/moodle into MDL-55993-34 2018-09-03 12:25:24 +02:00
Alberto Lara Hernández 588b484099 MDL-55993 mod_assign: web services don´t set a URL. 2018-09-03 12:25:17 +02:00
Eloy Lafuente (stronk7) 47de66238b MDL-60901 environment: 3.6 requirements
Changes include:
- MySQL 5.6 is required.
- PostgreSQL 8.4 is required.
- Oracle 11.2 is required.
- 64bits architecture is recommended.
2018-09-03 10:14:22 +02:00
Víctor Déniz Falcón 93654d4b60 Merge branch 'MDL-63255-34' of git://github.com/vmdef/moodle into MDL-63255-34-test 2018-09-03 07:00:33 +01:00
Mihail Geshoski 4dc8fa2237 MDL-62342 privacy: Fix strings used in the consent on behalf modal 2018-09-03 13:00:58 +08:00
Mihail Geshoski 38127e5ed6 MDL-62342 privacy: Use singular/plural form in labels 2018-09-03 13:00:58 +08:00
Mihail Geshoski 69e15470dc MDL-56998 blog: Remove associated blog posts when module is deleted 2018-09-03 08:40:02 +08:00
AMOS bot 8c55985f99 Automatically generated installer lang files 2018-09-02 00:07:36 +00:00
AMOS bot 150f2bdfe3 Automatically generated installer lang files 2018-09-01 00:07:36 +00:00
David Mudrák 847444bc5b MDL-62848 form: Fix width of the autocomplete input field
Make sure that the autcomplete input field is wide enough to display the
placeholder text.
2018-08-31 14:54:33 +02:00
David Mudrák 6906f50822 MDL-62848 form: Fix missing support for {{#js}} helper in autocomplete
The form-autocomplete module uses three Mustache templates
core/form_autocomplete_input, core/form_autocomplete_suggestions and
core/form_autocomplete_selection. However, it did not support executing
the JS that is eventually part of those templates.
2018-08-31 14:54:33 +02:00
Simey Lameze 9d9d5af530 MDL-62944 calendar: Fix actionevent logic on template
During the calendar work, we have added the feature of
drag and drop activity event or "action events".

The problem at that time was, action events could not be
editable through the calendar UI, but should be allowed
to drag and drop. So, we couldn't use the return of
calendar_edit_event_allowed() because it can return true
(in case of teachers, that have permission to change the
activity) and the attribute isactionevent was created to
control on the UI if the user is viewing an action event.

So what my patch does is just add the check if we are
viewing an action event, and in this case, it won't display
the cog to edit that event.
2018-08-31 10:19:26 +01:00
Neill Magill c98058add8 MDL-62944 activities: Activities should not require capability
Activities should not require the user manipulating them to have
calendar capabilities for their events to be added to the Moodle
calendar
2018-08-31 10:19:26 +01:00
Neill Magill de198dce1b MDL-62944 activities: Test adding activities with no calendar capability 2018-08-31 10:19:25 +01:00
Neill Magill 2d533ee7e8 MDL-62944 completion: Calendar capabilities should not be required
The completion API should not require a user to have the capability to
add calendar events for it to function correctly.
2018-08-31 10:19:25 +01:00
Neill Magill 8b2e002cca MDL-62944 completion: Test that completion dates add events to calendar
When a user does not have calendar capabilities completion dates should
still be created correctly.
2018-08-31 10:19:25 +01:00
Neill Magill a620750547 MDL-62944 mod_data: Action menu missing from database pages
The action menu was missing from many of the database activity pages,
which meant that it could not be accessed until enough had been done to
the activity to make the editing tabs that used view.php accessible.
2018-08-31 10:19:25 +01:00
Eloy Lafuente (stronk7) 0416ad83f6 weekly release 3.4.4+ 2018-08-30 19:04:22 +02:00
Eloy Lafuente (stronk7) 620654f9bb Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-08-30 19:04:19 +02:00
Dan Marsden a26c9ceff5 MDL-61325 use correct value when looking for string. 2018-08-30 09:14:40 +08:00
AMOS bot a2e0bea764 Automatically generated installer lang files 2018-08-30 00:08:14 +00:00
Eloy Lafuente (stronk7) f0f0bd87cd Merge branch 'MDL-63094-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-08-29 00:22:57 +02:00
Eloy Lafuente (stronk7) 916415860a Merge branch 'MDL-62914-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-08-28 23:17:04 +02:00
Victor Deniz f7ea5aef8f MDL-63255 core_user: fix hardcoded sql table aliases 2018-08-28 11:57:05 +01:00
Jake Dallimore 22cbbb04bb Merge branch 'MDL-63101-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-08-28 16:56:12 +08:00
Andrew Nicols 3cb27d07cd Merge branch 'MDL-62782-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-08-28 07:07:59 +08:00
Eloy Lafuente (stronk7) 351552597e Merge branch 'MDL-62989-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-08-27 17:51:39 +02:00
Jun Pataleta db3a6dc2c8 MDL-63187 tool_dataprivacy: Behat fixes for confirmation lang strings 2018-08-27 22:44:58 +08:00
David Monllao 5158d78e89 Merge branch 'MDL-63174-34-emptyusername' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-08-27 15:09:11 +02:00
David Monllao 322c827a92 MDL-63187 tool_dataprivacy: Update delete purpose and category lang strings 2018-08-27 12:12:08 +02:00
David Monllao 9e4450e2c3 Merge branch 'MDL-63187-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-08-27 11:59:00 +02:00
David Monllao dacd9f0aaf Merge branch 'MDL-63210_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-08-27 11:47:07 +02:00
David Monllao 3497dbd58f Merge branch 'MDL-62867-34-missing_colon_in_query' of https://github.com/bitumin/moodle into MOODLE_34_STABLE 2018-08-27 11:23:05 +02:00
Andrew Nicols e553601950 Merge branch 'MDL-53024-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-08-27 15:46:53 +08:00
Damyon Wiese d0920c3ccf MDL-53024 assign: Remove incorrect logic in query
We are simplifying this query so it will return grades if the attempt matches
the submission attempt, or there is no submission. The case where there is a grade
but no submission can happen only for group assignments.
2018-08-27 15:35:04 +08:00
Zig Tan 79c0b489dd MDL-38301 mod_assign: Fix date validation logic & message consistency 2018-08-27 15:33:35 +08:00
Andrew Nicols bb52200f87 MDL-63101 cache: Improve accuracy of cache event invalidation 2018-08-27 14:44:26 +08:00
Alberto Lara Hernández 0cd85a850c MDL-55993 mod_assign: web services don´t set a URL. 2018-08-24 16:30:21 +02:00
Mitxel Moriana a21664df59 MDL-62867 tags: Fix missing colon in sql placeholder
Due to a missing colon in an sql query field value placeholder
the calculation of the ordering field for a newly added tag
was ignoring itemid.
2018-08-24 15:02:10 +02:00
Mihail Geshoski 2f4fe81c81 MDL-62989 privacy: Improve data request order for users 2018-08-24 15:34:24 +08:00
Jake Dallimore 1a7ae6c763 weekly release 3.4.4+ 2018-08-24 13:08:55 +08:00
Mark Nelson 5b4811c28b MDL-63210 core: convert for loop to forEach in JS 2018-08-24 11:34:50 +08:00
Jun Pataleta 73daef62b4 MDL-63187 tool_dataprivacy: Improve confirm message lang strings
* Updated the delete confirmation messages so that the category/purpose
names are shown in italics. This makes it easier for the privacy officer
to see the category/purpose that is being deleted.
2018-08-23 16:58:59 +08:00
Jun Pataleta 6368757029 MDL-63187 tool_dataprivacy: Behat tests for purposes/categories CRUD 2018-08-23 16:58:59 +08:00
Jun Pataleta 19efff94f4 MDL-63187 tool_dataprivacy: Fix delete button text
* No need to add the purpose/category name for the delete button itself
* Fix delete confirmation lang strings.
* Add button titles to Add purpose/category buttons so they can be
  clicked on when running Behat tests.
2018-08-23 16:58:59 +08:00
Mark Nelson a456850616 MDL-63210 core: touch-up after review
1. Reworded the string.
2. Removed logic handling form data.
3. Do not use window.location.replace.

Backport of MDL-54551.
2018-08-23 12:40:04 +08:00
Thom Rawson 24342e7617 MDL-63210 core: AJAX call redirects to login page when session expired
Backport of MDL-54551.
2018-08-23 12:40:04 +08:00
Jake Dallimore b56a0d69f1 MDL-36255 core_grade: fix to ensure correct context used for filters
Some grade object (outcomes,scales) can be created at site or course
context, so this patch just makes sure we use the respective context
when applying format_string to the name in the get_name() function.
2018-08-22 17:58:07 +08:00
Andrew Nicols 86c7c955eb MDL-63094 tool_policy: Fix the cookie banner to the bottom
Floating banners cause issues with clickability in Behat as it is unable
to understand that it cannot interact with the elements underneath the
floating banner, or that it needs to scroll the page so that the
required content is no longer beneath the floating banner.

Changing the banner to be fixed to the bottom of the page during Behat
runes is a reliable fix.
2018-08-22 11:00:08 +08:00
Andrew Nicols 0c94a92429 MDL-63094 js: Do not check visibility before hiding backdrop
It's possible for the backdrop to be created during the show, before the
modal is actually fully shown.

This check is unnecessary because the getBackdrop() function always
returns a value and will always succeed.
2018-08-22 10:28:32 +08:00
Andrew Nicols fed3dbe83e MDL-63094 tool_policy: Fix race condition in modal display
The way in which the modal was displayed meant that there were no
pending JS items, whilst the modal was rendered, causing random behat
fails.

This JS has been restructured to create the Modal and pass it a set of
Promises for both the title, and body.
2018-08-22 10:27:58 +08:00
Henning Bostelmann 45c3cf28e9 MDL-62914 Calendar: handle TZURL iCal property 2018-08-22 10:11:17 +08:00
Andrew Nicols ebb2a1e101 Merge branch 'MDL-62660_34' of https://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-08-22 08:04:33 +08:00
Eloy Lafuente (stronk7) 4d7029fd03 MDL-62660 xmldb: fix tool_dataprivacy_request_>status to int(2)
So the new defined statuses fit in the column for all databases.
2018-08-22 00:05:30 +02:00
Jake Dallimore 70b6f5fb55 Merge branch 'MDL-36255-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-08-21 16:07:02 +08:00
Jake Dallimore e03c0c9c4c Merge branch 'MDL-62534-34' of https://github.com/mackensen/moodle into MOODLE_34_STABLE 2018-08-21 11:45:42 +08:00
Andrew Nicols 50eea43f99 Merge branch 'MDL-62660-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-08-21 11:11:33 +08:00
Jun Pataleta 5f51b6dcf0 MDL-62660 tool_dataprivacy: Behat fix for data deletion 2018-08-21 10:38:28 +08:00
Jun Pataleta 52df040e61 MDL-62660 tool_dataprivacy: CI fixes 2018-08-21 09:38:14 +08:00
Charles Fulton 93c174cbf1 MDL-62534 course formats: do not purge empty sections on upgrade 2018-08-20 09:16:22 -04:00
Michael Hawkins a8fb33368c MDL-62660 tool_dataprivacy: Behat additions for deletion and data expiry 2018-08-20 16:05:13 +08:00
Michael Hawkins ceb825a892 MDL-62660 tool_dataprivacy: Add and update PHPUnit tests
Updated tests with latest statuses.
Added testing for request download expiry functionality and method.
Added assign_site_dpo within a parent class for unit tests.
2018-08-20 16:05:12 +08:00
Michael Hawkins c47a276b00 MDL-62660 tool_dataprivacy: Add scheduled task to expire data requests 2018-08-20 16:05:12 +08:00
Jun Pataleta 1efd8b0291 MDL-62660 tool_dataprivacy: Fix version number in upgrade code 2018-08-20 16:05:12 +08:00
Michael Hawkins 332a03df8b MDL-62660 tool_dataprivacy: Add ability to expire data requests
Also replaced Completed status with situation specific statuses.
Also improved UX on request pages in line with expiries and the aadditional statuses.
2018-08-20 16:03:55 +08:00
Andrew Nicols 90f7c52e40 MDL-62660 tool_dataprivacy: Add method for unit tests to run adhoc tasks 2018-08-20 16:02:32 +08:00
Luca Bösch 13b07ada78 MDL-36255 grades: allow multilang filters in grades 2018-08-20 08:34:36 +02:00
Jake Dallimore 402d5de15a Merge branch 'MDL-57741-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-08-20 10:12:34 +08:00
Eloy Lafuente (stronk7) 94409c69b1 weekly release 3.4.4+ 2018-08-17 17:37:42 +02:00
Eloy Lafuente (stronk7) b0bbe6b2c8 NOBUG: Fixed file access permissions 2018-08-17 17:37:41 +02:00
Eloy Lafuente (stronk7) edb7272666 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-08-17 17:37:39 +02:00
David Mudrák 1d3cbad20e MDL-63174 user: user_create_user to throw exception on empty username
The core API function user_create_user() did not check the case when the
given username was empty.

Also adding a missing string 'usernamelowercase' for the existing lower
case check and unit tests.
2018-08-17 13:24:23 +02:00
David Mudrák fa9d16fd66 MDL-63174 user: core_user_create_users to throw exception on empty names
To be consistent with the web administration UI, we should not allow to
create invalid user records with empty username, lastname or firstname
via the web services.
2018-08-17 13:24:23 +02:00
Damyon Wiese 9d6bf4c4c0 MDL-62884 privacy: Additional fix for popper.js
The older version of popper needs custom CSS to ensure the menus are
visible without scrolling.
2018-08-17 16:07:15 +08:00
Damyon Wiese aaf055af33 MDL-62884 privacy: Fix styles
An action menu displayed inside a table needs to be tested on every theme. It is
required to ensure that the menu displays correctly, even when it would display outside
the scrollable region for the table.
2018-08-17 16:07:07 +08:00
cescobedo 08f4b0323b MDL-57741 enrol_lti: Add Launch URL to Published as LTI tools 2018-08-16 09:19:27 +02:00
AMOS bot 494a91d003 Automatically generated installer lang files 2018-08-16 00:08:27 +00:00
Bas Brands 4179c7d022 MDL-62528 forum: Fixed vertical position when loading permalinks 2018-08-15 11:43:05 +02:00
Jake Dallimore 9028bd17a5 Merge branch 'MDL-63050-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-08-15 11:00:32 +08:00
Andrew Nicols a3d0d0adba Merge branch 'MDL-62600-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-08-15 08:55:46 +08:00
AMOS bot 0b68426b3c Automatically generated installer lang files 2018-08-15 00:07:49 +00:00
Luke Carrier b939f70922 MDL-61238 cohort: require_once all libraries 2018-08-15 00:13:58 +02:00
Eloy Lafuente (stronk7) 5ae2ec409b Merge branch 'MDL-62341-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-08-15 00:06:22 +02:00
Eloy Lafuente (stronk7) e660bc47f0 Merge branch 'MDL-58409-34_needs_clean_in_autocomplete_element' of https://github.com/dravek/moodle into MOODLE_34_STABLE 2018-08-14 17:50:55 +02:00
Eloy Lafuente (stronk7) e8eb4f7825 Merge branch 'MDL-61650-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-08-14 16:57:34 +02:00
Michael Hawkins 635a878bae MDL-62600 tool_dataprivacy: Corrected availability of PO pages to admins 2018-08-14 12:28:54 +08:00
Andrew Nicols 85a0f30489 Merge branch 'MDL-62643-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-08-14 09:21:12 +08:00
Karen Holland df8f32bdf8 MDL-62896 Privacy: External plugin Additional label update. 2018-08-14 08:05:38 +08:00
David Monllao 7fda5667ba Merge branch 'MDL-62761-34' of https://github.com/jmvedrine/moodle into MOODLE_34_STABLE 2018-08-13 15:30:15 +02:00
David Monllao 3d5d4ad291 Merge branch 'MDL-59015-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-08-13 12:19:33 +02:00
Jake Dallimore 6a96c6d9b7 Merge branch 'MDL-60114_34_radio-option-choose' of https://github.com/awagner/moodle into MOODLE_34_STABLE 2018-08-13 16:04:07 +08:00
Andrew Nicols 3636e715e0 Merge branch 'MDL-62799-34-2' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-08-13 13:53:28 +08:00
Jun Pataleta 7c85d38e93 MDL-62799 core: Add tool_dataprivacy to list of standard plugins 2018-08-13 12:46:16 +08:00
Jun Pataleta 51e87bce2f MDL-62799 tool_dataprivacy: Fix CiBoT complaints 2018-08-13 12:30:26 +08:00
Jun Pataleta 983b72cedd MDL-62799 tool_dataprivacy: Move user generation within the test
Patch originally from MDL-62962.
2018-08-13 12:30:07 +08:00
sam marshall fc4ca0f91c MDL-62799 tool_dataprivacy: Add capabilities to control data downloads
Patch originally from MDL-61652.
2018-08-13 12:29:46 +08:00
Jun Pataleta e2a2d8424b MDL-62799 tool_dataprivacy: Behat tests for contacting PO
Patch originally from MDL-62026.
2018-08-13 12:29:36 +08:00
Jun Pataleta b6168a9990 MDL-62799 tool_dataprivacy: Allow manual completion of general enquiries
Patch originally from MDL-62026.
2018-08-13 12:29:24 +08:00
Jun Pataleta aaa58a165d MDL-62799 tool_dataprivacy: Merge the data privacy tool in 3.4 2018-08-13 09:07:42 +08:00
Mihail Geshoski 5676f7308f MDL-62341 privacy: Add behat test 2018-08-13 08:00:26 +08:00
Mihail Geshoski 52415401b6 MDL-62341 privacy: Add link to previous page in viewall policies page 2018-08-13 08:00:26 +08:00
Mihail Geshoski 59e3d345a1 MDL-59015 blocks: Confusing View more button in course overview block 2018-08-13 07:59:07 +08:00
Jean-Michel Vedrine 5eb7a89f6f MDL-62761 lesson: wrong deadlines on index with overrides 2018-08-12 07:53:56 +02:00
Andreas Wagner 76847757ec MDL-60114 mod_data: adding db activity lost radio field choose option 2018-08-11 07:45:51 +02:00
Eloy Lafuente (stronk7) e8452a3d0a weekly release 3.4.4+ 2018-08-10 13:22:01 +02:00
Andrew Nicols 2e7ffa7af4 Merge branch 'MDL-62619_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-08-10 08:46:00 +08:00
Eloy Lafuente (stronk7) 283369be28 MDL-62619 privacy: Prevent action when boolean queries are involved
Before the patch, queries like:

SELECT 1 FROM dual UNION SELECT 2 FROM dual

were failing badly, with everything but the first numeric element
being ignored by the optimization.

So, being conservative, now we reduce the query being analysed,
ignoring any subquery, inline view (anything within parenthesis
in general) and, in the remaining query, if a boolean query (UNION,
MINUS, INTERSECT...) is found, we don't apply any optimization.
2018-08-09 16:15:54 +02:00
Eloy Lafuente (stronk7) 3b10f8db20 Merge branch 'MDL-62619-34-privacycontexts' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-08-08 01:03:21 +02:00
Eloy Lafuente (stronk7) 8ad1ba5675 Merge branch 'MDL-43334-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-08-08 00:16:43 +02:00
Eloy Lafuente (stronk7) e08af21694 Merge branch 'MDL-61839-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-08-07 23:56:34 +02:00
Eloy Lafuente (stronk7) e9fcb3bcf9 Merge branch 'MDL-61870-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-08-07 23:48:49 +02:00
Eloy Lafuente (stronk7) 8a6b47642e Merge branch 'MDL-62750_34' of https://github.com/aanabit/moodle into MOODLE_34_STABLE 2018-08-07 17:23:59 +02:00
David Matamoros b391ba4214 MDL-55744 EDITOR_ATTO: Now atto does not autosave for not loggedin user 2018-08-07 15:24:15 +02:00
David Matamoros cb9ab70513 MDL-58409 core_form: needs clean in autocomplete element 2018-08-07 11:04:36 +02:00
Andrew Nicols 51b1c2b4d6 MDL-62800 behat: Correct path to P&P
This commit was originally a part of MDL-62950
2018-08-07 14:13:34 +08:00
Andrew Nicols d812eb333b Merge branch 'MDL-62798-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-08-07 13:13:13 +08:00
Andrew Nicols 288710cac2 Merge branch 'MDL-62800-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-08-07 12:11:52 +08:00
Mihail Geshoski 32c0d93b26 MDL-62800 tool_policy: Add policy plugin in standard_plugins_list() 2018-08-07 11:21:19 +08:00
sarjona 5174d7ad75 MDL-62800 tool_policy: Merge the policy tool to 3.4
The following changes has been done from the original repo:
- Remove README.md, LICENSE.md and .travis.yml
- Review the version.php content, to look like a standard plugin
- Adapt jquery-eu-cookie-law-popup.js and readme_moodle.txt to remove the
eslint-ignore
2018-08-07 11:04:38 +08:00
Andrew Nicols 7c8dadf029 Merge branch 'wip-MDL-61424-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-08-07 09:30:09 +08:00
Amaia Anabitarte 9a0e25e7dd MDL-62750 lang: Trim langlist setting values 2018-08-06 09:41:27 +01:00
Mihail Geshoski 3c1e4d11b7 MDL-62798 repositories: Report sections by name in server repository 2018-08-06 09:54:49 +08:00
Mihail Geshoski 5d10a3e920 MDL-61839 glossary: One letter search in glossary returns all entries 2018-08-06 09:50:38 +08:00
Damyon Wiese 29d815799b MDL-61650 assign: More consistent empty text
Consistently check for empty submissions with count_words(trim($text)).
2018-08-03 16:53:47 +08:00
Damyon Wiese 3cb6f1de33 MDL-62279 assign: Properly set the defaults
Before an assignment has been created, we need to use the site defaults,
not the per instance defaults for the settings.
2018-08-03 15:13:25 +08:00
Andrew Nicols 80ed1e0cd7 weekly release 3.4.4+ 2018-08-03 11:30:24 +08:00
Andrew Nicols c6149d54d6 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-08-03 11:30:22 +08:00
Damyon Wiese ef12348101 MDL-60685 assign: Do not falsely use admin user
When an assign_grades record is automatically populated, do not use the admin user as the default grader.

This would generate false information on the assignment summary screen and send false notifications from
the admin user.
2018-08-02 14:20:02 +08:00
Damyon Wiese 3eaca718a5 MDL-61870 mod_assign: Conditionally backup groups
When group info is not backed up, do not backup assignment submissions or overrides that related to a specific group.
We are already correctly not restoring them, but it is more robust not to include them in the backup file at all.
2018-08-02 13:09:06 +08:00
Zig Tan 3b7ead71a4 MDL-61870 mod_assign: Fix/clean up imported group override duedates
Applying patch supplied from Damyon Wiese to address the root-cause
of this issue in the backup/restore logic.
2018-08-02 13:09:01 +08:00
Zig Tan ae25d0ec2c MDL-61870 mod_assign: Fix/clean up imported group override duedates
- Prevent group override duedate events from being imported when groups are excluded
- Clean up any existing group override duedate events when editing assignment in upgradelib.php
- Updated lib.php unit tests
2018-08-02 13:08:28 +08:00
Andrew Nicols 5f901db7e7 Merge branch 'MDL-59847-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-08-02 11:41:01 +08:00
Andrew Nicols 8266c03f7a Merge branch 'MDL-62983-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-08-02 11:27:51 +08:00
Andrew Nicols 03587989ea MDL-63050 cachestore_redis: Update hExists to check empty 2018-08-02 11:00:42 +08:00
Andrew Nicols 8058d53f6a MDL-63050 redis: Make session check compatible with Redis 4.0 2018-08-02 11:00:42 +08:00
David Mudrák 52b377677a MDL-59847 core: Fix display of hidden identity fields in user selectors
User selectors now respect the user's permission to view other users'
hidden profile fields.
2018-08-02 10:35:25 +08:00
Eloy Lafuente (stronk7) 6cabd9b1f2 Merge branch 'MDL-57666-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-08-02 01:28:10 +02:00
Eloy Lafuente (stronk7) 85e4550689 Merge branch 'MDL-62965-34-userprofilesignup' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-08-02 00:41:45 +02:00
Eloy Lafuente (stronk7) 5636f37daf Merge branch 'MDL-59595-34-2' of git://github.com/snake/moodle into MOODLE_34_STABLE 2018-08-02 00:21:44 +02:00
Eloy Lafuente (stronk7) 71db484a6a Merge branch 'MDL-62977_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-08-01 16:44:15 +02:00
Jonathon Fowler d065231113 MDL-62983 core_user: Hold multiple filters when clicking any link 2018-08-01 12:11:00 +02:00
Eloy Lafuente (stronk7) 5aa54cc598 Merge branch 'MDL-41847-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-07-31 23:51:04 +02:00
David Monllao 389a43143e Merge branch 'm34_MDL-58015' of https://github.com/danmarsden/moodle into MOODLE_34_STABLE 2018-07-31 13:37:16 +02:00
David Monllao 09fd0f485a Merge branch 'MDL-59611-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-07-31 13:31:23 +02:00
David Monllao 0aa0600059 Merge branch 'MDL-44538-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-07-31 11:21:23 +02:00
Jun Pataleta b415e34429 Merge branch 'MDL-58768-34-2' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-07-31 16:16:35 +08:00
Shamim Rezaie 723e5b7533 MDL-58768 mod_assign: Added userid param to calendar callbacks
The mod_assign_core_calendar_is_event_visible and mod_assign_core_calendar_provide_event_action
functions now accept a new parameter ($userid) so they are not always dependet to the logged in user.
2018-07-31 15:45:36 +10:00
Shamim Rezaie 4ac18c8480 MDL-58768 core: Fix a typo for callback name 2018-07-31 15:45:36 +10:00
Shamim Rezaie ec92334c18 MDL-58768 mod_assign: Add $user param to assign::can_grade 2018-07-31 15:45:36 +10:00
Shamim Rezaie 856d6bcaf7 MDL-58768 calendar: Add $requestinguser to the container class
The requesting user is not always the same as the current user. The container class now allows a different user
to be set as the requesting user. All capability checks are done against the requesting user.

Also, the $requestinguser is passed to core_calendar_provide_event_action and core_calendar_is_event_visible
callback functions. These callback functions need to be updated in all activity modules to accept a $user parameter.
2018-07-31 15:45:36 +10:00
Shamim Rezaie b2704139ad MDL-58768 coursecat: coursecat::get to accept a $user parameter 2018-07-31 15:45:35 +10:00
Shamim Rezaie 991850894e MDL-58768 Calendar: Update get_raw_events_legacy_implementation
Update get_raw_events_legacy_implementation to work with the passed $users parameter instead of the logged in user.
Also, fixed a bug where get_raw_events_legacy_implementation was failing when $users was set to true, and a list of
$groups was given.
2018-07-31 15:45:35 +10:00
Shamim Rezaie a20071b2fe MDL-58768 Calendar: Added user param to calendar_set_filters
Decoupled calendar_set_filters from $USER.
Also removed the backward compatibility bit from the function because it was a left over.
2018-07-31 15:44:58 +10:00
Shamim Rezaie c71fe8690c MDL-58768 Calendar: Added userid param to calendar_get_default_courses 2018-07-31 15:31:58 +10:00
Eloy Lafuente (stronk7) 66e70ef537 Merge branch 'MDL-57977-34' of git://github.com/vmdef/moodle into MOODLE_34_STABLE 2018-07-30 21:10:17 +02:00
Eloy Lafuente (stronk7) 0ed13e1936 MDL-63002 core: fixed incorrect calls to non-existent delete_record() 2018-07-30 16:17:24 +02:00
Marina Glancy 01ed2a4b1c MDL-61424 admin: reset registration if token is rejected 2018-07-30 16:13:30 +02:00
Mihail Geshoski f99d2fc276 MDL-57666 repositories: Error when copying file from Dropbox repository 2018-07-30 09:30:41 +08:00
AMOS bot d4079a3b2d Automatically generated installer lang files 2018-07-28 00:08:54 +00:00
David Mudrák e2cbb82469 MDL-62965 core_user: Fix missing user profile fields on signup page 2018-07-27 10:36:47 +02:00
Jun Pataleta aaca3f9244 Merge branch 'MDL-62950-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-07-27 16:18:25 +08:00
David Mudrák b2586b47c6 MDL-62619 privacy: Fix a missing alias in the blog provider class
The new implementation revealed another existing bug that did not expose
before due to coincidently same named table alias in the outer query.
2018-07-27 10:14:33 +02:00
David Mudrák 52bb7f16d3 MDL-62619 privacy: Fix some bits of performance improvements
* We need to use is_numeric() in this case as is_int() would never
  return true.
* Extend the supported cases, add support for SQL consisting just of
  numerical value or selectinga numerical constant.
* Do not rely on any particulat letter case in provided SQL.
* Add unit tests for the new method. Even when it is a protected one, it
  is an essential unit to be tested on its own.
2018-07-27 10:14:33 +02:00
Andrew Nicols 9f3ca3e7ac MDL-62619 privacy: Improve performance of contexts loading
When possible, we want to use JOIN over WHERE IN. It is known that the
later performs badly in MySQL.
2018-07-27 10:14:33 +02:00
David Mudrák bee9ca08af MDL-59847 core: Fix display of hidden identity fields in user lists
Places that display list of users (such as course participants page)
with additional identifier fields now respect the user's permission to
view other users' hidden profile fields.
2018-07-27 10:09:05 +02:00
Sara Arjona 6e09d47fc5 MDL-41847 core_user: Add preferred lang field to the user creation form
The preferred language has been added only to the user creation form.
For existing users, you should access to the user profile, click over
Preferences and go to the Preferred language page.
2018-07-27 09:07:39 +02:00
Sara Arjona 396b60a4c2 MDL-41847 core_user: Add lang to login URL email for new user accounts 2018-07-27 09:07:39 +02:00
Andrew Nicols ebba2fc8d3 MDL-62950 behat: Disable editing for boost test 2018-07-27 11:06:30 +08:00
Andrew Nicols e93427657a MDL-62950 behat: Correct use of nav 2018-07-27 11:02:52 +08:00
Andrew Nicols f1cb7fc6a3 MDL-62950 behat: Correct path to P&P 2018-07-27 11:02:47 +08:00
Mark Nelson 687d4c6aec MDL-62977 mod_wiki: style buttons appropriately 2018-07-27 10:51:38 +08:00
AMOS bot 58829757c3 Automatically generated installer lang files 2018-07-27 00:40:34 +00:00
Dan Marsden f3a4d3fef3 MDL-58015 mod_scorm: set orgidentifier correctly for popup. 2018-07-27 10:37:06 +12:00
Eloy Lafuente (stronk7) e8ebf0f088 weekly release 3.4.4+ 2018-07-26 19:56:45 +02:00
Eloy Lafuente (stronk7) bbc29a982c Merge branch 'MDL-62771-34_move_plag_disclosure' of https://github.com/jmcgettrick/moodle into MOODLE_34_STABLE 2018-07-26 00:39:36 +02:00
Andrew Nicols d2354a36e2 Merge branch 'MDL-60826-34-fix' of https://github.com/lameze/moodle into MOODLE_34_STABLE 2018-07-25 13:42:37 +08:00
Simey Lameze e1f4fdeef0 MDL-60826 calendar: fix group event type logic 2018-07-25 12:50:48 +08:00
Tony Butler c4ebaeccfc MDL-59611 mod_assign: Move help icons for subplugin types out of labels 2018-07-25 12:22:05 +08:00
Andrew Nicols 7aaaf91ff7 Merge branch 'MDL-60826-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-07-25 09:20:14 +08:00
Simey Lameze 0159ae55db MDL-60826 calendar: further performance improvements
This commit does few tweaks and other performance improvements to
calendar_get_allowed_event_types to be more efficient. Also some minor
queries optimizations on the event form to fetch the list of courses
without groups.
2018-07-25 09:03:54 +08:00
Simey Lameze 98e7b3b5bc MDL-60826 calendar: restrict course fields to be retrieved 2018-07-25 09:03:54 +08:00
Simey Lameze b7f4c5d9db MDL-60826 calendar: update manage subscription page to use new function 2018-07-25 09:03:54 +08:00
Simey Lameze e220725ad7 MDL-60826 calendar: lazy load groups on event form 2018-07-25 09:03:54 +08:00
Simey Lameze 7eec9cd236 MDL-60826 calendar: tests for calendar_get_allowed_event_types 2018-07-25 09:03:54 +08:00
Simey Lameze 8105a66d02 MDL-60826 calendar: introduce calendar_get_allowed_event_types function 2018-07-25 09:03:54 +08:00
Eloy Lafuente (stronk7) efa0914c75 Merge branch 'MDL-62961_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-07-25 01:25:02 +02:00
Eloy Lafuente (stronk7) aa7004d325 Merge branch 'MDL-62935-34' of git://github.com/bmbrands/moodle into MOODLE_34_STABLE 2018-07-25 01:17:31 +02:00
Eloy Lafuente (stronk7) d35b833ff1 Merge branch 'MDL-62653-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-07-25 00:39:20 +02:00
Eloy Lafuente (stronk7) f62ab7dcbc Merge branch 'MDL-60874-34-enrolautocomplete' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-07-24 19:06:37 +02:00
Eloy Lafuente (stronk7) ce3f2aec3d Merge branch 'MDL-62925_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-07-24 18:33:05 +02:00
Bas Brands 826725db5b MDL-62935 boost: slideshow view page overflow 2018-07-24 10:27:39 +02:00
Jun Pataleta 9ed6f59d5c Merge branch 'MDL-62919-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-07-24 16:23:01 +08:00
Jun Pataleta 42f4ae18eb Merge branch 'MDL-62939-34-cleanhtmluserdesc' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-07-24 11:58:01 +08:00
Jake Dallimore ab53088e8d MDL-59595 admin: Make sure $ADMIN is properly unset when changing users 2018-07-24 08:33:04 +08:00
Jake Dallimore 3bbb669729 MDL-59595 admin: unit test covering the adminroot cache reset scenario
The adminroot cache should be reset when the current user is changed,
which can occur during cron or during unit tests.
2018-07-24 08:33:04 +08:00
Victor Deniz 215dd70bd7 MDL-57977 search: GlobalSearch by alternate name fields
Enable support for searching all name fields in search
2018-07-23 10:12:28 +01:00
Mark Nelson 9573812fc1 MDL-62961 mod_feedback: style buttons appropriately 2018-07-23 15:49:18 +08:00
Andrew Nicols b82c612bf5 Merge branch 'MDL-35977-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-07-23 15:31:38 +08:00
Jun Pataleta 8962d2972f Merge branch 'MDL-62949-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-07-23 14:53:19 +08:00
Andrew Nicols 7c20db0f18 Merge branch 'MDL-61707-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-07-23 11:41:17 +08:00
Andrew Nicols aa425b569b Merge branch 'MDL-29701-34' of https://github.com/phuchau1509/moodle into MOODLE_34_STABLE 2018-07-23 09:44:23 +08:00
Mihail Geshoski 80418bedc0 MDL-61707 authentication: Remove presignup session upon user signup 2018-07-23 09:33:32 +08:00
Mihail Geshoski 28ec0dff6e MDL-35977 comments: Missing label in blog and assignment comment area 2018-07-23 08:56:06 +08:00
Andrew Nicols 7968c4c46a MDL-62949 calendar: Fix behat nav to calendar 2018-07-20 18:01:45 +08:00
Andrew Nicols 2d6cb43e1e weekly release 3.4.4+ 2018-07-20 15:09:07 +08:00
Andrew Nicols 68bc0a0b80 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-07-20 15:09:06 +08:00
Jake Hau b405813ec0 MDL-29701 editor: mform disableif doesn't work on editor element 2018-07-19 11:35:59 +07:00
David Mudrák 4b6910d319 MDL-62939 user: Fix field type of the user profile description
As this is an editor element field, the it is supposed to be PARAM_RAW.
Otherwise it cleans-up certain non-HTML syntax such as Markdown
blockquote characters.
2018-07-18 14:30:05 +02:00
Jun Pataleta 760e425c62 Merge branch 'MDL-62811_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-07-18 16:12:00 +08:00
Andrew Nicols c87e271a95 Merge branch 'MDL-62889_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-07-18 15:36:50 +08:00
Jun Pataleta c6dc53a0d6 Merge branch 'MDL-62769_34' of https://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-07-18 14:54:17 +08:00
Mark Nelson 23a04bf2cb MDL-62889 message_popup: redirect using moodle_url
Without this relative URLs passed (like /message/index.php)
were being redirected to HOST/message/index.php rather than
$CFG->wwwroot/message/index.php.
2018-07-18 13:25:36 +08:00
Mark Nelson b36383fb42 MDL-62889 message_popup: redirect to notification page if url is empty
If you pass a URL that is not a valid URL (for example
';') it is cleaned to an empty string which redirects to
$CFG->wwwroot/message/output/popup/ which is not a valid
page.
2018-07-18 13:24:57 +08:00
Mark Nelson bf69854d40 MDL-62889 message_popup: allow redirects to external URLs
Many institutions create notifications that link to an
external service. We need to allow redirects to these
systems.
2018-07-18 13:18:15 +08:00
Mark Nelson f52e88ac70 MDL-62889 message_popup: only add redirecturl if it exists
We allow notifications to have a null value for the 'contexturl'.
In this case we should not be appending a 'redirecturl' param to
the URL when it is going to be empty.
2018-07-18 13:16:18 +08:00
Jun Pataleta d0026b8b25 Merge branch 'MDL-62781-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-07-18 10:05:19 +08:00
Jun Pataleta a67cc10051 MDL-62781 core_question: Remove unnecessary assertion 2018-07-18 09:59:51 +08:00
Tim Hunt cf3f82bd18 MDL-62781 question/privacy: fix tests with CodeRunner is installed
The tests were assuming that no plugin ever created questions on
install.

Also change the tests to do the counting in the DB. That is more
efficient.
2018-07-18 09:59:51 +08:00
AMOS bot 2e1dab9f60 Automatically generated installer lang files 2018-07-18 00:07:42 +00:00
cescobedo c6a9858c98 MDL-62919 auth_shibboleth: Use the right shibboleth_auth_instructions
Change $CFG->auth_instructions by shibboleth/auth_instructions in the index_form.html
2018-07-17 21:08:00 +02:00
David Monllao 9c48f36931 Merge branch 'MDL-59447-34' of https://github.com/nwp90/moodle into MOODLE_34_STABLE 2018-07-17 14:35:13 +02:00
David Monllao c0a2bba4e7 Merge branch 'MDL-54830-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-07-17 13:55:20 +02:00
David Monllao c650dd8568 Merge branch 'MDL-61351_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-07-17 12:32:16 +02:00
Tim Schroeder af4c2fb8cf MDL-61351 auth_shibboleth: removed redundant session handler class check 2018-07-17 16:48:22 +08:00
Tim Schroeder 823bbbfc00 MDL-61351 core: added \core\session\manager\get_handler_class()
* This is needed e.g. by the shibboleth logout handler to check which
type of sessions are used.
2018-07-17 16:48:22 +08:00
Mark Nelson 18a937e9d1 MDL-61351 auth_shibboleth: move new functions to separate class
This reduces the amount of code to an already confusing logout.php
file and prevents conflicts if someone else happens to be using
the same function name in a file.
2018-07-17 16:48:22 +08:00
David Monllao b55fa75d03 Merge branch 'MDL-62868-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-07-17 10:20:30 +02:00
Tim Schroeder 2170351cbc MDL-61351 shibboleth: Logout: fix session handler class not being used
* use $CFG->session_handler_class to determine which type of session is
  used
* if not set, use $CFG->dbsession instead
2018-07-17 16:19:13 +08:00
David Monllao 2abfaea271 Merge branch 'MDL-62663_34' of https://github.com/andrewhancox/moodle into MOODLE_34_STABLE 2018-07-17 09:58:47 +02:00
David Monllao efd4bdb490 Merge branch 'MDL-60924-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-07-17 09:39:23 +02:00
Mark Nelson 5d12627609 MDL-62925 mod_wiki: style 'Search wikis' button 2018-07-17 11:31:58 +08:00
Andrew Nicols 52a3e011e3 Merge branch 'MDL-62849-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-07-17 10:37:09 +08:00
Adrian Greeve f1900faf75 MDL-62849 files lib: Add method to return all files.
Added a function which returns all the files from all directories
in the draftarea.
2018-07-17 10:28:22 +08:00
AMOS bot a52a06c744 Automatically generated installer lang files 2018-07-17 00:08:28 +00:00
David Mudrák 33d87fdbc4 MDL-60874 enrol_manual: Improve searching of users in quick enrol UI
* The maximum of users to be displayed raised from 30 to 100. This is
  consistent with the legacy users selector available via enrolment
  methods page.
* If there are more users found matching the search criteria, notify the
  user instead of displaying them. This is to prevent false impression
  that there are only that many users.
* Added behat tests for the new behaviour.
2018-07-16 20:54:40 +02:00
David Mudrák 5015c4229e MDL-60874 core_form: allow autocomplete AJAX handlers return a string
Custom AJAX handlers for the form autocomplete fields can now optionally
return string in their processResults() callback. If a string is
returned, it is displayed instead of the list of suggested items.

The string is displayed same way as we inform about no available
suggestions.
2018-07-16 20:54:40 +02:00
sarjona 44bae9d937 MDL-60924 core_user: Hold participant filters when clicking some link 2018-07-16 18:06:29 +02:00
David Monllao b88a479c6d Merge branch 'MDL-49025-m34' of https://github.com/NeillM/moodle into MOODLE_34_STABLE 2018-07-16 13:35:13 +02:00
David Monllao 982a838ec1 Merge branch 'MDL-61019-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-07-16 13:25:21 +02:00
Andrew Nicols a96703eae4 Merge branch 'MDL-45851_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-07-16 13:18:44 +08:00
Jake Dallimore 6a3aaf1803 MDL-54830 core_course: fix maxbytes logic in course_update web service
The service should allow the special value of 0 (site limit) to be set.
2018-07-16 10:43:33 +08:00
Jake Dallimore 36f47cb5e5 MDL-62868 core_group: clear group_grouping cache when changing grouping 2018-07-16 10:36:48 +08:00
Jake Dallimore ae125e5c39 Merge branch 'MDL-45389-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-07-16 10:12:16 +08:00
Neill Magill 3c5064892c MDL-49025 assign: Submissions of an empty directory should not save
Before this change if only a folder was submitted the submission_is_empty
check would return true. This meant that the draft area would be saved.
The is_empty check would then be called which would return false. This
caused the submission form to indicate to the user that the submission
had failed.

Now is_empty and submission_is_empty should both return false if only
folders are submitted.
2018-07-13 14:05:41 +01:00
Neill Magill dae2f76b7d MDL-49025 assign: Test than an empty directory will not submit 2018-07-13 14:05:41 +01:00
Luca Bösch 7775958575 MDL-61019 Theme boost: lesson display issues with buttons/progress bar. 2018-07-13 09:24:25 +02:00
Luca Bösch e1dc6ff735 MDL-45389 theme_bootstrapbase: Forum index page alignment in clean. 2018-07-13 09:24:08 +02:00
Luca Bösch c9f5af8596 MDL-44538 action_menu: rounded corner of highlights only where needed. 2018-07-13 09:24:00 +02:00
Andrew Nicols d1040fe2b3 MDL-62653 behat: Ensure that tasks run properly from behat 2018-07-13 13:54:15 +08:00
Jake Dallimore a7c1f4497c weekly release 3.4.4+ 2018-07-13 12:26:11 +08:00
Nick Phillips a29d421ac4 MDL-59447 question: GIFT import to respect multichoice defaults
Fix GIFT import to respect default answernumbering for new multichoice
questions (introduced in MDL-50011). Default for shuffleanswers is still
ignored, as this is a rather coarse-grained way to do it, and the wrong
setting for shuffleanswers would irreversibly alter the meaning of some
questions.

This is not an ideal long-term fix, but will save significant effort
for anyone who needs to be able to set answernumbering style for
questions imported in GIFT format.
2018-07-13 13:32:27 +12:00
Andrew Nicols aae5f920ae Merge branch 'MDL-62746-34-fix' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-07-12 16:22:47 +08:00
Jun Pataleta b53c5e3891 MDL-62746 tag: Behat fix for combining tags scenario 2018-07-12 16:04:06 +08:00
David Monllao 30854621a0 MDL-59599 navigation: Respect previous activity-level navigation
The original patch was overwriting grading methods navigation.

All credit goes to Andrew Nicols.
2018-07-12 10:25:34 +08:00
David Monllao 6cc1f2efda Merge branch 'MDL-62618-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-07-11 18:48:22 +02:00
Jake Dallimore 63dc12acea Merge branch 'MDL-62712-34' of https://github.com/HuongNV13/moodle into MOODLE_34_STABLE 2018-07-11 09:02:51 +08:00
Andrew Nicols 8350a4fddd Merge branch 'MDL-52318-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-07-11 08:58:59 +08:00
David Monllao 42a2445ddc Merge branch 'MDL-62262-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-07-10 13:33:30 +02:00
David Monllao c07a557a40 Merge branch 'MDL-62823-m34' of https://github.com/NeillM/moodle into MOODLE_34_STABLE 2018-07-10 11:46:50 +02:00
Andrew Nicols 080bb928ab Merge branch 'MDL-61578-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-07-10 16:46:43 +08:00
Huong Nguyen d49d4dbcd4 MDL-62712 Filepicker: Improve upload process
Lost the uploading file when user press Submit before upload process has done
2018-07-10 15:21:40 +07:00
David Monllao 32b39ec6bb Merge branch 'MDL-62814-34' of https://github.com/HuongNV13/moodle into MOODLE_34_STABLE 2018-07-10 07:51:05 +02:00
Andrew Hancox b88f38e65d MDL-61578 backup: Added unit test for is_course_modified check. 2018-07-10 10:59:52 +08:00
Michael Hawkins af2afaae9b MDL-61578 backup: Prevent backup logging triggering fresh backups.
Thanks to Renaat Debleu for their contribution to this solution.
2018-07-10 10:57:28 +08:00
Andrew Nicols 273e37cba7 Merge branch 'MDL-62746-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-07-10 10:09:17 +08:00
Jake Dallimore a91db9907e Merge branch 'MDL-62772-34_always_show_disclosure' of https://github.com/jmcgettrick/moodle into MOODLE_34_STABLE 2018-07-10 09:00:57 +08:00
David Monllao 2722c38955 Merge branch 'mdl34_MDL-62753' of https://github.com/OdyX/moodle into MOODLE_34_STABLE 2018-07-09 15:15:54 +02:00
David Monllao 662e17e502 Merge branch 'MDL-56881-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-07-09 14:39:21 +02:00
David Monllao be49e1f9cc Merge branch 'MDL-62037-34' of https://github.com/lethevinh/moodle into MOODLE_34_STABLE 2018-07-09 13:48:59 +02:00
David Monllao 5d33da7569 Merge branch 'MDL-62831-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-07-09 13:36:29 +02:00
David Monllao 7f044c1ed4 MDL-59599 navigation: Strict zero-position comparision 2018-07-09 12:27:43 +02:00
David Monllao 4013b661b4 Merge branch 'MDL-59599-34' of https://github.com/Kathrin84/moodle into MOODLE_34_STABLE 2018-07-09 12:00:20 +02:00
Andrew Hancox 8b36e8a5c2 MDL-62663 core_user: Enforce viewalldetails capability when editing user 2018-07-09 09:50:26 +01:00
John McGettrick 61d5685b04 MDL-62772 mod_assign: Show disclosure for all submitters 2018-07-09 09:14:38 +01:00
Andrew Nicols cb932b8692 Merge branch 'MDL-33509-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-07-09 14:02:22 +08:00
Damyon Wiese ee70cf9d15 MDL-43334 backup: Fix cancel JS
The cancel button is a form element within a div that has the confirmcancel class. When we
accept a cancel modal, we should attempt to click the most specific form element of the
div, not the entire div.
2018-07-09 12:18:46 +08:00
Damyon Wiese ad83f25e94 MDL-43334 backup: Lanuage for cancel
Cancel backup buttons need clear lang strings.
2018-07-09 12:18:45 +08:00
Andrew Nicols b54f6d4781 MDL-56093 auth_db: Remove issue no. from comment 2018-07-09 12:14:50 +08:00
Andrew Nicols 8a78198376 Merge branch 'MOODLE_34_STABLE_MDL_56093' of https://github.com/eledia/moodle into MOODLE_34_STABLE 2018-07-09 12:14:46 +08:00
Jake Dallimore ebaabae83d Merge branch 'MDL-61359-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-07-09 12:11:26 +08:00
Jake Dallimore 2eeb189638 MDL-52318 core_form: allow multiple filepicker-enabled url elements
In cases when filepicker support is enabled, this patch adds a wrapper
div around the url element and includes the filepicker id in its id.
This allows the js callback code to target the specific input field
with which it is associated.
2018-07-09 11:34:00 +08:00
Jake Dallimore ea89ce9406 MDL-56881 mod_choice: add unit tests for choice_user_submit_response
Tests cover option limits and multiple option responses.
2018-07-09 11:09:13 +08:00
Jake Dallimore 3dac03b060 MDL-56881 mod_choice: clarify lang string for limit-reached scenarios 2018-07-09 11:08:45 +08:00
Jake Dallimore c58e6ca41e MDL-56881 mod_choice: fix bug with limits when saving existing choice
The check determining whether a choice option's limit was exceeded was
including the user's existing answers in its checks, meaning a user
couldn't save an existing choice answer, or select further options,
if all a choice option limit was reached. This patch fixes that.
2018-07-09 11:08:41 +08:00
Eloy Lafuente (stronk7) 5ebb6eb15c Moodle release 3.4.4 2018-07-07 06:53:43 +02:00
AMOS bot c97874b7a8 Automatically generated installer lang files 2018-07-07 00:08:37 +00:00
Luca Bösch 79e6e5de26 MDL-62262 quiz: quiz index page showing wrong dates. 2018-07-06 15:05:03 +02:00
vinhle ba335d048c MDL-62037 Filepicker: Review image not change when overwrite same 2018-07-06 17:50:34 +07:00
John McGettrick 39e69c1b9b MDL-62771 mod_forum: Move print_disclosure 2018-07-06 09:21:22 +01:00
Andrew Nicols 71e351ec79 weekly release 3.4.3+ 2018-07-06 14:05:10 +08:00
Andrew Nicols 9347c4f8a3 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-07-06 14:05:08 +08:00
Huong Nguyen 7591658a47 MDL-62814 Question: Improve column base display_header
Column base does not support custom tip if sortable is an array
2018-07-06 10:59:38 +07:00
Tim Hunt b05acb6b10 MDL-62811 question bank: rendering shouldn't load individual questions 2018-07-05 17:01:54 +01:00
Benjamin Wolf be616a6fd9 MDL-56093 auth_db: Save custom profile fields in auth_db 2018-07-05 11:12:50 +02:00
Didier 'OdyX' Raboud 79172a41fe MDL-62753 shibboleth: Logout: fix DB sessions kill
* Use the Moodle 2+ {sessions} table, and decode the session
  correctly using session_decode (adodb_unserialize is deprecated).
* Kill all user sessions using \core\session\manager's
  kill_user_sessions.
2018-07-05 09:06:47 +02:00
Michael Hawkins 1d3ff57a88 MDL-62618 user: Display full names consistently on users page 2018-07-05 10:17:16 +08:00
Michael Hawkins d0f3521f27 MDL-62618 forum: Made full names displayed consistent 2018-07-05 10:17:16 +08:00
AMOS bot c1491880fa Automatically generated installer lang files 2018-07-05 00:08:32 +00:00
Kathrin Osswald f3f44ad3d8 MDL-59599 navigation: Improve activity status for nav nodes. 2018-07-04 20:00:56 +02:00
Tim Hunt 3b5086f510 MDL-45851 restore: random questions must always be created
They are really a pointer from a particular quiz to a question category.
They should never be shared, because if they are, unexpected things
happend when they are edited.
2018-07-04 16:30:33 +01:00
Tim Hunt 9dd7b0f7f4 MDL-62820 question import: properly escape output 2018-07-04 15:41:05 +08:00
Jake Dallimore eeefdaebcf Merge branch 'wip-nolink-bug-34' of https://gitlab.di.unito.it/rabellino/moodle into MOODLE_34_STABLE 2018-07-04 14:39:08 +08:00
Damyon Wiese d2761afa21 MDL-62782 assign: viewgrades allows files
Grade viewer role should be able to see feedback files for an assignment submission.
2018-07-04 14:19:24 +08:00
Jake Dallimore 29f7ef8305 Merge branch 'MDL-41463-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-07-04 12:59:44 +08:00
Damyon Wiese 89908c0256 MDL-62831 mod_assign: Download as folders help
The help string for the download as folders setting should not mention the number of files
submitted by the student. It is not related to that, it is only dependant on the value of this setting.
2018-07-04 12:20:50 +08:00
Jake Dallimore 7aeaba8b8b Merge branch 'MDL-44081-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-07-04 10:51:09 +08:00
Andrew Nicols 136f206331 MDL-62834 behat: Move include to function 2018-07-04 10:45:35 +08:00
Eloy Lafuente (stronk7) 80ad7014f9 Merge branch 'wip-MDL-62526-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-07-04 04:19:31 +02:00
Adrian Greeve adbfa2fbfa MDL-62616 tool_log: Add a setting to disable exporting logs. 2018-07-04 10:00:16 +08:00
Eloy Lafuente (stronk7) ed3bf90af1 Merge branch 'MDL-62792_34' of https://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-07-04 00:55:31 +02:00
Eloy Lafuente (stronk7) 3861d07c02 Merge branch 'MDL-62838_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-07-04 00:52:23 +02:00
Eloy Lafuente (stronk7) 131fbed9fb Merge branch 'MDL-62834_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-07-04 00:46:49 +02:00
David Monllao e418005609 Merge branch 'MDL-61296-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-07-03 23:34:25 +02:00
David Monllao 41562c927f Merge branch 'MDL-62656-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-07-03 23:34:25 +02:00
David Monllao d83f207e8a Merge branch 'MDL-60915_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-07-03 23:34:24 +02:00
David Monllao bc1f051c49 Merge branch 'MDL-60014-34-catcherror-nopermission-annotatepdfcron' of https://github.com/Eva-Dv/moodle into MOODLE_34_STABLE 2018-07-03 23:34:24 +02:00
David Monllao 69ae176ca3 Merge branch 'MDL-62813-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-07-03 23:34:23 +02:00
David Monllao 6fef4bfb2f Merge branch 'MDL-32232-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-07-03 14:00:29 +02:00
Michael Hawkins d683aff069 MDL-62767 theme: Remove old localcaches when clearing/updating theme cache 2018-07-03 14:00:51 +08:00
Michael Hawkins 58fba949c4 MDL-61359 message: Updated sender contact text to text node content 2018-07-03 13:33:32 +08:00
Michael Hawkins 032abb1a6f MDL-62801 themes: Added missing filelib include 2018-07-03 13:08:51 +08:00
Marina Glancy 58b1b213ee MDL-62790 course: cap check in core_course_get_categories 2018-07-03 12:04:14 +08:00
Mihail Geshoski 94ac5fce56 MDL-33509 forms: Change button type in url resource editing page 2018-07-03 12:00:03 +08:00
Jake Dallimore eb2f403c10 Merge branch 'MDL-62715-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-07-03 08:50:14 +08:00
Eloy Lafuente (stronk7) af9ae800ee Merge branch 'MDL-62763-34-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-07-02 20:09:27 +02:00
Eloy Lafuente (stronk7) 9cc4cc02cf Merge branch 'MDL-62621-34-ixcomment' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-07-02 20:03:01 +02:00
Helen Foster 23790560f3 MDL-62763 lang: Merge English strings from the en_fix language pack
Significant string change:

* idnumbermod_help,core - mentioning resource and custom reporting
2018-07-02 13:44:38 +02:00
Jake Dallimore c082a46980 Merge branch 'MDL-62801-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-07-02 16:19:30 +08:00
David Mudrák 644a76167a MDL-62621 comments: Add missing indexes on comments table
The composite index over the fields contextid, commentarea and itemid
helps the comments API to load all comments for the given area
effectively.

The index over the userid field helps the privacy API to load all
comments by the given user.
2018-07-02 10:11:51 +02:00
Mihail Geshoski 31f830c2e8 MDL-62656 course: Align elements in course and category management 2018-07-02 08:26:14 +08:00
Eloy Lafuente (stronk7) 7cba6c1671 MDL-60915 core_dml: Change behavior to disabled by default
In stables it was decided to keep the current behavior
(not buffering/cursors) so nothing breaks/changes suddenly.

So this commit just disables the default buffer size used in
Moodle 3.5 and up (100000), defaulting to zero (feature disabled).

Still the feature can be enabled via dboptions and it's docummented
in the config-dist file.
2018-07-02 01:15:49 +02:00
sam marshall 9d97d1e006 MDL-60915 Document new dboption in config-dist.php 2018-07-02 00:46:36 +02:00
sam marshall f83d748f77 MDL-60915 core_dml: fix miscellaneous incorrect recordset usage
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
2018-07-02 00:46:26 +02:00
sam marshall 838f07703a MDL-60915 core_dml: get_recordset on Postgres eats all the RAM
On Postgres, get_recordset_sql loads all the results into memory
(within the Postgres library, which doesn't count towards the PHP
memory limit, but does count towards making your server run out of
memory) as soon as the query completes.

This commit changes the code to use cursors, which in Postgres
allow the results to be returned in smaller chunks (by default
100,000 rows).
2018-07-02 00:46:09 +02:00
Tim Hunt 189c996f4f MDL-62838 filters: dont use statics inside functions. Use MUC 2018-06-29 17:25:17 +01:00
Tim Hunt a8887717eb MDL-62834 behat: new step for enabling filters 2018-06-29 11:27:49 +01:00
Neill Magill cc008824ee MDL-62823 filter: Save changes button should be styled 2018-06-29 08:41:48 +01:00
Michael Hawkins dc39780050 MDL-62801 themes: Remove old mustache caches when new one generated 2018-06-29 10:51:09 +08:00
Zig Tan 282e6fe54d MDL-44081 assign: Fix Grader annotation button accessibility ordering 2018-06-29 09:28:46 +08:00
Luca Bösch dccacb6649 MDL-41463 course: Reset remove groups section advanced toggle. 2018-06-28 23:04:34 +02:00
Luca Bösch 7fe6acac9e MDL-32232 lesson: changing a page type chooser option for consistency 2018-06-28 23:04:23 +02:00
Sergio Rabellino 328ec4459f MDL-61403 filter: Fix for the nolink tag ignored
Fix for the nolink tag ignored if there are some other attributes defined in the same span
2018-06-28 11:01:40 +02:00
Simey Lameze 2a643b019e MDL-62813 calendar: add behat test for form validation 2018-06-28 14:12:32 +08:00
Simey Lameze 8291540ae7 MDL-62813 calendar: fix dmlreadexception on event form 2018-06-28 14:12:32 +08:00
Jake Dallimore ec68f39a1b weekly release 3.4.3+ 2018-06-28 14:03:01 +08:00
Marina Glancy 5a4668943d MDL-62526 admin: ask privacy policy agreement for moodle.net 2018-06-28 11:44:23 +08:00
Eloy Lafuente (stronk7) fa38f0302e Merge branch 'MDL-62325-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-06-28 02:06:10 +02:00
Eloy Lafuente (stronk7) 672dacf797 Merge branch 'wip-MDL-62755-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-06-28 01:56:52 +02:00
Eloy Lafuente (stronk7) 681fd03543 Merge branch 'MDL-62747_34' of https://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-06-28 00:32:52 +02:00
Matteo Scaramuccia 50402581d1 MDL-51080 env: warn when running MariaDB w/ wrong dbtype 2018-06-28 00:15:41 +02:00
Jake Dallimore b088c6d89b Merge branch 'MDL-61732-34' of https://github.com/Dagefoerde/moodle into MOODLE_34_STABLE 2018-06-27 12:18:36 +08:00
Eloy Lafuente (stronk7) 7811b73968 Merge branch 'MDL-45088-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-06-27 03:23:34 +02:00
Eloy Lafuente (stronk7) 08f2d2a061 Merge branch 'MDL-62703-34' of git://github.com/bmbrands/moodle into MOODLE_34_STABLE 2018-06-27 03:17:59 +02:00
Eloy Lafuente (stronk7) 98523f6970 Merge branch 'MDL-62735-34-refactor' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-06-26 10:44:45 +02:00
Eloy Lafuente (stronk7) a73c0c82f0 Merge branch 'MDL-59047-34' of git://github.com/bmbrands/moodle into MOODLE_34_STABLE 2018-06-26 03:05:38 +02:00
Eloy Lafuente (stronk7) 30fca6d09c Merge branch 'MDL-51419-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-06-26 02:42:34 +02:00
Eva Davitasvili ffa3e0e25e MDL-60014 assign: Annotate PDF - catch no permission error 2018-06-25 14:10:06 -04:00
Tim Hunt 215f3c9c25 MDL-62792 filters: fix some bad PHPdocs 2018-06-25 15:55:25 +01:00
Tim Hunt 4b862a14c9 MDL-62792 filter_mathjaxloader: don't use statics for once-only items 2018-06-25 15:55:23 +01:00
Shamim Rezaie 7bb4d2d88e MDL-62325 enrol_paypal: Added some keys and indexes to enrol_paypal.
- Added these keys to the enrol_paypal db: courseid, userid, instanceid
- Added these indexes to the enrol_paypal db: business, receiver_email
2018-06-25 13:01:16 +10:00
Adrian Greeve e57455a92d MDL-62755 mod_assign: Update to unit tests.
Overrides are now checked to be exported properly.
2018-06-25 09:52:37 +08:00
Adrian Greeve aa0a70f203 MDL-62755 mod_assign: Fix override export problem.
The cutoffdate and allowsubmissionsfromdate were not
being exported.
2018-06-25 09:52:37 +08:00
Christian Glahn 4fbb27eb13 MDL-61732 filters: Have emoticons respect nolink
Also extracts static emoticon cache to a field in order to increases
testability of filter_emoticon, because we are now able to reset the
static emoticon cache before tests, particularly for observing the
response to changing $CFG->emoticons.
2018-06-22 10:27:54 +02:00
Jake Dallimore 8e6d95b9cf MDL-51419 core_files: Support for utf8 in file names in MS Edge 2018-06-22 10:30:23 +08:00
Jake Dallimore 8aeacce28a MDL-62735 core_search: searchareas page now respects indexing support 2018-06-22 10:15:12 +08:00
Luca Bösch ebb40e783d MDL-45088 xmldb: Fix table alignment 2018-06-21 19:36:12 +02:00
Tim Hunt e997551349 MDL-62769 quiz statistics: graph should show all, not last, variant 2018-06-21 14:55:30 +01:00
Eloy Lafuente (stronk7) 7b1139543c weekly release 3.4.3+ 2018-06-21 14:01:04 +02:00
Andrew Nicols f720f30fd8 MDL-62715 mod_assign: Bump submissions back when grading in tests 2018-06-21 08:41:24 +08:00
Jun Pataleta 33bce7fa20 Merge branch 'MDL-62017-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-06-20 19:39:58 +08:00
David Monllao aa7263c202 Merge branch 'MDL-61482-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-06-20 13:29:33 +02:00
cescobedo e21e44b054 MDL-61296 auth_ldap: remove PHP notices when field does not exist. 2018-06-20 11:49:11 +02:00
Luca Bösch e99625f496 MDL-62017 tool_customlang: format language customisation buttons. 2018-06-20 10:54:04 +02:00
Eloy Lafuente (stronk7) 288fe4fe35 Merge branch 'MDL-62014-34' of git://github.com/nashtechdev01/moodle into MOODLE_34_STABLE 2018-06-20 00:57:37 +02:00
Eloy Lafuente (stronk7) 908a8be88b Merge branch 'MDL-36424-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-06-19 19:20:46 +02:00
Eloy Lafuente (stronk7) 3000c7bd3a Merge branch 'wip-MDL-61786-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-06-19 19:16:51 +02:00
Eloy Lafuente (stronk7) 93bce58feb Merge branch 'MDL-62358-34' of https://github.com/HuongNV13/moodle into MOODLE_34_STABLE 2018-06-19 19:08:59 +02:00
Eloy Lafuente (stronk7) ec78b3cb99 Merge branch 'MDL-44791-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-06-19 18:59:57 +02:00
Eloy Lafuente (stronk7) 421a61a4fb Merge branch 'MDL-62449-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-06-19 18:52:40 +02:00
Zig Tan ac8b6611c9 MDL-61482 mod_assign: Clean html in offline grading CSV 2018-06-19 23:30:24 +08:00
Tim Hunt 3d2ba2e8f1 MDL-62747 accesslib: rdef caching should handle roles with no caps 2018-06-19 16:26:25 +01:00
Jun Pataleta 98434f6594 MDL-62746 tag: Make forms in tag modals use proper BS classes 2018-06-19 23:23:27 +08:00
Bas Brands d4213e994c MDL-62703 Themes: remove hover styles in course listings 2018-06-19 16:32:41 +02:00
Bas Brands 18c7a47105 MDL-59047 question type: short answer boost styles 2018-06-19 15:50:15 +02:00
David Monllao f601f8fa3f Merge branch 'MDL-62588-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-06-19 12:53:28 +02:00
Jun Pataleta 7090d8002b Merge branch 'MDL-61894-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-06-19 17:56:42 +08:00
David Monllao 61f06e8430 Merge branch 'MDL-58702-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-06-19 11:55:00 +02:00
Andrew Nicols 0e9bbab80b Merge branch 'MDL-60950-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-06-19 11:41:11 +08:00
Damyon Wiese 8b4346c530 MDL-60950 assign: Update incompatible unit test
Maintain compatibility with unit test changes after MDL-55609.
2018-06-19 10:59:19 +08:00
Damyon Wiese 0877aacab9 MDL-60950 assign: Rename class
testable_assign was renamed to mod_assign_testable_assign
2018-06-19 10:59:18 +08:00
Damyon Wiese 53e833b459 MDL-60950 assign: Robust filtering of grading table
For assignments with gradetype set to none, we need special handling when generating the query to filter submissions that need grading.
2018-06-19 10:59:18 +08:00
Damyon Wiese ba22824230 MDL-60950 assign: Test for the requires grading filter
This test covers when the requires grading filter is applied, but the
assignment has no grade and the feedbackcomments plugin is disabled.
2018-06-19 10:59:18 +08:00
Eloy Lafuente (stronk7) 6742a6f486 Merge branch 'MDL-62638-34' of git://github.com/bmbrands/moodle into MOODLE_34_STABLE 2018-06-19 02:04:09 +02:00
Eloy Lafuente (stronk7) 53be2f2707 Merge branch 'MDL-62571_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-06-19 01:49:58 +02:00
Sara Arjona 368aa15e22 MDL-62449 scorm: Move related data to data in the privacy export 2018-06-18 10:43:56 +02:00
Sara Arjona 55471119bd MDL-62449 scorm: Add SCORM data to privacy export (name, description) 2018-06-18 10:43:55 +02:00
Jun Pataleta d45d70b86b Merge branch 'MDL-62614-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-06-18 16:12:12 +08:00
Jun Pataleta 303aaced3d Merge branch 'MDL-62658_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-06-18 14:36:31 +08:00
Jun Pataleta 784bb185a5 Merge branch 'wip-MDL-62474-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-06-18 14:32:12 +08:00
Mark Nelson 276f6435af MDL-62658 message_popup: fixed issue with malformed URL being generated 2018-06-18 14:31:35 +08:00
Adrian Greeve 4cc042dff7 MDL-62474 theme_boost: Update to provider and unit test.
Theme boost contains a user preference which was not reported
before. Unit tests have been added to test the update.
2018-06-18 14:09:02 +08:00
Willian Mano 49d65dc9ee MDL-62474 theme_boost: Fix Boost privacy provider 2018-06-18 14:08:55 +08:00
Huong Nguyen 70c2cb7266 MDL-62614 Privacy: Core tag provider delete_item_tags function not work 2018-06-18 14:00:50 +08:00
Andrew Nicols 10845183f3 Merge branch 'MDL-62320-34' of git://github.com/vmdef/moodle into MOODLE_34_STABLE 2018-06-18 13:59:31 +08:00
Shamim Rezaie 5dcdf1d1ba MDL-62588 enrol_paypal: Add missing instanceid field 2018-06-18 15:15:50 +10:00
Andrew Nicols 7d0956191d Merge branch 'MDL-57968-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-06-18 09:10:36 +08:00
Victor Deniz ab3759815a MDL-62320 mimetypes: Add JSON to the default mime types list 2018-06-15 13:18:18 +01:00
Damyon Wiese 7621280df1 MDL-62643 assign: Skip empty online text files
Online text assignment submissions with no text entered into the editor should not
create a blank html document for providing feedback.
2018-06-15 13:45:39 +08:00
HungTran b338e8d272 MDL-62014 course: Add title to activity completion button 2018-06-15 10:21:01 +07:00
Zig Tan c53170461f MDL-58702 backup: Fix restoration of role mappings labels
Changes:
- Add logic to retrieve all the existing current roles.
- Apply the backup's role shortname by matching on the archetype.
- Added backup lang string 'undefinedrolemapping'.
2018-06-15 09:56:17 +08:00
Luca Bösch b4fdf0a5a3 MDL-61894 tag: Modal buttons style. 2018-06-14 17:30:50 +02:00
Luca Bösch 8fcf9309bb MDL-44791 admin: Open server check doc links in new window. 2018-06-14 17:29:52 +02:00
Ed Basset 6f5ae7edad MDL-36424 wiki: set group so subwiki tabs/pages display correctly 2018-06-14 17:29:35 +02:00
Huong Nguyen 132169831f MDL-62358 Question: Improve number function
Support all 'question numbers' that might be needed
2018-06-14 19:47:11 +07:00
Eloy Lafuente (stronk7) d8832ae8b9 weekly release 3.4.3+ 2018-06-14 10:56:00 +02:00
Eloy Lafuente (stronk7) 3e7543e81f Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-06-14 10:55:58 +02:00
Mark Nelson 5d42ef7732 MDL-31443 core_backup: change review heading to 'Restore settings' 2018-06-13 18:39:20 +02:00
Luca Bösch adf5986331 MDL-31443 core_backup: revert changes to util/ui/renderer.php 2018-06-13 18:39:19 +02:00
Jun Pataleta a7a630a3f5 Merge branch 'MDL59980_block_bug_34_STABLE' of git://github.com/kristian-94/moodle into MOODLE_34_STABLE 2018-06-13 09:58:33 +08:00
AMOS bot 92c1d10595 Automatically generated installer lang files 2018-06-13 00:08:19 +00:00
Kristian Ringer 6eef69757b MDL-59980 core_admin: Fix bug preventing block modification in settings 2018-06-13 09:33:02 +10:00
Simey Lameze 816b448956 MDL-62446 mod_glossary: optimize provider code 2018-06-12 18:28:31 +02:00
Simey Lameze f0c0534cf8 MDL-62446 mod_glossary: improve privacy unit tests 2018-06-12 18:28:30 +02:00
David Monllao cf482a6e6e Merge branch 'MDL-58063-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-06-12 11:05:53 +02:00
David Monllao c1f3810e42 Merge branch 'MDL-55609-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-06-12 10:20:38 +02:00
Jun Pataleta 1568720496 Merge branch 'wip-MDL-62574-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-06-12 11:55:32 +08:00
Adrian Greeve f136376f51 MDL-62574 core_privacy: Unit tests to check the context base.
This now tests the possibility of a context being deleted.
2018-06-12 11:28:33 +08:00
Adrian Greeve 9bef4c5495 MDL-62574 core_privacy: Check the contextlist for real contexts.
There are situations when contexts will be deleted in the provider.
The context list is not updated and so we have introduced a try
catch.
2018-06-12 11:28:33 +08:00
Andrew Nicols c172b1e2f7 Merge branch 'MDL-62628-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-06-12 09:55:08 +08:00
Andrew Nicols 37e7988513 Merge branch 'MDL-60819-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-06-12 09:27:49 +08:00
Eloy Lafuente (stronk7) 66705e877b Merge branch 'MDL-31443-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-06-12 01:38:09 +02:00
Michael Aherne 55e47947e5 MDL-62577 unit tests: Quote class name in re-run command. 2018-06-12 00:08:24 +02:00
Leon Stringer fc1b6699df MDL-61786 auth: Changed strings for Test Settings to lang strings
The output strings for the Test Settings function were hard-coded English
strings. They've been changed to standard language strings which can be
translated and maintained via AMOS.
2018-06-11 14:18:46 +08:00
Jake Dallimore 843c3d5242 MDL-60819 core_files: fix exception thrown from generate_image_thumbnail
This function now requires gdlib.php.
2018-06-11 10:46:57 +08:00
Luca Bösch 68d4285fc4 MDL-31443 backup: Title and cancel messages stating import and restore 2018-06-08 11:33:09 +02:00
Mihail Geshoski eb1798f392 MDL-62628 resource: Folder name formatting issue when displayed inline 2018-06-08 08:36:48 +08:00
Mihail Geshoski fa141e42e5 MDL-58063 blocks: Cannot access manage files in HTML block in clean 2018-06-08 08:30:37 +08:00
Eloy Lafuente (stronk7) cad7a07170 weekly release 3.4.3+ 2018-06-07 16:59:57 +02:00
Bas Brands 5275d9edc6 MDL-62638 Theme boost: remove broken css 2018-06-07 16:44:54 +02:00
Jun Pataleta b7ce4d277b Merge branch 'MDL-61826-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-06-06 11:25:17 +02:00
Jun Pataleta 77870cc549 Merge branch 'MDL-46513_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-06-06 11:25:14 +02:00
Jun Pataleta 456651626c Merge branch 'MDL-62586-34' of git://github.com/bmbrands/moodle into MOODLE_34_STABLE 2018-06-06 11:25:11 +02:00
Andrew Nicols 4606d898b0 Merge branch 'm34_MDL-61702_MariaDB_InnoDB10d3d1_Params_Removed' of https://github.com/scara/moodle into MOODLE_34_STABLE 2018-06-06 11:25:07 +02:00
Eloy Lafuente (stronk7) ca9a22327d Merge branch 'MDL-39486-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-06-06 11:25:04 +02:00
David Monllao 2e0fa15542 Merge branch 'MDL-46344-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-06-06 11:25:01 +02:00
Jun Pataleta cf5ed61e0d Merge branch 'MDL-62336_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-06-06 11:24:57 +02:00
Jun Pataleta e266745dd9 Merge branch 'MDL-61778-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-06-06 11:24:54 +02:00
cescobedo 4db0f1446c MDL-57968 core_message: Remove multiple unnecessary AJAX requests
Remove AJAX requests core_message_get_unread_conversations_count and
message_popup_get_unread_popup_notification_count and
render the unread messages and notifications into mustache template.
2018-06-06 11:07:48 +02:00
Jun Pataleta b8df0041ef MDL-61826 auth: Make Facebook endpoints more maintainable 2018-06-06 12:44:55 +08:00
Łukasz Szeremeta e5b9894cb1 MDL-61826 auth: Facebook OAuth2 - getting a better-quality profile photo
Get 200x200 px instead of 50x50 px user profile picture from Facebook OAuth2.
2018-06-06 12:44:55 +08:00
Bas Brands 82082aef16 MDL-62586 Themes: use Boostrap media compontent for author display 2018-06-05 15:14:22 +02:00
Luca Bösch 3149273dc0 MDL-62605 core_user: course name filter in unenrol modal. 2018-06-05 08:12:10 +02:00
Luca Bösch c5999e9816 MDL-46344 outputrenderers: Localize 'This page is'. 2018-06-01 11:43:54 +02:00
Michael Hawkins 40e7951409 MDL-61778 message: Renamed online status icon and replaced Boost icon 2018-06-01 10:25:24 +08:00
Andrew Nicols 572c939ec2 MDL-55609 assignfeedback_comments: Remove shared setUp 2018-06-01 07:33:14 +08:00
Andrew Nicols 6f1bf92b2f MDL-55609 mod_assign: Move fixture to folder 2018-06-01 07:33:14 +08:00
Andrew Nicols aea6fc7e83 MDL-55609 mod_assign: Remove shared setUp for all tests 2018-06-01 07:33:12 +08:00
Andrew Nicols 5e3bc5f34f MDL-55609 testing: Add a create_and_enrol helper 2018-06-01 07:32:25 +08:00
Matteo Scaramuccia 7d91d88601 MDL-61702 dml: MariaDB 10.3 supports only the Barracuda file format.
More details about this change also in https://tracker.moodle.org/browse/MDL-59099

Ref.: https://mariadb.com/kb/en/library/mariadb-1031-release-notes/#other-variables
2018-05-31 23:00:08 +02:00
Mark Nelson 6a1bb0f2be MDL-62571 mod_forum: fixed redirection URLs 2018-05-31 21:15:57 +08:00
David Monllao 8ebe976393 weekly release 3.4.3+ 2018-05-31 08:39:35 +02:00
Andrew Nicols de6d69b43e Merge branch 'MDL-57486-34-fix' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-05-30 13:27:31 +08:00
Jun Pataleta 43ae2182a9 MDL-57486 tool_recyclebin: Close the files recordset properly 2018-05-30 13:16:39 +08:00
Andrew Nicols b8bc620619 Merge branch 'MDL-57600-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-05-30 09:19:05 +08:00
Andrew Nicols 999fcfaa9f MDL-57486 tool_recyclebin: Coding style fix 2018-05-30 08:35:38 +08:00
Andrew Nicols f722092645 Merge branch 'm34_MDL-57486' of https://github.com/danmarsden/moodle into MOODLE_34_STABLE 2018-05-30 08:35:17 +08:00
Dan Marsden 92a2087415 MDL-57486 tool_recyclebin: Delete items when context already deleted. 2018-05-29 14:26:02 +12:00
Jun Pataleta 8ee54d3a01 Merge branch 'MDL-56498-34' of git://github.com/mickhawkins/moodle into MOODLE_34_STABLE 2018-05-29 09:37:05 +08:00
David Monllao c2036ae370 Merge branch 'MDL-62316_oauth_guess_image_fix_34_STABLE' of https://github.com/leonstr/moodle into MOODLE_34_STABLE 2018-05-28 16:48:57 +02:00
David Monllao 85b0aa82b5 Merge branch 'wip-MDL-62584-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-05-28 16:32:22 +02:00
David Monllao 2bb95d9c5a Merge branch 'MDL-42779-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-05-28 11:43:02 +02:00
Mark Nelson 86e3a67a95 MDL-62336 media_videojs: ensure videos have unique IDs 2018-05-28 16:44:46 +08:00
Luca Bösch 000e6f4975 MDL-42779 course: Pagination in management page preserves view action 2018-05-28 10:37:08 +02:00
Mark Nelson 9963253093 MDL-46513 mod_chat: pass has_capability result to fullname function 2018-05-28 15:53:10 +08:00
David Monllao 3753139ffe Merge branch 'MDL-57742_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-05-28 09:16:55 +02:00
David Monllao 8359822423 Merge branch 'm34_MDL-59596_DDL_Issues_With_MariaDB_10p2_SQLMode' of https://github.com/scara/moodle into MOODLE_34_STABLE 2018-05-28 08:19:35 +02:00
Mark Nelson 6c4ffecc59 MDL-57742 core_lib: Updated readme_moodle.txt 2018-05-28 13:14:02 +08:00
David Balch 2d8ba1ea5e MDL-57742 core_lib: Make tool_consumer_instance_guid optional
In the specification, tool_consumer_instance_guid is only listed
as recommended. However, the library was requiring it.

https://www.imsglobal.org/specs/ltiv2p0/implementation-guide#toc-42
2018-05-28 13:13:55 +08:00
Andrew Nicols cb6b89a3e6 Merge branch 'MDL-62515-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-05-28 12:30:17 +08:00
Marina Glancy d5897a6b17 MDL-62584 xmlrpc: return correct content-length 2018-05-28 11:20:08 +08:00
Simey Lameze e04ac51a29 MDL-57600 course: fix typo on courselib test 2018-05-28 09:42:11 +08:00
Alex 39a586d2fa MDL-57600 format: Fix spelling errors 2018-05-28 09:42:10 +08:00
Jun Pataleta eb7b1a9688 Merge branch 'MDL-61832-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-05-28 09:20:59 +08:00
Andrew Nicols e5434384e5 MDL-62543 mod_forum: Add RSS Unit tests 2018-05-28 08:54:58 +08:00
Andrew Nicols c5e1d2e5d2 Merge branch 'MDL-62543-34' of git://github.com/tobiasreischmann/moodle into MOODLE_34_STABLE 2018-05-28 08:54:46 +08:00
Eloy Lafuente (stronk7) bad2f9df33 Merge branch 'MDL-62408_34_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_34_STABLE 2018-05-28 02:15:39 +02:00
Mihail Geshoski 27b62bbaf4 MDL-39486 lesson: Length of label text too narrow in matching questions 2018-05-25 10:03:14 +08:00
Luca Bösch 9e1acf813b MDL-61832 lesson: don't hide lesson page editing options 2018-05-24 15:43:28 +02:00
David Monllao 9cf74e2636 weekly release 3.4.3+ 2018-05-24 10:45:59 +02:00
Tobias Reischmann 708dca3400 MDL-62543 forum: Switched the usage of the deleted flag for rss
The deleted flag was introduced through the Privacy API and was used
for post selection for the rss feed. In there it was used in the
wrong way, which lead to the exclusion of all non deleted posts instead
of excluding all deleted ones.
This commit fixes this problem.
2018-05-23 14:24:11 +02:00
Simey Lameze 951febb2a8 MDL-61189 editor_tinymce: save data before submitting 2018-05-23 10:48:50 +08:00
Jake Dallimore dde3643075 Merge branch 'MDL-61932-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-05-23 10:03:09 +08:00
Jun Pataleta 1fc9b813b2 MDL-61932 mod_glossary: Fetch the correct front page section 1 ID 2018-05-23 09:58:40 +08:00
Jun Pataleta a8662028ab MDL-61932 mod_glossary: Display site-level glossaries on section 1
* Glossary activities created on the front page by importing
entries are being added to section 0, but the front page only shows
activities on section 1.
2018-05-23 09:58:37 +08:00
Leon Stringer 1755077688 MDL-62316 OAuth 2: Only guess image if base URL set.
If you added an OAuth 2 service with no base URL guess_image() would try to
parse this empty value looking for a favicon.ico.  We now check if the base
URL is empty beforehand and skip this if so.
2018-05-22 19:46:12 +01:00
Jun Pataleta 41d477d8d6 Merge branch 'wip-MDL-62239-34' of https://github.com/Beedell/moodle into MOODLE_34_STABLE 2018-05-22 10:05:06 +08:00
Andrew Nicols 7c8dc9bc0d Merge branch 'MDL-62482_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-05-22 09:42:40 +08:00
Andrew Nicols 69471d8f81 Merge branch 'MDL-62488_34_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_34_STABLE 2018-05-22 09:31:41 +08:00
Jake Dallimore e41a1d1409 Merge branch 'MDL-61015-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-05-22 08:15:30 +08:00
Eloy Lafuente (stronk7) 48dbc763c9 Merge branch 'MDL-62500-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-21 13:37:48 +02:00
John Beedell e306188732 MDL-62239 QTYPE: iOS 11.3 broke Moodle drag-drop question types 2018-05-21 11:50:36 +01:00
David Monllao 137508e70f Merge branch 'm34_MDL-61893_Accept_Any_Node_Carbon_Version' of https://github.com/scara/moodle into MOODLE_34_STABLE 2018-05-21 12:04:50 +02:00
Luca Bösch 32211803c3 MDL-61015 course: consistently display hidden sections
This commit moves the availability info on top.
2018-05-21 11:33:57 +02:00
Marina Glancy eeb84ca381 MDL-61015 course: consistently display hidden sections
When section is hidden but the course setting says to show hidden sections display the hidden
sections consistently with how we display the sections with access restriction.

The only difference is that we didn't previously display the summary of the hidden section
in this case, the new logic repeats this behavior
2018-05-21 11:33:57 +02:00
David Monllao 5aa946dda7 Merge branch 'MDL-62516-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-21 11:15:15 +02:00
Jun Pataleta 88d0b05172 Merge branch 'MDL-62229-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-05-21 17:04:16 +08:00
Jake Dallimore f25a5f42ea Merge branch 'MDL-62440_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-05-21 14:56:05 +08:00
Andrew Nicols 841b8c5e34 MDL-62516 mod_forum: Only delete files for requested user 2018-05-21 14:12:49 +08:00
Michael Hawkins 81a8c42a15 MDL-56498 message: Ensure clicked notifications are marked read 2018-05-21 13:08:58 +08:00
Jun Pataleta c23417e9ad MDL-62515 templates: Remove unnecessary button role for submit button 2018-05-21 09:33:32 +08:00
Andrew Nicols dc387ce16f Merge branch 'MDL-62386-34' of git://github.com/bmbrands/moodle into MOODLE_34_STABLE 2018-05-21 09:11:44 +08:00
Andrew Nicols 63e64aa6cb MDL-62500 tag: Update checkbox label when updating tag 2018-05-20 15:15:37 +08:00
Matteo Scaramuccia dd61328be3 MDL-61893 JavaScript: Bumped npm packages
Performed by removing the current 'npm-shrinkwrap.json' file:
$ rm -Rf node_modules
$ rm -f npm-shrinkwrap.json
$ npm install
$ npm shrinkwrap
2018-05-18 00:34:14 +02:00
Matteo Scaramuccia 4cc2b64cb6 MDL-61893 JavaScript: Accept any node version but Carbon (LTS) 2018-05-18 00:34:14 +02:00
Mark Johnson 83acfca76a MDL-62488 filebrowser: Stop unit tests assuming number of categories 2018-05-17 16:02:28 +01:00
Tim Hunt d7cdf10744 MDL-62482 file_storage: may have many files with same content hash 2018-05-17 11:25:12 +01:00
Tim Hunt a534d3e044 MDL-62440 participants: out-of-memory is many site-wide role assigns 2018-05-17 10:44:30 +01:00
Eloy Lafuente (stronk7) 05a434229c Moodle release 3.4.3 2018-05-16 18:42:18 +02:00
Marina Glancy e5c3ba2df9 MDL-62469 qtype_calculated: check remaining placeholders, see MDL-62275 2018-05-16 17:30:09 +02:00
David Monllao 2f3bcbc5ce Merge branch 'MDL-62456_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-05-16 08:58:47 +02:00
Andrew Nicols 4c2a5ce403 Merge branch 'wip-MDL-62147-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-05-16 14:28:13 +08:00
Jun Pataleta 97a800149c Merge branch 'MDL-62463-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-16 14:21:51 +08:00
Frédéric Massart 9510c3c535 MDL-62147 core_grades: Report contexts and data related to scales 2018-05-16 13:56:14 +08:00
Marina Glancy 5c1b473931 MDL-62147 core_grades: Declare metadata of scales and import tables 2018-05-16 13:56:14 +08:00
Marina Glancy f2f7255f7b MDL-62147 portfolio: add missing tables to privacy provider 2018-05-16 13:56:11 +08:00
Marina Glancy 3a20fb23a5 MDL-62147 privacy: unittest ensures that all tables covered 2018-05-16 13:56:07 +08:00
Andrew Nicols 6f0e3c70a9 MDL-62463 mod_glossary: Fix SQL query
The query was doing:
WHERE c.id ... AND ... OR ... OR ...

Which equates to:
WHERE (c.id ... AND ...) OR ... OR ...

Adding parens to:
WHERE (c.id ... AND (... OR ... OR ...))
2018-05-16 13:51:17 +08:00
Marina Glancy 212b6daf32 MDL-62147 privacy: corrections to tables, temporary tables 2018-05-16 12:46:24 +08:00
Mark Nelson d5f69f0c5c MDL-62456 mod_lti: add missing add_external_location_link call 2018-05-16 12:23:06 +08:00
Jake Dallimore b066f554c4 Merge branch 'MDL-62134-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-16 12:02:30 +08:00
Andrew Nicols e6a65ee796 MDL-62134 core_privacy: Allow for a failure handler 2018-05-16 11:52:46 +08:00
Andrew Nicols d44adb98f6 Merge branch 'MDL-62426-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-05-16 11:00:55 +08:00
Jake Dallimore 321d41a022 MDL-62426 core_enrol: control enrolment subcontexts at the provider
Added a function to the core_enrol provider allowing enrol plugins
to set their subcontext relative to a fixed 'enrolments' parent dir.
2018-05-16 10:23:24 +08:00
Jake Dallimore 2f477b5764 MDL-62426 enrol_flatfile: make provider a plugin provider
The enrol_flatfile table can contain userdata relating to pending
enrolments, so this should be exported and deleted as necessary.
2018-05-16 09:38:11 +08:00
Marina Glancy 8596627666 MDL-62134 privacy: consistantly call components methods 2018-05-16 09:05:45 +08:00
Eloy Lafuente (stronk7) 7f7e03e923 Merge branch 'MDL-62447_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-05-16 01:26:16 +02:00
Eloy Lafuente (stronk7) f9d6769ecd Merge branch 'MDL-62448-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-05-15 17:29:15 +02:00
Sara Arjona dc15df1651 MDL-62448 block_rss_client: Export all feeds from Privacy API 2018-05-15 14:26:55 +02:00
David Monllao 17d4aeacb4 Merge branch 'MDL-62228_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-05-15 13:31:50 +02:00
David Monllao 4d2dc4246d MDL-62447 user: Fix component name typo 2018-05-15 10:45:24 +02:00
Mark Johnson d577e027b6 MDL-62408 behat: Correct PHPUNIT_TEST checks in behat_config_util 2018-05-15 09:12:53 +01:00
David Monllao 08c3480834 weekly release 3.4.2+ 2018-05-15 09:42:13 +02:00
David Monllao 67d10dd9f3 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-05-15 09:42:11 +02:00
Mark Nelson 13a215ee8f MDL-62228 core: remove unnecessary context check in privacy providers 2018-05-15 11:59:38 +08:00
Andrew Nicols 8b90c6d421 Merge branch 'MDL-62444-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-05-15 11:39:09 +08:00
Andrew Nicols 1087c7ecf6 Merge branch 'MDL-62428_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-05-15 11:05:40 +08:00
Zig Tan a7a2e52230 MDL-62444 mod_assignment: Fix missing lang string. 2018-05-15 09:54:23 +08:00
Jun Pataleta a061b37c9f Merge branch 'MDL-62432-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-15 09:34:11 +08:00
Andrew Nicols a7e25a4743 MDL-62432 quiz: Check contexts more carefully 2018-05-15 09:25:51 +08:00
Eloy Lafuente (stronk7) 6ed7752d77 Merge branch 'MDL-62430_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-05-15 02:56:13 +02:00
AMOS bot 3d519e9028 Automatically generated installer lang files 2018-05-15 00:06:29 +00:00
David Monllao cca4584795 MDL-62430 block_html: Check that block instances are block_html 2018-05-14 17:07:12 +02:00
David Monllao 285d723271 Merge branch 'MDL-62370-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-14 16:00:58 +02:00
Andrew Nicols 862b48ec3e Merge branch 'MDL-62356-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-05-14 21:01:44 +08:00
Andrew Nicols 2c00480315 Merge branch 'MDL-62357-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-05-14 20:45:12 +08:00
Andrew Nicols 93476477d6 MDL-62370 core_privacy: Directory-less subsystems are compliant 2018-05-14 20:01:35 +08:00
Marina Glancy 755fe15718 MDL-62430 privacy: validate context when deleting all user data 2018-05-14 18:14:04 +08:00
David Monllao 38899f4068 Merge branch 'MDL-62425-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-14 10:59:06 +02:00
cescobedo 07e77422e6 MDL-62356 enrol_meta: Add privacy implementation for enrol_meta 2018-05-14 10:57:44 +02:00
cescobedo 2e2bfe1c8e MDL-62357 enrol_cohort: Add privacy implementation for enrol_cohort 2018-05-14 10:50:06 +02:00
Andrew Nicols b04d01c29e MDL-62425 core: Add privacy implementation 2018-05-14 15:42:59 +08:00
Andrew Nicols 67b4cde9bd MDL-62425 core_privacy: Add core to the list of components 2018-05-14 15:42:05 +08:00
Mark Nelson e1baf5e1d6 MDL-62428 core: fix incorrect early return in privacy providers 2018-05-14 13:07:49 +08:00
Jake Dallimore 0f82392c8b Merge branch 'MDL-62420-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-14 11:58:13 +08:00
Jake Dallimore a023256c41 Merge branch 'MDL-62393-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-14 09:37:57 +08:00
Andrew Nicols 108ed14f1d MDL-62420 enrol_lti: Fix random unit test fail in privacy 2018-05-14 08:44:10 +08:00
Eloy Lafuente (stronk7) d419fe2ccf Merge branch 'MDL-62371-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-14 02:42:04 +02:00
Eloy Lafuente (stronk7) d70da80b82 Merge branch 'MDL-62251-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-05-13 23:56:20 +02:00
Andrew Nicols 8ef2cc73c7 MDL-62371 core_privacy: Add support for progress trace 2018-05-13 15:45:24 +08:00
AMOS bot 2e764430b3 Automatically generated installer lang files 2018-05-13 00:06:43 +00:00
Andrew Nicols 644c42f936 MDL-62393 message: Fix random unit test fails 2018-05-12 22:54:29 +08:00
Eloy Lafuente (stronk7) 6df0fa92f3 weekly release 3.4.2+ 2018-05-12 12:56:48 +02:00
Eloy Lafuente (stronk7) a274f62195 MDL-62275 qtype_calculatedmulti: Fix typo 2018-05-11 21:17:25 +02:00
David Monllao c941c541b4 MDL-62029 core_course: Site format is not a standard plugin 2018-05-11 20:19:25 +02:00
Eloy Lafuente (stronk7) 6204ed292e Merge branch 'MDL-62384-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-11 18:27:58 +02:00
David Monllao 3c4be4e9f5 Merge branch 'MDL-61858_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-05-11 18:07:10 +02:00
David Monllao 2489791a70 Merge branch 'MDL-62368_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-05-11 17:59:30 +02:00
Bas Brands 75bff87d18 MDL-62386 theme: Fix audio playback display for HTML audio
Fixed for boost
Fixed for bootstrapbase
2018-05-11 14:52:53 +02:00
Mark Nelson e0700b4c79 MDL-61858 tool_phpunit: added missing privacy null provider 2018-05-11 19:39:43 +08:00
Mark Nelson 91fdd3b806 MDL-61858 gradingform_guide: added missing metadata implementation 2018-05-11 19:39:43 +08:00
Mark Nelson a4a05cffdb MDL-61858 core_portfolio: added missing metadata implementation 2018-05-11 19:39:43 +08:00
Andrew Nicols 039f5b0472 MDL-61858 core_privacy: Add test to ensure component implementations 2018-05-11 19:39:43 +08:00
Sara Arjona 4a6aa192a0 MDL-61951 core_grading: Review SQL to avoid Oracle errors 2018-05-11 13:35:34 +02:00
David Monllao c4a24dbc2e Merge branch 'MDL-61714-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-05-11 11:31:36 +02:00
Sara Arjona 1f89dde34f MDL-61714 admin: Removed Slovenian digital age 2018-05-11 10:12:51 +02:00
Shamim Rezaie 5604f5977f MDL-62251 Privacy: Fix dir separator in export_file() 2018-05-11 17:33:08 +10:00
Shamim Rezaie 6d882faecf MDL-62251 Privacy: Url path separator should be platform independant
It should always be forward slash.
2018-05-11 17:31:23 +10:00
Shamim Rezaie b561a9a3c2 MDL-62251 Privacy: Fix get_path() and get_full_path() bug in Windows 2018-05-11 17:27:49 +10:00
Shamim Rezaie 836f8eb62e MDL-62251 backup: Fix replace_tempdir() bug under Windows
rename() fails under Windows if the destination file/directory exists.
I modified the code to only call $this->get_workdir_path() once as that function
creates the directory if doesn't exist. And we don't want that considering the
behaviour of rename on Windows.
2018-05-11 17:19:12 +10:00
Eloy Lafuente (stronk7) 5bcf683030 MDL-62354 notes: Reduce string to avoid js_call_amd() lenght limits
That way we are under the max 1024 allowed and also, the help string
is shown properly in the modal (previously part of it was not visible
falling off-window).
2018-05-11 14:53:12 +08:00
Jun Pataleta 3403ae0f9d Merge branch 'MDL-62394-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-11 14:23:33 +08:00
Andrew Nicols 6e7bc3a86a MDL-62394 privacy: Make JSON export pretty 2018-05-11 14:12:40 +08:00
Mark Nelson cd674a6d1d MDL-62368 enrol_lti: implement privacy provider 2018-05-11 14:06:13 +08:00
Mihail Geshoski 9b5778fcd1 MDL-62384 privacy: Modify user contexts query for auth_oauth2 2018-05-11 11:14:12 +08:00
Andrew Nicols 2986db7b8d MDL-62384 core_rating: Move WHERE clauses to JOIN 2018-05-11 11:14:11 +08:00
Andrew Nicols 75f2840454 MDL-62384 core_grade: Move WHERE clause to JOIN 2018-05-11 11:14:11 +08:00
Andrew Nicols 0d91ed2942 MDL-62384 mod_lesson: Move WHERE clause to JOIN 2018-05-11 11:14:11 +08:00
Andrew Nicols b2b8f037de MDL-62384 logstore_standard: Remove unnecessary join on context 2018-05-11 11:14:10 +08:00
Andrew Nicols 0011785c0a MDL-62384 mod_quiz: Improve performancy of privacy queries 2018-05-11 11:14:10 +08:00
Adrian Greeve bfd070b711 MDL-62384 mod_data: Update sql to improve performance. 2018-05-11 11:14:10 +08:00
Adrian Greeve 53616ddb09 MDL-62384 tool_monitor: Update to sql to fix performance. 2018-05-11 11:14:09 +08:00
Adrian Greeve 9c10ba6e78 MDL-62384 core_competency: Update to sql to increase performance. 2018-05-11 11:14:09 +08:00
Adrian Greeve db2797b58c MDL-62384 core_completion: Update to sql to improve performance. 2018-05-11 11:14:09 +08:00
Adrian Greeve a50cb83349 MDL-62384 mod_assign: Update to sql query for performance. 2018-05-11 11:14:08 +08:00
Andrew Nicols 25e366c3f5 Merge branch 'wip-MDL-61814-34-fix' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-05-11 10:49:23 +08:00
Adrian Greeve df986a59fc MDL-61814 report_stats: Update to sql to increase performance. 2018-05-11 10:43:57 +08:00
Jake Dallimore 78f478c00b MDL-61951 core_grading: SQL improvements for grading_instance join 2018-05-11 10:19:50 +08:00
Jake Dallimore 031a7948f1 Merge branch 'MDL-61951-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-05-11 10:19:46 +08:00
Jun Pataleta 0c1f7db133 Merge branch 'MDL-62117-34-fix' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-11 09:31:43 +08:00
Andrew Nicols 3fa0cd9708 MDL-62117 enrol_paypal: Improve SQL efficiency 2018-05-11 09:30:10 +08:00
Tim Hunt 023c3d4f0d MDL-62275 qtype_calc*: improve validation of formulae
Many thanks to Marina Glancy for helping with this.
2018-05-11 01:28:47 +02:00
David Monllao 20f9ff3a10 Merge branch 'MDL-62366-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-05-10 18:14:10 +02:00
David Monllao 464a6c7f7e Merge branch 'MDL-61714-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-05-10 18:10:55 +02:00
David Monllao 43f86202dc Merge branch 'MDL-62200-34' of git://github.com/bmbrands/moodle into MOODLE_34_STABLE 2018-05-10 18:04:26 +02:00
David Monllao 0cd244b5c7 Merge branch 'MDL-61949-34-privacy-upgrade-txt' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-05-10 17:53:16 +02:00
Jake Dallimore 1d49ba282a MDL-61951 core_grading: Several fixes to the privacy implementation
- Fixed legacy polyfill method definitions
- Added unit test for legacy polyfill
- Fixed delete_gradingform_for_userid in gradingform provider
2018-05-10 13:27:21 +02:00
Sara Arjona 500a03f9ed MDL-61951 grading: Implement privacy API 2018-05-10 13:27:20 +02:00
Andrew Nicols 74d018c3e0 MDL-61905 mod_workshop: Adjust privacy SQL queries
This change moves the content of WHERE to the JOIN, thus filtering the
results before they are returned. This reduces the number of joined rows
which gives a big performance benefit.
2018-05-10 13:05:48 +02:00
David Mudrák 0628adc6c7 MDL-61949 privacy: Add mention of the new API in upgrade.txt files
The notice is explicitly repeated for activity modules because they
usually process user data heavily.
2018-05-10 12:01:09 +02:00
Eloy Lafuente (stronk7) 4f53102a9e Merge branch 'MDL-62354-34-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-05-10 11:38:50 +02:00
Sara Arjona 3c3451b1b6 MDL-61714 admin: Update digital age consent map according legislation 2018-05-10 10:33:17 +02:00
David Monllao 29d090c15c Merge branch 'MDL-61309-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-10 08:48:19 +02:00
Andrew Nicols 500146d1e6 MDL-61309 mod_forum: Improve privacy query performance 2018-05-10 14:06:30 +08:00
Marina Glancy 6cc7e8cd51 MDL-62206 blocks: do not add fixed form elements as hidden 2018-05-10 12:08:56 +08:00
Adam Olley 18a3db531e MDL-62210 mod_assign: limit file lookup to the target assign 2018-05-10 11:21:58 +08:00
Brendan Cox 00781f3590 MDL-62210 mod_assign: improved validation in portfolio caller class 2018-05-10 11:21:58 +08:00
Jake Dallimore 475d4345ca Merge branch 'MDL-62383-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-05-10 10:03:57 +08:00
Jun Pataleta 569e2aae3b MDL-62383 privacy: Close recordset in contextlist::add_from_sql() 2018-05-10 09:56:48 +08:00
Jake Dallimore eb0b01e3c9 MDL-62257 mnetservice_enrol: minor fixes to privacy provider 2018-05-10 09:37:46 +08:00
Jake Dallimore 6147acceba Merge branch 'MDL-62257-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-05-10 09:37:40 +08:00
Eloy Lafuente (stronk7) 5c581ac980 Merge branch 'MDL-61309-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-10 09:18:59 +08:00
David Monllao fe99227626 Merge branch 'MDL-62308_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-05-10 09:18:59 +08:00
David Monllao a586c08def MDL-61976 mod_wiki: Trim returned value to avoid EOF-related failures 2018-05-10 09:18:59 +08:00
Andrew Nicols 9db4483076 Merge branch 'wip-MDL-62351-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-05-10 09:18:58 +08:00
David Monllao 927fe3ce99 Merge branch 'MDL-62249-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-05-10 09:18:58 +08:00
Andrew Nicols b53663e359 Merge branch 'MDL-62217_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-05-10 09:18:57 +08:00
Andrew Nicols 3e88f8e7d1 Merge branch 'MDL-62269-34' of git://github.com/vmdef/moodle into MOODLE_34_STABLE 2018-05-10 09:18:57 +08:00
David Monllao 608cb5dcc0 Merge branch 'wip-MDL-61976-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-05-10 09:18:56 +08:00
David Monllao d99070f10e MDL-61994 mod_glossary: Fixing wrong subsystem name 2018-05-10 09:18:56 +08:00
David Monllao 9b7163faf1 Merge branch 'MDL-61994-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-05-10 09:18:55 +08:00
David Monllao 40e290fe27 Merge branch 'MDL-61309-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-10 09:18:55 +08:00
Brendan Cox f53c4b18b4 MDL-62232 mod_forum: Additional tests for portfolio file export 2018-05-10 09:18:55 +08:00
Adam Olley ef56dcb9dd MDL-62232 mod_forum: Limit portfolio to files belonging to the post 2018-05-10 09:18:54 +08:00
Andrew Nicols 1e0ca61d45 Merge branch 'MDL-61905-34-privacyworkshop' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-05-10 09:18:54 +08:00
Andrew Nicols adb4e9b55e Merge branch 'MDL-62029-34-2' of git://github.com/snake/moodle into MOODLE_34_STABLE 2018-05-10 09:18:53 +08:00
Jun Pataleta 31f20b9309 Merge branch 'MDL-62332-34' of git://github.com/bmbrands/moodle into MOODLE_34_STABLE 2018-05-10 09:18:53 +08:00
Andrew Nicols 472770e15e Merge branch 'MDL-62318-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-05-10 09:18:52 +08:00
Andrew Nicols 8a5c22a052 Merge branch 'MDL-62117-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-05-10 09:18:52 +08:00
Marina Glancy 32df854591 MDL-62233 portfolio: check caller parent class 2018-05-10 09:18:51 +08:00
Zig Tan 42caaedf5e MDL-62366 mod_assign: Followup fix for attemptnumber in exported JSON 2018-05-10 09:18:46 +08:00
Andrew Nicols 1813fb1019 MDL-61309 mod_forum: Remove unnecessary deletion check 2018-05-10 07:48:13 +08:00
Helen Foster b909153fef MDL-62354 lang: Merge English strings from the en_fix language pack
* publishstate_help, core_notes - including GDPR guidance
2018-05-09 22:56:40 +02:00
Mark Nelson 0b01e3abc1 MDL-62308 core_backup: implement privacy provider
The provider was added to 'backup/util/ui/' due to
Moodle's implementation of autoclass loading. See
fetch_subsystems() in lib/classes/component.php.
2018-05-09 23:14:25 +08:00
Marina Glancy ed061d4a9a MDL-62351 privacy: check that subsystem/plugintype exist 2018-05-09 17:38:11 +08:00
Marina Glancy 6a06f60fc6 MDL-61976 mod_wiki: implement privacy API 2018-05-09 17:30:45 +08:00
Victor Deniz b694fb4a33 MDL-62269 auth_mnet: Implement privacy API
AMOS BEGIN
 CPY [privacy:metadata:address,core_user],[privacy:metadata:mnet_external:address,auth_mnet]
 CPY [privacy:metadata:aim,core_user],[privacy:metadata:mnet_external:aim,auth_mnet]
 CPY [privacy:metadata:aim,core_user],[privacy:metadata:mnet_external:aim,auth_mnet]
 CPY [privacy:metadata:alternatename,core_user],[privacy:metadata:mnet_external:alternatename,auth_mnet]
 CPY [privacy:metadata:autosubscribe,core_user],[privacy:metadata:mnet_external:autosubscribe,auth_mnet]
 CPY [privacy:metadata:calendartype,core_user],[privacy:metadata:mnet_external:calendartype,auth_mnet]
 CPY [privacy:metadata:city,core_user],[privacy:metadata:mnet_external:city,auth_mnet]
 CPY [privacy:metadata:country,core_user],[privacy:metadata:mnet_external:country,auth_mnet]
 CPY [privacy:metadata:currentlogin,core_user],[privacy:metadata:mnet_external:currentlogin,auth_mnet]
 CPY [privacy:metadata:department,core_user],[privacy:metadata:mnet_external:department,auth_mnet]
 CPY [privacy:metadata:description,core_user],[privacy:metadata:mnet_external:description,auth_mnet]
 CPY [privacy:metadata:email,core_user],[privacy:metadata:mnet_external:email,auth_mnet]
 CPY [privacy:metadata:emailstop,core_user],[privacy:metadata:mnet_external:emailstop,auth_mnet]
 CPY [privacy:metadata:firstaccess,core_user],[privacy:metadata:mnet_external:firstaccess,auth_mnet]
 CPY [privacy:metadata:firstname,core_user],[privacy:metadata:mnet_external:firstname,auth_mnet]
 CPY [privacy:metadata:firstnamephonetic,core_user],[privacy:metadata:mnet_external:firstnamephonetic,auth_mnet]
 CPY [privacy:metadata:icq,core_user],[privacy:metadata:mnet_external:icq,auth_mnet]
 CPY [privacy:metadata:id,core_user],[privacy:metadata:mnet_external:id,auth_mnet]
 CPY [privacy:metadata:idnumber,core_user],[privacy:metadata:mnet_external:idnumber,auth_mnet]
 CPY [privacy:metadata:imagealt,core_user],[privacy:metadata:mnet_external:imagealt,auth_mnet]
 CPY [privacy:metadata:institution,core_user],[privacy:metadata:mnet_external:institution,auth_mnet]
 CPY [privacy:metadata:lang,core_user],[privacy:metadata:mnet_external:lang,auth_mnet]
 CPY [privacy:metadata:lastaccess,core_user],[privacy:metadata:mnet_external:lastaccess,auth_mnet]
 CPY [privacy:metadata:lastlogin,core_user],[privacy:metadata:mnet_external:lastlogin,auth_mnet]
 CPY [privacy:metadata:lastname,core_user],[privacy:metadata:mnet_external:lastname,auth_mnet]
 CPY [privacy:metadata:lastnamephonetic,core_user],[privacy:metadata:mnet_external:lastnamephonetic,auth_mnet]
 CPY [privacy:metadata:maildigest,core_user],[privacy:metadata:mnet_external:maildigest,auth_mnet]
 CPY [privacy:metadata:maildisplay,core_user],[privacy:metadata:mnet_external:maildisplay,auth_mnet]
 CPY [privacy:metadata:middlename,core_user],[privacy:metadata:mnet_external:middlename,auth_mnet]
 CPY [privacy:metadata:msn,core_user],[privacy:metadata:mnet_external:msn,auth_mnet]
 CPY [privacy:metadata:phone,core_user],[privacy:metadata:mnet_external:phone1,auth_mnet]
 CPY [privacy:metadata:picture,core_user],[privacy:metadata:mnet_external:picture,auth_mnet]
 CPY [privacy:metadata:policyagreed,core_user],[privacy:metadata:mnet_external:policyagreed,auth_mnet]
 CPY [privacy:metadata:skype,core_user],[privacy:metadata:mnet_external:skype,auth_mnet]
 CPY [privacy:metadata:suspended,core_user],[privacy:metadata:mnet_external:suspended,auth_mnet]
 CPY [privacy:metadata:timezone,core_user],[privacy:metadata:mnet_external:timezone,auth_mnet]
 CPY [privacy:metadata:trackforums,core_user],[privacy:metadata:mnet_external:trackforums,auth_mnet]
 CPY [privacy:metadata:trustbitmask,core_user],[privacy:metadata:mnet_external:trustbitmask,auth_mnet]
 CPY [privacy:metadata:url,core_user],[privacy:metadata:mnet_external:url,auth_mnet]
 CPY [privacy:metadata:username,core_user],[privacy:metadata:mnet_external:username,auth_mnet]
 CPY [privacy:metadata:yahoo,core_user],[privacy:metadata:mnet_external:yahoo,auth_mnet]
AMOS END
2018-05-09 10:06:18 +01:00
David Monllao 852a814791 MDL-62217 search_solr: Plugin provider fake implementation 2018-05-09 10:58:06 +02:00
David Monllao 3cd8687bec MDL-62217 search: Privacy providers 2018-05-09 10:58:05 +02:00
David Mudrák 0d7e2fc5ec MDL-61905 workshop: Implement privacy API in grading evaluators
Standard workshop ships with only one evaluation method and that one
holds no personal data.
2018-05-09 10:02:46 +02:00
David Mudrák fdcb33c5c5 MDL-61905 workshop: Implement privacy API in assessment allocators
Assessment allocation methods normally do not store any personal data.
Their duty is to create assessment records that are then exported by the
workshop core itself.

Still, some allocators (such as the Manual allocation) can store certain
personal data such as user preferences.
2018-05-09 10:02:46 +02:00
David Mudrák 07dc8783a9 MDL-61905 workshop: Implement privacy API in grading strategies
On low level, standard grading strategies subplugins do not store
personal themselves.  They make use of the grades storage provided by
the workshop itself.  What they do contain though is the information
about how the assessment forms were defined. And they are also
responsible for correctly interpreting the values in the central grades
table.

Grading strategies fulfil the contract with the parent workshop module
by implementing the workshopform_provider interface. That gives them a
chance to export data about the assessment form to each of exported
assessment.
2018-05-09 10:02:45 +02:00
David Mudrák 4d829b1159 MDL-61905 workshop: Implement the privacy API in the workshop core
Workshop module stores personal data in its tables, via user
preference and via core_files and core_plagiarism subsystems.

When exporting the data, we export not only data created by users
themselves (such as their submissions and provided peer-assessments) but
also all relevant data that can (or must) be used to interpret created
content and evaluate the user's performance and skills.

On the other hand, when deleting data at user's request, we delete only
those data that do not affect other users' performance evaluation. The
reasoning is that one's right for privacy does not overweight someone
else's right for fair assessment. For that reason, we can't fully delete
whole provided peer-assessments, for example. Because they are used in
cross-comparison and grading evaluation of all other peers who assessed
the same submission. So instead, we replace provided texts but still
keep the original record.

Workshop defines the interface for its grading strategy subplugins to
allow them attach personal data under their control to the exported
structures.
2018-05-09 10:02:45 +02:00
Jake Dallimore 791824e682 MDL-62029 core_course: Fixes to context-aware provider implementation. 2018-05-09 15:41:31 +08:00
Andrew Nicols 3c7fe9a187 MDL-61309 mod_forum: Implement privacy deletion 2018-05-09 14:03:33 +08:00
Andrew Nicols 6359c7e7be MDL-61309 mod_forum: Implement the Privacy API 2018-05-09 14:03:33 +08:00
Andrew Nicols 36f95f4473 MDL-61309 core_tags: Add privacy unit test trait 2018-05-09 13:54:49 +08:00
Shamim Rezaie 059b45807e MDL-62318 core_group: Updating cache when deleting group memberships 2018-05-09 13:30:28 +10:00
Shamim Rezaie bc36eb358c MDL-62318 core_group: Add implementation of privacy API 2018-05-09 13:30:28 +10:00
Simey Lameze 9dcb1ca891 MDL-61994 mod_glossary: add unit tests for provider 2018-05-09 10:59:35 +08:00
Simey Lameze e8aed4e726 MDL-61994 mod_glossary: implement privacy providers 2018-05-09 10:59:35 +08:00
Adrian Greeve 5701891122 MDL-62029 core_privacy: context aware provider creation. 2018-05-09 10:08:07 +08:00
Adrian Greeve 79c1c70d3e MDL-62029 core_course: Create privacy files for core_course. 2018-05-09 10:07:59 +08:00
Marina Glancy 4972e130b0 MDL-61996 core: when loggedin always check user is complete 2018-05-09 02:56:55 +02:00
Andrew Nicols 29fde8b965 Merge branch 'MDL-62010-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-05-09 08:51:40 +08:00
cescobedo 9a8e043005 MDL-62010 core_enrol: Add privacy implementation for core_enrol 2018-05-08 18:54:50 +02:00
David Monllao 01c96e9407 MDL-61814 core_user: Remove empty line to avoid ci warning 2018-05-08 17:19:53 +02:00
David Monllao fe91efe959 Merge branch 'wip-MDL-61814-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-05-08 17:19:44 +02:00
David Monllao b70613ff41 Merge branch 'MDL-61943-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-05-08 16:44:09 +02:00
David Monllao f4fb0b93ce weekly release 3.4.2+ 2018-05-08 14:02:17 +02:00
David Monllao 4d5b3a33b4 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-05-08 14:02:16 +02:00
cescobedo 042bce6e96 MDL-61943 core_role: Add privacy implementation for core_role 2018-05-08 13:43:07 +02:00
cescobedo 7f0e4dc648 MDL-62257 mnetservice_enrol: Implement Privacy API 2018-05-08 10:08:14 +02:00
Bas Brands ebad5e1ad0 MDL-62332 Theme boost: paging bar empty active link 2018-05-08 09:54:34 +02:00
Andrew Nicols c4e40568e6 Merge branch 'wip-MDL-61937-34-fix' of https://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-05-08 14:44:34 +08:00
Marina Glancy 7e34297bc4 MDL-61937 mod_data: fix commentarea name 2018-05-08 14:39:55 +08:00
Adrian Greeve 00ee2d2253 MDL-61814 report_stats: Update to be a full privacy provider. 2018-05-08 13:50:32 +08:00
Adrian Greeve 4f63dba263 MDL-61814 core_portfolio: Update to portfolio provider. 2018-05-08 13:50:19 +08:00
Adrian Greeve 50c5de127c MDL-61814 core_user: Implement privacy system for user. 2018-05-08 13:50:06 +08:00
Zig Tan 3a4032ddc8 MDL-62249 block_tag_flickr: Corrected privacy providers 2018-05-08 12:12:01 +08:00
Marina Glancy b3db534b8c MDL-61976 privacy: replace pluginfile in test writer 2018-05-08 12:02:40 +08:00
Marina Glancy a37d821895 MDL-61976 privacy: add subcontext argument to has_any_data 2018-05-08 12:02:40 +08:00
Andrew Nicols 763db71ad3 Merge branch 'wip-MDL-62068-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-05-08 11:45:16 +08:00
Shamim Rezaie 87abd9b0aa MDL-62117 enrol_paypal: Add implementation of Privacy API 2018-05-08 13:34:25 +10:00
Marina Glancy 8d34874399 MDL-62068 core_tag: implement privacy API 2018-05-08 11:31:54 +08:00
Andrew Nicols 1fe42d1cd1 Merge branch 'MDL-62285-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2018-05-08 11:11:24 +08:00
Ryan Wyllie 5764a4640f MDL-62285 privacy: use context id when generating context path
moodle_content_writer::get_context_path() now includes the context
id in the path to ensure that it will always generate unique paths
even when the context names are not unique.
2018-05-08 01:41:03 +00:00
Eloy Lafuente (stronk7) 403e3b0333 Merge branch 'MDL-61521-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-05-08 01:44:53 +02:00
Andrew Nicols c305233628 Merge branch 'MDL-62326-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-07 17:26:10 +08:00
Andrew Nicols 47265c83e0 Merge branch 'MDL-62169-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-05-07 17:25:49 +08:00
Zig Tan a942eb648a MDL-62169 mod_assignment: Improved phpunit test reliability 2018-05-07 16:44:03 +08:00
Andrew Nicols 26fad064f0 Merge branch 'MDL-61919_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-05-07 15:46:46 +08:00
Andrew Nicols 26c255a160 Merge branch 'wip-MDL-62137-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-05-07 15:27:53 +08:00
Andrew Nicols e00c025ed6 MDL-62326 core_antivirus: Implement null provider 2018-05-07 14:40:22 +08:00
Adrian Greeve 3bf826e23d MDL-62137 core_privacy: Update to helper to use core_completion 2018-05-07 14:27:10 +08:00
Adrian Greeve 3f98a6af5b MDL-62137 core_completion: Privacy files for core_completion. 2018-05-07 14:27:10 +08:00
Andrew Nicols ab4de7a081 Merge branch 'MDL-62169-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-05-07 14:16:25 +08:00
Andrew Nicols 269327c0fb Merge branch 'MDL-61407-34-fix' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-05-07 13:51:37 +08:00
Zig Tan 4b012e921c MDL-62169 mod_assignment: Implemented privacy providers 2018-05-07 13:45:38 +08:00
Jun Pataleta f304a59b8a MDL-61407 mod_quiz: Determine quiz step for manual comment 2018-05-07 13:35:18 +08:00
Andrew Nicols 6294e3b9ec MDL-61937 mod_data: Correct rating export args in privacy 2018-05-07 09:43:20 +08:00
David Monllao 845a6a8329 MDL-61937 mod_data: Target the correct area 2018-05-07 09:43:20 +08:00
Andrew Nicols d038e858df MDL-61407 question: Export step files in privacy 2018-05-07 07:10:07 +08:00
Eloy Lafuente (stronk7) 176aacfe93 MDL-61693 core_calendar: make results deterministic for better testing 2018-05-06 18:19:05 +02:00
David Monllao 9063bdf5b1 MDL-62218 analytics: Add missing sample origin checking 2018-05-04 16:38:41 +02:00
Bas Brands 1ed8bd1b2f MDL-62200 Theme boost: popup in popup styles 2018-05-04 14:08:16 +02:00
Frédéric Massart c78bbe369c MDL-61877 core_competency: False negative due to random ordering 2018-05-04 11:18:48 +02:00
Zig Tan baec14ae3a MDL-61693 core_calendar: Simplified get calendar event details SQL 2018-05-04 13:11:21 +08:00
Jake Dallimore 876fd26435 Merge branch 'MDL-61407-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-04 11:51:22 +08:00
Andrew Nicols c7c6f2107b Merge branch 'wip-MDL-61937-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-05-04 11:29:55 +08:00
Jun Pataleta f49cae6e04 Merge branch 'MDL-61877-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-05-04 11:25:37 +08:00
Marina Glancy ba84a6e926 MDL-61937 mod_data: implement privacy provider 2018-05-04 11:16:00 +08:00
Marina Glancy defa163768 MDL-61937 tag: new method in privacy api 2018-05-04 11:15:59 +08:00
Marina Glancy f88ea97b79 MDL-61937 rating: delete method in privacy provider 2018-05-04 11:15:59 +08:00
Marina Glancy 4e71852fbc MDL-61937 comment: do not use API in provider
When exporting comments we can not use comments API because:
- we don't need to call component validate, comments may be disabled right now but
  are still stored
- we don't need to call display callback
- we need to export all comments and not only first 15 of them
2018-05-04 11:15:59 +08:00
Marina Glancy 7e8fc8cc0f MDL-61937 mod_data: generator for all field types 2018-05-04 11:15:59 +08:00
cescobedo 4cd32d3712 MDL-61937 datafield: Add privacy implementation for all datafield 2018-05-04 11:15:58 +08:00
Andrew Nicols a8027ed5cb Merge branch 'MDL-62218-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2018-05-04 11:12:21 +08:00
Ryan Wyllie e5affab8bd MDL-62218 analytics: make privacy test class name more unique 2018-05-04 03:06:31 +00:00
David Monllao 4e262e6b2b MDL-62218 analytics: Privacy API implementation 2018-05-04 03:06:23 +00:00
David Monllao eb5bcca5ad MDL-62218 mlbackend: Null privacy providers for core mlbackends 2018-05-04 03:06:16 +00:00
Mark Nelson 94b01d5304 MDL-61919 core_message: implement privacy provider 2018-05-04 11:03:22 +08:00
Jake Dallimore fcc16c0dd3 Merge branch 'MDL-62046-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-05-04 10:27:44 +08:00
Jake Dallimore 79aac77a26 Merge branch 'MDL-62032-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-05-04 09:57:17 +08:00
Jake Dallimore 3bc60b4f89 Merge branch 'MDL-62030-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-05-04 09:51:53 +08:00
Jake Dallimore 872958acbf Merge branch 'MDL-59845-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-04 09:47:39 +08:00
Jake Dallimore b4ff89c851 Merge branch 'MDL-62007-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-05-04 09:22:57 +08:00
Eloy Lafuente (stronk7) e9780ff068 Merge branch 'MDL-62315-34-privacycoreform' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-05-03 23:40:49 +02:00
Eloy Lafuente (stronk7) 640fda0ce5 Merge branch 'MDL-61800-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-03 23:28:42 +02:00
David Mudrák 8010382a9c MDL-62315 form: Implement the privacy API for core_form subsystem
Forms subsystem has no own database table. The only personal data is the
user preference 'filemanager_recentviewmode' that stores the view mode
of the file picker element.

It was discussed whether handling of this preference should be added
here into core_form, or rather into core_repository subsystem. The final
decision was to consider the preference as owned by the core_form
because it is affecting the display of a form element, not the
repository backend (even though the strings describing it had been put
into core_repository strings).
2018-05-03 19:06:19 +02:00
Andrew Nicols ce76768382 Merge branch 'MDL-62240-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-05-03 19:05:51 +08:00
Jake Dallimore a4efb88ff2 Merge branch 'MDL-62310-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-05-03 18:03:29 +08:00
Jun Pataleta 6d0112902a Merge branch 'MDL-61194-34' of git://git.cameron1729.xyz/moodle into MOODLE_34_STABLE 2018-05-03 17:06:28 +08:00
Cameron Ball 1078a686bd MDL-61194 assignfeedback_editpdf: Check if we can convert online text
This patch adds a check to make sure there is a converter available that
will be able to handle html->pdf conversion before adding onlinetext
submissions to the list of files to combine.
2018-05-03 16:46:32 +08:00
Mihail Geshoski 352fd99b38 MDL-62046 profilefield_textarea: Add privacy files and unit tests 2018-05-03 16:26:42 +08:00
David Monllao 238a285a1b Merge branch 'MDL-61693-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-05-03 10:24:25 +02:00
Andrew Nicols df14c026bf MDL-61407 privacy: Reset the writer after writer tests
The writer was not reset after these tests which had the potential to
affect the next test after these were run.
2018-05-03 16:14:38 +08:00
Andrew Nicols 2915719cb9 MDL-61407 quizaccess: Add null_writer implementations 2018-05-03 16:14:37 +08:00
Andrew Nicols 9abdeed325 MDL-61407 quiz: Add reports for quiz 2018-05-03 16:14:37 +08:00
Andrew Nicols 52dd3facb5 MDL-61407 qtype: Add null_writer for all qtypes 2018-05-03 16:14:37 +08:00
Andrew Nicols 27aaaf2998 MDL-61407 qformat: Add null_writer for all qformats
Questions formats do not store any personal data.
Any contrib format which does store personal data should utilise the
standard export interfaces as this subsystem will not call them directly.
2018-05-03 16:14:36 +08:00
Andrew Nicols e4fcfbb8f9 MDL-61407 question: Add null_writer for all behaviours
Behaviours do not store any personal data.
Any contrib behaviour which does store personal data should utilise the
standard export interfaces as this subsystem will not call them directly.
2018-05-03 16:14:36 +08:00
Andrew Nicols 4e62b0f999 MDL-61407 mod_quiz: Add initial privacy implementation 2018-05-03 16:14:35 +08:00
Andrew Nicols b09f1d8be9 MDL-61407 question: Add initial privacy implementation 2018-05-03 16:14:35 +08:00
Mihail Geshoski 3bab35e6b1 MDL-62032 profilefield_text: Add privacy files and unit tests 2018-05-03 16:08:55 +08:00
David Monllao 419af6769e Merge branch 'MDL-62059-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-05-03 10:08:16 +02:00
Mihail Geshoski 82f8050bb8 MDL-62030 profilefield_menu: Add privacy files and unit tests 2018-05-03 15:52:57 +08:00
Mihail Geshoski 8e8a48cfd9 MDL-62007 profilefield_checkbox: Modify privacy provider 2018-05-03 15:28:28 +08:00
Sara Arjona 4a877f36d2 MDL-62240 privacy: Avoid error when path is higher than allowed
A new method shorten_filenames has been added to moodlelib.
2018-05-03 09:17:05 +02:00
Andrew Nicols 27b956ef56 MDL-62240 file: Add includehash to shorten_filename + unit tests 2018-05-03 09:17:04 +02:00
Mihail Geshoski 5603f19631 MDL-62007 profilefield_datetime: Add privacy files and unit tests 2018-05-03 14:58:28 +08:00
Jun Pataleta 44378db9cf Merge branch 'MDL-61956-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-05-03 14:43:56 +08:00
Jake Dallimore 83ff8f1eac Merge branch 'MDL-62264-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-05-03 14:06:05 +08:00
Jun Pataleta 31ced1fa3f Merge branch 'MDL-62202-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-05-03 13:31:46 +08:00
Andrew Nicols 361fc9a30c Merge branch 'MDL-62009-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-05-03 12:28:24 +08:00
Andrew Nicols 37d4ba0269 Merge branch 'wip-MDL-62312-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-05-03 11:10:28 +08:00
Jake Dallimore 8d229bfb4c Merge branch 'MDL-62280-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-03 10:53:25 +08:00
Marina Glancy 59354457e0 MDL-62312 course: Move core_publish renderer methods to course renderer 2018-05-03 10:09:00 +08:00
Jun Pataleta 276d129e03 Merge branch 'MDL-60414-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-05-03 09:33:12 +08:00
AMOS bot 639add8bf9 Automatically generated installer lang files 2018-05-03 00:06:30 +00:00
Luca Bösch 7b25853ccb MDL-60414 theme_boost: bootstrap dropdown menu html spec char rendering 2018-05-02 23:02:39 +02:00
Jun Pataleta 111a056d3f MDL-62312 admin: Move moodleorg_registration_message to admin renderer 2018-05-02 23:43:48 +08:00
Andrew Nicols b3753e60fa MDL-61407 question: Allow formatters to ignore caps 2018-05-02 19:10:24 +08:00
Andrew Nicols e9419db48d MDL-61407 privacy: Track changes in any context 2018-05-02 19:10:24 +08:00
cescobedo 6d30a1ded4 MDL-62310 core_admin: Implement Privacy API 2018-05-02 11:58:48 +02:00
Andrew Nicols 9cf2c160dc MDL-62135 tool_log: Use plugintype_class_callback 2018-05-02 17:46:45 +08:00
Andrew Nicols f4603b1e15 Merge branch 'MDL-62135-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-05-02 17:38:23 +08:00
cescobedo 97585a325d MDL-62264 core_mnet: Implement Privacy API 2018-05-02 11:20:20 +02:00
Frédéric Massart fb34d23759 MDL-62135 logstore_legacy: Implement privacy API 2018-05-02 17:18:19 +08:00
Frédéric Massart f46e96bd91 MDL-62135 logstore_database: Implement privacy API 2018-05-02 17:18:19 +08:00
Frédéric Massart 4a62ff444e MDL-62135 logstore_standard: Implement privacy API 2018-05-02 17:18:19 +08:00
Frédéric Massart d3cbf97a2e MDL-62135 tool_log: Implement privacy API 2018-05-02 17:18:19 +08:00
David Mudrák b62eb9310e MDL-61905 workshop: Drop the old 1.x era tables
These tables may still contain relics of old personal data if the site
was installed before Moodle 2.0. We do not need these tables any more.
Following the "privacy by design" principles, we are dropping them now.
2018-05-02 11:15:13 +02:00
Luca Bösch f6ebb57702 MDL-61956 calendar: allow to see hidden course with switch role 2018-05-02 09:37:13 +02:00
Sara Arjona c381d9c18f MDL-62202 privacy: Move Privacy and policies category to Users page 2018-05-02 08:46:01 +02:00
Jun Pataleta 386c5299d8 Merge branch 'MDL-62253-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-05-02 13:53:01 +08:00
Jun Pataleta c96525e2bd Merge branch 'MDL-61898-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-05-02 13:46:40 +08:00
Andrew Nicols 5886b5ef47 MDL-61898 cache: Implement privacy API for all stores and locks 2018-05-02 13:37:29 +08:00
Andrew Nicols 8bde0603d1 MDL-61898 core_cache: Implement Privacy API 2018-05-02 13:37:29 +08:00
Frédéric Massart fcf745c170 MDL-62214 tool_messageinbound: False negative due to time() usage
PHP Unit is so fast that my test couldn't cope with it!
2018-05-02 13:09:55 +08:00
Andrew Nicols bdda38b8b6 Merge branch 'MDL-61920_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-05-02 13:07:51 +08:00
Andrew Nicols 8048aedf46 Merge branch 'MDL-62266-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-05-02 12:34:34 +08:00
Andrew Nicols 057a8fe78b Merge branch 'MDL-62214-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-05-02 12:29:10 +08:00
Andrew Nicols 8b8f1bf85c MDL-61800 task: Reset the OUTPUT and PAGE on execution 2018-05-02 11:58:09 +08:00
Andrew Nicols d5a6324fe1 Merge branch 'MDL-62236-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-05-02 10:54:00 +08:00
Andrew Nicols 2964d00f94 MDL-59845 tool_lp: Add js tracking around UI refresh 2018-05-02 09:16:14 +08:00
Eloy Lafuente (stronk7) 8e5187c0b6 weekly release 3.4.2+ 2018-05-01 23:04:20 +02:00
Eloy Lafuente (stronk7) 04c8c1431b Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-05-01 23:04:19 +02:00
Frédéric Massart 61091a5457 MDL-62167 core_badges: Remove usage of a reserved keyword of Oracle 2018-05-01 15:22:33 +02:00
Frédéric Massart b5400f20cb MDL-62167 core_badges: Prevent SQL error with Oracle 2018-05-01 15:22:32 +02:00
Andrew Nicols 5d705cbed4 Merge branch 'wip-MDL-61308-34-testfix' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-05-01 12:32:49 +02:00
Adrian Greeve 8966bb5b38 MDL-61308 assignsubmission_comments: Unit test ordering fix. 2018-05-01 12:32:39 +02:00
Andrew Nicols 46985532b5 Merge branch 'MDL-62231-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-05-01 12:32:28 +02:00
Shamim Rezaie 75dc5bf14b MDL-62231 block_recent_activity: Implement null provider for the block 2018-05-01 14:07:52 +10:00
Andrew Nicols 82c8ef17b0 Merge branch 'wip-MDL-62138-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-05-01 11:57:41 +08:00
Andrew Nicols aeaf9f0986 Merge branch 'MDL-61411-34' of git://github.com/Kathrin84/moodle into MOODLE_34_STABLE 2018-05-01 11:22:27 +08:00
Andrew Nicols 031f4e28d9 Merge branch 'MDL-62167-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-05-01 11:14:47 +08:00
Andrew Nicols 9bb560cd7c MDL-62280 xhprof: Support tideways_xhprof 2018-05-01 11:03:00 +08:00
Frédéric Massart 269cbdce37 MDL-62009 core_grades: Implement privacy API 2018-05-01 10:50:30 +08:00
Jun Pataleta 998fad0954 Merge branch 'MDL-62060-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-05-01 10:44:53 +08:00
Shamim Rezaie 970515e932 MDL-62060 core_privacy: Make sure the exported json is human readable 2018-05-01 12:36:42 +10:00
Frédéric Massart de070d92e1 MDL-62214 tool_messageinbound: Implement privacy API 2018-05-01 09:23:21 +08:00
Frédéric Massart 5555399582 MDL-62214 tool_messageinbound: Delete old messages pending verification 2018-05-01 09:23:20 +08:00
Frédéric Massart bfa32ae5c0 MDL-62253 core_auth: Implement privacy API 2018-05-01 09:15:22 +08:00
Jake Dallimore fc7c30e3f0 Merge branch 'MDL-62005-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-05-01 09:10:39 +08:00
AMOS bot fad52c36fd Automatically generated installer lang files 2018-05-01 00:07:04 +00:00
Jun Pataleta 1e3a6e2d32 Merge branch 'MDL-62248-34-fix' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-30 21:24:34 +08:00
Andrew Nicols a59a5912ee MDL-62248 core_privacy: Add getter for user context prefs 2018-04-30 20:37:46 +08:00
Mark Nelson 5e8f5cbce3 MDL-61920 mod_lti: implement privacy provider 2018-04-30 18:49:38 +08:00
Mark Nelson 2d390e8b69 MDL-61920 ltiservice_toolsettings: implement privacy provider 2018-04-30 18:49:38 +08:00
Mark Nelson d1c45ed355 MDL-61920 ltiservice_toolproxy: implement privacy provider 2018-04-30 18:49:38 +08:00
Mark Nelson 08fd60f505 MDL-61920 ltiservice_profile: implement privacy provider 2018-04-30 18:49:38 +08:00
Mark Nelson dd95c21a95 MDL-61920 ltiservice_memberships: implement privacy provider 2018-04-30 18:49:38 +08:00
Jun Pataleta dc9888df17 Merge branch 'MDL-61012_v3.4.x' of https://github.com/troywilliams/moodle into MOODLE_34_STABLE 2018-04-30 17:29:04 +08:00
Sara Arjona 636a50044b MDL-62266 core_availability: Implement privacy API 2018-04-30 11:20:55 +02:00
Shamim Rezaie ac2e6921cb MDL-62005 block_comments: Add implementation of Privacy API 2018-04-30 18:20:54 +10:00
Andrew Nicols 2dcc83ac38 MDL-62248 core_privacy: Unit test for get_user_preferences 2018-04-30 16:01:38 +08:00
Andrew Nicols c2f944b022 Merge branch 'MDL-62248-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-30 16:01:33 +08:00
Frédéric Massart f47cd85ff6 MDL-62248 core_block: Implement privacy API 2018-04-30 15:30:27 +08:00
Frédéric Massart 1a329e6977 MDL-62248 core_privacy: Test writer writes user prefs in right contexts 2018-04-30 15:30:27 +08:00
Shamim Rezaie 351bfbef06 MDL-62059 mod_book: Implement null provider for mod_book 2018-04-30 16:15:59 +10:00
Andrew Nicols 951c886951 Merge branch 'MDL-62235-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-30 14:01:28 +08:00
Frédéric Massart a4c23f2b13 MDL-62235 core_files: Implement privacy API 2018-04-30 13:46:09 +08:00
Andrew Nicols 647c7ec982 Merge branch 'MDL-62208-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-30 13:20:40 +08:00
Troy Williams 31ebe1ff67 MDL-61012 course: Allow extending class to set 2018-04-30 16:27:38 +12:00
Andrew Nicols aaf9b0db67 Merge branch 'MDL-62241-34-typehint' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-04-30 11:45:20 +08:00
Andrew Nicols 790a3c60de Merge branch 'MDL-61959-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-30 10:24:58 +08:00
Andrew Nicols ab58842db9 MDL-61308 mod_assign: Whitespace fix 2018-04-30 09:27:23 +08:00
Andrew Nicols 38c5451942 Merge branch 'wip-MDL-61308-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-04-30 09:19:48 +08:00
AMOS bot 1a3bdfd652 Automatically generated installer lang files 2018-04-30 00:06:29 +00:00
Frédéric Massart 5dcc3bca58 MDL-62236 core_webservice: Implement privacy API 2018-04-29 10:10:40 +08:00
David Mudrák 4e5e4d715b MDL-62241 privacy: Include the unit tests from the 3.3 branch
The tests do not actually do anything, they just make sure that the
method signature is correct on the given PHP version. They are mostly
relevant and useful on 3.3.
2018-04-27 15:23:04 +02:00
Eloy Lafuente (stronk7) 533e41f82e weekly release 3.4.2+ 2018-04-27 13:15:48 +02:00
Eloy Lafuente (stronk7) 24a171c5b9 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-04-27 13:15:41 +02:00
Eloy Lafuente (stronk7) 43be1507a1 MDL-61993 profilefield_checkbox: take rid of oracle reserved word 2018-04-27 10:42:57 +02:00
Frédéric Massart 7c772f449b MDL-61877 core_competency: Handle comments in privacy API 2018-04-27 11:30:30 +08:00
Frédéric Massart 72da93a9ea MDL-61877 core_competency: Implement privacy API 2018-04-27 11:30:30 +08:00
Frédéric Massart 802ab825ed MDL-62167 core_badges: Implement privacy API 2018-04-27 10:51:53 +08:00
Bas Brands 5c8bebc159 MDL-62172 Theme boostrapbase: align advanced checkbox in mform 2018-04-27 09:56:13 +08:00
Eloy Lafuente (stronk7) 1d5d122b27 Merge branch 'MDL-60882-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-04-27 01:38:45 +02:00
Eloy Lafuente (stronk7) 242797a9d8 Merge branch 'wip_MDL-62011_34_approval_of_course_request' of https://github.com/grabs/moodle into MOODLE_34_STABLE 2018-04-27 01:30:17 +02:00
Eloy Lafuente (stronk7) 734825bc6d Merge branch 'MDL-61993-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-27 01:01:14 +02:00
Eloy Lafuente (stronk7) bd087739c6 Merge branch 'MDL-61863-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-26 22:31:49 +02:00
Eloy Lafuente (stronk7) 28a7c5b677 Merge branch 'MDL-61715-34' of https://github.com/lethevinh/moodle into MOODLE_34_STABLE 2018-04-26 22:23:07 +02:00
Sara Arjona c7b3f78e25 MDL-61959 mod_scorm: Implement privacy API 2018-04-26 19:57:14 +02:00
Sara Arjona ec2474927f MDL-61959 scormreport_objectives: Implement privacy API 2018-04-26 19:57:13 +02:00
sarjona abb19f6cd1 MDL-61959 scormreport_interactions: Implement privacy API 2018-04-26 19:57:13 +02:00
Sara Arjona f95d1bd73a MDL-61959 scormreport_graphs: Implement privacy API 2018-04-26 19:57:13 +02:00
sarjona 3d791f1b6b MDL-61959 scormreport_basic: Implement privacy API 2018-04-26 19:57:12 +02:00
Juan Leyva 82482a0b65 MDL-62229 tool_mobile: Add missing supported module
The Workshop module it’s been supported since Moodle 3.4 so it
should’ve been included here.
2018-04-26 19:18:41 +02:00
Jun Pataleta 3b9f278a95 Merge branch 'MDL-61986_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-04-27 00:46:42 +08:00
Eloy Lafuente (stronk7) 6ca9bbd0e8 MDL-61986 mod_lesson: oracle order by clob fix 2018-04-26 18:31:40 +02:00
Eloy Lafuente (stronk7) 8e786a3a30 Merge branch 'MDL-62224_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-04-26 17:38:35 +02:00
Zig Tan 770045533a MDL-61693 core_calendar: Implemented privacy providers 2018-04-26 21:10:59 +08:00
Mark Nelson d45a552c02 MDL-62224 core_rss: implement correct provider 2018-04-26 20:16:59 +08:00
Kathrin Osswald 276350a9a6 MDL-61411 theme Boost: Close navigation on all items (on small screens) 2018-04-26 13:19:40 +02:00
Juan Leyva ae4963c300 MDL-61521 course: Add missing text formatting for category name 2018-04-26 12:38:10 +02:00
Juan Leyva 27a3313539 MDL-60882 mod_choice: Avoid teacher delete all responses
Teachers should be able to delete all responses but when indicating the
response ids.
When the response ids are not passed, only their own responses should
be deleted (as the function documentation said).
2018-04-26 10:26:50 +02:00
Andrew Nicols 45742c52a4 Merge branch 'MDL-61947-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-26 14:52:36 +08:00
Jun Pataleta 4ab9b1a502 Merge branch 'MDL-62188-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-26 14:49:44 +08:00
Adrian Greeve fa83660e35 MDL-61308 assign_feedback: Privacy code for user rights. 2018-04-26 14:24:34 +08:00
Adrian Greeve 15c5a72024 MDL-61308 assign_submission: Privacy code for user rights. 2018-04-26 14:24:24 +08:00
Adrian Greeve 63f3fd97b0 MDL-61308 mod_assign: Adding privacy classes. 2018-04-26 14:24:13 +08:00
Sara Arjona 49f37c4573 MDL-62188 enrol: Avoid ignoring the Recover grades default setting 2018-04-26 08:14:08 +02:00
Frédéric Massart 7029b4eff4 MDL-62208 core_fileconverter: Implement privacy API 2018-04-26 12:55:16 +08:00
Zig Tan 730f7da8eb MDL-61947 core_my: Implemented privacy providers 2018-04-26 12:50:55 +08:00
Mihail Geshoski 389fed5720 MDL-61993 profilefield_checkbox: Add privacy files and unit tests 2018-04-26 10:30:25 +08:00
Eloy Lafuente (stronk7) 9967972257 Merge branch 'MDL-61979-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-26 03:09:36 +02:00
Eloy Lafuente (stronk7) 698391ffe4 Merge branch 'MDL-61998-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-26 02:40:05 +02:00
Andrew Nicols bae1a479aa Merge branch 'MDL-61944-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-04-26 08:35:10 +08:00
Eloy Lafuente (stronk7) 365697c942 Merge branch 'MDL-62181-34-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-04-25 19:09:46 +02:00
David Monllao a61fab9c50 Merge branch 'MDL-62175-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-04-25 17:37:33 +02:00
David Monllao 4fbacc4a5e Merge branch 'MDL-61986-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-25 16:32:49 +02:00
cescobedo 0ffb2b4156 MDL-61944 tool_mobile: Implement Privacy API 2018-04-25 15:35:52 +02:00
AMOS bot 9d3b7bb04c Automatically generated installer lang files 2018-04-25 00:06:34 +00:00
David Mudrák b712af05fb MDL-62181 lang: Fix changed admin node title in behat scenario 2018-04-24 22:08:27 +02:00
Helen Foster 7cc490a3dd MDL-62181 lang: Merge English strings from the en_fix language pack
Significant string changes:

* sitepolicies, core_admin - 'Site policies' changed to 'Site security
  settings'
* sitepolicy_help and sitepolicyguest_help, core_admin - setting will
  only have an effect if the site policy handler is set to default
* sitepolicyhandler_desc,core_admin - improved wording
* pathtodot_help, core_admin - Windows and Mac paths
* debugstringids_desc, core_admin - improved explanation
2018-04-24 22:08:27 +02:00
Eloy Lafuente (stronk7) 66df2222f5 weekly release 3.4.2+ 2018-04-24 18:57:22 +02:00
Eloy Lafuente (stronk7) 373a574f62 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-04-24 18:57:20 +02:00
Juan Leyva c15b72b415 MDL-62175 auth_email: Fix site policy enabled check 2018-04-24 15:06:56 +02:00
vinhle b7236f9fdb MDL-61715 question: qbank_chooser is not intelligent about headings 2018-04-24 16:09:49 +07:00
Zig Tan 376212f1b9 MDL-61863 core_notes: Implemented privacy providers 2018-04-24 12:08:07 +08:00
Jun Pataleta b22517e334 Merge branch 'MDL-62079-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-24 11:56:10 +08:00
Andrew Nicols 3fd4a77fde MDL-62079 core_filters: Implement null provider 2018-04-24 11:49:04 +08:00
Mark Nelson 26ec8c1b67 MDL-62140 core_privacy: only reset tests when necessary 2018-04-24 11:16:46 +08:00
Frédéric Massart 7a88d29380 MDL-61984 mod_chat: Do not assume context passed is one of chat 2018-04-24 11:04:08 +08:00
Andrew Nicols 3df1711e6d MDL-62140 core_privacy: Improve unit test 2018-04-24 10:19:03 +08:00
Andrew Nicols 14d714b69c Merge branch 'MDL-62140_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-04-24 10:18:44 +08:00
Jun Pataleta 72c09c0e3f Merge branch 'MDL-61764_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-04-24 09:54:08 +08:00
Jun Pataleta d52682b09d Merge branch 'MDL-61882-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-04-24 09:38:14 +08:00
Andrew Nicols 61506589a6 Merge branch 'MDL-61984-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-24 09:34:44 +08:00
Andrew Nicols b124c934ee Merge branch 'MDL-61995-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-24 08:16:07 +08:00
AMOS bot 65b7b6cac5 Automatically generated installer lang files 2018-04-24 00:06:32 +00:00
cescobedo 52797db36b MDL-61882 auth_oauth2: Implement Privacy API 2018-04-23 17:40:03 +02:00
David Monllao 63869e39b5 Merge branch 'MDL-61915-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-04-23 16:26:18 +02:00
David Monllao 9053adb675 Merge branch 'MDL-62042-m34' of https://github.com/sammarshallou/moodle into MOODLE_34_STABLE 2018-04-23 16:08:13 +02:00
cescobedo d73cb53055 MDL-61915 enrol: Add privacy implementation for all enrol plugins
None of the Enrol plugins (except lti and paypal) have any user preference or database table.
They all implement the null provider.
2018-04-23 14:24:36 +02:00
Mark Nelson 9b6bf24f7f MDL-62140 core_privacy: add helper functions to add system/user context 2018-04-23 20:06:32 +08:00
Andrew Nicols eb8d5f283e Merge branch 'wip-MDL-61759-34' of https://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-04-23 18:32:20 +08:00
David Monllao ba2d1550a9 Merge branch 'MDL-62078-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-23 12:08:58 +02:00
David Monllao ace94710be Merge branch 'MDL-62047-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-23 11:59:32 +02:00
David Monllao 75af50bb8d Merge branch 'MDL-61891-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-23 11:55:33 +02:00
Sara Arjona 54ccd521a9 MDL-61998 cohort: Implement privacy API 2018-04-23 11:41:31 +02:00
Zig Tan 9a4404e071 MDL-61995 tool_assignmentupgrade: Implemented privacy providers 2018-04-23 16:49:29 +08:00
Marina Glancy afc0076cf2 MDL-61759 admin: non-existing site policy handler means no policy 2018-04-23 16:46:46 +08:00
Andrew Nicols bcefe75402 Merge branch 'MDL-62055-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-23 16:04:01 +08:00
Jun Pataleta 2e49807d50 Merge branch 'MDL-62049_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-04-23 13:54:31 +08:00
Marina Glancy dbdae3d343 MDL-62138 core: remove core_register and core_publish
These components have no classes and no strings and have no purspose. Component core_hub is responsible
for storing data, defining classes and strings for site registration and course publishing

This also reverts MDL-61945
2018-04-23 13:21:15 +08:00
Jun Pataleta 06f237aa68 Merge branch 'wip-MDL-61966-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-04-23 13:11:22 +08:00
Mark Nelson 1062a75b04 MDL-62049 core_privacy: use correct lang string for date 2018-04-23 13:03:35 +08:00
Andrew Nicols 84f092a44b MDL-61891 core_portfolio: Use manager method caller 2018-04-23 10:09:13 +08:00
Andrew Nicols 35e39d8b5d MDL-61891 core_plagiarism: Use manager method caller 2018-04-23 10:09:13 +08:00
Andrew Nicols 7fe24b695c MDL-61891 privacy: Add helper to call methods on interfaces 2018-04-23 10:09:13 +08:00
Andrew Nicols a7ffba763d Merge branch 'MDL-61759-34-nonexistinghandler' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-04-22 21:05:55 +08:00
Frédéric Massart 973457da4c MDL-61986 mod_lesson: Implement privacy API 2018-04-22 17:31:30 +08:00
sarjona 8a18c88a60 MDL-62078 rss: Link to core_userkey in the Privacy API implementation 2018-04-22 09:04:53 +02:00
Andreas Grabs ab8eb0a56e MDL-62011 course: Approval of a course request fails 2018-04-21 20:55:46 +02:00
AMOS bot 95368281bc Automatically generated installer lang files 2018-04-21 01:02:39 +00:00
Eloy Lafuente (stronk7) f234880958 weekly release 3.4.2+ 2018-04-20 23:52:15 +02:00
Eloy Lafuente (stronk7) d1387ac765 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-04-20 23:52:13 +02:00
sam marshall 5262ae8faf MDL-62042 core_search: Unicode non-characters cause indexing problems
Unicode characters such as U+FFEF can be entered into Moodle data and
cause indexing failures. This change strips them out of search fields.
2018-04-20 13:17:20 +01:00
Sara Arjona aae70e19ae MDL-62055 imscp: Implement privacy API 2018-04-20 08:58:18 +02:00
Adrian Greeve 19f06a1877 MDL-61966 block_myoverview: Update to provider for user preferences. 2018-04-20 14:52:45 +08:00
Mark Nelson fbf766ba01 MDL-61764 message_popup: implement privacy provider 2018-04-20 12:06:06 +08:00
Jun Pataleta d4db4a869f Merge branch 'MDL-62048_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-04-20 11:53:29 +08:00
Andrew Nicols 627299b796 Merge branch 'MDL-61892-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-20 11:49:31 +08:00
Zig Tan 6e102f2c6d MDL-61892 admin/tools: Implement null privacy providers 2018-04-20 11:41:58 +08:00
Andrew Nicols fb639d95b5 Merge branch 'wip-MDL-62035-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-04-20 11:33:59 +08:00
Adrian Greeve af90bd0b7e MDL-62035 core_blog: Update to blog with comments.
This makes blog use the updated delete methods in the
comments provider.
2018-04-20 10:46:07 +08:00
Adrian Greeve b598bd2f79 MDL-62035 core_comment: Update to deletion methods.
Also clarification with the export method to clarify that it
is only for one context.
2018-04-20 10:45:56 +08:00
Andrew Nicols c8cf913c76 Merge branch 'MDL-62003-34-privacyfiles' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-04-20 10:34:35 +08:00
Jun Pataleta 88639eefc4 Merge branch 'MDL-61848-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-04-20 09:20:04 +08:00
Eloy Lafuente (stronk7) 444bdb189a Merge branch 'MDL-61836-34-order' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-20 03:04:24 +02:00
Andrew Nicols 96f5327b3d MDL-61836 blog: Fix random order failures 2018-04-20 08:49:00 +08:00
Łukasz Szeremeta f505863218 MDL-61827 auth: Change Facebook Graph API v2.8 to v.2.12 in OAuth2
Use v2.12 Facebook Graph API instead of v2.8
2018-04-20 02:33:41 +02:00
Eloy Lafuente (stronk7) f6dc9263f8 Merge branch 'MDL-61836-34-fix' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-20 02:28:38 +02:00
Eloy Lafuente (stronk7) 09577f1ec8 Merge branch 'MDL-61991-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-04-20 02:24:54 +02:00
Andrew Nicols 92b4e5956e MDL-61836 comment: Add missing require 2018-04-20 08:17:46 +08:00
Eloy Lafuente (stronk7) 1de7010e47 Merge branch 'MDL-61975-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-20 02:17:42 +02:00
Eloy Lafuente (stronk7) 7bf7bee56c Merge branch 'MDL-61348-take2_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-04-20 02:02:02 +02:00
cescobedo 95bc9fa631 MDL-61848 auth_manual: Implement Privacy API 2018-04-20 00:14:20 +02:00
Andrew Nicols a1656afa41 Merge branch 'MDL-61836-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-19 20:36:47 +08:00
Frédéric Massart df77539994 MDL-61836 core_blog: Prevent randomness in comments order 2018-04-19 16:06:06 +08:00
Mark Nelson 04ef818023 MDL-62025 mod_choice: add missing join on modules table 2018-04-19 15:51:07 +08:00
Andrew Nicols 1444ea075e MDL-62047 core_userkey: Add privacy implementation 2018-04-19 15:30:40 +08:00
Andrew Nicols 457f4b7551 MDL-62047 core_userkey: Define component path 2018-04-19 15:30:40 +08:00
Andrew Nicols f02e11d668 Merge branch 'MDL-61568-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-19 15:01:08 +08:00
Andrew Nicols a1eef605f0 Merge branch 'MDL-61970-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-19 14:53:23 +08:00
Andrew Nicols fe3ece78ea Merge branch 'MDL-61969-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-19 14:48:49 +08:00
Jun Pataleta 8905f55508 Merge branch 'MDL-61878-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-19 14:40:03 +08:00
Zig Tan 89feef08e8 MDL-61568 repository_flickr: Fix oauth secret export 2018-04-19 14:37:55 +08:00
Mihail Geshoski 96a257f7a9 MDL-61878 fileconverter_googledrive: Add privacy files and unit tests 2018-04-19 13:17:06 +08:00
Frédéric Massart 45b3665c00 MDL-61970 mod_survey: Do not assume context passed is one of survey 2018-04-19 13:11:43 +08:00
Mark Nelson 509c176f0a MDL-62048 core_privacy: extend test to ensure table exists 2018-04-19 13:03:53 +08:00
Andrew Nicols 8788ad4f14 Merge branch 'MDL-61945-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-04-19 11:55:26 +08:00
Andrew Nicols 64466bd2b8 Merge branch 'MDL-61948-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-19 11:47:16 +08:00
Andrew Nicols 1d1baa54f0 Merge branch 'MDL-61836-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-19 11:20:15 +08:00
Andrew Nicols 4376919fee Merge branch 'MDL-61970-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-19 11:13:15 +08:00
AMOS bot 6de72ccebd Automatically generated installer lang files 2018-04-19 00:06:20 +00:00
David Monllao 5011a166b8 Merge branch 'MDL-61716-34' of git://github.com/mastnym/moodle into MOODLE_34_STABLE 2018-04-18 17:40:21 +02:00
David Monllao 6e6edbe001 MDL-61958 rss: Add rss test suite 2018-04-18 17:38:23 +02:00
David Monllao 6728b43113 Merge branch 'MDL-61958-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-18 17:22:31 +02:00
David Mudrák 34858987ca MDL-62003 privacy: Fix reported coding style violation 2018-04-18 17:11:10 +02:00
David Mudrák c6f9dce2a0 MDL-62003 privacy: Consistently export files into _files folder
There were two major issues with the previous implementation:

* The exported folder name was localised so it was "Files" or "Soubory"
  etc depending on the current language. Yet URLs referring to the files
  in that folder were always rewritten with hard-coded English "files".
* Files from all fileareas and itemids were all exported to a single
  target directory. So if there were two files with the same name being
  exported from multiple areas (such as submission_content and
  submission_attachment in the workshop module), one would overwrite
  another.

The patch addresses these issues as follows:

* To unify the folder name and also to minimise the risk of conflict
  with a subcontext folder, we now always export stored files under
  "_files" folder.
* Under that folder, there is a subdirectory with the area name and then
  eventually another subdirectory with non-zero itemid. And there
  finally the stored_file is exported to under its own file path.
2018-04-18 17:11:10 +02:00
Martin Mastny 06d3bab902 MDL-61716 auth_oauth2: field names in mappings allow all characters 2018-04-18 16:54:56 +02:00
David Monllao 0eb5643936 Merge branch 'MDL-61796-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-04-18 15:20:52 +02:00
David Monllao 4d53f252e3 Merge branch 'MDL-38099-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-04-18 14:14:46 +02:00
Sara Arjona 775a804c68 MDL-61958 core_rss: Implement privacy API 2018-04-18 13:39:21 +02:00
Sara Arjona ac183832bc MDL-61958 rss: Create core_rss lang file and move rss string
At the moment will only be copied one of the rss strings ('rss').
The issue MDL-61997 has been created to move the rest of the core_rss lang
strings from moodle.php to rss.php.

AMOS BEGIN
 CPY [rss,core],[rss,core_rss]
AMOS END
2018-04-18 13:39:21 +02:00
Sara Arjona 9d0f4315f0 MDL-61958 lang: Move privatefilesmanage string to correct place 2018-04-18 13:39:20 +02:00
Eloy Lafuente (stronk7) 524312d1ef Merge branch 'MDL-61621_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-04-18 12:58:27 +02:00
Jun Pataleta 81bd6817b9 Merge branch 'MDL-62025_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-04-18 16:26:01 +08:00
Jun Pataleta 99b227c604 Merge branch 'MDL-61928_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-04-18 16:00:37 +08:00
Mark Nelson ecc63154f9 MDL-62025 mod_choice: only export in the CONTEXT_MODULE context 2018-04-18 15:11:58 +08:00
Frédéric Massart 642389a9a9 MDL-61970 mod_survey: Implement privacy API 2018-04-18 14:56:46 +08:00
Andrew Nicols 8cac59ef84 Merge branch 'MDL-61568-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-18 14:25:25 +08:00
Mihail Geshoski bb9dcb7479 MDL-61969 datapreset_imagegallery: Implement null privacy provider 2018-04-18 13:50:46 +08:00
Zig Tan 3b1e2eb6f4 MDL-61568 core_repository: Implement privacy providers 2018-04-18 13:44:21 +08:00
Mihail Geshoski 1692fae8c0 MDL-61948 core_media: Implement null privacy provider 2018-04-18 13:44:21 +08:00
Zig Tan 7d8b9d454e MDL-61568 repository_onedrive: Implement privacy providers 2018-04-18 13:44:21 +08:00
Zig Tan f4b2263a56 MDL-61568 repository_youtube: Implement privacy providers 2018-04-18 13:44:21 +08:00
Zig Tan db318336de MDL-61568 repository_wikimedia: Implement privacy providers 2018-04-18 13:44:21 +08:00
Zig Tan e072d0eec4 MDL-61568 repository_picasa: Implement privacy providers 2018-04-18 13:44:21 +08:00
Zig Tan 3d8caa7ea5 MDL-61568 repository_merlot: Implement privacy providers 2018-04-18 13:44:21 +08:00
Zig Tan 4984f4bdac MDL-61568 repository_googledocs: Implement privacy providers 2018-04-18 13:44:21 +08:00
Zig Tan b2eccf48da MDL-61568 repository_flickr_public: Implement privacy providers 2018-04-18 13:44:21 +08:00
Zig Tan 98daec96f4 MDL-61568 repository_flickr: Implement privacy providers 2018-04-18 13:44:20 +08:00
Zig Tan b8fb5e361a MDL-61568 repository_dropbox: Implement privacy providers 2018-04-18 13:44:20 +08:00
Zig Tan 4917cc34e7 MDL-61568 repository_boxnet: Implement privacy providers 2018-04-18 13:44:20 +08:00
Zig Tan 66208cc750 MDL-61568 repository_webdav: Implement null privacy provider 2018-04-18 13:44:20 +08:00
Zig Tan 9df4cecb27 MDL-61568 repository_user: Implement null privacy provider 2018-04-18 13:44:20 +08:00
Zig Tan 8338bf6593 MDL-61568 repository_url: Implement null privacy provider 2018-04-18 13:44:20 +08:00
Zig Tan 1c86c7ddc1 MDL-61568 repository_upload: Implement null privacy provider 2018-04-18 13:44:20 +08:00
Zig Tan ec0dae6909 MDL-61568 repository_skydrive: Implement null privacy provider 2018-04-18 13:44:20 +08:00
Zig Tan 9556d7bb2b MDL-61568 repository_s3: Implement null privacy provider 2018-04-18 13:44:20 +08:00
Zig Tan 7eb62206da MDL-61568 repository_recent: Implement null privacy provider 2018-04-18 13:44:19 +08:00
Zig Tan d4b288aa9f MDL-61568 repository_local: Implement null privacy provider 2018-04-18 13:44:19 +08:00
Zig Tan 18b5d648d3 MDL-61568 repository_filesystem: Implement null privacy provider 2018-04-18 13:44:19 +08:00
Zig Tan 7fcec033b0 MDL-61568 repository_equella: Implement null privacy provider 2018-04-18 13:44:19 +08:00
Zig Tan f1e5ab7715 MDL-61568 repository_coursefiles: Implement null privacy provider 2018-04-18 13:44:19 +08:00
Zig Tan ece49dae92 MDL-61568 repository_areafiles: Implement null privacy provider 2018-04-18 13:44:19 +08:00
Jun Pataleta 8e7f7d2e50 Merge branch 'MDL-61520-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-04-18 13:28:22 +08:00
Andrew Nicols 56909e7f80 Merge branch 'MDL-61957-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-18 13:09:27 +08:00
Zig Tan 4c58569211 MDL-61979 tool_cohortroles: Implemented privacy providers 2018-04-18 10:50:36 +08:00
Jun Pataleta 3da0292df5 Merge branch 'MDL-61950-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2018-04-18 09:46:48 +08:00
Eloy Lafuente (stronk7) 4663dc19f2 Merge branch 'm34_MDL-59857' of https://github.com/danmarsden/moodle into MOODLE_34_STABLE 2018-04-18 03:07:45 +02:00
AMOS bot 1971a6b958 Automatically generated installer lang files 2018-04-18 00:07:59 +00:00
Luca Bösch 3515c76f92 MDL-61796 themes: In Clean, normalize filter labels font size.
Actually, in every theme not overriding the template.
2018-04-17 22:43:50 +02:00
Luca Bösch fb795d0177 MDL-61991 theme_boost: Question correctness displayed as label. 2018-04-17 22:39:54 +02:00
Luca Bösch 868681e9ba MDL-38099 comments: year in comments date 2018-04-17 22:39:01 +02:00
Eloy Lafuente (stronk7) 9a6b854e5c weekly release 3.4.2+ 2018-04-17 19:54:42 +02:00
Eloy Lafuente (stronk7) 397bd9aa3c Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-04-17 19:54:40 +02:00
Sara Arjona 54d35aec03 MDL-61957 gradereport_user: Implement privacy API 2018-04-17 14:34:20 +02:00
Sara Arjona 7b15e26ef7 MDL-61957 gradereport_singleview: Implement privacy API 2018-04-17 14:34:20 +02:00
Sara Arjona c2ea064a30 MDL-61957 gradereport_overview: Implement privacy API 2018-04-17 14:34:20 +02:00
Sara Arjona 7b585ddb84 MDL-61957 gradereport_outcomes: Implement privacy API 2018-04-17 14:34:19 +02:00
Sara Arjona a991d5b9f4 MDL-61957 gradereport_history: Implement privacy API 2018-04-17 14:34:19 +02:00
Sara Arjona 1ab6c6caef MDL-61957 gradereport_grader: Implement privacy API 2018-04-17 14:34:19 +02:00
Frédéric Massart 24abced8a6 MDL-61984 mod_chat: Implement privacy API 2018-04-17 15:34:16 +08:00
Andrew Nicols d2b9bbf551 MDL-61663 phpunit: Add portfolio to the testsuite list 2018-04-17 14:44:43 +08:00
cescobedo 14bdc702a5 MDL-61945 core_register: Implement Privacy API 2018-04-17 08:25:27 +02:00
Frédéric Massart fd8a0e5498 MDL-61862 mod_feedback: Tweak query to support UNION on TEXT fields
Thanks Oracle.
2018-04-17 12:09:51 +08:00
Andrew Nicols ca91ebf33e Merge branch 'wip-MDL-61663-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-04-17 11:46:32 +08:00
Andrew Nicols 8df10e8a28 Merge branch 'MDL-61977-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-17 11:43:07 +08:00
Adrian Greeve 6292041827 MDL-61663 portfolio: Update to the external system link names.
Changed the name of the link to something less like an English
string for each of the portfolios.
2018-04-17 11:41:38 +08:00
Andrew Nicols cc53b1773a Merge branch 'MDL-61980-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-17 11:35:01 +08:00
Andrew Nicols 708d156131 Merge branch 'MDL-61916-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-04-17 11:18:43 +08:00
Andrew Nicols 1266d56c57 Merge branch 'MDL-61918-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-17 11:12:55 +08:00
Andrew Nicols c4c73a3b44 Merge branch 'MDL-61903-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-17 11:10:16 +08:00
Mihail Geshoski 24a051e949 MDL-61903 webservice: Implement null privacy provider
Implement null privacy provider to rest, soap and xmlrpc webservice plugins.
2018-04-17 09:20:35 +08:00
AMOS bot 1fc5fe1ddd Automatically generated installer lang files 2018-04-17 00:07:17 +00:00
Dan Marsden e819de5611 MDL-59857 mod_scorm: use valid length for grade type field. 2018-04-17 08:36:46 +12:00
Jun Pataleta 0cc1957ddd Merge branch 'MDL-61862-34' of git://github.com/FMCorz/moodle into MOODLE_34_STABLE 2018-04-16 23:30:28 +08:00
Eloy Lafuente (stronk7) 953a4575d7 MDL-61819 editor: add testsuite to phpunit.xml 2018-04-16 16:38:35 +02:00
David Monllao ed94efe520 Merge branch 'MDL-61819-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-16 16:15:01 +02:00
Andrew Nicols 8c9880c2ba MDL-61819 core_editor: Implement core provider 2018-04-16 21:55:35 +08:00
Andrew Nicols 8f52e5f0da MDL-61819 editor_atto: Implement null provider 2018-04-16 21:55:35 +08:00
Andrew Nicols b4d758c6a7 MDL-61819 editor: Implement editor null providers 2018-04-16 21:55:34 +08:00
Frédéric Massart 0de5067c23 MDL-61862 mod_feedback: Implement core_privacy API 2018-04-16 18:45:56 +08:00
David Monllao 1f52bff88a Merge branch 'MDL-61741-34-paypal' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-04-16 10:58:34 +02:00
David Monllao e0c45f30a8 Merge branch 'wip-MDL-61808-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-04-16 10:03:57 +02:00
Jun Pataleta 6b2ac967a8 Merge branch 'MDL-61708-MOODLE34-lti-fullnamedisplay' of https://github.com/wjroes/moodle into MOODLE_34_STABLE 2018-04-16 15:29:31 +08:00
Jun Pataleta ce1bde9502 Merge branch 'MDL-61974-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-16 13:16:54 +08:00
Andrew Nicols 28780bdb62 MDL-61974 privacy: Rewrite the content writer storage 2018-04-16 11:12:37 +08:00
Andrew Nicols 9959542265 Merge branch 'MDL-61952-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-16 10:51:48 +08:00
Andrew Nicols a7713fd8eb Merge branch 'MDL-61954-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-16 10:47:02 +08:00
Andrew Nicols bff5ccf474 Merge branch 'MDL-61902-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-16 10:21:38 +08:00
Mihail Geshoski 9d1d7caf54 MDL-61918 assignment: Implement null privacy provider
Implement null privacy provider to offline, online, upload and uploadsingle assignment plugins.
2018-04-16 10:02:39 +08:00
Mihail Geshoski ee7c1b3a24 MDL-61902 media: Implement null privacy provider 2018-04-16 09:47:51 +08:00
AMOS bot 8c43f4cc9f Automatically generated installer lang files 2018-04-16 00:07:18 +00:00
Adrian Greeve 496c5f57f6 MDL-61808 tool_monitor: Implemented privacy classes.
This plugin is now compatible with the new privacy system.
2018-04-14 10:50:00 +08:00
AMOS bot 966acf7fc5 Automatically generated installer lang files 2018-04-14 00:08:01 +00:00
Mihail Geshoski 4548bff23b MDL-61980 booktool: Implement null privacy provider
Implement null privacy provider into booktool_exportimscp, booktool_importhtml, booktool_print plugin.
2018-04-13 16:18:23 +08:00
David Mudrák 0c24851679 MDL-61759 admin: Fix notice if attempting use nonexisting policy handler
The list of all known handlers may not contain the configured value,
raising the PHP undefined index notice.
2018-04-13 10:00:33 +02:00
Jake Dallimore f98c0bc576 MDL-61663 portfolio_picasa: add privacy provider implementation 2018-04-13 14:48:54 +08:00
Jake Dallimore fa49cdeb8a MDL-61663 portfolio_googledocs: add privacy provider implementation 2018-04-13 14:48:54 +08:00
Jake Dallimore 634830af0b MDL-61663 portfolio_flickr: add privacy provider implementation 2018-04-13 14:48:54 +08:00
Jake Dallimore 77f4c014b4 MDL-61663 portfolio_download: add privacy provider implementation 2018-04-13 14:48:54 +08:00
Jake Dallimore 3b8e4fb5de MDL-61663 portfolio_boxnet: add privacy provider implementation 2018-04-13 14:48:53 +08:00
Jake Dallimore c321bdd891 MDL-61663 portfolio_mahara: add privacy provider implementation 2018-04-13 14:48:53 +08:00
Jake Dallimore 77430d203d MDL-61663 core_portfolio: add subsystem privacy provider
Added provider for portfolio plugins, and legacy polyfill for plugins.
2018-04-13 14:48:53 +08:00
Zig Tan 69693630a4 MDL-61977 tool_profiling: Implemented null privacy provider 2018-04-13 14:39:09 +08:00
Zig Tan 0e16e180df MDL-61975 tool_recyclebin: Implemented null privacy provider 2018-04-13 14:00:48 +08:00
Frédéric Massart 2cd0309d90 MDL-61836 core_blog: Implement privacy API 2018-04-13 13:30:13 +08:00
AMOS bot 52a844087a Automatically generated installer lang files 2018-04-13 00:07:27 +00:00
David Monllao 109eb1124c weekly release 3.4.2+ 2018-04-12 14:38:25 +02:00
David Monllao 5c1004b8a3 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-04-12 14:38:24 +02:00
Sara Arjona 5309e7f63d MDL-61954 gradeimport_xml: Implement privacy API 2018-04-12 09:54:12 +02:00
Sara Arjona 686e91d5c0 MDL-61954 gradeimport_direct: Implement privacy API 2018-04-12 09:54:12 +02:00
Sara Arjona 1355912aa8 MDL-61954 gradeimport_csv: Implement privacy API 2018-04-12 09:54:12 +02:00
Sara Arjona b9aa614831 MDL-61952 gradeexport_xml: Implement privacy API 2018-04-12 08:41:56 +02:00
Sara Arjona 1e803c595a MDL-61952 gradeexport_xls: Implement privacy API 2018-04-12 08:41:56 +02:00
Sara Arjona c52427e1b8 MDL-61952 gradeexport_txt: Implement privacy API 2018-04-12 08:41:56 +02:00
Sara Arjona 33b62aab65 MDL-61952 gradeexport_ods: Implement privacy API 2018-04-12 08:41:55 +02:00
Ryan Wyllie 0961388a0a MDL-61950 question: include random questions in statistics calculator 2018-04-12 05:39:37 +00:00
nlnrose 92c327fccd MDL-61802 Admin: Corrected typo in test file.
The file privcacy_provider_test.php was supposed to be
privacy_provider_test.php.
2018-04-12 00:23:48 +02:00
Eloy Lafuente (stronk7) fe7fbf24b9 Merge branch 'MDL-61828-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-12 00:14:41 +02:00
Eloy Lafuente (stronk7) 2998e41620 Merge branch 'MDL-61895-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-11 23:58:02 +02:00
Eloy Lafuente (stronk7) 89e4561e94 Merge branch 'MDL-61896-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-11 23:54:55 +02:00
Eloy Lafuente (stronk7) 92c7a3b3c5 Merge branch 'MDL-61859-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-04-11 22:28:46 +02:00
Eloy Lafuente (stronk7) f33ef72a29 Merge branch 'MDL-61743_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-04-11 19:23:22 +02:00
David Monllao db7a1199cf Merge branch 'MDL-61873-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-04-11 18:42:00 +02:00
David Monllao 6a670f942c Merge branch 'MDL-61581-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-04-11 18:07:56 +02:00
Jake Dallimore 4d5ae78760 Merge branch 'MDL-59691-34' of https://github.com/lucisgit/moodle into MOODLE_34_STABLE 2018-04-11 16:01:26 +08:00
David Monllao 02ca3a12ce MDL-61743 message: Add context level checking 2018-04-11 08:57:51 +02:00
David Monllao fc2238cfec MDL-61743 core_privacy: Add context level checks for all users deletion 2018-04-11 08:57:50 +02:00
Andrew Nicols ab30639634 MDL-61743 core_privacy: Reduce context specificty
Deletion is called for a context against all components, not just
modules.
2018-04-11 08:57:25 +02:00
Simey Lameze 666b12c1e6 MDL-61520 quiz: fix references for xhtml on stats report 2018-04-11 10:49:31 +08:00
Andrew Nicols 53f38ff0d9 Merge branch 'MDL-61881-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-11 10:15:05 +08:00
Zig Tan 4030001cf8 MDL-61881 report: fix privacy lang strings 2018-04-11 10:07:05 +08:00
Zig Tan 184f7d3a85 MDL-61881 report_usersessions: Implement null privacy provider 2018-04-11 10:07:05 +08:00
Zig Tan 7409199411 MDL-61881 report_stats: Implement null privacy provider 2018-04-11 10:07:05 +08:00
Zig Tan bc421d6d46 MDL-61881 report_security: Implement null privacy provider 2018-04-11 10:07:05 +08:00
Zig Tan 850bbe3b97 MDL-61881 report_questioninstances: Implement null privacy provider 2018-04-11 10:07:05 +08:00
Zig Tan e95b8a7c7b MDL-61881 report_performance: Implement null privacy provider 2018-04-11 10:07:05 +08:00
Zig Tan c98c41712d MDL-61881 report_participation: Implement null privacy provider 2018-04-11 10:07:04 +08:00
Zig Tan df5f0c8f93 MDL-61881 report_outline: Implement null privacy provider 2018-04-11 10:07:04 +08:00
Zig Tan b05ffcfc57 MDL-61881 report_loglive: Implement null privacy provider 2018-04-11 10:07:04 +08:00
Zig Tan 7015547371 MDL-61881 report_log: Implement null privacy provider 2018-04-11 10:07:04 +08:00
Zig Tan 70242a8f17 MDL-61881 report_insights: Implement null privacy provider 2018-04-11 10:07:04 +08:00
Zig Tan 6b39e44679 MDL-61881 report_eventlist: Implement null privacy provider 2018-04-11 10:07:04 +08:00
Zig Tan bb49184116 MDL-61881 report_courseoverview: Implement null privacy provider 2018-04-11 10:07:04 +08:00
Zig Tan 07dd873f63 MDL-61881 report_configlog: Implement null privacy provider 2018-04-11 10:07:04 +08:00
Zig Tan 00ab1f6e58 MDL-61881 report_competency: Implement null privacy provider 2018-04-11 10:07:04 +08:00
Zig Tan 8f2e5829ce MDL-61881 report_backup: Implement null privacy provider 2018-04-11 10:07:03 +08:00
Andrew Nicols d564f67b2d Merge branch 'MDL-61731-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-11 09:12:28 +08:00
Mihail Geshoski db6aacf45e MDL-61731 message_email: Add privacy files and unit tests 2018-04-11 09:04:48 +08:00
Andrew Nicols b808bf5374 Merge branch 'MDL-61867-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-11 08:52:16 +08:00
AMOS bot 2fbd688d8f Automatically generated installer lang files 2018-04-11 00:07:21 +00:00
Eloy Lafuente (stronk7) d39ae0084a Merge branch 'MDL-61824-m34' of https://github.com/sammarshallou/moodle into MOODLE_34_STABLE 2018-04-11 01:07:01 +02:00
Eric Merrill f539686553 MDL-61913 restore: Protect against blocks that aren't being created 2018-04-11 00:52:00 +02:00
Tim Hunt fadee607e9 MDL-61928 formslib: shortforms should work with non-editable forms 2018-04-10 17:40:19 +01:00
Tim Hunt 199b34b5d0 MDL-61348 quiz reports: fix incorrect groups averages
the averages were wrong if a user had mulitple enrolments in a course,
which can happen with some enrolment plugins.
2018-04-10 17:12:04 +01:00
Eloy Lafuente (stronk7) 713a61f712 Merge branch 'wip-MDL-58697-34-assigngrading' of git://github.com/adamann2/moodle into MOODLE_34_STABLE 2018-04-10 15:53:59 +02:00
sam marshall 5a4cd49648 MDL-61824 core_search: Deleting restored context caused error
When restoring content, this adds it to a queue for indexing. If the
restored content was then deleted before the indexing takes place,
this caused an exception in the scheduled task.

This change makes it continue safely past missing contexts.
2018-04-10 13:07:57 +01:00
David Monllao dec44f9d39 Merge branch 'MDL-61838-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-10 13:44:36 +02:00
David Monllao 61bb1ebe33 Merge branch 'MDL-61843-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-10 13:42:50 +02:00
Eloy Lafuente (stronk7) 933ce256a6 MDL-61875 tests: Use existing component & support $CFG->admin 2018-04-10 13:14:01 +02:00
Eloy Lafuente (stronk7) 70348aa81e Merge branch 'MDL-61875-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-04-10 13:06:30 +02:00
David Monllao 5f1145b4ce Merge branch 'MDL-61846-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-10 09:00:08 +02:00
David Monllao 308435acb4 Merge branch 'MDL-61129-fix-accessibility-on-tables-mod_survey_Moodle-34' of https://github.com/guillalva06/moodle into MOODLE_34_STABLE 2018-04-10 07:59:09 +02:00
Andrew Nicols a8c579b4c5 Merge branch 'MDL-61795-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-10 10:42:10 +08:00
Mihail Geshoski 321a30e14f MDL-61795 block_rss_client: Add privacy files and unit tests 2018-04-10 09:37:38 +08:00
Jake Dallimore edadfa06cb MDL-61875 core_privacy: update the core_component_list in the manager 2018-04-10 08:51:00 +08:00
Jake Dallimore 21c438f24a MDL-61875 core_component: new method to get full components list 2018-04-10 08:50:58 +08:00
Eloy Lafuente (stronk7) 4d01802d31 Merge branch 'MDL-61860-34' of https://github.com/mackensen/moodle into MOODLE_34_STABLE 2018-04-10 01:01:07 +02:00
Eloy Lafuente (stronk7) 91513c6bd3 Merge branch 'MDL-60196_34' of https://github.com/mfabriczy/moodle into MOODLE_34_STABLE 2018-04-10 00:57:35 +02:00
cescobedo 623acad16b MDL-61916 format: Add privacy implementation for all format plugins
None of the Course format plugins have any user preference or database table.
They all implement the null provider.
2018-04-10 00:24:58 +02:00
Daniel Thies f62a247467 MDL-61476 mod_glossary: Check XML arrays exist 2018-04-09 23:45:58 +02:00
Daniel Thies 8071b5fc9e MDL-61476 mod_glossary: Support tags in entries export 2018-04-09 23:45:38 +02:00
Eloy Lafuente (stronk7) 6d044ed3d9 Merge branch 'MDL-61861-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-09 20:28:34 +02:00
Tony Butler 966f659277 MDL-59691 assignfeedback_editpdf: Allow comment placement to all edges
Plus a couple of extra usability improvements:
- Collapse comment during move to allow precise placement
- Change cursor style to indicate that dragging is possible
2018-04-09 16:56:08 +01:00
Tony Butler 00e98f2a8b MDL-59691 assignfeedback_editpdf: Allow comments to collapse to top-left
Forcing them to collapse to the bottom-left corner seems less natural
and effectively changes the location of existing comments from pre-3.3
2018-04-09 16:56:08 +01:00
Guillermo Alvarez ca9f979270 MDL-61129 survey: Add colgroup attribute at survey question tables 2018-04-09 10:32:43 -05:00
Andrew Nicols 6f1680569b Merge branch 'MDL-61829-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-09 15:28:37 +08:00
Andrew Nicols f647b94a75 Merge branch 'MDL-61736-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-04-09 15:25:48 +08:00
Sara Arjona b1f50cdf98 MDL-61736 user: Show correct status when enrol method is disabled
When disabling an enrolment method, the user status will be displayed
as "Not current" instead of "Active".
2018-04-09 08:47:12 +02:00
Zig Tan 26109431b5 MDL-61829 block_community: Implement privacy provider 2018-04-09 14:09:27 +08:00
Mihail Geshoski 36506f7354 MDL-61867 fileconverter_unoconv: Add privacy files 2018-04-09 11:44:48 +08:00
Helen Foster 60d78e5a11 MDL-61033 mod_quiz: Update lang string 2018-04-09 10:40:17 +08:00
Andrew Nicols 7569618528 Merge branch 'MDL-61033-34' of https://github.com/nashtechdev01/moodle into MOODLE_34_STABLE 2018-04-09 10:39:34 +08:00
Andrew Nicols f42a899268 MDL-61896 filter: Implement privacy API for all filters 2018-04-08 15:56:14 +08:00
Andrew Nicols 46612109ff MDL-61895 availability: Implement null provider for plugins 2018-04-08 14:22:16 +08:00
Andrew Nicols 5712717383 MDL-61861 privacy: Add unit tests to check all providers. 2018-04-08 14:13:22 +08:00
Andrew Nicols a00bc971d5 MDL-61861 core_tag: Correct langstring identifier 2018-04-08 14:13:22 +08:00
Andrew Nicols ec965d9e00 MDL-61828 core_privacy: Support proper nesting in test trees 2018-04-08 13:35:39 +08:00
Charles Fulton 507867b76d MDL-61860 auth: standardise config inclusion 2018-04-07 12:19:17 -04:00
cescobedo 935d2c9f29 MDL-61873 auth: Add privacy implementation for all auth plugins
None of the Auth plugins (except manual and oauth2) have any user preference or database table.
They all implement the null provider.
2018-04-07 11:26:51 +02:00
Luca Bösch 0023c0254f MDL-61581 lesson: style continue to last buttons 2018-04-06 16:43:00 +02:00
David Monllao 42770ce9a9 MDL-61621 blocks: New API function 2018-04-06 13:13:33 +02:00
Jake Dallimore 810e854153 MDL-61859 core_completion: fix unit tests expecting exceptions twice
We can't expectException twice in the same test, so split this out into
another test.
2018-04-06 17:31:38 +08:00
Mihail Geshoski bc7287eaf5 MDL-61846 dataformat: Add privacy implementation for all plugins 2018-04-06 09:25:53 +08:00
Mihail Geshoski 4dc61ed547 MDL-61843 report_completion: Add privacy files 2018-04-06 09:14:20 +08:00
Mihail Geshoski 2496cd7ffd MDL-61838 report_progress: Add privacy files 2018-04-06 09:00:52 +08:00
Eloy Lafuente (stronk7) 2d8ddc8239 weekly release 3.4.2+ 2018-04-05 15:38:15 +02:00
Eloy Lafuente (stronk7) d7174ce4e2 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-04-05 15:38:12 +02:00
Jake Dallimore 4fe8b57969 Merge branch 'MDL-61761-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-05 13:18:30 +08:00
Mihail Geshoski ed7d3f13b6 MDL-61761 message_jabber: Add privacy files and unit tests 2018-04-05 12:01:20 +08:00
Jake Dallimore 55653a2dac Merge branch 'wip-MDL-61163-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-04-05 10:37:15 +08:00
Andrew Nicols 4fe9879b14 Merge branch 'MDL-60726-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-04-05 08:39:18 +08:00
Eloy Lafuente (stronk7) 2f6c6c0026 Merge branch 'MDL-61818-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-05 00:53:10 +02:00
Rohith 551fa309a0 MDL-61746 PARAM_CLEANHTML: Fix documentation typos 2018-04-05 00:43:34 +02:00
Eloy Lafuente (stronk7) 476380749b Merge branch 'MDL-61673-fix-wrong-string-on-calendar-mustache_Moodle_34' of https://github.com/guillalva06/moodle into MOODLE_34_STABLE 2018-04-05 00:37:39 +02:00
Eloy Lafuente (stronk7) f143f75d91 Merge branch 'MDL-61781-34-fix' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-04-04 10:51:11 +02:00
Jun Pataleta 4ed6dd031a MDL-61781 admin_settings: Fix default settings value for docroot 2018-04-04 16:48:02 +08:00
Zig Tan f13c851d05 MDL-60726 assign: Fix assign submission confirmation alignment 2018-04-04 16:35:27 +08:00
Andrew Nicols 328c32c3db Merge branch 'MDL-61692-34-2' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-04-04 13:03:24 +08:00
Andrew Nicols 5a0251179a Merge branch 'wip-MDL-56635-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-04-04 11:32:22 +08:00
Andrew Nicols 450aa66dcd Merge branch 'MDL-61183-34' of git://github.com/farhan6318/moodle into MOODLE_34_STABLE 2018-04-04 11:02:00 +08:00
Farhan Karmali 2377be335a MDL-61183 user: Added total participants count on paricipants page 2018-04-04 07:59:17 +05:30
Jake Dallimore 9665640c24 MDL-61692 core_privacy: add privacyfields to link_ methods
Some subsystems are like conduits, passing data along to plugins which,
in turn, send the data externally. Only the component linking to (using)
the subsystem will know what data it is sending along to the eventual
external system, so should be able to specify this at the time of
linking. The same goes for plugintypes.
2018-04-04 10:06:04 +08:00
Andrew Nicols bd0ce23402 Merge branch 'MDL-61751-34-fix' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-04-04 09:11:39 +08:00
Jake Dallimore 82df7d0a4d MDL-61751 core_plagiarism: fix fatal error with privacy legacy polyfill 2018-04-04 08:59:12 +08:00
Eloy Lafuente (stronk7) b3c6973362 Merge branch 'MDL-61451-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-04-04 01:40:45 +02:00
Eloy Lafuente (stronk7) dc43213556 Merge branch 'MDL-61817-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-04 01:23:11 +02:00
Eloy Lafuente (stronk7) 5959911fff MDL-61751 core_plagiarism: add testsuite to phpunit.xml 2018-04-04 01:05:40 +02:00
Luca Bösch 90632e0763 MDL-61502 questions: add filter tests to gapselect question type. 2018-04-04 00:56:29 +02:00
Eloy Lafuente (stronk7) 2d621dc0ef Merge branch 'wip-MDL-61522-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-04-04 00:46:33 +02:00
Eloy Lafuente (stronk7) 9066f3bde6 Merge branch 'MDL-61525-34' of https://github.com/HuongNV13/moodle into MOODLE_34_STABLE 2018-04-04 00:44:40 +02:00
Eloy Lafuente (stronk7) e3529026a0 Merge branch 'MDL-61665-34' of https://github.com/iamandrew/moodle into MOODLE_34_STABLE 2018-04-04 00:39:31 +02:00
Eloy Lafuente (stronk7) 2f56d7d101 Merge branch 'MDL-61703-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-04 00:35:12 +02:00
Eloy Lafuente (stronk7) 15a84d14d5 Merge branch 'MDL-61751-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-04 00:23:55 +02:00
Eloy Lafuente (stronk7) c184fb81f3 Merge branch 'MDL-61781-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-04-03 23:46:40 +02:00
Eloy Lafuente (stronk7) 737f272b1e Merge branch 'MDL-61724-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-04-03 23:39:56 +02:00
Eloy Lafuente (stronk7) 89d622013b Merge branch 'MDL-60115-Book-cancel-button-redirect-bug-34' of https://github.com/Moodlers/moodle-1 into MOODLE_34_STABLE 2018-04-03 21:46:27 +02:00
Marcus Fabriczy 44d7ee0937 MDL-60196 core_course: Fix the display of custom LTI icons
Custom LTI icons attached to LTI tools did not display - a regression
caused by MDL-55796.

Change-Id: Ia7e3428755fae4a2b1bc31b3903574061a23ee9b
2018-04-03 20:34:47 +09:30
Jake Dallimore 12440c7f9d Merge branch 'wip-MDL-61815-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-04-03 17:53:39 +08:00
Eloy Lafuente (stronk7) df740a511b MDL-61629 message_airnotifier: whitespace fix 2018-04-03 11:48:51 +02:00
Jake Dallimore 334bea41ec Merge branch 'wip-MDL-61127-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-04-03 17:34:20 +08:00
Adrian Greeve fd3d62ca37 MDL-61127 filepicker: Selected repository now highlighted. 2018-04-03 16:43:21 +08:00
Adrian Greeve 3ad6fc7852 MDL-61127 filepicker: Added aria-selected attribute to repos.
The repository list in the file picker now as aria-selected
added to denote which repository is selected.
2018-04-03 16:43:10 +08:00
Andrew Nicols d61bbb5f37 Merge branch 'wip-MDL-61629-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-04-03 15:59:58 +08:00
Adrian Greeve e4a71a9a96 MDL-61629 message_airnotifier: Add privacy files and unit tests. 2018-04-03 15:29:46 +08:00
Andrew Nicols 51cd6d5f48 Merge branch 'MDL-61020-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-04-03 14:21:17 +08:00
Adrian Greeve 34a39ba884 MDL-61815 core_privacy: Fix for metadata types and new method.
Minor fix for subsystem_link and plugintype_link.
Addition of get_null_provider_reason in the manager class.
2018-04-03 13:05:11 +08:00
Eloy Lafuente (stronk7) fe9c70b9b5 Merge branch 'MDL-61689-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-03 01:17:26 +02:00
Eloy Lafuente (stronk7) 5d4d21a31a MDL-61223 course: keep some tests using old values (January 1st 1970) 2018-04-03 00:13:28 +02:00
Guillermo Alvarez a564495dcf MDL-61673 calendar: Replace wrong string on mustache template 2018-04-02 10:34:23 -05:00
Eloy Lafuente (stronk7) f070d262a1 MDL-61223 course: amend test setup to keep passing and covering case 2018-04-02 12:03:51 +02:00
Andrew Nicols 12d8c5a611 MDL-61223 course: Set default course start date 2018-04-02 12:03:46 +02:00
Eloy Lafuente (stronk7) 5251a11c59 Merge branch 'MDL-61801-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-04-02 11:04:39 +02:00
Andrew Nicols 522f199222 MDL-61817 tinymce: Add privacy implementation for all plugins
None of the TinyMCE plugins have any user preference or database table.
They all implement the null provider.
2018-04-02 13:51:40 +08:00
Andrew Nicols 1e70bd2b95 MDL-61818 antivirus: Implement core_privacy API 2018-04-02 13:47:45 +08:00
Michael Brown 2830aca413 MDL-60115 mod_book: Book Resource Cancel Button Redirect Bug
When the user creates a book but adds no chapters, hitting cancel on
 the chapter creation page would redirect you right back to the same
 page with no explanation. This solution redirects to the course page
 when canceling chapter creation when no chapters are present.
2018-04-02 04:09:35 +00:00
AMOS bot 8995a77306 Automatically generated installer lang files 2018-04-02 00:07:17 +00:00
Huong Nguyen 97e8019261 MDL-61525 Groups: Index page error on first time visit 2018-04-01 23:01:10 +07:00
Andrew Nicols 658b689b12 MDL-61751 core_privacy: Correct test return 2018-04-01 13:35:14 +08:00
Jake Dallimore 92282f5320 MDL-61751 core_plagiarism: add polyfill for plagiarism provider 2018-04-01 13:35:14 +08:00
AMOS bot 2cfb7f823f Automatically generated installer lang files 2018-03-31 00:07:13 +00:00
Andrew Nicols 8e02d8b3df MDL-61801 core_privacy: Correct bug in unit test provider 2018-03-29 22:45:28 +08:00
Luca Bösch aa096c380d MDL-61781 installation: docs link should have https. 2018-03-29 12:12:45 +02:00
Andrew Nicols cf0e873506 MDL-61703 privacy: Allow writing of user preferences at any context 2018-03-29 15:28:45 +08:00
Jun Pataleta bdceed1023 weekly release 3.4.2+ 2018-03-29 12:55:59 +08:00
Jun Pataleta 53f8de7af4 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-03-29 12:55:58 +08:00
Marina Glancy c30595af59 MDL-61163 mod_wiki: guests should be able to view frontpage modules
When wiki is added to the frontpage and the guest role has capability to view
wiki, users should not be required to log in.
2018-03-29 11:12:30 +08:00
Marina Glancy ec5e497a35 MDL-61163 mod_wiki: add default view capability to frontpage
It is inconsistent that guests are allowed to view frontpage wiki but once user is logged in they
loose this capability
2018-03-29 11:12:30 +08:00
Marina Glancy b800501c76 MDL-61163 mod_wiki: correct capability check in modinfo
Wiki defines capability mod/wiki:viewpage instead of standard mod/wiki:view . This means that people
who do not have capability to view wiki still see it in the modules list.

Also corrected unittest that was testing situation when student has capability to create pages
but does not have capability to view pages. Such student should not see wiki module at all.
2018-03-29 11:12:30 +08:00
dinhloc e2e7f32d6c MDL-61033 quiz: Editing a quiz while a preview is open
Editing a quiz while a preview is open in another browser tab can leads to a cryptic error that is hard to recover from
2018-03-28 13:53:01 +07:00
Jake Dallimore 2cd48e09c7 Merge branch 'MDL-61770-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-28 13:36:31 +08:00
Andrew Nicols 0d2a976843 MDL-61770 iplookup: Check types rather than values 2018-03-28 10:58:51 +08:00
Shamim Rezaie bc021bf6c6 MDL-61020 media_videojs: Fix RTL display issues 2018-03-28 13:38:02 +11:00
Eloy Lafuente (stronk7) a2545bad49 Merge branch 'MDL-39060-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-03-27 13:45:42 +02:00
Ankit Agarwal 62bfa92b7a MDL-51362 libraries: Remove deprecated admin tool unittest 2018-03-27 13:37:39 +02:00
Eloy Lafuente (stronk7) 68842b56d4 Merge branch 'MDL-61321-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-03-27 12:45:11 +02:00
Eloy Lafuente (stronk7) 513ac30d0a Merge branch 'MDL-61718-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-03-27 12:40:49 +02:00
Jun Pataleta df5eac853a Merge branch 'MDL-60762-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-03-27 15:47:27 +08:00
Adam Pawełczak edec1e65d2 MDL-60762 tool_usertours: Respect $CFG->admin in manager.php 2018-03-27 15:23:19 +08:00
Jun Pataleta 1b99f0c8a1 Merge branch 'wip-MDL-61328-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-03-27 13:50:10 +08:00
Jun Pataleta 128f077b68 Merge branch 'MDL-61257-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-03-27 12:53:06 +08:00
Jun Pataleta 497d52b407 Merge branch 'MDL-61656_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-03-27 12:12:02 +08:00
Eloy Lafuente (stronk7) e58107b258 Merge branch 'MDL-61248_m34' of https://github.com/ak4t0sh/moodle into MOODLE_34_STABLE 2018-03-27 01:42:09 +02:00
Eloy Lafuente (stronk7) f0a2fb7e2f Merge branch 'MDL-61576-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-03-26 23:26:21 +02:00
Matteo Scaramuccia 1edb0f1027 MDL-59596 ddl: Support MariaDB 10.2.4+ SQL_MODE new default value. 2018-03-26 23:16:10 +02:00
Matteo Scaramuccia ad75e8bb15 MDL-59596 ddl: Added has_breaking_change_sqlmode() 2018-03-26 23:15:47 +02:00
Eloy Lafuente (stronk7) d7e920d8dd Merge branch 'MDL-61691-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-03-26 23:15:19 +02:00
Willem Roes 65f957051c MDL-61708 mod_lti: use fullname for lis_person_name_full
Fullname passed on to LTI Provider was in format 'firstname lastname' 
completely ignoring fullnamedisplay settings.
2018-03-26 12:54:52 +02:00
Andrew Nicols 6972d683ef Merge branch 'MDL-55532-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-03-26 15:36:12 +08:00
Andrew Nicols 60c03cf181 Merge branch 'MDL-61733-34' of https://github.com/MartinGauk/moodle into MOODLE_34_STABLE 2018-03-26 15:02:04 +08:00
Jake Dallimore 0786b8a1c3 MDL-61691 core_plagiarism: fix namespace in privacy provider interface 2018-03-26 12:29:59 +08:00
Mihail Geshoski da769bbc8c MDL-61257 reports: Report logs link to unavailable completion report 2018-03-26 12:24:13 +08:00
Nick Phillips 173b5ea5ac MDL-55532 gradebook: fix grade export to include category names 2018-03-26 11:50:35 +08:00
Mihail Geshoski c5c18d46dc MDL-61724 resource: Unable to view or download file resource 2018-03-26 11:20:07 +08:00
Marina Glancy 8253bba831 MDL-61328 tool_usertours: do not fix tour sortorder after step editing
otherwise it breaks when we try to modify the step sortorder
2018-03-26 09:53:11 +08:00
Zig Tan b65ae316f8 MDL-39060 backup: fix typo backup destroy() function 2018-03-26 09:27:55 +08:00
AMOS bot 31f46d8db2 Automatically generated installer lang files 2018-03-25 00:06:23 +00:00
David Mudrák 72b01c5382 MDL-61741 enrol_paypal: Prevent some edge-case false errors
While testing the plugin in various scenarios, I've noticed that there
are two situations which the current code does not handle quite well:

* Detecting for existing txn_id record was likely to throw "found more
  than one record" debugging message. Fixed by explicitly ignoring
  multiple records.
* The incoming IPN verification message does not always contain the
  recipient's email in the "business" field. When a payment has to be
  claimed manually at PayPal (e.g. as a result of currencies mismatch
  and other settings), the email is coming only in the "receiver_email"
  field. This led to PHP notice and caused the script to fail falsely.
2018-03-23 19:51:13 +01:00
David Mudrák 021be5877a MDL-61741 enrol_paypal: Fix the IPN verification endpoint URL
IPN protocol spec has different URL for sending the verification
request. Better to have it fixed even if the existing value still
seems to work - to avoid unexpected surprise in the future.

Source: https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNImplementation/#specs
2018-03-23 19:44:42 +01:00
Arnaud Trouvé 90feb75113 MDL-61248 admin: fix incorrectly initialized property 2018-03-23 16:24:18 +01:00
Martin Gauk b13a4c68ed MDL-61733 atto_table: fix creating new table
If Atto is embedded in an HTML table (e.g. in the database activity
on the template pages), you could not create a new table.
2018-03-23 09:39:18 +00:00
Eloy Lafuente (stronk7) 70937a4a20 weekly release 3.4.2+ 2018-03-22 16:57:17 +01:00
Eloy Lafuente (stronk7) 3db6e89ccc Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-03-22 16:57:15 +01:00
Jun Pataleta 285f957a5b MDL-61718 admin: Make sure city and country columns are not duplicated
* Since City/town and Country have been added in $CFG->showuseridentity
since 3.4, we need to exclude the required city and country columns
when fetching the extra columns using get_extra_user_fields().
2018-03-22 13:53:09 +08:00
Jun Pataleta 98c563e0b7 Merge branch 'MDL-61678_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-03-22 12:33:17 +08:00
Jake Dallimore 6894a65f72 Merge branch 'MDL-58179-34-fix' of https://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-22 12:06:26 +08:00
Andrew Nicols bfff12f527 MDL-58179 mod_lesson: Add missing : in labels 2018-03-22 12:01:37 +08:00
Andrew Nicols d16e97fdcc Merge branch 'MDL-61530-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-22 11:49:37 +08:00
Renaat Debleu 389a872baa MDL-61530 mod_glossary: import_entries.feature needs @_file_upload tag 2018-03-22 11:45:11 +08:00
Jun Pataleta 1127f6768d Merge branch 'MDL-52989-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-03-22 11:29:43 +08:00
Jun Pataleta f34b345910 MDL-52989 mod_lesson: Fix typo in feature description 2018-03-22 11:28:39 +08:00
Luca Bösch 17615d90d4 MDL-52989 mod_lesson: Fix cluster_jump returning a cluster page id. 2018-03-22 11:28:39 +08:00
Eloy Lafuente (stronk7) 05866360b7 Merge branch 'MDL-61658-34-allcountrycodes' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-03-21 19:37:55 +01:00
David Mudrák c3ab217820 MDL-61658 user: Fix displaying of user's country name
In these cases we want to use the method get_list_of_countries() to
obtain translated names of all potential country codes. The country code
is already there in the database. So it does not matter if the country
is among those whitelisted in $CFG->allcountrycodes - we want to see its
name anyway.
2018-03-21 18:15:20 +01:00
David Mudrák a3ef4709ae MDL-61658 user: Fix parsing of the agedigitalconsentmap setting
When parsing and validating the value of the Digital age of consent
(agedigitalconsentmap) field, we want to load all country codes. Not
just the ones whitelisted for drop down menus that users can choose
from.
2018-03-21 18:15:19 +01:00
Andrew Nicols 6966cdc45b Merge branch 'MDL-61519-34' of https://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-21 09:09:59 +08:00
Andrew Nicols 65fa7c7d15 MDL-61519 coursecat: Reset the coursecat cache on enrolment 2018-03-21 09:07:46 +08:00
Andrew Nicols 96cf945c7e Merge branch 'MDL-61519-34' of https://github.com/MartinGauk/moodle into MOODLE_34_STABLE 2018-03-21 09:07:29 +08:00
AMOS bot 47f75d41ab Automatically generated installer lang files 2018-03-21 00:06:11 +00:00
Martin Gauk bede042b12 MDL-61519 coursecat: do not cache get_all_children_ids 2018-03-20 13:13:08 +00:00
Juan Leyva b195c7dc90 MDL-61321 mod_feedback: Return all the items responses
The WS should receive all the item responses for all the attempts.
2018-03-20 10:37:14 +01:00
Andrew Davidson 2988b04705 MDL-61665 calendar: Added missing complete layout call for calendar page 2018-03-20 09:27:17 +00:00
Andrew Nicols 78928a3537 Merge branch 'MDL-61519-34' of https://github.com/MartinGauk/moodle into MOODLE_34_STABLE 2018-03-20 13:56:29 +08:00
Luca Bösch a1b9c05003 MDL-58179 lesson: Avoid using span with class "label" 2018-03-20 13:48:12 +08:00
Andrew Nicols ef86897b46 MDL-61597 calendartype: Implement the privacy API 2018-03-20 02:26:14 +01:00
Andrew Nicols 1886d9df92 MDL-61689 phpunit: Be stricter about output during unit tests
This change also add fail-on-risky to travis to help pick these up, and
verbosity too.

We only fail on risky during Travis and not during normal output because
developers may want to debug tests.
2018-03-20 08:32:27 +08:00
AMOS bot dee930150d Automatically generated installer lang files 2018-03-20 00:06:11 +00:00
AMOS bot 3267f5be8c Automatically generated installer lang files 2018-03-20 00:06:11 +00:00
Andrew Nicols 799b4a2618 Merge branch 'MDL-61265-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-03-19 10:51:58 +08:00
Andrew Nicols 794ec9478e Merge branch 'MDL-58179-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-19 10:31:40 +08:00
Andrew Nicols 86d77c31ca Merge branch 'MDL-61154_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-03-19 10:20:16 +08:00
Eloy Lafuente (stronk7) 8b66c45e9d MDL-61678 phpunit: Bump to current / latest 6.5.x before major release 2018-03-18 23:50:21 +01:00
Eloy Lafuente (stronk7) c485e42447 Moodle release 3.4.2 2018-03-17 01:18:36 +01:00
Martin Gauk 72901ac846 MDL-61519 calendar: do not iterate through all categories
Replace calls to \coursecat::get_all() or cache the results.
2018-03-16 14:28:41 +00:00
cescobedo 71aad59120 MDL-61451 message_area: core/auto_rows remove set height to 1px 2018-03-16 13:04:30 +01:00
Sara Arjona 3f476f0c5a MDL-61265 enrol: Add default numsections for external db 2018-03-16 11:33:23 +01:00
cescobedo 5499f63d46 MDL-61576 mod_lti: remove allowinstructorcustom in lib/locallib.php 2018-03-16 10:38:36 +01:00
David Monllao 973108a5c8 MDL-61154 analytics: No escaping for text format url 2018-03-16 09:27:19 +01:00
Luca Bösch 3094f53f1e MDL-58179 lesson: Avoid using span with class "label" 2018-03-16 08:48:11 +01:00
Jake Dallimore 263e505748 weekly release 3.4.1+ 2018-03-16 10:08:55 +08:00
Eloy Lafuente (stronk7) ec33505139 MDL-61656 report_security: fix role name 2018-03-16 02:26:10 +01:00
Eloy Lafuente (stronk7) cb46936de8 Merge branch 'MDL-61570-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-16 01:15:25 +01:00
Eloy Lafuente (stronk7) bc514fac18 Merge branch 'MDL-61566-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-16 00:29:48 +01:00
Andrew Nicols ea59dfbb81 MDL-61571 atto: Implement null provider for atto plugins 2018-03-15 23:49:53 +01:00
Jake Dallimore 8b1b0011f0 Merge branch 'wip-MDL-61477-34-behat' of https://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-03-15 16:44:25 +08:00
Marina Glancy e6571f9af9 MDL-61477 auth_email: behat tests for sign up 2018-03-15 16:22:57 +08:00
Jake Dallimore dea705b6b1 Merge branch 'wip-MDL-61477-34-manager' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-03-15 11:38:45 +08:00
Marina Glancy aef659d1e2 MDL-61477 admin: sitepolicy handler API
- Define sitepolicy handler manager class, base class and the core handler
- Allow to set a plugin as sitepolicyhandler that implements the sitepolicy API
- Modify web services to return information from the 3rd party handler instead of core if needed
2018-03-15 11:32:13 +08:00
David Mudrák 94e7b022c7 MDL-61477 admin: Allow plugins to act as alternate policy handlers
The patch introduces a new site setting 'sitepolicyhandler' that can be
either empty or contain a plugin component name. If it is empty, the
site policy feature keeps working as before and the core keeps the
control over it.

If a plugin is specified, it is expected to implement the callback
'site_policy_handler' in its lib.php file. The callback should return a
URL to a script where the user can accept the site policies. The plugin
itself is responsible for setting the 'policyagreed' flag in the users
table. The callback may return an empty value, in which case the user
can continue using the site without being redirected.

The patch adds support for a new pre-config flag NO_SITEPOLICY_CHECK.
This constant should be defined and set to true if we should not check
the user's policyagreed status during the require_login().

This is for pages where the user actually accepts the site policies and
helps to avoid the redirect loop.
2018-03-15 09:30:59 +08:00
Eloy Lafuente (stronk7) 98e4385879 Merge branch 'MDL-61600-34' of git://github.com/dpalou/moodle into MOODLE_34_STABLE 2018-03-14 14:43:38 +01:00
Eloy Lafuente (stronk7) 81eec779d9 Merge branch 'MDL-61620_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-03-14 13:38:50 +01:00
David Monllao 735da2261b MDL-61620 output: New action_menu options 2018-03-14 11:38:25 +01:00
Eloy Lafuente (stronk7) ad3fe959fd Merge branch 'MDL-61398-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-14 11:22:25 +01:00
Eloy Lafuente (stronk7) 66af90fde4 Merge branch 'MDL-61475-34-v3' of git://github.com/snake/moodle into MOODLE_34_STABLE 2018-03-14 11:01:07 +01:00
Dani Palou d9aa39baad MDL-61600 recaptcha: Create a script to display recaptcha 2018-03-14 10:33:52 +01:00
Andrew Nicols c71654fd2c Merge branch 'MDL-60398-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-03-14 10:33:44 +08:00
Jake Dallimore 8f72459f1a Merge branch 'MDL-61307-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-14 09:43:50 +08:00
Jake Dallimore 89985f5c5b MDL-61475 mod_choice: perf improvement when exporting personal data
Instead of creating an array containing all record information and then
writing, we know write periodically during the recordset iteration, thus
alleviating any memory concerns associated with the array approach.
2018-03-14 09:37:14 +08:00
Jake Dallimore 4d07ed6b17 MDL-61475 mod_choice: Update core_privacy implementation 2018-03-14 09:37:14 +08:00
Jun Pataleta 42c3218b2c MDL-61475 mod_choice: Add implementation of Privacy API 2018-03-14 09:37:14 +08:00
Andrew Nicols 1706ca6140 MDL-61398 block_html: Implement privacy API 2018-03-14 09:33:16 +08:00
Andrew Nicols 06ae551f04 MDL-61307 core_privacy: Add unit test to check installed providers 2018-03-14 09:32:28 +08:00
David Mudrák c22ea810ee MDL-61392 enrol_paypal: Improve IPN input parameters checking 2018-03-14 09:11:36 +08:00
David Mudrák 0167ce3ded MDL-61392 enrol_paypal: Improve the IPN notifications handling
* Notify administrators once incoming IPN request is verified by PayPal.
* Fix the HTTP status as expected by the IPN protocol.
2018-03-14 09:11:36 +08:00
Eloy Lafuente (stronk7) c6f4528a7f Merge branch 'MDL-61625_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-03-14 00:59:53 +01:00
David Mudrák b3016e0e1b MDL-60101 auth_oauth2: Don't allow suspended users to SSO in via OAuth2
Without this patch, users could still log in as a suspended account via
OAuth2 SSO feature.
2018-03-13 09:13:50 +01:00
Jake Dallimore 7286f62c01 Merge branch 'm34_MDL-61626_PgSQL_Table_Name_Could_Be_Schema_Qualified' of https://github.com/scara/moodle into MOODLE_34_STABLE 2018-03-13 15:37:43 +08:00
Andrew Nicols 50dcf3bdae Merge branch 'MDL-60828-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-03-13 15:29:13 +08:00
Andrew Nicols e8dae4203d Merge branch 'MDL-59070-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-13 13:23:10 +08:00
Andrew Nicols 30279d16dd Merge branch 'MDL-61397-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-03-13 12:36:37 +08:00
Andrew Nicols 8088ae2b3c Merge branch 'MDL-61567-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-03-13 12:21:00 +08:00
Zig Tan 362a7ed6fe MDL-61567 mod_url: Implement null provider mod_url 2018-03-13 11:14:12 +08:00
Zig Tan 2298b97814 MDL-61567 mod_resource: Implement null provider mod_resource 2018-03-13 11:14:12 +08:00
Zig Tan f2289ba9a2 MDL-61567 mod_page: Implement null provider mod_page 2018-03-13 11:14:12 +08:00
Zig Tan 731f9bd3f2 MDL-61567 mod_label: Implement null provider mod_label 2018-03-13 11:14:12 +08:00
Zig Tan 804e7a6142 MDL-61567 mod_folder: Implement null provider mod_folder 2018-03-13 11:14:12 +08:00
Eloy Lafuente (stronk7) c1bb75a533 Merge branch 'MDL-61307-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-13 03:27:41 +01:00
Zig Tan e319a383dc MDL-61397 blocks: Fix null_provider namespace for blocks 2018-03-13 09:59:21 +08:00
Andrew Nicols 72999a7eb9 MDL-61307 core: Language changes 2018-03-13 09:42:21 +08:00
Andrew Nicols cd505acf19 MDL-61307 privacy: Rename deletion functions 2018-03-13 08:49:03 +08:00
Andrew Nicols cf9ef3275d MDL-61307 core: Remove deletion_criteria 2018-03-13 08:48:59 +08:00
Eloy Lafuente (stronk7) 11e2c441cd Merge branch 'MDL-48501-mdl34' of git://github.com/jswebster/moodle into MOODLE_34_STABLE 2018-03-12 23:50:35 +01:00
Matteo Scaramuccia c499b15fe0 MDL-61626 core_dml: pgsql and schema qualification. 2018-03-12 22:51:38 +01:00
Eloy Lafuente (stronk7) 21f2c3435b Merge branch 'wip-MDL-60241-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-03-12 18:28:50 +01:00
Eloy Lafuente (stronk7) 61305a7684 Merge branch 'MDL-61397-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-12 17:31:27 +01:00
Eloy Lafuente (stronk7) 85eec82bc7 Merge branch 'MDL-61622-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-03-12 11:36:36 +01:00
David Monllao 841d54bc4a MDL-61625 persistent form: Add missing param to the constructor 2018-03-12 08:10:02 +01:00
Andrew Nicols e842b68d67 Merge branch 'MDL-61365-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-03-12 13:44:56 +08:00
Andrew Nicols 0fbe9dfb95 MDL-61570 tool_usertours: Implement Privacy API 2018-03-12 13:34:35 +08:00
Andrew Nicols 6f8ea0e2ea MDL-61566 theme: Add Privacy providers for all core themes 2018-03-12 13:26:06 +08:00
Andrew Nicols 63a54665f2 Merge branch 'MDL-61513-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-03-12 12:26:28 +08:00
Andrew Nicols 69b0484c6b Merge branch 'MDL-61498-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-12 12:07:49 +08:00
Andrew Nicols bcc0d0e9eb Merge branch 'MDL-61261-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-03-12 11:52:00 +08:00
Zig Tan 80d7a98d84 MDL-61397 blocks: Add null_providers for blocks with no user data 2018-03-12 08:44:19 +08:00
Juan Leyva 19ff10cf06 MDL-61622 auth: New WS is_age_digital_consent_verification_enabled 2018-03-09 18:07:30 +01:00
Sara Arjona 71a1d2bd85 MDL-60828 user: Reset current page when filtering/searching users
Added baseurl parameter to core_user\output\unified_filter to let specify
different URL, instead of using always $PAGE->url.
2018-03-09 08:36:39 +01:00
Jake Dallimore 3dacb31271 Merge branch 'MDL-61307-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-09 13:36:55 +08:00
Andrew Nicols 15a4560637 MDL-61307 core_plagiarism: Add implementation of Privacy API 2018-03-09 12:25:11 +08:00
Adrian Greeve 6010b427b4 MDL-61307 core_comment: Add implementation of privacy API 2018-03-09 12:25:10 +08:00
Andrew Nicols c0ca1a22bf MDL-61307 core_rating: Add implementation of Privacy API 2018-03-09 12:25:10 +08:00
Zig Tan e143bae8ea MDL-61307 core_tag: Unit tests for privacy implementation 2018-03-09 12:25:10 +08:00
Andrew Nicols 51da83291b MDL-61307 core_tag: Add implementation of privacy API 2018-03-09 12:25:10 +08:00
Andrew Nicols def77d7882 MDL-61307 core_privacy: Implementation of itself 2018-03-09 12:25:10 +08:00
Andrew Nicols 3f1cc42f4b MDL-61307 core_privacy: Add legacy polyfill for contrib plugins
This legacy polyfill allows plugin developers who release a single
branch to work with multiple versions of Moodle to support the API in
both Moodle 3.3 with PHP 5.6, and later versions.
2018-03-09 12:25:09 +08:00
Jake Dallimore 164034c4ec MDL-61307 core_privacy: Add the privacy manager 2018-03-09 12:25:09 +08:00
Andrew Nicols 289fe1ef76 MDL-61307 core_privacy: Define and test providers 2018-03-09 12:25:09 +08:00
Andrew Nicols 1d58d59c86 MDL-61307 core: Add component_class_callback functionality 2018-03-09 12:25:09 +08:00
Andrew Nicols 24125dd102 MDL-61307 core: Define a new privacy component 2018-03-09 12:25:08 +08:00
Marina Glancy 1263887287 MDL-60241 course: General section always visible (topics, weeks) 2018-03-09 12:08:52 +08:00
Jeff Webster a8d1cc6598 MDL-48501 auth/email: update external class to use reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster d0c9577d6c MDL-48501 mod_feedback: update feedback to use reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster 17e1f9a22d MDL-48501 login: update signup_form to use reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster b526202a35 MDL-48501 form/recaptcha: update to use reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster 3ff16f4ed9 MDL-48501 recaptchalib_v2: add new lib to support reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster 1fca1d68b5 MDL-48501 lang: update reCAPTCHA language strings 2018-03-08 14:48:08 -05:00
Luca Bösch 86a1fa9984 MDL-59070 enrol_database: Take enablecompletion from template 2018-03-08 17:23:45 +01:00
Luca Bösch 1840aa4cb1 MDL-61498 lesson: link to next activity in boost 2018-03-08 17:23:19 +01:00
Eloy Lafuente (stronk7) f4e99c54bb weekly release 3.4.1+ 2018-03-08 13:29:17 +01:00
Eloy Lafuente (stronk7) 1c6506769a NOBUG: Fixed SVG browser compatibility 2018-03-08 13:29:15 +01:00
Eloy Lafuente (stronk7) d13fa3fb6d Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-03-08 13:29:14 +01:00
Andrew Nicols 6418439f08 Merge branch 'MDL-61423-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-03-08 15:27:32 +08:00
Mihail Geshoski 1ae5e63101 MDL-61423 authentication: Add digital minor verification upon signup 2018-03-08 15:02:16 +08:00
Eloy Lafuente (stronk7) 70902e0f9c Merge branch 'MDL-60445-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-07 19:20:10 +01:00
Jesse Ritchey b005459b1e MDL-60445 theme_boost: remove fieldset tag 2018-03-07 11:09:12 +01:00
Andrew Nicols 74653366f3 Merge branch 'WIP-MDL-60658-34' of https://github.com/chkhanu/moodle into MOODLE_34_STABLE 2018-03-07 11:37:37 +08:00
Andrew Nicols e0008d0ae3 Merge branch 'wip-MDL-61322-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-03-07 10:57:46 +08:00
Andrew Nicols 7d0f502483 Merge branch 'MDL-61497-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-07 10:27:39 +08:00
AMOS bot 0301d8bd62 Automatically generated installer lang files 2018-03-07 00:06:26 +00:00
Eloy Lafuente (stronk7) ed154400cd Merge branch 'MDL-61312-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-03-07 00:49:41 +01:00
Eloy Lafuente (stronk7) 21f3353471 Merge branch 'MDL-36157-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-06 02:49:12 +01:00
Luca Bösch 3b1041475e MDL-36157 block_rss_client: Don't double escape titles. 2018-03-06 00:20:40 +01:00
Luca Bösch 3e74f4c3ce MDL-36157 block_rss_client: Don't double escape titles. 2018-03-06 00:20:40 +01:00
Eloy Lafuente (stronk7) 0af73bec89 Merge branch 'MDL-61211-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-03-05 23:33:25 +01:00
Eloy Lafuente (stronk7) 059ac53abb Merge branch 'MDL-55153-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-03-05 23:26:03 +01:00
Eloy Lafuente (stronk7) d968714802 Merge branch 'MDL-61549-34' of git://github.com/Dagefoerde/moodle into MOODLE_34_STABLE 2018-03-05 23:22:55 +01:00
Andrew Nicols ff74536adb MDL-61268 core: Fix empty string DB cehck
(amended by stronk7 to use the helper better)
2018-03-02 16:32:19 +01:00
Andrew Nicols 8221c18d51 Merge branch 'wip-MDL-61268-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-03-02 10:03:28 +08:00
Andrew Nicols a40d205eb5 Merge branch 'MDL-61196_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-03-02 09:34:46 +08:00
Adrian Greeve ec72828d18 MDL-61268 blocks: Unit tests for deprecated object update.
Unit tests for testing that the upgrade functions to change
the now deprecated object to stdClass works.
2018-03-02 09:28:05 +08:00
Adrian Greeve e8e497f4d4 MDL-61268 blocks: Fix corrupt configdata in block instances.
Old configuration data in the block instances is base64 encoded with
the deprecated object class instead of stdClass.
2018-03-02 09:27:10 +08:00
Eloy Lafuente (stronk7) 6b1a68d2b5 Merge branch 'MDL-61533-34-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-03-02 01:42:56 +01:00
Helen Foster 8756f250eb MDL-61533 lang: Merge English strings from the en_fix language pack
Significant string change:

* typeoflogin_desc,tool_mobile - removing sentence about autologinguests
2018-03-01 15:29:43 +01:00
Luca Bösch 52902fb436 MDL-61497 repository_onedrive: Use post 2015 icon 2018-03-01 08:58:21 +01:00
Chernyavskiy Leonid 24112d09b9 MDL-60658 course, gradebook: fix missing unformat_float for gradepass
Fix incorrect comparison of gradepass variable (with comma as decimal separator)
with grade variable when trying to save assignment settings.
Adds missing unformat_float($data['gradepass']).
2018-03-01 09:27:29 +07:00
Mihail Geshoski e1a1f5652f MDL-61211 lesson: Error when answer or response contains break tag 2018-03-01 09:51:44 +08:00
Andrew Nicols 413d6b046b Merge branch 'MDL-61453-34-userpicturefiletype' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-03-01 08:46:20 +08:00
Eloy Lafuente (stronk7) fa19d59444 weekly release 3.4.1+ 2018-02-28 12:58:23 +01:00
Jan Dageförde 6bfebfc7b8 MDL-61549 user: Remove $already columns because none were loaded yet 2018-02-27 14:47:59 +01:00
Jake Dallimore 6f7a1abba4 Merge branch 'wip-MDL-61485-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-02-27 09:39:51 +08:00
Jake Dallimore f3e2bf2b7c Merge branch 'MDL-61480-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-27 09:05:21 +08:00
Eloy Lafuente (stronk7) 1c3887d692 Merge branch 'MDL-61249-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-02-26 23:10:32 +01:00
Mihail Geshoski 40df9d3653 MDL-60398 resource: Unable to download folder resource 2018-02-26 16:52:23 +08:00
Andrew Nicols 85270722f5 MDL-61480 core: Check plugin installed before returning 2018-02-26 12:11:54 +08:00
Andrew Nicols 5cff9f0e9a Merge branch 'MDL-60547-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-02-26 10:27:29 +08:00
Andrew Nicols bdf49f89f5 Merge branch 'MDL-61462-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-26 10:16:09 +08:00
Sara Arjona 59f3aac4ac MDL-61249 enrol_manual: Fix end date calculation
This patch has been given by Bruno Malaval.
2018-02-23 08:21:05 +01:00
Jake Dallimore 1126aaf1a2 weekly release 3.4.1+ 2018-02-23 11:51:37 +08:00
Jake Dallimore ceb90e7131 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-02-23 11:51:36 +08:00
Marina Glancy 93244439b5 MDL-61522 mod_glossary: use full url in links 2018-02-23 10:56:32 +08:00
Jun Pataleta 3191a94345 MDL-61513 admin: Fix undefined $buttons variable 2018-02-22 10:22:49 +08:00
Eloy Lafuente (stronk7) e45feac1ad Merge branch 'MDL-61324_lti_sync_34' of git://github.com/davosmith/moodle into MOODLE_34_STABLE 2018-02-22 08:31:30 +08:00
Dan Marsden 5e35fa16d5 MDL-61005 core_cohort: Allow teachers to view site-wide cohorts 2018-02-22 08:31:29 +08:00
Luca Bösch 08b3b1b449 MDL-58845 mod_choice: Fix behat related tests 2018-02-22 08:31:29 +08:00
Andrew Nicols 1af36b5ffd Merge branch 'MDL-61421-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-02-22 08:31:28 +08:00
Andrew Nicols 058ba89dab Merge branch 'MDL-61408-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-22 08:31:27 +08:00
Carlos 16e0ea970e MDL-60547 message_popup: adding preventDefault at notification popover 2018-02-21 23:36:03 +01:00
Sara Arjona fa5e817df9 MDL-55153 customlang: Remove local DB entries when deleting local file 2018-02-21 21:03:11 +01:00
Mihail Geshoski ac424c9bb6 MDL-61485 authentication: Add callback 'pre_signup_requests' 2018-02-20 10:01:50 +08:00
AMOS bot b7eab5a554 Automatically generated installer lang files 2018-02-20 00:06:25 +00:00
Eloy Lafuente (stronk7) a6a174d817 Merge branch 'MDL-58845-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-19 02:12:48 +01:00
Andrew Nicols d0064b9d05 Merge branch 'MDL-61289-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-19 09:06:54 +08:00
Jun Pataleta cf32b66e19 MDL-61289 mod_choice: Add extra user fields to response data 2018-02-19 08:54:50 +08:00
AMOS bot c56217eee1 Automatically generated installer lang files 2018-02-19 00:06:23 +00:00
AMOS bot 29570a7a84 Automatically generated installer lang files 2018-02-17 00:06:25 +00:00
Luca Bösch b0199478df MDL-61408 qbehaviour: Correct "Check" button styling. 2018-02-16 08:45:09 +01:00
Luca Bösch 5b1cfc900d MDL-58845 mod_choice: In reports, respect "Show column for unanswered" 2018-02-16 08:45:02 +01:00
Jun Pataleta 02804d1cec MDL-61462 admin_roles: Point back to roles link to the correct URL 2018-02-16 10:33:37 +08:00
Marina Glancy 004e5f9c66 MDL-56635 tags: use recordset since component may not be unique 2018-02-16 09:51:33 +08:00
Eloy Lafuente (stronk7) 4ce48de8d6 weekly release 3.4.1+ 2018-02-15 17:10:32 +01:00
David Mudrák 32324be121 MDL-61453 user: Fix accepted file type when uploading user pictures
Not all archives are supported, only ZIP files are.
2018-02-14 18:08:10 +01:00
Andrew Nicols 80528b181a Merge branch 'wip-34-MDL-61344' of https://github.com/ndunand/moodle into MOODLE_34_STABLE 2018-02-13 09:04:27 +08:00
Andrew Nicols e037ee80fb Merge branch 'MDL-61150_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-02-13 09:02:31 +08:00
David Monllao fc649d6700 Merge branch 'MDL-61236-34' of git://github.com/farhan6318/moodle into MOODLE_34_STABLE 2018-02-12 12:14:23 +01:00
Nicolas Dunand 96baa3d320 MDL-61344 mod_assign: Show additional files when adding submission 2018-02-12 11:16:49 +01:00
David Monllao eadb6a737e Merge branch 'MDL-61153-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-02-12 10:56:01 +01:00
David Monllao 9a88b86217 Merge branch 'MDL-61375_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-02-12 09:40:56 +01:00
Nick Phillips 77c2211b75 MDL-56688 grade: fix ordering of grade items in grade_seq::flatten 2018-02-12 09:35:11 +01:00
Davo Smith e2bb36513f MDL-61324 enrol_lti: fix detection of changed grades during sync 2018-02-12 08:24:59 +00:00
David Monllao 664308286c Merge branch 'mod-lti-fix-test-with-hardcoded-url-mdl34' of https://github.com/peikk0/moodle into MOODLE_34_STABLE 2018-02-12 09:20:56 +01:00
David Monllao 8553738434 Merge branch 'MDL-61425-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-02-12 09:13:13 +01:00
Sara Arjona 7a414b0522 MDL-61421 cohort: Fix cohort_role_sync when a user is in two cohorts 2018-02-12 08:57:55 +01:00
Andrew Nicols ba27a4f741 Merge branch 'MDL-61366_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-02-12 15:26:16 +08:00
Ryan Wyllie 18ea34c2a5 MDL-60958 calendar: fix test helper action factory 2018-02-12 13:52:19 +08:00
Andrew Nicols db75447658 Merge branch 'MDL-60958-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2018-02-12 13:35:03 +08:00
Ryan Wyllie f594f67868 MDL-60958 calendar: stop db query in repeat collection constructor
Stop loading the parent record in the constructor because it is an
unnecessary DB query for each event instantiation.

Return null on get_repeats() for events that don't have repeats.
2018-02-12 05:31:41 +00:00
Shamim Rezaie 77786dec80 MDL-61425 theme_boost: Made question labels width full in question bank 2018-02-12 14:54:44 +11:00
Andrew Nicols 01dc5c1a45 Merge branch 'MDL-61305-34-fix' of https://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-12 11:31:43 +08:00
Andrew Nicols 45202e1154 MDL-61305 modinfo: Add back missing require for course 2018-02-12 10:38:33 +08:00
Andrew Nicols 8c12581e12 Merge branch 'MDL-61305-m34' of https://github.com/sammarshallou/moodle into MOODLE_34_STABLE 2018-02-12 09:07:45 +08:00
Pierre Guinoiseau 6bbba0d921 MDL-61379 mod_lti: fix a test comparing a hardcoded URL from fixtures
The hardcoded URL from tests/fixtures/ims_cartridge_basic_lti_link.xml
didn't match if TEST_EXTERNAL_FILES_HTTPS_URL was defined, the test
needs to compare with the exact same URL instead of a generated one.
2018-02-12 13:46:11 +13:00
Andrew Nicols 0d3166adb5 Merge branch 'MDL-61413_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-02-12 08:08:38 +08:00
Marina Glancy 5a43147f56 MDL-61150 xmldb: correct path to schema in install.xml 2018-02-11 23:07:48 +01:00
Eloy Lafuente (stronk7) 3e3c2994be MDL-61150 xmldb: Fix wrong PATH attributes in core 2018-02-11 23:07:48 +01:00
Farhan Karmali 4448ddc159 MDL-61236 enrol: Course welcome message to be sent from correct contact 2018-02-11 20:49:56 +05:30
Eloy Lafuente (stronk7) d293116fda MDL-61413 mod_lti: Use sql_compare_text() for comparing TEXTs 2018-02-11 02:17:52 +01:00
Mark Nelson 2f2d7e6358 MDL-61196 message_popup: clean params before returning via WS 2018-02-09 17:37:16 +08:00
Mark Nelson db6cff3f7a MDL-61375 mod_chat: specify the 'eventtype' to avoid duplicate rows 2018-02-09 14:47:02 +08:00
sam marshall 283f265fbe MDL-61305 Performance: Modinfo cache can get built in parallel
In a busy site it is possible that one user will access the site
while another is building modinfo cache. This can result in the
cache being built several times at once, potentially causing a
performance issue.
2018-02-08 14:49:10 +00:00
David Monllao 091b2fad14 weekly release 3.4.1+ 2018-02-08 09:29:16 +01:00
Sara Arjona aba9cc490d MDL-61365 group: Fix default filter when group mode is visible 2018-02-07 18:10:34 +01:00
Andrew Nicols 9cb9c85728 Merge branch 'MDL-61377-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-02-07 12:52:42 +08:00
Shamim Rezaie 7edc187fb7 MDL-61377 Core: Fixed faulty warning when using progress_bar 2018-02-07 14:49:00 +11:00
Eloy Lafuente (stronk7) 3b35ab9fd5 MDL-52832 quiz: sql fixing couple of incorrect group by uses 2018-02-07 07:09:15 +08:00
Tim Hunt 5678028de7 MDL-61366 setuplib: safely construct the ajax renderer when needed 2018-02-06 12:13:02 +00:00
David Monllao 100e9f3d12 Merge branch 'MDL-52832-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-06 12:20:04 +01:00
Dan Marsden 5bcc32e756 MDL-60421 tool_cohortroles: fix deprecated call. 2018-02-06 10:51:44 +01:00
Eloy Lafuente (stronk7) 202affd1a2 Merge branch 'MDL-61168-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-05 20:40:26 +01:00
Eloy Lafuente (stronk7) ab72dbee64 Merge branch 'MDL-61341-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-05 20:08:20 +01:00
David Monllao 496a40a49b Merge branch 'MDL-61027-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-02-05 11:56:28 +01:00
David Monllao 1a24b6b2d7 Merge branch 'MDL-61251-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-05 11:50:48 +01:00
David Monllao 38f9a7b1c8 Merge branch 'MDL-42764_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-02-05 11:18:46 +01:00
Andrew Nicols ab121de9de Merge branch 'MDL-61269_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-02-05 17:30:32 +08:00
Andrew Nicols 429ea1545c Merge branch 'MDL-51189-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-02-05 15:52:28 +08:00
Eloy Lafuente (stronk7) 9c397f9f63 MDL-61269 composer: better license GPL-3.0-or-later
Source: https://spdx.org/licenses/
2018-02-04 19:40:02 +01:00
Sara Arjona 85fea314bb MDL-61261 badges: Add email validation during backpack configuration 2018-02-02 11:35:28 +01:00
Andrew Nicols 58f7ad98d7 MDL-61341 theme_boost: Fix usertour zindex calculations 2018-02-02 11:31:55 +08:00
Andrew Nicols 422889d0eb MDL-61341 theme_boost: Modify variables used for calculations
Variables must be of the same type for Math to take place. We cannot
mix REM and EM because they have different relative roots.
2018-02-02 11:31:54 +08:00
Jun Pataleta bb279dc22e MDL-61168 mod_assign: Truncate only the online text submission 2018-02-02 09:21:53 +08:00
Luca Bösch 507ab4cf6b MDL-61251 admin: configenablerssfeedsdisabled2 string more correct. 2018-02-01 22:57:34 +01:00
Luca Bösch 36877227fb MDL-52832 quiz: timeclose in activities block looks after overrides. 2018-02-01 22:52:13 +01:00
David Monllao b08db1daa2 weekly release 3.4.1+ 2018-02-01 14:26:45 +01:00
David Monllao 65970afe4e Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-02-01 14:26:44 +01:00
Jake Dallimore 9cb1ac35c2 Merge branch 'MDL-60077-34-fix' of https://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-01 14:56:11 +08:00
Andrew Nicols 9089f50463 MDL-60077 tool_usertours: Pull v0.12.2 of usertours for triangle fix 2018-02-01 14:28:54 +08:00
David Mudrák 4d3651a151 MDL-61242 repository_equella: Fix missing class repository
The call to the class 'repository' introduced in the commit d05c2ac7cc
didn't fully work and threw: "Exception - Class 'repository' not found".
This fixes the missing library inclusion.
2018-02-01 10:34:00 +08:00
Eloy Lafuente (stronk7) d977e539d5 Merge branch 'MDL-61058-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:59 +08:00
Eloy Lafuente (stronk7) 2b89024ea2 Merge branch 'MDL-61023-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:59 +08:00
Andrew Nicols a9bb5dbe8d Merge branch 'MDL-61313_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-02-01 10:33:59 +08:00
Eloy Lafuente (stronk7) 8aa07c75a1 Merge branch 'MDL-44612-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:58 +08:00
Eloy Lafuente (stronk7) ed21686174 Merge branch 'MDL-61281_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-02-01 10:33:58 +08:00
David Monllao 60af40cbfd Merge branch 'MDL-60646-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:58 +08:00
David Monllao 17fed89644 Merge branch 'MDL-60997-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:57 +08:00
David Monllao 350e280741 Merge branch 'MDL-61152-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:57 +08:00
David Monllao a9c01e8c52 Merge branch 'MDL-61260_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-02-01 10:33:57 +08:00
Jake Dallimore e44cedd104 Merge branch 'MDL-61253-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-01 10:33:56 +08:00
Andrew Nicols 82f5d60aa6 Merge branch 'MDL-60077-34' of https://github.com/HuongNV13/moodle into MOODLE_34_STABLE 2018-02-01 10:33:56 +08:00
Andrew Nicols c5910cb7dc Merge branch 'MDL-61250-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-01 10:33:56 +08:00
Adrian Greeve 9dd8490aa6 MDL-61322 reports: Reformated the display date to include the year. 2018-02-01 08:28:35 +08:00
AMOS bot 3486243420 Automatically generated installer lang files 2018-02-01 00:06:45 +00:00
AMOS bot 79e685233f Automatically generated installer lang files 2018-01-31 00:06:34 +00:00
David Monllao 38c0a5d05f MDL-61313 behat: Move future events further 2018-01-30 18:17:24 +01:00
Juan Leyva 444b165c09 MDL-61312 completion: Return completion for teachers via WS
core_completion_get_activities_completion_status was not returning
completion information for users with the teacher role only (when it
wasn’t a role allowed to track completion).
2018-01-30 12:20:16 +01:00
AMOS bot 060b55064f Automatically generated installer lang files 2018-01-30 00:06:37 +00:00
AMOS bot 05818d70eb Automatically generated installer lang files 2018-01-30 00:06:36 +00:00
Mark Nelson 4c86ca6666 MDL-42764 core: added missing string definition
Also changed the string index so it was not
vague. The index 'emailempty' appears as if it
could belong to a validation method for a form.
2018-01-29 19:08:22 +08:00
Huong Nguyen 718235f569 MDL-60077 User tours: pop-up triangle look bad next to the corners 2018-01-29 10:33:08 +07:00
Mark Nelson 8dcd8b8132 MDL-61260 auth_ldap: require /user/profile/lib.php file 2018-01-29 11:31:24 +08:00
Eloy Lafuente (stronk7) eed3f1a83d Merge branch 'wip-MDL-61242-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-01-29 01:41:14 +01:00
Andrew Nicols 95fab37f66 Merge branch 'MDL-58410_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-29 08:19:57 +08:00
Eloy Lafuente (stronk7) 3c7eb5f50c Merge branch 'MDL-61218-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-01-29 00:06:15 +01:00
David Monllao 512f9e294f MDL-61281 search_solr: PHP 7.2 compatible counts 2018-01-28 19:00:45 +01:00
Luca Bösch 831b569c5f MDL-61250 questions: Omit leading space in question preview link 2018-01-25 14:25:29 +01:00
Jun Pataleta 34f90c2bdd MDL-60997 core_message: Add replytoname in unit test 2018-01-25 16:48:01 +08:00
Arnaud Trouvé fa72c683bd MDL-60997 messages: add property replytoname 2018-01-25 16:48:00 +08:00
Andrew Nicols 3f8287efe3 weekly release 3.4.1+ 2018-01-25 15:14:41 +08:00
Andrew Nicols 4a086154fa Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-01-25 15:14:38 +08:00
Jake Dallimore 75ba3e39d5 Merge branch 'MDL-60078-34-fix' of https://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-25 14:48:47 +08:00
Andrew Nicols 2b9d5423de MDL-60078 tool_usertours: Adjust accessibility checks for all themes 2018-01-25 12:46:29 +08:00
Eloy Lafuente (stronk7) 5e8961ebe0 MDL-61269 behat-extension: bump to fix some caps & defaults 2018-01-24 22:27:14 +01:00
Jun Pataleta 8737636d72 MDL-44612 mod_glossary: Test importing of glossary entries
* And check that the importing of entries is reflected in the recent
activity block.
2018-01-24 16:39:33 +08:00
Jun Pataleta c9950e69a2 MDL-44612 mod_forum: Confirm forum post listing in recent activity block 2018-01-24 16:39:33 +08:00
Damyon Wiese 0f9cf691a8 MDL-61023 behat: Automate MDLQA-8158
Verify the general section does not appear in the navigation when it is empty.
2018-01-24 16:38:35 +08:00
Damyon Wiese e5e71433c4 MDL-61058 behat: Automate MDLQA-8146
Verify that the keyholder is displayed on the self enrolment page.
2018-01-24 16:36:55 +08:00
Igor Sazonov 3b2e74d33e MDL-58410 user: add support for alternative name search
The solution about searching all external names fields (middlename etc) from course enrolment page (enrolled and enrolling pages)
2018-01-24 11:16:15 +08:00
Andrew Nicols d0d8b19dab MDL-61234 tool_usertours: Rewrite feature to work with all themes 2018-01-24 03:15:41 +01:00
Simey Lameze c4b5d16556 MDL-61218 lib: set chart border color to white 2018-01-23 12:06:00 +08:00
Andrew Nicols 04881b93f1 MDL-61253 repository: Add referenced files to archives 2018-01-23 11:51:55 +08:00
Jun Pataleta 89d0471764 MDL-61152 calendar: Remove usage of undefined variable 2018-01-23 10:50:55 +08:00
Eloy Lafuente (stronk7) 679f5d18ff Merge branch 'MDL-60814_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-23 01:55:21 +01:00
Shamim Rezaie 6aa7833c71 MDL-51189 Quiz: Edit overrides when quiz is not available to students
The $active variable should simply be used to dim the text, nothing more.
2018-01-23 10:53:50 +11:00
Eloy Lafuente (stronk7) df4a6bbcc2 Merge branch 'MDL-60918-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2018-01-22 20:17:33 +01:00
Eloy Lafuente (stronk7) 6c375449df Merge branch 'MDL-58006-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-01-22 20:00:10 +01:00
Eloy Lafuente (stronk7) 0555022bc2 Merge branch 'MDL-60812-34' of https://github.com/mwehr/moodle into MOODLE_34_STABLE 2018-01-22 16:33:18 +01:00
Eloy Lafuente (stronk7) 6d05b0db52 Merge branch 'MDL-60181-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-01-22 12:51:29 +01:00
Shamim Rezaie ca40c1f4ee MDL-61027 calendar: Fix datetime profile field issue with non-Gregorian 2018-01-22 19:06:19 +11:00
Mihail Geshoski 1bd8a0a2aa MDL-60181 glossary: Glossary rating is displayed wrongly 2018-01-22 13:58:02 +08:00
Andrew Nicols e4fac0f267 Merge branch 'MDL-61240_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-01-22 11:39:33 +08:00
Zig Tan 8be3607c28 MDL-58006 assign: Reset blindmarking assignments to hidden
Fix to reset blindmarking assigments to hidden as part of Course reset with behat test
2018-01-22 11:37:18 +08:00
Andrew Nicols ac7aae0dd2 MDL-60078 behat: Convert ErrorException to DriverException 2018-01-22 11:29:59 +08:00
Andrew Nicols ab4d19f260 Merge branch 'MDL-60078-34' of https://github.com/nashtechdev01/moodle into MOODLE_34_STABLE 2018-01-22 11:29:55 +08:00
Eloy Lafuente (stronk7) f18f4c297d Merge branch 'MDL-61077_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-01-22 02:26:11 +01:00
Eloy Lafuente (stronk7) ee121e7fc3 Merge branch 'MDL-61234-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-22 02:03:40 +01:00
Eloy Lafuente (stronk7) e82f7b14b8 Merge branch 'wip-MDL-61175-MOODLE_34_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_34_STABLE 2018-01-22 01:24:52 +01:00
Eloy Lafuente (stronk7) 3ed13a332c Merge branch 'MDL-61224_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-22 01:23:17 +01:00
Adrian Greeve 780fe61954 MDL-61242 repository_equella: Add source key when sending the source.
A thank you to Nelson Cheng for find this issue and suggesting a patch.
2018-01-20 11:01:09 +08:00
Andrew Nicols a588c0f85b MDL-61234 tool_usertours: Wrap library calls in pendingjs 2018-01-19 15:55:24 +08:00
AMOS bot b5e4c94307 Automatically generated installer lang files 2018-01-19 00:07:00 +00:00
Eloy Lafuente (stronk7) 4f5d1c5cbf MDL-61240 dml: php72 compatibility, avoid counting on non-countables
This was not detected earlier because we have been unable to
run sqlsrv + php72 till now (not available).
2018-01-19 01:01:36 +01:00
Kevin Wiliarty a19ee0e707 MDL-61175 mod_assign: roll grade-by reminder on restore 2018-01-18 08:39:49 -05:00
Jun Pataleta f5bb389882 MDL-60646 user_portfolio: Fix action icons in Show / hide column
* Refactor the code to make it look cleaner and easier to read.
* Fixed incorrect alt-text for the configure icon.
* Fixed missing alt-text for show/hide icon.
2018-01-18 15:26:53 +08:00
Andrew Nicols 95bce65a9f weekly release 3.4.1+ 2018-01-18 12:48:03 +08:00
Andrew Nicols 7cdd1a5c8e Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-01-18 12:48:01 +08:00
Mark Nelson c8d028d3f1 MDL-60814 auth_ldap: prevent setting names breaking site upgrades 2018-01-17 14:18:28 +08:00
AMOS bot 961fd545cf Automatically generated installer lang files 2018-01-17 00:06:29 +00:00
Jun Pataleta 6bbcb9c2e5 Merge branch 'MDL-61221-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-16 23:01:14 +08:00
KietLy 93482c3a53 MDL-60078 User tours accessibility: Tab should go back into the pop-up 2018-01-16 17:43:00 +07:00
Mark Nelson f393faa86c MDL-61224 core_role: prevent short name from exceeding 100 chars 2018-01-16 18:17:51 +08:00
David Monllao 69f18d2a63 Merge branch 'MDL-61010-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-16 09:25:23 +01:00
Adam Olley d41b8d3f32 MDL-60918 core_message: update preferences of user behat test 2018-01-16 05:27:09 +00:00
Ryan Wyllie ec40f18efb MDL-60918 message: use current user in message preference update 2018-01-16 05:27:09 +00:00
Andrew Nicols 645bc22468 MDL-61221 badges: Ignore site availabilty for behat
Behat sites should not be available publically, and the check against
the backpack API for site availablity can time out in some situations.

We should be testing as though the site _is_ available, as this is the
standard expectation.
2018-01-16 13:23:17 +08:00
Andrew Nicols 92eb0a6d9c Merge branch 'MDL-60815-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2018-01-16 12:29:59 +08:00
Ryan Wyllie c5098c6704 MDL-60815 theme: fix loading editor styles 2018-01-16 03:41:03 +00:00
David Knuplesch 07dc19ad69 MDL-60549 lti: support for moving embedded lti into separate tab 2018-01-16 10:12:05 +08:00
Eloy Lafuente (stronk7) fbf616e651 Merge branch 'MDL-61204-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-16 02:16:53 +01:00
Andrew Nicols 1ddeb827a3 MDL-61010 mod_forum: Add unread link to blog view 2018-01-16 08:07:31 +08:00
AMOS bot bcd507a3f7 Automatically generated installer lang files 2018-01-16 00:06:38 +00:00
Eloy Lafuente (stronk7) c45b1e62dd Merge branch 'MDL-61081-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-01-16 00:27:53 +01:00
Eloy Lafuente (stronk7) b36c124f3d Merge branch 'MDL-37390-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-01-16 00:25:33 +01:00
Eloy Lafuente (stronk7) 43b5384168 Merge branch 'MDL-61162-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-01-15 22:58:04 +01:00
Tim Hunt ffb43a83b0 MDL-61077 question stats: make calculations more robust 2018-01-15 16:08:31 +00:00
Eloy Lafuente (stronk7) 3e9d0de501 Merge branch 'MDL-61166-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-01-15 10:57:46 +01:00
David Monllao 440989aeab Merge branch 'MDL-55382-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-01-15 10:07:44 +01:00
Andrew Nicols c4107dec84 Merge branch 'MDL-61156-34' of https://github.com/mwehr/moodle into MOODLE_34_STABLE 2018-01-15 13:49:03 +08:00
Shamim Rezaie 3f81c4a322 MDL-61166 Groups: Fixed a typo in PHPDoc 2018-01-14 09:22:48 +11:00
Eloy Lafuente (stronk7) c9236c6860 Moodle release 3.4.1 2018-01-12 20:35:46 +01:00
wehr 960252e17e MDL-60812 enrol_manual: Fixes not working default role 2018-01-12 16:05:52 +01:00
Farhan Karmali 9b55ca16d5 MDL-37390 course: Set startdate and enddate properly for approved course
Once a course is approved the startdate and enddate were not set properly
This patch sets current date as startdate and enddate is startdate +
default duration of the course
2018-01-12 10:03:05 +01:00
Farhan Karmali 17147e5204 MDL-61081 enrol: Start and end date for courses created by external db
Course created by external db enrolment plugin should have start date as current date
and end date is todays date + default course duration
2018-01-12 09:58:37 +01:00
wehr a9369b1941 MDL-61156 enrol_manual: Fixes not working manual quick enrolment in IE11 2018-01-12 08:59:18 +01:00
Andrew Nicols 89fc5ef888 MDL-61204 user: Fix random failure in behat
We need to get into the habit of not using usernames like 'student1'
and 'student10' as our matches are non-strict, and the tests become
dependent upon DB sort order.

This change adds a character after the varying value to act as a
delimter for all of these tests.
2018-01-12 09:52:17 +08:00
Eloy Lafuente (stronk7) 5dcd9c53e3 weekly release 3.4+ 2018-01-12 02:12:44 +01:00
Jake Dallimore 758066eda4 Merge branch 'MDL-61177-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-11 09:22:47 +08:00
Cameron Ball 6a12f2de83 MDL-61143 core_files: Don't append dot when checking domain names or IP addresses.
Previously we appended a dot at the end of IP addresses and domain names in the
cURL security helper, but it causes issues with Google OAuth so this patch removes it.
2018-01-10 15:23:20 +08:00
Andrew Nicols fe8663110a Merge branch 'MDL-61061_hideif_group_34' of git://github.com/davosmith/moodle into MOODLE_34_STABLE 2018-01-10 08:55:24 +08:00
Andrew Nicols 0f6761962a MDL-61177 badges: JS pending checks in connection test 2018-01-10 08:13:45 +08:00
Adrian Greeve bc066df1f6 MDL-61131 repositories: Added a key to verify incoming urls. 2018-01-09 11:34:44 +01:00
Cameron Ball 246b39cba9 MDL-61143 core_files: Update unit tests for curl_security_helper
Previously some of the unit tests were passing "by accident" becuase
we had the security helper letting through domains where the DNS lookup
failed. That behaviour has changed and now such domains are blocked.

Additionally tests for domains with multiple A records and weird Unicode
stuff have been added.

This patch also mocks the DNS resolution in the test, rather than actually
resolving the domain.
2018-01-09 16:54:31 +08:00
Cameron Ball facd24b4c7 MDL-61143 core_files: Block hosts that cannot be determined to be an IP address of domain name
Freaky deaky Unicode/octal/hex domains can be resolved by cURL but are technically not valid.

This patch causes anything that Moodle does not consider to be a valid domain or IP to be blocked
by the cURL security helper.
2018-01-09 16:54:31 +08:00
Cameron Ball b7b3b75b2c MDL-61143 core_files: Check all A records when testing blocked IPs 2018-01-09 16:54:31 +08:00
Juan Leyva 98ac97e2a0 MDL-60908 mod_quiz: Return question state only when configured
The question state should be returned following the quiz review options
settings.
2018-01-09 16:54:31 +08:00
David Monllao 9aa6e8bfa4 Merge branch 'wip-MDL-60742-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-01-09 09:52:56 +01:00
Davo Smith 03a65d8916 MDL-61061 formslib: make sure hideIf rules hide labels within groups 2018-01-09 08:48:23 +00:00
Davo Smith 5e430e98cb MDL-61061 formslib: add data-groupname to groups to fix hideIf rules 2018-01-09 08:48:23 +00:00
David Monllao 068f22aee0 Merge branch 'MDL-60079-34' of https://github.com/nashtechdev01/moodle into MOODLE_34_STABLE 2018-01-09 08:10:43 +01:00
Andrew Nicols 99d570fef4 Merge branch 'wip-MDL-60415-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-01-09 14:31:01 +08:00
David Knuplesch 4a2bc331fb MDL-60415 mod_lti: avoid confusing error-message 2018-01-09 14:02:09 +08:00
Thinh Pham 3fef39fc68 MDL-60079 User tours: leave unnecessary aria tags in the page 2018-01-09 10:35:57 +07:00
Jun Pataleta 5d434d4d19 Merge branch 'MDL-61068-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-09 09:53:31 +08:00
Andrew Nicols 440113b457 MDL-61068 mod_forum: Fix neighbour test dates 2018-01-09 09:49:14 +08:00
Eloy Lafuente (stronk7) 41ff45a7a7 Merge branch 'MDL-60943-m34' of https://github.com/sammarshallou/moodle into MOODLE_34_STABLE 2018-01-09 00:52:29 +01:00
Eloy Lafuente (stronk7) fa4274319d Merge branch 'MDL-61098-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-01-08 21:06:34 +01:00
Eloy Lafuente (stronk7) 06c5a9e6ff Merge branch 'm34_MDL-61050' of https://github.com/danmarsden/moodle into MOODLE_34_STABLE 2018-01-08 20:38:43 +01:00
Eloy Lafuente (stronk7) ca3605500e Merge branch 'MDL-61068-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-08 19:56:33 +01:00
David Monllao 6beb56ba1f Merge branch 'MDL-61169-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-08 14:59:07 +01:00
Andrew Nicols f83fc14e4d MDL-61169 iplookup: Change to github.com IP 2018-01-08 17:15:57 +08:00
Eloy Lafuente (stronk7) 844eae52fb Merge branch 'MDL-61046-34-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-01-08 10:07:30 +01:00
Andrew Nicols cf304a8870 Merge branch 'MDL-57786-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-01-08 15:17:25 +08:00
Andrew Nicols 8ec36b0fe2 Merge branch 'MDL-43042-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-01-08 15:13:21 +08:00
Andrew Nicols 31a9ee8172 Merge branch 'MDL-53985-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-01-08 12:50:12 +08:00
Jun Pataleta 2787a52470 MDL-61162 mod_forum: Remove unnecessary forum creation step 2018-01-08 10:57:43 +08:00
Andrew Nicols d0308d8d76 MDL-61068 mod_forum: Round timed posts to nearest 60 seconds
This slightly reduces the effectiveness of the DB query cache, but gives
us correct results every time.
2018-01-05 16:43:34 +08:00
Mihail Geshoski 144c240841 MDL-43042 lesson: Confusing feedback order in multiple answer questions 2018-01-05 15:35:27 +08:00
Dan Marsden 434c5f8a56 MDL-61050 auth_ldap: fix regression caused by MDL-42834 2018-01-05 10:42:50 +13:00
sam marshall 0ce4a24888 MDL-60943 core_search: Improve exception for preg_replace errors 2018-01-04 17:28:45 +00:00
Helen Foster bfd1dd07d8 MDL-61046 lang: Merge English strings from the en_fix language pack
Significant string changes:

* pluginname_desc, enrol_category - improved explanation
* pathtopythondesc, core_admin - mentioning Python version
* configdeleteunconfirmed, core_admin - setting applies to more than
  just email-based self-registration
2018-01-04 11:56:43 +01:00
David Monllao 51e05c09c3 weekly release 3.4+ 2018-01-04 11:02:43 +01:00
David Monllao 02990bd6b9 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-01-04 11:02:42 +01:00
Mihail Geshoski 6d38596df0 MDL-61153 lesson: Inconsistent column sizing in detailed statistics 2018-01-04 15:47:57 +08:00
Marina Glancy a66195b8b9 MDL-60742 calendar: allow customisation of 12/24h time format strings 2018-01-04 15:15:30 +08:00
Jun Pataleta ae7953ff01 Merge branch 'MDL-40613-34-ldap' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-04 14:57:50 +08:00
Andrew Nicols e5dc80a10c MDL-40613 auth_ldap: Call update_user_record on create 2018-01-04 14:41:03 +08:00
Jun Pataleta f080964380 Merge branch 'MDL-40613_34-fix' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-04 09:58:05 +08:00
AMOS bot 2ea79c66cf Automatically generated installer lang files 2018-01-04 00:07:02 +00:00
Mark Nelson 36b738c185 MDL-40613 auth_ldap: removed usage of profile_load_custom_fields() 2018-01-03 18:08:57 +08:00
AMOS bot 1a89875c36 Automatically generated installer lang files 2018-01-03 00:06:24 +00:00
Eloy Lafuente (stronk7) c29b6e8c15 Merge branch 'MDL-23887-34-2' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-01-03 00:24:59 +01:00
David Monllao ff710b83c3 Merge branch 'MDL-57727-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-01-02 12:33:56 +01:00
Jake Dallimore c619279f5e MDL-23887 database: fix use of deprecated system tables for mssql
Catalog views are available which we should use instead.
2018-01-02 17:20:25 +08:00
Jun Pataleta 5772b0fba2 Merge branch 'MDL-40613_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-02 16:50:59 +08:00
David Monllao c89d473133 Merge branch 'MDL-61107_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-01-02 08:34:48 +01:00
Zig Tan 0e540897e6 MDL-57786 mod_assign: Fix word count for online text submissions 2018-01-02 13:12:34 +08:00
David Monllao 27e2fe6981 weekly release 3.4+ 2017-12-28 12:35:19 +01:00
David Monllao e35bc644de MDL-51089 mod_quiz: Hide first page last node 2017-12-28 11:46:50 +01:00
Eloy Lafuente (stronk7) 5d7d6cb52b Merge branch 'MDL-60363-34' of https://github.com/Kathrin84/moodle into MOODLE_34_STABLE 2017-12-27 17:56:11 +01:00
David Monllao 913abd448b Merge branch 'MDL-51089-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-27 17:56:10 +01:00
David Monllao dfe9aa213b Merge branch 'MDL-58983-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-27 17:56:10 +01:00
David Monllao dc24b81fef Merge branch 'MDL-61056-34-feedbackresponsenav' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2017-12-27 17:56:09 +01:00
David Monllao cff1f1943e Merge branch 'MDL-33886-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2017-12-27 17:56:09 +01:00
David Monllao fe5d17b166 MDL-60439 block_tags: Removing extra var assign 2017-12-27 17:56:09 +01:00
David Monllao cdda22dad7 Merge branch 'MDL-60439-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-27 17:56:08 +01:00
David Monllao 641a281bef Merge branch 'MDL-60942-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2017-12-27 17:56:07 +01:00
David Monllao e70b33b720 Merge branch 'MDL-60359-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-27 17:56:07 +01:00
David Monllao 8578d28631 MDL-61062 analytics: Fix unit test wrong statement 2017-12-26 00:53:12 +01:00
Eloy Lafuente (stronk7) c7a1ecd9f6 Merge branch 'MDL-61055-34-v2' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-26 00:45:52 +01:00
Eloy Lafuente (stronk7) 829adb5f21 Merge branch 'MDL-43827-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-26 00:25:37 +01:00
Tim Hunt b6e79ab8d8 MDL-61107 quiz editing: handle invalid Maximum grade input 2017-12-22 13:35:48 +00:00
Kathrin Osswald 2ba2d02202 MDL-60363 conditional activities: Dim the icon also in student's view.
The class dimmed_text would only dim the activity's title and not the icon.
The teacher has both, icon and text, dimmed. So I added the class dimmed
to the class dimmed_text, what dims both elements for the students.
2017-12-22 13:11:15 +01:00
Luca Bösch 2d117605b8 MDL-60439 blocks: Tags block title multilang 2017-12-22 09:24:21 +01:00
Luca Bösch 237e1a85ce MDL-51089 quiz: "Add" menu in edit quiz more keyboard accessible 2017-12-22 09:23:00 +01:00
Luca Bösch 5cb64c1faa MDL-60359 theme_boost: have correct mc question check mark not overlap 2017-12-22 09:20:41 +01:00
Zig Tan e714f3cee9 MDL-33886 backup: Add backup filename length < 255 char validation 2017-12-22 13:12:43 +08:00
Jun Pataleta 16deaa8611 weekly release 3.4+ 2017-12-22 14:42:06 +13:00
Jun Pataleta ffa36a4bbe Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2017-12-22 14:42:05 +13:00
Juan Leyva 5ed65e12e1 MDL-61098 repository: Retrieve correct context for repo instance
The repository instance was being retrieved without specifying a valid
context that is required in further API checks.
2017-12-21 11:35:30 +01:00
Mihail Geshoski d1c15a50c9 MDL-43827 filepicker: Multiple actions not accessible using keyboard 2017-12-21 14:08:43 +08:00
Simey Lameze bc121625c3 MDL-61055 calendar: guest user cannot create events 2017-12-20 12:44:35 +08:00
Damyon Wiese 251a824d8e MDL-60567 competencies: test list_competencies 2017-12-19 11:30:35 +01:00
Damyon Wiese efde049bdf MDL-60567 competencies: list_competencies wrong type
"validate_params" returns arrays in external functions.
2017-12-19 11:30:34 +01:00
David Monllao 88498220a1 Merge branch 'MDL-60938-34-2' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2017-12-19 07:53:20 +01:00
Mark Nelson dfdadbdbe2 MDL-40613 auth_ldap: sync user profile fields 2017-12-19 14:22:23 +08:00
David Monllao fb8b947963 Merge branch 'MDL-61045_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2017-12-19 06:43:27 +01:00
David Monllao b844baf8be Merge branch 'MDL-61016_hideif_disabledif_34' of git://github.com/davosmith/moodle into MOODLE_34_STABLE 2017-12-19 06:16:23 +01:00
Simey Lameze 0c794fc199 MDL-57431 mod_quiz: remove unnecessary class from selector 2017-12-19 12:49:45 +08:00
Damyon Wiese 2f4feacac7 Merge branch 'MDL-60767-34-3' of https://github.com/snake/moodle into MOODLE_34_STABLE 2017-12-19 11:26:12 +08:00
Damyon Wiese 7d7edc8820 Merge branch 'MDL-59999-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-19 11:04:01 +08:00
Marcus Fabriczy 18c838f586 MDL-59709 mod_assign: Export to portfolio button not working
Changed the button to a text link
2017-12-19 13:29:48 +13:00
Eloy Lafuente (stronk7) 21c63124ab Merge branch 'MDL-59200-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-19 01:10:33 +01:00
Eloy Lafuente (stronk7) 350cefe41e Merge branch 'MDL-58888-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2017-12-19 01:05:01 +01:00
Eloy Lafuente (stronk7) 47c56f3475 Merge branch 'MDL-60750-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-19 00:59:36 +01:00
Eloy Lafuente (stronk7) 4b5ac4ceae Merge branch 'wip-MDL-60594-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-19 00:46:05 +01:00
Jun Pataleta 8ed193c3ee Merge branch 'm34_MDL-60793_Mod_Chat_Reserved_Words_In_MySQL8p0p3_And_Above' of https://github.com/scara/moodle into MOODLE_34_STABLE 2017-12-19 12:13:57 +13:00
David Mudrák 40e430e634 MDL-61056 feedback: Fix the response navigation links
Floats are evil and unreliable. Even with the clearfix class added to
the response_navigation wrapper, the Next link would remain unaligned.
We need a proper three columns layout here.

It did not feel necessary to introduce a special template here so I'm
making use of the core one.
2017-12-18 21:54:47 +01:00
David Monllao aaf94b8f75 Merge branch 'MDL-60653-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2017-12-18 17:59:48 +01:00
David Monllao 18e6878f5a Merge branch 'MDL-61042-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2017-12-18 17:26:55 +01:00
David Monllao 1041ccaf2e Merge branch 'MDL-61040-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2017-12-18 17:25:07 +01:00
Eloy Lafuente (stronk7) fb7b0157c1 Merge branch 'wip-MDL-60161-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2017-12-18 16:11:47 +01:00
Matteo Scaramuccia 8827e7fc3f MDL-60793 mod_chat: Renamed 'system' into 'issystem'
'system' is now a reserved word in MySQL 8.0.3+.
2017-12-18 15:26:20 +01:00
David Monllao b85ec901dd Merge branch 'MDL-31521-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-18 13:14:33 +01:00
Eloy Lafuente (stronk7) 2faa795209 Merge branch 'MDL-56932-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-18 12:15:22 +01:00
Damyon Wiese ca5a9de8c5 MDL-61022 recyclebin: Verify groups are restored 2017-12-18 10:22:12 +01:00
David Monllao b9287872eb Merge branch 'wip-MDL-52100-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2017-12-18 10:08:21 +01:00
Davo Smith 8b448de4b0 MDL-61016 form: fix handling disabledIf + hideIf with same dependency 2017-12-18 08:03:31 +00:00
Andrew Nicols 06588b2cc0 Merge branch 'MDL-42676-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2017-12-18 15:32:51 +08:00
Adrian Greeve e8e4566aaa MDL-52100 filelib: Update to unit tests for maxbytes. 2017-12-18 13:16:43 +08:00
Adrian Greeve 94ccf35860 MDL-52100 filelib: Files that are oversized are checked with user.
Files that are oversized could have been uploaded by a user who
can ignore the file size limits. These files should not be deleted
in these situations.
2017-12-18 13:16:14 +08:00
Damyon Wiese cf0386e763 Merge branch 'MDL-34389-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-18 13:00:10 +08:00
Damyon Wiese a603f86d65 Merge branch 'MDL-57431-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-18 12:54:03 +08:00
Damyon Wiese 265e374204 Merge branch 'MDL-54967-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2017-12-18 12:48:16 +08:00
Damyon Wiese e62e93aa0d Merge branch 'wip-MDL-49995-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-18 12:01:28 +08:00
Andrew Nicols d00a6f52b4 Merge branch 'MDL-57564-34-courseorder' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2017-12-18 11:24:02 +08:00
Jake Dallimore 0c75121648 MDL-60767 admin: fix usage of admin_write_settings
Make sure we always checks for failed validation, before redirecting.
A positive return value does not signal that all settings were able
to be written, only that at least one was - errors still need to be
checked!
2017-12-18 09:23:30 +08:00
Mihail Geshoski 5681222a0b MDL-59999 lesson: Boost grade essays page not indicating grade status
AMOS BEGIN
    CPY [graded,assign],[graded,lesson]
    CPY [notgraded,assign],[notgraded,lesson]
AMOS END
2017-12-18 09:17:06 +08:00
AMOS bot a45b7aa7ee Automatically generated installer lang files 2017-12-18 00:06:19 +00:00
Tim Hunt 3093cc28f1 MDL-61045 quiz settings: add back missing disabledIf
This got broken in Moodle 2.1 by MDL-20636.
2017-12-15 13:15:12 +00:00
Damyon Wiese 60f544f331 MDL-55382 assign: Sort editpdf quick list 2017-12-15 14:57:21 +08:00
Jun Pataleta 0ff581cece MDL-61042 mod_lesson: Initialise pageid variable 2017-12-15 17:42:08 +13:00
Damyon Wiese b93a787b3e MDL-53985 assign: Do not remove annotations
When an assignment submission is reverted to a draft, the timemodified on
the submission should not be modified. Changing the timemodified causes the
editpdf code to assume the pdf is stale, and forces all annotations to be removed.
2017-12-15 11:52:32 +08:00
Jun Pataleta 4ab37af070 MDL-58888 mod_choice: Sort choice_get_my_response() results by optionid 2017-12-15 15:56:28 +13:00
Jun Pataleta f85f002b37 MDL-58888 mod_choice: Verify sorting when testing multiple selections
* Improve test_choice_get_my_response() to verify the sorting of the
  responses returned by choice_get_my_response().
* Fix correct usage of choice_get_my_response().
2017-12-15 15:56:28 +13:00
Zig Tan f7bdcf959f MDL-54967 backup: Fix IMS CC import URL decoding for XML format
HTML encoding special characters to avoid XML compatibility issues during
Course backup restoration and avoid double encoding.
2017-12-15 09:37:31 +08:00
Jun Pataleta 64abea941e MDL-61040 mod_choice: Save my choice button needs some space 2017-12-15 13:07:30 +13:00
Jun Pataleta b9bebd0e36 MDL-60938 mod_choice: Fix rendering of users for choice results 2017-12-15 12:52:54 +13:00
Matteo Scaramuccia de703e70e7 MDL-60793 core_ddl: Added the new MySQL 8 reserved words 2017-12-14 22:58:22 +01:00
Luca Bösch b35acd2249 MDL-31521 questions: Allow more than one unit with multiplier equal to 1 2017-12-14 22:34:01 +01:00
Eloy Lafuente (stronk7) a45c466000 weekly release 3.4+ 2017-12-14 14:47:47 +01:00
Eloy Lafuente (stronk7) 3b7f331372 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2017-12-14 14:47:46 +01:00
Marina Glancy 3145f21de1 MDL-31436 registration: do not send false in update request 2017-12-14 16:05:45 +13:00
AMOS bot f8550e7982 Automatically generated installer lang files 2017-12-14 00:06:11 +00:00
Simey Lameze ab0847d328 MDL-56932 theme_boost: fix quiz max mark input height 2017-12-13 11:48:53 +08:00
Adrian Greeve 54339683ac MDL-60161 filelib: Unit test for duplicate curl headers. 2017-12-13 11:13:12 +08:00
Carson Tam 65e260281b MDL-60161 class curl in filelib: Cleaned up doc block. 2017-12-13 11:13:00 +08:00
Carson Tam f29bd28d6a MDL-60161 class curl in filelib: Avoid duplicate params in http header 2017-12-13 11:12:37 +08:00
AMOS bot 9654f2cd71 Automatically generated installer lang files 2017-12-13 00:06:16 +00:00
Jun Pataleta 2337078a30 Merge branch 'MDL-58200-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-12 19:13:25 +13:00
Jun Pataleta 29d9535277 Merge branch 'MDL-59970-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-12 18:52:43 +13:00
Andrew Nicols 4b162c766d Merge branch 'M3.4-MDL-59866' of https://github.com/marcusboon/moodle into MOODLE_34_STABLE 2017-12-12 13:47:54 +08:00
Andrew Nicols 606c17e6ef Merge branch 'wip-MDL-56864-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-12 13:39:50 +08:00
Damyon Wiese daf44482e9 Merge branch 'MDL-44660-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-12 12:50:38 +08:00
Marcus Boon 7da0e04ca3 MDL-59866 session: Add retry for redis sessions
There is an edge case whereby redis will fail
to accept connections on the first try but
retrying the connection seems to make it work

Included in this commit:
* Retry functionality in the session init
2017-12-12 14:48:26 +10:00
Damyon Wiese 45c42e01a3 Merge branch 'MDL-60861-34' of git://github.com/ankitagarwal/moodle into MOODLE_34_STABLE 2017-12-12 12:38:39 +08:00
Tyler Bannister 74af3b176d MDL-60653 Navigation: Fixed loose string comparison.
The previous comparison would sometimes evaluate to true when the
navigation key was not a string.
2017-12-12 12:34:57 +08:00
Simey Lameze 7e9f55f138 MDL-60750 mod_quiz: only apply form css rules on clean theme 2017-12-12 12:14:02 +08:00
Damyon Wiese 7354b4ea0e Merge branch 'MDL-58058-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-12 12:10:40 +08:00
Damyon Wiese 9f6edf2171 Merge branch 'MDL-60945-m34' of https://github.com/NeillM/moodle into MOODLE_34_STABLE 2017-12-12 11:35:34 +08:00
Damyon Wiese 511c9addfa Merge branch 'MDL-60965-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2017-12-12 11:15:36 +08:00
Damyon Wiese 8616e10e89 Merge branch 'MDL-60969_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2017-12-12 11:08:30 +08:00
Andrew Nicols 91406c9103 Merge branch 'MDL-60983_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2017-12-12 10:57:55 +08:00
Damyon Wiese aa383f1b47 Merge branch 'MDL-52538-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-12 10:40:35 +08:00
Damyon Wiese 8bb22c4544 Merge branch 'MDL-44667-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2017-12-12 10:26:18 +08:00
Damyon Wiese ff383cdd57 Merge branch 'MDL-60968-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-12 10:19:24 +08:00
Matt Clarkson 23e190ead5 MDL-60976 dml: Optimise replace_all_text()
Avoid updating fields that do not match the search string.
2017-12-12 10:07:40 +08:00
Mathew May d997069c62 MDL-57431 mod_quiz: Quiz editing help icon fix 2017-12-12 09:57:46 +08:00
Mihail Geshoski 96cc77d435 MDL-57727 reports: Activity completion report sorting problem 2017-12-12 09:53:16 +08:00
Brendan Heywood 1daf3fafc0 MDL-60968 auth: Allow more flexibility with mapping attributes 2017-12-12 09:38:20 +08:00
Damyon Wiese 7522b6a2e3 Merge branch 'MDL-60041-m34' of https://github.com/NeillM/moodle into MOODLE_34_STABLE 2017-12-12 09:21:59 +08:00
Zig Tan ece94bb4e2 MDL-42676 mod_assign: Display message fix when using grade override
Logic fix in mod_assign locallib.php to correctly set the submissionlockedstatus,
and added associated unit test in test_grade_submission_override()
2017-12-12 09:04:59 +08:00
Mihail Geshoski cd44d4e463 MDL-52538 lesson: Grade info displayed while ongoing score disabled 2017-12-12 09:03:23 +08:00
Damyon Wiese 395c985759 Merge branch 'MDL-54021-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-12 08:59:23 +08:00
Damyon Wiese 684d866e20 Merge branch 'MDL-40790-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE
Conflicts:
	theme/boost/scss/moodle/modules.scss
2017-12-11 16:56:33 +08:00
Damyon Wiese 3b2e8b4a0a Merge branch 'MDL-56197-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-11 16:47:40 +08:00
Neill Magill 816e06e809 MDL-60945 Web services: Too many progress records retrieved
The core_completion_get_activities_completion_status was getting the
progress for all users on the course called, and then discarding all
the records but one.

This change ensures that only progress for the user we are interested in
is retrieved from the database.

This has a side benefit of removing a full table scan from the query
finding the users inside the get_progress_all() method.
2017-12-11 08:42:39 +00:00
Neill Magill 6924954471 MDL-60041 dml: MOODLELIB sql file must have Unix line endings
If the file does not have Unix line endings then the regular expression
in oci_native_moodle_database::attempt_oci_package_install() does
not split it correctly.

This leads to an invalid package being created in Oracle.

The .gitattribute file changes for oci_native_moodle_package.sql
force it to have Unix style line endings when the branch is checked
out and the file does not already exist.

The file has been modified so that the Unix style line endings are
applied even if the file already exists, for example when pulling in
this change to an existing branch.
2017-12-11 08:42:24 +00:00
Mihail Geshoski 2875ff2934 MDL-56197 lesson: Multichoice answers not on same line as radio button 2017-12-11 15:52:44 +08:00
Andrew Nicols b1ddacfc8e Merge branch 'MDL-58272-34-2' of https://github.com/snake/moodle into MOODLE_34_STABLE 2017-12-11 15:02:27 +08:00
Marina Glancy 6d353a7918 MDL-60594 xmlrpc: wrapper for buggy xmlrpc_decode 2017-12-11 14:26:29 +08:00
Ankit Agarwal f9e09bd963 MDL-60861 analytics: Remove enable menu, if no timesplitting method 2017-12-11 10:47:44 +05:30
Ankit Agarwal 4f657eeed9 MDL-60861 analytics: Enabling a model requires timesplitting 2017-12-11 10:47:44 +05:30
Damyon Wiese 60e57b8448 Merge branch 'wip-MDL-45500-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-11 13:14:05 +08:00
Damyon Wiese 628f99bf45 Merge branch 'MDL-60948-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2017-12-11 12:53:18 +08:00
Andrew Nicols 68e670d8ea MDL-60948 tool_httpsreplace: Correct use of test URLs 2017-12-11 12:06:22 +08:00
Damyon Wiese af9b21a388 Merge branch 'MDL-54106-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-11 11:38:04 +08:00
Damyon Wiese de08d71fc8 Merge branch 'wip-MDL-31436-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-11 11:29:20 +08:00
Luca Bösch 4846674f5c MDL-44660 grade: Typos @package core_grade instead of core_grades 2017-12-08 14:21:28 +01:00
Luca Bösch ac66136751 MDL-54106 task: Deleting unconfirmed users after $CFG->deleteunconfirmed 2017-12-08 14:12:49 +01:00
Tim Hunt 5617f26568 MDL-60983 get_user_capability_course: fix buggy edge cases
There were basically two problems, which are demostrated by
the new test users u7 and u8 in the unit test.

1. There was a problem if a role was overridden in a context above the
one where it was assigned. E.g. User has teacher role in a course, and
there is a role override in the course-category context. That was being
ignored.

2. Problems with the handling of PROHIBITs. It should be the case that
if there is a PROHIBIT in force, then it cannot be overridden by another
role, or by a role override. However, this was not working in all cases.

Also, I had to add comments to the unit test so that I could understand
it. Hopefully these will be hepful to other developers too.
2017-12-08 12:07:27 +00:00
Simey Lameze ad81f22148 MDL-58058 competency: replace other sortorder usages 2017-12-08 16:01:12 +08:00
Frederic Massart aabf264460 MDL-58058 competency: Allow unspecified sortorder for new competencies 2017-12-08 16:01:12 +08:00
Mihail Geshoski c22d3a30a1 MDL-40790 lesson: Lesson content button runs off the edge of the page 2017-12-08 09:57:25 +08:00
Mihail Geshoski 64d3271039 MDL-54021 blocks: Course completion block lang problem 2017-12-08 09:26:11 +08:00
AMOS bot c83c2c0f47 Automatically generated installer lang files 2017-12-08 00:09:50 +00:00
Jun Pataleta 5fdb912a82 weekly release 3.4+ 2017-12-08 09:10:06 +13:00
Mark Nelson 7a06e15952 MDL-60969 auth_ldap: replace hardcoded strings in config settings 2017-12-07 14:04:31 +08:00
Jun Pataleta b64f314662 Merge branch 'MDL-60951-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-07 17:33:30 +13:00
David Mudrák e5994e8c04 MDL-57564 enrol: Fix the course ordering on the dashboard
The list of courses displayed at the user's dashboard - course overview
block, had the sorting hard-coded to order by fullname. This did not
respect the site setting "navsortmycoursessort" and led to inconsistent
behaviour with "My courses" list in the navigation.
2017-12-06 23:51:52 +01:00
Damyon Wiese 1fb4f49cca MDL-60951 travis: Disable redis on travis
Redis unit tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
2017-12-06 11:23:35 +08:00
Andrew Nicols 32b4b57b26 Merge branch 'MDL-59159_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2017-12-06 10:04:42 +08:00
Jun Pataleta fd7e75a8a5 Merge branch 'MDL-32350-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-06 11:30:52 +13:00
Luca Bösch abd7d4394b MDL-32350 admin: Sort users by country ASC and DESC 2017-12-05 07:22:56 +01:00
Jun Pataleta e4256cd769 Merge branch 'wip-MDL-60926-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-05 19:03:36 +13:00
David Herney 5a6a4cef8b MDL-60443 dataformat lib: Change a wrong variable name
The variable $type really is $dataformat. I have changed it for
prevent the error and show a correct error message.
2017-12-05 13:52:36 +08:00
Jun Pataleta 8721afb2c6 Merge branch 'wip-MDL-34161-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-05 17:59:53 +13:00
Andrew Nicols 0e199a5aec Merge branch 'MDL-60801_34' of https://github.com/andrewhancox/moodle into MOODLE_34_STABLE 2017-12-05 12:52:25 +08:00
Andrew Nicols 320947908b Merge branch 'MDL-60899-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-05 11:55:16 +08:00
Andrew Nicols 2e55209603 MDL-60965 behat: Correct strlen use 2017-12-05 11:19:42 +08:00
Andrew Nicols f8979fac97 Merge branch 'MDL-47114-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2017-12-05 09:52:42 +08:00
Adrian Greeve 6a33a850fc MDL-37757 repositories: Deleting a repository deletes files.
If the user decides to remove a repository all of the linked
files are now deleted along with file references. This was causing
problems such as the course page displaying an error with no recourse
to fix the problem.
2017-12-05 09:46:31 +08:00
Jake Dallimore 9164ab6e39 MDL-44667 database: fix incorrect usages of $DB->get_field
Some places were passing 5 params, meaning the strictness param was
lost. This fixes those usages.
2017-12-04 18:01:34 +08:00
Damyon Wiese 2af1421e34 Merge branch 'MDL-60219-34' of https://github.com/abias/moodle into MOODLE_34_STABLE 2017-12-04 16:28:39 +08:00
Marina Glancy 5a9fa0fe57 MDL-34161 mod_lti: backup and restore of submissions 2017-12-04 15:05:58 +08:00
Marina Glancy c1db07d55b MDL-34161 mod_lti: backup/restore of lti types
Only course tools are backed up, site tools and registrations
can be matched by id if they are restored to the same site only.

For predefined course tools the secret is backed up encrypted
and can be restored on the same site only.
2017-12-04 15:05:58 +08:00
Tim Lock c5b7a25ee6 MDL-34161 mod_lti: Added Behat tests 2017-12-04 15:05:58 +08:00
Gregory Faller 7cc665e9c7 MDL-34161 mod_lti: Add support for restoring site tool 2017-12-04 15:05:57 +08:00
Jun Pataleta 05fd85142e Merge branch 'wip-MDL-60887-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-04 18:23:52 +13:00
Jun Pataleta e62ea2b803 Merge branch 'MDL-60925-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-04 14:32:00 +13:00
Eloy Lafuente (stronk7) 972142a9af MDL-59159 environment: 3.1 (LTS) required 2017-12-04 02:03:34 +01:00
Eloy Lafuente (stronk7) b25f3693bb MDL-59159 environment: 3.5 base information
This is a direct copy of the 3.4 branch to
have changes under control easier in next commits.
2017-12-04 02:03:17 +01:00
Jun Pataleta 369caa6183 Merge branch 'MDL-60914_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2017-12-04 12:49:48 +13:00
Shamim Rezaie 00268741c2 MDL-47114 core: Improved function description 2017-12-02 07:44:27 +08:00
Ann Adamcik 4c492f8646 MDL-58697: Only get group submission if enabled 2017-12-01 12:53:28 -07:00
Marina Glancy 605b0547de MDL-60926 auth: do not map very long profile fields 2017-12-01 17:51:54 +08:00
Ryan Wyllie eea1aff443 MDL-60942 filters: include filter in format_string cache key 2017-12-01 06:51:58 +00:00
Eloy Lafuente (stronk7) 1bc5a5abe9 weekly release 3.4+ 2017-11-30 17:05:23 +01:00
Marina Glancy be4ea98f29 MDL-31436 hub: never use xmlrpc, always use REST 2017-11-30 11:27:41 +08:00
Damyon Wiese 845215d826 MDL-60925 theme: Fix SCSS precompilation.
There is no point pre-compiling the theme SCSS if it is not stored somewhere that is available
to all webserving nodes. Localcache needs to be backed by the MUC cache.
2017-11-29 17:08:23 +08:00
Alexander Bias 2a9c11965b MDL-60219 lti: Replace pagelayout frametop with incourse 2017-11-29 09:58:45 +01:00
Damyon Wiese 8c3d8a68f7 MDL-58200 competencies: Student can view linked courses 2017-11-29 16:07:42 +08:00
João Umberto Ciocca de Almeida 969010296d MDL-60654 calendar: Clean up lines 140-154
The if+switch code between lines 140 and 154, even though they selected 3 different choices, all of them gave the same result.
Therefore, it'd be cleaner to replace those 16 lines for just two.
2017-11-29 06:56:16 +01:00
Jun Pataleta 87186b9710 Merge branch 'wip-MDL-45068-34-fix' of https://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-11-29 16:59:41 +13:00
Marina Glancy 539ad434cb MDL-45068 groups: corrected check for idnumber '0' 2017-11-29 11:53:56 +08:00
Eloy Lafuente (stronk7) af4fa2a55b Merge branch 'wip-MDL-60591-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-11-28 22:38:37 +01:00
Eloy Lafuente (stronk7) 15aec0b054 Merge branch 'MDL-60738-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2017-11-28 20:59:34 +01:00
Eloy Lafuente (stronk7) 7974bbcaf7 Merge branch 'MDL-60838-m34' of https://github.com/sammarshallou/moodle into MOODLE_34_STABLE 2017-11-28 20:48:27 +01:00
Damyon Wiese b4cbad15de MDL-58983 assign: Hide grade button if no cap
If the current user cannot grade students, don't show them the button.
2017-11-28 15:48:55 +08:00
Marina Glancy fe1eb00c0f MDL-49995 files: delete old file when overwriting 2017-11-28 15:03:29 +08:00
Damyon Wiese 03df75c0de MDL-59200 assign: add feedback when grade locked
We are including a hidden field when the grade is locked in the gradebook for a student. This field fails validation, so
the form cannot be submitted.
2017-11-28 14:37:33 +08:00
Damyon Wiese 21c6513a7c MDL-60899 block_lp: no permissions - empty block
Show an empty block if the current user does not have the capability to see any plans.
2017-11-28 14:33:18 +08:00
Damyon Wiese 8938d826d9 Merge branch 'MDL-53004-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE
Conflicts:
	mod/assign/styles.css
2017-11-28 12:50:57 +08:00
Marina Glancy e71a526011 MDL-45500 gradingform: allow plugin uninstall 2017-11-28 12:27:26 +08:00
Jun Pataleta f3f6960d3e Merge branch 'MDL-46768-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2017-11-28 17:19:00 +13:00
Damyon Wiese 8952d3f100 Merge branch 'MDL-24678-MOODLE_34-chat_get_latest_message' of https://github.com/bozoh/moodle into MOODLE_34_STABLE 2017-11-28 12:14:49 +08:00
Tobias Reischmann 0bb9e2d8d7 MDL-60669 forum: Added duplicate check for restoring forum subscriptions
Before MDL-59854 it was possible to have duplicate forum subscriptions.
Trying to import backups created from back then, caused a DB exception
due to unqiue key constraints. Now only one of multiple identical forum
subscritions is restored.
2017-11-28 12:06:25 +08:00
Mark Nelson 07b6c89868 MDL-60914 mod_lti: ensure grade_update() is defined during upgrade 2017-11-28 11:38:09 +08:00
Marina Glancy ffba0168b1 MDL-60887 registration: allow plugins to register on custom hubs 2017-11-28 11:21:46 +08:00
Eloy Lafuente (stronk7) 26a276cea1 Merge branch 'MDL-60249-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-11-28 00:48:55 +01:00
Damyon Wiese 3e2eb62931 Merge branch 'MDL-60188-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2017-11-27 15:56:53 +08:00
Jun Pataleta 62104652c8 Merge branch 'MDL-57569-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2017-11-27 19:43:57 +13:00
Jun Pataleta c950c91696 Merge branch 'wip-MDL-45068-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-11-27 19:36:10 +13:00
Marina Glancy 73e4f14d1b MDL-60591 mod_forum: inline attachments are not displayed in plain text 2017-11-27 14:29:33 +08:00
Marina Glancy 87d3c32f2e MDL-45068 groups: fixes to group import
- If 'coursename' is specified in the CSV it should match the course short name - thanks Yusuf Yılmaz for the patch
- If 'idnumber' is specified but 'groupidnumber' is not, idnumber should be used for matching the course idnumber only
- If 'groupingname' is not specified, there should be no notices (regression from MDL-42514)
- If 'coursename' or 'idnumber' column is present, it can contain empty values in some/all lines
2017-11-27 14:26:19 +08:00
Shamim Rezaie b8e0488c90 MDL-60188 groups: cache user's groups and groupings
The function groups_get_user_groups is called too often both before rendering the page and after the page is rendered (using ajax).
The function was executing a query joining 3 tables in each call. The plementation of the function has now modified to store the
query result in a request cache.
2017-11-27 10:42:56 +08:00
Jake Dallimore 6c23087aa7 Merge branch 'MDL-60830-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2017-11-27 10:30:24 +08:00
Jun Pataleta a6d9966786 Merge branch 'MDL-58887-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2017-11-27 15:06:11 +13:00
Jake Dallimore 1a8167e781 Merge branch 'MDL-27230-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-11-27 09:44:18 +08:00
Ryan Wyllie 47dd1d85aa MDL-58887 core: fix default title for action menu
Thanks to Michelle Melton <meltonml@appstate.edu> for the original
version of this patch.
2017-11-27 01:28:54 +00:00
Andrew Hancox c29edc7551 MDL-60801 tool_uploaduser: Fix issue with defaults being ignored 2017-11-25 11:40:56 +00:00
Carlos Alexandre S. da Fonseca fdddb80b70 MDL-24678 mod_chat: Fixed race condition on chat module 2017-11-24 10:36:15 -02:00
sam marshall 70a804d98e MDL-60838 core_search: File upload does not honour timeout 2017-11-24 11:02:32 +00:00
Sara Arjona c12caea3d4 MDL-57569 core_files: Fix to let show generated f3 image 2017-11-24 11:51:29 +01:00
Sara Arjona 191a7fd205 MDL-46768 core_badges: changed badge name type from FILE to TEXT 2017-11-24 11:37:59 +01:00
Luca Bösch b0cb0168f4 MDL-34389 course: switch to subcategory w/ course:changecategory perms 2017-11-23 16:50:28 +01:00
Luca Bösch fb762d4e5c MDL-53004 assignment: Separate label and pulldown in grading (Clean) 2017-11-23 16:42:11 +01:00
Luca Bösch ed0e988020 MDL-27230 quiz: remove and update group overrides in calendar 2017-11-23 16:42:05 +01:00
David Monllao 20cb5f4086 weekly release 3.4+ 2017-11-23 13:35:20 +01:00
David Monllao de5d2667ab Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2017-11-23 13:35:18 +01:00
Marina Glancy 4a54efd42a MDL-27886 backup: When setting is unlocked set it to original value 2017-11-23 12:29:59 +08:00
Jake Dallimore 5769d5fc86 Merge branch 'MDL-60831-34' of git://github.com/ankitagarwal/moodle into MOODLE_34_STABLE 2017-11-22 13:25:33 +01:00
Adrian Greeve 0225f34969 MDL-60546 mod_choice: Update to select all functionality. 2017-11-22 13:25:33 +01:00
Marcus Fabriczy 23c69f1ef0 MDL-60546 mod_choice: Fixed select all functionality
Fixed the functionality which ticks or unticks all checkboxes when
clicking the Select all or Deselect all elements when viewing the
responses.

Caused by deprecating checkall and checknone functions in
MDL-57490.
2017-11-22 13:25:32 +01:00
Jun Pataleta 6e6b38e0b5 Merge branch 'MDL-60813-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2017-11-22 13:25:32 +01:00
Jun Pataleta 2e3892e951 Merge branch 'MDL-60526-34-fix1' of http://github.com/damyon/moodle into MOODLE_34_STABLE 2017-11-22 13:25:31 +01:00
Matteo Scaramuccia abe62e33e6 MDL-60745 phpunit: Bump phpunit from 6.4.3 to 6.4.4
$ php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 3 updates, 0 removals
  - Updating sebastian/comparator (2.0.2 => 2.1.0): Downloading (100%)
  - Updating phpunit/php-code-coverage (5.2.2 => 5.2.3): Downloading (100%)
  - Updating phpunit/phpunit (6.4.3 => 6.4.4): Downloading (100%)
Writing lock file
Generating autoload files
2017-11-22 13:25:31 +01:00
Damyon Wiese 78731d0b96 MDL-60526 forms: Button elements should have type
The mform "buttons" should be of type "button", instead it's not specified so they get
the default of "submit". This is causing behat fails.
2017-11-22 13:25:31 +01:00
David Monllao 56a58d538c MDL-59512 version: Following 2 digits scheme 2017-11-22 13:25:30 +01:00
David Monllao ef1c918973 Merge branch 'MDL-59512-34' of git://github.com/Dagefoerde/moodle into MOODLE_34_STABLE 2017-11-22 13:25:30 +01:00
Jun Pataleta 3b9fce4e1c Merge branch 'mdl58817-moodle34' of https://github.com/tlock/moodle into MOODLE_34_STABLE 2017-11-22 13:25:29 +01:00
Jun Pataleta 7b9e9eb98d Merge branch 'MDL-60637-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-11-22 13:25:29 +01:00
Ankit Agarwal 0456d880f0 MDL-60796 analytics: Fix phpdoc issues 2017-11-22 13:25:29 +01:00
Jun Pataleta 705776211a Merge branch 'MDL-60780_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2017-11-22 13:25:28 +01:00
Simey Lameze 94b8228ba1 MDL-60751 core_calendar: remove useless NULL_ALLOWED parameter 2017-11-22 13:25:28 +01:00
Sara Arjona 0b7d0d0f79 MDL-60830 core_enrol: Added email when searching users in course enrol 2017-11-22 13:19:49 +01:00
Damyon Wiese c29501c06d MDL-59970 competencies: performance
Remove useless get_records call in get_least_proficient_competencies_for_course function.
On big sites this would cause huge memory usage.
2017-11-22 15:37:19 +08:00
Ankit Agarwal c152025706 MDL-60831 search: add BS classes to block elements 2017-11-22 12:31:56 +05:30
AMOS bot 0444dd2b70 Automatically generated installer lang files 2017-11-22 00:05:56 +00:00
Marina Glancy 15aded1e2a MDL-56864 forms: allow to remove last tag with forced standard tags 2017-11-21 15:21:50 +08:00
Marina Glancy cbff142b8e MDL-56864 forms: boost templates don't allow remove last tag 2017-11-21 15:21:50 +08:00
Simey Lameze ee16cb39bf MDL-60637 core_group: fix unit tests failures 2017-11-21 10:02:16 +08:00
Simey Lameze 7f0eba32de MDL-60637 group: remove useless id number validation on web services 2017-11-21 10:02:16 +08:00
David Monllao 144c9ba7c3 Merge branch 'MDL-60526-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-11-20 13:44:02 +01:00
David Monllao b676ff39a4 Merge branch 'MDL-60436-m34' of https://github.com/NeillM/moodle into MOODLE_34_STABLE 2017-11-20 13:26:12 +01:00
David Monllao fe709d665d Merge branch 'MDL-56253-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-11-20 12:55:39 +01:00
Simey Lameze d692104051 MDL-60823 calendar: use first day of week on prepadding calc 2017-11-20 12:08:30 +01:00
Jake Dallimore 17ebd603e1 Merge branch 'MDL-60708-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2017-11-20 17:58:07 +08:00
David Monllao b24eb6c565 Merge branch 'MDL-60842-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-11-20 10:30:28 +01:00
Juan Leyva c449504287 MDL-60708 mod_workshop: Return author feedback for submission
The feedback and grade information for submission should be returned
for teachers in the evaluation and closed phases.
2017-11-20 10:08:20 +01:00
Simey Lameze 8df6b374bb MDL-60842 calendar: do not load all course fields 2017-11-20 16:55:24 +08:00
Juan Leyva e84e1bbff3 MDL-60738 webservice: Clean theme and lang properly
Sometimes the "theme" and "lang" fields in the user and course tables
in the database are set to incorrect values (uninstalled or
non-existent themes and language packs).
This makes Web Services functions to fail because the WS server
validate the returned data using the validate_param function that clean
parameters.
2017-11-20 09:38:03 +01:00
Jakob Ackermann 3cfc322bdf MDL-60187 mod_lti: Do not create a grade item when grades are disabled.
If the privacy option "Accept grades from the tool" is disabled, the
module should not appear in the gradebook when edited inline or when
recover grades is running during enrolment.
2017-11-20 21:33:50 +13:00
Damyon Wiese 6da402bf34 Merge branch 'MDL-60810_master' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2017-11-20 15:58:58 +08:00
Damyon Wiese 126c58ede4 Merge branch 'MDL-60809-34' of git://git.cameron1729.xyz/moodle into MOODLE_34_STABLE 2017-11-20 15:31:08 +08:00
Damyon Wiese 6217d91173 Merge branch 'MDL-60806-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-11-20 15:25:44 +08:00
Jake Dallimore d28be61fb5 Merge branch 'MDL-60824-34-profilefield' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2017-11-20 15:07:00 +08:00
Luca Bösch a96ef27857 MDL-56253 grade: have coursemodule name pass filters. 2017-11-20 06:44:25 +01:00
Damyon Wiese 255541d592 Merge branch 'MDL-27886-master' of git://github.com/tobiasreischmann/moodle into MOODLE_34_STABLE 2017-11-20 13:26:06 +08:00
Simey Lameze 19b4c997e9 MDL-60806 core_calendar: return hidden categories 2017-11-20 12:18:24 +08:00
Jake Dallimore 93819366a4 Merge branch 'MDL-60835-34' of git://github.com/crazyserver/moodle into MOODLE_34_STABLE 2017-11-20 11:31:57 +08:00
Jun Pataleta 7726e2e2d6 Merge branch 'master_MDL-60253' of https://github.com/CengageEng/moodle into MOODLE_34_STABLE 2017-11-20 13:21:47 +13:00
AMOS bot d95ccdd4ec Automatically generated installer lang files 2017-11-20 00:05:51 +00:00
Jun Pataleta 5698d90e6a Merge branch 'MDL-55808_master' of git://github.com/juancs/moodle into MOODLE_34_STABLE 2017-11-20 10:35:54 +13:00
Neill Magill 44b87b5d95 MDL-60436 blocks: Unit test for dashboard block positioning 2017-11-17 14:11:01 +00:00
Neill Magill 334412f1cc MDL-60436 blocks: Improve performance of block loading 2017-11-17 14:10:12 +00:00
yair.spielmann afcb4cd69a MDL-59512 tool_oauth2: add option for basic authentication 2017-11-17 10:22:01 +01:00
Damyon Wiese d8a7c52ee6 MDL-60249 assign: resize quickgrade textareas
The Bootstrap CSS reset prevents horizontal resizing of textareas. We want to allow it in the quickgrading ui.
2017-11-17 14:55:46 +08:00
Andrew Nicols 05a70bac38 MDL-60773 core: Add pendingJS checks for autocomplete interactions 2017-11-17 14:11:56 +08:00
David Mudrák 951f10fd3e MDL-60824 profile: Fix handling of to-be-created user id
The script user/editadvanced.php uses special value of userid = -1 for
the case when a new user is being created. Such a value passes the
non-empty check and would lead to "invaliduser" error.
2017-11-16 22:11:13 +01:00
Juan Leyva 10a5e2a8de MDL-60813 calendar: Fix core_calendar_get_calendar_events for categories
Users couldn’t see category events when filtering by categories in the
core_calendar_get_calendar_events WS.
2017-11-16 19:16:46 +01:00
Pau Ferrer Ocaña 82c32f9a80 MDL-60835 completion: Add overrideby field to completion status WS 2017-11-16 16:37:35 +01:00
David Monllao 17ae93679d MDL-60780 analytics: Prevent timing issues 2017-11-16 09:18:31 +01:00
Jake Dallimore 27ffa62131 MDL-58272 core_files: get converters from file extension not mimetype 2017-11-16 15:50:58 +08:00
Cameron Ball 97a4db9c97 MDL-60809 xmlrpc: Include filelib when making xmlrpc call 2017-11-16 14:47:41 +08:00
Jake Dallimore 6f1a49b8b7 weekly release 3.4+ 2017-11-16 11:13:12 +08:00
David Monllao 740807d2e3 Merge branch 'MDL-60789-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2017-11-15 10:37:57 +01:00
Damyon Wiese 066b01a788 Merge branch 'wip-MDL-59876-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2017-11-15 10:37:56 +01:00
Damyon Wiese e7b4c991ee MDL-60526 forms: Prevent duplicate type attributes
The exporter for mform elements does not skip "type" (which is included as a separate value).
2017-11-15 11:54:21 +08:00
Adrian Greeve 42ee1fc276 MDL-59876 core_user: Add required library for function.
The external service create_users has a function call to
useredit_update_user_preference() that requires editlib.php
2017-11-15 11:49:18 +08:00
Damyon Wiese d56935d66f Merge branch 'MDL-60675-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-11-14 17:07:08 +08:00
Mihail Geshoski 9e2565d84d MDL-60675 analytics: Apply strict comparison check 2017-11-14 16:31:13 +08:00
Sara Arjona 73c72b4148 MDL-60789 workshop: Check title submission maxlength 2017-11-14 08:46:46 +01:00
Jake Dallimore 244af9a0da Merge branch 'MDL-60741' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2017-11-14 15:28:38 +08:00
Jun Pataleta 2eb043fb36 Merge branch 'm34_MDL-59099_MySQL8_InnoDB_Params_Removed' of https://github.com/scara/moodle into MOODLE_34_STABLE 2017-11-14 12:23:09 +13:00
Damyon Wiese 2454da368a Merge branch 'MDL-60693_34-backup-multilang-activities' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-11-13 14:38:04 +08:00
Damyon Wiese 8e899e949d Merge branch 'MDL-60675-master' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-11-13 14:11:33 +08:00
Jake Dallimore 6b0b697fb8 Merge branch 'MDL-60707' of git://github.com/aolley/moodle into MOODLE_34_STABLE 2017-11-13 13:27:14 +08:00
Damyon Wiese 9a854a2fc9 Merge branch 'MDL-59876-master' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2017-11-13 11:07:25 +08:00
Damyon Wiese b6f1cf03e3 Merge branch 'MDL-60784_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2017-11-13 10:41:05 +08:00
Tim Lock d26cdca687 MDL-58817 mod_lti: cartridge: maintain custom icons 2017-11-13 10:18:02 +10:30
Eloy Lafuente (stronk7) dbeee32b59 MDL-60784 upgrade: add 3.4.0 separation line to all upgrade scripts 2017-11-12 18:46:00 +01:00
Luca Bösch 0a8663b425 MDL-60693 backup: Use multilang with course activities
On backup and restore, activities are shown after passing format_string,
supporting multilang.
2017-11-12 14:56:14 +01:00
29874 changed files with 1028857 additions and 2515055 deletions
+87
View File
@@ -0,0 +1,87 @@
# Generated by "grunt ignorefiles"
*/**/yui/src/*/meta/
*/**/build/
node_modules/
vendor/
admin/tool/policy/amd/src/jquery-eu-cookie-law-popup.js
admin/tool/usertours/amd/src/tour.js
admin/tool/usertours/amd/src/popper.js
auth/cas/CAS/
enrol/lti/ims-blti/
filter/algebra/AlgParser.pm
filter/tex/mimetex.*
lib/editor/atto/yui/src/rangy/js/*.*
lib/editor/tinymce/plugins/pdw/tinymce/
lib/editor/tinymce/plugins/spellchecker/rpc.php
lib/editor/tinymce/tiny_mce/
lib/mlbackend/php/phpml/
lib/adodb/
lib/bennu/
lib/evalmath/
lib/lessphp/
lib/phpexcel/
lib/google/
lib/htmlpurifier/
lib/jabber/
lib/minify/matthiasmullie-minify/
lib/minify/matthiasmullie-pathconverter/
lib/pear/Auth/RADIUS.php
lib/pear/Crypt/CHAP.php
lib/pear/HTML/Common.php
lib/pear/HTML/QuickForm.php
lib/pear/HTML/QuickForm/
lib/pear/PEAR.php
lib/phpmailer/
lib/simplepie/
lib/tcpdf/
lib/typo3/
lib/yuilib/
lib/yuilib/gallery/
lib/jquery/
lib/html2text/
lib/markdown/
lib/recaptchalib.php
lib/xhprof/
lib/xmlize.php
lib/horde/
lib/requirejs/
lib/amd/src/loglevel.js
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
lib/php-css-parser/
lib/rtlcss/
lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
lib/amd/src/truncate.js
lib/fonts/
lib/validateurlsyntax.php
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
media/player/videojs/amd/src/videojs-flash-lazy.js
media/player/videojs/videojs/video-js.swf
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
theme/boost/scss/bootstrap/
theme/boost/amd/src/alert.js
theme/boost/amd/src/button.js
theme/boost/amd/src/carousel.js
theme/boost/amd/src/collapse.js
theme/boost/amd/src/dropdown.js
theme/boost/amd/src/modal.js
theme/boost/amd/src/popover.js
theme/boost/amd/src/scrollspy.js
theme/boost/amd/src/tab.js
theme/boost/amd/src/tooltip.js
theme/boost/amd/src/util.js
theme/boost/amd/src/tether.js
theme/boost/scss/fontawesome/
theme/bootstrapbase/less/bootstrap/
theme/bootstrapbase/javascript/html5shiv.js
theme/bootstrapbase/amd/src/bootstrap.js
theme/bootstrapbase/less/fontawesome/
+48 -83
View File
@@ -1,38 +1,51 @@
{
'plugins': [
'@babel',
'promise',
'jsdoc'
],
'extends': [
'eslint:recommended',
'plugin:promise/recommended'
],
'env': {
'browser': true,
// Enable ES6+ features by default.
// See http://eslint.org/docs/user-guide/configuring#specifying-environments
// Note: The YUI override must exactly match this when disabling the ES6+ version because those features are not supported by Shifter.
'es2020': true,
'amd': true
},
'globals': {
'M': true,
'Y': true
},
// Warn about unused eslint-disable statements.
'reportUnusedDisableDirectives': true,
'rules': {
// See http://eslint.org/docs/rules/ for all rules and explanations of all
// rules.
// === Possible Errors ===
'comma-dangle': 'off',
'no-compare-neg-zero': 'error',
'no-cond-assign': 'error',
'no-console': 'error',
'no-constant-condition': 'error',
'no-control-regex': 'error',
'no-debugger': 'error',
'no-dupe-args': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-empty': 'warn',
'no-empty-character-class': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-parens': 'off',
'no-extra-semi': 'error',
'no-func-assign': 'error',
'no-inner-declarations': 'error',
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-obj-calls': 'error',
'no-prototype-builtins': 'off',
'no-regex-spaces': 'error',
'no-sparse-arrays': 'error',
'no-unexpected-multiline': 'error',
'no-unreachable': 'warn',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'use-isnan': 'error',
'valid-jsdoc': ['warn', { 'requireReturn': false, 'requireParamDescription': false, 'requireReturnDescription': false }],
'valid-typeof': 'error',
// === Best Practices ===
// (these mostly match our jshint config)
@@ -44,12 +57,15 @@
'dot-notation': 'warn',
'no-alert': 'warn',
'no-caller': 'error',
'no-case-declarations': 'error',
'no-div-regex': 'error',
'no-empty-pattern': 'error',
'no-empty-function': 'warn',
'no-eq-null': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'warn',
'no-fallthrough': 'error',
'no-floating-decimal': 'warn',
'no-global-assign': 'warn',
'no-implied-eval': 'error',
@@ -61,22 +77,27 @@
'no-multi-str': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-proto': 'error',
'no-redeclare': 'warn',
'no-restricted-globals': ['error', { 'name': 'Notification' }],
'no-return-assign': 'error',
'no-script-url': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'warn',
'no-throw-literal': 'warn',
'no-unmodified-loop-condition': 'error',
'no-unused-expressions': 'error',
'no-unused-labels': 'error',
'no-useless-call': 'warn',
'no-useless-escape': 'warn',
'no-with': 'error',
'wrap-iife': ['error', 'any'],
// === Variables ===
'no-delete-var': 'error',
'no-undef': 'error',
'no-undef-init': 'error',
'no-unused-vars': ['error', { 'caughtErrors': 'none' }],
@@ -109,6 +130,8 @@
'max-statements-per-line': ['warn', { max: 2 }],
'new-cap': ['warn', { 'properties': false }],
'new-parens': 'warn',
'newline-after-var': 'off',
'newline-before-return': 'off',
'newline-per-chained-call': 'off',
'no-array-constructor': 'off',
'no-bitwise': 'error',
@@ -116,6 +139,7 @@
'no-inline-comments': 'off',
'no-lonely-if': 'off',
'no-mixed-operators': 'off',
'no-mixed-spaces-and-tabs': 'error',
'no-multiple-empty-lines': 'warn',
'no-negated-condition': 'off',
'no-nested-ternary': 'warn',
@@ -137,6 +161,7 @@
'padded-blocks': 'off',
'quote-props': ['warn', 'as-needed', {'unnecessary': false, 'keywords': true, 'numbers': true}],
'quotes': 'off',
'require-jsdoc': 'warn',
'semi': 'error',
'semi-spacing': ['warn', {'before': false, 'after': true}],
'sort-vars': 'off',
@@ -149,100 +174,40 @@
'unicode-bom': 'error',
'wrap-regex': 'off',
// === Promises (override plugin:promise/recommended) ===
// === Promises ===
'promise/always-return': 'warn',
'promise/no-return-wrap': 'warn',
'promise/param-names': 'warn',
'promise/catch-or-return': ['warn', {terminationMethod: ['catch', 'fail', 'always'], allowFinally: true}],
'promise/catch-or-return': ['warn', {terminationMethod: ['catch', 'fail']}],
'promise/no-native': 'warn',
'promise/no-promise-in-callback': 'warn',
'promise/no-callback-in-promise': 'warn',
'promise/avoid-new': 'warn',
// === Deprecations ===
"no-restricted-properties": ['warn', {
'object': 'M',
'property': 'str',
'message': 'Use "core/str" module or M.util.get_string()'
'message': 'Use AMD module "core/str" or M.util.get_string()'
}],
},
overrides: [
{
files: ["**/yui/src/**/*.js"],
'env': {
// Disable ES6+ for YUI files.
'es2020': false,
},
// Disable some rules which we can't safely define for YUI rollups.
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
'no-unused-expressions': 'off',
// === JSDocs ===
"jsdoc/check-access": 'off',
"jsdoc/check-alignment": 'off',
"jsdoc/check-param-names": 'off',
"jsdoc/check-property-names": 'off',
"jsdoc/empty-tags": 'off',
"jsdoc/implements-on-classes": 'off',
"jsdoc/multiline-blocks": 'off',
"jsdoc/require-jsdoc": 'off',
"jsdoc/require-param": 'off',
"jsdoc/require-param-name": 'off',
"jsdoc/require-param-type": 'off',
"jsdoc/require-property": 'off',
"jsdoc/require-property-name": 'off',
"jsdoc/require-property-type": 'off',
'no-unused-expressions': 'off'
}
},
{
files: ["**/amd/src/*.js", "**/amd/src/**/*.js", "Gruntfile.js", ".grunt/*.js", ".grunt/tasks/*.js", "jsdoc.conf.js"],
// We're using babel transpiling so use their parser
// for linting.
parser: '@babel/eslint-parser',
files: ["**/amd/src/*.js"],
// Check AMD with some slightly stricter rules.
rules: {
'no-implicit-globals': 'error',
// Disable all of the rules that have babel versions.
'new-cap': 'off',
// Not using this rule for the time being because it isn't
// compatible with jQuery and ES6.
'no-invalid-this': 'off',
'object-curly-spacing': 'off',
'quotes': 'off',
'semi': 'off',
'no-unused-expressions': 'off',
// Enable all of the babel version of these rules.
'@babel/new-cap': ['warn', { 'properties': false }],
// Not using this rule for the time being because it isn't
// compatible with jQuery and ES6.
'@babel/no-invalid-this': 'off',
'@babel/object-curly-spacing': 'warn',
'@babel/semi': 'error',
'@babel/no-unused-expressions': 'error',
// === Promises ===
// We have Promise now that we're using ES6.
'promise/no-native': 'off',
'promise/avoid-new': 'off',
// === JSDocs ===
'jsdoc/check-access': 'error',
'jsdoc/check-alignment': 1, // Recommended.
'jsdoc/check-param-names': 'error',
'jsdoc/check-property-names': 'error',
'jsdoc/empty-tags': 'error',
'jsdoc/implements-on-classes': 'error',
'jsdoc/multiline-blocks': 'error',
'jsdoc/require-jsdoc': 'error',
'jsdoc/require-param': 'error',
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
'jsdoc/require-property': 'error',
'jsdoc/require-property-name': 'error',
'jsdoc/require-property-type': 'error'
},
parserOptions: {
'sourceType': 'module',
'requireConfigFile': false
'no-unused-vars': 'error',
'no-implicit-globals': 'error'
}
}
]
+3 -7
View File
@@ -3,8 +3,6 @@
"Feature": 0,
"Background": 2,
"Scenario": 2,
"Examples": 4,
"example": 6,
"Step": 4,
"given": 4,
"and": 4
@@ -16,9 +14,7 @@
"no-multiple-empty-lines": "on",
"no-partially-commented-tag-lines": "on",
"no-trailing-spaces": "on",
"no-unnamed-features": "on",
"no-unnamed-scenarios": "on",
"no-scenario-outlines-without-examples": "on",
"no-examples-in-scenarios": "on",
"new-line-at-eof": ["on", "yes"]
"no-unamed-features": "on",
"no-unamed-scenarios": "on",
"no-scenario-outlines-without-examples": "on"
}
+2 -3
View File
@@ -1,6 +1,5 @@
**/yui/build/** -diff
**/amd/build/** -diff
lib/dml/oci_native_moodle_package.sql text eol=lf
**.js.map -diff
**-min.js -diff
**.min.js -diff
theme/bootstrapbase/style/editor.css -diff
theme/bootstrapbase/style/moodle.css -diff
-2
View File
@@ -1,2 +0,0 @@
# Primary donations pages.
custom: ["https://moodle.com/donations/", "https://fund.moodle.org"]
-7
View File
@@ -1,7 +0,0 @@
*** PLEASE DO NOT OPEN PULL REQUESTS VIA GITHUB ***
The moodle.git repository at Github is just a mirror of the official repository. We do not accept pull requests at Github.
See CONTRIBUTING.md guidelines for how to contribute patches for Moodle. Thank you.
--
-6
View File
@@ -1,6 +0,0 @@
> [!IMPORTANT]
> PLEASE DO NOT PUBLISH SECURITY FINDINGS PUBLICLY.
If you discover a potential security issue, please report it via our [Security Submission Form](https://moodle.org/security/report).
For more information about our security processes and responsible disclosure policy, see the [Security Procedures documentation](https://moodledev.io/general/development/process/security).
-1
View File
@@ -1 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1231.24 314.44" preserveAspectRatio="xMinYMid meet"><defs><style>.cls-1{fill:#f48020;}.cls-2,.cls-3{fill:#383738;stroke:#4a4a4c;}.cls-2{stroke-width:2.37px;}.cls-3{stroke-width:2.38px;}.cls-4{fill:#585858;}</style></defs><title>Moodle_Logo_UseonBlack_RGB</title><path class="cls-1" d="M1086.3,235.34a53.42,53.42,0,0,0,16.71,29q13.26,12.27,29.48,12.27,11.29,0,24.56-5.89,16.23-6.88,16.22-16.22l58-.49q-12.29,29-41.76,45.2-27.52,15.23-60.43,15.24-42.25,0-70-26.29t-27.75-68.54q0-43.73,27.75-69.51t72-25.8q48.15,0,75.17,31.94,25.07,29.47,25.06,79.1Zm89.91-33.91q-3.43-17.69-14.73-29-12.8-12.28-29.49-12.29-17.21,0-28.74,11.79t-15.47,29.48Z"/><path class="cls-1" d="M965.45,308.54V0h55V308.54Z"/><path class="cls-1" d="M892.69,308.54V290.36q-7.38,9.83-25.06,15.72a92.31,92.31,0,0,1-30,5.41q-39.31,0-63.13-27T750.7,217.65q0-39.3,23.34-65.84t62.15-26.53q43.71,0,56.5,23.58V0h53.55V308.54Zm0-102.68q0-14.75-14-28.26t-28.74-13.51q-21.12,0-33.41,17.2-10.8,15.24-10.8,37.33,0,21.63,10.8,36.85,12.29,17.71,33.41,17.69,12.78,0,27.76-12t15-24.81Z"/><path class="cls-1" d="M647,313.45q-41.77,0-69-26.53t-27.27-68.3q0-41.73,27.27-68.28t69-26.53q41.75,0,69.27,26.53t27.52,68.28q0,41.79-27.52,68.3T647,313.45ZM647,168q-19.89,0-30.58,15.07t-10.68,35.79q0,20.73,9.94,35.05,11.43,16.31,31.32,16.28t31.32-16.28q10.44-14.31,10.44-35.05t-9.94-35Q667.42,168,647,168Z"/><path class="cls-1" d="M448.07,313.45q-41.76,0-69-26.53t-27.27-68.3q0-41.73,27.27-68.28t69-26.53q41.74,0,69.28,26.53t27.5,68.28q0,41.79-27.5,68.3T448.07,313.45Zm0-145.43q-19.89,0-30.59,15.07t-10.69,35.79q0,20.73,9.94,35.05,11.43,16.31,31.34,16.28t31.32-16.28q10.42-14.31,10.44-35.05t-9.94-35Q468.45,168,448.07,168Z"/><path class="cls-1" d="M288.89,309.11V201q0-33.9-28-33.9t-28,33.9V309.11h-55V201q0-33.9-27.52-33.9-28,0-28,33.9V309.11h-55V194.65q0-35.37,24.56-53.54,21.61-16.22,58.46-16.22,37.35,0,55,19.16,15.23-19.16,55.51-19.16,36.86,0,58.45,16.22,24.57,18.16,24.57,53.54V309.11Z"/><path class="cls-2" d="M.76,145.76"/><path class="cls-3" d="M1.73,145.32"/><path class="cls-4" d="M173.86,116.85l55.08-40.1-.7-2.44C135,83.92,80.42,96.44,0,144.13l.73,2.38,21-.67c15.17.52,30.85,1.26,46,1.32-1,24.09.83,32.65.83,32.65,51.92,17.58,101.22,1.53,127.14-43.9A248.72,248.72,0,0,0,173.86,116.85Z"/><path class="cls-4" d="M113.78,110c-.3-1.08-2.23-1.48-4.28-.9a4.73,4.73,0,0,0-3.14,2.19c-18.53,5-49.16,13.72-70.73,21l-1.33.45c-16.68,5.61-24.73,8.49-25.22,12.55-2.29,18.44-.87,42.18-.86,42.48l.19,6.4c-9.74,27.56.06,49.6,8.38,69.77.06-24.92,1.07-45.22-6-71-.2-3.82-1.49-30.36.61-47.34.34-2.75,11.65-6.56,23.63-10.59l1.33-.44c22-7.42,53.57-16.39,71.9-21.29a6.75,6.75,0,0,0,2.29-.25C112.64,112.43,114.08,111.09,113.78,110Z"/></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

-31
View File
@@ -1,31 +0,0 @@
name: 'Close Pull Requests'
on:
pull_request_target:
types: opened
workflow_dispatch:
jobs:
close:
# Avoid forks to run this job
if: github.repository_owner == 'moodle'
name: Close Pull Requests
runs-on: ubuntu-latest
steps:
- uses: dessant/repo-lockdown@v4
with:
process-only: prs
close-pr: true
skip-closed-pr-comment: true
pr-comment: >
**Please, don't open pull requests via GitHub.**
This repository (moodle.git) at GitHub is just a mirror of the official Moodle repository.
For how to contribute patches for Moodle see
[CONTRIBUTING.md](https://github.com/moodle/moodle/blob/main/CONTRIBUTING.md).
Closing this pull request.
-71
View File
@@ -1,71 +0,0 @@
<?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');
-143
View File
@@ -1,143 +0,0 @@
name: One by One Testing
# Run all the individual unit tests one by one, with
# fully independent PHPUnit executions. Useful to
# detect issues with some tests that are using stuff
# that has been made available by others, but is not
# available when running individually.
#
# Note that we aren't using PHPUnit's own isolation
# here but completely separated runs, one for each
# test.
#
# The workflow will fail reporting all the tests
# that have failed (and will pass if no failure is
# detected, of course).
#
# It's only executed via workflow dispatch (automated
# or manual), not by push/tag. And acceptd configuration
# of phpunit, specially useful to run it with PHPUnit's
# own isolation or any other option.
on:
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
chunks: 7
jobs:
collect:
name: Collect individual unit tests
runs-on: ubuntu-latest
outputs:
matrix: ${{steps.individual-tests.outputs.matrix }}
steps:
- name: Checking out code
uses: actions/checkout@v4
- name: Looking for all individual tests
id: individual-tests
run: |
count=0 # Number of individual tests found.
while read -r testfile; do # For each test file.
while read -r testname; do # For each unit test in a file.
count=$((count + 1))
# Sent it to the correct chunk file.
chunk=$(((($count % $chunks)) + 1))
echo "$testname $testfile" >> ./chunk_$chunk.txt
done < <(grep "function test_" "${testfile}" | sed -r "s/^.*function (test_[a-zA-Z0-9_]+).*/\1/")
done < <(find . -name "*_test.php")
# Generate the matrix to run tests.
echo "matrix=$(ls -1 chunk_*.txt | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
echo "$count individual tests collected in $chunks files"
- name: Upload individual tests files
uses: actions/upload-artifact@v4
with:
name: individual_tests
path: chunk_*.txt
retention-days: 1
test:
name: Run tests
needs: collect
runs-on: ubuntu-latest
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
file: ${{ fromJson(needs.collect.outputs.matrix) }}
steps:
- name: Setting up DB pgsql
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 13
postgresql db: test
postgresql user: test
postgresql password: test
- name: Setting up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
ini-values: max_input_vars=5000
coverage: none
- name: Checking out code
uses: actions/checkout@v4
- name: Download individual test files
uses: actions/download-artifact@v4
with:
name: individual_tests # Make all the chunk files available for the next steps.
- name: Setting up PHPUnit
env:
dbtype: pgsql
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV
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: Run PHPUnit test (one by one)
env:
dbtype: pgsql
run: |
status=0
count=0
while read -r line; do # For each line in the chunk file
count=$((count + 1))
filter="${line% *}"
file="${line#* }"
# Run the individual unit test and report problems if needed to.
if ! php vendor/bin/phpunit \
--fail-on-empty-test-suite \
--fail-on-warning \
--fail-on-risky \
--filter "$filter" ${{ inputs.phpunit_extra_options }} \
"$file" >/dev/null 2>&1; then
if [ $status -eq 0 ]; then
echo "Problems found, list of PHPUnit commands failing:"
fi
echo "vendor/bin/phpunit --filter '${filter}' ${{ inputs.phpunit_extra_options }} $file"
status=$((status + 1))
fi
done < ${{ matrix.file }}
echo "Finished: $count individual tests executed, $status tests failed"
exit $status
-127
View File
@@ -1,127 +0,0 @@
name: Core
on:
push:
branches-ignore:
- main
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.3
jobs:
Grunt:
runs-on: ubuntu-22.04
steps:
- name: Checking out code
uses: actions/checkout@v4
- name: Configuring node & npm
uses: actions/setup-node@v4
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:
# MySQL builds always run with the lowest PHP supported version.
- os: ubuntu-22.04
php: 8.1
extensions:
db: mysqli
# PostgreSQL builds always run with the highest PHP supported version.
- os: ubuntu-22.04
php: 8.3
db: pgsql
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: moodlehq/mysql-action@v1
with:
collation server: utf8mb4_bin
mysql version: 8.0
mysql database: test
mysql user: test
mysql password: test
use tmpfs: true
tmpfs size: '1024M'
extra conf: --skip-log-bin
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 13
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 }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v4
- 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 }}
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
- name: Git status
run: git status
-23
View File
@@ -1,23 +0,0 @@
name: Web Installer Testing
on:
workflow_dispatch:
jobs:
InstallationTest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.1, 8.3]
steps:
- name: Construct repository URL
run: echo "REPOSITORY_URL=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> $GITHUB_ENV
shell: bash
- uses: moodlehq/moodle-webinstaller-test@main
with:
repository: ${{ env.REPOSITORY_URL }}
branch: ${{ github.ref_name }}
php: ${{ matrix.php }}
-149
View File
@@ -1,149 +0,0 @@
name: Windows Testing
on:
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.3
jobs:
Grunt:
runs-on: windows-latest
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checking out code
uses: actions/checkout@v4
- name: Configuring node & npm
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Installing node stuff
run: npm ci
- 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 }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
php: 8.3
# Ideally we should use mysql/mariadb, but they are 4x slower without tweaks and configuration
# so let's run only postgres (1.5h vs 6h) only, If some day we want to improve the mysql runs,
# this is the place to enable them.
# db: mysqli
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium, zip
- os: windows-latest
php: 8.1
db: pgsql
extensions: exif, fileinfo, gd, intl, pgsql, mysql, redis, soap, sodium
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: 8.0
user: test
password: test
- name: Creating DB mysql
if: ${{ matrix.db == 'mysqli' }}
run: mysql --host 127.0.0.1 -utest -ptest -e 'CREATE DATABASE IF NOT EXISTS test COLLATE = utf8mb4_bin;';
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
run: |
# TODO: Remove these conf. modifications when php74 or php80 are lowest.
# Change to old md5 auth, because php73 does not support it.
# #password_encryption = scram-sha-256
(Get-Content "$env:PGDATA\postgresql.conf"). `
replace('#password_encryption = scram-sha-256', 'password_encryption = md5') | `
Set-Content "$env:PGDATA\postgresql.conf"
(Get-Content "$env:PGDATA\pg_hba.conf"). `
replace('scram-sha-256', 'md5') | `
Set-Content "$env:PGDATA\pg_hba.conf"
$pgService = Get-Service -Name postgresql*
Set-Service -InputObject $pgService -Status running -StartupType automatic
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru
& $env:PGBIN\psql --command="CREATE USER test PASSWORD 'test'" --command="\du"
- name: Creating DB pgsql
if: ${{ matrix.db == 'pgsql' }}
run: |
& $env:PGBIN\createdb --owner=test test
$env:PGPASSWORD = 'test'
& $env:PGBIN\psql --username=test --host=localhost --list 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 }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
coverage: none
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v4
# Needs to be done after php is available, git configured and Moodle checkout has happened.
- name: Setting up moodle-exttests service
run: |
git clone https://github.com/moodlehq/moodle-exttests.git
nssm install php-built-in C:\tools\php\php.exe -S localhost:8080 -t D:\a\moodle\moodle\moodle-exttests
nssm start php-built-in
- name: Setting up redis service
run: |
choco install redis --version 5.0.7 --no-progress
nssm install redis redis-server
nssm start redis
- name: Setting up PHPUnit
env:
dbtype: ${{ matrix.db }}
shell: bash
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
php admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
+3 -26
View File
@@ -9,26 +9,15 @@
#
# See gitignore(5) man page for more details
#
# Swap files (vim)
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Temporary files including undo
*~
#
/config.php
/lib/editor/tinymce/extra/tools/temp/
*~
*.swp
/tags
/TAGS
/cscope.*
/.patches/
/.idea/
.phpstorm.*
!/.phpstorm.meta.php/
/.phpstorm.meta.php/*
!/.phpstorm.meta.php/di.php
/nbproject/
CVS
.DS_Store
@@ -36,7 +25,6 @@ CVS
/.project
/.buildpath
/.cache
.phpunit.result.cache
phpunit.xml
# Composer support. Do not ignore composer.json, or composer.lock. These should be shipped by us.
composer.phar
@@ -48,14 +36,3 @@ composer.phar
/lib/yuilib/*/*/*-coverage.js
atlassian-ide-plugin.xml
/node_modules/
/.vscode/
moodle-plugin-ci.phar
.eslintignore
.stylelintignore
/jsdoc
/admin/tool/componentlibrary/docs
/admin/tool/componentlibrary/hugo/site/data/my-index.json
.hugo_build.lock
phpcs.xml
jsconfig.json
UPGRADING-CURRENT.md
-169
View File
@@ -1,169 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This is a babel plugin to add the Moodle module names to the AMD modules
* as part of the transpiling process.
*
* In addition it will also add a return statement for the default export if the
* module is using default exports. This is a highly specific Moodle thing because
* we're transpiling to AMD and none of the existing Babel 7 plugins work correctly.
*
* This will fix the issue where an ES6 module using "export default Foo" will be
* transpiled into an AMD module that returns {default: Foo}; Instead it will now
* just simply return Foo.
*
* Note: This means all other named exports in that module are ignored and won't be
* exported.
*
* @copyright 2018 Ryan Wyllie <ryan@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
module.exports = ({template, types}) => {
const fs = require('fs');
const path = require('path');
const cwd = process.cwd();
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
/**
* Search the list of components that match the given file name
* and return the Moodle component for that file, if found.
*
* Throw an exception if no matching component is found.
*
* @throws {Error}
* @param {string} searchFileName The file name to look for.
* @return {string} Moodle component
*/
function getModuleNameFromFileName(searchFileName) {
searchFileName = fs.realpathSync(searchFileName);
const relativeFileName = searchFileName.replace(`${cwd}${path.sep}`, '').replace(/\\/g, '/');
const [componentPath, file] = relativeFileName.split('/amd/src/');
const fileName = file.replace('.js', '');
// Check subsystems first which require an exact match.
const componentName = ComponentList.getComponentFromPath(componentPath);
if (componentName) {
return `${componentName}/${fileName}`;
}
// This matches the previous PHP behaviour that would throw an exception
// if it couldn't parse an AMD file.
throw new Error(`Unable to find module name for ${searchFileName} (${componentPath}::${file}}`);
}
/**
* This is heavily inspired by the babel-plugin-add-module-exports plugin.
* See: https://github.com/59naga/babel-plugin-add-module-exports
*
* This is used when we detect a module using "export default Foo;" to make
* sure the transpiled code just returns Foo directly rather than an object
* with the default property (i.e. {default: Foo}).
*
* Note: This means that we can't support modules that combine named exports
* with a default export.
*
* @param {String} path
* @param {String} exportObjectName
*/
function addModuleExportsDefaults(path, exportObjectName) {
const rootPath = path.findParent(path => {
return path.key === 'body' || !path.parentPath;
});
// HACK: `path.node.body.push` instead of path.pushContainer(due doesn't work in Plugin.post).
// This is hardcoded to work specifically with AMD.
rootPath.node.body.push(template(`return ${exportObjectName}.default`)());
}
return {
pre() {
this.seenDefine = false;
this.addedReturnForDefaultExport = false;
},
visitor: {
// Plugin ordering is only respected if we visit the "Program" node.
// See: https://babeljs.io/docs/en/plugins.html#plugin-preset-ordering
//
// We require this to run after the other AMD module transformation so
// let's visit the "Program" node.
Program: {
exit(path) {
path.traverse({
CallExpression(path) {
// If we find a "define" function call.
if (!this.seenDefine && path.get('callee').isIdentifier({name: 'define'})) {
// We only want to modify the first instance of define that we find.
this.seenDefine = true;
// Get the Moodle component for the file being processed.
var moduleName = getModuleNameFromFileName(this.file.opts.filename);
// The function signature of `define()` is:
// define = function (name, deps, callback) {...}
// Ensure that if the moduel supplied its own name that it is replaced.
if (path.node.arguments.length > 0) {
// Ensure that there is only one name.
if (path.node.arguments[0].type === 'StringLiteral') {
// eslint-disable-next-line
console.log(`Replacing module name '${path.node.arguments[0].extra.rawValue}' with ${moduleName}`);
path.node.arguments.shift();
}
}
// Add the module name as the first argument to the define function.
path.node.arguments.unshift(types.stringLiteral(moduleName));
// Add a space after the define function in the built file so that previous versions
// of Moodle will not try to add the module name to the file when it's being served
// by PHP. This forces the regex in PHP to not match for this file.
path.node.callee.name = 'define ';
}
// Check for any Object.defineProperty('exports', 'default') calls.
if (!this.addedReturnForDefaultExport && path.get('callee').matchesPattern('Object.defineProperty')) {
const [identifier, prop] = path.get('arguments');
const objectName = identifier.get('name').node;
const propertyName = prop.get('value').node;
if ((objectName === 'exports' || objectName === '_exports') && propertyName === 'default') {
addModuleExportsDefaults(path, objectName);
this.addedReturnForDefaultExport = true;
}
}
},
AssignmentExpression(path) {
// Check for an exports.default assignments.
if (
!this.addedReturnForDefaultExport &&
(
path.get('left').matchesPattern('exports.default') ||
path.get('left').matchesPattern('_exports.default')
)
) {
const objectName = path.get('left.object.name').node;
addModuleExportsDefaults(path, objectName);
this.addedReturnForDefaultExport = true;
}
}
}, this);
}
}
}
};
};
-419
View File
@@ -1,419 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Helper functions for working with Moodle component names, directories, and sources.
*
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
/** @var {Object} A list of subsystems in Moodle */
const componentData = {};
/**
* Load details of all moodle modules.
*
* @returns {object}
*/
const fetchComponentData = () => {
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const gruntFilePath = process.cwd();
if (!Object.entries(componentData).length) {
componentData.subsystems = {};
componentData.pathList = [];
componentData.components = {};
componentData.standardComponents = {};
// Fetch the component definiitions from the distributed JSON file.
const components = JSON.parse(fs.readFileSync(`${gruntFilePath}/lib/components.json`));
const pluginData = JSON.parse(fs.readFileSync(`${gruntFilePath}/lib/plugins.json`));
componentData.pluginTypes = components.plugintypes;
const standardPlugins = Object.entries(pluginData.standard).map(
([pluginType, pluginNames]) => {
return pluginNames.map(pluginName => `${pluginType}_${pluginName}`);
}
).reduce((acc, val) => acc.concat(val), []);
// Build the list of moodle subsystems.
componentData.subsystems.lib = 'core';
componentData.pathList.push(process.cwd() + path.sep + 'lib');
for (const [component, thisPath] of Object.entries(components.subsystems)) {
if (thisPath) {
// Prefix "core_" to the front of the subsystems.
componentData.subsystems[thisPath] = `core_${component}`;
componentData.pathList.push(process.cwd() + path.sep + thisPath);
}
}
// The list of components includes the list of subsystems.
componentData.components = {...componentData.subsystems};
// Go through each of the plugintypes.
Object.entries(components.plugintypes).forEach(([pluginType, pluginTypePath]) => {
// We don't allow any code in this place..?
glob.sync(`${pluginTypePath}/*/version.php`).forEach(versionPath => {
const componentPath = fs.realpathSync(path.dirname(versionPath));
const componentName = path.basename(componentPath);
const frankenstyleName = `${pluginType}_${componentName}`;
componentData.components[`${pluginTypePath}/${componentName}`] = frankenstyleName;
componentData.pathList.push(componentPath);
// Look for any subplugins.
const subPluginConfigurationFile = `${componentPath}/db/subplugins.json`;
if (fs.existsSync(subPluginConfigurationFile)) {
const subpluginList = JSON.parse(fs.readFileSync(fs.realpathSync(subPluginConfigurationFile)));
Object.entries(subpluginList.plugintypes).forEach(([subpluginType, subpluginTypePath]) => {
glob.sync(`${subpluginTypePath}/*/version.php`).forEach(versionPath => {
const componentPath = fs.realpathSync(path.dirname(versionPath));
const componentName = path.basename(componentPath);
const frankenstyleName = `${subpluginType}_${componentName}`;
componentData.components[`${subpluginTypePath}/${componentName}`] = frankenstyleName;
componentData.pathList.push(componentPath);
});
});
}
});
});
// Create a list of the standard subsystem and plugins.
componentData.standardComponents = Object.fromEntries(
Object.entries(componentData.components).filter(([, name]) => {
if (name === 'core' || name.startsWith('core_')) {
return true;
}
return standardPlugins.indexOf(name) !== -1;
})
);
componentData.componentMapping = Object.fromEntries(
Object.entries(componentData.components).map(([path, name]) => [name, path])
);
}
return componentData;
};
/**
* Get the list of component paths.
*
* @param {string} relativeTo
* @returns {array}
*/
const getComponentPaths = (relativeTo = '') => fetchComponentData().pathList.map(componentPath => {
return componentPath.replace(relativeTo, '');
});
/**
* Get the list of paths to build AMD sources.
*
* @returns {Array}
*/
const getAmdSrcGlobList = () => {
const globList = [];
fetchComponentData().pathList.forEach(componentPath => {
globList.push(`${componentPath}/amd/src/*.js`);
globList.push(`${componentPath}/amd/src/**/*.js`);
});
return globList;
};
/**
* Get the list of paths to build YUI sources.
*
* @param {String} relativeTo
* @returns {Array}
*/
const getYuiSrcGlobList = relativeTo => {
const globList = [];
fetchComponentData().pathList.forEach(componentPath => {
const relativeComponentPath = componentPath.replace(relativeTo, '');
globList.push(`${relativeComponentPath}/yui/src/**/*.js`);
});
return globList;
};
/**
* Get the list of paths to thirdpartylibs.xml.
*
* @param {String} relativeTo
* @returns {Array}
*/
const getThirdPartyLibsList = relativeTo => {
const fs = require('fs');
const path = require('path');
return fetchComponentData().pathList
.map(componentPath => path.relative(relativeTo, componentPath) + '/thirdpartylibs.xml')
.map(componentPath => componentPath.replace(/\\/g, '/'))
.filter(path => fs.existsSync(path))
.sort();
};
/**
* Get the list of thirdparty library paths.
*
* @returns {array}
*/
const getThirdPartyPaths = () => {
const DOMParser = require('@xmldom/xmldom').DOMParser;
const fs = require('fs');
const path = require('path');
const xpath = require('xpath');
const thirdpartyfiles = getThirdPartyLibsList(fs.realpathSync('./'));
const libs = ['node_modules/', 'vendor/'];
const addLibToList = lib => {
if (!lib.match('\\*') && fs.statSync(lib).isDirectory()) {
// Ensure trailing slash on dirs.
lib = lib.replace(/\/?$/, '/');
}
// Look for duplicate paths before adding to array.
if (libs.indexOf(lib) === -1) {
libs.push(lib);
}
};
thirdpartyfiles.forEach(function(file) {
const dirname = path.dirname(file);
const xmlContent = fs.readFileSync(file, 'utf8');
const doc = new DOMParser().parseFromString(xmlContent);
const nodes = xpath.select("/libraries/library/location/text()", doc);
nodes.forEach(function(node) {
let lib = path.posix.join(dirname, node.toString());
addLibToList(lib);
});
});
return libs;
};
/**
* Find the name of the component matching the specified path.
*
* @param {String} path
* @returns {String|null} Name of matching component.
*/
const getComponentFromPath = path => {
const componentList = fetchComponentData().components;
if (componentList.hasOwnProperty(path)) {
return componentList[path];
}
return null;
};
/**
* Check whether the supplied path, relative to the Gruntfile.js, is in a known component.
*
* @param {String} checkPath The path to check. This can be with either Windows, or Linux directory separators.
* @returns {String|null}
*/
const getOwningComponentDirectory = checkPath => {
const path = require('path');
// Fetch all components into a reverse sorted array.
// This ensures that components which are within the directory of another component match first.
const pathList = Object.keys(fetchComponentData().components).sort().reverse();
for (const componentPath of pathList) {
// If the componentPath is the directory being checked, it will be empty.
// If the componentPath is a parent of the directory being checked, the relative directory will not start with ..
if (!path.relative(componentPath, checkPath).startsWith('..')) {
return componentPath;
}
}
return null;
};
/**
* Get the latest tag in a remote GitHub repository.
*
* @param {string} url The remote repository.
* @returns {Array}
*/
const getRepositoryTags = async(url) => {
const gtr = require('git-tags-remote');
try {
const tags = await gtr.get(url);
if (tags !== undefined) {
return tags;
}
} catch (error) {
return [];
}
return [];
};
/**
* Get the list of thirdparty libraries that could be upgraded.
*
* @returns {Array}
*/
const getThirdPartyLibsUpgradable = async() => {
const libraries = getThirdPartyLibsData().filter((library) => !!library.repository);
const upgradableLibraries = [];
const versionCompare = (a, b) => {
if (a === b) {
return 0;
}
const aParts = a.split('.');
const bParts = b.split('.');
for (let i = 0; i < Math.min(aParts.length, bParts.length); i++) {
const aPart = parseInt(aParts[i], 10);
const bPart = parseInt(bParts[i], 10);
if (aPart > bPart) {
// 1.1.0 > 1.0.9
return 1;
} else if (aPart < bPart) {
// 1.0.9 < 1.1.0
return -1;
} else {
// Same version.
continue;
}
}
if (aParts.length > bParts.length) {
// 1.0.1 > 1.0
return 1;
}
// 1.0 < 1.0.1
return -1;
};
for (let library of libraries) {
upgradableLibraries.push(
getRepositoryTags(library.repository).then((tagMap) => {
library.version = library.version.replace(/^v/, '');
const currentVersion = library.version.replace(/moodle-/, '');
const currentMajorVersion = library.version.split('.')[0];
const tags = [...tagMap]
.map((tagData) => tagData[0])
.filter((tag) => !tag.match(/(alpha|beta|rc)/))
.map((tag) => tag.replace(/^v/, ''))
.sort((a, b) => versionCompare(b, a));
if (!tags.length) {
library.warning = "Unable to find any comparable tags.";
return library;
}
library.latestVersion = tags[0];
tags.some((tag) => {
if (!tag) {
return false;
}
// See if the version part matches.
const majorVersion = tag.split('.')[0];
if (majorVersion === currentMajorVersion) {
library.latestSameMajorVersion = tag;
return true;
}
return false;
});
if (versionCompare(currentVersion, library.latestVersion) > 0) {
// Moodle somehow has a newer version than the latest version.
library.warning = `Newer version found: ${currentVersion} > ${library.latestVersion} for ${library.name}`;
return library;
}
if (library.version !== library.latestVersion) {
// Delete version and add it again at the end of the array. That way, current and new will stay closer.
delete library.version;
library.version = currentVersion;
return library;
}
return null;
})
);
}
return (await Promise.all(upgradableLibraries)).filter((library) => !!library);
};
/**
* Get the list of thirdparty libraries.
*
* @returns {Array}
*/
const getThirdPartyLibsData = () => {
const DOMParser = require('@xmldom/xmldom').DOMParser;
const fs = require('fs');
const xpath = require('xpath');
const path = require('path');
const libraryList = [];
const libraryFields = [
'location',
'name',
'version',
'repository',
];
const thirdpartyfiles = getThirdPartyLibsList(fs.realpathSync('./'));
thirdpartyfiles.forEach(function(libraryPath) {
const xmlContent = fs.readFileSync(libraryPath, 'utf8');
const doc = new DOMParser().parseFromString(xmlContent);
const libraries = xpath.select("/libraries/library", doc);
for (const library of libraries) {
const libraryData = [];
for (const field of libraryFields) {
libraryData[field] = xpath.select(`${field}/text()`, library)?.toString();
}
libraryData.location = path.join(path.dirname(libraryPath), libraryData.location);
libraryList.push(libraryData);
}
});
return libraryList.sort((a, b) => a.location.localeCompare(b.location));
};
module.exports = {
fetchComponentData,
getAmdSrcGlobList,
getComponentFromPath,
getComponentPaths,
getOwningComponentDirectory,
getYuiSrcGlobList,
getThirdPartyLibsList,
getThirdPartyPaths,
getThirdPartyLibsUpgradable,
};
-19
View File
@@ -1,19 +0,0 @@
# Moodle JavaScript Documentation
```
.-..-.
_____ | || |
/____/-.---_ .---. .---. .-.| || | .---.
| | _ _ |/ _ \/ _ \/ _ || |/ __ \
* | | | | | || |_| || |_| || |_| || || |___/
|_| |_| |_|\_____/\_____/\_____||_|\_____)
Moodle - the world's open source learning platform
```
## About
This generated documentation includes API documentation for JavaScript written in the AMD and ES2015 module formats within Moodle.
## Related information
See [https://moodledev.io](https://moodledev.io) for other related Developer Documentation.
-131
View File
@@ -1,131 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Helper functions for working with Moodle component names, directories, and sources.
*
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
"use strict";
/* eslint-env node */
// Do not include any plugins as stanard.
const plugins = [];
plugins.push('plugins/markdown');
/**
* Get the source configuration.
*
* @return {Object}
*/
const getSource = () => {
const glob = require('glob');
const path = require('path');
const ComponentList = require(path.resolve('.grunt/components.js'));
const thirdPartyPaths = ComponentList.getThirdPartyPaths();
const source = {
include: [],
includePattern: ".+\\.js$",
};
let includeList = [];
ComponentList.getAmdSrcGlobList().forEach(async pattern => {
includeList.push(...glob.sync(pattern));
});
const cwdLength = process.cwd().length + 1;
includeList.forEach(path => {
if (source.include.indexOf(path) !== -1) {
// Ensure no duplicates.
return;
}
const relPath = path.substring(cwdLength);
if (thirdPartyPaths.indexOf(relPath) !== -1) {
return;
}
source.include.push(path);
});
source.include.push('.grunt/jsdoc/README.md');
return source;
};
const tags = {
// Allow the use of unknown tags.
// We have a lot of legacy uses of these.
allowUnknownTags: true,
// We make use of jsdoc and closure dictionaries as standard.
dictionaries: [
'jsdoc',
'closure',
],
};
// Template configuraiton.
const templates = {
cleverLinks: false,
monospaceLinks: false,
};
module.exports = {
opts: {
destination: "./jsdoc/",
template: "node_modules/docdash",
},
plugins,
recurseDepth: 10,
source: getSource(),
sourceType: 'module',
tags,
templates,
docdash: {
collapse: true,
search: true,
sort: true,
sectionOrder: [
"Namespaces",
"Modules",
"Events",
"Classes",
"Externals",
"Mixins",
"Tutorials",
"Interfaces"
],
"menu": {
"Developer Docs": {
href: "https://moodledev.io",
target: "_blank",
"class": "menu-item",
id: "devdocs"
},
"MDN Docs": {
href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript",
target: "_blank",
"class": "menu-item",
id: "mdndocs",
},
},
typedefs: true,
},
};
-138
View File
@@ -1,138 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import * as Components from '../../components.js';
const componentData = Components.fetchComponentData();
/**
* The standard components shipped with core Moodle.
*
* @type {Object}
*/
export const standardComponents = componentData.standardComponents;
/**
* All components of the current Moodle instance.
*
* @type {Object}
*/
export const allComponents = componentData.components;
/**
* Get all components of the current Moodle instance.
*
* @returns {Array}
*/
export const getAllComponents = () => {
let components = new Map(Object.entries(componentData.pluginTypes).map(([value, path]) => ([path,{
path,
value,
name: `${value} (plugin type)`,
}])));
Object
.entries(componentData.components)
.filter(([path, value]) => Object.values(componentData.standardComponents).includes(value))
.forEach(([path, value]) => {
const entry = {
path,
value,
name: value,
};
if (Object.values(componentData.subsystems).includes(value)) {
if (components.has(path)) {
entry.name = `${value} (subsystem / plugintype)`;
} else {
entry.name = `${value} (subsystem)`;
}
}
components.set(path, entry);
});
return Array.from(components.values());
};
/**
* Whether the specified component is a standard component shipped with core Moodle.
*
* @param {string} componentName
* @returns {boolean}
*/
export const isStandardComponent = (componentName) => {
if (Object.values(componentData.standardComponents).includes(componentName)) {
return true;
}
if (Object.keys(componentData.pluginTypes).includes(componentName)) {
return true;
}
return false;
};
export const rewritePlugintypeAsSubsystem = (componentName) => {
if (Object.keys(componentData.pluginTypes).includes(componentName)) {
const pluginTypePath = componentData.pluginTypes[componentName];
if (Object.keys(componentData.subsystems).includes(pluginTypePath)) {
return true;
}
}
return false;
};
/**
* Whether the specified component is a community component.
*
* @param {string} componentName
* @returns {boolean}
*/
export const isCommunityComponent = (componentName) => {
if (isStandardComponent(componentName)) {
return false;
}
return Object.values(componentData.components).indexOf(componentName) !== -1;
};
/**
* Sort method for components.
*
* This method sorts components putting `core` first, followed by core subsystems, then everything else.
*
* @param {String} a
* @param {String} b
* @returns {Number}
*/
export const sortComponents = (a, b) => {
// Always put 'core' first.
if (a === 'core') {
return -1;
} else if (b === 'core') {
return 1;
}
// Put core subsystems next.
if (a.startsWith('core_') && !b.startsWith('core_')) {
return -1;
} else if (b.startsWith('core_') && !a.startsWith('core_')) {
return 1;
}
// Sort alphabetically for everything else.
return a.localeCompare(b);
};
-85
View File
@@ -1,85 +0,0 @@
#!/usr/bin/env node
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import inquirer from 'inquirer';
import chalk from 'chalk';
import { createNote } from './note.mjs';
import { getInitialValues } from './helpers.mjs';
import * as Prompts from './prompts.mjs';
import logger from './logger.mjs';
export default async (options) => {
// Processs the initial values.
const initialValues = getInitialValues(options);
// Fetch information.
const messages = [];
const { issueNumber } = await inquirer.prompt([
Prompts.getIssuePrompt(),
], initialValues);
let selection = {};
let notePath;
do {
selection = {};
selection = await inquirer.prompt([
Prompts.getComponentsPrompt(),
Prompts.getTypePrompt(),
Prompts.getMessagePromptInput(),
], initialValues);
if (selection.message === '') {
selection = Object.assign(
selection,
await inquirer.prompt([
Prompts.getMessagePromptEditor(),
]),
);
}
logger.info(`
Creating upgrade note with the following options:
- Issue: ${chalk.bold(issueNumber)}
- Component: ${chalk.bold(selection.components)}
- Type: ${chalk.bold(selection.type)}
- Message:
${chalk.bold(selection.message)}
`);
messages.push({
components: [selection.components],
type: selection.type,
message: selection.message,
});
// Save the note so far.
if (notePath) {
await createNote(issueNumber, messages, notePath);
logger.info(`Updated note at: ${chalk.underline(chalk.bold(notePath))}`);
} else {
notePath = await createNote(issueNumber, messages);
logger.info(`Note created at: ${chalk.underline(chalk.bold(notePath))}`);
}
selection = Object.assign(
selection,
await inquirer.prompt([
Prompts.getAddAnotherPrompt(),
], initialValues),
);
} while (selection.addAnother);
};
-357
View File
@@ -1,357 +0,0 @@
#!/usr/bin/env node
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import chalk from 'chalk';
import { getAllComponents } from './components.mjs';
import { getCombinedNotesByComponent, deleteAllNotes } from './note.mjs';
import { getNoteName } from './noteTypes.mjs';
import { writeFile, readFile, unlink } from 'fs/promises';
import { join as joinPath } from 'path';
import logger from './logger.mjs';
import { getCurrentVersion } from './helpers.mjs';
/**
* Helper to fetch the current notes from a file.
*
* @param {string} file
* @returns {Promise<string>}
*/
const getCurrentNotes = async (file) => {
try {
return await readFile(file, 'utf8');
} catch (error) {
return null;
}
}
/**
* Update the UPGRADING.md file.
*
* @param {string} upgradeNotes
* @param {Object} options
* @param {boolean} options.deleteNotes
* @returns {Promise<void>}
*/
const updateUpgradeNotes = async (upgradeNotes, options) => {
const fileName = 'UPGRADING.md';
// Write the notes to a file.
logger.info(`Writing notes to ${chalk.underline(chalk.bold(fileName))}`);
// Prepend to the existing file.
const existingContent = await getCurrentNotes(fileName);
if (existingContent) {
await writeFile(fileName, getUpdatedNotes(existingContent, upgradeNotes));
} else {
// This should not normally happen.
await writeFile(fileName, upgradeNotes);
}
if (options.deleteNotes) {
logger.warn(`>>> Deleting all notes <<<`)
// Delete the notes.
deleteAllNotes();
}
};
/**
* Create the current summary notes.
*
* @param {string} upgradeNotes
* @returns {Promise<void>}
*/
const createCurrentSummary = async (upgradeNotes) => {
const fileName = 'UPGRADING-CURRENT.md';
const notes = `# Moodle upgrade notes\n\n${upgradeNotes}`;
await writeFile(fileName, notes);
logger.info(`Running upgrade notes written to ${chalk.underline(chalk.bold(fileName))}`);
};
/**
* Get the indexes of the lines that contain the version headings.
*
* @param {array<string>} lines
* @returns {array<object>}
*/
const getVersionLineIndexes = (lines) => {
const h2Indexes = [];
lines.forEach((line, index) => {
const matches = line.match(/^##\s(?<version>.*)$/);
if (matches) {
h2Indexes.push({
index,
line,
version: matches.groups.version,
});
}
});
return h2Indexes;
};
/**
* Find the index of the Unreleased heading.
*
* @param {array<object>} versionHeadings
* @returns {number}
*/
const findUnreleasedHeadingIndex = (versionHeadings) => versionHeadings.findIndex((heading) => {
if (heading.version === 'Unreleased') {
// Used if version cannot be guessed.
return true;
}
if (heading.version.endsWith('+')) {
// Weekly release for a stable branch.
return true;
}
if (heading.version.match(/beta|rc\d/)) {
// Beta and RC rolls are treated as weeklies.
return true;
}
if (heading.version.endsWith('dev')) {
// Development version.
return true;
}
return false;
});
/**
* Get the before and after content, to facilitate replacing any existing Unreleased notes.
*
* @param {array<string>} lines
* @returns {Object} {beforeContent: string, afterContent: string}
*/
const getBeforeAndAfterContent = (lines) => {
const existingLines = lines.split('\n');
const versionHeadings = getVersionLineIndexes(existingLines);
if (versionHeadings.length > 0) {
const unreleasedHeadingIndex = findUnreleasedHeadingIndex(versionHeadings);
if (unreleasedHeadingIndex !== -1) {
const beforeContent = existingLines.slice(0, versionHeadings[unreleasedHeadingIndex].index).join('\n');
if (versionHeadings.length > unreleasedHeadingIndex + 1) {
const afterContent = existingLines.slice(versionHeadings[unreleasedHeadingIndex + 1].index).join('\n');
return {
beforeContent,
afterContent,
};
}
return {
beforeContent,
afterContent: '',
};
}
return {
beforeContent: existingLines.slice(0, versionHeadings[0].index).join('\n'),
afterContent: existingLines.slice(versionHeadings[0].index).join('\n'),
};
}
return {
beforeContent: existingLines.join('\n'),
afterContent: '',
}
};
/**
* Get the notes for the component.
*
* @param {string} types
* @param {Number} headingLevel
* @returns {string}
*/
const getNotesForComponent = (types, headingLevel) => {
let upgradeNotes = '';
Object.entries(types).forEach(([type, notes]) => {
upgradeNotes += '#'.repeat(headingLevel);
upgradeNotes += ` ${getNoteName(type)}\n\n`;
notes.forEach(({ message, issueNumber }) => {
// Split the message into lines, removing empty lines.
const messageLines = message
.split('\n')
// Remove empty lines between tables, and list entries, but not after lists.
.filter((line, index, lines) => {
if (line.trim().length === 0) {
// This line is empty.
// If it's the first line in the file, remove it.
if (index === 0) {
return false;
}
// This is the last line in the file, remove it.
if (index === lines.length - 1) {
return false;
}
// If the previous line relates to a table, remove this line.
if (lines[index - 1].match(/^\s*\|/)) {
return false;
}
// If the next line is also empty, do not remove this line.
if (lines[index + 1].trim().length === 0) {
return true;
}
// Do not remove the line if the previous line was a list item.
if (lines[index - 1].match(/^\s*[-*]\s/)) {
return true;
}
if (lines[index - 1].match(/^\s*\d+\.\s/)) {
return true;
}
// Preserve all other empty lines by default.
return true;
}
// Keep any line which has content.
return true;
});
const firstLine = messageLines.shift().trim();
upgradeNotes += `- ${firstLine}\n`;
messageLines
.forEach((line) => {
upgradeNotes += ` ${line}`.trimEnd() + `\n`;
});
upgradeNotes += `\n For more information see [${issueNumber}](https://tracker.moodle.org/browse/${issueNumber})\n`;
});
upgradeNotes += '\n';
});
return upgradeNotes;
};
/**
* Get the updated notes mixed with existing content.
*
* @param {string} existingContent
* @param {string} upgradeNotes
*/
const getUpdatedNotes = (existingContent, upgradeNotes) => {
const { beforeContent, afterContent } = getBeforeAndAfterContent(existingContent);
const newContent = `${beforeContent}\n${upgradeNotes}\n${afterContent}`
.split('\n')
.filter((line, index, lines) => {
if (line === '' && lines[index - 1] === '') {
// Remove multiple consecutive empty lines.
return false;
}
return true;
})
.join('\n');
return newContent;
};
/**
* Update the notes for each component.
*/
const updateComponentNotes = (
notes,
version,
notesFileName = 'UPGRADING.md',
removeEmpty = false,
) => {
return getAllComponents().map(async (component) => {
logger.verbose(`Updating notes for ${component.name} into ${component.path}`);
const fileName = joinPath(component.path, notesFileName);
const existingContent = await getCurrentNotes(fileName);
if (!existingContent) {
if (!notes[component.value]) {
// No existing notes, and no new notes to add.
return;
}
} else {
if (!notes[component.value]) {
// There is existing content, but nothing to add.
if (removeEmpty) {
logger.verbose(`Removing empty notes file ${fileName}`);
await unlink(fileName);
}
return;
}
}
const componentNotes = notes[component.value];
let upgradeNotes = `## ${version}\n\n`;
upgradeNotes += getNotesForComponent(componentNotes, 3);
if (existingContent) {
await writeFile(fileName, getUpdatedNotes(existingContent, upgradeNotes));
} else {
await writeFile(
fileName,
`# ${component.name} Upgrade notes\n\n${upgradeNotes}`,
);
}
});
}
/**
* Generate the upgrade notes for a new release.
*
* @param {string|undefined} version
* @param {Object} options
* @param {boolean} options.generateUpgradeNotes
* @param {boolean} options.deleteNotes
* @returns {Promise<void>}
*/
export default async (version, options = {}) => {
const notes = await getCombinedNotesByComponent();
if (Object.keys(notes).length === 0) {
logger.warn('No notes to generate');
return;
}
if (!version) {
version = await getCurrentVersion();
}
// Generate the upgrade notes for this release.
// We have
// - a title with the release name
// - the change types
// - which contain the components
// - which document each change
let upgradeNotes = `## ${version}\n\n`;
Object.entries(notes).forEach(([component, types]) => {
upgradeNotes += `### ${component}\n\n`;
upgradeNotes += getNotesForComponent(types, 4);
});
await Promise.all([
createCurrentSummary(upgradeNotes),
...updateComponentNotes(notes, version, 'UPGRADING-CURRENT.md', true),
]);
if (options.generateUpgradeNotes) {
await Promise.all(updateComponentNotes(notes, version));
await updateUpgradeNotes(upgradeNotes, options);
}
};
-230
View File
@@ -1,230 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import chalk from 'chalk';
import { isStandardComponent, isCommunityComponent, rewritePlugintypeAsSubsystem } from './components.mjs';
import { isValidNoteName } from './noteTypes.mjs';
import logger from './logger.mjs';
import { readFile } from 'fs/promises';
/**
* Validate an issue number input
*
* @param {string} input
* @returns {string|boolean}
*/
export const validateIssueNumber = (input) => {
if (!input) {
return 'You must provide a tracker issue number';
}
if (input.match(/^[a-zA-Z]*-\d+$/)) {
return true;
}
if (input.match(/^\d+$/)) {
return true;
}
return 'The issue number was not recognised as a valid issue number';
};
/**
* Format an issue number input.
*
* @param {string} input
* @returns {string}
*/
export const formatIssueNumber = (input) => {
if (input.match(/^[a-zA-Z]*-\d+$/)) {
return input;
}
if (input.match(/^\d+$/)) {
return `MDL-${input}`;
}
return input;
};
/**
* Validate a component.
*
* @param {string} input
* @returns {string|boolean}
*/
export const validateComponent = (input) => {
if (isStandardComponent(input)) {
return true;
}
if (isCommunityComponent(input)) {
return 'Currently only core plugins are supported.';
}
return 'The component was not recognised as a standard component';
};
export const formatComponent = (input) => {
if (rewritePlugintypeAsSubsystem(input)) {
return `core_${input}`;
}
return input;
}
/**
* Get the initial values from the options.
*
* @param {object} options
* @returns {object}
*/
export const getInitialValues = (options) => {
const initialValues = {};
const type = getInitialTypeValue(options);
if (type) {
initialValues.type = type;
}
const issueNumber = getInitialIssueValue(options);
if (issueNumber) {
initialValues.issueNumber = issueNumber;
}
const component = getInitialComponentValue(options);
if (component) {
initialValues.components = component;
}
const message = getInitialMessageValue(options);
if (message) {
initialValues.message = message
initialValues.addAnother = false;
}
return initialValues;
};
/**
* Get the initial type value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialTypeValue = (options) => {
if (!options.type) {
return;
}
options.type = options.type.trim().toLowerCase();
if (isValidNoteName(options.type)) {
return options.type;
}
logger.warn(`Note type "${chalk.underline(chalk.red(options.type))}" is not valid.`);
};
/**
* Get the initial issue number value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialIssueValue = (options) => {
if (!options.issue) {
return;
}
options.issue = options.issue.trim().toUpperCase();
const issueNumberValidated = validateIssueNumber(options.issue);
if (issueNumberValidated === true) {
const issueNumber = formatIssueNumber(options.issue);
if (issueNumber !== options.issue) {
logger.warn(
`Issue number "${chalk.underline(chalk.red(options.issue))}" was updated to ` +
`"${chalk.underline(chalk.green(issueNumber))}"`
);
}
return issueNumber;
} else {
logger.warn(`Issue number "${chalk.underline(chalk.red(options.issue))}" is not valid: ${issueNumberValidated}`);
}
};
/**
* Get the initial component value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialComponentValue = (options) => {
if (!options.component) {
return;
}
options.component = options.component.trim().toLowerCase();
const componentValidated = validateComponent(options.component);
if (componentValidated === true) {
const component = formatComponent(options.component);
if (component !== options.component) {
logger.warn(
`Component "${chalk.underline(chalk.red(options.component))}" was updated to ` +
`"${chalk.underline(chalk.green(component))}"`
);
}
return component;
} else {
logger.warn(`Component "${chalk.underline(chalk.red(options.component))}" is not valid: ${componentValidated}`);
}
};
/**
* Get the initial message value.
*
* @param {Object} options
* @returns {string|undefined}
*/
const getInitialMessageValue = (options) => {
if (!options.message) {
return;
}
return options.message.trim();
};
/**
* Get the current version from the project /version.php file.
*
* @returns {Promise<string>}
*/
export const getCurrentVersion = async () => {
const versionRegex = new RegExp(/^ *\$release *= *['\"](?<release>[^ \+]+\+?) *\(Build:.*/m);
try {
const versionFile = await readFile('version.php', 'utf8');
const match = versionFile.match(versionRegex);
if (match) {
return match.groups.release;
}
} catch(error) {
logger.error('Unable to read the version file');
}
return "Unreleased";
}
-30
View File
@@ -1,30 +0,0 @@
#!/usr/bin/env node
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import winston from 'winston';
const logger = winston.createLogger({
level: 'info',
format: winston.format.combine(
winston.format.colorize(),
winston.format.simple()
),
transports: [
new winston.transports.Console(),
],
});
export default logger;
-194
View File
@@ -1,194 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import yaml from 'js-yaml';
import path from 'path';
import { writeFile, mkdir, readdir, readFile, unlink } from 'fs/promises';
import { isValidNoteName, sortNoteTypes } from './noteTypes.mjs';
import { sortComponents } from './components.mjs';
const unreleasedPath = path.resolve('.upgradenotes');
/**
* Get the filename for the note.
*
* @param {string} issueNumnber The issue number
* @returns {string}
*/
const getFilename = (issueNumber) => {
const dateTimeFormat = new Intl.DateTimeFormat(undefined, {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
fractionalSecondDigits: 2,
timeZone: 'UTC',
});
const date = Object.fromEntries(
dateTimeFormat.formatToParts(new Date())
.filter((p) => p.type !== 'literal')
.map((p) => ([p.type, p.value]))
);
const dateString = [
date.year,
date.month,
date.day,
date.hour,
date.minute,
date.second,
date.fractionalSecond,
].join('');
return `${issueNumber}-${dateString}.yml`;
};
/**
* Create a new note.
*
* @param {string} issueNumber
* @param {[type: string]: {message: string}} messages
* @returns {string} The path to the note on disk
*/
export const createNote = async (
issueNumber,
messages,
notePath,
) => {
const note = {
issueNumber,
notes: {},
};
messages.forEach(({components, type, message}) => {
note.notes[components] = note.notes[components] || [];
note.notes[components].push({message, type});
});
if (!notePath) {
notePath = path.resolve(unreleasedPath, getFilename(issueNumber));
}
const noteContent = yaml.dump(note);
await mkdir(unreleasedPath, {recursive: true});
await writeFile(notePath, noteContent);
return notePath;
};
/**
* Get all unreleased notes.
*
* @returns {Promise<{issueNumber: string, components: string[], types: {[type: string]: {message: string}[]}}[]>
*/
export const getAllNotes = async () => {
const files = await readdir(unreleasedPath);
const notes = files
.filter((file) => file.endsWith('.yml'))
.map(async (file) => {
const filePath = path.resolve(unreleasedPath, file);
const fileContent = await readFile(filePath, 'utf8');
return {
...yaml.load(fileContent),
filePath,
};
});
return Promise.all(notes);
};
/**
* Get the list of notes, grouped by note type, then component.
*
* @returns {Promise<{[type: string]: {[components: string]: {message: string, issueNumber: string}[]}}>}
*/
export const getCombinedNotes = async () => {
const notes = await getAllNotes();
const combinedNotes = {};
notes.forEach((note) => {
Object.entries(note.notes).forEach(([components, data]) => {
data.forEach((entry) => {
if (!isValidNoteName(entry.type)) {
throw new Error(`Invalid note type: "${entry.type}" in file ${note.filePath}`);
}
combinedNotes[entry.type] = combinedNotes[entry.type] || {};
combinedNotes[entry.type][components] = combinedNotes[entry.type][components] || [];
combinedNotes[entry.type][components].push({message: entry.message, issueNumber: note.issueNumber});
});
});
});
return combinedNotes;
};
/**
* Get the list of notes, grouped by component, then by note type.
*
* @returns {Promise<{[component: string]: {[type: string]: {message: string, issueNumber: string}[]}}>}
*/
export const getCombinedNotesByComponent = async () => {
const notes = await getAllNotes();
const combinedNotes = {};
notes.forEach((note) => {
Object.entries(note.notes).forEach(([component, data]) => {
combinedNotes[component] = combinedNotes[component] || {};
data.forEach((entry) => {
if (!isValidNoteName(entry.type)) {
throw new Error(`Invalid note type: "${entry.type}" in file ${note.filePath}`);
}
combinedNotes[component][entry.type] = combinedNotes[component][entry.type] || [];
combinedNotes[component][entry.type].push({
component,
message: entry.message,
issueNumber: note.issueNumber,
type: entry.type,
});
});
});
});
// Sort notes by note type.
Object.entries(combinedNotes).forEach(([component, types]) => {
combinedNotes[component] = Object.fromEntries(
Object.entries(types).sort(([a], [b]) => sortNoteTypes(a, b))
);
});
// Sort components.
return Object.fromEntries(
Object.entries(combinedNotes).sort(([a], [b]) => sortComponents(a, b))
);
};
/**
* Delete all unreleased notes.
*
* @returns {Promise<void>}
*/
export const deleteAllNotes = async () => {
const files = await readdir(unreleasedPath);
return Promise.all(
files
.filter((item, index) => files.indexOf(item) === index)
.filter((file) => file.endsWith('.yml'))
.map((file) => unlink(`${unreleasedPath}/${file}`))
);
};
-80
View File
@@ -1,80 +0,0 @@
// 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/>.
/**
* The note types.
*
* Matches the suggested order in https://keepachangelog.com/en/1.1.0/.
* @type {Object<string, string>}
*/
const noteTypes = {
'improved': 'Added',
'changed': 'Changed',
'deprecated': 'Deprecated',
'removed': 'Removed',
'fixed': 'Fixed',
};
/**
* The preferred order of note types.
*
* @type {string[]}
*/
const preferredOrder = Object.keys(noteTypes);
/**
* Comparison method to sort note types.
*
* @param {String} a
* @param {String} b
* @returns {Number}
*/
export const sortNoteTypes = (a, b) => {
const aIndex = preferredOrder.indexOf(a);
const bIndex = preferredOrder.indexOf(b);
if (aIndex === -1) {
return 1;
}
if (bIndex === -1) {
return -1;
}
return aIndex - bIndex;
};
/**
* Get the note names.
*
* @returns {string[]}
*/
export const getNoteNames = () => Object.keys(noteTypes);
/**
* Get the human-readable note name.
*
* @param {string} type
* @returns {string}
*/
export const getNoteName = (type) => noteTypes[type];
/**
* Whether the note name is valid.
*
* @param {string} type
* @returns {boolean}
*/
export const isValidNoteName = (type) => noteTypes[type] !== undefined;
-153
View File
@@ -1,153 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import inquirer from 'inquirer';
import SearchList from 'inquirer-search-list';
import { getNoteNames } from './noteTypes.mjs';
import { getAllComponents } from './components.mjs';
import {
formatComponent,
formatIssueNumber,
validateComponent,
validateIssueNumber,
} from './helpers.mjs';
/**
* A Search List which accepts an initial value.
*/
class SearchListWithInitialValue extends SearchList {
constructor(options, ...args) {
super(options, ...args);
if (options.default) {
const pointer = this.filterList.findIndex((item) => {
return item.value === options.default;
});
if (pointer > -1) {
this.pointer = pointer;
}
}
}
}
inquirer.registerPrompt('search-list', SearchListWithInitialValue);
/**
* Get the issue type prompt.
*
* @param {string} defaultData The initially selected value
* @returns {Object}
*/
export const getTypePrompt = (defaultData) => ({
default: defaultData,
type: 'search-list',
message: 'Type of change',
name: 'type',
choices: getNoteNames(),
validate: (selection) => {
if (selection.length < 1) {
return 'You must select at least one type of change';
}
return true;
},
});
/**
* Get the component prompt.
*
* @param {string} [defaultValue='core'] The initally selected value.
* @returns
*/
export const getComponentsPrompt = (defaultValue) => {
if (!defaultValue ) {
defaultValue = 'core';
}
return {
choices: getAllComponents(),
default: defaultValue,
type: 'search-list',
message: 'Component',
name: 'components',
validate: validateComponent,
filter: formatComponent,
};
};
/**
* Get the issue number prompt as an inline input.
*
* @param {string} defaultData
* @returns {object}
*/
export const getIssuePrompt = (defaultData) => ({
default: defaultData,
type: 'input',
message: 'Tracker issue number',
name: 'issueNumber',
validate: validateIssueNumber,
filter: formatIssueNumber,
});
/**
* Get a message prompt.
*
* @param {string} defaultData
* @returns
*/
export const getMessagePromptEditor = (defaultData) => ({
default: defaultData,
type: process.stdin.isTTY ? 'editor' : 'input',
postfix: '.md',
message: 'Message',
name: 'message',
waitUserInput: false,
validate: (input) => {
if (!input) {
return 'You must provide a message';
}
return true;
},
// Remove any trailing whitespace.
filter: (input) => input.split('\n').map((line) => line.trimEnd()).join('\n'),
});
/**
* Get a message prompt.
*
* @param {string} defaultData
* @returns
*/
export const getMessagePromptInput = (defaultData) => ({
default: defaultData,
type: 'input',
message: 'Message (leave empty to use editor)',
name: 'message',
filter: (input) => input.trim(),
});
/**
* Get a prompt to ask the user if they wish to add another entry.
*
* @returns {Object}
*/
export const getAddAnotherPrompt = () => ({
type: 'confirm',
message: 'Do you want to add another note?',
default: false,
name: 'addAnother',
});
-142
View File
@@ -1,142 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* Component Library build tasks.
*
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Get a child path of the component library.
*
* @param {string} path
* @returns {string}
*/
const getCLPath = path => `admin/tool/componentlibrary/${path}`;
/**
* Get a spawn handler.
*
* This is a generic function to write the spawn output, and then to exit if required and mark the async task as
* complete.
*
* @param {Promise} done
* @returns {function}
*/
const getSpawnHandler = done => (error, result, code) => {
grunt.log.write(result);
if (error) {
grunt.log.error(result.stdout);
process.exit(code);
}
done();
};
/**
* Spawn a function against Node with the provided args.
*
* @param {array} args
* @returns {object}
*/
const spawnNodeCall = (args) => grunt.util.spawn({
cmd: 'node',
args,
}, getSpawnHandler(grunt.task.current.async()));
/**
* Build the docs using Hugo.
*
* @returns {Object} Reference to the spawned task
*/
const docsBuild = () => spawnNodeCall([
'node_modules/hugo-bin/cli.js',
'--config', getCLPath('config.yml'),
'--cleanDestinationDir',
]);
/**
* Build the docs index using the hugo-lunr-indexer.
*
* @returns {Object} Reference to the spawned task
*/
const indexBuild = () => spawnNodeCall([
'node_modules/hugo-lunr-indexer/bin/hli.js',
'-i', getCLPath('content/**'),
'-o', getCLPath('hugo/site/data/my-index.json'),
'-l', 'yaml',
'-d', '---',
]);
/**
* Build the hugo CSS.
*
* @returns {Object} Reference to the spawned task
*/
const cssBuild = () => spawnNodeCall([
'node_modules/sass/sass.js',
'--style', 'expanded',
'--source-map',
'--embed-sources',
'--precision', 6,
'--load-path', process.cwd(),
getCLPath('hugo/scss/docs.scss'),
getCLPath('hugo/dist/css/docs.css'),
]);
// Register the various component library tasks.
grunt.registerTask('componentlibrary:docsBuild', 'Build the component library', docsBuild);
grunt.registerTask('componentlibrary:cssBuild', 'Build the component library', cssBuild);
grunt.registerTask('componentlibrary:indexBuild', 'Build the component library', indexBuild);
grunt.registerTask('componentlibrary', 'Build the component library', [
'componentlibrary:docsBuild',
'componentlibrary:cssBuild',
'componentlibrary:indexBuild',
]);
grunt.config.merge({
watch: {
componentLibraryDocs: {
files: [
getCLPath('content/**/*.md'),
getCLPath('hugo'),
],
tasks: ['componentlibrary:docsBuild', 'componentlibrary:indexBuild'],
},
componentLibraryCSS: {
files: [
getCLPath('hugo/scss/**/*.scss'),
'hugo',
],
tasks: ['componentlibrary:cssBuild'],
},
},
});
// Add the 'componentlibrary' task as a startup task.
grunt.moodleEnv.startupTasks.push('componentlibrary');
return {
docsBuild,
cssBuild,
indexBuild,
};
};
-64
View File
@@ -1,64 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
const files = grunt.moodleEnv.files;
// Project configuration.
grunt.config.merge({
eslint: {
// Even though warnings dont stop the build we don't display warnings by default because
// at this moment we've got too many core warnings.
// To display warnings call: grunt eslint --show-lint-warnings
// To fail on warnings call: grunt eslint --max-lint-warnings=0
// Also --max-lint-warnings=-1 can be used to display warnings but not fail.
options: {
quiet: (!grunt.option('show-lint-warnings')) && (typeof grunt.option('max-lint-warnings') === 'undefined'),
maxWarnings: ((typeof grunt.option('max-lint-warnings') !== 'undefined') ? grunt.option('max-lint-warnings') : -1)
},
// Check AMD src files.
amd: {src: files ? files : grunt.moodleEnv.amdSrc},
// Check YUI module source files.
yui: {src: files ? files : grunt.moodleEnv.yuiSrc},
},
});
grunt.loadNpmTasks('grunt-eslint');
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('eslint.amd.src', files);
grunt.config('eslint.yui.src', files);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', (action, filepath) => {
changedFiles[filepath] = action;
onChange();
});
};
-92
View File
@@ -1,92 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Get the list of feature files to pass to the gherkin linter.
*
* @returns {Array}
*/
const getGherkinLintTargets = () => {
if (grunt.moodleEnv.files) {
// Specific files were requested. Only check these.
return grunt.moodleEnv.files;
}
if (grunt.moodleEnv.inComponent) {
return [`${grunt.moodleEnv.runDir}/tests/behat/*.feature`];
}
return ['**/tests/behat/*.feature'];
};
const handler = function() {
const done = this.async();
const options = grunt.config('gherkinlint.options');
// Grab the gherkin-lint linter and required scaffolding.
const linter = require('gherkin-lint/dist/linter.js');
const featureFinder = require('gherkin-lint/dist/feature-finder.js');
const configParser = require('gherkin-lint/dist/config-parser.js');
const formatter = require('gherkin-lint/dist/formatters/stylish.js');
// Run the linter.
return linter.lint(
featureFinder.getFeatureFiles(grunt.file.expand(options.files)),
configParser.getConfiguration(configParser.defaultConfigFileName)
)
.then(results => {
// Print the results out uncondtionally.
formatter.printResults(results);
return results;
})
.then(results => {
// Report on the results.
// The done function takes a bool whereby a falsey statement causes the task to fail.
return results.every(result => result.errors.length === 0);
})
.then(done); // eslint-disable-line promise/no-callback-in-promise
};
grunt.registerTask('gherkinlint', 'Run gherkinlint against the current directory', handler);
grunt.config.set('gherkinlint', {
options: {
files: getGherkinLintTargets(),
}
});
grunt.config.merge({
watch: {
gherkinlint: {
files: [grunt.moodleEnv.inComponent ? 'tests/behat/*.feature' : '**/tests/behat/*.feature'],
tasks: ['gherkinlint'],
},
},
});
// Add the 'gherkinlint' task as a startup task.
grunt.moodleEnv.startupTasks.push('gherkinlint');
return handler;
};
-100
View File
@@ -1,100 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Generate the PHPCS configuration.
*
* @param {Object} thirdPartyPaths
*/
const phpcsIgnore = (thirdPartyPaths) => {
const {toXML} = require('jstoxml');
const config = {
_name: 'ruleset',
_attrs: {
name: "MoodleCore",
},
_content: [
{
rule: {
_attrs: {
ref: './phpcs.xml.dist',
},
},
},
],
};
thirdPartyPaths.forEach(library => {
config._content.push({
'exclude-pattern': library,
});
});
grunt.file.write('phpcs.xml', toXML(config, {
header: true,
indent: ' ',
}) + "\n");
};
/**
* Generate ignore files (utilising thirdpartylibs.xml data)
*/
const handler = function() {
const path = require('path');
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
// An array of paths to third party directories.
const thirdPartyPaths = ComponentList.getThirdPartyPaths();
// Generate .eslintignore.
const eslintIgnores = [
'# Generated by "grunt ignorefiles"',
// Do not ignore the .grunt directory.
'!/.grunt',
// Ignore all yui/src meta directories and build directories.
'*/**/yui/src/*/meta/',
'*/**/build/',
].concat(thirdPartyPaths);
grunt.file.write('.eslintignore', eslintIgnores.join('\n') + '\n');
// Generate .stylelintignore.
const stylelintIgnores = [
'# Generated by "grunt ignorefiles"',
'**/yui/build/*',
'theme/boost/style/moodle.css',
'theme/classic/style/moodle.css',
'jsdoc/styles/*.css',
'admin/tool/componentlibrary/hugo/dist/css/docs.css',
].concat(thirdPartyPaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
phpcsIgnore(thirdPartyPaths);
};
grunt.registerTask('ignorefiles', 'Generate ignore files for linters', handler);
return handler;
};
-215
View File
@@ -1,215 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Function to generate the destination for the minification task
* (e.g. build/file.min.js). This function will be passed to
* the rename property of files array when building dynamically:
* http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
*
* @param {String} destPath the current destination
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
const babelRename = function(destPath, srcPath) {
destPath = srcPath.replace(`amd/src`, `amd/build`);
destPath = destPath.replace(/\.js$/, '.min.js');
return destPath;
};
module.exports = grunt => {
// Load the Ignorefiles tasks.
require('./ignorefiles')(grunt);
// Load the Shifter tasks.
require('./shifter')(grunt);
// Load ESLint.
require('./eslint')(grunt);
// Load jsconfig.
require('./jsconfig')(grunt);
// Load JSDoc.
require('./jsdoc')(grunt);
const path = require('path');
// Register JS tasks.
grunt.registerTask('yui', ['eslint:yui', 'shifter']);
grunt.registerTask('amd', ['ignorefiles', 'eslint:amd', 'rollup']);
grunt.registerTask('js', ['amd', 'yui']);
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-rollup');
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 => {
grunt.log.debug(`Item resolved. Kicking off next one.`);
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(options) => {
return new Promise(resolve => {
queue.push(resolve);
startQueue();
return options;
});
},
// When an item in the queue completes, start the next item in the queue.
generateBundle: (options, bundle) => {
grunt.log.debug(`Finished output phase for ${Object.keys(bundle).join(', ')}`);
runQueue();
},
};
};
const terser = require('rollup-plugin-terser').terser;
grunt.config.merge({
rollup: {
options: {
format: 'esm',
dir: 'output',
sourcemap: true,
treeshake: false,
context: 'window',
plugins: [
rateLimit(),
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('.grunt/babel-plugin-add-module-to-define.js')
],
presets: [
['@babel/preset-env', {
modules: false,
useBuiltIns: false
}]
]
}),
terser({
// Do not mangle variables.
// Makes debugging easier.
mangle: false,
}),
],
},
dist: {
files: [{
expand: true,
src: grunt.moodleEnv.files ? grunt.moodleEnv.files : grunt.moodleEnv.amdSrc,
rename: babelRename
}],
},
},
});
grunt.config.merge({
watch: {
amd: {
files: grunt.moodleEnv.inComponent
? ['amd/src/*.js', 'amd/src/**/*.js']
: ['**/amd/src/**/*.js'],
tasks: ['amd']
},
},
});
// Add the 'js' task as a startup task.
grunt.moodleEnv.startupTasks.push('js');
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('rollup.dist.files', [{expand: true, src: files, rename: babelRename}]);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', function(action, filepath) {
changedFiles[filepath] = action;
onChange();
});
return {
babelRename,
};
};
-53
View File
@@ -1,53 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2022 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
const configuration = {
compilerOptions: {
baseUrl: ".",
paths: {
},
target: "es2015",
allowSyntheticDefaultImports: false,
},
exclude: [
"node_modules",
],
include: [],
};
module.exports = (grunt) => {
const handler = () => {
const jsconfigData = Object.assign({}, configuration);
const path = require('path');
const {fetchComponentData} = require(path.join(process.cwd(), '.grunt', 'components.js'));
const componentData = fetchComponentData().components;
for (const [thisPath, component] of Object.entries(componentData)) {
jsconfigData.compilerOptions.paths[`${component}/*`] = [`${thisPath}/amd/src/*`];
jsconfigData.include.push(`${thisPath}/amd/src/**/*`);
}
grunt.file.write('jsconfig.json', JSON.stringify(jsconfigData, null, " ") + "\n");
};
grunt.registerTask('jsconfig', 'Generate a jsconfig configuration compatible with the LSP', handler);
};
-52
View File
@@ -1,52 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = (grunt) => {
const path = require('path');
grunt.registerTask('jsdoc', 'Generate JavaScript documentation using jsdoc', function() {
const done = this.async();
const configuration = path.resolve('.grunt/jsdoc/jsdoc.conf.js');
grunt.util.spawn({
cmd: 'jsdoc',
args: [
'--configure',
configuration,
]
}, function(error, result, code) {
if (result.stdout) {
grunt.log.write(result.stdout);
}
if (result.stderr) {
grunt.log.error(result.stderr);
}
if (error) {
grunt.fail.fatal(`JSDoc failed with error code ${code}`);
} else {
grunt.log.write('JSDoc completed successfully'.green);
}
done();
});
});
};
-40
View File
@@ -1,40 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
grunt.loadNpmTasks('grunt-sass');
grunt.config.merge({
sass: {
dist: {
files: {
"theme/boost/style/moodle.css": "theme/boost/scss/preset/default.scss",
"theme/classic/style/moodle.css": "theme/classic/scss/classicgrunt.scss"
}
},
options: {
implementation: require('sass'),
includePaths: ["theme/boost/scss/", "theme/classic/scss/"]
}
},
});
};
-155
View File
@@ -1,155 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/* eslint-env node */
module.exports = grunt => {
/**
* Shifter task. Is configured with a path to a specific file or a directory,
* in the case of a specific file it will work out the right module to be built.
*
* Note that this task runs the invidiaul shifter jobs async (becase it spawns
* so be careful to to call done().
*/
const handler = function() {
const done = this.async();
const options = grunt.config('shifter.options');
const async = require('async');
const path = require('path');
// Run the shifter processes one at a time to avoid confusing output.
async.eachSeries(options.paths, function(src, filedone) {
var args = [];
args.push(path.normalize(process.cwd() + '/node_modules/shifter/bin/shifter'));
// Always ignore the node_modules directory.
args.push('--excludes', 'node_modules');
// Determine the most appropriate options to run with based upon the current location.
if (grunt.file.isMatch('**/yui/**/*.js', src)) {
// When passed a JS file, build our containing module (this happen with
// watch).
grunt.log.debug('Shifter passed a specific JS file');
src = path.dirname(path.dirname(src));
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src', src)) {
// When in a src directory --walk all modules.
grunt.log.debug('In a src directory');
args.push('--walk');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*', src)) {
// When in module, only build our module.
grunt.log.debug('In a module directory');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*/js', src)) {
// When in module src, only build our module.
grunt.log.debug('In a source directory');
src = path.dirname(src);
options.recursive = false;
}
if (grunt.option('watch')) {
grunt.fail.fatal('The --watch option has been removed, please use `grunt watch` instead');
}
// Add the stderr option if appropriate
if (grunt.option('verbose')) {
args.push('--lint-stderr');
}
if (grunt.option('no-color')) {
args.push('--color=false');
}
var execShifter = function() {
grunt.log.ok("Running shifter on " + src);
grunt.util.spawn({
cmd: "node",
args: args,
opts: {cwd: src, stdio: 'inherit', env: process.env}
}, function(error, result, code) {
if (code) {
grunt.fail.fatal('Shifter failed with code: ' + code);
} else {
grunt.log.ok('Shifter build complete.');
filedone();
}
});
};
// Actually run shifter.
if (!options.recursive) {
execShifter();
} else {
// Check that there are yui modules otherwise shifter ends with exit code 1.
if (grunt.file.expand({cwd: src}, '**/yui/src/**/*.js').length > 0) {
args.push('--recursive');
execShifter();
} else {
grunt.log.ok('No YUI modules to build.');
filedone();
}
}
}, done);
};
// Register the shifter task.
grunt.registerTask('shifter', 'Run Shifter against the current directory', handler);
// Configure it.
grunt.config.set('shifter', {
options: {
recursive: true,
// Shifter takes a relative path.
paths: grunt.moodleEnv.files ? grunt.moodleEnv.files : [grunt.moodleEnv.runDir]
}
});
grunt.config.merge({
watch: {
yui: {
files: grunt.moodleEnv.inComponent
? ['yui/src/*.json', 'yui/src/**/*.js']
: ['**/yui/src/**/*.js'],
tasks: ['yui']
},
},
});
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('shifter.options.paths', files);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', (action, filepath) => {
changedFiles[filepath] = action;
onChange();
});
return handler;
};
-46
View File
@@ -1,46 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Generate ignore files (utilising thirdpartylibs.xml data)
*/
const handler = function() {
const path = require('path');
// Are we in a YUI directory?
if (path.basename(path.resolve(grunt.moodleEnv.cwd, '../../')) == 'yui') {
grunt.task.run('yui');
// Are we in an AMD directory?
} else if (grunt.moodleEnv.inAMD) {
grunt.task.run('amd');
} else {
// Run all of the requested startup tasks.
grunt.moodleEnv.startupTasks.forEach(taskName => grunt.task.run(taskName));
}
};
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', handler);
return handler;
};
-35
View File
@@ -1,35 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
// Load the ignorefiles tasks.
require('./ignorefiles')(grunt);
// Load the Style Lint tasks.
require('./stylelint')(grunt);
// Load the SASS tasks.
require('./sass')(grunt);
// Add the 'css' task as a startup task.
grunt.moodleEnv.startupTasks.push('css');
};
-187
View File
@@ -1,187 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
const getCssConfigForFiles = files => {
return {
stylelint: {
css: {
// Use a fully-qualified path.
src: files,
options: {
quietDeprecationWarnings: true,
configOverrides: {
rules: {
// These rules have to be disabled in .stylelintrc for scss compat.
"at-rule-no-unknown": true,
}
}
}
},
},
};
};
const getScssConfigForFiles = files => {
return {
stylelint: {
scss: {
options: {
quietDeprecationWarnings: true,
customSyntax: 'postcss-scss',
},
src: files,
},
},
};
};
/**
* Register any stylelint tasks.
*
* @param {Object} grunt
* @param {Array} files
* @param {String} fullRunDir
*/
const registerStyleLintTasks = () => {
const glob = require('glob');
// The stylelinters do not handle the case where a configuration was provided but no files were included.
// Keep track of whether any files were found.
let hasCss = false;
let hasScss = false;
// The stylelint processors do not take a path argument. They always check all provided values.
// As a result we must check through each glob and determine if any files match the current directory.
const scssFiles = [];
const cssFiles = [];
const requestedFiles = grunt.moodleEnv.files;
if (requestedFiles) {
// Grunt was called with a files argument.
// Check whether each of the requested files matches either the CSS or SCSS source file list.
requestedFiles.forEach(changedFilePath => {
let matchesGlob;
// Check whether this watched path matches any watched SCSS file.
matchesGlob = grunt.moodleEnv.scssSrc.some(watchedPathGlob => {
return glob.sync(watchedPathGlob).indexOf(changedFilePath) !== -1;
});
if (matchesGlob) {
scssFiles.push(changedFilePath);
hasScss = true;
}
// Check whether this watched path matches any watched CSS file.
matchesGlob = grunt.moodleEnv.cssSrc.some(watchedPathGlob => {
return glob.sync(watchedPathGlob).indexOf(changedFilePath) !== -1;
});
if (matchesGlob) {
cssFiles.push(changedFilePath);
hasCss = true;
}
});
} else {
// Grunt was called without a list of files.
// The start directory (runDir) may be a child dir of the project.
// Check each scssSrc file to see if it's in the start directory.
// This means that we can lint just mod/*/styles.css if started in the mod directory.
grunt.moodleEnv.scssSrc.forEach(path => {
if (path.startsWith(grunt.moodleEnv.runDir)) {
scssFiles.push(path);
hasScss = true;
}
});
grunt.moodleEnv.cssSrc.forEach(path => {
if (path.startsWith(grunt.moodleEnv.runDir)) {
cssFiles.push(path);
hasCss = true;
}
});
}
// Register the tasks.
const scssTasks = ['sass'];
if (hasScss) {
grunt.config.merge(getScssConfigForFiles(scssFiles));
scssTasks.unshift('stylelint:scss');
}
scssTasks.unshift('ignorefiles');
const cssTasks = ['ignorefiles'];
if (hasCss) {
grunt.config.merge(getCssConfigForFiles(cssFiles));
cssTasks.push('stylelint:css');
}
// The tasks must be registered, even if empty to ensure a consistent command list.
// They jsut won't run anything.
grunt.registerTask('scss', scssTasks);
grunt.registerTask('rawcss', cssTasks);
};
// Register CSS tasks.
grunt.loadNpmTasks('grunt-stylelint');
// Register the style lint tasks.
registerStyleLintTasks();
grunt.registerTask('css', ['scss', 'rawcss']);
const getCoreThemeMatches = () => {
const scssMatch = 'scss/**/*.scss';
if (grunt.moodleEnv.inTheme) {
return [scssMatch];
}
if (grunt.moodleEnv.runDir.startsWith('theme')) {
return [`*/${scssMatch}`];
}
return [`theme/*/${scssMatch}`];
};
// Add the watch configuration for rawcss, and scss.
grunt.config.merge({
watch: {
rawcss: {
files: [
'**/*.css',
],
excludes: [
'**/moodle.css',
'**/editor.css',
'jsdoc/styles/*.css',
],
tasks: ['rawcss']
},
scss: {
files: getCoreThemeMatches(),
tasks: ['scss']
},
},
});
};
-42
View File
@@ -1,42 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* @copyright 2023 Sara Arjona <sara@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Generate upgradable third-party libraries (utilising thirdpartylibs.xml data)
*/
grunt.registerTask('upgradablelibs', 'Generate upgradable third-party libraries', async function() {
const done = this.async();
const path = require('path');
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
// An array of third party libraries that have a newer version in their repositories.
const thirdPartyLibs = await ComponentList.getThirdPartyLibsUpgradable({progress: true});
for (let library of thirdPartyLibs) {
grunt.log.ok(JSON.stringify(Object.assign({}, library), null, 4));
}
done();
});
};
-272
View File
@@ -1,272 +0,0 @@
/**
* This is a wrapper task to handle the grunt watch command. It attempts to use
* Watchman to monitor for file changes, if it's installed, because it's much faster.
*
* If Watchman isn't installed then it falls back to the grunt-contrib-watch file
* watcher for backwards compatibility.
*/
/* eslint-env node */
module.exports = grunt => {
/**
* This is a wrapper task to handle the grunt watch command. It attempts to use
* Watchman to monitor for file changes, if it's installed, because it's much faster.
*
* If Watchman isn't installed then it falls back to the grunt-contrib-watch file
* watcher for backwards compatibility.
*/
const watchHandler = function() {
const async = require('async');
const watchTaskDone = this.async();
let watchInitialised = false;
let watchTaskQueue = {};
let processingQueue = false;
const watchman = require('fb-watchman');
const watchmanClient = new watchman.Client();
// Grab the tasks and files that have been queued up and execute them.
var processWatchTaskQueue = function() {
if (!Object.keys(watchTaskQueue).length || processingQueue) {
// If there is nothing in the queue or we're already processing then wait.
return;
}
processingQueue = true;
// Grab all tasks currently in the queue.
var queueToProcess = watchTaskQueue;
// Reset the queue.
watchTaskQueue = {};
async.forEachSeries(
Object.keys(queueToProcess),
function(task, next) {
var files = queueToProcess[task];
var filesOption = '--files=' + files.join(',');
grunt.log.ok('Running task ' + task + ' for files ' + filesOption);
// Spawn the task in a child process so that it doesn't kill this one
// if it failed.
grunt.util.spawn(
{
// Spawn with the grunt bin.
grunt: true,
// Run from current working dir and inherit stdio from process.
opts: {
cwd: grunt.moodleEnv.fullRunDir,
stdio: 'inherit'
},
args: [task, filesOption]
},
function(err, res, code) {
if (code !== 0) {
// The grunt task failed.
grunt.log.error(err);
}
// Move on to the next task.
next();
}
);
},
function() {
// No longer processing.
processingQueue = false;
// Once all of the tasks are done then recurse just in case more tasks
// were queued while we were processing.
processWatchTaskQueue();
}
);
};
const originalWatchConfig = grunt.config.get(['watch']);
const watchConfig = Object.keys(originalWatchConfig).reduce(function(carry, key) {
if (key == 'options') {
return carry;
}
const value = originalWatchConfig[key];
const taskNames = value.tasks;
const files = value.files;
let excludes = [];
if (value.excludes) {
excludes = value.excludes;
}
taskNames.forEach(function(taskName) {
carry[taskName] = {
files,
excludes,
};
});
return carry;
}, {});
watchmanClient.on('error', function(error) {
// We have to add an error handler here and parse the error string because the
// example way from the docs to check if Watchman is installed doesn't actually work!!
// See: https://github.com/facebook/watchman/issues/509
if (error.message.match('Watchman was not found')) {
// If watchman isn't installed then we should fallback to the other watch task.
grunt.log.ok('It is recommended that you install Watchman for better performance using the "watch" command.');
// Fallback to the old grunt-contrib-watch task.
grunt.renameTask('watch-grunt', 'watch');
grunt.task.run(['watch']);
// This task is finished.
watchTaskDone(0);
} else {
grunt.log.error(error);
// Fatal error.
watchTaskDone(1);
}
});
watchmanClient.on('subscription', function(resp) {
if (resp.subscription !== 'grunt-watch') {
return;
}
resp.files.forEach(function(file) {
grunt.log.ok('File changed: ' + file.name);
var fullPath = grunt.moodleEnv.fullRunDir + '/' + file.name;
Object.keys(watchConfig).forEach(function(task) {
const fileGlobs = watchConfig[task].files;
var match = fileGlobs.some(function(fileGlob) {
return grunt.file.isMatch(`**/${fileGlob}`, fullPath);
});
if (match) {
// If we are watching a subdirectory then the file.name will be relative
// to that directory. However the grunt tasks expect the file paths to be
// relative to the Gruntfile.js location so let's normalise them before
// adding them to the queue.
var relativePath = fullPath.replace(grunt.moodleEnv.gruntFilePath + '/', '');
if (task in watchTaskQueue) {
if (!watchTaskQueue[task].includes(relativePath)) {
watchTaskQueue[task] = watchTaskQueue[task].concat(relativePath);
}
} else {
watchTaskQueue[task] = [relativePath];
}
}
});
});
processWatchTaskQueue();
});
process.on('SIGINT', function() {
// Let the user know that they may need to manually stop the Watchman daemon if they
// no longer want it running.
if (watchInitialised) {
grunt.log.ok('The Watchman daemon may still be running and may need to be stopped manually.');
}
process.exit();
});
// Initiate the watch on the current directory.
watchmanClient.command(['watch-project', grunt.moodleEnv.fullRunDir], function(watchError, watchResponse) {
if (watchError) {
grunt.log.error('Error initiating watch:', watchError);
watchTaskDone(1);
return;
}
if ('warning' in watchResponse) {
grunt.log.error('warning: ', watchResponse.warning);
}
var watch = watchResponse.watch;
var relativePath = watchResponse.relative_path;
watchInitialised = true;
watchmanClient.command(['clock', watch], function(clockError, clockResponse) {
if (clockError) {
grunt.log.error('Failed to query clock:', clockError);
watchTaskDone(1);
return;
}
// Generate the expression query used by watchman.
// Documentation is limited, but see https://facebook.github.io/watchman/docs/expr/allof.html for examples.
// We generate an expression to match any value in the files list of all of our tasks, but excluding
// all value in the excludes list of that task.
//
// [anyof, [
// [allof, [
// [anyof, [
// ['match', validPath, 'wholename'],
// ['match', validPath, 'wholename'],
// ],
// [not,
// [anyof, [
// ['match', invalidPath, 'wholename'],
// ['match', invalidPath, 'wholename'],
// ],
// ],
// ],
var matchWholeName = fileGlob => ['match', fileGlob, 'wholename'];
var matches = Object.keys(watchConfig).map(function(task) {
const matchAll = [];
matchAll.push(['anyof'].concat(watchConfig[task].files.map(matchWholeName)));
if (watchConfig[task].excludes.length) {
matchAll.push(['not', ['anyof'].concat(watchConfig[task].excludes.map(matchWholeName))]);
}
return ['allof'].concat(matchAll);
});
matches = ['anyof'].concat(matches);
var sub = {
expression: matches,
// Which fields we're interested in.
fields: ["name", "size", "type"],
// Add our time constraint.
since: clockResponse.clock
};
if (relativePath) {
/* eslint-disable camelcase */
sub.relative_root = relativePath;
}
watchmanClient.command(['subscribe', watch, 'grunt-watch', sub], function(subscribeError) {
if (subscribeError) {
// Probably an error in the subscription criteria.
grunt.log.error('failed to subscribe: ', subscribeError);
watchTaskDone(1);
return;
}
grunt.log.ok('Listening for changes to files in ' + grunt.moodleEnv.fullRunDir);
});
});
});
};
// Rename the grunt-contrib-watch "watch" task because we're going to wrap it.
grunt.renameTask('watch', 'watch-grunt');
// Register the new watch handler.
grunt.registerTask('watch', 'Run tasks on file changes', watchHandler);
grunt.config.merge({
watch: {
options: {
nospawn: true // We need not to spawn so config can be changed dynamically.
},
},
});
return watchHandler;
};
-103
View File
@@ -1,103 +0,0 @@
#!/usr/bin/env node
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import { Argument, Option, program } from 'commander';
import chalk from 'chalk';
import { getNoteNames } from './notes/src/noteTypes.mjs';
import createAction from './notes/src/create.mjs';
import generateAction from './notes/src/generate.mjs';
import logger from './notes/src/logger.mjs';
console.log(`
${chalk.bold(chalk.underline(chalk.green('Moodle Upgrade Notes Generator')))}
This tool is used to generate the upgrade notes for changes you make in Moodle.
Please remember that the intended audience of these changes is
${chalk.italic('plugin developers')} who need to know how to update their plugins
for a new Moodle version.
Upgrade notes should not be used to document changes for site administrators, or
for internal API changes which are not expected to be used outside of the
relevant component.
`)
program.configureHelp({
helpWidth: 100,
});
program.on('option:verbose', () => {
logger.level = 'verbose';
});
program.addOption(
new Option(
'-v, --verbose',
'Output more information during the generation process',
)
.default(false)
);
// Define the command line options.
program
.command('create')
.summary('Generate a new upgrade note')
.addOption(
new Option('-t, --type <type>', `The type of change to document. Valid types are: ${getNoteNames().join(', ')}`)
)
.addOption(new Option('-i, --issue <issue>', 'The tracker issue number'))
.addOption(new Option('-c, --component <component>', 'The component to write a note for'))
.addOption(new Option(
'-m, --message <message>',
'The message to use for the upgrade note',
))
.action((options) => createAction(options));
program
.command('summary')
.summary('Generate a local copy of the upgrade notes summary')
.addArgument(
new Argument('[version]', 'The Moodle version to create the summary notes for')
)
.action((version) => generateAction(version));
program
.command('release')
.summary('Generate the markdown copies of the upgrade notes for a Moodle release')
.addArgument(
new Argument('[version]', 'The Moodle version to create the release notes for')
)
.addOption(
new Option(
'--generate-upgrade-notes',
'Generate the UPGRADING.md notes for the release. ' +
'Note: This option is intended for use by the release manager when generating the upgrade notes.',
)
.default(true)
)
.addOption(
new Option(
'-d, --delete-notes',
'Delete the notes after generating the UPGRADING.md notes for the release. ' +
'Note: This option is intended for use by the release manager when generating the upgrade notes.' +
'This option has no effect unless --generate-upgrade-notes is also set.'
)
.default(false)
)
.action((version, options) => generateAction(version, options));
program.parse();
-2
View File
@@ -1,2 +0,0 @@
**/amd/**
/*.js
-1
View File
@@ -1 +0,0 @@
lts/jod
-40
View File
@@ -1,40 +0,0 @@
<?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/>.
/**
* Helper file for PhpStorm, and other IDEs, to provide better code completion.
*
* @package core
* @copyright 2024 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace PHPSTORM_META;
// Assume that anything returned by \core\di::get('...') is an instance of the first argument.
override(\core\di::get(0), map([
'' => '@',
]));
// Assume that anything returned by \Psr\Container\ContainerInterface::get('...') is an instance of the first argument.
override(\Psr\Container\ContainerInterface::get(0), map([
'' => '@',
]));
// Assume that anything returned by \DI\Container::get('...') is an instance of the first argument.
override(\DI\Container::get(0), map([
'' => '@',
]));
+89
View File
@@ -0,0 +1,89 @@
# Generated by "grunt ignorefiles"
theme/bootstrapbase/style/
theme/clean/style/custom.css
theme/more/style/custom.css
theme/boost/style/moodle.css
node_modules/
vendor/
admin/tool/policy/amd/src/jquery-eu-cookie-law-popup.js
admin/tool/usertours/amd/src/tour.js
admin/tool/usertours/amd/src/popper.js
auth/cas/CAS/
enrol/lti/ims-blti/
filter/algebra/AlgParser.pm
filter/tex/mimetex.*
lib/editor/atto/yui/src/rangy/js/*.*
lib/editor/tinymce/plugins/pdw/tinymce/
lib/editor/tinymce/plugins/spellchecker/rpc.php
lib/editor/tinymce/tiny_mce/
lib/mlbackend/php/phpml/
lib/adodb/
lib/bennu/
lib/evalmath/
lib/lessphp/
lib/phpexcel/
lib/google/
lib/htmlpurifier/
lib/jabber/
lib/minify/matthiasmullie-minify/
lib/minify/matthiasmullie-pathconverter/
lib/pear/Auth/RADIUS.php
lib/pear/Crypt/CHAP.php
lib/pear/HTML/Common.php
lib/pear/HTML/QuickForm.php
lib/pear/HTML/QuickForm/
lib/pear/PEAR.php
lib/phpmailer/
lib/simplepie/
lib/tcpdf/
lib/typo3/
lib/yuilib/
lib/yuilib/gallery/
lib/jquery/
lib/html2text/
lib/markdown/
lib/recaptchalib.php
lib/xhprof/
lib/xmlize.php
lib/horde/
lib/requirejs/
lib/amd/src/loglevel.js
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
lib/php-css-parser/
lib/rtlcss/
lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
lib/amd/src/truncate.js
lib/fonts/
lib/validateurlsyntax.php
media/player/videojs/amd/src/video-lazy.js
media/player/videojs/amd/src/Youtube-lazy.js
media/player/videojs/videojs/
media/player/videojs/amd/src/videojs-flash-lazy.js
media/player/videojs/videojs/video-js.swf
mod/assign/feedback/editpdf/fpdi/
repository/s3/S3.php
theme/boost/scss/bootstrap/
theme/boost/amd/src/alert.js
theme/boost/amd/src/button.js
theme/boost/amd/src/carousel.js
theme/boost/amd/src/collapse.js
theme/boost/amd/src/dropdown.js
theme/boost/amd/src/modal.js
theme/boost/amd/src/popover.js
theme/boost/amd/src/scrollspy.js
theme/boost/amd/src/tab.js
theme/boost/amd/src/tooltip.js
theme/boost/amd/src/util.js
theme/boost/amd/src/tether.js
theme/boost/scss/fontawesome/
theme/bootstrapbase/less/bootstrap/
theme/bootstrapbase/javascript/html5shiv.js
theme/bootstrapbase/amd/src/bootstrap.js
theme/bootstrapbase/less/fontawesome/
+4 -16
View File
@@ -1,14 +1,9 @@
{
"customSyntax": "postcss-scss",
"plugins": [
"stylelint-csstree-validator"
],
"rules": {
"csstree/validator": {
"syntaxExtensions": [
"sass"
]
},
"csstree/validator": true,
"at-rule-empty-line-before": [ "always",
{"except": [ "blockless-after-blockless"], ignore: ["after-comment", "inside-block"]}
],
@@ -50,7 +45,7 @@
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-url-scheme-disallowed-list": ["data"],
"function-url-scheme-blacklist": ["data"],
"function-whitespace-after": "always",
"indentation": 4,
"keyframe-declaration-no-important": true,
@@ -89,19 +84,12 @@
"selector-type-no-unknown": true,
"string-no-newline": true,
"time-min-milliseconds": 100,
"unit-disallowed-list": ["pt"],
"unit-blacklist": ["pt"],
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
},
"overrides": [
{
"files": ["**/yui/**/*.css"],
"rules": {
}
}
]
}
}
+287
View File
@@ -0,0 +1,287 @@
# PLEASE NOTE: Travis is not currently utilised by the Moodle core integration
# process (which uses our internal CI system) this file is here for the benefit
# of community developers git clones - see MDL-51458.
sudo: required
# We currently disable Travis notifications entirely until https://github.com/travis-ci/travis-ci/issues/4976
# is fixed.
notifications:
email: false
language: php
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.2
- 7.0
addons:
postgresql: "9.6"
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# services:
# - redis-server
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 unit tests on MySQL
- DB=mysqli TASK=PHPUNIT
# 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
matrix:
# Enable fast finish.
# This will fail the build if a single job fails (except those in allow_failures).
# It will not stop the jobs from running.
fast_finish: true
include:
# Run grunt/npm install on highest version ('node' is an alias for the latest node.js version.)
- php: 7.2
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
exclude:
# MySQL - it's just too slow.
# Exclude it on all versions except for 7.2
- env: DB=mysqli TASK=PHPUNIT
php: 7.0
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
install:
- >
if [ "$DB" = 'mysqli' ];
then
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
sudo stop mysql
sudo mv /var/lib/mysql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
sudo start mysql
fi
- >
if [ "$DB" = 'pgsql' ];
then
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
sudo service postgresql stop
sudo mv /var/lib/postgresql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/postgresql /var/lib/postgresql
sudo service postgresql start 9.6
fi
- >
if [ "$TASK" = 'PHPUNIT' ];
then
if [ -n "$GITHUB_APITOKEN" ]; then
composer config github-oauth.github.com $GITHUB_APITOKEN;
echo 'auth.json' >> .git/info/exclude
fi
# Enable Redis.
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# echo 'extension="redis.so"' > /tmp/redis.ini
# phpenv config-add /tmp/redis.ini
# Install composer dependencies.
# We need --no-interaction in case we hit API limits for composer. This causes it to fall back to a standard clone.
# Typically it should be able to use the Composer cache if any other job has already completed before we started here.
travis_retry composer install --prefer-dist --no-interaction;
fi
- >
if [ "$TASK" = 'GRUNT' ];
then
nvm install $NVM_VERSION ;
nvm use $NVM_VERSION ;
fi
before_script:
- phpenv config-rm xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
then
# Copy generic configuration in place.
cp config-dist.php config.php ;
# Create the moodledata directory.
mkdir -p "$HOME"/roots/base
# The database name and password.
sed -i \
-e "s%= 'moodle'%= 'travis_ci_test'%" \
-e "s%= 'password'%= ''%" \
config.php ;
# The wwwroot and dataroot.
sed -i \
-e "s%http://example.com/moodle%https://localhost%" \
-e "s%/home/example/moodledata%/home/travis/roots/base%" \
config.php ;
if [ "$DB" = 'pgsql' ];
then
# Postgres-specific setup.
sed -i \
-e "s%= 'username'%= 'postgres'%" \
config.php ;
psql -c 'CREATE DATABASE travis_ci_test;' -U postgres;
fi
if [ "$DB" = 'mysqli' ];
then
# MySQL-specific setup.
sed -i \
-e "s%= 'pgsql'%= 'mysqli'%" \
-e "s%= 'username'%= 'travis'%" \
-e "s%=> 'utf8mb4_unicode_ci'%=> 'utf8mb4_bin'%" \
config.php;
mysql -u root -e 'SET GLOBAL innodb_file_format=barracuda;' ;
mysql -u root -e 'SET GLOBAL innodb_file_per_table=ON;' ;
mysql -u root -e 'SET GLOBAL innodb_large_prefix=ON;' ;
mysql -e 'CREATE DATABASE travis_ci_test DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_bin;' ;
fi
fi
- >
if [ "$TASK" = 'PHPUNIT' ];
then
# Create a directory for the phpunit dataroot.
mkdir -p "$HOME"/roots/phpunit
# The phpunit dataroot and prefix..
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# -e "/require_once/i \\define('TEST_SESSION_REDIS_HOST', '127.0.0.1');" \
sed -i \
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
config.php ;
# Initialise PHPUnit for Moodle.
php admin/tool/phpunit/cli/init.php
fi
- >
if [ "$TASK" = 'GRUNT' ];
then
npm install --no-spin;
npm install --no-spin -g grunt ;
fi
########################################################################
# CI Tests
########################################################################
- >
if [ "$TASK" = 'CITEST' ];
then
# Note - this is deliberately placed in the script section as we
# should not add any code until after phpunit has run.
# The following repositories are required.
# The local_ci repository does the actual checking.
git clone https://github.com/moodlehq/moodle-local_ci.git local/ci
# We need the official upstream for comparison
git remote add upstream https://github.com/moodle/moodle.git;
git fetch upstream MOODLE_34_STABLE;
export GIT_PREVIOUS_COMMIT="`git merge-base FETCH_HEAD $TRAVIS_COMMIT`";
export GIT_COMMIT="$TRAVIS_COMMIT";
export UPSTREAM_FETCH_HEAD=`git rev-parse FETCH_HEAD`
# Variables required by our linter.
export gitcmd=`which git`;
export gitdir="$TRAVIS_BUILD_DIR";
export phpcmd=`which php`;
fi
########################################################################
# Upgrade test
########################################################################
- >
if [ "$TASK" = 'UPGRADE' ];
then
# We need the official upstream.
git remote add upstream https://github.com/moodle/moodle.git;
# Checkout 30 STABLE branch (the first version compatible with PHP 7.x)
git fetch upstream MOODLE_30_STABLE;
git checkout MOODLE_30_STABLE;
# Perform the upgrade
php admin/cli/install_database.php --agree-license --adminpass=Password --adminemail=admin@example.com --fullname="Upgrade test" --shortname=Upgrade;
# Return to the previous commit
git checkout -;
# Perform the upgrade
php admin/cli/upgrade.php --non-interactive --allow-unstable ;
# The local_ci repository can be used to check upgrade savepoints.
git clone https://github.com/moodlehq/moodle-local_ci.git local/ci ;
fi
script:
- >
if [ "$TASK" = 'PHPUNIT' ];
then
vendor/bin/phpunit --fail-on-risky --disallow-test-output --verbose;
fi
- >
if [ "$TASK" = 'CITEST' ];
then
bash local/ci/php_lint/php_lint.sh;
fi
- >
if [ "$TASK" = 'GRUNT' ];
then
grunt ;
# 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.
git add . ;
git reset -- npm-shrinkwrap.json ;
git diff --cached --exit-code ;
fi
########################################################################
# Upgrade test
########################################################################
- >
if [ "$TASK" = 'UPGRADE' ];
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
fi
-52
View File
@@ -1,52 +0,0 @@
# Contributing to Moodle
[Moodle][1] is made by people like you. We are members of a big worldwide community of developers, designers, teachers, testers, translators and many more. We work in universities, schools, companies and other places. You are very welcome to join us and contribute to the project.
There are many ways that you can contribute to Moodle, not just through development. See our [community contribution guide][2] for some of the many ways that you can help.
## Github
> [!NOTE]
> Please do not open pull requests via Github.
All issues should be reported via, and patched provided to the [Moodle Tracker][3].
The Moodle [Github][4] repository is a clone of the official Moodle repository, whcih can be found at https://git.moodle.org.
## Moodle core bug fixes and new features
Over the years, Moodle has developed a mature process for reporting, reviewing, and accepting patches. This is fully documented in our [documentation on development processes][6], but in summary:
- Every bug fix or new feature must have a tracker issue.
- You publish the branch implementing the fix or new feature in your public clone of the moodle.git repository (typically on Github).
- Your patch is peer-reviewed, discussed, integrated, tested and then released as a part of one of our weekly releases.
- New features are developed on the `main` branch. Bug fixes are also backported to currently supported maintenance (stable) branches.
> [!IMPORTANT]
> Please do not publish security issues, or patches releating to them publicly.
> See our [Responsible Disclosure Policy][5] for more information.
## Moodle plugins
Moodle has a framework for additional plugins to extend its functionality. We
have a Moodle plugins directory <https://moodle.org/plugins/> where you can
register and maintain your plugin. Plugins hosted in the plugins directory can
be easily installed and updated via the Moodle administration interface.
* You are expected to have a public source code repository with your plugin
code.
* After registering your plugin in the plugins directory it is reviewed before
being published.
* You are expected to continuously release updated versions of the plugin via
the plugins directory. We do not pull from your code repository; you must do
it explicitly.
For further details, see <https://moodledev.io/general/community/plugincontribution>.
[1]: https://moodle.org
[2]: https://moodledev.io/general/community/contribute
[3]: https://tracker.moodle.org
[4]: https://github.com/moodle/moodle
[5]: https://moodledev.io/general/development/process/security
[6]: https://moodledev.io/general/development/process
+56
View File
@@ -0,0 +1,56 @@
CONTRIBUTING TO MOODLE
======================
Moodle is made by people like you. We are members of a big worldwide community
of developers, designers, teachers, testers, translators and other users. We
work in universities, schools, companies and other places. You are very welcome
to join us and contribute to the project.
See <https://docs.moodle.org/dev/Contributing_to_Moodle> for the many ways you
can help, not only with coding.
Moodle is open to community contributions to core, though all code must go
through peer-review, automated behaviour testing, continuous integration and
human post-integration checks.
Pull requests
-------------
Please do not open pull requests via Github. The repository there is just a
mirror of the official repository at <https://git.moodle.org>. Issues are
reported and patches provided via <https://tracker.moodle.org>. See below for
more information.
Moodle core bug fixes and new features
--------------------------------------
During the years of intensive development, a mature process of including
submitted patches has evolved.
* Every bug fix or new feature must have a tracker issue.
* You publish the branch implementing the fix or new feature in your public
clone of the moodle.git repository (typically on Github).
* Your patch is peer-reviewed, discussed, integrated, tested and then released
as a part of moodle.git.
* New features are developed on the master branch. Bug fixes are also
backported to currently supported maintenance (stable) branches.
For further details, see <https://docs.moodle.org/dev/Process>.
Moodle plugins
--------------
Moodle has a framework for additional plugins to extend its functionality. We
have a Moodle plugins directory <https://moodle.org/plugins/> where you can
register and maintain your plugin. Plugins hosted in the plugins directory can
be easily installed and updated via the Moodle administration interface.
* You are expected to have a public source code repository with your plugin
code.
* After registering your plugin in the plugins directory it is reviewed before
being published.
* You are expected to continuously release updated versions of the plugin via
the plugins directory. We do not pull from your code repository; you must do
it explicitly.
For further details, see <https://docs.moodle.org/dev/Plugin_contribution>.
+338 -220
View File
@@ -16,251 +16,369 @@
/* eslint-env node */
/**
* Grunt configuration for Moodle.
*
* @copyright 2014 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Setup the Grunt Moodle environment.
*
* @param {Grunt} grunt
* @returns {Object}
* Grunt configuration
*/
const setupMoodleEnvironment = grunt => {
const fs = require('fs');
const path = require('path');
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
const getAmdConfiguration = () => {
// If the cwd is the amd directory in the current component then it will be empty.
// If the cwd is a child of the component's AMD directory, the relative directory will not start with ..
let inAMD = !path.relative(`${componentDirectory}/amd`, cwd).startsWith('..');
// Globbing pattern for matching all AMD JS source files.
let amdSrc = [];
if (inComponent) {
amdSrc.push(
componentDirectory + "/amd/src/*.js",
componentDirectory + "/amd/src/**/*.js"
);
} else {
amdSrc = ComponentList.getAmdSrcGlobList();
}
return {
inAMD,
amdSrc,
};
};
const getYuiConfiguration = () => {
let yuiSrc = [];
if (inComponent) {
yuiSrc.push(componentDirectory + "/yui/src/**/*.js");
} else {
yuiSrc = ComponentList.getYuiSrcGlobList(gruntFilePath + '/');
}
return {
yuiSrc,
};
};
const getStyleConfiguration = () => {
const ComponentList = require(path.join(process.cwd(), '.grunt', 'components.js'));
// Build the cssSrc and scssSrc.
// Valid paths are:
// [component]/styles.css; and either
// [theme/[themename]]/scss/**/*.scss; or
// [theme/[themename]]/style/*.css.
//
// If a theme has scss, then it is assumed that the style directory contains generated content.
let cssSrc = [];
let scssSrc = [];
const checkComponentDirectory = componentDirectory => {
const isTheme = componentDirectory.startsWith('theme/');
if (isTheme) {
const scssDirectory = `${componentDirectory}/scss`;
if (fs.existsSync(scssDirectory)) {
// This theme has an SCSS directory.
// Include all scss files within it recursively, but do not check for css files.
scssSrc.push(`${scssDirectory}/*.scss`);
scssSrc.push(`${scssDirectory}/**/*.scss`);
} else {
// This theme has no SCSS directory.
// Only hte CSS files in the top-level directory are checked.
cssSrc.push(`${componentDirectory}/style/*.css`);
}
} else {
// This is not a theme.
// All other plugin types are restricted to a single styles.css in their top level.
cssSrc.push(`${componentDirectory}/styles.css`);
}
};
if (inComponent) {
checkComponentDirectory(componentDirectory);
} else {
ComponentList.getComponentPaths(`${gruntFilePath}/`).forEach(componentPath => {
checkComponentDirectory(componentPath);
});
}
return {
cssSrc,
scssSrc,
};
};
/**
* Calculate the cwd, taking into consideration the `root` option (for Windows).
*
* @param {Object} grunt
* @returns {String} The current directory as best we can determine
*/
const getCwd = grunt => {
let cwd = fs.realpathSync(process.env.PWD || process.cwd());
// Windows users can't run grunt in a subdirectory, so allow them to set
// the root by passing --root=path/to/dir.
if (grunt.option('root')) {
const root = grunt.option('root');
if (grunt.file.exists(__dirname, root)) {
cwd = fs.realpathSync(path.join(__dirname, root));
grunt.log.ok('Setting root to ' + cwd);
} else {
grunt.fail.fatal('Setting root to ' + root + ' failed - path does not exist');
}
}
return cwd;
};
// Detect directories:
// * gruntFilePath The real path on disk to this Gruntfile.js
// * cwd The current working directory, which can be overridden by the `root` option
// * relativeCwd The cwd, relative to the Gruntfile.js
// * componentDirectory The root directory of the component if the cwd is in a valid component
// * inComponent Whether the cwd is in a valid component
// * runDir The componentDirectory or cwd if not in a component, relative to Gruntfile.js
// * fullRunDir The full path to the runDir
const gruntFilePath = fs.realpathSync(process.cwd());
const cwd = getCwd(grunt);
const relativeCwd = path.relative(gruntFilePath, cwd);
const componentDirectory = ComponentList.getOwningComponentDirectory(relativeCwd);
const inComponent = !!componentDirectory;
const inTheme = !!componentDirectory && componentDirectory.startsWith('theme/');
const runDir = inComponent ? componentDirectory : relativeCwd;
const fullRunDir = fs.realpathSync(gruntFilePath + path.sep + runDir);
const {inAMD, amdSrc} = getAmdConfiguration();
const {yuiSrc} = getYuiConfiguration();
const {cssSrc, scssSrc} = getStyleConfiguration();
let files = null;
if (grunt.option('files')) {
// Accept a comma separated list of files to process.
files = grunt.option('files').split(',');
}
grunt.log.debug('============================================================================');
grunt.log.debug(`= Node version: ${process.versions.node}`);
grunt.log.debug(`= grunt version: ${grunt.package.version}`);
grunt.log.debug(`= process.cwd: '` + process.cwd() + `'`);
grunt.log.debug(`= process.env.PWD: '${process.env.PWD}'`);
grunt.log.debug(`= path.sep '${path.sep}'`);
grunt.log.debug('============================================================================');
grunt.log.debug(`= gruntFilePath: '${gruntFilePath}'`);
grunt.log.debug(`= relativeCwd: '${relativeCwd}'`);
grunt.log.debug(`= componentDirectory: '${componentDirectory}'`);
grunt.log.debug(`= inComponent: '${inComponent}'`);
grunt.log.debug(`= runDir: '${runDir}'`);
grunt.log.debug(`= fullRunDir: '${fullRunDir}'`);
grunt.log.debug('============================================================================');
if (inComponent) {
grunt.log.ok(`Running tasks for component directory ${componentDirectory}`);
}
return {
amdSrc,
componentDirectory,
cwd,
cssSrc,
files,
fullRunDir,
gruntFilePath,
inAMD,
inComponent,
inTheme,
relativeCwd,
runDir,
scssSrc,
yuiSrc,
};
};
/**
* Verify tha tthe current NodeJS version matches the required version in package.json.
*
* @param {Grunt} grunt
*/
const verifyNodeVersion = grunt => {
const semver = require('semver');
module.exports = function(grunt) {
var path = require('path'),
tasks = {},
cwd = process.env.PWD || process.cwd(),
async = require('async'),
DOMParser = require('xmldom').DOMParser,
xpath = require('xpath'),
semver = require('semver');
// Verify the node version is new enough.
var expected = semver.validRange(grunt.file.readJSON('package.json').engines.node);
var actual = semver.valid(process.version);
if (!semver.satisfies(actual, expected)) {
grunt.fail.fatal('Node version not satisfied. Require ' + expected + ', version installed: ' + actual);
grunt.fail.fatal('Node version too old. Require ' + expected + ', version installed: ' + actual);
}
};
/**
* Grunt configuration.
*
* @param {Grunt} grunt
*/
module.exports = function(grunt) {
// Verify that the Node version meets our requirements.
verifyNodeVersion(grunt);
// Windows users can't run grunt in a subdirectory, so allow them to set
// the root by passing --root=path/to/dir.
if (grunt.option('root')) {
var root = grunt.option('root');
if (grunt.file.exists(__dirname, root)) {
cwd = path.join(__dirname, root);
grunt.log.ok('Setting root to ' + cwd);
} else {
grunt.fail.fatal('Setting root to ' + root + ' failed - path does not exist');
}
}
// Setup the Moodle environemnt within the Grunt object.
grunt.moodleEnv = setupMoodleEnvironment(grunt);
var inAMD = path.basename(cwd) == 'amd';
// Globbing pattern for matching all AMD JS source files.
var amdSrc = [inAMD ? cwd + '/src/*.js' : '**/amd/src/*.js'];
/**
* Add the named task.
* Function to generate the destination for the uglify task
* (e.g. build/file.min.js). This function will be passed to
* the rename property of files array when building dynamically:
* http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
*
* @param {string} name
* @param {Grunt} grunt
* @param {String} destPath the current destination
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
const addTask = (name, grunt) => {
const path = require('path');
const taskPath = path.resolve(`./.grunt/tasks/${name}.js`);
grunt.log.debug(`Including tasks for ${name} from ${taskPath}`);
require(path.resolve(`./.grunt/tasks/${name}.js`))(grunt);
var uglifyRename = function(destPath, srcPath) {
destPath = srcPath.replace('src', 'build');
destPath = destPath.replace('.js', '.min.js');
destPath = path.resolve(cwd, destPath);
return destPath;
};
// Startup tasks.
grunt.moodleEnv.startupTasks = [];
/**
* Find thirdpartylibs.xml and generate an array of paths contained within
* them (used to generate ignore files and so on).
*
* @return {array} The list of thirdparty paths.
*/
var getThirdPartyPathsFromXML = function() {
var thirdpartyfiles = grunt.file.expand('*/**/thirdpartylibs.xml');
var libs = ['node_modules/', 'vendor/'];
// Add Moodle task configuration.
addTask('gherkinlint', grunt);
addTask('ignorefiles', grunt);
thirdpartyfiles.forEach(function(file) {
var dirname = path.dirname(file);
addTask('javascript', grunt);
addTask('style', grunt);
addTask('componentlibrary', grunt);
var doc = new DOMParser().parseFromString(grunt.file.read(file));
var nodes = xpath.select("/libraries/library/location/text()", doc);
addTask('watch', grunt);
addTask('startup', grunt);
nodes.forEach(function(node) {
var lib = path.join(dirname, node.toString());
if (grunt.file.isDir(lib)) {
// Ensure trailing slash on dirs.
lib = lib.replace(/\/?$/, '/');
}
addTask('upgradablelibs', grunt);
// Look for duplicate paths before adding to array.
if (libs.indexOf(lib) === -1) {
libs.push(lib);
}
});
});
return libs;
};
// Project configuration.
grunt.initConfig({
eslint: {
// Even though warnings dont stop the build we don't display warnings by default because
// at this moment we've got too many core warnings.
options: {quiet: !grunt.option('show-lint-warnings')},
amd: {src: amdSrc},
// Check YUI module source files.
yui: {src: ['**/yui/src/**/*.js', '!*/**/yui/src/*/meta/*.js']}
},
uglify: {
amd: {
files: [{
expand: true,
src: amdSrc,
rename: uglifyRename
}],
options: {report: 'none'}
}
},
less: {
bootstrapbase: {
files: {
"theme/bootstrapbase/style/moodle.css": "theme/bootstrapbase/less/moodle.less",
"theme/bootstrapbase/style/editor.css": "theme/bootstrapbase/less/editor.less",
},
options: {
compress: false // We must not compress to keep the comments.
}
}
},
watch: {
options: {
nospawn: true // We need not to spawn so config can be changed dynamically.
},
amd: {
files: ['**/amd/src/**/*.js'],
tasks: ['amd']
},
bootstrapbase: {
files: ["theme/bootstrapbase/less/**/*.less"],
tasks: ["css"]
},
yui: {
files: ['**/yui/src/**/*.js'],
tasks: ['yui']
},
gherkinlint: {
files: ['**/tests/behat/*.feature'],
tasks: ['gherkinlint']
}
},
shifter: {
options: {
recursive: true,
paths: [cwd]
}
},
gherkinlint: {
options: {
files: ['**/tests/behat/*.feature'],
}
},
stylelint: {
less: {
options: {
syntax: 'less',
configOverrides: {
rules: {
// These rules have to be disabled in .stylelintrc for scss compat.
"at-rule-no-unknown": true,
}
}
},
src: ['theme/**/*.less']
},
scss: {
options: {syntax: 'scss'},
src: ['*/**/*.scss']
},
css: {
src: ['*/**/*.css'],
options: {
configOverrides: {
rules: {
// These rules have to be disabled in .stylelintrc for scss compat.
"at-rule-no-unknown": true,
}
}
}
}
}
});
/**
* Generate ignore files (utilising thirdpartylibs.xml data)
*/
tasks.ignorefiles = function() {
// An array of paths to third party directories.
var thirdPartyPaths = getThirdPartyPathsFromXML();
// Generate .eslintignore.
var eslintIgnores = ['# Generated by "grunt ignorefiles"', '*/**/yui/src/*/meta/', '*/**/build/'].concat(thirdPartyPaths);
grunt.file.write('.eslintignore', eslintIgnores.join('\n'));
// Generate .stylelintignore.
var stylelintIgnores = [
'# Generated by "grunt ignorefiles"',
'theme/bootstrapbase/style/',
'theme/clean/style/custom.css',
'theme/more/style/custom.css',
'theme/boost/style/moodle.css'
].concat(thirdPartyPaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n'));
};
/**
* Shifter task. Is configured with a path to a specific file or a directory,
* in the case of a specific file it will work out the right module to be built.
*
* Note that this task runs the invidiaul shifter jobs async (becase it spawns
* so be careful to to call done().
*/
tasks.shifter = function() {
var done = this.async(),
options = grunt.config('shifter.options');
// Run the shifter processes one at a time to avoid confusing output.
async.eachSeries(options.paths, function(src, filedone) {
var args = [];
args.push(path.normalize(__dirname + '/node_modules/shifter/bin/shifter'));
// Always ignore the node_modules directory.
args.push('--excludes', 'node_modules');
// Determine the most appropriate options to run with based upon the current location.
if (grunt.file.isMatch('**/yui/**/*.js', src)) {
// When passed a JS file, build our containing module (this happen with
// watch).
grunt.log.debug('Shifter passed a specific JS file');
src = path.dirname(path.dirname(src));
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src', src)) {
// When in a src directory --walk all modules.
grunt.log.debug('In a src directory');
args.push('--walk');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*', src)) {
// When in module, only build our module.
grunt.log.debug('In a module directory');
options.recursive = false;
} else if (grunt.file.isMatch('**/yui/src/*/js', src)) {
// When in module src, only build our module.
grunt.log.debug('In a source directory');
src = path.dirname(src);
options.recursive = false;
}
if (grunt.option('watch')) {
grunt.fail.fatal('The --watch option has been removed, please use `grunt watch` instead');
}
// Add the stderr option if appropriate
if (grunt.option('verbose')) {
args.push('--lint-stderr');
}
if (grunt.option('no-color')) {
args.push('--color=false');
}
var execShifter = function() {
grunt.log.ok("Running shifter on " + src);
grunt.util.spawn({
cmd: "node",
args: args,
opts: {cwd: src, stdio: 'inherit', env: process.env}
}, function(error, result, code) {
if (code) {
grunt.fail.fatal('Shifter failed with code: ' + code);
} else {
grunt.log.ok('Shifter build complete.');
filedone();
}
});
};
// Actually run shifter.
if (!options.recursive) {
execShifter();
} else {
// Check that there are yui modules otherwise shifter ends with exit code 1.
if (grunt.file.expand({cwd: src}, '**/yui/src/**/*.js').length > 0) {
args.push('--recursive');
execShifter();
} else {
grunt.log.ok('No YUI modules to build.');
filedone();
}
}
}, done);
};
tasks.gherkinlint = function() {
var done = this.async(),
options = grunt.config('gherkinlint.options');
var args = grunt.file.expand(options.files);
args.unshift(path.normalize(__dirname + '/node_modules/.bin/gherkin-lint'));
grunt.util.spawn({
cmd: 'node',
args: args,
opts: {stdio: 'inherit', env: process.env}
}, function(error, result, code) {
// Propagate the exit code.
done(code === 0);
});
};
tasks.startup = function() {
// Are we in a YUI directory?
if (path.basename(path.resolve(cwd, '../../')) == 'yui') {
grunt.task.run('yui');
// Are we in an AMD directory?
} else if (inAMD) {
grunt.task.run('amd');
} else {
// Run them all!.
grunt.task.run('css');
grunt.task.run('js');
grunt.task.run('gherkinlint');
}
};
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
var changedFiles = Object.create(null);
var onChange = grunt.util._.debounce(function() {
var files = Object.keys(changedFiles);
grunt.config('eslint.amd.src', files);
grunt.config('eslint.yui.src', files);
grunt.config('uglify.amd.files', [{expand: true, src: files, rename: uglifyRename}]);
grunt.config('shifter.options.paths', files);
grunt.config('stylelint.less.src', files);
grunt.config('gherkinlint.options.files', files);
changedFiles = Object.create(null);
}, 200);
grunt.event.on('watch', function(action, filepath) {
changedFiles[filepath] = action;
onChange();
});
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-stylelint');
// Register JS tasks.
grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
grunt.registerTask('gherkinlint', 'Run gherkinlint against the current directory', tasks.gherkinlint);
grunt.registerTask('ignorefiles', 'Generate ignore files for linters', tasks.ignorefiles);
grunt.registerTask('yui', ['eslint:yui', 'shifter']);
grunt.registerTask('amd', ['eslint:amd', 'uglify']);
grunt.registerTask('js', ['amd', 'yui']);
// Register CSS taks.
grunt.registerTask('css', ['stylelint:scss', 'stylelint:less', 'less:bootstrapbase', 'stylelint:css']);
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
// Register the default task.
grunt.registerTask('default', ['startup']);
+7
View File
@@ -0,0 +1,7 @@
*** PLEASE DO NOT OPEN PULL REQUESTS VIA GITHUB ***
The moodle.git repository at Github is just a mirror of the official repository. We do not accept pull requests at Github.
See CONTRIBUTING.txt guidelines for how to contribute patches for Moodle. Thank you.
--
-48
View File
@@ -1,48 +0,0 @@
# Moodle
<p align="center"><a href="https://moodle.org" target="_blank" title="Moodle Website">
<img src="https://raw.githubusercontent.com/moodle/moodle/main/.github/moodlelogo.svg" alt="The Moodle Logo">
</a></p>
[Moodle][1] is the World's Open Source Learning Platform, widely used around the world by countless universities, schools, companies, and all manner of organisations and individuals.
Moodle is designed to allow educators, administrators and learners to create personalised learning environments with a single robust, secure and integrated system.
## Documentation
- Read our [User documentation][3]
- Discover our [developer documentation][5]
- Take a look at our [demo site][4]
## Community
[moodle.org][1] is the central hub for the Moodle Community, with spaces for educators, administrators and developers to meet and work together.
You may also be interested in:
- attending a [Moodle Moot][6]
- our regular series of [developer meetings][7]
- the [Moodle User Association][8]
## Installation and hosting
Moodle is Free, and Open Source software. You can easily [download Moodle][9] and run it on your own web server, however you may prefer to work with one of our experienced [Moodle Partners][10].
Moodle also offers hosting through both [MoodleCloud][11], and our [partner network][10].
## License
Moodle is provided freely as open source software, under version 3 of the GNU General Public License. For more information on our license see
[1]: https://moodle.org
[2]: https://moodle.com
[3]: https://docs.moodle.org/
[4]: https://sandbox.moodledemo.net/
[5]: https://moodledev.io
[6]: https://moodle.com/events/mootglobal/
[7]: https://moodledev.io/general/community/meetings
[8]: https://moodleassociation.org/
[9]: https://download.moodle.org
[10]: https://moodle.com/partners
[11]: https://moodle.com/cloud
[12]: https://moodledev.io/general/license
+28
View File
@@ -0,0 +1,28 @@
.-..-.
_____ | || |
/____/-.---_ .---. .---. .-.| || | .---.
| | _ _ |/ _ \/ _ \/ _ || |/ __ \
* | | | | | || |_| || |_| || |_| || || |___/
|_| |_| |_|\_____/\_____/\_____||_|\_____)
Moodle - the world's open source learning platform
Moodle <https://moodle.org> is a learning platform designed to provide
educators, administrators and learners with a single robust, secure and
integrated system to create personalised learning environments.
You can download Moodle <https://download.moodle.org> and run it on your own
web server, ask one of our Moodle Partners <https://moodle.com/partners/> to
assist you, or have a MoodleCloud site <https://moodle.com/cloud/> set up for
you.
Moodle is widely used around the world by universities, schools, companies and
all manner of organisations and individuals.
Moodle is provided freely as open source software, under the GNU General Public
License <https://docs.moodle.org/dev/License>.
Moodle is written in PHP and JavaScript and uses an SQL database for storing
the data.
See <https://docs.moodle.org> for details of Moodle's many features.
+35 -53
View File
@@ -1,66 +1,48 @@
MOODLE TRADEMARKS POLICY
========================
The Moodle Trademark
--------------------
The word "Moodle" is trademarked in many countries around the world. The word
was originally an acronym: Modular Object-Oriented Dynamic Learning
Environment. The trademark is owned by Martin Dougiamas, Founder and Director
of Moodle.
The brand and word "Moodle" has trade mark protection in many countries around
the world. Various Moodle™ trade marks are owned by either Moodle Pty Ltd or
one of its associated entities. The law obligates trade mark owners to police
their trade marks and prevent the use of confusingly similar names by
third parties.
The law obligates trademark owners to police their marks and prevent the use of
confusingly similar names by third parties. Through this policy wed like to
make it clear how Moodle-related projects, organisations, and people can use
the Moodle trademark. Wed also like to be clear about how use of the word is
restricted when used to promote commercial Moodle services. We do this to
protect the very business model that allows us to continue developing Moodle
for you.
We have created a more concise and thorough set of Trademark Guidelines
(https://moodle.com/wp-content/uploads/2023/02/Moodle-Trademark-Guidelines-2023-4.pdf)
to help you understand how to comply with Moodle's trade mark requirements.
The Trademark Guidelines will also assist our Moodle Certified Partners and the
community to understand some of the principles that inform Moodle's stance
whenever potential infringement has been detected by us or our community.
Allowed uses
------------
We need to be clear about use of the word "Moodle" and how we restrict its use
when promoting commercial Moodle™ branded services. The proper use of
trade marks reliably assures consumers about the quality of the associated
products or services and where they have been derived from. Because the
Moodle LMS is made available under the open source GNU General Public License'
that permits you to modify the copyrighted software, the distribution of such
modified software in combination with Moodle trade marks can potentially
mislead others in the community. To be clear, the GNU GPL does not include an
implied right or licence to use Moodle's trade marks.
The following uses dont require any permission at all:
We do all this to protect the very business model that allows us to continue
developing various Moodle software solutions for you.
Allowed uses of "Moodle"
------------------------
The following uses don't require any permission at all:
* Referring to the software or the Moodle project as the "Moodle™ software"
or the "Moodle™ project"
* Describing your own implementation of the Moodle™ software platform
(including within corporate settings).
* Referring to the software or the Moodle project.
* Describing your own Moodle implementation (including within corporate
settings).
* Describing a Moodle-based community hub.
* Describing certain software you've made that integrates with Moodle
branded software (e.g. a Moodle integration feature on another system).
* Describing some software youve made that integrates with Moodle
(eg a Moodle integration feature on another system).
Restricted uses of "Moodle"
---------------------------
Restricted uses
---------------
The following uses are generally prohibited without explicit and direct
permission being granted to you by Moodle Pty Ltd. We do this to protect the
Moodle project from software and sites which could confuse people. If in
doubt, reach out for clarification at <trademarks@moodle.com>
Moodle project from software and sites which could confuse people. Please
contact us to ask for permission in writing.
* You can't use the word "Moodle" or any Moodle logos for commercial purposes
without prior written permission from Moodle HQ.
* You can't use "Moodle" in the name of your software (including Mobile apps).
* You can't use "Moodle" in your company name.
* You can't use "Moodle" in your domain name.
* You can't use "Moodle" in advertising-related keywords (such as Adsense).
* You can't use "Moodle" to describe services around Moodle
(such as hosting, training, support, consulting, course creation services,
theme development, customisation, installation, integration, analytics
and certification) that cause consumers to be confused that you are
associated with Moodle HQ if you are not.
This applies even if you do not charge for the services.
Note that usually only Moodle Partners have this permission.
* You cant use "Moodle" in the name of your software (including Mobile apps)
* You cant use "Moodle" in your company name
* You cant use "Moodle" in your domain name
* You cant use "Moodle" in advertising-related keywords (such as Adsense)
* You cant use "Moodle" to describe services around Moodle (such as hosting,
training, support, consulting, course creation services, theme development,
customisation, installation, integration and certification). This applies
even if you do not charge for the services. Note that usually only Moodle
Partners have this permission.
For information about the Moodle Partner Certification Mark as well as for how
to contact us, please see <https://moodle.com/trademarks/>.
-1393
View File
File diff suppressed because it is too large Load Diff
-9
View File
@@ -1,9 +0,0 @@
# core_admin (subsystem) Upgrade notes
## 4.5rc1
### Removed
- The HTTP Server setting "Use slash arguments" (slasharguments) configuration setting and related to it has been removed. Calling the option with $CFG->slasharguments or get_config('slasharguments') is no longer available.
For more information see [MDL-62640](https://tracker.moodle.org/browse/MDL-62640)
+48
View File
@@ -0,0 +1,48 @@
<?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/>.
/**
* Admin settings search form
*
* @package admin
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once $CFG->libdir.'/formslib.php';
/**
* Admin settings search form
*
* @package admin
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class admin_settings_search_form extends moodleform {
function definition () {
$mform = $this->_form;
//$mform->addElement('header', 'settingsheader', get_string('search', 'admin'));
$elements = [];
$elements[] = $mform->createElement('text', 'query', get_string('query', 'admin'));
$elements[] = $mform->createElement('submit', 'search', get_string('search'));
$mform->addGroup($elements);
$mform->setType('query', PARAM_RAW);
$mform->setDefault('query', optional_param('query', '', PARAM_RAW));
}
}
-65
View File
@@ -1,65 +0,0 @@
<?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/>.
/**
* Manage AI subsystem plugins settings.
*
* @package core_admin
* @copyright 2024 Matt Porritt <matt.porritt@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../config.php');
require_once($CFG->libdir . '/adminlib.php');
$action = required_param('action', PARAM_ALPHANUMEXT);
$type = required_param('type', PARAM_PLUGIN); // Must be provider or placement.
$name = required_param('name', PARAM_PLUGIN); // Plugin name, e.g openai.
$syscontext = context_system::instance();
$PAGE->set_url('/admin/ai.php');
$PAGE->set_context($syscontext);
require_admin();
require_sesskey();
$return = new moodle_url('/admin/settings.php', ['section' => "aisettings$type"]);
$plugins = core_plugin_manager::instance()->get_plugins_of_type("ai$type");
$sortorder = array_flip(array_keys($plugins));
if (!isset($plugins[$name])) {
throw new moodle_exception('aipluginnotfound', 'core_ai', $return, $name);
}
$plugintypename = $plugins[$name]->type . '_' . $plugins[$name]->name;
switch ($action) {
case 'disable':
if ($plugins[$name]->is_enabled()) {
$class = core_plugin_manager::resolve_plugininfo_class("aisettings$type");
$class::enable_plugin($name, false);
}
break;
case 'enable':
if (!$plugins[$name]->is_enabled()) {
$class = core_plugin_manager::resolve_plugininfo_class("aisettings$type");
$class::enable_plugin($name, true);
}
break;
}
redirect($return);
-3
View File
@@ -1,3 +0,0 @@
define("core_admin/block_management_table",["exports","./plugin_management_table","core_table/dynamic","core/ajax","core/pending","core/notification"],(function(_exports,_plugin_management_table,_dynamic,_ajax,_pending,_notification){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_plugin_management_table=_interopRequireDefault(_plugin_management_table),_pending=_interopRequireDefault(_pending);class _default extends _plugin_management_table.default{constructor(){super(),this.addClickHandler(this.handleBlockProtectToggle)}setBlockProtectState(plugin,state){return(0,_ajax.call)([{methodname:"core_admin_set_block_protection",args:{plugin:plugin,state:state}}])[0]}async handleBlockProtectToggle(tableRoot,e){const stateToggle=e.target.closest('[data-action="toggleprotectstate"]');if(stateToggle){e.preventDefault();const pendingPromise=new _pending.default("core_table/dynamic:processAction");await this.setBlockProtectState(stateToggle.dataset.plugin,"1"===stateToggle.dataset.targetState?1:0);const[updatedRoot]=await Promise.all([(0,_dynamic.refreshTableContent)(tableRoot),(0,_notification.fetchNotifications)()]);updatedRoot.querySelector('[data-action="toggleprotectstate"][data-plugin="'.concat(stateToggle.dataset.plugin,'"]')).focus(),pendingPromise.resolve()}}}return _exports.default=_default,_exports.default}));
//# sourceMappingURL=block_management_table.min.js.map
@@ -1 +0,0 @@
{"version":3,"file":"block_management_table.min.js","sources":["../src/block_management_table.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\nimport PluginManagementTable from './plugin_management_table';\nimport {refreshTableContent} from 'core_table/dynamic';\nimport {call as fetchMany} from 'core/ajax';\nimport Pending from 'core/pending';\nimport {fetchNotifications} from 'core/notification';\n\nexport default class extends PluginManagementTable {\n constructor() {\n super();\n this.addClickHandler(this.handleBlockProtectToggle);\n }\n\n /**\n * Set the block protection state.\n *\n * @param {string} plugin\n * @param {number} state\n * @returns {Promise}\n */\n setBlockProtectState(plugin, state) {\n return fetchMany([{\n methodname: 'core_admin_set_block_protection',\n args: {\n plugin,\n state,\n },\n }])[0];\n }\n\n /**\n * Handle toggling of block protection.\n *\n * @param {HTMLElement} tableRoot\n * @param {Event} e\n */\n async handleBlockProtectToggle(tableRoot, e) {\n const stateToggle = e.target.closest('[data-action=\"toggleprotectstate\"]');\n if (stateToggle) {\n e.preventDefault();\n const pendingPromise = new Pending('core_table/dynamic:processAction');\n\n await this.setBlockProtectState(\n stateToggle.dataset.plugin,\n stateToggle.dataset.targetState === '1' ? 1 : 0\n );\n\n const [updatedRoot] = await Promise.all([\n refreshTableContent(tableRoot),\n fetchNotifications(),\n ]);\n\n // Refocus on the link that as pressed in the first place.\n updatedRoot.querySelector(`[data-action=\"toggleprotectstate\"][data-plugin=\"${stateToggle.dataset.plugin}\"]`).focus();\n pendingPromise.resolve();\n }\n }\n}\n"],"names":["PluginManagementTable","constructor","addClickHandler","this","handleBlockProtectToggle","setBlockProtectState","plugin","state","methodname","args","tableRoot","e","stateToggle","target","closest","preventDefault","pendingPromise","Pending","dataset","targetState","updatedRoot","Promise","all","querySelector","focus","resolve"],"mappings":"uhBAqB6BA,iCACzBC,2BAESC,gBAAgBC,KAAKC,0BAU9BC,qBAAqBC,OAAQC,cAClB,cAAU,CAAC,CACdC,WAAY,kCACZC,KAAM,CACFH,OAAAA,OACAC,MAAAA,UAEJ,kCASuBG,UAAWC,SAChCC,YAAcD,EAAEE,OAAOC,QAAQ,yCACjCF,YAAa,CACbD,EAAEI,uBACIC,eAAiB,IAAIC,iBAAQ,0CAE7Bd,KAAKE,qBACPO,YAAYM,QAAQZ,OACgB,MAApCM,YAAYM,QAAQC,YAAsB,EAAI,SAG3CC,mBAAqBC,QAAQC,IAAI,EACpC,gCAAoBZ,YACpB,wCAIJU,YAAYG,wEAAiEX,YAAYM,QAAQZ,cAAYkB,QAC7GR,eAAeS"}
-10
View File
@@ -1,10 +0,0 @@
define("core_admin/bulk_user_actions",["exports","core_reportbuilder/local/selectors","core_table/local/dynamic/events","core_form/changechecker","core/custom_interaction_events","jquery"],(function(_exports,reportSelectors,tableEvents,FormChangeChecker,CustomEvents,_jquery){var obj;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}
/**
* Add bulk actions to the users list report
*
* @module core_admin/bulk_user_actions
* @copyright 2024 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,reportSelectors=_interopRequireWildcard(reportSelectors),tableEvents=_interopRequireWildcard(tableEvents),FormChangeChecker=_interopRequireWildcard(FormChangeChecker),CustomEvents=_interopRequireWildcard(CustomEvents),_jquery=(obj=_jquery)&&obj.__esModule?obj:{default:obj};const Selectors_bulkActionsForm="form#user-bulk-action-form",Selectors_userReportWrapper='[data-region="report-user-list-wrapper"]',Selectors_checkbox='input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="slave"]',Selectors_masterCheckbox='input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="master"]',Selectors_checkedRows='[data-togglegroup="report-select-all"][data-toggle="slave"]:checked';_exports.init=()=>{var _userBulkForm$closest;const userBulkForm=document.querySelector(Selectors_bulkActionsForm),userReport=null==userBulkForm||null===(_userBulkForm$closest=userBulkForm.closest(Selectors_userReportWrapper))||void 0===_userBulkForm$closest?void 0:_userBulkForm$closest.querySelector(reportSelectors.regions.report);if(!userBulkForm||!userReport)return;const actionSelect=userBulkForm.querySelector("select");CustomEvents.define(actionSelect,[CustomEvents.events.accessibleChange]),(0,_jquery.default)(actionSelect).on(CustomEvents.events.accessibleChange,(event=>{if(event.target.value&&"0"!=="".concat(event.target.value)){const e=new Event("submit",{cancelable:!0});userBulkForm.dispatchEvent(e),e.defaultPrevented||(FormChangeChecker.markFormSubmitted(userBulkForm),userBulkForm.submit())}}));const updateUserIds=()=>{const selectedUsers=[...userReport.querySelectorAll(Selectors_checkedRows)],selectedUserIds=selectedUsers.map((check=>parseInt(check.value)));userBulkForm.querySelector('[name="userids"]').value=selectedUserIds.join(","),actionSelect.disabled=0===selectedUsers.length,actionSelect.disabled&&(actionSelect.value="0");const selectedUsersNames=selectedUsers.map((check=>document.querySelector('label[for="'.concat(check.id,'"]')).textContent));userBulkForm.data={userids:selectedUserIds,usernames:selectedUsersNames}};updateUserIds(),document.addEventListener("change",(event=>{(event.target.matches(Selectors_checkbox)||event.target.matches(Selectors_masterCheckbox))&&userReport.contains(event.target)&&updateUserIds()})),document.addEventListener(tableEvents.tableContentRefreshed,(event=>{userReport.contains(event.target)&&updateUserIds()}))}}));
//# sourceMappingURL=bulk_user_actions.min.js.map
File diff suppressed because one or more lines are too long
-12
View File
@@ -1,12 +0,0 @@
define("core_admin/expand_hash",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=_exports.expandSection=void 0;
/**
* Expand the collapse section element.
*
* @module core_admin/expand_hash
* @copyright Meirza <meirza.arson@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since 4.5
*/
const SELECTORS_COLLAPSE_ELEMENTS='[data-toggle="collapse"]',SELECTORS_FOCUSTHENEXPAND_ELEMENTS=".focus-expand";_exports.init=()=>{const focusexpand=document.querySelector(SELECTORS_FOCUSTHENEXPAND_ELEMENTS);null==focusexpand||focusexpand.addEventListener("click",(()=>{expandSection("".concat(focusexpand.getAttribute("href")))}))};const expandSection=hash=>{const container=document.querySelector(hash),targetContainer=null==container?void 0:container.querySelector(SELECTORS_COLLAPSE_ELEMENTS);if("false"===(null==targetContainer?void 0:targetContainer.getAttribute("aria-expanded"))){const collapseId=targetContainer.getAttribute("aria-controls"),collapseContainer=document.getElementById(collapseId);collapseContainer.classList.remove("collapse"),collapseContainer.classList.add("show"),targetContainer.setAttribute("aria-expanded","true"),targetContainer.classList.remove("collapsed");const collapseElement=document.querySelector(".collapseexpand.collapsemenu");collapseElement.setAttribute("aria-expanded","true"),collapseElement.classList.remove("collapsed")}};_exports.expandSection=expandSection}));
//# sourceMappingURL=expand_hash.min.js.map
-1
View File
@@ -1 +0,0 @@
{"version":3,"file":"expand_hash.min.js","sources":["../src/expand_hash.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 * Expand the collapse section element.\n *\n * @module core_admin/expand_hash\n * @copyright Meirza <meirza.arson@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 4.5\n */\n\nconst SELECTORS = {\n COLLAPSE_ELEMENTS: '[data-toggle=\"collapse\"]',\n FOCUSTHENEXPAND_ELEMENTS: '.focus-expand',\n};\n\n/**\n * Initializes the focus and expand functionality.\n */\nexport const init = () => {\n // Select all collapsible elements only.\n const focusexpand = document.querySelector(SELECTORS.FOCUSTHENEXPAND_ELEMENTS);\n\n // Add click event listener to the anchor element\n focusexpand?.addEventListener('click', () => {\n expandSection(`${focusexpand.getAttribute('href')}`);\n });\n};\n\n/**\n * Expands a section based on the provided URL hash.\n *\n * This function takes a hash string, finds the corresponding element in the DOM,\n * and expands it if it is currently collapsed. It updates the necessary ARIA\n * attributes and classes to reflect the expanded state.\n *\n * @param {string} hash - The hash (e.g., '#elementId') of the element to expand.\n */\nexport const expandSection = (hash) => {\n const container = document.querySelector(hash);\n const targetContainer = container?.querySelector(SELECTORS.COLLAPSE_ELEMENTS);\n\n if (targetContainer?.getAttribute('aria-expanded') === 'false') {\n const collapseId = targetContainer.getAttribute('aria-controls');\n const collapseContainer = document.getElementById(collapseId);\n\n // Show the content.\n collapseContainer.classList.remove('collapse');\n collapseContainer.classList.add('show');\n\n // Update aria-expanded attribute to reflect the new state.\n targetContainer.setAttribute('aria-expanded', 'true');\n targetContainer.classList.remove('collapsed');\n\n // Get collapse expand menu element.\n const collapseElement = document.querySelector('.collapseexpand.collapsemenu');\n // Ensure it gets noticed to make it work.\n collapseElement.setAttribute('aria-expanded', 'true');\n collapseElement.classList.remove('collapsed');\n }\n};\n"],"names":["SELECTORS","focusexpand","document","querySelector","addEventListener","expandSection","getAttribute","hash","container","targetContainer","collapseId","collapseContainer","getElementById","classList","remove","add","setAttribute","collapseElement"],"mappings":";;;;;;;;;MAwBMA,4BACiB,2BADjBA,mCAEwB,8BAMV,WAEVC,YAAcC,SAASC,cAAcH,oCAG3CC,MAAAA,aAAAA,YAAaG,iBAAiB,SAAS,KACnCC,wBAAiBJ,YAAYK,aAAa,oBAarCD,cAAiBE,aACpBC,UAAYN,SAASC,cAAcI,MACnCE,gBAAkBD,MAAAA,iBAAAA,UAAWL,cAAcH,gCAEM,WAAnDS,MAAAA,uBAAAA,gBAAiBH,aAAa,kBAA8B,OACtDI,WAAaD,gBAAgBH,aAAa,iBAC1CK,kBAAoBT,SAASU,eAAeF,YAGlDC,kBAAkBE,UAAUC,OAAO,YACnCH,kBAAkBE,UAAUE,IAAI,QAGhCN,gBAAgBO,aAAa,gBAAiB,QAC9CP,gBAAgBI,UAAUC,OAAO,mBAG3BG,gBAAkBf,SAASC,cAAc,gCAE/Cc,gBAAgBD,aAAa,gBAAiB,QAC9CC,gBAAgBJ,UAAUC,OAAO"}
-3
View File
@@ -1,3 +0,0 @@
define("core_admin/plugin_management_table",["exports","core_table/dynamic","core_table/local/dynamic/selectors","core/ajax","core/pending","core/notification"],(function(_exports,_dynamic,Selectors,_ajax,_pending,_notification){var obj;function _getRequireWildcardCache(nodeInterop){if("function"!=typeof WeakMap)return null;var cacheBabelInterop=new WeakMap,cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Selectors=function(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule)return obj;if(null===obj||"object"!=typeof obj&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if("default"!==key&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(Selectors),_pending=(obj=_pending)&&obj.__esModule?obj:{default:obj};let watching=!1;return _exports.default=class{constructor(){!function(obj,key,value){key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value}(this,"clickHandlers",[]),this.addClickHandler(this.handleStateToggle),this.addClickHandler(this.handleMoveUpDown),this.registerEventListeners()}static init(){watching||(watching=!0,new this)}addClickHandler(handler){this.clickHandlers.push(handler.bind(this))}registerEventListeners(){document.addEventListener("click",function(e){const tableRoot=this.getTableRoot(e);tableRoot&&this.clickHandlers.forEach((handler=>handler(tableRoot,e)))}.bind(this))}getTableRoot(e){const tableRoot=e.target.closest(Selectors.main.region);return tableRoot||!1}setPluginState(methodname,plugin,state){return(0,_ajax.call)([{methodname:methodname,args:{plugin:plugin,state:state}}])[0]}setPluginOrder(methodname,plugin,direction){return(0,_ajax.call)([{methodname:methodname,args:{plugin:plugin,direction:direction}}])[0]}async handleStateToggle(tableRoot,e){const stateToggle=e.target.closest('[data-action="togglestate"][data-toggle-method]');if(stateToggle){e.preventDefault();const pendingPromise=new _pending.default("core_table/dynamic:togglestate");await this.setPluginState(stateToggle.dataset.toggleMethod,stateToggle.dataset.plugin,"1"===stateToggle.dataset.state?0:1);const[updatedRoot]=await Promise.all([(0,_dynamic.refreshTableContent)(tableRoot),(0,_notification.fetchNotifications)()]);updatedRoot.querySelector('[data-action="togglestate"][data-plugin="'.concat(stateToggle.dataset.plugin,'"]')).focus(),this.removeTooltips(),pendingPromise.resolve()}}async handleMoveUpDown(tableRoot,e){const actionLink=e.target.closest('[data-action="move"][data-method][data-direction]');if(!actionLink)return;e.preventDefault();const pendingPromise=new _pending.default("core_table/dynamic:processAction");await this.setPluginOrder(actionLink.dataset.method,actionLink.dataset.plugin,"up"===actionLink.dataset.direction?-1:1);const[updatedRoot]=await Promise.all([(0,_dynamic.refreshTableContent)(tableRoot),(0,_notification.fetchNotifications)()]),exactMatch=updatedRoot.querySelector('[data-action="move"][data-plugin="'.concat(actionLink.dataset.plugin,'"][data-direction="').concat(actionLink.dataset.direction,'"]'));var _updatedRoot$querySel;exactMatch?exactMatch.focus():null===(_updatedRoot$querySel=updatedRoot.querySelector('[data-action="move"][data-plugin="'.concat(actionLink.dataset.plugin,'"]')))||void 0===_updatedRoot$querySel||_updatedRoot$querySel.focus();pendingPromise.resolve()}removeTooltips(){const tooltips=document.querySelectorAll('[id*="tooltip"]');tooltips.length>0&&tooltips.forEach((tooltip=>{tooltip.remove()}))}},_exports.default}));
//# sourceMappingURL=plugin_management_table.min.js.map
File diff suppressed because one or more lines are too long
-11
View File
@@ -1,11 +0,0 @@
define("core_admin/plugins_overview",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=function(){const filters=document.querySelectorAll(SELECTORS_PLUGIN_FILTERS),pluginRows=document.querySelectorAll(SELECTORS_PLUGIN_ROWS),pluginTypeRows=document.querySelectorAll(SELECTORS_PLUGIN_TYPE_ROWS),filterPlugins=target=>{const filterBy=target.getAttribute("data-filterby"),headerVisibility={};for(const row of pluginRows){const type=[...row.classList].find((s=>s.startsWith("type-"))),visible="all"===filterBy||row.classList.contains(filterBy);row.style.display=visible?null:"none",visible&&type&&(headerVisibility[type]=!0)}for(const row of pluginTypeRows){const type=[...row.classList].find((s=>s.startsWith("type-")));if(type){const visible="all"===filterBy||headerVisibility[type];row.style.display=visible?null:"none"}}filters.forEach((el=>el.classList.remove("active"))),target.classList.add("active")};if(filters.forEach((target=>target.addEventListener("click",(e=>{e.preventDefault(),window.history.replaceState({},null,e.target.href),filterPlugins(target)})))),window.location.hash.length>1){const anchor=window.location.hash.substring(1),target=[...filters].find((t=>t.getAttribute("data-filterby")===anchor));target&&filterPlugins(target)}};
/**
* Allows to filter the plugin list on plugins overview page
*
* @module core_admin/plugins_overview
* @copyright 2024 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
const SELECTORS_PLUGIN_FILTERS="#plugins-overview-panel [data-filterby]",SELECTORS_PLUGIN_ROWS="table#plugins-control-panel tbody tr:not(.plugintypeheader)",SELECTORS_PLUGIN_TYPE_ROWS="table#plugins-control-panel tbody tr.plugintypeheader"}));
//# sourceMappingURL=plugins_overview.min.js.map
@@ -1 +0,0 @@
{"version":3,"file":"plugins_overview.min.js","sources":["../src/plugins_overview.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 * Allows to filter the plugin list on plugins overview page\n *\n * @module core_admin/plugins_overview\n * @copyright 2024 Marina Glancy\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nconst SELECTORS = {\n PLUGIN_FILTERS: '#plugins-overview-panel [data-filterby]',\n PLUGIN_ROWS: 'table#plugins-control-panel tbody tr:not(.plugintypeheader)',\n PLUGIN_TYPE_ROWS: 'table#plugins-control-panel tbody tr.plugintypeheader',\n};\n\n/**\n * Initialise filters for the \"Plugins overview\" page\n */\nexport function init() {\n const filters = document.querySelectorAll(SELECTORS.PLUGIN_FILTERS);\n const pluginRows = document.querySelectorAll(SELECTORS.PLUGIN_ROWS);\n const pluginTypeRows = document.querySelectorAll(SELECTORS.PLUGIN_TYPE_ROWS);\n\n const filterPlugins = (target) => {\n const filterBy = target.getAttribute('data-filterby');\n const headerVisibility = {};\n\n // Hide all plugin rows in the plugin table that do not match the filter and show all others.\n for (const row of pluginRows) {\n const type = [...row.classList].find(s => s.startsWith('type-'));\n const visible = filterBy === 'all' ? true : row.classList.contains(filterBy);\n row.style.display = visible ? null : 'none';\n if (visible && type) {\n headerVisibility[type] = true;\n }\n }\n\n // Hide all the plugin type headers that do not have any visible plugins and show all others.\n for (const row of pluginTypeRows) {\n const type = [...row.classList].find(s => s.startsWith('type-'));\n if (type) {\n const visible = filterBy === 'all' || headerVisibility[type];\n row.style.display = visible ? null : 'none';\n }\n }\n\n // Toggle 'active' class for the selected filter.\n filters.forEach(el => el.classList.remove('active'));\n target.classList.add('active');\n };\n\n // Add event listeners for the links changing plugins filters.\n filters\n .forEach(target => target.addEventListener('click', (e) => {\n e.preventDefault();\n window.history.replaceState({}, null, e.target.href);\n filterPlugins(target);\n }));\n\n // Pre-filter plugins based on the current url anchor.\n if (window.location.hash.length > 1) {\n const anchor = window.location.hash.substring(1);\n const target = [...filters].find(t => t.getAttribute('data-filterby') === anchor);\n if (target) {\n filterPlugins(target);\n }\n }\n}\n"],"names":["filters","document","querySelectorAll","SELECTORS","pluginRows","pluginTypeRows","filterPlugins","target","filterBy","getAttribute","headerVisibility","row","type","classList","find","s","startsWith","visible","contains","style","display","forEach","el","remove","add","addEventListener","e","preventDefault","window","history","replaceState","href","location","hash","length","anchor","substring","t"],"mappings":"4JAiCUA,QAAUC,SAASC,iBAAiBC,0BACpCC,WAAaH,SAASC,iBAAiBC,uBACvCE,eAAiBJ,SAASC,iBAAiBC,4BAE3CG,cAAiBC,eACbC,SAAWD,OAAOE,aAAa,iBAC/BC,iBAAmB,OAGpB,MAAMC,OAAOP,WAAY,OACpBQ,KAAO,IAAID,IAAIE,WAAWC,MAAKC,GAAKA,EAAEC,WAAW,WACjDC,QAAuB,QAAbT,UAA4BG,IAAIE,UAAUK,SAASV,UACnEG,IAAIQ,MAAMC,QAAUH,QAAU,KAAO,OACjCA,SAAWL,OACXF,iBAAiBE,OAAQ,OAK5B,MAAMD,OAAON,eAAgB,OACxBO,KAAO,IAAID,IAAIE,WAAWC,MAAKC,GAAKA,EAAEC,WAAW,cACnDJ,KAAM,OACAK,QAAuB,QAAbT,UAAsBE,iBAAiBE,MACvDD,IAAIQ,MAAMC,QAAUH,QAAU,KAAO,QAK7CjB,QAAQqB,SAAQC,IAAMA,GAAGT,UAAUU,OAAO,YAC1ChB,OAAOM,UAAUW,IAAI,cAIzBxB,QACCqB,SAAQd,QAAUA,OAAOkB,iBAAiB,SAAUC,IACjDA,EAAEC,iBACFC,OAAOC,QAAQC,aAAa,GAAI,KAAMJ,EAAEnB,OAAOwB,MAC/CzB,cAAcC,aAIdqB,OAAOI,SAASC,KAAKC,OAAS,EAAG,OAC3BC,OAASP,OAAOI,SAASC,KAAKG,UAAU,GACxC7B,OAAS,IAAIP,SAASc,MAAKuB,GAAKA,EAAE5B,aAAa,mBAAqB0B,SACtE5B,QACAD,cAAcC;;;;;;;;MAvDpBJ,yBACc,0CADdA,sBAEW,8DAFXA,2BAGgB"}
-10
View File
@@ -1,10 +0,0 @@
define("core_admin/themeselector/preview_modal",["exports","core/modal_events","core/modal_cancel","core/modal_save_cancel","core/notification","core/templates","core/str"],(function(_exports,_modal_events,_modal_cancel,_modal_save_cancel,_notification,_templates,_str){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}
/**
* Modal for theme previews.
*
* @module core_admin/themeselector/preview_modal
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_modal_events=_interopRequireDefault(_modal_events),_modal_cancel=_interopRequireDefault(_modal_cancel),_modal_save_cancel=_interopRequireDefault(_modal_save_cancel),_notification=_interopRequireDefault(_notification),_templates=_interopRequireDefault(_templates);const SELECTORS_THEMES_CONTAINER="themelist",SELECTORS_PREVIEW='[data-action="preview"]';_exports.init=()=>{registerListenerEvents()};const registerListenerEvents=()=>{document.addEventListener("click",(e=>{const preview=e.target.closest(SELECTORS_PREVIEW);preview&&buildModal(preview).catch(_notification.default.exception)}))},buildModal=async element=>{let description=await(0,_str.getString)("choosereadme","theme_"+element.getAttribute("data-choose"));const themesContainer=document.getElementById(SELECTORS_THEMES_CONTAINER),definedInConfig=parseInt(themesContainer.dataset.definedinconfig),data={name:element.getAttribute("data-name"),image:element.getAttribute("data-image"),description:description.replace(/<[^>]+>/g," "),current:element.getAttribute("data-current"),actionurl:element.getAttribute("data-actionurl"),choose:element.getAttribute("data-choose"),sesskey:element.getAttribute("data-sesskey"),definedinconfig:definedInConfig};let modalTemplate=_modal_save_cancel.default;(data.current||data.definedinconfig)&&(modalTemplate=_modal_cancel.default);const modal=await modalTemplate.create({title:data.name,body:_templates.default.render("core_admin/themeselector/theme_preview_modal",data),large:!0,buttons:{save:(0,_str.getString)("selecttheme","moodle"),cancel:(0,_str.getString)("closebuttontitle","moodle")},show:!0});modal.getRoot().on(_modal_events.default.save,(()=>{modal.getRoot().find("form").submit()}))}}));
//# sourceMappingURL=preview_modal.min.js.map
@@ -1 +0,0 @@
{"version":3,"file":"preview_modal.min.js","sources":["../../src/themeselector/preview_modal.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Modal for theme previews.\n *\n * @module core_admin/themeselector/preview_modal\n * @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport ModalEvents from 'core/modal_events';\nimport ModalCancel from 'core/modal_cancel';\nimport ModalSaveCancel from 'core/modal_save_cancel';\nimport Notification from 'core/notification';\nimport Templates from 'core/templates';\nimport {getString} from 'core/str';\n\nconst SELECTORS = {\n THEMES_CONTAINER: 'themelist',\n PREVIEW: '[data-action=\"preview\"]',\n};\n\n/**\n * Entrypoint of the js.\n *\n * @method init\n */\nexport const init = () => {\n registerListenerEvents();\n};\n\n/**\n * Register theme related event listeners.\n *\n * @method registerListenerEvents\n */\nconst registerListenerEvents = () => {\n document.addEventListener('click', (e) => {\n const preview = e.target.closest(SELECTORS.PREVIEW);\n if (preview) {\n buildModal(preview).catch(Notification.exception);\n }\n });\n};\n\n/**\n * Build the modal with the provided data.\n *\n * @method buildModal\n * @param {object} element\n */\nconst buildModal = async(element) => {\n\n // This string can be long. We will fetch it with JS as opposed to passing it as an attribute.\n let description = await getString('choosereadme', 'theme_' + element.getAttribute('data-choose'));\n\n const themesContainer = document.getElementById(SELECTORS.THEMES_CONTAINER);\n const definedInConfig = parseInt(themesContainer.dataset.definedinconfig);\n // Prepare data for modal.\n const data = {\n name: element.getAttribute('data-name'),\n image: element.getAttribute('data-image'),\n description: description.replace(/<[^>]+>/g, ' '), // Strip out HTML tags.\n current: element.getAttribute('data-current'),\n actionurl: element.getAttribute('data-actionurl'),\n choose: element.getAttribute('data-choose'),\n sesskey: element.getAttribute('data-sesskey'),\n definedinconfig: definedInConfig,\n };\n\n // Determine which modal template we should use.\n let modalTemplate = ModalSaveCancel;\n if (data.current || data.definedinconfig) {\n modalTemplate = ModalCancel;\n }\n\n const modal = await modalTemplate.create({\n title: data.name,\n body: Templates.render('core_admin/themeselector/theme_preview_modal', data),\n large: true,\n buttons: {\n 'save': getString('selecttheme', 'moodle'),\n 'cancel': getString('closebuttontitle', 'moodle'),\n },\n show: true,\n });\n\n modal.getRoot().on(ModalEvents.save, () => {\n modal.getRoot().find('form').submit();\n });\n};\n"],"names":["SELECTORS","registerListenerEvents","document","addEventListener","e","preview","target","closest","buildModal","catch","Notification","exception","async","description","element","getAttribute","themesContainer","getElementById","definedInConfig","parseInt","dataset","definedinconfig","data","name","image","replace","current","actionurl","choose","sesskey","modalTemplate","ModalSaveCancel","ModalCancel","modal","create","title","body","Templates","render","large","buttons","show","getRoot","on","ModalEvents","save","find","submit"],"mappings":";;;;;;;gWA8BMA,2BACgB,YADhBA,kBAEO,wCAQO,KAChBC,gCAQEA,uBAAyB,KAC3BC,SAASC,iBAAiB,SAAUC,UAC1BC,QAAUD,EAAEE,OAAOC,QAAQP,mBAC7BK,SACAG,WAAWH,SAASI,MAAMC,sBAAaC,eAW7CH,WAAaI,MAAAA,cAGXC,kBAAoB,kBAAU,eAAgB,SAAWC,QAAQC,aAAa,sBAE5EC,gBAAkBd,SAASe,eAAejB,4BAC1CkB,gBAAkBC,SAASH,gBAAgBI,QAAQC,iBAEnDC,KAAO,CACTC,KAAMT,QAAQC,aAAa,aAC3BS,MAAOV,QAAQC,aAAa,cAC5BF,YAAaA,YAAYY,QAAQ,WAAY,KAC7CC,QAASZ,QAAQC,aAAa,gBAC9BY,UAAWb,QAAQC,aAAa,kBAChCa,OAAQd,QAAQC,aAAa,eAC7Bc,QAASf,QAAQC,aAAa,gBAC9BM,gBAAiBH,qBAIjBY,cAAgBC,4BAChBT,KAAKI,SAAWJ,KAAKD,mBACrBS,cAAgBE,6BAGdC,YAAcH,cAAcI,OAAO,CACrCC,MAAOb,KAAKC,KACZa,KAAMC,mBAAUC,OAAO,+CAAgDhB,MACvEiB,OAAO,EACPC,QAAS,OACG,kBAAU,cAAe,kBACvB,kBAAU,mBAAoB,WAE5CC,MAAM,IAGVR,MAAMS,UAAUC,GAAGC,sBAAYC,MAAM,KACjCZ,MAAMS,UAAUI,KAAK,QAAQC"}
-72
View File
@@ -1,72 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import PluginManagementTable from './plugin_management_table';
import {refreshTableContent} from 'core_table/dynamic';
import {call as fetchMany} from 'core/ajax';
import Pending from 'core/pending';
import {fetchNotifications} from 'core/notification';
export default class extends PluginManagementTable {
constructor() {
super();
this.addClickHandler(this.handleBlockProtectToggle);
}
/**
* Set the block protection state.
*
* @param {string} plugin
* @param {number} state
* @returns {Promise}
*/
setBlockProtectState(plugin, state) {
return fetchMany([{
methodname: 'core_admin_set_block_protection',
args: {
plugin,
state,
},
}])[0];
}
/**
* Handle toggling of block protection.
*
* @param {HTMLElement} tableRoot
* @param {Event} e
*/
async handleBlockProtectToggle(tableRoot, e) {
const stateToggle = e.target.closest('[data-action="toggleprotectstate"]');
if (stateToggle) {
e.preventDefault();
const pendingPromise = new Pending('core_table/dynamic:processAction');
await this.setBlockProtectState(
stateToggle.dataset.plugin,
stateToggle.dataset.targetState === '1' ? 1 : 0
);
const [updatedRoot] = await Promise.all([
refreshTableContent(tableRoot),
fetchNotifications(),
]);
// Refocus on the link that as pressed in the first place.
updatedRoot.querySelector(`[data-action="toggleprotectstate"][data-plugin="${stateToggle.dataset.plugin}"]`).focus();
pendingPromise.resolve();
}
}
}
-97
View File
@@ -1,97 +0,0 @@
// 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/>.
/**
* Add bulk actions to the users list report
*
* @module core_admin/bulk_user_actions
* @copyright 2024 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import * as reportSelectors from 'core_reportbuilder/local/selectors';
import * as tableEvents from 'core_table/local/dynamic/events';
import * as FormChangeChecker from 'core_form/changechecker';
import * as CustomEvents from 'core/custom_interaction_events';
import jQuery from 'jquery';
const Selectors = {
bulkActionsForm: 'form#user-bulk-action-form',
userReportWrapper: '[data-region="report-user-list-wrapper"]',
checkbox: 'input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="slave"]',
masterCheckbox: 'input[type="checkbox"][data-togglegroup="report-select-all"][data-toggle="master"]',
checkedRows: '[data-togglegroup="report-select-all"][data-toggle="slave"]:checked',
};
/**
* Initialise module
*/
export const init = () => {
const userBulkForm = document.querySelector(Selectors.bulkActionsForm);
const userReport = userBulkForm?.closest(Selectors.userReportWrapper)?.querySelector(reportSelectors.regions.report);
if (!userBulkForm || !userReport) {
return;
}
const actionSelect = userBulkForm.querySelector('select');
CustomEvents.define(actionSelect, [CustomEvents.events.accessibleChange]);
jQuery(actionSelect).on(CustomEvents.events.accessibleChange, event => {
if (event.target.value && `${event.target.value}` !== "0") {
const e = new Event('submit', {cancelable: true});
userBulkForm.dispatchEvent(e);
if (!e.defaultPrevented) {
FormChangeChecker.markFormSubmitted(userBulkForm);
userBulkForm.submit();
}
}
});
// Every time the checkboxes in the report are changed, update the list of users in the form values
// and enable/disable the action select.
const updateUserIds = () => {
const selectedUsers = [...userReport.querySelectorAll(Selectors.checkedRows)];
const selectedUserIds = selectedUsers.map(check => parseInt(check.value));
userBulkForm.querySelector('[name="userids"]').value = selectedUserIds.join(',');
// Disable the action selector if nothing selected, and reset the current selection.
actionSelect.disabled = selectedUsers.length === 0;
if (actionSelect.disabled) {
actionSelect.value = "0";
}
const selectedUsersNames = selectedUsers.map(check => document.querySelector(`label[for="${check.id}"]`).textContent);
// Add the user ids and names to the form data attributes so they can be available from the
// other JS modules that listen to the form submit event.
userBulkForm.data = {userids: selectedUserIds, usernames: selectedUsersNames};
};
updateUserIds();
document.addEventListener('change', event => {
// When checkboxes are checked next to individual users or the master toggle (Select all/none).
if ((event.target.matches(Selectors.checkbox) || event.target.matches(Selectors.masterCheckbox))
&& userReport.contains(event.target)) {
updateUserIds();
}
});
document.addEventListener(tableEvents.tableContentRefreshed, event => {
// When the report contents is updated (i.e. page is changed, filters applied, etc).
if (userReport.contains(event.target)) {
updateUserIds();
}
});
};
-74
View File
@@ -1,74 +0,0 @@
// 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/>.
/**
* Expand the collapse section element.
*
* @module core_admin/expand_hash
* @copyright Meirza <meirza.arson@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since 4.5
*/
const SELECTORS = {
COLLAPSE_ELEMENTS: '[data-toggle="collapse"]',
FOCUSTHENEXPAND_ELEMENTS: '.focus-expand',
};
/**
* Initializes the focus and expand functionality.
*/
export const init = () => {
// Select all collapsible elements only.
const focusexpand = document.querySelector(SELECTORS.FOCUSTHENEXPAND_ELEMENTS);
// Add click event listener to the anchor element
focusexpand?.addEventListener('click', () => {
expandSection(`${focusexpand.getAttribute('href')}`);
});
};
/**
* Expands a section based on the provided URL hash.
*
* This function takes a hash string, finds the corresponding element in the DOM,
* and expands it if it is currently collapsed. It updates the necessary ARIA
* attributes and classes to reflect the expanded state.
*
* @param {string} hash - The hash (e.g., '#elementId') of the element to expand.
*/
export const expandSection = (hash) => {
const container = document.querySelector(hash);
const targetContainer = container?.querySelector(SELECTORS.COLLAPSE_ELEMENTS);
if (targetContainer?.getAttribute('aria-expanded') === 'false') {
const collapseId = targetContainer.getAttribute('aria-controls');
const collapseContainer = document.getElementById(collapseId);
// Show the content.
collapseContainer.classList.remove('collapse');
collapseContainer.classList.add('show');
// Update aria-expanded attribute to reflect the new state.
targetContainer.setAttribute('aria-expanded', 'true');
targetContainer.classList.remove('collapsed');
// Get collapse expand menu element.
const collapseElement = document.querySelector('.collapseexpand.collapsemenu');
// Ensure it gets noticed to make it work.
collapseElement.setAttribute('aria-expanded', 'true');
collapseElement.classList.remove('collapsed');
}
};
-195
View File
@@ -1,195 +0,0 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
import {refreshTableContent} from 'core_table/dynamic';
import * as Selectors from 'core_table/local/dynamic/selectors';
import {call as fetchMany} from 'core/ajax';
import Pending from 'core/pending';
import {fetchNotifications} from 'core/notification';
let watching = false;
export default class {
/**
* @property {function[]} clickHandlers a list of handlers to call on click.
*/
clickHandlers = [];
constructor() {
this.addClickHandler(this.handleStateToggle);
this.addClickHandler(this.handleMoveUpDown);
this.registerEventListeners();
}
/**
* Initialise an instance of the class.
*
* This is just a way of making it easier to initialise an instance of the class from PHP.
*/
static init() {
if (watching) {
return;
}
watching = true;
new this();
}
/**
* Add a click handler to the list of handlers.
*
* @param {Function} handler A handler to call on a click event
*/
addClickHandler(handler) {
this.clickHandlers.push(handler.bind(this));
}
/**
* Register the event listeners for this instance.
*/
registerEventListeners() {
document.addEventListener('click', function(e) {
const tableRoot = this.getTableRoot(e);
if (!tableRoot) {
return;
}
this.clickHandlers.forEach((handler) => handler(tableRoot, e));
}.bind(this));
}
/**
* Get the table root from an event.
*
* @param {Event} e
* @returns {HTMLElement|bool}
*/
getTableRoot(e) {
const tableRoot = e.target.closest(Selectors.main.region);
if (!tableRoot) {
return false;
}
return tableRoot;
}
/**
* Set the plugin state (enabled or disabled)
*
* @param {string} methodname The web service to call
* @param {string} plugin The name of the plugin to set the state for
* @param {number} state The state to set
* @returns {Promise}
*/
setPluginState(methodname, plugin, state) {
return fetchMany([{
methodname,
args: {
plugin,
state,
},
}])[0];
}
setPluginOrder(methodname, plugin, direction) {
return fetchMany([{
methodname,
args: {
plugin,
direction,
},
}])[0];
}
/**
* Handle state toggling.
*
* @param {HTMLElement} tableRoot
* @param {Event} e
*/
async handleStateToggle(tableRoot, e) {
const stateToggle = e.target.closest('[data-action="togglestate"][data-toggle-method]');
if (stateToggle) {
e.preventDefault();
const pendingPromise = new Pending('core_table/dynamic:togglestate');
await this.setPluginState(
stateToggle.dataset.toggleMethod,
stateToggle.dataset.plugin,
stateToggle.dataset.state === '1' ? 0 : 1
);
const [updatedRoot] = await Promise.all([
refreshTableContent(tableRoot),
fetchNotifications(),
]);
// Refocus on the link that as pressed in the first place.
updatedRoot.querySelector(`[data-action="togglestate"][data-plugin="${stateToggle.dataset.plugin}"]`).focus();
// When clicking the toggle and it remains focused, a new tooltip will be generated.
// Therefore, the old tooltip should be removed.
this.removeTooltips();
pendingPromise.resolve();
}
}
async handleMoveUpDown(tableRoot, e) {
const actionLink = e.target.closest('[data-action="move"][data-method][data-direction]');
if (!actionLink) {
return;
}
e.preventDefault();
const pendingPromise = new Pending('core_table/dynamic:processAction');
await this.setPluginOrder(
actionLink.dataset.method,
actionLink.dataset.plugin,
actionLink.dataset.direction === 'up' ? -1 : 1,
);
const [updatedRoot] = await Promise.all([
refreshTableContent(tableRoot),
fetchNotifications(),
]);
// Refocus on the link that as pressed in the first place.
const exactMatch = updatedRoot.querySelector(
`[data-action="move"][data-plugin="${actionLink.dataset.plugin}"][data-direction="${actionLink.dataset.direction}"]`
);
if (exactMatch) {
exactMatch.focus();
} else {
// The move link is not present anymore, so we need to focus on the other one.
updatedRoot.querySelector(`[data-action="move"][data-plugin="${actionLink.dataset.plugin}"]`)?.focus();
}
pendingPromise.resolve();
}
/**
* Remove tooltips.
*/
removeTooltips() {
const tooltips = document.querySelectorAll('[id*="tooltip"]');
if (tooltips.length > 0) {
tooltips.forEach(tooltip => {
tooltip.remove();
});
}
}
}
-82
View File
@@ -1,82 +0,0 @@
// 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/>.
/**
* Allows to filter the plugin list on plugins overview page
*
* @module core_admin/plugins_overview
* @copyright 2024 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
const SELECTORS = {
PLUGIN_FILTERS: '#plugins-overview-panel [data-filterby]',
PLUGIN_ROWS: 'table#plugins-control-panel tbody tr:not(.plugintypeheader)',
PLUGIN_TYPE_ROWS: 'table#plugins-control-panel tbody tr.plugintypeheader',
};
/**
* Initialise filters for the "Plugins overview" page
*/
export function init() {
const filters = document.querySelectorAll(SELECTORS.PLUGIN_FILTERS);
const pluginRows = document.querySelectorAll(SELECTORS.PLUGIN_ROWS);
const pluginTypeRows = document.querySelectorAll(SELECTORS.PLUGIN_TYPE_ROWS);
const filterPlugins = (target) => {
const filterBy = target.getAttribute('data-filterby');
const headerVisibility = {};
// Hide all plugin rows in the plugin table that do not match the filter and show all others.
for (const row of pluginRows) {
const type = [...row.classList].find(s => s.startsWith('type-'));
const visible = filterBy === 'all' ? true : row.classList.contains(filterBy);
row.style.display = visible ? null : 'none';
if (visible && type) {
headerVisibility[type] = true;
}
}
// Hide all the plugin type headers that do not have any visible plugins and show all others.
for (const row of pluginTypeRows) {
const type = [...row.classList].find(s => s.startsWith('type-'));
if (type) {
const visible = filterBy === 'all' || headerVisibility[type];
row.style.display = visible ? null : 'none';
}
}
// Toggle 'active' class for the selected filter.
filters.forEach(el => el.classList.remove('active'));
target.classList.add('active');
};
// Add event listeners for the links changing plugins filters.
filters
.forEach(target => target.addEventListener('click', (e) => {
e.preventDefault();
window.history.replaceState({}, null, e.target.href);
filterPlugins(target);
}));
// Pre-filter plugins based on the current url anchor.
if (window.location.hash.length > 1) {
const anchor = window.location.hash.substring(1);
const target = [...filters].find(t => t.getAttribute('data-filterby') === anchor);
if (target) {
filterPlugins(target);
}
}
}
@@ -1,104 +0,0 @@
// 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/>.
/**
* Modal for theme previews.
*
* @module core_admin/themeselector/preview_modal
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
import ModalEvents from 'core/modal_events';
import ModalCancel from 'core/modal_cancel';
import ModalSaveCancel from 'core/modal_save_cancel';
import Notification from 'core/notification';
import Templates from 'core/templates';
import {getString} from 'core/str';
const SELECTORS = {
THEMES_CONTAINER: 'themelist',
PREVIEW: '[data-action="preview"]',
};
/**
* Entrypoint of the js.
*
* @method init
*/
export const init = () => {
registerListenerEvents();
};
/**
* Register theme related event listeners.
*
* @method registerListenerEvents
*/
const registerListenerEvents = () => {
document.addEventListener('click', (e) => {
const preview = e.target.closest(SELECTORS.PREVIEW);
if (preview) {
buildModal(preview).catch(Notification.exception);
}
});
};
/**
* Build the modal with the provided data.
*
* @method buildModal
* @param {object} element
*/
const buildModal = async(element) => {
// This string can be long. We will fetch it with JS as opposed to passing it as an attribute.
let description = await getString('choosereadme', 'theme_' + element.getAttribute('data-choose'));
const themesContainer = document.getElementById(SELECTORS.THEMES_CONTAINER);
const definedInConfig = parseInt(themesContainer.dataset.definedinconfig);
// Prepare data for modal.
const data = {
name: element.getAttribute('data-name'),
image: element.getAttribute('data-image'),
description: description.replace(/<[^>]+>/g, ' '), // Strip out HTML tags.
current: element.getAttribute('data-current'),
actionurl: element.getAttribute('data-actionurl'),
choose: element.getAttribute('data-choose'),
sesskey: element.getAttribute('data-sesskey'),
definedinconfig: definedInConfig,
};
// Determine which modal template we should use.
let modalTemplate = ModalSaveCancel;
if (data.current || data.definedinconfig) {
modalTemplate = ModalCancel;
}
const modal = await modalTemplate.create({
title: data.name,
body: Templates.render('core_admin/themeselector/theme_preview_modal', data),
large: true,
buttons: {
'save': getString('selecttheme', 'moodle'),
'cancel': getString('closebuttontitle', 'moodle'),
},
show: true,
});
modal.getRoot().on(ModalEvents.save, () => {
modal.getRoot().find('form').submit();
});
};
+9 -16
View File
@@ -33,7 +33,8 @@ $confirm = optional_param('confirm', 0, PARAM_BOOL);
$PAGE->set_url('/admin/antiviruses.php', array('action' => $action, 'antivirus' => $antivirus));
$PAGE->set_context(context_system::instance());
require_admin();
require_login();
require_capability('moodle/site:config', context_system::instance());
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=manageantiviruses";
@@ -54,19 +55,18 @@ if (!confirm_sesskey()) {
redirect($returnurl);
}
$needsupdate = false;
switch ($action) {
case 'disable':
// Remove from enabled list.
$class = \core_plugin_manager::resolve_plugininfo_class('antivirus');
$class::enable_plugin($antivirus, false);
$key = array_search($antivirus, $activeantiviruses);
unset($activeantiviruses[$key]);
break;
case 'enable':
// Add to enabled list.
if (!in_array($antivirus, $activeantiviruses)) {
$class = \core_plugin_manager::resolve_plugininfo_class('antivirus');
$class::enable_plugin($antivirus, true);
$activeantiviruses[] = $antivirus;
$activeantiviruses = array_unique($activeantiviruses);
}
break;
@@ -79,7 +79,6 @@ switch ($action) {
$fsave = $activeantiviruses[$key];
$activeantiviruses[$key] = $activeantiviruses[$key + 1];
$activeantiviruses[$key + 1] = $fsave;
$needsupdate = true;
}
}
break;
@@ -93,7 +92,6 @@ switch ($action) {
$fsave = $activeantiviruses[$key];
$activeantiviruses[$key] = $activeantiviruses[$key - 1];
$activeantiviruses[$key - 1] = $fsave;
$needsupdate = true;
}
}
break;
@@ -102,12 +100,7 @@ switch ($action) {
break;
}
if ($needsupdate) {
$new = implode(',', $activeantiviruses);
add_to_config_log('antiviruses', $CFG->antiviruses, $new, 'core');
set_config('antiviruses', $new);
core_plugin_manager::reset_caches();
}
set_config('antiviruses', implode(',', $activeantiviruses));
core_plugin_manager::reset_caches();
redirect ($returnurl);
redirect ($returnurl);
+29 -16
View File
@@ -11,7 +11,8 @@ require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
require_admin();
require_login();
require_capability('moodle/site:config', context_system::instance());
$returnurl = new moodle_url('/admin/settings.php', array('section'=>'manageauths'));
@@ -28,7 +29,7 @@ if (empty($CFG->auth)) {
}
if (!empty($auth) and !exists_auth_plugin($auth)) {
throw new \moodle_exception('pluginnotinstalled', 'auth', $returnurl, $auth);
print_error('pluginnotinstalled', 'auth', $returnurl, $auth);
}
////////////////////////////////////////////////////////////////////////////////
@@ -40,31 +41,43 @@ if (!confirm_sesskey()) {
switch ($action) {
case 'disable':
// Remove from enabled list.
$class = \core_plugin_manager::resolve_plugininfo_class('auth');
$class::enable_plugin($auth, false);
// remove from enabled list
$key = array_search($auth, $authsenabled);
if ($key !== false) {
unset($authsenabled[$key]);
set_config('auth', implode(',', $authsenabled));
}
if ($auth == $CFG->registerauth) {
set_config('registerauth', '');
}
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
break;
case 'enable':
// Add to enabled list.
$class = \core_plugin_manager::resolve_plugininfo_class('auth');
$class::enable_plugin($auth, true);
// add to enabled list
if (!in_array($auth, $authsenabled)) {
$authsenabled[] = $auth;
$authsenabled = array_unique($authsenabled);
set_config('auth', implode(',', $authsenabled));
}
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
break;
case 'down':
$key = array_search($auth, $authsenabled);
// check auth plugin is valid
if ($key === false) {
throw new \moodle_exception('pluginnotenabled', 'auth', $returnurl, $auth);
print_error('pluginnotenabled', 'auth', $returnurl, $auth);
}
// move down the list
if ($key < (count($authsenabled) - 1)) {
$fsave = $authsenabled[$key];
$authsenabled[$key] = $authsenabled[$key + 1];
$authsenabled[$key + 1] = $fsave;
$value = implode(',', $authsenabled);
add_to_config_log('auth', $CFG->auth, $value, 'core');
set_config('auth', $value);
set_config('auth', implode(',', $authsenabled));
}
break;
@@ -72,16 +85,14 @@ switch ($action) {
$key = array_search($auth, $authsenabled);
// check auth is valid
if ($key === false) {
throw new \moodle_exception('pluginnotenabled', 'auth', $returnurl, $auth);
print_error('pluginnotenabled', 'auth', $returnurl, $auth);
}
// move up the list
if ($key >= 1) {
$fsave = $authsenabled[$key];
$authsenabled[$key] = $authsenabled[$key - 1];
$authsenabled[$key - 1] = $fsave;
$value = implode(',', $authsenabled);
add_to_config_log('auth', $CFG->auth, $value, 'core');
set_config('auth', $value);
set_config('auth', implode(',', $authsenabled));
}
break;
@@ -90,3 +101,5 @@ switch ($action) {
}
redirect($returnurl);
+212
View File
@@ -0,0 +1,212 @@
<?php
/**
* Edit configuration for an individual auth plugin
*/
require_once '../config.php';
require_once $CFG->libdir.'/adminlib.php';
$auth = required_param('auth', PARAM_PLUGIN);
$PAGE->set_pagetype('admin-auth-' . $auth);
admin_externalpage_setup('authsetting'.$auth);
$authplugin = get_auth_plugin($auth);
$err = array();
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=manageauths";
debugging("Use of config.html files in authentication plugins have been deprecated. " .
" Please migrate your plugin to use the admin settings API", DEBUG_DEVELOPER);
// save configuration changes
if ($frm = data_submitted() and confirm_sesskey()) {
$authplugin->validate_form($frm, $err);
if (count($err) == 0) {
// save plugin config
if ($authplugin->process_config($frm)) {
// save field lock configuration
foreach ($frm as $name => $value) {
if (preg_match('/^lockconfig_(.+?)$/', $name, $matches)) {
$plugin = "auth/$auth";
$name = $matches[1];
set_config($name, $value, $plugin);
}
}
redirect($returnurl);
exit;
}
} else {
foreach ($err as $key => $value) {
$focus = "form.$key";
}
}
} else {
$frmlegacystyle = get_config('auth/'.$auth);
$frmnewstyle = get_config('auth_'.$auth);
$frm = (object)array_merge((array)$frmlegacystyle, (array)$frmnewstyle);
}
$user_fields = $authplugin->userfields;
//$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "institution", "department", "address", "city", "country", "description", "idnumber", "lang");
/// Get the auth title (from core or own auth lang files)
$authtitle = $authplugin->get_title();
/// Get the auth descriptions (from core or own auth lang files)
$authdescription = $authplugin->get_description();
// output configuration form
echo $OUTPUT->header();
// choose an authentication method
echo "<form id=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
echo "<div>\n";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />\n";
echo "<input type=\"hidden\" name=\"auth\" value=\"".$auth."\" />\n";
// auth plugin description
echo $OUTPUT->box_start();
echo $OUTPUT->heading($authtitle);
echo $OUTPUT->box_start('informationbox');
echo $authdescription;
echo $OUTPUT->box_end();
echo "<hr />\n";
$authplugin->config_form($frm, $err, $user_fields);
echo $OUTPUT->box_end();
echo '<p style="text-align: center"><input type="submit" value="' . get_string("savechanges") . "\" /></p>\n";
echo "</div>\n";
echo "</form>\n";
$PAGE->requires->string_for_js('unmaskpassword', 'core_form');
$PAGE->requires->yui_module('moodle-auth-passwordunmask', 'M.auth.passwordunmask');
echo $OUTPUT->footer();
exit;
/// Functions /////////////////////////////////////////////////////////////////
/**
* auth field locking
* Good enough for most auth plugins
* but some may want a custom one if they are offering
* other options
* Note: lockconfig_ fields have special handling.
*
* @param string $auth authentication plugin shortname
* @param array $user_fields user profile fields
* @param string $helptext help text to be displayed at top of form
* @param boolean $retrieveopts Map fields or lock only.
* @param boolean $updateopts Allow remote updates
* @param array $customfields list of custom profile fields
* @deprecated since Moodle 3.3
*/
function print_auth_lock_options($auth, $user_fields, $helptext, $retrieveopts, $updateopts, $customfields = array()) {
global $DB, $OUTPUT;
debugging("The function 'print_auth_lock_options' has been deprecated, " .
"Please migrate your code to use the admin settings API and use the function 'display_auth_lock_options' instead. ",
DEBUG_DEVELOPER);
echo '<tr><td colspan="3">';
if ($retrieveopts) {
echo $OUTPUT->heading(get_string('auth_data_mapping', 'auth'));
} else {
echo $OUTPUT->heading(get_string('auth_fieldlocks', 'auth'));
}
echo '</td></tr>';
$lockoptions = array ('unlocked' => get_string('unlocked', 'auth'),
'unlockedifempty' => get_string('unlockedifempty', 'auth'),
'locked' => get_string('locked', 'auth'));
$updatelocaloptions = array('oncreate' => get_string('update_oncreate', 'auth'),
'onlogin' => get_string('update_onlogin', 'auth'));
$updateextoptions = array('0' => get_string('update_never', 'auth'),
'1' => get_string('update_onupdate', 'auth'));
$pluginconfig = get_config("auth/$auth");
// Helptext is on a field with rowspan.
if (empty($helptext)) {
$helptext = '&nbsp;';
}
// If we have custom fields then merge them with user fields.
if (!empty($customfields)) {
$user_fields = array_merge($user_fields, $customfields);
}
if (!empty($customfields)) {
$customfieldname = $DB->get_records('user_info_field', null, '', 'shortname, name');
}
foreach ($user_fields as $field) {
// Define some vars we'll work with.
if (!isset($pluginconfig->{"field_map_$field"})) {
$pluginconfig->{"field_map_$field"} = '';
}
if (!isset($pluginconfig->{"field_updatelocal_$field"})) {
$pluginconfig->{"field_updatelocal_$field"} = '';
}
if (!isset($pluginconfig->{"field_updateremote_$field"})) {
$pluginconfig->{"field_updateremote_$field"} = '';
}
if (!isset($pluginconfig->{"field_lock_$field"})) {
$pluginconfig->{"field_lock_$field"} = '';
}
// Define the fieldname we display to the user.
$fieldname = $field;
if ($fieldname === 'lang') {
$fieldname = get_string('language');
} elseif (!empty($customfields) && in_array($field, $customfields)) {
// If custom field then pick name from database.
$fieldshortname = str_replace('profile_field_', '', $fieldname);
$fieldname = $customfieldname[$fieldshortname]->name;
if (core_text::strlen($fieldshortname) > 67) {
// If custom profile field name is longer than 67 characters we will not be able to store the setting
// such as 'field_updateremote_profile_field_NOTSOSHORTSHORTNAME' in the database because the character
// limit for the setting name is 100.
continue;
}
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} else {
$fieldname = get_string($fieldname);
}
if ($retrieveopts) {
$varname = 'field_map_' . $field;
echo '<tr valign="top"><td align="right">';
echo '<label for="lockconfig_'.$varname.'">'.$fieldname.'</label>';
echo '</td><td>';
echo "<input id=\"lockconfig_{$varname}\" name=\"lockconfig_{$varname}\" type=\"text\" size=\"30\" value=\"{$pluginconfig->$varname}\" />";
echo '<div style="text-align: right">';
echo '<label for="menulockconfig_field_updatelocal_'.$field.'">'.get_string('auth_updatelocal', 'auth') . '</label>&nbsp;';
echo html_writer::select($updatelocaloptions, "lockconfig_field_updatelocal_{$field}", $pluginconfig->{"field_updatelocal_$field"}, false);
echo '<br />';
if ($updateopts) {
echo '<label for="menulockconfig_field_updateremote_'.$field.'">'.get_string('auth_updateremote', 'auth') . '</label>&nbsp;';
echo html_writer::select($updateextoptions, "lockconfig_field_updateremote_{$field}", $pluginconfig->{"field_updateremote_$field"}, false);
echo '<br />';
}
echo '<label for="menulockconfig_field_lock_'.$field.'">'.get_string('auth_fieldlock', 'auth') . '</label>&nbsp;';
echo html_writer::select($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, false);
echo '</div>';
} else {
echo '<tr valign="top"><td align="right">';
echo '<label for="menulockconfig_field_lock_'.$field.'">'.$fieldname.'</label>';
echo '</td><td>';
echo html_writer::select($lockoptions, "lockconfig_field_lock_{$field}", $pluginconfig->{"field_lock_$field"}, false);
}
echo '</td>';
if (!empty($helptext)) {
echo '<td rowspan="' . count($user_fields) . '">' . $helptext . '</td>';
$helptext = '';
}
echo '</tr>';
}
}
+223 -79
View File
@@ -1,94 +1,238 @@
<?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/>.
/**
* Allows the admin to configure blocks (hide/show, uninstall and configure)
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// Allows the admin to configure blocks (hide/show, uninstall and configure)
require_once('../config.php');
require_once("{$CFG->libdir}/adminlib.php");
require_once("{$CFG->libdir}/blocklib.php");
require_once("{$CFG->libdir}/tablelib.php");
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/blocklib.php');
require_once($CFG->libdir.'/tablelib.php');
admin_externalpage_setup('manageblocks');
admin_externalpage_setup('manageblocks');
$plugin = optional_param('plugin', '', PARAM_PLUGIN);
$action = optional_param('action', '', PARAM_ALPHA);
$unprotect = optional_param('unprotect', 0, PARAM_PLUGIN);
$protect = optional_param('protect', 0, PARAM_PLUGIN);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$unprotect = optional_param('unprotect', 0, PARAM_INT);
$protect = optional_param('protect', 0, PARAM_INT);
$strmanageblocks = get_string('manageblocks');
/// Print headings
// If data submitted, then process and store.
if (!empty($plugin) && !empty($action) && confirm_sesskey()) {
$manager = \core_plugin_manager::resolve_plugininfo_class('block');
$pluginname = get_string('pluginname', "block_{$plugin}");
$strmanageblocks = get_string('manageblocks');
$struninstall = get_string('uninstallplugin', 'core_admin');
$strversion = get_string('version');
$strhide = get_string('hide');
$strshow = get_string('show');
$strsettings = get_string('settings');
$strcourses = get_string('blockinstances', 'admin');
$strname = get_string('name');
$strshowblockcourse = get_string('showblockcourse');
$strprotecthdr = get_string('blockprotect', 'admin'). $OUTPUT->help_icon('blockprotect','admin');
$strprotect = get_string('blockprotect', 'admin');
$strunprotect = get_string('blockunprotect', 'admin');
if ($action === 'disable' && $manager::enable_plugin($plugin, 0)) {
\core\notification::add(
get_string('plugin_disabled', 'core_admin', $pluginname),
\core\notification::SUCCESS
);
// Settings not required - only pages.
admin_get_root(true, false);
} else if ($action === 'enable' && $manager::enable_plugin($plugin, 1)) {
\core\notification::add(
get_string('plugin_enabled', 'core_admin', $pluginname),
\core\notification::SUCCESS
);
/// If data submitted, then process and store.
// Settings not required - only pages.
admin_get_root(true, false);
if (!empty($hide) && confirm_sesskey()) {
if (!$block = $DB->get_record('block', array('id'=>$hide))) {
print_error('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '0', array('id'=>$block->id)); // Hide block
add_to_config_log('block_visibility', $block->visible, '0', $block->name);
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
// Redirect back to the page with out any params.
redirect(new moodle_url('/admin/blocks.php'));
}
if (!empty($show) && confirm_sesskey() ) {
if (!$block = $DB->get_record('block', array('id'=>$show))) {
print_error('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '1', array('id'=>$block->id)); // Show block
add_to_config_log('block_visibility', $block->visible, '1', $block->name);
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($protect) && confirm_sesskey()) {
block_manager::protect_block($protect);
$pluginname = get_string('pluginname', "block_{$protect}");
\core\notification::add(
get_string('blockprotected', 'core_admin', $pluginname),
\core\notification::SUCCESS
);
// Settings not required - only pages.
admin_get_root(true, false);
}
if (!empty($protect) && confirm_sesskey()) {
block_manager::protect_block((int)$protect);
admin_get_root(true, false); // settings not required - only pages
}
if (!empty($unprotect) && confirm_sesskey()) {
block_manager::unprotect_block($unprotect);
$pluginname = get_string('pluginname', "block_{$unprotect}");
\core\notification::add(
get_string('blockunprotected', 'core_admin', $pluginname),
\core\notification::SUCCESS
);
// Settings not required - only pages.
admin_get_root(true, false);
}
if (!empty($unprotect) && confirm_sesskey()) {
block_manager::unprotect_block((int)$unprotect);
admin_get_root(true, false); // settings not required - only pages
}
$undeletableblocktypes = block_manager::get_undeletable_block_types();
echo $OUTPUT->header();
echo $OUTPUT->heading($strmanageblocks);
/// Main display starts here
/// Get and sort the existing blocks
if (!$blocks = $DB->get_records('block', array(), 'name ASC')) {
print_error('noblocks', 'error'); // Should never happen
}
$incompatible = array();
/// Print the table of all blocks
$table = new flexible_table('admin-blocks-compatible');
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'settings', 'uninstall'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strsettings, $struninstall));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'admintable blockstable generaltable');
$table->set_attribute('id', 'compatibleblockstable');
$table->setup();
$tablerows = array();
// Sort blocks using current locale.
$blocknames = array();
foreach ($blocks as $blockid=>$block) {
$blockname = $block->name;
if (file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
$blocknames[$blockid] = get_string('pluginname', 'block_'.$blockname);
} else {
$blocknames[$blockid] = $blockname;
}
}
core_collator::asort($blocknames);
foreach ($blocknames as $blockid=>$strblockname) {
$block = $blocks[$blockid];
$blockname = $block->name;
$dbversion = get_config('block_'.$block->name, 'version');
if (!file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
$blockobject = false;
$strblockname = '<span class="notifyproblem">'.$strblockname.' ('.get_string('missingfromdisk').')</span>';
$plugin = new stdClass();
$plugin->version = $dbversion;
} else {
$plugin = new stdClass();
$plugin->version = '???';
if (file_exists("$CFG->dirroot/blocks/$blockname/version.php")) {
include("$CFG->dirroot/blocks/$blockname/version.php");
}
if (!$blockobject = block_instance($block->name)) {
$incompatible[] = $block;
continue;
}
}
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('block_'.$blockname, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
} else {
$uninstall = '';
}
$settings = ''; // By default, no configuration
if ($blockobject and $blockobject->has_config()) {
$blocksettings = admin_get_root()->locate('blocksetting' . $block->name);
if ($blocksettings instanceof admin_externalpage) {
$settings = '<a href="' . $blocksettings->url . '">' . get_string('settings') . '</a>';
} else if ($blocksettings instanceof admin_settingpage) {
$settings = '<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=blocksetting'.$block->name.'">'.$strsettings.'</a>';
} else if (!file_exists($CFG->dirroot.'/blocks/'.$block->name.'/settings.php')) {
// If the block's settings node was not found, we check that the block really provides the settings.php file.
// Note that blocks can inject their settings to other nodes in the admin tree without using the default locations.
// This can be done by assigning null to $setting in settings.php and it is a valid case.
debugging('Warning: block_'.$block->name.' returns true in has_config() but does not provide a settings.php file',
DEBUG_DEVELOPER);
}
}
// MDL-11167, blocks can be placed on mymoodle, or the blogs page
// and it should not show up on course search page
$totalcount = $DB->count_records('block_instances', array('blockname'=>$blockname));
$count = $DB->count_records('block_instances', array('blockname'=>$blockname, 'pagetypepattern'=>'course-view-*'));
if ($count>0) {
$blocklist = "<a href=\"{$CFG->wwwroot}/course/search.php?blocklist=$blockid&amp;sesskey=".sesskey()."\" ";
$blocklist .= "title=\"$strshowblockcourse\" >$totalcount</a>";
}
else {
$blocklist = "$totalcount";
}
$class = ''; // Nothing fancy, by default
if (!$blockobject) {
// ignore
$visible = '';
} else if ($blocks[$blockid]->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strhide.'">'.
$OUTPUT->pix_icon('t/hide', $strhide) . '</a>';
} else {
$visible = '<a href="blocks.php?show='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strshow.'">'.
$OUTPUT->pix_icon('t/show', $strshow) . '</a>';
$class = 'dimmed_text';
}
if ($dbversion == $plugin->version) {
$version = $dbversion;
} else {
$version = "$dbversion ($plugin->version)";
}
if (!$blockobject) {
// ignore
$undeletable = '';
} else if (in_array($blockname, $undeletableblocktypes)) {
$undeletable = '<a href="blocks.php?unprotect='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strunprotect.'">'.
$OUTPUT->pix_icon('t/unlock', $strunprotect) . '</a>';
} else {
$undeletable = '<a href="blocks.php?protect='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strprotect.'">'.
$OUTPUT->pix_icon('t/lock', $strprotect) . '</a>';
}
$row = array(
$strblockname,
$blocklist,
$version,
$visible,
$undeletable,
$settings,
$uninstall,
);
$table->add_data($row, $class);
}
$table->print_html();
if (!empty($incompatible)) {
echo $OUTPUT->heading(get_string('incompatibleblocks', 'blockstable', 'admin'));
$table = new flexible_table('admin-blocks-incompatible');
$table->define_columns(array('block', 'uninstall'));
$table->define_headers(array($strname, $struninstall));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'incompatibleblockstable generaltable');
$table->setup();
foreach ($incompatible as $block) {
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('block_'.$block->name, 'manage')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
} else {
$uninstall = '';
}
$table->add_data(array(
$block->name,
$uninstall,
));
}
$table->print_html();
}
echo $OUTPUT->footer();
echo $OUTPUT->header();
echo $OUTPUT->heading($strmanageblocks);
echo $OUTPUT->notification(get_string('noteunneededblocks', 'admin'), 'info', false);
// Print the table of all blocks.
$table = new \core_admin\table\block_management_table();
$table->out();
echo $OUTPUT->footer();
+13 -14
View File
@@ -30,6 +30,7 @@ $category = required_param('category', PARAM_SAFEDIR);
$return = optional_param('return','', PARAM_ALPHA);
$adminediting = optional_param('adminedit', -1, PARAM_BOOL);
/// no guest autologin
require_login(0, false);
$PAGE->set_context(context_system::instance());
$PAGE->set_url('/admin/category.php', array('category' => $category));
@@ -41,19 +42,13 @@ $adminroot = admin_get_root(); // need all settings
$settingspage = $adminroot->locate($category, true);
if (empty($settingspage) or !($settingspage instanceof admin_category)) {
throw new \moodle_exception('categoryerror', 'error', "$CFG->wwwroot/$CFG->admin/");
print_error('categoryerror', 'admin', "$CFG->wwwroot/$CFG->admin/");
}
if (!($settingspage->check_access())) {
throw new \moodle_exception('accessdenied', 'admin');
print_error('accessdenied', 'admin');
}
$hassiteconfig = has_capability('moodle/site:config', $PAGE->context);
if ($hassiteconfig) {
$PAGE->add_header_action($OUTPUT->render_from_template('core_admin/header_search_input', [
'action' => new moodle_url('/admin/search.php'),
]));
}
$statusmsg = '';
$errormsg = '';
@@ -81,7 +76,7 @@ if ($PAGE->user_allowed_editing() && $adminediting != -1) {
$USER->editing = $adminediting;
}
$buttons = null;
if ($PAGE->user_allowed_editing() && !$PAGE->theme->haseditswitch) {
if ($PAGE->user_allowed_editing()) {
$url = clone($PAGE->url);
if ($PAGE->user_is_editing()) {
$caption = get_string('blockseditoff');
@@ -131,7 +126,8 @@ if ($savebutton) {
$outputhtml .= html_writer::end_tag('div');
}
$PAGE->set_title(implode(moodle_page::TITLE_SEPARATOR, $settingspage->visiblepath));
$visiblepathtosection = array_reverse($settingspage->visiblepath);
$PAGE->set_title("$SITE->shortname: " . implode(": ",$visiblepathtosection));
$PAGE->set_heading($SITE->fullname);
if ($buttons) {
$PAGE->set_button($buttons);
@@ -145,7 +141,13 @@ if ($errormsg !== '') {
echo $OUTPUT->notification($statusmsg, 'notifysuccess');
}
echo $OUTPUT->heading(get_string('admincategory', 'admin', $settingspage->visiblename), 2);
$path = array_reverse($settingspage->visiblepath);
if (is_array($path)) {
$visiblename = join(' / ', $path);
} else {
$visiblename = $path;
}
echo $OUTPUT->heading(get_string('admincategory', 'admin', $visiblename), 2);
echo html_writer::start_tag('form', array('action' => '', 'method' => 'post', 'id' => 'adminsettings'));
echo html_writer::start_tag('div');
@@ -157,7 +159,4 @@ echo $outputhtml;
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');
// Add the form change checker.
$PAGE->requires->js_call_amd('core_form/changechecker', 'watchFormById', ['adminsettings']);
echo $OUTPUT->footer();
@@ -1,127 +0,0 @@
<?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/>.
namespace core_admin\admin;
use admin_setting;
use core_plugin_manager;
use core_text;
/**
* Admin setting plugin manager.
*
* @package core_admin
* @subpackage admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class admin_setting_plugin_manager extends admin_setting {
/** @var core_plugin_manager The plugin manager instance */
protected core_plugin_manager $pluginmanager;
/** @var string The plugintype that this manager covers */
protected string $plugintype;
/** @var string The class of the management table to use */
protected string $tableclass;
public function __construct(
string $plugintype,
string $tableclass,
string $name,
string $visiblename,
string $description = '',
string $defaultsetting = '',
) {
$this->nosave = true;
$this->pluginmanager = core_plugin_manager::instance();
$this->plugintype = $plugintype;
$this->tableclass = $tableclass;
parent::__construct($name, $visiblename, $description, $defaultsetting);
}
/**
* Always returns true, does nothing
*
* @return true
*/
public function get_setting(): bool {
return true;
}
/**
* Always returns true, does nothing
*
* @return true
*/
public function get_defaultsetting(): bool {
return true;
}
/**
* Always returns '', does not write anything
*
* @return string Always returns ''
*/
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
public function write_setting($data): string {
// Do not write any setting.
return '';
}
/**
* Checks if $query is one of the available editors
*
* @param string $query The string to search for
* @return bool Returns true if found, false if not
*/
public function is_related($query) {
if (parent::is_related($query)) {
return true;
}
$plugins = $this->pluginmanager->get_installed_plugins($this->plugintype);
foreach (array_keys($plugins) as $plugin) {
$plugin = "{$this->plugintype}_{$plugin}";
if (str_contains($plugin, $query)) {
return true;
}
$pluginname = get_string('pluginname', $plugin);
if (strpos(core_text::strtolower($pluginname), $query) !== false) {
return true;
}
}
return false;
}
/**
* Builds the XHTML to display the control
*
* @param string $data Unused
* @param string $query
* @return string
*/
public function output_html($data, $query = ''): string {
$table = new $this->tableclass();
if (!($table instanceof \core_admin\table\plugin_management_table)) {
throw new \coding_exception("{$this->tableclass} must be an instance of \\core_admin\\table\\plugin_management_table");
}
return highlight($query, $table->get_content());
}
}
-97
View File
@@ -1,97 +0,0 @@
<?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/>.
namespace core_admin\external;
use block_manager;
use core_external\external_api;
use core_external\external_function_parameters;
use core_external\external_single_structure;
use core_external\external_value;
/**
* Web Service to control the state of a plugin.
*
* @package core_admin
* @category external
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class set_block_protection extends external_api {
/**
* Returns description of method parameters
*
* @return external_function_parameters
*/
public static function execute_parameters(): external_function_parameters {
return new external_function_parameters([
'plugin' => new external_value(PARAM_PLUGIN, 'The name of the plugin', VALUE_REQUIRED),
'state' => new external_value(PARAM_INT, 'The target state', VALUE_REQUIRED),
]);
}
/**
* Set the block protection state.
*
* @param string $plugin The name of the plugin
* @param int $state The target state
* @return null
*/
public static function execute(
string $plugin,
int $state,
): array {
[
'plugin' => $plugin,
'state' => $state,
] = self::validate_parameters(self::execute_parameters(), [
'plugin' => $plugin,
'state' => $state,
]);
$context = \context_system::instance();
self::validate_context($context);
require_capability('moodle/site:config', $context);
[, $pluginname] = explode('_', \core_component::normalize_componentname($plugin), 2);
$displayname = get_string('pluginname', $plugin);
if ($state) {
block_manager::protect_block($pluginname);
\core\notification::add(
get_string('blockprotected', 'core_admin', $displayname),
\core\notification::SUCCESS
);
} else {
block_manager::unprotect_block($pluginname);
\core\notification::add(
get_string('blockunprotected', 'core_admin', $displayname),
\core\notification::SUCCESS
);
}
return [];
}
/**
* Describe the return structure of the external service.
*
* @return external_single_structure
*/
public static function execute_returns(): external_single_structure {
return new external_single_structure([]);
}
}
-84
View File
@@ -1,84 +0,0 @@
<?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/>.
namespace core_admin\external;
use core_external\external_api;
use core_external\external_function_parameters;
use core_external\external_single_structure;
use core_external\external_value;
/**
* Web Service to control the order of a plugin.
*
* @package core_admin
* @category external
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class set_plugin_order extends external_api {
/**
* Returns description of method parameters
*
* @return external_function_parameters
*/
public static function execute_parameters(): external_function_parameters {
return new external_function_parameters([
'plugin' => new external_value(PARAM_PLUGIN, 'The name of the plugin', VALUE_REQUIRED),
'direction' => new external_value(PARAM_INT, 'The direction to move', VALUE_REQUIRED),
]);
}
/**
* Set the plugin state.
*
* @param string $plugin The name of the plugin
* @param int $direction The direction to move the plugin
* @return array
*/
public static function execute(
string $plugin,
int $direction,
): array {
[
'plugin' => $plugin,
'direction' => $direction,
] = self::validate_parameters(self::execute_parameters(), [
'plugin' => $plugin,
'direction' => $direction,
]);
$context = \context_system::instance();
self::validate_context($context);
require_capability('moodle/site:config', $context);
[$plugintype, $pluginname] = explode('_', \core_component::normalize_componentname($plugin), 2);
$manager = \core_plugin_manager::resolve_plugininfo_class($plugintype);
$manager::change_plugin_order($pluginname, $direction);
return [];
}
/**
* Describe the return structure of the external service.
*
* @return external_single_structure
*/
public static function execute_returns(): external_single_structure {
return new external_single_structure([]);
}
}
-98
View File
@@ -1,98 +0,0 @@
<?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/>.
namespace core_admin\external;
use core_external\external_api;
use core_external\external_function_parameters;
use core_external\external_single_structure;
use core_external\external_value;
/**
* Web Service to control the state of a plugin.
*
* @package core_admin
* @category external
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class set_plugin_state extends external_api {
/**
* Returns description of method parameters
*
* @return external_function_parameters
*/
public static function execute_parameters(): external_function_parameters {
return new external_function_parameters([
'plugin' => new external_value(PARAM_PLUGIN, 'The name of the plugin', VALUE_REQUIRED),
'state' => new external_value(PARAM_INT, 'The target state', VALUE_REQUIRED),
]);
}
/**
* Set the plugin state.
*
* @param string $plugin The name of the plugin
* @param int $state The target state
* @return null
*/
public static function execute(
string $plugin,
int $state,
): array {
[
'plugin' => $plugin,
'state' => $state,
] = self::validate_parameters(self::execute_parameters(), [
'plugin' => $plugin,
'state' => $state,
]);
$context = \context_system::instance();
self::validate_context($context);
require_capability('moodle/site:config', $context);
[$plugintype, $pluginname] = explode('_', \core_component::normalize_componentname($plugin), 2);
$manager = \core_plugin_manager::resolve_plugininfo_class($plugintype);
$displayname = get_string('pluginname', $plugin);
if ($manager::enable_plugin($pluginname, $state)) {
if (!empty($state)) {
\core\notification::add(
get_string('plugin_enabled', 'core_admin', $displayname),
\core\notification::SUCCESS
);
} else {
\core\notification::add(
get_string('plugin_disabled', 'core_admin', $displayname),
\core\notification::SUCCESS
);
}
}
return [];
}
/**
* Describe the return structure of the external service.
*
* @return external_single_structure
*/
public static function execute_returns(): external_single_structure {
return new external_single_structure([]);
}
}
-76
View File
@@ -1,76 +0,0 @@
<?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/>.
/**
* Form for selective purging of caches.
*
* @package core
* @copyright 2018 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\form;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php');
/**
* Form for selecting which caches to purge on admin/purgecaches.php
*
* @package core
* @copyright 2018 The Open University
* @author Mark Johnson <mark.johnson@open.ac.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class purge_caches extends \moodleform {
/**
* Define a "Purge all caches" button, and a fieldset with checkboxes for selectively purging separate caches.
*/
public function definition() {
$mform = $this->_form;
$mform->addElement('hidden', 'returnurl', $this->_customdata['returnurl']);
$mform->setType('returnurl', PARAM_LOCALURL);
$mform->addElement('submit', 'all', get_string('purgecaches', 'admin'));
$mform->addElement('header', 'purgecacheheader', get_string('purgeselectedcaches', 'admin'));
$checkboxes = [
$mform->createElement('advcheckbox', 'theme', '', get_string('purgethemecache', 'admin')),
$mform->createElement('advcheckbox', 'lang', '', get_string('purgelangcache', 'admin')),
$mform->createElement('advcheckbox', 'js', '', get_string('purgejscache', 'admin')),
$mform->createElement('advcheckbox', 'template', '', get_string('purgetemplates', 'admin')),
$mform->createElement('advcheckbox', 'filter', '', get_string('purgefiltercache', 'admin')),
$mform->createElement('advcheckbox', 'muc', '', get_string('purgemuc', 'admin')),
$mform->createElement('advcheckbox', 'other', '', get_string('purgeothercaches', 'admin'))
];
$mform->addGroup($checkboxes, 'purgeselectedoptions');
$mform->addElement('submit', 'purgeselectedcaches', get_string('purgeselectedcaches', 'admin'));
}
/**
* If the "Purge selected caches" button was pressed, ensure at least one cache was selected.
*
* @param array $data
* @param array $files
* @return array Error messages
*/
public function validation($data, $files) {
$errors = [];
if (isset($data['purgeselectedcaches']) && empty(array_filter($data['purgeselectedoptions']))) {
$errors['purgeselectedoptions'] = get_string('purgecachesnoneselected', 'admin');
}
return $errors;
}
}
@@ -1,92 +0,0 @@
<?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/>.
/**
* Testing outgoing mail configuration form
*
* @package core
* @copyright 2019 Victor Deniz <victor@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\form;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php');
/**
* Test mail form
*
* @package core
* @copyright 2019 Victor Deniz <victor@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class testoutgoingmailconf_form extends \moodleform {
/**
* Add elements to form
*/
public function definition() {
$mform = $this->_form;
// Recipient.
$options = ['maxlength' => '100', 'size' => '25', 'autocomplete' => 'email'];
$mform->addElement('text', 'recipient', get_string('testoutgoingmailconf_toemail', 'admin'), $options);
$mform->setType('recipient', PARAM_EMAIL);
$mform->addRule('recipient', get_string('required'), 'required');
// From user.
$options = ['maxlength' => '100', 'size' => '25'];
$mform->addElement('text', 'from', get_string('testoutgoingmailconf_fromemail', 'admin'), $options);
$mform->setType('from', PARAM_TEXT);
$mform->addHelpButton('from', 'testoutgoingmailconf_fromemail', 'admin');
// Additional subject text.
$options = ['size' => '25'];
$mform->addElement('text', 'additionalsubject', get_string('testoutgoingmailconf_subjectadditional', 'admin'), $options);
$mform->setType('additionalsubject', PARAM_TEXT);
$buttonarray = array();
$buttonarray[] = $mform->createElement('submit', 'send', get_string('testoutgoingmailconf_sendtest', 'admin'));
$buttonarray[] = $mform->createElement('cancel');
$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
$mform->closeHeaderBefore('buttonar');
}
/**
* Validate Form field, should be a valid email format or a username that matches with a Moodle user.
*
* @param array $data
* @param array $files
* @return array
* @throws \dml_exception|\coding_exception
*/
public function validation($data, $files): array {
$errors = parent::validation($data, $files);
if (isset($data['from']) && $data['from']) {
$userfrom = \core_user::get_user_by_username($data['from']);
if (!$userfrom && !validate_email($data['from'])) {
$errors['from'] = get_string('testoutgoingmailconf_fromemail_invalid', 'admin');
}
}
return $errors;
}
}
@@ -1,71 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* External admin page class that allows a callback to be provided to determine whether page can be accessed
*
* @package core_admin
* @copyright 2019 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\externalpage;
use admin_externalpage;
defined('MOODLE_INTERNAL') || die();
require_once("{$CFG->libdir}/adminlib.php");
/**
* Admin externalpage class
*
* @package core_admin
* @copyright 2019 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class accesscallback extends admin_externalpage {
/** @var callable $accesscheckcallback */
protected $accesscheckcallback;
/**
* Class constructor
*
* @param string $name
* @param string $visiblename
* @param string $url
* @param callable $accesscheckcallback The callback method that will be executed to check whether user has access to
* this page. The setting instance ($this) is passed as an argument to the callback. Should return boolean value
* @param bool $hidden
*/
public function __construct(string $name, string $visiblename, string $url, callable $accesscheckcallback,
bool $hidden = false) {
$this->accesscheckcallback = $accesscheckcallback;
parent::__construct($name, $visiblename, $url, [], $hidden);
}
/**
* Determines if the current user has access to this external page based on access callback
*
* @return bool
*/
public function check_access() {
return ($this->accesscheckcallback)($this);
}
}
@@ -1,206 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Auto complete admin setting.
*
* @package core_admin
* @copyright 2020 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/adminlib.php');
/**
* Auto complete setting class.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright 2020 The Open University
*/
class autocomplete extends \admin_setting_configmultiselect {
/** @var boolean Should we allow typing new entries to the field? */
protected $tags = false;
/** @var string Name of an AMD module to send/process ajax requests. */
protected $ajax = '';
/** @var string Placeholder text for an empty list. */
protected $placeholder = '';
/** @var bool Whether the search has to be case-sensitive. */
protected $casesensitive = false;
/** @var bool Show suggestions by default - but this can be turned off. */
protected $showsuggestions = true;
/** @var string String that is shown when there are no selections. */
protected $noselectionstring = '';
/** @var string Delimiter to store values in database. */
protected $delimiter = ',';
/** @var string Should be multiple choices? */
protected $multiple = true;
/** @var string The link to manage choices. */
protected $manageurl = true;
/** @var string The text to display in manage link. */
protected $managetext = true;
/**
* Constructor
*
* @param string $name unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting'
* for ones in config_plugins.
* @param string $visiblename localised
* @param string $description long localised info
* @param array $defaultsetting array of selected items
* @param array $choices options for autocomplete field
* @param array $attributes settings for autocomplete field
*/
public function __construct($name, $visiblename, $description, $defaultsetting, $choices, $attributes = null) {
if ($attributes === null) {
$attributes = [];
}
$this->placeholder = get_string('search');
$this->noselectionstring = get_string('noselection', 'form');
$defaultattributes = [
'tags',
'showsuggestions',
'placeholder',
'noselectionstring',
'ajax',
'casesensitive',
'delimiter',
'multiple',
'manageurl',
'managetext'
];
foreach ($defaultattributes as $attributename) {
if (isset($attributes[$attributename])) {
$this->$attributename = $attributes[$attributename];
}
}
parent::__construct($name, $visiblename, $description, $defaultsetting, $choices);
}
/**
* Returns the select setting(s)
*
* @return mixed null or array. Null if no settings else array of setting(s)
*/
public function get_setting() {
$result = $this->config_read($this->name);
if (is_null($result)) {
return null;
}
if ($result === '') {
return [];
}
return explode($this->delimiter, $result);
}
/**
* Saves setting(s) provided through $data
*
* @param array $data
*/
public function write_setting($data) {
if (!is_array($data)) {
return ''; // Ignore it.
}
if (!$this->load_choices() || empty($this->choices)) {
return '';
}
unset($data['xxxxx']);
$save = [];
foreach ($data as $value) {
if (!array_key_exists($value, $this->choices)) {
continue; // Ignore it.
}
$save[] = $value;
}
return ($this->config_write($this->name, implode($this->delimiter, $save)) ? '' : get_string('errorsetting', 'admin'));
}
/**
* Returns XHTML autocomplete field
*
* @param array $data Array of values to select by default
* @param string $query
* @return string XHTML autocomplete field
*/
public function output_html($data, $query = '') {
global $OUTPUT;
if (!$this->load_choices() or empty($this->choices)) {
return '';
}
$default = $this->get_defaultsetting();
if (empty($default)) {
$default = [];
}
if (is_null($data)) {
$data = [];
}
$context = [
'id' => $this->get_id(),
'name' => $this->get_full_name()
];
$defaults = [];
$options = [];
$template = 'core_admin/local/settings/autocomplete';
foreach ($this->choices as $value => $name) {
if (in_array($value, $default)) {
$defaults[] = $name;
}
$options[] = [
'value' => $value,
'text' => $name,
'selected' => in_array($value, $data),
'disabled' => false
];
}
$context['options'] = $options;
$context['tags'] = $this->tags;
$context['placeholder'] = $this->placeholder;
$context['casesensitive'] = $this->casesensitive;
$context['multiple'] = $this->multiple;
$context['showsuggestions'] = $this->showsuggestions;
$context['manageurl'] = $this->manageurl;
$context['managetext'] = $this->managetext;
if (is_null($default)) {
$defaultinfo = null;
} if (!empty($defaults)) {
$defaultinfo = implode(', ', $defaults);
} else {
$defaultinfo = get_string('none');
}
$element = $OUTPUT->render_from_template($template, $context);
return format_admin_setting($this, $this->visiblename, $element, $this->description, true, '', $defaultinfo, $query);
}
}
-197
View File
@@ -1,197 +0,0 @@
<?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/>.
/**
* File size admin setting.
*
* @package core_admin
* @copyright 2019 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/adminlib.php');
/**
* An admin setting to support entering and displaying of file sizes in Bytes, KB, MB or GB.
*
* @copyright 2019 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class filesize extends \admin_setting {
/** @var int The byte unit. Number of bytes in a byte */
const UNIT_B = 1;
/** @var int The kilobyte unit (number of bytes in a kilobyte) */
const UNIT_KB = 1024;
/** @var int The megabyte unit (number of bytes in a megabyte) */
const UNIT_MB = 1048576;
/** @var int The gigabyte unit (number of bytes in a gigabyte) */
const UNIT_GB = 1073741824;
/** @var int default size unit */
protected $defaultunit;
/**
* Constructor
*
* @param string $name unique ascii name, either 'mysetting' for settings that in config,
* or 'myplugin/mysetting' for ones in config_plugins.
* @param string $visiblename localised name
* @param string $description localised long description
* @param int|null $defaultvalue Value of the settings in bytes
* @param int|null $defaultunit GB, MB, etc. (in bytes)
*/
public function __construct(string $name, string $visiblename, string $description,
?int $defaultvalue = null, ?int $defaultunit = null) {
$defaultsetting = self::parse_bytes($defaultvalue);
if ($defaultunit && array_key_exists($defaultunit, self::get_units())) {
$this->defaultunit = $defaultunit;
} else {
$this->defaultunit = self::UNIT_MB;
}
parent::__construct($name, $visiblename, $description, $defaultsetting);
}
/**
* Returns selectable units.
*
* @return array
*/
protected static function get_units(): array {
return [
self::UNIT_GB => get_string('sizegb'),
self::UNIT_MB => get_string('sizemb'),
self::UNIT_KB => get_string('sizekb'),
self::UNIT_B => get_string('sizeb'),
];
}
/**
* Converts bytes to some more user friendly string.
*
* @param int $bytes The number of bytes we want to convert from
* @return string
*/
protected static function get_size_text(int $bytes): string {
if (empty($bytes)) {
return get_string('none');
}
return display_size($bytes, 0);
}
/**
* Finds suitable units for given file size.
*
* @param int $bytes The number of bytes
* @return array Parsed file size in the format of ['v' => value, 'u' => unit]
*/
protected static function parse_bytes(int $bytes): array {
foreach (self::get_units() as $unit => $unused) {
if ($bytes % $unit === 0) {
return ['v' => (int)($bytes / $unit), 'u' => $unit];
}
}
return ['v' => (int)$bytes, 'u' => self::UNIT_B];
}
/**
* Get the selected file size as array.
*
* @return array|null An array containing 'v' => xx, 'u' => xx, or null if not set
*/
public function get_setting(): ?array {
$bytes = $this->config_read($this->name);
if (is_null($bytes)) {
return null;
}
$bytes = intval($bytes);
return self::parse_bytes($bytes);
}
/**
* Store the file size as bytes.
*
* @param array $data Must be form 'h' => xx, 'm' => xx
* @return string The error string if any
*/
public function write_setting($data): string {
if (!is_array($data)) {
return '';
}
if (!is_numeric($data['v']) || $data['v'] < 0) {
return get_string('errorsetting', 'admin');
}
// Calculate size in bytes, ensuring we don't overflow PHP_INT_MAX.
$bytes = $data['v'] * $data['u'];
$result = (is_int($bytes) && $this->config_write($this->name, $bytes));
return ($result ? '' : get_string('errorsetting', 'admin'));
}
/**
* Returns file size text+select fields.
*
* @param array $data The current setting value. Must be form 'v' => xx, 'u' => xx.
* @param string $query Admin search query to be highlighted.
* @return string File size text+select fields and wrapping div(s).
*/
public function output_html($data, $query = ''): string {
global $OUTPUT;
$default = $this->get_defaultsetting();
if (is_number($default)) {
$defaultinfo = self::get_size_text($default);
} else if (is_array($default)) {
$defaultinfo = self::get_size_text($default['v'] * $default['u']);
} else {
$defaultinfo = null;
}
$inputid = $this->get_id() . 'v';
$units = self::get_units();
$defaultunit = $this->defaultunit;
$context = (object) [
'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,
'name' => $title,
'selected' => ($data['v'] == 0 && $unit == $defaultunit) || $unit == $data['u']
];
}, array_keys($units), $units)
];
$element = $OUTPUT->render_from_template('core_admin/setting_configfilesize', $context);
return format_admin_setting($this, $this->visiblename, $element, $this->description, $inputid, '', $defaultinfo, $query);
}
}
@@ -1,37 +0,0 @@
<?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/>.
/**
* A settings page which can be viewed with a link directly.
*
* @package core_admin
* @copyright 2021 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
use moodle_url;
interface linkable_settings_page {
/**
* Get the URL to view this settings page.
*
* @return moodle_url
*/
public function get_settings_page_url(): moodle_url;
}
@@ -1,74 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Payment gateway admin setting.
*
* @package core_admin
* @copyright 2020 Shamim Rezaie <shamim@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
/**
* Generic class for managing plugins in a table that allows re-ordering and enable/disable of each plugin.
*/
class manage_payment_gateway_plugins extends \admin_setting_manage_plugins {
/**
* Get the admin settings section title (use get_string).
*
* @return string
*/
public function get_section_title() {
return get_string('type_paygw_plural', 'plugin');
}
/**
* Get the type of plugin to manage.
*
* @return string
*/
public function get_plugin_type() {
return 'paygw';
}
/**
* Get the name of the second column.
*
* @return string
*/
public function get_info_column_name() {
return get_string('supportedcurrencies', 'core_payment');
}
/**
* Get the type of plugin to manage.
*
* @param plugininfo The plugin info class.
* @return string
*/
public function get_info_column($plugininfo) {
$codes = $plugininfo->get_supported_currencies();
$currencies = [];
foreach ($codes as $c) {
$currencies[$c] = new \lang_string($c, 'core_currencies');
}
return implode(get_string('listsep', 'langconfig') . ' ', $currencies);
}
}
@@ -1,121 +0,0 @@
<?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/>.
/**
* Admin setting to show current scheduled task's status.
*
* @package core
* @copyright 2021 Universitat Rovira i Virgili
* @author Jordi Pujol-Ahulló <jpahullo@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/moodlelib.php');
use admin_setting_description;
use core\task\manager;
use core\task\scheduled_task;
use html_writer;
use lang_string;
use moodle_url;
use stdClass;
/**
* This admin setting tells whether a given scheduled task is enabled, providing a link to its configuration page.
*
* The goal of this setting is to help contextualizing the configuration settings with related scheduled task status,
* providing the big picture of that part of the system.
*
* @package core
* @copyright 2021 Universitat Rovira i Virgili
* @author Jordi Pujol-Ahulló <jpahullo@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class setting_scheduled_task_status extends admin_setting_description {
/**
* @var string fully qualified class name of a scheduled task.
*/
private $classname;
/**
* @var string additional text to append to the description.
*/
private $extradescription;
/**
* setting_scheduled_task_status constructor.
* @param string $name unique setting name.
* @param string $scheduledtaskclassname full classpath class name of the scheduled task.
* @param string $extradescription extra detail to append to the scheduled task status to add context in the setting
* page.
*/
public function __construct(string $name, string $scheduledtaskclassname, string $extradescription = '') {
$visiblename = new lang_string('task_status', 'admin');
$this->classname = $scheduledtaskclassname;
$this->extradescription = $extradescription;
parent::__construct($name, $visiblename, '');
}
/**
* Calculates lazily the content of the description.
* @param mixed $data nothing expected in this case.
* @param string $query nothing expected in this case.
* @return string the HTML content to print for this setting.
*/
public function output_html($data, $query = ''): string {
if (empty($this->description)) {
$this->description = $this->get_task_description();
}
return parent::output_html($data, $query);
}
/**
* Returns the HTML to print as the description.
* @return string description to be printed.
*/
private function get_task_description(): string {
$task = manager::get_scheduled_task($this->classname);
if ($task->is_enabled()) {
$taskenabled = get_string('enabled', 'admin');
} else {
$taskenabled = get_string('disabled', 'admin');
}
$taskenabled = strtolower($taskenabled);
$gotourl = new moodle_url(
'/admin/tool/task/scheduledtasks.php',
[],
scheduled_task::get_html_id($this->classname)
);
if (!empty($this->extradescription)) {
$this->extradescription = '<br />' . $this->extradescription;
}
$taskdetail = new stdClass();
$taskdetail->class = $this->classname;
$taskdetail->name = $task->get_name();
$taskdetail->status = $taskenabled;
$taskdetail->gotourl = $gotourl->out(false);
$taskdetail->extradescription = $this->extradescription;
return html_writer::tag('p', get_string('task_status_desc', 'admin', $taskdetail));
}
}
-71
View File
@@ -1,71 +0,0 @@
<?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/>.
namespace core_admin\output;
use moodle_url;
use renderable;
use renderer_base;
use stdClass;
use templatable;
/**
* Theme selector renderable.
*
* @package core_admin
* @copyright 2023 David Woloszyn <david.woloszyn@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class theme_selector implements renderable, templatable {
/** @var array $themedata Theme data to pass to the template. */
private $themedata = null;
/** @var bool Whether $CFG->theme is defined in config.php. */
private $definedinconfig;
/**
* Constructor.
*
* @param array $themedata Theme data used for template.
* @param bool $definedinconfig Whether $CFG->theme is defined in config.php.
*/
public function __construct(array $themedata, bool $definedinconfig = false) {
$this->themedata = $themedata;
$this->definedinconfig = $definedinconfig;
}
/**
* Export this data so it can be used as the context for a mustache template.
*
* @param renderer_base $output Renderer base.
* @return stdClass
*/
public function export_for_template(renderer_base $output): stdClass {
$data = new stdClass();
// Theme data used to populate cards and modal.
$data->themes = $this->themedata;
// Reset theme caches button.
$reseturl = new moodle_url('/admin/themeselector.php', ['sesskey' => sesskey(), 'reset' => 1]);
$resetbutton = new \single_button($reseturl, get_string('themeresetcaches', 'admin'), 'post',
\single_button::BUTTON_SECONDARY);
$data->resetbutton = $resetbutton->export_for_template($output);
$data->definedinconfig = $this->definedinconfig;
return $data;
}
}
+1 -1
View File
@@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason(): string {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
@@ -1,128 +0,0 @@
<?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/>.
declare(strict_types=1);
namespace core_admin\reportbuilder\datasource;
use core_admin\reportbuilder\local\entities\task_log;
use core_reportbuilder\datasource;
use core_reportbuilder\local\entities\user;
use core_reportbuilder\local\filters\select;
/**
* Task logs datasource
*
* @package core_admin
* @copyright 2022 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_logs extends datasource {
/**
* Return user friendly name of the report source
*
* @return string
*/
public static function get_name(): string {
return get_string('tasklogs', 'core_admin');
}
/**
* Initialise report
*/
protected function initialise(): void {
$tasklogentity = new task_log();
$tasklogalias = $tasklogentity->get_table_alias('task_log');
$this->set_main_table('task_log', $tasklogalias);
$this->add_entity($tasklogentity);
// Join the user entity to represent the associated user.
$userentity = new user();
$useralias = $userentity->get_table_alias('user');
$this->add_entity($userentity->add_join("
LEFT JOIN {user} {$useralias}
ON {$useralias}.id = {$tasklogalias}.userid")
);
// Add report elements from each of the entities we added to the report.
$this->add_all_from_entities();
}
/**
* Return the columns that will be added to the report upon creation
*
* @return string[]
*/
public function get_default_columns(): array {
return [
'task_log:name',
'task_log:starttime',
'task_log:duration',
'task_log:result',
];
}
/**
* Return the column sorting that will be added to the report upon creation
*
* @return int[]
*/
public function get_default_column_sorting(): array {
return [
'task_log:starttime' => SORT_DESC,
];
}
/**
* Return the filters that will be added to the report upon creation
*
* @return string[]
*/
public function get_default_filters(): array {
return [
'task_log:timestart',
'task_log:result',
];
}
/**
* Return the conditions that will be added to the report upon creation
*
* @return string[]
*/
public function get_default_conditions(): array {
return [
'task_log:type',
'task_log:timestart',
'task_log:result',
];
}
/**
* Return the condition values that will be set for the report upon creation
*
* @return array
*/
public function get_default_condition_values(): array {
return [
'task_log:type_operator' => select::EQUAL_TO,
'task_log:type_value' => \core\task\database_logger::TYPE_SCHEDULED,
];
}
}
@@ -1,415 +0,0 @@
<?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/>.
namespace core_admin\reportbuilder\local\entities;
use core_reportbuilder\local\filters\date;
use core_reportbuilder\local\filters\duration;
use core_reportbuilder\local\filters\number;
use core_reportbuilder\local\filters\select;
use core_reportbuilder\local\filters\text;
use core_reportbuilder\local\filters\autocomplete;
use core_reportbuilder\local\helpers\format;
use lang_string;
use core_reportbuilder\local\entities\base;
use core_reportbuilder\local\report\column;
use core_reportbuilder\local\report\filter;
use stdClass;
use core_collator;
/**
* Task log entity class implementation
*
* @package core_admin
* @copyright 2021 David Matamoros <davidmc@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_log extends base {
/** @var int Result success */
protected const SUCCESS = 0;
/** @var int Result failed */
protected const FAILED = 1;
/**
* Database tables that this entity uses
*
* @return string[]
*/
protected function get_default_tables(): array {
return [
'task_log',
];
}
/**
* The default title for this entity in the list of columns/conditions/filters in the report builder
*
* @return lang_string
*/
protected function get_default_entity_title(): lang_string {
return new lang_string('entitytasklog', 'admin');
}
/**
* Initialise the entity
*
* @return base
*/
public function initialise(): base {
$columns = $this->get_all_columns();
foreach ($columns as $column) {
$this->add_column($column);
}
// All the filters defined by the entity can also be used as conditions.
$filters = $this->get_all_filters();
foreach ($filters as $filter) {
$this
->add_filter($filter)
->add_condition($filter);
}
return $this;
}
/**
* Returns list of all available columns
*
* @return column[]
*/
protected function get_all_columns(): array {
global $DB;
$tablealias = $this->get_table_alias('task_log');
// Name column.
$columns[] = (new column(
'name',
new lang_string('name'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("{$tablealias}.classname")
->set_is_sortable(true)
->add_callback(static function(string $classname): string {
$output = '';
if (class_exists($classname)) {
$task = new $classname;
if ($task instanceof \core\task\task_base) {
$output = $task->get_name();
}
}
$output .= \html_writer::tag('div', "\\{$classname}", [
'class' => 'small text-muted',
]);
return $output;
});
// Component column.
$columns[] = (new column(
'component',
new lang_string('plugin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("{$tablealias}.component")
->set_is_sortable(true);
// Type column.
$columns[] = (new column(
'type',
new lang_string('tasktype', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("{$tablealias}.type")
->set_is_sortable(true)
->add_callback(static function($value): string {
if (\core\task\database_logger::TYPE_SCHEDULED === (int) $value) {
return get_string('task_type:scheduled', 'admin');
}
return get_string('task_type:adhoc', 'admin');
});
// Start time column.
$columns[] = (new column(
'starttime',
new lang_string('task_starttime', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TIMESTAMP)
->add_field("{$tablealias}.timestart")
->set_is_sortable(true)
->add_callback([format::class, 'userdate'], get_string('strftimedatetimeshortaccurate', 'core_langconfig'));
// End time column.
$columns[] = (new column(
'endtime',
new lang_string('task_endtime', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TIMESTAMP)
->add_field("{$tablealias}.timeend")
->set_is_sortable(true)
->add_callback([format::class, 'userdate'], get_string('strftimedatetimeshortaccurate', 'core_langconfig'));
// Duration column.
$columns[] = (new column(
'duration',
new lang_string('task_duration', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_FLOAT)
->add_field("{$tablealias}.timeend - {$tablealias}.timestart", 'duration')
->set_is_sortable(true)
->add_callback([format::class, 'format_time'], 2);
// Hostname column.
$columns[] = (new column(
'hostname',
new lang_string('hostname', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("$tablealias.hostname")
->set_is_sortable(true);
// PID column.
$columns[] = (new column(
'pid',
new lang_string('pid', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->add_field("{$tablealias}.pid")
->set_is_sortable(true);
// Database column.
$columns[] = (new column(
'database',
new lang_string('task_dbstats', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->add_fields("{$tablealias}.dbreads, {$tablealias}.dbwrites")
->set_is_sortable(true, ["{$tablealias}.dbreads", "{$tablealias}.dbwrites"])
->add_callback(static function($value, stdClass $row): string {
$output = '';
$output .= \html_writer::div(get_string('task_stats:dbreads', 'admin', $row->dbreads));
$output .= \html_writer::div(get_string('task_stats:dbwrites', 'admin', $row->dbwrites));
return $output;
});
// Database reads column.
$columns[] = (new column(
'dbreads',
new lang_string('task_dbreads', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_fields("{$tablealias}.dbreads")
->set_is_sortable(true);
// Database writes column.
$columns[] = (new column(
'dbwrites',
new lang_string('task_dbwrites', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_fields("{$tablealias}.dbwrites")
->set_is_sortable(true);
// Result column.
$columns[] = (new column(
'result',
new lang_string('task_result', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_BOOLEAN)
// For accurate aggregation, we need to return boolean success = true by xor'ing the field value.
->add_field($DB->sql_bitxor("{$tablealias}.result", 1), 'success')
->set_is_sortable(true)
->add_callback(static function(bool $success): string {
if (!$success) {
return get_string('task_result:failed', 'admin');
}
return get_string('success');
});
return $columns;
}
/**
* Return list of all available filters
*
* @return filter[]
*/
protected function get_all_filters(): array {
global $DB;
$tablealias = $this->get_table_alias('task_log');
// Name filter (Filter by classname).
$filters[] = (new filter(
autocomplete::class,
'name',
new lang_string('classname', 'tool_task'),
$this->get_entity_name(),
"{$tablealias}.classname"
))
->add_joins($this->get_joins())
->set_options_callback(static function(): array {
global $DB;
$classnames = $DB->get_fieldset_sql('SELECT DISTINCT classname FROM {task_log} ORDER BY classname ASC');
$options = [];
foreach ($classnames as $classname) {
if (class_exists($classname)) {
$task = new $classname;
$options[$classname] = $task->get_name();
}
}
core_collator::asort($options);
return $options;
});
// Component filter.
$filters[] = (new filter(
text::class,
'component',
new lang_string('plugin'),
$this->get_entity_name(),
"{$tablealias}.component"
))
->add_joins($this->get_joins());
// Type filter.
$filters[] = (new filter(
select::class,
'type',
new lang_string('tasktype', 'admin'),
$this->get_entity_name(),
"{$tablealias}.type"
))
->add_joins($this->get_joins())
->set_options([
\core\task\database_logger::TYPE_ADHOC => new lang_string('task_type:adhoc', 'admin'),
\core\task\database_logger::TYPE_SCHEDULED => new lang_string('task_type:scheduled', 'admin'),
]);
// Output filter (Filter by task output).
$filters[] = (new filter(
text::class,
'output',
new lang_string('task_logoutput', 'admin'),
$this->get_entity_name(),
$DB->sql_cast_to_char("{$tablealias}.output")
))
->add_joins($this->get_joins());
// Start time filter.
$filters[] = (new filter(
date::class,
'timestart',
new lang_string('task_starttime', 'admin'),
$this->get_entity_name(),
"{$tablealias}.timestart"
))
->add_joins($this->get_joins())
->set_limited_operators([
date::DATE_ANY,
date::DATE_RANGE,
date::DATE_PREVIOUS,
date::DATE_CURRENT,
]);
// End time.
$filters[] = (new filter(
date::class,
'timeend',
new lang_string('task_endtime', 'admin'),
$this->get_entity_name(),
"{$tablealias}.timeend"
))
->add_joins($this->get_joins())
->set_limited_operators([
date::DATE_ANY,
date::DATE_RANGE,
date::DATE_PREVIOUS,
date::DATE_CURRENT,
]);
// Duration filter.
$filters[] = (new filter(
duration::class,
'duration',
new lang_string('task_duration', 'admin'),
$this->get_entity_name(),
"{$tablealias}.timeend - {$tablealias}.timestart"
))
->add_joins($this->get_joins());
// Database reads.
$filters[] = (new filter(
number::class,
'dbreads',
new lang_string('task_dbreads', 'admin'),
$this->get_entity_name(),
"{$tablealias}.dbreads"
))
->add_joins($this->get_joins());
// Database writes.
$filters[] = (new filter(
number::class,
'dbwrites',
new lang_string('task_dbwrites', 'admin'),
$this->get_entity_name(),
"{$tablealias}.dbwrites"
))
->add_joins($this->get_joins());
// Result filter.
$filters[] = (new filter(
select::class,
'result',
new lang_string('task_result', 'admin'),
$this->get_entity_name(),
"{$tablealias}.result"
))
->add_joins($this->get_joins())
->set_options([
self::SUCCESS => get_string('success'),
self::FAILED => get_string('task_result:failed', 'admin'),
]);
return $filters;
}
}
@@ -1,108 +0,0 @@
<?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/>.
declare(strict_types=1);
namespace core_admin\reportbuilder\local\filters;
use core\context\system;
use core_course_category;
use MoodleQuickForm;
use core_reportbuilder\local\filters\base;
use core_reportbuilder\local\helpers\database;
/**
* Course role report filter (by role, category, course)
*
* The provided filter field SQL must refer/return an expression for the user ID (e.g. "{$user}.id")
*
* @package core_admin
* @copyright 2023 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class courserole extends base {
/**
* Setup form
*
* @param MoodleQuickForm $mform
*/
public function setup_form(MoodleQuickForm $mform): void {
$elements = [];
// Role.
$elements['role'] = $mform->createElement('select', "{$this->name}_role", get_string('rolefullname', 'core_role'),
[0 => get_string('anyrole', 'core_filters')] + get_default_enrol_roles(system::instance()));
// Category.
$elements['category'] = $mform->createElement('select', "{$this->name}_category", get_string('category'),
[0 => get_string('anycategory', 'core_filters')] + core_course_category::make_categories_list());
// Course.
$elements['course'] = $mform->createElement('text', "{$this->name}_course", get_string('shortnamecourse'));
$mform->setType("{$this->name}_course", PARAM_RAW_TRIMMED);
$mform->addGroup($elements, "{$this->name}_group", $this->get_header(), '', false)
->setHiddenLabel(true);
}
/**
* Return filter SQL
*
* @param array $values
* @return array
*/
public function get_sql_filter(array $values): array {
[$fieldsql, $params] = $this->filter->get_field_sql_and_params();
[$contextalias, $rolealias, $coursealias] = database::generate_aliases(3);
[$roleparam, $categoryparam, $courseparam] = database::generate_param_names(3);
// Role.
$role = (int) ($values["{$this->name}_role"] ?? 0);
if ($role > 0) {
$selects[] = "{$rolealias}.roleid = :{$roleparam}";
$params[$roleparam] = $role;
}
// Category.
$category = (int) ($values["{$this->name}_category"] ?? 0);
if ($category > 0) {
$selects[] = "{$coursealias}.category = :{$categoryparam}";
$params[$categoryparam] = $category;
}
// Course.
$course = trim($values["{$this->name}_course"] ?? '');
if ($course !== '') {
$selects[] = "{$coursealias}.shortname = :{$courseparam}";
$params[$courseparam] = $course;
}
// Filter values are not set.
if (empty($selects)) {
return ['', []];
}
return ["{$fieldsql} IN (
SELECT {$rolealias}.userid
FROM {role_assignments} {$rolealias}
JOIN {context} {$contextalias} ON {$contextalias}.id = {$rolealias}.contextid AND {$contextalias}.contextlevel = 50
JOIN {course} {$coursealias} ON {$coursealias}.id = {$contextalias}.instanceid
WHERE " . implode(' AND ', $selects) . "
)", $params];
}
}
@@ -1,165 +0,0 @@
<?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/>.
namespace core_admin\reportbuilder\local\systemreports;
use context_system;
use core_admin\reportbuilder\local\entities\task_log;
use core_reportbuilder\local\entities\user;
use core_reportbuilder\local\report\action;
use core_reportbuilder\system_report;
use html_writer;
use lang_string;
use moodle_url;
use pix_icon;
use stdClass;
/**
* Task logs system report class implementation
*
* @package core_admin
* @copyright 2021 David Matamoros <davidmc@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_logs extends system_report {
/**
* Initialise report, we need to set the main table, load our entities and set columns/filters
*/
protected function initialise(): void {
// Our main entity, it contains all of the column definitions that we need.
$entitymain = new task_log();
$entitymainalias = $entitymain->get_table_alias('task_log');
$this->set_main_table('task_log', $entitymainalias);
$this->add_entity($entitymain);
// Any columns required by actions should be defined here to ensure they're always available.
$this->add_base_fields("{$entitymainalias}.id");
// We can join the "user" entity to our "main" entity and use the fullname column from the user entity.
$entityuser = new user();
$entituseralias = $entityuser->get_table_alias('user');
$this->add_entity($entityuser->add_join(
"LEFT JOIN {user} {$entituseralias} ON {$entituseralias}.id = {$entitymainalias}.userid"
));
// Now we can call our helper methods to add the content we want to include in the report.
$this->add_columns();
$this->add_filters();
$this->add_actions();
// Set if report can be downloaded.
$this->set_downloadable(true, get_string('tasklogs', 'admin'));
}
/**
* Validates access to view this report
*
* @return bool
*/
protected function can_view(): bool {
return has_capability('moodle/site:config', context_system::instance());
}
/**
* Get the visible name of the report
*
* @return string
*/
public static function get_name(): string {
return get_string('entitytasklog', 'admin');
}
/**
* Adds the columns we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
public function add_columns(): void {
$entitymainalias = $this->get_entity('task_log')->get_table_alias('task_log');
$this->add_columns_from_entities([
'task_log:name',
'task_log:type',
'user:fullname',
'task_log:starttime',
'task_log:duration',
'task_log:hostname',
'task_log:pid',
'task_log:database',
'task_log:result',
]);
// Wrap the task name in a link.
$this->get_column('task_log:name')
->add_field("{$entitymainalias}.id")
->add_callback(static function(string $output, stdClass $row): string {
return html_writer::link(new moodle_url('/admin/tasklogs.php', ['logid' => $row->id]), $output);
});
// Rename the user fullname column.
$this->get_column('user:fullname')
->set_title(new lang_string('user', 'admin'));
// It's possible to set a default initial sort direction for one column.
$this->set_initial_sort_column('task_log:starttime', SORT_DESC);
}
/**
* Adds the filters we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
protected function add_filters(): void {
$this->add_filters_from_entities([
'task_log:name',
'task_log:type',
'task_log:output',
'task_log:result',
'task_log:timestart',
'task_log:duration',
]);
}
/**
* Add the system report actions. An extra column will be appended to each row, containing all actions added here
*
* Note the use of ":id" placeholder which will be substituted according to actual values in the row
*/
protected function add_actions(): void {
// Action to view individual task log on a popup window.
$this->add_action((new action(
new moodle_url('/admin/tasklogs.php', ['logid' => ':id']),
new pix_icon('e/search', ''),
[],
false,
new lang_string('view'),
)));
// Action to download individual task log.
$this->add_action((new action(
new moodle_url('/admin/tasklogs.php', ['logid' => ':id', 'download' => true]),
new pix_icon('t/download', ''),
[],
false,
new lang_string('download'),
)));
}
}

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