Commit graph

8374 commits

Author SHA1 Message Date
Simey Lameze
c72839d6d0 MDL-71156 core: machinery to recover orphaned calendar events
The machinery to fix orphaned calendar events that were broken by MDL-67494.

The solution consists of:

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

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

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

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

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

4) Unit tests and helper functions to generate calendar events. We have decided to
   keep the tests simple, testing only true and false and not using data generators because
   the code is purely to recover the calendar events and won't turn into an API or something
   and also due to the urgency of this issue.
   The helpers have been created in calendar/tests/helpers.php since there are no data generators
   for calendar.
2021-04-22 10:45:27 +08:00
Andrew Nicols
fdcc9383b1 Merge branch 'MDL-60490-missing_close_div-39' of https://github.com/leonstr/moodle into MOODLE_39_STABLE 2021-04-16 11:55:01 +08:00
Paul Holden
a6a5130a65 MDL-71338 tool_usertours: correct Content-Type on tour export.
Replace existing code with standard file serving mechanism, in
turn correcting the previously incorrect Content-Type header.
2021-04-14 21:12:03 +01:00
Leon Stringer
d80644a986 MDL-60490 tool_lp: Missing div close
Mustache template had opening <div> with missing </div>.
2021-04-01 12:17:24 +01:00
Paul Holden
0464ae85ca MDL-68635 tool_cohortroles: observe user initial table filter. 2021-03-29 14:12:01 +01:00
Mihail Geshoski
4b987e5f7a MDL-44613 tool_behat: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in tool_behat behat tests.
2021-03-15 20:05:25 +08:00
Eloy Lafuente (stronk7)
5987bed350 Merge branch 'MDL-70726-3.9' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_39_STABLE 2021-03-11 00:12:19 +01:00
Ilya Tregubov
472fdf0603 MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:47:44 +08:00
Eloy Lafuente (stronk7)
8d748b3401 Merge branch 'MDL-70424-auth-avoid-changes-MOODLE_39_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_39_STABLE 2021-03-04 00:32:34 +01:00
Brendan Heywood
6feb10dd53 MDL-70424 auth: Avoid random changes to $CFG->auth 2021-03-04 09:31:51 +11:00
Marina Glancy
009b90a43b MDL-65552 user: escape idnumber and email in table_sql 2021-03-03 23:14:37 +08:00
Paul Holden
7afca3b34a MDL-65552 user: escape idnumber field on output.
This commit also corrects parameter definition of the field to
match core_user.
2021-03-03 23:14:37 +08:00
Sara Arjona
b08b4a2bdc Merge branch 'MDL-67515-39' of git://github.com/vmdef/moodle into MOODLE_39_STABLE 2021-03-02 11:21:39 +01:00
Víctor Déniz
6864463dc4 MDL-67515 tool_customlang: Ignore invalid component strings
After uninstalling a plugin, the translated strings remain in
tool_customlang table, throwing an exception when trying to localise
any strings. Currently there is no mechanism to
clean up customlang tables and files during the uninstall process,
so with this patch the invalid components will be ignored.
2021-03-02 09:09:25 +00:00
Sara Arjona
52777e6a56 Merge branch 'MDL-68735_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-03-01 16:17:48 +01:00
Amaia Anabitarte
616935475b MDL-70726 behat: Fixing existing fail tests
Some of the current behat tests were wrong but not failing because of the bug in 'should not exist' step.
Once the bug is fixed, we must fix also wrong behats.
2021-03-01 16:09:20 +07:00
Eloy Lafuente (stronk7)
35d42cc6a7 Merge branch 'MDL-70931-39-xmldbeol' of git://github.com/mudrd8mz/moodle into MOODLE_39_STABLE 2021-03-01 10:01:22 +01:00
Eloy Lafuente (stronk7)
c302886845 MDL-68735 env: Moodle 3.8.x, 3.9.x and 3.10.x do not support PHP 8.0 2021-02-26 13:08:11 +01:00
David Mudrák
d6adfa6446 MDL-70964 lang: Use the fixed strings in tests 2021-02-25 19:28:14 +01:00
David Mudrák
5334972a73 MDL-70931 xmldb: Generate install.xml files with EOL and EOF
As discussed in MDLSITE-6397, all Moodle code files should end with
single Unix-style end of line character. Files created and edited
through the XMLDB editor should follow this rule, too.
2021-02-17 21:06:09 +01:00
Mihail Geshoski
76f2dc1f14 MDL-47410 tool_licensemanager: Update tool_licensemanager behat tests
Updates the tool_licensemanager behat tests to utilize the ability to
conviniently populate the date selector fields.
2021-02-11 12:15:45 +08:00
Eloy Lafuente (stronk7)
4640d8f9ca MDL-70741 capability overview: missing whitespace after placeholder 2021-02-04 00:01:03 +01:00
Sara Arjona
fb298c2209 Merge branch 'MDL-70741_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2021-02-03 14:49:57 +01:00
Jun Pataleta
6c97f9d1f5 MDL-70288 mod_lti: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 14:22:30 +08:00
Tim Hunt
186fd5b847 MDL-70741 capability overview: avoid errors from orphan contexts 2021-01-29 20:51:08 +00:00
Andrew Nicols
42bb84db9f MDL-66979 behat: Mark some tests as being slow
Uses of the httpsreplace and customlang tools are known to be extremely
slow.

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

