24 include_once(
'./classes/class.ilObjectGUI.php');
25 include_once(
'./Modules/Session/classes/class.ilObjSession.php');
26 include_once(
'./Modules/Session/classes/class.ilSessionFile.php');
56 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
64 $this->lng->loadLanguageModule(
"event");
65 $this->lng->loadLanguageModule(
'crs');
66 $this->lng->loadLanguageModule(
'trac');
82 $next_class = $this->ctrl->getNextClass($this);
83 $cmd = $this->ctrl->getCmd();
89 case "ilinfoscreengui":
94 case 'ilpermissiongui':
95 $this->tabs_gui->setTabActive(
'perm_settings');
96 include_once(
"./classes/class.ilPermissionGUI.php");
98 $ret = $this->ctrl->forwardCommand($perm_gui);
107 if (
$cmd !=
"infoScreenObject")
133 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
137 $this->ctrl->returnToParent($this);
150 include_once
'./Modules/Session/classes/class.ilEventParticipants.php';
154 $this->ctrl->returnToParent($this);
165 public static function _goto($a_target)
169 if($ilAccess->checkAccess(
'visible',
"", $a_target))
171 $_GET[
"cmd"] =
"infoScreen";
172 $_GET[
"ref_id"] = $a_target;
173 include(
"repository.php");
176 $ilErr->raiseError(
$lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
186 $this->ctrl->setCmd(
"showSummary");
187 $this->ctrl->setCmdClass(
"ilinfoscreengui");
200 global $ilAccess, $ilUser;
202 if (!$ilAccess->checkAccess(
"visible",
"", $this->object->getRefId()))
204 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
207 $this->tabs_gui->setTabActive(
'info_short');
209 $appointment_obj =& $this->
object->getFirstAppointment();
211 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
213 $info->addSection($this->lng->txt(
"event_general_properties"));
214 $info->addProperty($this->lng->txt(
'event_title'),
215 $this->
object->getTitle());
223 if(strlen(
$location = $this->object->getLocation()))
225 $info->addProperty($this->lng->txt(
'event_location'),
226 nl2br($this->object->getLocation()));
228 $info->addProperty($this->lng->txt(
'event_date'),
229 $appointment_obj->appointmentToString());
231 if($this->object->hasTutorSettings())
233 $info->addSection($this->lng->txt(
'event_tutor_data'));
234 if(strlen($fullname = $this->object->getName()))
236 $info->addProperty($this->lng->txt(
'event_lecturer'),
239 if(strlen($email = $this->object->getEmail()))
241 $info->addProperty($this->lng->txt(
'tutor_email'),
244 if(strlen($phone = $this->object->getPhone()))
246 $info->addProperty($this->lng->txt(
'tutor_phone'),
251 $details = $this->
object->getDetails();
253 $files = $this->
object->getFiles();
254 if(strlen($details) or is_array(
$files))
256 $info->addSection($this->lng->txt(
'event_further_informations'));
260 $info->addProperty($this->lng->txt(
'event_details_workflow'),
266 $tpl =
new ilTemplate(
'tpl.sess_info_file.html',
true,
true,
'Modules/Session');
270 $tpl->setCurrentBlock(
"files");
271 $this->ctrl->setParameter($this,
'file_id',$file->getFileId());
272 $tpl->setVariable(
"DOWN_LINK",$this->ctrl->getLinkTarget($this,
'sendfile'));
273 $tpl->setVariable(
"DOWN_NAME",$file->getFileName());
274 $tpl->setVariable(
"DOWN_INFO_TXT",$this->lng->txt(
'event_file_size_info'));
275 $tpl->setVariable(
"DOWN_SIZE",$file->getFileSize());
276 $tpl->setVariable(
"TXT_BYTES",$this->lng->txt(
'bytes'));
277 $tpl->parseCurrentBlock();
279 $info->addProperty($this->lng->txt(
'event_file_download'),
284 #$info->enablePrivateNotes();
288 $this->ctrl->forwardCommand($info);
315 if(!is_object($this->
object))
321 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_create.html',
'Modules/Session');
322 $this->tpl->setVariable(
'EVENT_ADD_TABLE',$this->form->getHTML());
343 $ilErr->setMessage(
'');
344 if(!$this->form->checkInput())
346 $ilErr->setMessage($this->lng->txt(
'err_check_input'));
349 $this->
object->validate();
350 $this->
object->getFirstAppointment()->validate();
352 if(strlen($ilErr->getMessage()))
359 $this->
object->create();
360 $this->
object->createReference();
361 $this->
object->putInTree(
$_GET[
"ref_id"]);
362 $this->
object->setPermissions(
$_GET[
"ref_id"]);
365 $this->
object->getFirstAppointment()->setSessionId($this->object->getId());
366 $this->
object->getFirstAppointment()->create();
368 foreach($this->files as $file_obj)
370 $file_obj->setSessionId($this->object->getEventId());
378 include_once
'./Modules/Course/classes/class.ilCourseItems.php';
384 $this->ctrl->returnToParent($this);
400 if(!$this->rec->getFrequenceType())
404 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php');
407 $period_start = clone $this->
object->getFirstAppointment()->getStart();
410 $period_end = clone $this->
object->getFirstAppointment()->getStart();
414 $period_diff = $this->
object->getFirstAppointment()->getEnd()->get(
IL_CAL_UNIX) -
415 $this->
object->getFirstAppointment()->getStart()->get(
IL_CAL_UNIX);
416 $parent_id = $tree->getParentId($this->object->getRefId());
419 foreach($date_list->get() as $date)
426 $new_obj = $this->
object->cloneObject($parent_id);
428 $new_obj->getFirstAppointment()->setStartingTime($date->get(
IL_CAL_UNIX));
429 $new_obj->getFirstAppointment()->setEndingTime($date->get(
IL_CAL_UNIX) + $period_diff);
430 $new_obj->getFirstAppointment()->update();
445 $this->tabs_gui->setTabActive(
'edit_properties');
448 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_edit.html',
'Modules/Session');
449 $this->tpl->setVariable(
'EVENT_EDIT_TABLE',$this->form->getHTML());
451 if(!count($this->object->getFiles()))
456 foreach($this->object->getFiles() as
$file)
458 $table_data[
'id'] =
$file->getFileId();
459 $table_data[
'filename'] =
$file->getFileName();
460 $table_data[
'filetype'] =
$file->getFileType();
461 $table_data[
'filesize'] =
$file->getFileSize();
463 $rows[] = $table_data;
466 include_once(
"./Modules/Session/classes/class.ilSessionFileTableGUI.php");
468 $table_gui->setTitle($this->lng->txt(
"event_files"));
469 $table_gui->setData($rows);
470 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
471 $table_gui->addMultiCommand(
"confirmDeleteFiles", $this->lng->txt(
"delete"));
472 $table_gui->setSelectAllCheckbox(
"file_id");
473 $this->tpl->setVariable(
'EVENT_FILE_TABLE',$table_gui->getHTML());
492 $ilErr->setMessage(
'');
493 if(!$this->form->checkInput())
495 $ilErr->setMessage($this->lng->txt(
'err_check_input'));
497 $this->
object->validate();
498 $this->
object->getFirstAppointment()->validate();
500 if(strlen($ilErr->getMessage()))
507 $this->
object->update();
508 $this->
object->getFirstAppointment()->update();
510 foreach($this->files as $file_obj)
512 $file_obj->setSessionId($this->object->getEventId());
517 $this->
object->initFiles();
531 $this->tabs_gui->setTabActive(
'edit_properties');
533 if(!count($_POST[
'file_id']))
540 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
544 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteFiles"));
545 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
546 $c_gui->setCancel($this->lng->txt(
"cancel"),
"edit");
547 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteFiles");
550 foreach($_POST[
"file_id"] as $file_id)
553 if(
$file->getSessionId() != $this->
object->getEventId())
559 $c_gui->addItem(
"file_id[]", $file_id,
$file->getFileName());
562 $this->tpl->setContent($c_gui->getHTML());
575 if(!count($_POST[
'file_id']))
581 foreach($_POST[
'file_id'] as $id)
586 $this->
object->initFiles();
602 $this->tabs_gui->setTabActive(
'crs_materials');
604 include_once
'Modules/Session/classes/class.ilEventItems.php';
605 $this->event_items =
new ilEventItems($this->object->getId());
606 $items = $this->event_items->
getItems();
608 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_materials.html',
'Modules/Session');
609 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
611 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this,
'materials'));
613 $this->tpl->setVariable(
"COLL_TITLE_IMG_ALT",$this->lng->txt(
'events'));
614 $this->tpl->setVariable(
"TABLE_TITLE",$this->lng->txt(
'event_assign_materials_table'));
615 $this->tpl->setVariable(
"TABLE_INFO",$this->lng->txt(
'event_assign_materials_info'));
617 $this->course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs');
618 if(!$this->course_ref_id)
623 $nodes = $tree->getSubTree($tree->getNodeData($this->course_ref_id));
625 foreach($nodes as $node)
628 if ($objDefinition->isSideBlock($node[
'type']) or $node[
'type'] ==
'sess')
633 if($node[
'type'] ==
'rolf')
641 $this->tpl->setCurrentBlock(
"material_row");
644 $this->tpl->setVariable(
'IMG_ALT',$this->lng->txt(
'obj_'.$node[
'type']));
646 $this->tpl->setVariable(
"CHECK_COLL",
ilUtil::formCheckbox(in_array($node[
'ref_id'],$items) ? 1 : 0,
647 'items[]',$node[
'ref_id']));
648 $this->tpl->setVariable(
"COLL_TITLE",$node[
'title']);
650 if(strlen($node[
'description']))
652 $this->tpl->setVariable(
"COLL_DESC",$node[
'description']);
654 $this->tpl->setVariable(
"ASSIGNED_IMG_OK",in_array($node[
'ref_id'],$items) ?
657 $this->tpl->setVariable(
"ASSIGNED_STATUS",$this->lng->txt(
'event_material_assigned'));
658 $this->tpl->setVariable(
"COLL_PATH",$this->
formatPath($node[
'ref_id']));
659 $this->tpl->parseCurrentBlock();
663 $this->tpl->setVariable(
"SELECT_ALL",$this->lng->txt(
'select_all'));
665 $this->tpl->setVariable(
"BTN_SAVE",$this->lng->txt(
'save'));
677 include_once
'./Modules/Session/classes/class.ilEventItems.php';
679 $this->event_items =
new ilEventItems($this->object->getId());
680 $this->event_items->
setItems(is_array($_POST[
'items']) ? $_POST[
'items'] : array());
681 $this->event_items->update();
698 $this->tabs_gui->setTabActive(
'event_edit_members');
700 $this->
__showButton(
'printViewMembers',$this->lng->txt(
'print'),
'target="_blank"');
701 $this->
__showButton(
'attendanceList',$this->lng->txt(
'sess_gen_attendance_list'));
703 $this->course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs');
705 if(!$this->course_ref_id)
711 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
712 include_once
'./Modules/Session/classes/class.ilEventParticipants.php';
719 include_once(
'./Modules/Session/classes/class.ilSessionParticipantsTableGUI.php');
721 $table->setTitle($this->lng->txt(
'event_tbl_participants'),
'icon_usr.gif',$this->lng->txt(
'event_tbl_participants'));
722 $table->enableRegistration($this->object->enabledRegistration());
723 $table->setParticipants($members);
726 $this->tpl->setContent($table->getHTML());
742 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
743 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
745 $this->course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs');
747 if(!$this->course_ref_id)
753 $_POST[
'participants'] = is_array($_POST[
'participants']) ? $_POST[
'participants'] : array();
758 $visible = $_POST[
'visible_participants'] ? $_POST[
'visible_participants'] : array();
759 foreach($visible as
$user)
765 $part->setParticipated(isset($_POST[
'participants'][$user]) ?
true :
false);
785 $ilTabs->setTabActive(
'event_edit_members');
788 $tpl->setContent($this->form->getHTML());
800 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
803 $this->form->setFormAction($this->ctrl->getFormAction($this));
804 $this->form->setTarget(
'_blank');
805 $this->form->setTitle($this->lng->txt(
'sess_gen_attendance_list'));
810 $this->form->addItem($mark);
813 $comment->setOptionTitle($this->lng->txt(
'sess_gen_comment'));
817 $signature =
new ilCheckboxInputGUI($this->lng->txt(
'sess_signature'),
'show_signature');
818 $signature->
setOptionTitle($this->lng->txt(
'sess_gen_signature'));
819 $signature->setValue(1);
820 $this->form->addItem($signature);
822 $this->form->addCommandButton(
'printAttendanceList',$this->lng->txt(
'sess_print_attendance_list'));
835 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
836 include_once(
'./Modules/Course/classes/class.ilCourseParticipants.php');
840 $this->course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs');
842 if(!$this->course_ref_id)
849 $event_app = $this->
object->getFirstAppointment();
853 $this->tpl =
new ilTemplate(
'tpl.main.html',
true,
true);
856 $this->tpl->setVariable(
"LOCATION_STYLESHEET",$location_stylesheet);
858 $tpl =
new ilTemplate(
'tpl.sess_attendance_list_print.html',
true,
true,
'Modules/Session');
860 $tpl->setVariable(
"ATTENDANCE_LIST",$this->lng->txt(
'sess_attendance_list'));
861 $tpl->setVariable(
"EVENT_NAME",$this->object->getTitle());
866 $tpl->setVariable(
"TXT_NAME",$this->lng->txt(
'name'));
867 if($_POST[
'show_mark'])
869 $tpl->setVariable(
"TXT_MARK",$this->lng->txt(
'trac_mark'));
871 if($_POST[
'show_comment'])
873 $tpl->setVariable(
"TXT_COMMENT",$this->lng->txt(
'trac_comment'));
875 if($_POST[
'show_signature'])
877 $tpl->setVariable(
"TXT_SIGNATURE",$this->lng->txt(
'sess_signature'));
880 $members = $members_obj->getParticipants();
883 foreach($members as $user_id)
885 $user_data = $event_part->getUser($user_id);
887 if($_POST[
'show_mark'])
889 $tpl->setVariable(
"MARK",$user_data[
'mark'] ? $user_data[
'mark'] :
' ');
891 if($_POST[
'show_comment'])
893 $tpl->setVariable(
"COMMENT",$user_data[
'comment'] ? $user_data[
'comment'] :
' ');
895 if($_POST[
'show_signature'])
897 $tpl->touchBlock(
'row_signature');
900 $tpl->setCurrentBlock(
"member_row");
902 $tpl->setVariable(
"LASTNAME",$name[
'lastname']);
903 $tpl->setVariable(
"FIRSTNAME",$name[
'firstname']);
905 $tpl->parseCurrentBlock();
908 $this->tpl->setVariable(
"CONTENT",
$tpl->get());
909 $this->tpl->setVariable(
"BODY_ATTRIBUTES",
'onload="window.print()"');
924 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
925 include_once(
'./Modules/Course/classes/class.ilCourseParticipants.php');
929 $this->course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs');
931 if(!$this->course_ref_id)
938 $event_app = $this->
object->getFirstAppointment();
942 $this->tpl =
new ilTemplate(
'tpl.main.html',
true,
true);
945 $this->tpl->setVariable(
"LOCATION_STYLESHEET",$location_stylesheet);
947 $tpl =
new ilTemplate(
'tpl.sess_members_print.html',
true,
true,
'Modules/Session');
949 $tpl->setVariable(
"EVENT",$this->lng->txt(
'event'));
950 $tpl->setVariable(
"EVENT_NAME",$this->object->getTitle());
954 $tpl->setVariable(
"TXT_NAME",$this->lng->txt(
'name'));
955 $tpl->setVariable(
"TXT_MARK",$this->lng->txt(
'trac_mark'));
956 $tpl->setVariable(
"TXT_COMMENT",$this->lng->txt(
'trac_comment'));
957 $tpl->setVariable(
"TXT_PARTICIPATED",$this->lng->txt(
'event_tbl_participated'));
958 if($this->object->enabledRegistration())
960 $tpl->setVariable(
"TXT_REGISTERED",$this->lng->txt(
'event_tbl_registered'));
963 $members = $members_obj->getParticipants();
965 foreach($members as $user_id)
968 $user_data = $event_part->getUser($user_id);
970 if($this->object->enabledRegistration())
972 $tpl->setCurrentBlock(
"reg_col");
973 $tpl->setVariable(
"REGISTERED",$event_part->isRegistered($user_id) ?
"X" :
"");
974 $tpl->parseCurrentBlock();
976 $tpl->setVariable(
"COMMENT",$user_data[
'comment']);
978 $tpl->setCurrentBlock(
"member_row");
980 $tpl->setVariable(
"LASTNAME",$name[
'lastname']);
981 $tpl->setVariable(
"FIRSTNAME",$name[
'firstname']);
983 $tpl->setVariable(
"MARK",$user_data[
'mark']);
984 $tpl->setVariable(
"PARTICIPATED",$event_part->hasParticipated($user_id) ?
"X" :
"");
985 $tpl->parseCurrentBlock();
988 $this->tpl->setVariable(
"CONTENT",
$tpl->get());
989 $this->tpl->setVariable(
"BODY_ATTRIBUTES",
'onload="window.print()"');
1006 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1008 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
1011 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_list.html',
'Modules/Session');
1012 $this->
__showButton($this->ctrl->getLinkTarget($this,
'exportCSV'),$this->lng->txt(
'event_csv_export'));
1014 include_once
'Modules/Course/classes/class.ilCourseParticipants.php';
1015 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
1017 $this->tpl->addBlockfile(
"EVENTS_TABLE",
"events_table",
"tpl.table.html");
1018 $this->tpl->addBlockfile(
'TBL_CONTENT',
'tbl_content',
'tpl.sess_list_row.html',
'Modules/Session');
1021 $members = $members_obj->getParticipants();
1026 $tbl->setTitle($this->lng->txt(
"event_overview"),
1028 $this->lng->txt(
'obj_usr'));
1029 $this->ctrl->setParameter($this,
'offset',(
int)
$_GET[
'offset']);
1031 $course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs');
1033 foreach($tree->getSubtree($tree->getNodeData(
$course_ref_id),
false,
'sess') as $event_id)
1036 if(!is_object($tmp_event) or $tmp_event->getType() !=
'sess')
1040 $events[] = $tmp_event;
1043 $headerNames = array();
1044 $headerVars = array();
1045 $colWidth = array();
1047 $headerNames[] = $this->lng->txt(
'name');
1048 $headerVars[] =
"name";
1049 $colWidth[] =
'20%';
1051 for ($i = 1; $i <= count($events); $i++)
1053 $headerNames[] = $i;
1054 $headerVars[] =
"event_".$i;
1055 $colWidth[] = 80/count($events).
"%";
1058 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1059 $tbl->setHeaderNames($headerNames);
1060 $tbl->setHeaderVars($headerVars, $this->ctrl->getParameterArray($this,
'eventsList'));
1061 $tbl->setColumnWidth($colWidth);
1063 $tbl->setOrderColumn($_GET[
"sort_by"]);
1064 $tbl->setOrderDirection($_GET[
"sort_order"]);
1065 $tbl->setOffset($_GET[
"offset"]);
1066 $tbl->setLimit($ilUser->getPref(
"hits_per_page"));
1067 $tbl->setMaxCount(count($members));
1068 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1070 $sliced_users = array_slice($members,$_GET[
'offset'],
$_SESSION[
'tbl_limit']);
1071 $tbl->disable(
'sort');
1075 foreach($sliced_users as $user_id)
1077 foreach($events as $event_obj)
1079 $this->tpl->setCurrentBlock(
"eventcols");
1084 $this->tpl->setVariable(
"IMAGE_PARTICIPATED", $event_part->hasParticipated($user_id) ?
1088 $this->tpl->setVariable(
"PARTICIPATED", $event_part->hasParticipated($user_id) ?
1089 $this->lng->txt(
'event_participated') :
1090 $this->lng->txt(
'event_not_participated'));
1093 $this->tpl->parseCurrentBlock();
1096 $this->tpl->setCurrentBlock(
"tbl_content");
1099 $this->tpl->setVariable(
"LASTNAME",$name[
'lastname']);
1100 $this->tpl->setVariable(
"FIRSTNAME",$name[
'firstname']);
1102 $this->tpl->parseCurrentBlock();
1105 $this->tpl->setVariable(
"HEAD_TXT_LEGEND", $this->lng->txt(
"legend"));
1106 $this->tpl->setVariable(
"HEAD_TXT_DIGIT", $this->lng->txt(
"event_digit"));
1107 $this->tpl->setVariable(
"HEAD_TXT_EVENT", $this->lng->txt(
"event"));
1108 $this->tpl->setVariable(
"HEAD_TXT_LOCATION", $this->lng->txt(
"event_location"));
1109 $this->tpl->setVariable(
"HEAD_TXT_DATE_TIME",$this->lng->txt(
"event_date_time"));
1111 foreach($events as $event_obj)
1113 $this->tpl->setCurrentBlock(
"legend_loop");
1114 $this->tpl->setVariable(
"LEGEND_CSS_ROW",
ilUtil::switchColor($counter++,
'tblrow1',
'tblrow2'));
1115 $this->tpl->setVariable(
"LEGEND_DIGIT", $i++);
1116 $this->tpl->setVariable(
"LEGEND_EVENT_TITLE", $event_obj->getTitle());
1117 $this->tpl->setVariable(
"LEGEND_EVENT_DESCRIPTION", $event_obj->getDescription());
1118 $this->tpl->setVariable(
"LEGEND_EVENT_LOCATION", $event_obj->getLocation());
1119 $this->tpl->setVariable(
"LEGEND_EVENT_APPOINTMENT", $event_obj->getFirstAppointment()->appointmentToString());
1120 $this->tpl->parseCurrentBlock();
1134 if(is_object($this->form))
1139 $this->lng->loadLanguageModule(
'dateplaner');
1141 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1143 include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
1147 $this->form->setMultipart(
true);
1148 $this->form->setTableWidth(
'60%');
1149 $this->form->setFormAction($this->ctrl->getFormAction($this));
1153 $title->setValue($this->object->getTitle());
1155 $title->setMaxLength(70);
1156 $title->setRequired(TRUE);
1157 $this->form->addItem(
$title);
1161 $desc->
setValue($this->object->getLongDescription());
1164 $this->form->addItem($desc);
1168 $desc->
setValue($this->object->getLocation());
1171 $this->form->addItem($desc);
1175 $reg->
setChecked($this->object->enabledRegistration() ?
true :
false);
1176 $reg->setOptionTitle($this->lng->txt(
'event_registration_info'));
1177 $this->form->addItem($reg);
1181 $section->setTitle($this->lng->txt(
'event_date_time'));
1184 $this->tpl->addJavaScript(
'./Modules/Session/js/toggle_session_time.js');
1186 $full->
setChecked($this->object->getFirstAppointment()->enabledFulltime() ?
true :
false);
1187 $full->setOptionTitle($this->lng->txt(
'event_fulltime_info'));
1188 $full->setAdditionalAttributes(
'onchange="ilToggleSessionTime(this);"');
1189 $this->form->addItem($full);
1194 $start->setDate($this->object->getFirstAppointment()->getStart());
1195 $start->setShowTime(
true);
1196 $full->addSubItem($start);
1201 $end->setDate($this->object->getFirstAppointment()->getEnd());
1202 $end->setShowTime(
true);
1203 $full->addSubItem($end);
1206 if($a_mode ==
'create')
1208 if(!is_object($this->rec))
1210 include_once(
'./Modules/Session/classes/class.ilEventRecurrence.php');
1213 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
1216 $rec->setRecurrence($this->rec);
1217 $this->form->addItem($rec);
1222 $section->setTitle($this->lng->txt(
'event_tutor_data'));
1225 $tutor_name =
new ilTextInputGUI($this->lng->txt(
'tutor_name'),
'tutor_name');
1226 $tutor_name->
setValue($this->object->getName());
1227 $tutor_name->setSize(20);
1228 $tutor_name->setMaxLength(70);
1229 $this->form->addItem($tutor_name);
1231 $tutor_email =
new ilTextInputGUI($this->lng->txt(
'tutor_email'),
'tutor_email');
1232 $tutor_email->
setValue($this->object->getEmail());
1233 $tutor_email->setSize(20);
1234 $tutor_email->setMaxLength(70);
1235 $this->form->addItem($tutor_email);
1237 $tutor_phone =
new ilTextInputGUI($this->lng->txt(
'tutor_phone'),
'tutor_phone');
1238 $tutor_phone->
setValue($this->object->getPhone());
1239 $tutor_phone->setSize(20);
1240 $tutor_phone->setMaxLength(70);
1241 $this->form->addItem($tutor_phone);
1244 $section->setTitle($this->lng->txt(
'event_further_informations'));
1248 $file->enableFileNameSelection(
'file_name1');
1249 $this->form->addItem(
$file);
1252 $file->enableFileNameSelection(
'file_name2');
1253 $this->form->addItem(
$file);
1256 $file->enableFileNameSelection(
'file_name3');
1257 $this->form->addItem(
$file);
1259 $details =
new ilTextAreaInputGUI($this->lng->txt(
'event_details_workflow'),
'details');
1260 $details->
setValue($this->object->getDetails());
1261 $details->setCols(50);
1262 $details->setRows(4);
1263 $this->form->addItem($details);
1268 $this->form->setTitle($this->lng->txt(
'event_table_create'));
1271 $this->form->addCommandButton(
'save',$this->lng->txt(
'event_btn_add'));
1272 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1277 $this->form->setTitle($this->lng->txt(
'event_table_update'));
1280 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
1281 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1299 $this->
object->getFirstAppointment()->setStartingTime($this->
__toUnix($_POST[
'start'][
'date'],$_POST[
'start'][
'time']));
1300 $this->
object->getFirstAppointment()->setEndingTime($this->
__toUnix($_POST[
'end'][
'date'],$_POST[
'end'][
'time']));
1301 $this->
object->getFirstAppointment()->toggleFullTime((
bool) $_POST[
'fulltime']);
1303 include_once(
'./Services/Calendar/classes/class.ilDate.php');
1304 if($this->object->getFirstAppointment()->isFullday())
1306 $start =
new ilDate($_POST[
'start'][
'date'][
'y'].
'-'.$_POST[
'start'][
'date'][
'm'].
'-'.$_POST[
'start'][
'date'][
'd'],
1308 $this->
object->getFirstAppointment()->setStart($start);
1310 $end =
new ilDate($_POST[
'end'][
'date'][
'y'].
'-'.$_POST[
'end'][
'date'][
'm'].
'-'.$_POST[
'end'][
'date'][
'd'],
1312 $this->
object->getFirstAppointment()->setEnd($end);
1316 $start_dt[
'year'] = (int) $_POST[
'start'][
'date'][
'y'];
1317 $start_dt[
'mon'] = (int) $_POST[
'start'][
'date'][
'm'];
1318 $start_dt[
'mday'] = (int) $_POST[
'start'][
'date'][
'd'];
1319 $start_dt[
'hours'] = (int) $_POST[
'start'][
'time'][
'h'];
1320 $start_dt[
'minutes'] = (int) $_POST[
'start'][
'time'][
'm'];
1323 $this->
object->getFirstAppointment()->setStart($start);
1325 $end_dt[
'year'] = (int) $_POST[
'end'][
'date'][
'y'];
1326 $end_dt[
'mon'] = (int) $_POST[
'end'][
'date'][
'm'];
1327 $end_dt[
'mday'] = (int) $_POST[
'end'][
'date'][
'd'];
1328 $end_dt[
'hours'] = (int) $_POST[
'end'][
'time'][
'h'];
1329 $end_dt[
'minutes'] = (int) $_POST[
'end'][
'time'][
'm'];
1331 $this->
object->getFirstAppointment()->setEnd($end);
1335 $this->files = array();
1337 foreach($_FILES as $name =>
$data)
1339 if(!strlen(
$data[
'tmp_name']))
1344 $filename = strlen($_POST[
'file_name'.$counter]) ?
1345 $_POST[
'file_name'.$counter] :
1354 $this->files[] =
$file;
1365 $this->
object->enableRegistration((
int) $_POST[
'registration']);
1376 include_once(
'./Modules/Session/classes/class.ilSessionRecurrence.php');
1379 switch($_POST[
'frequence'])
1382 $this->rec->setFrequenceType($_POST[
'frequence']);
1383 $this->rec->setInterval((
int) $_POST[
'count_DAILY']);
1387 $this->rec->setFrequenceType($_POST[
'frequence']);
1388 $this->rec->setInterval((
int) $_POST[
'count_WEEKLY']);
1389 if(is_array($_POST[
'byday_WEEKLY']))
1396 $this->rec->setFrequenceType($_POST[
'frequence']);
1397 $this->rec->setInterval((
int) $_POST[
'count_MONTHLY']);
1398 switch((
int) $_POST[
'subtype_MONTHLY'])
1405 switch((
int) $_POST[
'monthly_byday_day'])
1409 $this->rec->setBYSETPOS((
int) $_POST[
'monthly_byday_num']);
1410 $this->rec->setBYDAY(
'MO,TU,WE,TH,FR');
1415 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_byday_num']);
1419 $this->rec->setBYDAY((
int) $_POST[
'monthly_byday_num'].$_POST[
'monthly_byday_day']);
1425 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_bymonthday']);
1431 $this->rec->setFrequenceType($_POST[
'frequence']);
1432 $this->rec->setInterval((
int) $_POST[
'count_YEARLY']);
1433 switch((
int) $_POST[
'subtype_YEARLY'])
1440 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_byday']);
1441 $this->rec->setBYDAY((
int) $_POST[
'yearly_byday_num'].$_POST[
'yearly_byday']);
1445 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_by_monthday']);
1446 $this->rec->setBYMONTHDAY((
int) $_POST[
'yearly_bymonthday']);
1453 $this->rec->setFrequenceUntilCount((
int) $_POST[
'count']);
1466 return mktime($time[
'h'],$time[
'm'],0,$date[
'm'],$date[
'd'],$date[
'y']);
1479 $path = $this->lng->txt(
'path') .
': ';
1481 foreach($tree->getPathFull($a_ref_id,$this->course_ref_id) as $node)
1483 if($node[
'ref_id'] != $a_ref_id)
1490 $path .= $node[
'title'];
1506 if (is_object($this->
object))
1508 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"infoScreen"),
"",
$_GET[
"ref_id"]);
1521 global $ilAccess,$ilTabs,
$tree;
1523 $parent_id = $tree->getParentId($this->object->getRefId());
1525 $tabs_gui->setBackTarget($this->lng->txt(
'back_to_crs_content'),
'repository.php?ref_id='.$parent_id);
1526 $tabs_gui->addTarget(
'info_short',
1527 $this->ctrl->getLinkTarget($this,
'infoScreen'));
1529 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1531 $tabs_gui->addTarget(
'edit_properties',
1532 $this->ctrl->getLinkTarget($this,
'edit'));
1533 $tabs_gui->addTarget(
'crs_materials',
1534 $this->ctrl->getLinkTarget($this,
'materials'));
1535 $tabs_gui->addTarget(
'event_edit_members',
1536 $this->ctrl->getLinkTarget($this,
'members'));
1540 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
1542 $tabs_gui->addTarget(
"perm_settings",
1543 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');