Commit Graph

77 Commits

Author SHA1 Message Date
40d90f438a MDL-60923 scheduled tasks: stale temp files in $CFG->backuptempdir too 2018-04-16 23:50:28 +02:00
6ab10c3d77 Merge branch 'wip-MDL-56635-master' of git://github.com/marinaglancy/moodle 2018-04-04 11:27:11 +08:00
883ce42127 MDL-36941 core: convert existing api to use new table structure
Also deprecated the following functions -

1. message_move_userfrom_unread2read - It is not necessary
   for us to mark a message as read on user deletion.
2. message_get_blocked_users - Horrible logic used to
   determine if a user is blocked via reference on some
   randomly chosen 'isblocked' variable.
3. message_get_contacts - The same as above. This can be
   done in a much nicer way.
4. message_mark_message_read - We want two functions to do
   this to avoid confusing messages and notifications.
5. message_can_delete_message - This assumed the variable
   $message contained the 'useridto' property, which
   was present in the old table structure. We do not want
   future usages where a query is done on the new table
   and is simply passed as this won't contain this property.
6. message_delete_message - Same as above.
2018-03-23 12:30:27 +08:00
6bc6757084 MDL-56635 tags: use recordset since component may not be unique 2018-02-16 09:50:57 +08:00
470d59d31f MDL-61063 Scheduled tasks: Add link to clear fail delay 2018-01-12 11:10:29 +00:00
7f8773ffb8 MDL-54106 task: Deleting unconfirmed users after $CFG->deleteunconfirmed 2017-12-08 14:12:57 +01:00
a66de3ca70 MDL-59909 calendar: Try hard not to fail the adhoc task.
Triggering a fatal error in an adhoc task is bad. It will be retried indefinitely.
Even though we are not sure how to get a module instance without a course module record,
it is possible and should not kill the Moodle site.
2017-10-25 15:42:14 +08:00
74b7a42d0d MDL-55356 core_search: Make indexing task/CLI do context requests 2017-10-11 17:17:10 +01:00
d761b3fb19 MDL-55356 core_search: API to check if indexing enabled
New function \core_search\manager::is_indexing_enabled(), analagous
to existing is_global_search_enabled().

This replaces existing duplicated code, ready for more use in
following commits.
2017-10-11 17:17:06 +01:00
f9222c4953 MDL-59630 analytics: New clean up task 2017-10-03 10:34:43 +02:00
ef467fff04 MDL-59495 registration: register site on moodle.net only
Remove support for alternative hubs
2017-09-27 13:07:37 +08:00
7e4c4b6f1f MDL-59084 core: Allow adhoc tasks to run as a specified user 2017-09-12 21:58:50 +08:00
96e1633f57 MDL-59768 tasks: schedule task only if it is not scheduled 2017-08-31 14:31:17 +08:00
9b5d887967 MDL-58906 calendar: Remove check for _refresh_events exists 2017-07-26 12:51:27 +05:30
a4af31ded4 MDL-58906 restore: Call action event refresh task during restore 2017-07-24 11:17:53 +05:30
f510788b44 Merge branch 'MDL-59150-master-3' of git://github.com/ryanwyllie/moodle 2017-07-18 08:27:13 +02:00
0f268f5db9 MDL-59150 admin: build site theme after CLI install or upgrade 2017-07-18 06:13:07 +00:00
67d6479581 MDL-59039 Global search: Allow partial indexing (in scheduled task) 2017-07-11 16:41:33 +01:00
9c98546da6 MDL-58777 core: Use component_callback in refresh events task
Previously we did not require the lib.php files for each module
in this ad-hoc task, which meant that the *_refresh_events functions
would only be called if some lucky sequence of events led to the
lib.php file for the module being required.

Instead we should use the component_callback function which can handle
that stuff automagically.
2017-05-10 13:41:18 +08:00
e8d39b3926 MDL-58803 calendar: Require calendar/lib.php 2017-05-04 13:03:55 +08:00
14286ebd4a MDL-55611 calendar: remove duplicated 'scheduled task stuff' 2017-04-04 17:02:07 +01:00
23a29de7ee MDL-58424 core_calendar: moved logic from api.php to lib.php
Also moved related PHPUnit tests.

