56 $this->server_id = $a_server_id;
57 $this->obj_id = $a_obj_id;
78 $this->server_id = $a_server_id;
92 $query =
'SELECT * FROM ecs_export ' .
93 'WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer');
113 $ilDB = $DIC[
'ilDB'];
115 $query =
"SELECT econtent_id,obj_id FROM ecs_export " .
116 'WHERE server_id = ' .
$ilDB->quote($a_server_id,
'integer');
120 $econtent_ids[
$row->econtent_id] =
$row->obj_id;
122 return $econtent_ids ? $econtent_ids : array();
134 $ilDB = $DIC[
'ilDB'];
135 $query =
"SELECT obj_id FROM ecs_export ";
138 $obj_ids[] =
$row->obj_id;
140 return $obj_ids ? $obj_ids : array();
152 $ilDB = $DIC[
'ilDB'];
153 $query =
"SELECT e.obj_id FROM ecs_export e" .
154 " JOIN object_data o ON (e.obj_id = o.obj_id)" .
158 $obj_ids[] =
$row->obj_id;
160 return $obj_ids ? $obj_ids : array();
173 $ilDB = $DIC[
'ilDB'];
175 $query =
'SELECT * FROM ecs_export ' .
176 'WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer');
181 $sids[] =
$row->server_id;
197 $ilDB = $DIC[
'ilDB'];
198 $query =
"SELECT obj_id FROM ecs_export " .
199 'WHERE server_id = ' .
$ilDB->quote($a_server_id,
'integer');
202 $obj_ids[] =
$row->obj_id;
204 return $obj_ids ? $obj_ids : array();
217 $ilDB = $DIC[
'ilDB'];
219 $query =
'SELECT * FROM ecs_export ' .
220 'WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer') .
' ';
224 $sids[] =
$row->server_id;
241 $ilDB = $DIC[
'ilDB'];
243 if (!is_array($a_ids)
or !count($a_ids)) {
246 #$query = "DELETE FROM ecs_export WHERE econtent_id IN (".implode(',',ilUtil::quoteArray($a_ids)).')'; 247 $query =
"DELETE FROM ecs_export WHERE " .
$ilDB->in(
'econtent_id', $a_ids,
false,
'integer') .
' ' .
248 'AND server_id = ' .
$ilDB->quote($a_server_id,
'integer');
262 $ilDB = $DIC[
'ilDB'];
264 $query =
'DELETE FROM ecs_export ' .
265 'WHERE server_id = ' .
$ilDB->quote($a_server_id,
'integer');
277 public static function _isRemote($a_server_id, $a_econtent_id)
281 $ilDB = $DIC[
'ilDB'];
283 $query =
"SELECT obj_id FROM ecs_export " .
284 "WHERE econtent_id = " .
$ilDB->quote($a_econtent_id,
'integer') .
" " .
285 'AND server_id = ' .
$ilDB->quote($a_server_id,
'integer');
302 $this->exported = $a_status;
325 $this->econtent_id = $a_id;
349 $ilDB = $DIC[
'ilDB'];
351 $query =
"DELETE FROM ecs_export " .
352 "WHERE obj_id = " . $this->db->quote($this->obj_id,
'integer') .
" " .
357 $query =
"INSERT INTO ecs_export (server_id,obj_id,econtent_id) " .
359 $this->db->quote($this->
getServerId(),
'integer') .
', ' .
360 $this->db->quote($this->obj_id,
'integer') .
", " .
377 $ilDB = $DIC[
'ilDB'];
379 $query =
"SELECT * FROM ecs_export WHERE " .
380 "obj_id = " . $this->db->quote($this->obj_id,
'integer') .
" AND " .
384 $this->econtent_id =
$row->econtent_id;
385 $this->exported =
true;
393 $ilDB = $DIC[
'ilDB'];
395 $query =
'DELETE FROM ecs_export' .
396 ' WHERE server_id = ' .
$ilDB->quote($a_server_id,
'integer');
setServerId($a_server_id)
Set server id.
static _getAllEContentIds($a_server_id)
get all exported econtent ids per server
static _isRemote($a_server_id, $a_econtent_id)
is remote object
Storage of ECS exported objects.
setExported($a_status)
Set exported.
static _deleteEContentIds($a_server_id, $a_ids)
Delete econtent ids for server.
getServerId()
Get server id.
static deleteByServer($a_server_id)
Delete by server id ilDB $ilDB.
__construct($a_server_id, $a_obj_id)
Constructor.
static _getExportedIDsByServer($a_server_id)
get exported ids for server
static getExportedIds()
Get exported ids ilDB $ilDB.
static getExportServerIds($a_obj_id)
lookup server ids of exported materials ilDB $ilDB
foreach($_POST as $key=> $value) $res
isExported()
check if an object is exported or not
getEContentId()
get econtent id
static lookupServerIds($a_obj_id)
Lookup server ids of exported objects ilDB $ilDB.
static _isExported($a_obj_id)
Check if object is exported.
static deleteByServerId($a_server_id)
static getExportedIdsByType($a_type)
Get exported ids by type ilDB $ilDB.
setEContentId($a_id)
set econtent id