moodle/lib
Simey Lameze 5b0282847e 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:28:52 +08:00
..
adodb MDL-71011 adodb: Update readme and thirdpartylibs 2021-04-12 18:49:38 +02:00
ajax MDL-58018 core: finish dev to support open sessions without a lock 2020-04-21 19:29:12 +02:00
amd MDL-71089 core: Add different Toast notification styling 'types' 2021-04-13 16:28:35 +02:00
antivirus Merge branch 'MDL-70269' of https://github.com/timhunt/moodle 2021-04-16 07:57:00 +01:00
babel-polyfill
behat MDL-71264 behat: Change date(time) element update order 2021-04-06 16:25:46 +02:00
bennu
classes MDL-71156 core: machinery to recover orphaned calendar events 2021-04-22 10:28:52 +08:00
db MDL-71156 core: machinery to recover orphaned calendar events 2021-04-22 10:28:52 +08:00
ddl MDL-71036 phpunit: Renamed various regexp-related assertions 2021-03-11 19:22:24 +01:00
dml MDL-71036 phpunit: Renamed various regexp-related assertions 2021-03-11 19:22:24 +01:00
dtl MDL-67886 core: check_database_schema() checks for extra indexes 2020-04-23 00:45:43 +02:00
editor Merge branch 'MDL-65776-master' of git://github.com/sarjona/moodle 2021-03-25 11:03:32 +08:00
emoji-data MDL-70316 core: Document emoji-data upgrade and update version in core 2021-01-27 13:37:02 +08:00
evalmath
external MDL-68098 ws: Add unit tests to test mathjax in WS 2020-09-23 11:18:41 +02:00
filebrowser MDL-67673 phpunit: Fix the return type of template methods 2020-10-21 12:45:59 +02:00
filestorage Merge branch 'MDL-70901-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:40:46 +01:00
fonts
form Merge branch 'MDL-71087-master' of https://github.com/NashTechOpenUniversity/moodle 2021-04-19 23:44:06 +01:00
geopattern-php
google MDL-67115 google: php74 params order for implode() 2020-01-19 18:47:28 +01:00
grade MDL-71118 core: Add grade (verb) string. 2021-04-17 11:46:09 +02:00
horde MDL-70298 lib_horde: Upgrade Horde library to 5.2.23 2021-01-12 15:57:58 +02:00
html2text MDL-70295 libraries: upgrade to version 4.3.1 of Html2Text. 2020-11-25 21:35:14 +00:00
htmlpurifier NOBUG: Fixed file access permissions 2021-01-22 11:30:38 +08:00
http-message MDL-69548 core: Adding the http-message library 2020-09-18 10:01:09 +08:00
jabber MDL-65743 lib: update moodle library docs 2020-10-05 13:38:31 +08:00
jquery MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:48:26 +08:00
ltiprovider
markdown MDL-70296 core: Update the moodle's readme, xml and upgrade files 2021-01-18 09:30:02 +08:00
maxmind MDL-70303 libraries: upgrade GeoIP to 2.11.0 and MaxMind DB to 1.9.0 2021-01-19 16:35:04 +01:00
minify MDL-70291 core: Update lib readme, upgrade and xml files 2021-01-18 09:28:14 +08:00
mlbackend MDL-69475 versions: bump all versions and requires in master 2020-08-18 00:47:15 +02:00
mustache MDL-67377 lib: Moodle changes to mustache upgrade 2020-01-09 17:32:56 +01:00
pear MDL-70457 forms: php74 fix for the (not used in core) date element 2021-02-26 11:55:24 +01:00
php-css-parser MDL-70300 core_lib: Update thirdpartylibs php-css-parser 2021-01-20 15:52:11 +08:00
php-enum MDL-70319 core: Upgrade php-enum to 1.7.7 2021-01-19 10:02:00 +02:00
php-jwt MDL-66920 lib/php-jwt: Update to version 5.2.0 to add JWK support 2020-04-08 13:12:23 -03:00
phpmailer MDL-70292 lib: Moodle customizations. 2021-01-19 09:05:55 +02:00
phpspreadsheet MDL-70314 lib: Remove a few more hidden files and add instructions 2021-02-23 18:40:29 +01:00
phpunit Merge branch 'MDL-70893-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:23:26 +01:00
plist MDL-70318 core: Moodle customisations. 2021-03-19 10:19:10 +02:00
polyfills MDL-70315 libraries: upgrade Javascript polyfills. 2021-01-21 08:04:56 +00:00
portfolio
requirejs MDL-69680 lib: Update jQuery version in Moodle files 2021-03-04 12:48:26 +08:00
rtlcss
scssphp MDL-70301 lib: Upgrade scssphp to 1.4.1 2021-01-21 10:32:58 +08:00
simplepie MDL-70293 libraries: upgrade to version 1.5.6 of SimplePie. 2020-11-25 20:44:03 +00:00
spout MDL-70302 core: Update the lib's readme, xml and upgrade files 2021-01-21 09:32:53 +08:00
table MDL-70871 table: Add 'Show all X' functionality to dynamic_table 2021-03-23 09:55:16 +01:00
tcpdf MDL-70735 tcpdf: Reduce information disclosure from TCPDF 2021-02-12 15:41:38 +11:00
templates MDL-71089 core: Add different Toast notification styling 'types' 2021-04-13 16:28:35 +02:00
testing MDL-71182 calendar: Revert "Merge branch 'MDL-67494-master' of git://github.com/lameze/moodle" 2021-03-24 09:11:01 +08:00
tests MDL-71156 core: machinery to recover orphaned calendar events 2021-04-22 10:28:52 +08:00
typo3 MDL-67316 typo3: Pass correct hex chars to hexdec() 2020-04-24 15:56:38 +02:00
userkey
xapi MDL-71036 phpunit: xml config - switch coverage info to new includes 2021-03-11 23:04:32 +01:00
xhprof MDL-70525 tool_profiling: Cannot import profiling file 2021-02-09 09:45:45 +11:00
xmldb MDL-70931 xmldb: Generate install.xml files with EOL and EOF 2021-02-17 20:59:19 +01:00
yui MDL-69050 lang: Fix variable name and comment in core-notification YUI 2020-09-24 19:41:58 +02:00
yuilib MDL-70992 Folder: Unnecessary tab stops to the left of files 2021-03-17 09:30:04 +07:00
zipstream MDL-69548 core: Adding the ZipStream library 2020-09-17 14:16:59 +08:00
accesslib.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
adminlib.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
authlib.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
badgeslib.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
blocklib.php MDL-69807 blocks: remove redundant sesskey loading edit/delete page. 2020-10-19 22:40:48 +01:00
boxlib.php
cacert.pem
cacert.txt
clilib.php MDL-70131 cli: only allow to negate existing keys 2020-11-06 09:30:08 +08:00
completionlib.php MDL-70781 course: setting for displaying completion conditions 2021-04-02 21:53:20 +08:00
componentlib.class.php
components.json MDL-69166 core_payment: Renamed plugintype name from pg to paygw 2020-10-27 15:34:55 +11:00
conditionlib.php
configonlylib.php
cookies.js
cronlib.php MDL-70357 cron: Catch Throwables not just Exceptions when running tasks 2020-11-30 17:25:19 +01:00
csslib.php
csvlib.class.php
customcheckslib.php
dataformatlib.php MDL-68500 dataformat: re-factor download/export methods into new class. 2020-05-04 16:01:12 +01:00
datalib.php MDL-71186 core_user: show custom user fields in group management screens 2021-04-15 15:28:17 +01:00
ddllib.php
default.ttf
deprecatedlib.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
dmllib.php
dtllib.php
editorlib.php
emptyfile.php
enrollib.php MDL-70099 enrol: increase accuracy of current enrolments by date. 2021-04-05 19:32:33 +01:00
environmentlib.php MDL-68735 env: Moodle 3.8.x, 3.9.x and 3.10.x do not support PHP 8.0 2021-02-26 13:07:59 +01:00
excellib.class.php MDL-70314 lib: Change XLSX wrapper to no change the default styles 2021-02-22 15:32:09 +08:00
externallib.php MDL-70877 php: remove final functions __clone and __wakeup 2021-02-26 13:07:52 +01:00
filelib.php MDL-70649 files: Alternative security helper 2021-04-14 21:21:35 +10:00
filterlib.php MDL-67060 core_h5p: Improvements to Manage H5P setting page 2020-02-11 10:26:57 +01:00
flickrclient.php MDL-69006 repository_flickr: flickr authentication fails 2020-06-10 15:46:13 +02:00
flickrlib.php
formslib.php MDL-70919 core_form: non-static method can not be called statically 2021-03-18 12:15:49 +01:00
gdlib.php MDL-70968 core: PHP8 compatibility, not allowed to pass extra parameters 2021-02-28 19:43:37 +01:00
googleapi.php
gradelib.php MDL-70245 core_grade: Fix grade_get_setting unit test failures 2020-12-10 16:46:09 +11:00
graphlib.php
grouplib.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
index.html
installlib.php
javascript-static.js
javascript.php
jslib.php
jssourcemap.php
ldaplib.php MDL-67316 ldap: Pass correct hex chars to hexdec() 2020-04-24 15:56:38 +02:00
lexer.php
licenselib.php MDL-69698 licenses: Do not cache the localised licenses fullnames 2020-09-15 10:37:06 +02:00
listlib.php MDL-67115 core: php74 params order for implode()/join() 2020-01-19 18:47:07 +01:00
mathslib.php
messagelib.php
modinfolib.php Merge branch 'MDL-70537-master' of https://github.com/sammarshallou/moodle 2021-03-26 20:14:19 +00:00
moodlelib.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
myprofilelib.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
navigationlib.php MDL-70099 enrol: increase accuracy of current enrolments by date. 2021-04-05 19:32:33 +01:00
oauthlib.php MDL-70268 core: Update the oauthlib to exclude scope if none provided 2021-03-03 12:03:40 +08:00
odslib.class.php
outputactions.php
outputcomponents.php MDL-71099 Lib: Move new user_fields class from core to core_user 2021-03-25 13:47:23 +00:00
outputfactories.php
outputfragmentrequirementslib.php
outputlib.php MDL-70486 output: Improve check for block region name string existence 2020-12-17 10:04:46 +01:00
outputrenderers.php MDL-71342 mod: Conditionally display activity info 2021-04-15 23:10:03 +08:00
outputrequirementslib.php MDL-70821 course: Remove old manual completion toggling 2021-04-12 11:41:37 +08:00
pagelib.php MDL-70207 core_navigation: Initial backend for primary navigation 2021-04-06 11:45:44 +08:00
pdflib.php
phpminimumversionlib.php
plagiarismlib.php MDL-32226 plagiarism: add span around links. 2021-04-09 12:03:04 +02:00
portfoliolib.php
questionlib.php MDL-69077 questions: question tag capabilties are relevant 2020-06-17 13:06:57 +01:00
recaptchalib_v2.php
requirejs.php
resourcelib.php
rsslib.php MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:53:37 +01:00
searchlib.php
sessionlib.php
setup.php MDL-71012 setup: Return 500 error code for setup errors. 2021-03-22 14:05:45 +00:00
setuplib.php MDL-71012 setup: Return 500 error code for setup errors. 2021-03-22 14:05:45 +00:00
soaplib.php
statslib.php
tablelib.php Merge branch 'MDL-71099-master' of https://github.com/sammarshallou/moodle 2021-03-27 10:17:43 +01:00
thirdpartylibs.xml MDL-71011 adodb: Update readme and thirdpartylibs 2021-04-12 18:49:38 +02:00
tokeniserlib.php
upgrade.txt MDL-71031 webservices: Extended gradecategory creation API 2021-04-18 11:52:07 +02:00
upgradelib.php Merge branch 'MDL-71169-master-execute' of git://github.com/mudrd8mz/moodle 2021-04-14 08:35:07 +08:00
uploadlib.php
validateurlsyntax.php
webdavlib.php
weblib.php MDL-48269 group: Remove the option to hide the picture of a group 2021-02-16 12:46:58 +08:00
wiki_to_markdown.php
womenslib.php
wordlist.txt
xhtml.xsl
xmlize.php
xsendfilelib.php