/** * get instance of specialized GUI class * * static */ function &getInstance($a_id) { $object = new ilAICCObject($a_id); switch ($object->getType()) { case "sbl": // Block $block =& new ilAICCBlockGUI($a_id); return $block; break; case "sau": // assignable unit $sau =& new ilAICCUnitGUI($a_id); return $sau; break; case "shd": // course $shd =& new ilAICCCourseGUI($a_id); return $shd; break; } }
function delete() { global $ilDB, $ilLog; parent::delete(); $q_log = "DELETE FROM aicc_units WHERE obj_id =" . $ilDB->quote($this->getId()); $ilLog->write("SAHS Delete(Unit): " . $q_log); $ilDB->manipulateF('DELETE FROM aicc_units WHERE obj_id = %s', array('integer'), array($this->getId())); $ilDB->manipulateF(' DELETE FROM scorm_tracking WHERE sco_id = %s AND obj_id =%s', array('integer', 'integer'), array($this->getId(), $this->getALMId())); // update learning progress status include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php"; ilLPStatusWrapper::_refreshStatus($this->getALMId()); }
/** * Constructor * * @param int $a_id Object ID * @access public */ function ilAICCBlock($a_id = 0) { parent::ilAICCObject($a_id); $this->type = "sbl"; }
function delete() { global $ilDB, $ilLog; parent::delete(); $statement = $ilDB->manipulateF('DELETE FROM aicc_course WHERE obj_id = %s', array('integer'), array($this->getId())); $statement = $ilDB->manipulateF(' DELETE FROM scorm_tracking WHERE sco_id = %s AND obj_id = %s', array('integer', 'integer'), array($this->getId(), $this->getALMId())); // update learning progress status include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php"; ilLPStatusWrapper::_refreshStatus($this->getALMId()); }