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');
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());
838 foreach($subtypes as $type => $sub_item)
840 if (!in_array($type, array(
"itgr",
"sess")))
843 if ($ilAccess->checkAccess(
"create_".$type,
"", $parent_ref_id, $parent_type))
846 $title = $this->lng->txt(
'obj_'.$type);
847 if ($sub_item[
"plugin"])
849 include_once(
"./Services/Component/classes/class.ilPlugin.php");
853 $subobj[] = array(
'value' => $type,
864 $this->ctrl->setParameter($this,
'ref_id', $parent_ref_id);
867 $this->ctrl->setParameter($this,
'crtcb', $this->ref_id);
869 $this->lng->loadLanguageModule(
'cntr');
870 $this->tpl->setCreationSelector($this->ctrl->getFormAction($this),
871 $subobj,
'create', $this->lng->txt(
'add'));
873 $this->ctrl->setParameter($this,
'ref_id', $this->ref_id);
875 $this->ctrl->setParameter($this,
'crtcb',
'');
881 include_once
'Modules/Session/classes/class.ilEventItems.php';
882 $this->event_items =
new ilEventItems($this->object->getId());
883 $items = $this->event_items->
getItems();
885 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_materials.html',
'Modules/Session');
886 #$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
888 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this,
'materials'));
890 $this->tpl->setVariable(
"COLL_TITLE_IMG_ALT",$this->lng->txt(
'events'));
891 $this->tpl->setVariable(
"TABLE_TITLE",$this->lng->txt(
'event_assign_materials_table'));
892 $this->tpl->setVariable(
"TABLE_INFO",$this->lng->txt(
'event_assign_materials_info'));
894 $materials = array();
895 $nodes = $tree->getSubTree($tree->getNodeData($parent_ref_id));
896 foreach($nodes as $node)
899 if ($node[
'child'] == $parent_ref_id ||
900 $objDefinition->isSideBlock($node[
'type']) ||
901 in_array($node[
'type'], array(
'sess',
'itgr',
'rolf')))
906 if($node[
'type'] ==
'rolf')
911 $node[
"sorthash"] = (int)(!in_array($node[
'ref_id'],$items)).$node[
"title"];
912 $materials[] = $node;
919 foreach($materials as $node)
923 $this->tpl->setCurrentBlock(
"material_row");
926 $this->tpl->setVariable(
'IMG_ALT',$this->lng->txt(
'obj_'.$node[
'type']));
928 $this->tpl->setVariable(
"CHECK_COLL",
ilUtil::formCheckbox(in_array($node[
'ref_id'],$items) ? 1 : 0,
929 'items[]',$node[
'ref_id']));
930 $this->tpl->setVariable(
"COLL_TITLE",$node[
'title']);
932 if(strlen($node[
'description']))
934 $this->tpl->setVariable(
"COLL_DESC",$node[
'description']);
936 $this->tpl->setVariable(
"ASSIGNED_IMG_OK",in_array($node[
'ref_id'],$items) ?
939 $this->tpl->setVariable(
"ASSIGNED_STATUS",$this->lng->txt(
'event_material_assigned'));
940 $this->tpl->setVariable(
"COLL_PATH",$this->
formatPath($node[
'ref_id']));
941 $this->tpl->parseCurrentBlock();
945 $this->tpl->setVariable(
"SELECT_ALL",$this->lng->txt(
'select_all'));
947 $this->tpl->setVariable(
"BTN_SAVE",$this->lng->txt(
'save'));
959 include_once
'./Modules/Session/classes/class.ilEventItems.php';
961 $this->event_items =
new ilEventItems($this->object->getId());
963 $this->event_items->update();
978 $this->tabs_gui->setTabActive(
'event_edit_members');
980 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_members.html',
'Modules/Session');
982 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
984 $toolbar->addButton($this->lng->txt(
'sess_gen_attendance_list'),
985 $this->ctrl->getLinkTarget($this,
'attendanceList'));
987 $this->tpl->setVariable(
'ACTION_BUTTONS',$toolbar->getHTML());
991 include_once
'./Modules/Session/classes/class.ilEventParticipants.php';
997 if(count($admins = $members_obj->getAdmins()))
999 include_once(
'./Modules/Session/classes/class.ilSessionParticipantsTableGUI.php');
1000 if($ilUser->getPref(
'sess_admin_hide'))
1003 $this->ctrl->setParameter($this,
'admin_hide',0);
1004 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1005 $this->lng->txt(
'show'),
1008 $this->ctrl->clearParameters($this);
1013 $this->ctrl->setParameter($this,
'admin_hide',1);
1014 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1015 $this->lng->txt(
'hide'),
1018 $this->ctrl->clearParameters($this);
1021 $table->addCommandButton(
'updateMembers',$this->lng->txt(
'save'));
1022 $table->setTitle($this->lng->txt(
'event_tbl_admins'),
'icon_usr.png',$this->lng->txt(
'event_tbl_admins'));
1023 $table->enableRegistration($this->object->enabledRegistration());
1024 $table->setParticipants($admins);
1026 $this->tpl->setVariable(
'ADMINS',$table->getHTML());
1030 if(count($tutors = $members_obj->getTutors()))
1032 include_once(
'./Modules/Session/classes/class.ilSessionParticipantsTableGUI.php');
1033 if($ilUser->getPref(
'sess_tutor_hide'))
1036 $this->ctrl->setParameter($this,
'tutor_hide',0);
1037 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1038 $this->lng->txt(
'show'),
1041 $this->ctrl->clearParameters($this);
1046 $this->ctrl->setParameter($this,
'tutor_hide',1);
1047 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1048 $this->lng->txt(
'hide'),
1051 $this->ctrl->clearParameters($this);
1053 $table->addCommandButton(
'updateMembers',$this->lng->txt(
'save'));
1054 $table->setTitle($this->lng->txt(
'event_tbl_tutors'),
'icon_usr.png',$this->lng->txt(
'event_tbl_admins'));
1055 $table->enableRegistration($this->object->enabledRegistration());
1056 $table->setParticipants($tutors);
1058 $this->tpl->setVariable(
'TUTORS',$table->getHTML());
1062 if(count($members = $members_obj->getMembers()))
1064 include_once(
'./Modules/Session/classes/class.ilSessionParticipantsTableGUI.php');
1065 if($ilUser->getPref(
'sess_member_hide'))
1068 $this->ctrl->setParameter($this,
'member_hide',0);
1069 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1070 $this->lng->txt(
'show'),
1073 $this->ctrl->clearParameters($this);
1078 $this->ctrl->setParameter($this,
'member_hide',1);
1079 $table->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1080 $this->lng->txt(
'hide'),
1083 $this->ctrl->clearParameters($this);
1085 $table->addCommandButton(
'updateMembers',$this->lng->txt(
'save'));
1086 $table->setTitle($this->lng->txt(
'event_tbl_members'),
'icon_usr.png',$this->lng->txt(
'event_tbl_admins'));
1087 $table->enableRegistration($this->object->enabledRegistration());
1088 $table->setParticipants($members);
1090 $this->tpl->setVariable(
'MEMBERS',$table->getHTML());
1109 if(isset(
$_GET[
'admin_hide']))
1111 $ilUser->writePref(
'sess_admin_hide',(
int)
$_GET[
'admin_hide']);
1113 if(isset(
$_GET[
'tutor_hide']))
1115 $ilUser->writePref(
'sess_tutor_hide',(
int)
$_GET[
'tutor_hide']);
1117 if(isset(
$_GET[
'member_hide']))
1119 $ilUser->writePref(
'sess_member_hide',(
int)
$_GET[
'member_hide']);
1140 $_POST[
'participants'] = is_array(
$_POST[
'participants']) ?
$_POST[
'participants'] : array();
1142 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
1144 $visible =
$_POST[
'visible_participants'] ?
$_POST[
'visible_participants'] : array();
1145 foreach($visible as $user)
1151 $part->setParticipated(isset(
$_POST[
'participants'][$user]) ?
true :
false);
1153 $part->updateUser();
1167 global
$tpl,$ilTabs;
1170 $ilTabs->setTabActive(
'event_edit_members');
1173 $form = $list->initForm(
'printAttendanceList');
1174 $tpl->setContent($form->getHTML());
1186 include_once
'Services/Membership/classes/class.ilAttendanceList.php';
1188 $list->setId(
'sessattlst');
1190 $event_app = $this->
object->getFirstAppointment();
1194 $desc .=
" ".$this->object->getTitle();
1195 $list->setTitle($this->lng->txt(
'sess_attendance_list'), $desc);
1197 $list->addPreset(
'mark', $this->lng->txt(
'trac_mark'),
true);
1198 $list->addPreset(
'comment', $this->lng->txt(
'trac_comment'),
true);
1199 if($this->object->enabledRegistration())
1201 $list->addPreset(
'registered', $this->lng->txt(
'event_tbl_registered'),
true);
1203 $list->addPreset(
'participated', $this->lng->txt(
'event_tbl_participated'),
true);
1204 $list->addBlank($this->lng->txt(
'sess_signature'));
1220 $list->initFromForm();
1221 $list->setCallback(array($this,
'getAttendanceListUserData'));
1223 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
1226 echo $list->getFullscreenHTML();
1237 $data = $this->event_part->getUser($a_user_id);
1239 $this->lng->txt(
'yes') :
1240 $this->lng->txt(
'no');
1241 $data[
'participated'] =
$data[
'participated'] ?
1242 $this->lng->txt(
'yes') :
1243 $this->lng->txt(
'no');
1258 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1260 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
1263 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.sess_list.html',
'Modules/Session');
1264 $this->
__showButton($this->ctrl->getLinkTarget($this,
'exportCSV'),$this->lng->txt(
'event_csv_export'));
1266 include_once
'Modules/Session/classes/class.ilEventParticipants.php';
1268 $this->tpl->addBlockfile(
"EVENTS_TABLE",
"events_table",
"tpl.table.html");
1269 $this->tpl->addBlockfile(
'TBL_CONTENT',
'tbl_content',
'tpl.sess_list_row.html',
'Modules/Session');
1272 $members = $members_obj->getParticipants();
1277 $tbl->setTitle($this->lng->txt(
"event_overview"),
1279 $this->lng->txt(
'obj_usr'));
1280 $this->ctrl->setParameter($this,
'offset',(
int)
$_GET[
'offset']);
1282 $course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs');
1284 foreach($tree->getSubtree($tree->getNodeData($course_ref_id),
false,
'sess') as $event_id)
1287 if(!is_object($tmp_event) or $tmp_event->getType() !=
'sess')
1291 $events[] = $tmp_event;
1294 $headerNames = array();
1295 $headerVars = array();
1296 $colWidth = array();
1298 $headerNames[] = $this->lng->txt(
'name');
1299 $headerVars[] =
"name";
1300 $colWidth[] =
'20%';
1302 for ($i = 1; $i <= count($events); $i++)
1304 $headerNames[] = $i;
1305 $headerVars[] =
"event_".$i;
1306 $colWidth[] = 80/count($events).
"%";
1309 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1310 $tbl->setHeaderNames($headerNames);
1311 $tbl->setHeaderVars($headerVars, $this->ctrl->getParameterArray($this,
'eventsList'));
1312 $tbl->setColumnWidth($colWidth);
1314 $tbl->setOrderColumn($_GET[
"sort_by"]);
1315 $tbl->setOrderDirection($_GET[
"sort_order"]);
1316 $tbl->setOffset($_GET[
"offset"]);
1317 $tbl->setLimit($ilUser->getPref(
"hits_per_page"));
1318 $tbl->setMaxCount(count($members));
1319 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1321 $sliced_users = array_slice($members,$_GET[
'offset'],
$_SESSION[
'tbl_limit']);
1322 $tbl->disable(
'sort');
1326 foreach($sliced_users as $user_id)
1328 foreach($events as $event_obj)
1330 $this->tpl->setCurrentBlock(
"eventcols");
1335 $this->tpl->setVariable(
"IMAGE_PARTICIPATED", $event_part->hasParticipated($user_id) ?
1339 $this->tpl->setVariable(
"PARTICIPATED", $event_part->hasParticipated($user_id) ?
1340 $this->lng->txt(
'event_participated') :
1341 $this->lng->txt(
'event_not_participated'));
1344 $this->tpl->parseCurrentBlock();
1347 $this->tpl->setCurrentBlock(
"tbl_content");
1350 $this->tpl->setVariable(
"LASTNAME",$name[
'lastname']);
1351 $this->tpl->setVariable(
"FIRSTNAME",$name[
'firstname']);
1353 $this->tpl->parseCurrentBlock();
1356 $this->tpl->setVariable(
"HEAD_TXT_LEGEND", $this->lng->txt(
"legend"));
1357 $this->tpl->setVariable(
"HEAD_TXT_DIGIT", $this->lng->txt(
"event_digit"));
1358 $this->tpl->setVariable(
"HEAD_TXT_EVENT", $this->lng->txt(
"event"));
1359 $this->tpl->setVariable(
"HEAD_TXT_LOCATION", $this->lng->txt(
"event_location"));
1360 $this->tpl->setVariable(
"HEAD_TXT_DATE_TIME",$this->lng->txt(
"event_date_time"));
1362 foreach($events as $event_obj)
1364 $this->tpl->setCurrentBlock(
"legend_loop");
1365 $this->tpl->setVariable(
"LEGEND_CSS_ROW",
ilUtil::switchColor($counter++,
'tblrow1',
'tblrow2'));
1366 $this->tpl->setVariable(
"LEGEND_DIGIT", $i++);
1367 $this->tpl->setVariable(
"LEGEND_EVENT_TITLE", $event_obj->getTitle());
1368 $this->tpl->setVariable(
"LEGEND_EVENT_DESCRIPTION", $event_obj->getDescription());
1369 $this->tpl->setVariable(
"LEGEND_EVENT_LOCATION", $event_obj->getLocation());
1370 $this->tpl->setVariable(
"LEGEND_EVENT_APPOINTMENT", $event_obj->getFirstAppointment()->appointmentToString());
1371 $this->tpl->parseCurrentBlock();
1385 if(is_object($this->form))
1390 $this->lng->loadLanguageModule(
'dateplaner');
1392 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1394 include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
1398 $this->form->setMultipart(
true);
1399 $this->form->setTableWidth(
'600px');
1400 $this->form->setFormAction($this->ctrl->getFormAction($this));
1401 $this->form->setMultipart(
true);
1411 $this->lng->loadLanguageModule(
'dateplaner');
1412 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
1413 #$this->tpl->addJavaScript('./Modules/Session/js/toggle_session_time.js');
1414 $this->tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
1416 $dur->
setStartText($this->lng->txt(
'event_start_date'));
1417 $dur->setEndText($this->lng->txt(
'event_end_date'));
1418 $dur->enableToggleFullTime(
1419 $this->lng->txt(
'event_fulltime_info'),
1420 $this->
object->getFirstAppointment()->enabledFulltime() ?
true : false
1422 $dur->setMinuteStepSize(5);
1423 $dur->setShowTime(
true);
1424 $dur->setShowDate(
true);
1425 $dur->setStart($this->object->getFirstAppointment()->getStart());
1426 $dur->setEnd($this->object->getFirstAppointment()->getEnd());
1428 $this->form->addItem($dur);
1447 if($a_mode ==
'create')
1449 if(!is_object($this->rec))
1451 include_once(
'./Modules/Session/classes/class.ilEventRecurrence.php');
1454 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
1457 $rec->setRecurrence($this->rec);
1458 $this->form->addItem($rec);
1462 $section->setTitle($this->lng->txt(
'event_section_information'));
1467 $title->setValue($this->object->getTitle());
1469 $title->setMaxLength(70);
1470 $this->form->addItem(
$title);
1474 $desc->
setValue($this->object->getLongDescription());
1477 $this->form->addItem($desc);
1481 $desc->
setValue($this->object->getLocation());
1484 $this->form->addItem($desc);
1487 $details =
new ilTextAreaInputGUI($this->lng->txt(
'event_details_workflow'),
'details');
1488 $details->
setValue($this->object->getDetails());
1489 $details->setCols(50);
1490 $details->setRows(4);
1491 $this->form->addItem($details);
1495 $section->setTitle($this->lng->txt(
'event_tutor_data'));
1499 $tutor_name =
new ilTextInputGUI($this->lng->txt(
'tutor_name'),
'tutor_name');
1500 $tutor_name->
setValue($this->object->getName());
1501 $tutor_name->setSize(20);
1502 $tutor_name->setMaxLength(70);
1503 $this->form->addItem($tutor_name);
1506 $tutor_email =
new ilTextInputGUI($this->lng->txt(
'tutor_email'),
'tutor_email');
1507 $tutor_email->
setValue($this->object->getEmail());
1508 $tutor_email->setSize(20);
1509 $tutor_email->setMaxLength(70);
1510 $this->form->addItem($tutor_email);
1513 $tutor_phone =
new ilTextInputGUI($this->lng->txt(
'tutor_phone'),
'tutor_phone');
1514 $tutor_phone->
setValue($this->object->getPhone());
1515 $tutor_phone->setSize(20);
1516 $tutor_phone->setMaxLength(70);
1517 $this->form->addItem($tutor_phone);
1520 $section->setTitle($this->lng->txt(
'crs_further_settings'));
1525 $reg->
setChecked($this->object->enabledRegistration() ?
true :
false);
1526 $reg->setOptionTitle($this->lng->txt(
'event_registration_info'));
1527 $this->form->addItem($reg);
1531 $section->setTitle($this->lng->txt(
'event_assign_files'));
1535 $files->setFilenames(array(0 =>
''));
1536 $this->form->addItem(
$files);
1541 $this->form->setTitle($this->lng->txt(
'event_table_create'));
1544 $this->form->addCommandButton(
'save',$this->lng->txt(
'event_btn_add'));
1545 $this->form->addCommandButton(
'saveAndAssignMaterials',$this->lng->txt(
'event_btn_add_edit'));
1546 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1551 $this->form->setTitle($this->lng->txt(
'event_table_update'));
1554 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
1555 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1573 $this->
object->getFirstAppointment()->setStartingTime($this->
__toUnix(
$_POST[
'event'][
'start'][
'date'],
$_POST[
'event'][
'start'][
'time']));
1574 $this->
object->getFirstAppointment()->setEndingTime($this->
__toUnix(
$_POST[
'event'][
'end'][
'date'],
$_POST[
'event'][
'end'][
'time']));
1575 $this->
object->getFirstAppointment()->toggleFullTime((
bool)
$_POST[
'event'][
'fulltime']);
1577 include_once(
'./Services/Calendar/classes/class.ilDate.php');
1578 if($this->object->getFirstAppointment()->isFullday())
1580 $start =
new ilDate($_POST[
'event'][
'start'][
'date'][
'y'].
'-'.$_POST[
'event'][
'start'][
'date'][
'm'].
'-'.$_POST[
'event'][
'start'][
'date'][
'd'],
1582 $this->
object->getFirstAppointment()->setStart($start);
1584 $end =
new ilDate($_POST[
'event'][
'end'][
'date'][
'y'].
'-'.$_POST[
'event'][
'end'][
'date'][
'm'].
'-'.$_POST[
'event'][
'end'][
'date'][
'd'],
1586 $this->
object->getFirstAppointment()->setEnd($end);
1590 $start_dt[
'year'] = (int) $_POST[
'event'][
'start'][
'date'][
'y'];
1591 $start_dt[
'mon'] = (int) $_POST[
'event'][
'start'][
'date'][
'm'];
1592 $start_dt[
'mday'] = (int) $_POST[
'event'][
'start'][
'date'][
'd'];
1593 $start_dt[
'hours'] = (int) $_POST[
'event'][
'start'][
'time'][
'h'];
1594 $start_dt[
'minutes'] = (int) $_POST[
'event'][
'start'][
'time'][
'm'];
1597 $this->
object->getFirstAppointment()->setStart($start);
1599 $end_dt[
'year'] = (int) $_POST[
'event'][
'end'][
'date'][
'y'];
1600 $end_dt[
'mon'] = (int) $_POST[
'event'][
'end'][
'date'][
'm'];
1601 $end_dt[
'mday'] = (int) $_POST[
'event'][
'end'][
'date'][
'd'];
1602 $end_dt[
'hours'] = (int) $_POST[
'event'][
'end'][
'time'][
'h'];
1603 $end_dt[
'minutes'] = (int) $_POST[
'event'][
'end'][
'time'][
'm'];
1605 $this->
object->getFirstAppointment()->setEnd($end);
1615 $this->
object->enableRegistration((
int) $_POST[
'registration']);
1626 include_once(
'./Modules/Session/classes/class.ilSessionRecurrence.php');
1629 switch(
$_POST[
'frequence'])
1632 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1633 $this->rec->setInterval((
int)
$_POST[
'count_DAILY']);
1637 $this->rec->setFrequenceType($_POST[
'frequence']);
1638 $this->rec->setInterval((
int) $_POST[
'count_WEEKLY']);
1639 if(is_array($_POST[
'byday_WEEKLY']))
1646 $this->rec->setFrequenceType($_POST[
'frequence']);
1647 $this->rec->setInterval((
int) $_POST[
'count_MONTHLY']);
1648 switch((
int) $_POST[
'subtype_MONTHLY'])
1655 switch((
int) $_POST[
'monthly_byday_day'])
1659 $this->rec->setBYSETPOS((
int) $_POST[
'monthly_byday_num']);
1660 $this->rec->setBYDAY(
'MO,TU,WE,TH,FR');
1665 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_byday_num']);
1669 $this->rec->setBYDAY((
int) $_POST[
'monthly_byday_num'].$_POST[
'monthly_byday_day']);
1675 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_bymonthday']);
1681 $this->rec->setFrequenceType($_POST[
'frequence']);
1682 $this->rec->setInterval((
int) $_POST[
'count_YEARLY']);
1683 switch((
int) $_POST[
'subtype_YEARLY'])
1690 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_byday']);
1691 $this->rec->setBYDAY((
int) $_POST[
'yearly_byday_num'].$_POST[
'yearly_byday']);
1695 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_by_monthday']);
1696 $this->rec->setBYMONTHDAY((
int) $_POST[
'yearly_bymonthday']);
1703 switch((
int)
$_POST[
'until_type'])
1706 $this->rec->setFrequenceUntilDate(null);
1711 $this->rec->setFrequenceUntilDate(null);
1712 $this->rec->setFrequenceUntilCount((
int) $_POST[
'count']);
1716 $end_dt[
'year'] = (int) $_POST[
'until_end'][
'date'][
'y'];
1717 $end_dt[
'mon'] = (int) $_POST[
'until_end'][
'date'][
'm'];
1718 $end_dt[
'mday'] = (int) $_POST[
'until_end'][
'date'][
'd'];
1720 $this->rec->setFrequenceUntilCount(0);
1736 return mktime($time[
'h'],$time[
'm'],0,$date[
'm'],$date[
'd'],$date[
'y']);
1749 $path = $this->lng->txt(
'path') .
': ';
1751 foreach($tree->getPathFull($a_ref_id,$this->container_ref_id) as $node)
1753 if($node[
'ref_id'] != $a_ref_id)
1760 $path .= $node[
'title'];
1776 if (is_object($this->
object))
1778 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
"infoScreen"),
"",
$_GET[
"ref_id"]);
1792 $ilHelp->setScreenIdComponent(
"sess");
1794 $parent_id = $tree->getParentId($this->object->getRefId());
1799 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $parent_id);
1800 $tabs_gui->setBackTarget($this->lng->txt(
'back_to_'.$parent_type.
'_content'),
1801 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
1802 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
1804 $tabs_gui->addTarget(
'info_short',
1805 $this->ctrl->getLinkTarget($this,
'infoScreen'));
1807 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1809 $tabs_gui->addTarget(
'settings',
1810 $this->ctrl->getLinkTarget($this,
'edit'));
1811 $tabs_gui->addTarget(
'crs_materials',
1812 $this->ctrl->getLinkTarget($this,
'materials'));
1813 $tabs_gui->addTarget(
'event_edit_members',
1814 $this->ctrl->getLinkTarget($this,
'members'));
1818 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1820 $ilTabs->addTarget(
"export",
1821 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""),
"",
"ilexportgui");
1826 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
1828 $tabs_gui->addTarget(
"perm_settings",
1829 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1842 include_once
'./Modules/Session/classes/class.ilEventItems.php';
1843 $event_items =
new ilEventItems($this->object->getId());
1845 $event_items->update();