Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Class: adhoc_task_test  - X-Ref

Test class for adhoc tasks.

test_get_next_adhoc_task_now()   X-Ref
Test basic adhoc task execution.


test_get_next_adhoc_task_fail_retry()   X-Ref
Test adhoc task failure retry backoff.


test_get_next_adhoc_task_future()   X-Ref
Test future adhoc task execution.


test_queue_adhoc_task_for_component()   X-Ref
Test queueing an adhoc task belonging to a component, where we set the task component accordingly


test_queue_task_for_component_without_set_component()   X-Ref
Test queueing an adhoc task belonging to a component, where we do not set the task component


test_queue_task_for_invalid_component_without_set_component()   X-Ref
Test queueing an adhoc task belonging to an invalid component, where we do not set the task component


Class: namespace  - X-Ref

test_get_adhoc_tasks_empty_set()   X-Ref
Test empty set of adhoc tasks


test_get_adhoc_tasks_result_set()   X-Ref
Test correct set of adhoc tasks is returned for class.


test_reschedule_or_queue_adhoc_task_no_existing()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will schedule a new task if no tasks exist.


test_reschedule_or_queue_adhoc_task_different_user()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will schedule a new task if a task for the same user does
not exist.


test_reschedule_or_queue_adhoc_task_different_data()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will schedule a new task if a task with different custom
data exists.


test_reschedule_or_queue_adhoc_task_match_no_change()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will not make any change for matching data if no time was
specified.


test_reschedule_or_queue_adhoc_task_match_update_runtime()   X-Ref
Ensure that the reschedule_or_queue_adhoc_task function will update the run time if there are planned changes.


test_queue_adhoc_task_if_not_scheduled()   X-Ref
Test queue_adhoc_task "if not scheduled".


test_adhoc_task_user_empty()   X-Ref
Test that when no userid is specified, it returns empty from the DB
too.


test_adhoc_task_user_set()   X-Ref
Test that when a userid is specified, that userid is subsequently
returned.


test_get_concurrency_limit()   X-Ref
Test get_concurrency_limit() method to return 0 by default.


test_get_concurrency_limit_default()   X-Ref
Test get_concurrency_limit() method to return a default value set in config.


test_get_concurrency_limit_for_task()   X-Ref
Test get_concurrency_limit() method to return a value for specific task class.


test_get_next_adhoc_task_sorting()   X-Ref
Test adhoc task sorting.