Definition at line 35 of file class.ilSCORMItem.php.
ilSCORMItem::_getItems | ( | $ | a_obj_id | ) |
Definition at line 303 of file class.ilSCORMItem.php.
ilSCORMItem::_lookupTitle | ( | $ | a_obj_id | ) |
Definition at line 319 of file class.ilSCORMItem.php.
References $query, $res, and $row.
Referenced by ilLPStatusSCORM::_getStatusInfo().
{ global $ilDB; $query = "SELECT * FROM scorm_object ". "WHERE obj_id = '".$a_obj_id."'"; $res = $ilDB->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { return $row->title; } return ''; }
ilSCORMItem::_lookupTrackingDataOfUser | ( | $ | a_item_id, | |
$ | a_user_id = 0 | |||
) |
Definition at line 256 of file class.ilSCORMItem.php.
References $q.
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 = '".$a_item_id."' AND ". "user_id = '".$a_user_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; }
ilSCORMItem::create | ( | ) |
Create database record for SCORM object.
Reimplemented from ilSCORMObject.
Definition at line 187 of file class.ilSCORMItem.php.
References $q, getDataFromLms(), getIdentifierRef(), getImportId(), getMasteryScore(), getMaxTimeAllowed(), getPrereqType(), getTimeLimitAction(), and getVisible().
{ 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 ". "('".$this->getId()."', '".$this->getImportId()."','".$this->getIdentifierRef(). "','$str_visible','".$this->getParameters()."','".$this->getPrereqType(). "','".$this->getPrerequisites()."','".$this->getMaxTimeAllowed()."','". $this->getTimeLimitAction()."','".$this->getDataFromLms()."','". $this->getMasteryScore()."')"; $this->ilias->db->query($q); }
ilSCORMItem::delete | ( | ) |
Reimplemented from ilSCORMObject.
Definition at line 279 of file class.ilSCORMItem.php.
References $q, and ilSCORMObject::getId().
{ global $ilDB; 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()); $ilDB->query($q); }
ilSCORMItem::getDataFromLms | ( | ) |
Definition at line 140 of file class.ilSCORMItem.php.
Referenced by create().
{
return $this->datafromlms;
}
ilSCORMItem::getIdentifierRef | ( | ) |
Definition at line 70 of file class.ilSCORMItem.php.
Referenced by create().
{
return $this->identifierref;
}
ilSCORMItem::getImportId | ( | ) |
Definition at line 60 of file class.ilSCORMItem.php.
Referenced by create().
{
return $this->import_id;
}
ilSCORMItem::getMasteryScore | ( | ) |
Definition at line 150 of file class.ilSCORMItem.php.
Referenced by create().
{
return $this->masteryscore;
}
ilSCORMItem::getMaxTimeAllowed | ( | ) |
Definition at line 120 of file class.ilSCORMItem.php.
Referenced by create().
{
return $this->maxtimeallowed;
}
ilSCORMItem::getParameters | ( | ) |
Definition at line 90 of file class.ilSCORMItem.php.
{
return $this->parameters;
}
ilSCORMItem::getPrereqType | ( | ) |
Definition at line 100 of file class.ilSCORMItem.php.
Referenced by create().
{
return $this->prereq_type;
}
ilSCORMItem::getPrerequisites | ( | ) |
Definition at line 110 of file class.ilSCORMItem.php.
{
return $this->prerequisites;
}
ilSCORMItem::getTimeLimitAction | ( | ) |
Definition at line 130 of file class.ilSCORMItem.php.
Referenced by create().
{
return $this->timelimitaction;
}
ilSCORMItem::getTrackingDataOfUser | ( | $ | a_user_id = 0 |
) |
get tracking data of specified or current user
Definition at line 233 of file class.ilSCORMItem.php.
References $q.
{ global $ilDB, $ilUser; if ($a_user_id == 0) { $a_user_id = $ilUser->getId(); } $q = "SELECT * FROM scorm_tracking WHERE ". "sco_id = '".$this->getId()."' AND ". "user_id = '".$a_user_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; }
ilSCORMItem::getVisible | ( | ) |
Definition at line 80 of file class.ilSCORMItem.php.
Referenced by create(), and update().
{
return $this->isvisible;
}
ilSCORMItem::ilSCORMItem | ( | $ | a_id = 0 |
) |
Constructor.
int | $a_id Object ID public |
Definition at line 54 of file class.ilSCORMItem.php.
References ilSCORMObject::ilSCORMObject(), and ilSCORMObject::setType().
{ parent::ilSCORMObject($a_id); $this->setType("sit"); }
ilSCORMItem::insertTrackData | ( | $ | a_lval, | |
$ | a_rval, | |||
$ | a_obj_id | |||
) |
Definition at line 295 of file class.ilSCORMItem.php.
References ilObjSCORMTracking::_insertTrackData(), and ilSCORMObject::getId().
{ require_once("content/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); }
ilSCORMItem::read | ( | ) |
Reimplemented from ilSCORMObject.
Definition at line 160 of file class.ilSCORMItem.php.
References $q, setDataFromLms(), setIdentifierRef(), setImportId(), setMasteryScore(), setMaxTimeAllowed(), setParameters(), setPrereqType(), setPrerequisites(), setTimeLimitAction(), and setVisible().
{ parent::read(); $q = "SELECT * FROM sc_item WHERE obj_id = '".$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"]); }
ilSCORMItem::setDataFromLms | ( | $ | a_data | ) |
Definition at line 145 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->datafromlms = $a_data; }
ilSCORMItem::setIdentifierRef | ( | $ | a_id_ref | ) |
Definition at line 75 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->identifierref = $a_id_ref; }
ilSCORMItem::setImportId | ( | $ | a_import_id | ) |
Definition at line 65 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->import_id = $a_import_id; }
ilSCORMItem::setMasteryScore | ( | $ | a_score | ) |
Definition at line 155 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->masteryscore = $a_score; }
ilSCORMItem::setMaxTimeAllowed | ( | $ | a_max | ) |
Definition at line 125 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->maxtimeallowed = $a_max; }
ilSCORMItem::setParameters | ( | $ | a_par | ) |
Definition at line 95 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->parameters = $a_par; }
ilSCORMItem::setPrereqType | ( | $ | a_p_type | ) |
Definition at line 105 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->prereq_type = $a_p_type; }
ilSCORMItem::setPrerequisites | ( | $ | a_pre | ) |
Definition at line 115 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->prerequisites = $a_pre; }
ilSCORMItem::setTimeLimitAction | ( | $ | a_lim_act | ) |
Definition at line 135 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->timelimitaction = $a_lim_act; }
ilSCORMItem::setVisible | ( | $ | a_visible | ) |
Definition at line 85 of file class.ilSCORMItem.php.
Referenced by read().
{ $this->isvisible = $a_visible; }
ilSCORMItem::update | ( | ) |
Updates database record for SCORM object.
Reimplemented from ilSCORMObject.
Definition at line 206 of file class.ilSCORMItem.php.
References $q, and getVisible().
{ $str_visible = ($this->getVisible()) ? "true" : "false"; parent::update(); $q = "UPDATE sc_item SET ". "import_id = '".$this->getImportId()."', ". "identifierref = '".$this->getIdentifierRef()."', ". "isvisible = '".$str_visible."', ". "parameters = '".$this->getParameters()."', ". "prereq_type = '".$this->getPrereqType()."', ". "prerequisites = '".$this->getPrerequisites()."', ". "maxtimeallowed = '".$this->getMaxTimeAllowed()."', ". "timelimitaction = '".$this->getTimeLimitAction()."', ". "datafromlms = '".$this->getDataFromLms()."', ". "masteryscore = '".$this->getMasteryScore()."' ". "WHERE obj_id = '".$this->getId()."'"; $this->ilias->db->query($q); }
ilSCORMItem::$datafromlms |
Definition at line 45 of file class.ilSCORMItem.php.
ilSCORMItem::$identifierref |
Definition at line 38 of file class.ilSCORMItem.php.
ilSCORMItem::$import_id |
Definition at line 37 of file class.ilSCORMItem.php.
ilSCORMItem::$isvisible |
Definition at line 39 of file class.ilSCORMItem.php.
ilSCORMItem::$masteryscore |
Definition at line 46 of file class.ilSCORMItem.php.
ilSCORMItem::$maxtimeallowed |
Definition at line 43 of file class.ilSCORMItem.php.
ilSCORMItem::$parameters |
Definition at line 40 of file class.ilSCORMItem.php.
ilSCORMItem::$prereq_type |
Definition at line 41 of file class.ilSCORMItem.php.
ilSCORMItem::$prerequisites |
Definition at line 42 of file class.ilSCORMItem.php.
ilSCORMItem::$timelimitaction |
Definition at line 44 of file class.ilSCORMItem.php.