ILIAS  Release_3_10_x_branch Revision 61812
 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 15697 2008-01-08 20:04:33Z hschottm

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

Member Function Documentation

ilSCORMItem::_getItems (   $a_obj_id)

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

References $res, and DB_FETCHMODE_OBJECT.

{
global $ilDB;
$query = "SELECT * FROM scorm_object ".
"WHERE slm_id = ".$ilDB->quote($a_obj_id)." ".
"AND type = 'sit'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$item_ids[] = $row->obj_id;
}
return $item_ids ? $item_ids : array();
}
ilSCORMItem::_lookupTitle (   $a_obj_id)

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

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilLPStatusSCORM\_getStatusInfo().

{
global $ilDB;
$query = "SELECT * FROM scorm_object ".
"WHERE obj_id = ".$ilDB->quote($a_obj_id);
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
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 265 of file class.ilSCORMItem.php.

References DB_FETCHMODE_ASSOC.

Referenced by ilSCORMExplorer\getOutputIcons().

{
global $ilDB, $ilUser;
if ($a_user_id == 0)
{
$a_user_id = $ilUser->getId();
}
$q = "SELECT * FROM scorm_tracking WHERE ".
"sco_id = ".$ilDB->quote($a_item_id)." AND ".
"user_id = ".$ilDB->quote($a_user_id).
" AND obj_id = ".$ilDB->quote($a_obj_id);
$track_set = $ilDB->query($q);
$trdata = array();
while ($track_rec = $track_set->fetchRow(DB_FETCHMODE_ASSOC))
{
$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 getDataFromLms(), ilSCORMObject\getId(), getIdentifierRef(), getImportId(), getMasteryScore(), getMaxTimeAllowed(), getParameters(), getPrereqType(), getPrerequisites(), getTimeLimitAction(), and getVisible().

{
global $ilDB;
$str_visible = ($this->getVisible())
? "true"
: "false";
$q = "INSERT INTO sc_item (obj_id, import_id, identifierref,".
"isvisible, parameters, prereq_type, prerequisites, maxtimeallowed,".
"timelimitaction, datafromlms, masteryscore) VALUES ".
"(".$ilDB->quote($this->getId()).", ".$ilDB->quote($this->getImportId()).",".
$ilDB->quote($this->getIdentifierRef()).
",".$ilDB->quote($str_visible).",".$ilDB->quote($this->getParameters()).",".
$ilDB->quote($this->getPrereqType()).
",".$ilDB->quote($this->getPrerequisites()).",".$ilDB->quote($this->getMaxTimeAllowed()).
",".
$ilDB->quote($this->getTimeLimitAction()).",".$ilDB->quote($this->getDataFromLms()).",".
$ilDB->quote($this->getMasteryScore()).")";
$this->ilias->db->query($q);
}

+ Here is the call graph for this function:

ilSCORMItem::delete ( )

Reimplemented from ilSCORMObject.

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

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

{
global $ilDB, $ilLog;
$q = "DELETE FROM sc_item WHERE obj_id =".$ilDB->quote($this->getId());
$ilDB->query($q);
$q = "DELETE FROM scorm_tracking WHERE ".
"sco_id = ".$ilDB->quote($this->getId()).
" AND obj_id = ".$ilDB->quote($this->getSLMId());
$ilLog->write("SAHS Delete(ScormItem): ".$q);
$ilDB->query($q);
}

+ 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 241 of file class.ilSCORMItem.php.

References DB_FETCHMODE_ASSOC, ilSCORMObject\getId(), and ilSCORMObject\getSLMId().

{
global $ilDB, $ilUser;
if ($a_user_id == 0)
{
$a_user_id = $ilUser->getId();
}
$q = "SELECT * FROM scorm_tracking WHERE ".
"sco_id = ".$ilDB->quote($this->getId())." AND ".
"user_id = ".$ilDB->quote($a_user_id).
" AND obj_id = ".$ilDB->quote($this->getSLMId());
$track_set = $ilDB->query($q);
$trdata = array();
while ($track_rec = $track_set->fetchRow(DB_FETCHMODE_ASSOC))
{
$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 307 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 DB_FETCHMODE_ASSOC, ilSCORMObject\getId(), setDataFromLms(), setIdentifierRef(), setImportId(), setMasteryScore(), setMaxTimeAllowed(), setParameters(), setPrereqType(), setPrerequisites(), setTimeLimitAction(), and setVisible().

{
global $ilDB;
$q = "SELECT * FROM sc_item WHERE obj_id = ".$ilDB->quote($this->getId());
$obj_set = $this->ilias->db->query($q);
$obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);
$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 212 of file class.ilSCORMItem.php.

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

{
global $ilDB;
$str_visible = ($this->getVisible())
? "true"
: "false";
$q = "UPDATE sc_item SET ".
"import_id = ".$ilDB->quote($this->getImportId()).", ".
"identifierref = ".$ilDB->quote($this->getIdentifierRef()).", ".
"isvisible = ".$ilDB->quote($str_visible).", ".
"parameters = ".$ilDB->quote($this->getParameters()).", ".
"prereq_type = ".$ilDB->quote($this->getPrereqType()).", ".
"prerequisites = ".$ilDB->quote($this->getPrerequisites()).", ".
"maxtimeallowed = ".$ilDB->quote($this->getMaxTimeAllowed()).", ".
"timelimitaction = ".$ilDB->quote($this->getTimeLimitAction()).", ".
"datafromlms = ".$ilDB->quote($this->getDataFromLms()).", ".
"masteryscore = ".$ilDB->quote($this->getMasteryScore())." ".
"WHERE obj_id = ".$ilDB->quote($this->getId());
$this->ilias->db->query($q);
}

+ 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: