25 require_once
"classes/class.ilObject.php";
26 require_once
"./Modules/ScormAicc/classes/class.ilObjSCORMValidator.php";
82 $q =
"INSERT INTO sahs_lm (id, online, api_adapter, type) VALUES ".
83 " (".$ilDB->quote($this->getID()).
",".$ilDB->quote(
"n").
",".
84 $ilDB->quote(
"API").
",".$ilDB->quote($this->
getSubType()).
")";
96 $q =
"SELECT * FROM sahs_lm WHERE id = ".$ilDB->quote($this->
getId());
97 $lm_set = $this->ilias->db->query($q);
120 $q =
"SELECT * FROM sahs_lm WHERE id = ".$ilDB->quote($a_id);
121 $lm_set = $this->ilias->db->query($q);
136 $q =
"SELECT * FROM sahs_lm WHERE id = ".$ilDB->quote($a_obj_id);
137 $obj_set = $ilDB->query($q);
140 return $obj_rec[
"type"];
234 $lm_dir = $lm_data_dir.
"/lm_".$this->
getId();
244 return $this->api_adapter;
252 $this->api_adapter = $a_api;
260 return $this->api_func_prefix;
268 $this->api_func_prefix = $a_prefix;
276 return $this->credit_mode;
284 $this->credit_mode = $a_credit_mode;
292 $this->lesson_mode = $a_lesson_mode;
300 return $this->lesson_mode;
308 $this->auto_review = $a_auto_review;
315 return $this->auto_review;
324 return $this->max_attempt;
333 $this->max_attempt = $a_max_attempt;
341 return $this->module_version;
349 $this->module_version = $a_module_version;
390 $q =
"UPDATE sahs_lm SET ".
396 " type = ".$ilDB->quote($this->
getSubType()).
",".
400 " WHERE id = ".$ilDB->quote($this->
getId());
401 $this->ilias->db->query($q);
411 $this->online = $a_online;
419 return $this->online;
427 $this->sub_type = $a_sub_type;
435 return $this->sub_type;
454 if (!parent::delete())
471 $q =
"DELETE FROM sahs_lm WHERE id = ".$ilDB->quote($this->
getId());
472 $this->ilias->db->query($q);
473 $ilLog->write(
"SAHS Delete(SAHSLM), Subtype: ".$this->
getSubType());
478 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMTree.php");
479 include_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMObject.php");
481 $r_id = $sc_tree->readRootId();
484 $items = $sc_tree->getSubTree($sc_tree->getNodeData($r_id));
485 foreach($items as $item)
488 if (is_object($sc_object))
490 $sc_object->delete();
493 $sc_tree->removeTree($sc_tree->getTreeId());
501 $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());
502 $this->ilias->db->query($q);
504 $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());
505 $this->ilias->db->query($q);
507 $q =
"DELETE FROM aicc_object WHERE slm_id = ".$ilDB->quote($this->
getId());
508 $this->ilias->db->query($q);
511 $q =
"DELETE FROM scorm_tracking WHERE obj_id = ".$ilDB->quote($this->
getId());
512 $ilLog->write(
"SAHS Delete(SAHSLM): ".$q);
513 $this->ilias->db->query($q);
529 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
569 if ($a_node_id==
$_GET[
"ref_id"])
571 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
572 $parent_type = $parent_obj->getType();
573 if($parent_type == $this->
getType())
575 $a_node_id = (int) $tree->getParentId($a_node_id);
579 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);