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 $query =
"DELETE FROM event_items ".
92 "WHERE event_id = ".$ilDB->quote($a_event_id ,
'integer').
" ";
103 foreach($this->items as $item)
105 $query =
"INSERT INTO event_items (event_id,item_id) ".
107 $ilDB->quote($this->
getEventId() ,
'integer').
", ".
108 $ilDB->quote($item ,
'integer').
" ".
119 $session_nodes = $tree->getChildsByType($a_ref_id,
'sess');
120 foreach($session_nodes as $node)
122 $session_ids[] = $node[
'obj_id'];
124 $query =
"SELECT item_id FROM event_items ".
125 "WHERE ".$ilDB->in(
'event_id',$session_ids,
false,
'integer');
148 $query =
"SELECT * FROM event_items ".
149 "WHERE event_id = ".$ilDB->quote($a_event_id ,
'integer');
162 $query =
"SELECT * FROM event_items ".
163 "WHERE item_id = ".$ilDB->quote($a_item_id ,
'integer').
" ";
166 return $res->numRows() ?
true :
false;
179 global $ilObjDataCache,
$ilLog;
181 $ilLog->write(__METHOD__.
': Begin cloning session materials ...');
183 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
185 $mappings = $cwo->getMappings();
187 $new_items = array();
190 if(isset($mappings[$item_id]) and $mappings[$item_id])
192 $ilLog->write(__METHOD__.
': Clone session material nr. '.$item_id);
193 $new_items[] = $mappings[$item_id];
197 $ilLog->write(__METHOD__.
': No mapping found for session material nr. '.$item_id);
202 $ilLog->write(__METHOD__.
': Finished cloning session materials ...');
212 $query =
"SELECT * FROM event_items ".
213 "WHERE event_id = ".$ilDB->quote($this->
getEventId() ,
'integer').
" ";
216 $this->items = array();
219 if($tree->isDeleted(
$row->item_id))
223 if(!$tree->isInTree(
$row->item_id))
225 $query =
"DELETE FROM event_items ".
226 "WHERE item_id = ".$ilDB->quote(
$row->item_id ,
'integer');
227 $ilDB->manipulate(
$query);
231 $this->items[] = (int)
$row->item_id;