55 $this->lng->loadLanguageModule(
'event');
56 $this->lng->loadLanguageModule(
'crs');
58 $this->course_ref_id = $a_crs_ref_id;
60 $this->members_obj = $a_members;
72 $next_class = $this->ctrl->getNextClass($this);
73 $cmd = $this->ctrl->getCmd();
75 switch ($next_class) {
78 $cmd =
"listSessions";
95 if (!
$GLOBALS[
'DIC']->access()->checkRbacOrPositionPermissionAccess(
'manage_members',
'manage_members', $this->course_ref_id)) {
96 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'), $ilErr->MESSAGE);
99 $ilToolbar->addButton(
100 $this->lng->txt(
'event_csv_export'),
101 $this->ctrl->getLinkTarget($this,
'exportCSV')
104 include_once
'Modules/Session/classes/class.ilSessionOverviewTableGUI.php';
106 $part = $this->members_obj->getParticipants();
107 $part =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
110 $this->course_ref_id,
115 $this->tpl->setContent(
$tbl->getHTML());
127 global $tree,$ilAccess;
129 include_once(
'Services/Utilities/classes/class.ilCSVWriter.php');
130 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
132 $part =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
135 $this->course_ref_id,
136 $this->members_obj->getParticipants()
141 foreach ($tree->getSubtree($tree->getNodeData($this->course_ref_id),
false,
'sess') as $event_id) {
143 if (!is_object($tmp_event) or !$ilAccess->checkAccess(
'write',
'', $event_id)) {
146 $events[] = $tmp_event;
150 $this->csv->addColumn($this->lng->txt(
"lastname"));
151 $this->csv->addColumn($this->lng->txt(
"firstname"));
152 $this->csv->addColumn($this->lng->txt(
"login"));
154 foreach ($events as $event_obj) {
156 $this->csv->addColumn($event_obj->getTitle() .
' (' . $event_obj->getFirstAppointment()->appointmentToString() .
')');
159 $this->csv->addRow();
161 foreach ($members as $user_id) {
164 $this->csv->addColumn(
$name[
'lastname']);
165 $this->csv->addColumn(
$name[
'firstname']);
168 foreach ($events as $event_obj) {
171 $this->csv->addColumn($event_part->hasParticipated($user_id) ?
172 $this->lng->txt(
'event_participated') :
173 $this->lng->txt(
'event_not_participated'));
176 $this->csv->addRow();
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
Helper class to generate CSV files.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
__construct($a_crs_ref_id, ilParticipants $a_members)
constructor
Table presentation for session overview.
static _sortIds($a_ids, $a_table, $a_field, $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname.
static _lookupObjId($a_id)
exportCSV()
Events List CSV Export.
Create styles array
The data for the language used.
listSessions()
list sessions of all user
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
executeCommand()
ecxecute command