21include_once(
'./Services/Object/classes/class.ilObjectGUI.php');
 
   22include_once(
'./Modules/Session/classes/class.ilObjSession.php');
 
   23include_once(
'./Modules/Session/classes/class.ilSessionFile.php');
 
   64    public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output = 
true)
 
   76        $this->lng->loadLanguageModule(
"event");
 
   77        $this->lng->loadLanguageModule(
'crs');
 
   78        $this->lng->loadLanguageModule(
'trac');
 
   79        $this->lng->loadLanguageModule(
'sess');
 
   84        $this->
http = $DIC->http();
 
   85        $this->logger = 
$DIC->logger()->sess();
 
  102        $next_class = $this->ctrl->getNextClass($this);
 
  103        $cmd = $this->ctrl->getCmd();
 
  107            $GLOBALS[
'DIC']->access()->checkAccess(
'read', 
'', 
$_GET[
'ref_id'])
 
  109            $GLOBALS[
'DIC'][
'ilNavigationHistory']->addItem(
 
  110                (
int) 
$_GET[
'ref_id'],
 
  117        switch ($next_class) {
 
  118            case 'ilsessionmembershipgui':
 
  119                $this->tabs_gui->activateTab(
'members');
 
  120                include_once 
'./Modules/Session/classes/class.ilSessionMembershipGUI.php';
 
  122                $this->ctrl->forwardCommand($mem_gui);
 
  125            case "ilinfoscreengui":
 
  130            case 'ilobjectmetadatagui':
 
  132                $this->tabs_gui->activateTab(
'metadata');
 
  134                $this->ctrl->forwardCommand($md_gui);
 
  138            case 'ilpermissiongui':
 
  139                $this->tabs_gui->setTabActive(
'perm_settings');
 
  140                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  142                $ret = $this->ctrl->forwardCommand($perm_gui);
 
  145            case 'ilobjectcopygui':
 
  146                include_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
  148                $cp->setType(
'sess');
 
  149                $this->ctrl->forwardCommand($cp);
 
  154                $this->tabs_gui->setTabActive(
"export");
 
  155                include_once(
"./Services/Export/classes/class.ilExportGUI.php");
 
  157                $exp_gui->addFormat(
"xml");
 
  158                $ret = $this->ctrl->forwardCommand($exp_gui);
 
  162            case "ilcommonactiondispatchergui":
 
  163                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  165                $this->ctrl->forwardCommand($gui);
 
  168            case 'ilmembershipgui':
 
  169                $this->ctrl->setReturn($this, 
'members');
 
  170                include_once 
'./Services/Membership/classes/class.ilMembershipMailGUI.php';
 
  172                $this->ctrl->forwardCommand($mem);
 
  175            case "illearningprogressgui":
 
  176                include_once 
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
 
  179                    $this->object->getRefId(),
 
  182                $this->ctrl->forwardCommand($new_gui);
 
  183                $this->tabs_gui->setTabActive(
'learning_progress');
 
  186            case "ilpropertyformgui":
 
  188                if (!is_object($this->
object)) {
 
  193                $ilCtrl->forwardCommand($form);
 
  196            case "ilbookinggatewaygui":
 
  198                $parent_id = 
$tree->getParentId((
int) $_REQUEST[
'ref_id']);
 
  200                $this->tabs_gui->activateTab(
'obj_tool_setting_booking');
 
  202                $this->ctrl->forwardCommand($gui);
 
  206                if ($cmd == 
"applyFilter") {
 
  207                    $cmd == 
"applyFilter";
 
  209                } elseif ($cmd == 
"resetFilter") {
 
  210                    $cmd == 
"resetFilter";
 
  233        $this->ctrl->redirectByClass(
'ilSessionMembershipGUI', 
'participants');
 
  250        parent::prepareOutput($a_show_subobjects);
 
  253            $title = strlen($this->object->getTitle()) ? (
': ' . $this->
object->getTitle()) : 
'';
 
  255            include_once 
'./Modules/Session/classes/class.ilSessionAppointment.php';
 
  256            $this->tpl->setTitle(
 
  257                $this->object->getFirstAppointment()->appointmentToString() . $title
 
  274        $ilAppEventHandler = 
$DIC[
'ilAppEventHandler'];
 
  278        include_once 
'./Services/Membership/classes/class.ilParticipants.php';
 
  281        include_once 
'./Modules/Session/classes/class.ilEventParticipants.php';
 
  283        $event_part->updateExcusedForUser(
$ilUser->getId(), 
false);
 
  288            (count($event_part->getRegistered()) >= $this->getCurrentObject()->getRegistrationMaxUsers())
 
  290            include_once 
'./Modules/Session/classes/class.ilSessionWaitingList.php';
 
  292            $wait->addToList(
$ilUser->getId());
 
  294            $this->ctrl->redirect($this, 
'infoScreen');
 
  301                $this->ctrl->redirect($this, 
'info');
 
  305                $part->register(
$ilUser->getId());
 
  306                ilUtil::sendSuccess($this->lng->txt(
'event_registered'), 
true);
 
  308                $ilAppEventHandler->raise(
 
  318                $this->ctrl->redirect($this, 
'infoScreen');
 
  322                ilUtil::sendSuccess($this->lng->txt(
'sess_registered_confirm'), 
true);
 
  323                $part->addSubscriber(
$ilUser->getId());
 
  325                $ilAppEventHandler->raise(
 
  335                $this->ctrl->redirect($this, 
'infoScreen');
 
  353            $this->ctrl->redirect($this, 
'infoScreen');
 
  356        include_once 
'./Modules/Session/classes/class.ilEventParticipants.php';
 
  361            ilUtil::sendSuccess($this->lng->txt(
'event_unregistered'), 
true);
 
  364            ilUtil::sendSuccess($this->lng->txt(
'event_registered'), 
true);
 
  367        $this->ctrl->redirect($this, 
'infoScreen');
 
  382        $ilAppEventHandler = 
$DIC[
'ilAppEventHandler'];
 
  384        include_once 
'./Modules/Session/classes/class.ilSessionParticipants.php';
 
  386        if ($part->isSubscriber(
$ilUser->getId())) {
 
  387            $part->deleteSubscriber(
$ilUser->getId());
 
  390        $part->unregister(
$ilUser->getId());
 
  392        if ($a_refuse_participation) {
 
  393            $event_part = new \ilEventParticipants($this->object->getId());
 
  394            $event_part->updateExcusedForUser(
$ilUser->getId(), 
true);
 
  398        include_once 
'./Modules/Session/classes/class.ilSessionWaitingList.php';
 
  404        $has_access = 
$GLOBALS[
'DIC']->access()->checkAccessOfUser(
 
  408            $this->object->getRefId()
 
  411            $parent = 
$GLOBALS[
'DIC']->repositoryTree()->getParentId($this->object->getRefId());
 
  416        $ilAppEventHandler->raise(
 
  425        if ($a_refuse_participation) {
 
  428            ilUtil::sendSuccess($this->lng->txt(
'event_unregistered'), 
true);
 
  430        $this->ctrl->returnToParent($this);
 
  441    public static function _goto($a_target)
 
  445        $ilAccess = 
$DIC->access();
 
  450        $parts = explode(
'_', $a_target);
 
  451        $a_target = $parts[0];
 
  453        if ($ilAccess->checkAccess(
'write', 
'', $a_target)) {
 
  454            if (isset($parts[1]) && 
'part' === $parts[1]) {
 
  455                $ilCtrl->initBaseClass(
'ilRepositoryGUI');
 
  456                $ilCtrl->setParameterByClass(
'ilSessionMembershipGUI', 
'ref_id', (
int) $a_target);
 
  457                $ilCtrl->setTargetScript(
'ilias.php');
 
  458                $ilCtrl->redirectByClass(array(
'ilRepositoryGUI', __CLASS__, 
'ilSessionMembershipGUI'));
 
  462        if ($ilAccess->checkAccess(
'visible', 
"", $a_target)) {
 
  464        } elseif ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID)) {
 
  467                    $lng->txt(
"msg_no_perm_read_item"),
 
  485        $this->ctrl->setCmd(
"showSummary");
 
  486        $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
  504        if ($course_ref_id = 
$tree->checkForParentType($this->object->getRefId(), 
'crs')) {
 
  506            include_once 
"Services/Object/classes/class.ilObjectActivation.php";
 
  509            include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
 
  510            include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
 
  520                $this->object->getRefId()
 
  557            $ilToolbar = 
$DIC[
'ilToolbar'];
 
  564        include_once 
'./Modules/Session/classes/class.ilSessionWaitingList.php';
 
  566        include_once 
'./Services/Membership/classes/class.ilParticipants.php';
 
  569        include_once 
'./Modules/Session/classes/class.ilEventParticipants.php';
 
  572        $btn_attend->addCSSClass(
"btn-primary");
 
  573        $this->ctrl->setParameter($this, 
"ref_id", $this->
getCurrentObject()->getRefId());
 
  576        $btn_excused->setCaption($this->lng->txt(
'sess_bt_refuse'), 
false);
 
  577        $btn_excused->setUrl($this->ctrl->getLinkTarget($this, 
'refuseParticipation'));
 
  581            $ilToolbar->addButtonInstance($btn_excused);
 
  583        } elseif ($part->isSubscriber(
$ilUser->getId())) {
 
  584            $ilToolbar->addButtonInstance($btn_excused);
 
  587            $ilToolbar->addButtonInstance($btn_excused);
 
  596            (count($event_part->getRegistered()) >= $this->getCurrentObject()->getRegistrationMaxUsers())
 
  600                $btn_attend->setCaption($this->lng->txt(
"mem_add_to_wl"), 
false);
 
  601                $btn_attend->setUrl($this->ctrl->getLinkTargetByClass(array(
"ilRepositoryGUI", 
"ilObjSessionGUI"), 
"register"));
 
  602                $ilToolbar->addButtonInstance($btn_attend);
 
  603                if (!$event_part->isExcused(
$ilUser->getId())) {
 
  604                    $ilToolbar->addButtonInstance($btn_excused);
 
  612            if (!isset(
$_SESSION[
'sess_hide_info'])) {
 
  614                $btn_attend->setCaption($this->lng->txt(
"join_session"), 
false);
 
  615                $btn_attend->setUrl($this->ctrl->getLinkTargetByClass(array(
"ilRepositoryGUI", 
"ilObjSessionGUI"), 
"register"));
 
  616                $ilToolbar->addButtonInstance($btn_attend);
 
  617                if (!$event_part->isExcused(
$ilUser->getId())) {
 
  618                    $ilToolbar->addButtonInstance($btn_excused);
 
  639        $ilAccess = 
$DIC[
'ilAccess'];
 
  643        $ilToolbar = 
$DIC[
'ilToolbar'];
 
  647        $this->tabs_gui->setTabActive(
'info_short');
 
  651        include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
  653        $info->enableBookingInfo(
true);
 
  656        $parent_id = 
$tree->getParentId($this->object->getRefId());
 
  660            $this->object->getId(),
 
  664        $lng->loadLanguageModule(
"cntr");
 
  667        foreach ($eventItems as $item) {
 
  669            $list_gui->setContainerObject($this);
 
  673            $html .= $list_gui->getListItemHTML(
 
  682            $info->addSection($this->lng->txt(
'event_materials'));
 
  692        if (strlen($this->object->getLocation()) or strlen($this->object->getDetails())) {
 
  693            $info->addSection($this->lng->txt(
'event_section_information'));
 
  695        if (strlen(
$location = $this->object->getLocation())) {
 
  697                $this->lng->txt(
'event_location'),
 
  701        if (strlen($this->object->getDetails())) {
 
  703                $this->lng->txt(
'event_details_workflow'),
 
  709        $record_gui->setInfoObject($info);
 
  710        $record_gui->parse();
 
  713        $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
 
  717        if ($this->object->hasTutorSettings()) {
 
  718            $info->addSection($this->lng->txt(
'event_tutor_data'));
 
  719            if (strlen($fullname = $this->object->getName())) {
 
  721                    $this->lng->txt(
'event_lecturer'),
 
  725            if (strlen(
$email = $this->object->getEmail())) {
 
  727                    $this->lng->txt(
'tutor_email'),
 
  731            if (strlen($phone = $this->object->getPhone())) {
 
  733                    $this->lng->txt(
'tutor_phone'),
 
  741        $contacts = $parts->getContacts();
 
  742        if (count($contacts) > 0) {
 
  743            $info->addSection($this->lng->txt(
"crs_mem_contacts"));
 
  744            foreach ($contacts as $contact) {
 
  746                $pgui->setBackUrl($this->ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
 
  747                $pgui->setEmbedded(
true);
 
  748                $info->addProperty(
"", $pgui->getHTML());
 
  753        $this->ctrl->forwardCommand($info);
 
  756        require_once 
'Services/Tracking/classes/class.ilChangeEvent.php';
 
  758            $this->object->getType(),
 
  759            $this->object->getRefId(),
 
  760            $this->object->getId(),
 
  780        if (!is_object($this->
object)) {
 
  795        $this->ctrl->setParameter($this, 
'ref_id', $this->object->getRefId());
 
  796        $this->ctrl->setParameter($this, 
'new_type', 
'');
 
  797        $this->ctrl->redirect($this, 
'materials');
 
  816        $this->ctrl->saveParameter($this, 
"new_type");
 
  820        if (!$form->checkInput()) {
 
  821            $form->setValuesByPost();
 
  822            $ilErr->setMessage($this->lng->txt(
'err_check_input'));
 
  831            $ilErr->setMessage($this->lng->txt(
'err_check_input'));
 
  837        $this->
object->validate();
 
  838        $this->
object->getFirstAppointment()->validate();
 
  840        if (strlen(
$ilErr->getMessage())) {
 
  842            $this->form->setValuesByPost();
 
  847        $this->
object->create();
 
  848        $this->
object->createReference();
 
  849        $this->
object->putInTree(
$_GET[
"ref_id"]);
 
  850        $this->
object->setPermissions(
$_GET[
"ref_id"]);
 
  853            $this->object->getId(),
 
  860            $this->record_gui->writeEditForm($this->object->getId());
 
  867            $this->
object->applyDidacticTemplate($dtpl);
 
  871        if (!$this->form->getInput(
"lp_preset")) {
 
  872            include_once 
"Services/Tracking/classes/class.ilLPObjSettings.php";
 
  875            $lp_obj_settings->update(
false);
 
  879        $this->
object->getFirstAppointment()->setSessionId($this->object->getId());
 
  880        $this->
object->getFirstAppointment()->create();
 
  884        $DIC->object()->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
 
  888        if ($a_redirect_on_success) {
 
  890            $this->ctrl->returnToParent($this);
 
  902        include_once 
'./Modules/Session/classes/class.ilEventItems.php';
 
  904        $items = $ev->getItems();
 
  908            if (!isset($_FILES[
'files'][
'name'][$counter])) {
 
  911            if (!strlen($_FILES[
'files'][
'name'][$counter])) {
 
  916            include_once 
'./Modules/File/classes/class.ilObjFile.php';
 
  919            $file->setDescription(
'');
 
  921            $file->setFileType($_FILES[
'files'][
'type'][$counter]);
 
  922            $file->setFileSize($_FILES[
'files'][
'size'][$counter]);
 
  924            $new_ref_id = $file->createReference();
 
  925            $file->putInTree(
$tree->getParentId($this->object->getRefId()));
 
  926            $file->setPermissions(
$tree->getParentId($this->object->getRefId()));
 
  927            $file->createDirectory();
 
  929            $upload = 
$DIC->upload();
 
  930            if (!$upload->hasBeenProcessed()) {
 
  933            $file->getUploadFile(
 
  934                $_FILES[
'files'][
'tmp_name'][$counter],
 
  935                $_FILES[
'files'][
'name'][$counter]
 
  938            $items[] = $new_ref_id;
 
  942        $ev->setItems($items);
 
  961        if (!$this->rec->getFrequenceType()) {
 
  964        include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php');
 
  967        $period_start = clone $this->
object->getFirstAppointment()->getStart();
 
  970        $period_end = clone $this->
object->getFirstAppointment()->getStart();
 
  972        $date_list = $calc->calculateDateList($period_start, $period_end);
 
  974        $period_diff = $this->
object->getFirstAppointment()->getEnd()->get(
IL_CAL_UNIX) -
 
  975            $this->
object->getFirstAppointment()->getStart()->get(
IL_CAL_UNIX);
 
  976        $parent_id = 
$tree->getParentId($this->object->getRefId());
 
  978        include_once 
'./Modules/Session/classes/class.ilEventItems.php';
 
  980        $eitems = $evi->getItems();
 
  983        foreach ($date_list->get() as $date) {
 
  988            $new_obj = $this->
object->cloneObject($parent_id);
 
  993                $new_obj->applyDidacticTemplate($dtpl);
 
  997            $new_obj->getFirstAppointment()->setStartingTime($date->get(
IL_CAL_UNIX));
 
  998            $new_obj->getFirstAppointment()->setEndingTime($date->get(
IL_CAL_UNIX) + $period_diff);
 
  999            $new_obj->getFirstAppointment()->update();
 
 1000            $new_obj->update(
true);
 
 1003            if (!$a_activate_lp) {
 
 1004                include_once 
"Services/Tracking/classes/class.ilLPObjSettings.php";
 
 1007                $lp_obj_settings->update(
false);
 
 1011            $new_evi->setItems($eitems);
 
 1026        $this->tabs_gui->setTabActive(
'settings');
 
 1029        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.sess_edit.html', 
'Modules/Session');
 
 1030        $this->tpl->setVariable(
'EVENT_EDIT_TABLE', $this->form->getHTML());
 
 1032        if (!count($this->object->getFiles())) {
 
 1036        foreach ($this->object->getFiles() as $file) {
 
 1037            $table_data[
'id'] = $file->getFileId();
 
 1038            $table_data[
'filename'] = $file->getFileName();
 
 1039            $table_data[
'filetype'] = $file->getFileType();
 
 1040            $table_data[
'filesize'] = $file->getFileSize();
 
 1042            $rows[] = $table_data;
 
 1045        include_once(
"./Modules/Session/classes/class.ilSessionFileTableGUI.php");
 
 1047        $table_gui->setTitle($this->lng->txt(
"event_files"));
 
 1048        $table_gui->setData(
$rows);
 
 1049        $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
 1050        $table_gui->addMultiCommand(
"confirmDeleteFiles", $this->lng->txt(
"delete"));
 
 1051        $table_gui->setSelectAllCheckbox(
"file_id");
 
 1052        $this->tpl->setVariable(
'EVENT_FILE_TABLE', $table_gui->getHTML());
 
 1066        $old_autofill = $this->
object->hasWaitingListAutoFill();
 
 1070        if (!$this->form->checkInput()) {
 
 1071            $ilErr->setMessage($this->lng->txt(
'err_check_input'));
 
 1072            $form->setValuesByPost();
 
 1081        $new_type_info = $form->getInput(
'didactic_type');
 
 1082        if ($new_type_info) {
 
 1083            $new_type = explode(
'_', $form->getInput(
'didactic_type'));
 
 1084            $new_type = $new_type[1];
 
 1086            $modified = ($new_type != $old_type);
 
 1087            $this->logger->info(
'Switched group type from ' . $old_type . 
' to ' . $new_type);
 
 1094            $ilErr->setMessage($this->lng->txt(
'err_check_input'));
 
 1099        $this->
object->validate();
 
 1100        $this->
object->getFirstAppointment()->validate();
 
 1102        if (strlen(
$ilErr->getMessage())) {
 
 1108        $this->
object->update();
 
 1109        $this->
object->getFirstAppointment()->update();
 
 1112            $this->object->getId(),
 
 1119            $this->record_gui->writeEditForm();
 
 1123        $DIC->object()->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
 
 1126        if (!$old_autofill &&
 
 1127            $this->object->hasWaitingListAutoFill()) {
 
 1128            $this->
object->handleAutoFill();
 
 1133            if ($new_type == 0) {
 
 1134                $new_type_txt = $this->lng->txt(
'il_sess_status_open');
 
 1137                $new_type_txt = $dtpl->getPresentationTitle($this->lng->getLangKey());
 
 1139            $this->tabs_gui->activateTab(
'settings');
 
 1143            $confirm->setFormAction($this->ctrl->getFormAction($this));
 
 1147                $this->lng->txt(
'sess_info_new_sess_type') . 
': ' . $new_type_txt
 
 1149            $confirm->addButton($this->lng->txt(
'sess_change_type'), 
'updateSessionType');
 
 1150            $confirm->setCancel($this->lng->txt(
'cancel'), 
'edit');
 
 1152            $this->tpl->setContent($confirm->getHTML());
 
 1155        ilUtil::sendSuccess($this->lng->txt(
'event_updated'), 
true);
 
 1156        $this->ctrl->redirect($this, 
'edit');
 
 1157        #$this->object->initFiles(); 
 1158        #$this->editObject(); 
 1169            $this->object->getRefId(),
 
 1170            $this->http->request()->getParsedBody()[
'sess_type']
 
 1173        ilUtil::sendSuccess($this->lng->txt(
'settings_saved'), 
true);
 
 1174        $this->ctrl->redirect($this, 
'edit');
 
 1186        $this->tabs_gui->setTabActive(
'settings');
 
 1188        if (!count(
$_POST[
'file_id'])) {
 
 1194        include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 1198        $c_gui->setFormAction($this->ctrl->getFormAction($this, 
"deleteFiles"));
 
 1199        $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
 1200        $c_gui->setCancel($this->lng->txt(
"cancel"), 
"edit");
 
 1201        $c_gui->setConfirm($this->lng->txt(
"confirm"), 
"deleteFiles");
 
 1204        foreach (
$_POST[
"file_id"] as $file_id) {
 
 1206            if ($file->getSessionId() != $this->object->getEventId()) {
 
 1211            $c_gui->addItem(
"file_id[]", $file_id, $file->getFileName());
 
 1214        $this->tpl->setContent($c_gui->getHTML());
 
 1227        if (!count(
$_POST[
'file_id'])) {
 
 1232        foreach (
$_POST[
'file_id'] as $id) {
 
 1236        $this->
object->initFiles();
 
 1247        $is_course = $is_group = 
false;
 
 1250        $this->container_ref_id = 
$tree->checkForParentType($this->object->getRefId(), 
'grp');
 
 1251        if ($this->container_ref_id) {
 
 1254        if (!$this->container_ref_id) {
 
 1255            $this->container_ref_id = 
$tree->checkForParentType($this->object->getRefId(), 
'crs');
 
 1256            if ($this->container_ref_id) {
 
 1260        if (!$this->container_ref_id) {
 
 1266        if ($a_init_participants && $this->container_obj_id) {
 
 1268                include_once 
'./Modules/Course/classes/class.ilCourseParticipants.php';
 
 1270            } elseif ($is_group) {
 
 1271                include_once 
'./Modules/Group/classes/class.ilGroupParticipants.php';
 
 1287        $this->tabs_gui->activateTab(
'materials');
 
 1290        $parent_ref_id = 
$tree->getParentId($this->object->getRefId());
 
 1292        include_once 
"Services/Object/classes/class.ilObjectAddNewItemGUI.php";
 
 1294        $gui->setDisabledObjectTypes(
 
 1302        $gui->setAfterCreationCallback($this->ref_id);
 
 1305        include_once 
'Modules/Session/classes/class.ilEventItems.php';
 
 1306        $this->event_items = 
new ilEventItems($this->object->getId());
 
 1308        include_once 
'Modules/Session/classes/class.ilSessionMaterialsTableGUI.php';
 
 1311        $tbl->setDisableFilterHiding(
true);
 
 1313        $tbl->addMultiCommand(
'saveMaterials', $this->lng->txt(
'sess_assign'));
 
 1314        $tbl->addMultiCommand(
"removeMaterials", $this->lng->txt(
"remove"));
 
 1316        $tbl->setTitle($this->lng->txt(
"event_assign_materials_table"));
 
 1317        $tbl->setDescription($this->lng->txt(
'event_assign_materials_info'));
 
 1319        $tbl->setMaterialItems($this->event_items->getItems());
 
 1321        $data = $tbl->getDataFromDb();
 
 1322        $tbl->setMaterials(
$data);
 
 1324        $this->tpl->setContent($tbl->getHTML());
 
 1333        $tbl->writeFilterToSession();   
 
 1334        $tbl->resetOffset();            
 
 1335        $this->ctrl->redirect($this, 
"materials");
 
 1344        $tbl->resetOffset();            
 
 1345        $tbl->resetFilter();            
 
 1346        $this->ctrl->redirect($this, 
"materials");
 
 1354        $items_checked = is_array(
$_POST[
'items']) ? 
$_POST[
'items'] : array();
 
 1356        $this->event_items = 
new ilEventItems($this->object->getId());
 
 1357        $this->event_items->removeItems($items_checked);
 
 1370        include_once 
'./Modules/Session/classes/class.ilEventItems.php';
 
 1372        $this->event_items = 
new ilEventItems($this->object->getId());
 
 1373        $db_items = $this->event_items->getItems();
 
 1375        $list_items_checked = is_array(
$_POST[
'items']) ? 
$_POST[
'items'] : array();
 
 1376        $list_items_checked = array_map(
'intval', $list_items_checked);
 
 1378        $items_to_save = array_merge($db_items, $list_items_checked);
 
 1379        $items_to_save = array_unique($items_to_save);
 
 1381        $this->event_items->setItems($items_to_save);
 
 1382        $this->event_items->update();
 
 1391        include_once 
'Modules/Session/classes/class.ilSessionMaterialsTableGUI.php';
 
 1394        $tbl->storeNavParameter();
 
 1396        ilUtil::sendSuccess($this->lng->txt(
'settings_saved'), 
true);
 
 1397        $this->ctrl->redirect($this, 
'materials');
 
 1412        $ilTabs = 
$DIC[
'ilTabs'];
 
 1415        $ilTabs->setTabActive(
'event_edit_members');
 
 1418        $form = $list->initForm(
'printAttendanceList');
 
 1419        $tpl->setContent($form->getHTML());
 
 1431        include_once 
'Services/Membership/classes/class.ilAttendanceList.php';
 
 1437        $list->setId(
'sessattlst');
 
 1439        $event_app = $this->
object->getFirstAppointment();
 
 1443        $desc .= 
" " . $this->
object->getTitle();
 
 1444        $list->setTitle($this->lng->txt(
'sess_attendance_list'), $desc);
 
 1446        $list->addPreset(
'mark', $this->lng->txt(
'trac_mark'), 
true);
 
 1447        $list->addPreset(
'comment', $this->lng->txt(
'trac_comment'), 
true);
 
 1448        if ($this->object->enabledRegistration()) {
 
 1449            $list->addPreset(
'registered', $this->lng->txt(
'event_tbl_registered'), 
true);
 
 1451        $list->addPreset(
'participated', $this->lng->txt(
'event_tbl_participated'), 
true);
 
 1452        $list->addBlank($this->lng->txt(
'sess_signature'));
 
 1454        $list->addUserFilter(
'registered', $this->lng->txt(
'event_list_registered_only'));
 
 1469        $list->initFromForm();
 
 1470        $list->setCallback(array($this, 
'getAttendanceListUserData'));
 
 1472        include_once 
'Modules/Session/classes/class.ilEventParticipants.php';
 
 1475        echo $list->getFullscreenHTML();
 
 1490        $data = $this->event_part->getUser($a_user_id);
 
 1492        if ($a_filters && $a_filters[
"registered"] && !
$data[
"registered"]) {
 
 1497            $this->lng->txt(
'yes') :
 
 1498            $this->lng->txt(
'no');
 
 1499        $data[
'participated'] = 
$data[
'participated'] ?
 
 1500            $this->lng->txt(
'yes') :
 
 1501            $this->lng->txt(
'no');
 
 1518        $ilAccess = 
$DIC[
'ilAccess'];
 
 1522        if (!$ilAccess->checkAccess(
'manage_members', 
'', $this->object->getRefId())) {
 
 1523            $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'), 
$ilErr->MESSAGE);
 
 1526        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.sess_list.html', 
'Modules/Session');
 
 1527        $this->
__showButton($this->ctrl->getLinkTarget($this, 
'exportCSV'), $this->lng->txt(
'event_csv_export'));
 
 1529        include_once 
'Modules/Session/classes/class.ilEventParticipants.php';
 
 1531        $this->tpl->addBlockfile(
"EVENTS_TABLE", 
"events_table", 
"tpl.table.html");
 
 1532        $this->tpl->addBlockfile(
'TBL_CONTENT', 
'tbl_content', 
'tpl.sess_list_row.html', 
'Modules/Session');
 
 1535        $members = $members_obj->getParticipants();
 
 1541            $this->lng->txt(
"event_overview"),
 
 1543            $this->lng->txt(
'obj_usr')
 
 1545        $this->ctrl->setParameter($this, 
'offset', (
int) 
$_GET[
'offset']);
 
 1547        $course_ref_id = 
$tree->checkForParentType($this->object->getRefId(), 
'crs');
 
 1549        foreach (
$tree->getSubtree(
$tree->getNodeData($course_ref_id), 
false, 
'sess') as $event_id) {
 
 1551            if (!is_object($tmp_event) or $tmp_event->getType() != 
'sess') {
 
 1554            $events[] = $tmp_event;
 
 1557        $headerNames = array();
 
 1558        $headerVars = array();
 
 1559        $colWidth = array();
 
 1561        $headerNames[] = $this->lng->txt(
'name');
 
 1562        $headerVars[] = 
"name";
 
 1563        $colWidth[] = 
'20%';
 
 1565        for (
$i = 1; 
$i <= count($events); 
$i++) {
 
 1566            $headerNames[] = 
$i;
 
 1567            $headerVars[] = 
"event_" . 
$i;
 
 1568            $colWidth[] = 80 / count($events) . 
"%";
 
 1571        $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
 1572        $tbl->setHeaderNames($headerNames);
 
 1573        $tbl->setHeaderVars($headerVars, $this->ctrl->getParameterArray($this, 
'eventsList'));
 
 1574        $tbl->setColumnWidth($colWidth);
 
 1576        $tbl->setOrderColumn(
$_GET[
"sort_by"]);
 
 1577        $tbl->setOrderDirection(
$_GET[
"sort_order"]);
 
 1578        $tbl->setOffset(
$_GET[
"offset"]);
 
 1579        $tbl->setLimit(
$ilUser->getPref(
"hits_per_page"));
 
 1580        $tbl->setMaxCount(count($members));
 
 1581        $tbl->setFooter(
"tblfooter", $this->lng->txt(
"previous"), $this->lng->txt(
"next"));
 
 1583        $sliced_users = array_slice($members, 
$_GET[
'offset'], 
$_SESSION[
'tbl_limit']);
 
 1584        $tbl->disable(
'sort');
 
 1588        foreach ($sliced_users as $user_id) {
 
 1589            foreach ($events as $event_obj) {
 
 1590                $this->tpl->setCurrentBlock(
"eventcols");
 
 1595                    $this->tpl->setVariable(
"IMAGE_PARTICIPATED", $event_part->hasParticipated($user_id) ?
 
 1599                    $this->tpl->setVariable(
"PARTICIPATED", $event_part->hasParticipated($user_id) ?
 
 1600                                        $this->lng->txt(
'event_participated') :
 
 1601                                        $this->lng->txt(
'event_not_participated'));
 
 1604                $this->tpl->parseCurrentBlock();
 
 1607            $this->tpl->setCurrentBlock(
"tbl_content");
 
 1609            $this->tpl->setVariable(
"CSS_ROW", 
ilUtil::switchColor($counter++, 
'tblrow1', 
'tblrow2'));
 
 1610            $this->tpl->setVariable(
"LASTNAME", 
$name[
'lastname']);
 
 1611            $this->tpl->setVariable(
"FIRSTNAME", 
$name[
'firstname']);
 
 1613            $this->tpl->parseCurrentBlock();
 
 1616        $this->tpl->setVariable(
"HEAD_TXT_LEGEND", $this->lng->txt(
"legend"));
 
 1617        $this->tpl->setVariable(
"HEAD_TXT_DIGIT", $this->lng->txt(
"event_digit"));
 
 1618        $this->tpl->setVariable(
"HEAD_TXT_EVENT", $this->lng->txt(
"event"));
 
 1619        $this->tpl->setVariable(
"HEAD_TXT_LOCATION", $this->lng->txt(
"event_location"));
 
 1620        $this->tpl->setVariable(
"HEAD_TXT_DATE_TIME", $this->lng->txt(
"event_date_time"));
 
 1622        foreach ($events as $event_obj) {
 
 1623            $this->tpl->setCurrentBlock(
"legend_loop");
 
 1624            $this->tpl->setVariable(
"LEGEND_CSS_ROW", 
ilUtil::switchColor($counter++, 
'tblrow1', 
'tblrow2'));
 
 1625            $this->tpl->setVariable(
"LEGEND_DIGIT", 
$i++);
 
 1626            $this->tpl->setVariable(
"LEGEND_EVENT_TITLE", $event_obj->getTitle());
 
 1627            $this->tpl->setVariable(
"LEGEND_EVENT_DESCRIPTION", $event_obj->getDescription());
 
 1628            $this->tpl->setVariable(
"LEGEND_EVENT_LOCATION", $event_obj->getLocation());
 
 1629            $this->tpl->setVariable(
"LEGEND_EVENT_APPOINTMENT", $event_obj->getFirstAppointment()->appointmentToString());
 
 1630            $this->tpl->parseCurrentBlock();
 
 1643        if (is_object($this->form)) {
 
 1647        $this->lng->loadLanguageModule(
'dateplaner');
 
 1649        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1651        include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
 
 1655        $this->form->setMultipart(
true);
 
 1656        $this->form->setTableWidth(
'600px');
 
 1657        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
 1658        $this->form->setMultipart(
true);
 
 1662        $this->lng->loadLanguageModule(
'dateplaner');
 
 1663        include_once 
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
 
 1665        $dur->setRequired(
true);
 
 1666        $dur->enableToggleFullTime(
 
 1667            $this->lng->txt(
'event_fulltime_info'),
 
 1668            $this->object->getFirstAppointment()->enabledFulltime() ? 
true : 
false 
 1670        $dur->setShowTime(
true);
 
 1671        $dur->setStart($this->object->getFirstAppointment()->getStart());
 
 1672        $dur->setEnd($this->object->getFirstAppointment()->getEnd());
 
 1674        $this->form->addItem($dur);
 
 1678        if ($a_mode == 
'create') {
 
 1679            if (!is_object($this->rec)) {
 
 1680                include_once(
'./Modules/Session/classes/class.ilEventRecurrence.php');
 
 1683            include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
 
 1685            $rec->allowUnlimitedRecurrences(
false);
 
 1686            $rec->setRecurrence($this->rec);
 
 1687            $this->form->addItem($rec);
 
 1691            $lp->setInfo($this->lng->txt(
"sess_lp_preset_info"));
 
 1692            $lp->setChecked(
true);
 
 1693            $this->form->addItem($lp);
 
 1697        $section->setTitle($this->lng->txt(
'event_section_information'));
 
 1701        $title = 
new ilTextInputGUI($this->lng->txt(
'event_title'), 
'title');
 
 1702        $title->setRequired(
true);
 
 1703        $title->setValue($this->object->getTitle());
 
 1704        $title->setSize(50);
 
 1705        $title->setMaxLength(70);
 
 1706        $this->form->addItem($title);
 
 1710        $desc->setValue($this->object->getLongDescription());
 
 1713        $this->form->addItem($desc);
 
 1717        $desc->setValue($this->object->getLocation());
 
 1720        $this->form->addItem($desc);
 
 1723        $details = 
new ilTextAreaInputGUI($this->lng->txt(
'event_details_workflow'), 
'details');
 
 1724        $details->setValue($this->object->getDetails());
 
 1725        $details->setCols(50);
 
 1726        $details->setRows(4);
 
 1727        $this->form->addItem($details);
 
 1729        if ($a_mode == 
'create') {
 
 1734            $this->record_gui->setRefId((
int) 
$_GET[
'ref_id']);
 
 1735            $this->record_gui->setPropertyForm($this->form);
 
 1736            $this->record_gui->parse();
 
 1741                $this->object->getId()
 
 1743            $this->record_gui->setPropertyForm($this->form);
 
 1744            $this->record_gui->parse();
 
 1750        $section->setTitle($this->lng->txt(
'event_tutor_data'));
 
 1754        $tutor_name = 
new ilTextInputGUI($this->lng->txt(
'tutor_name'), 
'tutor_name');
 
 1755        $tutor_name->setValue($this->object->getName());
 
 1756        $tutor_name->setSize(20);
 
 1757        $tutor_name->setMaxLength(70);
 
 1758        $this->form->addItem($tutor_name);
 
 1761        $tutor_email = 
new ilTextInputGUI($this->lng->txt(
'tutor_email'), 
'tutor_email');
 
 1762        $tutor_email->setValue($this->object->getEmail());
 
 1763        $tutor_email->setSize(20);
 
 1764        $tutor_email->setMaxLength(70);
 
 1765        $this->form->addItem($tutor_email);
 
 1768        $tutor_phone = 
new ilTextInputGUI($this->lng->txt(
'tutor_phone'), 
'tutor_phone');
 
 1769        $tutor_phone->setValue($this->object->getPhone());
 
 1770        $tutor_phone->setSize(20);
 
 1771        $tutor_phone->setMaxLength(70);
 
 1772        $this->form->addItem($tutor_phone);
 
 1775        $section->setTitle($this->lng->txt(
'sess_section_reg'));
 
 1778        include_once 
'./Modules/Session/classes/class.ilSessionMembershipRegistrationSettingsGUI.php';
 
 1779        include_once 
'./Services/Membership/classes/class.ilMembershipRegistrationSettings.php';
 
 1790        $reg_settings->addMembershipFormElements($this->form, 
'');
 
 1794        $section->setTitle($this->lng->txt(
'event_assign_files'));
 
 1798        $files->setFilenames(array(0 => 
''));
 
 1799        $this->form->addItem(
$files);
 
 1802        $section->setTitle($this->lng->txt(
'sess_setting_header_presentation'));
 
 1805        $DIC->object()->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
 
 1808        $features->setTitle($this->lng->txt(
'obj_features'));
 
 1809        $this->form->addItem($features);
 
 1811            $this->object->getId(),
 
 1818        $gallery = 
new ilCheckboxInputGUI($this->lng->txt(
'sess_show_members'), 
'show_members');
 
 1819        $gallery->setChecked($this->object->getShowMembers());
 
 1820        $gallery->setInfo($this->lng->txt(
'sess_show_participants_info'));
 
 1821        $this->form->addItem($gallery);
 
 1826        $mail_type->setValue($this->object->getMailToMembersType());
 
 1829            $this->lng->txt(
'sess_mail_admins_only'),
 
 1831            $this->lng->txt(
'sess_mail_admins_only_info')
 
 1833        $mail_type->addOption($mail_tutors);
 
 1836            $this->lng->txt(
'sess_mail_all'),
 
 1838            $this->lng->txt(
'sess_mail_all_info')
 
 1840        $mail_type->addOption($mail_all);
 
 1841        $this->form->addItem($mail_type);
 
 1847                $this->form->setTitle($this->lng->txt(
'event_table_create'));
 
 1848                $this->form->addCommandButton(
'save', $this->lng->txt(
'event_btn_add'));
 
 1849                $this->form->addCommandButton(
'saveAndAssignMaterials', $this->lng->txt(
'event_btn_add_edit'));
 
 1850                $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
 
 1854                $this->form->setTitle($this->lng->txt(
'event_table_update'));
 
 1855                $this->form->addCommandButton(
'update', $this->lng->txt(
'save'));
 
 1856                $this->form->addCommandButton(
'cancelEdit', $this->lng->txt(
'cancel'));
 
 1871        $event = $this->form->getItemByPostVar(
'event');
 
 1872        if ($event->getStart() && $event->getEnd()) {
 
 1873            $this->
object->getFirstAppointment()->setStartingTime($event->getStart()->get(
IL_CAL_UNIX));
 
 1874            $this->
object->getFirstAppointment()->setEndingTime($event->getStart()->get(
IL_CAL_UNIX));
 
 1875            $this->
object->getFirstAppointment()->setStart($event->getStart());
 
 1876            $this->
object->getFirstAppointment()->setEnd($event->getEnd());
 
 1877            $this->
object->getFirstAppointment()->toggleFulltime($event->getStart() instanceof 
ilDate);
 
 1891        $this->
object->setRegistrationType((
int) 
$_POST[
'registration_type']);
 
 1893        $this->
object->setRegistrationMaxUsers((
int) $_POST[
'registration_max_members']);
 
 1894        $this->
object->enableRegistrationUserLimit((
int) $_POST[
'registration_membership_limited']);
 
 1895        $this->
object->setShowMembers((
int) $_POST[
'show_members']);
 
 1896        $this->
object->setMailToMembersType((
int) $_POST[
'mail_type']);
 
 1898        switch ((
int) 
$_POST[
'waiting_list']) {
 
 1900                $this->
object->enableRegistrationWaitingList(
true);
 
 1901                $this->
object->setWaitingListAutoFill(
true);
 
 1905                $this->
object->enableRegistrationWaitingList(
true);
 
 1906                $this->
object->setWaitingListAutoFill(
false);
 
 1910                $this->
object->enableRegistrationWaitingList(
false);
 
 1911                $this->
object->setWaitingListAutoFill(
false);
 
 1924        include_once(
'./Modules/Session/classes/class.ilSessionRecurrence.php');
 
 1927        switch (
$_POST[
'frequence']) {
 
 1929                $this->rec->setFrequenceType(
$_POST[
'frequence']);
 
 1930                $this->rec->setInterval((
int) 
$_POST[
'count_DAILY']);
 
 1934                $this->rec->setFrequenceType(
$_POST[
'frequence']);
 
 1935                $this->rec->setInterval((
int) 
$_POST[
'count_WEEKLY']);
 
 1936                if (is_array(
$_POST[
'byday_WEEKLY'])) {
 
 1942                $this->rec->setFrequenceType(
$_POST[
'frequence']);
 
 1943                $this->rec->setInterval((
int) 
$_POST[
'count_MONTHLY']);
 
 1944                switch ((
int) 
$_POST[
'subtype_MONTHLY']) {
 
 1950                        switch ((
int) 
$_POST[
'monthly_byday_day']) {
 
 1953                                $this->rec->setBYSETPOS((
int) 
$_POST[
'monthly_byday_num']);
 
 1954                                $this->rec->setBYDAY(
'MO,TU,WE,TH,FR');
 
 1959                                $this->rec->setBYMONTHDAY((
int) 
$_POST[
'monthly_byday_num']);
 
 1963                                $this->rec->setBYDAY((
int) 
$_POST[
'monthly_byday_num'] . 
$_POST[
'monthly_byday_day']);
 
 1969                        $this->rec->setBYMONTHDAY((
int) 
$_POST[
'monthly_bymonthday']);
 
 1975                $this->rec->setFrequenceType(
$_POST[
'frequence']);
 
 1976                $this->rec->setInterval((
int) 
$_POST[
'count_YEARLY']);
 
 1977                switch ((
int) 
$_POST[
'subtype_YEARLY']) {
 
 1983                        $this->rec->setBYMONTH((
int) 
$_POST[
'yearly_bymonth_byday']);
 
 1984                        $this->rec->setBYDAY((
int) 
$_POST[
'yearly_byday_num'] . 
$_POST[
'yearly_byday']);
 
 1988                        $this->rec->setBYMONTH((
int) 
$_POST[
'yearly_bymonth_by_monthday']);
 
 1989                        $this->rec->setBYMONTHDAY((
int) 
$_POST[
'yearly_bymonthday']);
 
 1996        switch ((
int) 
$_POST[
'until_type']) {
 
 1998                $this->rec->setFrequenceUntilDate(
null);
 
 2003                $this->rec->setFrequenceUntilDate(
null);
 
 2004                $this->rec->setFrequenceUntilCount((
int) 
$_POST[
'count']);
 
 2008                $frequence = $this->form->getItemByPostVar(
'frequence');
 
 2009                $end = $frequence->getRecurrence()->getFrequenceUntilDate();
 
 2010                $this->rec->setFrequenceUntilCount(0);
 
 2011                $this->rec->setFrequenceUntilDate($end);
 
 2026        return mktime($time[
'h'], $time[
'm'], 0, $date[
'm'], $date[
'd'], $date[
'y']);
 
 2039        $ilLocator = 
$DIC[
'ilLocator'];
 
 2043            include_once 
'./Modules/Session/classes/class.ilSessionAppointment.php';
 
 2044            $title = strlen($this->object->getTitle()) ? (
': ' . $this->
object->getTitle()) : 
'';
 
 2045            $title = $this->
object->getFirstAppointment()->appointmentToString() . $title;
 
 2047            $ilLocator->addItem($title, $this->ctrl->getLinkTarget($this, 
"infoScreen"), 
"", 
$_GET[
"ref_id"]);
 
 2064        $parent_id = 
$tree->getParentId($this->object->getRefId());
 
 2070        $parent_class = 
'ilObj' . $parent_class . 
'GUI';
 
 2072        $ctrl->setParameterByClass($parent_class, 
"ref_id", $parent_id);
 
 2073        $ctrl->redirectByClass($parent_class, 
"view");
 
 2087        $ilAccess = 
$DIC[
'ilAccess'];
 
 2088        $ilTabs = 
$DIC[
'ilTabs'];
 
 2091        $ilHelp = 
$DIC[
'ilHelp'];
 
 2094        $ilHelp->setScreenIdComponent(
"sess");
 
 2096        $parent_id = 
$tree->getParentId($this->object->getRefId());
 
 2101        $this->tabs_gui->setBackTarget(
 
 2102            $this->lng->txt(
'back_to_' . $parent_type . 
'_content'),
 
 2103            $ilCtrl->getLinkTarget($this, 
"redirectToParentContentPage")
 
 2106        $this->tabs_gui->addTarget(
 
 2108            $this->ctrl->getLinkTarget($this, 
'infoScreen')
 
 2111        if ($ilAccess->checkAccess(
'write', 
'', $this->object->getRefId())) {
 
 2112            $this->tabs_gui->addTarget(
 
 2114                $this->ctrl->getLinkTarget($this, 
'edit')
 
 2117        if ($ilAccess->checkAccess(
'manage_materials', 
'', $this->object->getRefId())) {
 
 2118            $this->tabs_gui->addTab(
 
 2120                $this->lng->txt(
'crs_materials'),
 
 2121                $this->ctrl->getLinkTarget($this, 
'materials')
 
 2127        $parent_id = 
$tree->getParentId((
int) $_REQUEST[
'ref_id']);
 
 2134            $this->tabs_gui->addTarget(
 
 2135                "obj_tool_setting_booking",
 
 2136                $this->ctrl->getLinkTargetByClass(array(
"ilbookinggatewaygui"), 
"")
 
 2141        $is_participant = $this->
object->getMembersObject()->isAssigned(
$ilUser->getId());
 
 2143        $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
 
 2147        include_once 
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
 
 2149            $this->tabs_gui->addTarget(
 
 2150                'learning_progress',
 
 2151                $this->ctrl->getLinkTargetByClass(array(
'ilobjsessiongui',
'illearningprogressgui'), 
''),
 
 2153                array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
 
 2158        if ($ilAccess->checkAccess(
'edit_metadata', 
'', $this->ref_id)) {
 
 2160            $mdtab = $mdgui->getTab();
 
 2162                $this->tabs_gui->addTab(
 
 2164                    $this->lng->txt(
'meta_data'),
 
 2171        if ($ilAccess->checkAccess(
"write", 
"", $this->object->getRefId())) {
 
 2172            $this->tabs_gui->addTarget(
 
 2174                $this->ctrl->getLinkTargetByClass(
"ilexportgui", 
""),
 
 2182        if ($ilAccess->checkAccess(
'edit_permission', 
"", $this->object->getRefId())) {
 
 2183            $this->tabs_gui->addTarget(
 
 2185                $this->ctrl->getLinkTargetByClass(
"ilpermissiongui", 
"perm"),
 
 2186                array(
"perm",
"info",
"owner"),
 
 2200        include_once 
'./Modules/Session/classes/class.ilEventItems.php';
 
 2201        $event_items = 
new ilEventItems($this->object->getId());
 
 2202        $event_items->addItem($a_obj->
getRefId());
 
 2203        $event_items->update();
 
 2217        $tmp_data = array();
 
 2218        foreach ($a_usr_ids as $usr_id) {
 
 2219            $tmp_data[$usr_id] = array();
 
 2232        if (!$this->container_ref_id) {
 
 2251        $parent_id = 
$tree->getParentId((
int) $_REQUEST[
'ref_id']);
 
 2253        $ilCtrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", $parent_id);
 
 2255        $ilCtrl->redirectByClass(
"ilrepositorygui", 
"");
 
 2265        $local_roles = 
$GLOBALS[
'DIC']->rbac()->review()->getRolesOfRoleFolder($this->object->getRefId(), 
false);
 
 2267        foreach ($local_roles as $role_id) {
 
 2269            if (substr($title, 0, 19) == 
'il_sess_participant') {
 
 2283        return $GLOBALS[
'DIC']->rbac()->review()->getRolesOfRoleFolder($this->object->getRefId(), 
false);
 
 2293        $link = chr(13) . chr(10) . chr(13) . chr(10);
 
 2294        $link .= $this->lng->txt(
'sess_mail_permanent_link');
 
 2295        $link .= chr(13) . chr(10) . chr(13) . chr(10);
 
 2296        include_once 
'./Services/Link/classes/class.ilLink.php';
 
 2298        return rawurlencode(base64_encode($link));
 
 2311            $parent_id = 
$_GET[
"ref_id"];
 
 2313        $new_type = $_REQUEST[
"new_type"];
 
 2317            $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
 
 2320        $this->lng->loadLanguageModule($new_type);
 
 2321        $this->ctrl->setParameter($this, 
"new_type", $new_type);
 
 2324        if ($form->checkInput()) {
 
 2326            include_once(
"./Services/Export/classes/class.ilImport.php");
 
 2327            $imp = 
new ilImport((
int) $parent_id);
 
 2329                $new_id = $imp->importObject(
 
 2331                    $_FILES[
"importfile"][
"tmp_name"],
 
 2332                    $_FILES[
"importfile"][
"name"],
 
 2336                $this->tmp_import_dir = $imp->getTemporaryImportDir();
 
 2337                if (!$a_catch_errors) {
 
 2342                $form->setValuesByPost();
 
 2343                $tpl->setContent($form->getHtml());
 
 2348                $this->ctrl->setParameter($this, 
"new_type", 
"");
 
 2364        $form->setValuesByPost();
 
 2365        $tpl->setContent($form->getHtml());
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
Provides an interface to the ILIAS HTTP services.
const IL_CAL_FREQ_MONTHLY
importEditFormPostValues()
Load edit form values from post.
Base class for attendance lists.
This class is used for inegration of the booking manager as a service into other repository objects,...
Calculates an ilDateList for a given calendar entry and recurrence rule.
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
static _getInstance($a_obj_id)
get instance by obj_id
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static setUseRelativeDates($a_status)
set use relative dates
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
static lookupTemplateId($a_ref_id)
Lookup template id @global ilDB $ilDB.
static switchTemplate($a_ref_id, $a_new_tpl_id)
static _isRegistered($a_usr_id, $a_event_id)
static _register($a_usr_id, $a_event_id)
static _unregister($a_usr_id, $a_event_id)
Base class for ILIAS Exception handling.
Export User Interface Class.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
const LP_MODE_DEACTIVATED
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
const REGISTRATION_LIMITED_USERS
static _modifyItemGUI( $a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path, $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id=0)
We need a static version of this, e.g.
static _lookupAboStatus($a_id)
materialsObject()
show material assignment
refuseParticipationObject()
refuse participation
addLocatorItems()
Add session locator.
cancelEditObject()
Cancel editigin @global type $ilCtrl @global type $tree.
executeCommand()
execute command
importFileObject($parent_id=null, $a_catch_errors=true)
Import.
prepareOutput($a_show_subobjects=true)
initContainer($a_init_participants=false)
applyFilter()
Apply filter.
showJoinRequestButtonInCalendar(ilToolbarGUI $a_ilToolbar)
saveMaterialsObject()
save material assignment
readMemberData($a_usr_ids)
Used for waiting list.
loadRecurrenceSettings()
load recurrence settings
unregisterObject($a_refuse_participation=false)
unregister from session
redirectToParentContentPageObject()
Redirect to parent content page.
getAttendanceListUserData($a_user_id, $a_filters)
Get user data for attendance list.
confirmDeleteFilesObject()
confirm delete files
attendanceListObject()
show attendance list selection
updateObject()
update object
static _goto($a_target)
goto
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
initForm(string $a_mode)
Init Form.
updateSessionTypeObject()
change session type
resetFilter()
Reset filter.
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify Item ListGUI for presentation in container @global type $tree.
removeMaterialsObject()
Remove materials from the current object.
saveAndAssignMaterialsObject()
Save and assign sessoin materials.
saveObject($a_redirect_on_success=true)
save object
membersObject()
Redirect to member adminsitration.
getCurrentObject()
Get session object.
printAttendanceListObject()
print attendance list
__toUnix($date, $time)
@access protected
getLocalRoles()
get all local roles
afterSaveCallback(ilObject $a_obj)
Custom callback after object is created (in parent containert.
getDefaultMemberRole()
Get default member role.
initCreateForm($a_new_type)
Init object creation form.
sendFileObject()
send file
joinObject()
Called from info screen.
createRecurringSessions($a_activate_lp=true)
create recurring sessions
deleteFilesObject()
delete files
initAttendanceList()
Init attendance list object.
showJoinRequestButton(ilToolbarGUI $ilToolbar=null)
createMailSignature()
Create a course mail signature.
registerObject()
register to session
eventsListObject()
list sessions of all user
postUpdateMaterials()
redirect to list of materials without offset/page.
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor.
getContainerRefId()
container ref id
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
static addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
Get timing details for list gui.
static getItemsByEvent($a_event_id)
Get session material / event items.
Render add new item selector.
GUI class for the workflow of copying objects.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
Class ilObjectGUI Basic methods of all Output classes.
__showButton($a_cmd, $a_text, $a_target='')
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
initImportForm($a_new_type)
Init object import form.
afterImport(ilObject $a_new_object)
Post (successful) object import hook.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
addHeaderAction()
Add header action menu.
createObject()
create new object form
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
static _lookupType($a_id, $a_reference=false)
lookup object type
static getInstance($a_ref_id)
Get instance by ref_id.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
GUI class for public user profile presentation.
This class represents an option in a radio group.
static resetCaches()
Reset internal caches.
GUI class for membership features.
static factory($a_type)
Get list gui by type This method caches all the returned list guis.
static getInstance($a_ref_id)
Get instance.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static _sortIds($a_ids, $a_table, $a_field, $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,...
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static deleteUserEntry($a_usr_id, $a_obj_id)
Delete one user entry.
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
static initDomEvent(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI DomEvent.
const IL_CAL_FREQ_DAILY
Model of calendar entry recurrcences.
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc