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.

Admin setting to show current scheduled task's status.

Author: Jordi Pujol-Ahulló <jpahullo@gmail.com>
Copyright: 2021 Universitat Rovira i Virgili
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 121 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

setting_scheduled_task_status:: (3 methods):
  __construct()
  output_html()
  get_task_description()


Class: setting_scheduled_task_status  - X-Ref

This admin setting tells whether a given scheduled task is enabled, providing a link to its configuration page.

The goal of this setting is to help contextualizing the configuration settings with related scheduled task status,
providing the big picture of that part of the system.

__construct(string $name, string $scheduledtaskclassname, string $extradescription = '')   X-Ref
setting_scheduled_task_status constructor.

param: string $name unique setting name.
param: string $scheduledtaskclassname full classpath class name of the scheduled task.
param: string $extradescription extra detail to append to the scheduled task status to add context in the setting

output_html($data, $query = '')   X-Ref
Calculates lazily the content of the description.

param: mixed $data nothing expected in this case.
param: string $query nothing expected in this case.
return: string the HTML content to print for this setting.

get_task_description()   X-Ref
Returns the HTML to print as the description.

return: string description to be printed.