SCORM Item. More...
Inheritance diagram for ilSCORMItem:
Collaboration diagram for ilSCORMItem:SCORM Item.
Definition at line 34 of file class.ilSCORMItem.php.
| ilSCORMItem::_getItems | ( | $ | a_obj_id | ) |
Definition at line 315 of file class.ilSCORMItem.php.
References $res.
| ilSCORMItem::_lookupTitle | ( | $ | a_obj_id | ) |
Definition at line 331 of file class.ilSCORMItem.php.
References $res.
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.
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;
parent::create();
$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;
parent::delete();
$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.
Referenced by create(), and update().
{
return $this->datafromlms;
}
Here is the caller graph for this function:| ilSCORMItem::getIdentifierRef | ( | ) |
Definition at line 69 of file class.ilSCORMItem.php.
Referenced by create(), and update().
{
return $this->identifierref;
}
Here is the caller graph for this function:| ilSCORMItem::getImportId | ( | ) |
Definition at line 59 of file class.ilSCORMItem.php.
Referenced by create(), and update().
{
return $this->import_id;
}
Here is the caller graph for this function:| ilSCORMItem::getMasteryScore | ( | ) |
Definition at line 149 of file class.ilSCORMItem.php.
Referenced by create(), and update().
{
return $this->masteryscore;
}
Here is the caller graph for this function:| ilSCORMItem::getMaxTimeAllowed | ( | ) |
Definition at line 119 of file class.ilSCORMItem.php.
Referenced by create(), and update().
{
return $this->maxtimeallowed;
}
Here is the caller graph for this function:| ilSCORMItem::getParameters | ( | ) |
Definition at line 89 of file class.ilSCORMItem.php.
Referenced by create(), and update().
{
return $this->parameters;
}
Here is the caller graph for this function:| ilSCORMItem::getPrereqType | ( | ) |
Definition at line 99 of file class.ilSCORMItem.php.
Referenced by create(), and update().
{
return $this->prereq_type;
}
Here is the caller graph for this function:| ilSCORMItem::getPrerequisites | ( | ) |
Definition at line 109 of file class.ilSCORMItem.php.
Referenced by create(), and update().
{
return $this->prerequisites;
}
Here is the caller graph for this function:| ilSCORMItem::getTimeLimitAction | ( | ) |
Definition at line 129 of file class.ilSCORMItem.php.
Referenced by create(), and update().
{
return $this->timelimitaction;
}
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 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.
Referenced by create(), and update().
{
return $this->isvisible;
}
Here is the caller graph for this function:| ilSCORMItem::ilSCORMItem | ( | $ | a_id = 0 |
) |
Constructor.
| int | $a_id Object ID public |
Definition at line 53 of file class.ilSCORMItem.php.
References ilSCORMObject::ilSCORMObject(), and ilSCORMObject::setType().
{
parent::ilSCORMObject($a_id);
$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 ilSCORMObject::getId(), setDataFromLms(), setIdentifierRef(), setImportId(), setMasteryScore(), setMaxTimeAllowed(), setParameters(), setPrereqType(), setPrerequisites(), setTimeLimitAction(), and setVisible().
{
global $ilDB;
parent::read();
$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";
parent::update();
$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:| ilSCORMItem::$datafromlms |
Definition at line 44 of file class.ilSCORMItem.php.
| ilSCORMItem::$identifierref |
Definition at line 37 of file class.ilSCORMItem.php.
| ilSCORMItem::$import_id |
Definition at line 36 of file class.ilSCORMItem.php.
| ilSCORMItem::$isvisible |
Definition at line 38 of file class.ilSCORMItem.php.
| ilSCORMItem::$masteryscore |
Definition at line 45 of file class.ilSCORMItem.php.
| ilSCORMItem::$maxtimeallowed |
Definition at line 42 of file class.ilSCORMItem.php.
| ilSCORMItem::$parameters |
Definition at line 39 of file class.ilSCORMItem.php.
| ilSCORMItem::$prereq_type |
Definition at line 40 of file class.ilSCORMItem.php.
| ilSCORMItem::$prerequisites |
Definition at line 41 of file class.ilSCORMItem.php.
| ilSCORMItem::$timelimitaction |
Definition at line 43 of file class.ilSCORMItem.php.
1.7.1