ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSCORMItem Class Reference

SCORM Item. More...

+ Inheritance diagram for ilSCORMItem:
+ Collaboration diagram for ilSCORMItem:

Public Member Functions

 ilSCORMItem ($a_id=0)
 Constructor.
 getImportId ()
 setImportId ($a_import_id)
 getIdentifierRef ()
 setIdentifierRef ($a_id_ref)
 getVisible ()
 setVisible ($a_visible)
 getParameters ()
 setParameters ($a_par)
 getPrereqType ()
 setPrereqType ($a_p_type)
 getPrerequisites ()
 setPrerequisites ($a_pre)
 getMaxTimeAllowed ()
 setMaxTimeAllowed ($a_max)
 getTimeLimitAction ()
 setTimeLimitAction ($a_lim_act)
 getDataFromLms ()
 setDataFromLms ($a_data)
 getMasteryScore ()
 setMasteryScore ($a_score)
 read ()
 create ()
 Create database record for SCORM object.
 update ()
 Updates database record for SCORM object.
 getTrackingDataOfUser ($a_user_id=0)
 get tracking data of specified or current user
 _lookupTrackingDataOfUser ($a_item_id, $a_user_id=0, $a_obj_id=0)
 delete ()
 insertTrackData ($a_lval, $a_rval, $a_obj_id)
 _getItems ($a_obj_id)
 _lookupTitle ($a_obj_id)
- Public Member Functions inherited from ilSCORMObject
 ilSCORMObject ($a_id=0)
 Constructor.
 getId ()
 setId ($a_id)
 getType ()
 setType ($a_type)
 getTitle ()
 setTitle ($a_title)
 getSLMId ()
 setSLMId ($a_slm_id)
 _lookupPresentableItems ($a_slm_id)
 Count number of presentable SCOs/Assets of SCORM learning module.
_getInstance ($a_id, $a_slm_id)
 get instance of specialized GUI class

Data Fields

 $import_id
 $identifierref
 $isvisible
 $parameters
 $prereq_type
 $prerequisites
 $maxtimeallowed
 $timelimitaction
 $datafromlms
 $masteryscore
- Data Fields inherited from ilSCORMObject
 $id
 $title
 $type
 $slm_id

Detailed Description

SCORM Item.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilSCORMItem.php 21316 2009-08-27 13:03:07Z mjansen

Definition at line 34 of file class.ilSCORMItem.php.

Member Function Documentation

ilSCORMItem::_getItems (   $a_obj_id)

Definition at line 327 of file class.ilSCORMItem.php.

References $ilDB, $res, and $row.

{
global $ilDB;
$res = $ilDB->queryF('
SELECT obj_id FROM scorm_object
WHERE slm_id = %s
AND c_type = %s',
array('integer', 'text'),
array($a_obj_id, 'sit')
);
while($row = $ilDB->fetchObject($res))
{
$item_ids[] = $row->obj_id;
}
return $item_ids ? $item_ids : array();
}
ilSCORMItem::_lookupTitle (   $a_obj_id)

Definition at line 345 of file class.ilSCORMItem.php.

References $ilDB, $res, and $row.

Referenced by ilLPStatusSCORM\_getStatusInfo().

{
global $ilDB;
$res = $ilDB->queryF(
'SELECT title FROM scorm_object WHERE obj_id = %s',
array('integer'),
array($a_obj_id)
);
while($row = $ilDB->fetchObject($res))
{
return $row->title;
}
return '';
}

+ Here is the caller graph for this function:

ilSCORMItem::_lookupTrackingDataOfUser (   $a_item_id,
  $a_user_id = 0,
  $a_obj_id = 0 
)

Definition at line 270 of file class.ilSCORMItem.php.

References $ilDB.

Referenced by ilSCORMExplorer\getOutputIcons().

