ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilLearningModuleCronLinkCheck Class Reference
+ Inheritance diagram for ilLearningModuleCronLinkCheck:
+ Collaboration diagram for ilLearningModuleCronLinkCheck:

Public Member Functions

 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 hasAutoActivation ()
 
 hasFlexibleSchedule ()
 
 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

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

Member Function Documentation

◆ getDefaultScheduleType()

ilLearningModuleCronLinkCheck::getDefaultScheduleType ( )

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

36  {
37  return self::SCHEDULE_TYPE_DAILY;
38  }

◆ getDefaultScheduleValue()

ilLearningModuleCronLinkCheck::getDefaultScheduleValue ( )

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

41  {
42  return;
43  }

◆ getDescription()

ilLearningModuleCronLinkCheck::getDescription ( )

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

References $lng.

29  {
30  global $lng;
31 
32  return $lng->txt("check_link_desc");
33  }
global $lng
Definition: privfeed.php:40

◆ getId()

ilLearningModuleCronLinkCheck::getId ( )

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

17  {
18  return "lm_link_check";
19  }

◆ getTitle()

ilLearningModuleCronLinkCheck::getTitle ( )

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

References $lng.

22  {
23  global $lng;
24 
25  return $lng->txt("check_link");
26  }
global $lng
Definition: privfeed.php:40

◆ hasAutoActivation()

ilLearningModuleCronLinkCheck::hasAutoActivation ( )

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

46  {
47  return false;
48  }

◆ hasFlexibleSchedule()

ilLearningModuleCronLinkCheck::hasFlexibleSchedule ( )

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

51  {
52  return false;
53  }

◆ run()

ilLearningModuleCronLinkCheck::run ( )

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

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

56  {
57  global $ilLog, $ilDB;
58 
60 
61  include_once'./Services/LinkChecker/classes/class.ilLinkChecker.php';
62 
63  $link_checker =& new ilLinkChecker($ilDB);
64  $link_checker->setMailStatus(true);
65 
66  $link_checker->checkLinks();
67 
68  $counter = 0;
69  foreach($link_checker->getLogMessages() as $message)
70  {
71  $ilLog->write($message);
72  $counter++;
73  }
74 
75  if($counter)
76  {
78  }
79  $result = new ilCronJobResult();
80  $result->setStatus($status);
81  return $result;
82  }
$result
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
global $ilDB
Cron job result data container.

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