53 $this->ref_id = $a_course_ref_id;
54 $this->
id = $a_course_obj_id;
68 $this->ref_id = $a_ref_id;
76 return $this->start_objs ? $this->start_objs : array();
89 global $ilObjDataCache,
$ilLog;
91 $ilLog->write(__METHOD__.
': Begin course start objects...');
93 $new_obj_id = $ilObjDataCache->lookupObjId($a_target_id);
96 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
98 $mappings = $cwo->getMappings();
101 $item_ref_id = $data[
'item_ref_id'];
102 if(isset($mappings[$item_ref_id]) and $mappings[$item_ref_id])
104 $ilLog->write(__METHOD__.
': Clone start object nr. '.$item_ref_id);
105 $start->add($mappings[$item_ref_id]);
109 $ilLog->write(__METHOD__.
': No mapping found for start object nr. '.$item_ref_id);
112 $ilLog->write(__METHOD__.
': ... end course start objects');
116 function delete($a_crs_start_id)
120 $query =
"DELETE FROM crs_start ".
121 "WHERE crs_start_id = ".$ilDB->quote($a_crs_start_id ,
'integer').
" ".
122 "AND crs_id = ".$ilDB->quote($this->
getId(),
'integer').
" ";
131 $query =
"SELECT * FROM crs_start ".
132 "WHERE crs_id = ".$ilDB->quote($this->
getId() ,
'integer').
" ".
133 "AND item_ref_id = ".$ilDB->quote($a_item_ref_id ,
'integer').
" ";
136 return $res->numRows() ?
true :
false;
139 function add($a_item_ref_id)
145 $next_id = $ilDB->nextId(
'crs_start');
146 $query =
"INSERT INTO crs_start (crs_start_id,crs_id,item_ref_id) ".
148 $ilDB->quote($next_id,
'integer').
", ".
149 $ilDB->quote($this->
getId() ,
'integer').
", ".
150 $ilDB->quote($a_item_ref_id ,
'integer').
" ".
162 $query =
"DELETE FROM crs_start ".
163 "WHERE crs_id = ".$ilDB->quote($this->
getId() ,
'integer').
" ";
171 include_once
"Services/Object/classes/class.ilObjectActivation.php";
174 switch($node[
'type'])
180 $poss_items[] = $node[
'ref_id'];
184 return $poss_items ? $poss_items : array();
202 global $ilObjDataCache;
204 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
206 $continue_data = $lm_continue->getLMHistory();
208 $obj_id = $ilObjDataCache->lookupObjId($item_id);
209 $type = $ilObjDataCache->lookupType($obj_id);
214 include_once
'./Modules/Test/classes/class.ilObjTestAccess.php';
215 include_once
'./Services/AccessControl/classes/class.ilConditionHandler.php';
223 include_once
'./Modules/Survey/classes/class.ilObjSurveyAccess.php';
230 include_once
'Services/Tracking/classes/class.ilLPStatus.php';
238 if(!isset($continue_data[$item_id]))
252 $this->start_objs = array();
254 $query =
"SELECT * FROM crs_start ".
255 "WHERE crs_id = ".$ilDB->quote($this->
getId() ,
'integer').
" ";
260 if($tree->isInTree(
$row->item_ref_id))
262 $this->start_objs[
$row->crs_start_id][
'item_ref_id'] =
$row->item_ref_id;
266 $this->
delete(
$row->item_ref_id);