{
global $ilDB, $ilUser;
if ($a_user_id == 0)
{
$a_user_id = $ilUser->getId();
}
$track_set = $ilDB->queryF('
SELECT lvalue, rvalue FROM scorm_tracking
WHERE sco_id = %s
AND user_id = %s
AND obj_id = %s',
array('integer', 'integer', 'integer'),
array($a_item_id, $a_user_id, $a_obj_id)
);
$trdata = array();
while ($track_rec = $ilDB->fetchAssoc($track_set))
{
$trdata[$track_rec["lvalue"]] = $track_rec["rvalue"];
}
return $trdata;
}

+ Here is the caller graph for this function:

ilSCORMItem::create ( )

Create database record for SCORM object.

Reimplemented from ilSCORMObject.

Definition at line 188 of file class.ilSCORMItem.php.

References $ilDB, getDataFromLms(), ilSCORMObject\getId(), getIdentifierRef(), getImportId(), getMasteryScore(), getMaxTimeAllowed(), getParameters(), getPrereqType(), getPrerequisites(), getTimeLimitAction(), and getVisible().

{
global $ilDB;
$str_visible = ($this->getVisible()) ? 'true' : 'false';
$ilDB->insert('sc_item', array(
'obj_id' => array('integer', $this->getId()),
'import_id' => array('text', $this->getImportId()),
'identifierref' => array('text', $this->getIdentifierRef()),
'isvisible' => array('text', $str_visible),
'parameters' => array('text', $this->getParameters()),
'prereq_type' => array('text', $this->getPrereqType()),
'prerequisites' => array('text', $this->getPrerequisites()),
'maxtimeallowed' => array('text', $this->getMaxTimeAllowed()),
'timelimitaction' => array('text', $this->getTimeLimitAction()),
'datafromlms' => array('clob', $this->getDataFromLms()),
'masteryscore' => array('text', $this->getMasteryScore())
));
}

+ Here is the call graph for this function:

ilSCORMItem::delete ( )

Reimplemented from ilSCORMObject.

Definition at line 297 of file class.ilSCORMItem.php.

References $ilDB, $ilLog, ilSCORMObject\getId(), and ilSCORMObject\getSLMId().

{
global $ilDB, $ilLog;
$ilDB->manipulateF(
'DELETE FROM sc_item WHERE obj_id = %s',
array('integer'),
array($this->getId())
);
$ilLog->write("SAHS Delete(ScormItem): ".
'DELETE FROM scorm_tracking WHERE sco_id = '.$this->getId().' AND obj_id = '.$this->getSLMId());
$ilDB->manipulateF(
'DELETE FROM scorm_tracking WHERE sco_id = %s AND obj_id = %s',
array('integer', 'integer'),
array($this->getId(), $this->getSLMId())
);
}

+ Here is the call graph for this function:

ilSCORMItem::getDataFromLms ( )

Definition at line 139 of file class.ilSCORMItem.php.

References $datafromlms.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilSCORMItem::getIdentifierRef ( )

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

References $identifierref.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilSCORMItem::getImportId ( )

Definition at line 59 of file class.ilSCORMItem.php.

References $import_id.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilSCORMItem::getMasteryScore ( )

Definition at line 149 of file class.ilSCORMItem.php.

References $masteryscore.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilSCORMItem::getMaxTimeAllowed ( )

Definition at line 119 of file class.ilSCORMItem.php.

References $maxtimeallowed.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilSCORMItem::getParameters ( )

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

References $parameters.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilSCORMItem::getPrereqType ( )

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

References $prereq_type.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilSCORMItem::getPrerequisites ( )

Definition at line 109 of file class.ilSCORMItem.php.

References $prerequisites.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilSCORMItem::getTimeLimitAction ( )

Definition at line 129 of file class.ilSCORMItem.php.

References $timelimitaction.

Referenced by create(), and update().

+ Here is the caller graph for this function:

ilSCORMItem::getTrackingDataOfUser (   $a_user_id = 0)

get tracking data of specified or current user

