Compare commits

..

1217 Commits

Author SHA1 Message Date
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
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
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
Damyon Wiese e293c3deb3 MDL-62143 accessibility: Label breadcrumbs 2019-01-09 15:18:42 +08:00
Peter f8be708257 MDL-64486 mod_glossary: Add missing separator for special links 2019-01-03 08:39:46 +08: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
Stephen Bourget 29d25b33a5 MDL-63614 badges: Add COMPLETION_FAIL support to badge criteria 2018-12-19 10:31:28 -05: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
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
John Beedell dfce9c02d2 MDL-64404 qtype: gapselect currency like options dont show 2018-12-17 12:15:39 +00: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
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
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
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
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
Andrew Nicols 866cabf59d MDL-63607 behat: Remove theme from config whitelist 2018-10-10 12:06:42 +08:00
1485 changed files with 28758 additions and 9865 deletions
+1 -1
View File
@@ -203,7 +203,7 @@
}
},
{
files: ["**/amd/src/*.js"],
files: ["**/amd/src/*.js", "Gruntfile.js"],
// Check AMD with some slightly stricter rules.
rules: {
'no-unused-vars': 'error',
+71
View File
@@ -0,0 +1,71 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Template configuraton file for github actions CI/CD.
*
* @package core
* @copyright 2020 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com}
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This cannot be used out from a github actions workflow, so just exit.
getenv('GITHUB_WORKFLOW') || die; // phpcs:ignore moodle.Files.MoodleInternal.MoodleInternalGlobalState
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = getenv('dbtype');
$CFG->dblibrary = 'native';
$CFG->dbhost = '127.0.0.1';
$CFG->dbname = 'test';
$CFG->dbuser = 'test';
$CFG->dbpass = 'test';
$CFG->prefix = 'm_';
$CFG->dboptions = ['dbcollation' => 'utf8mb4_bin'];
$host = 'localhost';
$CFG->wwwroot = "http://{$host}";
$CFG->dataroot = realpath(dirname(__DIR__)) . '/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
// Debug options - possible to be controlled by flag in future.
$CFG->debug = (E_ALL | E_STRICT); // DEBUG_DEVELOPER.
$CFG->debugdisplay = 1;
$CFG->debugstringids = 1; // Add strings=1 to url to get string ids.
$CFG->perfdebug = 15;
$CFG->debugpageinfo = 1;
$CFG->allowthemechangeonurl = 1;
$CFG->passwordpolicy = 0;
$CFG->cronclionly = 0;
$CFG->pathtophp = getenv('pathtophp');
$CFG->phpunit_dataroot = realpath(dirname(__DIR__)) . '/phpunitdata';
$CFG->phpunit_prefix = 't_';
define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://localhost:8080');
define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://localhost:8080');
define('TEST_SESSION_REDIS_HOST', 'localhost');
define('TEST_CACHESTORE_REDIS_TESTSERVERS', 'localhost');
// TODO: add others (solr, mongodb, memcached, ldap...).
// Too much for now: define('PHPUNIT_LONGTEST', true); // Only leaves a few tests out and they are run later by CI.
require_once(__DIR__ . '/lib/setup.php');
+104
View File
@@ -0,0 +1,104 @@
name: Core
on: [push]
env:
php: 7.2
jobs:
Grunt:
runs-on: ubuntu-18.04
steps:
- name: Checking out code
uses: actions/checkout@v2
- name: Configuring node & npm
shell: bash -l {0}
run: nvm install
- name: Installing node stuff
run: npm install
- name: Running grunt
run: npx grunt
- name: Looking for uncommitted changes
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
run: |
git add .
git reset -- npm-shrinkwrap.json
git diff --cached --exit-code
PHPUnit:
runs-on: ${{ matrix.os }}
services:
exttests:
image: moodlehq/moodle-exttests
ports:
- 8080:80
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-18.04
php: 7.0
db: mysqli
- os: ubuntu-18.04
php: 7.2
db: pgsql
steps:
- name: Setting up DB mysql
if: ${{ matrix.db == 'mysqli' }}
uses: johanmeiring/mysql-action@tmpfs-patch
with:
collation server: utf8mb4_bin
mysql version: 5.7
mysql database: test
mysql user: test
mysql password: test
use tmpfs: true
- name: Setting up DB pgsql
if: ${{ matrix.db == 'pgsql' }}
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 9.6
postgresql db: test
postgresql user: test
postgresql password: test
- name: Configuring git vars
uses: rlespinasse/github-slug-action@v3.x
- name: Setting up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mysqli, zip, gd, xmlrpc, soap
coverage: none
- name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
uses: actions/checkout@v2
- name: Setting up PHPUnit
env:
dbtype: ${{ matrix.db }}
run: |
echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
cp .github/workflows/config-template.php config.php
mkdir ../moodledata
sudo locale-gen en_AU.UTF-8
php admin/tool/phpunit/cli/init.php --no-composer-self-update
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
run: vendor/bin/phpunit -v
+10 -2
View File
@@ -9,10 +9,18 @@
#
# See gitignore(5) man page for more details
#
# Swap files (vim)
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Temporary files including undo
*~
#
/config.php
/lib/editor/tinymce/extra/tools/temp/
*~
*.swp
/tags
/TAGS
/cscope.*
+2
View File
@@ -0,0 +1,2 @@
**/amd/**
/*.js
+1
View File
@@ -0,0 +1 @@
v14.15.0
+46 -76
View File
@@ -4,17 +4,16 @@
sudo: required
# We currently disable Travis notifications entirely until https://github.com/travis-ci/travis-ci/issues/4976
# is fixed.
notifications:
email: false
email:
if: env(MOODLE_EMAIL) != no
language: php
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.2
- 7.0
dist: trusty
services:
- docker
addons:
postgresql: "9.6"
@@ -27,49 +26,50 @@ addons:
# services:
# - redis-server
env:
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
# start first so that the total run time is not too high.
#
# We only run MySQL on PHP 7.2, so run that first.
# CI Tests should be second-highest in priority as these only take <= 60 seconds to run under normal circumstances.
# Postgres is significantly is pretty reasonable in its run-time.
# Run unit tests on MySQL
- DB=mysqli TASK=PHPUNIT
# Run CI Tests without running PHPUnit.
- DB=none TASK=CITEST
# Run unit tests on Postgres
- DB=pgsql TASK=PHPUNIT
# Perform an upgrade test too.
- DB=pgsql TASK=UPGRADE
matrix:
jobs:
# Enable fast finish.
# This will fail the build if a single job fails (except those in allow_failures).
# It will not stop the jobs from running.
fast_finish: true
include:
# Run grunt/npm install on highest version ('node' is an alias for the latest node.js version.)
- php: 7.2
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
# First all the lowest php ones (7.0)
- php: 7.0
env: DB=none TASK=CITEST
- php: 7.0
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
exclude:
# MySQL - it's just too slow.
# Exclude it on all versions except for 7.2
- env: DB=mysqli TASK=PHPUNIT
- if: env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present
php: 7.0
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all"
php: 7.0
env: DB=mysqli TASK=PHPUNIT
- if: env(MOODLE_PHP) = "all"
php: 7.2
env: DB=none TASK=CITEST
- if: env(MOODLE_PHP) = "all"
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: 7.2
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_PHP) = "all" AND (env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all")
php: 7.2
env: DB=mysqli TASK=PHPUNIT
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
before_install:
- docker run -d -p 127.0.0.1:8080:80 --name exttests moodlehq/moodle-exttests
install:
- >
if [ "$DB" = 'mysqli' ];
@@ -120,7 +120,7 @@ install:
before_script:
- phpenv config-rm xdebug.ini
- >
if [ "$TASK" = 'PHPUNIT' -o "$TASK" = 'UPGRADE' ];
if [ "$TASK" = 'PHPUNIT' ];
then
# Copy generic configuration in place.
cp config-dist.php config.php ;
@@ -179,6 +179,11 @@ before_script:
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
config.php ;
# Enable test external resources
sed -i \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://127.0.0.1:8080');" \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://127.0.0.1:8080');" \
config.php ;
# Initialise PHPUnit for Moodle.
php admin/tool/phpunit/cli/init.php
@@ -218,32 +223,6 @@ before_script:
export phpcmd=`which php`;
fi
########################################################################
# Upgrade test
########################################################################
- >
if [ "$TASK" = 'UPGRADE' ];
then
# We need the official upstream.
git remote add upstream https://github.com/moodle/moodle.git;
# Checkout 30 STABLE branch (the first version compatible with PHP 7.x)
git fetch upstream MOODLE_30_STABLE;
git checkout MOODLE_30_STABLE;
# Perform the upgrade
php admin/cli/install_database.php --agree-license --adminpass=Password --adminemail=admin@example.com --fullname="Upgrade test" --shortname=Upgrade;
# Return to the previous commit
git checkout -;
# Perform the upgrade
php admin/cli/upgrade.php --non-interactive --allow-unstable ;
# The local_ci repository can be used to check upgrade savepoints.
git clone https://github.com/moodlehq/moodle-local_ci.git local/ci ;
fi
script:
- >
if [ "$TASK" = 'PHPUNIT' ];
@@ -269,19 +248,10 @@ script:
git diff --cached --exit-code ;
fi
########################################################################
# Upgrade test
########################################################################
after_script:
- >
if [ "$TASK" = 'UPGRADE' ];
if [ "$TASK" = 'PHPUNIT' ];
then
cp local/ci/check_upgrade_savepoints/check_upgrade_savepoints.php ./check_upgrade_savepoints.php
result=`php check_upgrade_savepoints.php`;
# Check if there are problems
count=`echo "$result" | grep -P "ERROR|WARN" | wc -l` ;
if (($count > 0));
then
echo "$result"
exit 1 ;
fi
EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
fi
+1
View File
@@ -24,6 +24,7 @@
* Grunt configuration
*/
/* eslint-env node */
module.exports = function(grunt) {
var path = require('path'),
tasks = {},
+1 -1
View File
@@ -710,7 +710,7 @@ if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
+6 -6
View File
@@ -82,11 +82,6 @@ require_once($CFG->libdir.'/installlib.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/componentlib.class.php');
// make sure no tables are installed yet
if ($DB->get_tables() ) {
cli_error(get_string('clitablesexist', 'install'));
}
$CFG->early_install_lang = true;
get_string_manager(true);
@@ -109,12 +104,17 @@ list($options, $unrecognized) = cli_get_params(
)
);
// We show help text even if tables are installed.
if ($options['help']) {
echo $help;
die;
}
// Make sure no tables are installed yet.
if ($DB->get_tables() ) {
cli_error(get_string('clitablesexist', 'install'));
}
if (!$options['agree-license']) {
cli_error('You have to agree to the license. --help prints out the help'); // TODO: localize
}
+730
View File
@@ -2451,6 +2451,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.0.0" level="required">
<RESTRICT function="restrict_php_version_74" message="unsupportedphpversion74" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2632,6 +2633,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
<RESTRICT function="restrict_php_version_74" message="unsupportedphpversion74" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2799,4 +2801,732 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.8" requires="3.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.6" />
<VENDOR name="postgres" version="9.4" />
<VENDOR name="mssql" version="11.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<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="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.9" requires="3.5">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.6" />
<VENDOR name="postgres" version="9.5" />
<VENDOR name="mssql" version="11.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.10" requires="3.5">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="9.6" />
<VENDOR name="mssql" version="11.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.2.0" level="required">
<RESTRICT function="restrict_php_version_80" message="unsupportedphpversion80" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.11" requires="3.6">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="9.6" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+1 -2
View File
@@ -823,8 +823,7 @@ class core_admin_renderer extends plugin_renderer_base {
*/
protected function registration_warning($registered) {
if (!$registered) {
if (!$registered && site_is_public()) {
if (has_capability('moodle/site:config', context_system::instance())) {
$registerbutton = $this->single_button(new moodle_url('/admin/registration/index.php'),
get_string('register', 'admin'));
+5 -2
View File
@@ -69,8 +69,11 @@ class core_role_check_users_selector extends user_selector_base {
if ($coursecontext and $coursecontext != SITEID) {
$sql1 = " FROM {user} u
JOIN {user_enrolments} ue ON (ue.userid = u.id)
JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid1)
JOIN (SELECT DISTINCT subu.id
FROM {user} subu
JOIN {user_enrolments} ue ON (ue.userid = subu.id)
JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid1)
) subq ON subq.id = u.id
WHERE $wherecondition";
$params['courseid1'] = $coursecontext->instanceid;
+1 -1
View File
@@ -325,7 +325,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_skip_modif_prev', new lang_string('skipmodifprev', 'backup'), new lang_string('skipmodifprevhelp', 'backup'), 0));
// Automated defaults section.
$temp->add(new admin_setting_heading('automatedsettings', new lang_string('automatedsettings','backup'), ''));
$temp->add(new admin_setting_heading('automatedsettings', new lang_string('automatedsettings','backup'), new lang_string('recyclebin_desc', 'backup')));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', new lang_string('generalusers', 'backup'), new lang_string('configgeneralusers', 'backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_role_assignments', new lang_string('generalroleassignments','backup'), new lang_string('configgeneralroleassignments','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_activities', new lang_string('generalactivities','backup'), new lang_string('configgeneralactivities','backup'), 1));
+6 -2
View File
@@ -7,7 +7,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// "systempaths" settingpage
$temp = new admin_settingpage('systempaths', new lang_string('systempaths','admin'));
$temp->add(new admin_setting_configexecutable('pathtophp', new lang_string('pathtophp', 'admin'),
new lang_string('configpathtophp', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('pathtodu', new lang_string('pathtodu', 'admin'), new lang_string('configpathtodu', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('aspellpath', new lang_string('aspellpath', 'admin'), new lang_string('edhelpaspellpath'), ''));
$temp->add(new admin_setting_configexecutable('pathtodot', new lang_string('pathtodot', 'admin'), new lang_string('pathtodot_help', 'admin'), ''));
@@ -97,7 +98,10 @@ $options = array(
GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'HTTP_X_FORWARDED_FOR, REMOTE_ADDR',
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR => 'HTTP_CLIENT, REMOTE_ADDR',
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'REMOTE_ADDR');
$temp->add(new admin_setting_configselect('getremoteaddrconf', new lang_string('getremoteaddrconf', 'admin'), new lang_string('configgetremoteaddrconf', 'admin'), 0, $options));
$temp->add(new admin_setting_configselect('getremoteaddrconf', new lang_string('getremoteaddrconf', 'admin'),
new lang_string('configgetremoteaddrconf', 'admin'),
GETREMOTEADDR_SKIP_DEFAULT, $options));
$temp->add(new admin_setting_configtext('reverseproxyignore', new lang_string('reverseproxyignore', 'admin'), new lang_string('configreverseproxyignore', 'admin'), ''));
$temp->add(new admin_setting_heading('webproxy', new lang_string('webproxy', 'admin'), new lang_string('webproxyinfo', 'admin')));
$temp->add(new admin_setting_configtext('proxyhost', new lang_string('proxyhost', 'admin'), new lang_string('configproxyhost', 'admin'), '', PARAM_HOST));
+5 -29
View File
@@ -48,7 +48,6 @@ class behat_admin extends behat_base {
* @param TableNode $table
*/
public function i_set_the_following_administration_settings_values(TableNode $table) {
if (!$data = $table->getRowsHash()) {
return;
}
@@ -57,17 +56,12 @@ class behat_admin extends behat_base {
// We expect admin block to be visible, otherwise go to homepage.
if (!$this->getSession()->getPage()->find('css', '.block_settings')) {
$this->getSession()->visit($this->locate_path('/'));
$this->wait(self::TIMEOUT * 1000, self::PAGE_READY_JS);
$this->execute('behat_forms::i_am_on_homepage');
}
// Search by label.
$searchbox = $this->find_field(get_string('searchinsettings', 'admin'));
$searchbox->setValue($label);
$submitsearch = $this->find('css', 'form.adminsearchform input[type=submit]');
$submitsearch->press();
$this->wait(self::TIMEOUT * 1000, self::PAGE_READY_JS);
$this->execute('behat_forms::i_set_the_field_to', [get_string('searchinsettings', 'admin'), $label]);
$this->execute("behat_general::i_click_on_in_the", [get_string('search', 'admin'), 'button', '.block_settings', 'css_element']);
// Admin settings does not use the same DOM structure than other moodle forms
// but we also need to use lib/behat/form_field/* to deal with the different moodle form elements.
@@ -83,35 +77,17 @@ class behat_admin extends behat_base {
"@id=//span[contains(normalize-space(.), $label)]/preceding-sibling::label[1]/@for]";
$fieldnode = $this->find('xpath', $fieldxpath, $exception);
$formfieldtypenode = $this->find('xpath', $fieldxpath . "/ancestor::div[@class='form-setting']" .
"/child::div[contains(concat(' ', @class, ' '), ' form-')]/child::*/parent::div");
} catch (ElementNotFoundException $e) {
// Multi element settings, interacting only the first one.
$fieldxpath = "//*[label[normalize-space(.)= $label]|span[normalize-space(.)= $label]]/" .
"ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' form-item ')]" .
"/descendant::div[@class='form-group']/descendant::*[self::input | self::textarea | self::select]" .
"[not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]";
$fieldnode = $this->find('xpath', $fieldxpath);
// It is the same one that contains the type.
$formfieldtypenode = $fieldnode;
}
// Getting the class which contains the field type.
$classes = explode(' ', $formfieldtypenode->getAttribute('class'));
foreach ($classes as $class) {
if (substr($class, 0, 5) == 'form-') {
$type = substr($class, 5);
}
}
// Instantiating the appropiate field type.
$field = behat_field_manager::get_field_instance($type, $fieldnode, $this->getSession());
$field->set_value($value);
$this->find_button(get_string('savechanges'))->press();
$this->execute('behat_forms::i_set_the_field_with_xpath_to', [$fieldxpath, $value]);
$this->execute("behat_general::i_click_on", [get_string('savechanges'), 'button']);
}
}
@@ -1,57 +1,74 @@
@core @core_admin
Feature: Enable multiple accounts to have the same email address
In order to have multiple accounts registerd on the system with the same email address
@core @core_admin @core_user
Feature: Allowing multiple accounts to have the same email address
In order to manage user accounts
As an admin
I need to enable multiple accounts to be registered with the same email address and verify it is applied
I need to be able to set whether to allow multiple accounts with the same email or not
Background:
Given I log in as "admin"
Scenario: Enable registration of multiple accounts with the same email address
Scenario Outline: Create a user with the same email as an existing user
Given the following config values are set as admin:
| allowaccountssameemail | 1 |
When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
| allowaccountssameemail | <allowsameemail> |
And the following "users" exist:
| username | firstname | lastname | email |
| s1 | John | Doe | s1@example.com |
When I log in as "admin"
And I navigate to "Users > Accounts > Add a new user" in site administration
And I set the following fields to these values:
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
| New password | test@User1 |
| First name | Test |
| Surname | Multi1 |
| Email address | testmultiemailuser@example.com |
| Username | s2 |
| First name | Jane |
| Surname | Doe |
| Email address | <email> |
| New password | test |
And I press "Create user"
And I should see "Test Multi1"
And I press "Add a new user"
And I set the following fields to these values:
| Username | testmultiemailuser2 |
| Choose an authentication method | Manual accounts |
| New password | test@User2 |
| First name | Test |
| Surname | Multi2 |
| Email address | testmultiemailuser@example.com |
And I press "Create user"
Then I should see "Test Multi2"
And I should not see "This email address is already registered"
Then I should <expect> "This email address is already registered."
Scenario: Disable registration of multiple accounts with the same email address
Examples:
| allowsameemail | email | expect |
| 0 | s1@example.com | see |
| 0 | S1@EXAMPLE.COM | see |
| 1 | s1@example.com | not see |
| 1 | S1@EXAMPLE.COM | not see |
Scenario Outline: Update a user with the same email as an existing user
Given the following config values are set as admin:
| allowaccountssameemail | 0 |
When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
And I set the following fields to these values:
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
| New password | test@User1 |
| First name | Test |
| Surname | Multi1 |
| Email address | testmultiemailuser@example.com |
And I press "Create user"
And I should see "Test Multi1"
And I press "Add a new user"
And I set the following fields to these values:
| Username | testmultiemailuser2 |
| Choose an authentication method | Manual accounts |
| New password | test@User2 |
| First name | Test |
| Surname | Multi2 |
| Email address | testmultiemailuser@example.com |
And I press "Create user"
Then I should see "This email address is already registered"
| allowaccountssameemail | <allowsameemail> |
And the following "users" exist:
| username | firstname | lastname | email |
| s1 | John | Doe | s1@example.com |
| s2 | Jane | Doe | s2@example.com |
When I log in as "admin"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I click on "Edit" "link" in the "Jane Doe" "table_row"
And I set the field "Email address" to "<email>"
And I press "Update profile"
Then I should <expect> "This email address is already registered."
Examples:
| allowsameemail | email | expect |
| 0 | s1@example.com | see |
| 0 | S1@EXAMPLE.COM | see |
| 1 | s1@example.com | not see |
| 1 | S1@EXAMPLE.COM | not see |
| 0 | S2@EXAMPLE.COM | not see |
| 1 | S2@EXAMPLE.COM | not see |
Scenario Outline: Update own user profile with the same email as an existing user
Given the following config values are set as admin:
| allowaccountssameemail | <allowsameemail> |
And the following "users" exist:
| username | firstname | lastname | email |
| s1 | John | Doe | s1@example.com |
| s2 | Jane | Doe | s2@example.com |
When I log in as "s2"
And I open my profile in edit mode
And I set the field "Email address" to "<email>"
And I press "Update profile"
Then I should <expect> "This email address is already registered."
Examples:
| allowsameemail | email | expect |
| 0 | s1@example.com | see |
| 0 | S1@EXAMPLE.COM | see |
| 1 | s1@example.com | not see |
| 1 | S1@EXAMPLE.COM | not see |
| 0 | S2@EXAMPLE.COM | not see |
| 1 | S2@EXAMPLE.COM | not see |
+1
View File
@@ -9,6 +9,7 @@ Feature: Manage tokens
| username | password | firstname | lastname |
| testuser | testuser | Joe | Bloggs |
| testuser2 | testuser2 | TestFirstname | TestLastname |
And I change window size to "small"
And I log in as "admin"
And I am on site homepage
@@ -153,6 +153,12 @@ class invalid_analysables implements \renderable, \templatable {
$data->analysables[] = $obj;
}
if (empty($data->analysables)) {
$data->noanalysables = [
'message' => get_string('noinvalidanalysables', 'tool_analytics'),
'announce' => true,
];
}
return $data;
}
}
@@ -247,7 +247,7 @@ class models_list implements \renderable, \templatable {
}
// Clear model.
if (!empty($predictioncontexts)) {
if (!empty($predictioncontexts) || $model->is_trained()) {
$actionid = 'clear-' . $model->get_id();
$PAGE->requires->js_call_amd('tool_analytics/model', 'confirmAction', [$actionid, 'clear']);
$urlparams['action'] = 'clear';
@@ -62,7 +62,7 @@ $string['indicators'] = 'Indicators';
$string['info'] = 'Info';
$string['insights'] = 'Insights';
$string['invalidanalysables'] = 'Invalid site elements';
$string['invalidanalysablesinfo'] = 'This pages lists this site analysable elements that can not be used by this prediction model. The listed elements can not be used neither to train the prediction model nor the prediction model can get predictions for them.';
$string['invalidanalysablesinfo'] = 'This page lists analysable elements that can\'t be used by this prediction model. The listed elements can\'t be used either to train the prediction model nor can the prediction model obtain predictions for them.';
$string['invalidanalysablestable'] = 'Invalid site analysable elements table';
$string['invalidprediction'] = 'Invalid to get predictions';
$string['invalidtraining'] = 'Invalid to train the model';
@@ -75,6 +75,7 @@ $string['nextpage'] = 'Next page';
$string['nodatatoevaluate'] = 'There is no data to evaluate the model';
$string['nodatatopredict'] = 'No new elements to get predictions for';
$string['nodatatotrain'] = 'There is no new data that can be used for training';
$string['noinvalidanalysables'] = 'This site does not contain any invalid analysable element.';
$string['notdefined'] = 'Not yet defined';
$string['pluginname'] = 'Analytic models';
$string['predictionresults'] = 'Prediction results';
@@ -48,31 +48,38 @@
<div class="box">
<h3>{{#str}}modelinvalidanalysables, tool_analytics, {{modelname}}{{/str}}</h3>
<div>{{#str}}invalidanalysablesinfo, tool_analytics{{/str}}</div>
<div class="m-t-2 m-b-1">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
<table class="generaltable fullwidth">
<caption class="accesshide">{{#str}}invalidanalysablestable, tool_analytics{{/str}}</caption>
<thead>
<tr>
<th scope="col">{{#str}}name{{/str}}</th>
<th scope="col">{{#str}}invalidtraining, tool_analytics{{/str}}</th>
<th scope="col">{{#str}}invalidprediction, tool_analytics{{/str}}</th>
</tr>
</thead>
<tbody>
{{#analysables}}
<tr>
<td>{{{url}}}</td>
<td>{{validtraining}}</td>
<td>{{validprediction}}</td>
</tr>
{{/analysables}}
</tbody>
</table>
<div class="m-t-1 m-b-2">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
{{#noanalysables}}
<div class="m-t-2 m-b-1">
{{> core/notification_info}}
</div>
{{/noanalysables}}
{{^noanalysables}}
<div class="m-t-2 m-b-1">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
<table class="generaltable fullwidth">
<caption class="accesshide">{{#str}}invalidanalysablestable, tool_analytics{{/str}}</caption>
<thead>
<tr>
<th scope="col">{{#str}}name{{/str}}</th>
<th scope="col">{{#str}}invalidtraining, tool_analytics{{/str}}</th>
<th scope="col">{{#str}}invalidprediction, tool_analytics{{/str}}</th>
</tr>
</thead>
<tbody>
{{#analysables}}
<tr>
<td>{{{url}}}</td>
<td>{{validtraining}}</td>
<td>{{validprediction}}</td>
</tr>
{{/analysables}}
</tbody>
</table>
<div class="m-t-1 m-b-2">
<span>{{#prev}}{{> core/single_button}}{{/prev}}</span>
<span>{{#next}}{{> core/single_button}}{{/next}}</span>
</div>
{{/noanalysables}}
</div>
+11
View File
@@ -109,6 +109,17 @@ require_once(__DIR__ . '/../../../../lib/behat/lib.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_command.php');
require_once(__DIR__ . '/../../../../lib/behat/classes/behat_config_manager.php');
// Remove error handling overrides done in config.php. This is consistent with admin/tool/behat/cli/util_single_run.php.
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = 1;
error_reporting($CFG->debug);
ini_set('display_errors', '1');
ini_set('log_errors', '1');
// Import the necessary libraries.
require_once($CFG->libdir . '/setuplib.php');
require_once($CFG->libdir . '/behat/classes/util.php');
// For drop option check if parallel site.
if ((empty($options['parallel'])) && ($options['drop']) || $options['updatesteps']) {
$options['parallel'] = behat_config_manager::get_behat_run_config_value('parallel');
+7 -1
View File
@@ -164,6 +164,8 @@ if ($options['install']) {
mtrace("Acceptance tests site installed");
}
// Note: Do not build the themes here. This is done during the 'enable' stage.
} else if ($options['drop']) {
// Ensure no tests are running.
test_lock::acquire('behat');
@@ -182,6 +184,10 @@ if ($options['install']) {
// Enable test mode.
behat_util::start_test_mode($options['add-core-features-to-theme'], $options['optimize-runs'], $parallel, $run);
// Themes are only built in the 'enable' command.
behat_util::build_themes();
mtrace("Testing environment themes built");
// This is only displayed once for parallel install.
if (empty($run)) {
// Notify user that 2.5 profile has been converted to 3.5.
@@ -218,7 +224,7 @@ if ($options['install']) {
// Run behat command to get steps in feature files.
$featurestepscmd = behat_command::get_behat_command(true);
$featurestepscmd .= ' --config ' . behat_config_manager::get_behat_cli_config_filepath();
$featurestepscmd .= ' --dry-run --format=moodle_step_count';
$featurestepscmd .= ' --dry-run --format=moodle_stepcount';
$processes = cli_execute_parallel(array($featurestepscmd), __DIR__ . "/../../../../");
$status = print_update_step_output(array_pop($processes), $behatstepfile);
+3 -3
View File
@@ -162,11 +162,11 @@ class tool_behat_renderer extends plugin_renderer_base {
$html .= $this->output->heading($title);
// Info.
$installurl = behat_command::DOCS_URL . '#Installation';
$installurl = behat_command::DOCS_URL;
$installlink = html_writer::tag('a', $installurl, array('href' => $installurl, 'target' => '_blank'));
$writetestsurl = behat_command::DOCS_URL . '#Writing_features';
$writetestsurl = 'https://docs.moodle.org/dev/Writing acceptance tests';
$writetestslink = html_writer::tag('a', $writetestsurl, array('href' => $writetestsurl, 'target' => '_blank'));
$writestepsurl = behat_command::DOCS_URL . '#Adding_steps_definitions';
$writestepsurl = 'https://docs.moodle.org/dev/Writing_new_acceptance_test_step_definitions';
$writestepslink = html_writer::tag('a', $writestepsurl, array('href' => $writestepsurl, 'target' => '_blank'));
$infos = array(
get_string('installinfo', 'tool_behat', $installlink),
@@ -0,0 +1,27 @@
@tool_behat
Feature: Behat steps for interacting with form work
In order to test my Moodle code
As a developer
I need the Behat steps for form elements to work reliably
@javascript
Scenario: Test fields in containers
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
When I log in as "admin"
And I am on "Course 1" course homepage
# Just get to any form.
And I navigate to "Edit settings" in current page administration
And I set the field "Course full name" in the "General" "fieldset" to "Frog"
And I set the following fields in the "Appearance" "fieldset" to these values:
| Show activity reports | Yes |
| Number of announcements | 1 |
Then the field "Show activity reports" in the "Appearance" "fieldset" matches value "Yes"
And the field "Show activity reports" in the "Appearance" "fieldset" does not match value "No"
And the following fields in the "region-main" "region" match these values:
| Course full name | Frog |
| Number of announcements | 1 |
And the following fields in the "region-main" "region" do not match these values:
| Course full name | Course 1 |
| Number of announcements | 5 |
@@ -0,0 +1,30 @@
@tool_behat
Feature: Verify that the inplace editable field works as expected
In order to use behat step definitions
As a test write
I need to ensure that the inplace editable works in forms
Background:
Given the following "course" exists:
| fullname | Course 1 |
| shortname | C1 |
And the following "activities" exist:
| activity | course | name | idnumber |
| forum | C1 | My first forum | forum1 |
| assign | C1 | My first assignment | assign1 |
| quiz | C1 | My first quiz | quiz1 |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
@javascript
Scenario: Using an inplace editable updates the name of an activity
When I set the field "Edit title" in the "My first assignment" "activity" to "Coursework submission"
Then I should see "Coursework submission"
And I should not see "My first assignment"
But I should see "My first forum"
And I should see "My first quiz"
And I set the field "Edit title" in the "Coursework submission" "activity" to "My first assignment"
And I should not see "Coursework submission"
But I should see "My first assignment"
And I should see "My first forum"
And I should see "My first quiz"
@@ -0,0 +1,42 @@
@tool_behat
Feature: Verify that keyboard steps work as expected
In order to use behat step definitions
As a test writer
I need to verify that the keyboard steps work as expected
@javascript
Scenario: Typing keys into a field causes them to be input
Given the following "users" exist:
| username | email | firstname | lastname | password |
| saffronr | saffron.rutledge@example.com | Saffron | Rutledge | flowerpower |
Given I click on "Log in" "link"
And I click on "Username" "field"
When I type "saffronr"
And I press the tab key
And I type "flowerpower"
And I press enter
Then I should see "You are logged in as Saffron Rutledge"
@javascript
Scenario: Using tab changes focus to the next or previous field
Given I click on "Log in" "link"
And I click on "Username" "field"
And the focused element is "Username" "field"
When I press the tab key
Then the focused element is "Password" "field"
And I press the shift tab key
And the focused element is "Username" "field"
@javascript
Scenario: The escape key can be used to close a dialogue
Given the following "course" exists:
| fullname | C1|
| shortname | C1 |
And I log in as "admin"
And I am on "C1" course homepage
And I navigate to course participants
And I press "Enrol users"
And "Enrol users" "dialogue" should be visible
When I press the escape key
Then "Enrol users" "dialogue" should not be visible
+42
View File
@@ -222,6 +222,48 @@ class api {
}
}
// Clean the legacy role assignments which are stale.
$paramsclean['usercontext'] = CONTEXT_USER;
$paramsclean['component'] = 'tool_cohortroles';
$sql = 'SELECT DISTINCT(ra.id), ra.roleid, ra.userid, ra.contextid, ctx.instanceid
FROM {role_assignments} ra
JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel = :usercontext
JOIN {cohort_members} cm ON cm.userid = ctx.instanceid
LEFT JOIN {tool_cohortroles} tc ON tc.cohortid = cm.cohortid
AND tc.userid = ra.userid
AND tc.roleid = ra.roleid
WHERE ra.component = :component
AND tc.id is null';
if ($candidatelegacyassignments = $DB->get_records_sql($sql, $paramsclean)) {
$sql = 'SELECT DISTINCT(ra.id)
FROM {role_assignments} ra
JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel = :usercontext
JOIN {cohort_members} cm ON cm.userid = ctx.instanceid
JOIN {tool_cohortroles} tc ON tc.cohortid = cm.cohortid AND tc.userid = ra.userid
WHERE ra.component = :component';
if ($currentvalidroleassignments = $DB->get_records_sql($sql, $paramsclean)) {
foreach ($candidatelegacyassignments as $candidate) {
if (!array_key_exists($candidate->id, $currentvalidroleassignments)) {
role_unassign($candidate->roleid, $candidate->userid, $candidate->contextid, 'tool_cohortroles');
$rolesremoved[] = array(
'useridassignedto' => $candidate->userid,
'useridassignedover' => $candidate->instanceid,
'roleid' => $candidate->roleid
);
}
}
} else {
foreach ($candidatelegacyassignments as $candidate) {
role_unassign($candidate->roleid, $candidate->userid, $candidate->contextid, 'tool_cohortroles');
$rolesremoved[] = array(
'useridassignedto' => $candidate->userid,
'useridassignedover' => $candidate->instanceid,
'roleid' => $candidate->roleid
);
}
}
}
return array('rolesadded' => $rolesadded, 'rolesremoved' => $rolesremoved);
}
@@ -103,5 +103,4 @@ class cohort_role_assignment extends persistent {
return true;
}
}
+82 -7
View File
@@ -50,8 +50,6 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
* Setup function- we will create a course and add an assign instance to it.
*/
protected function setUp() {
global $DB;
$this->resetAfterTest(true);
// Create some users.
@@ -133,14 +131,91 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
public function test_delete_cohort_role_assignment() {
$this->setAdminUser();
$params = (object) array(
// Create a cohort role assigment.
$params = (object) [
'userid' => $this->userassignto->id,
'roleid' => $this->roleid,
'cohortid' => $this->cohort->id
);
$result = api::create_cohort_role_assignment($params);
$worked = api::delete_cohort_role_assignment($result->get('id'));
$this->assertTrue($worked);
];
$cohortroleassignment = api::create_cohort_role_assignment($params);
$sync = api::sync_all_cohort_roles();
$rolesadded = [
[
'useridassignedto' => $this->userassignto->id,
'useridassignedover' => $this->userassignover->id,
'roleid' => $this->roleid
]
];
$expected = [
'rolesadded' => $rolesadded,
'rolesremoved' => []
];
$this->assertEquals($sync, $expected);
// Delete the cohort role assigment and confirm the roles are removed.
$result = api::delete_cohort_role_assignment($cohortroleassignment->get('id'));
$this->assertTrue($result);
$sync = api::sync_all_cohort_roles();
$expected = [
'rolesadded' => [],
'rolesremoved' => $rolesadded
];
$this->assertEquals($expected, $sync);
}
/**
* Test case verifying that syncing won't remove role assignments if they are valid for another cohort role assignment.
*/
public function test_delete_cohort_role_assignment_cohorts_having_same_members() {
$this->setAdminUser();
// Create 2 cohorts, with a 1 user (user1) present in both,
// and user2 and user3 members of 1 cohort each.
$cohort1 = $this->getDataGenerator()->create_cohort();
$cohort2 = $this->getDataGenerator()->create_cohort();
$user1 = $this->getDataGenerator()->create_user();
$user2 = $this->getDataGenerator()->create_user();
$user3 = $this->getDataGenerator()->create_user();
cohort_add_member($cohort1->id, $user1->id);
cohort_add_member($cohort1->id, $user2->id);
cohort_add_member($cohort2->id, $user1->id);
cohort_add_member($cohort2->id, $user3->id);
// And a role and a user to assign that role to.
$user4 = $this->getDataGenerator()->create_user(); // A cohort manager, for example.
$roleid = create_role('Role 1', 'myrole', 'test');
// Assign the role for user4 in both cohorts.
$params = (object) [
'userid' => $user4->id,
'roleid' => $roleid,
'cohortid' => $cohort1->id
];
$cohort1roleassignment = api::create_cohort_role_assignment($params);
$params->cohortid = $cohort2->id;
$cohort2roleassignment = api::create_cohort_role_assignment($params);
$sync = api::sync_all_cohort_roles();
// There is no guarantee about the order of roles assigned.
// so confirm we have 3 role assignments, and they are for the users 1, 2 and 3.
$this->assertCount(3, $sync['rolesadded']);
$addedusers = array_column($sync['rolesadded'], 'useridassignedover');
$this->assertContains($user1->id, $addedusers);
$this->assertContains($user2->id, $addedusers);
$this->assertContains($user3->id, $addedusers);
// Remove the role assignment for user4/cohort1.
// Verify only 1 role is unassigned as the others are still valid for the other cohort role assignment.
$result = api::delete_cohort_role_assignment($cohort1roleassignment->get('id'));
$this->assertTrue($result);
$sync = api::sync_all_cohort_roles();
$this->assertCount(0, $sync['rolesadded']);
$this->assertCount(1, $sync['rolesremoved']);
$removedusers = array_column($sync['rolesremoved'], 'useridassignedover');
$this->assertContains($user2->id, $removedusers);
}
public function test_list_cohort_role_assignments() {
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates"],function(a,b,c,d,e,f,g){function h(a){var e={methodname:"tool_dataprivacy_contact_dpo",args:{message:a}},f="success";b.call([e])[0].then(function(a){return a.result?d.get_string("requestsubmitted","tool_dataprivacy"):(f="error",a.warnings.join("<br>"))}).done(function(a){c.addNotification({message:a,type:f})}).fail(c.exception)}var i={CANCEL_REQUEST:'[data-action="cancel"]',CONTACT_DPO:'[data-action="contactdpo"]'},j=function(){this.registerEvents()};return j.prototype.registerEvents=function(){a(i.CANCEL_REQUEST).click(function(g){g.preventDefault();var h=a(this).data("requestid"),i=[{key:"cancelrequest",component:"tool_dataprivacy"},{key:"cancelrequestconfirmation",component:"tool_dataprivacy"}];d.get_strings(i).then(function(a){var d=a[0],g=a[1];return e.create({title:d,body:g,type:e.types.SAVE_CANCEL}).then(function(a){return a.setSaveButtonText(d),a.getRoot().on(f.save,function(){var a={requestid:h},d={methodname:"tool_dataprivacy_cancel_data_request",args:a};b.call([d])[0].done(function(a){a.result?window.location.reload():c.addNotification({message:a.warnings[0].message,type:"error"})}).fail(c.exception)}),a.getRoot().on(f.hidden,function(){a.destroy()}),a})}).done(function(a){a.show()}).fail(c.exception)}),a(i.CONTACT_DPO).click(function(b){b.preventDefault();var i=a(this).data("replytoemail"),j=[{key:"contactdataprotectionofficer",component:"tool_dataprivacy"},{key:"send",component:"tool_dataprivacy"}],k="";d.get_strings(j).then(function(a){var b=a[0];k=a[1];var c={replytoemail:i};return e.create({title:b,body:g.render("tool_dataprivacy/contact_dpo",c),type:e.types.SAVE_CANCEL,large:!0})}).done(function(b){b.setSaveButtonText(k),b.getRoot().on(f.save,function(b){var c=a("#message").val().trim();0===c.length?(b.preventDefault(),a('[data-region="messageinput"]').addClass("has-danger notifyproblem"),a("#id_error_message").removeAttr("hidden")):h(c)}),b.getRoot().on(f.hidden,function(){b.destroy()}),b.show()}).fail(c.exception)})},{init:function(){return new j}}});
define(["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates","core/pending"],function(a,b,c,d,e,f,g,h){function i(a){var e={methodname:"tool_dataprivacy_contact_dpo",args:{message:a}},f="success";b.call([e])[0].then(function(a){return a.result?d.get_string("requestsubmitted","tool_dataprivacy"):(f="error",a.warnings.join("<br>"))}).done(function(a){c.addNotification({message:a,type:f})}).fail(c.exception)}var j={CANCEL_REQUEST:'[data-action="cancel"]',CONTACT_DPO:'[data-action="contactdpo"]'},k=function(){this.registerEvents()};return k.prototype.registerEvents=function(){a(j.CANCEL_REQUEST).click(function(g){g.preventDefault();var h=a(this).data("requestid"),i=[{key:"cancelrequest",component:"tool_dataprivacy"},{key:"cancelrequestconfirmation",component:"tool_dataprivacy"}];d.get_strings(i).then(function(a){var d=a[0],g=a[1];return e.create({title:d,body:g,type:e.types.SAVE_CANCEL}).then(function(a){return a.setSaveButtonText(d),a.getRoot().on(f.save,function(){var a={requestid:h},d={methodname:"tool_dataprivacy_cancel_data_request",args:a};b.call([d])[0].done(function(a){a.result?window.location.reload():c.addNotification({message:a.warnings[0].message,type:"error"})}).fail(c.exception)}),a.getRoot().on(f.hidden,function(){a.destroy()}),a})}).done(function(a){a.show()}).fail(c.exception)}),a(j.CONTACT_DPO).click(function(b){var j=new h("dataprivacy/crud:initModal:contactdpo");b.preventDefault();var k=a(this).data("replytoemail"),l=[{key:"contactdataprotectionofficer",component:"tool_dataprivacy"},{key:"send",component:"tool_dataprivacy"}],m="";d.get_strings(l).then(function(a){var b=a[0];m=a[1];var c={replytoemail:k};return e.create({title:b,body:g.render("tool_dataprivacy/contact_dpo",c),type:e.types.SAVE_CANCEL,large:!0})}).then(function(b){b.setSaveButtonText(m),b.show(),b.getRoot().on(f.save,function(b){var c=a("#message").val().trim();0===c.length?(b.preventDefault(),a('[data-region="messageinput"]').addClass("has-danger notifyproblem"),a("#id_error_message").removeAttr("hidden")):i(c)}),b.getRoot().on(f.hidden,function(){b.destroy()})}).then(j.resolve)["catch"](c.exception)})},{init:function(){return new k}}});
@@ -28,8 +28,9 @@ define([
'core/str',
'core/modal_factory',
'core/modal_events',
'core/templates'],
function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates) {
'core/templates',
'core/pending'],
function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates, Pending) {
/**
* List of action selectors.
@@ -118,6 +119,7 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates) {
});
$(ACTIONS.CONTACT_DPO).click(function(e) {
var pendingPromise = new Pending('dataprivacy/crud:initModal:contactdpo');
e.preventDefault();
var replyToEmail = $(this).data('replytoemail');
@@ -146,9 +148,12 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates) {
type: ModalFactory.types.SAVE_CANCEL,
large: true
});
}).done(function(modal) {
}).then(function(modal) {
modal.setSaveButtonText(sendButtonText);
// Show the modal!
modal.show();
// Handle send event.
modal.getRoot().on(ModalEvents.save, function(e) {
var message = $('#message').val().trim();
@@ -169,9 +174,9 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates) {
modal.destroy();
});
// Show the modal!
modal.show();
}).fail(Notification.exception);
return;
}).then(pendingPromise.resolve)
.catch(Notification.exception);
});
};
@@ -920,9 +920,17 @@ class expired_contexts_manager {
* @return bool
*/
protected static function is_course_context_expired_or_unprotected_for_user(\context $context, \stdClass $user) {
$expiryrecords = self::get_nested_expiry_info_for_courses($context->path);
$info = $expiryrecords[$context->path]->info;
if ($context->get_course_context()->instanceid == SITEID) {
// The is an activity in the site course (front page).
$purpose = data_registry::get_effective_contextlevel_value(CONTEXT_SYSTEM, 'purpose');
$info = static::get_expiry_info($purpose);
} else {
$expiryrecords = self::get_nested_expiry_info_for_courses($context->path);
$info = $expiryrecords[$context->path]->info;
}
if ($info->is_fully_expired()) {
// This context is fully expired.
return true;
@@ -440,6 +440,9 @@ class purpose extends persistent {
}
if (!empty($data->sensitivedatareasons) && is_array($data->sensitivedatareasons)) {
$data->sensitivedatareasons = implode(',', $data->sensitivedatareasons);
} else {
// Nothing selected. Set default value of null.
$data->sensitivedatareasons = null;
}
// A single value.
+23
View File
@@ -276,5 +276,28 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2018051415, 'tool', 'dataprivacy');
}
if ($oldversion < 2018051416) {
// Define field commentsformat to be added to tool_dataprivacy_request.
$table = new xmldb_table('tool_dataprivacy_request');
$field = new xmldb_field('commentsformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'comments');
// Conditionally launch add field commentsformat.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Define field dpocommentformat to be added to tool_dataprivacy_request.
$field = new xmldb_field('dpocommentformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0', 'dpocomment');
// Conditionally launch add field dpocommentformat.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Dataprivacy savepoint reached.
upgrade_plugin_savepoint(true, 2018051416, 'tool', 'dataprivacy');
}
return true;
}
@@ -277,7 +277,7 @@ $string['resubmitrequestasnew'] = 'Resubmit as new request';
$string['resubmitrequest'] = 'Resubmit {$a->type} request for {$a->username}';
$string['resubmittedrequest'] = 'The existing {$a->type} request for {$a->username} was cancelled and resubmitted';
$string['resultdeleted'] = 'You recently requested to have your account and personal data in {$a} to be deleted. This process has been completed and you will no longer be able to log in.';
$string['resultdownloadready'] = 'Your copy of your personal data in {$a} that you recently requested is now available for download. Please click on the link below to go to the download page.';
$string['resultdownloadready'] = 'Your copy of your personal data from {$a} that you recently requested is now available for download from the following link.';
$string['reviewdata'] = 'Review data';
$string['retentionperiod'] = 'Retention period';
$string['retentionperiod_help'] = 'The retention period specifies the length of time that data should be kept for. When the retention period has expired, the data is flagged and listed for deletion, awaiting admin confirmation.';
-10
View File
@@ -15,16 +15,6 @@
overflow-y: scroll;
}
dd a.contactdpo {
/* Reverting dd's left margin */
margin-left: -10px;
}
.card dd a.contactdpo {
/* Reverting dd's left margin */
margin-left: inherit;
}
[data-region="data-requests-table"] .moodle-actionmenu {
min-width: 150px;
}
@@ -137,7 +137,7 @@
}} data-status="{{status}}"{{!
}}>
<td>{{typename}}</td>
<td>{{#userdate}} {{timecreated}}, {{#str}} strftimedatetime {{/str}} {{/userdate}}</td>
<td>{{#userdate}} {{timecreated}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}</td>
<td><a href="{{requestedbyuser.profileurl}}" title="{{#str}}viewprofile{{/str}}">{{requestedbyuser.fullname}}</a></td>
<td>
<span class="label {{statuslabelclass}}" title="{{statuslabeltitle}}">{{statuslabel}}</span>
@@ -67,7 +67,8 @@
<a href="mailto:{{foruser.email}}">{{foruser.email}}</a>
<div class="clearfix m-t-1 m-b-1">
<span class="pull-left m-r-1">
<strong>{{#str}}daterequesteddetail, tool_dataprivacy{{/str}}</strong> {{#userdate}} {{timecreated}}, {{#str}} strftimedatetime {{/str}} {{/userdate}}
<strong>{{#str}}daterequesteddetail, tool_dataprivacy{{/str}}</strong>
{{#userdate}} {{timecreated}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}
</span>
<span class="pull-left m-r-1">
<strong>{{#str}}statusdetail, tool_dataprivacy{{/str}}</strong>
@@ -337,6 +337,11 @@ class tool_dataprivacy_api_testcase extends advanced_testcase {
$datarequest = api::create_data_request($student->id, api::DATAREQUEST_TYPE_EXPORT);
$requestid = $datarequest->get('id');
// Login as a user without DPO role.
$this->setUser($teacher);
$this->expectException(required_capability_exception::class);
api::approve_data_request($requestid);
}
/**
@@ -87,7 +87,7 @@ Feature: Data export from the privacy API
And I reload the page
And I should see "Download ready" in the "Export all of my personal data" "table_row"
And I open the action menu in "Victim User 1" "table_row"
And following "Download" should download between "1" and "130000" bytes
And following "Download" should download between "1" and "144000" bytes
And the following config values are set as admin:
| privacyrequestexpiry | 1 | tool_dataprivacy |
@@ -46,7 +46,7 @@ Feature: Manage data requests
And I open the action menu in "John Doe" "table_row"
And I should see "View the request"
But I should not see "Mark as complete"
And I press key "27" in ".moodle-actionmenu" "css_element"
And I press the escape key
And I open the action menu in "Jane Doe" "table_row"
And I choose "Mark as complete" in the open action menu
And I should see "Do you really want to mark this user enquiry as complete?"
@@ -10,16 +10,12 @@ Feature: Manage data storage purposes
And I open the action menu in "region-main" "region"
And I choose "Purposes" in the open action menu
And I press "Add purpose"
And I set the field "Name" to "Purpose 1"
And I set the field "Description" to "Purpose 1 description"
And I click on ".form-autocomplete-downarrow" "css_element" in the "Lawful bases" "form_row"
And I click on "Contract (GDPR Art. 6.1(b))" "list_item"
And I click on "Legal obligation (GDPR Art 6.1(c))" "list_item"
And I press key "27" in the field "Lawful bases"
And I click on ".form-autocomplete-downarrow" "css_element" in the "Sensitive personal data processing reasons" "form_row"
And I click on "Explicit consent (GDPR Art. 9.2(a))" "list_item"
And I press key "27" in the field "Sensitive personal data processing reasons"
And I set the field "retentionperiodnumber" to "2"
And I set the following fields to these values:
| Name | Purpose 1 |
| Description | Purpose 1 description |
| Lawful bases | Contract (GDPR Art. 6.1(b)),Legal obligation (GDPR Art 6.1(c)) |
| Sensitive personal data processing reasons | Explicit consent (GDPR Art. 9.2(a)) |
| retentionperiodnumber | 2 |
When I press "Save"
Then I should see "Purpose 1" in the "List of data purposes" "table"
And I should see "Contract (GDPR Art. 6.1(b))" in the "Purpose 1" "table_row"
@@ -31,14 +27,13 @@ Feature: Manage data storage purposes
Scenario: Update a data storage purpose
Given I open the action menu in "Purpose 1" "table_row"
And I choose "Edit" in the open action menu
And I set the field "Name" to "Purpose 1 edited"
And I set the field "Description" to "Purpose 1 description edited"
And I click on "Legal obligation (GDPR Art 6.1(c))" "text" in the ".form-autocomplete-selection" "css_element"
And I click on ".form-autocomplete-downarrow" "css_element" in the "Lawful bases" "form_row"
And I click on "Vital interests (GDPR Art. 6.1(d))" "list_item"
And I press key "27" in the field "Lawful bases"
And I set the field "retentionperiodnumber" to "3"
And I click on "protected" "checkbox"
And I set the following fields to these values:
| Name | Purpose 1 edited |
| Description | Purpose 1 description edited |
| Lawful bases | Contract (GDPR Art. 6.1(b)), Vital interests (GDPR Art. 6.1(d)) |
| Sensitive personal data processing reasons | Explicit consent (GDPR Art. 9.2(a)) |
| retentionperiodnumber | 3 |
| protected | 1 |
When I press "Save changes"
Then I should see "Purpose 1 edited" in the "List of data purposes" "table"
And I should see "Purpose 1 description edited" in the "Purpose 1 edited" "table_row"
@@ -2222,6 +2222,40 @@ class tool_dataprivacy_expired_contexts_testcase extends advanced_testcase {
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($blockcontext, $user));
}
/**
* Test the is_context_expired functions when supplied with the front page course.
*/
public function test_is_context_expired_frontpage() {
$this->resetAfterTest();
$purposes = $this->setup_basics('PT1H', 'PT1H', 'P1D');
$frontcourse = get_site();
$frontcoursecontext = \context_course::instance($frontcourse->id);
$sitenews = $this->getDataGenerator()->create_module('forum', ['course' => $frontcourse->id]);
$cm = get_coursemodule_from_instance('forum', $sitenews->id);
$sitenewscontext = \context_module::instance($cm->id);
$user = $this->getDataGenerator()->create_user(['lastaccess' => time() - YEARSECS]);
$this->assertFalse(expired_contexts_manager::is_context_expired($frontcoursecontext));
$this->assertFalse(expired_contexts_manager::is_context_expired($sitenewscontext));
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($frontcoursecontext, $user));
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($sitenewscontext, $user));
// Protecting the course contextlevel does not impact the front page.
$purposes->course->set('protected', 1)->save();
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($frontcoursecontext, $user));
$this->assertTrue(expired_contexts_manager::is_context_expired_or_unprotected_for_user($sitenewscontext, $user));
// Protecting the system contextlevel affects the front page, too.
$purposes->system->set('protected', 1)->save();
$this->assertFalse(expired_contexts_manager::is_context_expired_or_unprotected_for_user($frontcoursecontext, $user));
$this->assertFalse(expired_contexts_manager::is_context_expired_or_unprotected_for_user($sitenewscontext, $user));
}
/**
* Test the is_context_expired functions when supplied with an expired course.
*/
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2018051415;
$plugin->version = 2018051416;
$plugin->requires = 2018050800; // Moodle 3.5dev (Build 2018031600) and upwards.
$plugin->component = 'tool_dataprivacy';
@@ -137,14 +137,14 @@ abstract class restore_tool_log_logstore_subplugin extends restore_subplugin {
}
}
}
// Now we want to serialize it so we can store it in the DB.
$data->other = serialize($data->other);
} else {
$message = "Event class not found: \"$eventclass\". Skipping log record.";
$this->log($message, backup::LOG_DEBUG);
return; // No such class, can not restore.
}
}
// Now we want to serialize it so we can store it in the DB.
$data->other = serialize($data->other);
return $data;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates"],function(a,b,c,d,e,f){var g=function(b){a(b).on("click",this.configureSettings.bind(this))};return g.prototype._dialogue=null,g.prototype.configureSettings=function(e){var g=a(e.target).closest("a").data("courseid"),h=a(e.target).closest("a").data("pushratingstouserplans"),i={courseid:g,settings:{pushratingstouserplans:h}};e.preventDefault(),f.render("tool_lp/course_competency_settings",i).done(function(a){d.get_string("configurecoursecompetencysettings","tool_lp").done(function(b){this._dialogue=new c(b,a,this.addListeners.bind(this))}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},g.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},g.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},g.prototype.saveSettings=function(a){a.preventDefault();var c=this._find('input[name="pushratingstouserplans"]:checked').val(),d=this._find('input[name="courseid"]').val(),f={pushratingstouserplans:c};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:d,settings:f}}])[0].done(function(){this.refreshCourseCompetenciesPage()}.bind(this)).fail(b.exception)},g.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val();e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c}}])[0].done(function(c){f.render("tool_lp/course_competencies_page",c).done(function(b,c){a('[data-region="coursecompetenciespage"]').replaceWith(b),f.runTemplateJS(c),this._dialogue.close()}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g});
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates","core/pending"],function(a,b,c,d,e,f,g){var h=function(b){a(b).on("click",this.configureSettings.bind(this))};return h.prototype._dialogue=null,h.prototype.configureSettings=function(e){var h=new g,i=a(e.target).closest("a").data("courseid"),j=a(e.target).closest("a").data("pushratingstouserplans"),k={courseid:i,settings:{pushratingstouserplans:j}};e.preventDefault(),a.when(d.get_string("configurecoursecompetencysettings","tool_lp"),f.render("tool_lp/course_competency_settings",k)).then(function(a,b){return this._dialogue=new c(a,b[0],this.addListeners.bind(this)),this._dialogue}.bind(this)).then(h.resolve)["catch"](b.exception)},h.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},h.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},h.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},h.prototype.saveSettings=function(a){var c=new g;a.preventDefault();var d=this._find('input[name="pushratingstouserplans"]:checked').val(),f=this._find('input[name="courseid"]').val(),h={pushratingstouserplans:d};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:f,settings:h}}])[0].then(function(){return this.refreshCourseCompetenciesPage()}.bind(this)).then(c.resolve)["catch"](b.exception)},h.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val(),d=new g;e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c}}])[0].then(function(a){return f.render("tool_lp/course_competencies_page",a)}).then(function(b,c){f.replaceNode(a('[data-region="coursecompetenciespage"]'),b,c),this._dialogue.close()}.bind(this)).then(d.resolve)["catch"](b.exception)},h});
+1 -1
View File
@@ -1 +1 @@
define(["core/yui"],function(a){var b=function(b,c,d,e,f){this.yuiDialogue=null;var g=this;"undefined"==typeof f&&(f=!1),a.use("moodle-core-notification","timers",function(){var h="480px";f&&(h="800px"),g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h}),g.yuiDialogue.after("visibleChange",function(b){b.newVal?"undefined"!=typeof d&&a.soon(function(){d(g),g.yuiDialogue.centerDialogue()}):"undefined"!=typeof e&&a.soon(function(){e(g)})}),g.yuiDialogue.show()})};return b.prototype.close=function(){this.yuiDialogue.hide(),this.yuiDialogue.destroy()},b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()},b});
define(["core/yui"],function(a){var b=function(b,c,d,e,f){M.util.js_pending("tool_lp/dialogue:dialogue"),this.yuiDialogue=null;var g=this;"undefined"==typeof f&&(f=!1),a.use("moodle-core-notification","timers",function(){var h="480px";f&&(h="800px"),g.yuiDialogue=new M.core.dialogue({headerContent:b,bodyContent:c,draggable:!0,visible:!1,center:!0,modal:!0,width:h}),g.yuiDialogue.before("visibleChange",function(){M.util.js_pending("tool_lp/dialogue:before:visibleChange")}),g.yuiDialogue.after("visibleChange",function(b){b.newVal?"undefined"!=typeof d?a.soon(function(){d(g),g.yuiDialogue.centerDialogue(),M.util.js_complete("tool_lp/dialogue:before:visibleChange")}):M.util.js_complete("tool_lp/dialogue:before:visibleChange"):"undefined"!=typeof e?a.soon(function(){e(g),M.util.js_complete("tool_lp/dialogue:before:visibleChange")}):M.util.js_complete("tool_lp/dialogue:before:visibleChange")}),g.yuiDialogue.show(),M.util.js_complete("tool_lp/dialogue:dialogue")})};return b.prototype.close=function(){this.yuiDialogue.hide(),this.yuiDialogue.destroy()},b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()},b});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]),this._ratingOptions=a};return g.prototype=Object.create(e.prototype),g.prototype._popup=null,g.prototype._ratingOptions=null,g.prototype._afterRender=function(){var b=this._find('[data-action="rate"]'),c=this._find('[name="rating"]'),d=this._find('[name="comment"]');this._find('[data-action="cancel"]').click(function(a){a.preventDefault(),this._trigger("cancelled"),this.close()}.bind(this)),c.change(function(){var c=a(this);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(this._trigger("rated",{rating:b,note:d.val()}),this.close())}.bind(this))},g.prototype.close=function(){this._popup.close(),this._popup=null},g.prototype.display=function(){return this._render().then(function(a){return f.get_string("rate","tool_lp").then(function(b){this._popup=new d(b,a,this._afterRender.bind(this))}.bind(this))}.bind(this)).fail(b.exception)},g.prototype._find=function(b){return a(this._popup.getContent()).find(b)},g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)},g});
define(["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]),this._ratingOptions=a};return g.prototype=Object.create(e.prototype),g.prototype._popup=null,g.prototype._ratingOptions=null,g.prototype._afterRender=function(){var b=this._find('[data-action="rate"]'),c=this._find('[name="rating"]'),d=this._find('[name="comment"]');this._find('[data-action="cancel"]').click(function(a){a.preventDefault(),this._trigger("cancelled"),this.close()}.bind(this)),c.change(function(){var c=a(this);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(this._trigger("rated",{rating:b,note:d.val()}),this.close())}.bind(this))},g.prototype.close=function(){this._popup.close(),this._popup=null},g.prototype.display=function(){return M.util.js_pending("tool_lp/grade_dialogue:display"),a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){return this._popup=new d(a,b[0],function(){this._afterRender(),M.util.js_complete("tool_lp/grade_dialogue:display")}.bind(this)),this._popup}.bind(this))["catch"](b.exception)},g.prototype._find=function(b){return a(this._popup.getContent()).find(b)},g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)},g});
@@ -1 +1 @@
define(["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length)throw new Error("Could not find the trigger");this._scaleId=c,this._competencyId=d,this._userId=e,this._planId=g,this._courseId=h,this._chooseStr=i,this._setUp(),j.click(function(a){a.preventDefault(),this._dialogue.display()}.bind(this)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return h.prototype=Object.create(f.prototype),h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.done(function(f){a.push({value:"",name:d._chooseStr});for(var g=0;g<f.length;g++){var h=f[g];a.push({value:h.id,name:h.name})}d._dialogue=new e(a),d._dialogue.on("rated",function(a,e){var f=d._args;f.grade=e.rating,f.note=e.note,c.call([{methodname:d._methodName,args:f,done:function(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])})}).fail(b.exception)},h.prototype._scaleId=null,h.prototype._competencyId=null,h.prototype._userId=null,h.prototype._planId=null,h.prototype._courseId=null,h.prototype._chooseStr=null,h.prototype._dialogue=null,h});
define(["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length)throw new Error("Could not find the trigger");this._scaleId=c,this._competencyId=d,this._userId=e,this._planId=g,this._courseId=h,this._chooseStr=i,this._setUp(),j.click(function(a){a.preventDefault(),this._dialogue.display()}.bind(this)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return h.prototype=Object.create(f.prototype),h.prototype._setUp=function(){var a=[],d=this;M.util.js_pending("tool_lp/grade_user_competency_inline:_setUp");var f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0;c<b.length;c++){var e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){return a.on("rated",function(a,e){var f=d._args;f.grade=e.rating,f.note=e.note,c.call([{methodname:d._methodName,args:f,done:function(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])}),a}).then(function(a){d._dialogue=a,M.util.js_complete("tool_lp/grade_user_competency_inline:_setUp")}).fail(b.exception)},h.prototype._scaleId=null,h.prototype._competencyId=null,h.prototype._userId=null,h.prototype._planId=null,h.prototype._courseId=null,h.prototype._chooseStr=null,h.prototype._dialogue=null,h});
+28 -15
View File
@@ -27,8 +27,9 @@ define(['jquery',
'core/templates',
'core/str',
'tool_lp/competencypicker',
'tool_lp/dragdrop-reorder'],
function($, notification, ajax, templates, str, Picker, dragdrop) {
'tool_lp/dragdrop-reorder',
'core/pending'],
function($, notification, ajax, templates, str, Picker, dragdrop, Pending) {
/**
* Constructor
@@ -117,6 +118,7 @@ define(['jquery',
* Pick a competency
*
* @method pickCompetency
* @return {Promise}
*/
competencies.prototype.pickCompetency = function() {
var self = this;
@@ -132,6 +134,7 @@ define(['jquery',
self.pickerInstance = new Picker(self.pageContextId, false, pageContextIncludes);
self.pickerInstance.on('save', function(e, data) {
var compIds = data.competencyIds;
var pendingPromise = new Pending();
if (self.itemtype === "course") {
requests = [];
@@ -181,17 +184,20 @@ define(['jquery',
pagerender = 'tool_lp/plan_page';
pageregion = 'plan-page';
}
ajax.call(requests)[requests.length - 1].then(function(context) {
ajax.call(requests)[requests.length - 1]
.then(function(context) {
return templates.render(pagerender, context);
}).then(function(html, js) {
$('[data-region="' + pageregion + '"]').replaceWith(html);
templates.runTemplateJS(js);
})
.then(function(html, js) {
templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
return;
}).catch(notification.exception);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
self.pickerInstance.display();
return self.pickerInstance.display();
};
/**
@@ -302,6 +308,7 @@ define(['jquery',
if (localthis.itemtype == 'course') {
// Course completion rule handling.
$('[data-region="coursecompetenciespage"]').on('change', 'select[data-field="ruleoutcome"]', function(e) {
var pendingPromise = new Pending();
var requests = [];
var pagerender = 'tool_lp/course_competencies_page';
var pageregion = 'coursecompetenciespage';
@@ -314,18 +321,24 @@ define(['jquery',
args: {courseid: localthis.itemid}}
]);
requests[1].done(function(context) {
templates.render(pagerender, context).done(function(html, js) {
$('[data-region="' + pageregion + '"]').replaceWith(html);
templates.runTemplateJS(js);
}).fail(notification.exception);
}).fail(notification.exception);
requests[1].then(function(context) {
return templates.render(pagerender, context);
})
.then(function(html, js) {
return templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
$('[data-region="actions"] button').click(function(e) {
var pendingPromise = new Pending();
e.preventDefault();
localthis.pickCompetency();
localthis.pickCompetency()
.then(pendingPromise.resolve)
.catch();
});
$('[data-action="delete-competency-link"]').click(function(e) {
e.preventDefault();
+10 -3
View File
@@ -33,8 +33,12 @@ define(['jquery',
'tool_lp/menubar',
'tool_lp/competencypicker',
'tool_lp/competency_outcomes',
'tool_lp/competencyruleconfig'],
function($, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig) {
'tool_lp/competencyruleconfig',
'core/pending',
],
function(
$, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig, Pending
) {
// Private variables and functions.
/** @var {Object} treeModel - This is an object representing the nodes in the tree. */
@@ -412,6 +416,7 @@ define(['jquery',
if (!pickerInstance) {
pickerInstance = new Picker(pageContextId, relatedTarget.competencyframeworkid);
pickerInstance.on('save', function(e, data) {
var pendingPromise = new Pending();
var compIds = data.competencyIds;
var calls = [];
@@ -436,7 +441,9 @@ define(['jquery',
templates.runTemplateJS(js);
updatedRelatedCompetencies();
return;
}).catch(notification.exception);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
+8 -2
View File
@@ -31,8 +31,10 @@ define(['jquery',
'core/templates',
'tool_lp/dialogue',
'core/str',
'tool_lp/tree'],
function($, Notification, Ajax, Templates, Dialogue, Str, Tree) {
'tool_lp/tree',
'core/pending'
],
function($, Notification, Ajax, Templates, Dialogue, Str, Tree, Pending) {
/**
* Competency picker class.
@@ -157,6 +159,7 @@ define(['jquery',
// Add listener for add.
self._find('[data-region="competencylinktree"] [data-action="add"]').click(function(e) {
e.preventDefault();
var pendingPromise = new Pending();
if (!self._selectedCompetencies.length) {
return;
}
@@ -168,7 +171,10 @@ define(['jquery',
self._trigger('save', {competencyId: self._selectedCompetencies[0]});
}
// The dialogue here is a YUI dialogue and doesn't support Promises at all.
// However, it is typically synchronous so this shoudl suffice.
self.close();
pendingPromise.resolve();
});
// The list of selected competencies will be modified while looping (because of the listeners above).
@@ -26,8 +26,10 @@ define(['jquery',
'tool_lp/dialogue',
'core/str',
'core/ajax',
'core/templates'],
function($, notification, Dialogue, str, ajax, templates) {
'core/templates',
'core/pending'
],
function($, notification, Dialogue, str, ajax, templates, Pending) {
/**
* Constructor
@@ -48,6 +50,7 @@ define(['jquery',
* @method configureSettings
*/
settingsMod.prototype.configureSettings = function(e) {
var pendingPromise = new Pending();
var courseid = $(e.target).closest('a').data('courseid');
var currentValue = $(e.target).closest('a').data('pushratingstouserplans');
var context = {
@@ -56,16 +59,21 @@ define(['jquery',
};
e.preventDefault();
templates.render('tool_lp/course_competency_settings', context).done(function(html) {
str.get_string('configurecoursecompetencysettings', 'tool_lp').done(function(title) {
this._dialogue = new Dialogue(
title,
html,
this.addListeners.bind(this)
);
}.bind(this)).fail(notification.exception);
}.bind(this)).fail(notification.exception);
$.when(
str.get_string('configurecoursecompetencysettings', 'tool_lp'),
templates.render('tool_lp/course_competency_settings', context)
)
.then(function(title, templateResult) {
this._dialogue = new Dialogue(
title,
templateResult[0],
this.addListeners.bind(this)
);
return this._dialogue;
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
/**
@@ -108,6 +116,7 @@ define(['jquery',
* @method saveSettings
*/
settingsMod.prototype.saveSettings = function(e) {
var pendingPromise = new Pending();
e.preventDefault();
var newValue = this._find('input[name="pushratingstouserplans"]:checked').val();
@@ -117,9 +126,12 @@ define(['jquery',
ajax.call([
{methodname: 'core_competency_update_course_competency_settings',
args: {courseid: courseId, settings: settings}}
])[0].done(function() {
this.refreshCourseCompetenciesPage();
}.bind(this)).fail(notification.exception);
])[0]
.then(function() {
return this.refreshCourseCompetenciesPage();
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
@@ -131,18 +143,23 @@ define(['jquery',
*/
settingsMod.prototype.refreshCourseCompetenciesPage = function() {
var courseId = this._find('input[name="courseid"]').val();
var pendingPromise = new Pending();
ajax.call([
{methodname: 'tool_lp_data_for_course_competencies_page',
args: {courseid: courseId}}
])[0].done(function(context) {
templates.render('tool_lp/course_competencies_page', context).done(function(html, js) {
$('[data-region="coursecompetenciespage"]').replaceWith(html);
templates.runTemplateJS(js);
this._dialogue.close();
}.bind(this)).fail(notification.exception);
}.bind(this)).fail(notification.exception);
])[0]
.then(function(context) {
return templates.render('tool_lp/course_competencies_page', context);
})
.then(function(html, js) {
templates.replaceNode($('[data-region="coursecompetenciespage"]'), html, js);
this._dialogue.close();
return;
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
return /** @alias module:tool_lp/configurecoursecompetencysettings */ settingsMod;
+13
View File
@@ -35,6 +35,8 @@ define(['core/yui'], function(Y) {
* @param {Boolean} wide Specify we want an extra wide dialogue (the size is standard, but wider than the default).
*/
var dialogue = function(title, content, afterShow, afterHide, wide) {
M.util.js_pending('tool_lp/dialogue:dialogue');
this.yuiDialogue = null;
var parent = this;
@@ -59,6 +61,10 @@ define(['core/yui'], function(Y) {
width: width
});
parent.yuiDialogue.before('visibleChange', function() {
M.util.js_pending('tool_lp/dialogue:before:visibleChange');
});
parent.yuiDialogue.after('visibleChange', function(e) {
if (e.newVal) {
// Delay the callback call to the next tick, otherwise it can happen that it is
@@ -67,18 +73,25 @@ define(['core/yui'], function(Y) {
Y.soon(function() {
afterShow(parent);
parent.yuiDialogue.centerDialogue();
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
});
} else {
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
}
} else {
if ((typeof afterHide !== 'undefined')) {
Y.soon(function() {
afterHide(parent);
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
});
} else {
M.util.js_complete('tool_lp/dialogue:before:visibleChange');
}
}
});
parent.yuiDialogue.show();
M.util.js_complete('tool_lp/dialogue:dialogue');
});
};
+18 -9
View File
@@ -102,15 +102,24 @@ define(['jquery',
* @return {Promise}
*/
Grade.prototype.display = function() {
return this._render().then(function(html) {
return Str.get_string('rate', 'tool_lp').then(function(title) {
this._popup = new Dialogue(
title,
html,
this._afterRender.bind(this)
);
}.bind(this));
}.bind(this)).fail(Notification.exception);
M.util.js_pending('tool_lp/grade_dialogue:display');
return $.when(
Str.get_string('rate', 'tool_lp'),
this._render()
)
.then(function(title, templateResult) {
this._popup = new Dialogue(
title,
templateResult[0],
function() {
this._afterRender();
M.util.js_complete('tool_lp/grade_dialogue:display');
}.bind(this)
);
return this._popup;
}.bind(this))
.catch(Notification.exception);
};
/**
@@ -94,8 +94,9 @@ define(['jquery',
var options = [],
self = this;
M.util.js_pending('tool_lp/grade_user_competency_inline:_setUp');
var promise = ScaleValues.get_values(self._scaleId);
promise.done(function(scalevalues) {
promise.then(function(scalevalues) {
options.push({
value: '',
name: self._chooseStr
@@ -109,8 +110,13 @@ define(['jquery',
});
}
self._dialogue = new GradeDialogue(options);
self._dialogue.on('rated', function(e, data) {
return options;
})
.then(function(options) {
return new GradeDialogue(options);
})
.then(function(dialogue) {
dialogue.on('rated', function(e, data) {
var args = self._args;
args.grade = data.rating;
args.note = data.note;
@@ -123,7 +129,16 @@ define(['jquery',
fail: notification.exception
}]);
});
}).fail(notification.exception);
return dialogue;
})
.then(function(dialogue) {
self._dialogue = dialogue;
M.util.js_complete('tool_lp/grade_user_competency_inline:_setUp');
return;
})
.fail(notification.exception);
};
/** @type {Number} The scale id for this competency. */
+1
View File
@@ -422,6 +422,7 @@ class external extends external_api {
'comppath' => competency_path_exporter::get_read_structure(),
))),
'manageurl' => new external_value(PARAM_LOCALURL, 'Url to the manage competencies page.'),
'pluginbaseurl' => new external_value(PARAM_LOCALURL, 'Url to the course competencies page.'),
));
}
@@ -113,6 +113,7 @@ class course_competencies_page implements renderable, templatable {
$data->courseid = $this->courseid;
$data->pagecontextid = $this->context->id;
$data->competencies = array();
$data->pluginbaseurl = (new moodle_url('/admin/tool/lp'))->out(true);
$gradable = is_enrolled($this->context, $USER, 'moodle/competency:coursecompetencygradable');
if ($gradable) {
@@ -66,7 +66,7 @@
<div class="clearfix"></div>
{{/canmanagecoursecompetencies}}
{{#competency}}
<a href="{{pluginbaseurl}}user_competency_in_course.php?courseid={{courseid}}&competencyid={{competency.id}}&userid={{gradableuserid}}"
<a href="{{pluginbaseurl}}/user_competency_in_course.php?courseid={{courseid}}&competencyid={{competency.id}}&userid={{gradableuserid}}"
id="competency-info-link-{{competency.id}}"
title="{{#str}}viewdetails, tool_lp{{/str}}">
<p><strong>{{{competency.shortname}}} <em>{{competency.idnumber}}</em></strong></p>
@@ -6,6 +6,7 @@ Feature: Manage competency frameworks
Background:
Given I log in as "admin"
And I change window size to "small"
And I am on site homepage
Scenario: Create a new framework
+2 -4
View File
@@ -30,7 +30,7 @@ Feature: Manage plearning plan
And I click on ".template-userplans" "css_element" in the "Science template" "table_row"
And I open the autocomplete suggestions list
And I click on "Admin User" item in the autocomplete list
And I press key "27" in the field "Select users to create learning plans for"
And I press the escape key
When I click on "Create learning plans" "button"
Then I should see "A learning plan was created"
And I should see "Admin User" in the "Science template" "table_row"
@@ -53,9 +53,7 @@ Feature: Manage plearning plan
And I follow "Home"
And I navigate to "Competencies > Learning plan templates" in site administration
And I click on ".template-cohorts" "css_element" in the "Science template cohort" "table_row"
And I click on ".form-autocomplete-downarrow" "css_element"
And I click on "cohort plan" item in the autocomplete list
And I press key "27" in the field "Select cohorts to sync"
And I set the field "Select cohorts to sync" to "cohort plan"
When I click on "Add cohorts" "button"
Then I should see "2 learning plans were created."
And I follow "Learning plan templates"
@@ -6,6 +6,7 @@ Feature: Manage plearning plan templates
Background:
Given I log in as "admin"
And I change window size to "small"
And I am on site homepage
Scenario: Create a new learning plan template
+1 -1
View File
@@ -116,7 +116,7 @@ class tool_lp_external_testcase extends externallib_advanced_testcase {
$this->userrole = create_role('User role', 'lpuserrole', 'learning plan user role description');
assign_capability('moodle/competency:competencymanage', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:competencycompetencyconfigure', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:coursecompetencyconfigure', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:planmanage', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:planmanagedraft', CAP_ALLOW, $this->creatorrole, $syscontext->id);
assign_capability('moodle/competency:planmanageown', CAP_ALLOW, $this->creatorrole, $syscontext->id);
@@ -274,7 +274,6 @@ class framework_importer {
// We are calling from browser, display progress bar.
if ($this->useprogressbar === true) {
$this->progress = new \core\progress\display_if_slow(get_string('processingfile', 'tool_lpimportcsv'));
$this->progress->start_html();
} else {
// Avoid html output on CLI scripts.
$this->progress = new \core\progress\none();
@@ -464,7 +463,6 @@ class framework_importer {
$framework = api::create_framework($record);
if ($this->useprogressbar === true) {
$this->progress = new \core\progress\display_if_slow(get_string('importingfile', 'tool_lpimportcsv'));
$this->progress->start_html();
} else {
$this->progress = new \core\progress\none();
}
@@ -672,7 +672,7 @@ class manager {
$attachment->charset = $partdata->getCharset();
$attachment->description = $partdata->getDescription();
$attachment->contentid = $partdata->getContentId();
$attachment->filesize = $messagedata->getBodyPartSize($part);
$attachment->filesize = $partdata->getBytes();
if (!empty($CFG->antiviruses)) {
mtrace("--> Attempting virus scan of '{$attachment->filename}'");
@@ -109,7 +109,7 @@ $string['sslv3'] = 'SSLv2 (Force SSL Version 3)';
$string['taskcleanup'] = 'Cleanup of unverified incoming email';
$string['taskpickup'] = 'Incoming email pickup';
$string['tls'] = 'TLS (TLS; started via protocol-level negotiation over unencrypted channel; RECOMMENDED way of initiating secure connection)';
$string['tlsv1'] = 'TLSv1 (TLS direct version 1.x connection to server)';
$string['tlsv1'] = 'TLSv1 (direct connection to TLS server version 1.x)';
$string['validateaddress'] = 'Validate sender email address';
$string['validateaddress_help'] = 'When a message is received from a user, Moodle attempts to validate the message by comparing the email address of the sender with the email address in their user profile.
+1 -1
View File
@@ -99,7 +99,7 @@ class api {
$lang = array();
if (!empty($addoninfo['lang'])) {
$stringmanager = get_string_manager();
$langs = $stringmanager->get_list_of_translations();
$langs = $stringmanager->get_list_of_translations(true);
foreach ($langs as $langid => $langname) {
foreach ($addoninfo['lang'] as $stringinfo) {
$lang[$langid][$stringinfo[0]] =
+1 -1
View File
@@ -30,7 +30,7 @@ require_once($CFG->libdir . '/externallib.php');
$serviceshortname = required_param('service', PARAM_ALPHANUMEXT);
$passport = required_param('passport', PARAM_RAW); // Passport send from the app to validate the response URL.
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_NOTAGS); // The URL scheme the app supports.
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_ALPHANUM); // The URL scheme the app supports.
$confirmed = optional_param('confirmed', false, PARAM_BOOL); // If we are being redirected after user confirmation.
$oauthsso = optional_param('oauthsso', 0, PARAM_INT); // Id of the OpenID issuer (for OAuth direct SSO).
+6
View File
@@ -66,6 +66,12 @@ function tool_mobile_create_app_download_url() {
}
$downloadurl = new moodle_url($mobilesettings->setuplink);
// Do not update the URL if it is a custom one (we may break it completely).
if ($mobilesettings->setuplink != 'https://download.moodle.org/mobile') {
return $downloadurl;
}
$downloadurl->param('version', $CFG->version);
$downloadurl->param('lang', current_language());
+1 -1
View File
@@ -63,7 +63,7 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_NOTAGS));
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_ALPHANUM));
$ADMIN->add('mobileapp', $temp);
+5 -5
View File
@@ -64,11 +64,11 @@ $string['managerules'] = 'Event monitoring rules';
$string['messageprovider:notification'] = 'Notifications of rule subscriptions';
$string['messagetemplate'] = 'Notification message';
$string['messagetemplate_help'] = 'A notification message is sent to subscribers once the notification threshold has been reached. It can include any or all of the following placeholders:
<br /><br />
* Link to the location of the event {link}<br />
* Link to the area monitored {modulelink}<br />
* Rule name {rulename}<br />
* Description {description}<br />
* Link to the location of the event {link}
* Link to the area monitored {modulelink}
* Rule name {rulename}
* Description {description}
* Event {eventname}';
$string['messagetemplate_link'] = 'admin/tool/monitor/managerules';
$string['moduleinstance'] = 'Instance';
+2 -1
View File
@@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
use \tool_monitor\privacy\provider;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\approved_userlist;
use \core_privacy\tests\provider_testcase;
/**
* Privacy test for the event monitor
@@ -37,7 +38,7 @@ use \core_privacy\local\request\approved_userlist;
* @copyright 2018 Adrian Greeve <adriangreeve.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_monitor_privacy_testcase extends advanced_testcase {
class tool_monitor_privacy_testcase extends provider_testcase {
/**
* Set up method.
+6 -3
View File
@@ -123,9 +123,12 @@ class issuer extends persistent {
$mform->addElement('checkbox', 'showonloginpage', get_string('issuershowonloginpage', 'tool_oauth2'));
$mform->addHelpButton('showonloginpage', 'issuershowonloginpage', 'tool_oauth2');
// Require confirmation email for new accounts.
$mform->addElement('advcheckbox', 'requireconfirmation', get_string('issuerrequireconfirmation', 'tool_oauth2'));
$mform->addHelpButton('requireconfirmation', 'issuerrequireconfirmation', 'tool_oauth2');
$showrequireconfirm = $this->_customdata['showrequireconfirm'] ?? false;
if ($showrequireconfirm) {
// Require confirmation email for new accounts.
$mform->addElement('advcheckbox', 'requireconfirmation', get_string('issuerrequireconfirmation', 'tool_oauth2'));
$mform->addHelpButton('requireconfirmation', 'issuerrequireconfirmation', 'tool_oauth2');
}
$mform->addElement('hidden', 'sortorder');
$mform->setType('sortorder', PARAM_INT);
+33 -5
View File
@@ -58,7 +58,25 @@ if ($action == 'edit') {
$PAGE->navbar->add(get_string('createnewissuer', 'tool_oauth2'));
}
$mform = new \tool_oauth2\form\issuer(null, ['persistent' => $issuer]);
if (!empty($issuerid)) {
// Show the "Require confirmation email" checkbox for trusted issuers like Google, Facebook and Microsoft.
$likefacebook = $DB->sql_like('url', ':facebook');
$likegoogle = $DB->sql_like('url', ':google');
$likemicrosoft = $DB->sql_like('url', ':microsoft');
$params = [
'issuerid' => $issuerid,
'facebook' => '%facebook%',
'google' => '%google%',
'microsoft' => '%microsoft%',
];
$select = "issuerid = :issuerid AND ($likefacebook OR $likegoogle OR $likemicrosoft)";
// We're querying from the oauth2_endpoint table because the base URLs of FB and Microsoft can be empty in the issuer table.
$showrequireconfirm = $DB->record_exists_select('oauth2_endpoint', $select, $params);
} else {
$showrequireconfirm = optional_param('showrequireconfirm', false, PARAM_BOOL);
}
$mform = new \tool_oauth2\form\issuer(null, ['persistent' => $issuer, 'showrequireconfirm' => $showrequireconfirm]);
}
if ($mform && $mform->is_cancelled()) {
@@ -157,21 +175,31 @@ if ($mform && $mform->is_cancelled()) {
$issuers = core\oauth2\api::get_all_issuers();
echo $renderer->issuers_table($issuers);
// Google template.
$docs = 'admin/tool/oauth2/issuers/google';
$params = ['action' => 'edittemplate', 'type' => 'google', 'sesskey' => sesskey(), 'docslink' => $docs];
$params = ['action' => 'edittemplate', 'type' => 'google', 'sesskey' => sesskey(), 'docslink' => $docs,
'showrequireconfirm' => true];
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', $params);
echo $renderer->single_button($addurl, get_string('createnewgoogleissuer', 'tool_oauth2'));
// Microsoft template.
$docs = 'admin/tool/oauth2/issuers/microsoft';
$params = ['action' => 'edittemplate', 'type' => 'microsoft', 'sesskey' => sesskey(), 'docslink' => $docs];
$params = ['action' => 'edittemplate', 'type' => 'microsoft', 'sesskey' => sesskey(), 'docslink' => $docs,
'showrequireconfirm' => true];
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', $params);
echo $renderer->single_button($addurl, get_string('createnewmicrosoftissuer', 'tool_oauth2'));
// Facebook template.
$docs = 'admin/tool/oauth2/issuers/facebook';
$params = ['action' => 'edittemplate', 'type' => 'microsoft', 'sesskey' => sesskey(), 'docslink' => $docs];
$params = ['action' => 'edittemplate', 'type' => 'facebook', 'sesskey' => sesskey(), 'docslink' => $docs];
$params = ['action' => 'edittemplate', 'type' => 'facebook', 'sesskey' => sesskey(), 'docslink' => $docs,
'showrequireconfirm' => true];
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', $params);
echo $renderer->single_button($addurl, get_string('createnewfacebookissuer', 'tool_oauth2'));
// Generic issuer.
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', ['action' => 'edit']);
echo $renderer->single_button($addurl, get_string('createnewissuer', 'tool_oauth2'));
echo $OUTPUT->footer();
}
+6 -5
View File
@@ -131,11 +131,12 @@ if ($execute) {
tool_phpunit_problem('Can not create configuration file');
}
}
$configdir = escapeshellarg($configdir);
// no cleanup of path - this is tricky because we can not use escapeshellarg and friends for escaping,
// this is from admin user so PARAM_PATH must be enough
chdir($CFG->dirroot);
passthru("php $CFG->admin/tool/phpunit/cli/util.php --run -c $configdir $testclass $testpath", $code);
$configdir = escapeshellarg($configdir);
$cleanclass = escapeshellarg($testclass);
$cleanpath = escapeshellarg($testpath);
passthru("php $CFG->admin/tool/phpunit/cli/util.php --run -c $configdir $cleanclass $cleanpath", $code);
chdir($oldcwd);
echo '</pre>';
@@ -146,7 +147,7 @@ if ($execute) {
}
echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter');
echo '<form method="get" action="webrunner.php">';
echo '<form method="post" action="webrunner.php">';
echo '<fieldset class="invisiblefieldset">';
echo '<label for="testpath">Test one file</label> ';
echo '<input type="text" id="testpath" name="testpath" value="'.s($testpath).'" size="50" /> (all test cases from webrunner.xml if empty)';
@@ -1 +1 @@
define(["jquery","core/ajax","core/notification"],function(a,b,c){return{list:function(b,c){var d=[],e=a(b),f=a(b).data("originaloptionsjson"),g=e.val();a.each(f,function(b,e){return""!==a.trim(c)&&e.label.toLocaleLowerCase().indexOf(c.toLocaleLowerCase())===-1||(a.inArray(e.value,g)>-1||(d.push(e),!0))});var h=new a.Deferred;return h.resolve(d),h.promise()},processResults:function(b,c){var d=[];return a.each(c,function(a,b){d.push({value:b.value,label:b.label})}),d},transport:function(a,b,d){this.list(a,b).then(d)["catch"](c.exception)}}});
define(["jquery","core/ajax","core/notification"],function(a,b,c){return{list:function(b,c){var d=[],e=a(b),f=a(b).data("originaloptionsjson"),g=e.val();a.each(f,function(b,e){return""!==c.trim()&&e.label.toLocaleLowerCase().indexOf(c.toLocaleLowerCase())===-1||(a.inArray(e.value,g)>-1||(d.push(e),!0))});var h=new a.Deferred;return h.resolve(d),h.promise()},processResults:function(b,c){var d=[];return a.each(c,function(a,b){d.push({value:b.value,label:b.label})}),d},transport:function(a,b,d){this.list(a,b).then(d)["catch"](c.exception)}}});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f={VIEW_POLICY:'[data-action="view"]'},g=function(){this.registerEvents()};return g.prototype.registerEvents=function(){a(f.VIEW_POLICY).click(function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(){return new g}}});
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f=function(a){this.registerEvents(a)};return f.prototype.registerEvents=function(f){f.on("click",function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(b){return b=a(b),new f(b)}}});
@@ -41,7 +41,7 @@ define(['jquery', 'core/ajax', 'core/notification'], function($, Ajax, Notificat
var selectedFilters = el.val();
$.each(originalOptions, function(index, option) {
// Skip option if it does not contain the query string.
if ($.trim(query) !== '' && option.label.toLocaleLowerCase().indexOf(query.toLocaleLowerCase()) === -1) {
if (query.trim() !== '' && option.label.toLocaleLowerCase().indexOf(query.toLocaleLowerCase()) === -1) {
return true;
}
// Skip filters that have already been selected.
+7 -15
View File
@@ -29,27 +29,18 @@ define([
'core/modal_events'],
function($, Ajax, Notification, ModalFactory, ModalEvents) {
/**
* List of action selectors.
*
* @type {{VIEW_POLICY: string}}
*/
var ACTIONS = {
VIEW_POLICY: '[data-action="view"]'
};
/**
* PolicyActions class.
*/
var PolicyActions = function() {
this.registerEvents();
var PolicyActions = function(root) {
this.registerEvents(root);
};
/**
* Register event listeners.
*/
PolicyActions.prototype.registerEvents = function() {
$(ACTIONS.VIEW_POLICY).click(function(e) {
PolicyActions.prototype.registerEvents = function(root) {
root.on("click", function(e) {
e.preventDefault();
var versionid = $(this).data('versionid');
@@ -127,8 +118,9 @@ function($, Ajax, Notification, ModalFactory, ModalEvents) {
* @method init
* @return {PolicyActions}
*/
'init': function() {
return new PolicyActions();
'init': function(root) {
root = $(root);
return new PolicyActions(root);
}
};
});
@@ -643,6 +643,6 @@ class acceptances_table extends \table_sql {
}
return ''; // User agreed by themselves.
}
return null;
return parent::other_cols($column, $row);
}
}
@@ -97,7 +97,7 @@ class accept_policy extends \moodleform {
}
}
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init');
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init', ['[data-action="view"]']);
}
/**
@@ -178,4 +178,4 @@ class accept_policy extends \moodleform {
}
}
}
}
}
@@ -232,6 +232,10 @@ class page_agreedocs implements renderable, templatable {
];
redirect(new moodle_url('/admin/tool/policy/view.php', $urlparams));
}
} else {
// Update the policyagreed for the user to avoid infinite loop because there are no policies to-be-accepted.
api::update_policyagreed($userid);
$this->redirect_to_previous_url();
}
}
@@ -58,7 +58,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
"<ul>{{#policies}}" +
"<li>" +
"<a href=\"{{pluginbaseurl}}/view.php?versionid={{id}}{{#returnurl}}&amp;returnurl={{.}}{{/returnurl}}\" " +
" data-action=\"view\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
" data-action=\"view-guest\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
"{{{name}}}" +
"</a>" +
"</li>" +
@@ -81,7 +81,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
{{/haspolicies}}
// Initialise the JS for the modal window which displays the policy versions.
ActionsMod.init();
ActionsMod.init('[data-action="view-guest"]');
});
});
@@ -123,6 +123,6 @@
{{#js}}
// Initialise the JS for the modal window which displays the policy versions.
require(['tool_policy/policyactions'], function(ActionsMod) {
ActionsMod.init();
ActionsMod.init('[data-action="view"]');
});
{{/js}}
@@ -73,6 +73,6 @@
{{#js}}
// Initialise the JS for the modal window which displays the policy versions.
require(['tool_policy/policyactions'], function(ActionsMod) {
ActionsMod.init();
ActionsMod.init('[data-action="view"]');
});
{{/js}}
@@ -80,7 +80,7 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I press "Next"
And I set the field "I agree to the This site policy" to "1"
And I press "Next"
And I should not see "Next"
And I should see "Course overview"
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
And I click on "Consent not given" "link" in the "User One" "table_row"
@@ -292,3 +292,23 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
And I should see "2 of 2" in the "User One" "table_row"
And "Consent given on behalf of user" "icon" should exist in the "User Two" "table_row"
And I should see "2 of 2" in the "User Two" "table_row"
Scenario: View acceptances made by users on their own after inactivating a policy
Given I log in as "user1"
And I should see "This site policy"
And I should not see "Course overview"
And I press "Next"
And I set the field "I agree to the This site policy" to "1"
And I press "Next"
And I should see "Course overview"
And I log out
And I log in as "admin"
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
And I click on "Actions" "link_or_button" in the "This privacy policy" "table_row"
And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row"
And I press "Continue"
And I click on "Set status to \"Inactive\"" "link" in the "This privacy policy" "table_row"
And I press "Continue"
And I log out
When I log in as "user1"
Then I should see "Course overview"
+16 -2
View File
@@ -108,6 +108,16 @@ class category_bin extends base_bin {
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
// 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.
// TODO: Remove this as part of MDL-65228.
$CFG->forced_plugin_settings['backup'] = ['backup_auto_storage' => 0];
// Backup the course.
$user = get_admin();
$controller = new \backup_controller(
@@ -115,11 +125,15 @@ class category_bin extends base_bin {
$course->id,
\backup::FORMAT_MOODLE,
\backup::INTERACTIVE_NO,
\backup::MODE_GENERAL,
\backup::MODE_AUTOMATED,
$user->id
);
$controller->execute_plan();
// We don't need the forced setting anymore, hence unsetting it.
// TODO: Remove this as part of MDL-65228.
unset($CFG->forced_plugin_settings['backup']);
// Grab the result.
$result = $controller->get_results();
if (!isset($result['backup_destination'])) {
@@ -233,7 +247,7 @@ class category_bin extends base_bin {
$tempdir,
$course->id,
\backup::INTERACTIVE_NO,
\backup::MODE_GENERAL,
\backup::MODE_AUTOMATED,
$user->id,
\backup::TARGET_NEW_COURSE
);
+16 -2
View File
@@ -112,6 +112,16 @@ class course_bin extends base_bin {
return;
}
// 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.
// TODO: Remove this as part of MDL-65228.
$CFG->forced_plugin_settings['backup'] = ['backup_auto_storage' => 0];
// Backup the activity.
$user = get_admin();
$controller = new \backup_controller(
@@ -119,11 +129,15 @@ class course_bin extends base_bin {
$cm->id,
\backup::FORMAT_MOODLE,
\backup::INTERACTIVE_NO,
\backup::MODE_GENERAL,
\backup::MODE_AUTOMATED,
$user->id
);
$controller->execute_plan();
// We don't need the forced setting anymore, hence unsetting it.
// TODO: Remove this as part of MDL-65228.
unset($CFG->forced_plugin_settings['backup']);
// Grab the result.
$result = $controller->get_results();
if (!isset($result['backup_destination'])) {
@@ -224,7 +238,7 @@ class course_bin extends base_bin {
$tempdir,
$this->_courseid,
\backup::INTERACTIVE_NO,
\backup::MODE_GENERAL,
\backup::MODE_AUTOMATED,
$user->id,
\backup::TARGET_EXISTING_ADDING
);
@@ -176,4 +176,116 @@ class tool_recyclebin_category_bin_tests extends advanced_testcase {
$course = reset($courses);
$this->assertEquals('Test course 2', $course->fullname);
}
/**
* Provider for test_course_restore_with_userdata() and test_course_restore_without_userdata()
*
* Used to verify that recycle bin is immune to various settings. Provides plugin, name, value for
* direct usage with set_config()
*/
public function recycle_bin_settings_provider() {
return [
'backup/backup_auto_storage moodle' => [[
(object)['plugin' => 'backup', 'name' => 'backup_auto_storage', 'value' => 0],
]],
'backup/backup_auto_storage external' => [[
(object)['plugin' => 'backup', 'name' => 'backup_auto_storage', 'value' => 1],
(object)['plugin' => 'backup', 'name' => 'backup_auto_destination', 'value' => true],
]],
'backup/backup_auto_storage mixed' => [[
(object)['plugin' => 'backup', 'name' => 'backup_auto_storage', 'value' => 2],
(object)['plugin' => 'backup', 'name' => 'backup_auto_destination', 'value' => true],
]],
];
}
/**
* Tests that user data is restored when course is restored.
*
* @dataProvider recycle_bin_settings_provider
* @param array $settings array of plugin, name, value stdClass().
*/
public function test_course_restore_with_userdata($settings) {
global $DB;
// Force configuration changes from provider.
foreach ($settings as $setting) {
// Need to create a directory for backup_auto_destination.
if ($setting->plugin === 'backup' && $setting->name === 'backup_auto_destination' && $setting->value === true) {
$setting->value = make_request_directory();
}
set_config($setting->name, $setting->value, $setting->plugin);
}
// We want user data to be included for this test.
set_config('backup_auto_users', true, 'backup');
$student = $this->getDataGenerator()->create_and_enrol($this->course, 'student');
// Delete course.
delete_course($this->course, false);
$this->assertFalse($DB->record_exists('course', ['id' => $this->course->id]));
// Verify there is now a backup @ cat recycle bin file area.
$recyclebin = new \tool_recyclebin\category_bin($this->course->category);
$this->assertEquals(1, count($recyclebin->get_items()));
// Restore the recycle bin item.
$recyclebin->restore_item(current($recyclebin->get_items()));
// Get the new course.
$newcourse = $DB->get_record('course', ['shortname' => $this->course->shortname], '*', MUST_EXIST);
// Check that it was removed from the recycle bin.
$this->assertEquals(0, count($recyclebin->get_items()));
// Verify that student DOES continue enrolled.
$this->assertTrue(is_enrolled(context_course::instance($newcourse->id), $student->id));
}
/**
* Tests that user data is not restored when course is restored.
*
* @dataProvider recycle_bin_settings_provider
* @param array $settings array of plugin, name, value stdClass().
*/
public function test_course_restore_without_userdata($settings) {
global $DB;
// Force configuration changes from provider.
foreach ($settings as $setting) {
// Need to create a directory for backup_auto_destination.
if ($setting->plugin === 'backup' && $setting->name === 'backup_auto_destination' && $setting->value === true) {
$setting->value = make_request_directory();
}
set_config($setting->name, $setting->value, $setting->plugin);
}
// We want user data to be included for this test.
set_config('backup_auto_users', false, 'backup');
$student = $this->getDataGenerator()->create_and_enrol($this->course, 'student');
// Delete course.
delete_course($this->course, false);
$this->assertFalse($DB->record_exists('course', ['id' => $this->course->id]));
// Verify there is now a backup @ cat recycle bin file area.
$recyclebin = new \tool_recyclebin\category_bin($this->course->category);
$this->assertEquals(1, count($recyclebin->get_items()));
// Restore the recycle bin item.
$recyclebin->restore_item(current($recyclebin->get_items()));
// Get the new course.
$newcourse = $DB->get_record('course', ['shortname' => $this->course->shortname], '*', MUST_EXIST);
// Check that it was removed from the recycle bin.
$this->assertEquals(0, count($recyclebin->get_items()));
// Verify that student DOES NOT continue enrolled.
$this->assertFalse(is_enrolled(context_course::instance($newcourse->id), $student->id));
}
}
+144 -1
View File
@@ -55,7 +55,7 @@ class tool_recyclebin_course_bin_tests extends advanced_testcase {
$this->course = $this->getDataGenerator()->create_course();
$this->quiz = $this->getDataGenerator()->get_plugin_generator('mod_quiz')->create_instance(array(
'course' => $this->course->id
'course' => $this->course->id, 'grade' => 100.0, 'sumgrades' => 1
));
}
@@ -173,4 +173,147 @@ class tool_recyclebin_course_bin_tests extends advanced_testcase {
$deletedbook = reset($items);
$this->assertEquals($book->name, $deletedbook->name);
}
/**
* Provider for test_coursemodule_restore_with_userdata() and test_coursemodule_restore_without_userdata()
*
* Used to verify that recycle bin is immune to various settings. Provides plugin, name, value for
* direct usage with set_config()
*/
public function recycle_bin_settings_provider() {
return [
'backup/backup_auto_storage moodle' => [[
(object)['plugin' => 'backup', 'name' => 'backup_auto_storage', 'value' => 0],
]],
'backup/backup_auto_storage external' => [[
(object)['plugin' => 'backup', 'name' => 'backup_auto_storage', 'value' => 1],
(object)['plugin' => 'backup', 'name' => 'backup_auto_destination', 'value' => true],
]],
'backup/backup_auto_storage mixed' => [[
(object)['plugin' => 'backup', 'name' => 'backup_auto_storage', 'value' => 2],
(object)['plugin' => 'backup', 'name' => 'backup_auto_destination', 'value' => true],
]],
];
}
/**
* Tests that user data is restored when module is restored.
*
* @dataProvider recycle_bin_settings_provider
* @param array $settings array of plugin, name, value stdClass().
*/
public function test_coursemodule_restore_with_userdata($settings) {
// Force configuration changes from provider.
foreach ($settings as $setting) {
// Need to create a directory for backup_auto_destination.
if ($setting->plugin === 'backup' && $setting->name === 'backup_auto_destination' && $setting->value === true) {
$setting->value = make_request_directory();
}
set_config($setting->name, $setting->value, $setting->plugin);
}
$student = $this->getDataGenerator()->create_and_enrol($this->course, 'student');
$this->setUser($student);
set_config('backup_auto_users', true, 'backup');
$this->create_quiz_attempt($this->quiz, $student);
// Delete quiz.
$cm = get_coursemodule_from_instance('quiz', $this->quiz->id);
course_delete_module($cm->id);
phpunit_util::run_all_adhoc_tasks();
$quizzes = get_coursemodules_in_course('quiz', $this->course->id);
$this->assertEquals(0, count($quizzes));
// Restore quiz.
$recyclebin = new \tool_recyclebin\course_bin($this->course->id);
foreach ($recyclebin->get_items() as $item) {
$recyclebin->restore_item($item);
}
$quizzes = get_coursemodules_in_course('quiz', $this->course->id);
$this->assertEquals(1, count($quizzes));
$cm = array_pop($quizzes);
// Check if user quiz attempt data is restored.
$attempts = quiz_get_user_attempts($cm->instance, $student->id);
$this->assertEquals(1, count($attempts));
$attempt = array_pop($attempts);
$attemptobj = quiz_attempt::create($attempt->id);
$this->assertEquals($student->id, $attemptobj->get_userid());
$this->assertEquals(true, $attemptobj->is_finished());
}
/**
* Tests that user data is not restored when module is restored.
*
* @dataProvider recycle_bin_settings_provider
* @param array $settings array of plugin, name, value stdClass().
*/
public function test_coursemodule_restore_without_userdata($settings) {
// Force configuration changes from provider.
foreach ($settings as $setting) {
// Need to create a directory for backup_auto_destination.
if ($setting->plugin === 'backup' && $setting->name === 'backup_auto_destination' && $setting->value === true) {
$setting->value = make_request_directory();
}
set_config($setting->name, $setting->value, $setting->plugin);
}
$student = $this->getDataGenerator()->create_and_enrol($this->course, 'student');
$this->setUser($student);
set_config('backup_auto_users', false, 'backup');
$this->create_quiz_attempt($this->quiz, $student);
// Delete quiz.
$cm = get_coursemodule_from_instance('quiz', $this->quiz->id);
course_delete_module($cm->id);
phpunit_util::run_all_adhoc_tasks();
$quizzes = get_coursemodules_in_course('quiz', $this->course->id);
$this->assertEquals(0, count($quizzes));
// Restore quiz.
$recyclebin = new \tool_recyclebin\course_bin($this->course->id);
foreach ($recyclebin->get_items() as $item) {
$recyclebin->restore_item($item);
}
$quizzes = get_coursemodules_in_course('quiz', $this->course->id);
$this->assertEquals(1, count($quizzes));
$cm = array_pop($quizzes);
// Check if user quiz attempt data is restored.
$attempts = quiz_get_user_attempts($cm->instance, $student->id);
$this->assertEquals(0, count($attempts));
}
/**
* Add a question to quiz and create a quiz attempt.
* @param \stdClass $quiz Quiz
* @param \stdClass $student User
* @throws coding_exception
* @throws moodle_exception
*/
private function create_quiz_attempt($quiz, $student) {
// Add Question.
$questiongenerator = $this->getDataGenerator()->get_plugin_generator('core_question');
$cat = $questiongenerator->create_question_category();
$numq = $questiongenerator->create_question('numerical', null, array('category' => $cat->id));
quiz_add_quiz_question($numq->id, $quiz);
// Create quiz attempt.
$quizobj = quiz::create($quiz->id, $student->id);
$quba = question_engine::make_questions_usage_by_activity('mod_quiz', $quizobj->get_context());
$quba->set_preferred_behaviour($quizobj->get_quiz()->preferredbehaviour);
$timenow = time();
$attempt = quiz_create_attempt($quizobj, 1, false, $timenow, false, $student->id);
quiz_start_new_attempt($quizobj, $quba, $attempt, 1, $timenow);
quiz_attempt_save_started($quizobj, $quba, $attempt);
$attemptobj = quiz_attempt::create($attempt->id);
$tosubmit = array(1 => array('answer' => '0'));
$attemptobj->process_submitted_actions($timenow, false, $tosubmit);
$attemptobj = quiz_attempt::create($attempt->id);
$attemptobj->process_finish($timenow, false);
}
}
+1 -1
View File
@@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['cannotfit'] = 'The replacement is longer than original and shortening is not allow, cannot continue.';
$string['cannotfit'] = 'The replacement is longer than the original and shortening is not allowed; cannot continue.';
$string['disclaimer'] = 'I understand the risks of this operation';
$string['doit'] = 'Yes, do it!';
$string['excludedtables'] = 'Several tables are not updated as part of the text replacement. These include configuration, log, events, and session tables.';
+95
View File
@@ -0,0 +1,95 @@
<?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 scheduled tasks admin pages.
*
* @package tool_task
* @copyright 2018 Toni Barbera <toni@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_task;
defined('MOODLE_INTERNAL') || die();
/**
* Running tasks from CLI.
*
* @copyright 2018 Toni Barbera <toni@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class run_from_cli {
/**
* Find the path of PHP CLI binary.
*
* @return string|false The PHP CLI executable PATH
*/
protected static function find_php_cli_path() {
global $CFG;
if (!empty($CFG->pathtophp) && is_executable(trim($CFG->pathtophp))) {
return $CFG->pathtophp;
}
return false;
}
/**
* Returns if Moodle have access to PHP CLI binary or not.
*
* @return bool
*/
public static function is_runnable():bool {
return self::find_php_cli_path() !== false;
}
/**
* Executes a cron from web invocation using PHP CLI.
*
* @param \core\task\task_base $task Task that be executed via CLI.
* @return bool
* @throws \moodle_exception
*/
public static function execute(\core\task\task_base $task):bool {
global $CFG;
if (!self::is_runnable()) {
$redirecturl = new \moodle_url('/admin/settings.php', ['section' => 'systempaths']);
throw new \moodle_exception('cannotfindthepathtothecli', 'tool_task', $redirecturl->out());
} else {
// Shell-escaped path to the PHP binary.
$phpbinary = escapeshellarg(self::find_php_cli_path());
// Shell-escaped path CLI script.
$pathcomponents = [$CFG->dirroot, $CFG->admin, 'tool', 'task', 'cli', 'schedule_task.php'];
$scriptpath = escapeshellarg(implode(DIRECTORY_SEPARATOR, $pathcomponents));
// Shell-escaped task name.
$classname = get_class($task);
$taskarg = escapeshellarg("--execute={$classname}");
// Build the CLI command.
$command = "{$phpbinary} {$scriptpath} {$taskarg}";
// Execute it.
passthru($command);
}
return true;
}
}
+31 -5
View File
@@ -25,6 +25,7 @@
$string['asap'] = 'ASAP';
$string['backtoscheduledtasks'] = 'Back to scheduled tasks';
$string['blocking'] = 'Blocking';
$string['cannotfindthepathtothecli'] = 'Cannot find the path to the PHP CLI executable so task execution aborted. Set the "Path to PHP CLI" setting in "Site administration / Server / System paths"';
$string['clearfaildelay_confirm'] = 'Are you sure you want to clear the fail delay for task \'{$a}\'? After clearing the delay, the task will run according to its normal schedule.';
$string['component'] = 'Component';
$string['corecomponent'] = 'Core';
@@ -48,13 +49,38 @@ $string['scheduledtasks'] = 'Scheduled tasks';
$string['scheduledtaskchangesdisabled'] = 'Modifications to the list of scheduled tasks have been prevented in Moodle configuration';
$string['taskdisabled'] = 'Task disabled';
$string['taskscheduleday'] = 'Day';
$string['taskscheduleday_help'] = 'Day of month field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every day</li><li><strong>*/2</strong> Every 2nd day</li><li><strong>1</strong> The first of every month</li><li><strong>1,15</strong> The first and fifteenth of every month</li></ul>';
$string['taskscheduleday_help'] = 'Day of month field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every day
* <strong>*/2</strong> Every 2nd day
* <strong>1</strong> The first of every month
* <strong>1,15</strong> The first and fifteenth of every month';
$string['taskscheduledayofweek'] = 'Day of week';
$string['taskscheduledayofweek_help'] = 'Day of week field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every day</li><li><strong>0</strong> Every Sunday</li><li><strong>6</strong> Every Saturday</li><li><strong>1,5</strong> Every Monday and Friday</li></ul>';
$string['taskscheduledayofweek_help'] = 'Day of week field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every day
* <strong>0</strong> Every Sunday
* <strong>6</strong> Every Saturday
* <strong>1,5</strong> Every Monday and Friday';
$string['taskschedulehour'] = 'Hour';
$string['taskschedulehour_help'] = 'Hour field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every hour</li><li><strong>*/2</strong> Every 2 hours</li><li><strong>2-10</strong> Every hour from 2am until 10am (inclusive)</li><li><strong>2,6,9</strong> 2am, 6am and 9am</li></ul>';
$string['taskschedulehour_help'] = 'Hour field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every hour
* <strong>*/2</strong> Every 2 hours
* <strong>2-10</strong> Every hour from 2am until 10am (inclusive)
* <strong>2,6,9</strong> 2am, 6am and 9am';
$string['taskscheduleminute'] = 'Minute';
$string['taskscheduleminute_help'] = 'Minute field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every minute</li><li><strong>*/5</strong> Every 5 minutes</li><li><strong>2-10</strong> Every minute between 2 and 10 past the hour (inclusive)</li><li><strong>2,6,9</strong> 2 6 and 9 minutes past the hour</li></ul>';
$string['taskscheduleminute_help'] = 'Minute field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every minute
* <strong>*/5</strong> Every 5 minutes
* <strong>2-10</strong> Every minute between 2 and 10 past the hour (inclusive)
* <strong>2,6,9</strong> 2, 6 and 9 minutes past the hour';
$string['taskschedulemonth'] = 'Month';
$string['taskschedulemonth_help'] = 'Month field for task schedule. The field uses the same format as unix cron. Some examples are:<br/><ul><li><strong>*</strong> Every month</li><li><strong>*/2</strong> Every second month</li><li><strong>1</strong> Every January</li><li><strong>1,5</strong> Every January and May</li></ul>';
$string['taskschedulemonth_help'] = 'Month field for task schedule. The field uses the same format as unix cron. Some examples are:
* <strong>*</strong> Every month
* <strong>*/2</strong> Every second month
* <strong>1</strong> Every January
* <strong>1,5</strong> Every January and May';
$string['privacy:metadata'] = 'The Scheduled task configuration plugin does not store any personal data.';
+2 -1
View File
@@ -62,6 +62,7 @@ class tool_task_renderer extends plugin_renderer_base {
$asap = get_string('asap', 'tool_task');
$disabledstr = get_string('taskdisabled', 'tool_task');
$plugindisabledstr = get_string('plugindisabled', 'tool_task');
$runnabletasks = tool_task\run_from_cli::is_runnable();
foreach ($tasks as $task) {
$customised = $task->is_customised() ? $no : $yes;
if (empty($CFG->preventscheduledtaskchanges)) {
@@ -105,7 +106,7 @@ class tool_task_renderer extends plugin_renderer_base {
}
$runnow = '';
if (!$disabled && get_config('tool_task', 'enablerunnow')) {
if ( ! $disabled && get_config('tool_task', 'enablerunnow') && $runnabletasks ) {
$runnow = html_writer::div(html_writer::link(
new moodle_url('/admin/tool/task/schedule_task.php',
array('task' => get_class($task))),
+2 -1
View File
@@ -88,7 +88,8 @@ echo html_writer::start_tag('pre');
$CFG->mtrace_wrapper = 'tool_task_mtrace_wrapper';
// Run the specified task (this will output an error if it doesn't exist).
cron_run_single_task($task);
\tool_task\run_from_cli::execute($task);
echo html_writer::end_tag('pre');
$output = $PAGE->get_renderer('tool_task');

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