20declare(strict_types=1);
44 public function __construct(
object $a_parent_obj,
string $a_parent_cmd,
int $a_crs_ref_id, array $a_members)
48 $this->ui_factory =
$DIC->ui()->factory();
49 $this->renderer =
$DIC->ui()->renderer();
51 $this->tree =
$DIC->repositoryTree();
52 $this->
access = $DIC->access();
54 $this->
setId(
'sessov');
66 foreach ($this->events as $idx => $event_obj) {
69 if (trim($event_obj->getTitle())) {
70 $tt[] = $event_obj->getTitle();
72 if (trim($event_obj->getDescription())) {
73 $tt[] = $event_obj->getDescription();
75 if (trim($event_obj->getLocation())) {
76 $tt[] = $this->
lng->txt(
"event_location") .
': ' . $event_obj->getLocation();
78 $tt[] = $this->
lng->txt(
"event_date_time") .
': ' . $event_obj->getFirstAppointment()->appointmentToString();
81 if (
sizeof($this->events) <= 4) {
82 $caption = $event_obj->getFirstAppointment()->appointmentToString();
83 if (
sizeof($tt) == 1) {
91 $tt = implode(
"<br />\n", $tt);
93 $this->
addColumn((
string) $caption,
'event_' . $event_obj->getId(),
'',
false,
'', $tt,
true);
99 $this->
setRowTemplate(
'tpl.sess_list_row.html',
'Modules/Session');
101 $this->
getItems($this->events, $a_members);
112 if (!is_object($tmp_event) ||
113 !$ilAccess->checkAccess(
'manage_members',
'', $event_id)) {
117 $events[$tmp_event->getFirstAppointment()->getStartingTime() .
'_' . $tmp_event->getId()] = $tmp_event;
124 protected function getItems(array $a_events, array $a_members): void
127 foreach ($a_members as $user_id) {
129 $data[$user_id] = array(
130 'name' =>
$name[
'lastname'] .
', ' .
$name[
'firstname'],
131 'login' =>
$name[
'login']
134 foreach ($a_events as $event_obj) {
136 foreach ($a_members as $user_id) {
137 if (array_key_exists($user_id, $users_of_event)) {
138 $data[$user_id][
'event_' . $event_obj->getId()] =
true;
140 $data[$user_id][
'event_' . $event_obj->getId()] =
false;
147 protected function fillRow(array $a_set): void
149 $this->tpl->setVariable(
'NAME', $a_set[
'name']);
150 $this->tpl->setVariable(
'LOGIN', $a_set[
'login']);
152 $this->tpl->setCurrentBlock(
'eventcols');
153 foreach ($this->events as $event_obj) {
154 if ($a_set[
'event_' . $event_obj->getId()]) {
157 $icon = $this->ui_factory->symbol()->icon()->custom(
ilUtil::getImagePath(
'icon_not_ok.svg'), $this->
lng->txt(
'event_not_participated'));
159 $this->tpl->setVariable(
"IMAGE_PARTICIPATED", $this->renderer->render(
$icon));
160 $this->tpl->parseCurrentBlock();
static _getParticipated(int $a_event_id)
static _lookupName(int $a_user_id)
lookup user name
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc