5 require_once
"./Services/Object/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()));
138 $q_log =
"DELETE FROM sahs_user WHERE obj_id = ".$ilDB->quote($this->
getId());
139 $ilLog->write(
"SAHS Delete (AICC LM): ".$q_log);
140 $ilDB->manipulateF(
'DELETE FROM sahs_user WHERE obj_id = %s',
141 array(
'integer'), array($this->
getId()));
144 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
168 include_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
170 $statement = $ilDB->queryF(
'
171 SELECT obj_id,title FROM aicc_object
174 array(
'integer',
'text'),
175 array($a_obj_id,
'sau')
178 while(
$row = $ilDB->fetchObject($statement))
180 $items[
$row->obj_id][
'obj_id'] =
$row->obj_id;
181 $items[
$row->obj_id][
'title'] =
$row->title;
185 return $items ? $items : array();
215 $sco_set = $ilDB->queryF(
'
216 SELECT DISTINCT sco_id FROM scorm_tracking WHERE obj_id = %s',
217 array(
'integer'), array($this->
getId()));
220 while($sco_rec = $ilDB->fetchAssoc($sco_set))
222 include_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
223 $ac_item =&
new ilAICCUnit($sco_rec[
"sco_id"]);
224 $items[count($items)] =& $ac_item;
235 $data_set = $ilDB->queryF(
'
236 SELECT * FROM scorm_tracking
239 ORDER BY user_id, lvalue',
240 array(
'integer',
'integer'),
241 array($this->
getId(), $a_sco_id));
244 while($data_rec = $ilDB->fetchAssoc($data_set))