ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLTICronOutcomeService Class Reference

Description of class class. More...

+ Inheritance diagram for ilLTICronOutcomeService:
+ Collaboration diagram for ilLTICronOutcomeService:

Public Member Functions

 getDefaultScheduleType ()
 @inheritDoc More...
 
 getDefaultScheduleValue ()
 Get schedule value.
Returns
int|array
More...
 
 getId ()
 Get id.
Returns
string
More...
 
 hasAutoActivation ()
 Is to be activated on "installation".
Returns
boolean
More...
 
 hasFlexibleSchedule ()
 Can the schedule be configured?
Returns
boolean
More...
 
 getTitle ()
 
 getDescription ()
 
 run ()
 Run job.
Returns
ilCronJobResult
More...
 
- Public Member Functions inherited from ilCronJob
 isActive ($a_ts_last_run, $a_schedule_type, $a_schedule_value, $a_manual=false)
 Is job currently active? More...
 
 getScheduleType ()
 Get current schedule type (if flexible) More...
 
 getScheduleValue ()
 Get current schedule value (if flexible) More...
 
 setSchedule ($a_type, $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...
 
 getTitle ()
 Get title. More...
 
 getDescription ()
 Get description. More...
 
 isManuallyExecutable ()
 Defines whether or not a cron job can be started manually. More...
 
 hasCustomSettings ()
 Has cron job any custom setting which can be edited? More...
 
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 Add custom settings to form. More...
 
 saveCustomSettings (ilPropertyFormGUI $a_form)
 Save custom settings. More...
 
 addToExternalSettingsForm ($a_form_id, array &$a_fields, $a_is_active)
 Add external settings to form. More...
 
 activationWasToggled ($a_currently_active)
 Cron job status was changed. More...
 
 getId ()
 Get id. More...
 
 hasAutoActivation ()
 Is to be activated on "installation". More...
 
 hasFlexibleSchedule ()
 Can the schedule be configured? More...
 
 getDefaultScheduleType ()
 Get schedule type. More...
 
 getDefaultScheduleValue ()
 Get schedule value. More...
 
 run ()
 Run job. More...
 

Additional Inherited Members

- Data Fields inherited from ilCronJob
const SCHEDULE_TYPE_DAILY = 1
 
const SCHEDULE_TYPE_IN_MINUTES = 2
 
const SCHEDULE_TYPE_IN_HOURS = 3
 
const SCHEDULE_TYPE_IN_DAYS = 4
 
const SCHEDULE_TYPE_WEEKLY = 5
 
const SCHEDULE_TYPE_MONTHLY = 6
 
const SCHEDULE_TYPE_QUARTERLY = 7
 
const SCHEDULE_TYPE_YEARLY = 8
 
- Protected Member Functions inherited from ilCronJob
 checkSchedule ($a_ts_last_run, $a_schedule_type, $a_schedule_value)
 

Detailed Description

Description of class class.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 11 of file class.ilLTICronOutcomeService.php.

Member Function Documentation

◆ getDefaultScheduleType()

ilLTICronOutcomeService::getDefaultScheduleType ( )

@inheritDoc

Reimplemented from ilCronJob.

Definition at line 16 of file class.ilLTICronOutcomeService.php.

17 {
19 }
const SCHEDULE_TYPE_DAILY

References ilCronJob\SCHEDULE_TYPE_DAILY.

◆ getDefaultScheduleValue()

ilLTICronOutcomeService::getDefaultScheduleValue ( )

Get schedule value.

Returns
int|array

Reimplemented from ilCronJob.

Definition at line 24 of file class.ilLTICronOutcomeService.php.

25 {
26 return 1;
27 }

◆ getDescription()

ilLTICronOutcomeService::getDescription ( )
Returns
string

Reimplemented from ilCronJob.

Definition at line 66 of file class.ilLTICronOutcomeService.php.

67 {
68 global $DIC;
69 $DIC->language()->loadLanguageModule('lti');
70 return $DIC->language()->txt('lti_cron_title_desc');
71 }
$DIC
Definition: xapitoken.php:46

References $DIC.

◆ getId()

ilLTICronOutcomeService::getId ( )

Get id.

Returns
string

Reimplemented from ilCronJob.

Definition at line 32 of file class.ilLTICronOutcomeService.php.

33 {
34 return 'lti_outcome';
35 }

Referenced by run().

+ Here is the caller graph for this function:

◆ getTitle()

ilLTICronOutcomeService::getTitle ( )
Returns
string

Reimplemented from ilCronJob.

Definition at line 56 of file class.ilLTICronOutcomeService.php.

57 {
58 global $DIC;
59 $DIC->language()->loadLanguageModule('lti');
60 return $DIC->language()->txt('lti_cron_title');
61 }

References $DIC.

◆ hasAutoActivation()

ilLTICronOutcomeService::hasAutoActivation ( )

Is to be activated on "installation".

Returns
boolean

Reimplemented from ilCronJob.

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

41 {
42 return false;
43 }

◆ hasFlexibleSchedule()

ilLTICronOutcomeService::hasFlexibleSchedule ( )

Can the schedule be configured?

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 48 of file class.ilLTICronOutcomeService.php.

49 {
50 return true;
51 }

◆ run()

ilLTICronOutcomeService::run ( )

Run job.

Returns
ilCronJobResult

Reimplemented from ilCronJob.

Definition at line 76 of file class.ilLTICronOutcomeService.php.

77 {
78 global $DIC;
79
81
82 $info = ilCronManager::getCronJobData($this->getId());
83 $last_ts = $info['job_status_ts'];
84 if (!$last_ts) {
85 $last_ts = time() - 24 * 3600;
86 }
87 $since = new ilDateTime($last_ts, IL_CAL_UNIX);
88
89
90 $result = new \ilCronJobResult();
91 $result->setStatus($status);
94
95 return $result;
96 }
$result
const IL_CAL_UNIX
static getCronJobData($a_id=null, $a_include_inactive=true)
Get cron job configuration/execution data.
@classDescription Date and time handling
static handleCronUpdate(ilDateTime $since)

References $DIC, $result, ilCronManager\getCronJobData(), getId(), ilLTIAppEventListener\handleCronUpdate(), IL_CAL_UNIX, ilCronJobResult\STATUS_NO_ACTION, and ilCronJobResult\STATUS_OK.

+ Here is the call graph for this function:

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