47    public function __construct($a_course_ref_id, $a_course_obj_id)
 
   55        $this->ref_id = $a_course_ref_id;
 
   56        $this->
id = $a_course_obj_id;
 
   70        $this->ref_id = $a_ref_id;
 
   78        return $this->start_objs ? $this->start_objs : array();
 
   93        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
   96        $ilLog->write(__METHOD__ . 
': Begin course start objects...');
 
   98        $new_obj_id = $ilObjDataCache->lookupObjId($a_target_id);
 
  101        include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
 
  103        $mappings = $cwo->getMappings();
 
  105            $item_ref_id = 
$data[
'item_ref_id'];
 
  106            if (isset($mappings[$item_ref_id]) and $mappings[$item_ref_id]) {
 
  107                $ilLog->write(__METHOD__ . 
': Clone start object nr. ' . $item_ref_id);
 
  108                $start->add($mappings[$item_ref_id]);
 
  110                $ilLog->write(__METHOD__ . 
': No mapping found for start object nr. ' . $item_ref_id);
 
  113        $ilLog->write(__METHOD__ . 
': ... end course start objects');
 
  117    public function delete($a_crs_start_id)
 
  123        $query = 
"DELETE FROM crs_start " .
 
  124            "WHERE crs_start_id = " . 
$ilDB->quote($a_crs_start_id, 
'integer') . 
" " .
 
  125            "AND crs_id = " . 
$ilDB->quote($this->
getId(), 
'integer') . 
" ";
 
  136        $query = 
"SELECT * FROM crs_start " .
 
  137            "WHERE crs_id = " . 
$ilDB->quote($this->
getId(), 
'integer') . 
" " .
 
  138            "AND item_ref_id = " . 
$ilDB->quote($a_item_ref_id, 
'integer') . 
" ";
 
  141        return $res->numRows() ? true : 
false;
 
  144    public function add($a_item_ref_id)
 
  150        if ($a_item_ref_id) {
 
  151            $next_id = 
$ilDB->nextId(
'crs_start');
 
  152            $query = 
"INSERT INTO crs_start (crs_start_id,crs_id,item_ref_id) " .
 
  154                $ilDB->quote($next_id, 
'integer') . 
", " .
 
  155                $ilDB->quote($this->
getId(), 
'integer') . 
", " .
 
  156                $ilDB->quote($a_item_ref_id, 
'integer') . 
" " .
 
  170        $query = 
"DELETE FROM crs_start " .
 
  171            "WHERE crs_id = " . 
$ilDB->quote($this->
getId(), 
'integer') . 
" ";
 
  179        include_once 
"Services/Object/classes/class.ilObjectActivation.php";
 
  181            switch ($node[
'type']) {
 
  186                    $poss_items[] = $node[
'ref_id'];
 
  190        return $poss_items ? $poss_items : array();
 
  196            if (!$this->
isFullfilled($user_id, $item[
'item_ref_id'])) {
 
  208        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
  210        include_once 
'./Modules/Course/classes/class.ilCourseLMHistory.php';
 
  212        $continue_data = $lm_continue->getLMHistory();
 
  214        $obj_id = $ilObjDataCache->lookupObjId($item_id);
 
  215        $type = $ilObjDataCache->lookupType($obj_id);
 
  219                include_once 
'./Modules/Test/classes/class.ilObjTestAccess.php';
 
  220                include_once 
'./Services/Conditions/classes/class.ilConditionHandler.php';
 
  232                include_once 
'Services/Tracking/classes/class.ilLPStatus.php';
 
  239                if (!isset($continue_data[$item_id])) {
 
  255        $this->start_objs = array();
 
  257        $query = 
"SELECT * FROM crs_start " .
 
  258            "WHERE crs_id = " . 
$ilDB->quote($this->
getId(), 
'integer') . 
" ";
 
  262            if (
$tree->isInTree($row->item_ref_id)) {
 
  263                $this->start_objs[$row->crs_start_id][
'item_ref_id'] = $row->item_ref_id;
 
  265                $this->
delete($row->item_ref_id);
 
An exception for terminatinating execution or to throw for unit testing.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
setRefId($a_ref_id)
set reference id @access public
getRefId()
get reference id @access public
__construct($a_course_ref_id, $a_course_obj_id)
Constructor @access public.
getId()
get object id @access public
isFullfilled($user_id, $item_id)
setId($a_id)
set object id @access public
cloneDependencies($a_target_id, $a_copy_id)
Clone dependencies.
static _hasUserCompleted($a_obj_id, $a_user_id)
Lookup user object completion.
static _lookupFinished($a_obj_id, $a_user_id="")
get finished status
static checkCondition($a_obj_id, $a_operator, $a_value, $a_usr_id)
check condition
static getItems($a_parent_id, $a_with_list_data=true)
Get sub item data.
foreach($_POST as $key=> $value) $res