Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 348 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: scheduler  - X-Ref

Scheduler class.

__construct(int $instanceid = 0, int $contextlevel = CONTEXT_COURSE)   X-Ref
Scheduler constructor.

param: int $instanceid
param: int $contextlevel

request_analysis()   X-Ref
Request this schedule object to be analyzed. Create the schedule if not present.

return: bool

mark_analyzed()   X-Ref
Mark this schedule object as analyzed.

return: bool

create_schedule()   X-Ref
Request this schedule object be added. Return true if already added, or the status of the insert operation.

return: bool

delete_schedule()   X-Ref
Request this schedule object be deleted.

return: bool

is_in_schedule()   X-Ref
Return true if this schedule object is in the schedule.

return: bool

is_scheduled()   X-Ref
Return true if this schedule object has been requested to be analyzed.

return: bool

is_submitted()   X-Ref
Return true if this schedule object has been submitted.

return: bool

is_analyzed()   X-Ref
Return true if this schedule object has been analyzed.

return: bool

standard_search_params()   X-Ref
The nornal data parameters to search for.

return: array

get_contextid()   X-Ref
Get the context id for the specified context level and instance.

return: int

get_datarecord(int $status = self::STATUS_NOT_REQUESTED)   X-Ref
Create and return a datarecord object for the data table.

param: int $status
return: \stdClass

process_scheduled_requests()   X-Ref
Process all the course analysis requests, and mark them as analyzed. Limit the number of requests processed by time.


initialize_schedule(int $contextlevel = CONTEXT_COURSE)   X-Ref
Load all requested context types into the schedule as requested. Write records in groups of 100.

param: int $contextlevel
return: bool

request_course_analysis(int $courseid)   X-Ref
Request the specified course be analyzed.

param: int $courseid
return: bool

create_course_schedule(int $courseid)   X-Ref
Request the specified course be added.

param: int $courseid
return: bool

delete_course_schedule(int $courseid)   X-Ref
Delete the specified course from the schedule.

param: int $courseid
return: bool

is_course_in_schedule(int $courseid)   X-Ref
Return true if the specified course is in the schedule.

param: int $courseid
return: bool

is_course_scheduled(int $courseid)   X-Ref
Return true if the specified course is scheduled.

param: int $courseid
return: bool

is_course_analyzed(int $courseid)   X-Ref
Return true if the specified course has been analyzed.

param: int $courseid
return: bool