3 declare(strict_types=1);
    58         $this->import_id = $a_import_id;
    68         $this->identifierref = $a_id_ref;
    78         $this->isvisible = $a_visible;
    88         $this->parameters = $a_par;
    98         $this->prereq_type = $a_p_type;
   108         $this->prerequisites = $a_pre;
   118         $this->maxtimeallowed = $a_max;
   128         $this->timelimitaction = $a_lim_act;
   138         $this->datafromlms = $a_data;
   148         $this->masteryscore = $a_score;
   154         $ilDB = $DIC->database();
   158         $obj_set = 
$ilDB->queryF(
   159             'SELECT * FROM sc_item WHERE obj_id = %s',
   161             array($this->
getId())
   163         $obj_rec = 
$ilDB->fetchAssoc($obj_set);
   164         $this->
setImportId((
string) $obj_rec[
"import_id"]);
   166         if (strtolower((
string) $obj_rec[
"isvisible"]) === 
"false") {
   183         $ilDB = $DIC->database();
   187         $str_visible = ($this->
getVisible()) ? 
'true' : 
'false';
   189         $ilDB->insert(
'sc_item', array(
   190             'obj_id' => array(
'integer', $this->
getId()),
   191             'import_id' => array(
'text', $this->
getImportId()),
   193             'isvisible' => array(
'text', $str_visible),
   207         $ilDB = $DIC->database();
   211         $str_visible = ($this->
getVisible()) ? 
'true' : 
'false';
   216                 'import_id' => array(
'text', $this->
getImportId()),
   218                 'isvisible' => array(
'text', $str_visible),
   228                 'obj_id' => array(
'integer', $this->
getId())
   241         $ilDB = $DIC->database();
   242         $ilUser = $DIC->user();
   244         if ($a_user_id == 0) {
   245             $a_user_id = $ilUser->getId();
   248         $track_set = 
$ilDB->queryF(
   250                         SELECT lvalue, rvalue FROM scorm_tracking    254             array(
'integer', 
'integer', 
'integer'),
   259         while ($track_rec = 
$ilDB->fetchAssoc($track_set)) {
   260             $trdata[$track_rec[
"lvalue"]] = $track_rec[
"rvalue"];
   272         $ilDB = $DIC->database();
   273         $ilUser = $DIC->user();
   275         if ($a_user_id == 0) {
   276             $a_user_id = $ilUser->getId();
   279         $track_set = 
$ilDB->queryF(
   281                         SELECT lvalue, rvalue FROM scorm_tracking    285             array(
'integer', 
'integer', 
'integer'),
   286             array($a_item_id, $a_user_id, $a_obj_id)
   290         while ($track_rec = 
$ilDB->fetchAssoc($track_set)) {
   291             $trdata[$track_rec[
"lvalue"]] = $track_rec[
"rvalue"];
   297     public function delete(): 
void   300         $ilDB = $DIC->database();
   306             'DELETE FROM sc_item WHERE obj_id = %s',
   308             array($this->
getId())
   311         $ilLog->write(
"SAHS Delete(ScormItem): " .
   312             'DELETE FROM scorm_tracking WHERE sco_id = ' . $this->
getId() . 
' AND obj_id = ' . $this->
getSLMId());
   314             'DELETE FROM scorm_tracking WHERE sco_id = %s AND obj_id = %s',
   315             array(
'integer', 
'integer'),
   333         $ilDB = $DIC->database();
   338                         SELECT obj_id FROM scorm_object    341             array(
'integer', 
'text'),
   342             array($a_obj_id, 
'sit')
   344         while ($row = 
$ilDB->fetchObject(
$res)) {
   345             $item_ids[] = $row->obj_id;
   353         $ilDB = $DIC->database();
   356             'SELECT title FROM scorm_object WHERE obj_id = %s',
   361         while ($row = 
$ilDB->fetchObject(
$res)) {
 
setPrerequisites(?string $a_pre)
 
static getLogger(string $a_component_id)
Get component logger. 
 
static _getItems(int $a_obj_id)
 
getTrackingDataOfUser(int $a_user_id=0)
get tracking data of specified or current user 
 
setMaxTimeAllowed(?string $a_max)
 
static _insertTrackData(int $a_sahs_id, string $a_lval, string $a_rval, int $a_obj_id)
 
setVisible(bool $a_visible)
 
insertTrackData(string $a_lval, string $a_rval, int $a_obj_id)
 
static _lookupTrackingDataOfUser(int $a_item_id, int $a_user_id=0, int $a_obj_id=0)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _lookupTitle(int $a_obj_id)
 
setMasteryScore(?string $a_score)
 
static _refreshStatus(int $a_obj_id, ?array $a_users=null)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setTimeLimitAction(?string $a_lim_act)
 
setParameters(?string $a_par)
 
setDataFromLms(?string $a_data)
 
setIdentifierRef(string $a_id_ref)
 
setPrereqType(?string $a_p_type)
 
setImportId(string $a_import_id)