ILIAS
Release_5_0_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilLearningModuleCronLinkCheck.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
include_once
"Services/Cron/classes/class.ilCronJob.php"
;
5
14
class
ilLearningModuleCronLinkCheck
extends
ilCronJob
15
{
16
public
function
getId
()
17
{
18
return
"lm_link_check"
;
19
}
20
21
public
function
getTitle
()
22
{
23
global
$lng
;
24
25
return
$lng->txt(
"check_link"
);
26
}
27
28
public
function
getDescription
()
29
{
30
global
$lng
;
31
32
return
$lng->txt(
"check_link_desc"
);
33
}
34
35
public
function
getDefaultScheduleType
()
36
{
37
return
self::SCHEDULE_TYPE_DAILY
;
38
}
39
40
public
function
getDefaultScheduleValue
()
41
{
42
return
;
43
}
44
45
public
function
hasAutoActivation
()
46
{
47
return
false
;
48
}
49
50
public
function
hasFlexibleSchedule
()
51
{
52
return
false
;
53
}
54
55
public
function
run
()
56
{
57
global
$ilLog
,
$ilDB
;
58
59
$status =
ilCronJobResult::STATUS_NO_ACTION
;
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
{
77
$status =
ilCronJobResult::STATUS_OK
;
78
}
79
$result
=
new
ilCronJobResult
();
80
$result
->setStatus($status);
81
return
$result
;
82
}
83
}
84
85
?>
Modules
LearningModule
classes
class.ilLearningModuleCronLinkCheck.php
Generated on Wed Apr 27 2016 21:01:08 for ILIAS by
1.8.1.2 (using
Doxyfile
)