19declare(strict_types=1);
43 public function __construct(
object $a_parent_obj,
string $a_parent_cmd,
int $a_crs_ref_id, array $a_members)
47 $this->ui_factory =
$DIC->ui()->factory();
48 $this->
renderer = $DIC->ui()->renderer();
50 $this->tree =
$DIC->repositoryTree();
51 $this->
access = $DIC->access();
53 $this->
setId(
'sessov');
65 foreach ($this->events as $idx => $event_obj) {
68 if (trim($event_obj->getTitle())) {
69 $tt[] = $event_obj->getTitle();
71 if (trim($event_obj->getDescription())) {
72 $tt[] = $event_obj->getDescription();
74 if (trim($event_obj->getLocation())) {
75 $tt[] = $this->
lng->txt(
"event_location") .
': ' . $event_obj->getLocation();
77 $tt[] = $this->
lng->txt(
"event_date_time") .
': ' . $event_obj->getFirstAppointment()->appointmentToString();
80 if (
sizeof($this->events) <= 4) {
81 $caption = $event_obj->getFirstAppointment()->appointmentToString();
82 if (
sizeof($tt) == 1) {
90 $tt = implode(
"<br />\n", $tt);
92 $this->
addColumn((
string) $caption,
'event_' . $event_obj->getId(),
'',
false,
'', $tt,
true);
98 $this->
setRowTemplate(
'tpl.sess_list_row.html',
'components/ILIAS/Session');
100 $this->
getItems($this->events, $a_members);
111 if (!is_object($tmp_event) ||
112 !$ilAccess->checkAccess(
'manage_members',
'', $event_id)) {
116 $events[$tmp_event->getFirstAppointment()->getStartingTime() .
'_' . $tmp_event->getId()] = $tmp_event;
123 protected function getItems(array $a_events, array $a_members): void
129 'name' => $name[
'lastname'] .
', ' . $name[
'firstname'],
130 'login' => $name[
'login']
133 foreach ($a_events as $event_obj) {
136 if (array_key_exists(
$user_id, $users_of_event)) {
146 protected function fillRow(array $a_set): void
148 $this->tpl->setVariable(
'NAME', $a_set[
'name']);
149 $this->tpl->setVariable(
'LOGIN', $a_set[
'login']);
151 $this->tpl->setCurrentBlock(
'eventcols');
152 foreach ($this->events as $event_obj) {
153 if ($a_set[
'event_' . $event_obj->getId()]) {
154 $icon = $this->ui_factory->symbol()->icon()->custom(
ilUtil::getImagePath(
'standard/icon_ok.svg'), $this->
lng->txt(
'event_participated'));
156 $icon = $this->ui_factory->symbol()->icon()->custom(
ilUtil::getImagePath(
'standard/icon_not_ok.svg'), $this->
lng->txt(
'event_not_participated'));
158 $this->tpl->setVariable(
"IMAGE_PARTICIPATED", $this->
renderer->render(
$icon));
159 $this->tpl->parseCurrentBlock();
static _getParticipated(int $a_event_id)
static _lookupName(int $a_user_id)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
Table presentation for session overview.
gatherEvents(int $a_crs_ref_id)
__construct(object $a_parent_obj, string $a_parent_cmd, int $a_crs_ref_id, array $a_members)
getItems(array $a_events, array $a_members)
fillRow(array $a_set)
Standard Version of Fill Row.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc