53 $this->event_id = $a_event_id;
63 $this->event_id = $a_event_id;
67 return $this->items ? $this->items : array();
71 $this->items = array();
72 foreach($a_items as $item_id)
74 $this->items[] = (int) $item_id;
86 $query =
"DELETE FROM event_items ".
87 "WHERE event_id = ".$ilDB->quote($a_event_id).
" ";
98 foreach($this->items as $item)
100 $query =
"INSERT INTO event_items ".
101 "SET event_id = ".$ilDB->quote($this->
getEventId()).
", ".
102 "item_id = ".$ilDB->quote($item).
" ";
103 $this->db->query($query);
112 $session_nodes = $tree->getChildsByType($a_ref_id,
'sess');
113 foreach($session_nodes as $node)
115 $session_ids[] = $node[
'obj_id'];
119 $query =
"SELECT item_id FROM event_items ".
120 "WHERE event_id ".$in;
123 $res = $ilDB->query($query);
143 $query =
"SELECT * FROM event_items ".
144 "WHERE event_id = ".$ilDB->quote($a_event_id);
145 $res = $ilDB->query($query);
157 $query =
"SELECT * FROM event_items ".
158 "WHERE item_id = ".$ilDB->quote($a_item_id).
" ";
159 $res = $ilDB->query($query);
161 return $res->numRows() ?
true :
false;
174 global $ilObjDataCache,
$ilLog;
176 $ilLog->write(__METHOD__.
': Begin cloning session materials ...');
178 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
180 $mappings = $cwo->getMappings();
182 $new_items = array();
185 if(isset($mappings[$item_id]) and $mappings[$item_id])
187 $ilLog->write(__METHOD__.
': Clone session material nr. '.$item_id);
188 $new_items[] = $mappings[$item_id];
192 $ilLog->write(__METHOD__.
': No mapping found for session material nr. '.$item_id);
197 $ilLog->write(__METHOD__.
': Finished cloning session materials ...');
207 $query =
"SELECT * FROM event_items ".
208 "WHERE event_id = ".$ilDB->quote($this->
getEventId()).
" ";
210 $res = $this->db->query($query);
211 $this->items = array();
214 if($tree->isDeleted($row->item_id))
218 if(!$tree->isInTree($row->item_id))
220 $query =
"DELETE FROM event_items ".
221 "WHERE item_id = ".$ilDB->quote($row->item_id);
222 $ilDB->query($query);
226 $this->items[] = (int) $row->item_id;