Public Member Functions | |
ilSCORMObject ($a_id=0) | |
Constructor. | |
getId () | |
setId ($a_id) | |
getType () | |
setType ($a_type) | |
getTitle () | |
setTitle ($a_title) | |
getSLMId () | |
setSLMId ($a_slm_id) | |
read () | |
_lookupPresentableItems ($a_slm_id) | |
Count number of presentable SCOs/Assets of SCORM learning module. | |
create () | |
Create database record for SCORM object. | |
update () | |
Updates database record for SCORM object. | |
delete () | |
& | _getInstance ($a_id, $a_slm_id) |
get instance of specialized GUI class | |
Data Fields | |
$id | |
$title | |
$type | |
$slm_id |
Definition at line 34 of file class.ilSCORMObject.php.
& ilSCORMObject::_getInstance | ( | $ | a_id, | |
$ | a_slm_id | |||
) |
get instance of specialized GUI class
static
Definition at line 177 of file class.ilSCORMObject.php.
Referenced by ilObjSAHSLearningModule::delete().
{ global $ilDB; $sc_set = $ilDB->query("SELECT type FROM scorm_object WHERE obj_id =" . $ilDB->quote($a_id). " AND slm_id = ".$ilDB->quote($a_slm_id)); $sc_rec = $sc_set->fetchRow(DB_FETCHMODE_ASSOC); switch($sc_rec["type"]) { case "sit": // item include_once("content/classes/SCORM/class.ilSCORMItem.php"); $item =& new ilSCORMItem($a_id); return $item; break; case "sos": // organizations include_once("content/classes/SCORM/class.ilSCORMOrganizations.php"); $sos =& new ilSCORMOrganizations($a_id); return $sos; break; case "sor": // organization include_once("content/classes/SCORM/class.ilSCORMOrganization.php"); $sor =& new ilSCORMOrganization($a_id); return $sor; break; case "sma": // manifest include_once("content/classes/SCORM/class.ilSCORMManifest.php"); $sma =& new ilSCORMManifest($a_id); return $sma; break; case "srs": // resources include_once("content/classes/SCORM/class.ilSCORMResources.php"); $srs =& new ilSCORMResources($a_id); return $srs; break; case "sre": // resource include_once("content/classes/SCORM/class.ilSCORMResource.php"); $sre =& new ilSCORMResource($a_id); return $sre; break; } }
ilSCORMObject::_lookupPresentableItems | ( | $ | a_slm_id | ) |
Count number of presentable SCOs/Assets of SCORM learning module.
Definition at line 114 of file class.ilSCORMObject.php.
Referenced by ilSCORMPresentationGUI::frameset(), and ilSCORMPresentationGUI::launchSahs().
{ global $ilDB; $q = "SELECT sit.obj_id as id FROM scorm_object as sob, sc_item as sit". " WHERE sob.slm_id = ".$ilDB->quote($a_slm_id). " AND sob.obj_id = sit.obj_id ". " AND sit.identifierref <> ''"; $set = $ilDB->query($q); $items = array(); while ($rec = $set->fetchRow(DB_FETCHMODE_ASSOC)) { $items[] = $rec["id"]; } return $items; }
ilSCORMObject::create | ( | ) |
Create database record for SCORM object.
Reimplemented in ilSCORMItem, ilSCORMManifest, ilSCORMOrganization, ilSCORMOrganizations, ilSCORMResource, and ilSCORMResources.
Definition at line 137 of file class.ilSCORMObject.php.
References $q, getSLMId(), getTitle(), getType(), and setId().
{ global $ilDB; $q = "INSERT INTO scorm_object (title, type, slm_id) VALUES " . "(" . $ilDB->quote($this->getTitle()) . ", " . $ilDB->quote($this->getType()) . "," . "'" . $this->getSLMId() . "')"; $this->ilias->db->query($q); $this->setId($this->ilias->db->getLastInsertId()); }
ilSCORMObject::delete | ( | ) |
Reimplemented in ilSCORMItem, ilSCORMManifest, ilSCORMOrganization, ilSCORMOrganizations, ilSCORMResource, and ilSCORMResources.
Definition at line 164 of file class.ilSCORMObject.php.
{ global $ilDB; $q = "DELETE FROM scorm_object WHERE obj_id =" . $ilDB->quote($this->getId()); $ilDB->query($q); }
ilSCORMObject::getId | ( | ) |
Definition at line 60 of file class.ilSCORMObject.php.
Referenced by ilSCORMResources::delete(), ilSCORMResource::delete(), ilSCORMOrganizations::delete(), ilSCORMOrganization::delete(), delete(), ilSCORMManifest::delete(), ilSCORMItem::delete(), ilSCORMItem::insertTrackData(), read(), and update().
{
return $this->id;
}
ilSCORMObject::getSLMId | ( | ) |
Definition at line 90 of file class.ilSCORMObject.php.
Referenced by create(), and update().
{
return $this->slm_id;
}
ilSCORMObject::getTitle | ( | ) |
Definition at line 80 of file class.ilSCORMObject.php.
Referenced by create(), and update().
{
return $this->title;
}
ilSCORMObject::getType | ( | ) |
Definition at line 70 of file class.ilSCORMObject.php.
Referenced by create(), and update().
{
return $this->type;
}
ilSCORMObject::ilSCORMObject | ( | $ | a_id = 0 |
) |
Constructor.
int | $a_id Object ID public |
Definition at line 48 of file class.ilSCORMObject.php.
References $ilias, and read().
Referenced by ilSCORMItem::ilSCORMItem(), ilSCORMManifest::ilSCORMManifest(), ilSCORMOrganization::ilSCORMOrganization(), ilSCORMOrganizations::ilSCORMOrganizations(), ilSCORMResource::ilSCORMResource(), and ilSCORMResources::ilSCORMResources().
ilSCORMObject::read | ( | ) |
Reimplemented in ilSCORMItem, ilSCORMManifest, ilSCORMOrganization, ilSCORMOrganizations, ilSCORMResource, and ilSCORMResources.
Definition at line 100 of file class.ilSCORMObject.php.
References $q, getId(), setSLMId(), setTitle(), and setType().
Referenced by ilSCORMObject().
{ $q = "SELECT * FROM scorm_object WHERE obj_id = '" . $this->getId() . "'"; $obj_set = $this->ilias->db->query($q); $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC); $this->setTitle($obj_rec["title"]); $this->setType($obj_rec["type"]); $this->setSLMId($obj_rec["slm_id"]); }
ilSCORMObject::setId | ( | $ | a_id | ) |
Definition at line 65 of file class.ilSCORMObject.php.
Referenced by create(), and ilSCORMResource::readByIdRef().
{
$this->id = $a_id;
}
ilSCORMObject::setSLMId | ( | $ | a_slm_id | ) |
Definition at line 95 of file class.ilSCORMObject.php.
Referenced by read().
{ $this->slm_id = $a_slm_id; }
ilSCORMObject::setTitle | ( | $ | a_title | ) |
Definition at line 85 of file class.ilSCORMObject.php.
Referenced by ilSCORMOrganizations::ilSCORMOrganizations(), ilSCORMResources::ilSCORMResources(), read(), ilSCORMResource::setHRef(), and ilSCORMManifest::setImportId().
{ $this->title = $a_title; }
ilSCORMObject::setType | ( | $ | a_type | ) |
Definition at line 75 of file class.ilSCORMObject.php.
Referenced by ilSCORMItem::ilSCORMItem(), ilSCORMManifest::ilSCORMManifest(), ilSCORMOrganization::ilSCORMOrganization(), ilSCORMOrganizations::ilSCORMOrganizations(), ilSCORMResource::ilSCORMResource(), ilSCORMResources::ilSCORMResources(), and read().
{ $this->type = $a_type; }
ilSCORMObject::update | ( | ) |
Updates database record for SCORM object.
Reimplemented in ilSCORMItem, ilSCORMManifest, ilSCORMOrganization, ilSCORMOrganizations, ilSCORMResource, and ilSCORMResources.
Definition at line 152 of file class.ilSCORMObject.php.
References $q, getId(), getSLMId(), getTitle(), and getType().
{ global $ilDB; $q = "UPDATE scorm_object SET " . "title = " . $ilDB->quote($this->getTitle()) . ", " . "type = " . $ilDB->quote($this->getType()) . ", " . "slm_id = '" . $this->getSLMId() . "' " . "WHERE obj_id = '" . $this->getId() . "'"; $this->ilias->db->query($q); }
ilSCORMObject::$id |
Definition at line 36 of file class.ilSCORMObject.php.
ilSCORMObject::$slm_id |
Definition at line 39 of file class.ilSCORMObject.php.
ilSCORMObject::$title |
Definition at line 37 of file class.ilSCORMObject.php.
ilSCORMObject::$type |
Definition at line 38 of file class.ilSCORMObject.php.