3 declare(strict_types=0);
30 $this->
lng->loadLanguageModule(
$type);
34 $this->
addColumn($this->
lng->txt(
'description'),
'description');
35 $this->
addColumn($this->
lng->txt(
'unambiguousness'),
'unique');
36 $this->
addColumn($this->
lng->txt(
'groupings_assigned_obj_' .
$type),
'assigned_sortable');
58 foreach ($items as $grouping_id) {
61 $data[$grouping_id][
'id'] = $grouping_id;
62 $data[$grouping_id][
'source_ref_id'] = $tmp_obj->getContainerRefId();
63 $data[$grouping_id][
'assigned'] = [];
64 $data[$grouping_id][
'title'] = $tmp_obj->getTitle();
65 $data[$grouping_id][
'unique'] = $this->
lng->txt($tmp_obj->getUniqueField());
66 $data[$grouping_id][
'description'] = $tmp_obj->getDescription();
69 $assigned_items = $tmp_obj->getAssignedItems();
70 $data[$grouping_id][
'assigned'] = [];
71 foreach ($assigned_items as $condition) {
74 $data[$grouping_id][
'assigned_sortable'] = implode(
' ', $data[$grouping_id][
'assigned']);
80 protected function fillRow(array $a_set): void
82 if (is_array($a_set[
"assigned"]) && count($a_set[
"assigned"]) > 0) {
83 foreach ($a_set[
"assigned"] as $item) {
84 $this->tpl->setCurrentBlock(
"assigned");
85 $this->tpl->setVariable(
"ITEM_TITLE", $item);
86 $this->tpl->parseCurrentBlock();
89 $this->tpl->setCurrentBlock(
"assigned");
90 $this->tpl->setVariable(
"ITEM_TITLE", $this->
lng->txt(
'crs_grp_no_courses_assigned'));
91 $this->tpl->parseCurrentBlock();
94 if (array_key_exists(
'source_ref_id', $a_set) && $a_set[
'source_ref_id']) {
95 $path = new \ilPathGUI();
96 $path->enableHideLeaf(
false);
97 $path->enableTextOnly(
false);
98 $path->setUseImages(
true);
100 $this->tpl->setCurrentBlock(
'path');
101 $this->tpl->setVariable(
'OBJ_PATH',
$path->getPath(
ROOT_FOLDER_ID, (
int) $a_set[
'source_ref_id']));
102 $this->tpl->parseCurrentBlock();
105 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
106 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
107 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
108 $this->tpl->setVariable(
"TXT_UNIQUE", $a_set[
"unique"]);
110 $this->
ctrl->setParameter($this->parent_obj,
'obj_id', $a_set[
"id"]);
111 $this->tpl->setVariable(
113 $this->
ctrl->getLinkTarget($this->parent_obj,
'edit')
115 $this->tpl->setVariable(
'TXT_EDIT', $this->
lng->txt(
'edit'));
setFormAction(string $a_form_action, bool $a_multipart=false)
static _getVisibleGroupings(int $a_obj_id)
Returns a list of all groupings for which the current user hast write permission on all assigned obje...
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
static _lookupTitle(int $obj_id)
setDefaultOrderField(string $a_defaultorderfield)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(object $a_parent_obj, string $a_parent_cmd, ilObject $a_content_obj)
getItems(ilObject $a_content_obj)
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
static _lookupType(int $id, bool $reference=false)
addMultiCommand(string $a_cmd, string $a_text)