Compare commits

..

815 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 24459b780e Moodle release 3.8.6 2020-11-07 16:48:02 +01:00
AMOS bot d476304b38 Automatically generated installer lang files 2020-11-07 00:07:52 +00:00
Eloy Lafuente (stronk7) 1bd64473f0 weekly release 3.8.5+ 2020-11-06 22:55:45 +01:00
Eloy Lafuente (stronk7) bb9129ae61 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-11-06 22:55:42 +01:00
Víctor Déniz 08c25c25fe Merge branch 'MDL-70137-38-2' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-11-06 19:20:10 +00:00
Andrew Nicols 63c147d6b1 MDL-70137 cache: Write config to temp file and move into place 2020-11-06 19:20:10 +00:00
Andrew Nicols 9101b9006e MDL-70137 cache: Use sensible default when reading MUC config
When we read the MUC configuration, a file which exists but is empty
will not error, but will cause all configuration to be empty.

We already perform an {{is_array()}} check on the {{$configuration}}
variable, but the default value for {{$configuration}} is an empty
array. In the case where the file exists, but is empty, no errors occur
when the file is loaded, and the initial {{$configuration}} value is
not overwritten, leading to the file being replaced with an empty copy.
2020-11-06 19:19:57 +00:00
Eloy Lafuente (stronk7) deab3d8e45 Merge branch 'MDL-70139-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-11-06 19:08:47 +01:00
Sara Arjona c482ea0df5 MDL-70139 core_badges: fix invalid request when sending to backpack
Having mixed $data in badge exporters is causing some issues.
As all these exporters are using $data as an object, $data can be
converted to object in the constructor, to avoid errors and get
the expected behaviour always.
2020-11-06 16:21:41 +01:00
AMOS bot 1402cad6fd Automatically generated installer lang files 2020-11-06 00:09:59 +00:00
Eloy Lafuente (stronk7) 17fa0a030e weekly release 3.8.5+ 2020-11-05 12:16:23 +01:00
Andrew Nicols 1620feb69f Merge branch 'MDL-70066-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-11-05 10:02:18 +08:00
Sara Arjona 46353d4017 Merge branch 'MDL-70114-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-11-04 20:15:32 +01:00
Sara Arjona 224efa43c6 Merge branch 'MDL-70119-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2020-11-04 15:20:14 +01:00
Bas Brands 20d6adc2ad MDL-70114 mod_data: add border for to textarea 2020-11-04 13:30:26 +00:00
Ferran Recio 5daa405eaa MDL-70119 core_badges: fix tab names 2020-11-04 12:57:18 +01:00
Simey Lameze bf91c850ec MDL-70066 badges: change usages of array_key_exists to isset 2020-11-04 16:05:58 +08:00
Mihail Geshoski 57fb23822b MDL-67837 backup: Add unit tests 2020-11-03 12:28:21 +01:00
Mihail Geshoski 2dfebe709e MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:28:21 +01:00
andreasschenkel 130707d4e2 MDL-69844 user: Fix no email in download_participants_table
Only include eMail in download_participants_table 
if selected in showuseridentity 
($identityfieldsselect)
2020-11-03 12:28:21 +01:00
Juan Leyva 8658c28687 MDL-67015 mod_data: Prevent users adding entries to other groups 2020-11-03 12:28:21 +01:00
Ferran Recio 64372b6d2f MDL-69378 tool_uploadcourse: fix enrolment methods uploads 2020-11-03 12:28:21 +01:00
Peter Dias c5c5e74568 MDL-56310 restore: Confirm user has permission to change capabilities 2020-11-03 12:28:21 +01:00
Eloy Lafuente (stronk7) 8a60f4ba20 weekly release 3.8.5+ 2020-11-03 12:21:15 +01:00
Eloy Lafuente (stronk7) 06eeb0fb89 Merge branch 'MDL-70081-38' of git://github.com/jleyva/moodle into MOODLE_38_STABLE 2020-11-03 01:26:23 +01:00
Sara Arjona 7d6d3ee26f Merge branch 'MDL-69973_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-11-02 15:45:25 +01:00
Juan Leyva 6ba22833e2 MDL-70081 airnotifier: Add missing device type in token registration 2020-10-31 13:08:14 +01:00
Eloy Lafuente (stronk7) 87dca5dfd7 MDL-69973 xmldb: Ensure all reports use fresh metadata (not cached) 2020-10-30 19:27:23 +01:00
Eloy Lafuente (stronk7) f93c934043 MDL-69973 xmldb: Fix problem with MariaDB >= 10.2.7 metadata defaults
With MariaDB 10.2.7 the driver was incorrectly returning '' (empty
string) as default for all the columns having null (meaning, no
default).

Also, cover the case in unit tests, it seems that we were already
testing other defaults but not the null case.
2020-10-30 19:27:23 +01:00
Eloy Lafuente (stronk7) 37757a69cd weekly release 3.8.5+ 2020-10-30 13:49:07 +01:00
Eloy Lafuente (stronk7) bda7205584 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-10-30 13:49:05 +01:00
AMOS bot 76e8f1f260 Automatically generated installer lang files 2020-10-30 00:09:51 +00:00
Matt Clarkson 4ac4c9a6c9 MDL-68722 atto_equation: fix for form elements with special characters
Element id's containing characters such as ':' would break the tab
selector in bootstrap.

This specifically affects the essay question type.
2020-10-29 14:23:44 +08:00
Jake Dallimore 46fcf48619 Merge branch 'MDL-69716-38' of git://github.com/aanabit/moodle into MOODLE_38_STABLE 2020-10-29 12:40:41 +08:00
Jun Pataleta 57c5a07aaa Merge branch 'MDL-69815-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-10-28 14:18:58 +08:00
Andrew Nicols b7f6f951ca Merge branch 'MDL-70004-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-10-28 13:15:31 +08:00
Jake Dallimore ccc768d30b Merge branch 'MDL-64723-38' of git://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-28 12:13:12 +08:00
Jake Dallimore 483ff0bb44 Merge branch 'MDL-65792-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-10-28 12:00:54 +08:00
Andrew Nicols 6f54a6cdd3 MDL-69815 core: Bump Node to v14.15.0 (LTS/Fermium) 2020-10-28 09:34:31 +08:00
Eloy Lafuente (stronk7) e1ee9ea78c Merge branch 'MDL-69998-38-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-10-28 00:42:41 +01:00
Eloy Lafuente (stronk7) b7d173d89e weekly release 3.8.5+ 2020-10-27 23:47:35 +01:00
David Mudrák 3eb031e018 MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:30:42 +01:00
Helen Foster cdfc0502fa MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:30:42 +01:00
Jun Pataleta 7670873a09 MDL-70004 theme_boost: Do not extend alert style for question containers 2020-10-27 17:17:02 +08:00
Jun Pataleta f61badb187 MDL-70004 qtype_multichoice: Set appropriate clear my choice role 2020-10-27 17:12:14 +08:00
Bas Brands db8aa0eda1 MDL-65792 mod_forum: show release time on timed posts 2020-10-27 09:10:48 +01:00
Paul Holden 4f05d0ecb7 MDL-64723 tool_mobile: workaround for invalid certificate parsing.
This is to account for specific server configuration that are affected
by one of the following issues, which results in certificate signature
algorithms being incorrectly parsed:

 * https://bugs.php.net/bug.php?id=77548
 * https://github.com/curl/curl/issues/3706
2020-10-26 23:06:19 +00:00
Eloy Lafuente (stronk7) d66ced33a2 Merge branch 'MDL-69993-38' of git://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-26 10:43:10 +01:00
Andrew Nicols baa6a41975 Merge branch 'MDL-69995-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-10-26 16:01:35 +08:00
Luca Bösch 4cf56a012d MDL-69995 backup: padding before activity icons. 2020-10-25 02:03:35 +02:00
Amaia Anabitarte 3b96a8b88b MDL-69716 mod_quiz: No timestamp for in progress attempts 2020-10-23 16:03:48 +02:00
Eloy Lafuente (stronk7) 5d357f9849 weekly release 3.8.5+ 2020-10-23 14:40:42 +02:00
Eloy Lafuente (stronk7) 5d9a5d8fef Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-10-23 14:40:37 +02:00
Paul Holden 0e75bc4ded MDL-69993 output: correct navigation node type for user reports. 2020-10-23 08:25:49 +01:00
Adrian Greeve 08c84a9d72 Merge branch 'MDL-67650-forced-checkbox-textarea-MOODLE_38_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_38_STABLE 2020-10-23 08:59:42 +08:00
Víctor Déniz 2dc4c36983 Merge branch 'MDL-68664-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-10-22 12:24:44 +01:00
Sara Arjona f3ffadb77b Merge branch 'MDL-69553-m38' of https://github.com/NeillM/moodle into MOODLE_38_STABLE 2020-10-22 08:56:27 +02:00
Brendan Heywood 251803de94 MDL-67650 admin: Consistently show forced config settings 2020-10-22 13:13:40 +11:00
Jake Dallimore 1c067b30a7 Merge branch 'MDL-68438_38' of https://github.com/t-schroeder/moodle into MOODLE_38_STABLE 2020-10-22 09:31:30 +08:00
Adrian Greeve 80878e887f Merge branch 'MDL-69788-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-22 09:05:15 +08:00
AMOS bot e2c2d15f09 Automatically generated installer lang files 2020-10-22 00:08:05 +00:00
Eloy Lafuente (stronk7) 988f42c05a Merge branch 'MDL-66392-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-21 19:49:39 +02:00
Paul Holden 4051117877 MDL-66392 analytics: make model output directory default to empty.
Falling back to path within $CFG->dataroot/models.
2020-10-21 17:34:11 +01:00
Víctor Déniz b98729c600 Merge branch 'MDL-69392-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-10-21 16:26:21 +01:00
Jun Pataleta 6fbebf7cd7 Merge branch 'MDL-69945-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-10-21 21:34:36 +08:00
Paul Holden 9f4b10f606 MDL-69788 admin: validate language menu configuration. 2020-10-21 11:25:54 +01:00
Paul Holden f743468808 MDL-69788 lang: fallback to all translations if misconfigured.
If given translation list contains only invalid entries, fallback
to returning the complete list of available language translations.
2020-10-21 11:25:44 +01:00
Jun Pataleta a6ca410069 Merge branch 'MDL-37226-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-10-21 17:46:31 +08:00
Tim Schroeder 482d85942f MDL-68438 message: fixed email format change with messaging disabled 2020-10-21 11:24:38 +02:00
Neill Magill 7b6fbd9861 MDL-69553 output: Handle pre-loading multiline string defines
Before this patch strings that were declared over multiple lines in
a template would not be parsed correctly.

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

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

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

would have been been parsed to get_string('', 'core')
2020-10-21 10:07:23 +01:00
Neill Magill a49559f222 MDL-69553 output: Unit tests for loading multiline string defines 2020-10-21 10:07:22 +01:00
Luca Bösch 320c5ec06c MDL-69945 core_calendar: let circles appear as circles 2020-10-21 11:04:22 +02:00
Jun Pataleta 698f99209d Merge branch 'MDL-69945-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-10-21 16:02:57 +08:00
Jun Pataleta 89ef8cc223 MDL-69392 question: Fix Try again button styling 2020-10-21 14:59:29 +08:00
Jun Pataleta e3db7a4767 MDL-69392 theme_boost: Improve question colour contrast
* Lighten info container.
* Fix colour contrast for the question container by
  - Lightening the background a bit
  - Darkening the text colour a bit
  - Making sure the link colour has good colour contrast against the
  question text.
* Fix colour contrast for the comments container by
  - Lightening the text colour a bit
  - Darkening the link colour a bit for better colour contrast against
  the feedback text.
2020-10-21 14:59:29 +08:00
Jun Pataleta 22e41d742f MDL-69392 theme_classic: Darken red, blue and green colours
The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)
2020-10-21 14:59:29 +08:00
Jun Pataleta 22b4979999 MDL-69392 theme_boost: Darken red, blue and green colours
The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)
2020-10-21 14:59:29 +08:00
Paul Holden ded0ed9d37 MDL-69807 blocks: remove redundant sesskey loading edit/delete page. 2020-10-21 14:25:52 +08:00
Adrian Greeve 981bce6288 Merge branch 'MDL-68766-M38' of https://github.com/ised-isde-canada/moodle into MOODLE_38_STABLE 2020-10-21 12:48:05 +08:00
Jake Dallimore 3883bba766 Merge branch 'MDL-69902-38' of https://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2020-10-21 10:58:11 +08:00
Eloy Lafuente (stronk7) 9aaab50cd5 weekly release 3.8.5+ 2020-10-21 00:50:35 +02:00
Jake Dallimore 60ae32c162 Merge branch 'MDL-67695-MOODLE_38_STABLE_get_lti_proxies' of https://github.com/andrewmadden/moodle into MOODLE_38_STABLE 2020-10-20 11:09:28 +08:00
Adrian Greeve 261d79a5ed MDL-68284 gradebook: Fix use of get_recordset in upgrade code. 2020-10-20 09:13:58 +08:00
Adrian Greeve fd9db57264 Merge branch 'MOODLE_38_STABLE-MDL-68284' of https://github.com/yao9394/moodle into MOODLE_38_STABLE 2020-10-20 08:44:10 +08:00
Simey Lameze bc56a460b7 MDL-68664 theme: remove right margin from form-inline class 2020-10-20 08:33:10 +08:00
Andrew Nicols f6eafcae3e Merge branch 'MDL-69687-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-10-20 08:03:02 +08:00
Eloy Lafuente (stronk7) e7aa9549a5 Merge branch 'MDL-69906-38-searchsimpledb' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-10-19 22:56:48 +02:00
Eloy Lafuente (stronk7) 3a12cb5495 Merge branch 'MDL-57756-text-customparams-38' of https://github.com/cengage/moodle into MOODLE_38_STABLE 2020-10-19 22:32:20 +02:00
Claude Vervoort 6d79bed31b MDL-57756 mod_lti: params change to text type 2020-10-19 14:17:56 -04:00
Sara Arjona 34ea79f1d4 Merge branch 'MDL-69897-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-19 18:15:18 +02:00
Sara Arjona 444c2e1df1 Merge branch 'MDL-69900-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-10-19 13:42:24 +02:00
sam marshall 965846f005 MDL-69687 Course: remove_course_contents orphaned completion data
The remove_course_contents function did not delete data from
course_module_completion table in most cases, resulting in large
quantities of orphaned data.
2020-10-19 10:14:11 +01:00
Sara Arjona 3317f7aa94 Merge branch 'MOODLE_38_MDL-69791' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-10-19 10:08:22 +02:00
Sagar Ghimire e523e85462 MDL-68284 gradebook: Prevent exposing hidden quiz grade item 2020-10-19 16:25:29 +11:00
Andrew Nicols 82a400be59 Merge branch 'MDL-69687-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-10-19 13:20:55 +08:00
Andrew Madden 30268a1fe1 MDL-67695 mod_lti: Use correct return structure for get_tool_proxies.
* Use tool_proxy_return_structure for each proxy.
* Added tests for getting all proxies and orphaned proxies.
2020-10-19 15:15:52 +11:00
sam marshall 66de9e27be MDL-69687 Course: Improve removal of completion data on MySQL 2020-10-16 18:24:23 +01:00
sam marshall 2cd98f15b3 MDL-69687 DB: Add API for deleting data based on subquery
The new API works on normal databases (by deleting data based on the
subquery) and also on MySQL (by deleting the data using a weird join
on the subquery).
2020-10-16 18:24:23 +01:00
Luca Bösch e92ac3eaf7 MDL-37226 assign: align select all header checkbox 2020-10-16 16:08:30 +02:00
Luca Bösch a04cc0b511 MDL-69945 core_calendar: let circles appear as circles 2020-10-16 15:43:50 +02:00
Sara Arjona 81e84d2034 weekly release 3.8.5+ 2020-10-16 13:18:40 +02:00
Jake Dallimore 7af6028c51 Merge branch 'MOODLE_38_MDL-47178' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-10-16 11:53:26 +08:00
Eloy Lafuente (stronk7) e92ffed40d Merge branch 'MDL-69813-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-14 22:47:44 +02:00
Eloy Lafuente (stronk7) 9fad671e5d MDL-68070 messaging: Ensure that error is shown on first messages
Before there is a conversation, messages between users are sent
using core_message_send_instant_messages instead of
core_message_send_messages_to_conversation.

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

This just adds the same error than already existing conversations do,
but returning it as warning, for BC, JS will show it.
2020-10-14 18:58:00 +02:00
Eloy Lafuente (stronk7) 2020abe0d8 MDL-68070 messaging: Amend lang string to be clearer for any user.
Credit goes to Helen Foster for the improvement, thanks!
2020-10-14 16:55:08 +02:00
Víctor Déniz 8c461fc2be Merge branch 'MDL-68900-m38' of https://github.com/sumitnegi933/moodle into MOODLE_38_STABLE 2020-10-14 12:47:46 +01:00
Eloy Lafuente (stronk7) 064f9943a5 Merge branch 'MDL-68070-38_messaging_fix' of https://github.com/beenet-dev/moodle into MOODLE_38_STABLE 2020-10-13 23:41:12 +02:00
Sara Arjona 0df84ece36 weekly release 3.8.5+ 2020-10-13 13:24:15 +02:00
Sara Arjona 15a185340a Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-10-13 13:24:12 +02:00
Andrew Nicols b4b15278ea Merge branch 'MDL-67654-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-13 08:01:30 +08:00
Paul Holden cd258845b9 MDL-67654 mod_forum: formchangechecker for discussion inline replies. 2020-10-12 23:32:32 +01:00
Paul Holden f7500502cc MDL-69897 repository: add heading to delete file modal. 2020-10-12 23:07:08 +01:00
Simon Mok af2a02e460 MDL-68070 messaging: Fix error when personal notification is disabled 2020-10-12 19:33:18 +08:00
Adrian Greeve 73fe545030 Merge branch 'MOODLE_38_MDL-69818' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-10-12 14:46:35 +08:00
Jake Dallimore 3ee3bef023 Merge branch 'MDL-68292-admin-sesskey-MOODLE_38_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_38_STABLE 2020-10-12 14:38:05 +08:00
Brendan Heywood e2558ec396 MDL-68292 core: Remove sesskey leakage on module pages 2020-10-12 17:11:35 +11:00
Adrian Greeve 6a22d520ee Merge branch 'MDL-69649-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-10-12 10:16:42 +08:00
Jake Dallimore d5f01f6a98 Merge branch 'MDL-69910-calendar-protectusername-MOODLE_38_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_38_STABLE 2020-10-12 10:06:21 +08:00
AMOS bot 7400b95a23 Automatically generated installer lang files 2020-10-11 00:08:32 +00:00
Brendan Heywood 0df4a06a97 MDL-69910 calendar: Fix export exception when both params are sent 2020-10-11 09:21:41 +11:00
David Mudrák 49f5600cf5 MDL-69906 admin: Display Setup search engine as link only if it is valid
We use auto-generated admin section name here so we need to check that
the target section actually exists.
2020-10-09 14:16:22 +02:00
Sara Arjona 46000ff13a weekly release 3.8.5+ 2020-10-09 11:11:50 +02:00
Sara Arjona 6879b59ec1 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-10-09 11:11:46 +02:00
Marina Glancy df6b15c7dc MDL-69902 core_search: fix error in the custom fields indexing 2020-10-09 08:52:10 +02:00
Stephen Bourget c209325895 MDL-69900 core_backup: Allow IMSCC v1.0 restore to finish 2020-10-09 09:06:47 +08:00
Sara Arjona bfe808fd62 Merge branch 'MDL-64657-38' of git://github.com/jleyva/moodle into MOODLE_38_STABLE 2020-10-08 14:16:03 +02:00
Sumit Negi 19a6a2fcc0 MDL-68900 mod_forum: permission check for user who is viewing timed post
Pass current user object to post builder as argument, so that the permission to view timed post
will check with current user, who is viewing the posts instead of user who made that post.
2020-10-08 12:44:03 +05:30
Adrian Greeve 7c68554277 Merge branch 'MDL-69805-38' of https://github.com/dravek/moodle into MOODLE_38_STABLE 2020-10-08 14:58:39 +08:00
Adrian Greeve cf149b7e39 Merge branch 'MDL-69798_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-10-08 13:31:15 +08:00
Víctor Déniz 125cbf474e Merge branch 'MDL-69759-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-10-07 22:26:38 +01:00
Victor Deniz Falcon 1339e312a6 MDL-52407 travis: use Travis default notifications(email) 2020-10-07 16:33:06 +08:00
Andrew Nicols 10f88d9ab6 Merge branch 'MDL-67275-38-post_noun_verb' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-10-07 12:39:42 +08:00
AMOS bot 26b34e8570 Automatically generated installer lang files 2020-10-07 00:07:49 +00:00
Eloy Lafuente (stronk7) ba24d5c214 Merge branch 'wip-MDL-68808-MOODLE_38_STABLE' of https://github.com/jason-platts/moodle into MOODLE_38_STABLE 2020-10-06 23:12:33 +02:00
Paul Holden a007895a0a MDL-69813 h5p: fix undefined addon ordering in framework test. 2020-10-06 10:48:12 +01:00
Eloy Lafuente (stronk7) 973631628c weekly release 3.8.5+ 2020-10-06 10:20:41 +02:00
Mikhail Golenkov 9167c6d47c MDL-47178 question: Retain question authors when restoring backups. 2020-10-06 09:38:55 +11:00
Eloy Lafuente (stronk7) 7119de9e92 Merge branch 'MDL-69772-38-allcountrycodes' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-10-06 00:04:22 +02:00
Eloy Lafuente (stronk7) 00492277ae Merge branch 'MDL-65074-38' of https://github.com/hitteshahuja/moodle into MOODLE_38_STABLE 2020-10-05 23:12:42 +02:00
Sara Arjona b773f03809 Merge branch 'MDL-69641-MOODLE_38_STABLE' of https://github.com/dmitriim/moodle into MOODLE_38_STABLE 2020-10-05 13:38:17 +02:00
Eloy Lafuente (stronk7) 8fc32d4c3e Merge branch 'MOODLE_38-MDL-69752' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-10-05 10:55:19 +02:00
Mikhail Golenkov 19cce33460 MDL-69791 gradereport: Fix error message when invalid grade is entered 2020-10-05 15:01:09 +11:00
Mikhail Golenkov 323a15ba58 MDL-69818 mod_feedback: Fix item dependency during activity restoration 2020-10-04 18:30:58 +11:00
Mikhail Golenkov 8912dcbe15 MDL-69752 mod_data: Format module intro on Database activities page 2020-10-04 13:51:00 +11:00
Sara Arjona 3154901c1f weekly release 3.8.5+ 2020-10-02 13:43:22 +02:00
David Matamoros f24a2515cb MDL-69805 mod_data: Freeze comment field if comments disabled 2020-10-02 09:13:05 +02:00
Eloy Lafuente (stronk7) ffa8aa21b8 Merge branch 'MDL-69758-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-10-01 23:44:36 +02:00
Tim Hunt 8a15c4e0ca MDL-69798 XML question export: excape special chars in idnumbers 2020-10-01 17:11:26 +01:00
Eloy Lafuente (stronk7) 1eaf199454 Merge branch 'MDL-69586-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-10-01 17:13:05 +02:00
David Mudrák 47fe02cbea MDL-69772 admin: Better validation for the allcountrycodes setting
The patch introduces a new admin_setting field type that can be used for
specifying comma separated list of countries. The field has inbuilt
validation so that only valid country codes can be inserted.
2020-10-01 13:32:09 +02:00
Jason Platts 82a1f6cd33 MDL-68808 forms: autocomplete throwing error in IE11 2020-10-01 12:08:12 +01:00
Sara Arjona 80b632c94a Merge branch 'MDL-68098-38' of git://github.com/dpalou/moodle into MOODLE_38_STABLE 2020-10-01 12:56:42 +02:00
Dani Palou efcc68a5ce MDL-68098 tests: Reset FILTERLIB_PRIVATE after tests 2020-10-01 12:51:09 +02:00
Dani Palou 800f4dfb15 MDL-68098 ws: Add unit tests to test mathjax in WS 2020-10-01 12:51:09 +02:00
Adrian Greeve a1ebb252cb Merge branch 'MDL-37802-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-30 13:48:55 +08:00
Dan Marsden c673616612 MDL-69641 grade: fix slow query.
This is a backport of MDL-69190
2020-09-30 15:22:36 +10:00
Adrian Greeve 2262d926eb Merge branch 'MDL-69359_38' of https://github.com/adpe/moodle into MOODLE_38_STABLE 2020-09-30 11:42:22 +08:00
Sara Arjona deb0ad9b62 Merge branch 'MDL-69342-38_profile_picture_deletion' of https://github.com/vtos/moodle into MOODLE_38_STABLE 2020-09-29 19:01:30 +02:00
Eloy Lafuente (stronk7) 3b52d1658e weekly release 3.8.5+ 2020-09-29 10:48:26 +02:00
Shamim Rezaie dba8fdf878 MDL-69649 form: Fix labels for defaultcustom form elements 2020-09-28 23:22:10 +10:00
Shamim Rezaie 2178327a55 MDL-69649 backup: Fix missing labels
- The backup details page uses a table to show a sumary of the backup
  content. Used role attribute to denote the tabular format of the
  summary.
- The backup details page displays activity name next to each activity
  icon. Therefore the icons are only decorative and do not need to have
  any title or even alt text.
- Form labels should be associated with form controls.  A div element is
  not a form control.
- The from attribute of the form labels should be equal to the id
  attribute of an element. Therefore, we first create a label and an
  input elements and associate them to each other, and then pass them to
  backup_detail_pair() when a label is needed.
2020-09-28 23:22:10 +10:00
sam marshall bdb752aa39 MDL-69759 Web services: app checks to token.php cause log errors 2020-09-28 11:56:18 +01:00
AMOS bot 0a238780e7 Automatically generated installer lang files 2020-09-26 00:08:03 +00:00
adpe 91984f38f7 MDL-69359 admin_cli: show only contributed plugins in uninstall plugins 2020-09-25 16:50:52 +02:00
Hittesh Ahuja e01066d67c MDL-65074 mod_quiz: Quiz navigation buttons shouldnt use btn-secondary
Removing .btn-secondary as plain.scss and default.scss in bootstrap hide the button from view.
2020-09-25 15:22:29 +01:00
Paul Holden 7069947949 MDL-37802 repository: return error if unzipping files fails.
For instance, when a user tried to unzip a password protected zip
archive using the file manager.
2020-09-25 09:34:36 +01:00
Paul Holden 620e5285fe MDL-69586 tool_usertours: use specified user in privacy prefs export. 2020-09-25 09:13:47 +01:00
Víctor Déniz 99b1742961 weekly release 3.8.5+ 2020-09-24 16:27:24 +01:00
Víctor Déniz cf6005dc08 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-09-24 16:27:18 +01:00
David Mudrák cba7517ca7 MDL-69772 admin: Fix legacy coding style on Location settings admin page
No actual change here. Just polishing the coding style and adding
fulltree check.
2020-09-24 14:19:28 +02:00
David Mudrák ace99685b5 MDL-69772 lang: Ignore misconfigured allcountrycodes filter
If the allcountrycodes filter contains only invalid values, ignore the
whole filter setting and make get_list_of_countries() return the full
list of all known countries, rather than empty list.
2020-09-24 13:41:59 +02:00
Vitaly 979f22b0ea MDL-69342 core_user: fixed user picture updating
When editing a user and checking the 'Delete picture' checkbox to delete
the old picture and uploading a new one at a time, the new one didn't appear
in the user profile. This happened due to the 'if/else' statement
in the 'core_user::update_picture()' method which allowed either to delete
the old picture or to upload a new one.
The fix removes the 'else' part of the 'if/else' statement to force
checking for a new uploaded picture no matter if a user checked
the 'Delete picture' checkbox or not.
2020-09-24 10:58:17 +03:00
Dani Palou 4fc00c4b68 MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-23 16:24:02 +02:00
Eloy Lafuente (stronk7) 6018a70469 Merge branch 'MDL-68229-38' of git://github.com/jleyva/moodle into MOODLE_38_STABLE 2020-09-23 11:51:39 +02:00
Juan Leyva 5c2c14b32b MDL-68229 tool_mobile: Add missing option to disable tags in the app 2020-09-23 10:35:19 +02:00
Eloy Lafuente (stronk7) 53827dd118 Merge branch 'MDL-69014-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-22 23:11:44 +02:00
Juan Leyva ba7d2b6c05 MDL-64657 course: Return hidden section names when configured 2020-09-22 11:53:23 +02:00
AMOS bot ed55aff5c9 Automatically generated installer lang files 2020-09-22 00:07:16 +00:00
Eloy Lafuente (stronk7) f710fba95b Merge branch 'MDL-66648-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-21 23:36:38 +02:00
Eloy Lafuente (stronk7) 5b2fb7946a Merge branch 'MDL-69667-MOODLE_38_STABLE' of https://github.com/comete-upn/moodle into MOODLE_38_STABLE 2020-09-21 23:20:50 +02:00
David Mudrák 58e775946a MDL-67275 forum: Fix language and accessibility issues with buttons
There were inconsistencies with the text shown on the submit button,
depending on the where the button was shown.

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

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

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

* Inline reply textarea's title was hard-coded English "post" text.
  Changed to "Message" to provide advisory information related to the
  element.
* Buttons contained title attribute with the same value as the explicit
  button text. This goes against accessibility guidelines.
2020-09-21 22:10:34 +02:00
sam marshall debc5e451d MDL-69758 Web services: core_get_course_contents PHP warnings
Calls to core_get_course_contents can cause PHP warnings in the server
log if there are any URL instances in the course with sketchy URLs.
This is because url_export_contents incorrectly returns null instead
of an empty array if there is an error.
2020-09-21 15:29:15 +01:00
Eloy Lafuente (stronk7) 09c7f259dc weekly release 3.8.5+ 2020-09-17 19:04:18 +02:00
Eloy Lafuente (stronk7) d6cb91de83 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-09-17 19:04:16 +02:00
Eloy Lafuente (stronk7) 64153ea77f Merge branch 'MDL-69395_38' of github.com:stronk7/moodle into MOODLE_38_STABLE 2020-09-17 17:03:59 +02:00
Eloy Lafuente (stronk7) 3a1f0f9641 MDL-69395 theme_classic: remove superfluous selector already in boost 2020-09-17 13:06:33 +02:00
Eloy Lafuente (stronk7) df4eab54cb Merge branch 'MDL-62387-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-17 00:10:00 +02:00
Eloy Lafuente (stronk7) 85cfba7f21 Merge branch 'MDL-69395-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-09-16 16:56:28 +02:00
Jun Pataleta bd7cfe1981 Merge branch 'MDL-69663-m38' of https://github.com/sammarshallou/moodle into MOODLE_38_STABLE 2020-09-16 22:16:06 +08:00
AMOS bot 8849a99cc0 Automatically generated installer lang files 2020-09-16 00:07:14 +00:00
Paul Holden 4b6827d042 MDL-62387 tool_lp: switch to core 'cohort' form element.
The autocomplete AJAX is identical to the version in tool_lp, but also
includes support for excluding suggestions (i.e. cohorts already
synced with the current learning plan).
2020-09-15 08:07:23 +01:00
comete-upn eab36a73fb MDL-69667 competencies: fix competencies count always 0 in frameworks. 2020-09-15 08:37:46 +02:00
Jun Pataleta ff6939dce4 Merge branch 'MDL-42012-38-alt' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-09-15 11:48:24 +08:00
Andrew Nicols a13ccd39ec MDL-42012 cache: Fix missing return value 2020-09-15 11:46:31 +08:00
Eloy Lafuente (stronk7) b60c6b3bdf Merge branch 'MDL-42012-38-alt' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-09-14 23:29:15 +02:00
Paul Holden 71ca64f7f8 MDL-69014 tool_usertours: clean up user preferences of deleted tours. 2020-09-14 20:36:24 +01:00
Paul Holden 92111f008f MDL-66648 user: consistent checks for linking to full profile.
The access checks for displaying a link to a users' full profile
now match the checks performed on the full profile page itself.
2020-09-14 20:21:59 +01:00
AMOS bot 284baff563 Automatically generated installer lang files 2020-09-13 00:07:54 +00:00
AMOS bot 1fc9aa9cc4 Automatically generated installer lang files 2020-09-12 00:07:36 +00:00
Jun Pataleta b21d86f807 Moodle release 3.8.5 2020-09-11 10:41:55 +08:00
sam marshall 0268610d25 MDL-69663 Web services: override_webservice_execution not honoured
If two different plugin types (e.g. theme, local) implement
override_webservice_execution callbacks, then all of them except
the 'last' plugin type do not work correctly.
2020-09-10 09:51:47 +01:00
Sara Arjona 472d293a16 weekly release 3.8.4+ 2020-09-10 08:52:05 +02:00
Sara Arjona 168fa1dda1 Merge branch 'MDL-69466-3.8' of https://github.com/JBThong/moodle into MOODLE_38_STABLE 2020-09-09 11:39:42 +02:00
Thong Bui a8e70bad23 MDL-69466 Autocomplete widget: Improve keyboard accessibility 2020-09-09 13:52:53 +07:00
Andrew Nicols 2072b9a9e3 MDL-42012 cache: Valid definitions are required even when disabled 2020-09-09 14:05:32 +08:00
Andrew Nicols f15f0b1cdf MDL-42012 cache: Fully disable cache for disabled cache factory 2020-09-09 14:05:32 +08:00
Andrew Nicols d2dd04ff2d MDL-42012 cache: Allow data sources to work when caching is disabled 2020-09-09 14:05:32 +08:00
Eloy Lafuente (stronk7) 7ed55774f1 Merge branch 'MDL-69116-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-09-08 23:16:52 +02:00
Sara Arjona 784156217a Merge branch 'MDL-69525-38-1' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-09-08 14:22:16 +02:00
Michael Hawkins 0425db5a80 MDL-69340 tag: Correct the filter input HTML in the tag manager 2020-09-08 08:48:24 +02:00
Mihail Geshoski 6e1451fb39 MDL-69048 book: Sanitize previous chapter value in add new chapter page 2020-09-08 08:48:24 +02:00
Andrew Nicols 8c274e82f4 MDL-68974 calendar: Use page context for block check 2020-09-08 08:48:24 +02:00
Andrew Nicols 4a488b9a5c MDL-68974 blocks: Check permission before generating content 2020-09-08 08:48:24 +02:00
Mihail Geshoski 11e49d6676 MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:48:24 +02:00
Mihail Geshoski 6f4e2cb799 MDL-65115 core_files: Add get_total_content_size() in stored_file class
New function get_total_content_size() is introduced in the stored_file
class. The puprose of this function is to calculate and return the
total size (in bytes) of the content of an archive file.
2020-09-08 08:48:24 +02:00
Andrew Nicols 7790b6727a MDL-68974 admin: Unit tests for context parent/child test 2020-09-08 08:48:24 +02:00
Andrew Nicols 20f7e23af4 MDL-68974 admin: Unit tests for loginas 2020-09-08 08:48:24 +02:00
Andrew Nicols 52b6d73c03 MDL-68974 admin: Prevent login as outside of the desired context 2020-09-08 08:48:24 +02:00
Sara Arjona 78eacf034a Merge branch 'MDL-68344-3.8' of https://github.com/JBThong/moodle into MOODLE_38_STABLE 2020-09-08 08:45:28 +02:00
Jun Pataleta 67e3dbab7f Merge branch 'MDL-69492-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-08 12:56:09 +08:00
Eloy Lafuente (stronk7) ed3482f9cc Merge branch 'MDL-69262-38-2' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-09-07 23:43:17 +02:00
Sara Arjona 3852238df4 Merge branch 'MDL-67468-MOODLE_38_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_38_STABLE 2020-09-07 13:20:17 +02:00
Paul Holden 1c51eaa50c MDL-69492 auth_cas: normalise member distinguished name config. 2020-09-04 08:39:11 +01:00
Paul Holden c329d99d8a MDL-69492 auth_ldap: normalise member distinguished name config. 2020-09-04 08:39:11 +01:00
Nathan Nguyen f48f213e40 MDL-67468 filter_activitynames: use MUC 2020-09-04 15:41:36 +10:00
Thong Bui c2686daae4 MDL-68344 filepicker: File Picker focus lost on upload 2020-09-04 09:50:30 +07:00
Sara Arjona 28a155e712 weekly release 3.8.4+ 2020-09-03 17:09:22 +02:00
Sara Arjona f90459df6f NOBUG: Fixed SVG browser compatibility 2020-09-03 17:09:20 +02:00
Bas Brands 859a49e2ac MDL-69395 theme_boost: improve colour contrast for form input fields
- for this issue the atto styles.css was moved into theme boost so
we can use our preset variable for $gray-500
2020-09-03 16:05:35 +02:00
Andrew Nicols bf0778595f Merge branch 'MDL-69391-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-09-03 11:49:48 +08:00
Andrew Nicols 3a257a2808 Merge branch 'MDL-69360-38' of git://github.com/NoelDeMartin/moodle into MOODLE_38_STABLE 2020-09-03 10:52:27 +08:00
Andrew Nicols 45f5453b2a Merge branch 'MDL-69246_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-09-03 10:40:33 +08:00
Andrew Nicols b74d8568eb Merge branch 'MDL-55340-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-09-03 10:14:46 +08:00
Andrew Nicols 9f770c1be6 Merge branch 'MDL-69069-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-09-03 09:37:37 +08:00
Eloy Lafuente (stronk7) 049bb1d7a7 Merge branch 'MDL-69608-38' of https://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2020-09-03 00:03:51 +02:00
Sara Arjona 687047148f Merge branch 'MDL-68680-MOODLE_38_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_38_STABLE 2020-09-02 17:16:21 +02:00
Marina Glancy ab48f37f68 MDL-69608 core_form: frozen forms do not have form tag 2020-09-02 11:27:29 +02:00
Noel De Martin 6180264ae8 MDL-69360 behat: Fix js ready checks for non-moodle sites 2020-09-02 10:21:09 +02:00
Eloy Lafuente (stronk7) b7905dd4e0 Merge branch 'wip_MDL-69491_m38' of git://github.com/gjb2048/moodle into MOODLE_38_STABLE 2020-09-02 00:27:50 +02:00
Sara Arjona 8d470c5802 Merge branch 'MDL-64525-m38' of https://github.com/NeillM/moodle into MOODLE_38_STABLE 2020-09-01 14:20:44 +02:00
Mihail Geshoski 1d183e38b1 MDL-69525 core: Publish a single event when toggling slave checkboxes 2020-09-01 15:07:49 +08:00
Sara Arjona 80efaa9828 Merge branch 'MDL-51709-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-09-01 09:04:37 +02:00
Sara Arjona 25c47ba407 Merge branch 'MDL-69394-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-09-01 06:45:38 +02:00
Tim Hunt 33f880fba7 MDL-69507 duration form field: should return an int number of seconds 2020-09-01 11:38:36 +08:00
Andrew Nicols 9e9a1db47a Merge branch 'MDL-69387-38-2' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-09-01 11:00:04 +08:00
Andrew Nicols a711c69d8f Merge branch 'MDL-69505-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2020-09-01 07:30:40 +08:00
Andrew Nicols 2a98eedef0 Merge branch 'MDL-56595-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-09-01 07:30:40 +08:00
Luca Bösch dadccb9237 MDL-51709 gradebook: Name display in single view. 2020-08-31 18:26:01 +02:00
Shamim Rezaie 2ce0766cfc MDL-69116 qtype_multichoice: accessibility improvement
- Screen-readers should not see 'clear my choice' when it is not visible
- 'clear my choice' option should only become visible when a choice is
selected
2020-09-01 00:09:38 +10:00
Shamim Rezaie d456737d72 MDL-69116 qtype_mutichoice: Use label for the "clear my choice" link 2020-08-31 23:59:22 +10:00
Bas Brands cef948595b MDL-69069 theme_boost: color contrast for custom alerts 2020-08-31 08:47:25 +02:00
Jake Dallimore 24bf9c39d9 MDL-69505 core_form: fix js min/max date restriction in dateselector
This was using the yui2-calendar attribute, not the yui 3 attribute.
2020-08-31 08:11:59 +08:00
Gareth Barnard adca4fe505 MDL-69491 themes: No 'fontsize' setting in Boost causes unit conflict. 2020-08-28 14:08:27 +01:00
Marina Glancy a44ce9a024 MDL-55340 mod_feedback: export question labels
This was present in export in 3.0 but got lost during export
refactoring in 3.1
2020-08-28 12:25:24 +02:00
Andrew Nicols fde001145b Merge branch 'MDL-69112-38' of git://github.com/merrill-oakland/moodle into MOODLE_38_STABLE 2020-08-28 13:27:39 +08:00
Nathan Nguyen 85ffac56e8 MDL-68680 core_grades: check grade item before trigger delete event 2020-08-28 11:40:14 +10:00
Paul Holden 11b4e810fb MDL-56595 tool_usertours: set page params when configuring tours/steps. 2020-08-27 23:07:59 +01:00
Tim Hunt ab1545b20e MDL-69246 questions: allow for float issues when validating manual marks
As well as fixing the bug, I also rewrote the test to use
data providers, which should lead to more useful failure messages.

And, I moved the magic number we used as the float tolerence to
be a named constant.
2020-08-27 17:40:45 +01:00
Sara Arjona c3673a9be1 weekly release 3.8.4+ 2020-08-27 17:36:26 +02:00
Sara Arjona 9283ba7380 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-08-27 17:36:24 +02:00
Jun Pataleta bb41dd7921 MDL-69262 core: Use core/action_menu_link in core/action_menu_trigger
* Introduce the "actionmenulinkclasses" block in the action_menu_link
template so other templates importing it can have the option to override
its classes.
* Have the action menu trigger template use the action menu link
template to reduce code duplication.
2020-08-27 13:23:24 +08:00
Jun Pataleta 8305c3ce9a MDL-69262 core: Make instance count variable as a static class variable
With the static function variable $instance, calls to
\action_menu_link::export_for_template() from its subclasses are stored
in different variables. This causes duplicate IDs when different
implementations of action menu links are rendered on the action menu
trigger/link template. (e.g. action_menu_link and
action_menu_link_secondary both rendered on the same page).
To make the incrementing uniform for the action_menu_link class and its
implementations, the $instance variable is moved out of the
export_to_template() method and is now made to a static class variable.
2020-08-27 13:17:45 +08:00
Andrew Nicols 1592b68f0b Merge branch 'MDL-69458-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-08-27 12:43:48 +08:00
Andrew Nicols faf7b144a1 Merge branch 'MDL-69501-38-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-08-27 11:31:35 +08:00
eWallah 08c359f366 MDL-67413 competencies: do nothing upon activity completion 2020-08-27 11:09:09 +08:00
Andrew Nicols b03196fe78 Merge branch 'MOODLE_38_MDL-69358' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-08-27 10:58:17 +08:00
Justin Hunt ec92de9187 MDL-66810 mod_lti: Reinstate deprecated default permissions on iframe
microphone, webcam, camera, midi, encrypted-media, geolocation
2020-08-27 10:27:02 +08:00
AMOS bot c3fcedf205 Automatically generated installer lang files 2020-08-27 00:07:14 +00:00
Adrian Greeve d2dec45ec8 Merge branch 'MDL-69419-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-08-27 08:06:30 +08:00
Sara Arjona 84564c42c8 Merge branch 'MDL-69389-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-08-26 18:03:13 +02:00
Sara Arjona 1084eba9a8 Merge branch 'MDL-69114-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-26 16:29:01 +02:00
Jun Pataleta 6895074a62 MDL-69389 theme_classic: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:07:41 +08:00
Jun Pataleta d79cd16ae7 MDL-69389 theme_boost: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:07:41 +08:00
Jun Pataleta 9579c751ab MDL-69387 pix: Create PNG versions of the darkened completion icons
Thanks to Barbara Ramiro <barbara@moodle.com> for the help in
generating these PNG versions of the darkened completion icons!
2020-08-26 11:03:28 +08:00
Jun Pataleta 1cb1763216 MDL-69387 pix: Darken completion icons
Darkened the fills of completion icons in order to meet the required
minimum contrast ratio of 3:1.
* Changed gray fills (#999) to #949494.
* Changed blue fills (#76A1F0) to #6393ee
* Changed green fills (#9C3) to #79a128

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

This can lead to some random test failures.

Actively specifying a test which does not make use of the 'R' random
field time addresses this issue.
2020-08-26 09:58:49 +08:00
AMOS bot e30b6117f7 Automatically generated installer lang files 2020-08-26 00:07:33 +00:00
Jun Pataleta d0d16bd8fb MDL-69391 theme: Darken course selector text colour
Use $gray-600 for a darker text colour in the course select box.
This also makes the colour consistent with the view selector which
also uses $gray-600.
2020-08-25 14:48:40 +08:00
Jun Pataleta dc378c70e3 MDL-69391 theme: Darken navbar-light colour
Increase the opacity for the sass variable $navbar-light-color a
little bit in order to achieve an acceptable colour contrast against
the white background.
2020-08-25 14:47:51 +08:00
Neill Magill 15aa7e0b20 MDL-64525 comments: Should not be able to delete frozen comments
Before this change in a frozen context a user would be able to delete
their own comments.

After this change a user will only be able to delete their own comments
if they still have the capability to post new comments or the capability
to delete comments from any user.
2020-08-24 08:01:26 +01:00
Neill Magill 5192605a11 MDL-64525 comments: Tests for deleting frozen comments 2020-08-24 08:01:26 +01:00
Mihail Geshoski c6d2515534 MDL-69458 report_insights: Respect perpage value in pagination bar 2020-08-24 09:30:57 +08:00
Eloy Lafuente (stronk7) 4f3271c536 Merge branch 'MDL-69493-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-22 17:09:54 +02:00
AMOS bot b4025d8655 Automatically generated installer lang files 2020-08-22 00:07:58 +00:00
Eloy Lafuente (stronk7) a4ab0db4bd weekly release 3.8.4+ 2020-08-21 20:43:15 +02:00
Helen Foster 972f50ff90 MDL-69501 lang: Import fixed English strings (en_fix)
Significant string change: error:nobadges,core_badges - Additional info
explaining that site badges can only have other site badges as criteria
2020-08-21 13:58:56 +02:00
Jun Pataleta 5aeec826f8 Merge branch 'MDL-66818-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-08-21 11:32:57 +08:00
Andrew Nicols 94d2dcb8e1 MDL-66818 mod_forum: Use cap manager to check exportability 2020-08-21 08:17:27 +08:00
Andrew Nicols c8273f7d7f MDL-42434 chat: Disable stylelint important check 2020-08-21 07:38:06 +08:00
Sara Arjona affb1ae2ff MDL-42434 mod_chat: styles for chat themes to view help-icon properly
The styles for the bubble and the compact themes have been reviewed
because there weren't enough contrast for the help icon.
2020-08-20 23:44:00 +01:00
Sara Arjona fea72a6eb3 MDL-42434 mod_chat: display the whole help text
When testing this issue was raised that the help text was cut-off.
This patch should fix this issue changing the placement from
right/left to top.
2020-08-20 23:44:00 +01:00
Andrew Nicols 64d0d94aeb Merge branch 'MDL-69375_38' of https://github.com/Cvmcosta/moodle into MOODLE_38_STABLE 2020-08-20 11:51:24 +08:00
Adrian Greeve 9b4d87bcc2 Merge branch 'MDL-68964-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2020-08-20 11:43:33 +08:00
Adrian Greeve 18740e4938 Merge branch 'MDL-42434-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-08-20 11:25:35 +08:00
Adrian Greeve 261be42ab5 Merge branch 'MDL-68683-38-fix' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-08-20 10:25:59 +08:00
Andrew Nicols 181bef2ed6 Merge branch 'MDL-69449-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-20 09:26:59 +08:00
Andrew Nicols 94bd3452e4 Merge branch 'MDL-68889-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-20 09:20:01 +08:00
Simey Lameze fb9670a9b2 MDL-68683 competencies: fix query to delete stale files 2020-08-20 09:17:42 +08:00
Andrew Nicols 00cbbbc930 Merge branch 'MDL-67415_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-08-20 08:31:12 +08:00
Andrew Nicols bb31c5eb3e Merge branch 'MDL-66818-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-08-20 08:17:17 +08:00
Simey Lameze 9d5a987a97 MDL-66818 mod_forum: remove unnecessary behat steps 2020-08-20 08:05:13 +08:00
gthomas2 a1b7b8b98f MDL-66818 mod_forum: hide portfolio export button based on caps 2020-08-20 08:05:13 +08:00
Andrew Nicols 1e157fb528 Merge branch 'MDL-66900-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-20 07:55:34 +08:00
Andrew Nicols b5c1e5379e Merge branch 'MDL-69271_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-08-20 07:36:44 +08:00
Andrew Nicols c78a136be4 Merge branch 'MDL-61215-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-08-20 07:17:37 +08:00
Andrew Nicols 978fff44ab Merge branch 'MDL-69401-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-08-20 07:03:54 +08:00
Victor Deniz Falcon 3b212136de Merge branch 'MDL-69297-38' of git://github.com/peterRd/moodle into MOODLE_38_STABLE 2020-08-19 23:48:56 +01:00
Eloy Lafuente (stronk7) 9ffab782f7 MDL-63375 workshop: apply specific IE10/11 fix
Credit goes to Matt Davidson (Syxton)
2020-08-19 17:54:18 +02:00
Peter Dias 30ccbb075c MDL-69297 assign: Check whether there is content for a submission
Confirm there is some content to be submitted for an assignment when processing it.
2020-08-19 15:48:33 +08:00
Adrian Greeve 793823bca8 Merge branch 'MDL-66665-38-POC2' of git://github.com/peterRd/moodle into MOODLE_38_STABLE 2020-08-19 14:29:58 +08:00
Peter Dias dd8b086494 MDL-66665 assign: Check whether a modified user could actually grade 2020-08-19 13:41:02 +08:00
Adrian Greeve 30b2b58c27 Merge branch 'MDL-68683-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-08-19 12:58:27 +08:00
Adrian Greeve 8c5a8a25b5 Merge branch 'MDL-69475_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-08-19 10:46:01 +08:00
Andrew Nicols f6c9f72a76 Merge branch 'MDL-26401-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-08-19 08:52:43 +08:00
Eloy Lafuente (stronk7) 7e1223958c Merge branch 'MDL-65847-auth_db_error_handling-38' of git://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-08-19 00:35:48 +02:00
Eloy Lafuente (stronk7) 43362649e5 Merge branch 'MDL-63375-38' of https://github.com/syxton/moodle into MOODLE_38_STABLE 2020-08-19 00:13:24 +02:00
Eloy Lafuente (stronk7) bddf4eecf6 Merge branch 'MDL-68444-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-08-18 19:15:23 +02:00
Eloy Lafuente (stronk7) e881a516d0 MDL-69475 backup: Proper handling of backup::RELEASE versions
1) Remove any floatval() casting. They are breaking / killing
   .10 versions (converting them to .1). Since Moodle 2.0 all the
   backup::RELEASE have been 100% numerical values.
2) Use version_compare() always to compare backup::RELEASE values.
   They are always versions and the function is aware of versions
   > .9, able to clean/ignore alpha chars... and everything else.

Note that I've also changed a couple of cases in formats (topics and
weeks) that were correct, but just added the same comment and used
the same version_compare() comparison parameters style, so all uses
in core are consistent (and safe to be copied out there).
2020-08-18 16:25:55 +02:00
Eloy Lafuente (stronk7) 62c1a7b816 Merge branch 'MDL-69273-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-08-18 10:59:50 +02:00
Simey Lameze 0bca22b30f MDL-68683 competencies: step to delete orphaned evidence files 2020-08-18 16:07:08 +08:00
Simey Lameze 45d06fe9b6 MDL-68683 core: fix DML exception on upgrade step 2020-08-18 16:04:34 +08:00
Andrew Nicols 43930d5e8a MDL-69273 travis: Use exttests for https too 2020-08-18 07:50:48 +08:00
Andrew Nicols b226665e80 MDL-69273 travis: Move exttests check to after_script
The result of the final command `script` phase determines the build
result.

The cleanup belongs in the `after_script` phase.
2020-08-18 07:40:14 +08:00
Paul Holden edd91d16fa MDL-69493 cohort: remove escaping of return URL params. 2020-08-17 21:30:15 +01:00
Mihail Geshoski 5c3bdc9259 MDL-69401 book: Limit character length in chapter title 2020-08-17 09:04:36 +08:00
carlos 8dc60e1926 MDL-69375 mod_lti: Fix Names and Roles Link header format
- Changed line 469 of memberships.php to build Link header according to the Web Linking specification RFC8288.
2020-08-14 17:12:54 -03:00
Sara Arjona b91869f889 MDL-42434 mod_chat: add again the usingchat help icon
In Moodle 2.4 the help icon displayed in the chat window was
removed. It has been added to gui_ajax and gui_basic in order to help users.
2020-08-14 17:13:13 +02:00
Sara Arjona 25128d16aa MDL-61215 core_user: use the new optimised_image filetype group
For the user profile picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:51 +02:00
Sara Arjona 62cdf371df MDL-61215 core_badges: use the new optimised_image filetype group
For the badge picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:50 +02:00
Sara Arjona e6bf955210 MDL-61215 core_files: add new optimised_image group
Currently, PHP getimagesize method doesn't support SVG images.
As some features, such as badges, processs and optimise the images
before using them, a new filetype group has been created to exclude
SVG from there: optimised_image.
SVG can't be removed from web_image because then users won't be
able to add SVG images to their courses using labels, pages...
2020-08-14 17:06:50 +02:00
Eloy Lafuente (stronk7) 4ec7c29b30 MDL-69271 auth_ldap: Don't assume any ordering, just verify matches
Both ldap or the DB can return information in a non-consistent
ordering leading to events to be generated in different order.

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

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

So we just do the tests ordering immune, verifying that all the
expected events have been triggered and done. Irrespectively of their order.
2020-08-14 13:40:13 +02:00
Andrew Nicols cf6cdd99d4 weekly release 3.8.4+ 2020-08-14 14:42:31 +08:00
Andrew Nicols 1ed9fa8f4a NOBUG: Fixed SVG browser compatibility 2020-08-14 14:42:29 +08:00
Andrew Nicols f520dbe674 Merge branch 'MDL-68666-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-13 15:21:52 +08:00
Bas Brands b61392fa53 MDL-68666 core_pix: add missing fallback icons 2020-08-13 08:51:18 +02:00
Andrew Nicols c4fc929e3f Merge branch 'MDL-69253_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-08-13 11:53:06 +08:00
Andrew Nicols ae320424ef Merge branch 'MDL-60492-tagcloud_html-38' of https://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-08-13 11:45:28 +08:00
Adrian Greeve 2d14596f5a Merge branch 'MDL-68423-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2020-08-13 11:06:30 +08:00
Andrew Nicols 11e171ffe5 Merge branch 'MDL-69421-38' of git://github.com/noeldemartin/moodle into MOODLE_38_STABLE 2020-08-13 09:36:14 +08:00
Andrew Nicols 3d5679803d Merge branch 'MDL-60260-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-13 07:55:52 +08:00
Eloy Lafuente (stronk7) bdea78ba61 MDL-67415 environment: change requirements
- mysql requirement up to 5.7
- postgres requirement up to 9.6
2020-08-13 01:30:26 +02:00
Eloy Lafuente (stronk7) c6fb7763bb MDL-67415 environment: 3.10 base information
This is a direct copy of the 3.9 branch to have
changes under control easier for next commits.
2020-08-13 01:30:26 +02:00
Eloy Lafuente (stronk7) 1d412ff1df Merge branch 'MDL-68860-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-13 01:08:43 +02:00
Eloy Lafuente (stronk7) 2e93f26f2f Merge branch 'MDL-68558-38-plugindepscheckdeadend' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-08-13 00:40:25 +02:00
Eloy Lafuente (stronk7) 81dfa11ba8 Merge branch 'MDL-67394-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-13 00:29:24 +02:00
Eloy Lafuente (stronk7) 6a6caa019f Merge branch 'MDL-67002_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-08-13 00:26:20 +02:00
Ferran Recio c1b3ba3e07 MDL-68964 mod_chat: fix theme param 2020-08-12 17:31:42 +02:00
Bas Brands 5d412e18e7 MDL-68889 block_recentlyaccessedcourses: small viewport issues
- on small devices the recentlyaccessedcourses does not show any courses
2020-08-12 13:06:20 +02:00
Paul Holden b73bb7b9c4 MDL-66900 course: don't clean category description when editing. 2020-08-12 11:48:35 +01:00
Simey Lameze d4d744d544 MDL-26401 group: change import to use csv_import_reader class 2020-08-12 16:36:05 +08:00
Simey Lameze 4cdcf3a407 MDL-26401 group: add delimiter and encoding fields to import 2020-08-12 16:36:05 +08:00
Paul Holden a0283e7bb3 MDL-69449 block_timeline: use dayslimit context data in template.
Ensures the correct value is used when initially rendering the
course timeline.
2020-08-12 09:19:47 +01:00
Andrew Nicols 0ae11f6123 Merge branch 'MDL-68618-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-12 13:41:21 +08:00
Andrew Nicols c1efa9acf4 Merge branch 'MDL-69353-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-12 11:22:59 +08:00
Andrew Nicols 5ed2aef513 Merge branch 'MDL-68334-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-08-12 11:14:35 +08:00
Andrew Nicols 1466bef278 Merge branch 'MDL-69296-m38' of https://github.com/NeillM/moodle into MOODLE_38_STABLE 2020-08-12 10:31:43 +08:00
Mikhail Golenkov 7132e1a398 MDL-69358 backup: Do not clean up records for incomplete adhoc tasks.
Co-authored-by: Heena Agheda <heenaagheda@catalyst-au.net>
2020-08-12 12:09:30 +10:00
Andrew Nicols 4328b93712 Merge branch 'MDL-68731_38' of https://github.com/jonof/moodle into MOODLE_38_STABLE 2020-08-12 09:12:37 +08:00
Andrew Nicols bdfc738c6f Merge branch 'MDL-69168_recently-accessed-items-block-uses-stock-lti-icon' of https://github.com/stopfstedt/moodle into MOODLE_38_STABLE 2020-08-11 13:00:54 +08:00
Adrian Greeve 07d4b70470 Merge branch 'MDL-69204-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-11 08:46:22 +08:00
Paul Holden de58d4b0a1 MDL-68618 mod_forum: stop reverting idnumber when updating instance. 2020-08-10 09:11:20 +01:00
Paul Holden 349ebe7f45 MDL-68860 mod_lti: Oracle support for retrieving shared secrets.
Thanks to Mark van Hoek!
2020-08-10 09:06:33 +01:00
Adrian Greeve fe39303913 Merge branch 'MDL-60493-grader_span_tag-38' of https://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-08-10 09:23:13 +08:00
Luca Bösch 7abc2da93b MDL-68334 user: Display name in footer as elsewhere. 2020-08-08 10:30:04 +02:00
Stefan Topfstedt bf9d8d79d5 MDL-69168 block_recentlyaccesseditems: apply custom icon
Overwrite the default mod icon with the configured icon url if
applicable.
2020-08-07 09:13:06 -07:00
Matt Davidson 155332f4aa MDL-63375 workshop: fix rubric grid view 2020-08-07 08:49:27 -04:00
Eloy Lafuente (stronk7) 24c68767e5 weekly release 3.8.4+ 2020-08-06 20:51:27 +02:00
Noel De Martin 5b38dd9e1e MDL-69421 behat: Revert app behat navigation to call session visit 2020-08-06 12:15:07 +02:00
Jun Pataleta 72f730972a Merge branch 'MDL-60501-h4_close_tag-38' of https://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-08-06 12:11:07 +08:00
Jun Pataleta f5c7fcd181 Merge branch 'MDL-69111-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-06 11:48:34 +08:00
Adrian Greeve 2d436520dc Merge branch 'MDL-40227-38-1' of git://github.com/peterRd/moodle into MOODLE_38_STABLE 2020-08-06 11:29:35 +08:00
Peter eb5d0d7d59 MDL-40227 mod_lesson: Use localised float formatting
* Leverage PARAM_LOCALISEDFLOAT
* Store all numbers with standard '.' dec formatting
* Show all numbers based on locale settings
* Behat test to cover different cases using numeric questions and modified locale setting
2020-08-06 10:44:48 +08:00
Adrian Greeve d158589158 Merge branch 'MOODLE_38_MDL-66626' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE 2020-08-06 09:08:26 +08:00
Eloy Lafuente (stronk7) 268e3b893a Merge branch 'MDL-66670-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-06 00:58:33 +02:00
Leon Stringer 54004f286e MDL-60492 core_tag: Fix title attribute
Attribute 'title' was specified inside a condition but closing `"` was
outside condition possibly resulting in <a href="..." class="..." ">.
Also moved </a> outside of condition to match <a>.
2020-08-05 12:56:02 +01:00
Adrian Greeve 12baca4b15 Merge branch 'MDL-68647-38-forumprivacysql' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-08-05 14:23:28 +08:00
Adrian Greeve 08e86bd7b1 Merge branch 'MDL-60932-38' of git://github.com/aanabit/moodle into MOODLE_38_STABLE 2020-08-05 10:09:44 +08:00
Eloy Lafuente (stronk7) 36e03f1596 Merge branch 'MDL-67831-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-08-05 00:48:31 +02:00
Tim Hunt b1341895b1 MDL-69253 mod_quiz: unit test for the last commit 2020-08-04 14:51:13 +01:00
Josh Ebarvia 6d3dca55f8 MDL-69253 mod_quiz: Fix timecreated is 0 when creating a quiz activity 2020-08-04 14:51:12 +01:00
Jun Pataleta d86741395e Merge branch 'MDL-60574_38' of https://github.com/t-schroeder/moodle into MOODLE_38_STABLE 2020-08-04 19:50:20 +08:00
Eloy Lafuente (stronk7) 0f6c21c836 Merge branch 'MDL-55299-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2020-08-04 12:34:15 +02:00
Tim Schroeder 8ae39ac69e MDL-60574 atto_undo: fixed redo erasing content
When you'd hit ctrl-y with nothing on the redo stack the entire
content of Atto would get deleted with no way of getting it back.
2020-08-04 09:25:23 +02:00
Leon Stringer 957baa0871 MDL-65847 auth_db: user_update() handle errors
The external database authentication plugin (auth_db) can update the
external database if mapped fields are set to Update external: On
update.  This change adds error handling in case this update fails.
2020-08-03 11:42:50 +01:00
Eloy Lafuente (stronk7) 678bcecc0d Merge branch 'MDL-62980-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-08-03 12:38:37 +02:00
Bas Brands 06f6b499eb MDL-69114 theme_boost: improve the color contrast for .*-info classes 2020-08-03 11:41:40 +02:00
Eric Merrill 88aa4e2071 MDL-69112 assign: Improve parsing of uploaded feedback names 2020-07-31 19:08:43 -04:00
Amaia Anabitarte 49403f979a MDL-60932 core_user: Fix docs link for participants page
Co-authored by: David Mudrák <david@moodle.com>
2020-07-31 10:30:43 +02:00
Neill Magill 28047fa3b1 MDL-69296 resource: Pressing cancel should always exit settings form
Before this change if a user used navigated to a resource activity
from another activity and then edited the settings it was likely
that using the cancel button would result in file downloading,
rather than being returned to their last page.

After this change the user will be back on the page they came from.
2020-07-31 07:58:16 +01:00
Paul Holden 98292864e8 MDL-67394 dml: improve thrown exception when Oracle can't parse query. 2020-07-30 16:23:02 +01:00
Victor Deniz Falcon 71f3a7fca9 weekly release 3.8.4+ 2020-07-30 12:54:08 +01:00
Victor Deniz Falcon 8a416d4e63 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-07-30 12:54:02 +01:00
Paul Holden 94f4f39ab7 MDL-62980 tool_dataprivacy: show persistent errors inside form. 2020-07-30 08:23:26 +01:00
Eloy Lafuente (stronk7) ad30b41f91 Merge branch 'MDL-63252-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-07-30 00:48:15 +02:00
Victor Deniz Falcon 7803827502 Merge branch 'MDL-66707-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-07-29 23:18:09 +01:00
Victor Deniz Falcon a6986b3e36 Merge branch 'MDL-68968-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-07-29 22:03:16 +01:00
Paul Holden 73b7597a8c MDL-60260 course: validate external fields on create/update course.
Ensure course fullname/shortname fields are not empty.
2020-07-29 19:57:30 +01:00
Victor Deniz Falcon 9b54ddd465 Merge branch 'MDL-68706-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-07-29 19:04:18 +01:00
Victor Deniz Falcon 39dc97aef9 Merge branch 'MDL-69199-38' of git://github.com/aanabit/moodle into MOODLE_38_STABLE 2020-07-29 11:56:08 +01:00
Jonathon Fowler 8351210984 MDL-68731 forum: fix digests not correctly updating post read statuses 2020-07-29 15:41:21 +10:00
Jun Pataleta bfce37757f Merge branch 'MDL-69252-close_tag-38' of https://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-07-29 11:17:32 +08:00
Eloy Lafuente (stronk7) b4d8be2042 Merge branch 'MDL-69319-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2020-07-29 00:20:53 +02:00
Leon Stringer 7d3b148e94 MDL-60493 mod_assign: Unused JS variables
Removed unused JavaScript variables fixing CI warning "ESLint error
[no-unused-vars]".
2020-07-28 12:05:49 +01:00
Leon Stringer 595e05d2a7 MDL-60493 mod_assign: Remove rogue </span>
In the grading interface (/mod/assign/view.php?id=2&action=grader)
there was a rogue </span> with no opening <span>.  Also changed
<span><form> to <div><form> in included template fixing CiBoT HTML
Validation error.
2020-07-28 12:05:12 +01:00
Jun Pataleta 4a776d2f67 Merge branch 'MDL-65453-38' of git://github.com/lameze/moodle into MOODLE_38_STABLE 2020-07-28 11:41:46 +08:00
Simey Lameze 975c1d4438 MDL-65453 core: fix behaviour of --skip-database option on install 2020-07-28 11:27:39 +08:00
Paul Holden 019e7dd26c MDL-69204 tool_dataprivacy: summary link only on current user profile. 2020-07-27 17:24:48 +01:00
Jun Pataleta 1b479562cd Merge branch 'MDL-66755-38' of https://github.com/SergioComeron/moodle into MOODLE_38_STABLE 2020-07-27 17:07:38 +08:00
AMOS bot d2b35aea26 Automatically generated installer lang files 2020-07-27 00:07:37 +00:00
AMOS bot 3678ad0949 Automatically generated installer lang files 2020-07-27 00:07:37 +00:00
Mikhail Golenkov 8c4893ffdc MDL-66626 assignfeedback_editpdf: Check page count for attempt.
Co-Authored-By: John Yao <johnyao@catalyst-au.net>
2020-07-27 09:51:54 +10:00
Mikhail Golenkov bab00d9b8c MDL-66626 assignfeedback_editpdf: Count files outside of foreach loop.
Co-Authored-By: John Yao <johnyao@catalyst-au.net>
2020-07-27 09:51:54 +10:00
AMOS bot 88723a6a1d Automatically generated installer lang files 2020-07-25 00:08:02 +00:00
Paul Holden 035c042f1e MDL-68706 customfield_textarea: allow field content to be cleared. 2020-07-24 13:44:58 +01:00
Paul Holden 6ed3f966b7 MDL-69353 admin: set page title when prompting for upgrade key. 2020-07-24 13:30:34 +01:00
Tim Hunt a7f70278c8 MDL-67002 quiz reports: fix sorting on Oracle in the responses report 2020-07-24 11:44:43 +01:00
Sergio Comerón ae1e1dfbd6 MDL-66755 forum: Subscription cancel when edit a message 2020-07-24 09:03:07 +02:00
Sam Marshall 5f417739f3 MDL-63252 tool_xmldb: convert default to float to avoid false positives 2020-07-24 07:54:02 +08:00
Simey Lameze 0d2f34b40d MDL-68968 core: fix wrong phpdoc on admin_externalpage 2020-07-24 07:46:33 +08:00
Amaia Anabitarte e0aa753fe1 MDL-69199 mod_quiz: Show timefinish in user Complete report 2020-07-23 18:54:25 +02:00
Victor Deniz Falcon f001dc447e weekly release 3.8.4+ 2020-07-23 16:10:30 +01:00
Victor Deniz Falcon cc80dec71e Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-07-23 16:10:25 +01:00
David Mudrák b89ebd255c MDL-68558 admin: Allow to go back to plugins check page on failed deps
Once the admin reaches the Plugin dependencies check with a failed
plugin dependency, the "Continue" button should take him/her to the
previous page where the dependency can be sorted out, or the plugin
installation cancelled. Also the "Cancel this installation" should work
on this page, too.

None of this was happening correctly because the page with failed
dependencies is loaded with "confirmplugincheck" set to 1 as a result
of confirming the previous step. We must explicitly override it back to
0 to navigate the user back to the previous step.
2020-07-23 17:05:03 +02:00
Bas Brands 0c773a6a16 MDL-67831 core_message: use space available for message index page
- the prevents the message reply box from being out of view when
a user has many conversations.
2020-07-23 11:34:52 +02:00
AMOS bot b45835b7b8 Automatically generated installer lang files 2020-07-23 00:07:56 +00:00
Victor Deniz Falcon 5aacc83bc4 Merge branch 'MDL-65819-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-07-22 19:01:36 +01:00
Ferran Recio ebb0e91226 MDL-55299 mod_feedback: fix quoted values donwload 2020-07-22 19:23:35 +02:00
Andrew Nicols 3ecf4dff52 MDL-69138 behat: Update session->visit() to use visit step 2020-07-22 16:48:37 +08:00
Andrew Nicols 3f2b9661d8 MDL-69138 behat: Add "I visit :localurl" step 2020-07-22 16:48:37 +08:00
Jun Pataleta 6b3d7a34dd Merge branch 'MDL-52052-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-07-22 13:46:59 +08:00
Jun Pataleta 2e38a7cc40 Merge branch 'MDL-68178-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-07-22 12:58:38 +08:00
Eloy Lafuente (stronk7) 95269fdb77 Merge branch 'MDL-69160-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-21 23:29:48 +02:00
Bas Brands 5a1745b254 MDL-69111 mod_forum: forum grading on small viewports
- changes to make the forum grading UI accessible in small
viewports to meet criterion 1.4.10 Reflow.
2020-07-21 17:42:55 +02:00
David Mudrák e271e28e78 MDL-68647 forum: Add index over posts privatereplyto field
This is to further improve the performance of searching of posts related
to the given user. Once both userid and privatereplyto are indexed, the
query planner can use the merged index to search for posts records.
2020-07-21 11:45:56 +02:00
David Mudrák 9cfcb4bf8a MDL-68647 forum: Improve the SQL performance in the privacy provider
The idea here is to replace the existing LEFT JOINs and
OR / IS NOT NULL conditions with INNER JOINs and ANDs. So we gather the
discussions data from all three areas in individual queries, make their
UNION. The GROUP BY was present before and maybe it is not even needed
any more (due to how UNION works) but it should not hurt to keep it.

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

Not directly related to the issue, but noticed while working on it.
2020-07-21 11:45:55 +02:00
Adrian Greeve 03670af6da Merge branch 'MDL-67657-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-21 14:49:14 +08:00
Ferran Recio 13f06f7a8e MDL-68423 message: avoid self-xss when send a message 2020-07-20 19:56:13 +02:00
Eloy Lafuente (stronk7) a080d4c0df Merge branch 'm38_MDL-67440' of https://github.com/danmarsden/moodle into MOODLE_38_STABLE 2020-07-20 17:08:31 +02:00
Leon Stringer ab7849c105 MDL-60501 themes: Fix closing <h4> in template
In site admin pages (/admin/search.php) <h4> elements were generated
with an incorrect second opening <h4> instead of a closing </h4>.
2020-07-20 15:20:42 +01:00
Bas Brands 756e148f31 MDL-66670 theme_boost: list bullet styling
Ensure lists with bullets are not cut off
2020-07-20 14:49:04 +02:00
Jake Dallimore 5a2ca41bba MDL-69319 mod_lti: style and docs changes in external tests 2020-07-20 15:04:10 +08:00
Jake Dallimore c9d1d8141f MDL-69319 mod_lti: replace try/catch with expectException in ext tests 2020-07-20 15:04:10 +08:00
Jake Dallimore 34616581c5 MDL-69319 mod_lti: remove unused vars from externallib_test 2020-07-20 15:04:10 +08:00
Jake Dallimore 33ec9e3a37 MDL-69319 mod_lti: move test data generation out of common setup 2020-07-20 15:04:10 +08:00
Jake Dallimore 147b984630 MDL-69319 mod_lti: call clean_returnvalue in external tests 2020-07-20 15:04:09 +08:00
Mihail Geshoski 4a2a779e12 MDL-68178 auth: CSRF protection for the resend confirmation email form
Credit to Chandra Kishor.
2020-07-20 12:31:06 +08:00
Adrian Greeve 6364b15e24 Merge branch 'MDL-69113_38' of https://github.com/jonof/moodle into MOODLE_38_STABLE 2020-07-20 10:37:49 +08:00
Mihail Geshoski b71744bb4d MDL-52052 gradeimport_csv: Do not skip rows with blank user fields 2020-07-20 08:55:51 +08:00
Eloy Lafuente (stronk7) 241eacaa7a Merge branch 'MDL-69278-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-18 11:56:15 +02:00
Paul Holden 37f3c318ea MDL-65819 message: send contact requests using recipient language. 2020-07-17 13:38:08 +01:00
Sara Arjona 4a6de87cae weekly release 3.8.4+ 2020-07-16 21:28:30 +02:00
Andrew Nicols a89aaec1af 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 00df049b9a MDL-67657 behat: Convert existing uses of executeScript 2020-07-16 11:06:31 +08:00
Andrew Nicols a37313a6d1 MDL-67657 behat: Add wrapper for JS execution 2020-07-16 11:05:32 +08:00
Jun Pataleta b3c5e4f5d7 Merge branch 'MDL-69215-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-16 09:42:42 +08:00
Andrew Nicols 5eb38638bb MDL-69278 behat: Correct variable name 2020-07-16 08:30:13 +08:00
Andrew Nicols aeb85b66f2 MDL-69278 behat: Mark tests as failed when unable to start Session 2020-07-16 08:30:13 +08:00
Andrew Nicols 7ba288d1d0 MDL-69215 output: Correct use of icon_system::instance 2020-07-16 07:30:32 +08:00
Andrew Nicols d7e8f35e91 MDL-69215 output: Correct font awesome for themes 2020-07-16 07:30:32 +08:00
Eloy Lafuente (stronk7) db6f80a784 Merge branch 'MDL-69165-38' of https://github.com/HuongNV13/moodle into MOODLE_38_STABLE 2020-07-15 23:47:52 +02:00
Charles Fulton b20a875381 MDL-69074 admin: ensure consistent default for getremoteaddrconf 2020-07-15 19:06:06 +02:00
Sara Arjona f3d6fa182b Merge branch 'MDL-68605_38' of https://github.com/t-schroeder/moodle into MOODLE_38_STABLE 2020-07-15 18:52:57 +02:00
Sara Arjona 68a6b6db8d Merge branch 'MDL-68210-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2020-07-15 18:19:54 +02:00
Shamim Rezaie 9a66680ae1 MDL-66707 mod_forum: do not blindly mark discussion replies as read 2020-07-15 22:27:22 +10:00
Sara Arjona 8d90570067 Merge branch 'MDL-67671_38_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_38_STABLE 2020-07-15 14:11:55 +02:00
Sara Arjona a30f7f13ea Merge branch 'MDL-57678-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-07-15 12:56:54 +02:00
Jun Pataleta d780b1866e MDL-57678 core_course: Remove padding of nbsp's on category names
Padding nested course categories by space to make them render in a tree
structure does not really make a lot of sense as they are already being
rendered as full paths. It's simpler to show them without the
indentation.
2020-07-15 18:28:10 +08:00
Sara Arjona 273ef0b4e3 Merge branch 'MDL-69068-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-15 12:20:39 +02:00
Andrew Nicols 8402724494 MDL-69068 behat: Allow singular, pivotted data generators 2020-07-15 15:27:31 +08:00
Andrew Nicols 83b5aea43c MDL-69068 behat: New step to support singular generators 2020-07-15 15:25:27 +08:00
Sara Arjona 51f4f8c612 Merge branch 'MDL-68715-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-07-14 14:32:10 +02:00
Shamim Rezaie 5d9fb70f70 MDL-68444 calendar: Improve how screenreaders say week titles
Also removed the scope attribute from the mini-calendar table
because according to https://www.w3.org/TR/WCAG20-TECHS/H63.html
it was not needed:
  Note 1: For simple tables that have the headers in the first row
  or column then it is sufficient to simply use the TH elements without
  scope.
2020-07-14 22:12:59 +10:00
Shamim Rezaie 0368c8e2a8 MDL-68444 calendar: Improve how screenreaders read day titles
Screenreaders now know if each day has any event or not
2020-07-14 22:12:59 +10:00
Paul Holden 9fea1cc6e4 MDL-68715 completion: fix form default value for course prerequisites.
Adds filtering on the completion criteria form to ensure we are only
selecting actual course instances of this type. Prior to this change
we would also get NULL values from unrelated criteria types.
2020-07-14 12:45:54 +01:00
Sara Arjona b09e569189 Merge branch 'MDL-69228-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-14 12:41:33 +02:00
Sara Arjona 9afc404947 Merge branch 'MDL-69115-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-07-13 14:24:26 +02:00
Andrew Nicols 70d6af63ba MDL-69160 workshop: Ensure steps are chained 2020-07-13 14:22:31 +08:00
Andrew Nicols 4338982098 MDL-69160 behat: Add form field setter step 2020-07-13 14:22:31 +08:00
Eloy Lafuente (stronk7) 8634f2b672 Moodle release 3.8.4 2020-07-12 12:12:53 +02:00
Leon Stringer 678ca3ded7 MDL-69252 templates: Invalid HTML
Invalid HTML generated when the page count exceeded the maximum number
of page links to display: <span>...</a>.  Also added example context.
2020-07-11 12:54:43 +01:00
AMOS bot 7ec2bf3776 Automatically generated installer lang files 2020-07-10 19:52:55 +00:00
Eloy Lafuente (stronk7) a6227d5675 weekly release 3.8.3+ 2020-07-10 20:22:15 +02:00
Eloy Lafuente (stronk7) e4d47ed2cc Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-07-10 20:22:09 +02:00
Jake Dallimore 4d069c9339 Merge branch 'MDL-69232-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-10 15:12:11 +08:00
Andrew Nicols 3e741db933 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 90221b5ccf MDL-69232 behat: Make selenium start more fault tolerant
The session was previously only started once, but has now been moved to
restart between each test. Because of this the `$session->start()` is
now called more frequently which exposes a pre-existing issue whereby
Selenium will periodically fail to start.

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