Definition at line 243 of file class.ilSCORMItem.php.

References $ilDB, ilSCORMObject\getId(), and ilSCORMObject\getSLMId().

{
global $ilDB, $ilUser;
if ($a_user_id == 0)
{
$a_user_id = $ilUser->getId();
}
$track_set = $ilDB->queryF('
SELECT lvalue, rvalue FROM scorm_tracking
WHERE sco_id = %s
AND user_id = %s
AND obj_id = %s',
array('integer', 'integer', 'integer'),
array($this->getId(), $a_user_id, $this->getSLMId())
);
$trdata = array();
while ($track_rec = $ilDB->fetchAssoc($track_set))
{
$trdata[$track_rec["lvalue"]] = $track_rec["rvalue"];
}
return $trdata;
}

+ Here is the call graph for this function:

ilSCORMItem::getVisible ( )

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

References $isvisible.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilSCORMItem::ilSCORMItem (   $a_id = 0)

Constructor.

Parameters
int$a_idObject ID public

Definition at line 53 of file class.ilSCORMItem.php.

References ilSCORMObject\ilSCORMObject(), and ilSCORMObject\setType().

{
$this->setType("sit");
}

+ Here is the call graph for this function:

ilSCORMItem::insertTrackData (   $a_lval,
  $a_rval,
  $a_obj_id 
)

Definition at line 319 of file class.ilSCORMItem.php.

References ilObjSCORMTracking\_insertTrackData(), and ilSCORMObject\getId().

