Compare commits

..

2662 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 22984eaecc Moodle release 3.5.18 2021-05-08 16:40:32 +02:00
Eloy Lafuente (stronk7) ed00c49c6f weekly release 3.5.17+ 2021-05-07 16:54:38 +02:00
Eloy Lafuente (stronk7) 7a4476b834 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2021-05-07 16:54:37 +02:00
Sara Arjona cd827ebe23 Merge branch 'MDL-71420_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2021-05-06 17:59:12 +02:00
Sara Arjona b76287f846 Merge branch 'MDL-71390-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2021-05-06 08:04:25 +02:00
AMOS bot 2231902a45 Automatically generated installer lang files 2021-05-06 00:07:39 +00:00
Eloy Lafuente (stronk7) 01403722a8 MDL-71420 environment: Lower sodium requirement to recommended 2021-05-05 23:06:31 +02:00
Víctor Déniz e1c1dfc748 Merge branch 'MDL-71460-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2021-05-05 10:57:44 +01:00
Peter Dias 32ded92858 MDL-71460 hub: Use checkboxes instead of dropdowns
Change the yes/no dropdowns to a checkbox. Defaults to unchecked.
2021-05-05 09:57:15 +08:00
AMOS bot 14d9570a54 Automatically generated installer lang files 2021-05-04 00:07:39 +00:00
Huong Nguyen 821ee3f6d3 MDL-70720 Quiz: Improve capability checks when fetching users' best grades 2021-05-03 23:04:46 +01:00
Marina Glancy b3261d7e47 MDL-71390 core: raise max_input_vars requirement for Moodle 3.11 2021-05-03 13:31:02 +02:00
Shamim Rezaie ac7c3878f6 MDL-69028 repository: Put a rate limit on draft file uploads 2021-04-30 14:21:24 +02:00
Paul Holden acf717ab77 MDL-71130 quiz_grading: escape user idnumber on display. 2021-04-30 14:21:24 +02:00
David Mudrák ddd7021adb MDL-70804 mnet: Use proper DML method to get records from the table
This improves the code and avoids the risk of SQL injection through the
malicious XML-RPC request from the MNet peer.
2021-04-30 14:21:24 +02:00
Víctor Déniz 05b03a44f4 weekly release 3.5.17+ 2021-04-30 12:54:18 +01:00
Víctor Déniz ab62531857 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2021-04-30 12:54:16 +01:00
Paul Holden a33058ebb3 MDL-70763 core: export preferences for correct user.
Ensure we are using the ID of the given user rather than falling
back to that of the current user during privacy export.
2021-04-28 12:30:28 +02:00
Paul Holden dea05d9284 MDL-70763 quiz_overview: export preferences for correct user. 2021-04-28 12:30:23 +02:00
Paul Holden 821342fac5 MDL-70763 gradereport_grader: export preferences for correct user. 2021-04-28 12:30:17 +02:00
AMOS bot b73d600ac5 Automatically generated installer lang files 2021-04-20 00:07:35 +00:00
AMOS bot 5b401c9055 Automatically generated installer lang files 2021-04-18 00:07:32 +00:00
AMOS bot 79a4c28dd5 Automatically generated installer lang files 2021-04-15 00:07:45 +00:00
AMOS bot 25c337f3d8 Automatically generated installer lang files 2021-04-14 00:07:38 +00:00
AMOS bot a3af71d840 Automatically generated installer lang files 2021-04-09 00:07:39 +00:00
AMOS bot 993674fd6f Automatically generated installer lang files 2021-04-06 00:07:46 +00:00
AMOS bot 84ac02e9f3 Automatically generated installer lang files 2021-04-04 00:07:44 +00:00
AMOS bot d42e0c1b05 Automatically generated installer lang files 2021-04-02 00:07:33 +00:00
AMOS bot 6ba2b1502b Automatically generated installer lang files 2021-04-01 00:07:35 +00:00
AMOS bot 225873e47e Automatically generated installer lang files 2021-03-29 00:07:33 +00:00
AMOS bot 758823c80e Automatically generated installer lang files 2021-03-28 00:07:30 +00:00
AMOS bot 5185c03fa7 Automatically generated installer lang files 2021-03-25 00:07:37 +00:00
Víctor Déniz 79d4f46efd weekly release 3.5.17+ 2021-03-24 14:20:48 +00:00
Víctor Déniz 290e0f7de5 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2021-03-24 14:20:47 +00:00
Chris Brown d49ba78dbd MDL-71139 trademark: Improve the trademark messaging 2021-03-22 12:01:53 +08:00
AMOS bot b891579e99 Automatically generated installer lang files 2021-03-18 00:07:32 +00:00
AMOS bot e43abfe8b8 Automatically generated installer lang files 2021-03-13 00:07:34 +00:00
Sara Arjona efd261ab7d weekly release 3.5.17+ 2021-03-11 17:18:54 +01:00
Sara Arjona ee02ba0623 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2021-03-11 17:18:53 +01:00
Eloy Lafuente (stronk7) 54f6d895a8 Merge branch 'MDL-70726-3.5' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_35_STABLE 2021-03-11 00:13:18 +01:00
AMOS bot 1a0c9fd279 Automatically generated installer lang files 2021-03-10 00:07:27 +00:00
Thong Bui 82066dbce7 MDL-70726 behat: should_not_exist function does not work correctly 2021-03-08 18:56:34 +07:00
AMOS bot 9aca8183fe Automatically generated installer lang files 2021-03-07 00:07:28 +00:00
Eloy Lafuente (stronk7) 5a1b6a9d50 Moodle release 3.5.17 2021-03-06 18:03:45 +01:00
AMOS bot c252deeda9 Automatically generated installer lang files 2021-03-06 00:07:29 +00:00
Sara Arjona d640a60f96 weekly release 3.5.16+ 2021-03-05 16:01:44 +01:00
Sara Arjona cf6c8a5acd Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2021-03-05 16:01:43 +01:00
Jun Pataleta cddd41f5fd MDL-69680 tool_dataprivacy: Adjust expected size of downloaded data
Adjusting due to the upgrade for jQuery to 3.5.1
2021-03-04 12:46:55 +08:00
Ilya Tregubov 98aa5b1ac3 MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:46:55 +08:00
Ilya Tregubov bb2179cbb7 MDL-69680 lib: Update jQuery version in Moodle files 2021-03-04 12:46:55 +08:00
Ilya Tregubov 96006635fc MDL-69680 lib: Upgrade jQuery lib to 3.5.1 2021-03-04 12:46:55 +08:00
Ilya Tregubov 75b5b6d5b9 MDL-70767 feedback: Prevent xss in feedback answer text. 2021-03-03 23:09:59 +01:00
Paul Holden d54ab79285 MDL-65552 block_activity_results: correct Behat tests for idnumbers.
Teachers can see user idnumber fields only when they are configured
identity fields. Students cannot.
2021-03-03 23:14:25 +08:00
Marina Glancy 21f1221056 MDL-65552 user: escape idnumber and email in table_sql 2021-03-03 23:14:25 +08:00
Paul Holden 551680435a MDL-65552 user: escape idnumber field on output.
This commit also corrects parameter definition of the field to
match core_user.
2021-03-03 23:14:25 +08:00
Paul Holden dbab6200d5 MDL-65552 user: escape extra/email user fields.
This commit has been backported from the changes in MDL-66762.
2021-03-03 23:14:25 +08:00
AMOS bot a2267a3c5b Automatically generated installer lang files 2021-03-03 00:07:28 +00:00
Paul Holden c13f7f9a6b MDL-70822 enrol: respect capability to view other users profile.
When retrieving courses of another user via web services, we should
respect the capability to view that users profile in a given course.
2021-03-02 16:41:28 +01:00
Sander Wind acfb9efa25 MDL-70668 auth: Fix secret validation during user confirmation
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
2021-03-02 16:41:28 +01:00
Peter Dias 420983c00d MDL-59293 block_onlineusers: Update behat tests 2021-03-02 16:38:05 +01:00
Peter Dias 4414c75992 MDL-59293 block_onlineusers: Check whether current user can view online users
- Removed block from site admin.
- Blocked guest from viewuserlist cap
2021-03-02 16:38:05 +01:00
AMOS bot fd29b873cb Automatically generated installer lang files 2021-03-02 00:07:26 +00:00
Sara Arjona 61bc167f53 Merge branch 'MDL-68735_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2021-03-01 16:20:56 +01:00
AMOS bot 1ca90a1695 Automatically generated installer lang files 2021-03-01 00:07:29 +00:00
AMOS bot 8e2798ff18 Automatically generated installer lang files 2021-02-28 00:07:26 +00:00
AMOS bot 0ac84efc5a Automatically generated installer lang files 2021-02-27 00:07:33 +00:00
AMOS bot a39608dd0d Automatically generated installer lang files 2021-02-25 00:07:30 +00:00
AMOS bot df9a771afd Automatically generated installer lang files 2021-02-22 00:07:29 +00:00
AMOS bot 01ab57bd28 Automatically generated installer lang files 2021-02-19 00:07:41 +00:00
AMOS bot cec29305f2 Automatically generated installer lang files 2021-02-17 00:07:36 +00:00
AMOS bot 85477f7928 Automatically generated installer lang files 2021-02-16 00:07:32 +00:00
Eloy Lafuente (stronk7) 8ead95fabe MDL-68735 env: Moodle 3.8.x, 3.9.x and 3.10.x do not support PHP 8.0 2021-02-13 12:51:51 +01:00
AMOS bot 176eb618fc Automatically generated installer lang files 2021-02-13 00:07:40 +00:00
AMOS bot 5c4359353f Automatically generated installer lang files 2021-02-11 00:07:32 +00:00
AMOS bot 468ee496ca Automatically generated installer lang files 2021-02-04 00:07:38 +00:00
AMOS bot 82990d7a3f Automatically generated installer lang files 2021-02-01 00:07:36 +00:00
AMOS bot 6804470b3f Automatically generated installer lang files 2021-01-31 00:07:32 +00:00
AMOS bot 413b603923 Automatically generated installer lang files 2021-01-27 00:07:36 +00:00
AMOS bot 6c557376fc Automatically generated installer lang files 2021-01-23 00:07:34 +00:00
AMOS bot 5060d6edc2 Automatically generated installer lang files 2021-01-17 00:07:34 +00:00
Eloy Lafuente (stronk7) bbf242efb0 Moodle release 3.5.16 2021-01-16 16:58:14 +01:00
Sara Arjona 2ecd91a0f2 weekly release 3.5.15+ 2021-01-15 08:25:54 +01:00
Sara Arjona ba997dd6a0 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2021-01-15 08:25:52 +01:00
Sara Arjona 5642f070db Merge branch 'MDL-69308_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2021-01-14 12:04:50 +01:00
AMOS bot 9c77b530df Automatically generated installer lang files 2021-01-14 00:07:31 +00:00
Eloy Lafuente (stronk7) 4191c518b2 MDL-69308 environment: Apply agreed changes
- PHP 7.3 required.
- Moodle 3.6 required.
- SQL*Server 2017 (aka, 14.0) required.
- Sodium PHP extension required.
2021-01-13 19:31:22 +01:00
Eloy Lafuente (stronk7) 1130c3c417 MDL-69308 environment: 3.11 base information
This is a direct copy of the 3.10 branch to have
the changes under control in next commits.
2021-01-13 19:31:17 +01:00
Mihail Geshoski f123859059 MDL-68486 auth_shibboleth: Reset convert_data if it uses dataroot file
Upgrade step that resets the 'Data modification API' (convert_data)
setting to its default value if this setting is currently configured
to use a file located within the $CFG->dataroot directory.
2021-01-13 12:36:45 +08:00
Mihail Geshoski ecc79c2241 MDL-68486 auth_shibboleth: Prevent using dataroot files in convert_data
Prevents configuring the 'Data modification API' (convert_data) setting
to use files located within the $CFG->dataroot directory as it exposes
the site to security risks.
2021-01-13 12:36:45 +08:00
AMOS bot 18a4d9349c Automatically generated installer lang files 2021-01-13 00:07:32 +00:00
AMOS bot 93692e074a Automatically generated installer lang files 2021-01-12 00:07:41 +00:00
AMOS bot 157e786818 Automatically generated installer lang files 2021-01-11 00:08:46 +00:00
AMOS bot 70a6cc1bd1 Automatically generated installer lang files 2021-01-09 00:07:36 +00:00
Michael Hawkins 6c241fb61e MDL-69911 core: Clean content passed through TeX filter 2021-01-08 05:21:26 +01:00
Ferran Recio fa6dc6a983 MDL-67782 message: fix messages max length 2021-01-08 05:21:26 +01:00
Jun Pataleta f85895edb5 weekly release 3.5.15+ 2021-01-08 12:15:02 +08:00
Jun Pataleta cbf63fe289 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2021-01-08 12:15:00 +08:00
AMOS bot 93e5e866c7 Automatically generated installer lang files 2021-01-08 00:07:31 +00:00
Eloy Lafuente (stronk7) 902e58214b Merge branch 'MDL-70584-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2021-01-07 23:31:42 +01:00
Marina Glancy 2a8cb44f05 MDL-70584 core_iplookup: increase tolerance in test 2021-01-07 16:36:17 +01:00
AMOS bot 4d80c59921 Automatically generated installer lang files 2020-12-27 00:07:33 +00:00
AMOS bot 6816b2e4d8 Automatically generated installer lang files 2020-12-24 00:07:36 +00:00
Eloy Lafuente (stronk7) c33ce32022 weekly release 3.5.15+ 2020-12-23 20:24:38 +01:00
Eloy Lafuente (stronk7) 4aca8df6ab Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-12-23 20:24:35 +01:00
AMOS bot 1f0d1abf15 Automatically generated installer lang files 2020-12-22 00:07:32 +00:00
Sara Arjona aaf1110d92 Merge branch 'MDL-69107-35-2' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-12-18 15:23:13 +01:00
Sara Arjona f4a5746e57 weekly release 3.5.15+ 2020-12-17 15:52:57 +01:00
Sara Arjona 752dafa55c Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-12-17 15:52:55 +01:00
Andrew Nicols a242d3e3ba MDL-69107 behat: Update field normalisation 2020-12-17 07:50:25 +08:00
Andrew Nicols 16a42b3f11 MDL-69107 user: Fix autocomplete usages 2020-12-16 23:11:57 +08:00
Andrew Nicols 28b3bf9d3e MDL-69107 form_autocomplete: Rewrite item selection
The form_autocomplete is essentially a custom element. Unfortunately the
`setValue()` function in Mink has undesired actions so it is necessary
to write our own handling for it.

The standard Mink `setValue()` function focuses the element, sets a
value, and then blurs the element. In the case of the autocomplete this
can cause the autocomplete suggestions list to be closed in some
situations. Instead of using the setValue we click, and type the value,
but do not immediately blur.
2020-12-16 23:11:57 +08:00
AMOS bot 2acc32ab82 Automatically generated installer lang files 2020-12-15 00:07:32 +00:00
Sara Arjona ec05eeadb2 Merge branch 'MDL-70397-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-12-14 17:13:06 +01:00
AMOS bot 15e8eee42e Automatically generated installer lang files 2020-12-13 00:07:32 +00:00
AMOS bot c88858d3bd Automatically generated installer lang files 2020-12-12 00:07:40 +00:00
AMOS bot a1d6fd2a13 Merge branch 'MOODLE_35_STABLE' into install_35_STABLE 2020-12-12 00:07:39 +00:00
AMOS bot 300a3bd363 Automatically generated installer lang files 2020-12-11 00:07:40 +00:00
Víctor Déniz 8c732857bc weekly release 3.5.15+ 2020-12-10 21:10:14 +00:00
Víctor Déniz e33c67eb35 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-12-10 21:10:08 +00:00
Jake Dallimore d1667406d7 Merge branch 'MDL-70151-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-12-09 14:47:18 +08:00
AMOS bot 45ef3ffd66 Automatically generated installer lang files 2020-12-08 00:07:30 +00:00
AMOS bot 37551217f2 Automatically generated installer lang files 2020-12-06 00:07:36 +00:00
Andrew Nicols d1f1b69a57 MDL-70397 behat: Prevent browser restarting after initial start 2020-12-04 20:36:31 +08:00
Jake Dallimore c4a024d9fc weekly release 3.5.15+ 2020-12-04 08:43:00 +08:00
Jake Dallimore e42fd050f9 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-12-04 08:42:58 +08:00
Adrian Greeve 8044f8a71a Merge branch 'MDL-70167-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-12-03 09:54:38 +08:00
AMOS bot a89035fcb3 Automatically generated installer lang files 2020-12-03 00:07:35 +00:00
AMOS bot 17d3aa1dff Automatically generated installer lang files 2020-12-02 00:07:31 +00:00
AMOS bot cc5e92929a Automatically generated installer lang files 2020-12-01 00:07:37 +00:00
Sara Arjona ff962e0e48 weekly release 3.5.15+ 2020-11-27 07:50:54 +01:00
Sara Arjona babb99fbd9 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-11-27 07:50:51 +01:00
AMOS bot ee5424df55 Automatically generated installer lang files 2020-11-27 06:21:16 +00:00
Sara Arjona fb6126adb2 Merge branch 'MDL-70276_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2020-11-26 15:05:10 +01:00
Eloy Lafuente (stronk7) eb7930a5f4 MDL-70276 github actions: First cut, phpunit and grunt checks
First working version, supports phpunit (using build matrix):

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

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

TODO: Verify the remaining checks currently in .travis.yml, namely:
 - CITEST
 - Add caching
 - Better health-check for DB images.
 - Support from the tracker (satus badges and enable check).
 - Support from CiBoT (status and enable check).
 - Consider moving both the common setup (git, composer...)
   and the database (mysql, postgres) to own actions for
   easier tweaking.
2020-11-26 00:28:10 +01:00
Sara Arjona 2166675df5 Merge branch 'MDL-70265_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2020-11-25 15:47:21 +01:00
Andrew Nicols ec31b667b2 Merge branch 'MDL-67668_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2020-11-24 07:37:48 +08:00
Eloy Lafuente (stronk7) a757acbc40 MDL-67668 behat: Remove recursion added in transition to trait 2020-11-23 20:24:25 +01:00
Eloy Lafuente (stronk7) 25e17b9b5d MDL-70265 travis: Completely remove the UPGRADE check
It was broken since ages ago, see MDL-64874, so no sense
to keep it eating minutes for nothing.
2020-11-23 14:27:26 +01:00
Adrian Greeve 8688e7aff5 Merge branch 'MDL-67668-35-2' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-11-23 15:34:08 +08:00
Andrew Nicols f82ba2ed50 MDL-70151 assign: Fix bulk change for behat
Behat does not play well with confirmation dialogues and in some
situations it does not wait for the page to reload before starting the
next step.

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

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

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

This default behavior can be changed with a new variable:

MOODLE_PHP = [all]
MOODLE_DATABASE = [pgsql | mysqli | all]
2020-11-21 11:28:16 +01:00
Eloy Lafuente (stronk7) 08707e95d2 weekly release 3.5.15+ 2020-11-20 23:16:52 +01:00
Eloy Lafuente (stronk7) 870f2a938b Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-11-20 23:16:50 +01:00
Jake Dallimore 5a6729743f Merge branch 'MDL-70148-35-fix' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-11-20 13:59:52 +08:00
Andrew Nicols 806a85f19d MDL-70148 behat: Remove user menu test
This test is unreliable because we are unable to wait for pending JS. On
slower systems it can take a while for the relevant JS to load, and the
step to start working.

This issue only affects 3.5.
2020-11-20 13:56:36 +08:00
Jake Dallimore 4e6a3cedf6 Merge branch 'MDL-70148-35-fix' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-11-20 09:51:40 +08:00
Andrew Nicols e32b77b7a3 MDL-70148 behat: Use key_press for autocomplete escape
In Moodle 3.5 dialogues are focused too frequently and active focus is
often wrong. This means that the dialogue has focus after selecting an
element in a form autocomplete element. As a result, pressing the escape
key causes the dialogue to be closed.

The older `key_press` call is sufficient to close the autocomplete in
the cases where this is needed, but will not cuase the dialogue to be
closed.
2020-11-20 09:03:09 +08:00
Andrew Nicols 938d0763f6 MDL-70148 behat: Wait after opening the user menu
The version of Boost used in Moodle 3.5 does not have any pendingJS
checks and it is not possible to add them.

We need to use the poor-person's alternative and fall back to a short
wait to allow the menu to open before interacting with it.

This may still allow for failures on extremely slow systems but the risk
is extremely minimal.
2020-11-20 08:53:05 +08:00
Sara Arjona 11312f9ea4 Merge branch 'MDL-70148_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2020-11-19 13:22:02 +01:00
Eloy Lafuente (stronk7) 938dc74b3b MDL-70148 behat: Added missing step definition that was lost in backport 2020-11-19 12:57:00 +01:00
Sam Hemelryk 9b983fb849 MDL-68896 mod_scorm: improved sendBeacon use when unloading 2020-11-18 09:50:27 +08:00
Eloy Lafuente (stronk7) 9a065268c6 Merge branch 'MDL-70148-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-11-17 23:13:46 +01:00
Andrew Nicols 6f8a609708 MDL-70148 gradereport_grader: Improve reliability of keyboard usage
In some browsers the ajax grade select does not properly update the
grade after setting values. The previous solution was to press the
[enter] key, but doing this with the new key type step opens the select
box again. This is what happens when a real user presses enter on the
select.

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

The solution uses a shift-tab to move the focus away to the previous
gradale element. In this case it must also be moved to an earlier step
because the previously selected value must be checked in the Then
section of the test and if it is selected then its value cannot be
checked.
2020-11-17 15:16:15 +08:00
Andrew Nicols d22e6dc827 MDL-70148 qtype: Update qtype steps to new key interaction
Note: The ddmarker question type was previously getting the number of
keypresses wrong. This was because it was using both keyDown/keyUp, and
also keyPress. As a result each keypress was essentially happening two
times.
2020-11-17 15:16:15 +08:00
Andrew Nicols 33b875ccd0 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:16:15 +08:00
Andrew Nicols 8aadb679dc MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
AMOS bot 276b1bcda8 Automatically generated installer lang files 2020-11-11 00:07:58 +00:00
AMOS bot 05abfdab8d Automatically generated installer lang files 2020-11-09 00:08:07 +00:00
Eloy Lafuente (stronk7) 30b0cfafc3 Moodle release 3.5.15 2020-11-07 16:47:52 +01:00
AMOS bot c4bece6ed7 Automatically generated installer lang files 2020-11-07 00:08:02 +00:00
AMOS bot a92ed6b506 Automatically generated installer lang files 2020-11-06 00:10:12 +00:00
Eloy Lafuente (stronk7) c52dbb8dfc weekly release 3.5.14+ 2020-11-05 12:16:10 +01:00
Mihail Geshoski 619b23000a MDL-67837 backup: Add unit tests 2020-10-30 13:51:25 +01:00
Mihail Geshoski f651fc4c8a MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-10-30 13:51:25 +01:00
Juan Leyva 182561953b MDL-67015 mod_data: Prevent users adding entries to other groups 2020-10-30 13:51:25 +01:00
Ferran Recio bd1220dbe5 MDL-69378 tool_uploadcourse: fix enrolment methods uploads 2020-10-30 13:51:25 +01:00
Peter Dias a3eb28f51d MDL-56310 restore: Confirm user has permission to change capabilities 2020-10-30 13:51:25 +01:00
Eloy Lafuente (stronk7) 83ce477051 weekly release 3.5.14+ 2020-10-30 13:48:57 +01:00
Eloy Lafuente (stronk7) 535836fdbd Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-10-30 13:48:55 +01:00
AMOS bot c7f15300f3 Automatically generated installer lang files 2020-10-30 00:09:59 +00:00
Jun Pataleta 5716a2c454 Merge branch 'MDL-69815-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-10-28 14:18:34 +08:00
Andrew Nicols 373b0fe431 MDL-69815 core: Bump Node to v14.15.0 (LTS/Fermium) 2020-10-28 09:34:31 +08:00
AMOS bot b9ce8595cb Automatically generated installer lang files 2020-10-22 00:08:14 +00:00
AMOS bot ccc8e283a8 Automatically generated installer lang files 2020-10-11 00:08:41 +00:00
Sara Arjona da3b20ce14 weekly release 3.5.14+ 2020-10-09 11:12:01 +02:00
Sara Arjona 9a279bae03 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-10-09 11:11:58 +02:00
Victor Deniz Falcon ed815ecf42 MDL-52407 travis: use Travis default notifications(email) 2020-10-07 16:37:52 +08:00
AMOS bot 2689b415bf Automatically generated installer lang files 2020-10-07 00:07:58 +00:00
Sara Arjona 9c22c9c0e8 weekly release 3.5.14+ 2020-10-02 13:43:32 +02:00
AMOS bot 18e0228d64 Automatically generated installer lang files 2020-09-26 00:08:11 +00:00
AMOS bot 89e28a26f4 Automatically generated installer lang files 2020-09-23 00:07:24 +00:00
AMOS bot 4ff8b8354f Automatically generated installer lang files 2020-09-22 00:07:24 +00:00
AMOS bot 4bf24f8869 Automatically generated installer lang files 2020-09-16 00:07:22 +00:00
AMOS bot fd31818cd9 Automatically generated installer lang files 2020-09-13 00:08:03 +00:00
AMOS bot 9fa3fc8fa6 Automatically generated installer lang files 2020-09-12 00:07:46 +00:00
Jun Pataleta 598064e4d9 Moodle release 3.5.14 2020-09-11 10:41:46 +08:00
Sara Arjona a96a428c7d weekly release 3.5.13+ 2020-09-10 08:52:13 +02:00
Michael Hawkins 4e64550116 MDL-69340 tag: Correct the filter input HTML in the tag manager 2020-09-03 17:21:37 +02:00
Andrew Nicols f330e8146f MDL-68974 calendar: Use page context for block check 2020-09-03 17:21:37 +02:00
Andrew Nicols 5b0902eb06 MDL-68974 blocks: Check permission before generating content 2020-09-03 17:21:37 +02:00
Mihail Geshoski 9aa9e5f1e6 MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-03 17:21:37 +02:00
Mihail Geshoski c718c85046 MDL-65115 core_files: Add get_total_content_size() in stored_file class
New function get_total_content_size() is introduced in the stored_file
class. The puprose of this function is to calculate and return the
total size (in bytes) of the content of an archive file.
2020-09-03 17:21:37 +02:00
Andrew Nicols fe6dc7ff41 MDL-68974 admin: Unit tests for context parent/child test 2020-09-03 17:21:37 +02:00
Andrew Nicols 9a1d611089 MDL-68974 admin: Unit tests for loginas 2020-09-03 17:21:37 +02:00
Andrew Nicols 393e43991f MDL-68974 admin: Prevent login as outside of the desired context 2020-09-03 17:21:37 +02:00
Sara Arjona e72e2edba5 weekly release 3.5.13+ 2020-09-03 17:09:31 +02:00
Noel De Martin 783f714bbe MDL-69360 behat: Fix js ready checks for non-moodle sites 2020-09-03 10:53:04 +08:00
Sara Arjona d986d964b3 weekly release 3.5.13+ 2020-08-27 17:36:37 +02:00
Sara Arjona 7f1103b12d Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-08-27 17:36:35 +02:00
AMOS bot ef1938e622 Automatically generated installer lang files 2020-08-27 00:07:30 +00:00
Adrian Greeve 15fd9288ae Merge branch 'MDL-69419-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-08-27 08:04:31 +08:00
Andrew Nicols 26b09187b8 MDL-69419 core: Task reset tests cannot use random test times
If a scheduled task which uses a 'R' field is picked, then the reset of
updated task times will not necessarily be correctly determined as the
randomisation is picked during reset.

This can lead to some random test failures.

Actively specifying a test which does not make use of the 'R' random
field time addresses this issue.
2020-08-27 07:30:57 +08:00
AMOS bot f3e7a7f813 Automatically generated installer lang files 2020-08-26 00:07:49 +00:00
AMOS bot 5a9347a0d3 Automatically generated installer lang files 2020-08-22 00:08:16 +00:00
Eloy Lafuente (stronk7) 738c06f7f2 weekly release 3.5.13+ 2020-08-21 20:43:05 +02:00
Andrew Nicols 25cfc3c9f2 Merge branch 'MDL-67415_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2020-08-20 08:32:28 +08:00
Andrew Nicols 5dd88c28d7 Merge branch 'MDL-69271_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2020-08-20 07:37:24 +08:00
Eloy Lafuente (stronk7) 90426f3906 Merge branch 'MDL-69273-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-08-18 11:00:14 +02:00
Andrew Nicols 357073866e MDL-69273 travis: Use exttests for https too 2020-08-18 07:50:48 +08:00
Andrew Nicols 3e144d2a0b MDL-69273 travis: Move exttests check to after_script
The result of the final command `script` phase determines the build
result.

The cleanup belongs in the `after_script` phase.
2020-08-18 07:40:14 +08:00
Eloy Lafuente (stronk7) 879dad536b MDL-67415 environment: change requirements
- mysql requirement up to 5.7
- postgres requirement up to 9.6
2020-08-13 01:35:28 +02:00
Eloy Lafuente (stronk7) d80294e172 MDL-67415 environment: 3.10 base information
This is a direct copy of the 3.9 branch to have
changes under control easier for next commits.
2020-08-13 01:35:26 +02:00
Eloy Lafuente (stronk7) 256926ba71 MDL-69271 auth_ldap: Don't assume any ordering, just verify matches
Both ldap or the DB can return information in a non-consistent
ordering leading to events to be generated in different order.

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

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

So we just do the tests ordering immune, verifying that all the
expected events have been triggered and done. Irrespectively of their order.
2020-07-30 17:44:27 +02:00
Victor Deniz Falcon 4423aca97f weekly release 3.5.13+ 2020-07-30 12:53:48 +01:00
Eloy Lafuente (stronk7) a5a9583f4d Merge branch 'MDL-69319-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2020-07-29 01:22:57 +02:00
Eloy Lafuente (stronk7) fd4c40c893 weekly release 3.5.13+ 2020-07-29 01:05:09 +02:00
Eloy Lafuente (stronk7) 15ceddf963 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-07-29 01:05:07 +02:00
AMOS bot d1479874a9 Automatically generated installer lang files 2020-07-27 00:07:57 +00:00
AMOS bot 44ef640fb0 Automatically generated installer lang files 2020-07-27 00:07:57 +00:00
AMOS bot 04a448a2ab Automatically generated installer lang files 2020-07-25 00:08:23 +00:00
AMOS bot b00782a63b Automatically generated installer lang files 2020-07-23 00:08:16 +00:00
Adrian Greeve 45008c77e8 Merge branch 'MDL-69138-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-22 16:51:59 +08:00
Andrew Nicols 2612f3771d MDL-69138 behat: Update session->visit() to use visit step 2020-07-22 15:51:23 +08:00
Andrew Nicols 5f72b91962 MDL-69138 behat: Add "I visit :localurl" step 2020-07-22 15:51:23 +08:00
Adrian Greeve 565a4974e3 Merge branch 'MDL-67657-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2020-07-22 11:01:49 +08:00
Adrian Greeve bbe8f2b9a7 MDL-67657 behat: Update to remove void return types. 2020-07-22 10:44:56 +08:00
Jake Dallimore 5724c6a382 MDL-69319 mod_lti: style and docs changes in external tests 2020-07-22 09:50:59 +08:00
Jake Dallimore b07642e882 MDL-69319 mod_lti: replace try/catch with expectException in ext tests 2020-07-22 09:50:57 +08:00
Jake Dallimore b77d0239b9 MDL-69319 mod_lti: remove unused vars from externallib_test 2020-07-22 09:45:45 +08:00
Jake Dallimore 654c27eece MDL-69319 mod_lti: move test data generation out of common setup 2020-07-22 09:44:47 +08:00
Eloy Lafuente (stronk7) f0f4003c9a Merge branch 'MDL-69160-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-21 23:30:08 +02:00
Adrian Greeve 6a5085ce04 Merge branch 'MDL-67657-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-21 14:51:06 +08:00
Jake Dallimore 2700ab11c7 MDL-69319 mod_lti: call clean_returnvalue in external tests 2020-07-20 15:12:17 +08:00
Eloy Lafuente (stronk7) c9585b3ed9 Merge branch 'MDL-69278-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-18 11:56:44 +02:00
Sara Arjona f4b63de27b weekly release 3.5.13+ 2020-07-16 21:28:21 +02:00
Andrew Nicols 9ab2003217 MDL-67657 behat: Open course with editing using URL
This is a huge performance improvement for behat.

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

This can take a substantial period.

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

There is not loss in testing functionality because the actual testing of
the Turn editing functionality is tested in other places sufficiently.
2020-07-16 11:06:43 +08:00
Andrew Nicols 970ffe0417 MDL-67657 behat: Convert existing uses of executeScript 2020-07-16 11:06:31 +08:00
Andrew Nicols 7b24d50738 MDL-67657 behat: Add wrapper for JS execution 2020-07-16 11:05:32 +08:00
Andrew Nicols d377bf6b78 MDL-69278 behat: Correct variable name 2020-07-16 08:30:49 +08:00
Andrew Nicols 1126438d1a MDL-69278 behat: Mark tests as failed when unable to start Session 2020-07-16 08:30:45 +08:00
Charles Fulton 6805a7ae33 MDL-69074 admin: ensure consistent default for getremoteaddrconf 2020-07-15 19:06:30 +02:00
Sara Arjona 50d41b6804 Merge branch 'MDL-69068-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-15 12:20:57 +02:00
Andrew Nicols 75a54d45b6 MDL-69068 behat: Allow singular, pivotted data generators 2020-07-15 15:27:31 +08:00
Andrew Nicols 63e098d9e9 MDL-69068 behat: New step to support singular generators 2020-07-15 15:25:27 +08:00
Andrew Nicols f752683a47 MDL-69160 workshop: Ensure steps are chained 2020-07-13 14:22:31 +08:00
Andrew Nicols f14cb06317 MDL-69160 behat: Add form field setter step 2020-07-13 14:22:31 +08:00
Eloy Lafuente (stronk7) f4d5e50005 Moodle release 3.5.13 2020-07-12 12:12:37 +02:00
AMOS bot 63492d72ff Automatically generated installer lang files 2020-07-10 19:53:20 +00:00
Eloy Lafuente (stronk7) 6059688bb8 weekly release 3.5.12+ 2020-07-10 20:21:55 +02:00
Eloy Lafuente (stronk7) e5da091061 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-07-10 20:21:49 +02:00
Jake Dallimore cab24c1838 Merge branch 'MDL-69232-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-10 15:11:26 +08:00
Andrew Nicols dde44877bc MDL-69232 behat: Simplify hooks
The behat hooks were needlessly complicated which made them much harder
to read, and understand, leading to bugs during development.

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

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

Since the session is restarted more frequently, and now between every
test, it no longer makes sense to do this. The test should only be
_stopped_ if the first attempt to obtain the Session fails. Once a
Session has been retrieved at least once it no longer makes sense to
assume that the failure was a configuration failure, but a connection
failure. Therefore subsequent tests should be attempted.
2020-07-10 08:40:29 +08:00
Jake Dallimore 5e5de409b5 Merge branch 'MDL-69135-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-09 10:39:46 +08:00
Michael Hawkins a5d8388b33 MDL-68426 theme: Set a limit on paths length in yui_combo
The maximum paths length is now consistent with the YUI loader.
This fix also removes any duplicate paths, so each file is only ever
fetched once.
2020-07-09 10:24:22 +08:00
Andrew Nicols f74f0c5c10 MDL-69232 behat: Add debugging information to Selenium fails 2020-07-09 09:51:27 +08:00
Andrew Nicols 84d08b1651 MDL-69232 behat: Move suite tests to BeforeSuite hook 2020-07-09 09:51:26 +08:00
Eloy Lafuente (stronk7) 71433c086b Merge branch 'MDL-69134-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-08 20:53:51 +02:00
Andrew Nicols a449ad1ae0 Merge branch 'm35_MDL-66322_Travis_Run_Using_Docker_ExtTests' of https://github.com/scara/moodle into MOODLE_35_STABLE 2020-07-08 12:23:08 +08:00
Andrew Nicols e3f5f18813 MDL-69134 competencies: Behat fails randomly opening dialogues 2020-07-08 09:22:09 +08:00
Matteo Scaramuccia d2a670ec68 MDL-66322 travis: Configure a local copy of 'exttests' 2020-07-07 22:10:20 +02:00
Víctor Déniz Falcón 75baf79c47 MDL-69093 enrol_manual: added check for allowed roles a user can assign 2020-07-06 04:51:43 +02:00
Jake Dallimore a8265dc500 Merge branch 'MDL-69136-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-06 10:45:48 +08:00
AMOS bot 999f67d464 Automatically generated installer lang files 2020-07-06 00:08:57 +00:00
Eloy Lafuente (stronk7) 7ff7e29b85 weekly release 3.5.12+ 2020-07-03 18:41:11 +02:00
Eloy Lafuente (stronk7) c847b6d725 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-07-03 18:41:06 +02:00
Jake Dallimore cd227ab8ec Merge branch 'MDL-69149-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-02 11:58:11 +08:00
AMOS bot 476c26b2db Automatically generated installer lang files 2020-07-02 00:08:39 +00:00
Eloy Lafuente (stronk7) 1ac49204f8 Merge branch 'MDL-69072-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-07-01 23:24:52 +02:00
Andrew Nicols 53dde4e6a8 MDL-69136 behat: Improve reliability of navigation steps 2020-06-29 11:36:36 +08:00
Andrew Nicols 261c5a765f MDL-69136 behat: Support find on a NodeElement 2020-06-29 11:36:30 +08:00
Andrew Nicols 56ff846bbb MDL-69072 behat: Remove restart_browser_after feature
This is no longer required as the Mink session is restarted after every
test regardless.
2020-06-29 11:05:53 +08:00
Andrew Nicols 71fda60d39 MDL-69072 mod_scorm: Stop mink reset after tests
This is now done for all scenarios. It is no longer necessary to do so
specifically for mod_scorm.
2020-06-26 21:17:22 +08:00
Andrew Nicols 62064c3c86 MDL-69072 behat: Relaunch browser session between scenarios 2020-06-26 21:17:22 +08:00
Andrew Nicols 9c4055943e MDL-69149 core_grade: Correct xpath attribute selector 2020-06-26 19:59:56 +08:00
Andrew Nicols 2dc0582f5e MDL-69135 core_calendar: PendingJS for event filtering 2020-06-26 07:58:36 +08:00
Eloy Lafuente (stronk7) a8dd761083 weekly release 3.5.12+ 2020-06-25 18:06:09 +02:00
Eloy Lafuente (stronk7) 8c82cc367c Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-06-25 18:06:04 +02:00
Andrew Nicols 7556fc7c1d MDL-66568 behat: Reset theme CSS between scenarios 2020-06-24 17:12:06 +02:00
Andrew Nicols 0c595030cc MDL-66568 behat: Support building of themes for behat 2020-06-24 17:11:22 +02:00
Andrew Nicols 47ee1ee0d8 MDL-66568 core_output: Return built theme CSS 2020-06-24 17:11:03 +02:00
AMOS bot 3c36b02b17 Automatically generated installer lang files 2020-06-21 00:07:48 +00:00
Sara Arjona 220732372a weekly release 3.5.12+ 2020-06-18 14:13:46 +02:00
Sara Arjona 9691a7b331 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-06-18 14:13:44 +02:00
Víctor Déniz Falcón 6bd1059042 Merge branch 'MDL-69049-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2020-06-16 17:47:36 +01:00
Jun Pataleta a6e3b62bbb MDL-69049 tool_dataprivacy: Add possibly missing comment format columns
The earlier CONTRIB plugin versions of the tool (<33.2.0, <34.2.0) were
missing the following columns in the data requests table:
* commentsformat
* dpocommentformat
And the upgrade scripts for the merged tool failed in
Moodle 3.3.8+/3.3.0+ failed to add these columns.
So a site which uses the CONTRIB plugin and eventually upgrading to 3.9
will encounter an error during upgrade because of the missing
dpocommentformat column.
2020-06-15 23:46:40 +08:00
AMOS bot 0788bf7d62 Automatically generated installer lang files 2020-06-06 00:07:48 +00:00
AMOS bot 04658e6111 Automatically generated installer lang files 2020-05-30 00:07:44 +00:00
Sara Arjona 6604114571 weekly release 3.5.12+ 2020-05-29 12:52:35 +02:00
Sara Arjona 2d553d9a11 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-05-29 12:52:33 +02:00
Jun Pataleta 64ff6f4e12 Merge branch 'MDL-68750-master-fix' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-05-29 16:54:57 +08:00
Andrew Nicols d6efe5c428 MDL-68750 tool_usertours: Amend tourstep template for missing markup 2020-05-29 16:43:09 +08:00
AMOS bot 9a01bf5dac Automatically generated installer lang files 2020-05-29 00:08:11 +00:00
Jun Pataleta 2ad7c452fa Merge branch 'MDL-68750-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-05-27 11:24:52 +08:00
Eloy Lafuente (stronk7) dabe4c6a8a weekly release 3.5.12+ 2020-05-26 22:52:11 +02:00
Andrew Nicols 68b632949d MDL-68750 core_tag: Add missing confirmation dialogue title 2020-05-26 12:58:00 +08:00
Andrew Nicols 24ec2b70d4 MDL-68750 behat: Correct dialogue selector 2020-05-26 12:58:00 +08:00
Andrew Nicols c85a85e1d6 Merge branch 'MDL-68658_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2020-05-25 15:50:07 +08:00
Eloy Lafuente (stronk7) 47890d6b75 MDL-68658 phpunit: Ensure that the configured proxy is applied always
Previously, if the RSS feed (extests) was being served locally,
CFG->proxybypass was applied and causing the test to fail (proxy
ignored).

In that exact test we need the configured proxy to be applied
always, because the test is exaclty about detecting the problem
when a wrong proxy is used.
2020-05-22 17:07:19 +02:00
Victor Deniz Falcon 184523e238 weekly release 3.5.12+ 2020-05-22 14:21:59 +01:00
Victor Deniz Falcon 61e908f935 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-05-22 14:21:55 +01:00
Adrian Greeve 3f86f7028c Merge branch 'MDL-68733_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2020-05-21 08:33:31 +08:00
AMOS bot 269569f55a Automatically generated installer lang files 2020-05-21 00:07:43 +00:00
AMOS bot 0e253a518f Automatically generated installer lang files 2020-05-20 00:07:53 +00:00
Tim Hunt b10488d134 MDL-68733 quiz editing: behat test for altering random question tags 2020-05-19 20:33:42 +01:00
Bence Molnar e4f5c4127b MDL-68733 quiz editing: be more careful deleting random question tags 2020-05-19 20:32:50 +01:00
Sara Arjona cf15e751c2 weekly release 3.5.12+ 2020-05-19 17:54:38 +02:00
Sara Arjona 492e9c9d54 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-05-19 17:54:34 +02:00
AMOS bot 094c79b550 Automatically generated installer lang files 2020-05-19 00:07:45 +00:00
Sara Arjona c2707068a0 Merge branch 'MDL-68728-35-2' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-05-18 20:23:18 +02:00
Andrew Nicols e260a4f35e MDL-68728 calendar: Pending promises for event summary 2020-05-18 13:59:10 +08:00
AMOS bot 2b2f40f423 Automatically generated installer lang files 2020-05-18 00:08:11 +00:00
AMOS bot 7961c01b98 Automatically generated installer lang files 2020-05-17 00:07:38 +00:00
Eloy Lafuente (stronk7) 98b0636874 weekly release 3.5.12+ 2020-05-15 11:06:44 +02:00
Jonathon Fowler 4b28673d1f MDL-68631 cron: ensure the cron user is reset between scheduled tasks 2020-05-13 09:32:31 +08:00
Sara Arjona d349c4d0da weekly release 3.5.12+ 2020-05-12 14:16:53 +02:00
Jun Pataleta 06544c7721 Merge branch 'MDL-66109-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-05-12 00:02:54 +08:00
Andrew Nicols 0255dcd2f4 MDL-66109 js: Built file changes from new Node version 2020-05-11 10:54:06 +08:00
Andrew Nicols 1e1576a246 MDL-66109 js: Remove unit on zero size 2020-05-11 10:54:06 +08:00
Andrew Nicols 8e8c8d86cc MDL-66109 js: Upgrade to latest stable version of NodeJS
Version 14.0.0 has just been released as stable, and will make its way
to an LTS release which will be supported until 30th April 2023.

At time of writing it is the "Current stable" release and will remain in
this phase until 20th October 2020, at whciih point it will transition
to LTS status.
2020-05-11 10:54:06 +08:00
Eloy Lafuente (stronk7) 035ec42e9f Moodle release 3.5.12 2020-05-09 20:05:26 +02:00
Eloy Lafuente (stronk7) b10116c72c weekly release 3.5.11+ 2020-05-08 13:29:45 +02:00
Eloy Lafuente (stronk7) fabbaee93a Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-05-08 13:29:42 +02:00
Paul Holden 041ecef9fe MDL-68410 mod_scorm: safer status operator comparison. 2020-05-07 09:04:10 +08:00
AMOS bot 977a542c89 Automatically generated installer lang files 2020-05-06 00:13:37 +00:00
Ferran Recio 9306db49a4 MDL-68430 filter_mathjaxloader: update default CDN to 2.7.8 2020-05-05 16:17:31 +02:00
AMOS bot dc4ab86218 Automatically generated installer lang files 2020-05-05 00:11:55 +00:00
AMOS bot 8f1c6d1220 Automatically generated installer lang files 2020-04-30 00:12:18 +00:00
AMOS bot e76269f9cb Automatically generated installer lang files 2020-04-27 00:11:51 +00:00
AMOS bot afb0530bb6 Automatically generated installer lang files 2020-04-23 00:14:58 +00:00
AMOS bot 31fcc3c3ab Automatically generated installer lang files 2020-04-19 00:13:39 +00:00
Eloy Lafuente (stronk7) b3228c00da weekly release 3.5.11+ 2020-04-16 19:34:00 +02:00
Eloy Lafuente (stronk7) 1fec48ab2e Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-04-16 19:33:55 +02:00
AMOS bot 6183e9ddd3 Automatically generated installer lang files 2020-04-11 00:12:16 +00:00
AMOS bot 1543ab4674 Automatically generated installer lang files 2020-04-11 00:12:15 +00:00
Eloy Lafuente (stronk7) 3b1275cae4 Merge branch 'MDL-67919-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2020-04-10 12:03:53 +02:00
Eloy Lafuente (stronk7) 7f6770c339 Merge branch 'MDL-67910-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2020-04-10 11:48:47 +02:00
AMOS bot 4e17f43808 Automatically generated installer lang files 2020-04-08 00:11:33 +00:00
AMOS bot f9c16916dc Automatically generated installer lang files 2020-04-08 00:11:33 +00:00
Sara Arjona 86c3578bce MDL-67919 dataprivacy: Fix behat error when contacting DPO 2020-04-03 19:49:41 +02:00
Sara Arjona 701377f9ab weekly release 3.5.11+ 2020-04-02 16:51:23 +02:00
Sara Arjona 5a6d92259b Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-04-02 16:51:21 +02:00
Sara Arjona 2f96412939 Merge branch 'MDL-66245-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2020-03-31 15:10:00 +02:00
Sara Arjona 71a15d2c3b MDL-67910 behat: PendingJS improvements for deleteevent modal 2020-03-31 08:46:33 +02:00
AMOS bot c5470497c3 Automatically generated installer lang files 2020-03-29 00:12:08 +00:00
AMOS bot ccf8697cd9 Automatically generated installer lang files 2020-03-28 00:12:01 +00:00
AMOS bot 73b73ac55c Automatically generated installer lang files 2020-03-24 00:11:25 +00:00
AMOS bot 30df6463d7 Automatically generated installer lang files 2020-03-23 00:12:33 +00:00
Victor Deniz Falcon 8682e0f076 weekly release 3.5.11+ 2020-03-12 14:22:33 +00:00
Victor Deniz Falcon aa7b52f84b Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-03-12 14:22:28 +00:00
Eloy Lafuente (stronk7) 3add914c7c Merge branch 'MDL-68125-regression-MOODLE_35_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_35_STABLE 2020-03-12 01:20:12 +01:00
Brendan Heywood e6bd5804b9 MDL-68125 core: Fixed $CFG->reverseproxyignore install regression 2020-03-12 09:55:21 +11:00
Eloy Lafuente (stronk7) b2882f8ac3 Merge branch 'MDL-67827-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-03-09 20:36:47 +01:00
Andrew Nicols 5169acea00 MDL-67827 behat: Pending JS improvements for dialogues 2020-03-09 08:31:21 +08:00
Andrew Nicols e133eec60b MDL-67827 behat: Add missing exception use 2020-03-09 08:31:21 +08:00
AMOS bot 094c860a2e Automatically generated installer lang files 2020-03-09 00:12:16 +00:00
Sara Arjona d3f01844da Moodle release 3.5.11 2020-03-06 12:34:16 +01:00
AMOS bot 7f2a97e632 Automatically generated installer lang files 2020-03-06 00:11:15 +00:00
Sara Arjona 2a512be9f6 weekly release 3.5.10+ 2020-03-05 17:31:40 +01:00
Sara Arjona 3b643e9cad Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-03-05 17:31:37 +01:00
Michael Hawkins cc446ad1ec MDL-67861 core: Fix getremoteaddr unit test to match new proxy setup 2020-03-05 14:41:46 +08:00
Brendan Heywood 7251f154ef MDL-67861 core: Added $CFG->reverseproxyignore IP subnet list
If your server is behind multiple reverse proxies that append to the
X-Forwarded-For header then you will need to specify a comma separated
list of ip addresses or subnets of the reverse proxies to be ignored
in order to find the users correct IP address.
2020-03-05 01:13:12 +01:00
Brendan Heywood e6e07e0960 MDL-67861 libraries: Refactor is_ip_in_subnet_list in ip_utils 2020-03-05 01:13:04 +01:00
Brendan Heywood 51d52d273c MDL-67861 admin: Default $CFG->getremoteaddrconf to only use REMOTE_ADDR 2020-03-05 01:11:10 +01:00
Brendan Heywood 67c44ebd2e MDL-67861 core: Use last ip in X-Forwarded-For list 2020-03-05 01:11:09 +01:00
Marina Glancy eeaf8e0e62 MDL-56287 gradereport_history: Separate groups queries improved 2020-03-04 11:48:01 +01:00
Jun Pataleta 651a6bf5fa MDL-56287 gradereport_history: Show users from groups that can be viewed 2020-03-04 11:48:01 +01:00
AMOS bot 7135dc455a Automatically generated installer lang files 2020-03-04 00:11:33 +00:00
AMOS bot c6b033233f Automatically generated installer lang files 2020-02-16 00:11:32 +00:00
Sara Arjona cd7201ad49 weekly release 3.5.10+ 2020-02-14 12:12:18 +01:00
Sara Arjona 15a4027603 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-02-14 12:12:15 +01:00
Jun Pataleta d6eb0134af Merge branch 'MDL-67965-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-02-14 13:24:44 +08:00
Andrew Nicols 7505c8ce76 MDL-67965 behat: Get theme-specific context classes correctly 2020-02-14 11:36:08 +08:00
Jun Pataleta aeb959f07c MDL-66245 privacy: Encode each part of the data URL instead of the whole 2020-02-10 16:57:49 +08:00
AMOS bot 90e5c2b889 Automatically generated installer lang files 2020-02-08 00:12:18 +00:00
Sara Arjona 84a9a24b96 weekly release 3.5.10+ 2020-02-07 09:45:01 +01:00
Sara Arjona 78255acbf9 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-02-07 09:44:59 +01:00
Brendan Heywood 34af3ee683 MDL-67726 tool_phpunit: add missing input escaping 2020-02-06 19:46:18 +01:00
Andrew Nicols ae422c191c Merge branch 'MDL-67175-35' of git://github.com/ferranrecio/moodle into MOODLE_35_STABLE 2020-02-06 10:22:49 +08:00
Ferran Recio 8e77498176 MDL-67175 mod_scorm: fixing js eslint errors 2020-02-04 12:37:31 +01:00
Sam Hemelryk 89fb92a551 MDL-67175 mod_scorm: sync XHR requests use sendBeacon when available
Totara reference TL-22621 (original code by Sam Hemelryk)
https://github.com/moodle/moodle/commit/2add402f8183c50bc1238ef2da5ea9cd06cb1dd9
2020-02-04 12:37:31 +01:00
Brendan Cox a624a36856 MDL-67175 session: set SameSite=None for Chrome 78 and above
Totara reference TL-22311 (original code by Brendan Cox and Sam Hemelryk)
https://github.com/moodle/moodle/commit/a3f4de2b7efe66de6617a67ce7c87f2862e76ac6
2020-02-04 12:37:15 +01:00
AMOS bot 56cfcc65cb Automatically generated installer lang files 2020-02-04 00:11:37 +00:00
Eloy Lafuente (stronk7) efb7b7d668 weekly release 3.5.10+ 2020-01-30 16:11:06 +01:00
Eloy Lafuente (stronk7) 2f5e4bc739 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-01-30 16:11:03 +01:00
Eloy Lafuente (stronk7) f21f69f0b8 Merge branch 'MDL-67722-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2020-01-28 20:14:20 +01:00
AMOS bot fda8d5d13d Automatically generated installer lang files 2020-01-28 00:12:03 +00:00
Adrian Greeve ea12d48932 Merge branch 'MDL-67691_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2020-01-28 07:56:33 +08:00
AMOS bot 383af5dab9 Automatically generated installer lang files 2020-01-25 00:12:05 +00:00
Adrian Greeve f1cf68fedc weekly release 3.5.10+ 2020-01-24 10:17:02 +08:00
Adrian Greeve 7fdc181bfe Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-01-24 10:16:53 +08:00
Adrian Greeve 0422d333a8 Merge branch 'MDL-67656-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2020-01-22 09:49:16 +08:00
Michael Hawkins f857f28d7a MDL-67722 mod_forum: Reduce wait time on time limit expires behat test 2020-01-21 11:40:38 +08:00
Eloy Lafuente (stronk7) c777c77434 Merge branch 'MDL-67724-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2020-01-20 10:54:00 +01:00
Eloy Lafuente (stronk7) e2d5d5457f MDL-67691 behat: inform about the_following_exist() removal
behat_data_generators::the_following_exist() has been removed, please use
behat_data_generators::the_following_entities_exist() instead.

See MDL-67691 for more info.
2020-01-20 00:15:39 +01:00
AMOS bot 4802739d19 Automatically generated installer lang files 2020-01-18 00:11:10 +00:00
Jun Pataleta 01087d1e45 MDL-67724 mod_glossary: Improve Behat test
Improve the "Glossary entries are not always editable" scenario by:
* No need to use the @javascript tag
* The maxediting time can be set to a lower value to
reduce the overall wait time.
2020-01-17 17:51:34 +08:00
AMOS bot f30469004a Automatically generated installer lang files 2020-01-17 00:12:42 +00:00
AMOS bot e34df5a1c4 Automatically generated installer lang files 2020-01-14 00:10:45 +00:00
Andrew Nicols dd3e9a0c25 MDL-67656 behat: Removed nested spin 2020-01-10 14:36:12 +08:00
Andrew Nicols f246b1c05c MDL-67656 behat: Fix usleep call in spin 2020-01-10 14:36:12 +08:00
Andrew Nicols 2288e60615 Moodle release 3.5.10 2020-01-10 13:03:30 +08:00
Andrew Nicols f951911682 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-01-10 13:03:27 +08:00
AMOS bot ad262b981f Automatically generated installer lang files 2020-01-10 00:12:37 +00:00
Sara Arjona da4ffac0c9 weekly release 3.5.9+ 2020-01-09 15:42:57 +01:00
Eloy Lafuente (stronk7) 702c4b4781 Merge branch 'MDL-67469-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2020-01-07 23:00:29 +01:00
Jake Dallimore fedba1fcc4 weekly release 3.5.9+ 2020-01-03 11:25:21 +08:00
Jake Dallimore de96ddee74 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2020-01-03 11:25:18 +08:00
AMOS bot 7b6a902ccd Automatically generated installer lang files 2020-01-03 00:12:31 +00:00
Adrian Greeve a0a03baad8 Merge branch 'MDL-67599-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2020-01-02 15:19:39 +08:00
Jake Dallimore e37073a24b MDL-67599 behat: fix behat tests assuming Jan 2020 is a future date 2020-01-02 13:56:16 +08:00
AMOS bot 9f59264afa Automatically generated installer lang files 2020-01-02 00:10:44 +00:00
Eloy Lafuente (stronk7) 7f4be41ed2 Merge branch 'MDL-67593-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2019-12-31 10:51:22 +01:00
Jake Dallimore 3dec6b78ce MDL-67593 core_iplookup: update lang string describing download process
Let users know they need to register on maxmind before granted download
access.
2019-12-31 15:59:41 +08:00
Jake Dallimore e3e41170fe MDL-67593 core_iplookup: use MaxMind test database in unit tests
Instead of downloading a live database (now not available publicly)
use a local test database.
2019-12-31 15:58:27 +08:00
Jun Pataleta 7c6be5b319 Merge branch 'MDL-63996-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-12-31 15:18:41 +08:00
Adrian Greeve 0613e56e69 Merge branch 'MDL-65809-35-onlyenv' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2019-12-24 14:58:52 +08:00
AMOS bot a3065e8220 Automatically generated installer lang files 2019-12-21 00:11:20 +00:00
Andrew Nicols f496b55189 MDL-63996 core/tags: Pending JS for all tag code 2019-12-18 12:02:54 +08:00
Andrew Nicols 135461b4a9 MDL-63996 behat: Fix multi-tag autocomplete usage 2019-12-18 10:25:57 +08:00
AMOS bot 8253f41405 Automatically generated installer lang files 2019-12-14 00:11:15 +00:00
AMOS bot cf0b79a80f Automatically generated installer lang files 2019-12-13 00:11:32 +00:00
AMOS bot 1a8dc02878 Automatically generated installer lang files 2019-12-11 13:50:31 +00:00
Jun Pataleta 5b3ec84495 MDL-67469 tool_dataprivacy: Put back missing test code
This patch simply brings back the missing test code for
\tool_dataprivacy_api_testcase::test_approve_data_request_non_dpo_user()
2019-12-06 16:11:38 +08:00
AMOS bot 0608b35a7b Automatically generated installer lang files 2019-12-06 00:10:04 +00:00
Sara Arjona abb5f229b1 MDL-65809 environment: mbstring extension required 2019-12-05 14:02:15 +01:00
Sara Arjona e2fd22fadd MDL-65809 environment: PHP 7.2 required 2019-12-05 14:02:15 +01:00
Sara Arjona 18c824af1f MDL-65809 environment: postgres requirement up to 9.5 2019-12-05 14:02:15 +01:00
Sara Arjona 37ce725987 MDL-65809 environment: mariadb requirement up to 10.2 2019-12-05 14:02:15 +01:00
Sara Arjona 8ac6793716 MDL-65809 environment: 3.5 (LTS) required 2019-12-05 14:02:15 +01:00
Sara Arjona 6022706b47 MDL-65809 environment: 3.9 base information
This is a direct copy of the 3.8 branch to have changes
under control easier in next commits.
2019-12-05 14:02:15 +01:00
Eloy Lafuente (stronk7) 250ea6a145 weekly release 3.5.9+ 2019-11-22 00:17:00 +01:00
Andrew Nicols 039096d1b1 Merge branch 'MDL-48024_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-11-21 19:45:47 +08:00
Eloy Lafuente (stronk7) 0ca3442925 MDL-48024 quiz: return void is only php >= 71
this branch supports php 70, so taking rid of it
2019-11-21 12:34:50 +01:00
Tim Hunt 1a4626d9fa MDL-48024 behat: allow plugins to have data generators
This extends the step
Given the following "users" exist:
to also support things like
Given the following "mod_quiz > user overrides" exist:

Instructions are on the behat_data_generators and
behat_generator_base classes.
2019-11-21 09:38:37 +08:00
Eloy Lafuente (stronk7) fa0b5768cc Moodle release 3.5.9 2019-11-09 11:57:38 +01:00
Sara Arjona 7b33c5e9ec weekly release 3.5.8+ 2019-11-08 15:39:52 +01:00
Sara Arjona d394a22ee6 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-11-08 15:39:50 +01:00
Adrian Greeve 83fe3c44c0 Merge branch 'MDL-67169_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-11-08 10:46:34 +08:00
Sara Arjona 282c4224da Merge branch 'MDL-66683-35' of git://github.com/cescobedo/moodle into MOODLE_35_STABLE 2019-11-07 17:41:53 +01:00
cescobedo 1312197a82 MDL-66683 core: Revert MDL-66181 because created regressions
This reverts commit ed080a580f.
This issue reverts the behaviour modified in MDL-66181, as that change
negatively impacted course-creation workflows. As this appears to be
the intended functionality, the Security team has agreed to revert
this change.
2019-11-07 17:31:25 +01:00
Jake Dallimore 5dc6fd3b23 MDL-66257 tool_cohortroles: unit test for users in multiple cohorts 2019-11-07 23:48:43 +08:00
cescobedo b49b76f397 MDL-66257 tool_cohortroles: Unassign the role on removal cohortroles. 2019-11-07 23:48:43 +08:00
Eloy Lafuente (stronk7) a4f4656110 MDL-67169 phpunit: fix clear flaw in unit test provider
Basically the provider is ignoring the CRLF to LF normalization
results and loading the original file again.

This doesn't have any impact normally, because all moodle
files are LF ones and people using other systems have their
git configurations set to work that way (not modify or force LF).

But there may be checkouts out there (for example travis) where
the git configuration by defult is to convert to the OS, causing
windows runs to fail badly there. See the issue for more info
and links.
2019-11-07 13:42:35 +01:00
Jun Pataleta 83bdb872dc MDL-66598 auth_oauth2: OAuth2 upgrade step
This basically does two things:
1. Updates all non-Facebook/Google/Microsoft issuers and sets their
'requireconfirmation' field to 1 so that future OAuth2 logins on these
issuers will always have an email confirmation sent to them.
2. Deletes the linked logins of users with non-Facebook/Google/Microsoft
OAuth2 issuers.
2019-11-07 18:46:05 +08:00
Jun Pataleta 39a83aa250 MDL-66598 auth_oauth2: Add warning messages in confirm emails 2019-11-07 18:46:05 +08:00
Jun Pataleta e70853386d MDL-66598 tool_oauth2: Make account confirmation required by default
* Only Facebook, Google, and Microsoft issuers can optionally offer to
require account confirmation via email. We will require email
confirmation for the rest of the issuers.
2019-11-07 18:46:05 +08:00
AMOS bot 451d514d84 Automatically generated installer lang files 2019-11-06 00:16:53 +00:00
Michael Hawkins 72f5a6e119 MDL-66161 output: Escaping fatal error message and URL strings 2019-11-05 13:51:42 +01:00
Paul Holden 7f624852e4 MDL-66228 mod_lesson: ensure return URL parameters are always local. 2019-11-05 13:51:42 +01:00
Eloy Lafuente (stronk7) 8abe8980d6 weekly release 3.5.8+ 2019-11-05 13:34:17 +01:00
Eloy Lafuente (stronk7) 431c7ba150 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-11-05 13:34:14 +01:00
Jake Dallimore 9b632e17d8 Merge branch 'MDL-67009_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-11-04 14:57:19 +08:00
AMOS bot b731ea9798 Automatically generated installer lang files 2019-11-02 00:09:46 +00:00
Eloy Lafuente (stronk7) 472b1b095e weekly release 3.5.8+ 2019-10-29 21:01:29 +01:00
Eloy Lafuente (stronk7) 2cddf32f7e Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-10-29 21:01:22 +01:00
Jake Dallimore 9b898bf8b4 Merge branch 'MDL-66945_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-10-29 14:57:04 +08:00
Andrew Nicols a87d3a64bb MDL-66945 composer: Update behat extension
(using php70 for this branch)

This uses a new version of the moodlehq-behat-extension which ensures
that a node is visible and in the view port before it is clicked on.

This resolves an issue with Firefox on Ubuntu 18.04 whereby the node is
only brought into the viewport instead of clicked on.
2019-10-28 13:44:27 +01:00
AMOS bot 55cd43d397 Automatically generated installer lang files 2019-10-28 00:09:34 +00:00
AMOS bot 9c1462ecfe Automatically generated installer lang files 2019-10-27 00:09:31 +00:00
Eloy Lafuente (stronk7) e22aba78ca weekly release 3.5.8+ 2019-10-25 15:29:30 +02:00
Eloy Lafuente (stronk7) d952f227d0 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-10-25 15:29:26 +02:00
Jake Dallimore d80cec9c2b Merge branch 'MOODLE_35_MDL-66973' of https://github.com/golenkovm/moodle into MOODLE_35_STABLE 2019-10-25 11:11:16 +08:00
Eloy Lafuente (stronk7) 77fe56108a MDL-67009 behat: get rid of invalid void type hinting for php70 2019-10-24 10:50:30 +02:00
AMOS bot 03550b7b8f Automatically generated installer lang files 2019-10-24 00:09:42 +00:00
Mikhail Golenkov 274ccc948b MDL-66973 search: Reset Content writer after test. 2019-10-22 09:41:46 +11:00
AMOS bot bc8d5da483 Automatically generated installer lang files 2019-10-19 00:09:35 +00:00
Eloy Lafuente (stronk7) 94bf3e9c78 weekly release 3.5.8+ 2019-10-18 10:31:16 +02:00
Andrew Nicols e92bd648db Merge branch 'MDL-66919_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-10-18 08:29:48 +08:00
Eloy Lafuente (stronk7) e4bb1cc603 MDL-66919 behat: fix typo in error message
Also fix a couple of phpdocs that were incorrect.
2019-10-16 00:49:32 +02:00
Eloy Lafuente (stronk7) c2f12aa742 weekly release 3.5.8+ 2019-10-15 22:59:44 +02:00
Jun Pataleta 454af7cf52 Merge branch 'MDL-66821_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-10-15 07:35:57 +08:00
Andrew Nicols f73e64f166 Merge branch 'MDL-66335_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-10-15 07:32:17 +08:00
Eloy Lafuente (stronk7) 18a738f88f MDL-66335 behat: Avoid double processing the page type
resolve_page_instance_helper() already processes the type, returning
the correct context that should be processing the navigation URL.

With that extra call to parse_page_name() the 2nd call always returns
"core", ultimately leading to tons of behat failures because "core" is
not aware of those (plugin, quiz for now) pages typology.
2019-10-15 00:04:54 +02:00
Eloy Lafuente (stronk7) 493a30cdc2 Merge branch 'MDL-66335_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-10-14 19:22:28 +02:00
Eloy Lafuente (stronk7) 65edc59a51 Merge branch 'MDL-66559-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-10-14 16:41:29 +02:00
Tim Hunt 28b9209af5 MDL-66335 quiz behat: using the new generic navigation steps
This converts all the navigation to quiz pages when that is not
the thing under test. Also, I decided that the Quiz settings form
belonged to the course, so did not do that here.
2019-10-14 13:20:29 +01:00
Tim Hunt 8b2c91e627 MDL-66335 behat: new step to log in and go straight to a particular page
I did not think thought through if this new URL parameter would be a
potential security hole. The simple cop-out option is to make it only
work on Behat sites for now.
2019-10-14 13:17:11 +01:00
Tim Hunt 8256d18453 MDL-66335 behat: generic step for navigating direct to specific pages 2019-10-14 13:15:27 +01:00
Tim Hunt ab11164395 MDL-66821 question behat: new step for acting on question in the bank
There is a proposed change MDL-66816 which will change the question
bank UI. This will break any Behat tests which uses low-level steps
like

    When I click on "Duplicate" "link" in the "Test question" "table_row"

to perform an action on a question in the question bank. This commit
introduces a new step:

    When I "Duplicate" the "Test question" question in the question bank

This commit also converts all core Behat tests to use the new step.
2019-10-14 12:02:42 +01:00
Andrew Nicols 29933a945f MDL-66559 behat: Register component selectors earlier 2019-10-14 14:24:05 +08:00
Andrew Nicols c7b384ce66 MDL-66559 behat: Update running suite 2019-10-14 14:17:47 +08:00
Jake Dallimore 665e256961 Merge branch 'MDL-66559-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-10-14 11:10:56 +08:00
Andrew Nicols 879532b41f MDL-66779 phpunit: Correct component name for core_grades 2019-10-13 02:34:16 +02:00
Eloy Lafuente (stronk7) 4e83a79cd5 weekly release 3.5.8+ 2019-10-11 22:43:20 +02:00
Eloy Lafuente (stronk7) 3ecba892e3 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-10-11 22:43:07 +02:00
Tim Hunt b92f4ba9f1 MDL-66559 behat: Documentation for component selectors 2019-10-11 12:58:16 +08:00
Andrew Nicols 6a3a83af93 MDL-66559 behat: Allow per-component selectors and replacements 2019-10-11 12:58:16 +08:00
AMOS bot 6e3a070030 Automatically generated installer lang files 2019-10-11 00:11:51 +00:00
Tim Hunt 5d701a706c MDL-66815 behat: question category generator must find right parent id
This is implemented in a bit of a hacky way, because the only other
alternative would be a large rewrite of the whole class, which is
not feasible for me right now. Note that many other types of thing
that can be generated suffer from the same issue. (E.g. if you ever
wanted to generate two groups with the same name in two different
courses and then add group memebers.)

It is worth doing a special-case fix for question categories, because
way Moodle works, it is inevitable that we end up with many categories
called 'top' in the database.
2019-10-11 00:51:39 +02:00
AMOS bot 612e4d9d02 Automatically generated installer lang files 2019-10-10 00:09:44 +00:00
Jun Pataleta df6f010a86 Merge branch 'MDL-66835_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-10-09 20:44:17 +08:00
Tim Hunt bf4904c32b MDL-66835 behat: steps for setting/checking fields in containers 2019-10-09 13:24:03 +01:00
Jun Pataleta 2821f78e6c weekly release 3.5.8+ 2019-09-27 11:12:16 +08:00
Jun Pataleta f904215fa7 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-09-27 11:12:15 +08:00
Jun Pataleta 635b605eab Merge branch 'MDL-66262_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-09-26 11:34:26 +08:00
Eloy Lafuente (stronk7) 08dd41b304 Merge branch 'MDL-66675-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-09-25 20:06:38 +02:00
AMOS bot 04cd0cb2ca Automatically generated installer lang files 2019-09-22 00:09:35 +00:00
Andrew Nicols 5cacda33bb MDL-66675 behat: Fix typo in step function name 2019-09-19 07:30:56 +08:00
Andrew Nicols 864ef22534 MDL-66675 behat: Add option to pause on behat failures 2019-09-19 07:30:55 +08:00
Andrew Nicols f008a03c60 MDL-66675 CLI: Add ANSI formatting options 2019-09-19 07:30:54 +08:00
Eloy Lafuente (stronk7) 8831cc14c7 MDL-66262 env: Moodle 3.6.x and 3.7.x do not support PHP 7.4 2019-09-13 17:44:58 +02:00
Jake Dallimore ebb87a1e63 weekly release 3.5.8+ 2019-09-13 11:30:14 +08:00
Jake Dallimore 93d9b19607 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-09-13 11:30:13 +08:00
Eloy Lafuente (stronk7) 92d04a7913 Merge branch 'MDL-66550-35-2' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-09-12 15:32:14 +02:00
Andrew Nicols a5cdde3c79 MDL-66550 admin: The execute wrapper MUST be used in behat 2019-09-12 15:46:04 +08:00
Andrew Nicols d073f5daf0 MDL-66550 theme: Wrap JS calls in pendingJS 2019-09-12 14:59:03 +08:00
AMOS bot 3972ef0a32 Automatically generated installer lang files 2019-09-12 00:09:38 +00:00
Jake Dallimore 01b63287ef Merge branch 'MDL-66550-35-2' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-09-11 10:42:07 +08:00
Andrew Nicols b3259b51bb MDL-66550 forum: Target fields in a fieldset for behat test 2019-09-10 21:24:20 +08:00
Andrew Nicols b683a48f69 MDL-66550 behat: Transform fields to search in a fieldset 2019-09-10 21:24:20 +08:00
Andrew Nicols 944888a509 MDL-66550 behat: Standardise finding in core functionality 2019-09-10 21:24:20 +08:00
Andrew Nicols 21ac04e12e MDL-66550 behat: Add ability to transform a specific selector 2019-09-10 21:24:15 +08:00
Andrew Nicols ab9b65b6a7 MDL-66550 behat: Normalise selectors better 2019-09-10 21:24:07 +08:00
Jake Dallimore 4a852e8467 Moodle release 3.5.8 2019-09-06 11:50:39 +08:00
Eloy Lafuente (stronk7) 9c211250ed weekly release 3.5.7+ 2019-09-05 17:14:30 +02:00
Eloy Lafuente (stronk7) a4eb84f12f Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-09-05 17:14:27 +02:00
AMOS bot 1e3da12a5f Automatically generated installer lang files 2019-09-05 00:12:14 +00:00
Ryan Wyllie d5ac2c69cf MDL-62284 javascript: prevent nested JS mustache handler calls
Prevent the JS mustache helper from being executed from within
the render call of another mustache helper because it can allow
users to inject JS into the page.
2019-09-04 11:24:34 +08:00
Ryan Wyllie 3cf2cce110 MDL-62284 output: prevent nested JS mustache handler calls
Prevent the JS mustache helper from being executed from within
the render call of another mustache helper because it can allow
users to inject JS into the page.
2019-09-04 11:24:34 +08:00
Jake Dallimore 1df418416b Merge branch 'MDL-66265-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-09-04 11:07:44 +08:00
Andrew Nicols fdee2f256c MDL-66265 javascript: More specific overrides in eslintrc 2019-09-04 10:49:17 +08:00
Eloy Lafuente (stronk7) 15974729df Merge branch 'MDL-66265-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-09-04 02:15:49 +02:00
Eloy Lafuente (stronk7) 99f8dea24b Merge branch 'MDL-66532-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-09-04 02:01:46 +02:00
Andrew Nicols 27829f24e1 MDL-66265 javascript: Add jshint ignore for ES6 files in root dir 2019-09-04 06:53:54 +08:00
Andrew Nicols 6fd3764d99 MDL-66265 javascript: Add basic jshint ignores 2019-09-04 06:53:53 +08:00
Andrew Nicols 8563f23446 MDL-66265 javascript: Bump jshint version 2019-09-04 06:53:52 +08:00
Andrew Nicols 033afe1028 MDL-66532 javascript: Lock NPM version for NVM 2019-09-04 06:53:52 +08:00
Andrew Nicols c21f3b540b MDL-66532 javascript: Lock NPM version for NVM 2019-09-04 06:45:51 +08:00
AMOS bot 9fa3c6756e Automatically generated installer lang files 2019-09-03 00:11:49 +00:00
Eloy Lafuente (stronk7) d543802d90 Merge branch 'MDL-66457-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-09-03 00:55:14 +02:00
Juan Leyva 374d0b4702 MDL-66501 tool_mobile: Prevent URLs in custom scheme 2019-09-02 15:30:19 +08:00
Andrew Nicols 043da28910 MDL-66457 behat: simplify selector search 2019-08-30 15:13:07 +08:00
Jun Pataleta b35de2fdf0 MDL-66187 format_singleactivity: Make sure available types is not empty 2019-08-30 07:21:39 +02:00
Andrew Nicols 2b1b27dfbd MDL-66187 course: Respect :addinstance in single activity format 2019-08-30 07:21:39 +02:00
Simey Lameze bd370cda69 MDL-65749 lib: fix phpmailer file handling 2019-08-30 07:21:39 +02:00
Andrew Nicols 86cbf2a643 MDL-66181 course: Only assign roles that the user is allowed to assign 2019-08-30 07:21:39 +02:00
Andrew Nicols d33ae6c0cc MDL-66181 behat: You check checkboxes, not click them 2019-08-30 07:21:39 +02:00
Michael Hawkins 61b51f93ef MDL-55451 mod_forum: Limit subscription redirect to internal URLs 2019-08-30 07:21:39 +02:00
David Monllaó eb2f9593a7 MDL-66069 mlbackend_python: Bump to a new version of the package 2019-08-30 07:21:39 +02:00
Jake Dallimore e8b6cb418f weekly release 3.5.7+ 2019-08-30 13:12:06 +08:00
Jake Dallimore f8798a6b07 Merge branch 'MDL-66139_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-08-29 11:52:15 +08:00
Netica Informática 75259ad00f MDL-66139 cachestore_redis: Fix connection problems when port is not set
Due to some changes in Redis 5 php extension Moodle fails to connect via TCP when
no port is set. It's fixed upstream in phpredis repo (version 5.0.0, 5.0.1 and
5.0.2 affected so far), but with this patch we'll send the right port anyway.
2019-08-28 20:59:59 +02:00
Luca Bösch e149838c2a MDL-63852 behat: Using correct exception class path. 2019-08-28 17:43:27 +02:00
Eloy Lafuente (stronk7) 7e0c5d1c38 MDL-66184 core: Update composer to apply for php 7.0.0 as min
With behat extension v3.35.3 we started requiring php 7.0.0
(same requirement than core 3.5.x). This bumps all the components
in the lock file to suit that requirement.

Generated with php 7.0.x.
2019-08-27 00:25:28 +02:00
Eloy Lafuente (stronk7) b78a289579 Merge branch 'MDL-66312-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-08-26 19:43:10 +02:00
Adrian Greeve de168198e6 weekly release 3.5.7+ 2019-08-23 12:55:16 +08:00
Adrian Greeve d4cd76a5c8 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-08-23 12:55:08 +08:00
Adrian Greeve 7430be37c5 Merge branch 'MDL-66378-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-08-22 09:32:16 +08:00
Andrew Nicols 327c830b2a MDL-66378 behat: Increase window size for rubric tests 2019-08-22 07:56:19 +08:00
Andrew Nicols f2c38390c9 MDL-66378 behat: Change screen size to small to work around UI bugs 2019-08-22 07:56:19 +08:00
Adrian Greeve 55bbdac9d9 Merge branch 'MDL-66378-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-08-21 09:04:02 +08:00
Andrew Nicols 7ed867fa20 MDL-66378 behat: Correct grammar of resize step 2019-08-21 08:39:51 +08:00
Andrew Nicols fc6f41655b MDL-66378 grade: Set window size to large for rubric tests 2019-08-21 08:39:28 +08:00
Andrew Nicols 15ddbf3907 MDL-66378 behat: All args are required for document.evaluate 2019-08-21 08:24:08 +08:00
AMOS bot 27b547db5a Automatically generated installer lang files 2019-08-21 00:11:34 +00:00
Adrian Greeve 0d13442b29 Merge branch 'MDL-66378-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-08-20 14:13:57 +08:00
AMOS bot d1bc79e02a Automatically generated installer lang files 2019-08-20 00:10:59 +00:00
Andrew Nicols 3abca9b368 MDL-66378 course: Navigation tests need small window 2019-08-19 08:16:41 +08:00
Andrew Nicols 3a000a8def MDL-66378 competency: Add pending promises to competency chooser 2019-08-19 08:16:41 +08:00
Andrew Nicols 1c3c38fb00 MDL-66378 behat: JS does not work with newlines in an xpath 2019-08-19 08:16:40 +08:00
Andrew Nicols 86cbd0840b MDL-66378 behat: Fix use of before/after selectors 2019-08-19 08:16:40 +08:00
Andrew Nicols 2ea211e78a MDL-66378 behat: Backport expand autocomplete step 2019-08-18 07:15:00 +08:00
Andrew Nicols b60ec99fec MDL-66378 behat: Add partial named selector for whole autocomplete field 2019-08-18 07:15:00 +08:00
Andrew Nicols 953b1b85da MDL-66378 behat: Before/after detection should be constrainable
The default before/after detection checks the entire body. Any match of
the text will therefore be found.

Add support for specification of a container for the nodes.
2019-08-18 07:15:00 +08:00
Andrew Nicols 45e2df1ce4 MDL-66378 behat: Add non-JS fallback for before/after 2019-08-18 07:15:00 +08:00
sam marshall 9f1149ac13 MDL-66378 Behat: Speed up 'before/after' step in Chrome
On some Chrome versions the xpath used for before/after is slow
and (sometimes) uses a lot of memory. This change uses pure
JavaScript to do the before/after calculation, which should always
be fast.
2019-08-18 07:15:00 +08:00
Andrew Nicols a157baa65a MDL-66378 behat: Correct invalid uses of selection from dropdown 2019-08-18 07:15:00 +08:00
Andrew Nicols 15d2dcf037 MDL-66378 report_participation: Correct label for target 2019-08-18 07:15:00 +08:00
Andrew Nicols 9eab90a827 MDL-66378 gradereport_singleview: Add missing label for dropdown 2019-08-18 07:15:00 +08:00
Andrew Nicols 2bee1f66b9 MDL-66378 behat: Update screen sizes to Y2K standards 2019-08-17 10:32:19 +08:00
Andrew Nicols c3731344e5 MDL-66378 behat: Update dependencies for chrome webdriver fix 2019-08-17 10:32:19 +08:00
Andrew Nicols c46b2eaf18 MDL-66312 js: Autocomplete promises were inside out
The pending promise should nott be resolved until the changes are
complete.
Previously the resolution of the pendingPromise was triggering the other
changes.
2019-08-16 11:56:25 +08:00
Andrew Nicols d6af305bb9 weekly release 3.5.7+ 2019-08-16 11:07:12 +08:00
Andrew Nicols fa319a92b8 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-08-16 11:07:09 +08:00
AMOS bot e11d0e35de Automatically generated installer lang files 2019-08-15 00:13:11 +00:00
Jun Pataleta 313fd64469 Merge branch 'MDL-65925-grade-page-broken-for-deleted-submission-MOODLE_35_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_35_STABLE 2019-08-14 15:25:36 +08:00
Ilya Tregubov 9f51263a37 MDL-65925 assign: Grade page broken if submission was deleted. 2019-08-12 09:25:50 +10:00
AMOS bot b375088f23 Automatically generated installer lang files 2019-08-10 00:11:37 +00:00
Jun Pataleta 6cdfbdc119 weekly release 3.5.7+ 2019-08-09 16:23:59 +08:00
Jun Pataleta c3e7a570f3 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-08-09 16:23:58 +08:00
Sara Arjona b12ee51f8b Merge branch 'MDL-66281-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-08-05 13:41:18 +08:00
AMOS bot 9192613a6a Automatically generated installer lang files 2019-08-02 00:11:41 +00:00
AMOS bot 74fc0a9620 Automatically generated installer lang files 2019-08-02 00:11:40 +00:00
AMOS bot 264ea8c7fc Automatically generated installer lang files 2019-07-31 00:09:31 +00:00
Jun Pataleta 06079db957 MDL-66281 tool_dataprivacy: Set sensitive data processing default value 2019-07-30 13:59:42 +08:00
Eloy Lafuente (stronk7) 59c9dd780b weekly release 3.5.7+ 2019-07-25 13:44:49 +02:00
Eloy Lafuente (stronk7) 5ec6a4e462 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-07-25 13:44:48 +02:00
Eloy Lafuente (stronk7) 4ce08a765d Merge branch 'MDL-65788-35' of git://github.com/Chocolate-lightning/moodle into MOODLE_35_STABLE 2019-07-22 21:33:28 +02:00
sam marshall 0498684ae2 MDL-66132 Search: Behat tests should use simpledb, fix mock count
When searching using mock results (the 'global search expects the
query' step), the result count is not correctly set. As a result, the
page incorrectly reports that there are no results and doesn't
correctly show the first page of multi-page results.

Additionally, some of the core Behat tests can now be moved to use
real searching with the simpledb engine, rather than using mock
results at all. This gives better tests.

Unfortunately it was not possible to move all of the core Behat tests
and deprecate the mock step, because some of the tests are related to
the UI for 'special' features searching by user or group, neither of
which are supported by the simpledb engine.
2019-07-22 20:57:10 +02:00
Mihail Geshoski 9a0078f100 MDL-66136 assign: Verify presence of resources in online text submission 2019-07-22 10:44:53 +08:00
Mihail Geshoski d9126f03dc MDL-66136 assignfeedback_comments: Extend testcase 2019-07-22 10:44:41 +08:00
Eloy Lafuente (stronk7) 382fc36eba Merge branch 'MDL-50733_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-07-20 00:25:27 +02:00
Mathew May defe05cbcf MDL-50733 core: Update composer to updated behat-extension 2019-07-19 16:41:03 +02:00
Mathew May 71548acf7e MDL-65788 tool_policy: Move accept_policy JS call into an array 2019-07-18 10:51:19 +08:00
Mathew May de75e7471d MDL-65788 tool_policy: Prevent two modals rendering for guests.
With the Guest registration calling policyactions.js the [data-action="view"]
was having two click handlers set on the inital policy modal trgger.
With this commit we state what we want the click event to be set on.
2019-07-18 10:49:58 +08:00
AMOS bot 8635cc3871 Automatically generated installer lang files 2019-07-18 00:09:21 +00:00
Eloy Lafuente (stronk7) a8d72a836c weekly release 3.5.7+ 2019-07-11 23:33:37 +02:00
Eloy Lafuente (stronk7) 140b417065 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-07-11 23:33:35 +02:00
Jun Pataleta 0094a77ccc Merge branch 'MDL-65926-MOODLE_35_STABLE_lowercase_username_sql_query' of https://github.com/andrewmadden/moodle into MOODLE_35_STABLE 2019-07-11 10:59:29 +08:00
Andrew Madden c7f46956d4 MDL-65926 moodlelib: Convert username to lowercase prior to SQL query
Within a very large project, it was found that searching for a user with their username in the user table using a case insensitive
search was inefficient. Instead it is proposed that the username input is made to be lowercase prior to executing a database query
as the username for each user in the database must be lowercase. This allows for a case sensitive query to find the user data.
Essentially we are moving a case insensitive search for a user from SQL into PHP to increase performance.
2019-07-10 20:04:23 +10:00
Andrew Nicols 648e72316d Merge branch 'MDL-65965-35-fix' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-07-09 11:01:05 +08:00
Jun Pataleta 6b8c4ddacc MDL-65965 behat: Do not fetch grouping IDs for empty grouping idnumbers 2019-07-09 10:49:25 +08:00
Shamim Rezaie 3bf1e69a3e MDL-66054 behat: typo fix 2019-07-09 00:58:05 +02:00
Eloy Lafuente (stronk7) df4041b745 Merge branch 'MDL-65965-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-07-09 00:55:26 +02:00
AMOS bot ac9e0f9ad5 Automatically generated installer lang files 2019-07-08 00:10:29 +00:00
AMOS bot c0cfb0ee09 Automatically generated installer lang files 2019-07-07 00:09:13 +00:00
Sara Arjona 5725188035 Moodle release 3.5.7 2019-07-05 12:27:14 +02:00
AMOS bot acb34a20c2 Automatically generated installer lang files 2019-07-05 00:10:07 +00:00
Eloy Lafuente (stronk7) e8c5c935a5 weekly release 3.5.6+ 2019-07-04 16:50:48 +02:00
Eloy Lafuente (stronk7) 5db144950d Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-07-04 16:50:43 +02:00
AMOS bot 904399daaf Automatically generated installer lang files 2019-07-04 00:08:56 +00:00
Shamim Rezaie 498fa3c1ae MDL-61114 mod_assign: Check if the teacher can access the override 2019-07-03 18:06:22 +02:00
Shamim Rezaie a8f2981158 MDL-61114 mod_assign: assignment overrides to observe group membership 2019-07-03 18:06:22 +02:00
Shamim Rezaie ccca3fc6e4 MDL-61115: mod_lesson: Check if the teacher can access the override 2019-07-03 17:50:44 +02:00
Shamim Rezaie 5d16523422 MDL-61115 mod_lesson: Lesson overrides to observe group membership 2019-07-03 17:50:44 +02:00
Sara Arjona 1953f78e3e Merge branch 'MDL-64794_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-07-03 11:16:08 +02:00
AMOS bot 6504388f3e Automatically generated installer lang files 2019-07-03 00:09:03 +00:00
AMOS bot 902d300967 Automatically generated installer lang files 2019-07-03 00:09:03 +00:00
Sara Arjona 9399070f9f Merge branch 'MDL-64614_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-07-02 21:21:57 +02:00
Shamim Rezaie 96b2794f29 MDL-34411 mod_quiz: Check if the teacher can access the override 2019-07-01 19:01:39 +02:00
Shamim Rezaie d551e89fad MDL-34411 groups: copy/paste error in test_groups_user_groups_visible 2019-07-01 19:01:39 +02:00
Shamim Rezaie 3bb633edc4 MDL-34411 mod_quiz: quiz overrides to observe group membership 2019-07-01 19:01:39 +02:00
Damyon Wiese 862d20bac0 MDL-64623 glossary: Check the entry id
The entry must match the glossary before you can do any action on it.
2019-07-01 19:01:39 +02:00
Damyon Wiese cf2beaf8c5 MDL-53689 xmldb: Require a sesskey to load xml
Loading and unloading xml files is not protected from XSS with a sesskey.
2019-07-01 19:01:39 +02:00
Eloy Lafuente (stronk7) d3eeabcf04 Merge branch 'MDL-64511-35' of https://github.com/paulholden/moodle into MOODLE_35_STABLE 2019-07-01 18:53:20 +02:00
Dan Marsden 8c678d9aa9 MDL-60347 core: debugsmtp should be a developer only setting. 2019-07-01 12:17:12 +02:00
Eloy Lafuente (stronk7) 9d86101204 MDL-64614 environment: mssql requirement up to 2012 (11.0) 2019-06-30 11:59:11 +02:00
Eloy Lafuente (stronk7) 2f535a7c43 MDL-64614 environment: 3.8 base information
This is a direct copy of the 3.7 branch to have
changes under control easier for next commits.
2019-06-30 11:59:10 +02:00
AMOS bot 776141f4d3 Automatically generated installer lang files 2019-06-30 00:09:32 +00:00
AMOS bot f33dbc4223 Automatically generated installer lang files 2019-06-29 00:09:37 +00:00
AMOS bot 11685ae642 Automatically generated installer lang files 2019-06-29 00:09:37 +00:00
Paul Holden 4cf939c638 MDL-64511 privacy: encode data URL when loading content.
Previously paths that included ? or # characters would break loading.
2019-06-28 13:17:42 +01:00
Eloy Lafuente (stronk7) 7a5e8583d9 weekly release 3.5.6+ 2019-06-27 18:54:28 +02:00
Eloy Lafuente (stronk7) 63b2abcc34 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-06-27 18:54:26 +02:00
Sara Arjona 16a14f010d Merge branch 'MDL-60088-35' of git://github.com/Chocolate-lightning/moodle into MOODLE_35_STABLE 2019-06-26 18:11:31 +02:00
Eloy Lafuente (stronk7) da6a75fcc7 Merge branch 'MDL-65249-35-fix' of https://github.com/snake/moodle into MOODLE_35_STABLE 2019-06-26 10:30:21 +02:00
Jake Dallimore 522a84d484 MDL-65249 session: use redis host constant in unit tests 2019-06-26 16:12:35 +08:00
Jake Dallimore 09325c5a80 Merge branch 'MDL-65249-redis-catch-exception-after-retry-MOODLE_35_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_35_STABLE 2019-06-26 14:53:01 +08:00
Jake Dallimore db72e5b94e Merge branch 'MDL-60978-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-06-26 13:27:55 +08:00
AMOS bot 2a7d1c59e8 Automatically generated installer lang files 2019-06-26 00:09:44 +00:00
Ilya Tregubov ed13b5bff3 MDL-65249 Session: Throw exception if number of attempts exceeded. 2019-06-25 15:06:42 +10:00
AMOS bot d4345429ec Automatically generated installer lang files 2019-06-25 00:09:34 +00:00
AMOS bot dccc4f0338 Automatically generated installer lang files 2019-06-24 00:08:33 +00:00
Mathew May 300afd6ab4 MDL-60088 travis: add dist:trusty to travis
We are doing this because travis changed its default release to xenial.
So this is a stop gap and we will add xenial support moving forward.
2019-06-23 23:55:34 +08:00
Jun Pataleta 91998db5f5 MDL-65965 behat: Map grouping for activity data generator 2019-06-21 15:41:14 +08:00
Jun Pataleta e76b0e1014 MDL-65965 availability: Behat test for activity grouping restriction 2019-06-21 15:41:14 +08:00
Andrew Nicols 5e5789ab09 MDL-60978 session: Run redis tests in isolation 2019-06-21 14:36:13 +08:00
Andrew Nicols 50d3ef02b9 MDL-60978 testing: Support ability to run phpunit in isolated process 2019-06-21 14:36:13 +08:00
AMOS bot cea931e57e Automatically generated installer lang files 2019-06-18 00:08:53 +00:00
AMOS bot ee4ea23869 Automatically generated installer lang files 2019-06-15 00:08:30 +00:00
Eloy Lafuente (stronk7) 473d664b4a weekly release 3.5.6+ 2019-06-13 18:15:37 +02:00
Eloy Lafuente (stronk7) f4c3a9e129 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-06-13 18:15:35 +02:00
Andrew Nicols d29528c4db Merge branch 'm35_MDL-61038_Fix_uuid_extensions_usage_v2' of https://github.com/scara/moodle into MOODLE_35_STABLE 2019-06-10 14:12:23 +08:00
Matteo Scaramuccia 88f85ede8e MDL-61038 setuplib: Fixed PECL UUID extension support 2019-06-08 23:14:11 +02:00
AMOS bot b2a600563e Automatically generated installer lang files 2019-06-07 00:10:06 +00:00
Eloy Lafuente (stronk7) 7f5049c7bc weekly release 3.5.6+ 2019-06-06 16:46:39 +02:00
Eloy Lafuente (stronk7) 321125cadb Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-06-06 16:46:36 +02:00
AMOS bot 9c2796097f Automatically generated installer lang files 2019-06-06 00:08:33 +00:00
AMOS bot cc6bd24c30 Automatically generated installer lang files 2019-06-05 00:08:35 +00:00
Eloy Lafuente (stronk7) 9b37061aba Merge branch 'MDL-65576-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-06-04 21:40:25 +02:00
AMOS bot 8ac0bb82df Automatically generated installer lang files 2019-06-04 00:08:30 +00:00
AMOS bot 7ff9602c7a Automatically generated installer lang files 2019-06-03 00:08:32 +00:00
Andrew Nicols 2918831394 MDL-65576 behat: Reset Selenium driver between scorm scenarios 2019-05-31 08:17:29 +08:00
Eloy Lafuente (stronk7) bce54527f7 MDL-64794 tcpdf: Bump to tcpdf 6.2.26 2019-05-30 23:51:50 +02:00
Eloy Lafuente (stronk7) 39cd996f62 weekly release 3.5.6+ 2019-05-30 12:18:25 +02:00
Eloy Lafuente (stronk7) 2edb40d973 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-05-30 12:18:23 +02:00
AMOS bot 1fa428ffcf Automatically generated installer lang files 2019-05-29 00:09:36 +00:00
Simey Lameze 40f3c1a50a MDL-65697 qtype_missingtype: include missing class 2019-05-28 13:36:05 +08:00
AMOS bot c1aea9fd14 Automatically generated installer lang files 2019-05-25 00:08:50 +00:00
AMOS bot 4e4d4e37b8 Automatically generated installer lang files 2019-05-24 00:15:24 +00:00
Eloy Lafuente (stronk7) 16eeee959b weekly release 3.5.6+ 2019-05-23 20:52:12 +02:00
Eloy Lafuente (stronk7) 3d44463106 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-05-23 20:52:10 +02:00
AMOS bot 8fd0ca20b9 Automatically generated installer lang files 2019-05-23 00:13:01 +00:00
Jun Pataleta eafc231dd8 Merge branch 'MDL-65636_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-05-22 19:31:07 +08:00
Tim Hunt e8b72dabe6 MDL-65636 filter_multilang: add some basic unit tests
This commit includes suggestions from Jun Pataleta on how to improve the
unit tests.
2019-05-22 11:04:21 +01:00
AMOS bot 3dff98b036 Automatically generated installer lang files 2019-05-21 00:13:04 +00:00
AMOS bot 5e82098480 Automatically generated installer lang files 2019-05-21 00:13:04 +00:00
AMOS bot eff7030f7e Automatically generated installer lang files 2019-05-18 00:12:46 +00:00
AMOS bot 1dd2ee3f49 Automatically generated installer lang files 2019-05-17 00:14:38 +00:00
Sara Arjona 263b3cb643 weekly release 3.5.6+ 2019-05-14 13:17:33 +02:00
Sara Arjona 55ca32ba74 Merge branch 'MDL-65581-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2019-05-13 21:20:22 +02:00
Bas Brands 7a548abf01 MDL-65581 core_blocks: change classname for hidden blocks
Changing the added class .invisible to .ivisibleblock to avoid hiding
the block completely
2019-05-13 12:43:34 +02:00
Eloy Lafuente (stronk7) 73d401b462 Moodle release 3.5.6 2019-05-11 23:17:42 +02:00
Eloy Lafuente (stronk7) 7ea8581868 weekly release 3.5.5+ 2019-05-10 20:31:14 +02:00
Eloy Lafuente (stronk7) 3f923b4570 Merge branch 'MDL-65537-35-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2019-05-10 20:09:24 +02:00
David Mudrák 8ef6c25a98 MDL-65537 lang: Use fixed strings in tests, too 2019-05-10 16:14:30 +02:00
Helen Foster 007b946948 MDL-65537 lang: Import fixed English strings (en_fix) 2019-05-10 16:14:16 +02:00
Eloy Lafuente (stronk7) d1e419d86f Merge branch 'MDL-65558-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-05-10 11:30:31 +02:00
Jun Pataleta 2e190e4739 Merge branch 'MDL-65540-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-05-10 15:58:28 +08:00
Andrew Nicols e81ac514ca MDL-65558 enrol_database: use , as port separator 2019-05-10 12:24:58 +08:00
Andrew Nicols 563f08ff54 MDL-65558 auth_db: use , as port separator 2019-05-10 12:24:58 +08:00
Andrew Nicols 8e70179f4d MDL-63959 feedback: Adjust unit test for perf 2019-05-10 11:43:19 +08:00
Andrew Nicols 30ac3bcfeb Merge branch 'MDL-63959-35' of git://github.com/tobiasreischmann/moodle into MOODLE_35_STABLE 2019-05-10 11:43:13 +08:00
Shamim Rezaie b287771272 MDL-65540 core_search: Explicit component name in the str helper 2019-05-10 08:12:40 +08:00
Shamim Rezaie 4b00d8392c MDL-65540 tool_dataprivacy: Explicit component name in the str helper 2019-05-10 08:12:40 +08:00
Eloy Lafuente (stronk7) abe4ff5534 Merge branch 'MDL-65197-35' of https://github.com/paulholden/moodle into MOODLE_35_STABLE 2019-05-09 20:02:49 +02:00
Eloy Lafuente (stronk7) 5b641c4187 Merge branch 'MDL-29320-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-05-09 19:49:57 +02:00
Andrew Nicols 02dc7147c7 Merge branch 'MDL-65435_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-05-09 14:52:13 +08:00
Jun Pataleta 8ab8dee8c9 Merge branch 'MDL-65141-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2019-05-09 12:27:30 +08:00
Adrian Greeve b9569a887e Merge branch 'MDL-58315_35_boost_block_classes' of https://github.com/zpottie/moodle into MOODLE_35_STABLE 2019-05-09 11:35:07 +08:00
Adrian Greeve efee2e4c8b Merge branch 'MDL-65387-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-05-09 11:25:06 +08:00
Eloy Lafuente (stronk7) 33f22e1e83 MDL-65435 behat: Support any arg type with behat reruns
Right now, when executing a single rerun of a parallel run
using vendor/bin/behat, not all the argument alternatives
are supported (equal or space). This commit allows both to work.
2019-05-08 23:23:36 +02:00
Luca Bösch 500fc1b8f0 MDL-65387 dataformats: Table download formats choose pulldown style. 2019-05-08 20:20:11 +02:00
Michael Hawkins e36f1c9896 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-08 17:51:45 +02:00
Dan Marsden cd6fb4322b MDL-64708 cohort: Return url is not used anywhere in core. 2019-05-08 17:51:45 +02:00
Eloy Lafuente (stronk7) 1398145998 weekly release 3.5.5+ 2019-05-08 17:48:41 +02:00
Adrian Greeve ec6f1419dc Merge branch 'MDL-65484-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-05-08 11:24:55 +08:00
Andrew Nicols 473145c2c7 Merge branch 'MDL-35396-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2019-05-08 09:48:33 +08:00
Damyon Wiese 469ac6dd08 MDL-65484 assign: Scrolling overflow CSS
Use relatively positioned elements, not absolutely positioned to prevent
elements being visible when they are scrolled outside the containing drawing region.
2019-05-07 16:23:04 +08:00
Mihail Geshoski 5ddac4b5b9 MDL-35396 lesson: Fix detailed statistics display for essay questions 2019-05-07 14:00:58 +08:00
Jun Pataleta 0c8113bf8c Merge branch 'MDL-65153-35-fix1' of http://github.com/damyon/moodle into MOODLE_35_STABLE 2019-05-07 10:09:07 +08:00
Damyon Wiese f4110673d4 MDL-65153 competencies: course competencies page
The webservice to fetch the data for the course competencies page requires the
pluginbaseurl to be set.
2019-05-07 10:01:51 +08:00
Sara Arjona fdecf60bab Merge branch 'MDL-65374-35' of https://github.com/lucaboesch/moodle into
MOODLE_35_STABLE
2019-05-06 12:09:48 +02:00
Jun Pataleta bef3d096fc Merge branch 'MDL-65399-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-05-06 16:26:27 +08:00
Sara Arjona bb1cfe25cf Merge branch 'MDL-65396-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-05-06 10:20:15 +02:00
Shamim Rezaie 1150862f9d MDL-65399 mod_quiz: Handling the edge case when section name is '' 2019-05-06 18:14:00 +10:00
Shamim Rezaie b94ea41bbf MDL-65399 mod_quiz: UI should prevent deleting the last slot of section 2019-05-06 18:14:00 +10:00
Shamim Rezaie 6946a25e9f MDL-65399 mod_quiz: remove_slot should update the existing info
The remove_slot method should update the remaining slot's slot
attribute. It also should update the remaining slot's question number
and section info.
2019-05-06 18:14:00 +10:00
Shamim Rezaie 2a75ea0ec9 MDL-65399 mod_quiz: Remove $slots from the \mod_quiz\structure class
It's enough to have $slotsinorder, and the $slots property
was redundant. There should only be a single source of truth.
2019-05-06 18:14:00 +10:00
Jun Pataleta dafd6f136c Merge branch 'MDL-65153-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-05-06 16:13:40 +08:00
Adrian Greeve b6147f7e80 Merge branch 'MDL-64968-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-05-06 16:00:36 +08:00
Adrian Greeve 531036848c Merge branch 'MDL-65104-35' of git://git.cameron1729.xyz/moodle into MOODLE_35_STABLE 2019-05-06 12:01:55 +08:00
Jake Dallimore c0e1742985 Merge branch 'MDL-64988-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-05-06 10:34:51 +08:00
Luca Bösch bedb1ffc49 MDL-65396 theme_boost: Style duration chooser pulldown select. 2019-05-04 11:00:29 +02:00
Luca Bösch 4a6b23937a MDL-65374 core_grades: style "Move selected items to" pulldown. 2019-05-04 11:00:15 +02:00
Luca Bösch 83d8624eec MDL-64968 mod_lesson: Style "Yes, I'd like to try again" button. 2019-05-04 11:00:05 +02:00
Eloy Lafuente (stronk7) 6e311854b7 weekly release 3.5.5+ 2019-05-03 17:52:03 +02:00
Eloy Lafuente (stronk7) 12531500d3 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-05-03 17:51:59 +02:00
Shamim Rezaie 73c4aa313b MDL-64988 mod_quiz: Fix questions always being added to the last section 2019-05-03 20:49:10 +10:00
zpottie b22947d3b7 MDL-58315 core: Add support for custom block classes in Boost 2019-05-03 16:17:50 +12:00
Adrian Greeve e208a8d307 Merge branch 'MDL-64851-35' of https://github.com/s-cenni/MDL-64851 into MOODLE_35_STABLE 2019-05-03 10:45:58 +08:00
Andrew Nicols a4c878c734 Merge branch 'MDL-64394-accesslog-MOODLE_35_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_35_STABLE 2019-05-03 08:54:29 +08:00
AMOS bot 54d672958d Automatically generated installer lang files 2019-05-03 00:14:40 +00:00
Jun Pataleta 13e1ef0300 Merge branch 'MDL-65411-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2019-05-02 17:02:55 +08:00
Jun Pataleta b1899fcc4a Merge branch 'MDL-65446-35' of https://github.com/ryanwyllie/moodle into MOODLE_35_STABLE 2019-05-02 15:01:31 +08:00
Jake Dallimore 31c96d5e7f Merge branch 'MDL-64439-MOODLE_35_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_35_STABLE 2019-05-02 14:53:21 +08:00
Jun Pataleta 3bb9a613c6 Merge branch 'MDL-65273-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-05-01 17:24:13 +08:00
Paul Holden 29fcc59f88 MDL-65197 editor: handle empty user preference in privacy export. 2019-05-01 09:52:59 +01:00
Luca Bösch 3cf521a427 MDL-65273 roles: Roles permissions buttons styles. 2019-05-01 09:26:51 +02:00
Adrian Greeve a27c089b40 Merge branch 'MDL-65149-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-05-01 15:00:34 +08:00
Adrian Greeve 4d1fbba086 Merge branch 'MDL-64959_35_STABLE' of https://github.com/abhimanyuZ/moodle into MOODLE_35_STABLE 2019-05-01 14:32:15 +08:00
Adrian Greeve c8c229e08b Merge branch 'MDL-65178-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-05-01 11:59:16 +08:00
Simey Lameze 7d78aeece1 MDL-65411 core_calendar: wrap long description text 2019-05-01 09:56:05 +08:00
Jake Dallimore 4d0fa8abdc Merge branch 'MDL-60851-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-05-01 09:33:31 +08:00
Damyon Wiese 4c775e4618 MDL-60851 backup: coding style fixes 2019-05-01 08:51:57 +08:00
Damyon Wiese 9462d6f1c8 MDL-60851 backup: Sanitise setting dependencies
The only different between each setting dependency type is the evaluation of the condition,
and the mform js validation arguments - so that should be the only thing that is extended
by each subclass.
2019-05-01 08:51:57 +08:00
Damyon Wiese 2aeff9cfd7 MDL-60851 backup: Fix undefined $value 2019-05-01 08:51:57 +08:00
Damyon Wiese 5b01f0099f MDL-60851 backup: More unit tests for dependencies 2019-05-01 08:51:57 +08:00
Eloy Lafuente (stronk7) 6e3f19324a Merge branch 'MDL-65397-35-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2019-05-01 01:43:11 +02:00
Eloy Lafuente (stronk7) 34a46486ef weekly release 3.5.5+ 2019-05-01 00:28:41 +02:00
Eloy Lafuente (stronk7) 2a373db105 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-05-01 00:28:39 +02:00
Juan Leyva 08135b0689 MDL-65141 tool_mobile: Return all the language translations 2019-04-30 15:25:29 +02:00
Jun Pataleta 1bd6794d80 MDL-29320 user: Make email query case-insensitive 2019-04-30 16:29:39 +08:00
Jun Pataleta 3e854512c5 MDL-29320 admin: Improve test for multiple accounts with same email
* Use Scenario Outlines
* More coverage:
  - Test for email case-sensitivity
  - Updating user profile as admin
  - Updating own user profile
2019-04-30 16:29:36 +08:00
Jun Pataleta 8326233128 MDL-29320 user: Remove @javascript tag for add new user behat test
* It's not necessary and will improve Behat execution time
2019-04-30 16:23:03 +08:00
Tobias Reischmann eb29ebefb4 MDL-63959 mod_feedback: Add phpunit tests for get_pages in completion 2019-04-30 07:57:21 +02:00
Zoltán Szarvas 638ba35597 MDL-63959 mod_feedback: Fixed nested dependency handling
For example the dependecy chain is the following: A->B->C. When a
question (A) depends on another dependent item (B) and B hasn't
displayed (because of C's response), the $value for the B's response
will be null. In this case the can_see_item() method returned
null. Because the can_see_item() returned null (not false), the
get_pages() method displayed the question A, because it checks for
explicit false: $this->can_see_item($item) !== false.
Now, false is also returned, if the dependent question is not visible.
2019-04-30 07:57:21 +02:00
Ryan Wyllie 94cbb103ef MDL-65446 admin: fix admin email option for cli install 2019-04-30 13:38:25 +08:00
Eloy Lafuente (stronk7) efaad61031 MDL-63137 mod_feedback: discern between user or id better
is_int('1') => false, so better we invert the check that is safer.
2019-04-30 08:50:20 +08:00
AMOS bot 05e4efbcee Automatically generated installer lang files 2019-04-30 00:12:35 +00:00
Eloy Lafuente (stronk7) 3451667bc9 Merge branch 'MDL-65293-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-04-29 22:46:47 +02:00
Eloy Lafuente (stronk7) 9efdbf36d7 Merge branch 'MDL-63137-35' of git://github.com/aanabit/moodle into MOODLE_35_STABLE 2019-04-29 20:11:13 +02:00
Helen Foster 23bb771193 MDL-65397 lang: Import fixed English strings (en_fix)
Significant string changes:

* direct:view,gradeimport_direct - wording corrected from 'CSV' to
  'spreadsheet'
* limitanswers_help,mod_choice - additional wording added explaining how
  the setting works with groups
2019-04-29 11:50:36 +02:00
Jun Pataleta f47cc5ce3f Merge branch 'MDL-65279-35' of https://github.com/tkorner/moodle into MOODLE_35_STABLE 2019-04-29 17:08:29 +08:00
AMOS bot 9f504db2f3 Automatically generated installer lang files 2019-04-27 00:12:52 +00:00
Eloy Lafuente (stronk7) 9e5cda1f6c weekly release 3.5.5+ 2019-04-26 18:41:11 +02:00
Amaia Anabitarte 3751ec0e68 MDL-63137 mod_feedback: PHPUnit tests for new userid parameter 2019-04-26 17:32:57 +02:00
Amaia Anabitarte 5a93c6c9ab MDL-63137 mod_feedback: mod_feedback_core_calendar_provide_event_action
Update mod_feedback_core_calendar_provide_event_action function to add a new userid parameter
Add userid to check capabilities, etc. to feedback completion and structure.
2019-04-26 17:32:57 +02:00
Amaia Anabitarte 596aa22c4e MDL-63137 mod_feedback: Pointing TODO tasks to right deprecation issue 2019-04-26 17:32:57 +02:00
Eloy Lafuente (stronk7) cc72ae7f29 MDL-60418 Behat: Fix missing $installurl 2019-04-25 23:39:11 +02:00
Eloy Lafuente (stronk7) 7aa7b392c0 Merge branch 'MDL-60418_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-04-25 23:26:19 +02:00
Tim Hunt 11a4683cfd MDL-60418 Behat: Fix broken docs links in Behat code. 2019-04-25 21:39:28 +01:00
Eloy Lafuente (stronk7) b6af039890 Merge branch 'MDL-64151-35-fix' of https://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2019-04-24 12:49:58 +02:00
Marina Glancy 69e9f234e1 MDL-64151 forms: select element without selection
Select element that is not multiple should export null when nothing is
selected. If the element is displayed there will always be something
selected.
2019-04-24 11:42:03 +02:00
Sara Arjona b7f0a3fd9c Merge branch 'MDL-65170-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2019-04-24 09:02:54 +02:00
Adrian Greeve 4f701a0e67 Merge branch 'MDL-65375-m35' of https://github.com/sammarshallou/moodle into MOODLE_35_STABLE 2019-04-24 10:31:46 +08:00
Eloy Lafuente (stronk7) 45b9bae80f Merge branch 'MDL-64151-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2019-04-23 19:39:16 +02:00
Eloy Lafuente (stronk7) 5d3bf61c27 weekly release 3.5.5+ 2019-04-23 17:36:22 +02:00
David Monllaó c344124599 Merge branch 'MDL-65102-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-04-23 13:31:05 +02:00
sam marshall 22baf5c0aa MDL-65375 Restore: Null data in other field should be serialised
If the 'other' field is empty, then following a restore of course
logs, it should still be serialised so that it is consistent with
the normal behaviour when logging.

Without this change, an event with null value for other has the
field set to NULL if you restore it, but 'N;' when the event is
initially created.
2019-04-18 15:07:40 +01:00
Adrian Greeve f1125775fe Merge branch 'MDL-29318-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-04-18 13:51:36 +08:00
Eloy Lafuente (stronk7) ca0f244e09 weekly release 3.5.5+ 2019-04-17 20:04:20 +02:00
Eloy Lafuente (stronk7) 216ea27814 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-04-17 20:04:16 +02:00
AMOS bot e0ea44ae29 Automatically generated installer lang files 2019-04-13 00:13:30 +00:00
Eloy Lafuente (stronk7) 8ffac7d8e3 weekly release 3.5.5+ 2019-04-12 21:35:08 +02:00
Eloy Lafuente (stronk7) 8d0c6ac9dd Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-04-12 21:35:06 +02:00
Jake Dallimore 5b7563dbb2 Merge branch 'MDL-62974-35' of github.com:abgreeve/moodle into MOODLE_35_STABLE 2019-04-12 11:18:24 +08:00
Adrian Greeve 8bf1ffc9ed MDL-62974 mod_lesson: Minor update to html class. 2019-04-12 11:10:41 +08:00
Eloy Lafuente (stronk7) b3d49c46eb Merge branch 'MDL-62974-35' of https://github.com/jmvedrine/moodle into MOODLE_35_STABLE 2019-04-11 23:50:18 +02:00
Marina Glancy 98af4c736d MDL-64151 form: autocomplete element remove last choice
This is the same situation as was in MDL-56864 but now in 'course', 'autocomplete' and 'select' elements
- if the element allows multiple selection it is impossible to remove the last element
2019-04-11 16:46:33 +02:00
Sara Cenni 2653ea76be MDL-64851 badge: reviewing badges of invisible courses 2019-04-11 12:03:42 +02:00
Adrian Greeve 367a45a60b Merge branch 'MDL-64719-purge_user_cache-35' of git://github.com/leonstr/moodle into MOODLE_35_STABLE 2019-04-11 13:40:15 +08:00
Adrian Greeve 1da8aa30e0 Merge branch 'MDL-46975-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-04-10 14:26:50 +08:00
AMOS bot 2e9bc58475 Merge branch 'MOODLE_35_STABLE' into install_35_STABLE 2019-04-10 00:12:29 +00:00
Jean-Michel Vedrine dd74898f63 MDL-62974 lesson: Suppress HTML font tags 2019-04-09 23:04:26 +02:00
Eloy Lafuente (stronk7) 12476a35a6 weekly release 3.5.5+ 2019-04-09 20:37:04 +02:00
Eloy Lafuente (stronk7) bf35831359 Merge branch 'MDL-64819-35' of https://github.com/sarjona/moodle into MOODLE_35_STABLE 2019-04-09 16:04:02 +02:00
Sara Arjona cc145e54fd MDL-64819 course: fix behat errors with the move icon
Some errors have been detected when using Clean + Goutte.
2019-04-09 14:16:42 +02:00
AMOS bot 48f96614ff Automatically generated installer lang files 2019-04-09 00:11:32 +00:00
AMOS bot 4066dda725 Automatically generated installer lang files 2019-04-09 00:11:32 +00:00
Sara Arjona 0a91d215c6 Merge branch 'MDL-64819-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-04-08 14:20:03 +02:00
Adrian Greeve 6d0e1fe82d Merge branch 'MDL-65218-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-04-08 16:56:31 +08:00
Damyon Wiese b7218d8a10 MDL-64819 output: Hide icons with no title
When output from javascript they should match what gets output from php.
2019-04-08 15:42:07 +08:00
Shamim Rezaie de2f0d85e7 MDL-65293 core_calendar: Privacy deletion fix
Deleting in course context should not delete from course modules
2019-04-08 15:41:09 +10:00
Jake Dallimore 077825f8c9 MDL-65170 core_user: perf improvement for user_get_user_details_courses
We don't always need to iterate over the user's courses, so only fetch
them when we do.
2019-04-08 09:05:40 +08:00
Jake Dallimore 06d2ee0fde MDL-65170 core_user: user_get_user_details_courses respects groupmode
This had a relatively simply check for course profile visibility, which
meant that users in separate groups could see one another's profile.
This has been replaced with the more correct check in
user_can_view_profile().
2019-04-08 09:05:40 +08:00
Eloy Lafuente (stronk7) 96607cf5b3 weekly release 3.5.5+ 2019-04-05 18:32:34 +02:00
Eloy Lafuente (stronk7) b290b3eded NOBUG: Fixed file access permissions 2019-04-05 18:32:34 +02:00
Thomas Korner f059d1176c MDL-65279 core: typo in categoriesandcourses fixed
AMOS BEGIN
 MOV [categoriesandcoures,core],[categoriesandcourses,core]
AMOS END
2019-04-05 14:35:09 +02:00
Damyon Wiese 0f389d44b6 MDL-64819 output: Activity menu icons
Remove duplciate alt text from activity menu icons and the links to add new sections.
2019-04-05 12:03:10 +08:00
Eloy Lafuente (stronk7) 29dba99cdf Merge branch 'MDL-65029_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-04-05 00:48:08 +02:00
Eloy Lafuente (stronk7) 7e7b71fbeb Merge branch 'MDL-65094-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-04-04 22:40:10 +02:00
Eloy Lafuente (stronk7) 4f2ee1dec1 Merge branch 'MDL-65038_MOODLE_35_STABLE' of https://github.com/maksudr/moodle into MOODLE_35_STABLE 2019-04-04 20:31:31 +02:00
Jun Pataleta f7a4ef3866 Merge branch 'MDL-62307_MOODLE_35_STABLE' of https://github.com/maksudr/moodle into MOODLE_35_STABLE 2019-04-03 16:47:56 +08:00
Jun Pataleta 6181040347 Merge branch 'MDL-65112-MOODLE_35_STABLE' of https://github.com/dmitriim/moodle into MOODLE_35_STABLE 2019-04-03 16:19:16 +08:00
Eloy Lafuente (stronk7) 8082ff4805 Merge branch 'MDL-64994-35-pythonmlversion' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2019-04-03 00:09:45 +02:00
Eloy Lafuente (stronk7) 5e2338c868 weekly release 3.5.5+ 2019-04-02 15:52:50 +02:00
Eloy Lafuente (stronk7) 6909b8aada Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-04-02 15:52:44 +02:00
Adrian Greeve 80c1b6bcd0 Merge branch 'MDL-65144-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-04-02 10:17:37 +08:00
Brendan Heywood d6455734d8 MDL-64394 core: Fixed bug when using access log with pre_loginpage_hook 2019-04-02 11:41:00 +11:00
Ilya Tregubov c91c235fb6 MDL-64439 auth: Refresh $cm in require_login after pre_loginpage_hook. 2019-04-02 10:22:41 +11:00
Leon Stringer f9ea236c4f MDL-64719 cache: Implement purge_current_user() in \cache
\cache::make() may return a cache_disabled subclass but callers, specifically
user/lib.php:user_create_user(), invoke \cache::purge_current_user() which was
only implemented by the cache_session subclass.  Added empty
\cache::purge_current_user() which subclasses can implement, i.e.
cache_session, or not, i.e. cache_disabled.
2019-04-01 15:32:42 +01:00
Damyon Wiese 61adf3b25b MDL-65144 output: Add img-fluid to logo
Extra wide logos do not scale to the screen size - this change adds the bootstrap class
img-fluid to logos on the loginpage, signupform and in the context header.

Thanks to Maksud R for working on this.
2019-04-01 15:52:16 +08:00
Jake Dallimore e9c0b71aee Merge branch 'MDL-65089_35' of https://github.com/dvdcastro/moodle into MOODLE_35_STABLE 2019-04-01 15:34:40 +08:00
Jun Pataleta 3304b0728c Merge branch 'MDL-64524-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-04-01 13:46:34 +08:00
Damyon Wiese d831bfbf04 MDL-64524 gradingform_guide: Marking guide comments
When there are too many comments, scroll the list so they still fit in the dialogue.
2019-04-01 13:03:59 +08:00
Damyon Wiese 6bfcfd9a1f MDL-64524 assign: Styles editpdf comments
Properly display the list of comments, but limiting their size (use title to indicate the full comments).
When there are too many comments, show a scrollbar in the menu.
2019-04-01 13:03:58 +08:00
Jun Pataleta 9cbdd41129 Merge branch 'MDL-63906_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2019-04-01 10:31:51 +08:00
Adrian Greeve c56206cebf Merge branch 'MDL-65173_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2019-04-01 10:23:54 +08:00
Eloy Lafuente (stronk7) 71c0f9c055 MDL-65218 recycle bin: cover immunization via settings provider
Both for course and category recycle bins
2019-04-01 09:26:55 +08:00
Eloy Lafuente (stronk7) 5e3ce4ef7d MDL-65218 recycle bin: immunize recycle bin from backup_auto_storage
As far as recycle bin is using MODE_AUTOMATED, it observes the backup_auto_storage
setting (storing backups @ real location. For recycle bin we want to ensure that
backup files are always stored in Moodle file area. In order to achieve that, we
hack the setting here via $CFG->forced_plugin_settings, so it won't interfere other
operations.  See MDL-65218 for more information.

This hack will be removed once recycle bin switches to use its own backup mode, with
own preferences and 100% appart from MODLE_AUTOMATED.
2019-04-01 09:26:55 +08:00
Eloy Lafuente (stronk7) 1e21aeb97c MDL-65218 recycle bin: Course backups (cat bin) to use MODE_AUTOMATED
Surely this should have been done as part of MDL-63263, but it wasn't.
Better let's do it here so every recycle bin backup is using the
very same mode.
2019-04-01 09:26:54 +08:00
Tim Hunt 403f2d450c MDL-65029 questions: refactor generation of question div id
We are planning to change the id in Moodle 3.7. However, the new
method name has been back-ported to stable branches, because we
know a lot of third-party question types like to have a single
branch which supports multiple Moodle versions.
2019-03-29 13:44:46 +00:00
Jun Pataleta c8ce874199 MDL-46975 core_auth: Make email validation case-insensitive
* Make email query case-insensitive
* Check only for duplicate emails if $CFG->allowaccountssameemail
is empty.
* Compare the values in "Email address" and "Email (again)" in the
signup form in a case-insensitive fashion.
2019-03-29 13:38:19 +08:00
Jun Pataleta 13cdeaf6a4 MDL-46975 auth_email: Behat test for email validation on signup 2019-03-29 13:38:19 +08:00
Jun Pataleta 0503fc7a35 MDL-29318 login: Handle email in case-insensitive manner
* Let get_complete_user_data() handle the fetching of user data and
  handle the logic of the errors to be shown based on the exception
  it throws. This also saves us 1 DB query by eliminating the need to
  count for the users that match a given email first before fetching
  user information.
2019-03-29 13:33:55 +08:00
Jun Pataleta 6abbe519d6 MDL-29318 login: Additional test for forgot_password_data_provider() 2019-03-29 13:33:55 +08:00
Jun Pataleta bdca601d03 MDL-29318 core: Fixes for get_complete_user_data()
* Added email in the list of case-insensitive fields.
* New optional parameter $throwexception for \get_complete_user_data().
  If true, an exception will be thrown when there's no matching record
  found or when there are multiple records found for the given field
  value. If false, it will simply return false.
  Defaults to false when not set. This ensures that
  get_complete_user_data() fetches the correct user data.
2019-03-29 13:33:55 +08:00
Jun Pataleta 4477b21322 MDL-29318 core: More unit tests for get_complete_user_data() 2019-03-29 13:30:19 +08:00
AMOS bot 1625acf3eb Automatically generated installer lang files 2019-03-29 00:15:35 +00:00
David Castro 8326e3d1a9 MDL-65089 glossary: Enforcing case comparison in SQL. 2019-03-28 18:33:02 -05:00
Dmitrii Metelkin c4658fd9e2 MDL-65112 mod_lesson: fix html for shortanswer responses 2019-03-29 08:31:24 +11:00
Eloy Lafuente (stronk7) d28abb632d weekly release 3.5.5+ 2019-03-28 16:49:09 +01:00
Eloy Lafuente (stronk7) 819ff2f3d7 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-03-28 16:49:03 +01:00
Shamim Rezaie 2787bb5593 MDL-65102 core_form: autocomplete element to handle submit event 2019-03-28 15:18:49 +11:00
Eloy Lafuente (stronk7) 2ca6891e1f Merge branch 'MDL-63196-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2019-03-28 00:12:54 +01:00
Eloy Lafuente (stronk7) 5381aad94a Merge branch 'MDL-64996-35-untrainedstaticmodels' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2019-03-27 23:46:29 +01:00
Eloy Lafuente (stronk7) 618b27a8ae Merge branch 'MDL-62992-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2019-03-27 23:06:29 +01:00
Jun Pataleta 1ed39a4991 Merge branch 'MDL-65008_moodle_35_stable' of https://github.com/dvdcastro/moodle into MOODLE_35_STABLE 2019-03-27 10:39:49 +08:00
Simey Lameze 2427689f4c MDL-62992 quiz: fix tags filtering on random question modal 2019-03-27 10:26:33 +08:00
Simey Lameze 89b9e4f805 MDL-62992 question: conditionaly enable question tags feature 2019-03-27 10:26:33 +08:00
Paul Holden 4418ec9411 MDL-43130 access: fix user counting when retrieving assignable roles.
Previously users assigned the same role in a context via multiple
components would be counted multiple times.
2019-03-27 00:18:13 +01:00
Eloy Lafuente (stronk7) 5fbbcddd0c Merge branch 'MDL-65081-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-03-26 22:44:10 +01:00
Eloy Lafuente (stronk7) 25570f80dc Merge branch 'MDL-63152-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-03-26 13:28:31 +01:00
Eloy Lafuente (stronk7) 0f038af8de Merge branch 'MDL-63149-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-03-26 13:25:20 +01:00
Eloy Lafuente (stronk7) 5e97ea1423 Merge branch 'MDL-63151-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-03-26 13:16:06 +01:00
Shamim Rezaie 2e790a9741 MDL-65094 registration: don't encourage registration if on localhost 2019-03-26 17:26:35 +11:00
Damyon Wiese 68b61978e8 MDL-65178 competencies: count_competencies fix
Fix sql error in course_module_competency::count_competencies() function.
2019-03-26 09:49:08 +08:00
Sara Arjona 0eff5b7765 Merge branch 'MDL-64615-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2019-03-25 18:20:22 +01:00
Sara Arjona fd0b312303 Merge branch 'MDL-64790-35_apidoc_fix' of https://github.com/nicoroeser/moodle into MOODLE_35_STABLE 2019-03-25 12:38:30 +01:00
Mark Nelson cfa3409712 MDL-65173 message_email: removed bogus logic
This reverts commit ecb4b0260e.
2019-03-25 17:19:27 +08:00
David Mudrák 15d1157600 MDL-64994 analytics: Improve the Python package version check
Use the new method to check that the installed Python package has high
enough yet still API-compatible version.
2019-03-25 09:19:51 +01:00
David Mudrák a1026db0fe MDL-64994 analytics: Add a simple semantic version check method
This method is to be used for checking that a compatible version of the
moodlemlbackend package is installed on the server. The package is
expected to use the semantic versioning scheme (semver.org).
2019-03-25 09:19:51 +01:00
David Mudrák 959c70e87b MDL-64996 analytics: Make sure the no_teaching model is trained
Due to the bug, the no_teaching model might have been marked as
not-trained in the database. Static predictions models (i.e. those using
a target based on assumptions, not facts) are always considered as
trained. If they were marked as not-trained, the prediction scheduled
task would skip them and they would produce no predictions.

Ideally, such a fix should be done for all static models. But there is
no easy way to do it during the upgrade where accessing the analytics
API is not possible. I don't think there are many models out there that
would be affected by this so this seems to be good enough solution for
now (and the future ability to reset models will cover the rest).
2019-03-25 09:16:13 +01:00
David Mudrák 8e2360f9c8 MDL-64996 analytics: Don't mark static model as untrained after clearing
Static predictions models (i.e. those using a target based on
assumptions, not facts) are always considered as trained. Clearing them
must not mark them as untrained. Doing so would make them being skipped
by the prediction scheduled task.
2019-03-25 09:14:32 +01:00
Adrian Greeve 55d5362ab6 Merge branch 'MDL-60339-35' of git://github.com/Chocolate-lightning/moodle into MOODLE_35_STABLE 2019-03-25 11:12:12 +08:00
Adrian Greeve e1c280f951 Merge branch 'MDL-64492-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-03-25 11:00:40 +08:00
AMOS bot 238585c911 Automatically generated installer lang files 2019-03-25 00:09:32 +00:00
Abhimanyu Kumar d7903d34f0 MDL-64959 uploaduser: remove leading/trailing spaces from CSV headings
Earlier while uploading users via CSV, if any leading or trailing space was there in
headings of CSV file then error was displayed which will be difficult for a non-technical
person to understand. After this patch, leading and trailing spaces from headings will
be trimmed automatically.
2019-03-23 22:34:28 +05:30
maksudr 710b4e0a4b MDL-62307 mod_feedback: Decode HTML special char in add_form_element() 2019-03-22 15:45:16 +00:00
Mathew May 0c74fb3f82 MDL-60339 course: Course editing only checked against site:manageblocks.
Add in additional capabilities to the page. When all_editing_caps is called it'll check against
moodle/site:manageblocks & added capabilities. If moodle/site:manageblocks
was not set the user would have trouble editing the page.
2019-03-22 13:51:58 +08:00
Damyon Wiese ab3236199d MDL-65153 competencies: Urls course competencies
The template for the course competencies page expects a pluginbaseurl parameter
but the webservice that fetches when rendered by AJAX is missing this property.
2019-03-22 13:18:03 +08:00
Jun Pataleta 67d62946ff MDL-65081 core_output: Unit tests for single_select and url_select 2019-03-22 11:15:24 +08:00
Jun Pataleta 9415d26ea4 MDL-65081 core_output: Set single_select and url_select attributes 2019-03-22 11:15:24 +08:00
Damyon Wiese c2a956a63d MDL-64492 course: Hide activity icons for Ally
Empty alt text results in an image with no label.
role="presentation" does not hide - it only removes the semantic information.
If the image provides no information, make it hidden with aria-hidden.
2019-03-22 11:01:42 +08:00
Simey Lameze d9af5335c2 MDL-63196 core_calendar: add behat scenario 2019-03-22 10:46:02 +08:00
Simey Lameze 4c0ea3f45e MDL-63196 calendar: add missing option to export category events 2019-03-22 10:46:02 +08:00
Damyon Wiese d707892d0c MDL-65149 emoticons: Do not show all emoticons
Allow some emoticons to still work, but not be selectable from the text editor plugins.
2019-03-22 10:07:15 +08:00
Eloy Lafuente (stronk7) d70651f787 weekly release 3.5.5+ 2019-03-21 20:19:36 +01:00
Cameron Ball c55d75120a MDL-65104 registration: Ensure $registration is always null when no record exists 2019-03-21 16:12:31 +08:00
Adrian Greeve 59f0c4b48a Merge branch 'MDL-46803-greedy-roles-reset-MOODLE_35' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_35_STABLE 2019-03-21 11:23:42 +08:00
Eloy Lafuente (stronk7) f4ae633fa5 Merge branch 'wip-35-MDL-64563' of https://github.com/adpe/moodle into MOODLE_35_STABLE 2019-03-21 00:44:05 +01:00
Eloy Lafuente (stronk7) 89eded8477 MDL-63263 tool_recyclebin: show the note as part of the heading element
It looks better (IMO) than using admin_setting_description and works in all
branches.
2019-03-21 00:15:08 +01:00
Eloy Lafuente (stronk7) 57b5bf77b7 Merge branch 'MDL-63263-MOODLE_35_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_35_STABLE 2019-03-20 23:16:26 +01:00
Eloy Lafuente (stronk7) dc5d047953 Merge branch 'MDL-65022-35' of https://github.com/Dagefoerde/moodle into MOODLE_35_STABLE 2019-03-20 22:32:10 +01:00
M 8f9f22aeb3 MDL-65038 core_files: Fix typo in function mock_response 2019-03-20 20:52:48 +00:00
Jun Pataleta 500ea66aba Merge branch 'MDL-62872-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-03-20 16:30:20 +08:00
Adrian Greeve 5c12024435 Merge branch 'MDL-65005-35-fix' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-03-20 13:58:38 +08:00
Jun Pataleta 51feaeafa2 MDL-65005 tool_policy: Ensure the user's on the Dashboard after agreeing 2019-03-20 13:13:35 +08:00
Eloy Lafuente (stronk7) bccd34fa0a Merge branch 'MDL-65085_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2019-03-20 00:40:38 +01:00
Eloy Lafuente (stronk7) 77e067dc2e Merge branch 'MDL-64979-m35' of https://github.com/sammarshallou/moodle into MOODLE_35_STABLE 2019-03-19 22:09:43 +01:00
sam marshall 0ec20a18a4 MDL-64979 Behat: Add option to increase timeouts 2019-03-19 17:13:47 +00:00
Adrian Greeve d402e44ab9 Merge branch 'MDL-64958-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-03-19 13:43:54 +08:00
Adrian Greeve a8ad45b9e8 Merge branch 'MDL-63144-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-03-19 11:27:32 +08:00
Eloy Lafuente (stronk7) b60590a2fa Merge branch 'MDL-64974-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2019-03-19 00:23:58 +01:00
Eloy Lafuente (stronk7) 25160a2a05 Merge branch 'MDL-65006-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2019-03-18 23:36:08 +01:00
Julien Boulen 849f7f40c8 MDL-46803 course: Prevent unenrol users with multiple roles during reset 2019-03-18 11:17:58 +01:00
David Monllaó 36ec2d7503 MDL-63906 analytics: Release the lock on \Throwable received 2019-03-18 09:31:46 +01:00
Shamim Rezaie e3a7647ec3 MDL-63152 mod_workshop: Add userid param to calendar callbacks 2019-03-18 15:53:42 +11:00
Shamim Rezaie 70c84f07d7 MDL-63152 mod_workshop: check if the module is visible to the user 2019-03-18 15:53:42 +11:00
Shamim Rezaie 485ac4aeba MDL-62872 atto_recordrtc: max_filesize detection fix 2019-03-18 15:42:15 +11:00
Jake Dallimore ca39432c7a Merge branch 'MDL-65291_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-03-16 07:19:30 +08:00
Eloy Lafuente (stronk7) e1de53be9f Merge branch 'MDL-65179-m35' of https://github.com/sammarshallou/moodle into MOODLE_35_STABLE 2019-04-16 20:44:42 +02:00
David Monllaó 7c05382b75 Merge branch 'MDL-62572-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-04-15 11:07:14 +02:00
David Monllaó 8d371c2174 Merge branch 'wip-MDL-65220-MOODLE_35_STABLE' of https://github.com/jason-platts/moodle into MOODLE_35_STABLE 2019-04-15 07:58:10 +02:00
David Monllaó 457f84654e Merge branch 'MDL-64894-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-04-15 07:45:48 +02:00
David Monllaó 87648029c4 Merge branch 'MDL-29317-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-04-15 07:43:38 +02:00
Eloy Lafuente (stronk7) 5fd2f276f1 MDL-65291 phpunit: Make a test immune to DST changes 2019-04-15 01:23:03 +02:00
Trisha Milan ba8f84021f MDL-64894 Theme: Fix unable to expand collapsible topics 2019-04-12 14:20:59 +08:00
Damyon Wiese 7f84843045 MDL-62572 backup: Duplicating an activity
Don't apply admin defaults for import when using the duplicate function.
2019-04-12 14:05:09 +08:00
Jason Platts 41bb7608e8 MDL-65220 behat: test scenarios sometimes do not clear database data 2019-03-29 15:30:30 +00:00
Jun Pataleta b9ceefadf0 MDL-29317 gradeimport_csv: Case-insensitive query for email and username
Query using the following fields for
\gradeimport_csv_load_data::check_user_exists() should be done in a
case-insensitive manner:
* email - As agreed in MDL-29315
* username - Although usernames can only be in lowercase during
  registration, usernames are being handled in a case-insensitive
  fashion when logging in. It makes sense to make check_user_exists()
  consistent with this behaviour.
2019-03-29 13:30:06 +08:00
Jun Pataleta 2ff2274ffc MDL-29317 gradeimport_csv: Tests for case-insensitivity 2019-03-29 13:30:06 +08:00
sam marshall 82a46e6f07 MDL-65179 Web service: Token last access is updated too frequently 2019-03-28 17:15:29 +00:00
David Monllaó e34384ed18 MDL-65085 analytics: noreply user sends insights 2019-03-15 13:50:09 +01:00
Nicolas Roeser 43121fbe8b MDL-64790 upgrade: parameter API doc regression fix
Partially update the API documentation of function
upgrade_plugin_savepoint.

This restores consistency between function parameters and API
documentation; as commit 17da2e6f28 (fix
for MDL-16438) had renamed parameter $dir to $plugin, but not also
applied this change to the API documentation.

Also reword the parameter comment text so that it is more meaningful to
developers: document that the parameter contains the name of the plugin.

Change the API documentation of parameter $type as well so that it is
a) correct, and
b) not in conflict with the API documentation for $plugin.
2019-03-15 11:11:44 +01:00
Nathan Nguyen fe033417a6 MDL-63263 tool_recyclebin: Apply automated backup setting
Use Automated backup settings as settings for Recycle bin backup and restore.
2019-03-15 14:53:15 +11:00
Rex Lorenzo 73c24fa02c MDL-63263 tool_recyclebin: Recycle bin should always save user data. 2019-03-15 14:53:15 +11:00
Jake Dallimore b1376641d4 weekly release 3.5.5+ 2019-03-15 11:01:27 +08:00
Paul Holden 546ea12179 MDL-46931 roles: retrieve distinct users in sub-query.
Prevents duplicate key column warning when a user is enrolled in
a course via multiple enrolment methods.
2019-03-14 01:27:42 +01:00
Eloy Lafuente (stronk7) 55c0301d33 Merge branch 'MDL-63146-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-03-14 01:22:19 +01:00
Eloy Lafuente (stronk7) cca1025271 Merge branch 'MDL-61585_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2019-03-14 01:16:14 +01:00
Eloy Lafuente (stronk7) dda86847b1 Merge branch 'MDL-63524-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-03-13 23:56:58 +01:00
Andrew Nicols 12abff6943 MDL-63524 behat: Do not skip tests on Step 0 error 2019-03-14 06:55:23 +08:00
Juan Leyva e247dabc3a MDL-64615 tool_mobile: Do not modify custom download URLs 2019-03-13 17:10:36 +01:00
Jan Dageförde 22f5807e22 MDL-65022 wiki: declare the cancel button secondary 2019-03-12 09:06:22 +01:00
Shamim Rezaie 3be7a5ce18 MDL-63151 mod_wiki: Add userid param to mod_wiki calendar callbacks 2019-03-12 17:17:05 +11:00
Shamim Rezaie 34667451cf MDL-63151 mod_wiki: check if the module is visible to the user 2019-03-12 17:17:04 +11:00
Sara Arjona b02583be81 MDL-65006 policy: avoid loop when no policies need to be agreeded
Avoid an infinite loop when the user has no policies to agreed but
the policyagreed = 0.
2019-03-11 10:36:37 +01:00
Sara Arjona 4d53d44f2e MDL-64974 badges: add missing configurecriteria capability check 2019-03-11 10:25:49 +01:00
David Monllaó deb6d89f94 MDL-61585 analytics: Include missing indicators 2019-03-11 09:39:51 +01:00
Jun Pataleta 9820d27a23 MDL-64958 gradeimport_csv: Better unit tests for check_user_exists() 2019-03-11 09:36:00 +08:00
Jun Pataleta 78615db17f MDL-64958 grade_import: Ensure correct user is being fetched
* We need to ensure that we are checking the correct user account.
  Since email and idnumber are not unique fields, there's a chance that
  multiple user records will match when querying for user data using
  these fields. This might lead to a different user's grades being
  inadvertently modified during grade import. In such a case, this
  function needs to return a null userid.
2019-03-11 09:36:00 +08:00
David Castro 8d34e84bb9 MDL-65008 question: Query enhancement.
Adding core_question as an additional filter to the tag backup.
2019-03-08 16:34:25 -05:00
Sara Arjona 5e878219fb Moodle release 3.5.5 2019-03-08 11:03:11 +01:00
AMOS bot e8c0748998 Automatically generated installer lang files 2019-03-08 00:15:31 +00:00
Eloy Lafuente (stronk7) 8360ef9293 weekly release 3.5.4+ 2019-03-07 16:41:53 +01:00
Eloy Lafuente (stronk7) d750647969 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-03-07 16:41:51 +01:00
Shamim Rezaie f20c9009fa MDL-63149 mod_survey: Add userid param to mod_survey calendar callbacks 2019-03-07 17:54:54 +11:00
Shamim Rezaie 3be433b5d2 MDL-63144 mod_lti: Add userid param to mod_lti calendar callbacks 2019-03-07 17:49:30 +11:00
Shamim Rezaie 3086259abb MDL-63144 mod_lti: Check if the module is visible to the user 2019-03-07 17:49:30 +11:00
Adrian Greeve 2a3758ace1 Merge branch 'MDL-63905_35' of git://github.com/jmvedrine/moodle into MOODLE_35_STABLE 2019-03-07 09:14:46 +08:00
Andrew Nicols a868b63085 Merge branch 'MDL-64774-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-03-06 15:47:36 +08:00
Jean-Michel Vedrine ffe4e082b0 MDL-63905 qtype_multianswer: validate imported questions 2019-03-06 08:36:43 +01:00
Andrew Nicols e4a8e40912 Merge branch 'MDL-64950-35-2' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-03-06 13:48:18 +08:00
Jun Pataleta b51a2ccba5 MDL-64950 core: Handle username in a case-insensitive fashion 2019-03-06 12:46:14 +08:00
Jun Pataleta 0cdffdca4c MDL-64950 core: Unit tests for get_complete_user_data() 2019-03-06 12:46:14 +08:00
Jun Pataleta bdf22ec3b7 MDL-64950 login: core_login_validate_forgot_password_data() unit tests 2019-03-06 12:46:14 +08:00
Andrew Nicols 5d4597cda7 MDL-64971 access: Ensure that the capability exists when fetching 2019-03-06 10:16:54 +08:00
Jun Pataleta 90a5693234 MDL-64774 user: Make email query case-insensitive 2019-03-06 09:00:32 +08:00
Jun Pataleta aec6391bc2 MDL-64774 user: Better unit tests for updating users with similar emails 2019-03-06 09:00:32 +08:00
AMOS bot 21f27a2bd3 Automatically generated installer lang files 2019-03-06 00:09:40 +00:00
Eloy Lafuente (stronk7) 9f071b48c5 Merge branch 'MDL-64943_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-03-05 22:49:54 +01:00
Eloy Lafuente (stronk7) 3717e40450 MDL-64943 behat: fix some remaining uses of old strings 2019-03-05 17:02:28 +01:00
Eloy Lafuente (stronk7) f7e4dacd1e Merge branch 'MDL-64943-35-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2019-03-05 11:09:42 +01:00
Jun Pataleta c80db2680f Merge branch 'MDL-62465-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-03-05 15:29:55 +08:00
Damyon Wiese 438cf695bf MDL-62465 assign: Remove behat step
We don't need to open the menu to choose the "Grade" item, we can just click the button.
2019-03-05 14:49:51 +08:00
Adrian Greeve cc52293498 Merge branch 'MDL-64864-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-03-05 14:27:21 +08:00
Adrian Greeve 3eab97cc34 Merge branch 'MDL-64678-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-03-05 13:54:09 +08:00
Andrew Nicols e225d71259 Merge branch 'MDL-64961-m35' of https://github.com/sammarshallou/moodle into MOODLE_35_STABLE 2019-03-05 13:25:17 +08:00
Andrew Nicols 2504aa33e0 Merge branch 'MDL-64981_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-03-05 13:23:07 +08:00
Shamim Rezaie 4480118b5d MDL-63146 mod_quiz: Add userid param to mod_quiz calendar callbacks 2019-03-05 14:23:47 +11:00
Shamim Rezaie 816e6abb1b MDL-64830 core_calendar: Do cap check on event edit form 2019-03-05 04:21:41 +01:00
Damyon Wiese d3f2f990dd MDL-64651 comments: Do not send referrer
Use blanktarget option on all comments to prevent malicious links.
2019-03-05 04:21:41 +01:00
Viktor 427463a525 MDL-62702 core_lib: fix broken verification signature 2019-03-05 04:21:41 +01:00
Mark Nelson f46413cb03 MDL-62702 core_lib: updated the 'ltiprovider' readme_moodle.txt 2019-03-05 04:21:41 +01:00
Brendan Cox 723d1a7475 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:21:41 +01:00
Ryan Wyllie 070f24d006 MDL-63786 core: set $CFG->forceclean for logged in as sessions
Turn on the forceclean config setting when a user is logged in as a
different user. This is a precautionary measure, which forces all
user submitted content to be cleaned of JavaScript before rendering
it to the logged in as user.
2019-03-05 04:21:41 +01:00
Luca Bösch 911f748806 MDL-64706 theme_boost: Remove logo link in secure template 2019-03-05 04:21:41 +01:00
Jun Pataleta 9ed8cafff3 Merge branch 'MDL-64652-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-03-05 11:13:13 +08:00
Adrian Greeve d85fed227b Merge branch 'MDL-64941-35' of https://github.com/MartinGauk/moodle into MOODLE_35_STABLE 2019-03-05 11:11:58 +08:00
Andrew Nicols 0b9e9bf89d MDL-64652 mod_data: Break LEFT JOINs to multiple INNER 2019-03-05 10:17:36 +08:00
Andrew Nicols ed5a080034 MDL-64652 glossary: Break LEFT JOINs to multiple INNER 2019-03-05 10:17:36 +08:00
Andrew Nicols 419275478b MDL-64652 forum: Use an inner join when fetching ratings 2019-03-05 10:17:36 +08:00
Andrew Nicols 6a06c7ca03 MDL-64652 rating: Add optional inner join option to sql 2019-03-05 10:17:35 +08:00
Andrew Nicols 6b9cce6b98 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:17:10 +08:00
Adrian Greeve f8e7257327 Merge branch 'MDL-64863-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-03-05 09:51:11 +08:00
Jun Pataleta 37a1983740 Merge branch 'MDL-62143-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-03-05 09:41:20 +08:00
Damyon Wiese ebbb7f9a5f MDL-64864 core_competency: Include course category
These courses are passed through to the course_summary_exporter which
requires a category id in each course record.
2019-03-05 08:54:17 +08:00
Damyon Wiese 95209cb64a MDL-64678 assign: More ios touch
Only disable touch scrolling when the touch event is within the drawing region of the canvas.
2019-03-05 08:49:49 +08:00
AMOS bot 973c2551aa Automatically generated installer lang files 2019-03-04 00:09:51 +00:00
sam marshall cdfdef65b5 MDL-64961 REST web service: Fatal error in error handler 2019-03-01 11:57:52 +00:00
Tim Hunt 7f5479a142 MDL-64981 dml tests: pgsql_native_recordset_testcase port number 2019-03-01 11:14:20 +00:00
Martin Gauk 5320dc6722 MDL-64941 qtype_multianswer: keep order of existing wrapped questions 2019-03-01 09:50:05 +00:00
AMOS bot c67c536dfe Automatically generated installer lang files 2019-03-01 00:15:55 +00:00
David Mudrák 4c73fd62b0 MDL-64943 lang: Fix regression in the test caused by the reworded string 2019-02-28 20:00:52 +01:00
Eloy Lafuente (stronk7) b38eb7882b weekly release 3.5.4+ 2019-02-28 18:51:41 +01:00
Eloy Lafuente (stronk7) c4af3e8ec1 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-02-28 18:51:38 +01:00
David Mudrák d5cdc97b2f MDL-64943 lang: Fix regressions in Behat caused by reworded strings 2019-02-28 18:07:03 +01:00
Helen Foster bc2a000664 MDL-64943 lang: Import fixed English strings (en_fix)
Significant string changes:

* importgroups_help,core_group - Correcting optional fieldnames
  (removing picture, hidepicture and adding groupidnumber, groupingname
  and enablemessaging)

* penaltyforeachincorrecttry_help,core_question - additional paragraph
  about scoring logic

* resultdownloadready,tool_dataprivacy - wording corrected (no need to
  go to a download page)

* auth_dbfielduser,auth_db - varchar data type requirement
2019-02-28 18:02:44 +01:00
Juan Leyva 651f5c494b MDL-64444 mod_assign: Use correct permissions for viewing grades
Some WebServices does not use the correct permissions.
Now we are using assign own API (require_view_grades()) instead.

Note this patch is different from the 36_STABLE and master ones
because there isn't context freezing here. Just we decided to
apply the changes for consistent perm evaluation in all branches.
2019-02-28 01:25:13 +01:00
Sara Arjona 536faec42a Merge branch 'MDL-55135-35-competencies-manage-in-coursecontext' of https://github.com/wjroes/moodle into MOODLE_35_STABLE 2019-02-27 11:51:51 +01:00
Sara Arjona c7ff973845 Merge branch 'MDL-62454-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2019-02-27 08:58:31 +01:00
Andrew Nicols 3235bb616d Merge branch 'MDL-64889_35_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_35_STABLE 2019-02-27 14:44:18 +08:00
Andrew Nicols 86c240ddfa Merge branch 'wip-35-MDL-62345' of https://github.com/adpe/moodle into MOODLE_35_STABLE 2019-02-27 14:14:35 +08:00
Andrew Nicols a94b5db132 Merge branch 'MDL-63674-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-02-27 13:04:33 +08:00
Andrew Nicols 47ff684a89 Merge branch 'MDL-64591_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-02-27 09:55:05 +08:00
AMOS bot 50733f26f7 Automatically generated installer lang files 2019-02-27 00:09:51 +00:00
Eloy Lafuente (stronk7) d14925e818 Merge branch 'MDL-63417-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2019-02-26 23:19:25 +01:00
Sara Arjona a5dfb4cb3b Merge branch 'MDL-43428-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-02-26 14:09:15 +01:00
Tim Hunt 591a7952c2 MDL-64591 User tours: don't show during redirects & other bad times 2019-02-26 13:06:36 +00:00
Shamim Rezaie f4713ca7ec MDL-43428 accessrule_timelimit: timeclose can be ealier than timelimit 2019-02-26 14:45:37 +11:00
Adrian Greeve ce0a325481 Merge branch 'MDL-64640-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-02-25 10:29:35 +01:00
Andrew Nicols e12a258678 Merge branch 'MDL-64561-35-test' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-02-25 15:53:34 +08:00
Charles Fulton 2f9592c57a MDL-64561 install: show help text before database check 2019-02-25 16:44:35 +11:00
Shamim Rezaie 79cbc5ca4c MDL-63674 core_messaging: Bidi text support 2019-02-25 14:44:05 +11:00
Adrian Perez e6e776dc77 MDL-62345 navigation: Change data-key for dashboard rootnode 2019-02-22 16:59:04 +01:00
Andrew Nicols f5dde8d05e weekly release 3.5.4+ 2019-02-22 10:51:25 +08:00
Andrew Nicols e8833c4a18 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-02-22 10:51:20 +08:00
Bas Brands a71f1f4336 MDL-62454 theme_boost: numerical qtype answer inline 2019-02-21 14:38:32 +01:00
Adrian Greeve 6e3e7d3a01 Merge branch 'MDL-64729-35' into MOODLE_35_STABLE 2019-02-21 12:36:34 +01:00
John Beedell a37d6ab8ff MDL-64729 mod_glossary: glossary_get_entries_search case sensitivity 2019-02-21 12:35:45 +01:00
Adrian Greeve 96803a9db7 Merge branch 'MDL-64856_m35v1' of git://github.com/sbourget/moodle into MOODLE_35_STABLE 2019-02-20 18:06:16 +01:00
Adrian Greeve dfff9d51bb Merge branch 'MDL-64200-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-20 16:00:43 +01:00
Adrian Greeve c9bb208ba8 Merge branch 'MDL-64450-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-02-20 11:39:10 +01:00
Matteo Scaramuccia 7b5b613820 MDL-64443 git: Excluded vim swap files
Vim swap filenames are deterministic someway.
Refs:
- http://vimdoc.sourceforge.net/htmldoc/recover.html#swap-file
- https://github.com/vim/vim/blob/4efe73b478d3ba689078da502fd96f45204ff1f5/src/memline.c#L4683
- https://unix.stackexchange.com/a/326737
- https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
2019-02-20 10:24:31 +01:00
David Monllaó 93551b5f58 MDL-64500 tool_analytics: noanalysables negation better than analysables 2019-02-20 10:10:18 +01:00
Andrew Nicols 6fb045026e Merge branch 'MDL-64570-35-fix1' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-20 10:55:32 +08:00
Damyon Wiese a6ad453ad7 MDL-64570 user: input field purpose
Do not autocomplete the user fields when editing another user.
2019-02-20 09:51:32 +08:00
Eloy Lafuente (stronk7) 6456fa0617 Merge branch 'MDL-64679_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2019-02-20 00:07:09 +01:00
Eloy Lafuente (stronk7) 903be41022 Merge branch 'MDL-63134-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-02-20 00:01:11 +01:00
Eloy Lafuente (stronk7) 72163b6f59 Merge branch 'MDL-64806-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-19 23:35:13 +01:00
Eloy Lafuente (stronk7) 461981dca0 Merge branch 'MDL-64242_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-02-19 23:23:14 +01:00
Eloy Lafuente (stronk7) d9b034dadb Merge branch 'MDL-62008-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-19 17:24:03 +01:00
Eloy Lafuente (stronk7) 0937c18c6d Merge branch 'MDL-64500_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2019-02-19 17:10:56 +01:00
Eloy Lafuente (stronk7) 2e80ca02f3 Merge branch 'MDL-64540-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-19 15:42:11 +01:00
Adrian Greeve 331aec2f27 Merge branch 'MDL-60459_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2019-02-19 11:51:11 +01:00
David Monllaó 6d31a91aff MDL-64570 user: Remove empty line 2019-02-19 09:26:57 +01:00
David Monllaó df51b94410 Merge branch 'MDL-64570-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-19 09:26:27 +01:00
David Monllaó c96968b7e9 Merge branch 'MDL-45151-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-19 06:40:33 +01:00
Damyon Wiese e995a79f7b MDL-64540 assign: Backport of MDL-60008
This patch combines the following changes:

* Basically we should produce a combined PDF from all the files that it was possible to convert.
* If any one submission input file fails conversion, it should just be omitted in the result.
* When not all files are available in the online pdf, display a warning to graders
that some files must be downloaded.
* Better support for information messages from the conversion process.
* Remove the z-index values from the expand / collapse panels. They cause errors when mixed with dialogues.
* The edit pdf menus are all broken on small screen sizes. They consume 100% of the page with for no reason.
* The heights of the buttons to hide/show panels are arbitrarily big. There is not need to set them specifically.
2019-02-19 10:23:50 +08:00
Damyon Wiese f148fa37cb MDL-64570 user: coding style
Fix cibot warnings on line length.
2019-02-19 09:45:24 +08:00
Damyon Wiese 1e1ab33625 MDL-64570 accessibility: autocomplete user profile fields
Only if editing your own user details and not logged in as someone else.
2019-02-19 09:45:24 +08:00
Damyon Wiese b049fa2c8d MDL-64570 accessibility: purpose login fields
Provide the autocomplete attribute and username / current-password values to username
and password fields in login forms.

https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html
2019-02-19 09:45:23 +08:00
Adrian Greeve d6f6c78c73 Merge branch 'MDL-64452-35-cachesession' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2019-02-18 15:55:59 +01:00
Mark Johnson 4c0a87629f MDL-64889 completion: Fix performance of get_course_progress_percentage 2019-02-18 14:06:37 +00:00
willem fb5836b42e MDL-55135 competencies: fix capabilities managing course competencies
Capability check in a course was using global competency capabilities 
moodle/competency:competencyview and  moodle/competency:competencymanage 
instead of the course equivalents. Users outside the course context 
could not manage course competencies.
2019-02-18 10:51:02 +01:00
AMOS bot 8fd354bc92 Automatically generated installer lang files 2019-02-16 00:14:07 +00:00
David Mudrák 8374e2db3f MDL-64452 cache: Add tests for key prefix based on session id
Unfortunately, we can't simply use session_id() to regenerate the
session id in unit tests. Starting from PHP 7.2, it would trigger
"session_id(): Cannot change session id when headers already sent",
refer to MDL-60978 and PHP bug #75628 for more details.

As a workaround, we use a static property allowing us to inject the
value that we then use as a session identifier. This is reasonably
enough to make sure that the identifier is used as a part of the key
prefix.
2019-02-15 09:38:09 +01:00
David Mudrák c4f137749d MDL-64452 cache: Always use the current session id in the key prefix
The current logic in the cache_session::check_tracked_user() is not
right. We must always set the current session id. A typical use case is
when the cache instance is instantiated for a not logged in user. We
can't let the sessionid property null in that case as it forms an
important part of the parsed key.

Similarly, even if we have the same user currently loaded, we must still
set the sessionid to make sure the data will be associated with the
current PHP session. Same user (including visitors or guest users) can
access the site from different browsers and each must end up with its
own key prefix.
2019-02-15 09:38:09 +01:00
David Monllaó 18735c9f51 MDL-64679 tool_analytics: Allow trained models to be cleared 2019-02-15 08:43:34 +01:00
Damyon Wiese 77474f4733 MDL-64863 tool_lp: Progress if needed
Do not immediately show progress bars since most operations work
in under a second. This will use the default timeout (5 seconds)
before showing progress bars.
2019-02-15 09:10:29 +08:00
Andrew Nicols 41a15e6d73 weekly release 3.5.4+ 2019-02-15 08:29:24 +08:00
Andrew Nicols bcd2debd4e Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-02-15 08:29:22 +08:00
Stephen Bourget 4440ca8121 MDL-64856 mod_glossary: Always show the settings cog on the view page. 2019-02-14 12:47:01 -05:00
Jun Pataleta 4d67bcdb5e Merge branch 'MDL-64736-35-2' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-02-14 15:00:42 +08:00
Jun Pataleta af3214adae Merge branch 'MDL-63892-35-rework' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2019-02-13 21:00:46 +08:00
Michael Hawkins a3f16eb4ea MDL-63892 mod_forum: Behat update for post order 2019-02-13 16:47:46 +08:00
Jun Pataleta 579700dcf4 Merge branch 'MDL-64835-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-02-13 16:27:00 +08:00
Andrew Nicols ea2ed45ec7 Merge branch 'MDL-64714-35' of git://github.com/cescobedo/moodle into MOODLE_35_STABLE 2019-02-13 11:25:24 +08:00
Andrew Nicols c35399cc17 Merge branch 'MDL-63892-35-rework' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2019-02-13 10:19:56 +08:00
Andrew Nicols f0f468ba1f 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:13:56 +08:00
Andrew Nicols 8bb8d213db 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:13:56 +08:00
AMOS bot a75f2c2f1b Automatically generated installer lang files 2019-02-13 00:11:52 +00:00
Eloy Lafuente (stronk7) 85da5ed5e2 Merge branch 'MDL-64420-2_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-02-12 12:56:46 +01:00
David Monllaó 82b6519647 Merge branch 'MDL-64590_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-02-12 12:47:06 +01:00
David Monllaó 799e4e2fbf Merge branch 'MDL-64730-lti-adv-0score-35' of https://github.com/CengageEng/moodle into MOODLE_35_STABLE 2019-02-12 12:33:38 +01:00
John Beedell ecbcbb2a7f MDL-64420 qtype: gapselect unit tests unsafe 2019-02-12 11:27:01 +00:00
David Monllaó 6699b20eb9 MDL-63706 tasks: Fix typo in pathtophp 2019-02-12 09:49:51 +01:00
David Monllaó 5af18c34e3 Merge branch 'MDL-63706_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2019-02-12 09:46:39 +01:00
David Monllaó fb911d3422 Merge branch 'MDL-32096-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-02-12 09:41:45 +01:00
Andrew Nicols 895ec79efd Merge branch 'MDL-64291_35' of https://github.com/KietChan/moodle into MOODLE_35_STABLE 2019-02-12 10:55:53 +08:00
Jun Pataleta 7ccf3ebdf2 Merge branch 'MDL-64493-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-12 10:10:28 +08:00
Andrew Nicols e3c4a1fc9f MDL-64736 course: Rewrite behat step to avoid changing a checkbox 2019-02-12 07:43:54 +08:00
Eloy Lafuente (stronk7) 1bcf9c913f Merge branch 'MDL-61326-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-02-12 00:20:43 +01:00
Peter ecf8e7eda9 MDL-61326 repository_equella: Pass proper labels for roles with no name 2019-02-12 07:11:16 +08:00
Eloy Lafuente (stronk7) 9b6f09eeeb Merge branch 'MDL-64694_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2019-02-12 00:10:35 +01:00
Eloy Lafuente (stronk7) 83e40aa825 Merge branch 'MDL-64606-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-02-12 00:02:44 +01:00
Eloy Lafuente (stronk7) 008121e57f Merge branch 'MDL-64238-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-02-11 23:57:18 +01:00
Peter 67bc6c6ebb MDL-64238 mod_quiz: Check enrollment on calendar_action generator
* Updated unit tests to account for participants
2019-02-12 06:26:23 +08:00
Peter 649ffed15d MDL-64238 mod_lesson: Check enrollment calendar_action generator
* Updated unit tests to account for participants
2019-02-12 06:26:23 +08:00
Eloy Lafuente (stronk7) 57ac26edae Merge branch 'MDL-64725-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-02-11 17:05:02 +01:00
Eloy Lafuente (stronk7) f05e71a443 Merge branch 'M3.5-MDL-64599' of https://github.com/marcusboon/moodle into MOODLE_35_STABLE 2019-02-11 12:51:20 +01:00
Eloy Lafuente (stronk7) 0cccbe18f2 Merge branch 'MDL-64385-35' of git://github.com/aanabit/moodle into MOODLE_35_STABLE 2019-02-11 12:35:43 +01:00
Sara Arjona 861b48d332 Merge branch 'MDL-64031-35' of https://github.com/lethevinh/moodle into MOODLE_35_STABLE 2019-02-11 12:33:21 +01:00
David Monllaó 5719590cb1 Merge branch 'MDL-64391_35' of git://github.com/vmdef/moodle into MOODLE_35_STABLE 2019-02-11 11:09:35 +01:00
Sara Arjona 571b22a693 Merge branch 'MDL-48338-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-02-11 10:41:31 +01:00
David Monllaó 603aaf66c4 Merge branch 'MDL-62666-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-02-11 09:49:00 +01:00
Tim Hunt 99f29e2580 MDL-64242 qtype_essay: more efficient query in restore code
Thanks to Juan Ibarra for the suggestion that lead to this fix.
2019-02-11 08:40:57 +00:00
Andrew Nicols 3ae9b14420 Merge branch 'MDL-64597-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-02-11 16:34:56 +08:00
Jun Pataleta 302a14d287 Merge branch 'MDL-64488-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-11 16:05:20 +08:00
Jun Pataleta 1e41439336 Merge branch 'MDL-64644_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2019-02-11 15:28:29 +08:00
Shamim Rezaie b8ddf80ca6 MDL-63134 mod_chat: Check if the module is visible to the user 2019-02-11 16:10:41 +11:00
Shamim Rezaie d2abeb3b3c MDL-63134 mod_chat: Add userid param to mod_chat calendar callbacks 2019-02-11 16:10:41 +11:00
AMOS bot fd0bbd3201 Automatically generated installer lang files 2019-02-10 00:10:24 +00:00
Adrian Perez ed73a073a3 MDL-64563 theme_boost: Add page site admin category name word-break 2019-02-09 20:17:03 +01:00
Luca Bösch 1084a0afe4 MDL-64606 templates: Show & instead of &amp; in url-select. 2019-02-08 13:21:45 +01:00
Jun Pataleta 43f894f2ba weekly release 3.5.4+ 2019-02-08 14:54:34 +08:00
Damyon Wiese 29086bc3b3 MDL-64806 theme_boost: Do not label "More" icon
The icon is next to the text that says the same thing. Hide it from screenreaders.
2019-02-08 09:37:42 +08:00
Jun Pataleta 395b1f8fe7 Merge branch 'MDL-63614_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-02-08 08:38:00 +08:00
Eloy Lafuente (stronk7) 1a20233e7f MDL-63614 tests: Perform attempt the old way
The functions being used here only are available for 36_STABLE and up,
so we switch to the old way of performing an attempt.
2019-02-08 00:13:34 +01:00
Eloy Lafuente (stronk7) 2a26069c13 Merge branch 'MDL-62680-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-07 10:22:39 +01:00
Anthony Ales 4e9c2677e5 MDL-48338 forum: Missing #unread in discussion post url
When a user user selects the unread messages link from the forum
discussion page, the link does not include '#unread' in the url.
This patch appends '#unread' to the url by changing the appropriate
value in the reference link assigned to $out within the function
forum_cm_info_view() of the 'lib.php'file.

A similar change is on the forum index.
2019-02-07 15:17:21 +08:00
Andrew Nicols 763c1bc6fb Merge branch 'MDL-64633-35' of https://github.com/ewallah/moodle into MOODLE_35_STABLE 2019-02-07 14:54:05 +08:00
Peter Eliyahu Kornfeld e5f929a854 MDL-60459 core_course: set default for 'visibleoncoursepage' 2019-02-07 10:54:25 +08:00
Damyon Wiese 78bb834249 MDL-62680 output: Only hide icons with no label
For accessibility we don't want to read an icon with a label immediately next to the label,
but in this case it's clearer for the icon to have no alt text / title for both
screen readers and non-screen readers. Worse is not reading important information just
because it's displayed as an icon.
2019-02-07 10:12:47 +08:00
Eloy Lafuente (stronk7) a4c9320fae Merge branch 'MDL-64577-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-02-07 00:47:14 +01:00
Eloy Lafuente (stronk7) c59ad632a2 Merge branch 'MDL-64551-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-02-06 23:44:57 +01:00
Eloy Lafuente (stronk7) ab2a6da0da Merge branch 'MDL-64469-35' of https://github.com/lethevinh/moodle into MOODLE_35_STABLE 2019-02-06 22:55:29 +01:00
Eloy Lafuente (stronk7) fb14b2aab7 Merge branch 'MDL-63372-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-02-06 18:58:26 +01:00
Eloy Lafuente (stronk7) cf775cb602 Merge branch 'MDL-63148-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-02-06 13:28:40 +01:00
Eloy Lafuente (stronk7) 0603a6db6d Merge branch 'MDL-63614_M35v1' of https://github.com/sbourget/moodle into MOODLE_35_STABLE 2019-02-06 13:20:01 +01:00
Mihail Geshoski 9fb8d55550 MDL-63417 lesson: Re-apply class variable to the question response 2019-02-06 15:02:34 +08:00
Jun Pataleta 9f19bb9dfb Merge branch 'MDL-61405-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-06 13:12:16 +08:00
Damyon Wiese 06e372a3c8 MDL-61405 assign: Multiple pdfs are expected
In the same page it is normal (expected) to have multiple links to different annotated pdfs.

In the grading page, we also abort pending ajax progress when the current user is changed.
2019-02-06 09:38:08 +08:00
Eloy Lafuente (stronk7) 2980c823f8 Merge branch 'MDL-63516-MOODLE_35_STABLE' of https://github.com/dmitriim/moodle into MOODLE_35_STABLE 2019-02-06 00:16:48 +01:00
Dmitrii Metelkin c025ce8af1 MDL-63516 groups: fix unexpected debugging message 2019-02-06 09:39:55 +11:00
Sara Arjona 3144a87a57 Merge branch 'MDL-62893_35' of https://github.com/mfabriczy/moodle into MOODLE_35_STABLE 2019-02-05 20:06:58 +01:00
Eloy Lafuente (stronk7) 07579a6bba Merge branch 'MDL-61441_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-02-05 13:09:12 +01:00
cescobedo 1210555318 MDL-64714 core_auth: Fix early break foreach in delete_data_for_user 2019-02-05 12:51:59 +01:00
Marcus Fabriczy 68bc7c4658 MDL-62893 mod: Grade visibility bug in the Outline/Complete reports
Grades that have been hidden will appear in the outline/complete
report - even if the user is a student.

The modules that have been fixed are:
* mod_assign
* mod_data
* mod_forum
* mod_glossary
* mod_lesson
* mod_scorm
* mod_workshop
2019-02-05 20:12:14 +10:30
Peter f0f73daeb9 MDL-64450 mod_lesson: Update the css for lesson forms
* Reduce the width for the mediaplugin when displayed in forms
* Correct the css to exclude mediaplugin when applying styles
2019-02-05 12:55:22 +08:00
Olivier Piton 46f6c0da7b MDL-61535 report_security: SQL Perf improvement 2019-02-05 01:44:29 +01:00
Eloy Lafuente (stronk7) b69c36612d Merge branch 'wip-MDL-64404-35' of https://github.com/Beedell/moodle into MOODLE_35_STABLE 2019-02-05 01:31:24 +01:00
Eloy Lafuente (stronk7) c2587d48ba Merge branch 'MDL-64649-35' of https://github.com/felicemcc/moodle into MOODLE_35_STABLE 2019-02-04 16:51:46 +01:00
Eloy Lafuente (stronk7) 9400329867 Merge branch 'MDL-63975-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-02-04 13:22:03 +01:00
Damyon Wiese 2486b50a7b MDL-62008 output: Help icon text is escaped
The argument to render the pix_icon template from the help_icon template should not
be escaped, they will be escaped by the pix_icon template when it generates the HTML.
2019-02-04 13:46:30 +08:00
Damyon Wiese ac3a49cd4a MDL-62465 assign: Allow grade scrolling
Remove the custom override that disables no-overflow in the grading table. This page is better to use
when the grading table is scrollable and the controls around it are not scrollable.
2019-02-04 11:40:37 +08:00
Damyon Wiese 9cf38a5d24 MDL-62465 grade: scrolling CSS
Grading pages have their own special javascript to force "fixed" headers
when scrolling a large table. They rely on the entire page being scrolled,
not just the main region.
2019-02-04 11:40:37 +08:00
Damyon Wiese 1b7a0a4d1a MDL-62465 CSS: scrolling tables
Tables displayed inside a flex box container need position:relative to
calculate their size or they cause incorrect scrollable regions to appear in the page.
2019-02-04 11:40:37 +08:00
Jun Pataleta d403ff368e MDL-64725 composer: Use lowercase for package name of dev dependencies 2019-02-04 09:36:53 +08:00
David Monllaó 541122f622 MDL-64694 report_insights: Remove unnecessary cell classes 2019-02-01 09:10:07 +01:00
Luca Bösch 960fef4854 MDL-64577 grade: style "Add ID numbers" button. 2019-02-01 07:08:18 +01:00
Luca Bösch 88e90e3a6b MDL-63372 theme_boost: leave bootstrap card-decks untouched. 2019-02-01 07:01:33 +01:00
David Monllao 16e46ae78b MDL-64500 tool_analytics: No invalid analysables message 2019-02-01 06:59:23 +01:00
Damyon Wiese db3008e2fa MDL-45151 assign: Add anonymous flag to events if blindmarking 2019-02-01 09:14:12 +08:00
Jun Pataleta 06c98804f8 weekly release 3.5.4+ 2019-02-01 08:57:10 +08:00
Jun Pataleta 8e85d900db Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-02-01 08:57:09 +08:00
Eloy Lafuente (stronk7) e25999cfeb Merge branch 'MDL-64737-35-attoprivacysql' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2019-01-31 22:46:46 +01:00
Sara Arjona a2740b43c5 MDL-62514 form: Add missing data-tags attribute
The data-tags=1 attribute was missing for the autocomplete forms
without suggestions.
2019-01-31 13:53:47 +01:00
David Mudrák b14eb813a0 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:18 +01:00
David Mudrák 7ed8b29579 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:18 +01:00
Felice Candilio 64d7b87888 MDL-64649 amd: Removing underscores from icons in [Roles/Groups] forms 2019-01-31 11:03:02 +01:00
Damyon Wiese 5944f26805 MDL-63975 assign: Fix error when there is no grader 2019-01-31 13:09:30 +08:00
Damyon Wiese 420daee391 MDL-64200 atto_media: Improve behat test
By setting the window size before the modal dialogs are opened, we will get
consistent behaviour when interacting with the modal.
2019-01-31 11:56:18 +08:00
Eloy Lafuente (stronk7) 2afeb308b6 Merge branch 'MDL-64320_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2019-01-31 00:30:17 +01:00
Eloy Lafuente (stronk7) eacb5e71d5 Merge branch 'MDL-64521_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-01-30 23:49:08 +01:00
Eloy Lafuente (stronk7) ad2ee11aae Merge branch 'MDL-62514-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-01-30 23:01:27 +01:00
Claude Vervoort be5dd33e4d MDL-64730 LTI Adv: do not ignore 0 score 2019-01-30 16:15:23 -05:00
Sara Arjona a16553fc55 Merge branch 'MDL-47247-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2019-01-30 14:03:27 +01:00
David Monllao a8159737cf MDL-64320 analytics: Validate discrete indicators separately 2019-01-30 12:11:40 +01:00
Andrew Nicols 88c0ab547b MDL-62514 behat: Inplace editable pendingjs wrapper 2019-01-30 08:26:31 +08:00
Andrew Nicols 9b71e8a8b0 MDL-62514 behat: Remove potentially conflicting names from description 2019-01-30 08:26:31 +08:00
Andrew Nicols 6c461125c5 MDL-62514 behat: Add additional autocomplete validation 2019-01-30 08:26:31 +08:00
Andrew Nicols e3138b870e MDL-62514 behat: Rewrite handling of autocomplete
This includes a minor restructure of the autocomplete JS to make use of
promises and improve tracking of pending JS.

In particular it improves the way in which throttled text input is
handled to ensure that the behat does not continue until:
- typing is fully complete; and
- all possible ajax requests have been sent; and
- all possible ajax requests complete; and
- the suggestions are updated.

A number of conditions existed where behat would move on to the next
step too early in a race condition effect between Behat and Autocomplete.
2019-01-30 08:26:31 +08:00
Andrew Nicols eb18ff3cf3 MDL-62514 behat: Add a wait_for_pending_js to form field 2019-01-30 08:26:31 +08:00
AMOS bot 8c435f5f42 Automatically generated installer lang files 2019-01-30 00:10:24 +00:00
Eloy Lafuente (stronk7) 75153c10e6 Merge branch 'MDL-64424-35-expiredfrontpage' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2019-01-29 23:48:45 +01:00
Eloy Lafuente (stronk7) 328aa06432 Merge branch 'MDL-64464_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-01-29 19:41:03 +01:00
Sara Arjona 64a588ccca Merge branch 'MDL-63168_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2019-01-29 13:01:10 +01:00
Sara Arjona 2844f968b0 Merge branch 'MDL-64313-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-29 12:35:49 +01:00
Sara Arjona 82e028d7bd Merge branch 'MDL-61623-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-29 11:20:34 +01:00
Damyon Wiese c14b0c9bcd MDL-61623 accessibility: Use role, not aria-role 2019-01-29 14:00:06 +08:00
Mihail Geshoski 7c815adea4 MDL-47247 mod_folder: Apply site config when showexpanded is not set 2019-01-29 08:59:05 +08:00
Sara Arjona a5fb32a623 Merge branch 'MDL-62668-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2019-01-28 19:43:34 +01:00
Binh Thai c0d4b3ba08 MDL-64291 GDPR export: Context paths can be very long, not unique 2019-01-28 20:04:35 +07:00
Sara Arjona 4a6403f068 Merge branch 'MDL-56604-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-28 13:33:07 +01:00
Sara Arjona 1e0cf52994 Merge branch 'MDL-63378-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-28 11:38:24 +01:00
Sara Arjona 6ad3397d69 Merge branch 'MDL-54804_35' of https://github.com/mfabriczy/moodle into MOODLE_35_STABLE 2019-01-28 10:21:52 +01:00
Garrett Boone 4fc6d79fa3 MDL-64640 feedback: Fix target link on deletion 2019-01-27 18:15:51 +08:00
Andrew Nicols cbf5a395a3 MDL-64640 usertours: Fix target link on deletion 2019-01-27 18:15:51 +08:00
Eloy Lafuente (stronk7) be521ca625 weekly release 3.5.4+ 2019-01-24 15:12:31 +01:00
Eloy Lafuente (stronk7) 16e61e37ac Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-01-24 15:12:28 +01:00
Shamim Rezaie e39f009680 MDL-52132 qbehaviour_manualgraded: no change when comment is left blank 2019-01-24 16:20:20 +08:00
Damyon Wiese be1f9cfba2 MDL-56604 assign: Group submission status
On the page listing all assignments for the course,
show the status of the group submission if teamsubmissions is enabled
for the assignment.
2019-01-24 14:34:47 +08:00
Jun Pataleta b895b8b74f MDL-64597 behat: Properly import behat_util when dropping parallel sites 2019-01-24 12:51:49 +08:00
Damyon Wiese 4777f33bbe MDL-64493 completion: Manual completion Ally
Do not use duplicate title attributes on buttons, use aria-live to force the correct state to be
read after clicking on a button.
2019-01-24 08:37:18 +08:00
Damyon Wiese 2f4185c8ba MDL-64488 output: User picture Ally
Do not include alt and title for a user picture if it is hidden from screen readers.

Use aria-hidden to properly hide the image from screen readers.
2019-01-24 08:32:16 +08:00
Eloy Lafuente (stronk7) 8eaffb287a Merge branch 'MDL-64240-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2019-01-24 00:57:03 +01:00
Eloy Lafuente (stronk7) 1f666f276e Merge branch 'MDL-62963-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-24 00:38:37 +01:00
Eloy Lafuente (stronk7) d7072f15e9 Merge branch 'MDL-64609-35' of git://github.com/merrill-oakland/moodle into MOODLE_35_STABLE 2019-01-23 18:05:46 +01:00
Mark Sharp cf1f48b322 MDL-64391 core_analytics: courseextendednamedisplay 2019-01-23 12:04:01 +00:00
David Mudrák 787991f1d4 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:11:36 +01:00
Mark Nelson b5a94c3e85 MDL-64644 completion: fixed assertions in privacy test 2019-01-23 17:31:17 +08:00
Mark Nelson 2e77251c8b MDL-64644 completion: set status correctly in provider 2019-01-23 17:31:17 +08:00
Mark Nelson 124c24eb0e MDL-64644 completion: ensure we return array for provider 2019-01-23 17:31:17 +08:00
Sara Arjona f958fafc60 Merge branch 'MDL-64107-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-23 10:22:32 +01:00
Sara Arjona 70a11e3daa Merge branch 'MDL-63628-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-23 08:25:19 +01:00
Mark Nelson 58a6e4bfe4 MDL-63168 core_message: added unit test 2019-01-23 13:24:17 +08:00
eWallah 6e81e436bf MDL-63168 core_message: fix failures in migrate_message_data task. 2019-01-23 13:24:17 +08:00
Eric Merrill 85fec2b605 MDL-64609 gradebook: Prevent infinite loop in regrading 2019-01-22 21:42:28 -05:00
Jake Dallimore b8360b3cfb Merge branch 'MDL-52132-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-01-23 09:21:36 +08:00
Eloy Lafuente (stronk7) 2baaed1860 Merge branch 'MDL-63870_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-01-23 00:09:47 +01:00
Eloy Lafuente (stronk7) b56666b99c Merge branch 'MDL-64465_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2019-01-23 00:02:07 +01:00
Eloy Lafuente (stronk7) 983ae52810 Merge branch 'MDL-64629-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2019-01-22 19:01:06 +01:00
Shamim Rezaie 2c6d5bf004 MDL-64521 groups: add more unit tests
These tests were created for MDL-64526, just before MDL-64521 came along
and removed the buggy code. These are good tests, so they are being
kept.
2019-01-22 16:43:38 +00:00
Tim Hunt 11cf3ecc56 MDL-64521 grouplib: reduce memory use in groups_get_all_groups
This avoids loading multiple copies of g.* when $withmembers is true
2019-01-22 16:43:36 +00:00
Sara Arjona 3ebff5cc76 Merge branch 'MDL-63480-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2019-01-22 15:19:14 +01:00
Justus Dieckmann 609203ada6 MDL-58256 group: prevents users to be added to a group twice 2019-01-22 13:05:34 +01:00
eWallah b50e1b2450 MDL-64633 behat: fix FormatterNotFoundException when updating steps. 2019-01-22 11:35:36 +01:00
Jun Pataleta 6649b4f560 MDL-63706 tool_task: Remove run_task_now.feature
This test cannot be run on Behat anymore as the "Run now" feature
depends on $CFG->pathtophp. Even if it's set, the task executed via
"Run now" will be executed for the installed site itself and not on the
Behat test site.

Backport of MDL-60514.
2019-01-22 17:14:21 +08:00
Toni Barberà Melià 365435182e MDL-63706 tasks: added new config parameter. changes in cron execution
Backport of MDL-60514.
2019-01-22 17:14:21 +08:00
Sara Arjona 279ec1f986 Merge branch 'MDL-64486-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-01-22 08:23:31 +01:00
Michael Hawkins b52735e2b4 MDL-63892 mod_forum: Updating lib unit test 2019-01-22 13:55:10 +08:00
Michael Hawkins ee95b9c319 MDL-63892 mod_forum: Fix last post details in forum view 2019-01-22 13:55:10 +08:00
Michael Hawkins 81e8a74a7b MDL-63892 mod_forum: Correction to timestamp added to edit strings 2019-01-22 13:55:10 +08:00
Peter 5a76a51e3a MDL-32096 core_report: Remove duplicate filters in reports
* Remove duplicate filters from activity completion and course completion report pages
2019-01-22 13:41:31 +08:00
Damyon Wiese 152e59f56d MDL-63628 accessibility: Trigger file links with keyboard 2019-01-22 08:41:01 +08:00
AMOS bot d41a75ffad Automatically generated installer lang files 2019-01-22 00:10:06 +00:00
David Mudrák f9d389f45b MDL-64553 message: Add index for the notifications.useridfrom field
The useridfrom would normally be a foreign key to the users table. But
it can also contain some extra negative values with special semantics
(-10 or -20 for no-reply or support user). Therefore we can't make it a
foreign key and the index must be created explicitly.
2019-01-21 13:31:17 +01:00
Jake Dallimore 284b7c820e Merge branch 'MDL-28445-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2019-01-21 15:59:10 +08:00
Jun Pataleta 6a09040e4d MDL-62666 course: Only set the groups setting to true when necessary
* Plus update the comment to be more descriptive.
2019-01-21 14:43:19 +08:00
Andrew Hancox 46bd72dc4f MDL-62666 course: Ignore restore_general_groups on activity duplication 2019-01-21 14:43:19 +08:00
Mihail Geshoski 1f3fd18541 MDL-63480 reports: Fix name filters in completion reports 2019-01-21 09:24:52 +08:00
Jake Dallimore 247b70b0de Merge branch 'MDL-60972-35_delete_section_files' of https://github.com/awagner/moodle into MOODLE_35_STABLE 2019-01-21 09:03:46 +08:00
Tim Hunt 61319327b1 MDL-64590 questions: wrong comments shown in the state history table 2019-01-18 18:06:58 +00:00
Sara Arjona 1237fe9140 MDL-64629 theme_clean: Remove underscore near the help icon 2019-01-18 14:33:06 +01:00
Sara Arjona e489ebbb0b Merge branch 'MDL-62968-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2019-01-18 12:40:07 +01:00
Amaia Anabitarte 15c3d7e208 MDL-64385 user: Case insensitive comparison for email domains 2019-01-18 10:12:18 +01:00
Marcus Boon c1aa2c28c2 MDL-64599 phpunit: Fix typo in arraydataset 2019-01-18 07:10:20 +10:00
Tim Hunt 901c95587f MDL-63870 quiz: new preview should abandon, not finish, current attempt 2019-01-17 17:55:41 +00:00
Eloy Lafuente (stronk7) b39f7194a8 weekly release 3.5.4+ 2019-01-17 17:47:58 +01:00
Andreas Wagner 9ebaea25f6 MDL-60972 core_course: delete section files, when section is deleted. 2019-01-17 08:18:34 +01:00
Peter a67284cb47 MDL-28445 mod_glossary: Use compound strings as opposed to anglicised
* Use compound strings on buttons to help with proper translations
* Updated behat tests
2019-01-17 10:59:13 +08:00
Eloy Lafuente (stronk7) f14ed54861 Merge branch 'MDL-63103-m35' of https://github.com/NeillM/moodle into MOODLE_35_STABLE 2019-01-16 19:02:36 +01:00
Sara Arjona e618ee9fb5 Merge branch 'MDL-63916-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-16 15:33:57 +01:00
Eloy Lafuente (stronk7) b4ce080632 Merge branch 'MDL-63607-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-01-16 00:37:21 +01:00
Sara Arjona a660a74f7a Merge branch 'MDL-64346-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2019-01-15 15:38:40 +01:00
Adrian Greeve 017578d64f MDL-64346 mod_resource: Fix problems with # in file name. 2019-01-15 14:30:35 +01:00
Sara Arjona e37c1f7ed0 Merge branch 'MDL-62439-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-01-15 12:02:37 +01:00
Sara Arjona 57768467dc Merge branch 'MDL-63881-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2019-01-15 11:39:26 +01:00
Andrew Nicols b562767744 MDL-52132 core_question: Comment is different if format has changed 2019-01-15 18:57:42 +11:00
Shamim Rezaie 95f2f79218 MDL-52132 qbehaviour_manualgraded: unit test for changing comment format 2019-01-15 18:57:41 +11:00
Eloy Lafuente (stronk7) 021143d5cc Merge branch 'MDL-63677-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2019-01-14 23:04:07 +01:00
Sara Arjona fcd19e1faf Merge branch 'MDL-60082-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-14 12:28:30 +01:00
Shamim Rezaie c9d4bb2d53 MDL-64551 core_question: Fix double ampersand escaping in tag button 2019-01-14 18:24:12 +11:00
Eloy Lafuente (stronk7) 4c6ae316d8 Moodle release 3.5.4 2019-01-12 13:25:56 +01:00
Tim Hunt 8b1bf65b22 MDL-64465 qtypes: fix incorrect context passed to format_string 2019-01-11 10:52:49 +00:00
Tim Hunt 6f60c7a6f2 MDL-64464 drag-drop qtypes: allow <span lang=".."> id draggables
This is for accessibility, so that screen readers can read the drag
items with correct pronunciation.
2019-01-11 10:52:34 +00:00
Tim Hunt 8c6a45020e MDL-61441 accesslib: get_users_by_capability groups perf improvement 2019-01-11 10:52:17 +00:00
Sara Arjona 38f65afecf MDL-63677 core_user: Avoid redirection during signup
Purge cache just for the current user to avoid redirection when 2
simultaneous users try to sign up at the same time and some policy
has to be agreed.
The 'createduser' invalidation event has been removed also because
is not used any more.
Thanks John Azinheira for spotting it!
2019-01-11 10:26:14 +01:00
Neill Magill cd05eba738 MDL-63103 filebrowser: Speed up finding activities with files
Before this change the query examined at every course_module record in
the context table.

With this change we use the course_modules table to more efficiently
find all the activities in the course, which means that many less
records in the context table need to be examined.
2019-01-11 09:06:06 +00:00
VinhLe 4b1a578e2e MDL-64469 Question bank: Change link questions in category question.
Make it easier to navigate from the category list to the questions in a category.
2019-01-11 11:31:11 +07:00
VinhLe 22497d9d74 MDL-64031 enrol_manual: Fix hard-coded list of user fields
Respect get_extra_user_fields() in PHP code
2019-01-11 11:25:43 +07:00
Luca Bösch 1e90a547e9 MDL-63881 tool_dataprivacy: 'Contact the privacy officer' profile link. 2019-01-10 22:15:35 +01:00
Luca Bösch e2e9df59d7 MDL-62439 output: Debugstringids in overlay windows. 2019-01-10 22:15:06 +01:00
Sara Arjona 609b020512 weekly release 3.5.3+ 2019-01-10 17:51:28 +01:00
Sara Arjona da5d00f2b2 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2019-01-10 17:51:26 +01:00
Jake Dallimore 765c99d4d9 Merge branch 'MDL-64004-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-10 11:00:43 +08:00
AMOS bot 4b04cbdbab Automatically generated installer lang files 2019-01-10 00:08:50 +00:00
Marcus Fabriczy 88d5dbb63f MDL-54804 templates: Prevent posting when no option is selected
When no value is set for an option element and a user selects it, a
POST request is made, which is incorrect. Usually that option is a
placeholder value, e.g., "Choose..." - the form expecting the end user
to choose an actual value.
2019-01-10 09:05:29 +10:30
Eloy Lafuente (stronk7) 4412db99fc Merge branch 'MDL-63686-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-01-09 12:36:47 +01:00
Andrew Nicols ef227b403e MDL-63686 core: recordset => records when fetching contexts 2019-01-09 19:08:08 +08:00
Jake Dallimore 96457d1739 Merge branch 'MDL-64375-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-09 15:34:06 +08:00
Damyon Wiese e293c3deb3 MDL-62143 accessibility: Label breadcrumbs 2019-01-09 15:18:42 +08:00
Andrew Nicols 26f70e8f28 Merge branch 'MDL-62550-35-2' of https://github.com/snake/moodle into MOODLE_35_STABLE 2019-01-09 15:13:27 +08:00
Jake Dallimore 3fdd140150 Merge branch 'MDL-64345-35' of https://github.com/s-cenni/MDL-64345 into MOODLE_35_STABLE 2019-01-09 14:15:05 +08:00
Jake Dallimore 29cb950320 MDL-62550 core_theme: remove unused #fgroup_ and #fitem_ rules
These ids didn't exists in form elements in Boost until now, so we'll
remove the rules to prevent them having any effect now.
2019-01-09 11:27:40 +08:00
Jake Dallimore ac25e4ace6 MDL-62550 core_form: bring back the form item unique ids to fix js fails
This id matches the id seen on the clean theme elements and is needed by
the forms js.
2019-01-09 11:27:38 +08:00
Jake Dallimore c00f5586f3 Merge branch 'MDL-63761-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2019-01-09 09:07:56 +08:00
Eloy Lafuente (stronk7) 821a753844 Merge branch 'MDL-64285-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2019-01-09 00:03:47 +01:00
Andrew Nicols 3cd69fd335 Merge branch 'MDL-24951_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-01-09 06:45:00 +08:00
Eloy Lafuente (stronk7) 67d77a2456 MDL-24951 mod_forum: Apply new string to related scenarios
Plus amend an scenario name that was clearly incorrect.
2019-01-08 16:48:25 +01:00
Michael Hawkins 9ca8ccbefc MDL-64395 groups: Added XSS Risk to the manage groups capability 2019-01-08 16:21:48 +01:00
Michael Hawkins 4166d28e1f MDL-64372 userpix: Escape fullname string on userpix index page 2019-01-08 16:21:48 +01:00
Sara Arjona 57e3305b41 MDL-64222 badge: Removed backpackurl from the edit_form 2019-01-08 16:21:48 +01:00
Eloy Lafuente (stronk7) 80f46ee1c0 Merge branch 'MDL-64509-35-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2019-01-08 16:19:56 +01:00
Andrew Nicols 7d837832e5 Merge branch 'MDL-58596-35' of git://github.com/vmdef/moodle into MOODLE_35_STABLE 2019-01-08 16:16:15 +08:00
Leon Stringer 43246bd859 MDL-58596 core_stats: fixed infinite loop cause by DST change 2019-01-08 08:09:38 +00:00
Jake Dallimore 29e7974006 Merge branch 'MDL-63686-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2019-01-08 14:38:31 +08:00
Andrew Nicols 7c512ad12f Merge branch 'MDL-24951-35' of git://github.com/Chocolate-lightning/moodle into MOODLE_35_STABLE 2019-01-08 14:20:25 +08:00
Andrew Nicols 5b01d6249b MDL-63686 core: Preload parent contexts 2019-01-08 14:12:27 +08:00
Andrew Nicols a36f9d20ed Merge branch 'MDL-64497-m35' of https://github.com/sammarshallou/moodle into MOODLE_35_STABLE 2019-01-08 12:29:16 +08:00
Andrew Nicols 68da8600b7 Merge branch 'MDL-64400-35' of git://github.com/aanabit/moodle into MOODLE_35_STABLE 2019-01-08 08:32:16 +08:00
Andrew Nicols b366722a14 Merge branch 'MDL-63276_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2019-01-08 06:56:29 +08:00
Eloy Lafuente (stronk7) 712fc8341c Merge branch 'MDL-63809-35-5' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2019-01-07 22:13:40 +01:00
Helen Foster ed72175e45 MDL-64509 lang: Import fixed English strings (en_fix) 2019-01-07 20:21:09 +01:00
Andrew Nicols 042748a342 Merge branch 'MDL-57636_m35' of https://github.com/dasistwas/moodle into MOODLE_35_STABLE 2019-01-07 13:48:32 +08:00
David Bogner 98125d376a MDL-57636 frontpage: Fix display enrolled courses 2019-01-04 10:56:24 +01:00
Damyon Wiese aa3c3bd353 MDL-64375 gradingform_rubric: Styles for overflow
Allow people to define lots of levels, and make the scroll region just the rubric table,
not the entire content region.
2019-01-04 08:44:41 +08:00
sam marshall 02fab5539c MDL-64497 GDPR: moodle_content_writer can cause endless loop
Fixes a buggy function by replacing it with a call to file_get_contents,
and adds error detection on a couple of file accesses.
2019-01-03 17:04:13 +00:00
Jake Dallimore a32a22f07f Merge branch 'MDL-49651-35' of git://github.com/Chocolate-lightning/moodle into MOODLE_35_STABLE 2019-01-03 10:50:01 +08:00
Peter f8be708257 MDL-64486 mod_glossary: Add missing separator for special links 2019-01-03 08:39:46 +08:00
Eloy Lafuente (stronk7) 2e8f29095f MDL-63276 environment: PHP 7.1 and Moodle 3.2 required 2019-01-03 01:18:54 +01:00
Eloy Lafuente (stronk7) 56ce8d00da 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:18:54 +01:00
Peter 40bf3feacd MDL-63148 mod_scorm: Accept userid param in event action
* Update lib scorm functions to accept and use a passed in userid
* Additional phpunit tests
2019-01-02 14:36:20 +08:00
Michael Hawkins 3691ff2f40 MDL-62968 Boost: Adding editor SCSS support 2019-01-02 14:21:24 +08:00
Damyon Wiese fdfa0d497f MDL-63761 grade: Performance fix for regrading
Don't use a separate variable to count the number of items in finalids.
2019-01-02 10:25:08 +08:00
Amaia Anabitarte ecb4b0260e MDL-64400 core_messages: Mark notifications sent via email as read 2018-12-27 09:32:25 +01:00
Amaia Anabitarte da73f1364d MDL-64400 core_messages: Allow cron to delete unread notifications too 2018-12-27 09:32:25 +01:00
Mathew 3430f5252a 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.
2018-12-24 09:34:47 +08:00
Mathew 2f56e8a287 MDL-24951 mod_forum: Check user capability to know what message to show.
If the user has the following capabilty: mod/forum:canposttomygroups then show them
the more technical of the strings. Otherwise we use something a bit easier for them to ask their
tutor or teacher about.
2018-12-24 09:13:36 +08:00
Víctor Déniz Falcón 566978d358 MDL-58596 core_stats: unit test for stats_get_base_weekly 2018-12-20 13:54:46 +00:00
Adrian Greeve 79d87ad683 weekly release 3.5.3+ 2018-12-20 11:09:14 +01:00
Adrian Greeve f4b78030ae Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-12-20 11:09:13 +01:00
Andrew Nicols 97eac5487e Merge branch 'MDL-63512-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2018-12-20 13:04:22 +08:00
Peter f5065aad46 MDL-63512 mod_lesson: Update the lesson css to exclude mediaplugin div 2018-12-20 12:50:53 +08:00
Peter b5cc9d4e96 MDL-63512 mod_lesson: Fix video links provided in feedback 2018-12-20 12:50:53 +08:00
Stephen Bourget 29d25b33a5 MDL-63614 badges: Add COMPLETION_FAIL support to badge criteria 2018-12-19 10:31:28 -05:00
Adrian Greeve 5f2edc4df7 Merge branch 'MDL-64392-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-12-19 12:06:05 +01:00
Adrian Greeve 5900a79aca MDL-59954 course: Remove unused global. 2018-12-19 10:40:06 +01:00
Peter 18d086a8a4 MDL-59954 mod_course: Remove file size restriction on D&D on course page
Remove file size restrictions for teachers on course page.
Use user_max_upload_file_size instead of the max_file_size
2018-12-19 10:37:08 +01:00
Jake Dallimore cb14d331fe Merge branch 'MDL-64216-m35' of https://github.com/micaherne/moodle into MOODLE_35_STABLE 2018-12-19 11:08:35 +08:00
Andrew Nicols 56ec2b0949 Merge branch 'MDL-63512-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2018-12-19 10:01:00 +08:00
AMOS bot d8aba89429 Automatically generated installer lang files 2018-12-19 00:09:13 +00:00
Adrian Greeve 4632b4a151 Merge branch 'MDL-64025-35' of https://github.com/christianwolters/moodle into MOODLE_35_STABLE 2018-12-18 16:01:48 +01:00
Michael Hawkins 9d046294fb MDL-64240 mod_forum: Clean forum post text before storing
Previously only edited messages were cleaned, so longer strings could
be stored in the database, which would never be displayed.
This update takes into account trusted text before cleaning (as editing does).
2018-12-18 15:10:21 +08:00
Michael Hawkins 968c6115dc MDL-64240 mod_forum: Update word count to use current message length
Previously this used the length of the message stored in the database,
before scripts etc are cleaned to display the content. That resulted
in cases where the count would seem much larger than the message size.
2018-12-18 15:10:16 +08:00
Shamim Rezaie e4eb5170a1 MDL-63809 question: handling bad questions in question_has_capability_on 2018-12-18 15:44:36 +11:00
Tim Hunt 1340c03ba6 MDL-63809 question bank: ensure question_has_capability_on can be called 2018-12-18 15:44:36 +11:00
Damyon Wiese 16668320a6 MDL-60082 assign: Grading worksheet with no grade
If the grade type is NONE - do not include the maxgrade column.
2018-12-18 11:14:19 +08:00
Damyon Wiese a912d44652 MDL-64004 webservice: Do not update accesstime
Do not update the automatically update the course access time when a
course is accessed via a webservice or ajax.
2018-12-18 09:08:20 +08:00
John Beedell dfce9c02d2 MDL-64404 qtype: gapselect currency like options dont show 2018-12-17 12:15:39 +00:00
Sara Cenni 9ffc3296cc MDL-64345 core: Make FB logo upgrade cross-DB compatible 2018-12-17 11:33:50 +01:00
Eloy Lafuente (stronk7) 7650dbcaae MDL-63891 assignfeedback_editpdf: add missing UK to install.xml
Backport of MDL-57610.
2018-12-17 11:22:18 +01:00
Adam Olley 4015cb2d05 MDL-63891 assignfeedback_editpdf: integration cleanup
* Add a note to upgrade.php to notify devs/admins of the new setting.
* Replace update_record with set_field.
* Add missing phpdoc.

Backport of MDL-57610.
2018-12-17 11:22:17 +01:00
Adam Olley b1aac17d18 MDL-63891 assignfeedback_editpdf: Add test coverage for conversion task
Without this, we have no coverage of the convert_submissions task. This test
validates it both works normally, and that it also skips queued items that have
exceeded the conversion attempt limit introduced in this improvement.

Backport of MDL-57610.
2018-12-17 11:21:38 +01:00
Adam Olley de341c20d4 MDL-63891 assignfeedback_editpdf: remove queued jobs that keep failing
Without this, its possible to get a document in the editpdf conversion queue
that keeps failing - and in some cases completely crashing the PHP script
despite exception handling - which ends up blocking the processing of the queue
entirely.

This change allows for a configurable number of attempts the conversion
task will perform before removing the item from the queue.

Backport of MDL-57610.
2018-12-17 11:21:38 +01:00
Jun Pataleta 5156ced934 Merge branch 'MDL-59629-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2018-12-17 15:56:04 +08:00
Damyon Wiese 512044f0c9 MDL-62963 boost: Increase contrast btn-secondary
The background colour of these buttons is too light, so they don't look like buttons.
2018-12-17 15:49:45 +08:00
Tomasz Muras 9d8470e4b8 MDL-52966 core: static cache fix for file types. 2018-12-17 15:40:54 +08:00
Andrew Nicols 613d4f9e6d Merge branch 'MDL-61633-35' of https://github.com/lucisgit/moodle into MOODLE_35_STABLE 2018-12-17 15:29:40 +08:00
Andrew Nicols fc28257e09 Merge branch 'MDL-60518-35' of git://github.com/aanabit/moodle into MOODLE_35_STABLE 2018-12-17 14:59:59 +08:00
Jun Pataleta 672905cb4f Merge branch 'MDL-63260_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-12-17 14:10:02 +08:00
Damyon Wiese 1aaa130376 MDL-63378 theme_boost: Contrast of menu items
Enforce the :active menu text colour during a mouse click on an action menu.
2018-12-17 14:07:18 +08:00
Damyon Wiese ee38a8d1e4 MDL-64107 questions: Increase highlight contrast
When a question has just been edited, it is highlighted. We need to ensure
the colour contrast of text on background is accessible.
2018-12-17 12:36:03 +08:00
Jake Dallimore 084dadaa86 Merge branch 'MDL-62756' of https://github.com/miotto/moodle into MOODLE_35_STABLE 2018-12-17 11:25:20 +08:00
Christian Wolters 790c306bf7 MDL-64025 admin_bookmarks: Enable bookmarking of admin categories 2018-12-16 15:49:56 +01:00
Bas Brands 16db1b8083 MDL-64392 core_question: flexbox compatible separator for question types
* the br tag does not work well in a flexbox context, a 100% with div
works in both clean and boost.
2018-12-14 16:31:18 +01:00
Amaia Anabitarte f91e884d68 MDL-60518 core_competency: Set $USER global variable for tests 2018-12-14 10:27:41 +01:00
Frédéric Massart 7dcc1e721c MDL-60518 core_user: A user with ID 0 is never a real user 2018-12-14 10:27:41 +01:00
Mirko Otto f32c2f7c47 MDL-62756 form: Remove any click handler first.
The handler has the old state variable. Remove any click handler first.
2018-12-14 10:22:11 +01:00
Jun Pataleta 808e7c80dc 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-14 11:22:07 +08:00
Peter bb13181338 MDL-59629 mod_block: Set the default region in add_region
Check and update default region in add_region if none set.
2018-12-14 10:29:55 +08:00
Peter f13544412e MDL-63512 mod_lesson: Fix video links provided in feedback 2018-12-14 10:27:12 +08:00
Jake Dallimore c8b4ee45a4 weekly release 3.5.3+ 2018-12-14 07:51:44 +08:00
Tony Butler 773e24cad4 MDL-61633 assignfeedback_editpdf: Scroll back to top when changing pages 2018-12-13 12:21:07 +00:00
Jake Dallimore 86eb5bb7e2 Merge branch 'MDL-62624-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-12-12 16:14:04 +08:00
Damyon Wiese 55a1e8b719 MDL-63916 backup: Do not display timestamp
Convert the date+time field to a userdate for display.
2018-12-12 12:20:18 +08:00
Jun Pataleta 76570e405a Merge branch 'MDL-41507-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-12-12 11:17:05 +08:00
Shamim Rezaie eeb374e2e6 MDL-41507 core_group: Consistent default value for FEATURE_GROUPS 2018-12-12 14:05:01 +11:00
Jake Dallimore b4999d92d9 MDL-63887 auth_ldap: fix unclean exit from sync when users not found
We should return, not exit, and we should clean up before we do.
2018-12-12 09:43:51 +08:00
Jake Dallimore 113c94cf9a Merge branch 'MDL-63887_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-12-12 09:43:45 +08:00
Jake Dallimore 583799d5b9 Merge branch 'MDL-63150-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2018-12-12 08:32:55 +08:00
Jake Dallimore 7f0903200f Merge branch 'MDL-63145-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2018-12-12 08:30:20 +08:00
Jake Dallimore 061db30ef7 Merge branch 'MDL-63147-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2018-12-12 08:25:43 +08:00
Peter 91ef3d2e40 MDL-63145 mod_page: Accept userid param as override
Accept a userid as an override in the lib function instead of
relying on $USER
2018-12-12 07:31:59 +08:00
Peter 07baf8e940 MDL-63150 mod_url: Accept a userid override in event action
Accept a userid in the event action instead of depending on $USER
2018-12-12 07:18:28 +08:00
Peter 5362c6f185 MDL-63147 mod_resource: Accept userid in resource event_action 2018-12-12 07:08:13 +08:00
Tim Hunt 2a0ee3647f MDL-63260 qtype_random: orphaned random questions should be deleted
This fix is based on some original code written by Bo Pierce.
2018-12-11 14:09:22 +00:00
Jake Dallimore 2496dc283c Merge branch 'MDL-64357_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-12-11 17:45:16 +08:00
Jake Dallimore 5b10127f11 Merge branch 'MDL-63485_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-12-11 17:30:10 +08:00
Mark Nelson 551975b2ac MDL-64357 ltiservice_gradebookservices: updated unit tests 2018-12-11 17:03:26 +08:00
Claude Vervoort 111998407c MDL-64357 ltiservice_gradebookservices: fix cleanup deleting lineitems 2018-12-11 17:03:26 +08:00
Damyon Wiese 7afbae7e1a MDL-64313 assign: feedback viewed event
When a student views their submission, if it has feedback create an event.
2018-12-11 14:07:23 +08:00
Jake Dallimore 7fc84f65de Merge branch 'MDL-62922-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-12-11 12:50:58 +08:00
Jun Pataleta 6cc427e025 Merge branch 'MDL-64280-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-12-11 09:53:20 +08:00
Luca Bösch 1188a6e41b MDL-64280 core_outcome: Add/remove outcome buttons style. 2018-12-10 17:56:03 +01:00
Sara Arjona 9cfb533e2d MDL-63485 core_user: Allow filtering by No groups on participants page
A new optional parameter $context has been added to the
core_group::groups_get_members_join() function.
Besides, some core_group methods now accept -1 (USERSWITHOUTHGROUP) for
the groupid field.

Backport of MDL-61967.
2018-12-10 20:29:04 +08:00
Jun Pataleta 2203bf4ad4 Merge branch 'MDL-62061-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-12-10 14:46:30 +08:00
Mihail Geshoski 82f74c8e2b MDL-62624 lesson: Fix alignment in matching questions in boost 2018-12-10 13:47:48 +08:00
Jake Dallimore 2fbae51df0 weekly release 3.5.3+ 2018-12-10 08:10:18 +08:00
Jake Dallimore f087b00ea6 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-12-10 08:10:17 +08:00
AMOS bot 1bfa3f5697 Automatically generated installer lang files 2018-12-07 00:09:32 +00:00
Adrian Greeve 3692fe595c MDL-62061 core_privacy: Stop directories being created.
This stops directories being created in the root directory
while running unit tests.
2018-12-06 11:39:01 +01:00
papillon326 10097b1b61 MDL-63887 auth_ldap: avoid infinite loop when search limit is reached 2018-12-06 15:40:47 +08:00
papillon326 4c7af8f17b MDL-63887 auth_ldap: changed variable names to be conform to core 2018-12-06 15:40:47 +08:00
Jun Pataleta 864374faf2 Merge branch 'MDL-64283-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-12-06 14:57:25 +08:00
Jake Dallimore f6b4c923ec Merge branch 'MDL-63710-MOODLE_35' of https://github.com/ilya-catalyst/moodle into MOODLE_35_STABLE 2018-12-06 11:45:04 +08:00
Jake Dallimore a702f2b935 Merge branch 'MDL-46783_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-12-06 10:23:50 +08:00
Ilya Tregubov daa7d65f34 MDL-63710 repository: Delete orphaned file records. 2018-12-06 12:38:25 +11:00
Jun Pataleta b7e4fbb246 Merge branch 'MOODLE_35_STABLE-MDL-64290-imscc-restore-temp-dir' of https://github.com/mspall/moodle into MOODLE_35_STABLE 2018-12-06 08:56:44 +08:00
AMOS bot 4745892272 Automatically generated installer lang files 2018-12-06 00:08:01 +00:00
Michael Spall 559759aa4a MDL-64290 backup imscc: Use correct tempdir for imscc restore
Use configured temp directory $CFG->tempdir instead of hard coded
$CFG->dataroot . '/temp/backup/'
Remove unused variable, $CFG
2018-12-05 11:05:44 -07:00
Tim Hunt edb89914d8 MDL-46783 accesslib: tests for MDL-63818
MDL-46783 and MDL-63818 were originally coded on the
assumption that MDL-46783 would get integrated first. However it wasn't.
Therefore, it was not easy to add unit tests for MDL-63818
at the time, but it is now, so here they are.
2018-12-05 16:41:42 +00:00
Jun Pataleta c2e3ca2f6c MDL-62922 core_user: Check auth mechanism before validating password
* External authentication mechanisms (e.g. via oauth2, etc.) don't store
  password in the user table, so we shouldn't be requiring password in
  such case when creating users via the core_user_create_users WS
  function.
2018-12-05 15:33:33 +08:00
Jake Dallimore c758547bd7 Merge branch 'MDL-64198-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-12-05 14:31:02 +08:00
Damyon Wiese f20b808629 Merge branch 'MDL-60267-35' of https://github.com/rogerbaba/moodle into MOODLE_35_STABLE 2018-12-05 12:56:48 +08:00
Tim Hunt 6a58779607 MDL-46783 permissions: let some moodle/ caps be overriden in all mods
The capabilities changed ('contextlevel' => CONTEXT_COURSE changed to
'contextlevel' => CONTEXT_MODULE) are:

* moodle/site:accessallgroups
* moodle/site:viewfullnames
* moodle/site:trustcontent
* moodle/site:viewuseridentity

This list came from reviewing the _get_extra_capabilities functions in
all core activities. They were all somewhat inconsistent, but I think it
makes sense that these capabilities are consistently overridable in all
activities. E.g. moodle/site:accessallgroups affects conditional
availability even if there is no other user of groups, and
moodle/site:viewuseridentity and moodle/site:viewfullnames affect the
logs report, if nothing else.

As a result of this, several _get_extra_capabilities functions are no
longer needed, and all the rest have been simplified.
2018-12-04 18:01:29 +00:00
Michael Aherne 83c4b6d01e MDL-64216 privacy: Split query to use indexes. 2018-12-04 15:07:40 +00:00
Luca Bösch 7c72db7d7e MDL-64198 course: set formatted modulename for togglecompletion js. 2018-12-04 14:32:09 +01:00
Eloy Lafuente (stronk7) 3aca528730 weekly release 3.5.3+ 2018-12-04 13:06:05 +01:00
Jun Pataleta 0dc3fbf069 Merge branch 'MDL-64206_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-12-04 10:49:43 +08:00
Damyon Wiese c5dab021db Merge branch 'MDL-64286_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-12-03 15:40:47 +08:00
Jake Dallimore a08ecb70f0 Merge branch 'MDL-63459_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-12-03 14:26:29 +08:00
Mark Nelson d5901aa09c MDL-64206 core: updated FB logo URL 2018-12-03 12:26:28 +08:00
Eloy Lafuente (stronk7) 394c5ae9b8 weekly release 3.5.3+ 2018-11-30 18:02:10 +01:00
Eloy Lafuente (stronk7) 79bfd75d15 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-11-30 18:02:08 +01:00
Tim Hunt 35e9c7202e MDL-64286 qtype_gapselect: removed unneeded line of code
The extended Behat test show the qtype works fine without it.
2018-11-30 12:36:06 +00:00
Jun Pataleta 4ff43a278b Merge branch 'MDL-64214-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-11-30 09:45:00 +08:00
Damyon Wiese 9485649edd MDL-64283 competency: Correct numbering in tests 2018-11-30 09:38:23 +08:00
Jun Pataleta 673340157a MDL-64214 calendar: Populate the groups select box on page load 2018-11-30 09:26:25 +08:00
Simey Lameze c6dd258bfd MDL-64214 calendar: fix failing unit tests 2018-11-30 09:26:25 +08:00
Simey Lameze f4a61ac99a MDL-64214 core_calendar: fix event types form element handling 2018-11-30 09:26:25 +08:00
AMOS bot df367e966a Automatically generated installer lang files 2018-11-30 00:07:41 +00:00
AMOS bot 276097e0d7 Automatically generated installer lang files 2018-11-29 00:08:25 +00:00
David Monllao b64e7253b2 weekly release 3.5.3+ 2018-11-28 11:23:14 +01:00
Jun Pataleta 02b46dd142 Merge branch 'MDL-64223-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-11-28 13:59:35 +08:00
Jake Dallimore ce2684efd9 MDL-64223 libraries: PHP7.1 compatibility fixes for Jabber lib 2018-11-28 09:58:58 +08:00
Eloy Lafuente (stronk7) 23c05fe9ce Merge branch 'MDL-64220-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-11-27 16:44:25 +01:00
Andrew Nicols 944d0fd395 Merge branch 'MDL-64161-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-11-27 15:17:28 +08:00
Adrian Greeve fa2a738f80 MDL-64161 gradereport_singleview: Single updates reported correctly.
If there is an error with the update of individual entries this is
also correctly displayed as not being updated.
2018-11-27 15:04:27 +08:00
Damyon Wiese 35bc9f8bb2 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:44 +08:00
Jun Pataleta 2e36915e1f Merge branch 'MDL-64181-35-fix' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-27 14:49:22 +08:00
Andrew Nicols aad94d9332 MDL-64181 core: Ensure that self is included in parentage 2018-11-27 14:47:34 +08:00
Jun Pataleta 96c3b2042e Merge branch 'MDL-64181-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-11-27 11:45:09 +08:00
Andrew Nicols c7390b1c4f Merge branch 'MDL-64161-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-11-27 11:37:22 +08:00
Damyon Wiese 60b951eca5 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:45:15 +08:00
David Monllao 89d45109aa Merge branch 'MDL-64205-35-sarunconfirmeduser' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-11-26 15:47:53 +01:00
David Mudrák 690e03bfea 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:17:55 +01:00
Tim Hunt 37438b2a00 MDL-63459 qtype_calculatedmulti: fix incorrect hint object type 2018-11-26 12:55:15 +00:00
Tim Hunt 89e3b8aa80 MDL-63459 qtype_calculatedmulti: unit test should test this qtype
This also demonstrates the bug to be fixed
2018-11-26 12:55:12 +00:00
Adrian Greeve b87ad367d9 MDL-64161 gradereport_singleview: Behat test for out of bounds grade. 2018-11-26 11:46:06 +08:00
Adrian Greeve 27cfbf2986 MDL-64161 gradereport_singleview: Stop updating grades with errors. 2018-11-26 11:45:55 +08:00
David Mudrák 8575b451c4 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:21:59 +01:00
Eloy Lafuente (stronk7) e3a1c26bd7 Merge branch 'MDL-64186-35-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-11-24 00:27:14 +01:00
Eloy Lafuente (stronk7) 51b022db9b weekly release 3.5.3+ 2018-11-23 16:36:48 +01:00
Eloy Lafuente (stronk7) 33a95ab889 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-11-23 16:36:46 +01:00
Helen Foster a6a0cc37ed MDL-64186 lang: Import fixed English strings (en_fix) 2018-11-23 14:46:51 +01:00
Jun Pataleta e452305994 Merge branch 'MDL-64030-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-23 11:15:07 +08:00
AMOS bot 135a5df634 Automatically generated installer lang files 2018-11-23 00:07:32 +00:00
Andrew Nicols b78c5102ac MDL-64030 tool_dataprivacy: Process requests when system purpose not set 2018-11-23 07:54:20 +08:00
Eloy Lafuente (stronk7) b9c412be9f Merge branch 'MDL-62988_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-11-22 23:16:06 +01:00
Jun Pataleta 01eeab4ed2 Merge branch 'MDL-64119-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-11-22 20:31:45 +08:00
Sara Arjona 30f7f010a9 MDL-64119 output: Use context of renderer_base's page object 2018-11-22 20:31:04 +08:00
Eloy Lafuente (stronk7) f8c43813de Merge branch 'MDL-63571-35-fix' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-11-22 10:35:13 +01:00
Jun Pataleta e92bb861d4 MDL-63571 grade_report_grader: Use correct context for capability check 2018-11-22 16:20:22 +08:00
Jun Pataleta 83a6d7a194 MDL-63571 grade_report_grader: Set correct type for the context variable 2018-11-22 16:20:22 +08:00
Cory Buecker 0a39efd896 MDL-62988 LTI provider: fix missing info. for LTI 2.X tool provider
Fixes missing capabilities (user information) when membership service is called
from a LTI 2.X tool provider.
2018-11-22 12:27:07 +08:00
Jun Pataleta bfc740821b Merge branch 'MDL-64119-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2018-11-22 09:52:24 +08:00
Eloy Lafuente (stronk7) 9112915855 Merge branch 'MDL-63920-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-11-21 16:48:00 +01:00
Eloy Lafuente (stronk7) a6ff7933a1 Merge branch 'MDL-63798_assign_restore_groups_35' of git://github.com/davosmith/moodle into MOODLE_35_STABLE 2018-11-21 16:09:09 +01:00
Davo Smith e35c7c2c50 MDL-63798 mod_assign: fix restore when group is missing 2018-11-21 08:02:47 +00:00
David Monllao d699efb4ba Merge branch 'MDL-64063-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-11-21 06:28:46 +01:00
Adrian Greeve 0073588e27 MDL-64063 core_calendar: Unit test for suspended users. 2018-11-21 09:55:08 +08:00
Adrian Greeve 80cf67eaba MDL-64063 core_calendar: events by time considers enrolment status. 2018-11-21 09:54:58 +08:00
Víctor Déniz Falcón a23caa49b9 MDL-64077 block_site_main: modify style to fix layout in boost theme 2018-11-21 09:03:31 +08:00
Sara Arjona 0a519e70d4 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:23 +01:00
David Monllao dfecd50ac3 Merge branch 'MDL-63571-35' of git://github.com/peterRd/moodle into MOODLE_35_STABLE 2018-11-20 17:19:47 +01:00
David Monllao 56d8e413ba weekly release 3.5.3+ 2018-11-20 12:55:14 +01:00
David Monllao 3955dde284 Merge branch 'MDL-63394-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2018-11-20 10:34:09 +01:00
Damyon Wiese dc47c7fc8c MDL-63920 backup: Email string improvement
Change from semicolon to colon in email.
2018-11-20 16:28:37 +08:00
Juan Leyva d55565066c MDL-63394 mod_quiz: Do not fail overdue if there is a grace period 2018-11-20 09:27:40 +01:00
Peter 810bb4bef5 MDL-63571 gradebook: Display the name header based on config setting 2018-11-20 14:16:09 +08:00
Luca Bösch b6f83c07ed MDL-63571 grades: switch firstname/lastname order in title row 2018-11-20 14:16:09 +08:00
Andrew Nicols 58c02975d1 MDL-64049 core: Cache prefs for current user
We were already caching these preferences when a user object is provided
to get_user_preferences, or when $USER is provided.

This changee swaps get_user_preferences to use the global USER object
when the USER->id matches the userid supplied to the function.
2018-11-20 00:34:58 +01:00
Eloy Lafuente (stronk7) ef212b671e Merge branch 'MDL-63976-35-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-11-19 22:09:15 +01:00
Helen Foster cac9d8d665 MDL-63976 lang: Merge English strings from the en_fix language pack 2018-11-19 19:21:59 +01:00
David Monllao 127c4954a5 Merge branch 'MDL-63627-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2018-11-19 09:46:16 +01:00
Jun Pataleta af1a540eab Merge branch 'MDL-63994-35-castoken' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-11-19 15:51:27 +08:00
David Monllao 421b7b0c12 Merge branch 'MDL-63487-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-11-19 08:07:55 +01:00
David Monllao 8b508a6004 Merge branch 'MDL-63768-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-11-19 06:06:50 +01:00
Jun Pataleta 8bee660d88 Merge branch 'MDL-64001-35' of https://github.com/christianwolters/moodle into MOODLE_35_STABLE 2018-11-19 11:46:41 +08:00
Luca Bösch 54216a57a8 MDL-63768 atto_link: dialog auto width. 2018-11-16 17:27:55 +01:00
Luca Bösch d078274a59 MDL-63487 badges: Style "◀ Award badge" and "Revoke badge ▶" buttons 2018-11-16 17:27:44 +01:00
Juan Leyva 5fdb6183e5 MDL-63627 enrol: Return progress field correctly
- Check permissions and
- Return the progress for the given user
2018-11-16 15:58:07 +01:00
Juan Leyva d6b498f6ae MDL-62668 mod_workshop: Return feedback for reviewer in assessment phase
Teachers were not able to view the existing feedback.
2018-11-16 15:49:18 +01:00
Eloy Lafuente (stronk7) fc2cde8f80 weekly release 3.5.3+ 2018-11-16 12:03:10 +01:00
Jun Pataleta 28ca1302e5 Merge branch 'MDL-63999-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2018-11-16 14:36:07 +08:00
Simey Lameze 5809488bb6 MDL-63999 calendar: double escape event name on templates 2018-11-16 13:59:29 +08:00
Jun Pataleta 4e0886f362 Merge branch 'MDL-63660-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-11-16 10:52:58 +08:00
Jun Pataleta 96388117d4 MDL-63660 tool_dataprivacy: Increase expected export file size 2018-11-16 10:49:10 +08:00
Mark Johnson c2650d3f3d MDL-63660 privacy: Include CSS locally for data export 2018-11-16 10:49:10 +08:00
Damyon Wiese e7fd2113c0 Merge branch 'wip-MDL-63854-MOODLE_35_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_35_STABLE 2018-11-16 10:45:05 +08:00
Eloy Lafuente (stronk7) 32878692e3 Merge branch 'MDL-64012_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-11-16 01:03:45 +01:00
Kevin Wiliarty 696ecda501 MDL-63854 competencies, themes: misplaced dropdown arrows 2018-11-15 15:52:45 -05:00
David Mudrák 31bfc01e9d 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 20:44:03 +01:00
David Mudrák f779e204ac 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 20:35:46 +01:00
David Mudrák 9ccfa64940 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 20:27:58 +01:00
Jun Pataleta 2ca939b838 Merge branch 'MDL-63832-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2018-11-15 23:11:55 +08:00
Christian Wolters d04454fed5 MDL-64001 boost: Dropdown menu adding missing href 2018-11-15 12:39:09 +01:00
Jun Pataleta 315ffed9fb Merge branch 'MDL-62287-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-15 17:10:43 +08:00
Tim Hunt 9933be5fad MDL-64012 filters: activity name autolinking fails for names with () 2018-11-14 16:07:48 +00:00
Juan Leyva 1978e7205d MDL-63832 assign: Check current user can view submission 2018-11-14 16:54:17 +01:00
Eloy Lafuente (stronk7) 307ee3442b Merge branch 'MDL-63653-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-11-14 16:30:25 +01:00
Eloy Lafuente (stronk7) 42add6e9ef Merge branch 'MDL-63842-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-14 16:12:01 +01:00
David Monllao 6e493f59b8 Merge branch 'MDL-61990_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-11-14 12:09:59 +01:00
Damyon Wiese 512547df7e Merge branch 'MDL-64005-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-11-14 16:00:34 +08:00
Andrew Nicols 971d02f6f4 MDL-62287 tool_usertours: Pull v0.12.3 for background click fix 2018-11-14 14:14:17 +08:00
Adrian Greeve 841a0bc6e2 MDL-64005 gradebook: Fix to remove debugging message.
The progress bar is being used when there are a large amount
of grades being recalculated. This was throwing a debugging message
about NO_OUTPUT_BUFFERING being unset.
2018-11-14 12:42:30 +08:00
Damyon Wiese 17439b2c46 Merge branch 'MDL-63868-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-11-14 12:08:26 +08:00
Luca Bösch b675d6c5ee MDL-63653 tool_xmldb: style form elements 2018-11-13 18:14:16 +01:00
Tim Hunt edfc17d7ba MDL-61990 outputrequirementslib: improve debug message 2018-11-13 17:13:09 +00:00
David Monllao ab16666f05 Merge branch 'MDL-63882-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-11-13 16:07:27 +01:00
David Monllao 628a7bb557 weekly release 3.5.3+ 2018-11-13 13:10:48 +01:00
David Monllao 058db3e6c8 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-11-13 13:10:46 +01:00
Adrian Greeve ca2f0f052c MDL-63868 core_calendar: Clicking link leads to events.
The mini calendar did not link to the daily events properly.
2018-11-13 15:36:17 +08:00
Damyon Wiese 7ef3dbf5f4 Merge branch 'MDL-63927_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2018-11-13 11:57:55 +08:00
Damyon Wiese f0e03e6918 MDL-63882 core_message: Use validate_parameters
external_api::validate_parameters() sets defaults, and does cleaning and sanitisation of the
inputs. It returns the cleaned params. We can't be re-using the arguments to this function
instead of the results, because they have not been cleaned.
2018-11-13 11:02:40 +08:00
AMOS bot bb56746b61 Automatically generated installer lang files 2018-11-13 00:07:39 +00:00
Andrew Nicols 11a19454d7 Merge branch 'm35_MDL-63953' of https://github.com/danmarsden/moodle into MOODLE_35_STABLE 2018-11-13 07:54:18 +08:00
Eloy Lafuente (stronk7) aa4f226f5c Merge branch 'MDL-63907-35' of git://github.com/cescobedo/moodle into MOODLE_35_STABLE 2018-11-12 12:08:41 +01:00
David Monllao a3c626c7e7 Merge branch 'MDL-63925-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-11-12 11:57:54 +01:00
David Monllao 8ff8f4e558 Merge branch 'MDL-63940-35-recaptchaurl' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-11-12 10:56:12 +01:00
David Monllao 63510633b4 Merge branch 'MDL-63823-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2018-11-12 10:09:46 +01:00
Simey Lameze 82447d7ded MDL-63823 tool_lpimportcsv: supress progress bar debugging 2018-11-12 09:53:49 +08:00
Dan Marsden 6dae57a102 MDL-63953 mod_scorm: Use correct value for first attempt. 2018-11-12 10:06:39 +13:00
Eloy Lafuente (stronk7) 789dcd6975 Moodle release 3.5.3 2018-11-10 20:36:27 +01:00
Eloy Lafuente (stronk7) b908052850 weekly release 3.5.2+ 2018-11-10 12:53:24 +01:00
Eloy Lafuente (stronk7) f96287e91b Merge branch 'MDL-63960-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-10 10:28:16 +01:00
Andrew Nicols 55df5e4c05 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) 68987522ea 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:00:46 +08:00
Eloy Lafuente (stronk7) cd496c0307 Merge branch 'MDL-63596-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-10 03:51:34 +01:00
Andrew Nicols 977632b715 MDL-63596 backup: Add missing include 2018-11-10 10:49:19 +08:00
Eloy Lafuente (stronk7) d8231aee5e Merge branch 'MDL-63596-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-09 19:32:53 +01:00
Damyon Wiese d3b5e29e2e MDL-63596 backup: Deal with controller types
For privacy requests, deal with all 3 controller types.
2018-11-09 17:56:05 +08:00
Mihail Geshoski 8f7f422709 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:05 +08:00
Andrew Nicols 4c7f930af8 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:10 +08:00
cescobedo 7625b00200 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:13 +01:00
Jun Pataleta df2ed3c8bc Merge branch 'MDL-63867-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-11-09 15:30:30 +08:00
Michael Hawkins b2e67dc913 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:24 +08:00
Michael Hawkins a000765a13 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:24 +08:00
Jun Pataleta e1921cead6 Merge branch 'MDL-63946-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-09 13:41:33 +08:00
Andrew Nicols a3c30c9fc8 MDL-63946 plagirism: Filename typo fix 2018-11-09 13:25:33 +08:00
Jun Pataleta 3af336b41a Merge branch 'MDL-63924-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-09 11:57:31 +08:00
Jun Pataleta a757b3f80b Merge branch 'MDL-63942-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-09 11:42:50 +08:00
Peter d206c98d98 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:54:58 +08:00
Andrew Nicols a2793d3850 Merge branch 'MDL-63919-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-11-09 10:52:34 +08:00
Jun Pataleta ee522a9f42 Merge branch 'MDL-62589-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-09 10:36:44 +08:00
Damyon Wiese 23c79dff60 Merge branch 'wip-MDL-63894-MOODLE_35_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_35_STABLE 2018-11-09 09:51:51 +08:00
Andrew Nicols b94e3e5f56 MDL-63942 dataprivacy: Disable deleted user task by default 2018-11-09 09:31:16 +08:00
Damyon Wiese f4e1906562 Merge branch 'MDL-63671-35-2' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-11-09 09:14:06 +08:00
David Mudrák bdbecafdc0 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:28 +01:00
Eloy Lafuente (stronk7) e1f1cf9bec Merge branch 'MDL-62564-integration-35-1' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-11-08 16:50:15 +01:00
Andrew Nicols a07e8d7023 MDL-63924 privacy: Add shared user providers to subsytsems 2018-11-08 21:27:22 +08:00
Andrew Nicols a14a44ee13 MDL-63924 core_privacy: Add shared_userlist provider 2018-11-08 21:27:22 +08:00
Eloy Lafuente (stronk7) 763f4e1e52 MDL-63927 performance: Update the plan to support the new login token 2018-11-08 10:26:31 +01:00
Mihail Geshoski 60987ecfae MDL-63671 tool_cohortroles: Limit data to the system context in provider 2018-11-08 16:07:44 +08:00
Michael Hawkins 20957bbd12 MDL-63925 privacy: Fixed Moodle URL in template 2018-11-08 15:54:42 +08:00
Mihail Geshoski 4b56876fe4 MDL-63919 privacy: Store the creation method of the data request 2018-11-08 14:50:08 +08:00
Mihail Geshoski 33ae40340d MDL-63919 privacy: Disable notifications for auto created data requests 2018-11-08 14:50:08 +08:00
Jun Pataleta 923a97629d Merge branch 'MDL-63902-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-08 13:38:54 +08:00
Kevin Wiliarty 37e1f7dbd9 MDL-63894 themes: adds flex-wrap to boost inline date_time_selector 2018-11-07 23:51:41 -05:00
Andrew Nicols 9ae66863bc MDL-62589 dataprivacy: Add ability to resubmit a request 2018-11-08 11:45:35 +08:00
Jun Pataleta 180d76c5f8 Merge branch 'MDL-63840-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-11-08 11:30:54 +08:00
Mihail Geshoski 4913f8f270 MDL-62564 privacy: Create request for deleted users when setting enabled 2018-11-08 09:52:16 +08:00
Mihail Geshoski d364d88a51 MDL-62564 privacy: Improve bulk deletion 2018-11-08 09:51:24 +08:00
Mihail Geshoski fe552e47f0 MDL-62564 privacy: Add unit tests 2018-11-08 09:33:25 +08:00
Andrew Nicols b0ea09e200 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 a1d910f2e8 MDL-62589 dataprivacy: Correct not in sql 2018-11-08 09:03:15 +08:00
Luca Bösch f7dec77e56 MDL-63840 theme: block menu cog size. 2018-11-07 18:03:41 +01:00
Eloy Lafuente (stronk7) f0f4270a8d Merge branch 'MDL-62294-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-11-07 17:25:37 +01:00
Jun Pataleta 1523c8bc6f Merge branch 'm35_MDL-63800' of https://github.com/danmarsden/moodle into MOODLE_35_STABLE 2018-11-07 15:28:07 +08:00
Damyon Wiese 68c72aadc2 Merge branch 'MDL-63839_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-11-07 14:28:46 +08:00
Damyon Wiese 4c21639e66 Merge branch 'MDL-63451_35' of https://github.com/peterspicer-catalyst/moodle into MOODLE_35_STABLE 2018-11-07 13:05:12 +08:00
Jun Pataleta ead79c8627 MDL-63183 auth_shibboleth: Don't render page when already logged in 2018-11-07 00:11:47 +01:00
Jun Pataleta 50edf48571 MDL-63183 auth_shibboleth: Add hidden login token in guest login form 2018-11-07 00:11:47 +01:00
Damyon Wiese b427ab4f70 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:11:47 +01:00
Eloy Lafuente (stronk7) 15c87e0bb1 Merge branch 'm35_MDL-63789_Search_SOLR_Fixes_Proxy_Auth' of https://github.com/scara/moodle into MOODLE_35_STABLE 2018-11-07 00:08:23 +01:00
Eloy Lafuente (stronk7) 4ead20ffea weekly release 3.5.2+ 2018-11-06 19:06:47 +01:00
Eloy Lafuente (stronk7) f37269b124 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-11-06 19:06:45 +01:00
Andrew Nicols f9de59ada9 Merge branch 'MDL-63711-35-fix' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-11-06 14:20:59 +08:00
Jun Pataleta f5cf23270a MDL-63711 core_grade: Use canonicalize for checking userlist IDs 2018-11-06 14:16:57 +08:00
Andrew Nicols 88c2c6758a Merge branch 'MDL-62563-35-3' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-11-06 09:47:26 +08:00
AMOS bot 0da99d3c4d Automatically generated installer lang files 2018-11-06 00:07:25 +00:00
Dan Marsden 4aa5cee144 MDL-63800 mod_assign: don't show grade if not set. 2018-11-06 10:04:54 +13:00
David Monllao ad6b515ab6 Merge branch 'MDL-63711-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-11-05 16:36:05 +01:00
Eloy Lafuente (stronk7) 56cc378799 Merge branch 'MDL-63748-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2018-11-05 13:11:47 +01:00
David Monllao 3b8730628b Merge branch 'MDL-63764-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-11-05 12:46:35 +01:00
David Monllao ce8ada051d Merge branch 'MDL-63700-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-11-05 11:14:47 +01:00
Mihail Geshoski d2481db6b0 MDL-62563 privacy: Create delete data request for existing deleted users 2018-11-05 16:24:02 +08:00
Mihail Geshoski e3eb339d89 MDL-62563 privacy: Add unit tests 2018-11-05 16:21:52 +08:00
Andrew Nicols d906136aa5 Merge branch 'MDL-63689-35-workshopprivacy' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-11-05 15:00:40 +08:00
Damyon Wiese c675598ac0 Merge branch 'MDL-63717-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2018-11-05 13:45:39 +08:00
Andrew Nicols ea321f34c4 Merge branch 'MDL-63564-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-11-05 13:21:33 +08:00
Mark Nelson bb34fe0838 MDL-63839 core_message: use component name for Behat tag 2018-11-05 10:36:32 +08:00
Andrew Nicols 748409df5b Merge branch 'MDL-63712-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-11-05 09:34:17 +08:00
Eloy Lafuente (stronk7) d07431a2c6 Merge branch 'MDL-63818-35-2' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-11-05 00:03:17 +01:00
Matteo Scaramuccia 60735e6bee MDL-63789 search_solr: use proxy creds, if any
Also use proxy port, IF any.
2018-11-02 23:34:13 +01:00
Eloy Lafuente (stronk7) 9d870a800d weekly release 3.5.2+ 2018-11-02 21:08:38 +01:00
Roger Barras 82083929b1 MDL-60267 user: Fix set default data for the user profile field 2018-11-02 20:10:31 +01:00
Adrian Greeve 52efa6a2f0 MDL-63711 core_grades: Delete data for specified users in a context. 2018-11-03 02:59:58 +08:00
Juan Leyva 8396ade620 MDL-63748 core_auth: Fix redirect parameter being ignored 2018-11-02 15:23:26 +01:00
Juan Leyva e159265c55 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:34 +01:00
Mihail Geshoski 46782ecb13 MDL-63564 core_question: Avoid using UNION in get_users_in_context() 2018-11-02 14:40:38 +08:00
Shamim Rezaie 2a34d4b3fd 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:38 +08:00
Shamim Rezaie e1dca20127 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:37 +08:00
Shamim Rezaie 73b5e30559 MDL-63564 mod_quiz: Added quizaccess_user_provider interface
This issue is a part of the MDL-62560 Epic.
2018-11-02 14:40:37 +08:00
Shamim Rezaie d7c85ebb3d 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:37 +08:00
Shamim Rezaie 44451a6a40 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:37 +08:00
Andrew Nicols 9bb62d6cdd Merge branch 'MDL-63701-35-1' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-11-02 12:03:20 +08:00
Andrew Nicols 13ed41e499 Merge branch 'MDL-63666-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-11-02 10:52:40 +08:00
Mihail Geshoski 9825658af9 MDL-63666 logging: Rename delete_data_for_all_users() function 2018-11-02 09:42:16 +08:00
Adrian Greeve 2a939b9f7f 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:16 +08:00
Andrew Nicols 57eae451f1 MDL-63842 core_user: Remove unnecessary DB fetch 2018-11-02 09:07:49 +08:00
Andrew Nicols 30d8fed964 Merge branch 'MDL-63703-35-1' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-11-02 09:00:12 +08:00
Andrew Nicols dc23a75d68 MDL-63702 core_block: Correct phpdoc for get_users 2018-11-02 08:34:45 +08:00
Andrew Nicols 78552ea548 MDL-63422 blog: Correct phpdoc for get_users 2018-11-02 08:34:45 +08:00
Andrew Nicols 6404971918 Merge branch 'MDL-63816-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-11-02 08:00:49 +08:00
Eloy Lafuente (stronk7) 414ca3e1c1 Merge branch 'MDL-63746-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-11-01 15:38:34 +01:00
Andrew Nicols 4d79fb98a5 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:02 +08:00
Michael Hawkins 199d36febc MDL-63712 core_message: Unit test improvements for fetching context/user
This issue is part of the MDL-62560 Epic.
2018-11-01 16:53:07 +08:00
Mihail Geshoski 3cd0a770d6 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:12 +08:00
Shamim Rezaie 55e5747d04 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 13:06:27 +08:00
Shamim Rezaie 3433b0bfb5 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 13:05:58 +08:00
Mihail Geshoski 7f4d3aac07 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:13:52 +08:00
Damyon Wiese 790235e123 MDL-63746 boost: Dropdown menu styles
Remove btn styling from menu buttons as the additional padding makes things not line up.
2018-11-01 11:05:37 +08:00
Andrew Nicols 0ee1075ec4 Merge branch 'MDL-63566-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-11-01 10:11:57 +08:00
Adrian Greeve f7d57a3d96 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:08:13 +08:00
Jun Pataleta bbb9ffb0c1 Merge branch 'MDL-63826_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2018-11-01 09:28:30 +08:00
Eloy Lafuente (stronk7) e882740a56 MDL-63826 tests: Don't rely on random array keys for testing 2018-11-01 00:35:21 +01:00
Andrew Nicols 1da0d646b3 Merge branch 'm35_MDL-63727_Wrong_SCO_Launched_Link' of https://github.com/scara/moodle into MOODLE_35_STABLE 2018-11-01 07:01:42 +08:00
Matteo Scaramuccia b193f7754d MDL-63727 mod_scorm: Fixed typo in test_launch_sco() 2018-10-31 22:42:06 +01:00
Davo Smith 73c8d34ab8 MDL-63727 mod_scorm: fix typo in sco_launched URL 2018-10-31 22:42:05 +01:00
David Monllao bf1b7ef8c9 Merge branch 'MDL-63726-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-10-31 10:21:52 +01:00
Luca Bösch 662878b6b5 MDL-63726 tool_dataprivacy: En-/disable 'Data retention summary' link 2018-10-31 09:10:48 +01:00
Andrew Nicols bc35326e3e Merge branch 'MDL-63684-35-1' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-31 15:13:17 +08:00
Mihail Geshoski df0a4ec014 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:08 +08:00
Mihail Geshoski 8782043946 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:08 +08:00
Andrew Nicols f669a63cca Merge branch 'MDL-63702-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-31 14:05:39 +08:00
David Monllao a25a4d30be Merge branch 'MDL-62601-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-10-31 06:47:43 +01:00
Michael Hawkins aae2aa2d81 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:47:07 +08:00
Andrew Nicols 1760650216 MDL-62601 core_privacy: Ensure providers can handle deleted users 2018-10-31 13:45:00 +08:00
Andrew Nicols 52a16f409d MDL-62601 editor_atto: Do not use context_user 2018-10-31 13:45:00 +08:00
David Monllao 19768075ff Merge branch 'MDL-63582-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-10-31 06:10:38 +01:00
Jun Pataleta fdc3a96e54 Merge branch 'MDL-63690-35-integration' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-31 12:53:47 +08:00
Michael Hawkins a25222e9c4 MDL-63816 privacy: Corrected provider get_users_in_context descriptions 2018-10-31 12:14:43 +08:00
Michael Hawkins eaae1a7ea1 MDL-63816 privacy: Corrected interface get_users_in_context description 2018-10-31 12:14:43 +08:00
Mihail Geshoski c81cc39a02 MDL-63690 core_blog: Handle when user blog posts are not being returned 2018-10-31 11:50:35 +08:00
Jun Pataleta a3d372061a Merge branch 'MDL-60897-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-10-31 11:34:47 +08:00
Andrew Nicols 5de480c21b Merge branch 'MDL-63624-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-31 11:16:47 +08:00
Jun Pataleta 446de56bfc MDL-60897 qtype_multianswer: Code style fixes
And Behat steps improvement, too!
2018-10-31 11:12:53 +08:00
Jean-Michel Vedrine 5e997d239c MDL-60897 qtype_multianswer: Invalid cloze-questions saved to db 2018-10-31 11:12:53 +08:00
Mihail Geshoski cb69e0ca88 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:44 +08:00
Adrian Greeve 0a0e5a03a0 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:21 +08:00
Andrew Nicols 12a3bcee4f Merge branch 'MDL-63530-35-2' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-31 09:22:06 +08:00
Andrew Nicols ddf649109d Merge branch 'MDL-63606-35-2' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-31 08:56:25 +08:00
Andrew Nicols 18b69cc33d Merge branch 'MDL-63690-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-31 08:23:28 +08:00
Luca Bösch 4283575676 MDL-63582 theme_boost: Fix the license field in the file picker width. 2018-10-30 22:42:33 +01:00
Eloy Lafuente (stronk7) e1e20d0c9b weekly release 3.5.2+ 2018-10-30 18:24:07 +01:00
Eloy Lafuente (stronk7) 009f51644d Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-10-30 18:24:05 +01:00
David Mudrák 5171746d5a 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:31:49 +01:00
Mihail Geshoski a395c8a60e 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:24 +08:00
Mihail Geshoski 575584cb94 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:26 +08:00
Andrew Nicols 8fe266c09d Merge branch 'MDL-63634-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-10-30 12:05:15 +08:00
Andrew Nicols a7b6eaa544 Merge branch 'MDL-63626-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-10-30 10:59:28 +08:00
Jun Pataleta 831b2f6729 Merge branch 'MDL-63531-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-10-30 10:50:46 +08:00
Adrian Greeve e2f9bdd44b 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 707586883b 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 f5029c213a 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 b96835a505 Merge branch 'MDL-63656-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-10-30 09:37:07 +08:00
Adrian Greeve 5e0b16e369 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:47:41 +08:00
Eloy Lafuente (stronk7) 7b9e3e0336 Merge branch 'MDL-63730-35-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-10-29 13:20:24 +01:00
David Monllao eb5263ec3f Merge branch 'MDL-63528-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-10-29 11:18:21 +01:00
Michael Hawkins ac2524447e 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:15:11 +08:00
Michael Hawkins ea1f81dd64 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:01:40 +08:00
Michael Hawkins 95c2cadcb8 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:01:40 +08:00
Jun Pataleta 116b0d26eb Merge branch 'MDL-63622-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-10-29 11:41:18 +08:00
Adrian Greeve 07c7af673b 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 11:22:04 +08:00
Andrew Nicols a32ea64a88 Merge branch 'MDL-63665-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-10-29 08:57:04 +08:00
Andrew Nicols de6f2519a5 Merge branch 'MDL-63680-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-29 08:22:58 +08:00
AMOS bot 6539fe917f Automatically generated installer lang files 2018-10-29 00:07:23 +00:00
Andrew Nicols 23b8d594b5 Merge branch 'MDL-63267-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2018-10-27 19:20:39 +08:00
AMOS bot 7b1593ad5c Automatically generated installer lang files 2018-10-27 00:07:26 +00:00
Tim Lock b6960fa224 MDL-63267 tool_privacy: Handle modules without privacy support. 2018-10-26 18:31:11 -04:00
Adrian Greeve 5704b265ab MDL-63267 grading methods: Unit test update for fix. 2018-10-26 18:31:31 -04:00
Adrian Greeve a5915ed4fc 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:31:11 -04:00
Adrian Greeve 73a8c336c9 MDL-63267 tool_dataprivacy: Registry shows deprecated interfaces. 2018-10-26 18:26:32 -04:00
Adrian Greeve 710c4de820 MDL-63267 privacy: Create deprecated provider interface.
Any interfaces that have become deprecated should extend
this interface.
2018-10-26 18:26:19 -04:00
Adrian Greeve e6d622106c MDL-63267 core_grading: Unit test for new methods. 2018-10-26 18:26:07 -04:00
Adrian Greeve 9383ee853c MDL-63267 mod_assign: Update to providers to include adv grading. 2018-10-26 18:25:46 -04:00
Adrian Greeve fa92fcbe15 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:24:49 -04:00
Eloy Lafuente (stronk7) f2eb4c0b8f weekly release 3.5.2+ 2018-10-26 18:05:09 +02:00
Eloy Lafuente (stronk7) cc9c1ed9a0 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-10-26 18:05:07 +02:00
Damyon Wiese 76793973e5 MDL-62139 output: Menus fixes
Change the boost custom behat step to click on a button.

Revert the clean templates to unchanged versions.

(it seems that we missed this commit originally in
MOODLE_35_STABLE and it was the cause of hundreds of
failures, so cherry picked from master. More info @ MDL-63765)
2018-10-26 17:40:49 +02:00
David Mudrák d3e89fec58 MDL-63730 lang: Update Behat scenarios to use the new strings 2018-10-26 13:43:17 +02:00
Helen Foster 8757d7cb6b 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 13:40:07 +02:00
Shamim Rezaie f61b827260 MDL-63634 enrol_paypal: Improve query performance
This issue is a part of the MDL-62560 Epic.
2018-10-26 19:36:39 +11:00
Shamim Rezaie 2f6a91dbdb 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:39 +11:00
Shamim Rezaie f9ba909869 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:39 +11:00
Eloy Lafuente (stronk7) 5b8e3123a9 Merge branch 'MDL-63765-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-26 10:22:36 +02:00
Damyon Wiese eaf9da10ad 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:12:00 +08:00
Shamim Rezaie 0f9997a4ec 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:35 +11:00
Shamim Rezaie 591b16786c 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:35 +11:00
Mihail Geshoski b1208d8bf8 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:10 +08:00
Andrew Nicols f4fcee9a9d Merge branch 'MDL-63673-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-26 11:42:10 +08:00
Andrew Nicols d320454567 Merge branch 'MDL-63682-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-26 11:03:09 +08:00
Mihail Geshoski 24eeb8ba01 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:08 +08:00
Andrew Nicols 0feb84a5dd Merge branch 'MDL-63688-35-1' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-26 10:17:36 +08:00
Mihail Geshoski 90be3a42f3 MDL-63690 core_privacy: Handle when add_users() receives an empty array 2018-10-26 09:26:55 +08:00
Adrian Greeve 2b227258e0 MDL-63690 core_blog: Update providers for userlist deletion. 2018-10-26 09:26:31 +08:00
AMOS bot b6cfa1975a Automatically generated installer lang files 2018-10-26 00:07:27 +00:00
Eloy Lafuente (stronk7) 8b4a53ca75 Merge branch 'MDL-62904-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-10-26 00:03:53 +02:00
Andrew Nicols 7de43df7ad Merge branch 'MDL-63552-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-10-25 15:44:10 +08:00
Andrew Nicols 497d75ae71 Merge branch 'MDL-63679-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-25 15:13:15 +08:00
Andrew Nicols b9c01f1f70 Merge branch 'MDL-63678-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-25 15:11:53 +08:00
Andrew Nicols 3cf54a0743 Merge branch 'MDL-63655_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2018-10-25 14:56:58 +08:00
Michael Hawkins d7bd4532f8 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:43:21 +08:00
Michael Hawkins 1ba678ef3b MDL-63552 search_simpledb: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
Also added test_get_contexts_for_userid unit test.
2018-10-25 11:43:21 +08:00
Damyon Wiese 062bc628df Merge branch 'MDL-63755-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-10-25 08:37:51 +08:00
Andrew Nicols 412b9c0451 MDL-63755 theme_boost: Behat selector fix 2018-10-25 07:39:27 +08:00
Eloy Lafuente (stronk7) 5c61e693af Merge branch 'MDL-62145-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-25 01:35:21 +02:00
Eloy Lafuente (stronk7) de2b3bfdd8 Merge branch 'MDL-63714-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-10-25 01:08:38 +02:00
Mihail Geshoski 46120189e3 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:00 +08:00
Andrew Nicols 8f30163736 MDL-63619 tool_dataprivacy: Cache purposes in form 2018-10-24 08:49:24 +08:00
Andrew Nicols 62b97d84ee MDL-63619 tool_dataprivacy: Performance improvement 2018-10-24 08:49:24 +08:00
Andrew Nicols 899e07d9a8 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:24 +08:00
Andrew Nicols c85128260f MDL-63714 javascript: Add new core/pending module 2018-10-24 08:43:50 +08:00
Andrew Nicols 527f895e93 MDL-63714 core: Wrap doRender in pendingjs 2018-10-24 08:43:50 +08:00
Andrew Nicols abca4753b4 MDL-63714 javascript: Improve docs for pendingjs 2018-10-24 08:43:50 +08:00
Mihail Geshoski 4b91080095 MDL-63673 fileconverter_googledrive: Support removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-24 07:03:19 +08:00
David Monllao 76528a767e weekly release 3.5.2+ 2018-10-23 16:39:30 +02:00
David Monllao 16b34d53f2 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-10-23 16:39:28 +02:00
David Monllao 25934551cc Merge branch 'MDL-62139-35-fix3' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-23 11:17:08 +02:00
Damyon Wiese 4b31593964 MDL-62139 behat: Invalid test
If javascript is disabled, we can't open the menu.
2018-10-23 16:44:16 +08:00
Damyon Wiese 9c9e2d3e5e MDL-62139 output: Revert template changes
Revert accessibility changes for menus in standard themes.
2018-10-23 10:14:44 +02:00
Damyon Wiese cd786f0d0d MDL-62139 output: Revert template changes
Revert accessibility changes for menus in standard themes.
2018-10-23 15:47:20 +08:00
Mihail Geshoski 58d63790c2 MDL-63679 ltiservice_memberships: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 13:36:02 +08:00
Mihail Geshoski 00a7f99146 MDL-63678 ltiservice_gradebookservices: Support removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 13:13:48 +08:00
Andrew Nicols 6d0014c5e1 MDL-63657 completion: Coding style fix 2018-10-23 11:32:53 +08:00
Andrew Nicols 85f052f4b8 Merge branch 'MDL-63668-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-10-23 11:32:49 +08:00
Andrew Nicols 17f5816739 MDL-63657 core_files: Coding style fix 2018-10-23 11:27:26 +08:00
Andrew Nicols 9cb3947dff Merge branch 'MDL-63640-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-23 11:27:22 +08:00
Andrew Nicols efc90f828b MDL-63657 tool_mobile: Coding style fix 2018-10-23 11:22:05 +08:00
Andrew Nicols da5827b559 Merge branch 'MDL-63657-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-10-23 11:21:59 +08:00
Andrew Nicols 9f01d23302 MDL-63535 core_rss: Coding style fix 2018-10-23 11:16:56 +08:00
Andrew Nicols a4f148707e Merge branch 'MDL-63535-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-23 11:16:45 +08:00
Michael Hawkins 7d08cc710b MDL-63657 tool_mobile: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-23 10:59:38 +08:00
Andrew Nicols 79a266ee48 MDL-63664 tool_policy: Whitespace fix 2018-10-23 10:54:13 +08:00
Michael Hawkins ad33de11d9 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:36 +08:00
Michael Hawkins dd897cc398 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:36 +08:00
Andrew Nicols 68f64fe990 Merge branch 'MDL-63664-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-10-23 10:44:35 +08:00
Michael Hawkins a7ebe98214 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:12 +08:00
Mihail Geshoski 8ac3bac143 MDL-63535 core_userkey: Add method that returns users in context
This issue is part of the MDL-62560 Epic.
2018-10-23 10:27:42 +08:00
Mihail Geshoski 4910753dce MDL-63535 core_rss: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 10:27:42 +08:00
Andrew Nicols d54cbaff46 Merge branch 'MDL-63649-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-10-23 10:17:50 +08:00
Andrew Nicols 9e715a225c Merge branch 'MDL-63713-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-10-23 10:09:13 +08:00
Mihail Geshoski 015e70cbcf MDL-63640 core_files: Add method that returns users in context
This issue is part of the MDL-62560 Epic.
2018-10-23 10:07:38 +08:00
Shamim Rezaie 0b28290a50 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:33 +11:00
Shamim Rezaie 63e4e0d69d MDL-63713 core: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 13:05:36 +11:00
Andrew Nicols aff8604240 MDL-62560 tool_dataprivacy: Behat fix for protected check 2018-10-23 09:22:05 +08:00
AMOS bot 505851f045 Automatically generated installer lang files 2018-10-23 00:07:22 +00:00
David Monllao 5cccfd2eab Merge branch 'MDL-62144-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-22 16:34:37 +02:00
David Monllao f9f8edce1d Merge branch 'MDL-61052-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-22 14:37:33 +02:00
David Monllao a9354dbbd6 Merge branch 'MDL-62560-35' into MOODLE_35_STABLE 2018-10-22 12:58:00 +02:00
Andrew Nicols 05b441c5ef MDL-62560 tool_dataprivacy: Add a purpose override cache 2018-10-22 12:57:08 +02:00
Andrew Nicols 9fc1390e35 MDL-62560 tool_dataprivacy: Fetch user purpose once 2018-10-22 12:57:07 +02:00
Andrew Nicols 360b7f43b8 MDL-62560 tool_dataprivacy: Add status logging 2018-10-22 12:57:07 +02:00
Andrew Nicols 20342fca7e MDL-62560 tool_dataprivacy: Add unit test for filtered userlist 2018-10-22 12:57:06 +02:00
Mihail Geshoski 598d0b3c20 MDL-63636 block_recent_activity: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:06 +02:00
Mihail Geshoski 3d9de9c6d6 MDL-63621 core_cohort: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:05 +02:00
Mihail Geshoski cdd2633a99 MDL-63633 block_comments: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:05 +02:00
Mihail Geshoski 7027daa89c MDL-63635 block_community: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:04 +02:00
Mihail Geshoski bd77a90267 MDL-63593 auth_mnet: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:04 +02:00
Mihail Geshoski 3288990694 MDL-63592 auth_oauth2: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:04 +02:00
Mihail Geshoski 64793424f2 MDL-63637 block_rss_client: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:03 +02:00
Mihail Geshoski 56cd4f7b84 MDL-63638 block_tag_flickr: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:03 +02:00
Mihail Geshoski fdf6d94a1b MDL-63639 core_fileconverter: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:02 +02:00
Shamim Rezaie 84a98a4202 MDL-63647 enrol_flatfile: Improving existing unit tests
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:57:02 +02:00
Shamim Rezaie f38e592d5d MDL-63647 enrol_flatfile: support removal of multiple users in context
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:57:01 +02:00
Michael Hawkins 25b6c54c68 MDL-63659 tool_monitor: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:57:01 +02:00
Mihail Geshoski 49f281ac53 MDL-63615 message_airnotifier: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:00 +02:00
Mihail Geshoski e16d2a8fc6 MDL-63616 message_email: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:57:00 +02:00
Mihail Geshoski 5447955b2e MDL-63617 message_jabber: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:59 +02:00
Adrian Greeve b1a8e921cd 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 12:56:55 +02:00
Mihail Geshoski 97a6d18372 MDL-63572 profilefield_checkbox: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:54 +02:00
Mihail Geshoski c2c4125f13 MDL-63575 profilefield_datetime: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:54 +02:00
Mihail Geshoski b0a2591274 MDL-63586 profilefield_menu: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:53 +02:00
Mihail Geshoski 6cbefb4064 MDL-63587 profilefield_text: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:53 +02:00
Mihail Geshoski 35fbfe23b5 MDL-63588 profilefield_textarea: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:53 +02:00
Michael Hawkins 053eb1d5b9 MDL-63538 repository_onedrive: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:52 +02:00
Michael Hawkins 5b8a649d4a MDL-63538 repository_youtube: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:52 +02:00
Michael Hawkins 29f71e53b5 MDL-63538 repository_wikimedia: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:51 +02:00
Michael Hawkins 5f6e9d5185 MDL-63538 repository_picasa: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:51 +02:00
Michael Hawkins 290c9bc478 MDL-63538 repository_merlot: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:51 +02:00
Michael Hawkins 58cc3aa1ab MDL-63538 repository_googledocs: Support removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:50 +02:00
Michael Hawkins 658b6742f5 MDL-63538 repository_flickr_public: Support removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:50 +02:00
Michael Hawkins 32a103cd69 MDL-63538 repository_flickr: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:49 +02:00
Michael Hawkins 88c29f7fbe MDL-63538 repository_dropbox: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:49 +02:00
Michael Hawkins 7902349b06 MDL-63538 repository_boxnet: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:49 +02:00
Mihail Geshoski 0857000602 MDL-63536 core_repository: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:48 +02:00
Mihail Geshoski ce55556b2e MDL-63534 core_user: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:48 +02:00
Mihail Geshoski ddcf2245a8 MDL-63532 core_portfolio: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:47 +02:00
Mihail Geshoski 39a072f09f MDL-63529 core_enrol: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:47 +02:00
Michael Hawkins d233c5d063 MDL-63514 mod_wiki: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:47 +02:00
Michael Hawkins f27a271a8e MDL-63510 mod_survey: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:46 +02:00
Michael Hawkins 38839b0afb MDL-63501 mod_scorm: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:46 +02:00
Michael Hawkins 07606ab87f MDL-63497 mod_lesson: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:45 +02:00
Michael Hawkins 9143b3db12 MDL-63497 mod_feedback: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:45 +02:00
Michael Hawkins 063f886160 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 12:56:45 +02:00
Michael Hawkins e43fcd4373 MDL-63497 mod_data: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:44 +02:00
Michael Hawkins 4369b8d6e5 MDL-63497 block_html: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:43 +02:00
Michael Hawkins 7cb0129e59 MDL-63497 mod_chat: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:43 +02:00
Shamim Rezaie 80ead07e28 MDL-63554 cachestore_memcache: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:43 +02:00
Shamim Rezaie b6a5ae21c7 MDL-63554 cachestore_session: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:42 +02:00
Shamim Rezaie 22b0849f45 MDL-63554 cachestore_redis: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:42 +02:00
Shamim Rezaie 73a5fcacf6 MDL-63554 cachestore_mongodb: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:41 +02:00
Shamim Rezaie 25b3094acb MDL-63554 cachestore_memcached: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:41 +02:00
Shamim Rezaie 7fb4b0d52d MDL-63500 enrol_cohort: refactoring get_contexts_for_userid
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:40 +02:00
Shamim Rezaie 86646b27d2 MDL-63500 enrol_meta: refactoring get_contexts_for_userid
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:40 +02:00
Shamim Rezaie 1afe64dbea 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 12:56:40 +02:00
Shamim Rezaie 56c4024330 MDL-63500 enrol_cohort: Support for removal of multiple context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:39 +02:00
Shamim Rezaie 7bbf87a853 MDL-63500 enrol_meta: Support for removal of multiple context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:39 +02:00
Shamim Rezaie c55fd56b87 MDL-63500 core_group: support removal of multiple users in a context
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:38 +02:00
Mihail Geshoski 39e35674d1 MDL-63533 core_webservice: Unit tests for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:38 +02:00
Mihail Geshoski 6f3c6cf4ba MDL-63533 core_webservice: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:37 +02:00
Adrian Greeve 8159f6ae0a MDL-63513 mod_assignment: Add removal of context users.
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:37 +02:00
Michael Hawkins 6cd1ea6cf3 MDL-63498 mod_lti: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:56:36 +02:00
Michael Hawkins 4daf168de7 MDL-63495 comment: Added provider::get_users_in_context_from_sql
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:56:28 +02:00
Damyon Wiese 3bea0fa387 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:01:06 +08:00
Zig Tan 6d03e5e554 MDL-61052 assign: Improve strip_images() to avoid HTML5 tags errors 2018-10-22 11:58:36 +08:00
Damyon Wiese 9d0c5cbbc4 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:03:37 +08:00
Damyon Wiese 40a90154ca MDL-62144 user menu: Accessibility
Ensure user menu passes the accessibility tests.
2018-10-22 10:45:20 +08:00
Damyon Wiese e0f64e0feb MDL-62139 output: Accessible action menus
Add label on the "gear" menu and default keyboard and focus controls.
2018-10-22 10:37:25 +08:00
Eloy Lafuente (stronk7) 1a33d0869a weekly release 3.5.2+ 2018-10-22 10:37:24 +08:00
AMOS bot f2211eb823 Automatically generated installer lang files 2018-10-22 10:37:24 +08:00
AMOS bot 857cfb1429 Automatically generated installer lang files 2018-10-22 10:37:24 +08:00
AMOS bot bd6cc5c145 Automatically generated installer lang files 2018-10-22 00:07:21 +00:00
Eloy Lafuente (stronk7) 1a1d03caeb weekly release 3.5.2+ 2018-10-19 17:10:56 +02:00
Eloy Lafuente (stronk7) 7e3eaa5d6f Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-10-19 17:10:54 +02:00
AMOS bot 512091f40c Automatically generated installer lang files 2018-10-19 00:08:10 +00:00
Eloy Lafuente (stronk7) 722f0c03c0 Merge branch 'MDL-62920_35' of https://github.com/aanabit/moodle into MOODLE_35_STABLE 2018-10-18 23:51:47 +02:00
Eloy Lafuente (stronk7) 892e441634 Merge branch 'MDL-60145-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-10-18 18:57:45 +02:00
Tim Hunt e24dfc1a07 MDL-63403 filter_glossary: changes made during integration review 2018-10-18 18:46:41 +02:00
Tim Hunt 44d00da135 MDL-63403 filter_glossary: only create replacement HTML if needed 2018-10-18 18:41:42 +02:00
Tim Hunt de736d0c84 MDL-63403 filter_glossary: only prepare the replacement if used 2018-10-18 18:41:38 +02:00
Tim Hunt e78bd0cefb 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:41:34 +02:00
Tim Hunt e208669c64 MDL-63403 filter_glossary: only prepare_phrases_for_filtering once 2018-10-18 18:41:30 +02:00
Tim Hunt 098d616a30 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:41:26 +02:00
Tim Hunt 995d434de1 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:41:22 +02:00
Tim Hunt 366a85cbb4 MDL-63403 filter_glossary: Fix lang string concatenation 2018-10-18 18:41:18 +02:00
Tim Hunt 0c94037196 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:41:14 +02:00
Tim Hunt fa0a861400 MDL-63403 filterlib: Fix lots of coding style 2018-10-18 18:40:50 +02:00
Jun Pataleta 068c66f242 Merge branch 'MDL-63667-35-fix2' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-18 14:38:26 +08:00
Andrew Nicols b26c30d8f9 MDL-63667 amd: Check for parent template recursion 2018-10-18 12:11:52 +08:00
Damyon Wiese ac1c36c728 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:52:06 +08:00
Eloy Lafuente (stronk7) 069dfe5fc3 Merge branch 'MDL-63632-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-10-18 02:39:24 +02:00
AMOS bot b1904ba9cb Automatically generated installer lang files 2018-10-18 00:07:26 +00:00
Andrew Nicols 951ae21309 MDL-63632 forum: Delete where not discussion author 2018-10-18 07:20:29 +08:00
Eloy Lafuente (stronk7) b55b2e4f6e Merge branch 'MDL-63068_35' of https://github.com/aanabit/moodle into MOODLE_35_STABLE 2018-10-18 00:39:55 +02:00
Jun Pataleta b7d2f7e1d4 MDL-62904 tool_dataprivacy: Add data request links in profile page 2018-10-17 16:43:31 +08:00
Jun Pataleta d4a5339029 Merge branch 'MDL-63667-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-17 15:06:01 +08:00
Ryan Wyllie 6185c3455a MDL-63667 javascript: fix failed to pre-fetch the template error 2018-10-17 13:53:20 +08:00
Michael Hawkins 44b012e5fd MDL-63495 comment: Added provider::delete_comments_for_users
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:49 +08:00
Andrew Nicols b8558f33aa 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:49 +08:00
Andrew Nicols 9674218469 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:49 +08:00
Andrew Nicols e3ddf1e324 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:49 +08:00
Andrew Nicols f30b061f48 MDL-63496 tool_dataprivacy: Respect expiry with protected flag
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:49 +08:00
Andrew Nicols 7f7e78269f MDL-63496 tool_dataprivacy: Support for per-role retention
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:49 +08:00
Michael Hawkins 744ee9322c 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:49 +08:00
Andrew Nicols bdf43538fb 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:49 +08:00
Eloy Lafuente (stronk7) 0bf20c560e weekly release 3.5.2+ 2018-10-16 16:05:38 +02:00
Damyon Wiese 7817df3048 Merge branch 'MDL-62960-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-10-16 11:43:53 +08:00
Shamim Rezaie 8baf412ef7 MDL-62960 calendar: Visuall indicator for valid course event drop zones 2018-10-16 13:09:33 +11:00
Shamim Rezaie 86eff20271 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:09:26 +11:00
Shamim Rezaie 81e11e98f7 MDL-62960 calendar: Implementing course events validity check callback 2018-10-16 13:04:05 +11:00
Shamim Rezaie 4dee91aabf 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:04:05 +11:00
Andrew Nicols 5c74c84c9d Merge branch 'MDL-63421_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2018-10-16 08:50:22 +08:00
Eloy Lafuente (stronk7) 8c682cd317 Merge branch 'MDL-63583-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2018-10-16 00:29:09 +02:00
Eloy Lafuente (stronk7) 0603eabe6e Merge branch 'MDL-63456-35' of git://github.com/merrill-oakland/moodle into MOODLE_35_STABLE 2018-10-16 00:17:13 +02:00
Eloy Lafuente (stronk7) 5ffe934241 Merge branch 'MDL-62319-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-16 00:03:04 +02:00
Andrew Nicols 2816fa5725 Merge branch 'MDL-63542-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2018-10-15 11:32:50 +08:00
Eloy Lafuente (stronk7) f29fda6b3e MDL-63655 core: Fix miss-placed parenthesis 2018-10-15 01:02:51 +02:00
Amaia Anabitarte de103e2329 MDL-63068 user: Allow underscore for profile custom fields shortname 2018-10-11 16:41:10 +02:00
Amaia Anabitarte 8b32d682a5 MDL-62920 user: Uploading deleted user and adding to a cohort 2018-10-11 16:28:18 +02:00
Shamim Rezaie 117006e9be MDL-63626 mod_quiz: Fixed a bug when there was no attempt on the quiz 2018-10-12 01:04:01 +11:00
Eloy Lafuente (stronk7) 18c5565a1e weekly release 3.5.2+ 2018-10-11 13:22:56 +02:00
Eloy Lafuente (stronk7) 60c2d866de Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-10-11 13:22:54 +02:00
Damyon Wiese 6324e6cbdf 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:31:27 +08:00
Nathan Nguyen 107a70c18c MDL-62319 Assign: Grading interface is broken when using iOS 11.3 devices 2018-10-11 13:31:23 +08:00
AMOS bot 38c7b40532 Automatically generated installer lang files 2018-10-11 00:07:18 +00:00
Eloy Lafuente (stronk7) d19ca2c152 Merge branch 'MDL-62891-35-callable_name' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-10-10 23:33:11 +02:00
Eloy Lafuente (stronk7) d61e7f1e3f Merge branch 'MDL-63225-35' of git://github.com/jleyva/moodle into MOODLE_35_STABLE 2018-10-10 23:25:52 +02:00
Peter Spicer 7331c8af56 MDL-63451 core_message: Properly escape URLs for notification popup 2018-10-10 13:04:24 +01:00
Andrew Nicols 866cabf59d MDL-63607 behat: Remove theme from config whitelist 2018-10-10 12:06:42 +08:00
Jake Dallimore 9477b1d568 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:42:07 +08:00
AMOS bot 38f9254cd4 Automatically generated installer lang files 2018-10-10 00:07:15 +00:00
Eloy Lafuente (stronk7) 6e5c713b60 Merge branch 'MDL-63439-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-10 00:48:20 +02:00
Eloy Lafuente (stronk7) 9ab9aa573b Merge branch 'MDL-62395-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-10-09 23:06:36 +02:00
Eloy Lafuente (stronk7) 1ca1b28e52 Merge branch 'MDL-63401-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-10-09 11:36:26 +02:00
David Monllao 5f13e8876b Merge branch 'MDL-62738_35' of https://github.com/mfabriczy/moodle into MOODLE_35_STABLE 2018-10-09 09:24:17 +02:00
David Monllao a16f2c8b55 Merge branch 'MDL-51969-MOODLE_35_STABLE' of https://github.com/dmitriim/moodle into MOODLE_35_STABLE 2018-10-09 09:21:08 +02:00
Jun Pataleta 3addb66f2d Merge branch 'MDL-62491-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-10-09 14:39:41 +08:00
Jun Pataleta 505a25b403 Merge branch 'MDL-63241-35-take2' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-10-09 12:48:48 +08:00
Adrian Greeve bb76ffff21 MDL-62491 navigation: Update to tree.js to allow callbacks. 2018-10-09 09:40:06 +08:00
Adrian Greeve 375eb5e975 MDL-62491 mod_assign: Fill in the rewrite plugin urls properly. 2018-10-09 09:40:06 +08:00
Adrian Greeve 1db088f085 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:40:06 +08:00
Damyon Wiese 100e479daf 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:30:24 +08:00
Jun Pataleta 191d470949 Merge branch 'MDL-63194_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-10-09 08:55:39 +08:00
Andrew Nicols c62c4c9c40 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 ac4f0d0e51 MDL-63401 tool_dataprivacy: Simplify where processing 2018-10-09 08:22:42 +08:00
Andrew Nicols 76075bcf6b MDL-63401 tool_dataprivacy: Move final cap check to endpoint 2018-10-09 08:22:42 +08:00
Eric Merrill f55f89162d MDL-63456 qtype_multichoice: Return a default options object if missing 2018-10-08 16:31:27 -04:00
Eric Merrill 2d5d5d7902 MDL-63456 question: Improve Aiken error handling and multichoice errors 2018-10-08 16:31:27 -04:00
Tim Hunt a83a1d9ee0 MDL-63194 quiz editing: subtle drag-drop bug if moving between sections 2018-10-08 17:46:32 +01:00
Juan Leyva aba0de88be 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:56:00 +02:00
Andrew Nicols a996aa4ea6 MDL-63401 tool_dataprivacy: Allow expiriration of users without end date 2018-10-08 20:51:41 +08:00
Andrew Nicols 3a6fe7db1b 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:51:09 +08:00
Andrew Nicols cfb272d0ae 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:51:09 +08:00
Andrew Nicols 0de0739e8e MDL-63401 tool_dataprivacy: Move cap checks to endpoints from API 2018-10-08 20:51:09 +08:00
David Monllao 593d8d250f Merge branch 'MDL-63323-35-wrong-classes-attribute-into-activity_navigation' of https://github.com/davidherney/moodle into MOODLE_35_STABLE 2018-10-08 11:30:21 +02:00
Luca Bösch b0147a4737 MDL-63241 calendar: Add missing table alias in SQL query. 2018-10-07 21:45:22 +02:00
Marcus Fabriczy 975c91dec8 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:29:26 +09:30
Juan Leyva 5166e72190 MDL-63542 core_course: Support stealth activities in WS 2018-10-05 14:51:19 +02:00
Eloy Lafuente (stronk7) 8946ee7937 MDL-63421 env: Moodle 3.4.x and 3.5.x do not support PHP 7.3 2018-10-05 13:34:29 +02:00
David Mudrák 4edb56a2a5 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:51:56 +02:00
David Mudrák 02459b6527 MDL-62891 core: Introduce new get_callable_name() function 2018-10-05 08:51:56 +02:00
Dmitrii Metelkin f9f8a9575e MDL-51969 mod_lti: Fixed missing tool proxy GUID 2018-10-05 15:14:54 +10:00
Jun Pataleta 7daf207db7 weekly release 3.5.2+ 2018-10-05 10:29:07 +08:00
Jun Pataleta 41ae59a8de Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-10-05 10:29:06 +08:00
Jun Pataleta 20d47f1b5f 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:21:22 +08:00
Jun Pataleta a779b53b2f MDL-62395 bootstrapbase: Add more w-XX classes for BS4 compatibility
I added w-25, w-50 and w-75.
2018-10-05 09:21:22 +08:00
Jun Pataleta 7e0e5b02c5 MDL-62395 tool_dataprivacy: Use BS4 table classes
* Use standard Bootstrap4 table classes for the categories and purposes
  tables.
* Set w-25 for the name and description columns of the purposes table.
* Set w-50 for the description column of the categories table.
* Set a minimum width for the actions column of these tables.
2018-10-05 09:21:22 +08:00
Jun Pataleta 054937e378 Merge branch 'MDL-35788-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-10-04 12:45:43 +08:00
Jun Pataleta a8e4094570 MDL-63528 auth: Behat scenario for "Remember username" display 2018-10-04 12:24:39 +08:00
Jun Pataleta 78cee5d64c MDL-63528 auth: Show "Remember username" on login form only when needed 2018-10-04 11:43:22 +08:00
Andrew Nicols 4d5cb2751b MDL-35788 mod_forum: Move post creation fetch 2018-10-04 11:41:48 +08:00
AMOS bot 9890340b21 Automatically generated installer lang files 2018-10-04 00:07:22 +00:00
Eloy Lafuente (stronk7) 9cd03b8b63 Merge branch 'MDL-63141-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-10-04 00:24:21 +02:00
Eloy Lafuente (stronk7) 15ce896d08 Merge branch 'MDL-63142-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-10-04 00:18:45 +02:00
Eloy Lafuente (stronk7) 2d6d31fcb7 Merge branch 'MDL-63143-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-10-04 00:02:34 +02:00
David Monllao 44c460c6be Merge branch 'MDL-62558-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-10-03 17:16:01 +02:00
Adrian Greeve 8855e0041d MDL-62558 tool_dataprivacy: Create a summary page for users. 2018-10-03 10:38:12 +08:00
Jun Pataleta 1209d00d26 Merge branch 'MDL-35788-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-10-03 10:13:08 +08:00
Eloy Lafuente (stronk7) 084180ba7d Merge branch 'MDL-60685-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-10-03 00:24:08 +02:00
Eloy Lafuente (stronk7) 0a11a740b3 Merge branch 'MDL-63435-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-10-02 23:48:17 +02:00
Juan Leyva 86196f93fb 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:24 +02:00
Andrew Nicols 7a2eac678c Merge branch 'MDL-63493-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-10-02 11:41:36 +08:00
Jun Pataleta 9af75abf69 MDL-63493 core_message: Fix field parameters for the index definitions
* The fields for the ID number-related indexes that were created for
  the messages and message_user_actions tables in MDL-36941 should not
  be in comma-separated strings.
2018-10-02 11:34:06 +08:00
Andrew Nicols 1c6390697e MDL-35788 forum: Show post creation time not modified 2018-10-01 08:16:56 +08:00
David Herney 9b40d154ff 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:42:50 -05:00
Luca Bösch aae67cd6dd MDL-63435 gradebook: let activity icons re-appear. 2018-09-27 18:17:50 +02:00
Eloy Lafuente (stronk7) 5211af1658 weekly release 3.5.2+ 2018-09-27 15:18:00 +02:00
Eloy Lafuente (stronk7) 663de3c3e6 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-09-27 15:17:57 +02:00
Eloy Lafuente (stronk7) b469c777ed Merge branch 'MDL-63113-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-09-26 12:28:12 +02:00
Bas Brands e8954b775d MDL-63113 theme boost: initialsbar wrapping 2018-09-26 10:55:40 +02:00
Eloy Lafuente (stronk7) 5802130950 Merge branch 'MDL-61981-35_nestedmath' of git://github.com/Mankro/moodle into MOODLE_35_STABLE 2018-09-25 23:40:42 +02:00
Eloy Lafuente (stronk7) 140e251310 Merge branch 'MDL-62279-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-09-25 23:26:28 +02:00
Eloy Lafuente (stronk7) 359a6c32e8 Merge branch 'MDL-62714-35-boost_course_visibility_in_navbar' of https://github.com/fskandalis/moodle into MOODLE_35_STABLE 2018-09-25 23:19:34 +02:00
Eloy Lafuente (stronk7) 9cd49fbad4 Merge branch 'MDL-60028-35' of https://github.com/paulholden/moodle into MOODLE_35_STABLE 2018-09-25 16:58:36 +02:00
David Monllao 713385769d Merge branch 'MDL-63119-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2018-09-25 12:36:29 +02:00
David Monllao 5874ac4f4a Merge branch 'MDL-62930-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-09-25 12:28:15 +02:00
David Monllao 9708b6e9b3 Merge branch 'MDL-62717-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-09-25 12:18:54 +02:00
Andrew Nicols 16c5c24d19 Merge branch 'MDL-63346_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2018-09-25 08:50:30 +08:00
Eloy Lafuente (stronk7) 57b938da30 MDL-63020 tests: ensure that searching for is null values also works ok 2018-09-24 17:41:47 +02:00
Tim Hunt ce774c66a1 MDL-63020 dml: improve the unit tests 2018-09-24 17:41:47 +02:00
Eloy Lafuente (stronk7) d82567eb7f Merge branch 'MDL-63020_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-09-24 17:40:10 +02:00
AMOS bot a0f1d5f0eb Automatically generated installer lang files 2018-09-22 00:07:34 +00:00
Paul Holden e273e709bf 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:21:42 +01:00
Tim Hunt ade905e248 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:28 +01:00
Tim Hunt 8f76f17fc6 MDL-63020 xmldb: Improve PHPdoc comments for better IDE autocomplete 2018-09-20 17:50:26 +01:00
Luca Bösch a93eb1182e MDL-62717 forum: Create announcements forum with HTML format intro. 2018-09-20 17:47:20 +02:00
Markku Riekkinen e4099493ca MDL-61981 filter_mathjaxloader: add unit tests 2018-09-20 15:44:38 +03:00
Markku Riekkinen 71d3c750eb 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-20 15:44:02 +03:00
Eloy Lafuente (stronk7) 02a31d5f96 weekly release 3.5.2+ 2018-09-20 12:12:10 +02:00
Eloy Lafuente (stronk7) 906525ce89 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:52:41 +02:00
Eloy Lafuente (stronk7) 9a74362a48 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:47:50 +02:00
David Monllao 8682e82694 Merge branch 'MDL-63140-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-09-19 13:31:16 +02:00
Shamim Rezaie eeef0230ef MDL-63140 mod_glossary: Check if the module is visible to the user 2018-09-19 21:27:54 +10:00
Shamim Rezaie 71ae8603f5 MDL-63140 mod_glossary: Add userid param to glossary calendar callbacks 2018-09-19 21:27:54 +10:00
David Monllao de8c8a4f81 Merge branch 'MDL-63135-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-09-19 13:13:10 +02:00
Eloy Lafuente (stronk7) d2bceb2031 Merge branch 'MDL-63116-35-1' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-09-18 23:48:12 +02:00
Mihail Geshoski 9f1fd9955a MDL-61908 privacy: Fix heading in data privacy pages 2018-09-18 18:51:14 +02:00
Eloy Lafuente (stronk7) 9093ace988 Merge branch 'MDL-63109-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-09-18 18:32:04 +02:00
David Monllao 7c0ecc11e7 Merge branch 'MDL-63138-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-09-18 16:41:29 +02:00
David Monllao 4e6ec59f8c Merge branch 'MDL-63139-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-09-18 16:38:00 +02:00
David Monllao a266d8a24f Merge branch 'MDL-63117-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-09-18 16:34:30 +02:00
David Monllao 1d67ef4cc7 Merge branch 'MDL-63333_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-09-18 12:18:54 +02:00
Mihail Geshoski 39116eeac9 MDL-63109 privacy: Add behat tests 2018-09-18 15:07:23 +08:00
Mihail Geshoski 60e45d8e0d MDL-63109 privacy: Fix the initialisation of the policy acceptance modal 2018-09-18 15:04:46 +08:00
Jun Pataleta 3135d3f048 Merge branch 'm35_MDL-63319_MySQL_MSSQL_Rename_Field_Reserved_Word' of https://github.com/scara/moodle into MOODLE_35_STABLE 2018-09-18 14:08:53 +08:00
Tim Schroeder f7035a839d 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:43 +08:00
Damyon Wiese ffdc051c71 MDL-62930 theme_boost: Remove custom-select styles
These styles cause the custom select fields to overlap their containers. See the license field in the file picker single file info dialogue for an example.
2018-09-18 08:42:35 +08:00
Eloy Lafuente (stronk7) aa5c98350f Merge branch 'MDL-58781_35' of https://github.com/aanabit/moodle into MOODLE_35_STABLE 2018-09-17 23:43:22 +02:00
Eloy Lafuente (stronk7) 206285819c Merge branch 'MDL-63009-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-09-17 23:30:41 +02:00
Eloy Lafuente (stronk7) 31867d8880 Merge branch 'MDL-63184-35-2' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-09-17 23:11:36 +02:00
Eloy Lafuente (stronk7) d4e17846f6 Merge branch 'MDL-63371_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-09-17 23:09:28 +02:00
Eloy Lafuente (stronk7) e34e5486cf Merge branch 'MDL-63354-35' of https://github.com/HuongNV13/moodle into MOODLE_35_STABLE 2018-09-17 23:06:47 +02:00
Jun Pataleta d283cf2cee MDL-63184 tool_dataprivacy: Ensure PO roles have correct capability 2018-09-17 22:35:23 +08:00
David Monllao 3a832ad75e Merge branch 'MDL-62554-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-09-17 13:45:50 +02:00
Eloy Lafuente (stronk7) 9cab25219d Merge branch 'MDL-63215-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-09-17 10:43:07 +02:00
Mark Nelson ff5ec88a55 MDL-63333 core: removed unused setting 'messaginghidereadnotifications' 2018-09-17 10:04:55 +08:00
Mihail Geshoski 996090515e MDL-63116 privacy: Add bulk actions to the privacy request table 2018-09-17 08:19:28 +08:00
Mihail Geshoski 6d682a5e5f MDL-63116 privacy: Add behat tests 2018-09-17 08:19:28 +08:00
Mihail Geshoski b7c157aeb2 MDL-63116 privacy: Add unit tests 2018-09-17 08:19:27 +08:00
Michelle Melton 5e1b7e4d28 MDL-63215 block_rss_client: Escaping tags in RSS entries 2018-09-16 23:47:36 +02:00
Matteo Scaramuccia d408738313 MDL-63319 ddl: Added getRenameFieldSQL() coverage 2018-09-14 22:43:03 +02:00
Matteo Scaramuccia 3702ecbe48 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:43:03 +02:00
Matteo Scaramuccia 6e73318877 MDL-63319 ddl: MSSQL should rename reserved words 2018-09-14 22:36:31 +02:00
Matteo Scaramuccia d3931b12d2 MDL-63319 ddl: MySQL should rename reserved words 2018-09-14 22:36:31 +02:00
Tim Hunt 8f95b79590 MDL-63371 question: USE_RAW_DATA case in check_qt_var_name_restrictions 2018-09-14 16:44:31 +01:00
Amaia Anabitarte f426155996 MDL-58781 mod_feedback: Inconsistency in analysis exported to excel 2018-09-14 12:37:17 +02:00
Shamim Rezaie a7ee1a75e5 MDL-63143 mod_lesson: Check if the module is visible to the user 2018-09-14 20:35:43 +10:00
Shamim Rezaie a756b01f52 MDL-63143 mod_lesson: Add userid param to mod_lesson calendar callbacks 2018-09-14 20:35:43 +10:00
Eloy Lafuente (stronk7) 9c1fc95578 weekly release 3.5.2+ 2018-09-14 11:06:55 +02:00
Shamim Rezaie 5e8396aa71 MDL-63142 mod_label: Check if the module is visible to the user 2018-09-14 17:55:57 +10:00
Shamim Rezaie 0d20375579 MDL-63142 mod_label: Add userid param to mod_label calendar callbacks 2018-09-14 17:55:56 +10:00
Shamim Rezaie 412697a70f MDL-63141 mod_imscp: Check if the module is visible to the user 2018-09-14 17:54:24 +10:00
Shamim Rezaie c0bb26aaf9 MDL-63141 mod_imscp: Add userid param to mod_imscp calendar callbacks 2018-09-14 17:54:24 +10:00
Huong Nguyen fee8383edc MDL-63354 Group: Rollover text on long group names is not consistent 2018-09-14 09:44:26 +07:00
Eloy Lafuente (stronk7) 29eb2d47be MDL-61169 iplookup: Change to another block still remaining to SF 2018-09-13 19:06:44 +02:00
Jun Pataleta d82e50f0a9 MDL-62554 tool_dataprivacy: Integration review fixes 2018-09-13 14:49:45 +08:00
Michael Hawkins ee1e93d511 MDL-63009 tool_dataprivacy: Added site name/link to request emails 2018-09-12 17:45:49 +08:00
Jun Pataleta aed6a3f001 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:47:21 +08:00
Michaël Marinetti 3446e3a257 MDL-62294 lessphp: Fix for PHP 7.2 compatibility
From upstream commit:
https://github.com/oyejorge/less.php/commit/669acc51817a8da162b5f1b7137e79f0e4acc636
2018-09-12 16:47:21 +08:00
Jun Pataleta 385caa2e24 Merge branch 'mdl63321-moodle35' of https://github.com/tlock/moodle into MOODLE_35_STABLE 2018-09-12 15:33:48 +08:00
Jun Pataleta 7f08932a68 Merge branch 'MDL-63231-set-default-value-for-int-param-MOODLE_35' of https://github.com/guillalva06/moodle into MOODLE_35_STABLE 2018-09-12 09:59:36 +08:00
Jun Pataleta 4540e074bc Merge branch 'MDL-50314_35' of git://github.com/do-you-even-curl/moodle into MOODLE_35_STABLE 2018-09-12 09:43:35 +08:00
Eloy Lafuente (stronk7) d05c1e47db Merge branch 'MDL-63130_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-09-11 23:56:33 +02:00
Eloy Lafuente (stronk7) 442e48c4f2 Merge branch 'MDL-63136-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-09-11 23:52:11 +02:00
Eloy Lafuente (stronk7) 8235feb1ec Merge branch 'MDL-62528-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-09-11 23:05:30 +02:00
Guillermo Alvarez 5b75de57f2 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:04:55 -05:00
Fotis Skandalis 11334441a8 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 17:06:22 +03:00
Jun Pataleta e7a3f9b34a MDL-62554 tool_dataprivacy: Bump version for new WS functions 2018-09-10 12:23:51 +08:00
Jun Pataleta 646c0464ec MDL-62554 tool_dataprivacy: Fix display of activity options 2018-09-10 12:22:54 +08:00
Jun Pataleta 6c48400b67 MDL-62554 tool_dataprivacy: Fix template for Bootstrapbase compatibility 2018-09-10 12:22:54 +08:00
Jun Pataleta 4c6cc6c42a MDL-62554 tool_dataprivacy: Remove defaults form
With the changes in this issue, this form is no longer being used.
2018-09-10 12:22:54 +08:00
Jun Pataleta fbbfd84803 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:22:54 +08:00
Jun Pataleta 1e9477e238 MDL-62554 tool_dataprivacy: Unit tests for new WS/API functions 2018-09-10 12:22:54 +08:00
Jun Pataleta 701f3fdb5c 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:22:54 +08:00
Jun Pataleta 8a45db9903 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:22:54 +08:00
Tim Lock e0d05a355a MDL-63321 block: Fix warning in Calendar month block after MDL-60587 2018-09-10 07:44:38 +09:30
Eloy Lafuente (stronk7) bd27666c42 Moodle release 3.5.2 2018-09-08 16:49:53 +02:00
AMOS bot d1787723db Automatically generated installer lang files 2018-09-08 00:07:35 +00:00
Tim Schroeder 408b3e0952 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:18:06 +02:00
Shamim Rezaie 7e973b26de MDL-63139 mod_forum: Check if the module is visible to the user 2018-09-07 16:56:30 +10:00
Shamim Rezaie a82893ac5f MDL-63139 mod_forum: Add userid param to mod_forum calendar callbacks 2018-09-07 16:56:30 +10:00
Shamim Rezaie a027e6dfdc MDL-63138 mod_folder: Check if the module is visible to the user 2018-09-07 15:06:28 +10:00
Shamim Rezaie 275a590d6b MDL-63138 mod_folder: Add userid param to mod_folder calendar callback 2018-09-07 15:06:28 +10:00
Jun Pataleta 7ba9f14fe0 weekly release 3.5.1+ 2018-09-07 11:12:45 +08:00
Jun Pataleta 0d70e9b8e9 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-09-07 11:12:29 +08:00
Shamim Rezaie 168028b097 MDL-63136 mod_data: Check if the module is visible to the user 2018-09-06 20:19:58 +10:00
Shamim Rezaie 77a2e5621f MDL-63136 mod_data: Add userid param to mod_chat calendar callbacks 2018-09-06 20:19:58 +10:00
Mark Nelson af142c1c2d MDL-63130 core_message: add unit test 2018-09-06 18:17:47 +08:00
Pavel Sokolov 6e2fc5e5e1 MDL-63130 message: message_count_unread_message counts sent messages 2018-09-06 18:17:47 +08:00
Shamim Rezaie e64487ed57 MDL-63135 mod_choice: Check if the module is visible to the user 2018-09-06 20:15:03 +10:00
Shamim Rezaie a2b7e585b2 MDL-63135 mod_choice: Add userid param to mod_choice calendar callback 2018-09-06 20:15:03 +10:00
Shamim Rezaie b223dc24a6 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:03 +10:00
Shamim Rezaie b3da43961a MDL-63117 mod_book: Check if the module is visible to the user 2018-09-06 17:46:10 +10:00
Shamim Rezaie edeaac4f7e MDL-63117 mod_book: Add userid param to mod_book calendar callbacks 2018-09-06 17:46:10 +10:00
Jake Dallimore 432d3cc846 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:28 +08:00
Jake Dallimore 59de100b8b 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:28 +08:00
AMOS bot f1e0f1c194 Automatically generated installer lang files 2018-09-05 00:07:29 +00:00
Damyon Wiese 444d046f9e 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:41:46 +02:00
Mihail Geshoski 64722afd45 MDL-62857 theme_boost: Better filtering on navbar / breadcrumbs 2018-09-04 22:41:46 +02:00
Tim Hunt be092b7309 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:41:46 +02:00
Eloy Lafuente (stronk7) 005b2bc8a0 Merge branch 'MDL-63249-35-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-09-04 22:35:03 +02:00
Helen Foster f4bd5f5e1a 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:12:17 +02:00
David Monllao 1a8342d9d4 Merge branch 'MDL-62342-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-09-04 14:34:07 +02:00
Neill Magill 6a87753e12 MDL-62944 calendar: Clarify the intended use of $checkcapability 2018-09-04 12:19:12 +02:00
David Monllao 1d16496ee6 Merge branch 'MDL-62944-m35' of https://github.com/NeillM/moodle into MOODLE_35_STABLE 2018-09-04 12:15:50 +02:00
David Monllao e7dc32ad80 Merge branch 'MDL-55993-35' of https://github.com/albertolarah/moodle into MOODLE_35_STABLE 2018-09-04 10:53:23 +02:00
Jun Pataleta fde541a1eb Merge branch 'MDL-60901_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2018-09-04 10:17:36 +08:00
Dan Poltawski 95ee02b253 MDL-48846 filter: Stop reffering to invalid moodle.org/download/mimetex 2018-09-03 23:45:05 +02:00
Eloy Lafuente (stronk7) f562290f78 Merge branch 'MDL-61325-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-09-03 23:33:52 +02:00
Eloy Lafuente (stronk7) 1273a6665b Merge branch 'MDL-63255-35' of git://github.com/vmdef/moodle into MOODLE_35_STABLE 2018-09-03 23:31:10 +02:00
Eloy Lafuente (stronk7) 74ea4a91e1 Merge branch 'MDL-62848-35-placeholderwidth' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-09-03 23:01:49 +02:00
David Monllao d035bebb1e Merge branch 'MDL-38301-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-09-03 12:44:57 +02:00
Alberto Lara Hernández 4c51211800 Merge branch 'MDL-55993-35' of https://github.com/albertolarah/moodle into MDL-55993-35 2018-09-03 12:34:14 +02:00
Alberto Lara Hernández 61edefee12 MDL-55993 mod_assign: web services don´t set a URL. 2018-09-03 12:34:09 +02:00
David Monllao 304bd3b26b Merge branch 'MDL-55744-35_atto_should_not_autosave_on_not_loggedin_users' of https://github.com/dravek/moodle into MOODLE_35_STABLE 2018-09-03 12:27:57 +02:00
Eloy Lafuente (stronk7) 57c5494741 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:51 +02:00
Víctor Déniz Falcón f1019f4616 Merge branch 'MDL-63255-35' of git://github.com/vmdef/moodle into MDL-63255-35-test 2018-09-03 06:56:27 +01:00
Mihail Geshoski bbdb62fffe MDL-62342 privacy: Fix strings used in the consent on behalf modal 2018-09-03 13:00:04 +08:00
Mihail Geshoski cce2977770 MDL-62342 privacy: Use singular/plural form in labels 2018-09-03 13:00:04 +08:00
Mihail Geshoski 60357a5551 MDL-56998 blog: Remove associated blog posts when module is deleted 2018-09-03 08:37:19 +08:00
AMOS bot ce5ea7e187 Automatically generated installer lang files 2018-09-02 00:07:27 +00:00
AMOS bot 36b7d0471c Automatically generated installer lang files 2018-09-01 00:07:28 +00:00
David Mudrák 580a0918b4 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:55:08 +02:00
David Mudrák 6aaf582982 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:55:08 +02:00
Simey Lameze d6cbf8b8fb 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:17:53 +01:00
Neill Magill e760287046 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:17:53 +01:00
Neill Magill f0b924f980 MDL-62944 activities: Test adding activities with no calendar capability 2018-08-31 10:17:53 +01:00
Neill Magill 1260ed9e33 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:17:52 +01:00
Neill Magill 79df6aee8c 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:17:52 +01:00
Neill Magill ee9c931987 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:17:52 +01:00
Eloy Lafuente (stronk7) 01389839df weekly release 3.5.1+ 2018-08-30 19:04:28 +02:00
Eloy Lafuente (stronk7) 88a78e9307 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-08-30 19:04:25 +02:00
Dan Marsden 99e51855a6 MDL-61325 use correct value when looking for string. 2018-08-30 09:11:15 +08:00
AMOS bot 5263019b3a Automatically generated installer lang files 2018-08-30 00:08:05 +00:00
Eloy Lafuente (stronk7) 442dc8270a MDL-63165 question: Bump expected size of question exports (take II) 2018-08-29 14:39:07 +02:00
Jake Dallimore dab8d7a0dc Merge branch 'MDL-63165-35-fix' of https://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-08-29 12:33:43 +08:00
Andrew Nicols 9f256a8380 MDL-63165 question: Bump expected size of question exports 2018-08-29 10:46:00 +08:00
Eloy Lafuente (stronk7) 6f0614ef19 Merge branch 'MDL-63094-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-08-29 00:20:29 +02:00
Eloy Lafuente (stronk7) 43dfc84482 Merge branch 'MDL-62914-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2018-08-28 23:16:31 +02:00
Victor Deniz 5a7e921f70 MDL-63255 core_user: fix hardcoded sql table aliases 2018-08-28 11:55:17 +01:00
David Monllao 0220cc4bdf Merge branch 'wip-MDL-63165-35' of https://github.com/Beedell/moodle into MOODLE_35_STABLE 2018-08-28 12:28:39 +02:00
Jake Dallimore d470ef4c27 Merge branch 'MDL-63101-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-08-28 16:55:53 +08:00
Andrew Nicols efecaa34a4 Merge branch 'MDL-62782-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-08-28 07:07:37 +08:00
Eloy Lafuente (stronk7) 11694360bd Merge branch 'MDL-62989-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-08-27 17:51:30 +02:00
Jun Pataleta 060e39220c MDL-63187 tool_dataprivacy: Behat fixes for confirmation lang strings 2018-08-27 22:44:35 +08:00
David Monllao e016281821 Merge branch 'MDL-63174-35-emptyusername' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-08-27 15:09:04 +02:00
David Monllao 2267c9fe7f Merge branch 'MDL-63179-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-08-27 12:22:46 +02:00
David Monllao 8bcca194ce MDL-63187 tool_dataprivacy: Update delete purpose and category lang strings 2018-08-27 12:12:04 +02:00
David Monllao 9bb1a66c3c Merge branch 'MDL-63187-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-08-27 11:58:04 +02:00
David Monllao 627b0a7a45 Merge branch 'MDL-63210_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-08-27 11:46:56 +02:00
David Monllao f873ff9ad2 Merge branch 'MDL-62867-35-missing_colon_in_query' of https://github.com/bitumin/moodle into MOODLE_35_STABLE 2018-08-27 11:22:39 +02:00
Andrew Nicols 0dfef1313f Merge branch 'MDL-53024-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-08-27 15:46:34 +08:00
Damyon Wiese e647f49fe4 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:41:12 +08:00
Zig Tan 088f6b973a MDL-38301 mod_assign: Fix date validation logic & message consistency 2018-08-27 15:33:21 +08:00
Andrew Nicols 3c613eb0f9 MDL-63101 cache: Improve accuracy of cache event invalidation 2018-08-27 14:44:11 +08:00
John Beedell 05403f4989 MDL-63165 Question: xml import of question categories 2018-08-24 16:10:07 +01:00
Alberto Lara Hernández a0a10c4d4c MDL-55993 mod_assign: web services don´t set a URL. 2018-08-24 16:33:48 +02:00
Mitxel Moriana f92552d372 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:03:13 +02:00
Luca Bösch 769987cf28 MDL-63179 enrol_self: String and @return tag corrected. 2018-08-24 13:38:08 +02:00
Mihail Geshoski 3bee541afc MDL-62989 privacy: Improve data request order for users 2018-08-24 15:33:19 +08:00
Jake Dallimore 069bf5a9dd weekly release 3.5.1+ 2018-08-24 13:08:59 +08:00
Mark Nelson b5c2fef399 MDL-63210 core: convert for loop to forEach in JS 2018-08-24 11:34:17 +08:00
Jun Pataleta 6c5b701bb5 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:54:24 +08:00
Jun Pataleta 696e063e65 MDL-63187 tool_dataprivacy: Behat tests for purposes/categories CRUD 2018-08-23 16:54:24 +08:00
Jun Pataleta 0807b60603 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:54:24 +08:00
Mark Nelson 2e7dbfaabb 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:38:57 +08:00
Thom Rawson d6e31537bc MDL-63210 core: AJAX call redirects to login page when session expired
Backport of MDL-54551.
2018-08-23 12:36:47 +08:00
Jake Dallimore d01d3d8eef 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:57:24 +08:00
Andrew Nicols 7ac4ad9a8b 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 9d349b8170 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:27:27 +08:00
Andrew Nicols bd20ed1a7c 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:24:04 +08:00
Henning Bostelmann f5d6dcfd06 MDL-62914 Calendar: handle TZURL iCal property 2018-08-22 10:11:03 +08:00
Andrew Nicols 466ae79141 Merge branch 'MDL-62660_35' of https://github.com/stronk7/moodle into MOODLE_35_STABLE 2018-08-22 08:03:36 +08:00
Eloy Lafuente (stronk7) 821001ce9c 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:02:27 +02:00
Jake Dallimore ac7cf1cfeb Merge branch 'MDL-36255-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-08-21 16:06:31 +08:00
Jake Dallimore f2057a1115 Merge branch 'MDL-62534-35' of https://github.com/mackensen/moodle into MOODLE_35_STABLE 2018-08-21 11:44:20 +08:00
Andrew Nicols 61c36e125e Merge branch 'MDL-62660-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-08-21 11:10:45 +08:00
Jun Pataleta 629c7f75b3 MDL-62660 tool_dataprivacy: Behat fix for data deletion 2018-08-21 10:37:56 +08:00
Jun Pataleta bdefa64956 MDL-62660 tool_dataprivacy: CI fixes 2018-08-21 09:31:25 +08:00
Charles Fulton bfc047cef0 MDL-62534 course formats: do not purge empty sections on upgrade 2018-08-20 09:15:24 -04:00
Michael Hawkins 9c9227995c MDL-62660 tool_dataprivacy: Behat additions for deletion and data expiry 2018-08-20 16:28:03 +08:00
Michael Hawkins 3a69718c58 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:28:03 +08:00
Michael Hawkins cb8a553af9 MDL-62660 tool_dataprivacy: Add scheduled task to expire data requests 2018-08-20 16:28:03 +08:00
Michael Hawkins 83dc898b00 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:27:45 +08:00
Andrew Nicols 3e6e80f96f MDL-62660 tool_dataprivacy: Add method for unit tests to run adhoc tasks 2018-08-20 15:32:41 +08:00
Luca Bösch 1b052996ff MDL-36255 grades: allow multilang filters in grades 2018-08-20 08:33:18 +02:00
Jake Dallimore e516332576 Merge branch 'MDL-63097_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2018-08-20 13:52:25 +08:00
Andrew Nicols 50615d7105 Merge branch 'MDL-63176-35' of https://github.com/spvickers/moodle into MOODLE_35_STABLE 2018-08-20 11:17:08 +08:00
Jake Dallimore 867e35d77f Merge branch 'MDL-57741-35' of git://github.com/cescobedo/moodle into MOODLE_35_STABLE 2018-08-20 10:12:06 +08:00
Eloy Lafuente (stronk7) 72337efdf7 weekly release 3.5.1+ 2018-08-17 17:37:48 +02:00
Eloy Lafuente (stronk7) c0d8a1c3e1 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-08-17 17:37:46 +02:00
David Mudrák f6be98b942 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:06:25 +02:00
David Mudrák d694bf2435 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:06:25 +02:00
Jake Dallimore 2f58da96bb Merge branch 'MDL-62884-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-08-17 16:04:47 +08:00
Damyon Wiese 66f63a3bf6 MDL-62884 privacy: Additional fix for popper.js
For a table with action menus inside a scrollable region, we need to ensure
the table is at least big enough.
2018-08-17 15:13:55 +08:00
Stephen Vickers 349ac5cbd7 MDL-63176 enrol_lti: Add $COURSE to global
Ensure that capabilities using $COURSE can be parsed.
2018-08-16 22:44:18 +01:00
cescobedo 7985a77474 MDL-57741 enrol_lti: Add Launch URL to Published as LTI tools 2018-08-16 09:11:29 +02:00
AMOS bot 9df6a3972d Automatically generated installer lang files 2018-08-16 00:08:18 +00:00
Bas Brands c24997f074 MDL-62528 forum: Fixed vertical position when loading permalinks 2018-08-15 11:38:14 +02:00
Jake Dallimore 5e26c462d3 Merge branch 'MDL-63050-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-08-15 10:59:54 +08:00
Andrew Nicols bd547eb6dd Merge branch 'MDL-62600-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-08-15 08:55:13 +08:00
AMOS bot b4db1fd8ad Automatically generated installer lang files 2018-08-15 00:07:40 +00:00
Luke Carrier 8cdf03c5a9 MDL-61238 cohort: require_once all libraries 2018-08-15 00:13:12 +02:00
Eloy Lafuente (stronk7) 17567f33c9 Merge branch 'MDL-62341-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-08-15 00:06:06 +02:00
Eloy Lafuente (stronk7) 8509759768 Merge branch 'MDL-58409-35_needs_clean_in_autocomplete_element' of https://github.com/dravek/moodle into MOODLE_35_STABLE 2018-08-14 17:50:29 +02:00
Eloy Lafuente (stronk7) 20eb1297ef Merge branch 'MDL-61650-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-08-14 16:57:26 +02:00
Michael Hawkins ddf605c655 MDL-62600 tool_dataprivacy: Corrected availability of PO pages to admins 2018-08-14 11:30:09 +08:00
Andrew Nicols 6efc731aab Merge branch 'MDL-62643-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-08-14 09:12:04 +08:00
Andrew Nicols 6ea7ce8acb Merge branch 'MDL-62896-35' of git://github.com/k-holland/moodle into MOODLE_35_STABLE 2018-08-14 08:05:21 +08:00
David Monllao 74a30640d6 Merge branch 'MDL-62761-35' of https://github.com/jmvedrine/moodle into MOODLE_35_STABLE 2018-08-13 15:30:08 +02:00
David Monllao 105bfe1d95 Merge branch 'MDL-62886-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-08-13 14:25:39 +02:00
David Monllao e87bbfbe94 Merge branch 'MDL-59015-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-08-13 12:19:28 +02:00
Karen Holland 5450a19dec MDL-62896 Privacy: External plugin Additional label update. 2018-08-13 08:39:57 +00:00
Jake Dallimore 094730c7d2 Merge branch 'MDL-60114_35_radio-option-choose' of https://github.com/awagner/moodle into MOODLE_35_STABLE 2018-08-13 16:03:27 +08:00
Mihail Geshoski 76f2ed9c6a MDL-59015 blocks: Confusing View more button in course overview block 2018-08-13 08:54:03 +08:00
Mihail Geshoski 0af0d1d7f6 MDL-62341 privacy: Add behat test 2018-08-13 07:57:48 +08:00
Mihail Geshoski 6415201009 MDL-62341 privacy: Add link to previous page in viewall policies page 2018-08-13 07:57:48 +08:00
Jean-Michel Vedrine 99566b5a60 MDL-62761 lesson: wrong deadlines on index with overrides 2018-08-12 07:49:57 +02:00
Andreas Wagner 06a92988fa MDL-60114 mod_data: adding db activity lost radio field choose option 2018-08-11 07:43:32 +02:00
Luca Bösch 4202a6935e MDL-62886 boost: radio form element required icon 2018-08-10 17:11:17 +02:00
Eloy Lafuente (stronk7) 7c730dfe01 weekly release 3.5.1+ 2018-08-10 13:22:06 +02:00
Andrew Nicols 6e0f59fe32 Merge branch 'MDL-62619_35' of git://github.com/stronk7/moodle into MOODLE_35_STABLE 2018-08-10 08:45:06 +08:00
Eloy Lafuente (stronk7) 6ed9356daf MDL-63097 phpunit: decouple user lastping and session start in tests
Previously the test was assuming that the user last ping, when
accessing to a chat should match the first (enter) system message
sent to the chat. And that's ok 99% of times but, if seconds advance
between the creation of the chat_users record and the chat_messages
one, then they don't match.

So now, the assumption is not used anymore and the expectation
is the timestamp of that first (enter) system message, explicitly.
2018-08-10 02:31:59 +02:00
Eloy Lafuente (stronk7) 8539f6168e 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:16:12 +02:00
Eloy Lafuente (stronk7) 9e6ea43d93 Merge branch 'MDL-62581-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-08-09 00:09:21 +02:00
Andrew Nicols 6b65d96d70 Merge branch 'MDL-62993_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-08-08 13:10:59 +08:00
Eloy Lafuente (stronk7) 98e96df381 Merge branch 'MDL-62619-35-privacycontexts' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-08-08 01:03:12 +02:00
Eloy Lafuente (stronk7) 127b7446a0 Merge branch 'MDL-43334-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-08-08 00:16:30 +02:00
Eloy Lafuente (stronk7) a032e58de6 Merge branch 'MDL-61839-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-08-07 23:56:25 +02:00
Eloy Lafuente (stronk7) 4db39b4571 Merge branch 'MDL-61870-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-08-07 23:48:39 +02:00
Eloy Lafuente (stronk7) a9b13cfac3 Merge branch 'MDL-62750_35' of https://github.com/aanabit/moodle into MOODLE_35_STABLE 2018-08-07 17:23:51 +02:00
Eloy Lafuente (stronk7) c1d4386dd7 Merge branch 'MDL-63026_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2018-08-07 16:00:20 +02:00
David Matamoros b3065a69ed MDL-55744 EDITOR_ATTO: Now atto does not autosave for not loggedin user 2018-08-07 15:28:20 +02:00
David Matamoros aba27d5317 MDL-58409 core_form: needs clean in autocomplete element 2018-08-07 11:03:04 +02:00
Andrew Nicols 7391dfc208 Merge branch 'MDL-62798-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-08-07 13:08:54 +08:00
Andrew Nicols 6d2fedaa47 Merge branch 'wip-MDL-61424-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2018-08-07 09:29:41 +08:00
Amaia Anabitarte 02f31bb65b MDL-62750 lang: Trim langlist setting values 2018-08-06 09:40:15 +01:00
Andrew Nicols 1e2f780503 MDL-61515 theme: Pre-compile boost 2018-08-06 15:21:50 +08:00
Andrew Nicols 57bebf7c4b Merge branch 'MDL-61515-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-08-06 15:06:04 +08:00
Andrew Nicols f940b5dcd9 Merge branch 'MDL-62996-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-08-06 12:28:03 +08:00
Mihail Geshoski 7cccc7e03a MDL-62798 repositories: Report sections by name in server repository 2018-08-06 09:56:30 +08:00
Mihail Geshoski 76483d4f45 MDL-61839 glossary: One letter search in glossary returns all entries 2018-08-06 09:47:10 +08:00
Andrew Nicols d3ef856e79 Merge branch 'MDL-62969_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-08-06 09:28:20 +08:00
Damyon Wiese 5c4aef2664 MDL-61650 assign: More consistent empty text
Consistently check for empty submissions with count_words(trim($text)).
2018-08-03 16:53:45 +08:00
Damyon Wiese ff7ec97918 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:22 +08:00
Andrew Nicols 4bd4b46070 weekly release 3.5.1+ 2018-08-03 11:30:29 +08:00
Andrew Nicols 2392c10734 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-08-03 11:30:27 +08:00
Damyon Wiese 6b74d76fa9 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:19:59 +08:00
Damyon Wiese f86bd7ece0 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:03:06 +08:00
Zig Tan 805417c33d 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:03:05 +08:00
Zig Tan 127b54ffbe 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:03:05 +08:00
Andrew Nicols 8450d9948a Merge branch 'MDL-59847-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-08-02 11:40:08 +08:00
Andrew Nicols 3eca9bf311 Merge branch 'MDL-62983-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2018-08-02 11:22:50 +08:00
Andrew Nicols 6b3738bc20 MDL-63050 cachestore_redis: Update hExists to check empty 2018-08-02 11:00:27 +08:00
Andrew Nicols 1974156194 MDL-63050 redis: Make session check compatible with Redis 4.0 2018-08-02 11:00:27 +08:00
David Mudrák f0a4839154 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:37:07 +08:00
Eloy Lafuente (stronk7) 3ab6d8ba2b Merge branch 'MDL-57666-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-08-02 01:27:55 +02:00
Eloy Lafuente (stronk7) 1d2b6c84a2 Merge branch 'MDL-62965-35-userprofilesignup' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-08-02 00:41:36 +02:00
Eloy Lafuente (stronk7) 266744a6f9 Merge branch 'MDL-59595-35-2' of git://github.com/snake/moodle into MOODLE_35_STABLE 2018-08-02 00:21:35 +02:00
Eloy Lafuente (stronk7) c3a1ccc244 Merge branch 'MDL-62977_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-08-01 16:42:10 +02:00
Jonathon Fowler 96df578e8e MDL-62983 core_user: Hold multiple filters when clicking any link 2018-08-01 12:11:13 +02:00
Eloy Lafuente (stronk7) 6cf6523cc7 Merge branch 'MDL-41847-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2018-07-31 23:50:52 +02:00
David Monllao 43eadce6fc Merge branch 'm35_MDL-58015' of https://github.com/danmarsden/moodle into MOODLE_35_STABLE 2018-07-31 13:37:11 +02:00
David Monllao 98fe6eee32 Merge branch 'MDL-59611-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-07-31 13:31:07 +02:00
David Monllao 671ad6b497 Merge branch 'MDL-44538-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-07-31 11:21:16 +02:00
Jun Pataleta 49bfb1e5f9 Merge branch 'MDL-58768-35-2' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-07-31 16:18:26 +08:00
David Monllao 000a5d0bec MDL-63026 course: Fix reference to unexisting capability 2018-07-31 08:32:00 +02:00
Shamim Rezaie 936ed6067f MDL-58768 mod_assign: Fixed incorrect version number in upgrade.php 2018-07-31 16:23:56 +10:00
Shamim Rezaie 238006f649 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 16:15:38 +10:00
Shamim Rezaie d11038dd43 MDL-58768 core: Fix a typo for callback name 2018-07-31 16:15:38 +10:00
Shamim Rezaie 6b8b06911b MDL-58768 mod_assign: Add $user param to assign::can_grade 2018-07-31 16:15:38 +10:00
Shamim Rezaie fe1ae23939 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 16:15:38 +10:00
Shamim Rezaie 64b5d44abc MDL-58768 coursecat: coursecat::get to accept a $user parameter 2018-07-31 16:15:37 +10:00
Shamim Rezaie 526e3e8c97 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 16:15:37 +10:00
Shamim Rezaie 8668391630 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 16:15:06 +10:00
Shamim Rezaie f35e7a0eeb MDL-58768 Calendar: Added userid param to calendar_get_default_courses 2018-07-31 16:07:15 +10:00
Eloy Lafuente (stronk7) 949f522c13 Merge branch 'MDL-57977-35' of git://github.com/vmdef/moodle into MOODLE_35_STABLE 2018-07-30 21:10:08 +02:00
Eloy Lafuente (stronk7) ac6bef4e38 Merge branch 'MDL-63002_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-07-30 16:15:27 +02:00
Marina Glancy 72bb7ac302 MDL-61424 admin: reset registration if token is rejected 2018-07-30 16:12:39 +02:00
Mark Nelson 1b4cd6be30 MDL-63002 core: fixed incorrect calls to non-existent delete_record() 2018-07-30 21:00:25 +08:00
Adrian Perez 10dae695ec MDL-63002 core_grade: fixed deletion of overriden letters 2018-07-30 21:00:24 +08:00
Jun Pataleta fc12d8d459 Merge branch 'MDL-62931-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-07-30 16:34:36 +08:00
Claude Vervoort c46c85055b MDL-62993 ltiservice_memberships: make message an array per spec
Also added resultSourcedId to member for BC.
2018-07-30 10:07:22 +08:00
Mihail Geshoski f4411ba700 MDL-57666 repositories: Error when copying file from Dropbox repository 2018-07-30 09:29:51 +08:00
AMOS bot 37002deeda Automatically generated installer lang files 2018-07-29 00:07:19 +00:00
David Mudrák 06e4325bda MDL-62965 core_user: Fix missing user profile fields on signup page 2018-07-27 10:36:56 +02:00
Jun Pataleta 8aa12f5bff Merge branch 'MDL-62950-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-07-27 16:19:02 +08:00
David Mudrák 84bef5413c 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:38 +02:00
David Mudrák df26945105 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:38 +02:00
Andrew Nicols b9b8d94716 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:38 +02:00
David Mudrák ec92a0762d 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:04:56 +02:00
Jun Pataleta 9bd851f39c MDL-62996 tool_dataprivacy: Add 3.4/3.3 upgrade steps to 3.5+
This is to ensure that sites that have the early dev version of the tool
can upgrade smoothly to 3.5 and up.
2018-07-27 15:57:01 +08:00
Sara Arjona 502b17bebd 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:22 +02:00
Sara Arjona 2857ca0c9f MDL-41847 core_user: Add lang to login URL email for new user accounts 2018-07-27 09:07:22 +02:00
Andrew Nicols 5a1aa729df MDL-62950 behat: Disable editing for boost test 2018-07-27 10:59:46 +08:00
Andrew Nicols 6020745280 MDL-62950 behat: Correct navbar references 2018-07-27 10:59:46 +08:00
Andrew Nicols 948485dbd6 MDL-62950 behat: Correct use of nav 2018-07-27 10:59:45 +08:00
Andrew Nicols 1da88f2c6a MDL-62950 behat: Correct path to P&P 2018-07-27 10:59:45 +08:00
Mark Nelson ab38db069e MDL-62977 mod_wiki: style buttons appropriately 2018-07-27 10:51:25 +08:00
Dan Marsden c1a29fc252 MDL-58015 mod_scorm: set orgidentifier correctly for popup. 2018-07-27 10:36:43 +12:00
Eloy Lafuente (stronk7) a1d8976005 weekly release 3.5.1+ 2018-07-26 19:56:50 +02:00
Vadim Tabunshchik c0171e6090 MDL-62871 quiz: incorrect foreign key declaration 2018-07-26 11:38:51 +02:00
Eloy Lafuente (stronk7) bdf7f7613e Merge branch 'MDL-62771-35_move_plag_disclosure' of https://github.com/jmcgettrick/moodle into MOODLE_35_STABLE 2018-07-26 00:39:10 +02:00
Jun Pataleta b42457028a Merge branch 'MDL-62852-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2018-07-25 16:38:11 +08:00
Sara Arjona 783f2a8b8e MDL-62852 policy: Display policy audience in the viewall.php page 2018-07-25 10:20:37 +02:00
Jun Pataleta ac496f22af Merge branch 'MDL-62807-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-07-25 13:44:36 +08:00
Andrew Nicols a1c3aedf5b Merge branch 'MDL-60826-35-fix' of https://github.com/lameze/moodle into MOODLE_35_STABLE 2018-07-25 13:42:58 +08:00
Simey Lameze a2c9e82c42 MDL-60826 calendar: fix group event type logic 2018-07-25 12:54:50 +08:00
Andrew Nicols 82d2d27cd3 Merge branch 'MDL-62897-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-07-25 12:42:58 +08:00
Tony Butler e8d8bccb25 MDL-59611 mod_assign: Move help icons for subplugin types out of labels 2018-07-25 12:22:50 +08:00
Damyon Wiese d5859dacc8 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-07-25 12:09:31 +08:00
Cory Buecker d738ae91e7 MDL-62969 mod_lti: fix parsed value for LtiLink.memberships.url
Fixes a typo in the function that replaces the LTI placeholder variable
LtiLink.memberships.url with the actual endpoint. Without this change,
the placeholder variable, "$LtiLink.memberships.url" is not replaced in
the LTI launch parameters.
2018-07-25 12:00:10 +08:00
Shamim Rezaie daff43e9c7 MDL-62897 Questions: Find duplicate top cats per context and fix them 2018-07-25 12:29:04 +10:00
Andrew Nicols 6aedf45bee Merge branch 'MDL-60826-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2018-07-25 09:19:43 +08:00
Simey Lameze fa9fffdc9a 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 08:59:04 +08:00
Simey Lameze 7ad1d28554 MDL-60826 calendar: restrict course fields to be retrieved 2018-07-25 08:59:04 +08:00
Simey Lameze 3f3385c46a MDL-60826 calendar: update manage subscription page to use new function 2018-07-25 08:59:04 +08:00
Simey Lameze 11ebc149ed MDL-60826 calendar: lazy load groups on event form 2018-07-25 08:59:04 +08:00
Simey Lameze c985ad6263 MDL-60826 calendar: tests for calendar_get_allowed_event_types 2018-07-25 08:59:04 +08:00
Simey Lameze 6a6d683283 MDL-60826 calendar: introduce calendar_get_allowed_event_types function 2018-07-25 08:59:04 +08:00
Andrew Nicols ab9f7ab790 Merge branch 'MDL-61652-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-07-25 08:34:39 +08:00
Eloy Lafuente (stronk7) 3248a578e9 Merge branch 'MDL-62961_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-07-25 01:24:52 +02:00
Eloy Lafuente (stronk7) 3cd9d0a689 Merge branch 'MDL-62935-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-07-25 01:17:22 +02:00
Andrew Nicols 8ee6b2a201 MDL-62653 behat: Ensure that tasks run properly from behat 2018-07-25 00:39:04 +02:00
Eloy Lafuente (stronk7) 692049a9c1 Merge branch 'MDL-60874-35-enrolautocomplete' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-07-24 19:06:07 +02:00
Eloy Lafuente (stronk7) 36895ee702 Merge branch 'MDL-62925_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-07-24 18:32:49 +02:00
Jun Pataleta 68e2d67939 Merge branch 'MDL-62919-35' of git://github.com/cescobedo/moodle into MOODLE_35_STABLE 2018-07-24 16:24:04 +08:00
Bas Brands dd6f34e334 MDL-62935 boost: slideshow view page overflow 2018-07-24 10:23:20 +02:00
Jun Pataleta 310eff99fc Merge branch 'MDL-62939-35-cleanhtmluserdesc' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-07-24 11:58:20 +08:00
sam marshall 5047c83b9c MDL-61652 tool_dataprivacy: Add capabilities to control data downloads 2018-07-24 08:47:09 +08:00
Jake Dallimore 5b531aabee MDL-59595 admin: Make sure $ADMIN is properly unset when changing users 2018-07-24 08:31:22 +08:00
Jake Dallimore 5723130d84 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:31:22 +08:00
Victor Deniz f490505b23 MDL-57977 search: GlobalSearch by alternate name fields
Enable support for searching all name fields in search
2018-07-23 10:11:37 +01:00
Damyon Wiese ed90c88864 MDL-62581 backup: CSS fixes
Sanitise the CSS for backup and restore. Main fixes are to sanitise the form-inline styles and set a fixed
width for the search forms within the restore form.
2018-07-23 16:20:01 +08:00
Mark Nelson faabcf6d76 MDL-62961 mod_feedback: style buttons appropriately 2018-07-23 15:49:06 +08:00
Andrew Nicols 8837262d2c Merge branch 'MDL-35977-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-07-23 15:31:17 +08:00
Jun Pataleta e30562a127 Merge branch 'MDL-62948-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-07-23 15:18:49 +08:00
Jun Pataleta b43f63c11f Merge branch 'MDL-62949-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-07-23 14:53:57 +08:00
Andrew Nicols 78ccc2c951 Merge branch 'MDL-62962-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-07-23 14:51:43 +08:00
Jun Pataleta 9835dc02dd MDL-62962 tool_dataprivacy: Move user generation within the test 2018-07-23 13:36:14 +08:00
Shamim Rezaie 5420485076 MDL-62897 Questions: Fix multi top cats in question_save_from_deletion 2018-07-23 14:37:48 +10:00
Shamim Rezaie e69a3f20ee MDL-62897 restore: Fix component name in get_string() 2018-07-23 14:37:48 +10:00
Shamim Rezaie 5e29146127 MDL-62931 Questions: Escaping lang strings properly 2018-07-23 14:26:43 +10:00
Andrew Nicols 421619e6e3 Merge branch 'MDL-61707-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-07-23 11:40:53 +08:00
Andrew Nicols 39ffa8c6e3 Merge branch 'MDL-29701-35' of https://github.com/phuchau1509/moodle into MOODLE_35_STABLE 2018-07-23 09:44:02 +08:00
Mihail Geshoski 53e622ba88 MDL-61707 authentication: Remove presignup session upon user signup 2018-07-23 09:33:21 +08:00
Mihail Geshoski 3f70323ba7 MDL-35977 comments: Missing label in blog and assignment comment area 2018-07-23 08:55:51 +08:00
Andrew Nicols 99d1a03857 weekly release 3.5.1+ 2018-07-20 15:09:13 +08:00
Andrew Nicols a2ddeab20e Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-07-20 15:09:11 +08:00
Andrew Nicols bb05597274 MDL-62949 calendar: Fix behat nav to calendar 2018-07-20 11:48:44 +08:00
Andrew Nicols cb8c503098 MDL-62948 tool_policy: Increase window size
In the default window size the floating footer detaling the privacy
policies covers the "Login as guest" button.
2018-07-20 11:12:06 +08:00
Jake Hau dfe3389cf5 MDL-29701 editor: mform disableif doesn't work on editor element 2018-07-19 11:37:36 +07:00
David Mudrák aac5333538 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:29:53 +02:00
Jun Pataleta c9038ad429 Merge branch 'MDL-62811_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-07-18 16:12:07 +08:00
Jun Pataleta 6d0a80dfc1 Merge branch 'MDL-62769_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-07-18 14:54:25 +08:00
Jun Pataleta f22286dd83 Merge branch 'MDL-62781-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-07-18 10:05:29 +08:00
Jun Pataleta c4030220a4 MDL-62781 core_question: Remove unnecessary assertion 2018-07-18 09:59:37 +08:00
Tim Hunt e088a1f198 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:36 +08:00
AMOS bot b6f35bf63e Automatically generated installer lang files 2018-07-18 00:07:34 +00:00
cescobedo b5282bfb67 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:07:53 +02:00
Nick Phillips 5721a09e82 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-17 14:37:19 +02:00
David Monllao 21e4f90ca8 Merge branch 'MDL-54830-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-07-17 13:55:11 +02:00
David Monllao 9cb0f99c37 Merge branch 'MDL-61351_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-07-17 12:32:08 +02:00
Tim Schroeder 4c66ff31c8 MDL-61351 auth_shibboleth: removed redundant session handler class check 2018-07-17 16:46:26 +08:00
Tim Schroeder 2542cb94e4 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:46:26 +08:00
Mark Nelson 97be43646f 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:46:26 +08:00
Tim Schroeder 4b1adeef8d 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:46:26 +08:00
David Monllao 0ef5bc0b18 Merge branch 'MDL-62868-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-07-17 10:20:23 +02:00
David Monllao 8632026272 Merge branch 'MDL-62663_35' of https://github.com/andrewhancox/moodle into MOODLE_35_STABLE 2018-07-17 09:58:41 +02:00
David Monllao 706ba3f3af Merge branch 'MDL-60924-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2018-07-17 09:39:06 +02:00
Andrew Nicols c2c97dee39 Merge branch 'MDL-62889_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-07-17 12:13:01 +08:00
Mark Nelson c74949b071 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-17 12:00:14 +08:00
Mark Nelson 6dc3988fa0 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-17 12:00:13 +08:00
Mark Nelson 1d59ae4286 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-17 12:00:13 +08:00
Mark Nelson 38d309036c 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-17 12:00:13 +08:00
Mark Nelson 3c2fa60af3 MDL-62925 mod_wiki: style 'Search wikis' button 2018-07-17 11:31:47 +08:00
Andrew Nicols a9b2db5880 Merge branch 'MDL-62849-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-07-17 10:35:54 +08:00
Adrian Greeve 3482ea90a6 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:27:19 +08:00
AMOS bot c50377f55f Automatically generated installer lang files 2018-07-17 00:08:18 +00:00
David Mudrák 2a9787beee 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 21:25:40 +02:00
David Mudrák 73df15dd67 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 21:25:40 +02:00
sarjona 3fe9524aaf MDL-60924 core_user: Hold participant filters when clicking some link 2018-07-16 18:06:12 +02:00
David Monllao 0ec785bfa5 Merge branch 'MDL-49025-m35' of https://github.com/NeillM/moodle into MOODLE_35_STABLE 2018-07-16 13:35:06 +02:00
David Monllao c6fa9f2ea2 Merge branch 'MDL-61019-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-07-16 13:25:13 +02:00
Damyon Wiese c485c0c443 MDL-62807 output: Support .list-unstyled class
Category management lists should not have bullets.

We support this class in "boost" theme but not in bootstrapbase and there are uses of it in core.
2018-07-16 14:04:03 +08:00
Andrew Nicols 474ec7e94b Merge branch 'MDL-45851_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-07-16 13:18:16 +08:00
Jake Dallimore d7b6ef5729 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:42:53 +08:00
Jake Dallimore fb6ae10135 MDL-62868 core_group: clear group_grouping cache when changing grouping 2018-07-16 10:36:04 +08:00
Jake Dallimore cadff587be Merge branch 'MDL-45389-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-07-16 10:11:58 +08:00
Neill Magill 74fbce7560 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:04:53 +01:00
Neill Magill 6ede900c49 MDL-49025 assign: Test than an empty directory will not submit 2018-07-13 14:04:53 +01:00
Luca Bösch 4f7cf4088d MDL-61019 Theme boost: lesson display issues with buttons/progress bar. 2018-07-13 09:25:40 +02:00
Luca Bösch 76486ab639 MDL-45389 theme_bootstrapbase: Forum index page alignment in clean. 2018-07-13 09:25:23 +02:00
Luca Bösch a3809c4fc6 MDL-44538 action_menu: rounded corner of highlights only where needed. 2018-07-13 09:25:17 +02:00
Jake Dallimore b80a22f5ba weekly release 3.5.1+ 2018-07-13 12:26:16 +08:00
Jake Dallimore ef6bdbae8e Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-07-13 12:26:14 +08:00
Andrew Nicols 85abbf80e2 Merge branch 'MDL-62746-35-fix' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-07-12 16:19:52 +08:00
Jun Pataleta f2757d51a9 MDL-62746 tag: Behat fix for combining tags scenario 2018-07-12 16:09:10 +08:00
David Monllao 24e83b2807 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:52 +08:00
AMOS bot 4e37604528 Automatically generated installer lang files 2018-07-12 00:08:29 +00:00
David Monllao 8b2ae94442 Merge branch 'MDL-62618-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-07-11 18:48:16 +02:00
Jake Dallimore 4dec82b25b Merge branch 'MDL-62712-35' of https://github.com/HuongNV13/moodle into MOODLE_35_STABLE 2018-07-11 09:02:28 +08:00
Andrew Nicols e3796a0678 Merge branch 'MDL-52318-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-07-11 08:58:37 +08:00
Andrew Nicols 104c9ffae9 Merge branch 'MDL-62026-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-07-11 08:15:57 +08:00
AMOS bot c5a4536bb8 Automatically generated installer lang files 2018-07-11 00:09:53 +00:00
Andrew Hancox 740db2e5c3 MDL-62663 core_user: Enforce viewalldetails capability when editing user 2018-07-10 13:28:18 +01:00
David Monllao 9fc60dfeb1 Merge branch 'MDL-62262-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-07-10 13:32:38 +02:00
David Monllao c270b92ddb Merge branch 'MDL-62823-m35' of https://github.com/NeillM/moodle into MOODLE_35_STABLE 2018-07-10 11:44:52 +02:00
Andrew Nicols 835d570210 Merge branch 'MDL-61578-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-07-10 16:46:26 +08:00
Huong Nguyen 7a81bcdb34 MDL-62712 Filepicker: Improve upload process
Lost the uploading file when user press Submit before upload process has done
2018-07-10 15:20:18 +07:00
David Monllao 9818499ed8 Merge branch 'MDL-62814-35' of https://github.com/HuongNV13/moodle into MOODLE_35_STABLE 2018-07-10 07:50:53 +02:00
Jun Pataleta 5e0c2c9815 MDL-62026 tool_dataprivacy: Behat tests for contacting PO 2018-07-10 12:31:26 +08:00
Jun Pataleta 50e48b78e9 MDL-62026 tool_dataprivacy: Allow manual completion of general enquiries 2018-07-10 12:31:26 +08:00
Andrew Hancox f3a11484ad MDL-61578 backup: Added unit test for is_course_modified check. 2018-07-10 11:02:23 +08:00
Michael Hawkins af9b4f1f3b MDL-61578 backup: Prevent backup logging triggering fresh backups.
Thanks to Renaat Debleu for their contribution to this solution.
2018-07-10 11:02:23 +08:00
Andrew Nicols 25c946f628 Merge branch 'MDL-62746-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-07-10 10:08:52 +08:00
Jake Dallimore 110f3a3d68 Merge branch 'MDL-62772-35_always_show_disclosure' of https://github.com/jmcgettrick/moodle into MOODLE_35_STABLE 2018-07-10 09:00:34 +08:00
David Monllao b20a4bc15c Merge branch 'mdl35_MDL-62753' of https://github.com/OdyX/moodle into MOODLE_35_STABLE 2018-07-09 15:16:00 +02:00
David Monllao d4315bf53e Merge branch 'MDL-56881-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-07-09 14:39:14 +02:00
David Monllao f31105a9f5 Merge branch 'MDL-62037-35' of https://github.com/lethevinh/moodle into MOODLE_35_STABLE 2018-07-09 13:48:53 +02:00
David Monllao 771c8455cb Merge branch 'MDL-62831-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-07-09 13:36:24 +02:00
David Monllao 8297de9fa3 MDL-59599 navigation: Strict zero-position comparision 2018-07-09 12:27:36 +02:00
David Monllao e336f07cd7 Merge branch 'MDL-59599-35' of https://github.com/Kathrin84/moodle into MOODLE_35_STABLE 2018-07-09 12:00:10 +02:00
John McGettrick 2ff2c49c85 MDL-62772 mod_assign: Show disclosure for all submitters 2018-07-09 09:15:52 +01:00
Andrew Nicols 2f7aaf1d53 Merge branch 'MDL-33509-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-07-09 14:01:55 +08:00
Andrew Nicols 551f57926a Merge branch 'MDL-62808_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-07-09 13:30:13 +08:00
Damyon Wiese b8daa178de 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:43 +08:00
Damyon Wiese 8405e6f1cc MDL-43334 backup: Lanuage for cancel
Cancel backup buttons need clear lang strings.
2018-07-09 12:18:43 +08:00
Andrew Nicols 89076b49fb MDL-56093 auth_db: Remove issue no. from comment 2018-07-09 12:14:33 +08:00
Andrew Nicols 8fc16d9e6a Merge branch 'MOODLE_35_STABLE_MDL_56093' of https://github.com/eledia/moodle into MOODLE_35_STABLE 2018-07-09 12:14:29 +08:00
Jake Dallimore 5136441985 Merge branch 'MDL-61359-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-07-09 12:11:05 +08:00
Mark Nelson 1afa3903ae MDL-62808 core_message: fixed 'useridto' being incorrectly set to 0 2018-07-09 12:00:40 +08:00
Jake Dallimore 4c32762ca7 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:33:09 +08:00
Jake Dallimore 313531b030 MDL-56881 mod_choice: add unit tests for choice_user_submit_response
Tests cover option limits and multiple option responses.
2018-07-09 11:06:51 +08:00
Jake Dallimore 2b37ee6049 MDL-56881 mod_choice: clarify lang string for limit-reached scenarios 2018-07-09 11:06:51 +08:00
Jake Dallimore a5f3967e57 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:06:51 +08:00
Eloy Lafuente (stronk7) 5b78584fdb Moodle release 3.5.1 2018-07-07 06:54:07 +02:00
AMOS bot ce390c4725 Automatically generated installer lang files 2018-07-07 00:08:27 +00:00
Luca Bösch 942d4df55b MDL-62262 quiz: quiz index page showing wrong dates. 2018-07-06 14:47:55 +02:00
vinhle 23628a98fc MDL-62037 Filepicker: Review image not change when overwrite same 2018-07-06 17:52:24 +07:00
John McGettrick 2daceaf000 MDL-62771 mod_forum: Move print_disclosure 2018-07-06 09:25:35 +01:00
Andrew Nicols 8675c2c908 weekly release 3.5+ 2018-07-06 14:05:15 +08:00
Andrew Nicols 70ffd8bb2b Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-07-06 14:05:13 +08:00
Huong Nguyen 6c1aa273f2 MDL-62814 Question: Improve column base display_header
Column base does not support custom tip if sortable is an array
2018-07-06 10:58:55 +07:00
Tim Hunt 8cc2d39207 MDL-62811 question bank: rendering shouldn't load individual questions 2018-07-05 17:01:35 +01:00
Benjamin Wolf cac9523423 MDL-56093 auth_db: Save custom profile fields in auth_db 2018-07-05 11:15:49 +02:00
Didier 'OdyX' Raboud cb4bb6efc5 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:14 +02:00
Michael Hawkins 750121698f MDL-62618 user: Display full names consistently on users page 2018-07-05 10:17:15 +08:00
Michael Hawkins a78f6cd123 MDL-62618 forum: Made full names displayed consistent 2018-07-05 10:17:15 +08:00
Jake Dallimore c2fea8ae43 Merge branch 'MDL-62670-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2018-07-05 09:26:05 +08:00
AMOS bot 0a520053cb Automatically generated installer lang files 2018-07-05 00:08:24 +00:00
Kathrin Osswald 1da4edbaf0 MDL-59599 navigation: Improve activity status for nav nodes. 2018-07-04 19:59:41 +02:00
Tim Hunt 9eff7d9535 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:34:38 +01:00
Sara Arjona e154204728 MDL-62670 policy: viewall.php must display always all active policies
The viewall.php page is called from the mobile app to display the policies
to the users before agree them. That's why it must display all the active
policies (even for guests), to guarantee the users agree all current
policies from the app.
2018-07-04 12:18:52 +02:00
Sara Arjona 2d90a7d91a MDL-62670 policy: Remove footer link when there are not active policies 2018-07-04 12:18:52 +02:00
Tim Hunt 8ac7c623d3 MDL-62820 question import: properly escape output 2018-07-04 15:40:58 +08:00
Jake Dallimore caa9881c0d Merge branch 'wip-nolink-bug-35' of https://gitlab.di.unito.it/rabellino/moodle into MOODLE_35_STABLE 2018-07-04 14:38:13 +08:00
Damyon Wiese b01258d7f0 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:17 +08:00
Jake Dallimore f0188d7b66 Merge branch 'MDL-41463-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-07-04 12:59:21 +08:00
Damyon Wiese 4e52235a23 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:45 +08:00
Jake Dallimore ab94fee038 Merge branch 'MDL-44081-35' of git://github.com/zig-moodle/moodle into MOODLE_35_STABLE 2018-07-04 10:50:48 +08:00
Andrew Nicols 2d64d63373 MDL-62834 behat: Move include to function 2018-07-04 10:45:25 +08:00
Eloy Lafuente (stronk7) 6cb165d681 Merge branch 'wip-MDL-62526-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2018-07-04 04:19:24 +02:00
Adrian Greeve 55fc303a5f MDL-62616 tool_log: Add a setting to disable exporting logs. 2018-07-04 09:59:32 +08:00
Eloy Lafuente (stronk7) c453ea21e1 Merge branch 'MDL-62288_35' of https://bitbucket.org/ujiapps/moodle-uji into MOODLE_35_STABLE 2018-07-04 01:21:19 +02:00
Eloy Lafuente (stronk7) 24e4ec9d60 Merge branch 'MDL-62792_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-07-04 00:55:22 +02:00
Eloy Lafuente (stronk7) 25e9be8ea9 Merge branch 'MDL-62838_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-07-04 00:52:14 +02:00
Eloy Lafuente (stronk7) 9ffcaa7db7 Merge branch 'MDL-62834_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-07-04 00:46:40 +02:00
Eloy Lafuente (stronk7) 936d21d2dd Merge branch 'MDL-62211-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-07-03 23:33:48 +02:00
David Monllao d20b4b2f23 Merge branch 'MDL-61296-35' of git://github.com/cescobedo/moodle into MOODLE_35_STABLE 2018-07-03 23:33:47 +02:00
David Monllao d587c4bd90 Merge branch 'MDL-62656-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-07-03 23:33:47 +02:00
David Monllao 3828033e98 Merge branch 'MDL-60014-35-catcherror-nopermission-annotatepdfcron' of https://github.com/Eva-Dv/moodle into MOODLE_35_STABLE 2018-07-03 23:33:46 +02:00
David Monllao 4892662238 Merge branch 'MDL-62691-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-07-03 23:33:46 +02:00
David Monllao ccbd142a63 Merge branch 'MDL-62813-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2018-07-03 23:33:45 +02:00
David Monllao 3b52f52351 Merge branch 'MDL-62654-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-07-03 15:19:34 +02:00
David Monllao 173968b25d Merge branch 'MDL-32232-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-07-03 14:00:20 +02:00
David Mudrák 4cdd9e77dc MDL-62796 tool_policy: Fix a regression in Behat test
We now correctly show the popup with links to policies that apply to
anonymous visitors of the site. So the name of the guests only policy
became visible in this popup in more cases and it caused false failures.

The point of the lines affected by this patch is to make sure that the
policy does / does not appear in the list of policies to be accepted. So
I am making it more specific of where the text is / is not supposed to
be seen.
2018-07-03 11:05:18 +02:00
Michael Hawkins 7805012e59 MDL-61359 message: Updated sender contact text to text node content 2018-07-03 14:48:57 +08:00
Jake Dallimore 483d8fefa8 Merge branch 'MDL-59261-35' of git://github.com/ryanwyllie/moodle into MOODLE_35_STABLE 2018-07-03 14:44:53 +08:00
Bas Brands 654eac4f13 MDL-59261 theme_boost: compiled css fallback 2018-07-03 14:14:05 +08:00
Michael Hawkins 86699bedb0 MDL-62767 theme: Remove old localcaches when clearing/updating theme cache 2018-07-03 14:00:40 +08:00
Michael Hawkins 914e26d916 MDL-62801 themes: Added missing filelib include 2018-07-03 13:08:33 +08:00
Marina Glancy ced6691934 MDL-62790 course: cap check in core_course_get_categories 2018-07-03 12:02:18 +08:00
Mihail Geshoski 07e1fa272f MDL-33509 forms: Change button type in url resource editing page 2018-07-03 11:59:14 +08:00
Jake Dallimore ff1fbf2992 Merge branch 'MDL-62715-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-07-03 08:49:52 +08:00
Eloy Lafuente (stronk7) 49e435c00a Merge branch 'MDL-62763-35-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-07-02 20:09:15 +02:00
Eloy Lafuente (stronk7) b67ae5a0ad Merge branch 'MDL-62621-35-ixcomment' of git://github.com/mudrd8mz/moodle into MOODLE_35_STABLE 2018-07-02 20:02:25 +02:00
Helen Foster b2b1bb2d29 MDL-62763 lang: Merge English strings from the en_fix language pack
Significant string changes:

* various strings in tool_dataprivacy and tool_policy - 'Data Protection
  Officer' changed to 'privacy officer'
* idnumbermod_help,core - mentioning resource and custom reporting
2018-07-02 13:36:29 +02:00
David Monllao 5a13884a0f Merge branch 'wip-MDL-62796-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2018-07-02 12:21:52 +02:00
David Monllao d42328e223 Merge branch 'MDL-62713-m35' of https://github.com/sammarshallou/moodle into MOODLE_35_STABLE 2018-07-02 10:42:18 +02:00
Jake Dallimore 3879b520b7 Merge branch 'MDL-62801-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-07-02 16:19:10 +08:00
David Mudrák 6a3cffd3c6 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:13:00 +02:00
Mihail Geshoski 40790755ce MDL-62656 course: Align elements in course and category management 2018-07-02 08:25:34 +08:00
AMOS bot 310a1f0895 Automatically generated installer lang files 2018-06-30 00:08:23 +00:00
Tim Hunt ed3468e40b MDL-62838 filters: dont use statics inside functions. Use MUC 2018-06-29 17:25:13 +01:00
Tim Hunt 9bedb84419 MDL-62834 behat: new step for enabling filters 2018-06-29 11:27:46 +01:00
sam marshall c843630aee MDL-62713 core_search: Cron error indexing sections in some cases 2018-06-29 10:52:53 +01:00
Neill Magill 94f5d062bd MDL-62823 filter: Save changes button should be styled 2018-06-29 08:41:06 +01:00
Michael Hawkins 233847bdb7 MDL-62801 themes: Remove old mustache caches when new one generated 2018-06-29 10:50:21 +08:00
Jun Pataleta f29d518ba8 MDL-62211 tool_dataprivacy: Request filtering and pagination
* Make data requests page use table_sql to make it sortable
* Also, add an autocomplete element that enables filtering by
  status and request type.
2018-06-29 10:32:25 +08:00
Zig Tan 749c7cc5a9 MDL-44081 assign: Fix Grader annotation button accessibility ordering 2018-06-29 09:28:45 +08:00
Luca Bösch bb3ce79c7e MDL-41463 course: Reset remove groups section advanced toggle. 2018-06-28 23:05:40 +02:00
Luca Bösch 4b52a5b2c6 MDL-32232 lesson: changing a page type chooser option for consistency 2018-06-28 23:05:29 +02:00
Sergio Rabellino af344834e1 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:01 +02:00
Simey Lameze cdc9e56198 MDL-62813 calendar: add behat test for form validation 2018-06-28 14:12:18 +08:00
Simey Lameze 0e0fd72d98 MDL-62813 calendar: fix dmlreadexception on event form 2018-06-28 14:12:18 +08:00
Jake Dallimore 543005a342 weekly release 3.5+ 2018-06-28 14:03:04 +08:00
Marina Glancy 5c33665a74 MDL-62526 admin: ask privacy policy agreement for moodle.net 2018-06-28 11:44:38 +08:00
Eloy Lafuente (stronk7) 362518ef34 Merge branch 'MDL-62325-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-06-28 02:06:03 +02:00
Eloy Lafuente (stronk7) ff246f2260 Merge branch 'wip-MDL-62755-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-06-28 01:56:37 +02:00
Eloy Lafuente (stronk7) fc1b13ede9 Merge branch 'MDL-61889-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-06-28 01:49:31 +02:00
Eloy Lafuente (stronk7) 458b0fb900 Merge branch 'MDL-62747_35' of https://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-06-28 00:32:34 +02:00
Matteo Scaramuccia 5df53c769e MDL-51080 env: warn when running MariaDB w/ wrong dbtype 2018-06-28 00:15:28 +02:00
Jake Dallimore 380a437428 Merge branch 'MDL-61732-35' of https://github.com/Dagefoerde/moodle into MOODLE_35_STABLE 2018-06-27 12:18:13 +08:00
Eloy Lafuente (stronk7) 5f6539e379 Merge branch 'MDL-45088-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-06-27 03:23:22 +02:00
Eloy Lafuente (stronk7) b44ddd4a7f Merge branch 'MDL-62703-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-06-27 03:17:45 +02:00
Eloy Lafuente (stronk7) 833e2398ef Merge branch 'MDL-62471_35' of git://github.com/dmonllao/moodle into MOODLE_35_STABLE 2018-06-27 02:41:53 +02:00
Eloy Lafuente (stronk7) df9443db71 Merge branch 'MDL-62735-35-refactor' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-06-26 10:44:24 +02:00
Jake Dallimore 4d23edfb37 Merge branch 'MDL-62698_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-06-26 15:30:32 +08:00
Juan Segarra Montesinos 11489b20a5 MDL-62288 mod_glossary: Add links to glossary entries for all users 2018-06-26 08:41:21 +02:00
Jun Pataleta b3483e7ede MDL-61889 tool_dataprivacy: Fix CI errors 2018-06-26 13:21:51 +08:00
Marina Glancy dd05e0d29e MDL-62796 tool_policy: show popup for users who are not logged in 2018-06-26 12:33:24 +08:00
Eloy Lafuente (stronk7) 1b37fe78f9 Merge branch 'MDL-59047-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-06-26 03:05:27 +02:00
Eloy Lafuente (stronk7) 82f21031a3 Merge branch 'MDL-62730-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-06-26 02:54:41 +02:00
Eloy Lafuente (stronk7) 6545e50f62 Merge branch 'MDL-51419-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-06-26 02:41:59 +02:00
Eva Davitasvili 3d7630a158 MDL-60014 assign: Annotate PDF - catch no permission error 2018-06-25 14:10:41 -04:00
Tim Hunt 2588126d66 MDL-62792 filters: fix some bad PHPdocs 2018-06-25 15:52:33 +01:00
Tim Hunt de71bef7cb MDL-62792 filter_mathjaxloader: don't use statics for once-only items 2018-06-25 15:52:31 +01:00
Tim Hunt e310f10818 MDL-62698 quiz_overview: new index should not be unique 2018-06-25 15:51:03 +01:00
Shamim Rezaie 9b6938f99b 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 12:34:43 +10:00
Adrian Greeve 9c42327dd1 MDL-62755 mod_assign: Update to unit tests.
Overrides are now checked to be exported properly.
2018-06-25 09:50:50 +08:00
Adrian Greeve 28631a1455 MDL-62755 mod_assign: Fix override export problem.
The cutoffdate and allowsubmissionsfromdate were not
being exported.
2018-06-25 09:50:50 +08:00
Christian Glahn aa7deee9cc 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:29:53 +02:00
Jake Dallimore 009a9ca500 MDL-51419 core_files: Support for utf8 in file names in MS Edge 2018-06-22 10:29:56 +08:00
Jake Dallimore 7de4759799 MDL-62730 themes: Fix calendar icon alignment for datetime in Boost 2018-06-22 10:17:04 +08:00
Jake Dallimore 33433bb8a1 MDL-62735 core_search: searchareas page now respects indexing support 2018-06-22 10:14:34 +08:00
Luca Bösch 9efe4b84ce MDL-45088 xmldb: Fix table alignment 2018-06-21 19:37:26 +02:00
Tim Hunt 12d4fe9ee6 MDL-62769 quiz statistics: graph should show all, not last, variant 2018-06-21 14:55:53 +01:00
Eloy Lafuente (stronk7) 8793e120b9 weekly release 3.5+ 2018-06-21 14:01:11 +02:00
Eloy Lafuente (stronk7) 43f742e1e5 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-06-21 14:01:09 +02:00
Bas Brands 3f4db3e89e MDL-61515 Theme boost: add disabled carousel transitions back in 2018-06-21 10:14:38 +02:00
Andrew Nicols bea7b33840 MDL-62715 mod_assign: Bump submissions back when grading in tests 2018-06-21 08:41:09 +08:00
Jun Pataleta 4900f375d7 Merge branch 'MDL-62017-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-06-20 19:40:22 +08:00
David Monllao a94b1fed30 Merge branch 'MDL-61482-35' of git://github.com/zig-moodle/moodle into MOODLE_35_STABLE 2018-06-20 13:29:28 +02:00
David Monllao 9337d85eb3 MDL-62471 tool_dataprivacy: Test compatible with 32 bits OS 2018-06-20 12:59:15 +02:00
cescobedo 2a8f28520d MDL-61296 auth_ldap: remove PHP notices when field does not exist. 2018-06-20 11:43:28 +02:00
Luca Bösch e972b9e909 MDL-62017 tool_customlang: format language customisation buttons. 2018-06-20 10:54:13 +02:00
Andrew Nicols 74c35a9133 Merge branch 'wip-MDL-62391-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-06-20 09:40:16 +08:00
Adrian Greeve b4b5124c73 MDL-62391 tool_dataprivacy: Added more detail about data requests.
This adds the detail about who requested the data request to the
tables and data request information page.
2018-06-20 09:01:16 +08:00
Andrew Nicols af963ad2ae Merge branch 'MOODLE_35_STABLE_MDL-62705_results_order_no_context' of https://github.com/mattporritt/moodle into MOODLE_35_STABLE 2018-06-20 08:36:51 +08:00
Eloy Lafuente (stronk7) 2341e8695e Merge branch 'MDL-62014-35' of git://github.com/nashtechdev01/moodle into MOODLE_35_STABLE 2018-06-20 00:57:28 +02:00
Eloy Lafuente (stronk7) f55516fd46 Merge branch 'MDL-36424-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-06-19 19:20:37 +02:00
Eloy Lafuente (stronk7) 36e337b176 Merge branch 'wip-MDL-61786-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-06-19 19:16:39 +02:00
Eloy Lafuente (stronk7) 23e9fea9a5 Merge branch 'MDL-62358-35' of https://github.com/HuongNV13/moodle into MOODLE_35_STABLE 2018-06-19 19:08:52 +02:00
Eloy Lafuente (stronk7) 1408aa8bc8 Merge branch 'MDL-44791-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-06-19 18:59:50 +02:00
Eloy Lafuente (stronk7) 2f86cad04e Merge branch 'MDL-62449-35' of git://github.com/sarjona/moodle into MOODLE_35_STABLE 2018-06-19 18:52:31 +02:00
Zig Tan fd77e38fc9 MDL-61482 mod_assign: Clean html in offline grading CSV 2018-06-19 23:30:11 +08:00
Tim Hunt 0191113d24 MDL-62747 accesslib: rdef caching should handle roles with no caps 2018-06-19 16:26:21 +01:00
Jun Pataleta 016e029ea6 MDL-62746 tag: Make forms in tag modals use proper BS classes 2018-06-19 23:01:25 +08:00
Bas Brands 8bc0bbf1ee MDL-62691 Theme boost: editpdf hide dropdown close btn 2018-06-19 16:57:38 +02:00
Bas Brands 1dc4c34d07 MDL-62703 Themes: remove hover styles in course listings 2018-06-19 16:32:31 +02:00
Bas Brands 5339d26259 MDL-59047 question type: short answer boost styles 2018-06-19 14:34:33 +02:00
David Monllao bc7a379947 Merge branch 'MDL-62588-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-06-19 12:53:19 +02:00
Jun Pataleta e9553d973a Merge branch 'MDL-61894-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-06-19 17:57:13 +08:00
David Monllao 4f7fa18201 Merge branch 'MDL-58702-35' of git://github.com/zig-moodle/moodle into MOODLE_35_STABLE 2018-06-19 11:54:39 +02:00
Andrew Nicols 697a28aadf Merge branch 'MDL-60950-35' of git://github.com/damyon/moodle into MOODLE_35_STABLE 2018-06-19 11:40:45 +08:00
Damyon Wiese 26f5750319 MDL-60950 assign: Update incompatible unit test
Maintain compatibility with unit test changes after MDL-55609.
2018-06-19 10:59:12 +08:00
Damyon Wiese d4fea9b20f MDL-60950 assign: Rename class
testable_assign was renamed to mod_assign_testable_assign
2018-06-19 10:59:12 +08:00
Damyon Wiese af280e5929 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:12 +08:00
Damyon Wiese fa8d508f36 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:12 +08:00
Andrew Nicols e7bf43ba0d Merge branch 'MDL-62519_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-06-19 10:34:16 +08:00
Andrew Nicols 793da897d1 Merge branch 'MDL-62597-35' of https://github.com/HuongNV13/moodle into MOODLE_35_STABLE 2018-06-19 09:43:54 +08:00
Eloy Lafuente (stronk7) e1aa99e99d Merge branch 'MDL-62638-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-06-19 02:04:00 +02:00
Eloy Lafuente (stronk7) 06b8272791 Merge branch 'MDL-62571_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-06-19 01:49:52 +02:00
Sara Arjona 15703fb9f1 MDL-62449 scorm: Move related data to data in the privacy export 2018-06-18 10:43:36 +02:00
Sara Arjona 20d8c489d8 MDL-62449 scorm: Add SCORM data to privacy export (name, description) 2018-06-18 10:43:36 +02:00
Jun Pataleta 1d97a7818e Merge branch 'MDL-62614-35' of git://github.com/zig-moodle/moodle into MOODLE_35_STABLE 2018-06-18 16:12:23 +08:00
Jun Pataleta 7c64406d4d Merge branch 'MDL-62709_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-06-18 15:15:56 +08:00
Jun Pataleta f71b39b960 Merge branch 'MDL-62658_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-06-18 14:36:47 +08:00
Jun Pataleta 44dd58756b Merge branch 'wip-MDL-62474-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-06-18 14:32:20 +08:00
Mark Nelson 1dbbcaf9ba MDL-62658 message_popup: fixed issue with malformed URL being generated 2018-06-18 14:31:14 +08:00
Adrian Greeve d0e1b2921d 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:06:11 +08:00
Willian Mano 72107631d7 MDL-62474 theme_boost: Fix Boost privacy provider 2018-06-18 14:06:01 +08:00
Huong Nguyen 888cfdc75f MDL-62614 Privacy: Core tag provider delete_item_tags function not work 2018-06-18 14:00:37 +08:00
Andrew Nicols 9886790075 Merge branch 'MDL-62320-35' of git://github.com/vmdef/moodle into MOODLE_35_STABLE 2018-06-18 13:58:50 +08:00
Shamim Rezaie f3323c22fe MDL-62588 enrol_paypal: Add missing instanceid field 2018-06-18 15:18:04 +10:00
Andrew Nicols d8e011f721 Merge branch 'MDL-62234-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-06-18 09:52:33 +08:00
Andrew Nicols 3b63cb559e Merge branch 'MDL-57968-35' of git://github.com/cescobedo/moodle into MOODLE_35_STABLE 2018-06-18 09:09:53 +08:00
AMOS bot f5189e3aa3 Automatically generated installer lang files 2018-06-16 00:08:05 +00:00
Victor Deniz 2c643bb988 MDL-62320 mimetypes: Add JSON to the default mime types list 2018-06-15 13:12:31 +01:00
Damyon Wiese 54e6ea018d 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 14:13:21 +08:00
HungTran c5fd53af5d MDL-62014 course: Add title to activity completion button 2018-06-15 10:19:59 +07:00
Zig Tan e275b0c4a6 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:15 +08:00
Matt Porritt 9482a77a04 MDL-62705 Global Search: results order selection does not display
As of 3.5 a search plugin can define the result orders it supports.
When a search plugin defines multiple sort orders and the search is
conducted without a context (no context query param in the URL),
the code to load the available sort orders from the enabled search
backend is never called.

This patch gets the supported search orders for the enabled search
engine regardless of context being provided or not. As prior, the
search order selection will not display if the only result order
option is relevance.
2018-06-15 11:32:28 +10:00
Luca Bösch fab105578b MDL-61894 tag: Modal buttons style. 2018-06-14 17:32:40 +02:00
Luca Bösch b4dcfe9a06 MDL-44791 admin: Open server check doc links in new window. 2018-06-14 17:31:45 +02:00
Ed Basset a31a20a5c6 MDL-36424 wiki: set group so subwiki tabs/pages display correctly 2018-06-14 17:31:28 +02:00
Huong Nguyen e6e7a85087 MDL-62358 Question: Improve number function
Support all 'question numbers' that might be needed
2018-06-14 19:46:36 +07:00
Huong Nguyen 612c718696 MDL-62597 Privacy: Request date column should include time 2018-06-14 19:41:28 +07:00
Eloy Lafuente (stronk7) 180988c999 weekly release 3.5+ 2018-06-14 10:56:06 +02:00
Eloy Lafuente (stronk7) 59380a9a64 Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-06-14 10:56:04 +02:00
Mark Nelson d2593fadb6 MDL-62709 core_message: convert NULL format types in task 2018-06-14 13:19:17 +08:00
David M Penner 904aec69a0 MDL-62709 core_message: fix for silently ignored errors in task 2018-06-14 13:19:17 +08:00
Mark Nelson d851bb5c2a MDL-31443 core_backup: change review heading to 'Restore settings' 2018-06-13 18:39:00 +02:00
Luca Bösch 6fa61e69a7 MDL-31443 core_backup: revert changes to util/ui/renderer.php 2018-06-13 18:39:00 +02:00
Bas Brands c0e65fbbf8 MDL-62234 Theme boost: Improve atto dialogue styling 2018-06-13 11:37:09 +02:00
Jun Pataleta cc0b367755 Merge branch 'MDL59980_block_bug_35_STABLE' of git://github.com/kristian-94/moodle into MOODLE_35_STABLE 2018-06-13 09:59:26 +08:00
AMOS bot 1dc3e88cca Automatically generated installer lang files 2018-06-13 00:08:07 +00:00
Kristian Ringer d04e88b78f MDL-59980 core_admin: Fix bug preventing block modification in settings 2018-06-13 09:37:42 +10:00
Simey Lameze d77209e8c5 MDL-62446 mod_glossary: optimize provider code 2018-06-12 18:27:39 +02:00
Simey Lameze 3f27598353 MDL-62446 mod_glossary: improve privacy unit tests 2018-06-12 18:27:38 +02:00
David Monllao 334ced71a1 Merge branch 'MDL-58063-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-06-12 11:05:47 +02:00
Andrew Nicols f3a817e959 MDL-55609 mod_assign: Deprecate base_test 2018-06-12 10:22:18 +02:00
Andrew Nicols 9712975595 MDL-55609 assignfeedback_comments: Remove shared setUp 2018-06-12 10:22:11 +02:00
Andrew Nicols 4656db12e1 MDL-55609 mod_assign: Move fixture to folder 2018-06-12 10:22:06 +02:00
Andrew Nicols a1ec9e389e MDL-55609 mod_assign: Remove shared setUp for all tests 2018-06-12 10:22:01 +02:00
Andrew Nicols 3714b3d104 MDL-55609 testing: Add a create_and_enrol helper 2018-06-12 10:21:57 +02:00
Mark Nelson 251358b364 MDL-62519 atto_recordrtc: detach click listener when recording again 2018-06-12 14:37:40 +08:00
Jun Pataleta d2b6ce1555 Merge branch 'wip-MDL-62574-35' of git://github.com/abgreeve/moodle into MOODLE_35_STABLE 2018-06-12 11:56:53 +08:00
Adrian Greeve 3c22418e0a 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:26:23 +08:00
Adrian Greeve 94269e4505 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:26:11 +08:00
Andrew Nicols 0f272f06ea Merge branch 'wip_MDL-62576_M35' of git://github.com/gjb2048/moodle into MOODLE_35_STABLE 2018-06-12 10:49:14 +08:00
Andrew Nicols 08ca997c76 Merge branch 'MDL-62628-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-06-12 09:49:58 +08:00
Andrew Nicols 7d52baba45 Merge branch 'MDL-60819-35' of https://github.com/snake/moodle into MOODLE_35_STABLE 2018-06-12 09:21:04 +08:00
Eloy Lafuente (stronk7) 72f73d595d Merge branch 'MDL-62649-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-06-12 01:45:26 +02:00
Eloy Lafuente (stronk7) bf67536031 Merge branch 'MDL-62460-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-06-12 01:41:49 +02:00
Eloy Lafuente (stronk7) 7a78ae6c10 Merge branch 'MDL-31443-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-06-12 01:37:57 +02:00
Michael Aherne 2cdbfd1dca MDL-62577 unit tests: Quote class name in re-run command. 2018-06-12 00:08:37 +02:00
Mark Nelson d8924ce166 MDL-62571 mod_forum: fixed redirection URLs 2018-06-11 18:31:03 +08:00
David Monllao 9ccbf4386c Merge branch 'MDL-61484-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-06-11 10:34:30 +02:00
Jun Pataleta fe9d8a7274 MDL-61484 mod_chat: Add CHAT_SESSION_GAP constant 2018-06-11 16:01:03 +08:00
Jun Pataleta 9ec5fa2208 MDL-61484 mod_chat: Fix chat_get_sessions logic 2018-06-11 16:01:03 +08:00
Jun Pataleta bffc50ae9d MDL-61484 mod_chat: More unit tests for chat
* For chat_get_sessions()
* Fix externallib test
2018-06-11 16:01:03 +08:00
Leon Stringer a634c88ced 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:16:31 +08:00
Jun Pataleta 2eb7c6d6cb Merge branch 'MDL-62594-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-06-11 13:55:19 +08:00
Jake Dallimore 8ae9044ef4 MDL-60819 core_files: fix exception thrown from generate_image_thumbnail
This function now requires gdlib.php.
2018-06-11 10:45:27 +08:00
Andrew Nicols eef776a0b4 Merge branch 'MDL-62270-Cron-task-fails-on-data-privacy-related-task' of https://github.com/adamtppaw/moodle into MOODLE_35_STABLE 2018-06-11 09:53:06 +08:00
Luca Bösch ef57748905 MDL-31443 backup: Title and cancel messages stating import and restore 2018-06-08 11:34:06 +02:00
Bas Brands 9903e25871 MDL-62654 Theme Boost: update readme on @supports prefixer issues 2018-06-08 10:15:10 +02:00
Mihail Geshoski 557a9b5674 MDL-62628 resource: Folder name formatting issue when displayed inline 2018-06-08 08:36:04 +08:00
Mihail Geshoski 0ff993ffe3 MDL-58063 blocks: Cannot access manage files in HTML block in clean 2018-06-08 08:29:26 +08:00
Gareth J Barnard a8a9876c1d MDL-62576 theme_boost: Course jump to menu not centred 2018-06-07 20:43:42 +01:00
Eloy Lafuente (stronk7) fd308528cd weekly release 3.5+ 2018-06-07 17:00:05 +02:00
Eloy Lafuente (stronk7) b0f0c2af7e Merge branch 'install_35_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_35_STABLE 2018-06-07 17:00:02 +02:00
Bas Brands ba5dde0347 MDL-62638 Theme boost: remove broken css 2018-06-07 16:44:53 +02:00
Bas Brands 22cab09558 MDL-62594 question type: cloze question theme boost 2018-06-07 14:07:32 +02:00
Jun Pataleta b02f319b78 Merge branch 'MDL-61826-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-06-06 11:22:31 +02:00
Jun Pataleta e03ef397fc Merge branch 'MDL-46513_35' of git://github.com/markn86/moodle into MOODLE_35_STABLE 2018-06-06 11:22:27 +02:00
Jun Pataleta cddd2b461b Merge branch 'MDL-62586-35' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-06-06 11:22:24 +02:00
Andrew Nicols ec41f1ce1b Merge branch 'm35_MDL-61702_MariaDB_InnoDB10d3d1_Params_Removed' of https://github.com/scara/moodle into MOODLE_35_STABLE 2018-06-06 11:22:21 +02:00
Eloy Lafuente (stronk7) 7ce29a90af Merge branch 'MDL-39486-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-06-06 11:22:17 +02:00
David Monllao 4dda9579b3 Merge branch 'MDL-46344-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-06-06 11:22:14 +02:00
Mark Nelson 9b77f93fa0 MDL-62336 media_videojs: ensure videos have unique IDs 2018-06-06 11:22:11 +02:00
Jun Pataleta 4fc3adb35b Merge branch 'MDL-61778-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-06-06 11:22:08 +02:00
cescobedo d3e3f0f109 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:00:54 +02:00
Mark Nelson 8bc2ee1a4a MDL-46513 mod_chat: pass has_capability result to fullname function 2018-06-06 15:34:17 +08:00
Jun Pataleta 93e51e74b4 MDL-61826 auth: Make Facebook endpoints more maintainable 2018-06-06 12:44:43 +08:00
Łukasz Szeremeta 148ef43015 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:43 +08:00
Mihail Geshoski 8b5dfd0b06 MDL-62649 course: Course and category management items displayed wrongly 2018-06-06 11:38:48 +08:00
Michael Hawkins 1ebd063f4e MDL-61778 message: Renamed online status icon and replaced Boost icon 2018-06-05 16:36:42 +08:00
Luca Bösch 40579dc143 MDL-62605 core_user: course name filter in unenrol modal. 2018-06-05 08:04:41 +02:00
AMOS bot f26629e665 Automatically generated installer lang files 2018-06-05 00:07:04 +00:00
adamtppaw ab96a452c6 MDL-62270 Privacy: Cron task fails when admin directory renamed 2018-06-03 21:59:15 +02:00
Luca Bösch 50e1bbb583 MDL-46344 outputrenderers: Localize 'This page is'. 2018-06-01 11:44:02 +02:00
Jun Pataleta 09b6fbdaca MDL-62460 tool_dataprivacy: Render selected user properly on validation 2018-06-01 16:09:17 +08:00
Matteo Scaramuccia 8f9c8a5826 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 22:56:49 +02:00
David Monllao 9c607c0b8c weekly release 3.5+ 2018-05-31 08:39:38 +02:00
Bas Brands 6dc178e448 MDL-62586 Themes: use Boostrap media compontent for author display 2018-05-30 12:41:36 +02:00
David Monllao 187d2a26c0 Merge branch 'MDL-62532-35' of git://github.com/rezaies/moodle into MOODLE_35_STABLE 2018-05-30 10:20:09 +02:00
Andrew Nicols c6755d6f34 Merge branch 'MDL-57486-35-fix' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-05-30 13:21:25 +08:00
Jun Pataleta bea2c40f53 MDL-57486 tool_recyclebin: Close the files recordset properly 2018-05-30 13:16:11 +08:00
Andrew Nicols 363622d03e Merge branch 'MDL-57600-35' of git://github.com/lameze/moodle into MOODLE_35_STABLE 2018-05-30 09:17:57 +08:00
Andrew Nicols 649c96c259 MDL-57486 tool_recyclebin: Coding style fix 2018-05-30 09:02:00 +08:00
Dan Marsden ac32f752d9 MDL-57486 tool_recyclebin: Delete items when context already deleted. 2018-05-30 09:02:00 +08:00
David Monllao db79038541 MDL-62381 editor_tinymce: Rearrange style modification 2018-05-29 16:36:14 +02:00
David Monllao c390ae4f8d Merge branch 'MDL-62381_moodle35' of https://github.com/Syxton/moodle into MOODLE_35_STABLE 2018-05-29 16:34:46 +02:00
Matt Davidson e0a8cfdb6d MDL-62381 editor: Fix tinymce icons
Icon sizing is being overwritten on images.
2018-05-29 09:03:00 -04:00
Jun Pataleta 52f03c6fc6 Merge branch 'MDL-62544-35' of git://github.com/Dagefoerde/moodle into MOODLE_35_STABLE 2018-05-29 16:24:26 +08:00
Michael Hawkins 9f2c4a9277 MDL-56498 message: Ensure clicked notifications are marked read 2018-05-29 09:37:53 +08:00
David Monllao 575e209b93 Merge branch 'MDL-62316_oauth_guess_image_fix_35_STABLE' of https://github.com/leonstr/moodle into MOODLE_35_STABLE 2018-05-28 16:48:50 +02:00
David Monllao 0b363e6c4b Merge branch 'wip-MDL-62584-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2018-05-28 16:32:17 +02:00
Eloy Lafuente (stronk7) 5d8821ae05 MDL-62478 upgrade: add 3.5.0 separation line to all upgrade scripts 2018-05-28 13:16:21 +02:00
David Monllao 512a916207 Merge branch 'MDL-42779-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-05-28 11:42:53 +02:00
Mark Nelson 86a7cf0909 MDL-57742 core_lib: Updated readme_moodle.txt 2018-05-28 09:17:18 +02:00
David Balch f93f81a9f6 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 09:17:17 +02:00
Matteo Scaramuccia bf6f0f03cf MDL-59596 ddl: Support MariaDB 10.2.4+ SQL_MODE new default value. 2018-05-28 08:20:14 +02:00
Matteo Scaramuccia 903182e4a3 MDL-59596 ddl: Added has_breaking_change_sqlmode() 2018-05-28 08:20:12 +02:00
Jun Pataleta e7554e4b67 Merge branch 'wip-MDL-62493-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2018-05-28 12:57:37 +08:00
Jun Pataleta 167420bd2e MDL-62515 templates: Remove unnecessary button role for submit button 2018-05-28 12:29:59 +08:00
Marina Glancy f479887c77 MDL-62584 xmlrpc: return correct content-length 2018-05-28 11:20:21 +08:00
Simey Lameze 5441c8fef4 MDL-57600 course: fix typo on courselib test 2018-05-28 09:41:58 +08:00
Alex b104cede75 MDL-57600 format: Fix spelling errors 2018-05-28 09:41:57 +08:00
Jun Pataleta c3c8223ca2 Merge branch 'MDL-61832-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-05-28 09:21:22 +08:00
Andrew Nicols d4773c32d6 MDL-62543 mod_forum: Add RSS Unit tests 2018-05-28 08:56:44 +08:00
Tobias Reischmann c8511e2808 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-28 08:56:44 +08:00
Shamim Rezaie b23e6519fe MDL-62532 core_question: Include standard tags in the tags autocomplete 2018-05-28 10:55:05 +10:00
Mark Johnson dc7c48a9d7 MDL-62408 behat: Correct PHPUNIT_TEST checks in behat_config_util 2018-05-28 02:14:08 +02:00
Marina Glancy a210233bfb MDL-62493 tool_policy: correct redirection
do not override session->wantsurl
do not redirect guests to user.php, they get an error there
2018-05-25 14:32:03 +08:00
Marina Glancy 9dcf28af7d MDL-62493 tool_policy: allow guests to sign up 2018-05-25 14:32:03 +08:00
Mihail Geshoski c030a94b68 MDL-39486 lesson: Length of label text too narrow in matching questions 2018-05-25 09:46:01 +08:00
Jan Dageförde bd8b3a91e0 MDL-62544 privacy: error notification type 2018-05-24 16:46:02 +02:00
Jan Dageförde 582eb6e6e2 MDL-62544 privacy: Allow data requests on behalf of a user by admin/DPO 2018-05-24 16:46:02 +02:00
Luca Bösch 9b127bcb70 MDL-61832 lesson: don't hide lesson page editing options 2018-05-24 15:44:00 +02:00
Luca Bösch 171a764049 MDL-42779 course: Pagination in management page preserves view action 2018-05-24 15:43:41 +02:00
David Monllao 0da8ef69a8 weekly release 3.5+ 2018-05-24 10:46:02 +02:00
David Monllao 815be4e003 NOBUG: Fixed SVG browser compatibility 2018-05-24 10:46:01 +02:00
Simey Lameze d897846115 MDL-61189 editor_tinymce: save data before submitting 2018-05-23 10:48:40 +08:00
Jake Dallimore 5427855d50 Merge branch 'MDL-61932-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-05-23 10:01:46 +08:00
Leon Stringer 6d7093e370 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:45:04 +01:00
Jun Pataleta d7c805a9f0 MDL-61932 mod_glossary: Fetch the correct front page section 1 ID 2018-05-22 17:16:30 +08:00
Jun Pataleta 2032603ae9 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-22 17:16:29 +08:00
John Beedell e7e91b8bae MDL-62239 QTYPE: iOS 11.3 broke Moodle drag-drop question types 2018-05-22 10:05:51 +08:00
Andrew Nicols 30cbfbdd61 Merge branch 'MDL-62482_35' of git://github.com/timhunt/moodle into MOODLE_35_STABLE 2018-05-22 09:39:17 +08:00
Andrew Nicols ab7694d82e Merge branch 'MDL-62488_35_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_35_STABLE 2018-05-22 09:31:19 +08:00
Jake Dallimore 61ee9a304e Merge branch 'MDL-61015-35' of https://github.com/lucaboesch/moodle into MOODLE_35_STABLE 2018-05-22 08:15:11 +08:00
Andrew Nicols f59bc1b152 MDL-62500 tag: Update checkbox label when updating tag 2018-05-21 13:46:49 +02:00
Matteo Scaramuccia 3aa57f20af 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-21 12:05:54 +02:00
Matteo Scaramuccia b875ad18b5 MDL-61893 JavaScript: Accept any node version but Carbon (LTS) 2018-05-21 12:05:46 +02:00
Luca Bösch 2d69b0fbe7 MDL-61015 course: consistently display hidden sections
This commit moves the availability info on top.
2018-05-21 11:34:04 +02:00
Marina Glancy c8663da1a9 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:34:04 +02:00
Andrew Nicols 1de2735b16 MDL-62516 mod_forum: Only delete files for requested user 2018-05-21 11:17:10 +02:00
Juan Leyva 4a5adabe95 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-05-21 17:05:07 +08:00
Andrew Nicols b566d8002a Merge branch 'wip-MDL-62481-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE 2018-05-21 15:55:12 +08:00
Tim Hunt 2e404995a0 MDL-62440 participants: out-of-memory is many site-wide role assigns 2018-05-21 14:55:42 +08:00
Andrew Nicols 654ad71526 Merge branch 'MDL-62386-master' of git://github.com/bmbrands/moodle into MOODLE_35_STABLE 2018-05-21 09:11:28 +08:00
Marina Glancy 2b50975563 MDL-62481 atto_recordrtc: add svg icons 2018-05-18 10:40:33 +08:00
Mark Johnson 81fb99ed66 MDL-62488 filebrowser: Stop unit tests assuming number of categories 2018-05-17 16:01:36 +01:00
Tim Hunt deb358f16c MDL-62482 file_storage: may have many files with same content hash 2018-05-17 11:25:52 +01:00
12576 changed files with 438099 additions and 1018348 deletions
+88
View File
@@ -0,0 +1,88 @@
# 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
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/horde/
lib/requirejs/
lib/amd/src/loglevel.js
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
lib/php-css-parser/
lib/rtlcss/
lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
lib/amd/src/truncate.js
lib/fonts/
lib/amd/src/adapter.js
lib/validateurlsyntax.php
lib/amd/src/popper.js
lib/geopattern-php/
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/
+2 -37
View File
@@ -1,6 +1,5 @@
{
'plugins': [
'babel',
'promise',
],
'env': {
@@ -204,45 +203,11 @@
}
},
{
files: ["**/amd/src/*.js", "**/amd/src/**/*.js", "Gruntfile.js", ".grunt/*.js", ".grunt/tasks/*.js", "jsdoc.conf.js"],
// We support es6 now. Woot!
env: {
es6: true
},
// We're using babel transpiling so use their parser
// for linting.
parser: 'babel-eslint',
files: ["**/amd/src/*.js", "Gruntfile.js"],
// Check AMD with some slightly stricter rules.
rules: {
'no-unused-vars': 'error',
'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',
// This is off in the original style int.
'babel/quotes': 'off',
'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'
},
parserOptions: {
'ecmaVersion': 9,
'sourceType': 'module'
'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
View File
@@ -1,3 +1,5 @@
**/yui/build/** -diff
**/amd/build/** -diff
lib/dml/oci_native_moodle_package.sql text eol=lf
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/", moodle.org]
+5 -14
View File
@@ -1,15 +1,9 @@
name: Core
on:
push:
branches-ignore:
- master
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
on: [push]
env:
php: 8.0
php: 7.2
jobs:
Grunt:
@@ -54,13 +48,11 @@ jobs:
matrix:
include:
- os: ubuntu-18.04
php: 7.3
extensions:
php: 7.0
db: mysqli
- os: ubuntu-18.04
php: 8.0
php: 7.2
db: pgsql
extensions: xmlrpc-beta
steps:
- name: Setting up DB mysql
@@ -90,8 +82,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
extensions: mysqli, zip, gd, xmlrpc, soap
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
-7
View File
@@ -26,7 +26,6 @@
/cscope.*
/.patches/
/.idea/
.phpstorm.*
/nbproject/
CVS
.DS_Store
@@ -34,7 +33,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
@@ -46,8 +44,3 @@ composer.phar
/lib/yuilib/*/*/*-coverage.js
atlassian-ide-plugin.xml
/node_modules/
/.vscode/
moodle-plugin-ci.phar
.eslintignore
.stylelintignore
/jsdoc
-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/>.
/**
* 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);
// 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);
}
}
}
};
};
-243
View File
@@ -1,243 +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 = [];
// Fetch the component definiitions from the distributed JSON file.
const components = JSON.parse(fs.readFileSync(`${gruntFilePath}/lib/components.json`));
// 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 incldues 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);
});
});
}
});
});
}
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').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;
};
module.exports = {
getAmdSrcGlobList,
getComponentFromPath,
getComponentPaths,
getOwningComponentDirectory,
getYuiSrcGlobList,
getThirdPartyLibsList,
getThirdPartyPaths,
};
-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://docs.moodle.org/dev](https://docs.moodle.org/dev) 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://docs.moodle.org/dev",
target: "_blank",
"class": "menu-item",
id: "devdocs"
},
"MDN Docs": {
href: "https://developer.mozilla.org/en-US/docs/Web/JavaScript",
target: "_blank",
"class": "menu-item",
id: "mdndocs",
},
},
typedefs: true,
},
};
-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();
});
};
-89
View File
@@ -1,89 +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'],
},
},
});
return handler;
};
-60
View File
@@ -1,60 +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');
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',
].concat(thirdPartyPaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
};
grunt.registerTask('ignorefiles', 'Generate ignore files for linters', handler);
return handler;
};
-147
View File
@@ -1,147 +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 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} 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('src', '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 JSDoc.
require('./jsdoc')(grunt);
const path = require('path');
// Register JS tasks.
grunt.registerTask('yui', ['eslint:yui', 'shifter']);
grunt.registerTask('amd', ['ignorefiles', 'eslint:amd', 'babel']);
grunt.registerTask('js', ['amd', 'yui']);
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// Load the Babel tasks and config.
grunt.loadNpmTasks('grunt-babel');
grunt.config.merge({
babel: {
options: {
sourceMaps: true,
comments: false,
plugins: [
'transform-es2015-modules-amd-lazy',
'system-import-transformer',
// This plugin modifies the Babel transpiling for "export default"
// so that if it's used then only the exported value is returned
// by the generated AMD module.
//
// It also adds the Moodle plugin name to the AMD module definition
// so that it can be imported as expected in other modules.
path.resolve('.grunt/babel-plugin-add-module-to-define.js'),
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
['@babel/plugin-proposal-class-properties', {'loose': false}],
'@babel/plugin-proposal-json-strings'
],
presets: [
['minify', {
// This minification plugin needs to be disabled because it breaks the
// source map generation and causes invalid source maps to be output.
simplify: false,
builtIns: false
}],
['@babel/preset-env', {
targets: {
browsers: [
">0.25%",
"last 2 versions",
"not ie <= 10",
"not op_mini all",
"not Opera > 0",
"not dead"
]
},
modules: false,
useBuiltIns: false
}]
]
},
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']
},
},
});
// 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('babel.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,
};
};
-36
View File
@@ -1,36 +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 => {
// Project configuration.
grunt.config.merge({
jsdoc: {
dist: {
options: {
configure: ".grunt/jsdoc/jsdoc.conf.js",
},
},
},
});
grunt.loadNpmTasks('grunt-jsdoc');
};
-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('node-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;
};
-48
View File
@@ -1,48 +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 them all!.
grunt.task.run('css');
grunt.task.run('js');
grunt.task.run('gherkinlint');
}
};
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', handler);
return handler;
};
-32
View File
@@ -1,32 +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);
};
-183
View File
@@ -1,183 +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: {
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: {syntax: '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']
},
},
});
};
-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;
};
+90
View File
@@ -0,0 +1,90 @@
# 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
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/horde/
lib/requirejs/
lib/amd/src/loglevel.js
lib/mustache/
lib/amd/src/mustache.js
lib/graphlib.php
lib/php-css-parser/
lib/rtlcss/
lib/scssphp/
lib/spout/
lib/amd/src/chartjs-lazy.js
lib/maxmind/GeoIp2/
lib/maxmind/MaxMind/
lib/ltiprovider/
lib/amd/src/truncate.js
lib/fonts/
lib/amd/src/adapter.js
lib/validateurlsyntax.php
lib/amd/src/popper.js
lib/geopattern-php/
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/
+28 -37
View File
@@ -2,28 +2,29 @@
# process (which uses our internal CI system) this file is here for the benefit
# of community developers git clones - see MDL-51458.
sudo: required
notifications:
email:
if: env(MOODLE_EMAIL) != no
language: php
os: linux
dist: bionic
dist: trusty
services:
- mysql
- docker
addons:
postgresql: "9.6"
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
branches:
except:
- master
- /MOODLE_[0-9]+_STABLE/
- /^v[0-9]+\.[0-9]+\.[0-9]+.*/
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# services:
# - redis-server
jobs:
# Enable fast finish.
@@ -32,34 +33,33 @@ jobs:
fast_finish: true
include:
# First all the lowest php ones (7.3)
- php: 7.3
# First all the lowest php ones (7.0)
- php: 7.0
env: DB=none TASK=CITEST
- php: 7.3
- php: 7.0
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
- if: env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present
php: 7.3
php: 7.0
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all"
php: 7.3
php: 7.0
env: DB=mysqli TASK=PHPUNIT
# Then, conditionally, all the highest php ones (8.0)
- if: env(MOODLE_PHP) = "all"
php: 8.0
php: 7.2
env: DB=none TASK=CITEST
- if: env(MOODLE_PHP) = "all"
php: 8.0
php: 7.2
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present)
php: 8.0
php: 7.2
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all")
php: 8.0
php: 7.2
env: DB=mysqli TASK=PHPUNIT
cache:
@@ -69,8 +69,6 @@ cache:
before_install:
- docker run -d -p 127.0.0.1:8080:80 --name exttests moodlehq/moodle-exttests
# Avoid IPv6 default binding as service (causes redis not to start).
- sudo service redis-server start --bind 127.0.0.1
install:
- >
@@ -78,10 +76,10 @@ install:
then
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
sudo service mysql stop
sudo stop mysql
sudo mv /var/lib/mysql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
sudo service mysql restart
sudo start mysql
fi
- >
if [ "$DB" = 'pgsql' ];
@@ -101,8 +99,10 @@ install:
echo 'auth.json' >> .git/info/exclude
fi
echo 'extension="redis.so"' > /tmp/redis.ini
phpenv config-add /tmp/redis.ini
# 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.
@@ -118,8 +118,6 @@ install:
fi
before_script:
- if [[ ${TRAVIS_PHP_VERSION:0:1} -gt 7 ]]; then pecl install xmlrpc-beta; fi
- echo 'max_input_vars=5000' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' ];
@@ -175,6 +173,8 @@ before_script:
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_';" \
@@ -185,15 +185,6 @@ before_script:
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://127.0.0.1:8080');" \
config.php ;
# Redis cache store tests
sed -i \
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
config.php ;
# Redis session tests
sed -i \
-e "/require_once/i \\define('TEST_SESSION_REDIS_HOST', '127.0.0.1');" \
config.php ;
# Initialise PHPUnit for Moodle.
php admin/tool/phpunit/cli/init.php
fi
@@ -221,7 +212,7 @@ before_script:
# We need the official upstream for comparison
git remote add upstream https://github.com/moodle/moodle.git;
git fetch upstream MOODLE_311_STABLE;
git fetch upstream MOODLE_35_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`
+351 -216
View File
@@ -16,246 +16,381 @@
/* 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');
/* eslint-env node */
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;
};
/**
* 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);
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(/\/?$/, '/');
}
// 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.
}
}
},
sass: {
dist: {
files: {
"theme/boost/style/moodle.css": "theme/boost/scss/preset/default.scss"
}
},
options: {
includePaths: ["theme/boost/scss/"]
}
},
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-sass');
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', 'sass', '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']);
+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));
}
}
+4 -5
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";
@@ -98,10 +99,8 @@ switch ($action) {
default:
break;
}
$new = implode(',', $activeantiviruses);
add_to_config_log('antiviruses', $CFG->antiviruses, $new, 'core');
set_config('antiviruses', $new);
set_config('antiviruses', implode(',', $activeantiviruses));
core_plugin_manager::reset_caches();
redirect ($returnurl);
redirect ($returnurl);
+6 -14
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'));
@@ -44,9 +45,7 @@ switch ($action) {
$key = array_search($auth, $authsenabled);
if ($key !== false) {
unset($authsenabled[$key]);
$value = implode(',', $authsenabled);
add_to_config_log('auth', $CFG->auth, $value, 'core');
set_config('auth', $value);
set_config('auth', implode(',', $authsenabled));
}
if ($auth == $CFG->registerauth) {
@@ -61,11 +60,8 @@ switch ($action) {
if (!in_array($auth, $authsenabled)) {
$authsenabled[] = $auth;
$authsenabled = array_unique($authsenabled);
$value = implode(',', $authsenabled);
add_to_config_log('auth', $CFG->auth, $value, 'core');
set_config('auth', $value);
set_config('auth', implode(',', $authsenabled));
}
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
break;
@@ -81,9 +77,7 @@ switch ($action) {
$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;
@@ -98,9 +92,7 @@ switch ($action) {
$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;
+2
View File
@@ -171,6 +171,8 @@ function print_auth_lock_options($auth, $user_fields, $helptext, $retrieveopts,
// limit for the setting name is 100.
continue;
}
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} else {
$fieldname = get_string($fieldname);
}
+1 -5
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));
@@ -158,9 +159,4 @@ echo $outputhtml;
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');
$PAGE->requires->yui_module('moodle-core-formchangechecker', 'M.core_formchangechecker.init', [[
'formid' => 'adminsettings'
]]);
$PAGE->requires->string_for_js('changesmadereallygoaway', 'moodle');
echo $OUTPUT->footer();
-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,59 +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');
$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');
}
}
@@ -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);
}
}
-195
View File
@@ -1,195 +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);
}
/**
* 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;
}
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');
}
$bytes = $data['v'] * $data['u'];
$result = $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,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);
}
}
-293
View File
@@ -1,293 +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/>.
/**
* Task log table.
*
* @package core_admin
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/tablelib.php');
/**
* Table to display list of task logs.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_log_table extends \table_sql {
/**
* Constructor for the task_log table.
*
* @param string $filter
* @param int $resultfilter
*/
public function __construct(string $filter = '', int $resultfilter = null) {
global $DB;
if (-1 === $resultfilter) {
$resultfilter = null;
}
parent::__construct('tasklogs');
$columnheaders = [
'classname' => get_string('name'),
'type' => get_string('tasktype', 'admin'),
'userid' => get_string('user', 'admin'),
'timestart' => get_string('task_starttime', 'admin'),
'duration' => get_string('task_duration', 'admin'),
'hostname' => get_string('hostname', 'tool_task'),
'pid' => get_string('pid', 'tool_task'),
'db' => get_string('task_dbstats', 'admin'),
'result' => get_string('task_result', 'admin'),
'actions' => '',
];
$this->define_columns(array_keys($columnheaders));
$this->define_headers(array_values($columnheaders));
// The name column is a header.
$this->define_header_column('classname');
// This table is not collapsible.
$this->collapsible(false);
// The actions class should not wrap. Use the BS text utility class.
$this->column_class('actions', 'text-nowrap');
// Allow pagination.
$this->pageable(true);
// Allow sorting. Default to sort by timestarted DESC.
$this->sortable(true, 'timestart', SORT_DESC);
// Add filtering.
$where = [];
$params = [];
if (!empty($filter)) {
$orwhere = [];
$filter = str_replace('\\', '\\\\', $filter);
// Check the class name.
$orwhere[] = $DB->sql_like('classname', ':classfilter', false, false);
$params['classfilter'] = '%' . $DB->sql_like_escape($filter) . '%';
$orwhere[] = $DB->sql_like('output', ':outputfilter', false, false);
$params['outputfilter'] = '%' . $DB->sql_like_escape($filter) . '%';
$where[] = "(" . implode(' OR ', $orwhere) . ")";
}
if (null !== $resultfilter) {
$where[] = 'tl.result = :result';
$params['result'] = $resultfilter;
}
$where = implode(' AND ', $where);
$this->set_sql('', '', $where, $params);
}
/**
* Query the db. Store results in the table object for use by build_table.
*
* @param int $pagesize size of page for paginated displayed table.
* @param bool $useinitialsbar do you want to use the initials bar. Bar
* will only be used if there is a fullname column defined for the table.
*/
public function query_db($pagesize, $useinitialsbar = true) {
global $DB;
// Fetch the attempts.
$sort = $this->get_sql_sort();
if ($sort) {
$sort = "ORDER BY $sort";
}
// TODO Does not support custom user profile fields (MDL-70456).
$userfieldsapi = \core_user\fields::for_identity(\context_system::instance(), false)->with_userpic();
$userfields = $userfieldsapi->get_sql('u', false, 'user', 'userid2', false)->selects;
$where = '';
if (!empty($this->sql->where)) {
$where = "WHERE {$this->sql->where}";
}
$sql = "SELECT
tl.id, tl.type, tl.component, tl.classname, tl.userid, tl.timestart, tl.timeend,
tl.hostname, tl.pid,
tl.dbreads, tl.dbwrites, tl.result,
tl.dbreads + tl.dbwrites AS db,
tl.timeend - tl.timestart AS duration,
{$userfields}
FROM {task_log} tl
LEFT JOIN {user} u ON u.id = tl.userid
{$where}
{$sort}";
$this->pagesize($pagesize, $DB->count_records_sql("SELECT COUNT('x') FROM {task_log} tl {$where}", $this->sql->params));
if (!$this->is_downloading()) {
$this->rawdata = $DB->get_records_sql($sql, $this->sql->params, $this->get_page_start(), $this->get_page_size());
} else {
$this->rawdata = $DB->get_records_sql($sql, $this->sql->params);
}
}
/**
* Format the name cell.
*
* @param \stdClass $row
* @return string
*/
public function col_classname($row) : string {
$output = '';
if (class_exists($row->classname)) {
$task = new $row->classname;
if ($task instanceof \core\task\scheduled_task) {
$output = $task->get_name();
}
}
$output .= \html_writer::tag('div', "\\{$row->classname}", [
'class' => 'task-class',
]);
return $output;
}
/**
* Format the type cell.
*
* @param \stdClass $row
* @return string
*/
public function col_type($row) : string {
if (\core\task\database_logger::TYPE_SCHEDULED == $row->type) {
return get_string('task_type:scheduled', 'admin');
} else {
return get_string('task_type:adhoc', 'admin');
}
}
/**
* Format the timestart cell.
*
* @param \stdClass $row
* @return string
*/
public function col_result($row) : string {
if ($row->result) {
return get_string('task_result:failed', 'admin');
} else {
return get_string('success');
}
}
/**
* Format the timestart cell.
*
* @param \stdClass $row
* @return string
*/
public function col_timestart($row) : string {
return userdate($row->timestart, get_string('strftimedatetimeshort', 'langconfig'));
}
/**
* Format the duration cell.
*
* @param \stdClass $row
* @return string
*/
public function col_duration($row) : string {
$duration = round($row->timeend - $row->timestart, 2);
if (empty($duration)) {
// The format_time function returns 'now' when the difference is exactly 0.
// Note: format_time performs concatenation in exactly this fashion so we should do this for consistency.
return '0 ' . get_string('secs', 'moodle');
}
return format_time($duration);
}
/**
* Format the DB details cell.
*
* @param \stdClass $row
* @return string
*/
public function col_db($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;
}
/**
* Format the actions cell.
*
* @param \stdClass $row
* @return string
*/
public function col_actions($row) : string {
global $OUTPUT;
$actions = [];
$url = new \moodle_url('/admin/tasklogs.php', ['logid' => $row->id]);
// Quick view.
$actions[] = $OUTPUT->action_icon(
$url,
new \pix_icon('e/search', get_string('view')),
new \popup_action('click', $url)
);
// Download.
$actions[] = $OUTPUT->action_icon(
new \moodle_url($url, ['download' => true]),
new \pix_icon('t/download', get_string('download'))
);
return implode('&nbsp;', $actions);
}
/**
* Format the user cell.
*
* @param \stdClass $row
* @return string
*/
public function col_userid($row) : string {
if (empty($row->userid)) {
return '';
}
$user = (object) [];
username_load_fields_from_object($user, $row, 'user');
return fullname($user);
}
}
-131
View File
@@ -1,131 +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/>.
/**
* Task executor for adhoc tasks.
*
* @package core
* @subpackage cli
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once("{$CFG->libdir}/clilib.php");
require_once("{$CFG->libdir}/cronlib.php");
list($options, $unrecognized) = cli_get_params(
[
'execute' => false,
'help' => false,
'keep-alive' => 0,
'showsql' => false,
'showdebugging' => false,
'ignorelimits' => false,
'force' => false,
], [
'h' => 'help',
'e' => 'execute',
'k' => 'keep-alive',
'i' => 'ignorelimits',
'f' => 'force',
]
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help'] or empty($options['execute'])) {
$help = <<<EOT
Ad hoc cron tasks.
Options:
-h, --help Print out this help
--showsql Show sql queries before they are executed
--showdebugging Show developer level debugging information
-e, --execute Run all queued adhoc tasks
-k, --keep-alive=N Keep this script alive for N seconds and poll for new adhoc tasks
-i --ignorelimits Ignore task_adhoc_concurrency_limit and task_adhoc_max_runtime limits
-f, --force Run even if cron is disabled
Example:
\$sudo -u www-data /usr/bin/php admin/cli/adhoc_task.php --execute
EOT;
echo $help;
die;
}
if ($options['showdebugging']) {
set_debugging(DEBUG_DEVELOPER, true);
}
if ($options['showsql']) {
$DB->set_debug(true);
}
if (CLI_MAINTENANCE) {
echo "CLI maintenance mode active, cron execution suspended.\n";
exit(1);
}
if (moodle_needs_upgrading()) {
echo "Moodle upgrade pending, cron execution suspended.\n";
exit(1);
}
if (empty($options['execute'])) {
exit(0);
}
if (!get_config('core', 'cron_enabled') && !$options['force']) {
mtrace('Cron is disabled. Use --force to override.');
exit(1);
}
if (empty($options['keep-alive'])) {
$options['keep-alive'] = 0;
}
if (!empty($CFG->showcronsql)) {
$DB->set_debug(true);
}
if (!empty($CFG->showcrondebugging)) {
set_debugging(DEBUG_DEVELOPER, true);
}
$checklimits = empty($options['ignorelimits']);
core_php_time_limit::raise();
// Increase memory limit.
raise_memory_limit(MEMORY_EXTRA);
// Emulate normal session - we use admin account by default.
cron_setup_user();
$humantimenow = date('r', time());
$keepalive = (int)$options['keep-alive'];
\core\local\cli\shutdown::script_supports_graceful_exit();
mtrace("Server Time: {$humantimenow}\n");
cron_run_adhoc_tasks(time(), $keepalive, $checklimits);
+2 -7
View File
@@ -83,7 +83,7 @@ Examples:
Stores the given configuration variable in the shell variable, escaped
so that it can be safely used as a shell argument.
# php cfg.php --name=theme --set=classic
# php cfg.php --name=theme --set=clean
Sets the given configuration variable to the given value.
# php cfg.php --name=noemailever --unset
@@ -124,12 +124,7 @@ if ($options['unset'] || $options['set'] !== null) {
cli_error('The configuration variable is hard-set in the config.php, unable to change.', 4);
}
$new = $options['set'];
$old = get_config($options['component'], $options['name']);
if ($new !== $old) {
set_config($options['name'], $options['set'], $options['component']);
add_to_config_log($options['name'], $old, $new, $options['component']);
}
set_config($options['name'], $options['set'], $options['component']);
exit(0);
}
-171
View File
@@ -1,171 +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/>.
/**
* CLI tool for system checks
*
* @package core
* @category check
* @copyright 2020 Brendan Heywood (brendan@catalyst-au.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir.'/clilib.php');
use core\check\result;
list($options, $unrecognized) = cli_get_params([
'help' => false,
'filter' => '',
'type' => 'status',
'verbose' => false,
], [
'h' => 'help',
'f' => 'filter',
'v' => 'verbose',
't' => 'type',
]);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
$checks = \core\check\manager::get_checks($options['type']);
$types = join(', ', \core\check\manager::TYPES);
$help = "Run Moodle system checks
Options:
-h, --help Print out this help
-f, --filter Filter to a subset of checks
-t, --type Which set of checks? Defaults to 'status'
One of $types
-v, --verbose Show details of all checks, not just failed checks
Example:
sudo -u www-data php admin/cli/checks.php
sudo -u www-data php admin/cli/checks.php -v
sudo -u www-data php admin/cli/checks.php -v --filter=environment
";
if ($options['help']) {
echo $help;
die();
}
$filter = $options['filter'];
if ($filter) {
$checks = array_filter($checks, function($check, $key) use ($filter) {
$ref = $check->get_ref();
return (strpos($ref, $filter) !== false);
}, 1);
}
// These shell exit codes and labels align with the NRPE standard.
$exitcodes = [
result::NA => 0,
result::OK => 0,
result::INFO => 0,
result::UNKNOWN => 3,
result::WARNING => 1,
result::ERROR => 2,
result::CRITICAL => 2,
];
$exitlabel = [
result::NA => 'OK',
result::OK => 'OK',
result::INFO => 'OK',
result::UNKNOWN => 'UNKNOWN',
result::WARNING => 'WARNING',
result::ERROR => 'CRITICAL',
result::CRITICAL => 'CRITICAL',
];
$format = "% 10s| % -60s\n";
$spacer = "----------+--------------------------------------------------------------------\n";
$prefix = ' |';
$output = '';
$header = $exitlabel[result::OK] . ': ' . get_string('checksok', '', $options['type']) . "\n";
$exitcode = $exitcodes[result::OK];
foreach ($checks as $check) {
$ref = $check->get_ref();
$result = $check->get_result();
$status = $result->get_status();
$checkexitcode = $exitcodes[$status];
// Summary is treated as html.
$summary = $result->get_summary();
$summary = html_to_text($summary, 60, false);
if ($checkexitcode > $exitcode) {
$exitcode = $checkexitcode;
$header = $exitlabel[$status] . ': ' . $check->get_name() . " (" . $check->get_ref() . ")\n";
}
if (empty($messages[$status])) {
$messages[$status] = $result;
}
$len = strlen(get_string('status' . $status));
if ($options['verbose'] ||
$status == result::WARNING ||
$status == result::CRITICAL ||
$status == result::ERROR) {
$output .= sprintf(
$format,
$OUTPUT->check_result($result),
sprintf('%s (%s)', $check->get_name(), $ref)
);
$summary = str_replace("\n", "\n" . $prefix . ' ', $summary);
$output .= sprintf( $format, '', ' ' . $summary);
if ($options['verbose']) {
$actionlink = $check->get_action_link();
if ($actionlink) {
$output .= sprintf( $format, '', ' ' . $actionlink->url);
}
$output .= sprintf( $format, '', '');
}
}
}
// Print NRPE header.
print $header;
// Only show the table header if there is anything to show.
if ($output) {
print sprintf($format,
get_string('status'). ' ',
get_string('check')
) . $spacer;
print $output;
}
// NRPE shell exit code.
exit($exitcode);
+3 -120
View File
@@ -35,25 +35,8 @@ require_once($CFG->libdir.'/clilib.php'); // cli only functions
require_once($CFG->libdir.'/cronlib.php');
// now get cli options
list($options, $unrecognized) = cli_get_params(
[
'help' => false,
'stop' => false,
'list' => false,
'force' => false,
'enable' => false,
'disable' => false,
'disable-wait' => false,
], [
'h' => 'help',
's' => 'stop',
'l' => 'list',
'f' => 'force',
'e' => 'enable',
'd' => 'disable',
'w' => 'disable-wait',
]
);
list($options, $unrecognized) = cli_get_params(array('help'=>false),
array('h'=>'help'));
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
@@ -65,13 +48,7 @@ if ($options['help']) {
"Execute periodic cron actions.
Options:
-h, --help Print out this help
-s, --stop Notify all other running cron processes to stop after the current task
-l, --list Show the list of currently running tasks and how long they have been running
-f, --force Execute task even if cron is disabled
-e, --enable Enable cron
-d, --disable Disable cron
-w, --disable-wait=600 Disable cron and wait until all tasks finished or fail after N seconds (optional param)
-h, --help Print out this help
Example:
\$sudo -u www-data /usr/bin/php admin/cli/cron.php
@@ -81,98 +58,4 @@ Example:
die;
}
if ($options['stop']) {
// By clearing the caches this signals to other running processes
// to exit after finishing the current task.
\core\task\manager::clear_static_caches();
die;
}
if ($options['enable']) {
set_config('cron_enabled', 1);
mtrace('Cron has been enabled for the site.');
exit(0);
}
if ($options['disable']) {
set_config('cron_enabled', 0);
\core\task\manager::clear_static_caches();
mtrace('Cron has been disabled for the site.');
exit(0);
}
if ($options['list']) {
$tasks = \core\task\manager::get_running_tasks();
mtrace('The list of currently running tasks:');
$format = "%7s %-12s %-9s %-20s %-52s\n";
printf ($format,
'PID',
'HOST',
'TYPE',
'TIME',
'CLASSNAME'
);
foreach ($tasks as $task) {
printf ($format,
$task->pid,
substr($task->hostname, 0, 12),
$task->type,
format_time(time() - $task->timestarted),
substr($task->classname, 0, 52)
);
}
exit(0);
}
if ($wait = $options['disable-wait']) {
$started = time();
if (true === $wait) {
// Default waiting time.
$waitsec = 600;
} else {
$waitsec = $wait;
$wait = true;
}
set_config('cron_enabled', 0);
\core\task\manager::clear_static_caches();
mtrace('Cron has been disabled for the site.');
mtrace('Allocating '. format_time($waitsec) . ' for the tasks to finish.');
$lastcount = 0;
while ($wait) {
$tasks = \core\task\manager::get_running_tasks();
if (count($tasks) == 0) {
mtrace('');
mtrace('All scheduled and adhoc tasks finished.');
exit(0);
}
if (time() - $started >= $waitsec) {
mtrace('');
mtrace('Wait time ('. format_time($waitsec) . ') elapsed, but ' . count($tasks) . ' task(s) still running.');
mtrace('Exiting with code 1.');
exit(1);
}
if (count($tasks) !== $lastcount) {
mtrace('');
mtrace(count($tasks) . " tasks currently running.", '');
$lastcount = count($tasks);
} else {
mtrace('.', '');
}
sleep(1);
}
}
if (!get_config('core', 'cron_enabled') && !$options['force']) {
mtrace('Cron is disabled. Use --force to override.');
exit(1);
}
\core\local\cli\shutdown::script_supports_graceful_exit();
cron_run();
-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/>.
/**
* CLI script to reset dashboards.
*
* @package core
* @subpackage cli
* @copyright 2021 Brendan Heywood (brendan@catalyst-au.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
require_once($CFG->dirroot.'/my/lib.php');
list($options, $unrecognized) = cli_get_params([
'help' => false,
'execute' => false,
], [
'h' => 'help',
'e' => 'execute',
]);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized), 2);
}
if (!$options['execute']) {
$help = <<<EOF
Resets Moodle dashboards for all users
Options:
-h, --help Print out this help
-e, --execute Actually run the reset
Example:
\$ sudo -u www-data /usr/bin/php admin/cli/dashboard_reset.php -e
EOF;
echo $help;
exit(0);
}
$progressbar = new progress_bar();
$progressbar->create();
my_reset_page_for_all_users(MY_PAGE_PRIVATE, 'my-index', $progressbar);
-138
View File
@@ -1,138 +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/>.
/**
* Fix orphaned calendar events that were broken by MDL-67494.
*
* This script will look for all the calendar events which userids
* where broken by a wrong upgrade step, affecting to Moodle 3.9.5
* and up.
*
* It performs checks to both:
* a) Detect if the site was affected (ran the wrong upgrade step).
* b) Look for orphaned calendar events, categorising them as:
* - standard: site / category / course / group / user events
* - subscription: events created via subscriptions.
* - action: normal action events, created to show common important dates.
* - override: user and group override events, particular, that some activities support.
* - custom: other events, not being any of the above, common or particular.
* By specifying it (--fix) try to recover as many broken events (missing userid) as
* possible. Standard, subscription, action, override events in core are fully supported but
* override or custom events should be fixed by each plugin as far as there isn't any standard
* API (plugin-wise) to launch a rebuild of the calendar events.
*
* @package core
* @copyright 2021 onwards Simey Lameze <simey@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir . "/clilib.php");
require_once($CFG->libdir . '/db/upgradelib.php');
// Supported options.
$long = ['fix' => false, 'help' => false];
$short = ['f' => 'fix', 'h' => 'help'];
// CLI options.
[$options, $unrecognized] = cli_get_params($long, $short);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help = <<<EOT
Fix orphaned calendar events.
This script detects calendar events that have had their
userid lost. By default it will perform various checks
and report them, showing the site status in an easy way.
Also, optionally (--fix), it wil try to recover as many
lost userids as possible from different sources. Note that
this script aims to process well-know events in core,
leaving custom events in 3rd part plugins mostly unmodified
because there isn't any consistent way to regenerate them.
For more details: https://tracker.moodle.org/browse/MDL-71156
Options:
-h, --help Print out this help.
-f, --fix Fix the orphaned calendar events in the DB.
If not specified only check and report problems to STDERR.
Usage:
- Only report: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php
- Report and fix: \$ sudo -u www-data /usr/bin/php admin/cli/fix_orphaned_calendar_events.php -f
EOT;
cli_writeln($help);
die;
}
// Check various usual pre-requisites.
if (empty($CFG->version)) {
cli_error('Database is not yet installed.');
}
$admin = get_admin();
if (!$admin) {
cli_error('Error: No admin account was found.');
}
if (moodle_needs_upgrading()) {
cli_error('Moodle upgrade pending, script execution suspended.');
}
// Do everything as admin by default.
\core\session\manager::set_user($admin);
// Report current site status.
cli_heading('Checking the site status');
$needsfix = upgrade_calendar_site_status();
// Report current calendar events status.
cli_heading('Checking the calendar events status');
$info = upgrade_calendar_events_status();
$hasbadevents = $info['total']->bad > 0 || $info['total']->bad != $info['other']->bad;
$needsfix = $needsfix || $hasbadevents;
// If, selected, fix as many calendar events as possible.
if ($options['fix']) {
// If the report has told us that the fix was not needed... ask for confirmation!
if (!$needsfix) {
cli_writeln("This site DOES NOT NEED to run the calendar events fix.");
$input = cli_input('Are you completely sure that you want to run the fix? (y/N)', 'N', ['y', 'Y', 'n', 'N']);
if (strtolower($input) != 'y') {
exit(0);
}
cli_writeln("");
}
cli_heading('Fixing as many as possible calendar events');
upgrade_calendar_events_fix_remaining($info);
// Report current (after fix) calendar events status.
cli_heading('Checking the calendar events status (after fix)');
upgrade_calendar_events_status();
} else if ($needsfix) {
// Fix option was not provided but problem events have been found. Notify the user and provide info how to fix these events.
cli_writeln("This site NEEDS to run the calendar events fix!");
cli_writeln("To fix the calendar events, re-run this script with the --fix option.");
}
-79
View File
@@ -1,79 +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/>.
/**
* Generates a secure key for the current server (presuming it does not already exist).
*
* @package core_admin
* @copyright 2020 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
use \core\encryption;
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir . '/clilib.php');
// Get cli options.
[$options, $unrecognized] = cli_get_params(
['help' => false, 'method' => null],
['h' => 'help']);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
// TODO: MDL-71421 - Remove the openssl alternative once sodium becomes a requirement in Moodle 4.2.
if ($options['help']) {
echo "Generate secure key
This script manually creates a secure key within the secret data root folder (configured in
config.php as \$CFG->secretdataroot). You must run it using an account with access to write
to that folder.
In normal use Moodle automatically creates the key; this script is intended when setting up
a new Moodle system, for cases where the secure folder is not on shared storage and the key
may be manually installed on multiple servers.
Options:
-h, --help Print out this help
--method <method> Generate key for specified encryption method instead of default.
* sodium
* openssl-aes-256-ctr
Example:
php admin/cli/generate_key.php
";
exit;
}
$method = $options['method'];
if (encryption::key_exists($method)) {
echo 'Key already exists: ' . encryption::get_key_file($method) . "\n";
exit;
}
// Creates key with default permissions (no chmod).
echo "Generating key...\n";
encryption::create_key($method, false);
echo "\nKey created: " . encryption::get_key_file($method) . "\n\n";
echo "If the key folder is not shared storage, then key files should be copied to all servers.\n";
+186 -204
View File
@@ -215,7 +215,6 @@ define('SITEID', 1);
//Database types
$databases = array('mysqli' => moodle_database::get_driver_instance('mysqli', 'native'),
'auroramysql' => moodle_database::get_driver_instance('auroramysql', 'native'),
'mariadb'=> moodle_database::get_driver_instance('mariadb', 'native'),
'pgsql' => moodle_database::get_driver_instance('pgsql', 'native'),
'oci' => moodle_database::get_driver_instance('oci', 'native'),
@@ -267,7 +266,6 @@ list($options, $unrecognized) = cli_get_params(
);
$interactive = empty($options['non-interactive']);
$skipdatabase = $options['skip-database'];
// set up language
$lang = clean_param($options['lang'], PARAM_SAFEDIR);
@@ -393,6 +391,7 @@ if ($interactive) {
$CFG->wwwroot = $wwwroot;
$CFG->httpswwwroot = $CFG->wwwroot;
//We need dataroot before lang download
$CFG->dataroot = $options['dataroot'];
if ($interactive) {
@@ -515,105 +514,100 @@ if ($interactive) {
$database = $databases[$CFG->dbtype];
// We cannot do any validation until all DB connection data is provided.
$hintdatabase = '';
do {
echo $hintdatabase;
// Ask for db host.
if ($interactive) {
cli_separator();
cli_heading(get_string('databasehost', 'install'));
if ($options['dbhost'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbhost']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->dbhost = cli_input($prompt, $options['dbhost']);
// ask for db host
if ($interactive) {
cli_separator();
cli_heading(get_string('databasehost', 'install'));
if ($options['dbhost'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbhost']);
} else {
$CFG->dbhost = $options['dbhost'];
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->dbhost = cli_input($prompt, $options['dbhost']);
// Ask for db name.
if ($interactive) {
cli_separator();
cli_heading(get_string('databasename', 'install'));
if ($options['dbname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->dbname = cli_input($prompt, $options['dbname']);
} else {
$CFG->dbhost = $options['dbhost'];
}
// ask for db name
if ($interactive) {
cli_separator();
cli_heading(get_string('databasename', 'install'));
if ($options['dbname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbname']);
} else {
$CFG->dbname = $options['dbname'];
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->dbname = cli_input($prompt, $options['dbname']);
// Ask for db prefix.
if ($interactive) {
cli_separator();
cli_heading(get_string('dbprefix', 'install'));
//TODO: solve somehow the prefix trouble for oci.
if ($options['prefix'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['prefix']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->prefix = cli_input($prompt, $options['prefix']);
} else {
$CFG->dbname = $options['dbname'];
}
// ask for db prefix
if ($interactive) {
cli_separator();
cli_heading(get_string('dbprefix', 'install'));
//TODO: solve somehow the prefix trouble for oci
if ($options['prefix'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['prefix']);
} else {
$CFG->prefix = $options['prefix'];
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->prefix = cli_input($prompt, $options['prefix']);
// Ask for db port.
if ($interactive) {
cli_separator();
cli_heading(get_string('databaseport', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbport']);
$CFG->dboptions['dbport'] = (int) cli_input($prompt, $options['dbport']);
} else {
$CFG->prefix = $options['prefix'];
}
// ask for db port
if ($interactive) {
cli_separator();
cli_heading(get_string('databaseport', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbport']);
$CFG->dboptions['dbport'] = (int)cli_input($prompt, $options['dbport']);
} else {
$CFG->dboptions['dbport'] = (int)$options['dbport'];
}
if ($CFG->dboptions['dbport'] <= 0) {
$CFG->dboptions['dbport'] = '';
}
// ask for db socket
if ($CFG->ostype === 'WINDOWS') {
$CFG->dboptions['dbsocket'] = '';
} else if ($interactive and empty($CFG->dboptions['dbport'])) {
cli_separator();
cli_heading(get_string('databasesocket', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbsocket']);
$CFG->dboptions['dbsocket'] = cli_input($prompt, $options['dbsocket']);
} else {
$CFG->dboptions['dbsocket'] = $options['dbsocket'];
}
// ask for db user
if ($interactive) {
cli_separator();
cli_heading(get_string('databaseuser', 'install'));
if ($options['dbuser'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbuser']);
} else {
$CFG->dboptions['dbport'] = (int) $options['dbport'];
}
if ($CFG->dboptions['dbport'] <= 0) {
$CFG->dboptions['dbport'] = '';
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->dbuser = cli_input($prompt, $options['dbuser']);
// Ask for db socket.
if ($CFG->ostype === 'WINDOWS') {
$CFG->dboptions['dbsocket'] = '';
} else if ($interactive and empty($CFG->dboptions['dbport'])) {
cli_separator();
cli_heading(get_string('databasesocket', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbsocket']);
$CFG->dboptions['dbsocket'] = cli_input($prompt, $options['dbsocket']);
} else {
$CFG->dboptions['dbsocket'] = $options['dbsocket'];
}
// Ask for db user.
if ($interactive) {
cli_separator();
cli_heading(get_string('databaseuser', 'install'));
if ($options['dbuser'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbuser']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->dbuser = cli_input($prompt, $options['dbuser']);
} else {
$CFG->dbuser = $options['dbuser'];
}
// Ask for db password.
if ($interactive) {
cli_separator();
cli_heading(get_string('databasepass', 'install'));
} else {
$CFG->dbuser = $options['dbuser'];
}
// ask for db password
if ($interactive) {
cli_separator();
cli_heading(get_string('databasepass', 'install'));
do {
if ($options['dbpass'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbpass']);
} else {
@@ -621,118 +615,110 @@ do {
}
$CFG->dbpass = cli_input($prompt, $options['dbpass']);
if (function_exists('distro_pre_create_db')) { // Hook for distros needing to do something before DB creation.
$distro = distro_pre_create_db($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix,
array('dbpersist' => 0, 'dbport' => $CFG->dboptions['dbport'], 'dbsocket' => $CFG->dboptions['dbsocket']),
$distro);
if (function_exists('distro_pre_create_db')) { // Hook for distros needing to do something before DB creation
$distro = distro_pre_create_db($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']), $distro);
}
$hintdatabase = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix,
array('dbpersist' => 0, 'dbport' => $CFG->dboptions['dbport'], 'dbsocket' => $CFG->dboptions['dbsocket']));
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']));
} while ($hint_database !== '');
} else {
$CFG->dbpass = $options['dbpass'];
$hintdatabase = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix,
array('dbpersist' => 0, 'dbport' => $CFG->dboptions['dbport'], 'dbsocket' => $CFG->dboptions['dbsocket']));
if ($hintdatabase !== '') {
cli_error(get_string('dbconnectionerror', 'install'));
}
} else {
$CFG->dbpass = $options['dbpass'];
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']));
if ($hint_database !== '') {
cli_error(get_string('dbconnectionerror', 'install'));
}
} while ($hintdatabase !== '');
}
// If --skip-database option is provided, we do not need to ask for site fullname, shortname, adminuser, adminpass, adminemail.
// These fields will be requested during the database install part.
if (!$skipdatabase) {
// Ask for fullname.
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
// ask for fullname
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
} else {
if (empty($options['fullname'])) {
$a = (object)['option' => 'fullname', 'value' => $options['fullname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for shortname.
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
if (empty($options['shortname'])) {
$a = (object)['option' => 'shortname', 'value' => $options['shortname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for admin user name.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if ((empty($options['adminuser']) || $options['adminuser'] === 'guest')) {
$a = (object)['option' => 'adminuser', 'value' => $options['adminuser']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for admin user password.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if ((empty($options['adminpass']) or $options['adminpass'] === 'admin')) {
$a = (object)['option' => 'adminpass', 'value' => $options['adminpass']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object)['option' => 'adminemail', 'value' => $options['adminemail']];
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
} else {
if (empty($options['fullname'])) {
$a = (object)array('option'=>'fullname', 'value'=>$options['fullname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for shortname
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
if (empty($options['shortname'])) {
$a = (object)array('option'=>'shortname', 'value'=>$options['shortname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user name
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if (empty($options['adminuser']) or $options['adminuser'] === 'guest') {
$a = (object)array('option'=>'adminuser', 'value'=>$options['adminuser']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user password
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if (empty($options['adminpass']) or $options['adminpass'] === 'admin') {
$a = (object)array('option'=>'adminpass', 'value'=>$options['adminpass']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object) array('option' => 'adminemail', 'value' => $options['adminemail']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
// Ask for the upgrade key.
if ($interactive) {
cli_separator();
@@ -751,27 +737,23 @@ if ($options['upgradekey'] !== '') {
$CFG->upgradekey = $options['upgradekey'];
}
// The user does not also need to pass agree-license when --skip-database is provided as the user will need to accept
// the license again in the database install part.
if (!$skipdatabase) {
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
}
}
} else {
if (!$options['agree-license'] && !$skipdatabase) {
cli_error(get_string('climustagreelicense', 'install'));
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
}
}
} else {
if (!$options['agree-license']) {
cli_error(get_string('climustagreelicense', 'install'));
}
}
// Finally we have all info needed for config.php
@@ -819,7 +801,7 @@ if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_error(get_string('pluginschecktodo', 'admin'));
}
if (!$skipdatabase) {
if (!$options['skip-database']) {
install_cli_database($options, $interactive);
// This needs to happen at the end to ensure it occurs after all caches
// have been purged for the last time.
-7
View File
@@ -56,7 +56,6 @@ Options:
--agree-license Indicates agreement with software license.
--fullname=STRING Name of the site
--shortname=STRING Name of the site
--summary=STRING The summary to be displayed on the front page
-h, --help Print out this help
Example:
@@ -97,7 +96,6 @@ list($options, $unrecognized) = cli_get_params(
'adminemail' => '',
'fullname' => '',
'shortname' => '',
'summary' => '',
'agree-license' => false,
'help' => false
),
@@ -106,11 +104,6 @@ list($options, $unrecognized) = cli_get_params(
)
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
// We show help text even if tables are installed.
if ($options['help']) {
echo $help;
+8 -8
View File
@@ -119,7 +119,7 @@ if (!empty($options['collation'])) {
if ($dbcollation->value !== $collation || $dbcharset->value !== $charset) {
// Try to convert the DB.
echo "Converting database to '$collation' for $CFG->wwwroot:\n";
$sql = "ALTER DATABASE `$CFG->dbname` DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
$sql = "ALTER DATABASE $CFG->dbname DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation";
try {
$DB->change_database_structure($sql);
} catch (exception $e) {
@@ -146,7 +146,7 @@ if (!empty($options['collation'])) {
} else {
try {
$DB->change_database_structure("ALTER TABLE `$table->name` CONVERT TO CHARACTER SET $charset COLLATE $collation");
$DB->change_database_structure("ALTER TABLE $table->name CONVERT TO CHARACTER SET $charset COLLATE $collation");
echo "CONVERTED\n";
$converted++;
} catch (ddl_exception $e) {
@@ -163,7 +163,7 @@ if (!empty($options['collation'])) {
}
}
$sql = "SHOW FULL COLUMNS FROM `$table->name` WHERE collation IS NOT NULL";
$sql = "SHOW FULL COLUMNS FROM $table->name WHERE collation IS NOT NULL";
$rs2 = $DB->get_recordset_sql($sql);
foreach ($rs2 as $column) {
$column = (object)array_change_key_case((array)$column, CASE_LOWER);
@@ -181,7 +181,7 @@ if (!empty($options['collation'])) {
$notnull = ($column->null === 'NO') ? 'NOT NULL' : 'NULL';
$default = (!is_null($column->default) and $column->default !== '') ? "DEFAULT '$column->default'" : '';
// primary, unique and inc are not supported for texts
$sql = "ALTER TABLE `$table->name`
$sql = "ALTER TABLE $table->name
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
@@ -192,11 +192,11 @@ if (!empty($options['collation'])) {
$default = !is_null($column->default) ? "DEFAULT '$column->default'" : '';
if ($rowformat != '') {
$sql = "ALTER TABLE `$table->name` $rowformat";
$sql = "ALTER TABLE $table->name $rowformat";
$DB->change_database_structure($sql);
}
$sql = "ALTER TABLE `$table->name`
$sql = "ALTER TABLE $table->name
MODIFY COLUMN $column->field $column->type
CHARACTER SET $charset
COLLATE $collation $notnull $default";
@@ -315,8 +315,8 @@ function mysql_set_row_format($tablename, $charset, $collation, $engine) {
if ($rs->row_format == 'Compact' || $rs->row_format == 'Redundant') {
$rowformat = $DB->get_row_format_sql($engine, $collation);
// Try to convert to compressed format and then try updating the collation again.
$DB->change_database_structure("ALTER TABLE `$tablename` $rowformat");
$DB->change_database_structure("ALTER TABLE `$tablename` CONVERT TO CHARACTER SET $charset COLLATE $collation");
$DB->change_database_structure("ALTER TABLE $tablename $rowformat");
$DB->change_database_structure("ALTER TABLE $tablename CONVERT TO CHARACTER SET $charset COLLATE $collation");
} else {
// Row format may not be the problem. Can not diagnose problem. Send fail reply.
return false;
+2 -2
View File
@@ -158,7 +158,7 @@ if (!empty($options['info'])) {
}
foreach ($fixtables as $table) {
$DB->change_database_structure("ALTER TABLE `{$prefix}$table` ROW_FORMAT=Compressed");
$DB->change_database_structure("ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed");
echo str_pad($prefix . $table, 32, ' ', STR_PAD_RIGHT) . " ... Compressed\n";
}
@@ -189,7 +189,7 @@ if (!empty($options['info'])) {
echo "SET GLOBAL innodb_file_per_table=1;\n";
echo "SET GLOBAL innodb_file_format=Barracuda;\n";
foreach ($fixtables as $table) {
echo "ALTER TABLE `{$prefix}$table` ROW_FORMAT=Compressed;\n";
echo "ALTER TABLE {$prefix}$table ROW_FORMAT=Compressed;\n";
}
echo "\n";
exit(0);
+6 -27
View File
@@ -28,16 +28,7 @@ define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
$longoptions = [
'help' => false,
'muc' => false,
'theme' => false,
'lang' => false,
'js' => false,
'filter' => false,
'other' => false
];
list($options, $unrecognized) = cli_get_params($longoptions, ['h' => 'help']);
list($options, $unrecognized) = cli_get_params(array('help' => false), array('h' => 'help'));
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
@@ -45,32 +36,20 @@ if ($unrecognized) {
}
if ($options['help']) {
// The indentation of this string is "wrong" but this is to avoid a extra whitespace in console output.
$help = <<<EOF
Invalidates Moodle internal caches
Specific caches can be defined (alone or in combination) using arguments. If none are specified,
all caches will be purged.
$help =
"Invalidates all Moodle internal caches
Options:
-h, --help Print out this help
--muc Purge all MUC caches (includes lang cache)
--theme Purge theme cache
--lang Purge language string cache
--js Purge JavaScript cache
--filter Purge text filter cache
--other Purge all file caches and other miscellaneous caches (may include MUC
if using cachestore_file).
Example:
\$ sudo -u www-data /usr/bin/php admin/cli/purge_caches.php
EOF;
\$sudo -u www-data /usr/bin/php admin/cli/purge_caches.php
";
echo $help;
exit(0);
}
purge_caches(array_filter($options));
purge_all_caches();
exit(0);
+1 -1
View File
@@ -94,7 +94,7 @@ if ($options['password'] == '' ) {
$errmsg = '';//prevent eclipse warning
if (!$options['ignore-password-policy'] ) {
if (!check_password_policy($password, $errmsg, $user)) {
if (!check_password_policy($password, $errmsg)) {
cli_error(html_to_text($errmsg, 0));
}
}
-109
View File
@@ -1,109 +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/>.
/**
* This script allows to restore a course from CLI.
*
* @package core
* @subpackage cli
* @copyright 2020 Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', 1);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir . '/clilib.php');
require_once($CFG->dirroot . "/backup/util/includes/restore_includes.php");
list($options, $unrecognized) = cli_get_params([
'file' => '',
'categoryid' => '',
'showdebugging' => false,
'help' => false,
], [
'f' => 'file',
'c' => 'categoryid',
's' => 'showdebugging',
'h' => 'help',
]);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help'] || !($options['file']) || !($options['categoryid'])) {
$help = <<<EOL
Restore backup into provided category.
Options:
-f, --file=STRING Path to the backup file.
-c, --categoryid=INT ID of the category to restore too.
-s, --showdebugging Show developer level debugging information
-h, --help Print out this help.
Example:
\$sudo -u www-data /usr/bin/php admin/cli/restore_backup.php --file=/path/to/backup/file.mbz --categoryid=1\n
EOL;
echo $help;
exit(0);
}
if ($options['showdebugging']) {
set_debugging(DEBUG_DEVELOPER, true);
}
if (!$admin = get_admin()) {
print_error('noadmins');
}
if (!file_exists($options['file'])) {
print_error('filenotfound');
}
if (!$category = $DB->get_record('course_categories', ['id' => $options['categoryid']], 'id')) {
print_error('invalidcategoryid');
}
$backupdir = "restore_" . uniqid();
$path = $CFG->tempdir . DIRECTORY_SEPARATOR . "backup" . DIRECTORY_SEPARATOR . $backupdir;
cli_heading(get_string('extractingbackupfileto', 'backup', $path));
$fp = get_file_packer('application/vnd.moodle.backup');
$fp->extract_to_pathname($options['file'], $path);
cli_heading(get_string('preprocessingbackupfile'));
try {
list($fullname, $shortname) = restore_dbops::calculate_course_names(0, get_string('restoringcourse', 'backup'),
get_string('restoringcourseshortname', 'backup'));
$courseid = restore_dbops::create_new_course($fullname, $shortname, $category->id);
$rc = new restore_controller($backupdir, $courseid, backup::INTERACTIVE_NO,
backup::MODE_GENERAL, $admin->id, backup::TARGET_NEW_COURSE);
$rc->execute_precheck();
$rc->execute_plan();
$rc->destroy();
} catch (Exception $e) {
cli_heading(get_string('cleaningtempdata'));
fulldelete($path);
print_error('generalexceptionmessage', 'error', '', $e->getMessage());
}
cli_heading(get_string('restoredcourseid', 'backup', $courseid));
exit(0);
-168
View File
@@ -1,168 +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/>.
/**
* CLI task execution.
*
* @package core
* @subpackage cli
* @copyright 2014 Petr Skoda
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once("$CFG->libdir/clilib.php");
require_once("$CFG->libdir/cronlib.php");
list($options, $unrecognized) = cli_get_params(
[
'help' => false,
'list' => false,
'execute' => false,
'showsql' => false,
'showdebugging' => false,
'force' => false,
], [
'h' => 'help',
'f' => 'force',
]
);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help'] or (!$options['list'] and !$options['execute'])) {
$help =
"Scheduled cron tasks.
Options:
--execute=\\some\\task Execute scheduled task manually
--list List all scheduled tasks
--showsql Show sql queries before they are executed
--showdebugging Show developer level debugging information
-h, --help Print out this help
-f, --force Execute task even if cron is disabled
Example:
\$sudo -u www-data /usr/bin/php admin/cli/scheduled_task.php --execute=\\core\\task\\session_cleanup_task
";
echo $help;
die;
}
if ($options['showdebugging']) {
set_debugging(DEBUG_DEVELOPER, true);
}
if ($options['showsql']) {
$DB->set_debug(true);
}
if ($options['list']) {
cli_heading("List of scheduled tasks ($CFG->wwwroot)");
$shorttime = get_string('strftimedatetimeshort');
$tasks = \core\task\manager::get_all_scheduled_tasks();
echo str_pad(get_string('scheduledtasks', 'tool_task'), 50, ' ') . ' ' . str_pad(get_string('runpattern', 'tool_task'), 17, ' ')
. ' ' . str_pad(get_string('lastruntime', 'tool_task'), 40, ' ') . get_string('nextruntime', 'tool_task') . "\n";
foreach ($tasks as $task) {
$class = '\\' . get_class($task);
$schedule = $task->get_minute() . ' '
. $task->get_hour() . ' '
. $task->get_day() . ' '
. $task->get_day_of_week() . ' '
. $task->get_month() . ' '
. $task->get_day_of_week();
$nextrun = $task->get_next_run_time();
$lastrun = $task->get_last_run_time();
$plugininfo = core_plugin_manager::instance()->get_plugin_info($task->get_component());
$plugindisabled = $plugininfo && $plugininfo->is_enabled() === false && !$task->get_run_if_component_disabled();
if ($plugindisabled) {
$nextrun = get_string('plugindisabled', 'tool_task');
} else if ($task->get_disabled()) {
$nextrun = get_string('taskdisabled', 'tool_task');
} else if ($nextrun > time()) {
$nextrun = userdate($nextrun);
} else {
$nextrun = get_string('asap', 'tool_task');
}
if ($lastrun) {
$lastrun = userdate($lastrun);
} else {
$lastrun = get_string('never');
}
echo str_pad($class, 50, ' ') . ' ' . str_pad($schedule, 17, ' ') .
' ' . str_pad($lastrun, 40, ' ') . ' ' . $nextrun . "\n";
}
exit(0);
}
if ($execute = $options['execute']) {
if (!$task = \core\task\manager::get_scheduled_task($execute)) {
mtrace("Task '$execute' not found");
exit(1);
}
if (moodle_needs_upgrading()) {
mtrace("Moodle upgrade pending, cannot execute tasks.");
exit(1);
}
if (!get_config('core', 'cron_enabled') && !$options['force']) {
mtrace('Cron is disabled. Use --force to override.');
exit(1);
}
\core\task\manager::scheduled_task_starting($task);
// Increase memory limit.
raise_memory_limit(MEMORY_EXTRA);
// Emulate normal session - we use admin account by default.
cron_setup_user();
// Execute the task.
\core\local\cli\shutdown::script_supports_graceful_exit();
$cronlockfactory = \core\lock\lock_config::get_lock_factory('cron');
if (!$cronlock = $cronlockfactory->get_lock('core_cron', 10)) {
mtrace('Cannot obtain cron lock');
exit(129);
}
if (!$lock = $cronlockfactory->get_lock('\\' . get_class($task), 10)) {
$cronlock->release();
mtrace('Cannot obtain task lock');
exit(130);
}
$task->set_lock($lock);
if (!$task->is_blocking()) {
$cronlock->release();
} else {
$task->set_cron_lock($cronlock);
}
cron_run_inner_scheduled_task($task);
}
+7 -7
View File
@@ -38,17 +38,17 @@ if ($unrecognized) {
}
// If necessary add files that should be ignored - such as in 3rd party plugins.
$ignorelist = array();
$blacklist = array();
$path = $options['path'];
if (!file_exists($path)) {
cli_error("Invalid path $path");
}
if ($options['ie9fix']) {
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_ie9fix', $ignorelist);
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_ie9fix', $blacklist);
} else if ($options['noaspectratio']) {
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_noaspectratio', $ignorelist);
core_admin_recurse_svgs($path, '', 'core_admin_svgtool_noaspectratio', $blacklist);
} else {
$help =
@@ -153,9 +153,9 @@ function core_admin_svgtool_noaspectratio($file) {
* @param string $base
* @param string $sub
* @param string $filecallback
* @param array $ignorelist List of files to be ignored and skipped.
* @param array $blacklist
*/
function core_admin_recurse_svgs($base, $sub, $filecallback, $ignorelist) {
function core_admin_recurse_svgs($base, $sub, $filecallback, $blacklist) {
if (is_dir("$base/$sub")) {
$items = new DirectoryIterator("$base/$sub");
foreach ($items as $item) {
@@ -163,7 +163,7 @@ function core_admin_recurse_svgs($base, $sub, $filecallback, $ignorelist) {
continue;
}
$file = $item->getFilename();
core_admin_recurse_svgs("$base/$sub", $file, $filecallback, $ignorelist);
core_admin_recurse_svgs("$base/$sub", $file, $filecallback, $blacklist);
}
unset($item);
unset($items);
@@ -174,7 +174,7 @@ function core_admin_recurse_svgs($base, $sub, $filecallback, $ignorelist) {
return;
}
$file = realpath("$base/$sub");
if (in_array($file, $ignorelist)) {
if (in_array($file, $blacklist)) {
return;
}
$filecallback($file);
-183
View File
@@ -1,183 +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/>.
/**
* CLI script to uninstall plugins.
*
* @package core
* @subpackage cli
* @copyright 2018 Dmitrii Metelkin <dmitriim@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__ . '/../../config.php');
require_once($CFG->libdir . '/clilib.php');
require_once($CFG->libdir . '/adminlib.php');
$help = "Command line tool to uninstall plugins.
Options:
-h --help Print this help.
--show-all Displays a list of all installed plugins.
--show-contrib Displays a list of all third-party installed plugins.
--show-missing Displays a list of plugins missing from disk.
--purge-missing Uninstall all missing from disk plugins.
--plugins=<plugin name> A comma separated list of plugins to be uninstalled. E.g. mod_assign,mod_forum
--run Execute uninstall. If this option is not set, then the script will be run in a dry mode.
--showsql Show sql queries before they are executed.
--showdebugging Show developer level debugging information.
Examples:
# php uninstall_plugins.php --show-all
Prints tab-separated list of all installed plugins.
# php uninstall_plugins.php --show-contrib
Prints tab-separated list of all third-party installed plugins.
# php uninstall_plugins.php --show-missing
Prints tab-separated list of all missing from disk plugins.
# php uninstall_plugins.php --purge-missing
A dry run of uninstalling all missing plugins.
# php uninstall_plugins.php --purge-missing --run
Run uninstall of all missing plugins.
# php uninstall_plugins.php --plugins=mod_assign,mod_forum
A dry run of uninstalling mod_assign and mod_forum plugins.
# php uninstall_plugins.php --plugins=mod_assign,mod_forum --run
Run uninstall for mod_assign and mod_forum plugins.
";
list($options, $unrecognised) = cli_get_params([
'help' => false,
'show-all' => false,
'show-contrib' => false,
'show-missing' => false,
'purge-missing' => false,
'plugins' => false,
'run' => false,
'showsql' => false,
'showdebugging' => false,
], [
'h' => 'help'
]);
if ($unrecognised) {
$unrecognised = implode(PHP_EOL.' ', $unrecognised);
cli_error(get_string('cliunknowoption', 'core_admin', $unrecognised));
}
if ($options['help']) {
cli_writeln($help);
exit(0);
}
if ($options['showdebugging']) {
set_debugging(DEBUG_DEVELOPER, true);
}
if ($options['showsql']) {
$DB->set_debug(true);
}
$pluginman = core_plugin_manager::instance();
$plugininfo = $pluginman->get_plugins();
if ($options['show-all'] || $options['show-missing'] || $options['show-contrib']) {
foreach ($plugininfo as $type => $plugins) {
foreach ($plugins as $name => $plugin) {
if ($options['show-contrib'] && $plugin->is_standard()) {
continue;
}
$pluginstring = $plugin->component . "\t" . $plugin->displayname;
if ($options['show-all'] || $options['show-contrib']) {
cli_writeln($pluginstring);
} else {
if ($plugin->get_status() === core_plugin_manager::PLUGIN_STATUS_MISSING) {
cli_writeln($pluginstring);
}
}
}
}
exit(0);
}
if ($options['purge-missing']) {
foreach ($plugininfo as $type => $plugins) {
foreach ($plugins as $name => $plugin) {
if ($plugin->get_status() === core_plugin_manager::PLUGIN_STATUS_MISSING) {
$pluginstring = $plugin->component . "\t" . $plugin->displayname;
if ($pluginman->can_uninstall_plugin($plugin->component)) {
if ($options['run']) {
cli_writeln('Uninstalling: ' . $pluginstring);
$progress = new progress_trace_buffer(new text_progress_trace(), true);
$pluginman->uninstall_plugin($plugin->component, $progress);
$progress->finished();
cli_write($progress->get_buffer());
} else {
cli_writeln('Will be uninstalled: ' . $pluginstring);
}
} else {
cli_writeln('Can not be uninstalled: ' . $pluginstring);
}
}
}
}
exit(0);
}
if ($options['plugins']) {
$components = explode(',', $options['plugins']);
foreach ($components as $component) {
$plugin = $pluginman->get_plugin_info($component);
if (is_null($plugin)) {
cli_writeln('Unknown plugin: ' . $component);
} else {
$pluginstring = $plugin->component . "\t" . $plugin->displayname;
if ($pluginman->can_uninstall_plugin($plugin->component)) {
if ($options['run']) {
cli_writeln('Uninstalling: ' . $pluginstring);
$progress = new progress_trace_buffer(new text_progress_trace(), true);
$pluginman->uninstall_plugin($plugin->component, $progress);
$progress->finished();
cli_write($progress->get_buffer());
} else {
cli_writeln('Will be uninstalled: ' . $pluginstring);
}
} else {
cli_writeln('Can not be uninstalled: ' . $pluginstring);
}
}
}
exit(0);
}
cli_writeln($help);
exit(0);
+5 -40
View File
@@ -51,9 +51,7 @@ list($options, $unrecognized) = cli_get_params(
'non-interactive' => false,
'allow-unstable' => false,
'help' => false,
'lang' => $lang,
'verbose-settings' => false,
'is-pending' => false,
'lang' => $lang
),
array(
'h' => 'help'
@@ -86,11 +84,6 @@ Options:
site language if not set. Defaults to 'en' if the lang
parameter is invalid or if the language pack is not
installed.
--verbose-settings Show new settings values. By default only the name of
new core or plugin settings are displayed. This option
outputs the new values as well as the setting name.
--is-pending If an upgrade is needed it exits with an error code of
2 so it distinct from other types of errors.
-h, --help Print out this help
Example:
@@ -119,10 +112,6 @@ if (!moodle_needs_upgrading()) {
cli_error(get_string('cliupgradenoneed', 'core_admin', $newversion), 0);
}
if ($options['is-pending']) {
cli_error(get_string('cliupgradepending', 'core_admin'), 2);
}
// Test environment first.
list($envstatus, $environment_results) = check_moodle_environment(normalize_version($release), ENV_SELECT_RELEASE);
if (!$envstatus) {
@@ -135,18 +124,9 @@ if (!$envstatus) {
exit(1);
}
// Make sure there are no files left over from previous versions.
if (upgrade_stale_php_files_present()) {
cli_problem(get_string('upgradestalefiles', 'admin'));
// Stale file info contains HTML elements which aren't suitable for CLI.
$upgradestalefilesinfo = get_string('upgradestalefilesinfo', 'admin', get_docs_url('Upgrading'));
cli_error(strip_tags($upgradestalefilesinfo));
}
// Test plugin dependencies.
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed, $CFG->branch)) {
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_problem(get_string('pluginscheckfailed', 'admin', array('pluginslist' => implode(', ', array_unique($failed)))));
cli_error(get_string('pluginschecktodo', 'admin'));
}
@@ -204,24 +184,9 @@ upgrade_noncore(true);
// log in as admin - we need doanything permission when applying defaults
\core\session\manager::set_user(get_admin());
// Apply default settings and output those that have changed.
cli_heading(get_string('cliupgradedefaultheading', 'admin'));
$settingsoutput = admin_apply_default_settings(null, false);
foreach ($settingsoutput as $setting => $value) {
if ($options['verbose-settings']) {
$stringvlaues = array(
'name' => $setting,
'defaultsetting' => var_export($value, true) // Expand objects.
);
echo get_string('cliupgradedefaultverbose', 'admin', $stringvlaues) . PHP_EOL;
} else {
echo get_string('cliupgradedefault', 'admin', $setting) . PHP_EOL;
}
}
// apply all default settings, just in case do it twice to fill all defaults
admin_apply_default_settings(NULL, false);
admin_apply_default_settings(NULL, false);
// This needs to happen at the end to ensure it occurs after all caches
// have been purged for the last time.
-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/>.
/**
* Content bank and its plugins settings.
*
* @package core
* @subpackage contentbank
* @copyright 2020 Amaia Anabitarte <amaia@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);
$name = required_param('name', PARAM_PLUGIN);
$syscontext = context_system::instance();
$PAGE->set_url('/admin/contentbank.php');
$PAGE->set_context($syscontext);
require_admin();
require_sesskey();
$return = new moodle_url('/admin/settings.php', array('section' => 'managecontentbanktypes'));
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
$sortorder = array_flip(array_keys($plugins));
if (!isset($plugins[$name])) {
print_error('contenttypenotfound', 'error', $return, $name);
}
switch ($action) {
case 'disable':
if ($plugins[$name]->is_enabled()) {
set_config('disabled', 1, 'contentbank_'. $name);
}
break;
case 'enable':
if (!$plugins[$name]->is_enabled()) {
unset_config('disabled', 'contentbank_'. $name);
}
break;
case 'up':
if ($sortorder[$name]) {
$currentindex = $sortorder[$name];
$seq = array_keys($plugins);
$seq[$currentindex] = $seq[$currentindex - 1];
$seq[$currentindex - 1] = $name;
set_config('contentbank_plugins_sortorder', implode(',', $seq));
}
break;
case 'down':
if ($sortorder[$name] < count($sortorder) - 1) {
$currentindex = $sortorder[$name];
$seq = array_keys($plugins);
$seq[$currentindex] = $seq[$currentindex + 1];
$seq[$currentindex + 1] = $name;
set_config('contentbank_plugins_sortorder', implode(',', $seq));
}
break;
}
core_plugin_manager::reset_caches();
$cache = cache::make('core', 'contentbank_enabled_extensions');
$cache->purge();
$cache = cache::make('core', 'contentbank_context_extensions');
$cache->purge();
redirect($return);
+2 -1
View File
@@ -32,7 +32,8 @@ $syscontext = context_system::instance();
$PAGE->set_url('/admin/courseformats.php');
$PAGE->set_context($syscontext);
require_admin();
require_login();
require_capability('moodle/site:config', $syscontext);
require_sesskey();
$return = new moodle_url('/admin/settings.php', array('section' => 'manageformats'));
-61
View File
@@ -1,61 +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/>.
/**
* Allows the admin to enable, disable and uninstall custom fields
*
* @package core_admin
* @copyright 2018 Daniel Neis Araujo
* @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);
$customfieldname = required_param('field', PARAM_PLUGIN);
$syscontext = context_system::instance();
$PAGE->set_url('/admin/customfields.php');
$PAGE->set_context($syscontext);
require_admin();
require_sesskey();
$return = new moodle_url('/admin/settings.php', array('section' => 'managecustomfields'));
$customfieldplugins = core_plugin_manager::instance()->get_plugins_of_type('customfield');
$sortorder = array_flip(array_keys($customfieldplugins));
if (!isset($customfieldplugins[$customfieldname])) {
print_error('customfieldnotfound', 'error', $return, $customfieldname);
}
switch ($action) {
case 'disable':
if ($customfieldplugins[$customfieldname]->is_enabled()) {
set_config('disabled', 1, 'customfield_'. $customfieldname);
core_plugin_manager::reset_caches();
}
break;
case 'enable':
if (!$customfieldplugins[$customfieldname]->is_enabled()) {
unset_config('disabled', 'customfield_'. $customfieldname);
core_plugin_manager::reset_caches();
}
break;
}
redirect($return);
+2 -1
View File
@@ -33,7 +33,8 @@ $syscontext = context_system::instance();
$PAGE->set_url('/admin/dataformats.php');
$PAGE->set_context($syscontext);
require_admin();
require_login();
require_capability('moodle/site:config', $syscontext);
require_sesskey();
$return = new moodle_url('/admin/settings.php', array('section' => 'managedataformats'));
+2 -1
View File
@@ -15,7 +15,8 @@ $confirm = optional_param('confirm', 0, PARAM_BOOL);
$PAGE->set_url('/admin/editors.php', array('action'=>$action, 'editor'=>$editor));
$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=manageeditors";
+2 -1
View File
@@ -35,7 +35,8 @@ $confirm = optional_param('confirm', 0, PARAM_BOOL);
$PAGE->set_url('/admin/enrol.php');
$PAGE->set_context(context_system::instance());
require_admin();
require_login();
require_capability('moodle/site:config', context_system::instance());
require_sesskey();
$enabled = enrol_get_plugins(true);
-185
View File
@@ -3531,189 +3531,4 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.0" requires="3.6">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="10" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="optional"/>
<PHP_EXTENSION name="exif" level="optional"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+4
View File
@@ -28,6 +28,10 @@ require_once($CFG->libdir . '/adminlib.php');
$action = optional_param('action', '', PARAM_ALPHA);
$filterpath = optional_param('filterpath', '', PARAM_PLUGIN);
require_login();
$systemcontext = context_system::instance();
require_capability('moodle/site:config', $systemcontext);
admin_externalpage_setup('managefilters');
// Clean up bogus filter states first.
+16 -45
View File
@@ -226,7 +226,7 @@ if (!core_tables_exist()) {
}
if (empty($confirmrelease)) {
require_once($CFG->libdir.'/environmentlib.php');
list($envstatus, $environmentresults) = check_moodle_environment(normalize_version($release), ENV_SELECT_RELEASE);
list($envstatus, $environment_results) = check_moodle_environment(normalize_version($release), ENV_SELECT_RELEASE);
$strcurrentrelease = get_string('currentrelease');
$PAGE->navbar->add($strcurrentrelease);
@@ -235,13 +235,13 @@ if (!core_tables_exist()) {
$PAGE->set_cacheable(false);
$output = $PAGE->get_renderer('core', 'admin');
echo $output->install_environment_page($maturity, $envstatus, $environmentresults, $release);
echo $output->install_environment_page($maturity, $envstatus, $environment_results, $release);
die();
}
// check plugin dependencies
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed, $CFG->branch)) {
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
$PAGE->navbar->add(get_string('pluginscheck', 'admin'));
$PAGE->set_title($strinstallation);
$PAGE->set_heading($strinstallation . ' - Moodle ' . $CFG->target_release);
@@ -358,9 +358,9 @@ if (!$cache and $version > $CFG->version) { // upgrade
echo $output->upgrade_confirm_page($a->newversion, $maturity, $testsite);
die();
} else if (empty($confirmrelease)) {
} else if (empty($confirmrelease)){
require_once($CFG->libdir.'/environmentlib.php');
list($envstatus, $environmentresults) = check_moodle_environment($release, ENV_SELECT_RELEASE);
list($envstatus, $environment_results) = check_moodle_environment($release, ENV_SELECT_RELEASE);
$strcurrentrelease = get_string('currentrelease');
$PAGE->navbar->add($strcurrentrelease);
@@ -368,7 +368,7 @@ if (!$cache and $version > $CFG->version) { // upgrade
$PAGE->set_heading($strcurrentrelease);
$PAGE->set_cacheable(false);
echo $output->upgrade_environment_page($release, $envstatus, $environmentresults);
echo $output->upgrade_environment_page($release, $envstatus, $environment_results);
die();
} else if (empty($confirmplugins)) {
@@ -508,9 +508,8 @@ if (!$cache and $version > $CFG->version) { // upgrade
} else {
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed, $CFG->branch)) {
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
die();
}
unset($failed);
@@ -534,10 +533,7 @@ if (!$cache and $branch <> $CFG->branch) { // Update the branch
if (!$cache and moodle_needs_upgrading()) {
$PAGE->set_url(new moodle_url($PAGE->url, array(
'confirmrelease' => $confirmrelease,
'confirmplugincheck' => $confirmplugins,
)));
$PAGE->set_url(new moodle_url($PAGE->url, array('confirmplugincheck' => $confirmplugins)));
check_upgrade_key($upgradekeyhash);
@@ -547,21 +543,7 @@ if (!$cache and moodle_needs_upgrading()) {
$pluginman = core_plugin_manager::instance();
$output = $PAGE->get_renderer('core', 'admin');
if (empty($confirmrelease)) {
require_once($CFG->libdir . '/environmentlib.php');
list($envstatus, $environmentresults) = check_moodle_environment($release, ENV_SELECT_RELEASE);
$strcurrentrelease = get_string('currentrelease');
$PAGE->navbar->add($strcurrentrelease);
$PAGE->set_title($strcurrentrelease);
$PAGE->set_heading($strcurrentrelease);
$PAGE->set_cacheable(false);
echo $output->upgrade_environment_page($release, $envstatus, $environmentresults);
die();
} else if (!$confirmplugins) {
if (!$confirmplugins) {
$strplugincheck = get_string('plugincheck');
$PAGE->navbar->add($strplugincheck);
@@ -700,10 +682,9 @@ if (!$cache and moodle_needs_upgrading()) {
// Make sure plugin dependencies are always checked.
$failed = array();
if (!$pluginman->all_plugins_ok($version, $failed, $CFG->branch)) {
if (!$pluginman->all_plugins_ok($version, $failed)) {
$output = $PAGE->get_renderer('core', 'admin');
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
die();
}
unset($failed);
@@ -821,7 +802,7 @@ $SESSION->admin_critical_warning = ($insecuredataroot==INSECURE_DATAROOT_ERROR);
$adminroot = admin_get_root();
// Check if there are any new admin settings which have still yet to be set
if (any_new_admin_settings($adminroot)) {
if (any_new_admin_settings($adminroot)){
redirect('upgradesettings.php');
}
@@ -842,12 +823,9 @@ if (isset($SESSION->pluginuninstallreturn)) {
// Print default admin page with notifications.
$errorsdisplayed = defined('WARN_DISPLAY_ERRORS_ENABLED');
$lastcron = get_config('tool_task', 'lastcronstart');
// We make the assumption that at least one schedule task should run once per day.
$lastcron = $DB->get_field_sql('SELECT MAX(lastruntime) FROM {task_scheduled}');
$cronoverdue = ($lastcron < time() - 3600 * 24);
$lastcroninterval = get_config('tool_task', 'lastcroninterval');
$expectedfrequency = $CFG->expectedcronfrequency ?? MINSECS;
$croninfrequent = !$cronoverdue && ($lastcroninterval > ($expectedfrequency + MINSECS) || $lastcron < time() - $expectedfrequency);
$dbproblems = $DB->diagnose();
$maintenancemode = !empty($CFG->maintenance_enabled);
@@ -901,12 +879,6 @@ if (empty($CFG->disabledevlibdirscheck) && (is_dir($CFG->dirroot.'/vendor') || i
// Check if the site is being foced onto ssl.
$overridetossl = !empty($CFG->overridetossl);
// Check if moodle campaign content setting is enabled or not.
$showcampaigncontent = !isset($CFG->showcampaigncontent) || $CFG->showcampaigncontent;
// Encourage admins to enable the user feedback feature if it is not enabled already.
$showfeedbackencouragement = empty($CFG->enableuserfeedback);
admin_externalpage_setup('adminnotifications');
$output = $PAGE->get_renderer('core', 'admin');
@@ -914,5 +886,4 @@ $output = $PAGE->get_renderer('core', 'admin');
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems,
$maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered, $cachewarnings, $eventshandlers, $themedesignermode, $devlibdir,
$mobileconfigured, $overridetossl, $invalidforgottenpasswordurl, $croninfrequent,
$showcampaigncontent, $showfeedbackencouragement);
$mobileconfigured, $overridetossl, $invalidforgottenpasswordurl);
+57
View File
@@ -0,0 +1,57 @@
<?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 admin to configure licenses.
*/
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/licenselib.php');
require_login();
require_capability('moodle/site:config', context_system::instance());
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=managelicenses";
$action = optional_param('action', '', PARAM_ALPHANUMEXT);
$license = optional_param('license', '', PARAM_SAFEDIR);
////////////////////////////////////////////////////////////////////////////////
// process actions
if (!confirm_sesskey()) {
redirect($returnurl);
}
$return = true;
switch ($action) {
case 'disable':
license_manager::disable($license);
break;
case 'enable':
license_manager::enable($license);
break;
default:
break;
}
if ($return) {
redirect ($returnurl);
}
-96
View File
@@ -1,96 +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/>.
/**
* This file is used to display a categories sub categories, external pages, and settings.
*
* @package admin
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../config.php');
require_once("{$CFG->libdir}/adminlib.php");
$contextid = required_param('id', PARAM_INT);
$confirm = optional_param('confirm', null, PARAM_INT);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
$PAGE->set_url('/admin/lock.php', ['id' => $contextid]);
list($context, $course, $cm) = get_context_info_array($contextid);
$parentcontext = $context->get_parent_context();
if ($parentcontext && !empty($parentcontext->locked)) {
// Can't make changes to a context whose parent is locked.
throw new \coding_exception('Not sure how you got here');
}
if ($course) {
$isfrontpage = ($course->id == SITEID);
} else {
$isfrontpage = false;
$course = $SITE;
}
require_login($course, false, $cm);
require_capability('moodle/site:managecontextlocks', $context);
$PAGE->set_pagelayout('admin');
$PAGE->navigation->clear_cache();
$a = (object) [
'contextname' => $context->get_context_name(),
];
if (null !== $confirm && confirm_sesskey()) {
$context->set_locked(!empty($confirm));
if ($context->locked) {
$lockmessage = get_string('managecontextlocklocked', 'admin', $a);
} else {
$lockmessage = get_string('managecontextlockunlocked', 'admin', $a);
}
if (empty($returnurl)) {
$returnurl = $context->get_url();
} else {
$returnurl = new moodle_url($returnurl);
}
redirect($returnurl, $lockmessage);
}
$heading = get_string('managecontextlock', 'admin');
$PAGE->set_title($heading);
$PAGE->set_heading($heading);
echo $OUTPUT->header();
if ($context->locked) {
$confirmstring = get_string('confirmcontextunlock', 'admin', $a);
$target = 0;
} else {
$confirmstring = get_string('confirmcontextlock', 'admin', $a);
$target = 1;
}
$confirmurl = new \moodle_url($PAGE->url, ['confirm' => $target]);
if (!empty($returnurl)) {
$confirmurl->param('returnurl', $returnurl);
}
echo $OUTPUT->confirm($confirmstring, $confirmurl, $context->get_url());
echo $OUTPUT->footer();
+2 -1
View File
@@ -35,7 +35,8 @@ $confirm = optional_param('confirm', 0, PARAM_BOOL);
$PAGE->set_url('/admin/media.php');
$PAGE->set_context(context_system::instance());
require_admin();
require_login();
require_capability('moodle/site:config', context_system::instance());
require_sesskey();
$plugins = core_plugin_manager::instance()->get_plugins_of_type('media');
+29 -109
View File
@@ -25,130 +25,50 @@ require_once(__DIR__ . '/../config.php');
require_once($CFG->dirroot . '/message/lib.php');
require_once($CFG->libdir.'/adminlib.php');
// This is an admin page.
// This is an admin page
admin_externalpage_setup('managemessageoutputs');
// Fetch processors.
$allprocessors = get_message_processors();
$processors = array_filter($allprocessors, function($processor) {
return $processor->enabled;
});
$disabledprocessors = array_filter($allprocessors, function($processor) {
return !$processor->enabled;
});
// Require site configuration capability
require_capability('moodle/site:config', context_system::instance());
// Fetch message providers.
$providers = get_message_providers();
// Fetch the manage message outputs interface.
$preferences = get_message_output_default_preferences();
// Get the submitted params
$disable = optional_param('disable', 0, PARAM_INT);
$enable = optional_param('enable', 0, PARAM_INT);
if (($form = data_submitted()) && confirm_sesskey()) {
$newpreferences = array();
// Prepare default message outputs settings.
foreach ($providers as $provider) {
$componentproviderbase = $provider->component.'_'.$provider->name;
$disableprovidersetting = $componentproviderbase.'_disable';
$providerdisabled = false;
if (!isset($form->$disableprovidersetting)) {
$providerdisabled = true;
$newpreferences[$disableprovidersetting] = 1;
} else {
$newpreferences[$disableprovidersetting] = 0;
}
$headingtitle = get_string('managemessageoutputs', 'message');
foreach (array('permitted', 'loggedin', 'loggedoff') as $setting) {
$value = null;
$componentprovidersetting = $componentproviderbase.'_'.$setting;
if ($setting == 'permitted') {
// If we deal with permitted select element, we need to create individual
// setting for each possible processor. Note that this block will
// always be processed first after entring parental foreach iteration
// so we can change form values on this stage.
foreach ($processors as $processor) {
$value = '';
if (isset($form->{$componentprovidersetting}[$processor->name])) {
$value = $form->{$componentprovidersetting}[$processor->name];
}
// Ensure that loggedin loggedoff options are set correctly for this permission.
if (($value == 'disallowed') || $providerdisabled) {
// It might be better to unset them, but I can't figure out why that cause error.
$form->{$componentproviderbase.'_loggedin'}[$processor->name] = 0;
$form->{$componentproviderbase.'_loggedoff'}[$processor->name] = 0;
} else if ($value == 'forced') {
$form->{$componentproviderbase.'_loggedin'}[$processor->name] = 1;
$form->{$componentproviderbase.'_loggedoff'}[$processor->name] = 1;
}
// Record the site preference.
$newpreferences[$processor->name.'_provider_'.$componentprovidersetting] = $value;
}
} else {
$newsettings = array();
if (property_exists($form, $componentprovidersetting)) {
// We must be processing loggedin or loggedoff checkboxes.
// Store defained comma-separated processors as setting value.
// Using array_filter eliminates elements set to 0 above.
$newsettings = array_keys(array_filter($form->{$componentprovidersetting}));
}
// Let's join existing setting values for disabled processors.
$property = 'message_provider_'.$componentprovidersetting;
if (property_exists($preferences, $property)) {
$existingsetting = $preferences->$property;
foreach ($disabledprocessors as $disable) {
if (strpos($existingsetting, $disable->name) > -1) {
$newsettings[] = $disable->name;
}
}
}
$value = join(',', $newsettings);
if (empty($value)) {
$value = null;
}
}
if ($setting != 'permitted') {
// We have already recoded site preferences for 'permitted' type.
$newpreferences['message_provider_'.$componentprovidersetting] = $value;
}
}
if (!empty($disable) && confirm_sesskey()) {
if (!$processor = $DB->get_record('message_processors', array('id'=>$disable))) {
print_error('outputdoesnotexist', 'message');
}
// Update database.
$transaction = $DB->start_delegated_transaction();
// Save processors enabled/disabled status.
foreach ($allprocessors as $processor) {
$enabled = isset($form->{$processor->name});
if ($enabled != $processor->enabled) {
add_to_config_log($processor->name, $processor->enabled, $enabled, 'core');
}
\core_message\api::update_processor_status($processor, $enabled);
}
foreach ($newpreferences as $name => $value) {
$old = isset($preferences->$name) ? $preferences->$name : '';
if ($old != $value) {
add_to_config_log($name, $old, $value, 'core');
}
set_config($name, $value, 'message');
}
$transaction->allow_commit();
\core_message\api::update_processor_status($processor, 0); // Disable output.
core_plugin_manager::reset_caches();
}
if (!empty($enable) && confirm_sesskey()) {
if (!$processor = $DB->get_record('message_processors', array('id'=>$enable))) {
print_error('outputdoesnotexist', 'message');
}
\core_message\api::update_processor_status($processor, 1); // Enable output.
core_plugin_manager::reset_caches();
}
if ($disable || $enable) {
$url = new moodle_url('message.php');
redirect($url);
}
// Page settings
$PAGE->set_context(context_system::instance());
$PAGE->requires->js_init_call('M.core_message.init_defaultoutputs');
// Grab the renderer
$renderer = $PAGE->get_renderer('core', 'message');
// Display the page.
// Display the manage message outputs interface
$processors = get_message_processors();
$messageoutputs = $renderer->manage_messageoutputs($processors);
// Display the page
echo $OUTPUT->header();
echo $renderer->manage_messageoutput_settings($allprocessors, $processors, $providers, $preferences);
echo $OUTPUT->heading($headingtitle);
echo $messageoutputs;
echo $OUTPUT->footer();
+2
View File
@@ -12,6 +12,8 @@ $page = optional_param('page', 0, PARAM_INT);
$perpage = optional_param('perpage', 30, PARAM_INT);
$action = trim(strtolower(optional_param('action', '', PARAM_ALPHA)));
require_login();
admin_externalpage_setup('ssoaccesscontrol');
if (!extension_loaded('openssl')) {
+5
View File
@@ -34,6 +34,11 @@ $step = optional_param('step', 'verify', PARAM_ALPHA);
$hostid = required_param('hostid', PARAM_INT);
require_login();
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
$mnet = get_mnet_environment();
$PAGE->set_url('/admin/mnet/delete.php');
+2
View File
@@ -6,10 +6,12 @@
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
require_login();
admin_externalpage_setup('net');
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
$site = get_site();
$mnet = get_mnet_environment();
+1 -1
View File
@@ -156,7 +156,7 @@ class mnet_review_host_form extends moodleform {
if ($mnet_peer && !empty($mnet_peer->deleted)) {
$radioarray = array();
$radioarray[] = $mform->createElement('static', 'deletedinfo', '',
$OUTPUT->container(get_string('deletedhostinfo', 'mnet'), 'alert alert-warning'));
$OUTPUT->container(get_string('deletedhostinfo', 'mnet'), 'deletedhostinfo'));
$radioarray[] = $mform->createElement('radio', 'deleted', '', get_string('yes'), 1);
$radioarray[] = $mform->createElement('radio', 'deleted', '', get_string('no'), 0);
$mform->addGroup($radioarray, 'radioar', get_string('deleted'), array(' ', ' '), false);
+4
View File
@@ -32,6 +32,10 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot.'/mnet/lib.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/mnet/peer_forms.php');
require_login();
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, 'nopermissions');
/// Initialize variables.
$hostid = optional_param('hostid', 0, PARAM_INT);
+4
View File
@@ -29,10 +29,14 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot . '/' . $CFG->admin .'/mnet/profilefields_form.php');
$mnet = get_mnet_environment();
require_login();
$hostid = required_param('hostid', PARAM_INT);
$mnet_peer = new mnet_peer();
$mnet_peer->set_id($hostid);
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, 'nopermissions');
admin_externalpage_setup('mnetpeers');
$form = new mnet_profile_form(null, array('hostid' => $hostid));
+3
View File
@@ -30,8 +30,11 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/mnet/services_form.php');
$mnet = get_mnet_environment();
require_login();
admin_externalpage_setup('mnetpeers');
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
$hostid = required_param('hostid', PARAM_INT);
+4
View File
@@ -21,8 +21,12 @@ if ($CFG->mnet_dispatcher_mode === 'off') {
print_error('mnetdisabled', 'mnet');
}
require_login();
admin_externalpage_setup('mnettestclient');
$context = context_system::instance();
require_capability('moodle/site:config', $context);
error_reporting(DEBUG_ALL);
echo $OUTPUT->header();
+4
View File
@@ -5,8 +5,12 @@
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
require_login();
admin_externalpage_setup('trustedhosts');
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
if (!extension_loaded('openssl')) {
echo $OUTPUT->header();
+3 -9
View File
@@ -49,7 +49,6 @@
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
if (!empty($show) and confirm_sesskey()) {
@@ -67,7 +66,6 @@
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
echo $OUTPUT->header();
@@ -89,13 +87,9 @@
$table->set_attribute('class', 'admintable generaltable');
$table->setup();
$pluginmanager = core_plugin_manager::instance();
foreach ($modules as $module) {
$plugininfo = $pluginmanager->get_plugin_info('mod_'.$module->name);
$status = $plugininfo->get_status();
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
if (!file_exists("$CFG->dirroot/mod/$module->name/lib.php")) {
$strmodulename = '<span class="notifyproblem">'.$module->name.' ('.get_string('missingfromdisk').')</span>';
$missing = true;
} else {
@@ -123,8 +117,8 @@
$count = -1;
}
if ($count>0) {
$countlink = $OUTPUT->action_link(new moodle_url('/course/search.php', ['modulelist' => $module->name]),
$count, null, ['title' => $strshowmodulecourse]);
$countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
"&amp;sesskey=".sesskey()."\" title=\"$strshowmodulecourse\">$count</a>";
} else if ($count < 0) {
$countlink = get_string('error');
} else {
+4 -6
View File
@@ -34,12 +34,11 @@ $error = optional_param('error', '', PARAM_RAW);
if ($error) {
$message = optional_param('error_description', '', PARAM_RAW);
if ($message) {
$SESSION->loginerrormsg = $message;
redirect(new moodle_url(get_login_url()));
print_error($message);
} else {
$SESSION->loginerrormsg = $error;
redirect(new moodle_url(get_login_url()));
print_error($error);
}
die();
}
// The authorization code generated by the authorization server.
@@ -54,6 +53,5 @@ if (isset($params['sesskey']) and confirm_sesskey($params['sesskey'])) {
$redirecturl->param('oauth2code', $code);
redirect($redirecturl);
} else {
$SESSION->loginerrormsg = get_string('invalidsesskey', 'error');
redirect(new moodle_url(get_login_url()));
print_error('invalidsesskey');
}
+3 -2
View File
@@ -43,8 +43,9 @@ $confirminstallupdate = optional_param('confirminstallupdate', false, PARAM_BOOL
// NOTE: do not use admin_externalpage_setup() here because it loads
// full admin tree which is not possible during uninstallation.
require_admin();
require_login();
$syscontext = context_system::instance();
require_capability('moodle/site:config', $syscontext);
// URL params we want to maintain on redirects.
$pageparams = array('updatesonly' => $updatesonly, 'contribonly' => $contribonly);
@@ -53,6 +54,7 @@ $pageurl = new moodle_url('/admin/plugins.php', $pageparams);
$pluginman = core_plugin_manager::instance();
if ($uninstall) {
require_sesskey();
if (!$confirmed) {
admin_externalpage_setup('pluginsoverview', '', $pageparams);
@@ -91,7 +93,6 @@ if ($uninstall) {
exit();
} else {
require_sesskey();
$SESSION->pluginuninstallreturn = $pluginfo->get_return_url_after_uninstall($return);
$progress = new progress_trace_buffer(new text_progress_trace(), false);
$pluginman->uninstall_plugin($pluginfo->component, $progress);
+2
View File
@@ -35,6 +35,8 @@ if ($action == 'newon') {
admin_externalpage_setup($pagename);
require_capability('moodle/site:config', context_system::instance());
$baseurl = "$CFG->wwwroot/$CFG->admin/portfolio.php";
$sesskeyurl = "$CFG->wwwroot/$CFG->admin/portfolio.php?sesskey=" . sesskey();
$configstr = get_string('manageportfolios', 'portfolio');
+13 -26
View File
@@ -27,49 +27,36 @@ require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$returnurl = optional_param('returnurl', '/admin/purgecaches.php', PARAM_LOCALURL);
$returnurl = new moodle_url($returnurl);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
admin_externalpage_setup('purgecaches');
$form = new core_admin\form\purge_caches(null, ['returnurl' => $returnurl]);
// If we have got here as a confirmed aciton, do it.
if ($data = $form->get_data()) {
if ($confirm && confirm_sesskey()) {
// Valid request. Purge, and redirect the user back to where they came from.
$selected = $data->purgeselectedoptions;
purge_caches($selected);
purge_all_caches();
if (isset($data->all)) {
$message = get_string('purgecachesfinished', 'admin');
if ($returnurl) {
$returnurl = $CFG->wwwroot . $returnurl;
} else {
$message = get_string('purgeselectedcachesfinished', 'admin');
$returnurl = new moodle_url('/admin/purgecaches.php');
}
} else if ($confirm && confirm_sesskey()) {
purge_caches();
$message = get_string('purgecachesfinished', 'admin');
redirect($returnurl, get_string('purgecachesfinished', 'admin'));
}
// Redirect and/or show notification message confirming cache(s) were purged.
if (isset($message)) {
if (!$PAGE->url->compare($returnurl, URL_MATCH_BASE)) {
redirect($returnurl, $message);
}
// We are already on the purge caches page, add the notification.
\core\notification::add($message, \core\output\notification::NOTIFY_INFO);
// Otherwise, show a button to actually purge the caches.
$actionurl = new moodle_url('/admin/purgecaches.php', array('sesskey'=>sesskey(), 'confirm'=>1));
if ($returnurl) {
$actionurl->param('returnurl', $returnurl);
}
// Otherwise, show a form to actually purge the caches.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('purgecachespage', 'admin'));
echo $OUTPUT->heading(get_string('purgecaches', 'admin'));
echo $OUTPUT->box_start('generalbox', 'notice');
echo html_writer::tag('p', get_string('purgecachesconfirm', 'admin'));
echo $form->render();
echo $OUTPUT->single_button($actionurl, get_string('purgecaches', 'admin'), 'post');
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
+2 -2
View File
@@ -31,7 +31,7 @@ require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/tablelib.php');
// Check permissions.
require_login(null, false);
require_login();
$systemcontext = context_system::instance();
require_capability('moodle/question:config', $systemcontext);
@@ -170,7 +170,7 @@ foreach ($sortedbehaviours as $behaviour => $behaviourname) {
if ($version) {
$row[] = $version;
} else {
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'text-muted'));
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'disabled'));
}
// Other question types required by this one.
+4 -3
View File
@@ -30,12 +30,13 @@ require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/tablelib.php');
admin_externalpage_setup('manageqtypes');
// Check permissions.
require_login();
$systemcontext = context_system::instance();
require_capability('moodle/question:config', $systemcontext);
$canviewreports = has_capability('report/questioninstances:view', $systemcontext);
admin_externalpage_setup('manageqtypes');
$thispageurl = new moodle_url('/admin/qtypes.php');
$qtypes = question_bank::get_all_qtypes();
@@ -172,7 +173,7 @@ foreach ($sortedqtypes as $qtypename => $localname) {
if ($version) {
$row[] = $version;
} else {
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'text-muted'));
$row[] = html_writer::tag('span', get_string('nodatabase', 'admin'), array('class' => 'disabled'));
}
// Other question types required by this one.
+2 -2
View File
@@ -45,8 +45,8 @@ $error = optional_param('error', '', PARAM_ALPHANUM);
admin_externalpage_setup('registrationmoodleorg');
if (parse_url($url, PHP_URL_HOST) !== parse_url(HUB_MOODLEORGHUBURL, PHP_URL_HOST)) {
// Allow other plugins to confirm registration on custom hubs. Plugins implementing this
if ($url !== HUB_MOODLEORGHUBURL) {
// Allow other plugins to confirm registration on hubs other than moodle.net . Plugins implementing this
// callback need to redirect or exit. See https://docs.moodle.org/en/Hub_registration .
$callbacks = get_plugins_with_function('hub_registration');
foreach ($callbacks as $plugintype => $plugins) {
+2 -1
View File
@@ -32,4 +32,5 @@
defined('MOODLE_INTERNAL') || die();
debugging('Support for alternative hubs has been removed from Moodle in 3.4.', DEBUG_DEVELOPER);
debugging('Support for alternative hubs has been removed from Moodle in 3.4. For communication with moodle.net ' .
'see lib/classes/hub/ .', DEBUG_DEVELOPER);
+16 -18
View File
@@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* This page displays the site registration form.
* This page displays the site registration form for Moodle.net.
* It handles redirection to the hub to continue the registration workflow process.
* It also handles update operation by web service.
*/
@@ -32,25 +32,24 @@ require_once($CFG->libdir . '/adminlib.php');
admin_externalpage_setup('registrationmoodleorg');
$unregistration = optional_param('unregistration', false, PARAM_BOOL);
$confirm = optional_param('confirm', false, PARAM_BOOL);
$unregistration = optional_param('unregistration', 0, PARAM_INT);
if ($unregistration && \core\hub\registration::is_registered()) {
if ($confirm) {
require_sesskey();
\core\hub\registration::unregister(false, false);
$siteunregistrationform = new \core\hub\site_unregistration_form();
if ($siteunregistrationform->is_cancelled()) {
redirect(new moodle_url('/admin/registration/index.php'));
} else if ($data = $siteunregistrationform->get_data()) {
\core\hub\registration::unregister($data->unpublishalladvertisedcourses,
$data->unpublishalluploadedcourses);
if (!\core\hub\registration::is_registered()) {
redirect(new moodle_url('/admin/registration/index.php'));
}
}
echo $OUTPUT->header();
echo $OUTPUT->confirm(
get_string('registerwithmoodleorgremove', 'core_hub'),
new moodle_url(new moodle_url('/admin/registration/index.php', ['unregistration' => 1, 'confirm' => 1])),
new moodle_url(new moodle_url('/admin/registration/index.php'))
);
echo $OUTPUT->heading(get_string('unregisterfrom', 'hub', 'Moodle.net'), 3, 'main');
$siteunregistrationform->display();
echo $OUTPUT->footer();
exit;
}
@@ -83,7 +82,7 @@ if ($fromform = $siteregistrationform->get_data()) {
echo $OUTPUT->header();
// Current status of registration.
// Current status of registration on Moodle.net.
$notificationtype = \core\output\notification::NOTIFY_ERROR;
if (\core\hub\registration::is_registered()) {
@@ -105,11 +104,11 @@ if (\core\hub\registration::is_registered()) {
// Heading.
if (\core\hub\registration::is_registered()) {
echo $OUTPUT->heading(get_string('registerwithmoodleorgupdate', 'core_hub'));
echo $OUTPUT->heading(get_string('updatesite', 'hub', 'Moodle.net'));
} else if ($isinitialregistration) {
echo $OUTPUT->heading(get_string('registerwithmoodleorgcomplete', 'core_hub'));
echo $OUTPUT->heading(get_string('completeregistration', 'hub'));
} else {
echo $OUTPUT->heading(get_string('registerwithmoodleorg', 'core_hub'));
echo $OUTPUT->heading(get_string('registerwithmoodleorg', 'admin'));
}
$renderer = $PAGE->get_renderer('core', 'admin');
@@ -120,9 +119,8 @@ $siteregistrationform->display();
if (\core\hub\registration::is_registered()) {
// Unregister link.
$unregisterhuburl = new moodle_url("/admin/registration/index.php", ['unregistration' => 1]);
echo html_writer::div(html_writer::link($unregisterhuburl, get_string('unregister', 'hub')), 'unregister mt-2');
echo html_writer::div(html_writer::link($unregisterhuburl, get_string('unregister', 'hub')), 'unregister');
} else if ($isinitialregistration) {
echo html_writer::div(html_writer::link(new moodle_url($returnurl), get_string('skipregistration', 'hub')),
'skipregistration mt-2');
echo html_writer::div(html_writer::link(new moodle_url($returnurl), get_string('skipregistration', 'hub')), 'skipregistration');
}
echo $OUTPUT->footer();
+3 -3
View File
@@ -39,8 +39,8 @@ $token = optional_param('token', '', PARAM_TEXT);
admin_externalpage_setup('registrationmoodleorg');
if (parse_url($url, PHP_URL_HOST) !== parse_url(HUB_MOODLEORGHUBURL, PHP_URL_HOST)) {
// Allow other plugins to renew registration on custom hubs. Plugins implementing this
if ($url !== HUB_MOODLEORGHUBURL) {
// Allow other plugins to renew registration on hubs other than moodle.net . Plugins implementing this
// callback need to redirect or exit. See https://docs.moodle.org/en/Hub_registration .
$callbacks = get_plugins_with_function('hub_registration');
foreach ($callbacks as $plugintype => $plugins) {
@@ -56,7 +56,7 @@ if (parse_url($url, PHP_URL_HOST) !== parse_url(HUB_MOODLEORGHUBURL, PHP_URL_HOS
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('renewregistration', 'hub'), 3, 'main');
$hublink = html_writer::tag('a', HUB_MOODLEORGHUBURL, array('href' => HUB_MOODLEORGHUBURL));
$hublink = html_writer::tag('a', 'Moodle.net', array('href' => HUB_MOODLEORGHUBURL));
$deletedregmsg = get_string('previousregistrationdeleted', 'hub', $hublink);
+98 -203
View File
@@ -253,7 +253,7 @@ class core_admin_renderer extends plugin_renderer_base {
$out .= $this->output->container(get_string('cancelinstallinfodir', 'core_plugin', $pluginfo->rootdir));
if ($repotype = $pluginman->plugin_external_source($pluginfo->component)) {
$out .= $this->output->container(get_string('uninstalldeleteconfirmexternal', 'core_plugin', $repotype),
'alert alert-warning mt-2');
'uninstalldeleteconfirmexternal');
}
}
@@ -281,9 +281,6 @@ class core_admin_renderer extends plugin_renderer_base {
* @param bool $mobileconfigured Whether the mobile web services have been enabled
* @param bool $overridetossl Whether or not ssl is being forced.
* @param bool $invalidforgottenpasswordurl Whether the forgotten password URL does not link to a valid URL.
* @param bool $croninfrequent If true, warn that cron hasn't run in the past few minutes
* @param bool $showcampaigncontent Whether the campaign content should be visible or not.
* @param bool $showfeedbackencouragement Whether the feedback encouragement content should be displayed or not.
*
* @return string HTML to output.
*/
@@ -291,9 +288,7 @@ class core_admin_renderer extends plugin_renderer_base {
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch,
$buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0,
$themedesignermode = false, $devlibdir = false, $mobileconfigured = false,
$overridetossl = false, $invalidforgottenpasswordurl = false, $croninfrequent = false,
$showcampaigncontent = false, bool $showfeedbackencouragement = false) {
$overridetossl = false, $invalidforgottenpasswordurl = false) {
global $CFG;
$output = '';
@@ -307,7 +302,6 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->display_errors_warning($errorsdisplayed);
$output .= $this->buggy_iconv_warning($buggyiconvnomb);
$output .= $this->cron_overdue_warning($cronoverdue);
$output .= $this->cron_infrequent_warning($croninfrequent);
$output .= $this->db_problems($dbproblems);
$output .= $this->maintenance_mode_warning($maintenancemode);
$output .= $this->overridetossl_warning($overridetossl);
@@ -316,8 +310,6 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->registration_warning($registered);
$output .= $this->mobile_configuration_warning($mobileconfigured);
$output .= $this->forgotten_password_url_warning($invalidforgottenpasswordurl);
$output .= $this->userfeedback_encouragement($showfeedbackencouragement);
$output .= $this->campaign_content($showcampaigncontent);
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
@@ -367,15 +359,14 @@ class core_admin_renderer extends plugin_renderer_base {
$output = '';
if ($checker->enabled()) {
$output .= $this->container_start('checkforupdates mb-4');
$output .= $this->container_start('checkforupdates');
$output .= $this->single_button(
new moodle_url($reloadurl, array('fetchupdates' => 1)),
get_string('checkforupdates', 'core_plugin')
);
if ($timefetched = $checker->get_last_timefetched()) {
$timefetched = userdate($timefetched, get_string('strftimedatetime', 'core_langconfig'));
$output .= $this->container(get_string('checkforupdateslast', 'core_plugin', $timefetched),
'lasttimefetched small text-muted mt-1');
$output .= $this->container(get_string('checkforupdateslast', 'core_plugin', $timefetched), 'lasttimefetched');
}
$output .= $this->container_end();
}
@@ -439,7 +430,7 @@ class core_admin_renderer extends plugin_renderer_base {
if ($repotype = $pluginman->plugin_external_source($pluginfo->component)) {
$confirm .= $this->output->container(get_string('uninstalldeleteconfirmexternal', 'core_plugin', $repotype),
'alert alert-warning mt-2');
'uninstalldeleteconfirmexternal');
}
// After any uninstall we must execute full upgrade to finish the cleanup!
@@ -518,7 +509,7 @@ class core_admin_renderer extends plugin_renderer_base {
* @return string HTML to output.
*/
protected function warning($message, $type = 'warning') {
return $this->box($message, 'generalbox alert alert-' . $type);
return $this->box($message, 'generalbox admin' . $type);
}
/**
@@ -533,7 +524,7 @@ class core_admin_renderer extends plugin_renderer_base {
return $this->warning(get_string('datarootsecuritywarning', 'admin', $CFG->dataroot));
} else if ($insecuredataroot == INSECURE_DATAROOT_ERROR) {
return $this->warning(get_string('datarootsecurityerror', 'admin', $CFG->dataroot), 'danger');
return $this->warning(get_string('datarootsecurityerror', 'admin', $CFG->dataroot), 'error');
} else {
return '';
@@ -551,7 +542,7 @@ class core_admin_renderer extends plugin_renderer_base {
if ($devlibdir) {
$moreinfo = new moodle_url('/report/security/index.php');
$warning = get_string('devlibdirpresent', 'core_admin', ['moreinfourl' => $moreinfo->out()]);
return $this->warning($warning, 'danger');
return $this->warning($warning, 'error');
} else {
return '';
@@ -608,27 +599,19 @@ class core_admin_renderer extends plugin_renderer_base {
return '';
}
$check = new \tool_task\check\cronrunning();
$result = $check->get_result();
return $this->warning($result->get_summary() . '&nbsp;' . $this->help_icon('cron', 'admin'));
}
if (empty($CFG->cronclionly)) {
$url = new moodle_url('/admin/cron.php');
if (!empty($CFG->cronremotepassword)) {
$url = new moodle_url('/admin/cron.php', array('password' => $CFG->cronremotepassword));
}
/**
* Render an appropriate message if cron is not being run frequently (recommended every minute).
*
* @param bool $croninfrequent
* @return string HTML to output.
*/
public function cron_infrequent_warning(bool $croninfrequent) : string {
global $CFG;
if (!$croninfrequent) {
return '';
return $this->warning(get_string('cronwarning', 'admin', $url->out()) . '&nbsp;' .
$this->help_icon('cron', 'admin'));
}
$check = new \tool_task\check\cronrunning();
$result = $check->get_result();
return $this->warning($result->get_summary() . '&nbsp;' . $this->help_icon('cron', 'admin'));
// $CFG->cronclionly is not empty: cron can run only from CLI.
return $this->warning(get_string('cronwarningcli', 'admin') . '&nbsp;' .
$this->help_icon('cron', 'admin'));
}
/**
@@ -718,7 +701,7 @@ class core_admin_renderer extends plugin_renderer_base {
return $this->warning(
$this->container(get_string('maturitycorewarning', 'admin', $maturitylevel)) .
$this->container($this->doc_link('admin/versions', get_string('morehelp'))),
'danger');
'error');
}
/*
@@ -734,7 +717,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
$warning = (get_string('testsiteupgradewarning', 'admin', $testsite));
return $this->warning($warning, 'danger');
return $this->warning($warning, 'error');
}
/**
@@ -769,7 +752,7 @@ class core_admin_renderer extends plugin_renderer_base {
$level = 'warning';
if ($maturity == MATURITY_ALPHA) {
$level = 'danger';
$level = 'error';
}
$maturitylevel = get_string('maturity' . $maturity, 'admin');
@@ -820,7 +803,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
}
$updateinfo .= $this->container_start('checkforupdates mt-1');
$updateinfo .= $this->container_start('checkforupdates');
$fetchurl = new moodle_url('/admin/index.php', array('fetchupdates' => 1, 'sesskey' => sesskey(), 'cache' => 0));
$updateinfo .= $this->single_button($fetchurl, get_string('checkforupdates', 'core_plugin'));
if ($fetch) {
@@ -884,20 +867,6 @@ class core_admin_renderer extends plugin_renderer_base {
return $output;
}
/**
* Display campaign content.
*
* @param bool $showcampaigncontent Whether the campaign content should be visible or not.
* @return string the campaign content raw html.
*/
protected function campaign_content(bool $showcampaigncontent): string {
if (!$showcampaigncontent) {
return '';
}
return $this->render_from_template('core/campaign_content', ['lang' => current_language()]);
}
/**
* Display a warning about the forgotten password URL not linking to a valid URL.
*
@@ -923,7 +892,7 @@ class core_admin_renderer extends plugin_renderer_base {
*/
protected function moodle_available_update_info(\core\update\info $updateinfo) {
$boxclasses = 'moodleupdateinfo mb-2';
$boxclasses = 'moodleupdateinfo';
$info = array();
if (isset($updateinfo->release)) {
@@ -943,8 +912,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
if (isset($updateinfo->download)) {
$info[] = html_writer::link($updateinfo->download, get_string('download'),
array('class' => 'info download btn btn-secondary'));
$info[] = html_writer::link($updateinfo->download, get_string('download'), array('class' => 'info download'));
}
if (isset($updateinfo->url)) {
@@ -952,9 +920,9 @@ class core_admin_renderer extends plugin_renderer_base {
array('class' => 'info more'));
}
$box = $this->output->container_start($boxclasses);
$box .= $this->output->container(implode(html_writer::tag('span', ' | ', array('class' => 'separator')), $info), '');
$box .= $this->output->container_end();
$box = $this->output->box_start($boxclasses);
$box .= $this->output->box(implode(html_writer::tag('span', ' ', array('class' => 'separator')), $info), '');
$box .= $this->output->box_end();
return $box;
}
@@ -966,7 +934,7 @@ class core_admin_renderer extends plugin_renderer_base {
protected function release_notes_link() {
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/dev/Releases');
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
return $this->box($releasenoteslink, 'generalbox alert alert-info');
return $this->box($releasenoteslink, 'generalbox releasenoteslink');
}
/**
@@ -995,7 +963,7 @@ class core_admin_renderer extends plugin_renderer_base {
* @return string HTML code
*/
public function plugins_check_table(core_plugin_manager $pluginman, $version, array $options = array()) {
global $CFG;
$plugininfo = $pluginman->get_plugins();
if (empty($plugininfo)) {
@@ -1066,7 +1034,7 @@ class core_admin_renderer extends plugin_renderer_base {
$displayname = new html_table_cell(
$icon.
html_writer::span($plugin->displayname, 'pluginname').
html_writer::div($plugin->get_dir(), 'plugindir text-muted small')
html_writer::div($plugin->get_dir(), 'plugindir')
);
$versiondb = new html_table_cell($plugin->versiondb);
@@ -1074,46 +1042,44 @@ class core_admin_renderer extends plugin_renderer_base {
if ($isstandard = $plugin->is_standard()) {
$row->attributes['class'] .= ' standard';
$sourcelabel = html_writer::span(get_string('sourcestd', 'core_plugin'), 'sourcetext badge badge-secondary');
$sourcelabel = html_writer::span(get_string('sourcestd', 'core_plugin'), 'sourcetext label');
} else {
$row->attributes['class'] .= ' extension';
$sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext badge badge-info');
$sourcelabel = html_writer::span(get_string('sourceext', 'core_plugin'), 'sourcetext label label-info');
}
$coredependency = $plugin->is_core_dependency_satisfied($version);
$incompatibledependency = $plugin->is_core_compatible_satisfied($CFG->branch);
$otherpluginsdependencies = $pluginman->are_dependencies_satisfied($plugin->get_other_required_plugins());
$dependenciesok = $coredependency && $otherpluginsdependencies && $incompatibledependency;
$dependenciesok = $coredependency && $otherpluginsdependencies;
$statuscode = $plugin->get_status();
$row->attributes['class'] .= ' status-' . $statuscode;
$statusclass = 'statustext badge ';
$statusclass = 'statustext label ';
switch ($statuscode) {
case core_plugin_manager::PLUGIN_STATUS_NEW:
$statusclass .= $dependenciesok ? 'badge-success' : 'badge-warning';
$statusclass .= $dependenciesok ? 'label-success' : 'label-warning';
break;
case core_plugin_manager::PLUGIN_STATUS_UPGRADE:
$statusclass .= $dependenciesok ? 'badge-info' : 'badge-warning';
$statusclass .= $dependenciesok ? 'label-info' : 'label-warning';
break;
case core_plugin_manager::PLUGIN_STATUS_MISSING:
case core_plugin_manager::PLUGIN_STATUS_DOWNGRADE:
case core_plugin_manager::PLUGIN_STATUS_DELETE:
$statusclass .= 'badge-danger';
$statusclass .= 'label-important';
break;
case core_plugin_manager::PLUGIN_STATUS_NODB:
case core_plugin_manager::PLUGIN_STATUS_UPTODATE:
$statusclass .= $dependenciesok ? 'badge-light' : 'badge-warning';
$statusclass .= $dependenciesok ? '' : 'label-warning';
break;
}
$status = html_writer::span(get_string('status_' . $statuscode, 'core_plugin'), $statusclass);
if (!empty($installabortable[$plugin->component])) {
$status .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstall' => $plugin->component, 'confirmplugincheck' => 0)),
new moodle_url($this->page->url, array('abortinstall' => $plugin->component)),
get_string('cancelinstallone', 'core_plugin'),
'post',
array('class' => 'actionbutton cancelinstallone d-block mt-1')
array('class' => 'actionbutton cancelinstallone')
);
}
@@ -1122,7 +1088,7 @@ class core_admin_renderer extends plugin_renderer_base {
new moodle_url($this->page->url, array('abortupgrade' => $plugin->component)),
get_string('cancelupgradeone', 'core_plugin'),
'post',
array('class' => 'actionbutton cancelupgradeone d-block mt-1')
array('class' => 'actionbutton cancelupgradeone')
);
}
@@ -1134,11 +1100,8 @@ class core_admin_renderer extends plugin_renderer_base {
}
$status = new html_table_cell($sourcelabel.' '.$status);
if ($plugin->pluginsupported != null) {
$requires = new html_table_cell($this->required_column($plugin, $pluginman, $version, $CFG->branch));
} else {
$requires = new html_table_cell($this->required_column($plugin, $pluginman, $version));
}
$requires = new html_table_cell($this->required_column($plugin, $pluginman, $version));
$statusisboring = in_array($statuscode, array(
core_plugin_manager::PLUGIN_STATUS_NODB, core_plugin_manager::PLUGIN_STATUS_UPTODATE));
@@ -1195,7 +1158,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
}
$out .= $this->output->container_start('actions mb-2');
$out .= $this->output->container_start('actions');
$installableupdates = $pluginman->filter_installable($pluginman->available_updates());
if ($installableupdates) {
@@ -1203,16 +1166,16 @@ class core_admin_renderer extends plugin_renderer_base {
new moodle_url($this->page->url, array('installupdatex' => 1)),
get_string('updateavailableinstallall', 'core_admin', count($installableupdates)),
'post',
array('class' => 'singlebutton updateavailableinstallall mr-1')
array('class' => 'singlebutton updateavailableinstallall')
);
}
if ($installabortable) {
$out .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstallx' => 1, 'confirmplugincheck' => 0)),
new moodle_url($this->page->url, array('abortinstallx' => 1)),
get_string('cancelinstallall', 'core_plugin', count($installabortable)),
'post',
array('class' => 'singlebutton cancelinstallall mr-1')
array('class' => 'singlebutton cancelinstallall')
);
}
@@ -1221,17 +1184,15 @@ class core_admin_renderer extends plugin_renderer_base {
new moodle_url($this->page->url, array('abortupgradex' => 1)),
get_string('cancelupgradeall', 'core_plugin', count($upgradeabortable)),
'post',
array('class' => 'singlebutton cancelupgradeall mr-1')
array('class' => 'singlebutton cancelupgradeall')
);
}
$out .= html_writer::div(html_writer::link(new moodle_url($this->page->url, array('showallplugins' => 0)),
get_string('plugincheckattention', 'core_plugin')).' '.html_writer::span($sumattention, 'badge badge-light'),
'btn btn-link mr-1');
get_string('plugincheckattention', 'core_plugin')).' '.html_writer::span($sumattention, 'badge'));
$out .= html_writer::div(html_writer::link(new moodle_url($this->page->url, array('showallplugins' => 1)),
get_string('plugincheckall', 'core_plugin')).' '.html_writer::span($sumtotal, 'badge badge-light'),
'btn btn-link mr-1');
get_string('plugincheckall', 'core_plugin')).' '.html_writer::span($sumtotal, 'badge'));
$out .= $this->output->container_end(); // End of .actions container.
$out .= $this->output->container_end(); // End of #plugins-check-info container.
@@ -1299,13 +1260,12 @@ class core_admin_renderer extends plugin_renderer_base {
}
}
$out = $this->output->container_start('plugins-check-dependencies mb-4');
$out = $this->output->container_start('plugins-check-dependencies');
if ($unavailable or $unknown) {
$out .= $this->output->heading(get_string('misdepsunavail', 'core_plugin'));
if ($unknown) {
$out .= $this->output->render((new \core\output\notification(get_string('misdepsunknownlist', 'core_plugin',
implode(', ', $unknown))))->set_show_closebutton(false));
$out .= $this->output->notification(get_string('misdepsunknownlist', 'core_plugin', implode($unknown, ', ')));
}
if ($unavailable) {
$unavailablelist = array();
@@ -1319,18 +1279,18 @@ class core_admin_renderer extends plugin_renderer_base {
}
$unavailablelist[] = $unavailablelistitem;
}
$out .= $this->output->render((new \core\output\notification(get_string('misdepsunavaillist', 'core_plugin',
implode(', ', $unavailablelist))))->set_show_closebutton(false));
$out .= $this->output->notification(get_string('misdepsunavaillist', 'core_plugin',
implode($unavailablelist, ', ')));
}
$out .= $this->output->container_start('plugins-check-dependencies-actions mb-4');
$out .= $this->output->container_start('plugins-check-dependencies-actions');
$out .= ' '.html_writer::link(new moodle_url('/admin/tool/installaddon/'),
get_string('dependencyuploadmissing', 'core_plugin'), array('class' => 'btn btn-secondary'));
get_string('dependencyuploadmissing', 'core_plugin'));
$out .= $this->output->container_end(); // End of .plugins-check-dependencies-actions container.
}
if ($available) {
$out .= $this->output->heading(get_string('misdepsavail', 'core_plugin'));
$out .= $this->output->container_start('plugins-check-dependencies-actions mb-2');
$out .= $this->output->container_start('plugins-check-dependencies-actions');
$installable = $pluginman->filter_installable($available);
if ($installable) {
@@ -1338,13 +1298,12 @@ class core_admin_renderer extends plugin_renderer_base {
new moodle_url($this->page->url, array('installdepx' => 1)),
get_string('dependencyinstallmissing', 'core_plugin', count($installable)),
'post',
array('class' => 'singlebutton dependencyinstallmissing d-inline-block mr-1')
array('class' => 'singlebutton dependencyinstallmissing')
);
}
$out .= html_writer::div(html_writer::link(new moodle_url('/admin/tool/installaddon/'),
get_string('dependencyuploadmissing', 'core_plugin'), array('class' => 'btn btn-link')),
'dependencyuploadmissing d-inline-block mr-1');
get_string('dependencyuploadmissing', 'core_plugin')), 'dependencyuploadmissing');
$out .= $this->output->container_end(); // End of .plugins-check-dependencies-actions container.
@@ -1383,9 +1342,9 @@ class core_admin_renderer extends plugin_renderer_base {
$supportedmoodles = array();
foreach ($plugin->version->supportedmoodles as $moodle) {
if ($CFG->branch == str_replace('.', '', $moodle->release)) {
$supportedmoodles[] = html_writer::span($moodle->release, 'badge badge-success');
$supportedmoodles[] = html_writer::span($moodle->release, 'label label-success');
} else {
$supportedmoodles[] = html_writer::span($moodle->release, 'badge badge-light');
$supportedmoodles[] = html_writer::span($moodle->release, 'label');
}
}
@@ -1399,7 +1358,7 @@ class core_admin_renderer extends plugin_renderer_base {
}
$info = html_writer::div(
get_string('requiredby', 'core_plugin', implode(', ', $requriedby)),
'requiredby mb-1'
'requiredby'
);
} else {
$info = '';
@@ -1410,39 +1369,38 @@ class core_admin_renderer extends plugin_renderer_base {
$info .= html_writer::div(
html_writer::link('https://moodle.org/plugins/view.php?plugin='.$plugin->component,
get_string('misdepinfoplugin', 'core_plugin')),
'misdepinfoplugin d-inline-block mr-3 mb-1'
'misdepinfoplugin'
);
$info .= html_writer::div(
html_writer::link('https://moodle.org/plugins/pluginversion.php?id='.$plugin->version->id,
get_string('misdepinfoversion', 'core_plugin')),
'misdepinfoversion d-inline-block mr-3 mb-1'
'misdepinfoversion'
);
$info .= html_writer::div(html_writer::link($plugin->version->downloadurl, get_string('download')),
'misdepdownload d-inline-block mr-3 mb-1');
$info .= html_writer::div(html_writer::link($plugin->version->downloadurl, get_string('download')), 'misdepdownload');
if ($pluginman->is_remote_plugin_installable($plugin->component, $plugin->version->version, $reason)) {
$info .= $this->output->single_button(
new moodle_url($this->page->url, array('installdep' => $plugin->component)),
get_string('dependencyinstall', 'core_plugin'),
'post',
array('class' => 'singlebutton dependencyinstall mr-3 mb-1')
array('class' => 'singlebutton dependencyinstall')
);
} else {
$reasonhelp = $this->info_remote_plugin_not_installable($reason);
if ($reasonhelp) {
$info .= html_writer::div($reasonhelp, 'reasonhelp dependencyinstall d-inline-block mr-3 mb-1');
$info .= html_writer::div($reasonhelp, 'reasonhelp dependencyinstall');
}
}
$info .= $this->output->container_end(); // End of .actions container.
$table->data[] = array(
html_writer::div($plugin->name, 'name').' '.html_writer::div($plugin->component, 'component text-muted small'),
html_writer::div($plugin->name, 'name').' '.html_writer::div($plugin->component, 'component'),
$plugin->version->release,
$plugin->version->version,
implode(' ', $supportedmoodles),
implode($supportedmoodles, ' '),
$info
);
}
@@ -1474,54 +1432,38 @@ class core_admin_renderer extends plugin_renderer_base {
* @param \core\plugininfo\base $plugin the plugin we are rendering the row for.
* @param core_plugin_manager $pluginman provides data on all the plugins.
* @param string $version
* @param int $branch the current Moodle branch
* @return string HTML code
*/
protected function required_column(\core\plugininfo\base $plugin, core_plugin_manager $pluginman, $version, $branch = null) {
protected function required_column(\core\plugininfo\base $plugin, core_plugin_manager $pluginman, $version) {
$requires = array();
$displayuploadlink = false;
$displayupdateslink = false;
$requirements = $pluginman->resolve_requirements($plugin, $version, $branch);
foreach ($requirements as $reqname => $reqinfo) {
foreach ($pluginman->resolve_requirements($plugin, $version) as $reqname => $reqinfo) {
if ($reqname === 'core') {
if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_OK) {
$class = 'requires-ok text-muted';
$class = 'requires-ok';
$label = '';
} else {
$class = 'requires-failed';
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger');
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-important');
}
if ($branch != null && !$plugin->is_core_compatible_satisfied($branch)) {
$requires[] = html_writer::tag('li',
html_writer::span(get_string('incompatibleversion', 'core_plugin', $branch), 'dep dep-core').
$requires[] = html_writer::tag('li',
html_writer::span(get_string('moodleversion', 'core_plugin', $plugin->versionrequires), 'dep dep-core').
' '.$label, array('class' => $class));
} else if ($branch != null && $plugin->pluginsupported != null) {
$requires[] = html_writer::tag('li',
html_writer::span(get_string('moodlebranch', 'core_plugin',
array('min' => $plugin->pluginsupported[0], 'max' => $plugin->pluginsupported[1])), 'dep dep-core').
' '.$label, array('class' => $class));
} else if ($reqinfo->reqver != ANY_VERSION) {
$requires[] = html_writer::tag('li',
html_writer::span(get_string('moodleversion', 'core_plugin', $plugin->versionrequires), 'dep dep-core').
' '.$label, array('class' => $class));
}
} else {
$actions = array();
if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_OK) {
$label = '';
$class = 'requires-ok text-muted';
$class = 'requires-ok';
} else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_MISSING) {
if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) {
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning');
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'label label-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'label label-warning');
$class = 'requires-failed requires-missing requires-available';
$actions[] = html_writer::link(
new moodle_url('https://moodle.org/plugins/view.php', array('plugin' => $reqname)),
@@ -1529,24 +1471,24 @@ class core_admin_renderer extends plugin_renderer_base {
);
} else {
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'badge badge-danger');
$label = html_writer::span(get_string('dependencymissing', 'core_plugin'), 'label label-important');
$label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'),
'badge badge-danger');
'label label-important');
$class = 'requires-failed requires-missing requires-unavailable';
}
$displayuploadlink = true;
} else if ($reqinfo->status == $pluginman::REQUIREMENT_STATUS_OUTDATED) {
if ($reqinfo->availability == $pluginman::REQUIREMENT_AVAILABLE) {
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'badge badge-warning');
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-warning');
$label .= ' '.html_writer::span(get_string('dependencyavailable', 'core_plugin'), 'label label-warning');
$class = 'requires-failed requires-outdated requires-available';
$displayupdateslink = true;
} else {
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'badge badge-danger');
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-important');
$label .= ' '.html_writer::span(get_string('dependencyunavailable', 'core_plugin'),
'badge badge-danger');
'label label-important');
$class = 'requires-failed requires-outdated requires-unavailable';
}
$displayuploadlink = true;
@@ -1570,14 +1512,13 @@ class core_admin_renderer extends plugin_renderer_base {
return '';
}
$out = html_writer::tag('ul', implode("\n", $requires), array('class' => 'm-0'));
$out = html_writer::tag('ul', implode("\n", $requires));
if ($displayuploadlink) {
$out .= html_writer::div(
html_writer::link(
new moodle_url('/admin/tool/installaddon/'),
get_string('dependencyuploadmissing', 'core_plugin'),
array('class' => 'btn btn-secondary btn-sm m-1')
get_string('dependencyuploadmissing', 'core_plugin')
),
'dependencyuploadmissing'
);
@@ -1587,20 +1528,12 @@ class core_admin_renderer extends plugin_renderer_base {
$out .= html_writer::div(
html_writer::link(
new moodle_url($this->page->url, array('sesskey' => sesskey(), 'fetchupdates' => 1)),
get_string('checkforupdates', 'core_plugin'),
array('class' => 'btn btn-secondary btn-sm m-1')
get_string('checkforupdates', 'core_plugin')
),
'checkforupdates'
);
}
// Check if supports is present, and $branch is not in, only if $incompatible check was ok.
if ($plugin->pluginsupported != null && $class == 'requires-ok' && $branch != null) {
if ($pluginman->check_explicitly_supported($plugin, $branch) == $pluginman::VERSION_NOT_SUPPORTED) {
$out .= html_writer::div(get_string('notsupported', 'core_plugin', $branch));
}
}
return $out;
}
@@ -1819,13 +1752,13 @@ class core_admin_renderer extends plugin_renderer_base {
$source = '';
} else {
$row->attributes['class'] .= ' extension';
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source badge badge-info');
$source = html_writer::div(get_string('sourceext', 'core_plugin'), 'source label label-info');
}
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg badge badge-danger');
$msg = html_writer::div(get_string('status_missing', 'core_plugin'), 'statusmsg label label-important');
} else if ($status === core_plugin_manager::PLUGIN_STATUS_NEW) {
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg badge badge-success');
$msg = html_writer::div(get_string('status_new', 'core_plugin'), 'statusmsg label label-success');
} else {
$msg = '';
}
@@ -1947,7 +1880,7 @@ class core_admin_renderer extends plugin_renderer_base {
get_string('status'),
);
$servertable->colclasses = array('centeralign name', 'centeralign info', 'leftalign report', 'leftalign plugin', 'centeralign status');
$servertable->attributes['class'] = 'admintable environmenttable generaltable table-sm';
$servertable->attributes['class'] = 'admintable environmenttable generaltable';
$servertable->id = 'serverstatus';
$serverdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
@@ -1960,7 +1893,7 @@ class core_admin_renderer extends plugin_renderer_base {
get_string('status'),
);
$othertable->colclasses = array('aligncenter info', 'alignleft report', 'alignleft plugin', 'aligncenter status');
$othertable->attributes['class'] = 'admintable environmenttable generaltable table-sm';
$othertable->attributes['class'] = 'admintable environmenttable generaltable';
$othertable->id = 'otherserverstatus';
$otherdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
@@ -2056,7 +1989,7 @@ class core_admin_renderer extends plugin_renderer_base {
if (empty($CFG->docroot) or $environment_result->plugin) {
$report = get_string($stringtouse, 'admin', $rec);
} else {
$report = $this->doc_link(join('/', $linkparts), get_string($stringtouse, 'admin', $rec), true);
$report = $this->doc_link(join($linkparts, '/'), get_string($stringtouse, 'admin', $rec), true);
}
// Enclose report text in div so feedback text will be displayed underneath it.
$report = html_writer::div($report);
@@ -2064,15 +1997,15 @@ class core_admin_renderer extends plugin_renderer_base {
// Format error or warning line
if ($errorline) {
$messagetype = 'error';
$statusclass = 'badge-danger';
$statusclass = 'label-important';
} else if ($warningline) {
$messagetype = 'warn';
$statusclass = 'badge-warning';
$statusclass = 'label-warning';
} else {
$messagetype = 'ok';
$statusclass = 'badge-success';
$statusclass = 'label-success';
}
$status = html_writer::span($status, 'badge ' . $statusclass);
$status = html_writer::span($status, 'label ' . $statusclass);
// Here we'll store all the feedback found
$feedbacktext = '';
// Append the feedback if there is some
@@ -2157,44 +2090,6 @@ class core_admin_renderer extends plugin_renderer_base {
* @return string
*/
public function moodleorg_registration_message() {
$out = format_text(get_string('registerwithmoodleorginfo', 'core_hub'), FORMAT_MARKDOWN);
$out .= html_writer::link(
new moodle_url('/admin/settings.php', ['section' => 'moodleservices']),
$this->output->pix_icon('i/info', '').' '.get_string('registerwithmoodleorginfoapp', 'core_hub'),
['class' => 'btn btn-link', 'role' => 'opener', 'target' => '_href']
);
$out .= html_writer::link(
HUB_MOODLEORGHUBURL,
$this->output->pix_icon('i/stats', '').' '.get_string('registerwithmoodleorginfostats', 'core_hub'),
['class' => 'btn btn-link', 'role' => 'opener', 'target' => '_href']
);
$out .= html_writer::link(
HUB_MOODLEORGHUBURL.'/sites',
$this->output->pix_icon('i/location', '').' '.get_string('registerwithmoodleorginfosites', 'core_hub'),
['class' => 'btn btn-link', 'role' => 'opener', 'target' => '_href']
);
return $this->output->box($out);
}
/**
* Display message about benefits of enabling the user feedback feature.
*
* @param bool $showfeedbackencouragement Whether the encouragement content should be displayed or not
* @return string
*/
protected function userfeedback_encouragement(bool $showfeedbackencouragement): string {
$output = '';
if ($showfeedbackencouragement) {
$settingslink = new moodle_url('/admin/settings.php', ['section' => 'userfeedback']);
$output .= $this->warning(get_string('userfeedbackencouragement', 'admin', $settingslink->out()), 'info');
}
return $output;
return format_text(get_string('registermoodlenet', 'admin'), FORMAT_HTML, ['noclean' => true]);
}
}
+3 -2
View File
@@ -47,6 +47,7 @@ if ($action == 'newon') {
$visible = false;
}
require_capability('moodle/site:config', context_system::instance());
admin_externalpage_setup($pagename);
$sesskeyurl = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php?sesskey=' . sesskey();
@@ -123,13 +124,13 @@ if (($action == 'edit') || ($action == 'new')) {
}
$instanceoptionnames = repository::static_function($repository, 'get_instance_option_names');
if (!empty($instanceoptionnames)) {
if (property_exists($fromform, 'enablecourseinstances')) {
if (array_key_exists('enablecourseinstances', $fromform)) {
$settings['enablecourseinstances'] = $fromform->enablecourseinstances;
}
else {
$settings['enablecourseinstances'] = 0;
}
if (property_exists($fromform, 'enableuserinstances')) {
if (array_key_exists('enableuserinstances', $fromform)) {
$settings['enableuserinstances'] = $fromform->enableuserinstances;
}
else {
+1
View File
@@ -42,6 +42,7 @@ if ($edit){
}
admin_externalpage_setup($pagename, '', null, new moodle_url('/admin/repositoryinstance.php'));
require_capability('moodle/site:config', $context);
$baseurl = new moodle_url("/$CFG->admin/repositoryinstance.php", array('sesskey'=>sesskey()));
+5 -25
View File
@@ -36,12 +36,15 @@ if (!is_siteadmin()) {
}
$admisselector = new core_role_admins_existing_selector();
$admisselector->set_extra_fields(array('username', 'email'));
$potentialadmisselector = new core_role_admins_potential_selector();
$potentialadmisselector->set_extra_fields(array('username', 'email'));
if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
if ($userstoadd = $potentialadmisselector->get_selected_users()) {
$user = reset($userstoadd);
$username = $potentialadmisselector->output_user($user);
$username = fullname($user) . " ($user->username, $user->email)";
echo $OUTPUT->header();
$yesurl = new moodle_url('/admin/roles/admins.php', array('confirmadd'=>$user->id, 'sesskey'=>sesskey()));
echo $OUTPUT->confirm(get_string('confirmaddadmin', 'core_role', $username), $yesurl, $PAGE->url);
@@ -55,7 +58,7 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
if ($USER->id == $user->id) {
// Can not remove self.
} else {
$username = $admisselector->output_user($user);
$username = fullname($user) . " ($user->username, $user->email)";
echo $OUTPUT->header();
$yesurl = new moodle_url('/admin/roles/admins.php', array('confirmdel'=>$user->id, 'sesskey'=>sesskey()));
echo $OUTPUT->confirm(get_string('confirmdeladmin', 'core_role', $username), $yesurl, $PAGE->url);
@@ -77,16 +80,9 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
}
if (isset($admins[$newmain])) {
$logstringold = implode(', ', $admins);
unset($admins[$newmain]);
array_unshift($admins, $newmain);
$logstringnew = implode(', ', $admins);
set_config('siteadmins', implode(',', $admins));
add_to_config_log('siteadmins', $logstringold, $logstringnew, null);
redirect($PAGE->url);
}
}
@@ -99,16 +95,8 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
$admins[$admin] = $admin;
}
}
$logstringold = implode(', ', $admins);
$admins[$confirmadd] = $confirmadd;
$logstringnew = implode(', ', $admins);
set_config('siteadmins', implode(',', $admins));
add_to_config_log('siteadmins', $logstringold, $logstringnew, 'core');
redirect($PAGE->url);
} else if ($confirmdel and confirm_sesskey() and $confirmdel != $USER->id) {
@@ -119,16 +107,8 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
$admins[$admin] = $admin;
}
}
$logstringold = implode(', ', $admins);
unset($admins[$confirmdel]);
$logstringnew = implode(', ', $admins);
set_config('siteadmins', implode(',', $admins));
add_to_config_log('siteadmins', $logstringold, $logstringnew, 'core');
redirect($PAGE->url);
}
+20
View File
@@ -46,6 +46,26 @@ $controller = new $classformode[$mode]();
if (optional_param('submit', false, PARAM_BOOL) && data_submitted() && confirm_sesskey()) {
$controller->process_submission();
$syscontext->mark_dirty();
$event = null;
// Create event depending on mode.
switch ($mode) {
case 'assign':
$event = \core\event\role_allow_assign_updated::create(array('context' => $syscontext));
break;
case 'override':
$event = \core\event\role_allow_override_updated::create(array('context' => $syscontext));
break;
case 'switch':
$event = \core\event\role_allow_switch_updated::create(array('context' => $syscontext));
break;
case 'view':
$event = \core\event\role_allow_view_updated::create(array('context' => $syscontext));
break;
}
if ($event) {
$event->trigger();
}
redirect($baseurl);
}
+1 -2
View File
@@ -271,8 +271,7 @@ if ($roleid) {
foreach ($assignableroles as $roleid => $notused) {
$roleusers = '';
if (0 < $assigncounts[$roleid] && $assigncounts[$roleid] <= MAX_USERS_TO_LIST_PER_ROLE) {
$userfieldsapi = \core_user\fields::for_name();
$userfields = 'u.id, u.username' . $userfieldsapi->get_sql('u')->selects;
$userfields = 'u.id, u.username, ' . get_all_user_name_fields(true, 'u');
$roleusers = get_role_users($roleid, $context, false, $userfields);
if (!empty($roleusers)) {
$strroleusers = array();
@@ -46,8 +46,4 @@ class core_role_allow_assign_page extends core_role_allow_role_page {
public function get_intro_text() {
return get_string('configallowassign', 'core_admin');
}
protected function get_eventclass() {
return \core\event\role_allow_assign_updated::class;
}
}
@@ -46,8 +46,4 @@ class core_role_allow_override_page extends core_role_allow_role_page {
public function get_intro_text() {
return get_string('configallowoverride2', 'core_admin');
}
protected function get_eventclass() {
return \core\event\role_allow_override_updated::class;
}
}
-30
View File
@@ -59,36 +59,12 @@ abstract class core_role_allow_role_page {
*/
public function process_submission() {
global $DB;
$context = context_system::instance();
$this->load_current_settings();
// Delete all records, then add back the ones that should be allowed.
$DB->delete_records($this->tablename);
foreach ($this->roles as $fromroleid => $notused) {
foreach ($this->roles as $targetroleid => $alsonotused) {
$isallowed = $this->allowed[$fromroleid][$targetroleid];
if (optional_param('s_' . $fromroleid . '_' . $targetroleid, false, PARAM_BOOL)) {
$this->set_allow($fromroleid, $targetroleid);
// Only trigger events if this role allow relationship did not exist and the checkbox element
// has been submitted.
if (!$isallowed) {
$eventclass = $this->get_eventclass();
$eventclass::create([
'context' => $context,
'objectid' => $fromroleid,
'other' => ['targetroleid' => $targetroleid, 'allow' => true]
])->trigger();
}
} else if ($isallowed) {
// When the user has deselect an existing role allow checkbox but it is in the list of roles
// allowances.
$eventclass = $this->get_eventclass();
$eventclass::create([
'context' => $context,
'objectid' => $fromroleid,
'other' => ['targetroleid' => $targetroleid, 'allow' => false]
])->trigger();
}
}
}
@@ -185,10 +161,4 @@ abstract class core_role_allow_role_page {
* @return string
*/
public abstract function get_intro_text();
/**
* Returns the allow class respective event class name.
* @return string
*/
protected abstract function get_eventclass();
}
@@ -58,8 +58,4 @@ class core_role_allow_switch_page extends core_role_allow_role_page {
public function get_intro_text() {
return get_string('configallowswitch', 'core_admin');
}
protected function get_eventclass() {
return \core\event\role_allow_switch_updated::class;
}
}
-4
View File
@@ -74,8 +74,4 @@ class core_role_allow_view_page extends core_role_allow_role_page {
public function get_intro_text() {
return get_string('configallowview', 'core_admin');
}
protected function get_eventclass() {
return \core\event\role_allow_view_updated::class;
}
}
@@ -43,7 +43,7 @@ abstract class core_role_capability_table_base {
protected $id;
/** Added to the class="" attribute on output. */
protected $classes = array('rolecap table-hover');
protected $classes = array('rolecap');
/** Default number of capabilities in the table for the search UI to be shown. */
const NUM_CAPS_FOR_SEARCH = 12;

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