These changes set appropriate timeout factors to increase the timeout
accordingly.
2021-01-29 14:19:16 +08:00
Andrew Nicols
985f4d1e48 MDL-66979 behat: Warn about old behat.yml file location 2021-01-23 20:45:06 +08:00
Andrew Nicols
3489bb1f30 MDL-66979 behat: Remove unnecessary steps which fail
These steps were completely pointless and were failing with the W3C
Webdriver becuase focus was never on the Update Profile button in the
first place.

At a minimum we should remove the Focus change step as it not valid, but
the following step is also pointless.
2021-01-22 14:52:21 +08:00
Sara Arjona
7b85e141da Merge branch 'MDL-69308_39' of https://github.com/stronk7/moodle into MOODLE_39_STABLE 2021-01-14 12:04:13 +01:00
Eloy Lafuente (stronk7)
ae9d510288 MDL-69308 environment: Apply agreed changes
- PHP 7.3 required.
- Moodle 3.6 required.
- SQL*Server 2017 (aka, 14.0) required.
- Sodium PHP extension required.
2021-01-13 19:30:15 +01:00
Eloy Lafuente (stronk7)
981f750b81 MDL-69308 environment: 3.11 base information
This is a direct copy of the 3.10 branch to have
the changes under control in next commits.
2021-01-13 19:30:10 +01:00
Sara Arjona
ea3f1d19b9 Merge branch 'MDL-70567-MOODLE_39_STABLE' of https://github.com/dmitriim/moodle into MOODLE_39_STABLE 2021-01-11 13:09:56 +01:00
Dmitrii Metelkin
087ccaff4f MDL-70567 task: fix broken result filter on logs page 2021-01-06 14:28:38 +11:00
Paul Holden
8de31cf961 MDL-70558 tool_langimport: sort available language packs. 2021-01-04 23:56:05 +00:00
Eloy Lafuente (stronk7)
fa35b9506f Merge branch 'MDL-70279-39' of git://github.com/paulholden/moodle into MOODLE_39_STABLE 2020-12-23 00:47:09 +01:00
Andrew Nicols
8c3091e5f3 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Jake Dallimore
3aa05048cf Merge branch 'MDL-70320-39' of https://github.com/andrewnicols/moodle into MOODLE_39_STABLE 2020-12-10 12:02:53 +08:00
Andrew Nicols
17d6ecd26d MDL-70320 behat: User full path to page admin node 2020-12-10 07:56:58 +08:00
Andrew Nicols
1b0690a7f1 Merge branch 'MDL-70320_39' of https://github.com/timhunt/moodle into MOODLE_39_STABLE 2020-12-09 12:07:32 +08:00
Paul Holden
377da86151 MDL-70279 tool_templatelibrary: preserve component search field value. 2020-12-04 14:55:28 +00:00
Andrew Nicols
7bc67e92e2 Merge branch 'MDL-70080-39' of git://github.com/jleyva/moodle into MOODLE_39_STABLE 2020-12-03 11:55:54 +08:00
Andrew Nicols
5e65d02eab Merge branch 'MDL-70157_39' of https://github.com/rlorenzo/moodle into MOODLE_39_STABLE 2020-12-03 11:01:21 +08:00
Juan Leyva
b1a4bd579a MDL-70080 tool_mobile: Return support contact information via WS 2020-11-27 10:19:15 +01:00
Tim Hunt
cc3a909810 MDL-70320 permission overrides: role names were double-escaped 2020-11-26 20:37:18 +00:00
Andrew Nicols
4f01d454a7 MDL-67668 behat: Add inplace editable field type
This commit promotes the Inplace Editable field to a first-class form
element by introducing a new partial selector for inplace editable
fields, and teaching the field manager how to recognise these, then
introducing a new field type which can handle setting values for this
field.
2020-11-23 09:00:46 +08:00
Charles Fulton
ed46bff4ae MDL-70157 dml: add support for aurora mysql 2020-11-20 15:21:22 -08:00
Andrew Nicols
61d0134488 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Andrew Nicols
2369ad7737 MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
Ferran Recio
629657363d MDL-69378 tool_uploadcourse: fix enrolment methods uploads 2020-11-03 12:27:34 +01:00
Eloy Lafuente (stronk7)
287ed73429 MDL-69973 xmldb: Ensure all reports use fresh metadata (not cached) 2020-10-30 19:27:18 +01:00