59 $this->lng->loadLanguageModule(
'event');
60 $this->lng->loadLanguageModule(
'crs');
62 $this->course_ref_id = $a_crs_ref_id;
64 $this->members_obj = $a_members;
76 $next_class = $this->ctrl->getNextClass($this);
77 $cmd = $this->ctrl->getCmd();
79 switch ($next_class) {
82 $cmd =
"listSessions";
99 $ilToolbar = $DIC[
'ilToolbar'];
102 if (!
$GLOBALS[
'DIC']->access()->checkRbacOrPositionPermissionAccess(
'manage_members',
'manage_members', $this->course_ref_id)) {
103 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),
$ilErr->MESSAGE);
106 $ilToolbar->addButton(
107 $this->lng->txt(
'event_csv_export'),
108 $this->ctrl->getLinkTarget($this,
'exportCSV')
111 include_once
'Modules/Session/classes/class.ilSessionOverviewTableGUI.php';
113 $part = $this->members_obj->getParticipants();
114 $part =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
117 $this->course_ref_id,
122 $this->tpl->setContent(
$tbl->getHTML());
136 $tree = $DIC[
'tree'];
137 $ilAccess = $DIC[
'ilAccess'];
139 include_once(
'Services/Utilities/classes/class.ilCSVWriter.php');
140 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
142 $part =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
145 $this->course_ref_id,
146 $this->members_obj->getParticipants()
151 foreach (
$tree->getSubtree(
$tree->getNodeData($this->course_ref_id),
false,
'sess') as $event_id) {
153 if (!is_object($tmp_event)
or !$ilAccess->checkAccess(
'manage_members',
'', $event_id)) {
160 $this->csv->addColumn($this->lng->txt(
"lastname"));
161 $this->csv->addColumn($this->lng->txt(
"firstname"));
162 $this->csv->addColumn($this->lng->txt(
"login"));
164 foreach (
$events as $event_obj) {
166 $this->csv->addColumn($event_obj->getTitle() .
' (' . $event_obj->getFirstAppointment()->appointmentToString() .
')');
169 $this->csv->addRow();
171 foreach ($members as $user_id) {
174 $this->csv->addColumn(
$name[
'lastname']);
175 $this->csv->addColumn(
$name[
'firstname']);
178 foreach (
$events as $event_obj) {
181 $this->csv->addColumn($event_part->hasParticipated($user_id) ?
182 $this->lng->txt(
'event_participated') :
183 $this->lng->txt(
'event_not_participated'));
186 $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.
__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.
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
executeCommand()
ecxecute command
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.