24 require_once
"classes/class.ilObject.php";
26 require_once
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php";
57 require_once(
"./Modules/ScormAicc/classes/class.ilObjAICCCourseInterchangeFiles.php");
61 $cifModule->readFiles();
62 if (!empty($cifModule->errorText))
64 $this->ilias->raiseError(
"<b>Error reading LM-File(s):</b><br>".implode(
"<br>", $cifModule->errorText), $this->ilias->error_obj->WARNING);
67 if (
$_POST[
"validate"] ==
"y")
70 $cifModule->validate();
71 if (!empty($cifModule->errorText))
73 $this->ilias->raiseError(
"<b>Validation Error(s):</b><br>".implode(
"<br>", $cifModule->errorText), $this->ilias->error_obj->WARNING);
77 $cifModule->writeToDatabase($this->
getId());
97 if (!parent::delete())
114 $ilDB->manipulateF(
'DELETE FROM sahs_lm WHERE id = %s',
115 array(
'integer'), array($this->
getId()));
118 $res = $ilDB->queryF(
'
119 SELECT * FROM aicc_object, aicc_units
120 WHERE aicc_object.obj_id = aicc_units.obj_id
121 AND aicc_object.slm_id = %s',
122 array(
'integer'), array($this->
getId()));
124 while(
$row = $ilDB->fetchAssoc(
$res))
126 $obj_id =
$row[
'obj_id'];
128 DELETE FROM aicc_units WHERE obj_id = %s',
129 array(
'integer'), array($obj_id));
132 $res = $ilDB->queryF(
'
133 SELECT * FROM aicc_object, aicc_course
134 WHERE aicc_object.obj_id = aicc_course.obj_id
135 AND aicc_object.slm_id = %s',
136 array(
'integer'), array($this->
getId()));
138 while(
$row = $ilDB->fetchAssoc(
$res))
140 $obj_id =
$row[
'obj_id'];
142 DELETE FROM aicc_course WHERE obj_id = %s',
143 array(
'integer'), array($obj_id));
146 $ilDB->manipulateF(
'DELETE FROM scorm_tree WHERE slm_id = %s',
147 array(
'integer'), array($this->
getId()));
149 $ilDB->manipulateF(
'DELETE FROM aicc_object WHERE slm_id = %s',
150 array(
'integer'), array($this->
getId()));
152 $q_log =
"DELETE FROM scorm_tracking WHERE obj_id = ".$ilDB->quote($this->
getId());
153 $ilLog->write(
"SAHS Delete (AICC LM): ".$q_log);
154 $ilDB->manipulateF(
'DELETE FROM scorm_tracking WHERE obj_id = %s',
155 array(
'integer'), array($this->
getId()));
178 include_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
180 $statement = $ilDB->queryF(
'
181 SELECT obj_id,title FROM aicc_object
184 array(
'integer',
'text'),
185 array($a_obj_id,
'sau')
188 while(
$row = $ilDB->fetchObject($statement))
190 $items[
$row->obj_id][
'obj_id'] =
$row->obj_id;
191 $items[
$row->obj_id][
'title'] =
$row->title;
195 return $items ? $items : array();
223 global $ilUser,
$ilDB, $ilUser;
225 $sco_set = $ilDB->queryF(
'
226 SELECT DISTINCT sco_id FROM scorm_tracking WHERE obj_id = %s',
227 array(
'integer'), array($this->
getId()));
230 while($sco_rec = $ilDB->fetchAssoc($sco_set))
232 include_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
233 $ac_item =&
new ilAICCUnit($sco_rec[
"sco_id"]);
234 $items[count($items)] =& $ac_item;
245 $data_set = $ilDB->queryF(
'
246 SELECT * FROM scorm_tracking
249 ORDER BY user_id, lvalue',
250 array(
'integer',
'interger'),
251 array($this->
getId(), $a_sco_id));
254 while($data_rec = $ilDB->fetchAssoc($data_set))