5require_once
"./Services/Container/classes/class.ilContainerGUI.php";
46 $ilHelp =
$DIC[
'ilHelp'];
50 $this->ctrl->saveParameter($this, array(
"ref_id",
"cmdClass"));
55 $this->lng->loadLanguageModule(
'crs');
56 $this->lng->loadLanguageModule(
'cert');
57 $this->lng->loadLanguageModule(
'obj');
59 $this->SEARCH_USER = 1;
60 $this->SEARCH_GROUP = 2;
61 $this->SEARCH_COURSE = 3;
66 switch (
$_POST[
"action"]) {
68 case "deleteSubscribers":
69 $this->deleteSubscribers();
72 case "addSubscribers":
73 $this->addSubscribers();
76 case "addFromWaitingList":
77 $this->addFromWaitingList();
80 case "removeFromWaitingList":
81 $this->removeFromWaitingList();
103 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
106 $part->updateNotification(
$ilUser->getId(),
$ilSetting->get(
'mail_crs_admin_notification',
true));
108 parent::afterImport($a_new_object);
113 $this->ctrl->setCmd(
"view");
125 $this->tabs_gui->setTabActive(
'view_content');
135 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
136 parent::viewObject();
141 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
145 if (
$ilCtrl->getNextClass() !=
"ilcolumngui") {
146 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
149 $this->object->getId(),
150 $this->object->getRefId(),
156 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
157 $this->tabs_gui->clearTargets();
158 $this->ctrl->setReturn($this,
'view_content');
160 $this->ctrl->setCmdClass(get_class($agreement));
161 $this->ctrl->forwardCommand($agreement);
166 include_once
"Services/Container/classes/class.ilContainerStartObjectsContentGUI.php";
168 $stgui->enableDesktop($this->object->getAboStatus(), $this);
169 return $stgui->getHTML();
179 $ret = parent::renderObject();
182 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
185 $this->ctrl->setCmdClass(get_class($course_content_obj));
186 $this->ctrl->forwardCommand($course_content_obj);
194 return parent::renderObject();
204 $this->ctrl->setCmd(
"showSummary");
205 $this->ctrl->setCmdClass(
"ilinfoscreengui");
221 $ilAccess =
$DIC[
'ilAccess'];
230 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
233 $this->tabs_gui->setTabActive(
'info_short');
235 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
236 include_once
'Modules/Course/classes/class.ilCourseFile.php';
241 $info->enablePrivateNotes();
242 $info->enableFeedback();
244 $info->enableBookingInfo(
true);
245 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
246 $info->enableNewsEditing();
250 strlen($this->object->getImportantInformation()) ||
251 strlen($this->object->getSyllabus()) ||
252 strlen($this->object->getTargetGroup()) ||
254 $info->addSection($this->lng->txt(
'crs_general_informations'));
257 if (strlen($this->object->getImportantInformation())) {
259 $this->lng->txt(
'crs_important_info'),
265 if (strlen($this->object->getSyllabus())) {
266 $info->addProperty($this->lng->txt(
'crs_syllabus'), nl2br(
270 if (strlen($this->object->getTargetGroup())) {
272 $this->lng->txt(
'crs_target_group'),
280 $tpl =
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'Modules/Course');
282 foreach ($files as $file) {
283 $tpl->setCurrentBlock(
"files");
284 $this->ctrl->setParameter($this,
'file_id', $file->getFileId());
285 $tpl->setVariable(
"DOWN_LINK", $this->ctrl->getLinkTarget($this,
'sendfile'));
286 $tpl->setVariable(
"DOWN_NAME", $file->getFileName());
287 $tpl->setVariable(
"DOWN_INFO_TXT", $this->lng->txt(
'crs_file_size_info'));
288 $tpl->setVariable(
"DOWN_SIZE", $file->getFileSize());
289 $tpl->setVariable(
"TXT_BYTES", $this->lng->txt(
'bytes'));
290 $tpl->parseCurrentBlock();
293 $this->lng->txt(
'crs_file_download'),
298 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
300 $record_gui->setInfoObject($info);
301 $record_gui->parse();
304 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
307 if ($this->object->hasContactData()) {
308 $info->addSection($this->lng->txt(
"crs_contact"));
310 if (strlen($this->object->getContactName())) {
312 $this->lng->txt(
"crs_contact_name"),
313 $this->object->getContactName()
316 if (strlen($this->object->getContactResponsibility())) {
318 $this->lng->txt(
"crs_contact_responsibility"),
319 $this->object->getContactResponsibility()
322 if (strlen($this->object->getContactPhone())) {
324 $this->lng->txt(
"crs_contact_phone"),
325 $this->object->getContactPhone()
328 if ($this->object->getContactEmail()) {
329 include_once
'./Modules/Course/classes/class.ilCourseMailTemplateMemberContext.php';
330 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
332 $emails = explode(
",", $this->object->getContactEmail());
333 foreach ($emails as
$email) {
335 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true,
'Modules/Course');
349 'ref_id' => $this->object->getRefId(),
354 $etpl->setVariable(
"CONTACT_EMAIL",
$email);
355 $mailString .= $etpl->get() .
"<br />";
357 $info->addProperty($this->lng->txt(
"crs_contact_email"), $mailString);
359 if (strlen($this->object->getContactConsultation())) {
361 $this->lng->txt(
"crs_contact_consultation"),
362 nl2br($this->object->getContactConsultation())
369 $conts = $parts->getContacts();
370 if (count($conts) > 0) {
371 $info->addSection($this->lng->txt(
"crs_mem_contacts"));
372 foreach ($conts as
$c) {
373 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
375 $pgui->setBackUrl($this->ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
376 $pgui->setEmbedded(
true);
377 $info->addProperty(
"", $pgui->getHTML());
388 $info->enableAvailability(
false);
389 $this->lng->loadLanguageModule(
"rep");
390 $info->addSection($this->lng->txt(
"rep_activation_availability"));
391 $info->showLDAPRoleGroupMappingInfo();
394 $info->addAccessPeriodProperty();
396 switch ($this->object->getSubscriptionLimitationType()) {
398 $txt = $this->lng->txt(
"crs_info_reg_deactivated");
402 switch ($this->object->getSubscriptionType()) {
404 $txt = $this->lng->txt(
"crs_info_reg_confirmation");
407 $txt = $this->lng->txt(
"crs_info_reg_direct");
410 $txt = $this->lng->txt(
"crs_info_reg_password");
416 $info->addProperty($this->lng->txt(
"crs_info_reg"),
$txt);
420 if ($this->object->getSubscriptionUnlimitedStatus()) {
422 $this->lng->txt(
"crs_reg_until"),
423 $this->lng->txt(
'crs_unlimited')
425 } elseif ($this->object->getSubscriptionStart() < time()) {
427 $this->lng->txt(
"crs_reg_until"),
428 $this->lng->txt(
'crs_to') .
' ' .
431 } elseif ($this->object->getSubscriptionStart() > time()) {
433 $this->lng->txt(
"crs_reg_until"),
434 $this->lng->txt(
'crs_from') .
' ' .
438 if ($this->object->isSubscriptionMembershipLimited()) {
439 if ($this->object->getSubscriptionMinMembers()) {
441 $this->lng->txt(
"mem_min_users"),
442 $this->object->getSubscriptionMinMembers()
445 if ($this->object->getSubscriptionMaxMembers()) {
446 include_once
'./Modules/Course/classes/class.ilObjCourseAccess.php';
450 $this->lng->txt(
'mem_free_places'),
451 $reg_info[
'reg_info_free_places']
457 if ($this->object->getCancellationEnd()) {
459 $this->lng->txt(
'crs_cancellation_end'),
464 if ($this->object->getCourseStart()) {
466 $this->lng->txt(
'crs_period'),
468 $this->object->getCourseStart(),
469 $this->object->getCourseEnd()
475 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
478 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
480 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
484 $this->lng->loadLanguageModule(
'ps');
485 $info->addSection($this->lng->txt(
'crs_user_agreement_info'));
486 $info->addProperty($this->lng->txt(
'ps_export_data'), $field_info->exportableFieldsToInfoString());
489 $info->addProperty($this->lng->txt(
'ps_crs_user_fields'), $fields);
493 $info->enableLearningProgress(
true);
496 $this->ctrl->forwardCommand($info);
504 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
506 if ($noti->canCurrentUserEdit()) {
507 if ((
bool) $_REQUEST[
"crs_ntf"]) {
508 $noti->activateUser();
510 $noti->deactivateUser();
513 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
514 $this->ctrl->redirect($this,
"");
525 include_once
'Modules/Course/classes/class.ilCourseFile.php';
530 $ilAccess =
$DIC[
'ilAccess'];
540 $this->tabs_gui->setTabActive(
'settings');
541 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
546 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'Modules/Course');
547 $this->tpl->setVariable(
'INFO_TABLE', $a_form->getHTML());
553 foreach ($files as $file) {
554 $table_data[
'id'] = $file->getFileId();
555 $table_data[
'filename'] = $file->getFileName();
556 $table_data[
'filetype'] = $file->getFileType();
557 $table_data[
'filesize'] = $file->getFileSize();
559 $rows[] = $table_data;
562 include_once(
"./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
564 $table_gui->setTitle($this->lng->txt(
"crs_info_download"));
565 $table_gui->setData(
$rows);
566 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
567 $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->lng->txt(
"delete"));
568 $table_gui->setSelectAllCheckbox(
"file_id");
569 $this->tpl->setVariable(
'INFO_FILE_TABLE', $table_gui->getHTML());
583 if (!count(
$_POST[
'file_id'])) {
590 $this->tabs_gui->setTabActive(
'settings');
591 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
593 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
597 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteInfoFiles"));
598 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
599 $c_gui->setCancel($this->lng->txt(
"cancel"),
"editInfo");
600 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteInfoFiles");
603 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
604 foreach (
$_POST[
"file_id"] as $file_id) {
606 $c_gui->addItem(
"file_id[]", $file_id, $file->getFileName());
609 $this->tpl->setContent($c_gui->getHTML());
620 if (!count(
$_POST[
'file_id'])) {
625 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
627 foreach (
$_POST[
'file_id'] as $file_id) {
629 if ($this->object->getId() == $file->getCourseId()) {
633 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'));
647 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
649 $form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
650 $form->setMultipart(
true);
651 $form->setTitle($this->lng->txt(
'crs_general_info'));
652 $form->addCommandButton(
'updateInfo', $this->lng->txt(
'save'));
653 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
656 $area->setValue($this->object->getImportantInformation());
659 $form->addItem($area);
662 $area->setValue($this->object->getSyllabus());
665 $form->addItem($area);
667 $tg = new \ilTextAreaInputGUI($this->lng->txt(
'crs_target_group'),
'target_group');
668 $tg->setValue($this->object->getTargetGroup());
673 $section->setTitle($this->lng->txt(
'crs_info_download'));
677 $file->enableFileNameSelection(
'file_name');
678 $form->addItem($file);
681 $section->setTitle($this->lng->txt(
'crs_contact'));
684 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_name'),
'contact_name');
685 $text->setValue($this->object->getContactName());
687 $text->setMaxLength(70);
688 $form->addItem($text);
690 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
691 $text->setValue($this->object->getContactResponsibility());
693 $text->setMaxLength(70);
694 $form->addItem($text);
696 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_phone'),
'contact_phone');
697 $text->setValue($this->object->getContactPhone());
699 $text->setMaxLength(40);
700 $form->addItem($text);
702 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_email'),
'contact_email');
703 $text->setValue($this->object->getContactEmail());
704 $text->setInfo($this->lng->txt(
'crs_contact_email_info'));
706 $text->setMaxLength(255);
707 $form->addItem($text);
709 $area =
new ilTextAreaInputGUI($this->lng->txt(
'crs_contact_consultation'),
'contact_consultation');
710 $area->setValue($this->object->getContactConsultation());
713 $form->addItem($area);
715 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
717 $this->record_gui->setPropertyForm($form);
718 $this->record_gui->parse();
733 $ilAccess =
$DIC[
'ilAccess'];
737 include_once
'Modules/Course/classes/class.ilCourseFile.php';
739 $file_obj->setCourseId($this->object->getId());
740 $file_obj->setFileName(strlen(
$_POST[
'file_name']) ?
742 $_FILES[
'file'][
'name']);
743 $file_obj->setFileSize($_FILES[
'file'][
'size']);
744 $file_obj->setFileType($_FILES[
'file'][
'type']);
745 $file_obj->setTemporaryName($_FILES[
'file'][
'tmp_name']);
746 $file_obj->setErrorCode($_FILES[
'file'][
'error']);
763 $file_obj->validate();
764 $this->
object->validateInfoSettings();
765 if (strlen(
$ilErr->getMessage())) {
772 if (!$this->record_gui->importEditFormPostValues()) {
784 $this->
object->update();
786 $this->record_gui->writeEditForm();
790 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
792 $ecs->handleContentUpdate();
794 ilUtil::sendSuccess($this->lng->txt(
"crs_settings_saved"));
812 if (!$form->checkInput()) {
813 $form->setValuesByPost();
820 $form->getInput(
'subscription_max') &&
821 $form->getInput(
'subscription_min') &&
822 ($form->getInput(
'subscription_max') < $form->getInput(
'subscription_min'))
824 $min = $form->getItemByPostVar(
'subscription_min');
825 $min->setAlert($this->lng->txt(
'crs_subscription_min_members_err'));
832 $form->getInput(
'list_presentation') ==
"tile" &&
839 if ($form->getInput(
'sl') ==
"1" &&
840 $form->getInput(
'list_presentation') ==
"tile") {
848 $this->
object->setTitle($form->getInput(
'title'));
849 $this->
object->setDescription($form->getInput(
'desc'));
852 $crs_period = $form->getItemByPostVar(
"period");
855 $this->
object->setCoursePeriod(
856 $crs_period->getStart(),
857 $crs_period->getEnd()
861 $this->
object->setOfflineStatus((
bool) !$form->getInput(
'activation_online'));
864 $period = $form->getItemByPostVar(
"access_period");
865 if ($period->getStart() && $period->getEnd()) {
866 $this->
object->setActivationStart($period->getStart()->get(
IL_CAL_UNIX));
867 $this->
object->setActivationEnd($period->getEnd()->get(
IL_CAL_UNIX));
868 $this->
object->setActivationVisibility((
int) $form->getInput(
'activation_visibility'));
870 $this->
object->setActivationStart(
null);
871 $this->
object->setActivationEnd(
null);
875 $this->
object->setSubscriptionPassword($form->getInput(
'subscription_password'));
876 $this->
object->setSubscriptionStart(
null);
877 $this->
object->setSubscriptionEnd(
null);
879 $sub_type = $form->getInput(
'subscription_type');
880 $sub_period = $form->getItemByPostVar(
'subscription_period');
882 $this->
object->setSubscriptionType($sub_type);
884 if ($sub_period->getStart() && $sub_period->getEnd()) {
886 $this->
object->setSubscriptionStart($sub_period->getStart()->get(
IL_CAL_UNIX));
887 $this->
object->setSubscriptionEnd($sub_period->getEnd()->get(
IL_CAL_UNIX));
897 $this->
object->enableRegistrationAccessCode((
int) $form->getInput(
'reg_code_enabled'));
898 $this->
object->setRegistrationAccessCode($form->getInput(
'reg_code'));
901 $this->
object->setCancellationEnd($form->getItemByPostVar(
"cancel_end")->getDate());
904 $this->
object->enableSubscriptionMembershipLimitation((
int) $form->getInput(
'subscription_membership_limitation'));
905 $this->
object->setSubscriptionMaxMembers((
int) $form->getInput(
'subscription_max'));
906 $this->
object->setSubscriptionMinMembers((
int) $form->getInput(
'subscription_min'));
907 $old_autofill = $this->
object->hasWaitingListAutoFill();
908 switch ((
int) $form->getInput(
'waiting_list')) {
910 $this->
object->enableWaitingList(
true);
911 $this->
object->setWaitingListAutoFill(
true);
915 $this->
object->enableWaitingList(
true);
916 $this->
object->setWaitingListAutoFill(
false);
920 $this->
object->enableWaitingList(
false);
921 $this->
object->setWaitingListAutoFill(
false);
926 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveTitleIconVisibility();
929 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveTopActionsVisibility();
934 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveIcon();
937 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveTileImage();
944 $this->
object->setViewMode((
int) $form->getInput(
'view_mode'));
947 $this->
object->setTimingMode((
int) $form->getInput(
'timing_mode'));
949 $this->
object->setTimingMode($form->getInput(
'timing_mode'));
950 $this->
object->setOrderType($form->getInput(
'sorting'));
953 $this->
object->setAboStatus((
int) $form->getInput(
'abo'));
954 $this->
object->setShowMembers((
int) $form->getInput(
'show_members'));
957 $this->
object->setShowMembersExport((
int) $form->getInput(
'show_members_export'));
959 $this->
object->setMailToMembersType((
int) $form->getInput(
'mail_type'));
961 $this->
object->enableSessionLimit((
int) $form->getInput(
'sl'));
963 $session_sp = $form->getInput(
'sp');
964 $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1);
965 $session_sn = $form->getInput(
'sn');
966 $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1);
967 $this->
object->setAutoNotification($form->getInput(
'auto_notification') == 1 ?
true :
false);
970 $show_lp_sync_confirmation =
false;
973 if (isset(
$_POST[
'status_dt'])) {
978 $show_lp_sync_confirmation =
true;
980 $this->
object->setStatusDetermination((
int) $form->getInput(
'status_dt'));
984 if (!$old_autofill && $this->object->hasWaitingListAutoFill()) {
985 $this->
object->handleAutoFill();
987 $this->
object->update();
991 $this->object->getId(),
1006 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1014 if ($show_lp_sync_confirmation) {
1019 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1021 if (!$ecs->handleSettingsUpdate()) {
1022 $form->setValuesByPost();
1036 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1038 $cgui->setFormAction($this->ctrl->getFormAction($this,
"setLPSync"));
1039 $cgui->setHeaderText($this->lng->txt(
"crs_status_determination_sync"));
1040 $cgui->setCancel($this->lng->txt(
"cancel"),
"edit");
1041 $cgui->setConfirm($this->lng->txt(
"confirm"),
"setLPSync");
1043 $tpl->setContent($cgui->getHTML());
1049 $this->
object->update();
1051 $this->
object->syncMembersStatusWithLP();
1053 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
1054 $this->ctrl->redirect($this,
"edit");
1066 $this->tabs_gui->setSubTabActive(
'crs_settings');
1069 $GLOBALS[
'DIC'][
'tpl']->setContent($form->getHTML());
1072 parent::editObject();
1088 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1089 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
1092 $form->setTitle($this->lng->txt(
'crs_edit'));
1094 $form->addCommandButton(
'update', $this->lng->txt(
'save'));
1095 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
1097 $form->setFormAction($this->ctrl->getFormAction($this,
'update'));
1100 $this->initFormTitleDescription($form);
1106 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1108 $this->lng->loadLanguageModule(
'mem');
1109 $cdur->enableToggleFullTime(
1110 $this->lng->txt(
'mem_period_without_time'),
1111 !$this->object->getCourseStartTimeIndication()
1113 $cdur->setShowTime(
true);
1114 $cdur->setInfo($this->lng->txt(
'crs_period_info'));
1115 $cdur->setStart($this->object->getCourseStart());
1116 $cdur->setEnd($this->object->getCourseEnd());
1117 $form->addItem($cdur);
1122 $this->lng->loadLanguageModule(
'rep');
1125 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
1128 $online =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_online'),
'activation_online');
1129 $online->setChecked(!$this->object->getOfflineStatus());
1130 $online->setInfo($this->lng->txt(
'crs_activation_online_info'));
1131 $form->addItem($online);
1133 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1135 $dur->setShowTime(
true);
1138 $form->addItem($dur);
1140 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'activation_visibility');
1141 $visible->setInfo($this->lng->txt(
'crs_activation_limited_visibility_info'));
1142 $visible->setChecked($this->object->getActivationVisibility());
1143 $dur->addSubItem($visible);
1147 $section->setTitle($this->lng->txt(
'crs_reg'));
1150 $reg_proc =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_registration_type'),
'subscription_type');
1151 $reg_proc->setValue(
1153 ? $this->object->getSubscriptionType()
1159 $reg_proc->addOption($opt);
1164 $pass->setRequired(
true);
1165 $pass->setInfo($this->lng->txt(
'crs_reg_password_info'));
1166 $pass->setSubmitFormOnEnter(
true);
1168 $pass->setMaxLength(32);
1169 $pass->setValue($this->object->getSubscriptionPassword());
1171 $opt->addSubItem(
$pass);
1172 $reg_proc->addOption($opt);
1175 $opt->setInfo($this->lng->txt(
'crs_registration_confirmation_info'));
1176 $reg_proc->addOption($opt);
1179 $opt->setInfo($this->lng->txt(
'crs_registration_deactivated'));
1180 $reg_proc->addOption($opt);
1182 $form->addItem($reg_proc);
1186 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'crs_reg_code'),
'reg_code_enabled');
1187 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1188 $reg_code->setValue(1);
1189 $reg_code->setInfo($this->lng->txt(
'crs_reg_code_enabled_info'));
1197 #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
1199 if (!$this->object->getRegistrationAccessCode()) {
1200 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1204 $reg_link->setValue($this->object->getRegistrationAccessCode());
1205 $form->addItem($reg_link);
1208 include_once
'./Services/Link/classes/class.ilLink.php';
1209 $val =
ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(),
'_rcode' . $this->object->getRegistrationAccessCode());
1210 $link->setHTML(
'<span class="small">' . $val .
'</span>');
1211 $reg_code->addSubItem($link);
1213 $form->addItem($reg_code);
1216 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1218 $sdur->setShowTime(
true);
1219 if ($this->object->getSubscriptionStart()) {
1222 if ($this->object->getSubscriptionEnd()) {
1225 $form->addItem($sdur);
1228 $cancel =
new ilDateTimeInputGUI($this->lng->txt(
'crs_cancellation_end'),
'cancel_end');
1229 $cancel->setInfo($this->lng->txt(
'crs_cancellation_end_info'));
1230 $cancel_end = $this->
object->getCancellationEnd();
1232 $cancel->setDate($cancel_end);
1234 $form->addItem($cancel);
1237 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'crs_subscription_max_members_short'),
'subscription_membership_limitation');
1238 $lim->setInfo($this->lng->txt(
'crs_subscription_max_members_short_info'));
1240 $lim->setChecked($this->object->isSubscriptionMembershipLimited());
1243 $min->setSubmitFormOnEnter(
true);
1245 $min->setMaxLength(4);
1246 $min->setValue($this->object->getSubscriptionMinMembers() ? $this->object->getSubscriptionMinMembers() :
'');
1247 $min->setTitle($this->lng->txt(
'crs_subscription_min_members'));
1248 $min->setInfo($this->lng->txt(
'crs_subscription_min_members_info'));
1249 $lim->addSubItem($min);
1252 $max->setSubmitFormOnEnter(
true);
1254 $max->setMaxLength(4);
1255 $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() :
'');
1256 $max->setTitle($this->lng->txt(
'crs_subscription_max_members'));
1257 $max->setInfo($this->lng->txt(
'crs_reg_max_info'));
1259 $lim->addSubItem($max);
1281 $wait->addOption($option);
1283 $option =
new ilRadioOption($this->lng->txt(
'crs_waiting_list_no_autofill'), 1);
1284 $option->setInfo($this->lng->txt(
'crs_wait_info'));
1285 $wait->addOption($option);
1287 $option =
new ilRadioOption($this->lng->txt(
'crs_waiting_list_autofill'), 2);
1288 $option->setInfo($this->lng->txt(
'crs_waiting_list_autofill_info'));
1289 $wait->addOption($option);
1291 if ($this->object->hasWaitingListAutoFill()) {
1293 } elseif ($this->object->enabledWaitingList()) {
1297 $lim->addSubItem($wait);
1299 $form->addItem($lim);
1303 $pres->setTitle($this->lng->txt(
'crs_view_mode'));
1305 $form->addItem($pres);
1308 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTitleIconVisibility();
1311 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTopActionsVisibility();
1314 if ($setting->get(
"rep_breadcr_crs_overwrite")) {
1315 $add = $setting->get(
"rep_breadcr_crs_default")
1316 ?
" (" . $this->lng->txt(
"crs_breadcrumb_crs_only") .
")"
1317 :
" (" . $this->lng->txt(
"crs_breadcrumb_full_path") .
")";
1319 self::BREADCRUMB_DEFAULT => $this->lng->txt(
"crs_sys_default") . $add,
1320 self::BREADCRUMB_CRS_ONLY => $this->lng->txt(
"crs_breadcrumb_crs_only"),
1321 self::BREADCRUMB_FULL_PATH => $this->lng->txt(
"crs_breadcrumb_full_path")
1325 $si->setOptions($options);
1326 $form->addItem(
$si);
1331 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addIcon();
1334 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTileImage();
1341 $view_type->setValue($this->object->getViewMode());
1344 $opts->setInfo($this->lng->txt(
'cntr_view_info_sessions'));
1345 $view_type->addOption($opts);
1350 $sess->setChecked($this->object->isSessionLimitEnabled());
1351 $sess->setInfo($this->lng->txt(
'sess_limit_info'));
1354 #$prev->setSubmitFormOnEnter(true);
1355 $prev->setMinValue(0);
1357 $this->object->getNumberOfPreviousSessions() == -1 ?
1359 $this->object->getNumberOfPreviousSessions()
1362 $prev->setMaxLength(3);
1363 $sess->addSubItem($prev);
1366 #$next->setSubmitFormOnEnter(true);
1367 $next->setMinValue(0);
1369 $this->object->getNumberOfNextSessions() == -1 ?
1371 $this->object->getNumberOfnextSessions()
1374 $next->setMaxLength(3);
1375 $sess->addSubItem($next);
1377 $opts->addSubItem(
$sess);
1383 $optsi->setInfo($this->lng->txt(
'cntr_view_info_simple'));
1384 $view_type->addOption($optsi);
1387 $optbt->setInfo($this->lng->txt(
'cntr_view_info_by_type'));
1388 $view_type->addOption($optbt);
1391 $opto->setInfo($this->lng->txt(
'crs_view_info_objective'));
1392 $view_type->addOption($opto);
1395 $optt->setInfo($this->lng->txt(
'crs_view_info_timing'));
1399 $timing->setValue($this->object->getTimingMode());
1402 $absolute->setInfo($this->lng->txt(
'crs_view_info_timing_absolute'));
1403 $timing->addOption($absolute);
1406 $relative->setInfo($this->lng->txt(
'crs_view_info_timing_relative'));
1407 $timing->addOption($relative);
1409 $optt->addSubItem($timing);
1412 $view_type->addOption($optt);
1414 $form->addItem($view_type);
1429 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1431 include_once
'./Services/Object/classes/class.ilObjectLP.php';
1433 if ($olp->getCurrentMode()) {
1435 $lp_status->setTitle($this->lng->txt(
'crs_course_status_of_users'));
1436 $form->addItem($lp_status);
1438 $lp_status_options =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_status_determination'),
"status_dt");
1440 $lp_status_options->setValue($this->object->getStatusDetermination());
1443 $this->lng->txt(
'crs_status_determination_lp'),
1445 $this->lng->txt(
'crs_status_determination_lp_info')
1447 $lp_status_options->addOption($lp_option);
1449 $this->lng->txt(
'crs_status_determination_manual'),
1453 $form->addItem($lp_status_options);
1459 $feat->setTitle($this->lng->txt(
'obj_features'));
1460 $form->addItem($feat);
1462 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1464 $this->object->getId(),
1480 $mem->setChecked($this->object->getShowMembers());
1481 $mem->setInfo($this->lng->txt(
'crs_show_members_info'));
1482 $form->addItem($mem);
1486 $part_list =
new ilCheckboxInputGUI($this->lng->txt(
'crs_show_member_export'),
'show_members_export');
1487 $part_list->setChecked($this->object->getShowMembersExport());
1488 $part_list->setInfo($this->lng->txt(
'crs_show_member_export_info'));
1489 $mem->addSubItem($part_list);
1494 $mail_type->setValue($this->object->getMailToMembersType());
1497 $this->lng->txt(
'crs_mail_tutors_only'),
1499 $this->lng->txt(
'crs_mail_tutors_only_info')
1501 $mail_type->addOption($mail_tutors);
1504 $this->lng->txt(
'crs_mail_all'),
1506 $this->lng->txt(
'crs_mail_all_info')
1508 $mail_type->addOption($mail_all);
1509 $form->addItem($mail_type);
1517 $not =
new ilCheckboxInputGUI($this->lng->txt(
'crs_auto_notification'),
'auto_notification');
1519 $not->setInfo($this->lng->txt(
'crs_auto_notification_info'));
1520 $not->setChecked($this->object->getAutoNotification());
1521 $form->addItem($not);
1529 $desk =
new ilCheckboxInputGUI($this->lng->txt(
'crs_add_remove_from_desktop'),
'abo');
1530 $desk->setChecked($this->object->getAboStatus());
1531 $desk->setInfo($this->lng->txt(
'crs_add_remove_from_desktop_info'));
1532 $form->addItem($desk);
1536 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1538 $ecs->addSettingsToForm($form,
'crs');
1550 include_once
'Modules/Course/classes/class.ilCourseFile.php';
1552 ilUtil::deliverFile($file->getAbsolutePath(), $file->getFileName(), $file->getFileType());
1565 $ilAccess =
$DIC[
'ilAccess'];
1570 $this->tabs_gui->addSubTabTarget(
1572 $this->ctrl->getLinkTarget($this,
'edit'),
1577 $this->tabs_gui->addSubTabTarget(
1578 "crs_info_settings",
1579 $this->ctrl->getLinkTarget($this,
'editInfo'),
1584 $this->tabs_gui->addSubTabTarget(
1586 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerGUI',
'listConditions'),
1588 "ilConditionHandlerGUI"
1591 $this->tabs_gui->addSubTabTarget(
1592 "crs_start_objects",
1593 $this->ctrl->getLinkTargetByClass(
'ilContainerStartObjectsGUI',
'listStructure'),
1598 $this->tabs_gui->addSubTabTarget(
1600 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1605 if ($lti_settings->hasSettingsAccess()) {
1606 $this->tabs_gui->addSubTabTarget(
1608 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1613 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
1615 $this->tabs_gui->addSubTabTarget(
1617 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
1624 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1625 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1628 $this->tabs_gui->addSubTabTarget(
1629 'crs_custom_user_fields',
1630 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1632 'ilobjectcustomuserfieldsgui'
1638 if (
true === $validator->validate()) {
1639 $this->tabs_gui->addSubTabTarget(
1641 $this->ctrl->getLinkTargetByClass(
"ilcertificategui",
"certificateeditor"),
1647 if ($this->object->getUseNews()) {
1648 $this->tabs_gui->addSubTab(
1649 'obj_news_settings',
1650 $this->lng->txt(
"cont_news_settings"),
1651 $this->ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
1655 if ($this->object->getShowMembersExport()) {
1656 $this->tabs_gui->addSubTab(
1658 $this->lng->txt(
'crs_show_member_export_settings'),
1659 $this->ctrl->getLinkTargetByClass(
'ilmemberexportsettingsgui',
'')
1663 $this->tabs_gui->addSubTabTarget(
1664 "obj_multilinguality",
1665 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
""),
1667 "ilobjecttranslationgui"
1681 && !$this->isActiveAdministrationPanel()) {
1684 parent::showPossibleSubObjects();
1701 $a_new_object->getMemberObject()->updateNotification(
$ilUser->getId(),
$ilSetting->get(
'mail_crs_admin_notification',
true));
1703 $a_new_object->getMemberObject()->updateContact(
$ilUser->getId(), 1);
1708 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1716 ilUtil::sendSuccess($this->lng->txt(
"crs_added"),
true);
1718 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
1721 $this->ctrl->getLinkTarget($this,
"edit",
"",
false,
false)
1737 if (isset(
$_GET[
'admin_hide'])) {
1738 $ilUser->writePref(
'crs_admin_hide', (
int)
$_GET[
'admin_hide']);
1740 if (isset(
$_GET[
'tutor_hide'])) {
1741 $ilUser->writePref(
'crs_tutor_hide', (
int)
$_GET[
'tutor_hide']);
1743 if (isset(
$_GET[
'member_hide'])) {
1744 $ilUser->writePref(
'crs_member_hide', (
int)
$_GET[
'member_hide']);
1746 if (isset(
$_GET[
'subscriber_hide'])) {
1747 $ilUser->writePref(
'crs_subscriber_hide', (
int)
$_GET[
'subscriber_hide']);
1749 if (isset(
$_GET[
'wait_hide'])) {
1750 $ilUser->writePref(
'crs_wait_hide', (
int)
$_GET[
'wait_hide']);
1752 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
1754 if (isset(
$_GET[
'role_hide_' . $role_id])) {
1755 $ilUser->writePref(
'crs_role_hide_' . $role_id, (
int)
$_GET[
'role_hide_' . $role_id]);
1762 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1763 $this->show_tracking =
1768 if ($this->show_tracking) {
1769 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
1771 $this->show_tracking = $olp->isActive();
1774 if ($this->show_tracking) {
1775 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1780 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1783 if ($privacy->enabledCourseAccessTimes()) {
1784 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
1788 $do_prtf = (is_array($selected_columns) &&
1789 in_array(
'prtf', $selected_columns) &&
1792 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
1795 $this->ctrl->getLinkTarget($this,
"members")
1799 foreach ((array) $ids as $usr_id) {
1801 $tmp_data[
'firstname'] =
$name[
'firstname'];
1802 $tmp_data[
'lastname'] =
$name[
'lastname'];
1804 $tmp_data[
'passed'] = $this->
object->getMembersObject()->hasPassed($usr_id) ? 1 : 0;
1806 $tmp_data[
'passed_info'] = $this->
object->getMembersObject()->getPassedInfo($usr_id);
1808 $tmp_data[
'notification'] = $this->
object->getMembersObject()->isNotificationEnabled($usr_id) ? 1 : 0;
1809 $tmp_data[
'blocked'] = $this->
object->getMembersObject()->isBlocked($usr_id) ? 1 : 0;
1811 $tmp_data[
'contact'] = $this->
object->getMembersObject()->isContact($usr_id) ? 1 : 0;
1814 $tmp_data[
'usr_id'] = $usr_id;
1816 if ($this->show_tracking) {
1817 if (in_array($usr_id, $completed)) {
1819 } elseif (in_array($usr_id, $in_progress)) {
1821 } elseif (in_array($usr_id,
$failed)) {
1828 if ($privacy->enabledCourseAccessTimes()) {
1829 if (isset($progress[$usr_id][
'ts']) and $progress[$usr_id][
'ts']) {
1830 $tmp_data[
'access_ut'] = $progress[$usr_id][
'ts'];
1833 $tmp_data[
'access_ut'] = 0;
1834 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
1839 $tmp_data[
'prtf'] = $all_prtf[$usr_id];
1842 $members[$usr_id] = $tmp_data;
1844 return $members ? $members : array();
1859 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1862 include_once
'./Services/Object/classes/class.ilObjectLP.php';
1865 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
1866 $marks =
new ilLPMarks($this->object->getId(), $a_member_id);
1869 if ($marks->getCompleted() != $a_has_passed) {
1870 $marks->setCompleted($a_has_passed);
1874 include_once(
"./Modules/Course/classes/class.ilCourseAppEventListener.php");
1877 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
1894 if ($this->object->isSubscriptionMembershipLimited() and $this->object->getSubscriptionMaxMembers() and
1895 $this->object->getSubscriptionMaxMembers() <= $this->object->getMembersObject()->getCountMembers()) {
1901 if ($number = $this->object->getMembersObject()->autoFillSubscribers()) {
1902 ilUtil::sendSuccess($this->lng->txt(
"crs_number_users_added") .
" " . $number);
1919 if ($this->object->getMembersObject()->isLastAdmin(
$ilUser->getId())) {
1925 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
1926 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
1928 $cgui->setHeaderText($this->lng->txt(
'crs_unsubscribe_sure'));
1929 $cgui->setFormAction($this->ctrl->getFormAction($this));
1930 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancel");
1931 $cgui->setConfirm($this->lng->txt(
"crs_unsubscribe"),
"performUnsubscribe");
1932 $this->tpl->setContent($cgui->getHTML());
1952 $this->
object->getMembersObject()->delete($this->
ilias->account->getId());
1953 $this->
object->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->
ilias->account->getId());
1954 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNSUBSCRIBE,
$ilUser->getId());
1956 ilUtil::sendSuccess($this->lng->txt(
'crs_unsubscribed_from_crs'),
true);
1958 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->tree->getParentId($this->ref_id));
1959 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1967 if (
$GLOBALS[
'DIC'][
'ilAccess']->checkAccess(
'visible',
'', $this->ref_id)) {
1968 $GLOBALS[
'DIC'][
'ilTabs']->addTarget(
1970 $this->ctrl->getLinkTargetByClass(
1971 array(
"ilobjcoursegui",
"ilinfoscreengui"),
1977 if (
$GLOBALS[
'DIC'][
'ilAccess']->checkAccess(
'leave',
'', $this->object->getRefId()) and $this->object->getMemberObject()->isMember()) {
1978 $GLOBALS[
'DIC'][
'ilTabs']->addTarget(
1980 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
1995 $this->tabs_gui->addTab(
1997 $this->lng->txt(
"content"),
1998 $this->ctrl->getLinkTarget($this,
"view")
2011 $ilHelp =
$DIC[
'ilHelp'];
2013 $ilAccess =
$GLOBALS[
'DIC']->access();
2015 $ilHelp->setScreenIdComponent(
"crs");
2017 $this->ctrl->setParameter($this,
"ref_id", $this->ref_id);
2019 if ($ilAccess->checkAccess(
'read',
'', $this->ref_id)) {
2021 $this->tabs_gui->activateTab(
'view_content');
2022 if ($this->object->isNewsTimelineEffective()) {
2023 if (!$this->object->isNewsTimelineLandingPageEffective()) {
2026 $this->tabs_gui->addTab(
2028 $lng->txt(
"cont_news_timeline_tab"),
2029 $this->ctrl->getLinkTargetByClass(
"ilnewstimelinegui",
"show")
2031 if ($this->object->isNewsTimelineLandingPageEffective()) {
2040 $ilAccess->checkAccess(
'write',
'', $this->ref_id)
2042 $this->tabs->addTab(
2044 $lng->txt(
'timings_timings'),
2045 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'manageTimings')
2049 $this->object->getMemberObject()->isParticipant() and
2050 $ilAccess->checkAccess(
'read',
'', $this->ref_id)) {
2051 $this->tabs->addTab(
2053 $lng->txt(
'timings_timings'),
2054 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'managePersonalTimings')
2061 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2062 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
2064 $this->tabs_gui->addTarget(
2066 $this->ctrl->getLinkTargetByClass(
'illoeditorgui',
''),
2073 $ilAccess->checkAccess(
'visible',
'', $this->ref_id) ||
2074 $ilAccess->checkAccess(
'join',
'', $this->ref_id) ||
2075 $ilAccess->checkAccess(
'read',
'', $this->ref_id)
2082 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilinfoscreengui"
2083 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
2086 $this->tabs_gui->addTarget(
2088 $this->ctrl->getLinkTargetByClass(
2089 array(
"ilobjcoursegui",
"ilinfoscreengui"),
2098 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2099 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilconditionhandlergui"
2100 &&
$_GET[
"item_id"] ==
"")
2103 $this->tabs_gui->addTarget(
2105 $this->ctrl->getLinkTarget($this,
"edit"),
2106 array(
"edit",
"editMapSettings",
"editCourseIcons",
"listStructure"),
2115 include_once
'./Services/Mail/classes/class.ilMail.php';
2118 include_once
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
2120 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
2123 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2124 include_once
'Services/Badge/classes/class.ilBadgeHandler.php';
2126 $this->tabs_gui->addTarget(
2127 "obj_tool_setting_badges",
2128 $this->ctrl->getLinkTargetByClass(
"ilbadgemanagementgui",
""),
2130 "ilbadgemanagementgui"
2136 include_once(
"./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
2138 $this->object->getId(),
2143 if ($skmg_set->get(
"enable_skmg")) {
2144 $this->tabs_gui->addTarget(
2145 "obj_tool_setting_skills",
2146 $this->ctrl->getLinkTargetByClass(array(
"ilcontainerskillgui",
"ilcontskillpresentationgui"),
""),
2148 array(
"ilcontainerskillgui",
"ilcontskillpresentationgui",
"ilcontskilladmingui")
2155 $this->object->getId(),
2159 $this->tabs_gui->addTarget(
2160 "obj_tool_setting_booking",
2161 $this->ctrl->getLinkTargetByClass(array(
"ilbookinggatewaygui"),
"")
2166 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2168 $this->tabs_gui->addTarget(
2169 'learning_progress',
2170 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
2172 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
2177 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2178 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
2180 $mdtab = $mdgui->getTab();
2182 $this->tabs_gui->addTarget(
2186 "ilobjectmetadatagui"
2191 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2192 $this->tabs_gui->addTarget(
2194 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
2200 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)) {
2201 $this->tabs_gui->addTarget(
2203 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
2204 array(
"perm",
"info",
"owner"),
2210 if ($ilAccess->checkAccess(
'join',
'', $this->ref_id)
2211 and !$this->object->getMemberObject()->isAssigned()) {
2212 include_once
'./Modules/Course/classes/class.ilCourseWaitingList.php';
2214 $this->tabs_gui->addTab(
2216 $this->lng->txt(
'membership_leave'),
2217 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
2220 $this->tabs_gui->addTarget(
2222 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
"show"),
2228 if ($ilAccess->checkAccess(
'leave',
'', $this->object->getRefId())
2229 and $this->object->getMemberObject()->isMember()) {
2230 $this->tabs_gui->addTarget(
2232 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
2246 $ilAccess =
$DIC[
'ilAccess'];
2248 $ilTabs =
$DIC[
'ilTabs'];
2249 $ilNavigationHistory =
$DIC[
'ilNavigationHistory'];
2251 $ilToolbar =
$DIC[
'ilToolbar'];
2253 $next_class = $this->ctrl->getNextClass($this);
2254 $cmd = $this->ctrl->getCmd();
2260 $ilAccess->checkAccess(
'read',
'',
$_GET[
'ref_id'])) {
2261 include_once(
"./Services/Link/classes/class.ilLink.php");
2262 $ilNavigationHistory->addItem(
2269 $header_action =
true;
2270 switch ($next_class) {
2271 case 'ilreputilgui':
2272 $ru = new \ilRepUtilGUI($this);
2273 $this->ctrl->setReturn($this,
'trash');
2274 $this->ctrl->forwardCommand($ru);
2277 case 'illtiproviderobjectsettinggui':
2280 $this->tabs_gui->activateTab(
'settings');
2281 $this->tabs_gui->activateSubTab(
'lti_provider');
2283 $lti_gui->setCustomRolesForSelection(
$GLOBALS[
'DIC']->rbac()->review()->
getLocalRoles($this->object->getRefId()));
2284 $lti_gui->offerLTIRolesForSelection(
false);
2285 $this->ctrl->forwardCommand($lti_gui);
2288 case 'ilcoursemembershipgui':
2290 $this->tabs_gui->activateTab(
'members');
2292 include_once
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
2294 $this->ctrl->forwardCommand($mem_gui);
2297 case "ilinfoscreengui":
2301 case 'ilobjectmetadatagui':
2302 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2303 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
2305 $this->tabs_gui->setTabActive(
'meta_data');
2306 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
2308 $this->ctrl->forwardCommand($md_gui);
2311 case 'ilcourseregistrationgui':
2312 $this->ctrl->setReturn($this,
'');
2313 $this->tabs_gui->setTabActive(
'join');
2314 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2316 $this->ctrl->forwardCommand($registration);
2319 case 'ilobjectcustomuserfieldsgui':
2320 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
2323 $this->tabs_gui->activateTab(
'settings');
2324 $this->tabs_gui->activateSubTab(
'crs_custom_user_fields');
2325 $this->ctrl->forwardCommand($cdf_gui);
2328 case "ilcourseobjectivesgui":
2329 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2331 $this->ctrl->setReturn($this,
"");
2333 $ret = &$this->ctrl->forwardCommand($reg_gui);
2336 case 'ilobjcoursegroupinggui':
2337 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
2339 $this->ctrl->setReturn($this,
'edit');
2341 $this->tabs_gui->activateTab(
'settings');
2342 $this->tabs_gui->activateSubTab(
'groupings');
2344 $this->ctrl->forwardCommand($crs_grp_gui);
2348 case "ilpropertyformgui":
2351 $this->ctrl->forwardCommand($form);
2355 $this->tabs_gui->setTabActive(
'none');
2365 case "ilconditionhandlergui":
2366 include_once
'./Services/Conditions/classes/class.ilConditionHandlerGUI.php';
2369 $this->tabs_gui->activateTab(
'settings');
2370 $this->tabs_gui->activateSubTab(
'preconditions');
2372 $this->ctrl->forwardCommand($new_gui);
2375 case "illearningprogressgui":
2376 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
2380 $this->object->getRefId(),
2383 $this->ctrl->forwardCommand($new_gui);
2384 $this->tabs_gui->setTabActive(
'learning_progress');
2387 case 'ilpermissiongui':
2388 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
2389 $this->tabs_gui->setTabActive(
'perm_settings');
2391 $ret = &$this->ctrl->forwardCommand($perm_gui);
2394 case 'ilcalendarpresentationgui':
2395 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
2397 $ret = $this->ctrl->forwardCommand($cal);
2398 $header_action =
false;
2401 case 'ilcoursecontentinterface':
2403 $this->initCourseContentInterface();
2404 $this->cci_obj->cci_setContainer($this);
2406 $this->ctrl->forwardCommand($this->cci_obj);
2408 $this->tabs_gui->setTabActive(
'content');
2411 case 'ilcoursecontentgui':
2412 $this->ctrl->setReturn($this,
'members');
2413 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
2415 $this->ctrl->forwardCommand($course_content_obj);
2418 case 'ilpublicuserprofilegui':
2419 $this->tpl->enableDragDropFileUpload(
null);
2420 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
2422 $this->tabs_gui->setTabActive(
'members');
2424 $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass([
"ilCourseMembershipGUI",
"ilUsersGalleryGUI"],
'view'));
2425 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
2426 $html = $this->ctrl->forwardCommand($profile_gui);
2427 $this->tpl->setVariable(
"ADM_CONTENT", $html);
2431 case 'ilmemberagreementgui':
2432 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
2433 $this->tabs_gui->clearTargets();
2435 $this->ctrl->setReturn($this,
'');
2437 $this->ctrl->forwardCommand($agreement);
2442 case "ilcontainerpagegui":
2445 $this->tpl->setContent(
$ret);
2449 case "ilcontainerstartobjectspagegui":
2451 include_once
"Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
2453 $ret = $this->ctrl->forwardCommand($pgui);
2455 $this->tpl->setContent(
$ret);
2459 case 'ilobjectcopygui':
2460 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
2462 $cp->setType(
'crs');
2463 $this->ctrl->forwardCommand($cp);
2466 case "ilobjstylesheetgui":
2472 $this->tabs_gui->setTabActive(
'export');
2473 include_once
'./Services/Export/classes/class.ilExportGUI.php';
2475 $exp->addFormat(
'xml');
2476 $this->ctrl->forwardCommand($exp);
2479 case "ilcommonactiondispatchergui":
2480 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
2482 $this->ctrl->forwardCommand($gui);
2485 case 'ildidactictemplategui':
2486 $this->ctrl->setReturn($this,
'edit');
2487 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
2489 $this->ctrl->forwardCommand($did);
2492 case "ilcertificategui":
2493 $this->tabs_gui->activateTab(
"settings");
2495 $this->tabs_gui->activateSubTab(
'certificate');
2498 $output_gui = $guiFactory->create($this->
object);
2499 $this->ctrl->forwardCommand($output_gui);
2502 case 'ilobjectservicesettingsgui':
2503 $this->ctrl->setReturn($this,
'edit');
2505 $this->tabs_gui->activateTab(
'settings');
2506 $this->tabs_gui->acltivateSubTab(
'tool_settings');
2508 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2511 $this->object->getId(),
2516 $this->ctrl->forwardCommand(
$service);
2519 case 'illoeditorgui':
2520 #$this->tabs_gui->clearTargets();
2521 #$this->tabs_gui->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,''));
2522 $this->tabs_gui->activateTab(
'crs_objectives');
2524 include_once
'./Modules/Course/classes/Objectives/class.ilLOEditorGUI.php';
2526 $this->ctrl->forwardCommand($editor);
2529 case 'ilcontainerstartobjectsgui':
2530 $this->ctrl->setReturn($this,
'edit');
2531 $this->tabs_gui->clearTargets();
2532 $this->tabs_gui->setBackTarget(
2533 $this->lng->txt(
"back_to_crs_content"),
2534 $this->ctrl->getLinkTarget($this,
"edit")
2536 $this->tabs_gui->addTab(
2538 $this->lng->txt(
"crs_start_objects"),
2539 $this->ctrl->getLinkTargetByClass(
"ilcontainerstartobjectsgui",
"listStructure")
2543 $ilHelp =
$DIC[
'ilHelp'];
2544 $ilHelp->setScreenIdComponent(
"crs");
2546 include_once
'./Services/Container/classes/class.ilContainerStartObjectsGUI.php';
2548 $this->ctrl->forwardCommand($stgui);
2551 case 'illomembertestresultgui':
2552 include_once
'./Modules/Course/classes/Objectives/class.ilLOMemberTestResultGUI.php';
2553 $GLOBALS[
'DIC'][
'ilCtrl']->setReturn($this,
'members');
2554 $GLOBALS[
'DIC'][
'ilTabs']->clearTargets();
2555 $GLOBALS[
'DIC'][
'ilTabs']->setBackTarget(
2556 $GLOBALS[
'DIC'][
'lng']->txt(
'back'),
2557 $GLOBALS[
'DIC'][
'ilCtrl']->getLinkTarget($this,
'members')
2561 $this->ctrl->forwardCommand($result_view);
2564 case 'ilmailmembersearchgui':
2565 include_once
'Services/Mail/classes/class.ilMail.php';
2570 $ilAccess->checkAccess(
'manage_members',
"", $this->object->getRefId())) &&
2571 $rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
2572 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),
$ilErr->MESSAGE);
2575 $this->tabs_gui->setTabActive(
'members');
2577 include_once
'./Services/Contact/classes/class.ilMailMemberSearchGUI.php';
2578 include_once
'./Services/Contact/classes/class.ilMailMemberCourseRoles.php';
2581 $mail_search->setObjParticipants(
2584 $this->ctrl->forwardCommand($mail_search);
2587 case 'ilbadgemanagementgui':
2588 $this->tabs_gui->setTabActive(
'obj_tool_setting_badges');
2589 include_once
'Services/Badge/classes/class.ilBadgeManagementGUI.php';
2591 $this->ctrl->forwardCommand($bgui);
2594 case "ilcontainernewssettingsgui":
2596 $this->tabs_gui->activateTab(
'settings');
2597 $this->tabs_gui->activateSubTab(
'obj_news_settings');
2599 $news_set_gui->setTimeline(
true);
2600 $news_set_gui->setCronNotifications(
true);
2601 $news_set_gui->setHideByDate(
true);
2602 $this->ctrl->forwardCommand($news_set_gui);
2605 case "ilnewstimelinegui":
2606 $this->tabs_gui->setTabActive(
'news_timeline');
2607 include_once(
"./Services/News/classes/class.ilNewsTimelineGUI.php");
2609 $t->setUserEditAll($ilAccess->checkAccess(
'write',
'', $this->object->getRefId(),
'grp'));
2611 $this->ctrl->forwardCommand($t);
2612 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
2615 $this->object->getId(),
2616 $this->object->getRefId(),
2621 case 'ilmemberexportsettingsgui':
2623 $this->tabs_gui->activateTab(
'properties');
2624 $this->tabs_gui->activateSubTab(
'export_members');
2625 include_once
'./Services/Membership/classes/Export/class.ilMemberExportSettingsGUI.php';
2627 $this->ctrl->forwardCommand($settings_gui);
2631 case "ilcontainerskillgui":
2632 $this->tabs_gui->activateTab(
'obj_tool_setting_skills');
2633 include_once(
"./Services/Container/Skills/classes/class.ilContainerSkillGUI.php");
2635 $this->ctrl->forwardCommand($gui);
2639 case 'ilobjecttranslationgui':
2642 $this->tabs_gui->activateTab(
"settings");
2643 $this->tabs_gui->activateSubTab(
"obj_multilinguality");
2644 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
2646 $this->ctrl->forwardCommand($transgui);
2649 case "ilbookinggatewaygui":
2650 $this->tabs_gui->activateTab(
'obj_tool_setting_booking');
2652 $this->ctrl->forwardCommand($gui);
2668 if ($cmd ==
'infoScreenGoto') {
2673 $cmd =
'infoScreen';
2677 if (!$this->creation_mode) {
2678 if ($cmd ==
"infoScreen") {
2686 if (!$this->creation_mode
2687 && $cmd !=
'infoScreen'
2688 && $cmd !=
'sendfile'
2689 && $cmd !=
'unsubscribe'
2690 && $cmd !=
'deliverCertificate'
2691 && $cmd !=
'performUnsubscribe'
2692 && !$ilAccess->checkAccess(
"read",
'', $this->object->getRefId())
2694 || $cmd ==
'subscribe') {
2695 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
2696 if (
$rbacsystem->checkAccess(
'join', $this->object->getRefId()) &&
2698 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2699 $this->ctrl->redirectByClass(
"ilCourseRegistrationGUI");
2706 if ($cmd ==
'listObjectives') {
2707 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2709 $this->ctrl->setReturn($this,
"");
2711 $ret = &$this->ctrl->forwardCommand($obj_gui);
2719 if ($cmd ==
"" && $this->object->isNewsTimelineLandingPageEffective()) {
2720 $this->ctrl->redirectbyclass(
"ilnewstimelinegui");
2732 if ($header_action) {
2750 $ilAccess =
$DIC[
'ilAccess'];
2752 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2757 if (!$this->object->getMemberObject()->isAssigned()) {
2761 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
2766 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2767 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
2773 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': Missing course confirmation.');
2777 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
2779 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': Missing required fields');
2788 return array(
"ilCourseRegisterGUI",
'ilConditionHandlerGUI');
2795 $ilLocator =
$DIC[
'ilLocator'];
2796 switch ($this->ctrl->getCmd()) {
2798 #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
2808 $GLOBALS[
'DIC'][
'ilCtrl']->redirectByClass(
'ilcoursemembershipgui');
2814 public static function _goto($a_target, $a_add =
"")
2818 $ilAccess =
$DIC[
'ilAccess'];
2823 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2824 if (substr($a_add, 0, 5) ==
'rcode') {
2825 if (
$ilUser->getId() == ANONYMOUS_USER_ID) {
2828 "login.php?target=" .
$_GET[
"target"] .
"&cmd=force_login&lang=" .
2841 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"manage_members",
"", $a_target)) {
2845 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2849 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
2852 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
2854 $lng->txt(
"msg_no_perm_read_item"),
2875 $ilAccess =
$DIC[
'ilAccess'];
2878 $this->tabs_gui->activateTab(
'settings');
2879 $this->tabs_gui->activateSubTab(
'crs_map_settings');
2882 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
2886 $latitude = $this->
object->getLatitude();
2887 $longitude = $this->
object->getLongitude();
2888 $zoom = $this->
object->getLocationZoom();
2891 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
2893 $latitude = $def[
"latitude"];
2894 $longitude = $def[
"longitude"];
2895 $zoom = $def[
"zoom"];
2898 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2900 $form->setFormAction(
$ilCtrl->getFormAction($this));
2902 $form->setTitle($this->lng->txt(
"crs_map_settings"));
2906 $this->lng->txt(
"crs_enable_map"),
2909 $public->setValue(
"1");
2910 $public->setChecked($this->object->getEnableCourseMap());
2911 $form->addItem($public);
2915 $this->lng->txt(
"crs_map_location"),
2918 $loc_prop->setLatitude($latitude);
2919 $loc_prop->setLongitude($longitude);
2920 $loc_prop->setZoom($zoom);
2921 $form->addItem($loc_prop);
2923 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
2925 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
2940 $this->
object->update();
2942 $ilCtrl->redirect($this,
"editMapSettings");
2957 'ilcoursecontentgui',
2960 $this->object->getAboStatus(),
2961 $this->object->getRefId(),
2962 $this->object->getId()
2977 $a_parent_ref_id = 0
2982 $ilAccess =
$DIC[
'ilAccess'];
2985 if ($a_parent_ref_id == 0) {
2986 $a_parent_ref_id = $a_course_ref_id;
2990 if ($a_item_data[
'type'] ==
'tst' and
2992 $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));
2995 $a_item_list_gui->enableSubscribe($a_abo_status);
2997 $is_tutor = ($ilAccess->checkAccess(
3005 if ($a_show_path and $is_tutor) {
3006 $a_item_list_gui->addCustomProperty(
3008 ilContainer::_buildPath($a_item_data[
'ref_id'], $a_course_ref_id),
3022 $ilAccess =
$DIC[
'ilAccess'];
3026 if ($this->object->getType() !=
'crs') {
3029 if (!$ilAccess->checkAccess(
3032 $this->object->getRefId(),
3034 $this->object->getId()
3038 if ($this->object->enabledObjectiveView()) {
3049 if (!
$_SESSION[
'crs_timings_panel'][$this->object->getId()] or 1) {
3051 $this->tabs_gui->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"view"));
3053 $this->tabs_gui->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"disableAdministrationPanel"));
3078 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
3081 if (is_array(
$_POST[$a_field][
'date'])) {
3082 $dt[
'year'] = (int)
$_POST[$a_field][
'date'][
'y'];
3083 $dt[
'mon'] = (int)
$_POST[$a_field][
'date'][
'm'];
3084 $dt[
'mday'] = (int)
$_POST[$a_field][
'date'][
'd'];
3085 $dt[
'hours'] = (int)
$_POST[$a_field][
'time'][
'h'];
3086 $dt[
'minutes'] = (int)
$_POST[$a_field][
'time'][
'm'];
3087 $dt[
'seconds'] = (int)
$_POST[$a_field][
'time'][
's'];
3089 $date = date_parse(
$_POST[$a_field][
'date'] .
" " .
$_POST[$a_field][
'time']);
3090 $dt[
'year'] = (int) $date[
'year'];
3091 $dt[
'mon'] = (int) $date[
'month'];
3092 $dt[
'mday'] = (int) $date[
'day'];
3093 $dt[
'hours'] = (int) $date[
'hour'];
3094 $dt[
'minutes'] = (int) $date[
'minute'];
3095 $dt[
'seconds'] = (int) $date[
'second'];
3113 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
3115 $confirm->setFormAction($this->ctrl->getFormAction($this));
3116 $confirm->setConfirm($this->lng->txt(
'reset'),
'reset');
3117 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
3119 $GLOBALS[
'DIC'][
'tpl']->setContent($confirm->getHTML());
3129 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3131 $usr_results->delete();
3134 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestRun.php';
3135 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
3137 $this->object->getId(),
3141 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
3144 $tmp_obj_res->reset($this->object->getId());
3146 $ilUser->deletePref(
'crs_objectives_force_details_' . $this->object->getId());
3148 ilUtil::sendSuccess($this->lng->txt(
'crs_objectives_reseted'));
3156 $ilAccess =
$DIC[
'ilAccess'];
3159 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
3163 include_once
'./Services/Container/classes/class.ilContainerStartObjects.php';
3165 $this->object->getRefId(),
3166 $this->object->getId()
3168 if (count($this->start_obj->getStartObjects()) &&
3169 !$this->start_obj->allFullfilled(
$ilUser->getId())) {
3186 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
3188 if (
$settings->isActive() and
$settings->getContainer() != $this->object->getRefId()) {
3189 $settings->setContainer($this->object->getRefId());
3193 parent::prepareOutput($a_show_subobjects);
3202 $link = chr(13) . chr(10) . chr(13) . chr(10);
3203 $link .= $this->lng->txt(
'crs_mail_permanent_link');
3204 $link .= chr(13) . chr(10) . chr(13) . chr(10);
3205 include_once
'./Services/Link/classes/class.ilLink.php';
3207 return rawurlencode(base64_encode($link));
3216 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3222 if (
true === $validator->isCertificateDownloadable(
$ilUser->getId(), $this->object->getId())) {
3223 $cert_url = $this->ctrl->getLinkTarget($this,
"deliverCertificate");
3225 $this->lng->loadLanguageModule(
"certificate");
3226 $lg->addCustomCommand($cert_url,
"download_certificate");
3231 $this->lng->txt(
"download_certificate"),
3239 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
3242 if (!$noti->isCurrentUserActive()) {
3246 $this->lng->txt(
"crs_notification_deactivated")
3249 $this->ctrl->setParameter($this,
"crs_ntf", 1);
3250 $caption =
"crs_activate_notification";
3255 $this->lng->txt(
"crs_notification_activated")
3258 $this->ctrl->setParameter($this,
"crs_ntf", 0);
3259 $caption =
"crs_deactivate_notification";
3262 if ($noti->canCurrentUserEdit()) {
3263 $lg->addCustomCommand(
3264 $this->ctrl->getLinkTarget($this,
"saveNotification"),
3269 $this->ctrl->setParameter($this,
"crs_ntf",
"");
3281 $ilAccess =
$DIC[
'ilAccess'];
3284 if ($ilAccess->checkAccess(
'manage_members',
'', $this->ref_id)) {
3285 $user_id = $_REQUEST[
"member_id"];
3291 $objId = (int) $this->object->getId();
3295 if (
false === $validator->isCertificateDownloadable($user_id,
$objId)) {
3297 $this->ctrl->redirect($this);
3302 $certLogger =
$DIC->logger()->cert();
3309 $this->lng->txt(
'error_creating_certificate_pdf')
3312 $pdfAction->downloadPdf((
int) $user_id,
$objId);
3318 $this->ctrl->redirectByClass(array(
'ilrepositorygui',
'ilobjcoursegui',
'illoeditorgui'),
'materials');
3323 if (isset(
$_POST[
'position'][
"lobj"])) {
3324 $lobj =
$_POST[
'position'][
"lobj"];
3325 unset(
$_POST[
'position'][
"lobj"]);
3327 $objective_order = array();
3328 foreach ($lobj as $objective_id => $materials) {
3329 $objective_order[$objective_id] = $materials[0];
3330 unset($lobj[$objective_id][0]);
3334 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
3335 asort($objective_order);
3337 foreach (array_keys($objective_order) as $objective_id) {
3339 $obj->writePosition(++$pos);
3343 include_once
"Modules/Course/classes/class.ilCourseObjectiveMaterials.php";
3344 foreach ($lobj as $objective_id => $materials) {
3349 foreach (array_keys($materials) as $ass_id) {
3350 $objmat->writePosition($ass_id, ++$pos);
3355 return parent::saveSortingObject();
3364 include_once
'./Services/Link/classes/class.ilLink.php';
3374 $objective_id = (int) $_REQUEST[
'objective_id'];
3375 $test_id = (int) $_REQUEST[
'tid'];
3377 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3378 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
3379 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
3383 $this->object->getId(),
3386 $passed =
$res->getCompletedObjectiveIds();
3388 $has_completed =
false;
3389 if ($objective_id) {
3390 $objective_ids = array($objective_id);
3391 if (in_array($objective_id, $passed)) {
3392 $has_completed =
true;
3396 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
3400 if (count($objective_ids) == count($passed)) {
3401 $has_completed =
true;
3406 if ($has_completed) {
3412 include_once
'./Services/Link/classes/class.ilLink.php';
3424 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
3428 if ($a_objective_id) {
3429 $question = $this->lng->txt(
'crs_loc_objective_passed_confirmation');
3431 $question = $this->lng->txt(
'crs_loc_objectives_passed_confirmation');
3434 $confirm->addHiddenItem(
'objective_id', $a_objective_id);
3435 $confirm->addHiddenItem(
'tid', $a_test_id);
3436 $confirm->setConfirm($this->lng->txt(
'crs_loc_tst_start'),
'redirectLocToTestConfirmed');
3437 $confirm->setCancel($this->lng->txt(
'cancel'),
'view');
3441 $GLOBALS[
'DIC'][
'tpl']->setContent($confirm->getHTML());
3454 $crs_admin = $this->
object->getDefaultAdminRole();
3455 $crs_member = $this->
object->getDefaultMemberRole();
3456 $local_roles = $this->
object->getLocalCourseRoles(
false);
3457 $crs_roles = array();
3460 if (in_array($crs_member, $local_roles)) {
3461 #$crs_roles[$crs_member] = ilObjRole::_getTranslation(array_search ($crs_member, $local_roles));
3462 #unset($local_roles[$crs_roles[$crs_member]]);
3465 foreach ($local_roles as $title => $role_id) {
3473 if (count($a_exclude) > 0) {
3474 foreach ($a_exclude as $excluded_role) {
3475 if (isset($crs_roles[$excluded_role])) {
3476 unset($crs_roles[$excluded_role]);
3502 $this->ctrl->redirectByClass(
'ilUsersGalleryGUI');
3510 $this->ctrl->setReturn($this,
"view");
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
const IL_CRS_SUBSCRIPTION_LIMITED
const IL_CRS_VIEW_SESSIONS
const IL_CRS_VIEW_TIMING_ABSOLUTE
const IL_CRS_VIEW_OBJECTIVE
const IL_CRS_VIEW_BY_TYPE
const IL_CRS_SUBSCRIPTION_PASSWORD
const IL_CRS_SUBSCRIPTION_CONFIRMATION
const IL_CRS_SUBSCRIPTION_UNLIMITED
const IL_CRS_SUBSCRIPTION_DEACTIVATED
const IL_CRS_SUBSCRIPTION_DIRECT
const IL_CRS_VIEW_TIMING_RELATIVE
const IL_CRS_ADMIN
Base class for course and group participants.
static getInstance()
Constructor.
Class ilBadgeManagementGUI.
This class is used for inegration of the booking manager as a service into other repository objects,...
Validates if an active certificate is stored in the database and can be downloaded by the user.
Just a wrapper class to create Unit Test for other classes.
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
class ilConditionHandlerGUI
Confirmation screen class.
afterUpdate()
Post (successful) object update hook.
isActiveAdministrationPanel()
& forwardToPageObject()
forward command to page object
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.
showPermanentLink()
show permanent link
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
forwardToStyleSheet()
Forward to style object.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
News settings for containers.
Skills for container (course/group) (top gui class)
Class ilContainerStartObjectsContentGUI.
Class ilContainerStartObjectsGUI.
Container start objects page GUI class.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
static setBlockedForLP($a_status)
Toggle LP blocking property status.
const MAIL_ALLOWED_TUTORS
Class ilCourseContentGUI.
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
static _hasFields($a_container_id)
Check if there are any define fields.
static _fieldsToInfoString($a_obj_id)
Fields to info string.
static _readFilesByCourse($a_course_id)
class ilCourseObjectiveMaterials
static _getCountObjectives($a_obj_id, $a_activated_only=false)
get count objectives
static _getObjectiveIds($course_id, $a_activated_only=false)
class ilobjcourseobjectivesgui
static _getInstanceByObjId($a_obj_id, $a_usr_id)
Get singleton instance.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static getMemberRoles($a_ref_id)
Get member roles.
GUI class for course registrations.
static _checkRequired($a_usr_id, $a_obj_id)
Check required fields.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
@classDescription Date and time handling
GUI class for didactic template settings inside repository objects.
Class ilECSCourseSettings.
static _getInstanceByType($a_type)
Get Singleton Instance.
Export User Interface Class.
static deleteRuns($a_container_id, $a_user_id)
Delete runs @global type $ilDB.
const LP_MODE_MANUAL_BY_TUTOR
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
const LP_STATUS_COMPLETED
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS
GUI class for LTI provider object settings.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
static _lookupProgressByObjId($a_obj_id)
lookup progress for a specific object
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
Class ilMailMemberCourseRoles.
Class ilMailMemberSearchGUI.
static isActivated()
Checks whether Map feature is activated.
static getDefaultSettings()
Get default longitude, latitude and zoom.
static _hasAccepted($a_usr_id, $a_obj_id)
Check if user has accepted agreement.
Membership notification settings.
static isActiveForRefId(int $ref_id)
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
static generateCode()
Generate new registration key.
static getInstance($a_ref_id, $a_include_auto_entries)
Get instance.
static lookupRegistrationInfo($a_obj_id)
Lookup registration info @global ilDB $ilDB @global ilObjUser $ilUser @global ilLanguage $lng.
checkAgreement()
Check agreement and redirect if it is not accepted.
deliverCertificateObject()
setContentSubTabs()
Set content sub tabs.
afterSave(ilObject $a_new_object)
save object @access public
membersObject()
Called from goto?
const BREADCRUMB_FULL_PATH
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify Item ListGUI for presentation in container.
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add file manager link.
hasAdminPermission()
user has admin permission or "edit permission" permission on this course
executeCommand()
execute command note: this method is overwritten in all container objects
updateLPFromStatus($a_member_id, $a_has_passed)
sync course status and lp status
saveNotificationObject()
:TEMP: Save notification setting (from infoscreen)
afterImport(ilObject $a_new_object)
add course admin after import file
initInfoEditor()
init info editor
editMapSettingsObject()
Edit Map Settings.
static _goto($a_target, $a_add="")
goto target course
setSubTabs($a_tab)
set sub tabs
editInfoObject(ilPropertyFormGUI $a_form=null)
Edit info page informations.
addContentTab()
Add content tab.
getLocalRoles($a_exclude=array())
createMailSignature()
Create a course mail signature.
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.
redirectLocToTestConfirmedObject()
saveSortingObject()
Save Sorting.
__construct()
Constructor @access public.
setSideColumnReturn()
Set return point for side column actions.
redirectLocToTestObject($a_force_new_run=null)
Test redirection will be moved lo adapter.
loadDate($a_field)
load date
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
const BREADCRUMB_CRS_ONLY
updateObject()
Update course settings @global type $ilUser.
askResetObject()
ask reset test results
getAgreementTabs()
Get tabs for member agreement.
infoScreen()
Show info screen.
setShowHidePrefs()
set preferences (show/hide tabel content)
jump2UsersGalleryObject()
unsubscribeObject()
DEPRECATED?
confirmDeleteInfoFilesObject()
show info file donfimation table
editObject(ilPropertyFormGUI $form=null)
edit object
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
deleteInfoFilesObject()
Delete info files.
redirectLocToTestConfirmation($a_objective_id, $a_test_id)
Show confirmation whether user wants to start a new run or resume a previous run.
showPossibleSubObjects()
show possible sub objects selection list
renderObject()
render the object
performUnsubscribeObject()
prepareOutput($a_show_subobjects=true)
Handle member view.
getEditFormValues()
Get values for edit form.
readMemberData($ids, $selected_columns=null)
Class ilObjCourseGroupingGUI.
static _lookupViewMode($a_id)
lookup view mode of container
const STATUS_DETERMINATION_MANUAL
static _registrationEnabled($a_obj_id)
Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.
const STATUS_DETERMINATION_LP
static _isActivated($a_obj_id)
Is activated.
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, $a_back_url=null)
static _getTranslation($a_role_title)
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
GUI class for the workflow of copying objects.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
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.
getObjectService()
Get object service.
static getInstance($a_obj_id)
GUI class for service settings (calendar, notes, comments)
const AUTO_RATING_NEW_OBJECTS
const ORGU_POSITION_ACCESS
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
const CALENDAR_VISIBILITY
GUI class for object translation handling.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
update()
update object in db
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
getId()
get object id @access public
static _lookupType($a_id, $a_reference=false)
lookup object type
static getInstanceByObjId($a_obj_id)
Get instance by obj type.
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
GUI class for public user profile presentation.
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static redirect($a_script)
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 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 getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilPdfGeneratorConstantsTest.
redirection script todo: (a better solution should control the processing via a xml file)
foreach($_POST as $key=> $value) $res