{
require_once("./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
//ilObjSCORMTracking::_insertTrackData($this->getId(), $a_lval, $a_rval, $a_ref_id);
ilObjSCORMTracking::_insertTrackData($this->getId(), $a_lval, $a_rval, $a_obj_id);
}

+ Here is the call graph for this function:

ilSCORMItem::read ( )

Reimplemented from ilSCORMObject.

Definition at line 159 of file class.ilSCORMItem.php.

References $ilDB, ilSCORMObject\getId(), setDataFromLms(), setIdentifierRef(), setImportId(), setMasteryScore(), setMaxTimeAllowed(), setParameters(), setPrereqType(), setPrerequisites(), setTimeLimitAction(), and setVisible().

{
global $ilDB;
$obj_set = $ilDB->queryF('SELECT * FROM sc_item WHERE obj_id = %s',
array('integer'),array($this->getId()));
$obj_rec = $ilDB->fetchAssoc($obj_set);
$this->setImportId($obj_rec["import_id"]);
$this->setIdentifierRef($obj_rec["identifierref"]);
if (strtolower($obj_rec["isvisible"]) == "false")
{
$this->setVisible(false);
}
else
{
$this->setVisible(true);
}
$this->setParameters($obj_rec["parameters"]);
$this->setPrereqType($obj_rec["prereq_type"]);
$this->setPrerequisites($obj_rec["prerequisites"]);
$this->setMaxTimeAllowed($obj_rec["maxtimeallowed"]);
$this->setTimeLimitAction($obj_rec["timelimitaction"]);
$this->setDataFromLms($obj_rec["datafromlms"]);
$this->setMasteryScore($obj_rec["masteryscore"]);
}

+ Here is the call graph for this function:

ilSCORMItem::setDataFromLms (   $a_data)

Definition at line 144 of file class.ilSCORMItem.php.

Referenced by read().

{
$this->datafromlms = $a_data;
}

+ Here is the caller graph for this function:

ilSCORMItem::setIdentifierRef (   $a_id_ref)

Definition at line 74 of file class.ilSCORMItem.php.

Referenced by read().

{
$this->identifierref = $a_id_ref;
}

+ Here is the caller graph for this function:

ilSCORMItem::setImportId (   $a_import_id)

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

Referenced by read().

{
$this->import_id = $a_import_id;
}

+ Here is the caller graph for this function:

ilSCORMItem::setMasteryScore (   $a_score)

Definition at line 154 of file class.ilSCORMItem.php.

Referenced by read().

{
$this->masteryscore = $a_score;
}

+ Here is the caller graph for this function:

ilSCORMItem::setMaxTimeAllowed (   $a_max)

Definition at line 124 of file class.ilSCORMItem.php.

Referenced by read().

{
$this->maxtimeallowed = $a_max;
}

+ Here is the caller graph for this function:

ilSCORMItem::setParameters (   $a_par)

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

Referenced by read().

{
$this->parameters = $a_par;
}

+ Here is the caller graph for this function:

ilSCORMItem::setPrereqType (   $a_p_type)

Definition at line 104 of file class.ilSCORMItem.php.

Referenced by read().

{
$this->prereq_type = $a_p_type;
}

+ Here is the caller graph for this function:

ilSCORMItem::setPrerequisites (   $a_pre)

Definition at line 114 of file class.ilSCORMItem.php.

Referenced by read().

{
$this->prerequisites = $a_pre;
}

+ Here is the caller graph for this function:

ilSCORMItem::setTimeLimitAction (   $a_lim_act)

Definition at line 134 of file class.ilSCORMItem.php.

Referenced by read().

{
$this->timelimitaction = $a_lim_act;
}

+ Here is the caller graph for this function:

ilSCORMItem::setVisible (   $a_visible)

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

Referenced by read().

{
$this->isvisible = $a_visible;
}

+ Here is the caller graph for this function:

ilSCORMItem::update ( )

Updates database record for SCORM object.

Reimplemented from ilSCORMObject.

Definition at line 211 of file class.ilSCORMItem.php.

References $ilDB, getDataFromLms(), ilSCORMObject\getId(), getIdentifierRef(), getImportId(), getMasteryScore(), getMaxTimeAllowed(), getParameters(), getPrereqType(), getPrerequisites(), getTimeLimitAction(), and getVisible().

{
global $ilDB;
$str_visible = ($this->getVisible()) ? 'true' : 'false';
$ilDB->update('sc_item',
array(
'import_id' => array('text', $this->getImportId()),
'identifierref' => array('text', $this->getIdentifierRef()),
'isvisible' => array('text', $str_visible),
'parameters' => array('text', $this->getParameters()),
'prereq_type' => array('text', $this->getPrereqType()),
'prerequisites' => array('text', $this->getPrerequisites()),
'maxtimeallowed' => array('text', $this->getMaxTimeAllowed()),
'timelimitaction' => array('text', $this->getTimeLimitAction()),
'datafromlms' => array('clob', $this->getDataFromLms()),
'masteryscore' => array('text', $this->getMasteryScore())
),
array(
'obj_id' => array('integer', $this->getId())
)
);
}

+ Here is the call graph for this function:

Field Documentation

ilSCORMItem::$datafromlms

Definition at line 44 of file class.ilSCORMItem.php.

Referenced by getDataFromLms().

ilSCORMItem::$identifierref

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

Referenced by getIdentifierRef().

ilSCORMItem::$import_id

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

Referenced by getImportId().

ilSCORMItem::$isvisible

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

Referenced by getVisible().

ilSCORMItem::$masteryscore

Definition at line 45 of file class.ilSCORMItem.php.

Referenced by getMasteryScore().

ilSCORMItem::$maxtimeallowed

Definition at line 42 of file class.ilSCORMItem.php.

Referenced by getMaxTimeAllowed().

ilSCORMItem::$parameters

Definition at line 39 of file class.ilSCORMItem.php.

Referenced by getParameters().

ilSCORMItem::$prereq_type

Definition at line 40 of file class.ilSCORMItem.php.

Referenced by getPrereqType().

ilSCORMItem::$prerequisites

Definition at line 41 of file class.ilSCORMItem.php.

Referenced by getPrerequisites().

ilSCORMItem::$timelimitaction

Definition at line 43 of file class.ilSCORMItem.php.

Referenced by getTimeLimitAction().


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