90 Commits

Author SHA1 Message Date
Mikhail Golenkov
6b2e15f6c5 MDL-67485 task: Release the task runner lock before throwing exception. 2020-01-09 14:29:58 +11:00
Mikhail Golenkov
4234159ecd MDL-67433 tool_task: Add limits to adhoc CLI runner. 2019-12-18 11:58:43 +11:00
Brendan Heywood
4e7dcd01a8 MDL-66927 cron: Process new adhoc tasks immediately 2019-10-16 20:25:02 +11:00
Eloy Lafuente (stronk7)
7dc5cae795 Merge branch 'MDL-64454-master' of https://github.com/sammarshallou/moodle 2019-02-06 22:26:44 +01:00
Andrew Nicols
23d6756256 MDL-64347 task: Add restrictions to scheduled task runner 2019-01-16 17:20:25 +08:00
Andrew Nicols
24bfd53c73 MDL-64347 task: Add restrictions to adhoc task runner 2019-01-16 17:20:25 +08:00
Andrew Nicols
4b71596fc9 MDL-49399 task: Add task logging API 2019-01-16 12:14:25 +08:00
sam marshall
b18034ed67 MDL-64454 Admin: Warning if cron does not run frequently
There is an existing warning if cron doesn't run at all (hasn't run
for 24 hours). This commit adds a warning if cron hasn't run for 3
minutes, based on the recommendation that cron should run every
minute.
2019-01-14 17:07:36 +00:00
Andrew Nicols
cd305dc26b MDL-61800 task: Reset the OUTPUT and PAGE on execution 2018-05-02 11:57:13 +08:00
Andrew Nicols
7e4c4b6f1f MDL-59084 core: Allow adhoc tasks to run as a specified user 2017-09-12 21:58:50 +08:00
sam marshall
6d7c06a990 MDL-59096 Tasks: Web running local plugin scheduled tasks fails 2017-06-02 17:06:28 +01:00
sam marshall
38fa1ca558 MDL-55980 Scheduled tasks: Run individual scheduled tasks from web 2017-02-24 10:42:28 +00:00
sam marshall
b9dba4e3aa MDL-51330 Cron: In log, scheduled tasks don't show component 2015-09-07 18:40:05 +01:00
Dan Poltawski
a6e9c23016 MDL-51109 task: more debug info for failed scheduled tasks 2015-09-01 10:59:55 +01:00
Michael Aherne
5ea1e1110f MDL-50009 cron: Prevent tasks from leaving uncommitted transactions 2015-04-29 09:39:07 +01:00
Andrew Nicols
371bfca1c4 MDL-48224 cron: Buffer SMTP connections around tasks 2014-12-12 10:35:54 +08:00
Damyon Wiese
309ae8921f MDL-25499: Centralise management of all types of cron tasks
Centralise management of all types of cron tasks with registration, scheduling,
parallel task conflicts(blocking) and running once off tasks, all using an
administration screen.

This is a combination of several issues:

MDL-25502: Added "black magic" task allocator for cron
MDL-25503: Add step to cron to run all scheduled tasks
MDL-25504 cron: Refactor to use scheduler
MDL-25505: Add an admin interface to schedule tasks via cron.
MDL-25507: Add support for adhoc tasks.
2014-02-26 12:03:46 +08:00
Sam Hemelryk
2ef8ff9e05 MDL-44315 phpdoc: fixed up typos and made up tags 2014-02-24 09:13:31 +13:00
Petr Škoda
fd0e019286 MDL-42541 stop using events for porfolion cron 2014-02-13 12:09:24 +08:00
Petr Škoda
62c8032509 MDL-34347 remove all problematic global text caching
Instead we will create new MUC caches inside each filter plugin.
Please note that all cache filters should work with local caches
without the need of strict cache invalidation.
2014-01-14 10:49:23 +08:00
Andrew Nicols
fd2dcaa603 MDL-43451 Cron: Retrieve additional name fields when creating passwords 2013-12-31 13:45:14 +08:00
Russell Smith
038f546777 MDL-41198 lib: Allow PHP to generate random seed on script start
Most srand instances are removed to allow PHP to do the work.

srand was left for group randomization due to the method used.
2013-12-18 16:45:34 +11:00
sam marshall
3ef7279f26 MDL-42084 Core: Change set_time_limit to core_php_time_limit::raise everywhere
Exceptions (places where set_time_limit is still left) are:

Third-party libraries:
  ADODB
  PHPMailer

Moodle core:
  PHPUnit - not relevant (CLI mode)
