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();
 
   80                                         $cmd = 
"listSessions";
 
   97                 if(!$ilAccess->checkAccess(
'write',
'',$this->course_ref_id))
 
   99                         $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
 
  102                 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_list.html',
'Modules/Session');
 
  103                 $this->tpl->addBlockfile(
"BUTTONS", 
"buttons", 
"tpl.buttons.html");
 
  106                 $this->tpl->setCurrentBlock(
"btn_cell");
 
  107                 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTarget($this,
'exportCSV'));
 
  108                 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
'event_csv_export'));
 
  109                 $this->tpl->parseCurrentBlock();
 
  111                 include_once 
'Modules/Session/classes/class.ilEventParticipants.php';
 
  113                 $this->tpl->addBlockfile(
"EVENTS_TABLE",
"events_table", 
"tpl.table.html");
 
  114                 $this->tpl->addBlockfile(
'TBL_CONTENT',
'tbl_content',
'tpl.sess_list_row.html',
'Modules/Session');
 
  116                 $members = $this->members_obj->getParticipants();
 
  121                 $tbl->setTitle($this->lng->txt(
"event_overview"),
 
  123                                            $this->lng->txt(
'obj_usr'));
 
  124                 $this->ctrl->setParameter($this,
'offset',(
int) 
$_GET[
'offset']);        
 
  127                 foreach($tree->getSubtree($tree->getNodeData($this->course_ref_id),
false,
'sess') as $event_id)
 
  130                         if(!is_object($tmp_event) or !$ilAccess->checkAccess(
'write',
'',$event_id)) 
 
  134                         $events[] = $tmp_event;
 
  137                 $headerNames = array();
 
  138                 $headerVars = array();
 
  141                 $headerNames[] = $this->lng->txt(
'name');               
 
  142                 $headerVars[] = 
"name";         
 
  145                 for ($i = 1; $i <= count($events); $i++)
 
  148                         $headerVars[] = 
"event_".$i;
 
  149                         $colWidth[] = 80/count($events).
"%";    
 
  152                 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
  153                 $tbl->setHeaderNames($headerNames);
 
  154                 $tbl->setHeaderVars($headerVars, $this->ctrl->getParameterArray($this,
'listSessions'));
 
  155                 $tbl->setColumnWidth($colWidth);                
 
  157                 $tbl->setOrderColumn($_GET[
"sort_by"]);
 
  158                 $tbl->setOrderDirection($_GET[
"sort_order"]);
 
  159                 $tbl->setOffset($_GET[
"offset"]);                               
 
  160                 $tbl->setLimit($ilUser->getPref(
"hits_per_page"));
 
  161                 $tbl->setMaxCount(count($members));
 
  162                 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
 
  164                 $sliced_users = array_slice($members,$_GET[
'offset'],
$_SESSION[
'tbl_limit']);
 
  165                 $tbl->disable(
'sort');
 
  169                 foreach($sliced_users as $user_id)
 
  171                         foreach($events as $event_obj)
 
  173                                 $this->tpl->setCurrentBlock(
"eventcols");
 
  178                                         $this->tpl->setVariable(
"IMAGE_PARTICIPATED", $event_part->hasParticipated($user_id) ? 
 
  182                                         $this->tpl->setVariable(
"PARTICIPATED", $event_part->hasParticipated($user_id) ?
 
  183                                                                                 $this->lng->txt(
'event_participated') :
 
  184                                                                                 $this->lng->txt(
'event_not_participated'));
 
  187                                 $this->tpl->parseCurrentBlock();                                
 
  190                         $this->tpl->setCurrentBlock(
"tbl_content");
 
  193                         $this->tpl->setVariable(
"LASTNAME",$name[
'lastname']);
 
  194                         $this->tpl->setVariable(
"FIRSTNAME",$name[
'firstname']);
 
  196                         $this->tpl->parseCurrentBlock();                        
 
  199                 $this->tpl->setVariable(
"HEAD_TXT_LEGEND", $this->lng->txt(
"legend"));          
 
  200                 $this->tpl->setVariable(
"HEAD_TXT_DIGIT", $this->lng->txt(
"event_digit"));
 
  201                 $this->tpl->setVariable(
"HEAD_TXT_EVENT", $this->lng->txt(
"event"));
 
  202                 $this->tpl->setVariable(
"HEAD_TXT_LOCATION", $this->lng->txt(
"event_location"));
 
  203                 $this->tpl->setVariable(
"HEAD_TXT_DATE_TIME",$this->lng->txt(
"event_date_time"));
 
  205                 foreach($events as $event_obj)
 
  207                         $this->tpl->setCurrentBlock(
"legend_loop");
 
  208                         $this->tpl->setVariable(
"LEGEND_CSS_ROW",
ilUtil::switchColor($counter++,
'tblrow1',
'tblrow2'));
 
  209                         $this->tpl->setVariable(
"LEGEND_DIGIT", $i++);
 
  210                         $this->tpl->setVariable(
"LEGEND_EVENT_TITLE", $event_obj->getTitle());
 
  211                         $this->tpl->setVariable(
"LEGEND_EVENT_DESCRIPTION", $event_obj->getDescription());      
 
  212                         $this->tpl->setVariable(
"LEGEND_EVENT_LOCATION", $event_obj->getLocation());
 
  213                         $this->tpl->setVariable(
"LEGEND_EVENT_APPOINTMENT", $event_obj->getFirstAppointment()->appointmentToString());          
 
  214                         $this->tpl->parseCurrentBlock();
 
  228                 global $tree,$ilAccess;
 
  230                 include_once(
'Services/Utilities/classes/class.ilCSVWriter.php');
 
  231                 include_once 
'Modules/Session/classes/class.ilEventParticipants.php';
 
  233                 $members = $this->members_obj->getParticipants();
 
  237                 foreach($tree->getSubtree($tree->getNodeData($this->course_ref_id),
false,
'sess') as $event_id)
 
  240                         if(!is_object($tmp_event) or !$ilAccess->checkAccess(
'write',
'',$event_id)) 
 
  244                         $events[] = $tmp_event;
 
  248                 $this->csv->addColumn($this->lng->txt(
"lastname"));
 
  249                 $this->csv->addColumn($this->lng->txt(
"firstname"));
 
  250                 $this->csv->addColumn($this->lng->txt(
"login"));
 
  252                 foreach($events as $event_obj)
 
  255                         $this->csv->addColumn($event_obj->getTitle().
' ('.$event_obj->getFirstAppointment()->appointmentToString().
')');
 
  258                 $this->csv->addRow();
 
  260                 foreach($members as $user_id)
 
  264                         $this->csv->addColumn($name[
'lastname']);
 
  265                         $this->csv->addColumn($name[
'firstname']);
 
  268                         foreach($events as $event_obj)
 
  272                                 $this->csv->addColumn($event_part->hasParticipated($user_id) ?
 
  273                                                                                 $this->lng->txt(
'event_participated') :
 
  274                                                                                 $this->lng->txt(
'event_not_participated'));
 
  277                         $this->csv->addRow();