Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]

Update Overdue Attempts Task

Author: Michael Hughes
Copyright: 2017 Michael Hughes
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 155 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

update_overdue_attempts:: (4 methods):
  get_name()
  execute()
  update_all_overdue_attempts()
  get_list_of_overdue_attempts()


Class: update_overdue_attempts  - X-Ref

Update Overdue Attempts Task

get_name()   X-Ref
No description

execute()   X-Ref
Close off any overdue attempts.


update_all_overdue_attempts(int $timenow, int $processto)   X-Ref
Do the processing required.

param: int $timenow the time to consider as 'now' during the processing.
param: int $processto only process attempt with timecheckstate longer ago than this.
return: array with two elements, the number of attempt considered, and how many different quizzes that was.

get_list_of_overdue_attempts(int $processto)   X-Ref
Get a recordset of all the attempts that need to be processed now.

(Only public to allow unit testing. Do not use!)

param: int $processto timestamp to process up to.
return: moodle_recordset of quiz_attempts that need to be processed because time has