ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilExcCronReminders Class Reference

Cron for exercise reminders. More...

+ Inheritance diagram for ilExcCronReminders:
+ Collaboration diagram for ilExcCronReminders:

Public Member Functions

 __construct ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 hasAutoActivation ()
 Is to be activated on "installation", does only work for ILIAS core cron jobs. More...
 
 hasFlexibleSchedule ()
 
 run ()
 
- Public Member Functions inherited from ILIAS\Cron\CronJob
 setDateTimeProvider (?\Closure $date_time_provider)
 
 isDue (?\DateTimeImmutable $last_run, ?JobScheduleType $schedule_type, ?int $schedule_value, bool $is_manually_executed=false)
 
 getScheduleType ()
 Get current schedule type (if flexible) More...
 
 getScheduleValue ()
 Get current schedule value (if flexible) More...
 
 setSchedule (?JobScheduleType $a_type, ?int $a_value)
 Update current schedule (if flexible) More...
 
 getAllScheduleTypes ()
 Get all available schedule types. More...
 
 getScheduleTypesWithValues ()
 
 getValidScheduleTypes ()
 Returns a collection of all valid schedule types for a specific job. More...
 
 isManuallyExecutable ()
 
 hasCustomSettings ()
 
 usesLegacyForms ()
 
 getCustomConfigurationInput (\ILIAS\UI\Factory $ui_factory, \ILIAS\Refinery\Factory $factory, \ilLanguage $lng)
 
 addCustomSettingsToForm (\ilPropertyFormGUI $a_form)
 
 saveCustomConfiguration (mixed $form_data)
 
 saveCustomSettings (\ilPropertyFormGUI $a_form)
 
 addToExternalSettingsForm (int $a_form_id, array &$a_fields, bool $a_is_active)
 
 activationWasToggled (\ilDBInterface $db, \ilSetting $setting, bool $a_currently_active)
 Important: This method is (also) called from the setup process, where the constructor of an ilCronJob ist NOT executed. More...
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 hasAutoActivation ()
 Is to be activated on "installation", does only work for ILIAS core cron jobs. More...
 
 hasFlexibleSchedule ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 run ()
 

Protected Attributes

ilLanguage $lng
 
- Protected Attributes inherited from ILIAS\Cron\CronJob
JobScheduleType $schedule_type = null
 
int $schedule_value = null
 
Closure $date_time_provider = null
 

Detailed Description

Cron for exercise reminders.

Author
Jesús López lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 29 of file class.ilExcCronReminders.php.

Constructor & Destructor Documentation

◆ __construct()

ilExcCronReminders::__construct ( )

Definition at line 33 of file class.ilExcCronReminders.php.

34 {
35 global $DIC;
36
37 $this->lng = $DIC->language();
38 }
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ getDefaultScheduleType()

ilExcCronReminders::getDefaultScheduleType ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 63 of file class.ilExcCronReminders.php.

64 {
65 return JobScheduleType::DAILY;
66 }

◆ getDefaultScheduleValue()

ilExcCronReminders::getDefaultScheduleValue ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 68 of file class.ilExcCronReminders.php.

68 : ?int
69 {
70 return null;
71 }

◆ getDescription()

ilExcCronReminders::getDescription ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 54 of file class.ilExcCronReminders.php.

54 : string
55 {
57
59
60 return $lng->txt("exc_reminders_cron_info");
61 }
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References $lng, ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getId()

ilExcCronReminders::getId ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 40 of file class.ilExcCronReminders.php.

40 : string
41 {
42 return "exc_reminders";
43 }

◆ getTitle()

ilExcCronReminders::getTitle ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 45 of file class.ilExcCronReminders.php.

45 : string
46 {
48
50
51 return $lng->txt("exc_reminders_cron");
52 }

References $lng, ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ hasAutoActivation()

ilExcCronReminders::hasAutoActivation ( )

Is to be activated on "installation", does only work for ILIAS core cron jobs.

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 73 of file class.ilExcCronReminders.php.

73 : bool
74 {
75 return true;
76 }

◆ hasFlexibleSchedule()

ilExcCronReminders::hasFlexibleSchedule ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 78 of file class.ilExcCronReminders.php.

78 : bool
79 {
80 return true;
81 }

◆ run()

ilExcCronReminders::run ( )
Exceptions
ilExcUnknownAssignmentTypeException

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 86 of file class.ilExcCronReminders.php.

86 : JobResult
87 {
89 $log->debug("--- Start Exercise Reminders Cron");
90
91 $cron_status = JobResult::STATUS_NO_ACTION;
92 $message = "";
93 $reminder = new ilExAssignmentReminder();
94 $num_reminders = $reminder->checkReminders();
95
96 $this->lng->loadLanguageModule("exc");
97
98 if ($num_reminders !== 0) {
99 $cron_status = JobResult::STATUS_OK;
100 $message = $this->lng->txt('exc_reminder_cron_ok');
101 }
102
103 $cron_result = new JobResult();
104 $cron_result->setStatus($cron_status);
105
106 if ($message != "") {
107 $cron_result->setMessage($message . " " . $num_reminders . ' / ' . "#" . $num_reminders);
108 }
109
110 return $cron_result;
111 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getLogger(string $a_component_id)
Get component logger.
$log
Definition: ltiresult.php:34
$message
Definition: xapiexit.php:31

References $log, $message, ilLoggerFactory\getLogger(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ilExcCronReminders::$lng
protected

Definition at line 31 of file class.ilExcCronReminders.php.

Referenced by getDescription(), and getTitle().


The documentation for this class was generated from the following file: