ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilLinkCheckNotify.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
11
class
ilLinkCheckNotify
12
{
13
public
$db
= null;
14
15
16
public
function
__construct
(
$db
)
17
{
18
$this->db =
$db
;
19
}
20
21
public
function
setUserId
($a_usr_id)
22
{
23
$this->usr_id = $a_usr_id;
24
}
25
public
function
getUserId
()
26
{
27
return
$this->usr_id;
28
}
29
public
function
setObjId
($a_obj_id)
30
{
31
$this->obj_id = $a_obj_id;
32
}
33
public
function
getObjId
()
34
{
35
return
$this->obj_id;
36
}
37
38
public
function
addNotifier
()
39
{
40
global
$DIC
;
41
42
$ilDB
= $DIC[
'ilDB'
];
43
44
$this->
deleteNotifier
();
45
46
$query
=
"INSERT INTO link_check_report (obj_id,usr_id) "
.
47
"VALUES ( "
.
48
$ilDB
->quote($this->
getObjId
(),
'integer'
) .
", "
.
49
$ilDB
->quote($this->
getUserId
(),
'integer'
) .
50
")"
;
51
$res
=
$ilDB
->manipulate(
$query
);
52
53
return
true
;
54
}
55
56
public
function
deleteNotifier
()
57
{
58
global
$DIC
;
59
60
$ilDB
= $DIC[
'ilDB'
];
61
62
$query
=
"DELETE FROM link_check_report "
.
63
"WHERE obj_id = "
.
$ilDB
->quote($this->
getObjId
(),
'integer'
) .
" "
.
64
"AND usr_id = "
.
$ilDB
->quote($this->
getUserId
(),
'integer'
) .
" "
;
65
$res
=
$ilDB
->manipulate(
$query
);
66
67
return
true
;
68
}
69
70
/* Static */
71
public
static
function
_getNotifyStatus
($a_usr_id, $a_obj_id)
72
{
73
global
$DIC
;
74
75
$ilDB
= $DIC[
'ilDB'
];
76
77
$query
=
"SELECT * FROM link_check_report "
.
78
"WHERE obj_id = "
.
$ilDB
->quote($a_obj_id,
'integer'
) .
" "
.
79
"AND usr_id = "
.
$ilDB
->quote($a_usr_id,
'integer'
);
80
$res
=
$ilDB
->query(
$query
);
81
82
return
$res
->numRows() ? true :
false
;
83
}
84
85
public
static
function
_deleteUser
($a_usr_id)
86
{
87
global
$DIC
;
88
89
$ilDB
= $DIC[
'ilDB'
];
90
91
$query
=
"DELETE FROM link_check_report "
.
92
"WHERE usr_id = "
.
$ilDB
->quote($a_usr_id,
'integer'
);
93
$res
=
$ilDB
->manipulate(
$query
);
94
return
true
;
95
}
96
97
public
static
function
_deleteObject
($a_obj_id)
98
{
99
global
$DIC
;
100
101
$ilDB
= $DIC[
'ilDB'
];
102
103
$query
=
"DELETE FROM link_check_report "
.
104
"WHERE obj_id = "
.
$ilDB
->quote($a_obj_id,
'integer'
) .
" "
;
105
$res
=
$ilDB
->manipulate(
$query
);
106
107
return
true
;
108
}
109
110
public
static
function
_getNotifiers
($a_obj_id)
111
{
112
global
$DIC
;
113
114
$ilDB
= $DIC[
'ilDB'
];
115
116
$query
=
"SELECT * FROM link_check_report "
.
117
"WHERE obj_id = "
.
$ilDB
->quote($a_obj_id,
'integer'
) .
" "
;
118
119
$res
=
$ilDB
->query(
$query
);
120
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
121
$usr_ids[] =
$row
->usr_id;
122
}
123
124
return
$usr_ids ? $usr_ids : array();
125
}
126
127
public
static
function
_getAllNotifiers
(&
$db
)
128
{
129
global
$DIC
;
130
131
$ilDB
= $DIC[
'ilDB'
];
132
133
$query
=
"SELECT * FROM link_check_report "
;
134
135
$res
=
$db
->query(
$query
);
136
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
137
$usr_ids[
$row
->usr_id][] =
$row
->obj_id;
138
}
139
140
return
$usr_ids ? $usr_ids : array();
141
}
142
}
ilLinkCheckNotify\deleteNotifier
deleteNotifier()
Definition:
class.ilLinkCheckNotify.php:56
$DIC
global $DIC
Definition:
saml.php:7
ilLinkCheckNotify\addNotifier
addNotifier()
Definition:
class.ilLinkCheckNotify.php:38
ilLinkCheckNotify\_deleteObject
static _deleteObject($a_obj_id)
Definition:
class.ilLinkCheckNotify.php:97
ilLinkCheckNotify
class for checking external links in page objects.
Definition:
class.ilLinkCheckNotify.php:11
ilLinkCheckNotify\$db
$db
Definition:
class.ilLinkCheckNotify.php:13
ilLinkCheckNotify\_getNotifiers
static _getNotifiers($a_obj_id)
Definition:
class.ilLinkCheckNotify.php:110
ilLinkCheckNotify\_getAllNotifiers
static _getAllNotifiers(&$db)
Definition:
class.ilLinkCheckNotify.php:127
ilLinkCheckNotify\getUserId
getUserId()
Definition:
class.ilLinkCheckNotify.php:25
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilLinkCheckNotify\setObjId
setObjId($a_obj_id)
Definition:
class.ilLinkCheckNotify.php:29
ilLinkCheckNotify\setUserId
setUserId($a_usr_id)
Definition:
class.ilLinkCheckNotify.php:21
ilLinkCheckNotify\__construct
__construct($db)
Definition:
class.ilLinkCheckNotify.php:16
$query
$query
Definition:
proxy_ylocal.php:13
$row
$row
Definition:
migrateto20.php:360
ilLinkCheckNotify\_getNotifyStatus
static _getNotifyStatus($a_usr_id, $a_obj_id)
Definition:
class.ilLinkCheckNotify.php:71
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
ilLinkCheckNotify\getObjId
getObjId()
Definition:
class.ilLinkCheckNotify.php:33
ilLinkCheckNotify\_deleteUser
static _deleteUser($a_usr_id)
Definition:
class.ilLinkCheckNotify.php:85
Services
LinkChecker
classes
class.ilLinkCheckNotify.php
Generated on Thu Feb 27 2025 19:01:59 for ILIAS by
1.8.13 (using
Doxyfile
)