ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSCORMObject Class Reference

Parent object for all SCORM objects, that are stored in table scorm_object. More...

+ Inheritance diagram for ilSCORMObject:
+ Collaboration diagram for ilSCORMObject:

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

Detailed Description

Parent object for all SCORM objects, that are stored in table scorm_object.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 33 of file class.ilSCORMObject.php.

Member Function Documentation

& ilSCORMObject::_getInstance (   $a_id,
  $a_slm_id 
)

get instance of specialized GUI class

static

Definition at line 189 of file class.ilSCORMObject.php.

Referenced by ilObjSAHSLearningModule\delete().

{
global $ilDB;
$sc_set = $ilDB->queryF('
SELECT c_type FROM scorm_object
WHERE obj_id = %s
AND slm_id = %s',
array('integer','integer'),
array($a_id, $a_slm_id)
);
$sc_rec = $ilDB->fetchAssoc($sc_set);
switch($sc_rec["c_type"])
{
case "sit": // item
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php");
$item =& new ilSCORMItem($a_id);
return $item;
break;
case "sos": // organizations
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMOrganizations.php");
$sos =& new ilSCORMOrganizations($a_id);
return $sos;
break;
case "sor": // organization
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMOrganization.php");
$sor =& new ilSCORMOrganization($a_id);
return $sor;
break;
case "sma": // manifest
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMManifest.php");
$sma =& new ilSCORMManifest($a_id);
return $sma;
break;
case "srs": // resources
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMResources.php");
$srs =& new ilSCORMResources($a_id);
return $srs;
break;
case "sre": // resource
include_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMResource.php");
$sre =& new ilSCORMResource($a_id);
return $sre;
break;
}
}

+ Here is the caller graph for this function:

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;
$set = $ilDB->queryF("
SELECT sit.obj_id id
FROM scorm_object sob, sc_item sit
WHERE sob.slm_id = %s
AND sob.obj_id = sit.obj_id
AND sit.identifierref IS NOT NULL",
array('integer'),
array($a_slm_id)
);
$items = array();
while ($rec = $ilDB->fetchAssoc($set))
{
$items[] = $rec["id"];
}
return $items;
}

+ Here is the caller graph for this function:

ilSCORMObject::create ( )

Create database record for SCORM object.

Reimplemented in ilSCORMResource, ilSCORMItem, ilSCORMManifest, ilSCORMOrganization, ilSCORMOrganizations, and ilSCORMResources.

Definition at line 140 of file class.ilSCORMObject.php.

References getSLMId(), getTitle(), getType(), and setId().

{
global $ilDB;
$nextId = $ilDB->nextId('scorm_object');
$this->setId($nextId);
$ilDB->manipulateF('
INSERT INTO scorm_object (obj_id,title, c_type, slm_id)
VALUES (%s,%s,%s,%s) ',
array('integer','text','text','integer'),
array($nextId, $this->getTitle(),$this->getType(), $this->getSLMId()));
}

+ Here is the call graph for this function:

ilSCORMObject::delete ( )

Reimplemented in ilSCORMResource, ilSCORMItem, ilSCORMManifest, ilSCORMOrganization, ilSCORMOrganizations, and ilSCORMResources.

Definition at line 176 of file class.ilSCORMObject.php.

References getId().

{
global $ilDB;
$ilDB->manipulateF('DELETE FROM scorm_object WHERE obj_id = %s',
array('integer'),array($this->getId()) );
}

+ Here is the call graph for this function:

ilSCORMObject::getSLMId ( )

Definition at line 89 of file class.ilSCORMObject.php.

References $slm_id.

Referenced by create(), ilSCORMItem\delete(), ilSCORMItem\getTrackingDataOfUser(), and update().

{
return $this->slm_id;
}

+ Here is the caller graph for this function:

ilSCORMObject::getTitle ( )

Definition at line 79 of file class.ilSCORMObject.php.

