Commit graph

100566 commits

Author SHA1 Message Date
Simey Lameze
10018bbc39 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:39:46 +08:00
Sara Arjona
003dadc64d on-demand release 3.11dev+ 2021-04-20 15:52:10 +02:00
Sara Arjona
bfa5ef0ea0 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2021-04-20 15:52:07 +02:00
Jun Pataleta
e3bd87cae7 Merge branch 'MDL-71364_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-04-20 09:24:44 +08:00
AMOS bot
587afbb7ad Automatically generated installer lang files 2021-04-20 00:07:30 +00:00
Víctor Déniz
3de3ebc4f3 Merge branch 'MDL-71087-311' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_311_STABLE 2021-04-19 23:44:38 +01:00
Eloy Lafuente (stronk7)
5e0772ed8b Merge branch 'MDL-69256-311' of git://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2021-04-20 00:04:56 +02:00
Víctor Déniz
6b9033f251 Merge branch 'MOODLE_311_STABLE_fix_gradeimport_csv' of https://github.com/intrajp/moodle into MOODLE_311_STABLE 2021-04-19 22:48:24 +01:00
Víctor Déniz
42a4fea40c Merge branch 'MDL-71118-311' of git://github.com/lucaboesch/moodle into MOODLE_311_STABLE 2021-04-19 19:44:08 +01:00
Eloy Lafuente (stronk7)
6c5c501504 Merge branch 'MDL-71181-311' of https://github.com/ettolrah/moodle into MOODLE_311_STABLE 2021-04-19 18:58:24 +02:00
Eloy Lafuente (stronk7)
cb6cdc0fd3 Merge branch 'MOODLE_311_STABLE-MDL-71190-backup-lastaccess' of https://github.com/ScottVerbeek/moodle into MOODLE_311_STABLE 2021-04-19 18:52:30 +02:00
Sara Arjona
ab308e8847 Merge branch 'MDL-71262_311' of https://github.com/mkassaei/moodle into MOODLE_311_STABLE 2021-04-19 17:44:09 +02:00
Sara Arjona
e4d4369b2f MDL-71225 questions: Remove duplicated empty line 2021-04-19 17:28:43 +02:00
Sara Arjona
bcfa03c428 Merge branch 'MDL-71225_311' of https://github.com/mkassaei/moodle into MOODLE_311_STABLE 2021-04-19 17:18:40 +02:00
Sara Arjona
8ec2411be7 Merge branch 'MDL-67882-message-config-log-MOODLE_311_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_311_STABLE 2021-04-19 16:22:54 +02:00
Sara Arjona
103d168357 Merge branch 'MDL-71367_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-04-19 11:12:56 +02:00
Sara Arjona
350b49766a Merge branch 'MDL-71365_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-04-19 10:18:32 +02:00
Sara Arjona
5a2ae7ecde Merge branch 'MDL-66475-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-04-19 09:49:15 +02:00
Sara Arjona
a569ba73b4 Merge branch 'MDL-65553-311' of git://github.com/aanabit/moodle into MOODLE_311_STABLE 2021-04-19 08:53:39 +02:00
Jun Pataleta
8224c9d6b7 Merge branch 'MDL-71324-311' of git://github.com/lucaboesch/moodle into MOODLE_311_STABLE 2021-04-19 12:31:27 +08:00
ScottVerbeek
d687a56fed MDL-71190 backup: Include users last access to course
Backup the table user_lastaccess which holds data for when a user last accessed a course.
And also restore to the table user_lastaccess from the .xml file created in the backup.
2021-04-19 12:04:30 +10:00
Andrew Nicols
1e90af329d Merge branch 'MDL-71012-311' of https://github.com/jessansell/moodle into MOODLE_311_STABLE 2021-04-19 08:49:06 +08:00
Eloy Lafuente (stronk7)
c86f286543 MDL-71367 unit tests: Add missing ->destroy() call to test backups
As part of the tests preparations, some backups are created, but
the tests aren't calling to their ->destroy() method at the end.

The destroy() method is needed to go cleaning and unsetting various
objects that, only then, will free resources, like memory, open files...

This isn't critical under Unix OSs... but Windows is really sensible
and keeps all open files locked, so any write operation on them fails.
2021-04-19 00:03:46 +02:00
Eloy Lafuente (stronk7)
b98005ec2a Merge branch 'MDL-71031_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-04-18 17:08:51 +02:00
Eloy Lafuente (stronk7)
51a5d523a1 MDL-71031 external: Minor tweaks towards coding style and external rules
- Some small namespace/use/MOODLE_INTERNAL/requires reorganization.
- Move file phpdocs to class phpdocs.
- Move external method names to be new "execute" default ones.
- Move unit tests to matching core_grades\external namespace.
- Add missing clean_returnvalue() calls.
2021-04-18 11:53:09 +02:00
Peter Burnett
74a86a9880 MDL-71031 webservices: Extended gradecategory creation API
This adds a new webservice that creates gradecategories as a batch,
and deprecates the old single creation call, which is superseded.
It also patches a few small issues in the single WS, for any integrations
currently relying on that webservice.
2021-04-18 11:53:03 +02:00
AMOS bot
eb45c21753 Automatically generated installer lang files 2021-04-18 00:07:28 +00:00
Eloy Lafuente (stronk7)
e5441b439e MDL-71365 grunt: fix boost ignores order and missing LF @ EOF 2021-04-18 00:13:12 +02:00
Eloy Lafuente (stronk7)
b086645bd7 MDL-71364 behat: fix randomness causes by "now" advancing
Some recent tests do set a date time element
to ##now## or tomorrow and, immediately after that
the look if, effectively, ##now## and #tomorrow#
have been set (with minutes resolution).

Problem is that, between the field is set and the field
is verified, it can happen that the time advances to
next minute (from H:M:59 to H:M+1:00) and then the
assertion fails.

To avoid this, we could have lowered the resolution to be
hours... but that doesn't solve the problem just makes it
to happen less often.

So, instead of that... we are setting the 2 now and tomorrow
cases to be "today noon" and "tomorrow noon" (12:00:00) so
we ensure they won't be ever in the risk of jumping of minute.
2021-04-17 12:32:35 +02:00
Luca Bösch
e2b1ede0dd MDL-71324 course: Render hasinfo class only if necessary. 2021-04-17 11:49:28 +02:00
Luca Bösch
c5446c9cc7 MDL-71118 core: Add grade (verb) string.
AMOS BEGIN
 CPY [grade,core],[gradenoun,core]
 CPY [grade,core],[gradeverb,core]
AMOS END
2021-04-17 11:45:57 +02:00
Luca Bösch
3256a63914 MDL-71118 gradereport_user: Display Grades (plural) in profile page. 2021-04-17 11:45:57 +02:00
Eloy Lafuente (stronk7)
8b9717935c Merge branch 'MDL-70099-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-04-17 09:40:28 +02:00
Eloy Lafuente (stronk7)
9b8427c455 Merge branch 'MDL-71334-311' of git://github.com/mickhawkins/moodle into MOODLE_311_STABLE 2021-04-16 19:59:45 +02:00
Sara Arjona
9600becce3 on-demand release 3.11dev+ 2021-04-16 17:06:23 +02:00
Sara Arjona
dfbea60ac4 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2021-04-16 17:06:20 +02:00
Sara Arjona
b3209c0ac5 MDL-69331 core_h5p: fix behat errors 2021-04-16 13:07:09 +02:00
Andrew Nicols
b816aa102d Merge branch 'MOODLE_311_MDL-71233' of https://github.com/golenkovm/moodle into MOODLE_311_STABLE 2021-04-16 08:06:23 +01:00
Jun Pataleta
03f21e4cc0 Merge branch 'MDL-48594-311' of https://github.com/nguyenphuctien/moodle into MOODLE_311_STABLE 2021-04-16 08:06:23 +01:00
Andrew Nicols
c0db4805df Merge branch 'MDL-60490-missing_close_div-311' of https://github.com/leonstr/moodle into MOODLE_311_STABLE 2021-04-16 08:06:22 +01:00
Andrew Nicols
28d07f3373 Merge branch 'MDL-69415-311' of git://github.com/sarjona/moodle into MOODLE_311_STABLE 2021-04-16 08:06:22 +01:00
Paul Phillips
11a15b8b9c MDL-71167 mod_scorm: use full url in redirect 2021-04-16 08:06:22 +01:00
Jake Dallimore
a7061af4fb Merge branch 'MDL-71342-311-2' of git://github.com/junpataleta/moodle into MOODLE_311_STABLE 2021-04-16 08:06:22 +01:00
Andrew Nicols
e1eff84dd2 Merge branch 'MOODLE_311_MDL-71254' of https://github.com/golenkovm/moodle into MOODLE_311_STABLE 2021-04-16 08:06:22 +01:00
Andrew Nicols
6d6a57dda9 Merge branch 'MDL-71186-m311' of https://github.com/clransom/moodle into MOODLE_311_STABLE 2021-04-16 08:06:22 +01:00
Víctor Déniz
9976bacec2 Merge branch 'MDL-69331-311' of git://github.com/sarjona/moodle into MOODLE_311_STABLE 2021-04-16 08:06:21 +01:00
Sara Arjona
4fcc06b43e Merge branch 'MDL-70269_311' of https://github.com/timhunt/moodle into MOODLE_311_STABLE 2021-04-16 08:06:21 +01:00
Michael Hawkins
65dea75cc6 MDL-71334 mod_lti: Fix manual activity completion behat test 2021-04-16 14:10:27 +08:00
Tien Nguyen
5ad8101553 MDL-48594 Report: More filtering options on Activity Completion Report 2021-04-16 10:07:06 +07:00
Jun Pataleta
91170558ac MDL-71342 mod: Conditionally display activity info
* The activity information output component is still being displayed
even in the case when the activity does not have dates to show and
completion tracking is not enabled.
This also causes a horizontal line to be rendered in activity view pages
below the activity heading which does not serve much purpose when
there's no activity information to be shown.
The activity information output component should only be displayed
if there's completion information to show or if there are activty dates
to show. Otherwise, there's no need to render it.
2021-04-15 23:10:42 +08:00