4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
16 public function __construct($a_parent_obj, $a_parent_cmd, $a_crs_ref_id,
array $a_members)
18 $this->
setId(
'sessov');
20 parent::__construct($a_parent_obj, $a_parent_cmd);
22 $this->
setTitle($this->lng->txt(
'event_overview'));
24 $this->
addColumn($this->lng->txt(
'name'),
'name');
25 $this->
addColumn($this->lng->txt(
'login'),
'login');
28 foreach ($this->events as $idx => $event_obj) {
31 if (trim($event_obj->getTitle())) {
32 $tt[] = $event_obj->getTitle();
34 if (trim($event_obj->getDescription())) {
35 $tt[] = $event_obj->getDescription();
37 if (trim($event_obj->getLocation())) {
38 $tt[] = $this->lng->txt(
"event_location") .
': ' . $event_obj->getLocation();
40 $tt[] = $this->lng->txt(
"event_date_time") .
': ' . $event_obj->getFirstAppointment()->appointmentToString();
43 if (
sizeof($this->events) <= 4) {
44 $caption = $event_obj->getFirstAppointment()->appointmentToString();
45 if (
sizeof($tt) == 1) {
53 $tt = implode(
"<br />\n", $tt);
55 $this->
addColumn($caption,
'event_' . $event_obj->getId(),
'',
false,
'', $tt,
true);
61 $this->
setRowTemplate(
'tpl.sess_list_row.html',
'Modules/Session');
63 $this->
getItems($this->events, $a_members);
68 global $tree, $ilAccess;
71 foreach ($tree->getSubtree($tree->getNodeData($a_crs_ref_id),
false,
'sess') as $event_id) {
73 if (!is_object($tmp_event) ||
74 !$ilAccess->checkAccess(
'write',
'', $event_id)) {
78 $events[$tmp_event->getFirstAppointment()->getStartingTime() .
'_' . $tmp_event->getId()] = $tmp_event;
89 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
91 foreach ($a_members as $user_id) {
94 'name' =>
$name[
'lastname'] .
', ' .
$name[
'firstname'],
95 'login' => $name[
'login']
98 foreach ($a_events as $event_obj) {
100 $data[$user_id][
'event_' . $event_obj->getId()] = $event_part->hasParticipated($user_id);
109 $this->tpl->setVariable(
'NAME', $a_set[
'name']);
110 $this->tpl->setVariable(
'LOGIN', $a_set[
'login']);
112 $this->tpl->setCurrentBlock(
'eventcols');
113 foreach ($this->events as $event_obj) {
114 if ((
bool) $a_set[
'event_' . $event_obj->getId()]) {
116 $this->tpl->setVariable(
"PARTICIPATED", $this->lng->txt(
'event_participated'));
119 $this->tpl->setVariable(
"PARTICIPATED", $this->lng->txt(
'event_not_participated'));
121 $this->tpl->parseCurrentBlock();
static _lookupName($a_user_id)
lookup user name
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
getItems(array $a_events, array $a_members)
Table presentation for session overview.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
__construct($a_parent_obj, $a_parent_cmd, $a_crs_ref_id, array $a_members)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
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
gatherEvents($a_crs_ref_id)