References $title.

Referenced by create(), and update().

{
return $this->title;
}

+ Here is the caller graph for this function:

ilSCORMObject::getType ( )

Definition at line 69 of file class.ilSCORMObject.php.

References $type.

Referenced by create(), and update().

{
return $this->type;
}

+ Here is the caller graph for this function:

ilSCORMObject::ilSCORMObject (   $a_id = 0)

Constructor.

Parameters
int$a_idObject ID public

Definition at line 47 of file class.ilSCORMObject.php.

References read().

Referenced by ilSCORMItem\ilSCORMItem(), ilSCORMManifest\ilSCORMManifest(), ilSCORMOrganization\ilSCORMOrganization(), ilSCORMOrganizations\ilSCORMOrganizations(), ilSCORMResource\ilSCORMResource(), and ilSCORMResources\ilSCORMResources().

{
global $ilias;
$this->ilias =& $ilias;
$this->id = $a_id;
if ($a_id > 0)
{
$this->read();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSCORMObject::read ( )

Reimplemented in ilSCORMItem, ilSCORMResource, ilSCORMManifest, ilSCORMOrganization, ilSCORMOrganizations, and ilSCORMResources.

Definition at line 99 of file class.ilSCORMObject.php.

References getId(), setSLMId(), setTitle(), and setType().

Referenced by ilSCORMObject().

{
global $ilDB;
$obj_set = $ilDB->queryF('SELECT * FROM scorm_object WHERE obj_id = %s',
array('integer'),array($this->getId()));
$obj_rec = $ilDB->fetchAssoc($obj_set);
$this->setTitle($obj_rec["title"]);
$this->setType($obj_rec["c_type"]);
$this->setSLMId($obj_rec["slm_id"]);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSCORMObject::setId (   $a_id)

Definition at line 64 of file class.ilSCORMObject.php.

Referenced by create(), and ilSCORMResource\readByIdRef().

{
$this->id = $a_id;
}

+ Here is the caller graph for this function:

ilSCORMObject::setSLMId (   $a_slm_id)

Definition at line 94 of file class.ilSCORMObject.php.

Referenced by read().

{
$this->slm_id = $a_slm_id;
}

+ Here is the caller graph for this function:

ilSCORMObject::setTitle (   $a_title)

Definition at line 84 of file class.ilSCORMObject.php.

Referenced by ilSCORMOrganizations\ilSCORMOrganizations(), ilSCORMResources\ilSCORMResources(), read(), ilSCORMResource\setHRef(), and ilSCORMManifest\setImportId().

{
$this->title = $a_title;
}

+ Here is the caller graph for this function:

ilSCORMObject::setType (   $a_type)
ilSCORMObject::update ( )

Updates database record for SCORM object.

Reimplemented in ilSCORMResource, ilSCORMItem, ilSCORMManifest, ilSCORMOrganization, ilSCORMOrganizations, and ilSCORMResources.

Definition at line 160 of file class.ilSCORMObject.php.

References getId(), getSLMId(), getTitle(), and getType().

{
global $ilDB;
$ilDB->manipulateF('
UPDATE scorm_object
SET title = %s,
c_type = %s,
slm_id = %s
WHERE obj_id = %s',
array('text','text','integer','integer'),
array($this->getTitle(),$this->getType(), $this->getSLMId(),$this->getId())
);
}

+ Here is the call graph for this function:

Field Documentation

ilSCORMObject::$id

Definition at line 35 of file class.ilSCORMObject.php.

Referenced by getId().

ilSCORMObject::$slm_id

Definition at line 38 of file class.ilSCORMObject.php.

Referenced by getSLMId().

ilSCORMObject::$title

Definition at line 36 of file class.ilSCORMObject.php.

Referenced by getTitle().

ilSCORMObject::$type

Definition at line 37 of file class.ilSCORMObject.php.

Referenced by getType().


The documentation for this class was generated from the following file: