3 declare(strict_types=0);
    34     public function __construct($a_course_ref_id, $a_course_obj_id)
    38         $this->db = $DIC->database();
    40         $this->
logger = $DIC->logger()->crs();
    42         $this->ref_id = $a_course_ref_id;
    43         $this->
id = $a_course_obj_id;
    47     public function setId(
int $a_id): void
    59         $this->ref_id = $a_ref_id;
    74         $this->
logger->debug(
'Begin course start objects...');
    80         $mappings = $cwo->getMappings();
    82             $item_ref_id = $data[
'item_ref_id'];
    83             if (isset($mappings[$item_ref_id]) && $mappings[$item_ref_id]) {
    84                 $this->
logger->debug(
'Clone start object nr. ' . $item_ref_id);
    85                 $start->add($mappings[$item_ref_id]);
    87                 $this->
logger->debug(
'No mapping found for start object nr. ' . $item_ref_id);
    90         $this->
logger->debug(
'... end course start objects');
    93     public function delete(
int $a_crs_start_id): 
void    95         $query = 
"DELETE FROM crs_start " .
    96             "WHERE crs_start_id = " . $this->db->quote($a_crs_start_id, 
'integer') . 
" " .
    97             "AND crs_id = " . $this->db->quote($this->
getId(), 
'integer') . 
" ";
    98         $res = $this->db->manipulate($query);
   101     public function exists(
int $a_item_ref_id): bool
   103         $query = 
"SELECT * FROM crs_start " .
   104             "WHERE crs_id = " . $this->db->quote($this->
getId(), 
'integer') . 
" " .
   105             "AND item_ref_id = " . $this->db->quote($a_item_ref_id, 
'integer') . 
" ";
   106         $res = $this->db->query($query);
   107         return (
bool) 
$res->numRows();
   110     public function add(
int $a_item_ref_id): void
   112         if ($a_item_ref_id) {
   113             $next_id = $this->db->nextId(
'crs_start');
   114             $query = 
"INSERT INTO crs_start (crs_start_id,crs_id,item_ref_id) " .
   116                 $this->db->quote($next_id, 
'integer') . 
", " .
   117                 $this->db->quote($this->
getId(), 
'integer') . 
", " .
   118                 $this->db->quote($a_item_ref_id, 
'integer') . 
" " .
   120             $res = $this->db->manipulate($query);
   128             switch ($node[
'type']) {
   133                     $poss_items[] = $node[
'ref_id'];
   143             if (!$this->
isFullfilled($user_id, $item[
'item_ref_id'])) {
   153         $continue_data = $lm_continue->getLMHistory();
   177                 if (!isset($continue_data[$item_id])) {
   186         $this->start_objs = array();
   187         $query = 
"SELECT * FROM crs_start " .
   188             "WHERE crs_id = " . $this->db->quote($this->
getId(), 
'integer') . 
" ";
   189         $res = $this->db->query($query);
   191             if ($this->tree->isInTree((
int) $row->item_ref_id)) {
   192                 $this->start_objs[(
int) $row->crs_start_id][
'item_ref_id'] = (
int) $row->item_ref_id;
   194                 $this->
delete((
int) $row->item_ref_id);
 
static _hasUserCompleted(int $a_obj_id, int $a_user_id)
Lookup user object completion. 
 
static _lookupFinished(int $a_obj_id, int $a_user_id=0)
get finished status 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getItems(int $parent_id, bool $with_list_data=true)
Get sub item data. 
 
isFullfilled(int $user_id, int $item_id)
 
__construct($a_course_ref_id, $a_course_obj_id)
 
static checkCondition(int $a_trigger_obj_id, string $a_operator, string $a_value, int $a_usr_id)
check condition 
 
ilObjectDataCache $objectDataCache
 
cloneDependencies(int $a_target_id, int $a_copy_id)
 
static _getInstance(int $a_copy_id)
 
exists(int $a_item_ref_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...