4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
15 public function __construct($a_parent_obj, $a_parent_cmd, $a_obj_course)
21 $this->lng->loadLanguageModule(
'crs');
26 $this->
addColumn($this->lng->txt(
'title'),
'title');
27 $this->
addColumn($this->lng->txt(
'description'),
'description');
30 if($a_parent_cmd !=
'listStructure')
32 $this->
setTitle($this->lng->txt(
'crs_select_starter'));
34 $this->
addMultiCommand(
'addStarter', $this->lng->txt(
'crs_add_starter'));
39 $this->
setTitle($this->lng->txt(
'crs_edit_start_objects'));
44 $this->
setRowTemplate(
"tpl.crs_add_starter.html",
"Modules/Course");
45 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
55 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
56 $crs_start =
new ilCourseStart($a_obj_course->getRefId(), $a_obj_course->getId());
59 if($a_parent_cmd !=
'listStructure')
74 $a_obj_course->initCourseItemObject();
77 foreach($crs_start->getPossibleStarters($a_obj_course->items_obj) as $item_ref_id)
81 $data[$item_ref_id][
'id'] = $item_ref_id;
82 $data[$item_ref_id][
'title'] = $tmp_obj->getTitle();
84 if(strlen($tmp_obj->getDescription()))
86 $data[$item_ref_id][
'description'] = $tmp_obj->getDescription();
95 $starters = $crs_start->getStartObjects();
103 foreach($starters as $start_id => $item)
107 $data[$item[
'item_ref_id']][
'id'] = $start_id;
108 $data[$item[
'item_ref_id']][
'title'] = $tmp_obj->getTitle();
110 if(strlen($tmp_obj->getDescription()))
112 $data[$item[
'item_ref_id']][
'description'] = $tmp_obj->getDescription();
121 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
122 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
123 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);