4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
15 public function __construct($a_parent_obj, $a_parent_cmd, $a_obj_course)
24 $this->lng->loadLanguageModule(
'crs');
26 parent::__construct($a_parent_obj, $a_parent_cmd);
29 $this->
addColumn($this->lng->txt(
'type'),
'type', 1);
30 $this->
addColumn($this->lng->txt(
'title'),
'title');
31 $this->
addColumn($this->lng->txt(
'description'),
'description');
34 if ($a_parent_cmd !=
'listStructure') {
35 $this->
setTitle($this->lng->txt(
'crs_select_starter'));
37 $this->
addMultiCommand(
'addStarter', $this->lng->txt(
'crs_add_starter'));
41 $this->
setTitle($this->lng->txt(
'crs_start_objects'));
46 $this->
setRowTemplate(
"tpl.crs_add_starter.html",
"Modules/Course");
47 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
56 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
57 $crs_start =
new ilCourseStart($a_obj_course->getRefId(), $a_obj_course->getId());
60 if ($a_parent_cmd !=
'listStructure') {
74 foreach ($crs_start->getPossibleStarters() as $item_ref_id) {
77 $data[$item_ref_id][
'id'] = $item_ref_id;
78 $data[$item_ref_id][
'title'] = $tmp_obj->getTitle();
79 $data[$item_ref_id][
'type'] = $this->lng->txt(
'obj_' . $tmp_obj->getType());
80 $data[$item_ref_id][
'icon'] = ilObject::_getIcon($tmp_obj->getId(),
'tiny');
82 if (strlen($tmp_obj->getDescription())) {
83 $data[$item_ref_id][
'description'] = $tmp_obj->getDescription();
92 $starters = $crs_start->getStartObjects();
102 foreach ($starters as $start_id => $item) {
105 $data[$item[
'item_ref_id']][
'id'] = $start_id;
106 $data[$item[
'item_ref_id']][
'title'] = $tmp_obj->getTitle();
107 $data[$item[
'item_ref_id']][
'type'] = $this->lng->txt(
'obj_' . $tmp_obj->getType());
108 $data[$item[
'item_ref_id']][
'icon'] = ilObject::_getIcon($tmp_obj->getId(),
'tiny');
110 if (strlen($tmp_obj->getDescription())) {
111 $data[$item[
'item_ref_id']][
'description'] = $tmp_obj->getDescription();
120 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
121 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
122 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
123 $this->tpl->setVariable(
"ICON_SRC", $a_set[
"icon"]);
124 $this->tpl->setVariable(
"ICON_ALT", $a_set[
"type"]);
__construct($a_parent_obj, $a_parent_cmd, $a_obj_course)
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
getStartObjects($a_obj_course, $crs_start)
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
getPossibleObjects($a_obj_course, $crs_start)