2013-11-06 16:40:01 +00:00
Damyon Wiese
18ef6201c0 Merge branch 'passwordreset-2013-10-07-1031Z' of https://github.com/peterbulmer/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2013-10-08 10:30:57 +08:00
Petr Škoda
e87214bda7 MDL-42078 multiple uninstall improvements and cleanup
Includes:
* update checker refactored to \core\update\ namespace
* plugininfo classes refactored to \core\plugininfo\ namespace
* plugin_manager renamed to core_plugin_manager
* redirect back to original page after plugin uninstall
* fixed assign subplugin uninstall
* move assign subplugins under the assignment in admin tree
* fixed plugininfo for all question related plugin types
* auth uninstall support
* added missing block dependencies
* added theme uninstall
* subplugin types are following the plugin on plugin overview page
* several performance improvements in plugin manager
* new warnigns when plugininfo are outdated or missing
* multiple fixes and other improvements
2013-10-07 13:10:36 +02:00
Peter Bulmer
92de749fc7 MDL-23692 forgotpw: Simplify forgotpw process. 2013-10-04 22:37:56 +13:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Rajesh Taneja
2b503e40f2 MDL-31560 Messages: Deprecated generate_email_supportuser
generate_email_supportuser was not creating user which can
be used by messaging system. core_user::get_support_user()
should be used to get support_user record.
2013-09-13 16:13:26 +08:00
Tim Gus
c4012e7e82 MDL-38570 admin: fix cron_delete_from_temp on windows 2013-09-12 11:33:32 +08:00
Tim Gus
179961e8a4 MDL-38570 administration: Temporary file deletion
Added new function "cron_delete_from_temp" to delete old files and
directories under $CFG->tempdir during cron run. Unit test included.
2013-09-04 13:48:01 -04:00
Petr Škoda
96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
Petr Škoda
b0d1d941c9 MDL-40220 use new core_component::get_component_directory() 2013-07-16 22:42:37 +02:00
Petr Škoda
bd3b3bba9f MDL-40220 use new core_component::get_plugin_list() 2013-07-16 22:36:11 +02:00
Petr Škoda
98aa874617 MDL-40558 skip admins and guest when deleting incomplete users 2013-07-12 12:36:57 +02:00
Sam Hemelryk
059102e728 MDL-38565 cache: cron routine to clean up old session data 2013-04-19 10:11:48 +12:00
Yuliya Bozhko
278065528a MDL-35073 badges: Open badges integration
The badges feature allows to integrate Mozilla "Open Badges" to issue, assign,
manage and display digital badges in Moodle. This feature supports:
-- badge creation and issuing based on criteria
-- badge baking and verification service
-- direct pushing of internal badges to external backpack
-- interanl and external badge display in Moodle
-- Moodle block to display latest badges
2013-04-02 15:49:02 +08:00
Tim Hunt
658b9372ee MDL-38212 cron: display time and memory usage before each task.
This helps diagnose problems.

Also, call gc_collect_cycles between tasks, which may reduce the
frequency of out-of-memory errors.
2013-03-08 10:24:41 +00:00
Simon Coggins
ec2d8ceb88 MDL-35332 lib: Improve security of hashed passwords 2013-02-09 06:47:57 +13:00
Jonathan Harker
b5a52acd9d MDL-16660: Add calendar import.
Adds an extra import section alongside the existing export in the
calendar views. Allows the user to import from either a file or a
URL as a subscription, with an optional polling interval of hourly,
daily, weekly, monthly, or annually. This subscription may be added
to the user, group, global or course calendars. These subscriptions
are tracked in a separate database table, and an extra column added
to the events table to relate them to the subscription. The event
uuid field is also expanded to allow for the RFC-2445 UID property.
Subscriptions are listed on the calendar view page, and can be
added and removed, manually polled, and the polling interval
adjusted. Subscription events are updated on cron.
2012-10-30 17:33:18 +13:00
Marina Glancy
db02d84a40 MDL-34290 remove class cache_file as not used
in fact we have moodle filepool that can work perfectly for caching files, no need to create new class and storage
2012-08-29 11:56:17 +08:00
Tim Hunt
2ec325c252 MDL-29847 question preview: garbage collect old preview data.
This adds cron code which looks for question previews that have not been
touched for more than 24 hours, and deletes them.

We try to delete previews immediately. For example if the user clicks
start again, then we immediately delete their previous preview. However,
we can't do that if they just close the preview window. Hence we need
some cron code to clean up old preview that have got left lying around.

Normally, this code will not have much to do, so it will be very fast,
so we can afford to run it every cron.

This has been implemented in such a way that in future it will be easy
to add other cron code to the question bank.

Sadly, to make this work on MySQL, we require a horrible hack in the
already hacky delete_usage_records_for_mysql function.
2012-08-16 17:02:01 +01:00
Dan Poltawski
850d2db82a MDL-25012 - blogs: introduce a specific 'enabled' config setting
Rather than overloading the $CFG->bloglevel setting which had a
confusing UI in the appearance subsystem.

In order to achieve this we modify take the defaults from the existing
bloglevel setting and set that for $CFG->enableblogs. Note that in order
to prevent a bad default settings from being set we also set
$CFG->bloglevel to a valid 'enabled' setting.
2012-08-06 11:25:22 +08:00
Sam Hemelryk
395b805f97 Merge branch 'MDL-34225' of git://github.com/nebgor/moodle 2012-07-23 14:04:09 +12:00
Aparup Banerjee
7534234322 MDL-34225 course completion : move /lib/completion/* up to /completion 2012-07-10 11:06:41 +08:00
Dan Poltawski
114244ce6c Merge branch 'w27_MDL-34123_m24_newpasslang' of git://github.com/skodak/moodle 2012-07-03 10:39:12 +08:00
Dan Poltawski
6fa25ccd26 Merge branch 'w27_MDL-34120_m24_delpass' of git://github.com/skodak/moodle 2012-07-02 16:48:22 +08:00
Petr Škoda
3cbad151af MDL-34123 use user's lang when sending new emails 2012-06-30 20:46:04 +02:00
Petr Škoda
8205498fa0 MDL-34120 do not try to create new passwords for incorrectly deleted users
There is still some code that ignores delete_user() and instead hacks the user table directly, skip the borked user records for now when sending new passwords.
2012-06-30 08:55:39 +02:00
Andrew Davis
c968c1b787 MDL-25476 messages: switched some notification emails to come from the support contact instead of admin 2012-06-26 11:44:56 +07:00
Eric Merrill
54c2756ca2 MDL-32985 cron: Fixing related problem with setting of lastnotifyfailure
Because of a flaw in the logic, lastnotifyfailure was not set unless
there was a failure. This means that after 1 hour of no failures, the
function would execute every cron cycle, which has a pretty high cost
on large sites.
2012-06-06 12:04:03 -04:00