47    public function __construct($a_course_ref_id, $a_course_obj_id)
 
   53        $this->ref_id = $a_course_ref_id;
 
   54        $this->
id = $a_course_obj_id;
 
   68        $this->ref_id = $a_ref_id;
 
   76        return $this->start_objs ? $this->start_objs : array();
 
   89        global $ilObjDataCache,
$ilLog;
 
   91        $ilLog->write(__METHOD__ . 
': Begin course start objects...');
 
   93        $new_obj_id = $ilObjDataCache->lookupObjId($a_target_id);
 
   96        include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
 
   98        $mappings = $cwo->getMappings();
 
  100            $item_ref_id = 
$data[
'item_ref_id'];
 
  101            if (isset($mappings[$item_ref_id]) and $mappings[$item_ref_id]) {
 
  102                $ilLog->write(__METHOD__ . 
': Clone start object nr. ' . $item_ref_id);
 
  103                $start->add($mappings[$item_ref_id]);
 
  105                $ilLog->write(__METHOD__ . 
': No mapping found for start object nr. ' . $item_ref_id);
 
  108        $ilLog->write(__METHOD__ . 
': ... end course start objects');
 
  112    public function delete($a_crs_start_id)
 
  116        $query = 
"DELETE FROM crs_start " .
 
  117            "WHERE crs_start_id = " . 
$ilDB->quote($a_crs_start_id, 
'integer') . 
" " .
 
  118            "AND crs_id = " . 
$ilDB->quote($this->
getId(), 
'integer') . 
" ";
 
  127        $query = 
"SELECT * FROM crs_start " .
 
  128            "WHERE crs_id = " . 
$ilDB->quote($this->
getId(), 
'integer') . 
" " .
 
  129            "AND item_ref_id = " . $ilDB->quote($a_item_ref_id, 
'integer') . 
" ";
 
  132        return $res->numRows() ? true : 
false;
 
  135    public function add($a_item_ref_id)
 
  139        if ($a_item_ref_id) {
 
  140            $next_id = 
$ilDB->nextId(
'crs_start');
 
  141            $query = 
"INSERT INTO crs_start (crs_start_id,crs_id,item_ref_id) " .
 
  143                $ilDB->quote($next_id, 
'integer') . 
", " .
 
  144                $ilDB->quote($this->
getId(), 
'integer') . 
", " .
 
  145                $ilDB->quote($a_item_ref_id, 
'integer') . 
" " .
 
  157        $query = 
"DELETE FROM crs_start " .
 
  158            "WHERE crs_id = " . 
$ilDB->quote($this->
getId(), 
'integer') . 
" ";
 
  166        include_once 
"Services/Object/classes/class.ilObjectActivation.php";
 
  168            switch ($node[
'type']) {
 
  173                    $poss_items[] = $node[
'ref_id'];
 
  177        return $poss_items ? $poss_items : array();
 
  183            if (!$this->
isFullfilled($user_id, $item[
'item_ref_id'])) {
 
  193        global $ilObjDataCache;
 
  195        include_once 
'./Modules/Course/classes/class.ilCourseLMHistory.php';
 
  197        $continue_data = $lm_continue->getLMHistory();
 
  199        $obj_id = $ilObjDataCache->lookupObjId($item_id);
 
  200        $type = $ilObjDataCache->lookupType($obj_id);
 
  204                include_once 
'./Modules/Test/classes/class.ilObjTestAccess.php';
 
  205                include_once 
'./Services/AccessControl/classes/class.ilConditionHandler.php';
 
  212                include_once 
'./Modules/Survey/classes/class.ilObjSurveyAccess.php';
 
  218                include_once 
'Services/Tracking/classes/class.ilLPStatus.php';
 
  225                if (!isset($continue_data[$item_id])) {
 
  238        $this->start_objs = array();
 
  240        $query = 
"SELECT * FROM crs_start " .
 
  241            "WHERE crs_id = " . 
$ilDB->quote($this->
getId(), 
'integer') . 
" ";
 
  245            if (
$tree->isInTree(
$row->item_ref_id)) {
 
  246                $this->start_objs[
$row->crs_start_id][
'item_ref_id'] = 
$row->item_ref_id;
 
  248                $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