ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLTICronOutcomeService Class Reference

Description of class class. More...

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

Public Member Functions

 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 getId ()
 
 hasAutoActivation ()
 
 hasFlexibleSchedule ()
 
 getTitle ()
 
 getDescription ()
 
 run ()
 
- 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...
 
 getValidScheduleTypes ()
 Get all available schedule types. 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 ( )

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

17  {
18  return self::SCHEDULE_TYPE_DAILY;
19  }

◆ getDefaultScheduleValue()

ilLTICronOutcomeService::getDefaultScheduleValue ( )

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

25  {
26  return 1;
27  }

◆ getDescription()

ilLTICronOutcomeService::getDescription ( )
Returns
string

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

References $DIC.

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

◆ getId()

ilLTICronOutcomeService::getId ( )

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

Referenced by run().

33  {
34  return 'lti_outcome';
35  }
+ Here is the caller graph for this function:

◆ getTitle()

ilLTICronOutcomeService::getTitle ( )
Returns
string

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

References $DIC.

57  {
58  global $DIC;
59  $DIC->language()->loadLanguageModule('lti');
60  return $DIC->language()->txt('lti_cron_title');
61  }
global $DIC
Definition: saml.php:7

◆ hasAutoActivation()

ilLTICronOutcomeService::hasAutoActivation ( )

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

41  {
42  return false;
43  }

◆ hasFlexibleSchedule()

ilLTICronOutcomeService::hasFlexibleSchedule ( )

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

49  {
50  return true;
51  }

◆ run()

ilLTICronOutcomeService::run ( )

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

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

77  {
78  global $DIC;
79 
81 
83  $last_ts = $info['job_status_ts'];
84  if (!$last_ts) {
85  $last_ts = time() - 24 * 7 * 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  }
static handleCronUpdate(ilDateTime $since)
$result
global $DIC
Definition: saml.php:7
const IL_CAL_UNIX
static getCronJobData($a_id=null, $a_include_inactive=true)
Get cron job configuration/execution data.
Date and time handling
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
$info
Definition: index.php:5
+ Here is the call graph for this function:

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