Since the session is restarted more frequently, and now between every
test, it no longer makes sense to do this. The test should only be
_stopped_ if the first attempt to obtain the Session fails. Once a
Session has been retrieved at least once it no longer makes sense to
assume that the failure was a configuration failure, but a connection
failure. Therefore subsequent tests should be attempted.
2020-07-10 08:40:29 +08:00
Mark Johnson 2b36e5be2e MDL-67671 backup: Fix modname display on backup form 2020-07-09 10:13:08 +01:00
Jake Dallimore f2de1293e1 Merge branch 'MDL-69135-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-09 10:38:51 +08:00
Michael Hawkins ea79b6597a 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:01 +08:00
Andrew Nicols 3b97a56c6a MDL-69232 behat: Add debugging information to Selenium fails 2020-07-09 09:45:35 +08:00
Andrew Nicols 07414b90e3 MDL-69232 behat: Move suite tests to BeforeSuite hook 2020-07-09 09:45:34 +08:00
Eloy Lafuente (stronk7) d49c18bba5 Merge branch 'MDL-69134-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-08 20:53:32 +02:00
Huong Nguyen 82ddfd7ea6 MDL-69165 Questions: Incorrect id used in init_submit_button function 2020-07-08 11:48:56 +07:00
Andrew Nicols ecc61a125b Merge branch 'MDL-68784-38' of https://github.com/Peterburnett/moodle into MOODLE_38_STABLE 2020-07-08 12:37:56 +08:00
Andrew Nicols d8538f29c4 Merge branch 'm38_MDL-66322_Travis_Run_Using_Docker_ExtTests' of https://github.com/scara/moodle into MOODLE_38_STABLE 2020-07-08 12:22:20 +08:00
Peter Burnett 881b487433 MDL-68784: Updated variable for graph report 2020-07-08 14:07:35 +10:00
Andrew Nicols da91dd3ea0 MDL-69228 tool_mobile: Hide dependant settings 2020-07-08 11:50:18 +08:00
Andrew Nicols e0c0a0c05c Merge branch 'MDL-60494-stray_img_end-38' of https://github.com/leonstr/moodle into MOODLE_38_STABLE 2020-07-08 09:25:11 +08:00
Andrew Nicols 246a03f7dd MDL-69134 competencies: Behat fails randomly opening dialogues 2020-07-08 09:21:54 +08:00
Jake Dallimore 121373ec8f MDL-68210 mod_lesson: fix random failure in override behat test 2020-07-08 09:10:20 +08:00
Jake Dallimore 8fb613ee9f MDL-68210 overrides: allow copy and delete of inactive overrides
This brings lesson and assign in line with the expected behaviour
already implemented in quiz. When an override is inactive, all controls
are shown.
2020-07-08 09:10:20 +08:00
Andrew Nicols 44fd35e8ee Merge branch 'MDL-69109-38-2' of git://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2020-07-08 08:41:07 +08:00
Matt Clarkson 63b646acb1 MDL-67440 analytics: optimse delete's in clean up task. 2020-07-08 11:19:09 +12:00
Matteo Scaramuccia a28a24e2f2 MDL-66322 travis: Configure a local copy of 'exttests' 2020-07-07 21:55:47 +02:00
Eloy Lafuente (stronk7) 3639dc845e Merge branch 'MDL-69086-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-07 19:17:29 +02:00
Eloy Lafuente (stronk7) d63c297351 Merge branch 'm38_MDL-68588_Hide_Backuptempdir_From_Message_And_Debuginfo' of https://github.com/scara/moodle into MOODLE_38_STABLE 2020-07-07 19:10:51 +02:00
Eloy Lafuente (stronk7) 54faefbefb Merge branch 'MDL-68784-38' of https://github.com/Peterburnett/moodle into MOODLE_38_STABLE 2020-07-07 18:52:36 +02:00
Tim Schroeder 8c3e24b46c MDL-68605 mod_assign: return grp submissns from ws
Co-authored-by: Septatrix <24257556+Septatrix@users.noreply.github.com>
2020-07-07 12:56:28 +02:00
Víctor Déniz Falcón 735de9020e MDL-69093 enrol_manual: added check for allowed roles a user can assign 2020-07-07 08:33:18 +02:00
Andrew Nicols 71e5f30504 Merge branch 'MDL-69106-38' of git.in.moodle.com:cameron/moodle into MOODLE_38_STABLE 2020-07-07 14:16:48 +08:00
Eloy Lafuente (stronk7) 5b9c5ccf83 Merge branch 'MDL-60827-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-07-07 00:17:35 +02:00
Andrew Nicols 46b6ca69d1 Merge branch 'MDL-69158-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-07-06 12:12:47 +08:00
Jake Dallimore dbd41fa613 Merge branch 'MDL-69136-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-06 10:44:50 +08:00
Michael Hawkins 381f45d005 MDL-69129 report: Limit config changes report sort direction values 2020-07-06 10:11:39 +08:00
Mihail Geshoski 0397309abf MDL-60827 oauth2: Consider requireconfirmation setting on login 2020-07-06 10:05:50 +08:00
Michael Hawkins dca95c6fe4 MDL-69128 admin: Convert HTML entities when populating tasklogs filter 2020-07-06 10:05:05 +08:00
AMOS bot 112fc4d513 Automatically generated installer lang files 2020-07-06 00:08:36 +00:00
Leon Stringer 3b81550b8e MDL-60494 mod_lti: Invalid </img>, example context
<img> was followed by an invalid </img>.  Also added example context for
template so it passes CI checks.
2020-07-05 15:58:35 +01:00
Matteo Scaramuccia 0cf43f11f0 MDL-68588 Backup: Hide ->backuptempdir in exception info 2020-07-03 21:19:12 +02:00
Eloy Lafuente (stronk7) 035f5d9423 weekly release 3.8.3+ 2020-07-03 18:41:29 +02:00
Eloy Lafuente (stronk7) 1bae8bd482 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-07-03 18:41:24 +02:00
Jake Dallimore 3bd1b121ed Merge branch 'MDL-69130-38-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-07-02 12:08:53 +08:00
Jake Dallimore db58c4cdf2 Merge branch 'MDL-69149-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-02 11:57:34 +08:00
Jake Dallimore b730bb5702 Merge branch 'MDL-69122-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-07-02 11:49:35 +08:00
AMOS bot d45a6dd3c3 Automatically generated installer lang files 2020-07-02 00:08:16 +00:00
Eloy Lafuente (stronk7) 0097d8d481 Merge branch 'MDL-69072-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-07-01 23:24:10 +02:00
Jake Dallimore ef6538a8c7 Merge branch 'MDL-68584-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-07-01 16:43:14 +08:00
Jun Pataleta 7a54747c9a MDL-69115 course: More course management accessibility fixes
* Added aria-label for category single select element when on Courses
view mode.
* Fix correct labelling of custom control checkboxes. Instead of adding
aria-label in the label element, add an sr-only span within the label.
* Remove inappropriate 'group' role for the list of courses.
The list of courses is not being rendered as a tree structure
so adding a 'group' role to the list of courses is not really
necessary.
* Add aria-label for the search courses field.
* Add legend for the search courses fieldset.
* Use the primary colour for the category selection highlight instead
of the info colour.
* Changed the labels for the up/down icons using moveup/movedown
lang strings.
2020-07-01 14:45:37 +08:00
Paul Holden fe65ebcf1c MDL-69150 message_airnotifier: correct apps portal link. 2020-07-01 08:39:59 +08:00
Paul Holden bc2d3e8bb9 MDL-69151 message_airnotifier: start output before accesskey request.
This allows debugging generated by the request to be shown on the
page.
2020-07-01 08:30:10 +08:00
Andrew Nicols d6ce289176 Merge branch 'MDL-67172-38' of git://github.com/cescobedo/moodle into MOODLE_38_STABLE 2020-07-01 07:47:53 +08:00
Marina Glancy d690ed3dd3 MDL-69109 theme: try to load icons from the current theme 2020-06-30 10:13:45 +02:00
Marina Glancy 704153c454 MDL-69109 core: use different cache keys for FA icon maps 2020-06-30 10:13:45 +02:00
Cameron Ball 37ee0fd966 MDL-69106 assignfeedback_editpdf: Keep files in conversion queue
In some circumstances, a submission waiting to be converted needs to persist
in the conversion queue so that it can be polled on subsequent cron runs.
2020-06-30 13:59:28 +08:00
Peter Burnett 58bf57d9d3 MDL-68784 scorm: Removed limit on allowed scorm users in report 2020-06-30 15:21:15 +10:00
Luca Bösch 71d4cc2f4e MDL-69158 block_blog_menu: format search form. 2020-06-29 11:13:46 +02:00
Andrew Nicols 913b96cb21 MDL-69136 behat: Improve reliability of navigation steps 2020-06-29 11:36:36 +08:00
Andrew Nicols 7c2fef6484 MDL-69136 behat: Support find on a NodeElement 2020-06-29 11:36:30 +08:00
Andrew Nicols 687c727cf9 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 ee6d899130 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 c18b08912f MDL-69072 behat: Relaunch browser session between scenarios 2020-06-26 21:17:22 +08:00
Andrew Nicols a46018529b MDL-69149 core_grade: Correct xpath attribute selector 2020-06-26 19:59:56 +08:00
Andrew Nicols 5ae95f265a MDL-69135 core_calendar: PendingJS for event filtering 2020-06-26 07:58:36 +08:00
Luca Bösch 456530205e MDL-68584 core_question: flexbox compatible separator for question types
* the br tag does not work well in a flexbox context, a 100% with div
works in both classic and boost.
2020-06-25 21:57:43 +02:00
cescobedo 6bfddeea21 MDL-67172 core_h5p: Prevent synchronous access to save the same h5p
Backport MDL-67095.
When deploying a new H5P resource we need to ensure that
we don't start deploying the same H5P in another thread
(e.g. for another session/user).
2020-06-25 18:42:40 +02:00
Eloy Lafuente (stronk7) 4557b7fed2 weekly release 3.8.3+ 2020-06-25 18:06:27 +02:00
Eloy Lafuente (stronk7) d93d8f65a8 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-06-25 18:06:22 +02:00
Helen Foster 406d9bb40f MDL-69130 lang: Import fixed English strings (en_fix) 2020-06-25 14:30:09 +02:00
Jonathon Fowler cd8c136c70 MDL-69113 assign: save grader app workflow/marker filters correctly 2020-06-25 14:39:54 +10:00
Bas Brands a66d07b15c MDL-69122 report_competency: fix clearfix
- a misplaced clearfix caused part of the recontrols to be
inaccessible
2020-06-24 09:15:39 +02:00
Jake Dallimore 44b19c47bf Merge branch 'MDL-68992-38_france_digital_age' of https://github.com/martignoni/moodle into MOODLE_38_STABLE 2020-06-24 09:40:52 +08:00
Eloy Lafuente (stronk7) 81b393a717 Merge branch 'MDL-66568-38-2' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-06-23 17:57:33 +02:00
Nicolas Martignoni 6fb0f6f941 MDL-68992 Privacy: Update default minimal digital age of consent
Updating default minimal digital age of consent according to current legislation,
that was updated for several countries since 2018.
2020-06-23 12:23:36 +02:00
Jake Dallimore 4d26e345d0 Merge branch 'MDL-69021-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-06-23 11:31:48 +08:00
Adrian Greeve 1c8b779f27 Merge branch 'MDL-68841-3.8.3' of https://github.com/DinhHien0307/moodle into MOODLE_38_STABLE 2020-06-23 09:50:54 +08:00
Bas Brands a4099f2932 MDL-69021 theme_boost: improve link styles in alerts
- provide default styles for links in alerts if the .alert-link
css class is omitted.
2020-06-22 16:51:03 +02:00
Adrian Greeve 2557a7f8ff Merge branch 'MDL-69077_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-06-22 10:42:49 +08:00
AMOS bot 9518c81ab8 Automatically generated installer lang files 2020-06-21 00:07:28 +00:00
Sara Arjona befe7cce8d Merge branch 'MDL-69008-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-06-19 16:49:29 +02:00
Andrew Nicols 2dc698fb17 MDL-69086 theme_boost: Improve pendingJs checks for bootstrap
Where an element, like an `alert`, is closed it is removed from the DOM
before the event fires (this is a correct behaviour).

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

This change moves the end event listener to only be added after a start
event has been fired, and to attach directly to the HTMLElement where it
will be fired. This means that the Event handler will still be called,
even though it has been removed from the DOM, because it does not need
to bubble up to the body.
2020-06-19 08:17:45 +08:00
Sara Arjona 898415efec weekly release 3.8.3+ 2020-06-18 14:13:55 +02:00
Sara Arjona 5b5233321e Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-06-18 14:13:53 +02:00
Victor Deniz Falcon 4d4ad0fe60 Merge branch 'MDL-66899-log-quiz-regrade_38' of https://github.com/rboyatt/moodle into MOODLE_38_STABLE 2020-06-18 04:55:12 +01:00
Tim Hunt 8fcb1b459d MDL-69077 questions: question tag capabilties are relevant 2020-06-17 13:07:45 +01:00
Jun Pataleta 8816107de4 Merge branch 'MDL-68890-3.8.3' of https://github.com/DinhHien0307/moodle into MOODLE_38_STABLE 2020-06-17 19:54:19 +08:00
Jun Pataleta 42cf09b5b4 MDL-69008 core: Fix accessibility issues in paged content templates
* Added menuitem role for the "Show x per page" menu.
* Added appropriate aria-labels for the links in the paging bar.
2020-06-17 15:59:57 +08:00
Jake Dallimore 408c793ed7 Merge branch 'MDL-68215-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-06-17 14:59:02 +08:00
Jun Pataleta 6324b63372 Merge branch 'MDL-68971_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-06-17 11:35:01 +08:00
Jun Pataleta 3c91dc0784 Merge branch 'MDL-67294-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-06-17 10:34:06 +08:00
Andrew Nicols 4d3658f7d8 MDL-66568 behat: Reset theme CSS between scenarios 2020-06-17 07:51:47 +08:00
Andrew Nicols bcbc91091c MDL-66568 behat: Support building of themes for behat 2020-06-17 07:51:47 +08:00
Andrew Nicols d57acc9d80 MDL-66568 core_output: Return built theme CSS 2020-06-17 07:51:47 +08:00
Mihail Geshoski bc125390bb MDL-67294 assignsubmission_file: Make sure record exists before updating 2020-06-17 00:55:57 +08:00
Víctor Déniz Falcón f097a1a20f Merge branch 'MDL-69049-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-06-16 17:52:32 +01:00
Jun Pataleta adc032b170 Merge branch 'MDL-68436_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-06-16 14:39:02 +08:00
Jun Pataleta 6c8f7e1ce2 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:42:10 +08:00
Luca Bösch 8cb7cb1fdc MDL-68215 block_activity_result: Format elements more nicely. 2020-06-15 15:25:28 +02:00
hiendinh 5f6ce419c4 MDL-68890 progressbar: prevent display exist file's progress bar 2020-06-15 10:53:12 +07:00
AMOS bot 74235813b3 Automatically generated installer lang files 2020-06-14 00:07:26 +00:00
Sara Arjona 409baab766 weekly release 3.8.3+ 2020-06-11 18:03:58 +02:00
Andrew Nicols ee884c9728 Merge branch 'MDL-69006-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-06-11 13:05:39 +08:00
Andrew Nicols c6a9898ed0 Merge branch 'MDL-69002-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-06-11 11:21:16 +08:00
Adrian Greeve 80c3dcb8bf MDL-66601 atto_image: Remove bad build files. 2020-06-11 10:48:36 +08:00
Adrian Greeve 3c142d923f Merge branch 'MDL-66601-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-06-11 09:55:51 +08:00
Eloy Lafuente (stronk7) 53e4c04237 Merge branch 'MDL-68954-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-06-11 00:10:28 +02:00
Bas Brands 8cf375b627 MDL-69006 repository_flickr: flickr authentication fails
- Flickr does not like useragents including the word "Bot"
2020-06-10 15:56:27 +02:00
Tim Hunt 5e7c083dba MDL-68436 atto_recordrtc: only works once per page 2020-06-10 13:48:12 +01:00
Sara Arjona 7d896212f2 MDL-69002 core_badges: move backpack validation to a separate page
Instead of running the site backpack validation every time badges/backpacks.php
page is loaded, an action button has been added to the backpacks with OB set
to 2.0 to let admins running manually this verification when needed.
2020-06-10 13:01:29 +02:00
Sara Arjona 3a6950ccd7 MDL-69002 core_badges: add methods to support backpack validation
A more generic method has been added to the API to validate the
backpack connection (for now, there was only one method for
validating current backpack).
Besides, a renderer has been added to display this information
depending on the backpackid.
2020-06-10 12:45:14 +02:00
Sara Arjona 24562c031c MDL-69002 core_badges: remove site backpack verification from settings
This site backpack verification is not required so, instead of
running it always here, it will be moved to a separate page to let
admins decide when to check it.
2020-06-10 12:42:03 +02:00
Mihail Geshoski deca8028d9 MDL-66601 atto_image: Set the max-height of the image selection dialogue 2020-06-10 12:21:21 +08:00
Jun Pataleta 3063e8415a Merge branch 'MDL-68864-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-06-10 11:26:21 +08:00
Jun Pataleta ccbe61ee98 MDL-68864 qtype_multichoice: Rebuild clearchoice source map 2020-06-10 11:21:00 +08:00
Bas Brands ef874ad928 MDL-68864 qtype_multichoice: shift focus to first option on keyboard tab
- This prevents losing focus when using keyboard navigation
2020-06-10 11:15:17 +08:00
Bas Brands 9a33db6bea MDL-68864 qtype_multichoice: clearchoice
- Reverted changes from MDL-67901
2020-06-10 11:15:17 +08:00
Jake Dallimore b51501b403 Merge branch 'MDL-68972-38-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-06-10 09:16:08 +08:00
Jake Dallimore 4f142bccce Merge branch 'MDL-68995-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-06-10 08:53:55 +08:00
Helen Foster dac9cc3139 MDL-68972 lang: Import fixed English strings (en_fix) 2020-06-09 21:08:54 +02:00
Paul Holden 281c882327 MDL-68995 atto_image: remove initial dialogue image src attribute.
It caused a spurious request to be sent to the server on display.
2020-06-09 15:47:55 +01:00
Sara Arjona bbc79e490a weekly release 3.8.3+ 2020-06-09 12:14:38 +02:00
Tim Hunt 666365e46b MDL-68971 webservice: errors should give enough info to find the problem 2020-06-09 11:09:45 +01:00
Russell Boyatt 28509546d3 MDL-66899 quiz: Log a regrading event when quiz attempt is regraded. 2020-06-09 10:08:24 +01:00
Russell Boyatt a860a76a68 MDL-66899 quiz: Adding test for regrading quiz event. 2020-06-09 10:08:03 +01:00
Mihail Geshoski 8d650d9a01 MDL-68954 repository_flickr_public: Return only photo media 2020-06-09 12:37:35 +08:00
Mihail Geshoski bbaab1109e MDL-68954 repository_flickr_public: Handle when photo cannot be found 2020-06-09 12:37:34 +08:00
Jake Dallimore c8a07a5b68 Merge branch 'MDL-68929-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-06-08 11:11:00 +08:00
Andrew Nicols abb076ebbd Merge branch 'MDL-68899-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-06-08 10:29:27 +08:00
Mihail Geshoski 56d6a5d731 MDL-68899 theme_classic: Fix dashboard course cards rendering
Co-authored-by: Bas Brands <bas@moodle.com>
2020-06-08 09:16:00 +08:00
Mihail Geshoski 59417f0b1d MDL-68929 core_filepicker: Fix radio button alignment 2020-06-07 11:40:47 +08:00
Eloy Lafuente (stronk7) 4180fe0f42 weekly release 3.8.3+ 2020-06-06 18:12:56 +02:00
Eloy Lafuente (stronk7) 8a53b489bb Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-06-06 18:12:52 +02:00
AMOS bot fecb0dcceb Automatically generated installer lang files 2020-06-06 00:07:27 +00:00
Sara Arjona 2b0ae390d7 MDL-68704 h5plib_v124: upgrade JQuery version to 1.12.4 2020-06-05 19:47:49 +01:00
Eloy Lafuente (stronk7) 1f274f5032 Merge branch 'MDL-68888-38-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-06-05 19:23:07 +02:00
Sara Arjona 6f0115e399 weekly release 3.8.3+ 2020-06-05 13:24:16 +02:00
Helen Foster 4369ef0304 MDL-68888 lang: Import fixed English strings (en_fix) 2020-06-05 09:35:38 +02:00
Adrian Greeve fe3d7cdbaa Merge branch 'MDL-67773' of https://github.com/radzisze/moodle into MOODLE_38_STABLE 2020-06-05 11:48:52 +08:00
Anthony Radziszewski c852856ba7 MDL-67773 course: Make sure tags are enabled before logging the setting. 2020-06-04 11:43:01 -06:00
Adrian Greeve 019420fd11 Merge branch 'MDL-68203-decode-url-quiz-restore-MOODLE_38_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_38_STABLE 2020-06-04 08:31:50 +08:00
Sara Arjona c2263f903d Merge branch 'MDL-68772-38' of https://github.com/Clyxz/moodle into MOODLE_38_STABLE 2020-06-03 13:18:00 +02:00
Jake Dallimore 719333e0ec Merge branch 'MDL-68875_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-06-03 12:29:08 +08:00
Andrew Nicols 3a98b992e9 Merge branch 'MDL-68312-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-06-03 08:09:41 +08:00
Martin Hanusch 27a12aba40 MDL-68772 mod_quiz: Navigation overlay fix 2020-06-02 16:53:33 +02:00
Eloy Lafuente (stronk7) b529ffad65 MDL-68875 privacy: Keep moodle_content_writer->get_path() the same
In MDL-62853 a new clean_param(PARAM_PATH) was added to the
moodle_content_writer->get_path() method. And this caused some
Windows tests to start failing.

The problem is that clean_param(PARAM_PATH) does normalise directory
separators to be always forward backslashes and that's normally ok
but the get_path() method has some DIRECTORY_SEPARATOR dependent code
that stopped working under windows.

After analysing various solutions, and trying to keep the behavior
EXACTLY like it was before MDL-62853, but with the cleaning included
we have applied 2 changes:

b) Move the clean_param() to later within the array_map() function,
that way the code there, that uses DIRECTORY_SEPARATOR will continue
working the same.

b) As far as there are more DIRECTORY_SEPARATOR dependent code later
in the function, also perform a str_replace() to convert back to the
OS directory separator.

Those 2 points together (a and b) make the behavior to be 100% the
original one, with separators being kept and the paths being cleaned.

This solution corresponds 100% with the proposed fixes named 3) and
4) in the issue.

Final note... all that DIRECTORY_SEPARATOR maybe needs a review because
it really shouldn't be used unless strictly needed. But that falls out
from this issue which goal was to keep things safely working like they
were before the regression (but with the cleaning applied).
2020-06-02 15:53:45 +02:00
Sara Arjona b5b8b1a486 weekly release 3.8.3+ 2020-06-02 13:03:13 +02:00
Sara Arjona 2f360b90c5 Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-06-02 13:03:11 +02:00
Adrian Greeve efa47a2ba5 Merge branch 'MDL-68828-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-06-02 09:32:33 +08:00
Andrew Nicols 4b47df0236 Merge branch 'MDL-67518_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-06-02 09:20:19 +08:00
Adrian Greeve d9fe693347 Merge branch 'MDL-68723-38' of git://github.com/mihailges/moodle into MOODLE_38_STABLE 2020-06-02 08:58:37 +08:00
Eloy Lafuente (stronk7) 74206f3d78 Merge branch 'MDL-63284-38' of https://github.com/Clyxz/moodle into MOODLE_38_STABLE 2020-06-02 00:25:17 +02:00
Eloy Lafuente (stronk7) 0fce71647f Merge branch 'MDL-68866-38' of https://github.com/mchurchward/moodle into MOODLE_38_STABLE 2020-06-02 00:14:42 +02:00
Eloy Lafuente (stronk7) 3d50844c9f Merge branch 'MDL-68844-38' of https://github.com/roland04/moodle into MOODLE_38_STABLE 2020-06-02 00:09:48 +02:00
Mike Churchward 661c7a1988 MDL-68866 accesslib: Fixing parameter documentation. 2020-06-01 13:42:16 -04:00
Víctor Déniz Falcón f8f58c441b Merge branch 'MDL-68353-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-06-01 16:52:24 +01:00
Shamim Rezaie cdb0af69e1 MDL-68353 theme_classic: Update filepicker xpath selector 2020-06-01 03:45:32 +10:00
AMOS bot 85da65606b Automatically generated installer lang files 2020-05-30 00:07:22 +00:00
Martin Hanusch 6e64255df2 MDL-63284 question: Moving questions with tags disabled bug fix 2020-05-29 16:39:32 +02:00
Eloy Lafuente (stronk7) ec602d2f26 MDL-67518 phpunit: avoid DB sorting randomness in test
While reading from mdl_config, sometimes this test was failing
because an order was being presumed. Now we convert the records
array to an associative one to perform tests against it.
2020-05-29 16:26:07 +02:00
Jun Pataleta 6079a72373 Merge branch 'MDL-68353-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-05-29 22:25:54 +08:00
Sara Arjona 111fc893da weekly release 3.8.3+ 2020-05-29 12:52:30 +02:00
Sara Arjona 5d7f88d98b Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-05-29 12:52:27 +02:00
Mikel Martín 3eb69a0a9e MDL-68844 formslib: Fix inline layout for static elements 2020-05-29 11:11:40 +02:00
Shamim Rezaie 465c6e7c45 MDL-68353 test: Update existing tests to work with file elements 2020-05-29 14:51:58 +10:00
Shamim Rezaie 46323748fa MDL-68353 test: Update filemanager/filepicker xpath selector 2020-05-29 14:51:58 +10:00
Shamim Rezaie 32d28f8fac MDL-68353 test: get_field_locator to support custom field labels 2020-05-29 14:51:58 +10:00
Shamim Rezaie 2591f4ce79 MDL-68353 form: filepicker label fix 2020-05-29 14:51:54 +10:00
Shamim Rezaie c3764823cd MDL-68353 admin: Not use label tag in admin setting elements when needed 2020-05-29 14:35:46 +10:00
Shamim Rezaie 49e32e25ff MDL-68353 message: enclose privacy settings within a fieldset 2020-05-29 14:35:46 +10:00
Shamim Rezaie 46962930f7 MDL-68353 core: replace invalid labels with div 2020-05-29 14:35:46 +10:00
Shamim Rezaie 4c97f30360 MDL-68353 form: filemanager label fix 2020-05-29 14:35:43 +10:00
Jun Pataleta 35282e4d1a Merge branch 'MDL-64175-38' of git://github.com/sarjona/moodle into MOODLE_38_STABLE 2020-05-29 12:01:58 +08:00
Shamim Rezaie 78f4960bce MDL-68353 form: Only include the size attribute if there is a size set 2020-05-29 13:52:39 +10:00
Shamim Rezaie 6fa2f55cd0 MDL-68353 form: Removed the size attribute
The size attribute does not work with the checkbox input type.
2020-05-29 13:52:39 +10:00
Shamim Rezaie d3756efc83 MDL-68353 core: do not output empty labels 2020-05-29 13:52:38 +10:00
Shamim Rezaie 261804e95c MDL-68353 core: Set aria-label for close buttons on YUI dialogues 2020-05-29 13:52:36 +10:00
Mihail Geshoski 53c46ffb2e MDL-68723 filepicker: Display parent content in filemanger tree view 2020-05-29 11:46:32 +08:00
AMOS bot 7ba5f4896e Automatically generated installer lang files 2020-05-29 00:07:50 +00:00
Sara Arjona 3a76c07806 MDL-64175 atto_media: update advanced settings
Some OS, such as Ubuntu, are slightly changing the audio attributes,
from <audio attribute1="true"> to <audio attribute1>.
This patch is for reviewing this piece of code and covering both cases.
2020-05-28 17:27:16 +02:00
Eloy Lafuente (stronk7) 1794636ee6 Merge branch 'MDL-68753-38-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_38_STABLE 2020-05-28 13:02:29 +02:00
Sara Arjona 24906971d7 Merge branch 'MDL-68244-38' of https://github.com/Chocolate-lightning/moodle into MOODLE_38_STABLE 2020-05-28 12:42:50 +02:00
Sara Arjona 1ac59631d8 Merge branch 'MDL-68565-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-05-28 12:00:32 +02:00
hiendinh 4a77582d16 MDL-68841 Modal dialogs: Wrong behavior of popup 2020-05-28 16:33:11 +07:00
Eloy Lafuente (stronk7) 2140fe5549 Merge branch 'MDL-68789-38' of git://github.com/crazyserver/moodle into MOODLE_38_STABLE 2020-05-28 10:47:06 +02:00
Pau Ferrer Ocaña fc13b8c1a0 MDL-68789 behat: Rename the app from Moodle Mobile to Moodle app 2020-05-28 08:40:54 +02:00
Jake Dallimore f4163d2748 Merge branch 'MDL-67903-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-05-28 13:59:13 +08:00
Adrian Greeve a90af06899 Merge branch 'MDL-68847-38' of https://github.com/snake/moodle into MOODLE_38_STABLE 2020-05-28 12:01:42 +08:00
Jake Dallimore 81e276c743 Merge branch 'mdl-68425-m38' of https://github.com/deraadt/moodle into MOODLE_38_STABLE 2020-05-28 11:24:07 +08:00
Jake Dallimore 45da2ac9d3 MDL-68847 mod_url: fix bug when using dnd to handle urls
This generates a notice, which wasn't seen because the feature works
asynchronously.
2020-05-28 09:32:34 +08:00
Andrew Nicols 8c83815ab1 Merge branch 'MDL-68846_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-05-28 07:35:59 +08:00
Paul Holden e34877300c MDL-68565 tool_usertours: account for optional config in WS response. 2020-05-27 22:10:56 +01:00
Eloy Lafuente (stronk7) e917a595b2 MDL-68846 behat: Avoid asserting AM/PM strings. They are not cross-os
The exists/contains steps of behat are case-sensitive, in the other
side, depending of the OS and locales, time functions are not 100%
consistent. See https://bugs.php.net/bug.php?id=76378 for example.

So only solutions are:

1) Create a specific new step performing the checks case insensitively.
2) Avoid making AM / PM part of the checks.

Here we have opted by the 2nd approach, it's not critical part to check.
2020-05-27 18:05:07 +02:00
Thomas.Ludwig 852cda447f MDL-67903 core_grades: remove outdated CSS for grade import form 2020-05-27 16:02:11 +02:00
Sara Arjona 9e2cb2075c Merge branch 'MDL-68343-38' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-05-27 15:09:52 +02:00
Sara Arjona 13b26170b9 Merge branch 'MDL-68667-38' of git://github.com/aanabit/moodle into MOODLE_38_STABLE 2020-05-27 12:27:00 +02:00
Jake Dallimore 6f792b5ed8 Merge branch 'MDL-52138-38-take4' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-05-27 14:25:52 +08:00
Andrew Nicols 1612572a62 Merge branch 'MDL-68765-M38' of https://github.com/ised-isde-canada/moodle into MOODLE_38_STABLE 2020-05-27 12:50:13 +08:00
Andrew Nicols 5c5b0ee137 Merge branch 'm38_MDL-68054' of https://github.com/danmarsden/moodle into MOODLE_38_STABLE 2020-05-27 12:14:12 +08:00
Jun Pataleta 582e43bebe Merge branch 'MDL-68750-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-05-27 11:04:04 +08:00
Andrew Nicols 2ea2d6a72f MDL-68750 tool_dataprivacy: Correct behat test modal checks 2020-05-27 10:40:30 +08:00
Ilya Tregubov 37d7820816 MDL-68203 restore: Decode quiz links when restore into existing course
or duplicating.
2020-05-27 10:39:49 +10:00
Eloy Lafuente (stronk7) fc2c76e78e Merge branch 'MDL-68789-38' of git://github.com/crazyserver/moodle into MOODLE_38_STABLE 2020-05-26 23:42:56 +02:00
Luca Bösch 4c5684135a MDL-52138 core_grades: gradebook striped styling 2020-05-26 23:32:22 +02:00
Eloy Lafuente (stronk7) 35dd608161 weekly release 3.8.3+ 2020-05-26 22:52:25 +02:00
Sara Arjona 9faa136ca0 Merge branch 'MDL-68388_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-05-26 20:03:45 +02:00
Helen Foster 667d004a17 MDL-68753 lang: Import fixed English strings (en_fix) 2020-05-26 19:15:48 +02:00
Eloy Lafuente (stronk7) 640838c117 MDL-68388 core_grades: Tweak unit test assertion to make Oracle happy
Also modify some comments and get rid of some void return types.
2020-05-26 19:02:12 +02:00
Bas Brands f4a77e8381 MDL-68828 theme_classic: fix for mobile
- setting a max width so the page does not overflow its container on
mobile
- fixing dashboard cards to be 100% wide on mobile
2020-05-26 14:13:44 +02:00
Andrew Nicols 833d8bceb8 MDL-68750 analytics: Correct behat test modal checks 2020-05-26 12:56:25 +08:00
Andrew Nicols bc010acae0 MDL-68750 core_tag: Add missing confirmation dialogue title 2020-05-26 12:56:25 +08:00
Andrew Nicols 0deabbfbfd MDL-68750 behat: Correct dialogue selector 2020-05-26 12:56:25 +08:00
Andrew Nicols 404288d3bc Merge branch 'MDL-68099-38' of git://github.com/marinaglancy/moodle into MOODLE_38_STABLE 2020-05-26 11:38:32 +08:00
deraadt b16b681a79 MDL-68425 user: Add capability check for messaging 2020-05-26 13:01:06 +10:00
Andrew Nicols 14cfb3dcbf MDL-68388 grade: Tidy comments and whitespace 2020-05-26 10:19:09 +08:00
Andrew Nicols 074bdceb1f Merge branch 'M3.8-MDL-68388' of https://github.com/marcusboon/moodle into MOODLE_38_STABLE 2020-05-26 10:16:35 +08:00
Andrew Nicols c7545dc852 Merge branch 'MDL-64427-m38' of https://github.com/NeillM/moodle into MOODLE_38_STABLE 2020-05-26 10:05:58 +08:00
Andrew Nicols cd1a39717a Merge branch 'MDL-68270-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-05-26 08:03:06 +08:00
Victor Deniz Falcon c933e28af6 Merge branch 'MDL-68252_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-05-26 00:56:32 +01:00
Marcus Boon 0b62a26225 MDL-68388 core_grades: Use MUC for grade letters
In the get_grade_letters there is a static variable that is used
to cache grade letters, we should use MUC for this so that it is
reset properly between unit tests.
2020-05-26 09:27:05 +10:00
Bas Brands 8a977030fc MDL-68270 core_output: prevent blurring of navbar logo 2020-05-25 15:49:19 +02:00
Pau Ferrer Ocaña 0ff1309b3a MDL-68789 behat: Change app page menu text selector 2020-05-25 14:55:52 +02:00
Andrew Nicols 26badfdd1a Merge branch 'MDL-68103-38' of git://github.com/bmbrands/moodle into MOODLE_38_STABLE 2020-05-25 19:55:33 +08:00
Bas Brands 1dafe5fbe5 MDL-68103 theme_classic: show content full width when printing 2020-05-25 13:49:39 +02:00
Nick Phillips f8621e3d58 MDL-68103 theme_classic: hidden-print => d-print-none for BS4. 2020-05-25 13:49:39 +02:00
Amaia Anabitarte e48b197957 MDL-68667 filepicker: Use shortitle parameter 2020-05-25 13:36:56 +02:00
Mathew May 7045cd8e67 MDL-68244 auth_email: Update unit test, remove hard assertion 2020-05-25 16:39:05 +08:00
Adrian Greeve 48583d2740 Merge branch 'MDL-68629_38' of https://github.com/t-schroeder/moodle into MOODLE_38_STABLE 2020-05-25 16:16:44 +08:00
Jake Dallimore 4ad9de59ea Merge branch 'MDL-62853-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-05-25 16:12:17 +08:00
Andrew Nicols b22accf82b Merge branch 'MDL-68658_38' of https://github.com/stronk7/moodle into MOODLE_38_STABLE 2020-05-25 15:26:36 +08:00
Adrian Greeve 99f948b4df Merge branch 'MDL-63812_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-05-25 14:42:08 +08:00
Ruslan Kabalin e94499f9b3 MDL-68592 formslib: Fix inline layout for nested groups 2020-05-22 17:55:50 +02:00
Eloy Lafuente (stronk7) 4e60865e2c 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:10 +02:00
Pau Ferrer Ocaña 43268a6a1c MDL-68789 behat: Adapt login step to new app version 2020-05-22 16:45:23 +02:00
Victor Deniz Falcon 38cc6d1071 weekly release 3.8.3+ 2020-05-22 14:21:47 +01:00
Victor Deniz Falcon 92ba52e21d Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-05-22 14:21:42 +01:00
Andrew Nicols 13215b2415 Merge branch '68137-moodle38-prevent-removing-all-dots-in-filename' of https://github.com/DSI-Universite-Rennes2/moodle into MOODLE_38_STABLE 2020-05-22 11:55:20 +08:00
Andrew Nicols 0b464b93d8 Merge branch 'MDL-57240_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-05-22 11:48:35 +08:00
Andrew Nicols e3b6ebadcc Merge branch 'MDL-68783-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-05-22 11:24:16 +08:00
Andrew Nicols 6944da3315 Merge branch 'MDL-67700-38' of git://github.com/ferranrecio/moodle into MOODLE_38_STABLE 2020-05-22 10:51:47 +08:00
David Mudrák e67a6060e0 MDL-68738 wiki: Prevent URLs inside links from turning into another link
There was a problem with wiki pages in the HTML markup syntax. If they
contain a link and the link text has a URL in it, that URL was converted
into another link. But it was not correctly nested and it caused
additional troubles with filters (particularly the multimedia filter if
the URL was a video such as on youtube).

The solution here is similar to what we do in filters. We protect the
whole explicit link so that its content is not further parsed. That
prevents the inner URL to be converted into another link and the
explicit link has the full control.
2020-05-21 21:12:42 +02:00
Sara Arjona 0aadca7a48 Merge branch 'm38_MDL-67497' of https://github.com/danmarsden/moodle into MOODLE_38_STABLE 2020-05-21 19:01:45 +02:00
Ferran Recio 0efd87b0f2 MDL-67700 message: prevent async loading conversation message mix 2020-05-21 18:04:31 +02:00
Sara Arjona d42ad4800d Merge branch 'MDL-66471-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-05-21 17:33:33 +02:00
Sara Arjona 19ebf2dc92 Merge branch 'MDL-67126_38' of https://github.com/ffhs/moodle into MOODLE_38_STABLE 2020-05-21 13:35:18 +02:00
Adrian Greeve a644c50920 Merge branch 'MDL-68733_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-05-21 08:36:23 +08:00
AMOS bot de19504712 Automatically generated installer lang files 2020-05-21 00:07:22 +00:00
Eloy Lafuente (stronk7) ff5773d511 Merge branch 'MDL-52578-38' of git://github.com/junpataleta/moodle into MOODLE_38_STABLE 2020-05-21 00:57:22 +02:00
Michael Milette 314e9a4064 MDL-68765 auth: Login form has DIV tag with 2 CLASS attributes. 2020-05-20 14:07:37 -04:00
Michael Milette 67ba731f8f MDL-68766 auth: Login form: 'Log in using...' should be h3, not h6 2020-05-20 12:43:10 -04:00
Neill Magill 2f5490410e MDL-64427 course: Mark activities during course contents deletion
When we want to delete all of the activities in a course we should
mark them as having a deletion in progress, as this makes them
unavailable to users immediately.

This should make it much less likely that a request to get a context
that does not exist should be made when a user accesses a page.
2020-05-20 08:30:05 +01:00
Neill Magill 34f176586b MDL-64427 course: Do not allow dirty cm_info during course delete
When deleting a course (especially one containing a large amount of
data) the course mod info cache could contain entries for deleted
activities for a signifcant amount of time making it possible that
users could see errors in Moodle.
2020-05-20 08:30:04 +01:00
Neill Magill 7a168c3beb MDL-64427 category: Stop error when another user deleting courses
If you try to visit a category where another user is deleting a
course the coursecat cache may not be fresh. This is because there
is a breif time where the course record will have been deleted,
while it is deleting other course information, before the event that
triggers the coursecat cache to be purged is fired.
2020-05-20 08:30:04 +01:00
Neill Magill 0be9bb13c7 MDL-64427 category: Test getting category courses during deletion
Adding a unit test for the situation where a course is partially
deleted when a list of courses in a category is retrived.
2020-05-20 08:30:04 +01:00
Jun Pataleta 55dde65d11 MDL-68783 core_grades: Fix outcome page's add/remove button styles
* Applied proper styles of btn-secondary.
* Added some vertical spacing between the buttons by enclosing them in
divs with 'm-y-1' class instead of just a br tag.
2020-05-20 13:13:27 +08:00
Jun Pataleta 45978220ab MDL-52578 core_course: Peer review fixes
* Fetch parent category only when necessary.
* Fix outdated variable names in original patch.
* Fix variable scope for $outcomeexists.
2020-05-20 10:31:31 +08:00
Steve Bader e8e5f49883 MDL-52578 core_course: Activity weight set to 0 on creation 2020-05-20 10:31:31 +08:00
Dan Marsden efeef8d82d MDL-68054 lib: viewhiddenactivities should be set as captype:read 2020-05-20 14:03:02 +12:00
AMOS bot 9821d4d9a7 Automatically generated installer lang files 2020-05-20 00:07:31 +00:00
Paul Holden f138423971 MDL-66471 user: fix user_selector debug about extra identity fields. 2020-05-19 19:12:23 +01:00
Sara Arjona e6d212fc07 weekly release 3.8.3+ 2020-05-19 17:54:31 +02:00
Sara Arjona 1adda884fd Merge branch 'install_38_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_38_STABLE 2020-05-19 17:54:28 +02:00
Tim Hunt 4fae2c3001 MDL-68733 quiz editing: behat test for altering random question tags 2020-05-19 11:10:04 +01:00
Bence Molnar 3427a6ec76 MDL-68733 quiz editing: be more careful deleting random question tags 2020-05-19 11:10:04 +01:00
Tim Hunt ea5c0c6b61 MDL-68733 question behat: question tag generator and use in quiz test 2020-05-19 11:10:03 +01:00
Ferran Recio fcbc4ccee6 MDL-67700 message: correcting conversation timer reset 2020-05-19 09:58:17 +02:00
Jun Pataleta dd293c28e1 Merge branch 'MDL-68528-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-05-19 11:45:55 +08:00
Andrew Nicols 79c6d0a453 MDL-68528 js: Normalise core component for template strings 2020-05-19 11:37:55 +08:00
Andrew Nicols 1ac5b70c5a MDL-68528 js: Normalise empty component to "core" for string 2020-05-19 11:34:59 +08:00
AMOS bot 9b38e44dfb Automatically generated installer lang files 2020-05-19 00:07:24 +00:00
Sara Arjona 57382b0e5e Merge branch 'MDL-68760_38' of https://github.com/timhunt/moodle into MOODLE_38_STABLE 2020-05-18 20:33:19 +02:00
Sara Arjona 2d2e93c6c6 Merge branch 'MDL-68728-38-2' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-05-18 20:23:47 +02:00
Tim Hunt e23b038479 MDL-68760 timezones: add string for new timezone America/Nuuk 2020-05-18 17:32:13 +01:00
Tim Hunt a2defe29c4 MDL-68760 string tests: make test_timezone_lang_strings message helpful 2020-05-18 17:32:12 +01:00
Marina Glancy aecc9e7170 MDL-68099 gradereport_grader: prevent exception without groups 2020-05-18 15:19:05 +02:00
Andrew Nicols a30ff32351 Merge branch 'MDL-68503_38_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_38_STABLE 2020-05-18 20:31:28 +08:00
Sara Arjona 1b34fbb716 Merge branch 'MDL-68253-38' of git://github.com/lucaboesch/moodle into MOODLE_38_STABLE 2020-05-18 13:56:43 +02:00
Adrian Perez 69e2477f90 MDL-67126 assign: set completion state for all group members 2020-05-18 12:25:57 +02:00
Andrew Nicols bca7a73d14 MDL-68728 calendar: Pending promises for event summary 2020-05-18 13:32:42 +08:00
AMOS bot c27c7abb6b Automatically generated installer lang files 2020-05-18 00:07:46 +00:00
AMOS bot 82d46e5037 Automatically generated installer lang files 2020-05-17 00:07:17 +00:00
Luca Bösch 4853c245c5 MDL-68253 mod_book: Remove prev arrow on the firstmost page. 2020-05-15 12:17:52 +02:00
Eloy Lafuente (stronk7) 4d56bb43b3 weekly release 3.8.3+ 2020-05-15 11:07:01 +02:00
Andrew Nicols 0cbb91e4c0 Merge branch 'MDL-66917-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-05-15 10:55:05 +08:00
Eloy Lafuente (stronk7) 2ef16003f1 Merge branch 'MDL-68677-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-05-15 02:00:39 +02:00
Andrew Nicols 80787a98b3 MDL-68677 core: Correct usage of templaterev for caching templates
The M.cfg.templaterev variable should only be used to present persistent
caching, not caching of content within the same page load.

Preventing caching of same-page content makes it difficult to develop
for real user experiences as content is slow to load and does not give a
realistic and consistent loading experience.

This change affects the loading of partials specifically which notably
includes the loading spinner. Without this patch the loading icon is
often not seen at all because it does not load in a timely fashion and
the content being loaded is loaded first.
2020-05-15 07:55:59 +08:00
Eloy Lafuente (stronk7) 698f0cff54 Merge branch 'MDL-68084-38' of https://github.com/paulholden/moodle into MOODLE_38_STABLE 2020-05-15 01:30:52 +02:00
Sara Arjona 0e73dacaaf Merge branch 'MDL-68200-38-take2' of git://github.com/rezaies/moodle into MOODLE_38_STABLE 2020-05-14 13:12:50 +02:00
Jake Dallimore 2ba93cc439 Merge branch 'MDL-68631_38' of https://github.com/jonof/moodle into MOODLE_38_STABLE 2020-05-13 09:25:22 +08:00
Paul Holden cd0af947a7 MDL-68084 blocks: check capability before getting content.
Some blocks (e.g. Calendar) load additional JS modules when returning
content. We need to make sure they aren't asked to generate content
unless the user can actually view the block, or the expected content
required by the JS will not exist in the DOM and can cause exceptions.
2020-05-12 19:21:35 +01:00
Sara Arjona 9b2253898a weekly release 3.8.3+ 2020-05-12 14:16:49 +02:00
Shamim Rezaie a81508489d MDL-68200 core: Fix phpdoc for the external return functions 2020-05-12 15:07:23 +10:00
Shamim Rezaie 3ec67cf4bb MDL-68200 core: Fix datetime format
date.toISOString() prints out the seconds as well.
Current code supports most valid values for the datetime attribute
2020-05-12 15:07:23 +10:00
Shamim Rezaie 365bfab967 MDL-68200 mod_forum: fix invalid format of the time tag on modern view 2020-05-12 15:07:23 +10:00
Shamim Rezaie a8b4b9f407 MDL-68200 mod_forum: Fix the invalid date format in the time tags 2020-05-12 15:07:23 +10:00
Jun Pataleta c59656006b MDL-68200 mod_forum: Use core/time_element for the discussion list page 2020-05-12 15:05:04 +10:00
Jun Pataleta 84d550cacb MDL-68200 core: Add new time_element template 2020-05-12 15:05:04 +10:00
Jun Pataleta b238304072 MDL-68200 core: Support fixday/hour for core/user_date's get() method 2020-05-12 15:05:04 +10:00
Jun Pataleta 10127ac33d MDL-68200 core: Support fixday/hour for core_external::get_user_dates() 2020-05-12 15:05:04 +10:00
Shamim Rezaie 6a7350d44b MDL-68200 core: Add calendartype param to user_date.loadDatesFromServer 2020-05-12 15:05:03 +10:00
Shamim Rezaie ed19fe85e4 MDL-68200 core: Add type param to core_get_user_dates external function 2020-05-12 15:05:03 +10:00
Shamim Rezaie bd76f0bb66 MDL-68200 mod_forum: remove address tags
Reasons:
- The element “h4” must not appear as a descendant of the “address” element
- This element should not contain more information than the contact
information, like a publication date (which belongs in a <time> element)
 element)
2020-05-12 15:02:05 +10:00
Shamim Rezaie c78ebc9586 MDL-68200 mod_forum: single discussion to follow nestet_v2 display rules 2020-05-12 15:02:05 +10:00
Shamim Rezaie d2886d283a MDL-68200 theme_boost: workaround for IE for flexbox not filling height
read more:
https://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs/
2020-05-12 15:02:05 +10:00
Eloy Lafuente (stronk7) 3ab743dcd9 Merge branch 'MDL-68579-38' of git://github.com/cescobedo/moodle into MOODLE_38_STABLE 2020-05-11 23:14:10 +02:00
Brendan Heywood 6f0506fa9d MDL-68276 admin: Skip risky tables and columns in db_replace 2020-05-11 23:11:46 +02:00
Jun Pataleta 2faa47c934 Merge branch 'MDL-66109-38' of git://github.com/andrewnicols/moodle into MOODLE_38_STABLE 2020-05-12 00:03:10 +08:00
Mihail Geshoski 6c86327b33 MDL-68576 filepicker: Cover in behat file edition in filemanager
The added behat tests would also confirm whether the behaviour of
a click action on a file using different views in the filemanager
is consistent.
2020-05-11 16:35:09 +02:00
Mihail Geshoski 6619bdf99d MDL-68576 filepicker: Cover in behat file selection from filepicker
The added behat tests would cover the issue in MDL-68576. They test
whether the behaviour of a click action on a file using different
views in the filepicker is consistent.
2020-05-11 16:34:59 +02:00
cescobedo 74860627f2 MDL-68579 core_h5p: Add a check to avoid execute task using BEHAT 2020-05-11 10:15:01 +02:00
Andrew Nicols 738da05555 MDL-66109 js: Built file changes from new Node version 2020-05-11 10:53:49 +08:00
Andrew Nicols 9c07f29d8e MDL-66109 js: Fix circular dependency in Shifter dependency
Shifter is using an ancient and no-longer supported of Istanbul. That
version contains a circular dependency whereby it fetches the version
from the index that included the file in the first place.  This throws a
warning on newer versions of Node.

The fix here is simple and intended to be the bare minimum to remove
these warnings anad resolve the issue.

We have forked the istanbul project and created a v0.1.37_moodle branch
at the root version of the Istanbul version that Shifter uses (v0.1.37
tag). The circular dependency is then addressed and a new tag created.

I have then forked Shifter, pointing its package.json at the tar.gz
download of that new tag and pushed a new branch and tag for that fix.

Following this our own package.json is updated to point to the tar.gz
version of the new Shifter tag.
2020-05-11 10:53:48 +08:00
Andrew Nicols ed68a025ef 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:53:48 +08:00
Tim Schroeder 1f59f848d7 MDL-68629 mod_choice: multilang coursename support 2020-05-07 15:47:53 +02:00
Jonathon Fowler b9fc865245 MDL-68631 cron: ensure the cron user is reset between scheduled tasks 2020-05-07 13:26:51 +10:00
Dan Marsden d95f185556 MDL-67497 lib: backuptargetimport should be set as captype:read 2020-04-29 08:14:45 +12:00
Julien Boulen af9bf5f609 MDL-68137 core_files: replace consecutive dots in filename by single dot 2020-04-28 11:29:52 +02:00
Tim Hunt f42b67ab2c MDL-68252 question tags: fix tag editing for missingtype questions 2020-04-24 11:26:39 +01:00
Tim Hunt 088d4309fe MDL-68252 question bank: for 'missingtype' questions, hide actions 2020-04-24 11:26:38 +01:00
Mark Johnson a84620c2d5 MDL-68503 user profile: Make sortorders relative to existing records 2020-04-23 15:55:53 +01:00
Tim Hunt 59afcdd850 MDL-63812 qtype_gapselect: fix questions with non-consecutive gap nos 2020-04-23 14:41:38 +01:00
Tim Hunt 69b0bbde10 MDL-63812 qtype_gapselect: test data generator to standard qtype pattern 2020-04-23 14:41:37 +01:00
Tim Hunt 660fa2871a MDL-57240 quiz: don't show useless links on overdue attempt summary page 2020-04-22 21:38:52 +01:00
Shamim Rezaie 24d7375f0f MDL-68312 grade: Fix empty links
If a link contains no text, the function or purpose of the link will not
be presented to the user. This can introduce confusion for keyboard and
screen reader users.
2020-04-22 04:33:05 +10:00
Shamim Rezaie 71caffb7e0 MDL-68312 output: Fix empty links
If a link contains no text, the function or purpose of the link will not
be presented to the user. This can introduce confusion for keyboard and
screen reader users.
2020-04-22 04:33:04 +10:00
Shamim Rezaie 04e9010c92 MDL-68312 gradereport_grader: Remove adjacent links to the same URL 2020-04-22 04:33:04 +10:00
Shamim Rezaie 9912c37afd MDL-68312 gradereport_grader: replace invalid label by aria-describedby
The for attribute of the label element should not refer to a non-hidden
form control.
2020-04-22 04:33:04 +10:00
Shamim Rezaie d37757abf1 MDL-68312 gradereport_grader: Use caption instead of summary in table
The summary attribute on the table element is obsolete.
2020-04-22 04:33:04 +10:00
Shamim Rezaie f9b144d6bf MDL-68343 gradereport_singleview: Remove adjacent links to the same URL 2020-04-22 04:31:06 +10:00
Shamim Rezaie 85bf5b2e2c MDL-68343 gradereport_singleview: Use caption instead of summary
The summary attribute on the table element is obsolete.
2020-04-22 04:31:06 +10:00
Shamim Rezaie cc36c39b46 MDL-68343 gradereport_singleview: fix empty links 2020-04-22 04:31:06 +10:00
Shamim Rezaie 5d2be187a2 MDL-68343 gradereport_singleview: Only output label tag if label exists
This also fixes the issue of having multiple form labels for a single
element.
2020-04-22 04:31:06 +10:00
Shamim Rezaie 10bc73d5b6 MDL-68343 output: fix html table structure
A <th> that contains no text may result in cells with missing or
incorrect header information. WAVE advises that we should make a cell
a <td> rather than a <th> if the cell must remain empty (such as the
top-left cell in a data table).

