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)
79 $this->items[] = (int) $item_id;
91 $this->items[] = (int) $a_item_ref_id;
104 $query =
"DELETE FROM event_items ".
105 "WHERE event_id = ".$ilDB->quote($a_event_id ,
'integer').
" ";
116 foreach($this->items as $item)
118 $query =
"INSERT INTO event_items (event_id,item_id) ".
120 $ilDB->quote($this->
getEventId() ,
'integer').
", ".
121 $ilDB->quote($item ,
'integer').
" ".
132 $session_nodes = $tree->getChildsByType($a_ref_id,
'sess');
133 foreach($session_nodes as $node)
135 $session_ids[] = $node[
'obj_id'];
137 $query =
"SELECT item_id FROM event_items ".
138 "WHERE ".$ilDB->in(
'event_id',$session_ids,
false,
'integer');
161 $query =
"SELECT * FROM event_items ".
162 "WHERE event_id = ".$ilDB->quote($a_event_id ,
'integer');
175 $query =
"SELECT * FROM event_items ".
176 "WHERE item_id = ".$ilDB->quote($a_item_id ,
'integer').
" ";
179 return $res->numRows() ?
true :
false;
192 global $ilObjDataCache,
$ilLog;
194 $ilLog->write(__METHOD__.
': Begin cloning session materials ...');
196 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
198 $mappings = $cwo->getMappings();
200 $new_items = array();
203 if(isset($mappings[$item_id]) and $mappings[$item_id])
205 $ilLog->write(__METHOD__.
': Clone session material nr. '.$item_id);
206 $new_items[] = $mappings[$item_id];
210 $ilLog->write(__METHOD__.
': No mapping found for session material nr. '.$item_id);
215 $ilLog->write(__METHOD__.
': Finished cloning session materials ...');
225 $query =
"SELECT * FROM event_items ".
226 "WHERE event_id = ".$ilDB->quote($this->
getEventId() ,
'integer').
" ";
229 $this->items = array();
232 if($tree->isDeleted(
$row->item_id))
236 if(!$tree->isInTree(
$row->item_id))
238 $query =
"DELETE FROM event_items ".
239 "WHERE item_id = ".$ilDB->quote(
$row->item_id ,
'integer');
240 $ilDB->manipulate(
$query);
244 $this->items[] = (int)
$row->item_id;