ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilOerHarvesterObjectStatus.php
Go to the documentation of this file.
1
<?
php
2
3
/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11
class
ilOerHarvesterObjectStatus
12
{
13
private
$obj_id
= 0;
14
15
private
$harvest_ref_id
= 0;
16
17
private
$blocked
=
false
;
18
19
private
$db
= null;
20
21
26
public
function
__construct
(
$obj_id
= 0)
27
{
28
global
$DIC
;
29
30
$this->db = $DIC->database();
31
32
$this->obj_id =
$obj_id
;
33
if
($this->obj_id) {
34
$this->
read
();
35
}
36
}
37
42
public
static
function
lookupHarvested
()
43
{
44
global
$DIC
;
45
46
$db
= $DIC->database();
47
48
$query
=
'SELECT href_id FROM il_meta_oer_stat '
;
49
$res
=
$db
->query(
$query
);
50
51
$hids = [];
52
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
53
$hids[] =
$row
->href_id;
54
}
55
return
$hids;
56
}
57
61
public
static
function
lookupObjIdByHarvestingId
($a_href_id)
62
{
63
global
$DIC
;
64
65
$db
= $DIC->database();
66
$query
=
'SELECT obj_id FROM il_meta_oer_stat '
.
67
'WHERE href_id = '
.
$db
->quote($a_href_id,
'integer'
);
68
$res
=
$db
->query(
$query
);
69
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
70
return
$row
->obj_id;
71
}
72
}
73
74
public
function
setObjId
($a_obj_id)
75
{
76
$this->obj_id = $a_obj_id;
77
}
78
79
public
function
getObjId
()
80
{
81
return
$this->obj_id
;
82
}
83
84
public
function
setHarvestRefId
($a_ref_id)
85
{
86
$this->harvest_ref_id = $a_ref_id;
87
}
88
89
public
function
getHarvestRefId
()
90
{
91
return
$this->harvest_ref_id
;
92
}
93
94
public
function
setBlocked
($a_stat)
95
{
96
$this->blocked = $a_stat;
97
}
98
99
public
function
isBlocked
()
100
{
101
return
$this->blocked
;
102
}
103
104
public
function
isCreated
()
105
{
106
return
(
bool
)
$this->harvest_ref_id
;
107
}
108
112
public
function
save
()
113
{
114
$this->
delete
();
115
$query
=
'INSERT INTO il_meta_oer_stat '
.
116
'(obj_id, href_id, blocked ) '
.
117
'VALUES ('
.
118
$this->db->quote($this->
getObjId
(),
'integer'
) .
', '
.
119
$this->db->quote($this->
getHarvestRefId
(),
'integer'
) .
', '
.
120
$this->db->quote($this->
isBlocked
(),
'integer'
) .
121
')'
;
122
$res
= $this->db->manipulate(
$query
);
123
return
true
;
124
}
125
129
public
function
delete
()
130
{
131
$query
=
'DELETE FROM il_meta_oer_stat '
.
132
'WHERE obj_id = '
. $this->db->quote($this->
getObjId
(),
'integer'
);
133
$this->db->manipulate(
$query
);
134
return
true
;
135
}
136
137
141
public
function
read
()
142
{
143
$query
=
'SELECT * FROM il_meta_oer_stat '
.
144
'WHERE obj_id = '
. $this->db->quote($this->
getObjId
(),
'integer'
);
145
$res
= $this->db->query(
$query
);
146
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
147
$this->
setObjId
(
$row
->obj_id);
148
$this->
setHarvestRefId
(
$row
->href_id);
149
$this->
setBlocked
((
bool
)
$row
->blocked);
150
}
151
}
152
}
ilOerHarvesterObjectStatus\setHarvestRefId
setHarvestRefId($a_ref_id)
Definition:
class.ilOerHarvesterObjectStatus.php:84
$DIC
global $DIC
Definition:
saml.php:7
ilOerHarvesterObjectStatus\getObjId
getObjId()
Definition:
class.ilOerHarvesterObjectStatus.php:79
ilOerHarvesterObjectStatus\read
read()
Definition:
class.ilOerHarvesterObjectStatus.php:141
ilOerHarvesterObjectStatus\getHarvestRefId
getHarvestRefId()
Definition:
class.ilOerHarvesterObjectStatus.php:89
ilOerHarvesterObjectStatus\setBlocked
setBlocked($a_stat)
Definition:
class.ilOerHarvesterObjectStatus.php:94
ilOerHarvesterObjectStatus\$harvest_ref_id
$harvest_ref_id
Definition:
class.ilOerHarvesterObjectStatus.php:15
ilOerHarvesterObjectStatus\setObjId
setObjId($a_obj_id)
Definition:
class.ilOerHarvesterObjectStatus.php:74
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilOerHarvesterObjectStatus\save
save()
Definition:
class.ilOerHarvesterObjectStatus.php:112
ilOerHarvesterObjectStatus\$blocked
$blocked
Definition:
class.ilOerHarvesterObjectStatus.php:17
$query
$query
Definition:
proxy_ylocal.php:13
ilOerHarvesterObjectStatus\lookupObjIdByHarvestingId
static lookupObjIdByHarvestingId($a_href_id)
Definition:
class.ilOerHarvesterObjectStatus.php:61
ilOerHarvesterObjectStatus
OER harvester object status.
Definition:
class.ilOerHarvesterObjectStatus.php:11
$row
$row
Definition:
migrateto20.php:360
ilOerHarvesterObjectStatus\lookupHarvested
static lookupHarvested()
Definition:
class.ilOerHarvesterObjectStatus.php:42
ilOerHarvesterObjectStatus\isBlocked
isBlocked()
Definition:
class.ilOerHarvesterObjectStatus.php:99
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
ilOerHarvesterObjectStatus\$db
$db
Definition:
class.ilOerHarvesterObjectStatus.php:19
ilOerHarvesterObjectStatus\isCreated
isCreated()
Definition:
class.ilOerHarvesterObjectStatus.php:104
ilOerHarvesterObjectStatus\$obj_id
$obj_id
Definition:
class.ilOerHarvesterObjectStatus.php:13
ilOerHarvesterObjectStatus\__construct
__construct($obj_id=0)
ilOerHarvesterObjectStatus constructor.
Definition:
class.ilOerHarvesterObjectStatus.php:26
Services
MetaData
OerHarvester
classes
class.ilOerHarvesterObjectStatus.php
Generated on Thu Jan 30 2025 19:02:01 for ILIAS by
1.8.13 (using
Doxyfile
)