Part of MDL-55611 epic.
2017-04-04 11:01:52 +01:00
12cbce0aa3 MDL-57888 core_calendar: moved functions from calendar/lib.php
Part of MDL-55611 epic.
2017-04-03 11:35:38 +08:00
37d0c7c7fd MDL-55956 core: New adhoc task refresh_mod_calendar_events_task
* New adhoc task that loops over mod plugins and calls the
<modname>_refresh_events() hook, if available.
2017-03-06 16:12:07 +08:00
504d569b71 MDL-50719 cron: Fixed parallel task lock contention issues 2017-02-24 13:13:23 +11:00
253ae23058 MDL-44467 core: always send email from noreplyaddress 2016-10-28 13:04:09 +08:00
4ae0691169 MDL-22183 lib: Time settings removed for stats cron.
Old settings that should be ignored have been removed from the
statistics cron code.
2016-08-18 10:13:31 +08:00
e6dc03d7c4 MDL-53700 competency: Migrating language strings 2016-04-18 11:06:00 +08:00
767f66c028 MDL-53700 competency: Migrating the competency API to core 2016-04-18 11:05:59 +08:00
67bc0eaf38 MDL-53700 competency: Migrate main classes to core 2016-04-18 11:05:59 +08:00
42a7899f0d MDL-53700 competency: Migrate tasks to core 2016-04-18 11:05:58 +08:00
dfb9daeae2 MDL-52385 tasks: Queue ad-hoc tasks in future 2016-04-07 11:49:52 +08:00
bf2235bb11 MDL-53325 search: Optimize Solr less often 2016-03-06 13:46:54 -05:00
eddea91dfd MDL-31989 task: Global search indexing task 2016-02-23 10:47:31 +00:00
b831527ce8 Merge branch 'MDL-52831-master-emptynames' of git://github.com/mudrd8mz/moodle 2016-02-01 11:28:40 +08:00
1ccd813264 MDL-52831 users: Do not delete Mr. and Mrs. Whitespace accounts
Due to imperfect validation of the user registration and profile forms,
we allowed for firstname and lastname be just a whitespace. On MySQL,
such a whitespace is not significant for VARCHAR comparison so these
otherwise valid accounts could be silently deleted.

The patch makes sure that at least one of the checked fields is a real
empty string before deleting such account.
2016-01-19 21:40:45 +01:00
c026a28d59 MDL-50851 core_tag: introduce tag collections 2016-01-10 15:25:43 +08:00
1dc462baa5 MDL-51707 cron: Prevent finished tasks being returned 2015-10-08 14:43:56 +01:00
81295fc40e MDL-48438 core: Add fullname where known to failed login notifications. 2015-10-01 12:44:11 +01:00
160ccd3d09 MDL-50287 completion: Rename tasks to remove the word 'cron' 2015-08-27 14:58:04 +01:00
0628925bf1 MDL-50287 completion: avoid introducing uncessary functions
Also fix copyright
2015-08-27 14:57:56 +01:00
51e488eaf3 MDL-50287 completion: Separated slow task out from cron
The mark started function for the completions scheduled task can be very
slow and causes performance issues when running. By splitting this into
it's own task it can be managed independantly from the other parts which
update regularly.
2015-08-27 14:40:04 +01:00
b2f6f88dc2 MDL-50532 tasks: Delete obsolete tasks during upgrade 2015-07-29 11:25:16 +08:00
c44b4213e6 MDL-47480 tasks: Define order for getting tasks 2015-06-02 08:08:04 +05:30
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
d421a973d1 MDL-48605 unit_test: Fixed file_temp_cleanup_task
touch should only work on temp and below
dir's. With path we get temp/.. and temp/.
So we were modfying moodledata dir as well
and it was failing because of permission issues.
2015-03-31 14:59:48 +08:00
f47e4eb4a0 MDL-49070 core_registration: improved site registration scheduled task 2015-03-20 14:22:39 +08:00
59aebbed70 MDL-48595 logstore: Replacing references to deprecated interfaces 2015-03-09 08:25:37 +08:00
3630ab92d9 MDL-47529 task: Remove usage of lock when editing a task 2015-02-12 11:16:20 +08:00
0af336ef93 MDL-47529 task: Do not use lock when updating task records 2015-02-12 11:16:20 +08:00