mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
MDL-73598 reportbuilder: feature switch for custom reports.
This commit is contained in:
parent
a01f1fa71c
commit
335012580b
6 changed files with 105 additions and 8 deletions
|
@ -38,13 +38,18 @@ class send_schedule extends adhoc_task {
|
|||
* Execute the task
|
||||
*/
|
||||
public function execute(): void {
|
||||
global $USER, $DB;
|
||||
global $CFG, $USER, $DB;
|
||||
|
||||
[
|
||||
'reportid' => $reportid,
|
||||
'scheduleid' => $scheduleid,
|
||||
] = (array) $this->get_custom_data();
|
||||
|
||||
// Custom reports are disabled.
|
||||
if (empty($CFG->enablecustomreports)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$schedule = schedule::get_record(['id' => $scheduleid, 'reportid' => $reportid]);
|
||||
if ($schedule === false) {
|
||||
$this->log('Invalid schedule', 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue