ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLearningModuleCronLinkCheck Class Reference
+ Inheritance diagram for ilLearningModuleCronLinkCheck:
+ Collaboration diagram for ilLearningModuleCronLinkCheck:

Public Member Functions

 __construct ()
 Constructor. More...
 
 getId ()
 Get id. More...
 
 getTitle ()
 Get title. More...
 
 getDescription ()
 Get description. More...
 
 getDefaultScheduleType ()
 Get schedule type. More...
 
 getDefaultScheduleValue ()
 Get schedule value. More...
 
 hasAutoActivation ()
 Is to be activated on "installation". More...
 
 hasFlexibleSchedule ()
 Can the schedule be configured? More...
 
 run ()
 Run job. 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...
 

Protected Attributes

 $lng
 
 $log
 
 $db
 

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

Definition at line 14 of file class.ilLearningModuleCronLinkCheck.php.

Constructor & Destructor Documentation

◆ __construct()

ilLearningModuleCronLinkCheck::__construct ( )

Constructor.

Definition at line 35 of file class.ilLearningModuleCronLinkCheck.php.

36 {
37 global $DIC;
38
39 $this->lng = $DIC->language();
40 $this->log = $DIC["ilLog"];
41 $this->db = $DIC->database();
42 }
$DIC
Definition: xapitoken.php:46

References $DIC.

Member Function Documentation

◆ getDefaultScheduleType()

ilLearningModuleCronLinkCheck::getDefaultScheduleType ( )

Get schedule type.

Returns
int

Reimplemented from ilCronJob.

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

64 {
66 }
const SCHEDULE_TYPE_DAILY

References ilCronJob\SCHEDULE_TYPE_DAILY.

◆ getDefaultScheduleValue()

ilLearningModuleCronLinkCheck::getDefaultScheduleValue ( )

Get schedule value.

Returns
int|array

Reimplemented from ilCronJob.

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

69 {
70 return;
71 }

◆ getDescription()

ilLearningModuleCronLinkCheck::getDescription ( )

Get description.

Returns
string

Reimplemented from ilCronJob.

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

57 {
59
60 return $lng->txt("check_link_desc");
61 }

References $lng.

◆ getId()

ilLearningModuleCronLinkCheck::getId ( )

Get id.

Returns
string

Reimplemented from ilCronJob.

Definition at line 44 of file class.ilLearningModuleCronLinkCheck.php.

45 {
46 return "lm_link_check";
47 }

◆ getTitle()

ilLearningModuleCronLinkCheck::getTitle ( )

Get title.

Returns
string

Reimplemented from ilCronJob.

Definition at line 49 of file class.ilLearningModuleCronLinkCheck.php.

50 {
52
53 return $lng->txt("check_link");
54 }

References $lng.

◆ hasAutoActivation()

ilLearningModuleCronLinkCheck::hasAutoActivation ( )

Is to be activated on "installation".

Returns
boolean

Reimplemented from ilCronJob.

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

74 {
75 return false;
76 }

◆ hasFlexibleSchedule()

ilLearningModuleCronLinkCheck::hasFlexibleSchedule ( )

Can the schedule be configured?

Returns
boolean

Reimplemented from ilCronJob.

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

79 {
80 return false;
81 }

◆ run()

ilLearningModuleCronLinkCheck::run ( )

Run job.

Returns
ilCronJobResult

Reimplemented from ilCronJob.

Definition at line 83 of file class.ilLearningModuleCronLinkCheck.php.

84 {
87
89
90 $link_checker = new ilLinkChecker($ilDB);
91 $link_checker->setMailStatus(true);
92
93 $link_checker->checkLinks();
94
95 $counter = 0;
96 foreach ($link_checker->getLogMessages() as $message) {
97 $ilLog->write($message);
98 $counter++;
99 }
100
101 if ($counter) {
103 }
104 $result = new ilCronJobResult();
105 $result->setStatus($status);
106 return $result;
107 }
$result
Cron job result data container.
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
global $ilDB
$message
Definition: xapiexit.php:14

References $db, $ilDB, $ilLog, $log, $message, $result, ilCronJobResult\STATUS_NO_ACTION, and ilCronJobResult\STATUS_OK.

Field Documentation

◆ $db

ilLearningModuleCronLinkCheck::$db
protected

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

Referenced by run().

◆ $lng

ilLearningModuleCronLinkCheck::$lng
protected

Definition at line 19 of file class.ilLearningModuleCronLinkCheck.php.

Referenced by getDescription(), and getTitle().

◆ $log

ilLearningModuleCronLinkCheck::$log
protected

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

Referenced by run().


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