53 $this->event_id = $a_event_id;
63 $this->event_id = $a_event_id;
72 return $this->items ? $this->items :
array();
76 $this->items =
array();
77 foreach ($a_items as $item_id) {
78 $this->items[] = (int) $item_id;
90 $this->items[] = (int) $a_item_ref_id;
94 public function delete()
99 public static function _delete($a_event_id)
103 $query =
"DELETE FROM event_items " .
104 "WHERE event_id = " . $ilDB->quote($a_event_id,
'integer') .
" ";
115 foreach ($this->items as $item) {
116 $query =
"INSERT INTO event_items (event_id,item_id) " .
118 $ilDB->quote($this->
getEventId(),
'integer') .
", " .
119 $ilDB->quote($item,
'integer') .
" " .
130 $session_nodes = $tree->getChildsByType($a_ref_id,
'sess');
132 foreach ($session_nodes as $node) {
133 $session_ids[] = $node[
'obj_id'];
135 $query =
"SELECT item_id FROM event_items " .
136 "WHERE " . $ilDB->in(
'event_id', $session_ids,
false,
'integer');
158 $query =
"SELECT * FROM event_items " .
159 "WHERE event_id = " . $ilDB->quote($a_event_id,
'integer');
171 $query =
"SELECT * FROM event_items " .
172 "WHERE item_id = " . $ilDB->quote($a_item_id,
'integer') .
" ";
175 return $res->numRows() ? true :
false;
188 global $ilObjDataCache,
$ilLog;
190 $ilLog->write(__METHOD__ .
': Begin cloning session materials ...');
192 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
194 $mappings = $cwo->getMappings();
196 $new_items =
array();
198 if (isset($mappings[$item_id]) and $mappings[$item_id]) {
199 $ilLog->write(__METHOD__ .
': Clone session material nr. ' . $item_id);
200 $new_items[] = $mappings[$item_id];
202 $ilLog->write(__METHOD__ .
': No mapping found for session material nr. ' . $item_id);
207 $ilLog->write(__METHOD__ .
': Finished cloning session materials ...');
217 $query =
"SELECT * FROM event_items " .
218 "WHERE event_id = " . $ilDB->quote($this->
getEventId(),
'integer') .
" ";
221 $this->items =
array();
223 if ($tree->isDeleted(
$row->item_id)) {
226 if (!$tree->isInTree(
$row->item_id)) {
227 $query =
"DELETE FROM event_items " .
228 "WHERE item_id = " . $ilDB->quote(
$row->item_id,
'integer');
229 $ilDB->manipulate(
$query);
233 $this->items[] = (int)
$row->item_id;
getItems()
get assigned items
static _getItemsOfContainer($a_ref_id)
cloneItems($a_source_id, $a_copy_id)
Clone items.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
static _getItemsOfEvent($a_event_id)
Get items by event.
addItem($a_item_ref_id)
Add one item.
static _delete($a_event_id)