5 require_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMObject.php");
36 parent::__construct($a_id);
47 $this->import_id = $a_import_id;
57 $this->identifierref = $a_id_ref;
67 $this->isvisible = $a_visible;
77 $this->parameters = $a_par;
87 $this->prereq_type = $a_p_type;
97 $this->prerequisites = $a_pre;
107 $this->maxtimeallowed = $a_max;
117 $this->timelimitaction = $a_lim_act;
127 $this->datafromlms = $a_data;
137 $this->masteryscore = $a_score;
143 $ilDB = $DIC[
'ilDB'];
147 $obj_set =
$ilDB->queryF(
148 'SELECT * FROM sc_item WHERE obj_id = %s',
150 array($this->
getId())
152 $obj_rec =
$ilDB->fetchAssoc($obj_set);
156 if (strtolower($obj_rec[
"isvisible"]) ==
"false") {
173 $ilDB = $DIC[
'ilDB'];
177 $str_visible = ($this->
getVisible()) ?
'true' :
'false';
179 $ilDB->insert(
'sc_item', array(
180 'obj_id' => array(
'integer', $this->
getId()),
181 'import_id' => array(
'text', $this->
getImportId()),
183 'isvisible' => array(
'text', $str_visible),
197 $ilDB = $DIC[
'ilDB'];
201 $str_visible = ($this->
getVisible()) ?
'true' :
'false';
206 'import_id' => array(
'text', $this->
getImportId()),
208 'isvisible' => array(
'text', $str_visible),
218 'obj_id' => array(
'integer', $this->
getId())
231 $ilDB = $DIC[
'ilDB'];
234 if ($a_user_id == 0) {
238 $track_set =
$ilDB->queryF(
240 SELECT lvalue, rvalue FROM scorm_tracking 244 array(
'integer',
'integer',
'integer'),
249 while ($track_rec =
$ilDB->fetchAssoc($track_set)) {
250 $trdata[$track_rec[
"lvalue"]] = $track_rec[
"rvalue"];
259 $ilDB = $DIC[
'ilDB'];
262 if ($a_user_id == 0) {
266 $track_set =
$ilDB->queryF(
268 SELECT lvalue, rvalue FROM scorm_tracking 272 array(
'integer',
'integer',
'integer'),
273 array($a_item_id, $a_user_id, $a_obj_id)
277 while ($track_rec =
$ilDB->fetchAssoc($track_set)) {
278 $trdata[$track_rec[
"lvalue"]] = $track_rec[
"rvalue"];
284 public function delete()
287 $ilDB = $DIC[
'ilDB'];
293 'DELETE FROM sc_item WHERE obj_id = %s',
295 array($this->
getId())
298 $ilLog->write(
"SAHS Delete(ScormItem): " .
299 'DELETE FROM scorm_tracking WHERE sco_id = ' . $this->
getId() .
' AND obj_id = ' . $this->
getSLMId());
301 'DELETE FROM scorm_tracking WHERE sco_id = %s AND obj_id = %s',
302 array(
'integer',
'integer'),
306 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
313 require_once(
"./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
322 $ilDB = $DIC[
'ilDB'];
326 SELECT obj_id FROM scorm_object 329 array(
'integer',
'text'),
330 array($a_obj_id,
'sit')
333 $item_ids[] =
$row->obj_id;
335 return $item_ids ? $item_ids : array();
341 $ilDB = $DIC[
'ilDB'];
344 'SELECT title FROM scorm_object WHERE obj_id = %s',
setTimeLimitAction($a_lim_act)
static _getItems($a_obj_id)
setMasteryScore($a_score)
static _refreshStatus($a_obj_id, $a_users=null)
Set dirty.
__construct($a_id=0)
Constructor.
static _lookupTitle($a_obj_id)
foreach($_POST as $key=> $value) $res
Parent object for all SCORM objects, that are stored in table scorm_object.
setImportId($a_import_id)
static _insertTrackData($a_sahs_id, $a_lval, $a_rval, $a_obj_id)
update($pash, $contents, Config $config)
setIdentifierRef($a_id_ref)
insertTrackData($a_lval, $a_rval, $a_obj_id)
getTrackingDataOfUser($a_user_id=0)
get tracking data of specified or current user
static _lookupTrackingDataOfUser($a_item_id, $a_user_id=0, $a_obj_id=0)
setMaxTimeAllowed($a_max)