Also note that the scope attribute is only valid for <th>
2020-04-22 04:31:06 +10:00
Paul Holden 80827f076c MDL-62853 privacy: sanitize subcontext paths. 2020-04-21 14:38:14 +01:00
Paul Holden 059f402a51 MDL-66917 admin: validate uploaded plugin version.
Prevent overwriting current plugins with older versions of themselves.
2020-04-21 14:36:18 +01:00
729 changed files with 13954 additions and 4014 deletions
+1 -1
View File
@@ -1 +1 @@
v8.16.1
v14.15.0
+19 -4
View File
@@ -2,10 +2,9 @@
# process (which uses our internal CI system) this file is here for the benefit
# of community developers git clones - see MDL-51458.
# We currently disable Travis notifications entirely until https://github.com/travis-ci/travis-ci/issues/4976
# is fixed.
notifications:
email: false
email:
if: env(MOODLE_EMAIL) != no
language: php
@@ -15,6 +14,7 @@ dist: xenial
services:
- mysql
- docker
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
@@ -61,8 +61,9 @@ cache:
- $HOME/.npm
before_install:
- docker run -d -p 127.0.0.1:8080:80 --name exttests moodlehq/moodle-exttests
# Avoid IPv6 default binding as service (causes redis not to start).
sudo service redis-server start --bind 127.0.0.1
- sudo service redis-server start --bind 127.0.0.1
install:
- >
@@ -169,6 +170,12 @@ before_script:
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
config.php ;
# Enable test external resources
sed -i \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://127.0.0.1:8080');" \
-e "/require_once/i \\define('TEST_EXTERNAL_FILES_HTTPS_URL', 'http://127.0.0.1:8080');" \
config.php ;
# Redis cache store tests
sed -i \
-e "/require_once/i \\define('TEST_CACHESTORE_REDIS_TESTSERVERS', '127.0.0.1');" \
@@ -284,3 +291,11 @@ script:
exit 1 ;
fi
fi
after_script:
- >
if [ "$TASK" = 'PHPUNIT' ];
then
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
@@ -178,6 +178,7 @@ class filesize extends \admin_setting {
'id' => $this->get_id(),
'name' => $this->get_full_name(),
'value' => $data['v'],
'readonly' => $this->is_readonly(),
'options' => array_map(function($unit, $title) use ($data, $defaultunit) {
return [
'value' => $unit,
+99 -90
View File
@@ -266,6 +266,7 @@ list($options, $unrecognized) = cli_get_params(
);
$interactive = empty($options['non-interactive']);
$skipdatabase = $options['skip-database'];
// set up language
$lang = clean_param($options['lang'], PARAM_SAFEDIR);
@@ -637,96 +638,100 @@ do {
}
} while ($hintdatabase !== '');
// ask for fullname
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
// If --skip-database option is provided, we do not need to ask for site fullname, shortname, adminuser, adminpass, adminemail.
// These fields will be requested during the database install part.
if (!$skipdatabase) {
// Ask for fullname.
if ($interactive) {
cli_separator();
cli_heading(get_string('fullsitename', 'moodle'));
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
if ($options['fullname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['fullname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
} else {
$prompt = get_string('clitypevalue', 'admin');
if (empty($options['fullname'])) {
$a = (object)['option' => 'fullname', 'value' => $options['fullname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['fullname'] = cli_input($prompt, $options['fullname']);
} while (empty($options['fullname']));
} else {
if (empty($options['fullname'])) {
$a = (object)array('option'=>'fullname', 'value'=>$options['fullname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for shortname.
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
// ask for shortname
if ($interactive) {
cli_separator();
cli_heading(get_string('shortsitename', 'moodle'));
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
if ($options['shortname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['shortname']);
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
$prompt = get_string('clitypevalue', 'admin');
if (empty($options['shortname'])) {
$a = (object)['option' => 'shortname', 'value' => $options['shortname']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['shortname'] = cli_input($prompt, $options['shortname']);
} while (empty($options['shortname']));
} else {
if (empty($options['shortname'])) {
$a = (object)array('option'=>'shortname', 'value'=>$options['shortname']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user name
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
// Ask for admin user name.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminusername', 'install'));
if (!empty($options['adminuser'])) {
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminuser']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if ((empty($options['adminuser']) || $options['adminuser'] === 'guest')) {
$a = (object)['option' => 'adminuser', 'value' => $options['adminuser']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for admin user password.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if ((empty($options['adminpass']) or $options['adminpass'] === 'admin')) {
$a = (object)['option' => 'adminpass', 'value' => $options['adminpass']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
do {
$options['adminuser'] = cli_input($prompt, $options['adminuser']);
} while (empty($options['adminuser']) or $options['adminuser'] === 'guest');
} else {
if (empty($options['adminuser']) or $options['adminuser'] === 'guest') {
$a = (object)array('option'=>'adminuser', 'value'=>$options['adminuser']);
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object)['option' => 'adminemail', 'value' => $options['adminemail']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// ask for admin user password
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminpassword', 'install'));
$prompt = get_string('clitypevalue', 'admin');
do {
$options['adminpass'] = cli_input($prompt);
} while (empty($options['adminpass']) or $options['adminpass'] === 'admin');
} else {
if (empty($options['adminpass']) or $options['adminpass'] === 'admin') {
$a = (object)array('option'=>'adminpass', 'value'=>$options['adminpass']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for the admin email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('cliadminemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['adminemail']);
$options['adminemail'] = cli_input($prompt, $options['adminemail']);
}
// Validate that the address provided was an e-mail address.
if (!empty($options['adminemail']) && !validate_email($options['adminemail'])) {
$a = (object) array('option' => 'adminemail', 'value' => $options['adminemail']);
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
// Ask for the upgrade key.
if ($interactive) {
cli_separator();
@@ -745,22 +750,26 @@ if ($options['upgradekey'] !== '') {
$CFG->upgradekey = $options['upgradekey'];
}
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
// The user does not also need to pass agree-license when --skip-database is provided as the user will need to accept
// the license again in the database install part.
if (!$skipdatabase) {
if ($interactive) {
if (!$options['agree-license']) {
cli_separator();
cli_heading(get_string('copyrightnotice'));
echo "Moodle - Modular Object-Oriented Dynamic Learning Environment\n";
echo get_string('gpl3')."\n\n";
echo get_string('doyouagree')."\n";
$prompt = get_string('cliyesnoprompt', 'admin');
$input = cli_input($prompt, '', array(get_string('clianswerno', 'admin'), get_string('cliansweryes', 'admin')));
if ($input == get_string('clianswerno', 'admin')) {
exit(1);
}
}
} else {
if (!$options['agree-license'] && !$skipdatabase) {
cli_error(get_string('climustagreelicense', 'install'));
}
}
} else {
if (!$options['agree-license']) {
cli_error(get_string('climustagreelicense', 'install'));
}
}
@@ -809,7 +818,7 @@ if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
cli_error(get_string('pluginschecktodo', 'admin'));
}
if (!$options['skip-database']) {
if (!$skipdatabase) {
install_cli_database($options, $interactive);
// This needs to happen at the end to ensure it occurs after all caches
// have been purged for the last time.
+10 -2
View File
@@ -34,6 +34,7 @@ $help = "Command line tool to uninstall plugins.
Options:
-h --help Print this help.
--show-all Displays a list of all installed plugins.
--show-contrib Displays a list of all third-party installed plugins.
--show-missing Displays a list of plugins missing from disk.
--purge-missing Uninstall all missing from disk plugins.
--plugins=<plugin name> A comma separated list of plugins to be uninstalled. E.g. mod_assign,mod_forum
@@ -44,6 +45,9 @@ Examples:
# php uninstall_plugins.php --show-all
Prints tab-separated list of all installed plugins.
# php uninstall_plugins.php --show-contrib
Prints tab-separated list of all third-party installed plugins.
# php uninstall_plugins.php --show-missing
Prints tab-separated list of all missing from disk plugins.
@@ -63,6 +67,7 @@ Examples:
list($options, $unrecognised) = cli_get_params([
'help' => false,
'show-all' => false,
'show-contrib' => false,
'show-missing' => false,
'purge-missing' => false,
'plugins' => false,
@@ -84,12 +89,15 @@ if ($options['help']) {
$pluginman = core_plugin_manager::instance();
$plugininfo = $pluginman->get_plugins();
if ($options['show-all'] || $options['show-missing']) {
if ($options['show-all'] || $options['show-missing'] || $options['show-contrib']) {
foreach ($plugininfo as $type => $plugins) {
foreach ($plugins as $name => $plugin) {
if ($options['show-contrib'] && $plugin->is_standard()) {
continue;
}
$pluginstring = $plugin->component . "\t" . $plugin->displayname;
if ($options['show-all']) {
if ($options['show-all'] || $options['show-contrib']) {
cli_writeln($pluginstring);
} else {
if ($plugin->get_status() === core_plugin_manager::PLUGIN_STATUS_MISSING) {
+181
View File
@@ -3163,4 +3163,185 @@
</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">
</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>
</COMPATIBILITY_MATRIX>
+4 -2
View File
@@ -509,7 +509,8 @@ if (!$cache and $version > $CFG->version) { // upgrade
// Always verify plugin dependencies!
$failed = array();
if (!core_plugin_manager::instance()->all_plugins_ok($version, $failed)) {
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
die();
}
unset($failed);
@@ -701,7 +702,8 @@ if (!$cache and moodle_needs_upgrading()) {
$failed = array();
if (!$pluginman->all_plugins_ok($version, $failed)) {
$output = $PAGE->get_renderer('core', 'admin');
echo $output->unsatisfied_dependencies_page($version, $failed, $PAGE->url);
echo $output->unsatisfied_dependencies_page($version, $failed, new moodle_url($PAGE->url,
array('confirmplugincheck' => 0)));
die();
}
unset($failed);
+4 -2
View File
@@ -49,6 +49,7 @@
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
if (!empty($show) and confirm_sesskey()) {
@@ -66,6 +67,7 @@
array($module->id));
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
echo $OUTPUT->header();
@@ -121,8 +123,8 @@
$count = -1;
}
if ($count>0) {
$countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
"&amp;sesskey=".sesskey()."\" title=\"$strshowmodulecourse\">$count</a>";
$countlink = $OUTPUT->action_link(new moodle_url('/course/search.php', ['modulelist' => $module->name]),
$count, null, ['title' => $strshowmodulecourse]);
} else if ($count < 0) {
$countlink = get_string('error');
} else {
+1 -1
View File
@@ -53,7 +53,6 @@ $pageurl = new moodle_url('/admin/plugins.php', $pageparams);
$pluginman = core_plugin_manager::instance();
if ($uninstall) {
require_sesskey();
if (!$confirmed) {
admin_externalpage_setup('pluginsoverview', '', $pageparams);
@@ -92,6 +91,7 @@ if ($uninstall) {
exit();
} else {
require_sesskey();
$SESSION->pluginuninstallreturn = $pluginfo->get_return_url_after_uninstall($return);
$progress = new progress_trace_buffer(new text_progress_trace(), false);
$pluginman->uninstall_plugin($pluginfo->component, $progress);
+2 -2
View File
@@ -1098,7 +1098,7 @@ class core_admin_renderer extends plugin_renderer_base {
if (!empty($installabortable[$plugin->component])) {
$status .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstall' => $plugin->component)),
new moodle_url($this->page->url, array('abortinstall' => $plugin->component, 'confirmplugincheck' => 0)),
get_string('cancelinstallone', 'core_plugin'),
'post',
array('class' => 'actionbutton cancelinstallone d-block mt-1')
@@ -1194,7 +1194,7 @@ class core_admin_renderer extends plugin_renderer_base {
if ($installabortable) {
$out .= $this->output->single_button(
new moodle_url($this->page->url, array('abortinstallx' => 1)),
new moodle_url($this->page->url, array('abortinstallx' => 1, 'confirmplugincheck' => 0)),
get_string('cancelinstallall', 'core_plugin', count($installabortable)),
'post',
array('class' => 'singlebutton cancelinstallall mr-1')
+3 -8
View File
@@ -131,15 +131,10 @@ if ($hassiteconfig && \core_analytics\manager::is_analytics_enabled()) {
$timesplittingdefaults, $timesplittingoptions)
);
// Predictions processor output dir.
$defaultmodeloutputdir = rtrim($CFG->dataroot, '/') . DIRECTORY_SEPARATOR . 'models';
if (empty(get_config('analytics', 'modeloutputdir')) && !file_exists($defaultmodeloutputdir) &&
is_writable($defaultmodeloutputdir)) {
// Automatically create the dir for them so users don't see the invalid value red cross.
mkdir($defaultmodeloutputdir, $CFG->directorypermissions, true);
}
// Predictions processor output dir - specify default in setting description (used if left blank).
$defaultmodeloutputdir = \core_analytics\model::default_output_dir();
$settings->add(new admin_setting_configdirectory('analytics/modeloutputdir', new lang_string('modeloutputdir', 'analytics'),
new lang_string('modeloutputdirinfo', 'analytics'), $defaultmodeloutputdir));
new lang_string('modeloutputdirwithdefaultinfo', 'analytics', $defaultmodeloutputdir), ''));
// Disable web interface evaluation and get predictions.
$settings->add(new admin_setting_configcheckbox('analytics/onlycli', new lang_string('onlycli', 'analytics'),
-7
View File
@@ -105,13 +105,6 @@ if (($hassiteconfig || has_any_capability(array(
new lang_string('sitebackpack_help', 'badges'),
1, $choices));
$warning = badges_verify_site_backpack();
if (!empty($warning)) {
$backpacksettings->add(new admin_setting_description('badges_site_backpack_verify',
new lang_string('sitebackpackverify', 'badges'),
$warning));
}
$ADMIN->add('badges', $backpacksettings);
$ADMIN->add('badges',
+50 -14
View File
@@ -1,21 +1,57 @@
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
/**
* Define administration settings on the Location settings page.
*
* @package core
* @category admin
* @copyright 2006 Martin Dougiamas <martin@moodle.com>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// "locations" settingpage
$temp = new admin_settingpage('locationsettings', new lang_string('locationsettings', 'admin'));
$temp->add(new admin_setting_servertimezone());
$temp->add(new admin_setting_forcetimezone());
$temp->add(new admin_settings_country_select('country', new lang_string('country', 'admin'), new lang_string('configcountry', 'admin'), 0));
$temp->add(new admin_setting_configtext('defaultcity', new lang_string('defaultcity', 'admin'), new lang_string('defaultcity_help', 'admin'), ''));
defined('MOODLE_INTERNAL') || die();
$temp->add(new admin_setting_heading('iplookup', new lang_string('iplookup', 'admin'), new lang_string('iplookupinfo', 'admin')));
$temp->add(new admin_setting_configfile('geoip2file', new lang_string('geoipfile', 'admin'),
new lang_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLite2-City.mmdb'));
$temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'admin'), new lang_string('googlemapkey3_help', 'admin'), '', PARAM_RAW, 60));
if ($hassiteconfig) {
$temp = new admin_settingpage('locationsettings', new lang_string('locationsettings', 'core_admin'));
$temp->add(new admin_setting_configtext('allcountrycodes', new lang_string('allcountrycodes', 'admin'), new lang_string('configallcountrycodes', 'admin'), '', '/^(?:\w+(?:,\w+)*)?$/'));
if ($ADMIN->fulltree) {
$temp->add(new admin_setting_servertimezone());
$temp->add(new admin_setting_forcetimezone());
$temp->add(new admin_settings_country_select('country', new lang_string('country', 'core_admin'),
new lang_string('configcountry', 'core_admin'), 0));
$temp->add(new admin_setting_configtext('defaultcity', new lang_string('defaultcity', 'core_admin'),
new lang_string('defaultcity_help', 'core_admin'), ''));
$temp->add(new admin_setting_heading('iplookup', new lang_string('iplookup', 'core_admin'),
new lang_string('iplookupinfo', 'core_admin')));
$temp->add(new admin_setting_configfile('geoip2file', new lang_string('geoipfile', 'core_admin'),
new lang_string('configgeoipfile', 'core_admin', $CFG->dataroot . '/geoip/'),
$CFG->dataroot . '/geoip/GeoLite2-City.mmdb'));
$temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'core_admin'),
new lang_string('googlemapkey3_help', 'core_admin'), '', PARAM_RAW, 60));
$temp->add(new admin_setting_countrycodes('allcountrycodes', new lang_string('allcountrycodes', 'core_admin'),
new lang_string('configallcountrycodes', 'core_admin')));
}
$ADMIN->add('location', $temp);
} // end of speedup
}
+1 -1
View File
@@ -99,7 +99,7 @@ $options = array(
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP => 'REMOTE_ADDR');
$temp->add(new admin_setting_configselect('getremoteaddrconf', new lang_string('getremoteaddrconf', 'admin'),
new lang_string('configgetremoteaddrconf', 'admin'),
GETREMOTEADDR_SKIP_HTTP_X_FORWARDED_FOR|GETREMOTEADDR_SKIP_HTTP_CLIENT_IP, $options));
GETREMOTEADDR_SKIP_DEFAULT, $options));
$temp->add(new admin_setting_configtext('reverseproxyignore', new lang_string('reverseproxyignore', 'admin'), new lang_string('configreverseproxyignore', 'admin'), ''));
$temp->add(new admin_setting_heading('webproxy', new lang_string('webproxy', 'admin'), new lang_string('webproxyinfo', 'admin')));
+18
View File
@@ -260,10 +260,28 @@ if ($hassiteconfig) {
$temp->add($setting);
// See {@link https://gdpr-info.eu/art-8-gdpr/}.
// See {@link https://www.betterinternetforkids.eu/web/portal/practice/awareness/detail?articleId=3017751}.
$ageofdigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'AT, 14',
'BE, 13',
'BG, 14',
'CY, 14',
'CZ, 15',
'DK, 13',
'EE, 13',
'ES, 14',
'FI, 13',
'FR, 15',
'GB, 13',
'GR, 15',
'IT, 14',
'LT, 14',
'LV, 13',
'MT, 13',
'NO, 13',
'PT, 13',
'SE, 13',
'US, 13'
]);
$setting = new admin_setting_agedigitalconsentmap('agedigitalconsentmap',
+1 -1
View File
@@ -64,7 +64,7 @@ $renderer = $PAGE->get_renderer('tool_task');
echo $OUTPUT->header();
echo $OUTPUT->render_from_template('core_admin/tasklogs', (object) [
'action' => $pageurl->out(),
'filter' => $filter,
'filter' => htmlentities($filter),
'resultfilteroptions' => [
(object) [
'value' => -1,
+35 -9
View File
@@ -49,15 +49,28 @@
}}
<div class="form-item row" id="{{id}}">
<div class="form-label col-sm-3 text-sm-right">
<label {{#labelfor}}for="{{labelfor}}"{{/labelfor}}>
{{{title}}}
{{#override}}
<div class="form-overridden">{{override}}</div>
{{/override}}
{{#warning}}
<div class="form-warning">{{warning}}</div>
{{/warning}}
</label>
{{#customcontrol}}
<p {{#labelfor}}id="{{labelfor}}_label"{{/labelfor}}>
{{{title}}}
{{#override}}
<div class="form-overridden">{{override}}</div>
{{/override}}
{{#warning}}
<div class="form-warning">{{warning}}</div>
{{/warning}}
</p>
{{/customcontrol}}
{{^customcontrol}}
<label {{#labelfor}}for="{{labelfor}}"{{/labelfor}}>
{{{title}}}
{{#override}}
<div class="form-overridden">{{override}}</div>
{{/override}}
{{#warning}}
<div class="form-warning">{{warning}}</div>
{{/warning}}
</label>
{{/customcontrol}}
<span class="form-shortname d-block small text-muted">{{{name}}}</span>
</div>
<div class="form-setting col-sm-9">
@@ -72,3 +85,16 @@
{{#dependenton}}<div class="form-dependenton mb-4 text-muted">{{{.}}}</div>{{/dependenton}}
</div>
</div>
{{#customcontrol}}
{{#js}}
require(['jquery'], function($) {
$('#{{id}}_label').css('cursor', 'default');
$('#{{id}}_label').click(function() {
$('#{{id}}')
.find('button, a, input:not([type="hidden"]), select, textarea, [tabindex]')
.filter(':not([disabled]):not([tabindex="0"]):not([tabindex="-1"])')
.first().focus();
});
});
{{/js}}
{{/customcontrol}}
@@ -25,6 +25,7 @@
* value - yes value
* id - element id
* checked - boole
* readonly - bool
Example context (json):
{
@@ -32,10 +33,11 @@
"no": "False",
"value": "True",
"id": "test0",
"checked": "checked"
"checked": "checked",
"readonly": false
}
}}
<div class="form-checkbox defaultsnext">
<input type="hidden" name="{{name}}" value="{{no}}">
<input type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
<input {{#readonly}}disabled{{/readonly}} type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
</div>
@@ -25,6 +25,7 @@
* id - element id
* value - element value
* haspreviewconfig - show preview of selected color
* readonly - bool
Example context (json):
{
@@ -32,6 +33,7 @@
"name": "name0",
"id": "id0",
"value": "#555655",
"readonly": false,
"haspreviewconfig": false
}
}}
@@ -44,7 +46,7 @@
{{>core/pix_icon}}
{{/icon}}
</div>
<input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12" class="form-control text-ltr">
<input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
{{#haspreviewconfig}}
<input type="button" id="{{id}}_preview" value={{#quote}}{{#str}}preview{{/str}}{{/quote}} class="admin_colourpicker_preview">
{{/haspreviewconfig}}
@@ -33,7 +33,7 @@
"name": "test",
"value": "/my-super-secret-path/",
"id": "test0",
"readonly": true,
"readonly": false,
"showvalidity": true,
"valid": false
}
@@ -23,6 +23,7 @@
* name - form element name
* options - list of options for units containing name, value, selected
* value - yes
* readonly - bool
* id - element id
Example context (json):
@@ -30,6 +31,7 @@
"name": "test",
"value": "5",
"id": "test0",
"readonly": false,
"options": [ { "name": "Minutes", "value": "mins", "selected": true } ]
}
}}
@@ -38,9 +40,9 @@
}}
<div class="form-duration defaultsnext">
<div class="form-inline">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select">
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -33,7 +33,7 @@
"name": "test",
"value": "/usr/bin/cowsay",
"id": "test0",
"readonly": true,
"readonly": false,
"showvalidity": true,
"valid": false
}
+3 -1
View File
@@ -26,6 +26,7 @@
* readonly - Make the field readonly
* value - value
* showvalidity - Show a green check if the path is readable
* readonly - bool
* valid - True if the path is readable
Example context (json):
@@ -33,8 +34,9 @@
"name": "test",
"value": "/my-super-secret-path/file",
"id": "test0",
"readonly": true,
"readonly": false,
"showvalidity": true,
"readonly": false,
"valid": false
}
}}
@@ -24,12 +24,14 @@
* options - list of options for units containing name, value, selected
* value - yes
* id - element id
* readonly - bool
Example context (json):
{
"name": "test",
"value": "5",
"id": "test0",
"readonly": false,
"options": [ { "name": "KB", "value": "1024", "selected": true } ]
}
}}
@@ -38,9 +40,9 @@
}}
<div class="form-filesize defaultsnext">
<div class="form-inline">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select">
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -24,11 +24,13 @@
* id - element id
* size - element size
* options - list of options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"size": "3",
"options": [ { "name": "Option 1", "value": "V", "selected": true },
{ "name": "Option 2", "value": "V", "selected": true } ]
@@ -39,7 +41,7 @@
}}
<div class="form-select">
<input type="hidden" name="{{name}}[xxxxx]" value="1">
<select id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -25,11 +25,13 @@
* size - element size
* options - list of options not grouped
* optgroups - list of options grouped containing the group label and for each option: name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"size": "3",
"options": [
{ "name": "Option 1", "value": "V", "selected": false },
@@ -58,7 +60,7 @@
}}
<div class="form-select">
<input type="hidden" name="{{name}}[xxxxx]" value="1">
<select id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -24,15 +24,30 @@
* size - form element size
* value - form element value
* id - element id
* readonly - has value been defined in config.php
Example context (json):
{
"name": "test",
"id": "test0",
"size": "8",
"value": "secret"
"value": "secret",
"readonly": false
}
}}
{{#readonly}}
<div class="form-password">
<input type="text"
name = "{{ name }}"
id="{{ id }}"
value="********"
size="{{ size }}"
class="form-control"
disabled
>
</div>
{{/readonly}}
{{^readonly}}
<div class="form-password">
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
<span data-passwordunmask="editor">
@@ -61,3 +76,4 @@ require(['core_form/passwordunmask'], function(PasswordUnmask) {
new PasswordUnmask("{{ id }}");
});
{{/js}}
{{/readonly}}
@@ -23,11 +23,13 @@
* name - form element name
* id - element id
* options - list of options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"options": [
{ "name": "Option 1", "value": "V", "selected": true },
{ "name": "Option 2", "value": "V", "selected": true }
@@ -38,7 +40,7 @@
Setting configselect.
}}
<div class="form-select defaultsnext">
<select id="{{id}}" name="{{name}}" class="custom-select">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
@@ -22,6 +22,7 @@
Context variables required for this template:
* name - form element name
* id - element id
* readonly - bool
* options - list of options (not grouped)
* optgroups - list of options grouped containing the group label and for each option: name, value, selected
@@ -29,6 +30,7 @@
{
"name": "test",
"id": "test0",
"readonly": false,
"options": [
{ "name": "Option 1", "value": "V", "selected": false },
{ "name": "Option 2", "value": "V", "selected": false }
@@ -55,7 +57,7 @@
Setting configselect with optgroup support.
}}
<div class="form-select defaultsnext">
<select id="{{id}}" name="{{name}}" class="custom-select">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
+3 -1
View File
@@ -26,6 +26,7 @@
* size - element size
* forceltr - always display as ltr
* attributes - list of additional attributes containing name, value
* readonly - bool
Example context (json):
{
@@ -34,6 +35,7 @@
"value": "A tall, dark stranger will have more fun than you.",
"size": "21",
"forceltr": false,
"readonly": false,
"attributes": [ { "name": "readonly", "value": "readonly" } ]
}
}}
@@ -41,5 +43,5 @@
Setting configtext.
}}
<div class="form-text defaultsnext">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}" {{#readonly}}disabled{{/readonly}}>
</div>
@@ -33,6 +33,7 @@
"cols": "30",
"rows": "3",
"value": "Excellent day for putting Slinkies on an escalator.",
"readonly": false,
"id": "test0"
}
}}
@@ -40,5 +41,5 @@
Setting configtextarea.
}}
<div class="form-textarea">
<textarea rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
<textarea {{#readonly}}disabled{{/readonly}} rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
</div>
+4 -2
View File
@@ -24,11 +24,13 @@
* id - element id
* hours - list of valid hour options containing name, value, selected
* minutes - list of valid minute options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"minutes": [
{ "name": "00", "value": "0", "selected": true },
{ "name": "01", "value": "1", "selected": false }
@@ -45,13 +47,13 @@
<div class="form-time defaultsnext">
<div class="form-inline text-ltr">
<label class="sr-only" for="{{id}}h">{{#str}}hours{{/str}}</label>
<select id="{{id}}h" name="{{name}}[h]" class="custom-select">
<select id="{{id}}h" name="{{name}}[h]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#hours}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/hours}}
</select>:
<label class="sr-only" for="{{id}}m">{{#str}}minutes{{/str}}</label>
<select id="{{id}}m" name="{{name}}[m]" class="custom-select">
<select id="{{id}}m" name="{{name}}[m]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#minutes}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/minutes}}
@@ -0,0 +1,29 @@
@core @core_admin
Feature: Administrator is warned and when trying to set invalid allcountrycodes value.
In order to avoid misconfiguration of the country selector fields
As an admin
I want to be warned when I try to set an invalid country code in the allcountrycodes field
Scenario: Attempting to set allcountrycodes field with valid country codes
Given I log in as "admin"
And I navigate to "Location > Location settings" in site administration
When I set the following administration settings values:
| All country codes | CZ,BE,GB,ES |
Then I should not see "Invalid country code"
Scenario: Attempting to set allcountrycodes field with invalid country code
Given I log in as "admin"
And I navigate to "Location > Location settings" in site administration
When I set the following administration settings values:
| All country codes | CZ,BE,FOOBAR,GB,ES |
Then I should see "Invalid country code: FOOBAR"
Scenario: Attempting to unset allcountrycodes field
Given I log in as "admin"
And I navigate to "Location > Location settings" in site administration
And I set the following administration settings values:
| All country codes | CZ,BE,GB,ES |
And I navigate to "Location > Location settings" in site administration
When I set the following administration settings values:
| All country codes | |
Then I should not see "Invalid country code"
@@ -0,0 +1,34 @@
@core @core_admin
Feature: Configure language settings for the site
In order to configure language settings for the site
As an admin
I want to set language settings relevant to my site users
Scenario: Set languages on language menu
Given I log in as "admin"
And I navigate to "Language > Language settings" in site administration
When I set the field "Languages on language menu" to "en"
And I press "Save changes"
Then I should not see "Invalid language code"
Scenario: Reset languages on language menu
Given I log in as "admin"
And I navigate to "Language > Language settings" in site administration
When I set the field "Languages on language menu" to ""
And I press "Save changes"
Then I should not see "Invalid language code"
Scenario Outline: Set languages on language menu with invalid language
Given I log in as "admin"
And I navigate to "Language > Language settings" in site administration
When I set the field "Languages on language menu" to "<fieldvalue>"
And I press "Save changes"
Then I should see "Invalid language code: <invalidlang>"
Examples:
| fieldvalue | invalidlang |
| xx | xx |
| xx\|Bad | xx |
| en,qq | qq |
| en,qq\|Bad | qq |
| en$$ | en$$ |
| en$$\|Bad | en$$ |
+6
View File
@@ -164,6 +164,8 @@ if ($options['install']) {
mtrace("Acceptance tests site installed");
}
// Note: Do not build the themes here. This is done during the 'enable' stage.
} else if ($options['drop']) {
// Ensure no tests are running.
test_lock::acquire('behat');
@@ -182,6 +184,10 @@ if ($options['install']) {
// Enable test mode.
behat_util::start_test_mode($options['add-core-features-to-theme'], $options['optimize-runs'], $parallel, $run);
// Themes are only built in the 'enable' command.
behat_util::build_themes();
mtrace("Testing environment themes built");
// This is only displayed once for parallel install.
if (empty($run)) {
// Notify user that 2.5 profile has been converted to 3.5.
+1 -1
View File
@@ -24,7 +24,7 @@
$string['aim'] = 'This administration tool helps developers and test writers to create .feature files describing Moodle\'s functionalities and run them automatically. Step definitions available for use in .feature files are listed below.';
$string['allavailablesteps'] = 'All available step definitions';
$string['errorapproot'] = '$CFG->behat_ionic_dirroot is not pointing to a valid Moodle Mobile developer install.';
$string['errorapproot'] = '$CFG->behat_ionic_dirroot is not pointing to a valid Moodle app developer install.';
$string['errorbehatcommand'] = 'Error running behat CLI command. Try running "{$a} --help" manually from CLI to find out more about the problem.';
$string['errorcomposer'] = 'Composer dependencies are not installed.';
$string['errordataroot'] = '$CFG->behat_dataroot is not set or is invalid.';
@@ -36,7 +36,7 @@ $string['customlang:view'] = 'View local translation';
$string['filter'] = 'Filter strings';
$string['filtercomponent'] = 'Show strings of these components';
$string['filtercustomized'] = 'Customised only';
$string['filtermodified'] = 'Modified only';
$string['filtermodified'] = 'Modified in this session only';
$string['filteronlyhelps'] = 'Help only';
$string['filtershowstrings'] = 'Show strings';
$string['filterstringid'] = 'String identifier';
@@ -26,10 +26,11 @@ namespace tool_dataprivacy;
defined('MOODLE_INTERNAL') || die();
use lang_string;
use core\persistent;
/**
* Class for loading/storing competencies from the DB.
* Class for loading/storing data requests from the DB.
*
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -62,6 +63,7 @@ class data_request extends persistent {
],
'comments' => [
'type' => PARAM_TEXT,
'message' => new lang_string('errorinvalidrequestcomments', 'tool_dataprivacy'),
'default' => ''
],
'commentsformat' => [
@@ -75,7 +77,10 @@ class data_request extends persistent {
'default' => FORMAT_PLAIN
],
'userid' => [
'default' => 0,
'default' => function() {
global $USER;
return $USER->id;
},
'type' => PARAM_INT
],
'requestedby' => [
+1 -1
View File
@@ -1613,7 +1613,7 @@ class external extends external_api {
*/
private static function get_tree_node_structure($allowchildbranches = true) {
$fields = [
'text' => new external_value(PARAM_TEXT, 'The node text', VALUE_REQUIRED),
'text' => new external_value(PARAM_RAW, 'The node text', VALUE_REQUIRED),
'expandcontextid' => new external_value(PARAM_INT, 'The contextid this node expands', VALUE_REQUIRED),
'expandelement' => new external_value(PARAM_ALPHA, 'What element is this node expanded to', VALUE_REQUIRED),
'contextid' => new external_value(PARAM_INT, 'The node contextid', VALUE_REQUIRED),
+2 -2
View File
@@ -67,8 +67,8 @@ if (!$manage && !\tool_dataprivacy\api::can_contact_dpo()) {
redirect($returnurl, get_string('contactdpoviaprivacypolicy', 'tool_dataprivacy'), 0, \core\output\notification::NOTIFY_ERROR);
}
$mform = new tool_dataprivacy_data_request_form($url->out(false), ['manage' => !empty($manage)]);
$mform->set_data(['type' => $requesttype]);
$mform = new tool_dataprivacy_data_request_form($url->out(false), ['manage' => !empty($manage),
'persistent' => new \tool_dataprivacy\data_request(0, (object) ['type' => $requesttype])]);
// Data request cancelled.
if ($mform->is_cancelled()) {
@@ -23,6 +23,7 @@
*/
use tool_dataprivacy\api;
use tool_dataprivacy\data_request;
use tool_dataprivacy\local\helper;
defined('MOODLE_INTERNAL') || die();
@@ -36,7 +37,10 @@ require_once($CFG->libdir.'/formslib.php');
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package tool_dataprivacy
*/
class tool_dataprivacy_data_request_form extends moodleform {
class tool_dataprivacy_data_request_form extends \core\form\persistent {
/** @var string Name of the persistent class. */
protected static $persistentclass = data_request::class;
/** @var bool Flag to indicate whether this form is being rendered for managing data requests or for regular requests. */
protected $manage = false;
@@ -96,14 +100,13 @@ class tool_dataprivacy_data_request_form extends moodleform {
api::DATAREQUEST_TYPE_EXPORT => get_string('requesttypeexport', 'tool_dataprivacy'),
api::DATAREQUEST_TYPE_DELETE => get_string('requesttypedelete', 'tool_dataprivacy')
];
$mform->addElement('select', 'type', get_string('requesttype', 'tool_dataprivacy'), $options);
$mform->setType('type', PARAM_INT);
$mform->addHelpButton('type', 'requesttype', 'tool_dataprivacy');
// Request comments text area.
$textareaoptions = ['cols' => 60, 'rows' => 10];
$mform->addElement('textarea', 'comments', get_string('requestcomments', 'tool_dataprivacy'), $textareaoptions);
$mform->setType('type', PARAM_ALPHANUM);
$mform->addHelpButton('comments', 'requestcomments', 'tool_dataprivacy');
// Action buttons.
@@ -129,34 +132,49 @@ class tool_dataprivacy_data_request_form extends moodleform {
}
}
/**
* Get the default data. Unset the default userid if managing data requests
*
* @return stdClass
*/
protected function get_default_data() {
$data = parent::get_default_data();
if ($this->manage) {
unset($data->userid);
}
return $data;
}
/**
* Form validation.
*
* @param array $data
* @param stdClass $data
* @param array $files
* @param array $errors
* @return array
* @throws coding_exception
* @throws dml_exception
*/
public function validation($data, $files) {
public function extra_validation($data, $files, array &$errors) {
global $USER;
$errors = [];
$validrequesttypes = [
api::DATAREQUEST_TYPE_EXPORT,
api::DATAREQUEST_TYPE_DELETE
];
if (!in_array($data['type'], $validrequesttypes)) {
if (!in_array($data->type, $validrequesttypes)) {
$errors['type'] = get_string('errorinvalidrequesttype', 'tool_dataprivacy');
}
if (api::has_ongoing_request($data['userid'], $data['type'])) {
$userid = $data->userid;
if (api::has_ongoing_request($userid, $data->type)) {
$errors['type'] = get_string('errorrequestalreadyexists', 'tool_dataprivacy');
}
// Check if current user can create data deletion request.
$userid = $data['userid'];
if ($data['type'] == api::DATAREQUEST_TYPE_DELETE) {
if ($data->type == api::DATAREQUEST_TYPE_DELETE) {
if ($userid == $USER->id) {
if (!api::can_create_data_deletion_request_for_self()) {
$errors['type'] = get_string('errorcannotrequestdeleteforself', 'tool_dataprivacy');
+23
View File
@@ -322,5 +322,28 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2019111801) {
// 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, 2019111801, 'tool', 'dataprivacy');
}
return true;
}
@@ -130,6 +130,7 @@ $string['effectiveretentionperioduser'] = '{$a} (since the last time the user ac
$string['emailsalutation'] = 'Dear {$a},';
$string['errorcannotrequestdeleteforself'] = 'You don\'t have permission to create deletion request for yourself.';
$string['errorcannotrequestdeleteforother'] = 'You don\'t have permission to create deletion request for this user.';
$string['errorinvalidrequestcomments'] = 'The comments field may contain plain text only.';
$string['errorinvalidrequestcreationmethod'] = 'Invalid request creation method!';
$string['errorinvalidrequeststatus'] = 'Invalid request status!';
$string['errorinvalidrequesttype'] = 'Invalid request type!';
+1 -1
View File
@@ -95,7 +95,7 @@ function tool_dataprivacy_myprofile_navigation(tree $tree, $user, $iscurrentuser
$showsummary = true;
}
if ($showsummary) {
if ($showsummary && $iscurrentuser) {
$summaryurl = new moodle_url('/admin/tool/dataprivacy/summary.php');
$summarynode = new core_user\output\myprofile\node('privacyandpolicies', 'retentionsummary',
get_string('dataretentionsummary', 'tool_dataprivacy'), null, $summaryurl);
@@ -12,7 +12,7 @@ Feature: Manage data categories
And I press "Add category"
And I set the field "Name" to "Category 1"
And I set the field "Description" to "Category 1 description"
When I click on "Save" "button" in the "Delete category" "dialogue"
When I click on "Save" "button" in the "Add category" "dialogue"
Then I should see "Category 1" in the "List of data categories" "table"
And I should see "Category 1 description" in the "Category 1" "table_row"
@@ -30,5 +30,5 @@ Feature: Manage data categories
And I choose "Delete" in the open action menu
And I should see "Delete category"
And I should see "Are you sure you want to delete the category 'Category 1'?"
When I click on "Delete" "button" in the "Confirm" "dialogue"
When I click on "Delete" "button" in the "Delete category" "dialogue"
Then I should not see "Category 1" in the "List of data categories" "table"
@@ -52,5 +52,5 @@ Feature: Manage data storage purposes
And I choose "Delete" in the open action menu
And I should see "Delete purpose"
And I should see "Are you sure you want to delete the purpose 'Purpose 1'?"
When I click on "Delete" "button" in the "Confirm" "dialogue"
When I click on "Delete" "button" in the "Delete purpose" "dialogue"
Then I should not see "Purpose 1" in the "List of data purposes" "table"
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2019111800;
$plugin->version = 2019111801;
$plugin->requires = 2019111200; // Moodle 3.5dev (Build 2018031600) and upwards.
$plugin->component = 'tool_dataprivacy';
+1 -1
View File
@@ -1,2 +1,2 @@
define ("tool_lp/dialogue",["core/yui"],function(a){var b=function(b,c,d,e,f){this.yuiDialogue=null;var g=this;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(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){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue()})}}else{if("undefined"!=typeof e){a.soon(function(){e(g)})}}});g.yuiDialogue.show()})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
define ("tool_lp/dialogue",["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;if("undefined"==typeof f){f=!1}a.use("moodle-core-notification","timers",function(){var h="480px";if(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){if(b.newVal){if("undefined"!=typeof d){a.soon(function(){d(g);g.yuiDialogue.centerDialogue();M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}else{if("undefined"!=typeof e){a.soon(function(){e(g);M.util.js_complete("tool_lp/dialogue:before:visibleChange")})}else{M.util.js_complete("tool_lp/dialogue:before:visibleChange")}}});g.yuiDialogue.show();M.util.js_complete("tool_lp/dialogue:dialogue")})};b.prototype.close=function(){this.yuiDialogue.hide();this.yuiDialogue.destroy()};b.prototype.getContent=function(){return this.yuiDialogue.bodyNode.getDOMNode()};return b});
//# sourceMappingURL=dialogue.min.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define ("tool_lp/grade_dialogue",["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};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);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}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 a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],this._afterRender.bind(this));return 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)};return g});
define ("tool_lp/grade_dialogue",["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};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);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}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(){M.util.js_pending("tool_lp/grade_dialogue:display");return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],function(){this._afterRender();M.util.js_complete("tool_lp/grade_dialogue:display")}.bind(this));return 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)};return g});
//# sourceMappingURL=grade_dialogue.min.js.map
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
define ("tool_lp/grade_user_competency_inline",["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));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){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 done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a}).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;return h});
define ("tool_lp/grade_user_competency_inline",["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));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};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,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){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 done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return 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;return h});
//# sourceMappingURL=grade_user_competency_inline.min.js.map
File diff suppressed because one or more lines are too long
+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');
});
};
+5 -1
View File
@@ -102,6 +102,7 @@ define(['jquery',
* @return {Promise}
*/
Grade.prototype.display = function() {
M.util.js_pending('tool_lp/grade_dialogue:display');
return $.when(
Str.get_string('rate', 'tool_lp'),
this._render()
@@ -110,7 +111,10 @@ define(['jquery',
this._popup = new Dialogue(
title,
templateResult[0],
this._afterRender.bind(this)
function() {
this._afterRender();
M.util.js_complete('tool_lp/grade_dialogue:display');
}.bind(this)
);
return this._popup;
@@ -94,6 +94,7 @@ 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.then(function(scalevalues) {
options.push({
@@ -134,6 +135,7 @@ define(['jquery',
.then(function(dialogue) {
self._dialogue = dialogue;
M.util.js_complete('tool_lp/grade_user_competency_inline:_setUp');
return;
})
.fail(notification.exception);
@@ -26,7 +26,6 @@ namespace tool_lp\form;
defined('MOODLE_INTERNAL') || die();
use moodleform;
use core\form\persistent;
require_once($CFG->libdir . '/formslib.php');
@@ -39,17 +38,20 @@ require_once($CFG->libdir . '/formslib.php');
*/
class template_cohorts extends moodleform {
/**
* Form definition
*
* @return void
*/
public function definition() {
$mform = $this->_form;
$options = array(
'ajax' => 'tool_lp/form-cohort-selector',
'multiple' => true,
'data-contextid' => $this->_customdata['pagecontextid'],
'data-includes' => 'parents'
'exclude' => implode(',', $this->_customdata['excludecohorts']),
'contextid' => $this->_customdata['pagecontextid'],
);
$mform->addElement('autocomplete', 'cohorts', get_string('selectcohortstosync', 'tool_lp'), array(), $options);
$mform->addElement('cohort', 'cohorts', get_string('selectcohortstosync', 'tool_lp'), $options);
$mform->addElement('submit', 'submit', get_string('addcohorts', 'tool_lp'));
}
}
+13 -1
View File
@@ -54,7 +54,19 @@ if ($canmanagetemplate && ($removecohort = optional_param('removecohort', false,
}
// Capture the form submission.
$form = new \tool_lp\form\template_cohorts($url->out(false), array('pagecontextid' => $pagecontextid));
$existingcohortsql =
'SELECT c.id
FROM {' . \core_competency\template_cohort::TABLE . '} tc
JOIN {cohort} c ON c.id = tc.cohortid
WHERE tc.templateid = :templateid';
$existingcohorts = $DB->get_records_sql_menu($existingcohortsql, ['templateid' => $template->get('id')]);
$form = new \tool_lp\form\template_cohorts($url->out(false), [
'pagecontextid' => $pagecontextid,
'excludecohorts' => array_keys($existingcohorts),
]);
if ($canmanagetemplate && ($data = $form->get_data()) && !empty($data->cohorts)) {
$maxtocreate = 50;
$maxreached = false;
@@ -12,8 +12,8 @@ Feature: See the competencies for an activity on the course competencies page.
| Test-Comp1 | ID-FW1 |
| Test-Comp2 | ID-FW1 |
Given the following "courses" exist:
| shortname | fullname |
| C1 | Course 1 |
| shortname | fullname | enablecompletion |
| C1 | Course 1 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
@@ -21,9 +21,9 @@ Feature: See the competencies for an activity on the course competencies page.
| user | course | role |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| page | PageName1 | PageDesc1 | C1 | PAGE1 |
| page | PageName2 | PageDesc2 | C1 | PAGE2 |
| activity | name | intro | course | idnumber | completion | completionview |
| page | PageName1 | PageDesc1 | C1 | PAGE1 | 1 | 1 |
| page | PageName2 | PageDesc2 | C1 | PAGE2 | 1 | 1 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
@@ -61,3 +61,15 @@ Feature: See the competencies for an activity on the course competencies page.
And I should not see "Test-Comp1"
And I should not see "Test-Comp2"
And I should see "No competencies have been linked to this activity or resource."
@javascript
Scenario: None course competencies page.
When I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I follow "PageName1"
Then I should see "Test page content"
And I am on site homepage
And I follow "Course 1"
And I follow "PageName1"
Then I should see "Test page content"
+15 -1
View File
@@ -451,6 +451,7 @@ class api {
'$mmSideMenuDelegate_mmaCompetency' => new lang_string('myplans', 'tool_lp'),
'CoreMainMenuDelegate_AddonBlog' => new lang_string('blog', 'blog'),
'$mmSideMenuDelegate_mmaFiles' => new lang_string('files'),
'CoreMainMenuDelegate_CoreTag' => new lang_string('tags'),
'$mmSideMenuDelegate_website' => new lang_string('webpage'),
'$mmSideMenuDelegate_help' => new lang_string('help'),
),
@@ -552,8 +553,21 @@ class api {
$timenow = time();
$expectedissuer = null;
foreach ($info['certinfo'] as $cert) {
// Due to a bug in certain curl/openssl versions the signature algorithm isn't always correctly parsed.
// See https://github.com/curl/curl/issues/3706 for reference.
if (!array_key_exists('Signature Algorithm', $cert)) {
// The malformed field that does contain the algorithm we're looking for looks like the following:
// <WHITESPACE>Signature Algorithm: <ALGORITHM><CRLF><ALGORITHM>.
preg_match('/\s+Signature Algorithm: (?<algorithm>[^\s]+)/', $cert['Public Key Algorithm'], $matches);
$signaturealgorithm = $matches['algorithm'] ?? '';
} else {
$signaturealgorithm = $cert['Signature Algorithm'];
}
// Check if the signature algorithm is weak (Android won't work with SHA-1).
if ($cert['Signature Algorithm'] == 'sha1WithRSAEncryption' || $cert['Signature Algorithm'] == 'sha1WithRSA') {
if ($signaturealgorithm == 'sha1WithRSAEncryption' || $signaturealgorithm == 'sha1WithRSA') {
$warnings[] = ['insecurealgorithmwarning', 'tool_mobile'];
}
// Check certificate start date.
+1 -1
View File
@@ -138,7 +138,7 @@ class external extends external_api {
array(
'wwwroot' => new external_value(PARAM_RAW, 'Site URL.'),
'httpswwwroot' => new external_value(PARAM_RAW, 'Site https URL (if httpslogin is enabled).'),
'sitename' => new external_value(PARAM_TEXT, 'Site name.'),
'sitename' => new external_value(PARAM_RAW, 'Site name.'),
'guestlogin' => new external_value(PARAM_INT, 'Whether guest login is enabled.'),
'rememberusername' => new external_value(PARAM_INT, 'Values: 0 for No, 1 for Yes, 2 for optional.'),
'authloginviaemail' => new external_value(PARAM_INT, 'Whether log in via email is enabled.'),
+99 -86
View File
@@ -48,100 +48,113 @@ if ($hassiteconfig) {
$ADMIN->add('mobileapp', $temp);
// Show only mobile settings if the mobile service is enabled.
if (!empty($CFG->enablemobilewebservice)) {
// General notification about limited features due to app restrictions.
$notify = new \core\output\notification(
get_string('moodleappsportalfeatureswarning', 'tool_mobile', tool_mobile\api::MOODLE_APPS_PORTAL_URL),
\core\output\notification::NOTIFY_WARNING);
$featuresnotice = $OUTPUT->render($notify);
// General notification about limited features due to app restrictions.
$notify = new \core\output\notification(
get_string('moodleappsportalfeatureswarning', 'tool_mobile', tool_mobile\api::MOODLE_APPS_PORTAL_URL),
\core\output\notification::NOTIFY_WARNING);
$featuresnotice = $OUTPUT->render($notify);
// Type of login.
$temp = new admin_settingpage('mobileauthentication', new lang_string('mobileauthentication', 'tool_mobile'));
$options = array(
tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'),
);
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin',
new lang_string('typeoflogin', 'tool_mobile'),
new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
// Type of login.
$temp = new admin_settingpage(
'mobileauthentication',
new lang_string('mobileauthentication', 'tool_mobile'),
'moodle/site:config',
empty($CFG->enablemobilewebservice)
);
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), 'moodlemobile', PARAM_NOTAGS));
$options = array(
tool_mobile\api::LOGIN_VIA_APP => new lang_string('loginintheapp', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_BROWSER => new lang_string('logininthebrowser', 'tool_mobile'),
tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER => new lang_string('loginintheembeddedbrowser', 'tool_mobile'),
);
$temp->add(new admin_setting_configselect('tool_mobile/typeoflogin',
new lang_string('typeoflogin', 'tool_mobile'),
new lang_string('typeoflogin_desc', 'tool_mobile'), 1, $options));
$temp->add(new admin_setting_configtext('tool_mobile/minimumversion',
new lang_string('minimumversion_key', 'tool_mobile'),
new lang_string('minimumversion', 'tool_mobile'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), 'moodlemobile', PARAM_NOTAGS));
$ADMIN->add('mobileapp', $temp);
$temp->add(new admin_setting_configtext('tool_mobile/minimumversion',
new lang_string('minimumversion_key', 'tool_mobile'),
new lang_string('minimumversion', 'tool_mobile'), '', PARAM_NOTAGS));
// Appearance related settings.
$temp = new admin_settingpage('mobileappearance', new lang_string('mobileappearance', 'tool_mobile'));
$ADMIN->add('mobileapp', $temp);
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesappearance', '', $featuresnotice));
// Appearance related settings.
$temp = new admin_settingpage(
'mobileappearance',
new lang_string('mobileappearance', 'tool_mobile'),
'moodle/site:config',
empty($CFG->enablemobilewebservice)
);
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'tool_mobile'),
new lang_string('configmobilecssurl', 'tool_mobile'), '', PARAM_URL));
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeaturesappearance', '', $featuresnotice));
// Reference to Branded Mobile App.
if (empty($CFG->disableserviceads_branded)) {
$temp->add(new admin_setting_description('moodlebrandedappreference',
new lang_string('moodlebrandedapp', 'admin'),
new lang_string('moodlebrandedappreference', 'admin')
));
}
$temp->add(new admin_setting_configtext('mobilecssurl', new lang_string('mobilecssurl', 'tool_mobile'),
new lang_string('configmobilecssurl', 'tool_mobile'), '', PARAM_URL));
$temp->add(new admin_setting_heading('tool_mobile/smartappbanners',
new lang_string('smartappbanners', 'tool_mobile'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/enablesmartappbanners',
new lang_string('enablesmartappbanners', 'tool_mobile'),
new lang_string('enablesmartappbanners_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_configtext('tool_mobile/iosappid', new lang_string('iosappid', 'tool_mobile'),
new lang_string('iosappid_desc', 'tool_mobile'), '633359593', PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('tool_mobile/androidappid', new lang_string('androidappid', 'tool_mobile'),
new lang_string('androidappid_desc', 'tool_mobile'), 'com.moodle.moodlemobile', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/setuplink', new lang_string('setuplink', 'tool_mobile'),
new lang_string('setuplink_desc', 'tool_mobile'), 'https://download.moodle.org/mobile', PARAM_URL));
$ADMIN->add('mobileapp', $temp);
// Features related settings.
$temp = new admin_settingpage('mobilefeatures', new lang_string('mobilefeatures', 'tool_mobile'));
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeatures', '', $featuresnotice));
$temp->add(new admin_setting_heading('tool_mobile/logout',
new lang_string('logout'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/forcelogout',
new lang_string('forcelogout', 'tool_mobile'),
new lang_string('forcelogout_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_heading('tool_mobile/features',
new lang_string('mobilefeatures', 'tool_mobile'), ''));
$options = tool_mobile\api::get_features_list();
$temp->add(new admin_setting_configmultiselect('tool_mobile/disabledfeatures',
new lang_string('disabledfeatures', 'tool_mobile'),
new lang_string('disabledfeatures_desc', 'tool_mobile'), array(), $options));
$temp->add(new admin_setting_configtextarea('tool_mobile/custommenuitems',
new lang_string('custommenuitems', 'tool_mobile'),
new lang_string('custommenuitems_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$temp->add(new admin_setting_heading('tool_mobile/language',
new lang_string('language'), ''));
$temp->add(new admin_setting_configtextarea('tool_mobile/customlangstrings',
new lang_string('customlangstrings', 'tool_mobile'),
new lang_string('customlangstrings_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$ADMIN->add('mobileapp', $temp);
// Reference to Branded Mobile App.
if (empty($CFG->disableserviceads_branded)) {
$temp->add(new admin_setting_description('moodlebrandedappreference',
new lang_string('moodlebrandedapp', 'admin'),
new lang_string('moodlebrandedappreference', 'admin')
));
}
$temp->add(new admin_setting_heading('tool_mobile/smartappbanners',
new lang_string('smartappbanners', 'tool_mobile'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/enablesmartappbanners',
new lang_string('enablesmartappbanners', 'tool_mobile'),
new lang_string('enablesmartappbanners_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_configtext('tool_mobile/iosappid', new lang_string('iosappid', 'tool_mobile'),
new lang_string('iosappid_desc', 'tool_mobile'), '633359593', PARAM_ALPHANUM));
$temp->add(new admin_setting_configtext('tool_mobile/androidappid', new lang_string('androidappid', 'tool_mobile'),
new lang_string('androidappid_desc', 'tool_mobile'), 'com.moodle.moodlemobile', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('tool_mobile/setuplink', new lang_string('setuplink', 'tool_mobile'),
new lang_string('setuplink_desc', 'tool_mobile'), 'https://download.moodle.org/mobile', PARAM_URL));
$ADMIN->add('mobileapp', $temp);
// Features related settings.
$temp = new admin_settingpage(
'mobilefeatures',
new lang_string('mobilefeatures', 'tool_mobile'),
'moodle/site:config',
empty($CFG->enablemobilewebservice)
);
$temp->add(new admin_setting_heading('tool_mobile/moodleappsportalfeatures', '', $featuresnotice));
$temp->add(new admin_setting_heading('tool_mobile/logout',
new lang_string('logout'), ''));
$temp->add(new admin_setting_configcheckbox('tool_mobile/forcelogout',
new lang_string('forcelogout', 'tool_mobile'),
new lang_string('forcelogout_desc', 'tool_mobile'), 0));
$temp->add(new admin_setting_heading('tool_mobile/features',
new lang_string('mobilefeatures', 'tool_mobile'), ''));
$options = tool_mobile\api::get_features_list();
$temp->add(new admin_setting_configmultiselect('tool_mobile/disabledfeatures',
new lang_string('disabledfeatures', 'tool_mobile'),
new lang_string('disabledfeatures_desc', 'tool_mobile'), array(), $options));
$temp->add(new admin_setting_configtextarea('tool_mobile/custommenuitems',
new lang_string('custommenuitems', 'tool_mobile'),
new lang_string('custommenuitems_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$temp->add(new admin_setting_heading('tool_mobile/language',
new lang_string('language'), ''));
$temp->add(new admin_setting_configtextarea('tool_mobile/customlangstrings',
new lang_string('customlangstrings', 'tool_mobile'),
new lang_string('customlangstrings_desc', 'tool_mobile'), '', PARAM_RAW, '50', '10'));
$ADMIN->add('mobileapp', $temp);
}
+14 -19
View File
@@ -872,36 +872,31 @@ class tool_uploadcourse_course {
unset($method['delete']);
unset($method['disable']);
if (!empty($instance) && $todelete) {
if ($todelete) {
// Remove the enrolment method.
foreach ($instances as $instance) {
if ($instance->enrol == $enrolmethod) {
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->delete_instance($instance);
break;
}
if ($instance) {
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->delete_instance($instance);
}
} else if (!empty($instance) && $todisable) {
// Disable the enrolment.
foreach ($instances as $instance) {
if ($instance->enrol == $enrolmethod) {
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->update_status($instance, ENROL_INSTANCE_DISABLED);
$enrol_updated = true;
break;
}
}
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->update_status($instance, ENROL_INSTANCE_DISABLED);
$enrol_updated = true;
} else {
$plugin = null;
$status = ($todisable) ? ENROL_INSTANCE_DISABLED : ENROL_INSTANCE_ENABLED;
if (empty($instance)) {
$plugin = $enrolmentplugins[$enrolmethod];
$instance = new stdClass();
$instance->id = $plugin->add_default_instance($course);
$instanceid = $plugin->add_default_instance($course);
$instance = $DB->get_record('enrol', ['id' => $instanceid]);
$instance->roleid = $plugin->get_config('roleid');
$instance->status = ENROL_INSTANCE_ENABLED;
$plugin->update_status($instance, $status);
} else {
$plugin = $enrolmentplugins[$instance->enrol];
$plugin->update_status($instance, ENROL_INSTANCE_ENABLED);
$plugin->update_status($instance, $status);
}
// Now update values.
@@ -0,0 +1,114 @@
@tool @tool_uploadcourse @_file_upload
Feature: An admin can update courses enrolments using a CSV file
In order to update courses enrolments using a CSV file
As an admin
I need to be able to upload a CSV file with enrolment methods for the courses
Background:
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
@javascript
Scenario: Creating enrolment method by enable it
Given I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Delete" "link" in the "Guest access" "table_row"
And I click on "Continue" "button"
And I should not see "Guest access" in the "generaltable" "table"
And I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_enable.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And "Disable" "icon" should exist in the "Guest access" "table_row"
@javascript
Scenario: Creating enrolment method by disabling it
Given I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Delete" "link" in the "Guest access" "table_row"
And I click on "Continue" "button"
And I should not see "Guest access" in the "generaltable" "table"
And I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_disable.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And "Enable" "icon" should exist in the "Guest access" "table_row"
@javascript
Scenario: Enabling enrolment method
Given I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_enable.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And "Disable" "icon" should exist in the "Guest access" "table_row"
@javascript
Scenario: Disable an enrolment method
Given I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Enable" "link" in the "Guest access" "table_row"
And "Disable" "icon" should exist in the "Guest access" "table_row"
And I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_disable.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And "Enable" "icon" should exist in the "Guest access" "table_row"
@javascript
Scenario: Delete an enrolment method
Given I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_delete.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I should not see "Guest access" in the "generaltable" "table"
@javascript
Scenario: Delete an unexistent enrolment method (nothing should change)
Given I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Delete" "link" in the "Guest access" "table_row"
And I click on "Continue" "button"
And I should not see "Guest access" in the "generaltable" "table"
And I navigate to "Courses > Upload courses" in site administration
And I upload "admin/tool/uploadcourse/tests/fixtures/enrolment_delete.csv" file to "File" filemanager
And I set the field "Upload mode" to "Only update existing courses"
And I set the field "Update mode" to "Update with CSV data only"
And I set the field "Allow deletes" to "Yes"
And I click on "Preview" "button"
When I click on "Upload courses" "button"
Then I should see "Course updated"
And I am on "Course 1" course homepage
And I navigate to "Users > Enrolment methods" in current page administration
And I should not see "Guest access" in the "generaltable" "table"
@@ -0,0 +1,2 @@
shortname,category,enrolment_1,enrolment_1_delete
C1,1,guest,1
1 shortname category enrolment_1 enrolment_1_delete
2 C1 1 guest 1
@@ -0,0 +1,2 @@
shortname,category,enrolment_1,enrolment_1_disable
C1,1,guest,1
1 shortname category enrolment_1 enrolment_1_disable
2 C1 1 guest 1
@@ -0,0 +1,2 @@
shortname,category,enrolment_1,enrolment_1_disable
C1,1,guest,0
1 shortname category enrolment_1 enrolment_1_disable
2 C1 1 guest 0
+1 -1
View File
@@ -1,2 +1,2 @@
define ("tool_usertours/usertours",["core/ajax","tool_usertours/tour","jquery","core/templates","core/str","core/log","core/notification"],function(a,b,c,d,e,f,g){var h={tourId:null,currentTour:null,context:null,init:function init(a,b,d){h.tourId=a;h.context=d;if("undefined"==typeof b){b=!0}if(b){h.fetchTour(a)}h.addResetLink();c("body").on("click","[data-action=\"tool_usertours/resetpagetour\"]",function(a){a.preventDefault();h.resetTourState(h.tourId)})},fetchTour:function fetchTour(b){M.util.js_pending("admin_usertour_fetchTour"+b);c.when(a.call([{methodname:"tool_usertours_fetch_and_start_tour",args:{tourid:b,context:h.context,pageurl:window.location.href}}])[0],d.render("tool_usertours/tourstep",{})).then(function(a,c){return h.startBootstrapTour(b,c[0],a.tourconfig)}).always(function(){M.util.js_complete("admin_usertour_fetchTour"+b)}).fail(g.exception)},addResetLink:function addResetLink(){var a;M.util.js_pending("admin_usertour_addResetLink");if(c(".tool_usertours-resettourcontainer").length){a=c(".tool_usertours-resettourcontainer")}else if(c(".logininfo").length){a=c(".logininfo")}else if(c("footer").length){a=c("footer")}else{a=c("body")}d.render("tool_usertours/resettour",{}).then(function(b,c){d.appendNodeContents(a,b,c)}).always(function(){M.util.js_complete("admin_usertour_addResetLink")}).fail()},startBootstrapTour:function startBootstrapTour(a,c,d){if(h.currentTour){d.onEnd=null;h.currentTour.endTour();delete h.currentTour}d.eventHandlers={afterEnd:[h.markTourComplete],afterRender:[h.markStepShown]};d.tourName=d.name;delete d.name;d.template=c;d.steps=d.steps.map(function(a){if("undefined"!=typeof a.element){a.target=a.element;delete a.element}if("undefined"!=typeof a.reflex){a.moveOnClick=!!a.reflex;delete a.reflex}if("undefined"!=typeof a.content){a.body=a.content;delete a.content}return a});h.currentTour=new b(d);return h.currentTour.startTour()},markStepShown:function markStepShown(){var b=this.getStepConfig(this.getCurrentStepNumber());c.when(a.call([{methodname:"tool_usertours_step_shown",args:{tourid:h.tourId,context:h.context,pageurl:window.location.href,stepid:b.stepid,stepindex:this.getCurrentStepNumber()}}])[0]).fail(f.error)},markTourComplete:function markTourComplete(){var b=this.getStepConfig(this.getCurrentStepNumber());c.when(a.call([{methodname:"tool_usertours_complete_tour",args:{tourid:h.tourId,context:h.context,pageurl:window.location.href,stepid:b.stepid,stepindex:this.getCurrentStepNumber()}}])[0]).fail(f.error)},resetTourState:function resetTourState(b){c.when(a.call([{methodname:"tool_usertours_reset_tour",args:{tourid:b,context:h.context,pageurl:window.location.href}}])[0]).then(function(a){if(a.startTour){h.fetchTour(a.startTour)}}).fail(g.exception)}};return{init:h.init,resetTourState:h.resetTourState}});
define ("tool_usertours/usertours",["core/ajax","tool_usertours/tour","jquery","core/templates","core/str","core/log","core/notification"],function(a,b,c,d,e,f,g){var h={tourId:null,currentTour:null,context:null,init:function init(a,b,d){h.tourId=a;h.context=d;if("undefined"==typeof b){b=!0}if(b){h.fetchTour(a)}h.addResetLink();c("body").on("click","[data-action=\"tool_usertours/resetpagetour\"]",function(a){a.preventDefault();h.resetTourState(h.tourId)})},fetchTour:function fetchTour(b){M.util.js_pending("admin_usertour_fetchTour"+b);c.when(a.call([{methodname:"tool_usertours_fetch_and_start_tour",args:{tourid:b,context:h.context,pageurl:window.location.href}}])[0],d.render("tool_usertours/tourstep",{})).then(function(a,c){if(!a.hasOwnProperty("tourconfig")){return}return h.startBootstrapTour(b,c[0],a.tourconfig)}).always(function(){M.util.js_complete("admin_usertour_fetchTour"+b)}).fail(g.exception)},addResetLink:function addResetLink(){var a;M.util.js_pending("admin_usertour_addResetLink");if(c(".tool_usertours-resettourcontainer").length){a=c(".tool_usertours-resettourcontainer")}else if(c(".logininfo").length){a=c(".logininfo")}else if(c("footer").length){a=c("footer")}else{a=c("body")}d.render("tool_usertours/resettour",{}).then(function(b,c){d.appendNodeContents(a,b,c)}).always(function(){M.util.js_complete("admin_usertour_addResetLink")}).fail()},startBootstrapTour:function startBootstrapTour(a,c,d){if(h.currentTour){d.onEnd=null;h.currentTour.endTour();delete h.currentTour}d.eventHandlers={afterEnd:[h.markTourComplete],afterRender:[h.markStepShown]};d.tourName=d.name;delete d.name;d.template=c;d.steps=d.steps.map(function(a){if("undefined"!=typeof a.element){a.target=a.element;delete a.element}if("undefined"!=typeof a.reflex){a.moveOnClick=!!a.reflex;delete a.reflex}if("undefined"!=typeof a.content){a.body=a.content;delete a.content}return a});h.currentTour=new b(d);return h.currentTour.startTour()},markStepShown:function markStepShown(){var b=this.getStepConfig(this.getCurrentStepNumber());c.when(a.call([{methodname:"tool_usertours_step_shown",args:{tourid:h.tourId,context:h.context,pageurl:window.location.href,stepid:b.stepid,stepindex:this.getCurrentStepNumber()}}])[0]).fail(f.error)},markTourComplete:function markTourComplete(){var b=this.getStepConfig(this.getCurrentStepNumber());c.when(a.call([{methodname:"tool_usertours_complete_tour",args:{tourid:h.tourId,context:h.context,pageurl:window.location.href,stepid:b.stepid,stepindex:this.getCurrentStepNumber()}}])[0]).fail(f.error)},resetTourState:function resetTourState(b){c.when(a.call([{methodname:"tool_usertours_reset_tour",args:{tourid:b,context:h.context,pageurl:window.location.href}}])[0]).then(function(a){if(a.startTour){h.fetchTour(a.startTour)}}).fail(g.exception)}};return{init:h.init,resetTourState:h.resetTourState}});
//# sourceMappingURL=usertours.min.js.map
File diff suppressed because one or more lines are too long
@@ -69,6 +69,11 @@ function(ajax, BootstrapTour, $, templates, str, log, notification) {
templates.render('tool_usertours/tourstep', {})
)
.then(function(response, template) {
// If we don't have any tour config (because it doesn't need showing for the current user), return early.
if (!response.hasOwnProperty('tourconfig')) {
return;
}
return usertours.startBootstrapTour(tourId, template[0], response.tourconfig);
})
.always(function() {
+3 -3
View File
@@ -70,9 +70,9 @@ class tour extends external_api {
\tool_usertours\event\tour_started::create([
'contextid' => $context->id,
'objectid' => $tourid,
'objectid' => $tour->get_id(),
'other' => [
'pageurl' => $pageurl,
'pageurl' => $params['pageurl'],
],
])->trigger();
@@ -104,7 +104,7 @@ class tour extends external_api {
'tourconfig' => new external_single_structure([
'name' => new external_value(PARAM_RAW, 'Tour Name'),
'steps' => new external_multiple_structure(self::step_structure_returns()),
])
], 'Tour config', VALUE_OPTIONAL)
]);
}
+16 -1
View File
@@ -138,13 +138,28 @@ class manager {
*/
const CONFIG_SHIPPED_VERSION = 'shipped_version';
/**
* Helper method to initialize admin page, setting appropriate extra URL parameters
*
* @param string $action
*/
protected function setup_admin_externalpage(string $action): void {
admin_externalpage_setup('tool_usertours/tours', '', array_filter([
'action' => $action,
'id' => optional_param('id', 0, PARAM_INT),
'tourid' => optional_param('tourid', 0, PARAM_INT),
'direction' => optional_param('direction', 0, PARAM_INT),
]));
}
/**
* This is the entry point for this controller class.
*
* @param string $action The action to perform.
*/
public function execute($action) {
admin_externalpage_setup('tool_usertours/tours');
$this->setup_admin_externalpage($action);
// Add the main content.
switch($action) {
case self::ACTION_NEWTOUR:
@@ -47,7 +47,7 @@ class provider implements
/**
* Returns meta data about this system.
*
* @param collection $itemcollection The initialised item collection to add items to.
* @param collection $items The initialised item collection to add items to.
* @return collection A listing of user data stored through this system.
*/
public static function get_metadata(collection $items) : collection {
@@ -64,7 +64,7 @@ class provider implements
* @param int $userid The userid of the user whose data is to be exported.
*/
public static function export_user_preferences(int $userid) {
$preferences = get_user_preferences();
$preferences = get_user_preferences(null, null, $userid);
foreach ($preferences as $name => $value) {
$descriptionidentifier = null;
$tourid = null;
+14 -5
View File
@@ -557,9 +557,10 @@ class tour {
// Remove the configuration for the tour.
$DB->delete_records('tool_usertours_tours', array('id' => $this->id));
helper::reset_tour_sortorder();
$this->remove_user_preferences();
return null;
}
@@ -585,6 +586,16 @@ class tour {
return $this;
}
/**
* Remove stored user preferences for the tour
*/
protected function remove_user_preferences(): void {
global $DB;
$DB->delete_records('user_preferences', ['name' => self::TOUR_LAST_COMPLETED_BY_USER . $this->get_id()]);
$DB->delete_records('user_preferences', ['name' => self::TOUR_REQUESTED_BY_USER . $this->get_id()]);
}
/**
* Whether this tour should be displayed to the user.
*
@@ -665,11 +676,9 @@ class tour {
* @return $this
*/
public function mark_major_change() {
global $DB;
// Clear old reset and completion notes.
$DB->delete_records('user_preferences', ['name' => self::TOUR_LAST_COMPLETED_BY_USER . $this->get_id()]);
$DB->delete_records('user_preferences', ['name' => self::TOUR_REQUESTED_BY_USER . $this->get_id()]);
$this->remove_user_preferences();
$this->set_config('majorupdatetime', time());
$this->persist();
+22
View File
@@ -25,6 +25,7 @@
defined('MOODLE_INTERNAL') || die();
use tool_usertours\manager;
use tool_usertours\tour;
/**
* Upgrade the user tours plugin.
@@ -74,5 +75,26 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2019111801, 'tool', 'usertours');
}
if ($oldversion < 2019111802) {
// Clean up user preferences of deleted tours.
$select = $DB->sql_like('name', ':lastcompleted') . ' OR ' . $DB->sql_like('name', ':requested');
$params = [
'lastcompleted' => tour::TOUR_LAST_COMPLETED_BY_USER . '%',
'requested' => tour::TOUR_REQUESTED_BY_USER . '%',
];
$preferences = $DB->get_records_select('user_preferences', $select, $params, '', 'DISTINCT name');
foreach ($preferences as $preference) {
// Match tour ID at the end of the preference name, remove all of that preference type if tour ID doesn't exist.
if (preg_match('/(?<tourid>\d+)$/', $preference->name, $matches) &&
!$DB->record_exists('tool_usertours_tours', ['id' => $matches['tourid']])) {
$DB->delete_records('user_preferences', ['name' => $preference->name]);
}
}
upgrade_plugin_savepoint(true, 2019111802, 'tool', 'usertours');
}
return true;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

@@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the block_html implementation of the privacy API.
* Unit tests for the tool_usertours implementation of the privacy API.
*
* @package block_html
* @package tool_usertours
* @category test
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -27,18 +27,16 @@ defined('MOODLE_INTERNAL') || die();
use \core_privacy\local\metadata\collection;
use \core_privacy\local\request\writer;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\deletion_criteria;
use \tool_usertours\tour;
use \tool_usertours\privacy\provider;
/**
* Unit tests for the block_html implementation of the privacy API.
* Unit tests for the tool_usertours implementation of the privacy API.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_usertours_privacy_testcase extends \core_privacy\tests\provider_testcase {
class tool_usertours_privacy_provider_testcase extends \core_privacy\tests\provider_testcase {
/**
* Ensure that get_metadata exports valid content.
@@ -113,6 +111,40 @@ class tool_usertours_privacy_testcase extends \core_privacy\tests\provider_testc
$this->assertCount(2, (array) $prefs);
}
/**
* Make sure we are exporting preferences for the correct user
*/
public function test_export_user_preferences_correct_user(): void {
global $DB;
$this->resetAfterTest();
$alltours = $DB->get_records('tool_usertours_tours');
$tour = tour::instance(reset($alltours)->id);
// Create test user, mark them as having completed the tour.
$user = $this->getDataGenerator()->create_user();
$this->setUser($user);
$tour->mark_user_completed();
// Switch to admin user, mark them as having reset the tour.
$this->setAdminUser();
$tour->request_user_reset();
// Export test users preferences.
provider::export_user_preferences($user->id);
$writer = writer::with_context(\context_system::instance());
$this->assertTrue($writer->has_any_data());
$prefs = $writer->get_user_preferences('tool_usertours');
$this->assertCount(1, (array) $prefs);
// We should have received back the "completed tour" preference of the test user.
$this->assertStringStartsWith('You last marked the "' . $tour->get_name() . '" user tour as completed on',
reset($prefs)->description);
}
/**
* Ensure that export_user_preferences excludes deleted tours.
*/
+8 -3
View File
@@ -64,7 +64,7 @@ class tour_testcase extends advanced_testcase {
/**
* Helper to mock the database.
*
* @return moodle_database
* @return \PHPUnit\Framework\MockObject\MockObject
*/
public function mock_database() {
global $DB;
@@ -569,9 +569,14 @@ class tour_testcase extends advanced_testcase {
// Mock the database.
$DB = $this->mock_database();
$DB->expects($this->once())
$DB->expects($this->exactly(3))
->method('delete_records')
->with($this->equalTo('tool_usertours_tours'), $this->equalTo(['id' => $id]))
->withConsecutive(
[$this->equalTo('tool_usertours_tours'), $this->equalTo(['id' => $id])],
[$this->equalTo('user_preferences'), $this->equalTo(['name' => tour::TOUR_LAST_COMPLETED_BY_USER . $id])],
[$this->equalTo('user_preferences'), $this->equalTo(['name' => tour::TOUR_REQUESTED_BY_USER . $id])]
)
->willReturn(null)
;
+5
View File
@@ -1,4 +1,9 @@
This files describes API changes in the tool_usertours code.
=== 3.8.4 ===
* The `tourconfig` property returned by the `tool_usertours_fetch_and_start_tour`
external method is now optional, and will be omitted if the tour shouldn't be
shown to the current user
=== 3.5 ===
* Third party library Popper.js was moved from this plugin into core (core/popper)
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2019111801; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2019111802; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2019111200; // Requires this Moodle version.
$plugin->component = 'tool_usertours'; // Full name of the plugin (used for diagnostics).
@@ -149,7 +149,7 @@ abstract class XMLDBCheckAction extends XMLDBAction {
continue;
}
// Fetch metadata from physical DB. All the columns info.
if (!$metacolumns = $DB->get_columns($xmldb_table->getName())) {
if (!$metacolumns = $DB->get_columns($xmldb_table->getName(), false)) {
// / Skip table if no metacolumns is available for it
continue;
}
@@ -93,6 +93,17 @@ class check_defaults extends XMLDBCheckAction {
$physicaldefault = null;
}
// For number fields there are issues with type differences, so let's convert
// everything to a float.
if ($xmldbfield->getType() === XMLDB_TYPE_NUMBER) {
if ($physicaldefault !== null) {
$physicaldefault = (float) $physicaldefault;
}
if ($xmldbdefault !== null) {
$xmldbdefault = (float) $xmldbdefault;
}
}
// There *is* a default and it's wrong.
if ($physicaldefault !== $xmldbdefault) {
$xmldbtext = self::display_default($xmldbdefault);
+19 -3
View File
@@ -624,9 +624,25 @@ class manager {
LEFT JOIN {context} ctx ON ap.contextid = ctx.id
WHERE ctx.id IS NULL)");
$contextsql = "SELECT id FROM {context} ctx";
$DB->delete_records_select('analytics_predictions', "contextid NOT IN ($contextsql)");
$DB->delete_records_select('analytics_indicator_calc', "contextid NOT IN ($contextsql)");
// Cleanup analaytics predictions/calcs with MySQL friendly sub-select.
$DB->execute("DELETE FROM {analytics_predictions} WHERE id IN (
SELECT oldpredictions.id
FROM (
SELECT p.id
FROM {analytics_predictions} p
LEFT JOIN {context} ctx ON p.contextid = ctx.id
WHERE ctx.id IS NULL
) oldpredictions
)");
$DB->execute("DELETE FROM {analytics_indicator_calc} WHERE id IN (
SELECT oldcalcs.id FROM (
SELECT c.id
FROM {analytics_indicator_calc} c
LEFT JOIN {context} ctx ON c.contextid = ctx.id
WHERE ctx.id IS NULL
) oldcalcs
)");
// Clean up stuff that depends on analysable ids that do not exist anymore.
+12 -3
View File
@@ -1492,6 +1492,17 @@ class model {
$prediction->get_prediction_data()->contextid, $prediction->get_sample_data());
}
/**
* Returns the default output directory for prediction processors
*
* @return string
*/
public static function default_output_dir(): string {
global $CFG;
return $CFG->dataroot . DIRECTORY_SEPARATOR . 'models';
}
/**
* Returns the output directory for prediction processors.
*
@@ -1506,8 +1517,6 @@ class model {
* @return string
*/
public function get_output_dir($subdirs = array(), $onlymodelid = false) {
global $CFG;
$subdirstr = '';
foreach ($subdirs as $subdir) {
$subdirstr .= DIRECTORY_SEPARATOR . $subdir;
@@ -1516,7 +1525,7 @@ class model {
$outputdir = get_config('analytics', 'modeloutputdir');
if (empty($outputdir)) {
// Apply default value.
$outputdir = rtrim($CFG->dataroot, '/') . DIRECTORY_SEPARATOR . 'models';
$outputdir = self::default_output_dir();
}
// Append model id.
+1 -1
View File
@@ -158,5 +158,5 @@ Feature: Manage analytics models
Scenario: Delete model
When I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
And I choose "Delete" in the open action menu
And I click on "Delete" "button" in the "Confirm" "dialogue"
And I click on "Delete" "button" in the "Delete" "dialogue"
Then I should not see "Students at risk of not meeting the course completion conditions"
+8
View File
@@ -57,5 +57,13 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2019111801) {
// Normalize the memberattribute_isdn plugin config.
set_config('memberattribute_isdn',
!empty(get_config('auth_cas', 'memberattribute_isdn')), 'auth_cas');
upgrade_plugin_savepoint(true, 2019111801, 'auth', 'cas');
}
return true;
}
+2 -2
View File
@@ -239,9 +239,9 @@ if ($ADMIN->fulltree) {
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));
// Member attribute uses dn.
$settings->add(new admin_setting_configtext('auth_cas/memberattribute_isdn',
$settings->add(new admin_setting_configselect('auth_cas/memberattribute_isdn',
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));
// Object class.
$settings->add(new admin_setting_configtext('auth_cas/objectclass',
+1 -1
View File
@@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2019111800; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2019111801; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2019111200; // Requires this Moodle version
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
+6 -3
View File
@@ -603,9 +603,12 @@ class auth_plugin_db extends auth_plugin_base {
}
}
if (!empty($update)) {
$authdb->Execute("UPDATE {$this->config->table}
SET ".implode(',', $update)."
WHERE {$this->config->fielduser}='".$this->ext_addslashes($extusername)."'");
$sql = "UPDATE {$this->config->table}
SET ".implode(',', $update)."
WHERE {$this->config->fielduser} = ?";
if (!$authdb->Execute($sql, array($this->ext_addslashes($extusername)))) {
print_error('auth_dbupdateerror', 'auth_db');
}
}
$authdb->Close();
return true;
+1
View File
@@ -74,5 +74,6 @@ $string['auth_dbcannotconnect'] = 'Cannot connect to external database.';
$string['auth_dbcannotreadtable'] = 'Cannot read external table.';
$string['auth_dbtableempty'] = 'External table is empty.';
$string['auth_dbcolumnlist'] = 'External table contains the following columns:<br />{$a}';
$string['auth_dbupdateerror'] = 'Error updating external database.';
$string['pluginname'] = 'External database';
$string['privacy:metadata'] = 'The External database authentication plugin does not store any personal data.';
+2 -2
View File
@@ -147,12 +147,12 @@ class auth_email_external extends external_api {
array(
'id' => new external_value(PARAM_INT, 'Profile field id', VALUE_OPTIONAL),
'shortname' => new external_value(PARAM_ALPHANUMEXT, 'Profile field shortname', VALUE_OPTIONAL),
'name' => new external_value(PARAM_TEXT, 'Profield field name', VALUE_OPTIONAL),
'name' => new external_value(PARAM_RAW, 'Profield field name', VALUE_OPTIONAL),
'datatype' => new external_value(PARAM_ALPHANUMEXT, 'Profield field datatype', VALUE_OPTIONAL),
'description' => new external_value(PARAM_RAW, 'Profield field description', VALUE_OPTIONAL),
'descriptionformat' => new external_format_value('description'),
'categoryid' => new external_value(PARAM_INT, 'Profield field category id', VALUE_OPTIONAL),
'categoryname' => new external_value(PARAM_TEXT, 'Profield field category name', VALUE_OPTIONAL),
'categoryname' => new external_value(PARAM_RAW, 'Profield field category name', VALUE_OPTIONAL),
'sortorder' => new external_value(PARAM_INT, 'Profield field sort order', VALUE_OPTIONAL),
'required' => new external_value(PARAM_INT, 'Profield field required', VALUE_OPTIONAL),
'locked' => new external_value(PARAM_INT, 'Profield field locked', VALUE_OPTIONAL),
+1 -1
View File
@@ -49,6 +49,6 @@ class behat_auth_email extends behat_base {
$confirmationpath = $confirmationurl->out_as_local_url(false);
$url = $confirmationpath . '?' . 'data='. $secret .'/'. $username;
$this->getSession()->visit($this->locate_path($url));
$this->execute('behat_general::i_visit', [$url]);
}
}
+60 -3
View File
@@ -76,9 +76,66 @@ class auth_email_external_testcase extends externallib_advanced_testcase {
$this->assertEquals(print_password_policy(), $result['passwordpolicy']);
$this->assertNotContains('recaptchachallengehash', $result);
$this->assertNotContains('recaptchachallengeimage', $result);
$this->assertCount(2, $result['profilefields']);
$this->assertEquals('text', $result['profilefields'][0]['datatype']);
$this->assertEquals('textarea', $result['profilefields'][1]['datatype']);
// Whip up a array with named entries to easily check against.
$namedarray = array();
foreach ($result['profilefields'] as $key => $value) {
$namedarray[$value['shortname']] = array(
'datatype' => $value['datatype']
);
}
// Just check if we have the fields from this test. If a plugin adds fields we'll let it slide.
$this->assertArrayHasKey('frogname', $namedarray);
$this->assertArrayHasKey('sometext', $namedarray);
$this->assertEquals('text', $namedarray['frogname']['datatype']);
$this->assertEquals('textarea', $namedarray['sometext']['datatype']);
}
/**
* Test get_signup_settings with mathjax in a profile field.
*/
public function test_get_signup_settings_with_mathjax_in_profile_fields() {
global $CFG, $DB;
require_once($CFG->dirroot . '/lib/externallib.php');
// Enable MathJax filter in content and headings.
$this->configure_filters([
['name' => 'mathjaxloader', 'state' => TEXTFILTER_ON, 'move' => -1, 'applytostrings' => true],
]);
// Create category with MathJax and a new field with MathJax.
$categoryname = 'Cat $$(a+b)=2$$';
$fieldname = 'Some text $$(a+b)=2$$';
$categoryid = $DB->insert_record('user_info_category', array('name' => $categoryname, 'sortorder' => 1));
$field3 = $DB->insert_record('user_info_field', array(
'shortname' => 'mathjaxname', 'name' => $fieldname, 'categoryid' => $categoryid,
'datatype' => 'textarea', 'signup' => 1, 'visible' => 1, 'required' => 1, 'sortorder' => 2));
$result = auth_email_external::get_signup_settings();
$result = external_api::clean_returnvalue(auth_email_external::get_signup_settings_returns(), $result);
// Format the original data.
$sitecontext = context_system::instance();
$categoryname = external_format_string($categoryname, $sitecontext->id);
$fieldname = external_format_string($fieldname, $sitecontext->id);
// Whip up a array with named entries to easily check against.
$namedarray = array();
foreach ($result['profilefields'] as $key => $value) {
$namedarray[$value['shortname']] = $value;
}
// Check the new profile field.
$this->assertArrayHasKey('mathjaxname', $namedarray);
$this->assertStringContainsString('<span class="filter_mathjaxloader_equation">',
$namedarray['mathjaxname']['categoryname']);
$this->assertStringContainsString('<span class="filter_mathjaxloader_equation">',
$namedarray['mathjaxname']['name']);
$this->assertEquals($categoryname, $namedarray['mathjaxname']['categoryname']);
$this->assertEquals($fieldname, $namedarray['mathjaxname']['name']);
}
public function test_signup_user() {
+8
View File
@@ -75,5 +75,13 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v3.8.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2019111801) {
// Normalize the memberattribute_isdn plugin config.
set_config('memberattribute_isdn',
!empty(get_config('auth_ldap', 'memberattribute_isdn')), 'auth_ldap');
upgrade_plugin_savepoint(true, 2019111801, 'auth', 'ldap');
}
return true;
}
+1 -1
View File
@@ -57,7 +57,7 @@ $string['auth_ldap_ldap_encoding'] = 'Encoding used by the LDAP server, most lik
$string['auth_ldap_ldap_encoding_key'] = 'LDAP encoding';
$string['auth_ldap_login_settings'] = 'Login settings';
$string['auth_ldap_memberattribute'] = 'Optional: Overrides user member attribute, when users belongs to a group. Usually \'member\'';
$string['auth_ldap_memberattribute_isdn'] = 'Optional: Overrides handling of member attribute values, either 0 or 1';
$string['auth_ldap_memberattribute_isdn'] = 'Overrides handling of member attribute values';
$string['auth_ldap_memberattribute_isdn_key'] = 'Member attribute uses dn';
$string['auth_ldap_memberattribute_key'] = 'Member attribute';
$string['auth_ldap_noconnect'] = 'LDAP-module cannot connect to server: {$a}';
+2 -2
View File
@@ -142,9 +142,9 @@ if ($ADMIN->fulltree) {
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));
// Member attribute uses dn.
$settings->add(new admin_setting_configtext('auth_ldap/memberattribute_isdn',
$settings->add(new admin_setting_configselect('auth_ldap/memberattribute_isdn',
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));
// Object class.
$settings->add(new admin_setting_configtext('auth_ldap/objectclass',
+19 -8
View File
@@ -108,16 +108,19 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
$o['ou'] = 'users';
ldap_add($connection, 'ou='.$o['ou'].','.$topdn, $o);
$createdusers = array();
for ($i=1; $i<=5; $i++) {
$this->create_ldap_user($connection, $topdn, $i);
$createdusers[] = 'username' . $i;
}
// Set up creators group.
$assignedroles = array('username1', 'username2');
$o = array();
$o['objectClass'] = array('posixGroup');
$o['cn'] = 'creators';
$o['gidNumber'] = 1;
$o['memberUid'] = array('username1', 'username2');
$o['memberUid'] = $assignedroles;
ldap_add($connection, 'cn='.$o['cn'].','.$topdn, $o);
$creatorrole = $DB->get_record('role', array('shortname'=>'coursecreator'));
@@ -174,15 +177,23 @@ class auth_ldap_plugin_testcase extends advanced_testcase {
// Check events, 5 users created with 2 users having roles.
$this->assertCount(7, $events);
foreach ($events as $index => $event) {
$usercreatedindex = array(0, 2, 4, 5, 6);
$roleassignedindex = array (1, 3);
if (in_array($index, $usercreatedindex)) {
$this->assertInstanceOf('\core\event\user_created', $event);
}
if (in_array($index, $roleassignedindex)) {
$this->assertInstanceOf('\core\event\role_assigned', $event);
$username = $DB->get_field('user', 'username', array('id' => $event->relateduserid)); // Get username.
if ($event->eventname === '\core\event\user_created') {
$this->assertContains($username, $createdusers);
unset($events[$index]); // Remove matching event.
} else if ($event->eventname === '\core\event\role_assigned') {
$this->assertContains($username, $assignedroles);
unset($events[$index]); // Remove matching event.
} else {
$this->fail('Unexpected event found: ' . $event->eventname);
}
}
// If all the user_created and role_assigned events have matched
// then the $events array should be now empty.
$this->assertCount(0, $events);
$this->assertEquals(5, $DB->count_records('user', array('auth'=>'ldap')));
$this->assertEquals(2, $DB->count_records('role_assignments'));
+1 -1
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2019111800; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2019111801; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2019111200; // Requires this Moodle version
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)
+4 -3
View File
@@ -455,8 +455,9 @@ class auth extends \auth_plugin_base {
}
}
$issuer = $client->get_issuer();
// First we try and find a defined mapping.
$linkedlogin = api::match_username_to_user($userinfo['username'], $client->get_issuer());
$linkedlogin = api::match_username_to_user($userinfo['username'], $issuer);
if (!empty($linkedlogin) && empty($linkedlogin->get('confirmtoken'))) {
$mappeduser = get_complete_user_data('id', $linkedlogin->get('userid'));
@@ -474,7 +475,7 @@ class auth extends \auth_plugin_base {
$SESSION->loginerrormsg = get_string('invalidlogin');
$client->log_out();
redirect(new moodle_url('/login/index.php'));
} else if ($mappeduser && $mappeduser->confirmed) {
} else if ($mappeduser && ($mappeduser->confirmed || !$issuer->get('requireconfirmation'))) {
// Update user fields.
$userinfo = $this->update_user($userinfo, $mappeduser);
$userwasmapped = true;
@@ -503,7 +504,7 @@ class auth extends \auth_plugin_base {
redirect(new moodle_url('/login/index.php'));
}
$issuer = $client->get_issuer();
if (!$issuer->is_valid_login_domain($oauthemail)) {
// Trigger login failed event.
$failurereason = AUTH_LOGIN_UNAUTHORISED;
+1 -1
View File
@@ -58,7 +58,7 @@ class behat_auth extends behat_base {
}
// Visit login page.
$this->getSession()->visit($this->locate_path($loginurl->out_as_local_url()));
$this->execute('behat_general::i_visit', [$loginurl]);
// Enter username and password.
$this->execute('behat_forms::i_set_the_field_to', array('Username', $this->escape($username)));

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