4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
15 public function __construct($a_parent_obj, $a_parent_cmd, $a_content_obj)
22 parent::__construct($a_parent_obj, $a_parent_cmd);
25 $this->lng->loadLanguageModule(
$type);
28 $this->
addColumn($this->lng->txt(
'title'),
'title');
29 $this->
addColumn($this->lng->txt(
'description'),
'description');
30 $this->
addColumn($this->lng->txt(
'unambiguousness'),
'unique');
31 $this->
addColumn($this->lng->txt(
'groupings_assigned_obj_' .
$type),
'assigned');
35 $this->
setTitle($this->lng->txt(
'groupings'));
41 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
54 foreach ($items as $grouping_id) {
57 $data[$grouping_id][
'id'] = $grouping_id;
58 $data[$grouping_id][
'title'] = $tmp_obj->getTitle();
59 $data[$grouping_id][
'unique'] = $this->lng->txt($tmp_obj->getUniqueField());
62 if (strlen($tmp_obj->getDescription())) {
63 $data[$grouping_id][
'description'] = $tmp_obj->getDescription();
67 $assigned_items = $tmp_obj->getAssignedItems();
68 foreach ($assigned_items as $condition) {
78 if (count($a_set[
"assigned"])) {
79 foreach ($a_set[
"assigned"] as $item) {
80 $this->tpl->setCurrentBlock(
"assigned");
81 $this->tpl->setVariable(
"ITEM_TITLE", $item);
82 $this->tpl->parseCurrentBlock();
85 $this->tpl->setCurrentBlock(
"assigned");
86 $this->tpl->setVariable(
"ITEM_TITLE", $this->lng->txt(
'crs_grp_no_courses_assigned'));
87 $this->tpl->parseCurrentBlock();
90 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
91 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
92 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
93 $this->tpl->setVariable(
"TXT_UNIQUE", $a_set[
"unique"]);
95 $this->ctrl->setParameter($this->parent_obj,
'obj_id', $a_set[
"id"]);
96 $this->tpl->setVariable(
98 $this->ctrl->getLinkTarget($this->parent_obj,
'edit')
100 $this->tpl->setVariable(
'TXT_EDIT', $this->lng->txt(
'edit'));
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static _lookupTitle($a_id)
lookup object title
static _getVisibleGroupings($a_obj_id)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
__construct($a_parent_obj, $a_parent_cmd, $a_content_obj)
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.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.