5 require_once(
"./Modules/ScormAicc/classes/SCORM/class.ilSCORMObject.php");
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;
146 $obj_set = $ilDB->queryF(
'SELECT * FROM sc_item WHERE obj_id = %s',
147 array(
'integer'),array($this->
getId()));
148 $obj_rec = $ilDB->fetchAssoc($obj_set);
152 if (strtolower($obj_rec[
"isvisible"]) ==
"false")
175 $str_visible = ($this->
getVisible()) ?
'true' :
'false';
177 $ilDB->insert(
'sc_item', array(
178 'obj_id' => array(
'integer', $this->
getId()),
179 'import_id' => array(
'text', $this->
getImportId()),
181 'isvisible' => array(
'text', $str_visible),
198 $str_visible = ($this->
getVisible()) ?
'true' :
'false';
200 $ilDB->update(
'sc_item',
202 'import_id' => array(
'text', $this->
getImportId()),
204 'isvisible' => array(
'text', $str_visible),
214 'obj_id' => array(
'integer', $this->
getId())
230 $a_user_id = $ilUser->getId();
233 $track_set = $ilDB->queryF(
'
234 SELECT lvalue, rvalue FROM scorm_tracking
238 array(
'integer',
'integer',
'integer'),
243 while ($track_rec = $ilDB->fetchAssoc($track_set))
245 $trdata[$track_rec[
"lvalue"]] = $track_rec[
"rvalue"];
257 $a_user_id = $ilUser->getId();
260 $track_set = $ilDB->queryF(
'
261 SELECT lvalue, rvalue FROM scorm_tracking
265 array(
'integer',
'integer',
'integer'),
266 array($a_item_id, $a_user_id, $a_obj_id)
270 while ($track_rec = $ilDB->fetchAssoc($track_set))
272 $trdata[$track_rec[
"lvalue"]] = $track_rec[
"rvalue"];
285 'DELETE FROM sc_item WHERE obj_id = %s',
287 array($this->
getId())
290 $ilLog->write(
"SAHS Delete(ScormItem): ".
291 'DELETE FROM scorm_tracking WHERE sco_id = '.$this->
getId().
' AND obj_id = '.$this->
getSLMId());
293 'DELETE FROM scorm_tracking WHERE sco_id = %s AND obj_id = %s',
294 array(
'integer',
'integer'),
298 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
305 require_once(
"./Modules/ScormAicc/classes/SCORM/class.ilObjSCORMTracking.php");
315 $res = $ilDB->queryF(
'
316 SELECT obj_id FROM scorm_object
319 array(
'integer',
'text'),
320 array($a_obj_id,
'sit')
322 while(
$row = $ilDB->fetchObject(
$res))
324 $item_ids[] =
$row->obj_id;
326 return $item_ids ? $item_ids : array();
333 $res = $ilDB->queryF(
334 'SELECT title FROM scorm_object WHERE obj_id = %s',
339 while(
$row = $ilDB->fetchObject(
$res))