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 $q =
"DELETE FROM sahs_lm WHERE id = ".$ilDB->quote($this->
getId());
115 $this->ilias->db->query($q);
119 $q =
"DELETE FROM aicc_units USING aicc_object, aicc_units WHERE aicc_object.obj_id=aicc_units.obj_id and aicc_object.slm_id=".$ilDB->quote($this->
getId());
120 $this->ilias->db->query($q);
122 $q =
"DELETE FROM aicc_course USING aicc_object, aicc_course WHERE aicc_object.obj_id=aicc_course.obj_id and aicc_object.slm_id=".$ilDB->quote($this->
getId());
123 $this->ilias->db->query($q);
125 $q =
"DELETE FROM scorm_tree WHERE slm_id = ".$ilDB->quote($this->
getId());
126 $this->ilias->db->query($q);
128 $q =
"DELETE FROM aicc_object WHERE slm_id = ".$ilDB->quote($this->
getId());
129 $this->ilias->db->query($q);
131 $q =
"DELETE FROM scorm_tracking WHERE obj_id = ".$ilDB->quote($this->
getId());
132 $ilLog->write(
"SAHS Delete (AICC LM): ".$q);
133 $this->ilias->db->query($q);
156 include_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
158 $query =
"SELECT obj_id,title FROM aicc_object ".
159 "WHERE slm_id = ".$ilDB->quote($a_obj_id).
" ".
162 $res = $ilDB->query($query);
165 $items[$row->obj_id][
'obj_id'] = $row->obj_id;
166 $items[$row->obj_id][
'title'] = $row->title;
169 return $items ? $items : array();
197 global $ilUser, $ilDB, $ilUser;
199 $query =
"SELECT DISTINCT sco_id FROM scorm_tracking WHERE".
200 " obj_id = ".$ilDB->quote($this->
getId());
202 $sco_set = $ilDB->query($query);
207 include_once(
"./Modules/ScormAicc/classes/AICC/class.ilAICCUnit.php");
208 $ac_item =&
new ilAICCUnit($sco_rec[
"sco_id"]);
209 $items[count($items)] =& $ac_item;
220 $query =
"SELECT * FROM scorm_tracking WHERE".
221 " obj_id = ".$ilDB->quote($this->
getId()).
222 " AND sco_id = ".$ilDB->quote($a_sco_id).
223 " ORDER BY user_id, lvalue";
224 $data_set = $ilDB->query($query);