5 require_once
"classes/class.ilObject.php";
7 require_once
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php";
38 require_once(
"./Modules/ScormAicc/classes/class.ilObjAICCCourseInterchangeFiles.php");
42 $cifModule->readFiles();
43 if (!empty($cifModule->errorText))
45 $this->ilias->raiseError(
"<b>Error reading LM-File(s):</b><br>".implode(
"<br>", $cifModule->errorText), $this->ilias->error_obj->WARNING);
48 if (
$_POST[
"validate"] ==
"y")
51 $cifModule->validate();
52 if (!empty($cifModule->errorText))
54 $this->ilias->raiseError(
"<b>Validation Error(s):</b><br>".implode(
"<br>", $cifModule->errorText), $this->ilias->error_obj->WARNING);
58 $cifModule->writeToDatabase($this->
getId());
78 if (!parent::delete())
95 $ilDB->manipulateF(
'DELETE FROM sahs_lm WHERE id = %s',
96 array(
'integer'), array($this->
getId()));
99 $res = $ilDB->queryF(
'
100 SELECT * FROM aicc_object, aicc_units
101 WHERE aicc_object.obj_id = aicc_units.obj_id
102 AND aicc_object.slm_id = %s',
103 array(
'integer'), array($this->
getId()));
105 while(
$row = $ilDB->fetchAssoc(
$res))
107 $obj_id =
$row[
'obj_id'];
109 DELETE FROM aicc_units WHERE obj_id = %s',
110 array(
'integer'), array($obj_id));
113 $res = $ilDB->queryF(
'
114 SELECT * FROM aicc_object, aicc_course
115 WHERE aicc_object.obj_id = aicc_course.obj_id
116 AND aicc_object.slm_id = %s',
117 array(
'integer'), array($this->
getId()));
119 while(
$row = $ilDB->fetchAssoc(
$res))
121 $obj_id =
$row[
'obj_id'];
123 DELETE FROM aicc_course WHERE obj_id = %s',
124 array(
'integer'), array($obj_id));
127 $ilDB->manipulateF(
'DELETE FROM scorm_tree WHERE slm_id = %s',
128 array(
'integer'), array($this->
getId()));
130 $ilDB->manipulateF(
'DELETE FROM aicc_object WHERE slm_id = %s',
131 array(
'integer'), array($this->
getId()));
133 $q_log =
"DELETE FROM scorm_tracking WHERE obj_id = ".$ilDB->quote($this->
getId());
134 $ilLog->write(
"SAHS Delete (AICC LM): ".$q_log);
135 $ilDB->manipulateF(
'DELETE FROM scorm_tracking WHERE obj_id = %s',
136 array(
'integer'), array($this->
getId()));
139 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
163 include_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
165 $statement = $ilDB->queryF(
'
166 SELECT obj_id,title FROM aicc_object
169 array(
'integer',
'text'),
170 array($a_obj_id,
'sau')
173 while(
$row = $ilDB->fetchObject($statement))
175 $items[
$row->obj_id][
'obj_id'] =
$row->obj_id;
176 $items[
$row->obj_id][
'title'] =
$row->title;
180 return $items ? $items : array();
208 global $ilUser,
$ilDB, $ilUser;
210 $sco_set = $ilDB->queryF(
'
211 SELECT DISTINCT sco_id FROM scorm_tracking WHERE obj_id = %s',
212 array(
'integer'), array($this->
getId()));
215 while($sco_rec = $ilDB->fetchAssoc($sco_set))
217 include_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
218 $ac_item =&
new ilAICCUnit($sco_rec[
"sco_id"]);
219 $items[count($items)] =& $ac_item;
230 $data_set = $ilDB->queryF(
'
231 SELECT * FROM scorm_tracking
234 ORDER BY user_id, lvalue',
235 array(
'integer',
'integer'),
236 array($this->
getId(), $a_sco_id));
239 while($data_rec = $ilDB->fetchAssoc($data_set))