4 include_once(
'./Services/Object/classes/class.ilObjectGUI.php');
5 include_once(
'./Modules/Session/classes/class.ilObjSession.php');
6 include_once(
'./Modules/Session/classes/class.ilSessionFile.php');
7 include_once
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
39 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
47 $this->lng->loadLanguageModule(
"event");
48 $this->lng->loadLanguageModule(
'crs');
49 $this->lng->loadLanguageModule(
'trac');
66 $next_class = $this->ctrl->getNextClass($this);
67 $cmd = $this->ctrl->getCmd();
73 case "ilinfoscreengui":
78 case 'ilpermissiongui':
79 $this->tabs_gui->setTabActive(
'perm_settings');
80 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
82 $ret = $this->ctrl->forwardCommand($perm_gui);
85 case 'ilobjectcopygui':
86 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
89 $this->ctrl->forwardCommand($cp);
94 $this->tabs_gui->setTabActive(
"export");
95 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
97 $exp_gui->addFormat(
"xml");
98 $ret = $this->ctrl->forwardCommand($exp_gui);
102 case "ilcommonactiondispatchergui":
103 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
105 $this->ctrl->forwardCommand($gui);
114 if (
$cmd !=
"infoScreenObject")
141 $title = strlen($this->object->getTitle()) ? (
': '.$this->object->getTitle()) :
'';
143 include_once
'./Modules/Session/classes/class.ilSessionAppointment.php';
144 $this->tpl->setTitle(
145 $this->object->getFirstAppointment()->appointmentToString().$title);
160 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
164 $this->ctrl->returnToParent($this);
177 if($ilUser->isAnonymous())
179 $this->ctrl->redirect($this,
'infoScreen');
182 include_once
'./Modules/Session/classes/class.ilEventParticipants.php';
196 $this->ctrl->redirect($this,
'infoScreen');
209 include_once
'./Modules/Session/classes/class.ilEventParticipants.php';
213 $this->ctrl->returnToParent($this);
224 public static function _goto($a_target)
228 if($ilAccess->checkAccess(
'visible',
"", $a_target))
232 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
240 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
250 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
263 $this->ctrl->setCmd(
"showSummary");
264 $this->ctrl->setCmdClass(
"ilinfoscreengui");
276 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
279 include_once
"Services/Object/classes/class.ilObjectActivation.php";
282 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
283 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
293 $this->object->getRefId());
309 $this->tabs_gui->setTabActive(
'info_short');
311 $appointment_obj = $this->
object->getFirstAppointment();
313 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
316 if($this->object->enabledRegistration() && !$ilUser->isAnonymous())
318 include_once
'./Modules/Session/classes/class.ilEventParticipants.php';
321 $ilToolbar->addFormButton($this->lng->txt(
'event_unregister'),
'join');
329 $ilToolbar->addFormButton($this->lng->txt(
'join_session'),
'join',
'',
true);
331 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
335 if(strlen($this->object->getLocation()) or strlen($this->object->getDetails()))
337 $info->addSection($this->lng->txt(
'event_section_information'));
339 if(strlen(
$location = $this->object->getLocation()))
341 $info->addProperty($this->lng->txt(
'event_location'),
342 nl2br($this->object->getLocation()));
344 if(strlen($this->object->getDetails()))
346 $info->addProperty($this->lng->txt(
'event_details_workflow'),
347 nl2br($this->object->getDetails()));
351 if($this->object->hasTutorSettings())
353 $info->addSection($this->lng->txt(
'event_tutor_data'));
354 if(strlen($fullname = $this->object->getName()))
356 $info->addProperty($this->lng->txt(
'event_lecturer'),
359 if(strlen($email = $this->object->getEmail()))
361 $info->addProperty($this->lng->txt(
'tutor_email'),
364 if(strlen($phone = $this->object->getPhone()))
366 $info->addProperty($this->lng->txt(
'tutor_phone'),
374 include_once
'./Services/Object/classes/class.ilObjectActivation.php';
375 include_once
'./Services/Container/classes/class.ilContainerSorting.php';
376 include_once
'./Modules/Session/classes/class.ilSessionObjectListGUIFactory.php';
379 $parent_id = $tree->getParentId($this->object->getRefId());
383 $this->object->getId(),
387 foreach($eventItems as $item)
390 $list_gui->setContainerObject($this);
394 $html .= $list_gui->getListItemHTML(
404 $info->addSection($this->lng->txt(
'event_materials'));
411 $this->ctrl->forwardCommand($info);
414 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
416 $this->
object->getId(), $ilUser->getId());
434 if(!is_object($this->
object))
458 $this->ctrl->setParameter($this,
'ref_id',$this->object->getRefId());
459 $this->ctrl->redirect($this,
'materials');
479 $ilErr->setMessage(
'');
480 if(!$this->form->checkInput()) {
481 $ilErr->setMessage($this->lng->txt(
'err_check_input'));
484 $this->
object->validate();
485 $this->
object->getFirstAppointment()->validate();
487 if(strlen($ilErr->getMessage()))
494 $this->
object->create();
495 $this->
object->createReference();
496 $this->
object->putInTree(
$_GET[
"ref_id"]);
497 $this->
object->setPermissions(
$_GET[
"ref_id"]);
500 $this->
object->getFirstAppointment()->setSessionId($this->object->getId());
501 $this->
object->getFirstAppointment()->create();
507 if($a_redirect_on_success)
510 $this->ctrl->returnToParent($this);
521 include_once
'./Modules/Session/classes/class.ilEventItems.php';
528 if(!isset($_FILES[
'files'][
'name'][$counter]))
532 if(!strlen($_FILES[
'files'][
'name'][$counter]))
538 include_once
'./Modules/File/classes/class.ilObjFile.php';
541 $file->setDescription(
'');
543 $file->setFileType($_FILES[
'files'][
'type'][$counter]);
544 $file->setFileSize($_FILES[
'files'][
'size'][$counter]);
546 $new_ref_id =
$file->createReference();
547 $file->putInTree($tree->getParentId($this->object->getRefId()));
548 $file->setPermissions($tree->getParentId($this->object->getRefId()));
549 $file->createDirectory();
550 $file->getUploadFile(
551 $_FILES[
'files'][
'tmp_name'][$counter],
552 $_FILES[
'files'][
'name'][$counter]
555 $items[] = $new_ref_id;
577 if(!$this->rec->getFrequenceType())
581 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php');
584 $period_start = clone $this->
object->getFirstAppointment()->getStart();
587 $period_end = clone $this->
object->getFirstAppointment()->getStart();
591 $period_diff = $this->
object->getFirstAppointment()->getEnd()->get(
IL_CAL_UNIX) -
592 $this->
object->getFirstAppointment()->getStart()->get(
IL_CAL_UNIX);
593 $parent_id = $tree->getParentId($this->object->getRefId());
595 include_once
'./Modules/Session/classes/class.ilEventItems.php';
600 foreach($date_list->get() as $date)
607 $new_obj = $this->
object->cloneObject($parent_id);
609 $new_obj->getFirstAppointment()->setStartingTime($date->get(
IL_CAL_UNIX));
610 $new_obj->getFirstAppointment()->setEndingTime($date->get(
IL_CAL_UNIX) + $period_diff);
611 $new_obj->getFirstAppointment()->update();
630 $this->tabs_gui->setTabActive(
'settings');
633 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_edit.html',
'Modules/Session');
634 $this->tpl->setVariable(
'EVENT_EDIT_TABLE',$this->form->getHTML());
636 if(!count($this->object->getFiles()))
641 foreach($this->object->getFiles() as
$file)
643 $table_data[
'id'] =
$file->getFileId();
644 $table_data[
'filename'] =
$file->getFileName();
645 $table_data[
'filetype'] =
$file->getFileType();
646 $table_data[
'filesize'] =
$file->getFileSize();
648 $rows[] = $table_data;
651 include_once(
"./Modules/Session/classes/class.ilSessionFileTableGUI.php");
653 $table_gui->setTitle($this->lng->txt(
"event_files"));
654 $table_gui->setData($rows);
655 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
656 $table_gui->addMultiCommand(
"confirmDeleteFiles", $this->lng->txt(
"delete"));
657 $table_gui->setSelectAllCheckbox(
"file_id");
658 $this->tpl->setVariable(
'EVENT_FILE_TABLE',$table_gui->getHTML());
677 $ilErr->setMessage(
'');
678 if(!$this->form->checkInput())
680 $ilErr->setMessage($this->lng->txt(
'err_check_input'));
682 $this->
object->validate();
683 $this->
object->getFirstAppointment()->validate();
685 if(strlen($ilErr->getMessage()))
692 $this->
object->update();
693 $this->
object->getFirstAppointment()->update();
698 $this->ctrl->redirect($this,
'edit');
699 #$this->object->initFiles();
700 #$this->editObject();
713 $this->tabs_gui->setTabActive(
'settings');
715 if(!count(
$_POST[
'file_id']))
722 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
726 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteFiles"));
727 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
728 $c_gui->setCancel($this->lng->txt(
"cancel"),
"edit");
729 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteFiles");
732 foreach(
$_POST[
"file_id"] as $file_id)
735 if(
$file->getSessionId() != $this->
object->getEventId())
741 $c_gui->addItem(
"file_id[]", $file_id,
$file->getFileName());
744 $this->tpl->setContent($c_gui->getHTML());
757 if(!count(
$_POST[
'file_id']))
763 foreach(
$_POST[
'file_id'] as $id)
768 $this->
object->initFiles();
777 $is_course = $is_group =
false;
780 $this->container_ref_id = $tree->checkForParentType($this->object->getRefId(),
'grp');
781 if($this->container_ref_id)
785 if(!$this->container_ref_id)
787 $this->container_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs');
788 if($this->container_ref_id)
793 if(!$this->container_ref_id)
800 if($a_init_participants && $this->container_obj_id)
804 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
809 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
827 $this->tabs_gui->setTabActive(
'crs_materials');
830 $parent_ref_id = $tree->getParentId($this->object->getRefId());
832 include_once
"Services/Object/classes/class.ilObjectAddNewItemGUI.php";
834 $gui->setDisabledObjectTypes(array(
"itgr",
"sess"));
835 $gui->setAfterCreationCallback($this->ref_id);
838 include_once
'Modules/Session/classes/class.ilEventItems.php';
839 $this->event_items =
new ilEventItems($this->object->getId());
840 $items = $this->event_items->
getItems();
842 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_materials.html',
'Modules/Session');
843 #$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
845 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this,
'materials'));
847 $this->tpl->setVariable(
"COLL_TITLE_IMG_ALT",$this->lng->txt(
'events'));
848 $this->tpl->setVariable(
"TABLE_TITLE",$this->lng->txt(
'event_assign_materials_table'));
849 $this->tpl->setVariable(
"TABLE_INFO",$this->lng->txt(
'event_assign_materials_info'));
851 $materials = array();
852 $nodes = $tree->getSubTree($tree->getNodeData($parent_ref_id));
853 foreach($nodes as $node)
856 if ($node[
'child'] == $parent_ref_id ||
857 $objDefinition->isSideBlock($node[
'type']) ||
858 in_array($node[
'type'], array(
'sess',
'itgr',
'rolf')))
863 if($node[
'type'] ==
'rolf')
868 $node[
"sorthash"] = (int)(!in_array($node[
'ref_id'],$items)).$node[
"title"];
869 $materials[] = $node;
876 foreach($materials as $node)
880 $this->tpl->setCurrentBlock(
"material_row");
883 $this->tpl->setVariable(
'IMG_ALT',$this->lng->txt(
'obj_'.$node[
'type']));
885 $this->tpl->setVariable(
"CHECK_COLL",
ilUtil::formCheckbox(in_array($node[
'ref_id'],$items) ? 1 : 0,
886 'items[]',$node[
'ref_id']));
887 $this->tpl->setVariable(
"COLL_TITLE",$node[
'title']);
889 if(strlen($node[
'description']))
891 $this->tpl->setVariable(
"COLL_DESC",$node[
'description']);
893 $this->tpl->setVariable(
"ASSIGNED_IMG_OK",in_array($node[
'ref_id'],$items) ?
896 $this->tpl->setVariable(
"ASSIGNED_STATUS",$this->lng->txt(
'event_material_assigned'));
897 $this->tpl->setVariable(
"COLL_PATH",$this->
formatPath($node[
'ref_id']));
898 $this->tpl->parseCurrentBlock();
902 $this->tpl->setVariable(
"SELECT_ALL",$this->lng->txt(
'select_all'));
904 $this->tpl->setVariable(
"BTN_SAVE",$this->lng->txt(
'save'));
916 include_once
'./Modules/Session/classes/class.ilEventItems.php';
918 $this->event_items =
new ilEventItems($this->object->getId());
920 $this->event_items->update();
935 $this->tabs_gui->setTabActive(
'event_edit_members');
937 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_members.html',
'Modules/Session');
939 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
941 $toolbar->addButton($this->lng->txt(
'sess_gen_attendance_list'),
942 $this->ctrl->getLinkTarget($this,
'attendanceList'));
944 $this->tpl->setVariable(
'ACTION_BUTTONS',$toolbar->getHTML());
948 include_once
'./Modules/Session/classes/class.ilEventParticipants.php';
954 if(count($admins = $members_obj->getAdmins()))
956 include_once(
'./Modules/Session/classes/class.ilSessionParticipantsTableGUI.php');
957 if($ilUser->getPref(
'sess_admin_hide'))
960 $this->ctrl->setParameter($this,
'admin_hide',0);
961 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
962 $this->lng->txt(
'show'),
965 $this->ctrl->clearParameters($this);
970 $this->ctrl->setParameter($this,
'admin_hide',1);
971 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
972 $this->lng->txt(
'hide'),
975 $this->ctrl->clearParameters($this);
978 $table->addCommandButton(
'updateMembers',$this->lng->txt(
'save'));
979 $table->setTitle($this->lng->txt(
'event_tbl_admins'),
'icon_usr.png',$this->lng->txt(
'event_tbl_admins'));
980 $table->enableRegistration($this->object->enabledRegistration());
981 $table->setParticipants($admins);
983 $this->tpl->setVariable(
'ADMINS',$table->getHTML());
987 if(count($tutors = $members_obj->getTutors()))
989 include_once(
'./Modules/Session/classes/class.ilSessionParticipantsTableGUI.php');
990 if($ilUser->getPref(
'sess_tutor_hide'))
993 $this->ctrl->setParameter($this,
'tutor_hide',0);
994 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
995 $this->lng->txt(
'show'),
998 $this->ctrl->clearParameters($this);
1003 $this->ctrl->setParameter($this,
'tutor_hide',1);
1004 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1005 $this->lng->txt(
'hide'),
1008 $this->ctrl->clearParameters($this);
1010 $table->addCommandButton(
'updateMembers',$this->lng->txt(
'save'));
1011 $table->setTitle($this->lng->txt(
'event_tbl_tutors'),
'icon_usr.png',$this->lng->txt(
'event_tbl_admins'));
1012 $table->enableRegistration($this->object->enabledRegistration());
1013 $table->setParticipants($tutors);
1015 $this->tpl->setVariable(
'TUTORS',$table->getHTML());
1019 if(count($members = $members_obj->getMembers()))
1021 include_once(
'./Modules/Session/classes/class.ilSessionParticipantsTableGUI.php');
1022 if($ilUser->getPref(
'sess_member_hide'))
1025 $this->ctrl->setParameter($this,
'member_hide',0);
1026 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1027 $this->lng->txt(
'show'),
1030 $this->ctrl->clearParameters($this);
1035 $this->ctrl->setParameter($this,
'member_hide',1);
1036 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1037 $this->lng->txt(
'hide'),
1040 $this->ctrl->clearParameters($this);
1042 $table->addCommandButton(
'updateMembers',$this->lng->txt(
'save'));
1043 $table->setTitle($this->lng->txt(
'event_tbl_members'),
'icon_usr.png',$this->lng->txt(
'event_tbl_admins'));
1044 $table->enableRegistration($this->object->enabledRegistration());
1045 $table->setParticipants($members);
1047 $this->tpl->setVariable(
'MEMBERS',$table->getHTML());
1066 if(isset(
$_GET[
'admin_hide']))
1068 $ilUser->writePref(
'sess_admin_hide',(
int)
$_GET[
'admin_hide']);
1070 if(isset(
$_GET[
'tutor_hide']))
1072 $ilUser->writePref(
'sess_tutor_hide',(
int)
$_GET[
'tutor_hide']);
1074 if(isset(
$_GET[
'member_hide']))
1076 $ilUser->writePref(
'sess_member_hide',(
int)
$_GET[
'member_hide']);
1097 $_POST[
'participants'] = is_array(
$_POST[
'participants']) ?
$_POST[
'participants'] : array();
1098 $_POST[
'registered'] = is_array(
$_POST[
'registered']) ?
$_POST[
'registered'] : array();
1100 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
1102 $visible =
$_POST[
'visible_participants'] ?
$_POST[
'visible_participants'] : array();
1103 foreach($visible as $user)
1109 $part->setParticipated(isset(
$_POST[
'participants'][$user]) ?
true :
false);
1110 $part->setRegistered(isset(
$_POST[
'registered'][$user]) ?
true :
false);
1111 $part->updateUser();
1125 global
$tpl,$ilTabs;
1128 $ilTabs->setTabActive(
'event_edit_members');
1131 $form = $list->initForm(
'printAttendanceList');
1132 $tpl->setContent($form->getHTML());
1144 include_once
'Services/Membership/classes/class.ilAttendanceList.php';
1146 $list->setId(
'sessattlst');
1148 $event_app = $this->
object->getFirstAppointment();
1152 $desc .=
" ".$this->object->getTitle();
1153 $list->setTitle($this->lng->txt(
'sess_attendance_list'), $desc);
1155 $list->addPreset(
'mark', $this->lng->txt(
'trac_mark'),
true);
1156 $list->addPreset(
'comment', $this->lng->txt(
'trac_comment'),
true);
1157 if($this->object->enabledRegistration())
1159 $list->addPreset(
'registered', $this->lng->txt(
'event_tbl_registered'),
true);
1161 $list->addPreset(
'participated', $this->lng->txt(
'event_tbl_participated'),
true);
1162 $list->addBlank($this->lng->txt(
'sess_signature'));
1164 $list->addUserFilter(
'registered', $this->lng->txt(
'event_list_registered_only'));
1179 $list->initFromForm();
1180 $list->setCallback(array($this,
'getAttendanceListUserData'));
1182 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
1185 echo $list->getFullscreenHTML();
1200 $data = $this->event_part->getUser($a_user_id);
1202 if($a_filters && $a_filters[
"registered"] && !
$data[
"registered"])
1208 $this->lng->txt(
'yes') :
1209 $this->lng->txt(
'no');
1210 $data[
'participated'] =
$data[
'participated'] ?
1211 $this->lng->txt(
'yes') :
1212 $this->lng->txt(
'no');
1228 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1230 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
1233 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_list.html',
'Modules/Session');
1234 $this->
__showButton($this->ctrl->getLinkTarget($this,
'exportCSV'),$this->lng->txt(
'event_csv_export'));
1236 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
1238 $this->tpl->addBlockfile(
"EVENTS_TABLE",
"events_table",
"tpl.table.html");
1239 $this->tpl->addBlockfile(
'TBL_CONTENT',
'tbl_content',
'tpl.sess_list_row.html',
'Modules/Session');
1242 $members = $members_obj->getParticipants();
1247 $tbl->setTitle($this->lng->txt(
"event_overview"),
1249 $this->lng->txt(
'obj_usr'));
1250 $this->ctrl->setParameter($this,
'offset',(
int)
$_GET[
'offset']);
1252 $course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs');
1254 foreach($tree->getSubtree($tree->getNodeData($course_ref_id),
false,
'sess') as $event_id)
1257 if(!is_object($tmp_event) or $tmp_event->getType() !=
'sess')
1261 $events[] = $tmp_event;
1264 $headerNames = array();
1265 $headerVars = array();
1266 $colWidth = array();
1268 $headerNames[] = $this->lng->txt(
'name');
1269 $headerVars[] =
"name";
1270 $colWidth[] =
'20%';
1272 for ($i = 1; $i <= count($events); $i++)
1274 $headerNames[] = $i;
1275 $headerVars[] =
"event_".$i;
1276 $colWidth[] = 80/count($events).
"%";
1279 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1280 $tbl->setHeaderNames($headerNames);
1281 $tbl->setHeaderVars($headerVars, $this->ctrl->getParameterArray($this,
'eventsList'));
1282 $tbl->setColumnWidth($colWidth);
1284 $tbl->setOrderColumn($_GET[
"sort_by"]);
1285 $tbl->setOrderDirection($_GET[
"sort_order"]);
1286 $tbl->setOffset($_GET[
"offset"]);
1287 $tbl->setLimit($ilUser->getPref(
"hits_per_page"));
1288 $tbl->setMaxCount(count($members));
1289 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1291 $sliced_users = array_slice($members,$_GET[
'offset'],
$_SESSION[
'tbl_limit']);
1292 $tbl->disable(
'sort');
1296 foreach($sliced_users as $user_id)
1298 foreach($events as $event_obj)
1300 $this->tpl->setCurrentBlock(
"eventcols");
1305 $this->tpl->setVariable(
"IMAGE_PARTICIPATED", $event_part->hasParticipated($user_id) ?
1309 $this->tpl->setVariable(
"PARTICIPATED", $event_part->hasParticipated($user_id) ?
1310 $this->lng->txt(
'event_participated') :
1311 $this->lng->txt(
'event_not_participated'));
1314 $this->tpl->parseCurrentBlock();
1317 $this->tpl->setCurrentBlock(
"tbl_content");
1320 $this->tpl->setVariable(
"LASTNAME",$name[
'lastname']);
1321 $this->tpl->setVariable(
"FIRSTNAME",$name[
'firstname']);
1323 $this->tpl->parseCurrentBlock();
1326 $this->tpl->setVariable(
"HEAD_TXT_LEGEND", $this->lng->txt(
"legend"));
1327 $this->tpl->setVariable(
"HEAD_TXT_DIGIT", $this->lng->txt(
"event_digit"));
1328 $this->tpl->setVariable(
"HEAD_TXT_EVENT", $this->lng->txt(
"event"));
1329 $this->tpl->setVariable(
"HEAD_TXT_LOCATION", $this->lng->txt(
"event_location"));
1330 $this->tpl->setVariable(
"HEAD_TXT_DATE_TIME",$this->lng->txt(
"event_date_time"));
1332 foreach($events as $event_obj)
1334 $this->tpl->setCurrentBlock(
"legend_loop");
1335 $this->tpl->setVariable(
"LEGEND_CSS_ROW",
ilUtil::switchColor($counter++,
'tblrow1',
'tblrow2'));
1336 $this->tpl->setVariable(
"LEGEND_DIGIT", $i++);
1337 $this->tpl->setVariable(
"LEGEND_EVENT_TITLE", $event_obj->getTitle());
1338 $this->tpl->setVariable(
"LEGEND_EVENT_DESCRIPTION", $event_obj->getDescription());
1339 $this->tpl->setVariable(
"LEGEND_EVENT_LOCATION", $event_obj->getLocation());
1340 $this->tpl->setVariable(
"LEGEND_EVENT_APPOINTMENT", $event_obj->getFirstAppointment()->appointmentToString());
1341 $this->tpl->parseCurrentBlock();
1355 if(is_object($this->form))
1360 $this->lng->loadLanguageModule(
'dateplaner');
1362 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1364 include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
1368 $this->form->setMultipart(
true);
1369 $this->form->setTableWidth(
'600px');
1370 $this->form->setFormAction($this->ctrl->getFormAction($this));
1371 $this->form->setMultipart(
true);
1381 $this->lng->loadLanguageModule(
'dateplaner');
1382 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
1383 #$this->tpl->addJavaScript('./Modules/Session/js/toggle_session_time.js');
1384 $this->tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
1386 $dur->
setStartText($this->lng->txt(
'event_start_date'));
1387 $dur->setEndText($this->lng->txt(
'event_end_date'));
1388 $dur->enableToggleFullTime(
1389 $this->lng->txt(
'event_fulltime_info'),
1390 $this->
object->getFirstAppointment()->enabledFulltime() ?
true : false
1392 $dur->setMinuteStepSize(5);
1393 $dur->setShowTime(
true);
1394 $dur->setShowDate(
true);
1395 $dur->setStart($this->object->getFirstAppointment()->getStart());
1396 $dur->setEnd($this->object->getFirstAppointment()->getEnd());
1398 $this->form->addItem($dur);
1417 if($a_mode ==
'create')
1419 if(!is_object($this->rec))
1421 include_once(
'./Modules/Session/classes/class.ilEventRecurrence.php');
1424 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
1427 $rec->setRecurrence($this->rec);
1428 $this->form->addItem($rec);
1432 $section->setTitle($this->lng->txt(
'event_section_information'));
1436 $title =
new ilTextInputGUI($this->lng->txt(
'event_title'),
'title');
1437 $title->
setValue($this->object->getTitle());
1438 $title->setSize(50);
1439 $title->setMaxLength(70);
1440 $this->form->addItem($title);
1444 $desc->
setValue($this->object->getLongDescription());
1447 $this->form->addItem($desc);
1451 $desc->
setValue($this->object->getLocation());
1454 $this->form->addItem($desc);
1457 $details =
new ilTextAreaInputGUI($this->lng->txt(
'event_details_workflow'),
'details');
1458 $details->
setValue($this->object->getDetails());
1459 $details->setCols(50);
1460 $details->setRows(4);
1461 $this->form->addItem($details);
1465 $section->setTitle($this->lng->txt(
'event_tutor_data'));
1469 $tutor_name =
new ilTextInputGUI($this->lng->txt(
'tutor_name'),
'tutor_name');
1470 $tutor_name->
setValue($this->object->getName());
1471 $tutor_name->setSize(20);
1472 $tutor_name->setMaxLength(70);
1473 $this->form->addItem($tutor_name);
1476 $tutor_email =
new ilTextInputGUI($this->lng->txt(
'tutor_email'),
'tutor_email');
1477 $tutor_email->
setValue($this->object->getEmail());
1478 $tutor_email->setSize(20);
1479 $tutor_email->setMaxLength(70);
1480 $this->form->addItem($tutor_email);
1483 $tutor_phone =
new ilTextInputGUI($this->lng->txt(
'tutor_phone'),
'tutor_phone');
1484 $tutor_phone->
setValue($this->object->getPhone());
1485 $tutor_phone->setSize(20);
1486 $tutor_phone->setMaxLength(70);
1487 $this->form->addItem($tutor_phone);
1490 $section->setTitle($this->lng->txt(
'crs_further_settings'));
1495 $reg->
setChecked($this->object->enabledRegistration() ?
true :
false);
1496 $reg->setOptionTitle($this->lng->txt(
'event_registration_info'));
1497 $this->form->addItem($reg);
1501 $section->setTitle($this->lng->txt(
'event_assign_files'));
1505 $files->setFilenames(array(0 =>
''));
1506 $this->form->addItem(
$files);
1511 $this->form->setTitle($this->lng->txt(
'event_table_create'));
1514 $this->form->addCommandButton(
'save',$this->lng->txt(
'event_btn_add'));
1515 $this->form->addCommandButton(
'saveAndAssignMaterials',$this->lng->txt(
'event_btn_add_edit'));
1516 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1521 $this->form->setTitle($this->lng->txt(
'event_table_update'));
1524 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
1525 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1543 $this->
object->getFirstAppointment()->setStartingTime($this->
__toUnix(
$_POST[
'event'][
'start'][
'date'],
$_POST[
'event'][
'start'][
'time']));
1544 $this->
object->getFirstAppointment()->setEndingTime($this->
__toUnix(
$_POST[
'event'][
'end'][
'date'],
$_POST[
'event'][
'end'][
'time']));
1545 $this->
object->getFirstAppointment()->toggleFullTime((
bool)
$_POST[
'event'][
'fulltime']);
1547 include_once(
'./Services/Calendar/classes/class.ilDate.php');
1548 if($this->object->getFirstAppointment()->isFullday())
1550 $start =
new ilDate($_POST[
'event'][
'start'][
'date'][
'y'].
'-'.$_POST[
'event'][
'start'][
'date'][
'm'].
'-'.$_POST[
'event'][
'start'][
'date'][
'd'],
1552 $this->
object->getFirstAppointment()->setStart($start);
1554 $end =
new ilDate($_POST[
'event'][
'end'][
'date'][
'y'].
'-'.$_POST[
'event'][
'end'][
'date'][
'm'].
'-'.$_POST[
'event'][
'end'][
'date'][
'd'],
1556 $this->
object->getFirstAppointment()->setEnd($end);
1560 $start_dt[
'year'] = (int) $_POST[
'event'][
'start'][
'date'][
'y'];
1561 $start_dt[
'mon'] = (int) $_POST[
'event'][
'start'][
'date'][
'm'];
1562 $start_dt[
'mday'] = (int) $_POST[
'event'][
'start'][
'date'][
'd'];
1563 $start_dt[
'hours'] = (int) $_POST[
'event'][
'start'][
'time'][
'h'];
1564 $start_dt[
'minutes'] = (int) $_POST[
'event'][
'start'][
'time'][
'm'];
1567 $this->
object->getFirstAppointment()->setStart($start);
1569 $end_dt[
'year'] = (int) $_POST[
'event'][
'end'][
'date'][
'y'];
1570 $end_dt[
'mon'] = (int) $_POST[
'event'][
'end'][
'date'][
'm'];
1571 $end_dt[
'mday'] = (int) $_POST[
'event'][
'end'][
'date'][
'd'];
1572 $end_dt[
'hours'] = (int) $_POST[
'event'][
'end'][
'time'][
'h'];
1573 $end_dt[
'minutes'] = (int) $_POST[
'event'][
'end'][
'time'][
'm'];
1575 $this->
object->getFirstAppointment()->setEnd($end);
1585 $this->
object->enableRegistration((
int) $_POST[
'registration']);
1596 include_once(
'./Modules/Session/classes/class.ilSessionRecurrence.php');
1599 switch(
$_POST[
'frequence'])
1602 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1603 $this->rec->setInterval((
int)
$_POST[
'count_DAILY']);
1607 $this->rec->setFrequenceType($_POST[
'frequence']);
1608 $this->rec->setInterval((
int) $_POST[
'count_WEEKLY']);
1609 if(is_array($_POST[
'byday_WEEKLY']))
1616 $this->rec->setFrequenceType($_POST[
'frequence']);
1617 $this->rec->setInterval((
int) $_POST[
'count_MONTHLY']);
1618 switch((
int) $_POST[
'subtype_MONTHLY'])
1625 switch((
int) $_POST[
'monthly_byday_day'])
1629 $this->rec->setBYSETPOS((
int) $_POST[
'monthly_byday_num']);
1630 $this->rec->setBYDAY(
'MO,TU,WE,TH,FR');
1635 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_byday_num']);
1639 $this->rec->setBYDAY((
int) $_POST[
'monthly_byday_num'].$_POST[
'monthly_byday_day']);
1645 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_bymonthday']);
1651 $this->rec->setFrequenceType($_POST[
'frequence']);
1652 $this->rec->setInterval((
int) $_POST[
'count_YEARLY']);
1653 switch((
int) $_POST[
'subtype_YEARLY'])
1660 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_byday']);
1661 $this->rec->setBYDAY((
int) $_POST[
'yearly_byday_num'].$_POST[
'yearly_byday']);
1665 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_by_monthday']);
1666 $this->rec->setBYMONTHDAY((
int) $_POST[
'yearly_bymonthday']);
1673 switch((
int)
$_POST[
'until_type'])
1676 $this->rec->setFrequenceUntilDate(null);
1681 $this->rec->setFrequenceUntilDate(null);
1682 $this->rec->setFrequenceUntilCount((
int) $_POST[
'count']);
1686 $end_dt[
'year'] = (int) $_POST[
'until_end'][
'date'][
'y'];
1687 $end_dt[
'mon'] = (int) $_POST[
'until_end'][
'date'][
'm'];
1688 $end_dt[
'mday'] = (int) $_POST[
'until_end'][
'date'][
'd'];
1690 $this->rec->setFrequenceUntilCount(0);
1706 return mktime($time[
'h'],$time[
'm'],0,$date[
'm'],$date[
'd'],$date[
'y']);
1719 $path = $this->lng->txt(
'path') .
': ';
1721 foreach($tree->getPathFull($a_ref_id,$this->container_ref_id) as $node)
1723 if($node[
'ref_id'] != $a_ref_id)
1730 $path .= $node[
'title'];
1746 if (is_object($this->
object))
1748 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"infoScreen"),
"",
$_GET[
"ref_id"]);
1762 $ilHelp->setScreenIdComponent(
"sess");
1764 $parent_id = $tree->getParentId($this->object->getRefId());
1769 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $parent_id);
1770 $tabs_gui->setBackTarget($this->lng->txt(
'back_to_'.$parent_type.
'_content'),
1771 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
1772 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
1774 $tabs_gui->addTarget(
'info_short',
1775 $this->ctrl->getLinkTarget($this,
'infoScreen'));
1777 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1779 $tabs_gui->addTarget(
'settings',
1780 $this->ctrl->getLinkTarget($this,
'edit'));
1781 $tabs_gui->addTarget(
'crs_materials',
1782 $this->ctrl->getLinkTarget($this,
'materials'));
1783 $tabs_gui->addTarget(
'event_edit_members',
1784 $this->ctrl->getLinkTarget($this,
'members'));
1788 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1790 $ilTabs->addTarget(
"export",
1791 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""),
"",
"ilexportgui");
1796 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
1798 $tabs_gui->addTarget(
"perm_settings",
1799 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1812 include_once
'./Modules/Session/classes/class.ilEventItems.php';
1813 $event_items =
new ilEventItems($this->object->getId());
1815 $event_items->update();