5require_once
"./Services/Container/classes/class.ilContainerGUI.php";
49 $ilCtrl =
$DIC[
'ilCtrl'];
50 $ilHelp =
$DIC[
'ilHelp'];
53 $this->ctrl = $ilCtrl;
54 $this->ctrl->saveParameter($this, array(
"ref_id",
"cmdClass"));
59 $this->lng->loadLanguageModule(
'crs');
60 $this->lng->loadLanguageModule(
'cert');
61 $this->lng->loadLanguageModule(
'obj');
63 $this->SEARCH_USER = 1;
64 $this->SEARCH_GROUP = 2;
65 $this->SEARCH_COURSE = 3;
66 $this->news =
$DIC->news();
71 switch (
$_POST[
"action"]) {
73 case "deleteSubscribers":
74 $this->deleteSubscribers();
77 case "addSubscribers":
78 $this->addSubscribers();
81 case "addFromWaitingList":
82 $this->addFromWaitingList();
85 case "removeFromWaitingList":
86 $this->removeFromWaitingList();
108 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
111 $part->updateNotification(
$ilUser->getId(),
$ilSetting->get(
'mail_crs_admin_notification',
true));
113 parent::afterImport($a_new_object);
118 $this->ctrl->setCmd(
"view");
128 $ilCtrl =
$DIC[
'ilCtrl'];
130 $this->tabs_gui->setTabActive(
'view_content');
140 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
141 parent::viewObject();
146 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
150 if ($ilCtrl->getNextClass() !=
"ilcolumngui") {
151 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
154 $this->object->getId(),
155 $this->object->getRefId(),
161 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
162 $this->tabs_gui->clearTargets();
163 $this->ctrl->setReturn($this,
'view_content');
165 $this->ctrl->setCmdClass(get_class($agreement));
166 $this->ctrl->forwardCommand($agreement);
171 include_once
"Services/Container/classes/class.ilContainerStartObjectsContentGUI.php";
173 $stgui->enableDesktop($this->object->getAboStatus(), $this);
174 return $stgui->getHTML();
184 $ret = parent::renderObject();
187 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
190 $this->ctrl->setCmdClass(get_class($course_content_obj));
191 $this->ctrl->forwardCommand($course_content_obj);
199 return parent::renderObject();
209 $this->ctrl->setCmd(
"showSummary");
210 $this->ctrl->setCmdClass(
"ilinfoscreengui");
226 $ilAccess =
$DIC[
'ilAccess'];
235 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
238 $this->tabs_gui->setTabActive(
'info_short');
240 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
241 include_once
'Modules/Course/classes/class.ilCourseFile.php';
246 $info->enablePrivateNotes();
247 $info->enableFeedback();
249 $info->enableBookingInfo(
true);
250 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
251 $info->enableNewsEditing();
255 strlen($this->object->getImportantInformation()) ||
256 strlen($this->object->getSyllabus()) ||
257 strlen($this->object->getTargetGroup()) ||
259 $info->addSection($this->lng->txt(
'crs_general_informations'));
262 if (strlen($this->object->getImportantInformation())) {
264 $this->lng->txt(
'crs_important_info'),
270 if (strlen($this->object->getSyllabus())) {
271 $info->addProperty($this->lng->txt(
'crs_syllabus'), nl2br(
275 if (strlen($this->object->getTargetGroup())) {
277 $this->lng->txt(
'crs_target_group'),
285 $tpl =
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'Modules/Course');
287 foreach ($files as $file) {
288 $tpl->setCurrentBlock(
"files");
289 $this->ctrl->setParameter($this,
'file_id', $file->getFileId());
290 $tpl->setVariable(
"DOWN_LINK", $this->ctrl->getLinkTarget($this,
'sendfile'));
291 $tpl->setVariable(
"DOWN_NAME", $file->getFileName());
292 $tpl->setVariable(
"DOWN_INFO_TXT", $this->lng->txt(
'crs_file_size_info'));
293 $tpl->setVariable(
"DOWN_SIZE", $file->getFileSize());
294 $tpl->setVariable(
"TXT_BYTES", $this->lng->txt(
'bytes'));
295 $tpl->parseCurrentBlock();
298 $this->lng->txt(
'crs_file_download'),
303 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
305 $record_gui->setInfoObject($info);
306 $record_gui->parse();
309 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
312 if ($this->object->hasContactData()) {
313 $info->addSection($this->lng->txt(
"crs_contact"));
315 if (strlen($this->object->getContactName())) {
317 $this->lng->txt(
"crs_contact_name"),
318 $this->object->getContactName()
321 if (strlen($this->object->getContactResponsibility())) {
323 $this->lng->txt(
"crs_contact_responsibility"),
324 $this->object->getContactResponsibility()
327 if (strlen($this->object->getContactPhone())) {
329 $this->lng->txt(
"crs_contact_phone"),
330 $this->object->getContactPhone()
333 if ($this->object->getContactEmail()) {
334 include_once
'./Modules/Course/classes/class.ilCourseMailTemplateMemberContext.php';
335 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
337 $emails = explode(
",", $this->object->getContactEmail());
338 foreach ($emails as
$email) {
340 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true,
'Modules/Course');
354 'ref_id' => $this->object->getRefId(),
359 $etpl->setVariable(
"CONTACT_EMAIL",
$email);
360 $mailString .= $etpl->get() .
"<br />";
362 $info->addProperty($this->lng->txt(
"crs_contact_email"), $mailString);
364 if (strlen($this->object->getContactConsultation())) {
366 $this->lng->txt(
"crs_contact_consultation"),
367 nl2br($this->object->getContactConsultation())
374 $conts = $parts->getContacts();
375 if (count($conts) > 0) {
376 $info->addSection($this->lng->txt(
"crs_mem_contacts"));
377 foreach ($conts as
$c) {
378 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
380 $pgui->setBackUrl($this->ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
381 $pgui->setEmbedded(
true);
382 $info->addProperty(
"", $pgui->getHTML());
393 $info->enableAvailability(
false);
394 $this->lng->loadLanguageModule(
"rep");
395 $info->addSection($this->lng->txt(
"rep_activation_availability"));
396 $info->showLDAPRoleGroupMappingInfo();
399 $info->addAccessPeriodProperty();
401 switch ($this->object->getSubscriptionLimitationType()) {
403 $txt = $this->lng->txt(
"crs_info_reg_deactivated");
407 switch ($this->object->getSubscriptionType()) {
409 $txt = $this->lng->txt(
"crs_info_reg_confirmation");
412 $txt = $this->lng->txt(
"crs_info_reg_direct");
415 $txt = $this->lng->txt(
"crs_info_reg_password");
421 $info->addProperty($this->lng->txt(
"crs_info_reg"),
$txt);
425 if ($this->object->getSubscriptionUnlimitedStatus()) {
427 $this->lng->txt(
"crs_reg_until"),
428 $this->lng->txt(
'crs_unlimited')
430 } elseif ($this->object->getSubscriptionStart() < time()) {
432 $this->lng->txt(
"crs_reg_until"),
433 $this->lng->txt(
'crs_to') .
' ' .
436 } elseif ($this->object->getSubscriptionStart() > time()) {
438 $this->lng->txt(
"crs_reg_until"),
439 $this->lng->txt(
'crs_from') .
' ' .
443 if ($this->object->isSubscriptionMembershipLimited()) {
444 if ($this->object->getSubscriptionMinMembers()) {
446 $this->lng->txt(
"mem_min_users"),
447 $this->object->getSubscriptionMinMembers()
450 if ($this->object->getSubscriptionMaxMembers()) {
451 include_once
'./Modules/Course/classes/class.ilObjCourseAccess.php';
455 $this->lng->txt(
'mem_free_places'),
456 $reg_info[
'reg_info_free_places']
462 if ($this->object->getCancellationEnd()) {
464 $this->lng->txt(
'crs_cancellation_end'),
470 $this->object->getCourseStart() instanceof
ilDateTime &&
471 !$this->object->getCourseStart()->
isNull()
474 $this->lng->txt(
'crs_period'),
476 $this->object->getCourseStart(),
477 $this->object->getCourseEnd()
483 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
486 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
488 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
492 $this->lng->loadLanguageModule(
'ps');
493 $info->addSection($this->lng->txt(
'crs_user_agreement_info'));
494 $info->addProperty($this->lng->txt(
'ps_export_data'), $field_info->exportableFieldsToInfoString());
497 $info->addProperty($this->lng->txt(
'ps_crs_user_fields'), $fields);
501 $info->enableLearningProgress(
true);
504 $this->ctrl->forwardCommand($info);
512 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
514 if ($noti->canCurrentUserEdit()) {
515 if ((
bool) $_REQUEST[
"crs_ntf"]) {
516 $noti->activateUser();
518 $noti->deactivateUser();
521 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
522 $this->ctrl->redirect($this,
"");
533 include_once
'Modules/Course/classes/class.ilCourseFile.php';
538 $ilAccess =
$DIC[
'ilAccess'];
548 $this->tabs_gui->setTabActive(
'settings');
549 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
554 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'Modules/Course');
555 $this->tpl->setVariable(
'INFO_TABLE', $a_form->getHTML());
561 foreach ($files as $file) {
562 $table_data[
'id'] = $file->getFileId();
563 $table_data[
'filename'] = $file->getFileName();
564 $table_data[
'filetype'] = $file->getFileType();
565 $table_data[
'filesize'] = $file->getFileSize();
567 $rows[] = $table_data;
570 include_once(
"./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
572 $table_gui->setTitle($this->lng->txt(
"crs_info_download"));
573 $table_gui->setData(
$rows);
574 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
575 $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->lng->txt(
"delete"));
576 $table_gui->setSelectAllCheckbox(
"file_id");
577 $this->tpl->setVariable(
'INFO_FILE_TABLE', $table_gui->getHTML());
591 if (!count(
$_POST[
'file_id'])) {
598 $this->tabs_gui->setTabActive(
'settings');
599 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
601 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
605 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteInfoFiles"));
606 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
607 $c_gui->setCancel($this->lng->txt(
"cancel"),
"editInfo");
608 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteInfoFiles");
611 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
612 foreach (
$_POST[
"file_id"] as $file_id) {
614 $c_gui->addItem(
"file_id[]", $file_id, $file->getFileName());
617 $this->tpl->setContent($c_gui->getHTML());
628 if (!count(
$_POST[
'file_id'])) {
633 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
635 foreach (
$_POST[
'file_id'] as $file_id) {
637 if ($this->object->getId() == $file->getCourseId()) {
641 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'));
655 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
657 $form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
658 $form->setMultipart(
true);
659 $form->setTitle($this->lng->txt(
'crs_general_info'));
660 $form->addCommandButton(
'updateInfo', $this->lng->txt(
'save'));
661 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
664 $area->setValue($this->object->getImportantInformation());
667 $form->addItem($area);
670 $area->setValue($this->object->getSyllabus());
673 $form->addItem($area);
675 $tg = new \ilTextAreaInputGUI($this->lng->txt(
'crs_target_group'),
'target_group');
676 $tg->setValue($this->object->getTargetGroup());
681 $section->setTitle($this->lng->txt(
'crs_info_download'));
685 $file->enableFileNameSelection(
'file_name');
686 $form->addItem($file);
689 $section->setTitle($this->lng->txt(
'crs_contact'));
692 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_name'),
'contact_name');
693 $text->setValue($this->object->getContactName());
695 $text->setMaxLength(70);
696 $form->addItem($text);
698 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
699 $text->setValue($this->object->getContactResponsibility());
701 $text->setMaxLength(70);
702 $form->addItem($text);
704 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_phone'),
'contact_phone');
705 $text->setValue($this->object->getContactPhone());
707 $text->setMaxLength(40);
708 $form->addItem($text);
710 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_email'),
'contact_email');
711 $text->setValue($this->object->getContactEmail());
712 $text->setInfo($this->lng->txt(
'crs_contact_email_info'));
714 $text->setMaxLength(255);
715 $form->addItem($text);
717 $area =
new ilTextAreaInputGUI($this->lng->txt(
'crs_contact_consultation'),
'contact_consultation');
718 $area->setValue($this->object->getContactConsultation());
721 $form->addItem($area);
723 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
725 $this->record_gui->setPropertyForm($form);
726 $this->record_gui->parse();
741 $ilAccess =
$DIC[
'ilAccess'];
745 include_once
'Modules/Course/classes/class.ilCourseFile.php';
747 $file_obj->setCourseId($this->object->getId());
750 $_FILES[
'file'][
'name']);
752 $file_obj->setFileSize($_FILES[
'file'][
'size']);
753 $file_obj->setFileType($_FILES[
'file'][
'type']);
754 $file_obj->setTemporaryName($_FILES[
'file'][
'tmp_name']);
755 $file_obj->setErrorCode($_FILES[
'file'][
'error']);
772 $file_obj->validate();
773 $this->
object->validateInfoSettings();
774 if (strlen(
$ilErr->getMessage())) {
781 if (!$this->record_gui->importEditFormPostValues()) {
793 $this->
object->update();
795 $this->record_gui->writeEditForm();
799 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
801 $ecs->handleContentUpdate();
803 ilUtil::sendSuccess($this->lng->txt(
"crs_settings_saved"));
821 if (!$form->checkInput()) {
822 $form->setValuesByPost();
829 $form->getInput(
'subscription_max') &&
830 $form->getInput(
'subscription_min') &&
831 ($form->getInput(
'subscription_max') < $form->getInput(
'subscription_min'))
833 $min = $form->getItemByPostVar(
'subscription_min');
834 $min->setAlert($this->lng->txt(
'crs_subscription_min_members_err'));
841 $form->getInput(
'list_presentation') ==
"tile" &&
848 if ($form->getInput(
'sl') ==
"1" &&
849 $form->getInput(
'list_presentation') ==
"tile") {
857 $this->
object->setTitle($form->getInput(
'title'));
858 $this->
object->setDescription($form->getInput(
'desc'));
861 $crs_period = $form->getItemByPostVar(
"period");
864 $this->
object->setCoursePeriod(
865 $crs_period->getStart(),
866 $crs_period->getEnd()
870 $this->
object->setOfflineStatus((
bool) !$form->getInput(
'activation_online'));
873 $period = $form->getItemByPostVar(
"access_period");
874 if ($period->getStart() && $period->getEnd()) {
875 $this->
object->setActivationStart($period->getStart()->get(
IL_CAL_UNIX));
876 $this->
object->setActivationEnd($period->getEnd()->get(
IL_CAL_UNIX));
877 $this->
object->setActivationVisibility((
int) $form->getInput(
'activation_visibility'));
879 $this->
object->setActivationStart(
null);
880 $this->
object->setActivationEnd(
null);
884 $this->
object->setSubscriptionPassword($form->getInput(
'subscription_password'));
885 $this->
object->setSubscriptionStart(
null);
886 $this->
object->setSubscriptionEnd(
null);
888 $sub_type = $form->getInput(
'subscription_type');
889 $sub_period = $form->getItemByPostVar(
'subscription_period');
891 $this->
object->setSubscriptionType($sub_type);
893 if ($sub_period->getStart() && $sub_period->getEnd()) {
895 $this->
object->setSubscriptionStart($sub_period->getStart()->get(
IL_CAL_UNIX));
896 $this->
object->setSubscriptionEnd($sub_period->getEnd()->get(
IL_CAL_UNIX));
906 $this->
object->enableRegistrationAccessCode((
int) $form->getInput(
'reg_code_enabled'));
907 $this->
object->setRegistrationAccessCode($form->getInput(
'reg_code'));
910 $this->
object->setCancellationEnd($form->getItemByPostVar(
"cancel_end")->getDate());
913 $this->
object->enableSubscriptionMembershipLimitation((
int) $form->getInput(
'subscription_membership_limitation'));
914 $this->
object->setSubscriptionMaxMembers((
int) $form->getInput(
'subscription_max'));
915 $this->
object->setSubscriptionMinMembers((
int) $form->getInput(
'subscription_min'));
916 $old_autofill = $this->
object->hasWaitingListAutoFill();
917 switch ((
int) $form->getInput(
'waiting_list')) {
919 $this->
object->enableWaitingList(
true);
920 $this->
object->setWaitingListAutoFill(
true);
924 $this->
object->enableWaitingList(
true);
925 $this->
object->setWaitingListAutoFill(
false);
929 $this->
object->enableWaitingList(
false);
930 $this->
object->setWaitingListAutoFill(
false);
935 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveTitleIconVisibility();
938 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveTopActionsVisibility();
943 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveIcon();
946 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveTileImage();
953 $this->
object->setViewMode((
int) $form->getInput(
'view_mode'));
956 $this->
object->setTimingMode((
int) $form->getInput(
'timing_mode'));
958 $this->
object->setTimingMode($form->getInput(
'timing_mode'));
959 $this->
object->setOrderType($form->getInput(
'sorting'));
962 $this->
object->setAboStatus((
int) $form->getInput(
'abo'));
963 $this->
object->setShowMembers((
int) $form->getInput(
'show_members'));
966 $this->
object->setShowMembersExport((
int) $form->getInput(
'show_members_export'));
968 $this->
object->setMailToMembersType((
int) $form->getInput(
'mail_type'));
970 $this->
object->enableSessionLimit((
int) $form->getInput(
'sl'));
972 $session_sp = $form->getInput(
'sp');
973 $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1);
974 $session_sn = $form->getInput(
'sn');
975 $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1);
976 $this->
object->setAutoNotification($form->getInput(
'auto_notification') == 1 ?
true :
false);
979 $show_lp_sync_confirmation =
false;
982 if (isset(
$_POST[
'status_dt'])) {
987 $show_lp_sync_confirmation =
true;
989 $this->
object->setStatusDetermination((
int) $form->getInput(
'status_dt'));
993 if (!$old_autofill && $this->object->hasWaitingListAutoFill()) {
994 $this->
object->handleAutoFill();
996 $this->
object->update();
1000 $this->object->getId(),
1002 $this->getSubServices()
1005 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1013 if ($show_lp_sync_confirmation) {
1018 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1020 if (!$ecs->handleSettingsUpdate()) {
1021 $form->setValuesByPost();
1042 if ($this->news->isGloballyActivated()) {
1055 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1057 $cgui->setFormAction($this->ctrl->getFormAction($this,
"setLPSync"));
1058 $cgui->setHeaderText($this->lng->txt(
"crs_status_determination_sync"));
1059 $cgui->setCancel($this->lng->txt(
"cancel"),
"edit");
1060 $cgui->setConfirm($this->lng->txt(
"confirm"),
"setLPSync");
1062 $tpl->setContent($cgui->getHTML());
1068 $this->
object->update();
1070 $this->
object->syncMembersStatusWithLP();
1072 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
1073 $this->ctrl->redirect($this,
"edit");
1085 $this->tabs_gui->setSubTabActive(
'crs_settings');
1088 $GLOBALS[
'DIC'][
'tpl']->setContent($form->getHTML());
1091 parent::editObject();
1107 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1108 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
1111 $form->setTitle($this->lng->txt(
'crs_edit'));
1113 $form->addCommandButton(
'update', $this->lng->txt(
'save'));
1114 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
1116 $form->setFormAction($this->ctrl->getFormAction($this,
'update'));
1119 $this->initFormTitleDescription($form);
1125 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1127 $this->lng->loadLanguageModule(
'mem');
1128 $cdur->enableToggleFullTime(
1129 $this->lng->txt(
'mem_period_without_time'),
1130 !$this->object->getCourseStartTimeIndication()
1132 $cdur->setShowTime(
true);
1133 $cdur->setInfo($this->lng->txt(
'crs_period_info'));
1134 $cdur->setStart($this->object->getCourseStart());
1135 $cdur->setEnd($this->object->getCourseEnd());
1136 $form->addItem($cdur);
1141 $this->lng->loadLanguageModule(
'rep');
1144 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
1147 $online =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_online'),
'activation_online');
1148 $online->setChecked(!$this->object->getOfflineStatus());
1149 $online->setInfo($this->lng->txt(
'crs_activation_online_info'));
1150 $form->addItem($online);
1152 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1154 $dur->setShowTime(
true);
1157 $form->addItem($dur);
1159 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'activation_visibility');
1160 $visible->setInfo($this->lng->txt(
'crs_activation_limited_visibility_info'));
1161 $visible->setChecked($this->object->getActivationVisibility());
1162 $dur->addSubItem($visible);
1166 $section->setTitle($this->lng->txt(
'crs_reg'));
1169 $reg_proc =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_registration_type'),
'subscription_type');
1170 $reg_proc->setValue(
1172 ? $this->object->getSubscriptionType()
1178 $reg_proc->addOption($opt);
1183 $pass->setRequired(
true);
1184 $pass->setInfo($this->lng->txt(
'crs_reg_password_info'));
1185 $pass->setSubmitFormOnEnter(
true);
1187 $pass->setMaxLength(32);
1188 $pass->setValue($this->object->getSubscriptionPassword());
1190 $opt->addSubItem(
$pass);
1191 $reg_proc->addOption($opt);
1194 $opt->setInfo($this->lng->txt(
'crs_registration_confirmation_info'));
1195 $reg_proc->addOption($opt);
1198 $opt->setInfo($this->lng->txt(
'crs_registration_deactivated'));
1199 $reg_proc->addOption($opt);
1201 $form->addItem($reg_proc);
1205 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'crs_reg_code'),
'reg_code_enabled');
1206 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1207 $reg_code->setValue(1);
1208 $reg_code->setInfo($this->lng->txt(
'crs_reg_code_enabled_info'));
1216 #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
1218 if (!$this->object->getRegistrationAccessCode()) {
1219 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1223 $reg_link->setValue($this->object->getRegistrationAccessCode());
1224 $form->addItem($reg_link);
1227 include_once
'./Services/Link/classes/class.ilLink.php';
1228 $val =
ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(),
'_rcode' . $this->object->getRegistrationAccessCode());
1229 $link->setHTML(
'<span class="small">' . $val .
'</span>');
1230 $reg_code->addSubItem($link);
1232 $form->addItem($reg_code);
1235 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1237 $sdur->setShowTime(
true);
1238 if ($this->object->getSubscriptionStart()) {
1241 if ($this->object->getSubscriptionEnd()) {
1244 $form->addItem($sdur);
1247 $cancel =
new ilDateTimeInputGUI($this->lng->txt(
'crs_cancellation_end'),
'cancel_end');
1248 $cancel->setInfo($this->lng->txt(
'crs_cancellation_end_info'));
1249 $cancel_end = $this->
object->getCancellationEnd();
1251 $cancel->setDate($cancel_end);
1253 $form->addItem($cancel);
1256 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'crs_subscription_max_members_short'),
'subscription_membership_limitation');
1257 $lim->setInfo($this->lng->txt(
'crs_subscription_max_members_short_info'));
1259 $lim->setChecked($this->object->isSubscriptionMembershipLimited());
1262 $min->setSubmitFormOnEnter(
true);
1264 $min->setMaxLength(4);
1265 $min->setValue($this->object->getSubscriptionMinMembers() ? $this->object->getSubscriptionMinMembers() :
'');
1266 $min->setTitle($this->lng->txt(
'crs_subscription_min_members'));
1267 $min->setInfo($this->lng->txt(
'crs_subscription_min_members_info'));
1268 $lim->addSubItem($min);
1271 $max->setSubmitFormOnEnter(
true);
1273 $max->setMaxLength(4);
1274 $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() :
'');
1275 $max->setTitle($this->lng->txt(
'crs_subscription_max_members'));
1276 $max->setInfo($this->lng->txt(
'crs_reg_max_info'));
1278 $lim->addSubItem($max);
1300 $wait->addOption($option);
1302 $option =
new ilRadioOption($this->lng->txt(
'crs_waiting_list_no_autofill'), 1);
1303 $option->setInfo($this->lng->txt(
'crs_wait_info'));
1304 $wait->addOption($option);
1306 $option =
new ilRadioOption($this->lng->txt(
'crs_waiting_list_autofill'), 2);
1307 $option->setInfo($this->lng->txt(
'crs_waiting_list_autofill_info'));
1308 $wait->addOption($option);
1310 if ($this->object->hasWaitingListAutoFill()) {
1312 } elseif ($this->object->enabledWaitingList()) {
1316 $lim->addSubItem($wait);
1318 $form->addItem($lim);
1322 $pres->setTitle($this->lng->txt(
'crs_view_mode'));
1324 $form->addItem($pres);
1327 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTitleIconVisibility();
1330 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTopActionsVisibility();
1333 if ($setting->get(
"rep_breadcr_crs_overwrite")) {
1334 $add = $setting->get(
"rep_breadcr_crs_default")
1335 ?
" (" . $this->lng->txt(
"crs_breadcrumb_crs_only") .
")"
1336 :
" (" . $this->lng->txt(
"crs_breadcrumb_full_path") .
")";
1338 self::BREADCRUMB_DEFAULT => $this->lng->txt(
"crs_sys_default") . $add,
1339 self::BREADCRUMB_CRS_ONLY => $this->lng->txt(
"crs_breadcrumb_crs_only"),
1340 self::BREADCRUMB_FULL_PATH => $this->lng->txt(
"crs_breadcrumb_full_path")
1344 $si->setOptions($options);
1345 $form->addItem(
$si);
1350 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addIcon();
1353 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTileImage();
1360 $view_type->setValue($this->object->getViewMode());
1363 $opts->setInfo($this->lng->txt(
'cntr_view_info_sessions'));
1364 $view_type->addOption($opts);
1369 $sess->setChecked($this->object->isSessionLimitEnabled());
1370 $sess->setInfo($this->lng->txt(
'sess_limit_info'));
1373 #$prev->setSubmitFormOnEnter(true);
1374 $prev->setMinValue(0);
1376 $this->object->getNumberOfPreviousSessions() == -1 ?
1378 $this->object->getNumberOfPreviousSessions()
1381 $prev->setMaxLength(3);
1382 $sess->addSubItem($prev);
1385 #$next->setSubmitFormOnEnter(true);
1386 $next->setMinValue(0);
1388 $this->object->getNumberOfNextSessions() == -1 ?
1390 $this->object->getNumberOfnextSessions()
1393 $next->setMaxLength(3);
1394 $sess->addSubItem($next);
1396 $opts->addSubItem($sess);
1402 $optsi->setInfo($this->lng->txt(
'cntr_view_info_simple'));
1403 $view_type->addOption($optsi);
1406 $optbt->setInfo($this->lng->txt(
'cntr_view_info_by_type'));
1407 $view_type->addOption($optbt);
1410 $opto->setInfo($this->lng->txt(
'crs_view_info_objective'));
1411 $view_type->addOption($opto);
1414 $optt->setInfo($this->lng->txt(
'crs_view_info_timing'));
1418 $timing->setValue($this->object->getTimingMode());
1421 $absolute->setInfo($this->lng->txt(
'crs_view_info_timing_absolute'));
1422 $timing->addOption($absolute);
1425 $relative->setInfo($this->lng->txt(
'crs_view_info_timing_relative'));
1426 $timing->addOption($relative);
1428 $optt->addSubItem($timing);
1431 $view_type->addOption($optt);
1433 $form->addItem($view_type);
1448 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1450 include_once
'./Services/Object/classes/class.ilObjectLP.php';
1452 if ($olp->getCurrentMode()) {
1454 $lp_status->setTitle($this->lng->txt(
'crs_course_status_of_users'));
1455 $form->addItem($lp_status);
1457 $lp_status_options =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_status_determination'),
"status_dt");
1459 $lp_status_options->setValue($this->object->getStatusDetermination());
1462 $this->lng->txt(
'crs_status_determination_lp'),
1464 $this->lng->txt(
'crs_status_determination_lp_info')
1466 $lp_status_options->addOption($lp_option);
1468 $this->lng->txt(
'crs_status_determination_manual'),
1472 $form->addItem($lp_status_options);
1478 $feat->setTitle($this->lng->txt(
'obj_features'));
1479 $form->addItem($feat);
1481 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1483 $this->object->getId(),
1485 $this->getSubServices()
1489 $mem->setChecked($this->object->getShowMembers());
1490 $mem->setInfo($this->lng->txt(
'crs_show_members_info'));
1491 $form->addItem($mem);
1495 $part_list =
new ilCheckboxInputGUI($this->lng->txt(
'crs_show_member_export'),
'show_members_export');
1496 $part_list->setChecked($this->object->getShowMembersExport());
1497 $part_list->setInfo($this->lng->txt(
'crs_show_member_export_info'));
1498 $mem->addSubItem($part_list);
1503 $mail_type->setValue($this->object->getMailToMembersType());
1506 $this->lng->txt(
'crs_mail_tutors_only'),
1508 $this->lng->txt(
'crs_mail_tutors_only_info')
1510 $mail_type->addOption($mail_tutors);
1513 $this->lng->txt(
'crs_mail_all'),
1515 $this->lng->txt(
'crs_mail_all_info')
1517 $mail_type->addOption($mail_all);
1518 $form->addItem($mail_type);
1526 $not =
new ilCheckboxInputGUI($this->lng->txt(
'crs_auto_notification'),
'auto_notification');
1528 $not->setInfo($this->lng->txt(
'crs_auto_notification_info'));
1529 $not->setChecked($this->object->getAutoNotification());
1530 $form->addItem($not);
1538 $desk =
new ilCheckboxInputGUI($this->lng->txt(
'crs_add_remove_from_desktop'),
'abo');
1539 $desk->setChecked($this->object->getAboStatus());
1540 $desk->setInfo($this->lng->txt(
'crs_add_remove_from_desktop_info'));
1541 $form->addItem($desk);
1545 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1547 $ecs->addSettingsToForm($form,
'crs');
1559 include_once
'Modules/Course/classes/class.ilCourseFile.php';
1561 ilUtil::deliverFile($file->getAbsolutePath(), $file->getFileName(), $file->getFileType());
1574 $ilAccess =
$DIC[
'ilAccess'];
1579 $this->tabs_gui->addSubTabTarget(
1581 $this->ctrl->getLinkTarget($this,
'edit'),
1586 $this->tabs_gui->addSubTabTarget(
1587 "crs_info_settings",
1588 $this->ctrl->getLinkTarget($this,
'editInfo'),
1593 $this->tabs_gui->addSubTabTarget(
1595 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerGUI',
'listConditions'),
1597 "ilConditionHandlerGUI"
1600 $this->tabs_gui->addSubTabTarget(
1601 "crs_start_objects",
1602 $this->ctrl->getLinkTargetByClass(
'ilContainerStartObjectsGUI',
'listStructure'),
1607 $this->tabs_gui->addSubTabTarget(
1609 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1614 if ($lti_settings->hasSettingsAccess()) {
1615 $this->tabs_gui->addSubTabTarget(
1617 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1622 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
1624 $this->tabs_gui->addSubTabTarget(
1626 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
1633 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1634 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1637 $this->tabs_gui->addSubTabTarget(
1638 'crs_custom_user_fields',
1639 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1641 'ilobjectcustomuserfieldsgui'
1647 if (
true === $validator->validate()) {
1648 $this->tabs_gui->addSubTabTarget(
1650 $this->ctrl->getLinkTargetByClass(
"ilcertificategui",
"certificateeditor"),
1656 if ($this->object->getUseNews()) {
1657 $this->tabs_gui->addSubTab(
1658 'obj_news_settings',
1659 $this->lng->txt(
"cont_news_settings"),
1660 $this->ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
1664 if ($this->object->getShowMembersExport()) {
1665 $this->tabs_gui->addSubTab(
1667 $this->lng->txt(
'crs_show_member_export_settings'),
1668 $this->ctrl->getLinkTargetByClass(
'ilmemberexportsettingsgui',
'')
1672 $this->tabs_gui->addSubTabTarget(
1673 "obj_multilinguality",
1674 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
""),
1676 "ilobjecttranslationgui"
1691 !$this->isActiveAdministrationPanel()) {
1712 $a_new_object->getMemberObject()->updateNotification(
$ilUser->getId(),
$ilSetting->get(
'mail_crs_admin_notification',
true));
1714 $a_new_object->getMemberObject()->updateContact(
$ilUser->getId(), 1);
1719 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1727 ilUtil::sendSuccess($this->lng->txt(
"crs_added"),
true);
1729 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
1732 $this->ctrl->getLinkTarget($this,
"edit",
"",
false,
false)
1748 if (isset(
$_GET[
'admin_hide'])) {
1749 $ilUser->writePref(
'crs_admin_hide', (
int)
$_GET[
'admin_hide']);
1751 if (isset(
$_GET[
'tutor_hide'])) {
1752 $ilUser->writePref(
'crs_tutor_hide', (
int)
$_GET[
'tutor_hide']);
1754 if (isset(
$_GET[
'member_hide'])) {
1755 $ilUser->writePref(
'crs_member_hide', (
int)
$_GET[
'member_hide']);
1757 if (isset(
$_GET[
'subscriber_hide'])) {
1758 $ilUser->writePref(
'crs_subscriber_hide', (
int)
$_GET[
'subscriber_hide']);
1760 if (isset(
$_GET[
'wait_hide'])) {
1761 $ilUser->writePref(
'crs_wait_hide', (
int)
$_GET[
'wait_hide']);
1763 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
1765 if (isset(
$_GET[
'role_hide_' . $role_id])) {
1766 $ilUser->writePref(
'crs_role_hide_' . $role_id, (
int)
$_GET[
'role_hide_' . $role_id]);
1771 public function readMemberData($ids, $selected_columns =
null,
bool $skip_names =
false)
1773 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1774 $this->show_tracking =
1779 if ($this->show_tracking) {
1780 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
1782 $this->show_tracking = $olp->isActive();
1785 if ($this->show_tracking) {
1786 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1791 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1794 if ($privacy->enabledCourseAccessTimes()) {
1795 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
1799 $do_prtf = (is_array($selected_columns) &&
1800 in_array(
'prtf', $selected_columns) &&
1803 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
1806 $this->ctrl->getLinkTarget($this,
"members")
1810 foreach ((array) $ids as $usr_id) {
1820 $tmp_data[
'firstname'] =
$name[
'firstname'];
1821 $tmp_data[
'lastname'] =
$name[
'lastname'];
1822 $tmp_data[
'login'] =
$name[
'login'];
1824 $tmp_data[
'passed'] = $this->
object->getMembersObject()->hasPassed($usr_id) ? 1 : 0;
1826 $tmp_data[
'passed_info'] = $this->
object->getMembersObject()->getPassedInfo($usr_id);
1828 $tmp_data[
'notification'] = $this->
object->getMembersObject()->isNotificationEnabled($usr_id) ? 1 : 0;
1829 $tmp_data[
'blocked'] = $this->
object->getMembersObject()->isBlocked($usr_id) ? 1 : 0;
1831 $tmp_data[
'contact'] = $this->
object->getMembersObject()->isContact($usr_id) ? 1 : 0;
1834 $tmp_data[
'usr_id'] = $usr_id;
1836 if ($this->show_tracking) {
1837 if (in_array($usr_id, $completed)) {
1839 } elseif (in_array($usr_id, $in_progress)) {
1841 } elseif (in_array($usr_id,
$failed)) {
1848 if ($privacy->enabledCourseAccessTimes()) {
1849 if (isset($progress[$usr_id][
'ts']) and $progress[$usr_id][
'ts']) {
1850 $tmp_data[
'access_ut'] = $progress[$usr_id][
'ts'];
1853 $tmp_data[
'access_ut'] = 0;
1854 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
1859 $tmp_data[
'prtf'] = $all_prtf[$usr_id];
1862 $members[$usr_id] = $tmp_data;
1864 return $members ? $members : array();
1879 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1882 include_once
'./Services/Object/classes/class.ilObjectLP.php';
1885 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
1886 $marks =
new ilLPMarks($this->object->getId(), $a_member_id);
1889 if ($marks->getCompleted() != $a_has_passed) {
1890 $marks->setCompleted($a_has_passed);
1894 include_once(
"./Modules/Course/classes/class.ilCourseAppEventListener.php");
1897 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
1914 if ($this->object->isSubscriptionMembershipLimited() and $this->object->getSubscriptionMaxMembers() and
1915 $this->object->getSubscriptionMaxMembers() <= $this->object->getMembersObject()->getCountMembers()) {
1921 if ($number = $this->object->getMembersObject()->autoFillSubscribers()) {
1922 ilUtil::sendSuccess($this->lng->txt(
"crs_number_users_added") .
" " . $number);
1939 if ($this->object->getMembersObject()->isLastAdmin(
$ilUser->getId())) {
1945 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
1946 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
1948 $cgui->setHeaderText($this->lng->txt(
'crs_unsubscribe_sure'));
1949 $cgui->setFormAction($this->ctrl->getFormAction($this));
1950 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancel");
1951 $cgui->setConfirm($this->lng->txt(
"crs_unsubscribe"),
"performUnsubscribe");
1952 $this->tpl->setContent($cgui->getHTML());
1968 $ilCtrl =
$DIC[
'ilCtrl'];
1972 $this->
object->getMembersObject()->delete($this->
ilias->account->getId());
1973 $this->
object->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->
ilias->account->getId());
1974 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNSUBSCRIBE,
$ilUser->getId());
1976 ilUtil::sendSuccess($this->lng->txt(
'crs_unsubscribed_from_crs'),
true);
1978 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->tree->getParentId($this->ref_id));
1979 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1987 if (
$GLOBALS[
'DIC'][
'ilAccess']->checkAccess(
'visible',
'', $this->ref_id)) {
1988 $GLOBALS[
'DIC'][
'ilTabs']->addTarget(
1990 $this->ctrl->getLinkTargetByClass(
1991 array(
"ilobjcoursegui",
"ilinfoscreengui"),
1997 if (
$GLOBALS[
'DIC'][
'ilAccess']->checkAccess(
'leave',
'', $this->object->getRefId()) and $this->object->getMemberObject()->isMember()) {
1998 $GLOBALS[
'DIC'][
'ilTabs']->addTarget(
2000 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
2015 $this->tabs_gui->addTab(
2017 $this->lng->txt(
"content"),
2018 $this->ctrl->getLinkTarget($this,
"view")
2031 $ilHelp =
$DIC[
'ilHelp'];
2033 $ilAccess =
$GLOBALS[
'DIC']->access();
2035 $ilHelp->setScreenIdComponent(
"crs");
2037 $this->ctrl->setParameter($this,
"ref_id", $this->ref_id);
2039 if ($ilAccess->checkAccess(
'read',
'', $this->ref_id)) {
2041 $this->tabs_gui->activateTab(
'view_content');
2042 if ($this->object->isNewsTimelineEffective()) {
2043 if (!$this->object->isNewsTimelineLandingPageEffective()) {
2046 $this->tabs_gui->addTab(
2048 $lng->txt(
"cont_news_timeline_tab"),
2049 $this->ctrl->getLinkTargetByClass(
"ilnewstimelinegui",
"show")
2051 if ($this->object->isNewsTimelineLandingPageEffective()) {
2060 $ilAccess->checkAccess(
'write',
'', $this->ref_id)
2062 $this->tabs->addTab(
2064 $lng->txt(
'timings_timings'),
2065 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'manageTimings')
2069 $this->object->getMemberObject()->isParticipant() and
2070 $ilAccess->checkAccess(
'read',
'', $this->ref_id)) {
2071 $this->tabs->addTab(
2073 $lng->txt(
'timings_timings'),
2074 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'managePersonalTimings')
2081 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2082 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
2084 $this->tabs_gui->addTarget(
2086 $this->ctrl->getLinkTargetByClass(
'illoeditorgui',
''),
2093 $ilAccess->checkAccess(
'visible',
'', $this->ref_id) ||
2094 $ilAccess->checkAccess(
'join',
'', $this->ref_id) ||
2095 $ilAccess->checkAccess(
'read',
'', $this->ref_id)
2102 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilinfoscreengui"
2103 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
2106 $this->tabs_gui->addTarget(
2108 $this->ctrl->getLinkTargetByClass(
2109 array(
"ilobjcoursegui",
"ilinfoscreengui"),
2118 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2119 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilconditionhandlergui"
2120 &&
$_GET[
"item_id"] ==
"")
2123 $this->tabs_gui->addTarget(
2125 $this->ctrl->getLinkTarget($this,
"edit"),
2126 array(
"edit",
"editMapSettings",
"editCourseIcons",
"listStructure"),
2135 include_once
'./Services/Mail/classes/class.ilMail.php';
2138 include_once
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
2140 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
2143 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2144 include_once
'Services/Badge/classes/class.ilBadgeHandler.php';
2146 $this->tabs_gui->addTarget(
2147 "obj_tool_setting_badges",
2148 $this->ctrl->getLinkTargetByClass(
"ilbadgemanagementgui",
""),
2150 "ilbadgemanagementgui"
2157 $this->tabs_gui->addTarget(
2158 "obj_tool_setting_skills",
2159 $this->ctrl->getLinkTargetByClass(array(
"ilcontainerskillgui",
"ilcontskillpresentationgui"),
""),
2161 array(
"ilcontainerskillgui",
"ilcontskillpresentationgui",
"ilcontskilladmingui")
2167 $this->object->getId(),
2171 $this->tabs_gui->addTarget(
2172 "obj_tool_setting_booking",
2173 $this->ctrl->getLinkTargetByClass(array(
"ilbookinggatewaygui"),
"")
2178 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2180 $this->tabs_gui->addTarget(
2181 'learning_progress',
2182 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
2184 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
2189 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2190 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
2192 $mdtab = $mdgui->getTab();
2194 $this->tabs_gui->addTarget(
2198 "ilobjectmetadatagui"
2203 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2204 $this->tabs_gui->addTarget(
2206 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
2212 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)) {
2213 $this->tabs_gui->addTarget(
2215 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
2216 array(
"perm",
"info",
"owner"),
2222 if ($ilAccess->checkAccess(
'join',
'', $this->ref_id)
2223 and !$this->object->getMemberObject()->isAssigned()) {
2224 include_once
'./Modules/Course/classes/class.ilCourseWaitingList.php';
2226 $this->tabs_gui->addTab(
2228 $this->lng->txt(
'membership_leave'),
2229 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
2232 $this->tabs_gui->addTarget(
2234 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
"show"),
2240 if ($ilAccess->checkAccess(
'leave',
'', $this->object->getRefId())
2241 and $this->object->getMemberObject()->isMember()) {
2242 $this->tabs_gui->addTarget(
2244 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
2257 $ilAccess =
$DIC[
'ilAccess'];
2259 $ilTabs =
$DIC[
'ilTabs'];
2260 $ilNavigationHistory =
$DIC[
'ilNavigationHistory'];
2261 $ilCtrl =
$DIC[
'ilCtrl'];
2262 $ilToolbar =
$DIC[
'ilToolbar'];
2264 $next_class = $this->ctrl->getNextClass($this);
2265 $cmd = $this->ctrl->getCmd();
2271 $ilAccess->checkAccess(
'read',
'',
$_GET[
'ref_id'])) {
2272 include_once(
"./Services/Link/classes/class.ilLink.php");
2273 $ilNavigationHistory->addItem(
2279 $header_action =
true;
2280 switch ($next_class) {
2281 case 'ilreputilgui':
2282 $ru = new \ilRepUtilGUI($this);
2283 $this->ctrl->setReturn($this,
'trash');
2284 $this->ctrl->forwardCommand($ru);
2287 case 'illtiproviderobjectsettinggui':
2290 $this->tabs_gui->activateTab(
'settings');
2291 $this->tabs_gui->activateSubTab(
'lti_provider');
2293 $lti_gui->setCustomRolesForSelection(
$GLOBALS[
'DIC']->rbac()->review()->
getLocalRoles($this->object->getRefId()));
2294 $lti_gui->offerLTIRolesForSelection(
false);
2295 $this->ctrl->forwardCommand($lti_gui);
2298 case 'ilcoursemembershipgui':
2300 $this->tabs_gui->activateTab(
'members');
2302 include_once
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
2304 $this->ctrl->forwardCommand($mem_gui);
2307 case "ilinfoscreengui":
2311 case 'ilobjectmetadatagui':
2312 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2313 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
2315 $this->tabs_gui->setTabActive(
'meta_data');
2316 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
2318 $this->ctrl->forwardCommand($md_gui);
2321 case 'ilcourseregistrationgui':
2322 $this->ctrl->setReturn($this,
'');
2323 $this->tabs_gui->setTabActive(
'join');
2324 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2326 $this->ctrl->forwardCommand($registration);
2329 case 'ilobjectcustomuserfieldsgui':
2330 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
2333 $this->tabs_gui->activateTab(
'settings');
2334 $this->tabs_gui->activateSubTab(
'crs_custom_user_fields');
2335 $this->ctrl->forwardCommand($cdf_gui);
2338 case "ilcourseobjectivesgui":
2339 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2341 $this->ctrl->setReturn($this,
"");
2343 $ret = &$this->ctrl->forwardCommand($reg_gui);
2346 case 'ilobjcoursegroupinggui':
2347 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
2349 $this->ctrl->setReturn($this,
'edit');
2351 $this->tabs_gui->activateTab(
'settings');
2352 $this->tabs_gui->activateSubTab(
'groupings');
2354 $this->ctrl->forwardCommand($crs_grp_gui);
2358 case "ilpropertyformgui":
2361 $this->ctrl->forwardCommand($form);
2365 $this->tabs_gui->setTabActive(
'none');
2375 case "ilconditionhandlergui":
2376 include_once
'./Services/Conditions/classes/class.ilConditionHandlerGUI.php';
2379 $this->tabs_gui->activateTab(
'settings');
2380 $this->tabs_gui->activateSubTab(
'preconditions');
2382 $this->ctrl->forwardCommand($new_gui);
2385 case "illearningprogressgui":
2386 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
2390 $this->object->getRefId(),
2393 $this->ctrl->forwardCommand($new_gui);
2394 $this->tabs_gui->setTabActive(
'learning_progress');
2397 case 'ilpermissiongui':
2398 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
2399 $this->tabs_gui->setTabActive(
'perm_settings');
2401 $ret = &$this->ctrl->forwardCommand($perm_gui);
2404 case 'ilcalendarpresentationgui':
2405 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
2407 $ret = $this->ctrl->forwardCommand($cal);
2408 $header_action =
false;
2411 case 'ilcoursecontentinterface':
2413 $this->initCourseContentInterface();
2414 $this->cci_obj->cci_setContainer($this);
2416 $this->ctrl->forwardCommand($this->cci_obj);
2418 $this->tabs_gui->setTabActive(
'content');
2421 case 'ilcoursecontentgui':
2422 $this->ctrl->setReturn($this,
'members');
2423 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
2425 $this->ctrl->forwardCommand($course_content_obj);
2428 case 'ilpublicuserprofilegui':
2429 $this->tpl->enableDragDropFileUpload(
null);
2430 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
2432 $this->tabs_gui->setTabActive(
'members');
2434 $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass([
"ilCourseMembershipGUI",
"ilUsersGalleryGUI"],
'view'));
2435 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
2436 $html = $this->ctrl->forwardCommand($profile_gui);
2437 $this->tpl->setVariable(
"ADM_CONTENT", $html);
2441 case 'ilmemberagreementgui':
2442 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
2443 $this->tabs_gui->clearTargets();
2445 $this->ctrl->setReturn($this,
'');
2447 $this->ctrl->forwardCommand($agreement);
2452 case "ilcontainerpagegui":
2455 $this->tpl->setContent(
$ret);
2457 $header_action =
false;
2460 case "ilcontainerstartobjectspagegui":
2462 include_once
"Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
2464 $ret = $this->ctrl->forwardCommand($pgui);
2466 $this->tpl->setContent(
$ret);
2470 case 'ilobjectcopygui':
2471 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
2473 $cp->setType(
'crs');
2474 $this->ctrl->forwardCommand($cp);
2477 case "ilobjstylesheetgui":
2483 $this->tabs_gui->setTabActive(
'export');
2484 include_once
'./Services/Export/classes/class.ilExportGUI.php';
2486 $exp->addFormat(
'xml');
2487 $this->ctrl->forwardCommand($exp);
2490 case "ilcommonactiondispatchergui":
2491 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
2493 $this->ctrl->forwardCommand($gui);
2496 case 'ildidactictemplategui':
2497 $this->ctrl->setReturn($this,
'edit');
2498 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
2500 $this->ctrl->forwardCommand($did);
2503 case "ilcertificategui":
2504 $this->tabs_gui->activateTab(
"settings");
2506 $this->tabs_gui->activateSubTab(
'certificate');
2509 $output_gui = $guiFactory->create($this->
object);
2510 $this->ctrl->forwardCommand($output_gui);
2513 case 'ilobjectservicesettingsgui':
2514 $this->ctrl->setReturn($this,
'edit');
2516 $this->tabs_gui->activateTab(
'settings');
2517 $this->tabs_gui->acltivateSubTab(
'tool_settings');
2519 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2522 $this->object->getId(),
2527 $this->ctrl->forwardCommand(
$service);
2530 case 'illoeditorgui':
2531 #$this->tabs_gui->clearTargets();
2532 #$this->tabs_gui->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,''));
2533 $this->tabs_gui->activateTab(
'crs_objectives');
2535 include_once
'./Modules/Course/classes/Objectives/class.ilLOEditorGUI.php';
2537 $this->ctrl->forwardCommand($editor);
2538 if (strtolower($this->ctrl->getCmdClass()) ===
"illopagegui") {
2539 $header_action =
false;
2543 case 'ilcontainerstartobjectsgui':
2544 $this->ctrl->setReturn($this,
'edit');
2545 $this->tabs_gui->clearTargets();
2546 $this->tabs_gui->setBackTarget(
2547 $this->lng->txt(
"back_to_crs_content"),
2548 $this->ctrl->getLinkTarget($this,
"edit")
2550 $this->tabs_gui->addTab(
2552 $this->lng->txt(
"crs_start_objects"),
2553 $this->ctrl->getLinkTargetByClass(
"ilcontainerstartobjectsgui",
"listStructure")
2555 if (strtolower($this->ctrl->getCmdClass()) ==
2556 "ilcontainerstartobjectspagegui") {
2557 $header_action =
false;
2561 $ilHelp =
$DIC[
'ilHelp'];
2562 $ilHelp->setScreenIdComponent(
"crs");
2564 include_once
'./Services/Container/classes/class.ilContainerStartObjectsGUI.php';
2566 $this->ctrl->forwardCommand($stgui);
2569 case 'illomembertestresultgui':
2570 include_once
'./Modules/Course/classes/Objectives/class.ilLOMemberTestResultGUI.php';
2571 $GLOBALS[
'DIC'][
'ilCtrl']->setReturn($this,
'members');
2572 $GLOBALS[
'DIC'][
'ilTabs']->clearTargets();
2573 $GLOBALS[
'DIC'][
'ilTabs']->setBackTarget(
2574 $GLOBALS[
'DIC'][
'lng']->txt(
'back'),
2575 $GLOBALS[
'DIC'][
'ilCtrl']->getLinkTarget($this,
'members')
2579 $this->ctrl->forwardCommand($result_view);
2582 case 'ilmailmembersearchgui':
2583 include_once
'Services/Mail/classes/class.ilMail.php';
2588 $ilAccess->checkAccess(
'manage_members',
"", $this->object->getRefId())) &&
2589 $rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
2590 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),
$ilErr->MESSAGE);
2593 $this->tabs_gui->setTabActive(
'members');
2595 include_once
'./Services/Contact/classes/class.ilMailMemberSearchGUI.php';
2596 include_once
'./Services/Contact/classes/class.ilMailMemberCourseRoles.php';
2599 $mail_search->setObjParticipants(
2602 $this->ctrl->forwardCommand($mail_search);
2605 case 'ilbadgemanagementgui':
2606 $this->tabs_gui->setTabActive(
'obj_tool_setting_badges');
2607 include_once
'Services/Badge/classes/class.ilBadgeManagementGUI.php';
2609 $this->ctrl->forwardCommand($bgui);
2612 case "ilcontainernewssettingsgui":
2614 $this->tabs_gui->activateTab(
'settings');
2615 $this->tabs_gui->activateSubTab(
'obj_news_settings');
2617 $news_set_gui->setTimeline(
true);
2618 $news_set_gui->setCronNotifications(
true);
2619 $news_set_gui->setHideByDate(
true);
2620 $this->ctrl->forwardCommand($news_set_gui);
2623 case "ilnewstimelinegui":
2624 $this->tabs_gui->setTabActive(
'news_timeline');
2625 include_once(
"./Services/News/classes/class.ilNewsTimelineGUI.php");
2627 $t->setUserEditAll($ilAccess->checkAccess(
'write',
'', $this->object->getRefId(),
'grp'));
2629 $this->ctrl->forwardCommand($t);
2630 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
2633 $this->object->getId(),
2634 $this->object->getRefId(),
2639 case 'ilmemberexportsettingsgui':
2641 $this->tabs_gui->activateTab(
'properties');
2642 $this->tabs_gui->activateSubTab(
'export_members');
2643 include_once
'./Services/Membership/classes/Export/class.ilMemberExportSettingsGUI.php';
2645 $this->ctrl->forwardCommand($settings_gui);
2649 case "ilcontainerskillgui":
2650 $this->tabs_gui->activateTab(
'obj_tool_setting_skills');
2651 include_once(
"./Services/Container/Skills/classes/class.ilContainerSkillGUI.php");
2653 $this->ctrl->forwardCommand($gui);
2657 case 'ilobjecttranslationgui':
2660 $this->tabs_gui->activateTab(
"settings");
2661 $this->tabs_gui->activateSubTab(
"obj_multilinguality");
2662 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
2664 $this->ctrl->forwardCommand($transgui);
2667 case "ilbookinggatewaygui":
2668 $this->tabs_gui->activateTab(
'obj_tool_setting_booking');
2670 $this->ctrl->forwardCommand($gui);
2686 if ($cmd ==
'infoScreenGoto') {
2691 $cmd =
'infoScreen';
2695 if (!$this->creation_mode) {
2696 if ($cmd ==
"infoScreen") {
2704 if (!$this->creation_mode
2705 && $cmd !=
'infoScreen'
2706 && $cmd !=
'sendfile'
2707 && $cmd !=
'unsubscribe'
2708 && $cmd !=
'deliverCertificate'
2709 && $cmd !=
'performUnsubscribe'
2710 && $cmd !=
'removeFromDesk'
2712 && !$ilAccess->checkAccess(
"read",
'', $this->object->getRefId())
2714 || $cmd ==
'subscribe') {
2715 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
2716 if (
$rbacsystem->checkAccess(
'join', $this->object->getRefId()) &&
2718 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2719 $this->ctrl->redirectByClass(
"ilCourseRegistrationGUI");
2726 if ($cmd ==
'listObjectives') {
2727 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2729 $this->ctrl->setReturn($this,
"");
2731 $ret = &$this->ctrl->forwardCommand($obj_gui);
2739 if ($cmd ==
"" && $this->object->isNewsTimelineLandingPageEffective()) {
2740 $this->ctrl->redirectbyclass(
"ilnewstimelinegui");
2752 if ($header_action) {
2770 $ilAccess =
$DIC[
'ilAccess'];
2772 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2777 if (!$this->object->getMemberObject()->isAssigned()) {
2781 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
2786 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2787 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
2793 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': Missing course confirmation.');
2797 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
2799 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': Missing required fields');
2808 return array(
"ilCourseRegisterGUI",
'ilConditionHandlerGUI');
2815 $ilLocator =
$DIC[
'ilLocator'];
2816 switch ($this->ctrl->getCmd()) {
2818 #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
2828 $GLOBALS[
'DIC'][
'ilCtrl']->redirectByClass(
'ilcoursemembershipgui');
2834 public static function _goto($a_target, $a_add =
"")
2838 $ilAccess =
$DIC[
'ilAccess'];
2843 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2844 if (substr($a_add, 0, 5) ==
'rcode') {
2848 "login.php?target=" .
$_GET[
"target"] .
"&cmd=force_login&lang=" .
2861 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"manage_members",
"", $a_target)) {
2869 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2873 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
2878 $lng->txt(
"msg_no_perm_read_item"),
2897 $ilCtrl =
$DIC[
'ilCtrl'];
2899 $ilAccess =
$DIC[
'ilAccess'];
2902 $this->tabs_gui->activateTab(
'settings');
2903 $this->tabs_gui->activateSubTab(
'crs_map_settings');
2906 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
2910 $latitude = $this->
object->getLatitude();
2911 $longitude = $this->
object->getLongitude();
2912 $zoom = $this->
object->getLocationZoom();
2915 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
2917 $latitude = $def[
"latitude"];
2918 $longitude = $def[
"longitude"];
2919 $zoom = $def[
"zoom"];
2922 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2924 $form->setFormAction($ilCtrl->getFormAction($this));
2926 $form->setTitle($this->lng->txt(
"crs_map_settings"));
2930 $this->lng->txt(
"crs_enable_map"),
2933 $public->setValue(
"1");
2934 $public->setChecked($this->object->getEnableCourseMap());
2935 $form->addItem($public);
2939 $this->lng->txt(
"crs_map_location"),
2942 $loc_prop->setLatitude($latitude);
2943 $loc_prop->setLongitude($longitude);
2944 $loc_prop->setZoom($zoom);
2945 $form->addItem($loc_prop);
2947 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
2949 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
2957 $ilCtrl =
$DIC[
'ilCtrl'];
2964 $this->
object->update();
2966 $ilCtrl->redirect($this,
"editMapSettings");
2981 'ilcoursecontentgui',
2984 $this->object->getAboStatus(),
2985 $this->object->getRefId(),
2986 $this->object->getId()
3001 $a_parent_ref_id = 0
3006 $ilAccess =
$DIC[
'ilAccess'];
3009 if ($a_parent_ref_id == 0) {
3010 $a_parent_ref_id = $a_course_ref_id;
3014 if ($a_item_data[
'type'] ==
'tst' and
3016 $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));
3019 $a_item_list_gui->enableSubscribe($a_abo_status);
3021 $is_tutor = ($ilAccess->checkAccess(
3029 if ($a_show_path and $is_tutor) {
3030 $a_item_list_gui->addCustomProperty(
3032 ilContainer::_buildPath($a_item_data[
'ref_id'], $a_course_ref_id),
3046 $ilAccess =
$DIC[
'ilAccess'];
3048 $ilCtrl =
$DIC[
'ilCtrl'];
3050 if ($this->object->getType() !=
'crs') {
3053 if (!$ilAccess->checkAccess(
3056 $this->object->getRefId(),
3058 $this->object->getId()
3062 if ($this->object->enabledObjectiveView()) {
3073 if (!
$_SESSION[
'crs_timings_panel'][$this->object->getId()] or 1) {
3075 $this->tabs_gui->addSubTab(
"view_content",
$lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"view"));
3077 $this->tabs_gui->addSubTab(
"view_content",
$lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"disableAdministrationPanel"));
3102 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
3105 if (is_array(
$_POST[$a_field][
'date'])) {
3106 $dt[
'year'] = (int)
$_POST[$a_field][
'date'][
'y'];
3107 $dt[
'mon'] = (int)
$_POST[$a_field][
'date'][
'm'];
3108 $dt[
'mday'] = (int)
$_POST[$a_field][
'date'][
'd'];
3109 $dt[
'hours'] = (int)
$_POST[$a_field][
'time'][
'h'];
3110 $dt[
'minutes'] = (int)
$_POST[$a_field][
'time'][
'm'];
3111 $dt[
'seconds'] = (int)
$_POST[$a_field][
'time'][
's'];
3113 $date = date_parse(
$_POST[$a_field][
'date'] .
" " .
$_POST[$a_field][
'time']);
3114 $dt[
'year'] = (int) $date[
'year'];
3115 $dt[
'mon'] = (int) $date[
'month'];
3116 $dt[
'mday'] = (int) $date[
'day'];
3117 $dt[
'hours'] = (int) $date[
'hour'];
3118 $dt[
'minutes'] = (int) $date[
'minute'];
3119 $dt[
'seconds'] = (int) $date[
'second'];
3137 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
3139 $confirm->setFormAction($this->ctrl->getFormAction($this));
3140 $confirm->setConfirm($this->lng->txt(
'reset'),
'reset');
3141 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
3143 $GLOBALS[
'DIC'][
'tpl']->setContent($confirm->getHTML());
3153 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3155 $usr_results->delete();
3158 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestRun.php';
3159 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
3161 $this->object->getId(),
3165 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
3168 $tmp_obj_res->reset($this->object->getId());
3170 $ilUser->deletePref(
'crs_objectives_force_details_' . $this->object->getId());
3172 ilUtil::sendSuccess($this->lng->txt(
'crs_objectives_reseted'));
3180 $ilAccess =
$DIC[
'ilAccess'];
3183 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
3187 include_once
'./Services/Container/classes/class.ilContainerStartObjects.php';
3189 $this->object->getRefId(),
3190 $this->object->getId()
3192 if (count($this->start_obj->getStartObjects()) &&
3193 !$this->start_obj->allFullfilled(
$ilUser->getId())) {
3210 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
3212 if (
$settings->isActive() and
$settings->getContainer() != $this->object->getRefId()) {
3213 $settings->setContainer($this->object->getRefId());
3217 parent::prepareOutput($a_show_subobjects);
3226 $link = chr(13) . chr(10) . chr(13) . chr(10);
3227 $link .= $this->lng->txt(
'crs_mail_permanent_link');
3228 $link .= chr(13) . chr(10) . chr(13) . chr(10);
3229 include_once
'./Services/Link/classes/class.ilLink.php';
3231 return rawurlencode(base64_encode($link));
3240 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3246 if (
true === $validator->isCertificateDownloadable(
$ilUser->getId(), $this->object->getId())) {
3247 $cert_url = $this->ctrl->getLinkTarget($this,
"deliverCertificate");
3249 $this->lng->loadLanguageModule(
"certificate");
3250 $lg->addCustomCommand($cert_url,
"download_certificate");
3255 $this->lng->txt(
"download_certificate"),
3263 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
3266 if (!$noti->isCurrentUserActive()) {
3270 $this->lng->txt(
"crs_notification_deactivated")
3273 $this->ctrl->setParameter($this,
"crs_ntf", 1);
3274 $caption =
"crs_activate_notification";
3279 $this->lng->txt(
"crs_notification_activated")
3282 $this->ctrl->setParameter($this,
"crs_ntf", 0);
3283 $caption =
"crs_deactivate_notification";
3286 if ($noti->canCurrentUserEdit()) {
3287 $lg->addCustomCommand(
3288 $this->ctrl->getLinkTarget($this,
"saveNotification"),
3293 $this->ctrl->setParameter($this,
"crs_ntf",
"");
3305 $ilAccess =
$DIC[
'ilAccess'];
3308 if ($ilAccess->checkAccess(
'manage_members',
'', $this->ref_id)) {
3309 $user_id = $_REQUEST[
"member_id"];
3315 $objId = (int) $this->object->getId();
3319 if (
false === $validator->isCertificateDownloadable($user_id,
$objId)) {
3321 $this->ctrl->redirect($this);
3326 $certLogger =
$DIC->logger()->cert();
3333 $this->lng->txt(
'error_creating_certificate_pdf')
3336 $pdfAction->downloadPdf((
int) $user_id,
$objId);
3342 $this->ctrl->redirectByClass(array(
'ilrepositorygui',
'ilobjcoursegui',
'illoeditorgui'),
'materials');
3347 if (isset(
$_POST[
'position'][
"lobj"])) {
3348 $lobj =
$_POST[
'position'][
"lobj"];
3349 unset(
$_POST[
'position'][
"lobj"]);
3351 $objective_order = array();
3352 foreach ($lobj as $objective_id => $materials) {
3353 $objective_order[$objective_id] = $materials[0];
3354 unset($lobj[$objective_id][0]);
3358 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
3359 asort($objective_order);
3361 foreach (array_keys($objective_order) as $objective_id) {
3363 $obj->writePosition(++$pos);
3367 include_once
"Modules/Course/classes/class.ilCourseObjectiveMaterials.php";
3368 foreach ($lobj as $objective_id => $materials) {
3373 foreach (array_keys($materials) as $ass_id) {
3374 $objmat->writePosition($ass_id, ++$pos);
3379 return parent::saveSortingObject();
3388 include_once
'./Services/Link/classes/class.ilLink.php';
3398 $objective_id = (int) $_REQUEST[
'objective_id'];
3399 $test_id = (int) $_REQUEST[
'tid'];
3401 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3402 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
3403 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
3407 $this->object->getId(),
3410 $passed =
$res->getCompletedObjectiveIds();
3412 $has_completed =
false;
3413 if ($objective_id) {
3414 $objective_ids = array($objective_id);
3415 if (in_array($objective_id, $passed)) {
3416 $has_completed =
true;
3420 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
3424 if (count($objective_ids) == count($passed)) {
3425 $has_completed =
true;
3430 if ($has_completed) {
3436 include_once
'./Services/Link/classes/class.ilLink.php';
3448 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
3452 if ($a_objective_id) {
3453 $question = $this->lng->txt(
'crs_loc_objective_passed_confirmation');
3455 $question = $this->lng->txt(
'crs_loc_objectives_passed_confirmation');
3458 $confirm->addHiddenItem(
'objective_id', $a_objective_id);
3459 $confirm->addHiddenItem(
'tid', $a_test_id);
3460 $confirm->setConfirm($this->lng->txt(
'crs_loc_tst_start'),
'redirectLocToTestConfirmed');
3461 $confirm->setCancel($this->lng->txt(
'cancel'),
'view');
3465 $GLOBALS[
'DIC'][
'tpl']->setContent($confirm->getHTML());
3478 $crs_admin = $this->
object->getDefaultAdminRole();
3479 $crs_member = $this->
object->getDefaultMemberRole();
3480 $local_roles = $this->
object->getLocalCourseRoles(
false);
3481 $crs_roles = array();
3484 if (in_array($crs_member, $local_roles)) {
3485 #$crs_roles[$crs_member] = ilObjRole::_getTranslation(array_search ($crs_member, $local_roles));
3486 #unset($local_roles[$crs_roles[$crs_member]]);
3489 foreach ($local_roles as $title => $role_id) {
3497 if (count($a_exclude) > 0) {
3498 foreach ($a_exclude as $excluded_role) {
3499 if (isset($crs_roles[$excluded_role])) {
3500 unset($crs_roles[$excluded_role]);
3526 $this->ctrl->redirectByClass(
'ilUsersGalleryGUI');
3534 $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
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.
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.
static isAccessible($ref_id)
Is container skill presentation accessible.
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
isNull()
Check if a date is null (Datetime == '0000-00-00 00:00:00', unixtime == 0,...)
GUI class for didactic template settings inside repository objects.
Class ilECSCourseSettings.
static _getInstanceByType($a_type)
Get Singleton Instance.
Export User Interface Class.
static getValidFilename($a_filename)
Get valid filename.
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.
readMemberData($ids, $selected_columns=null, bool $skip_names=false)
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.
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 _lookupName($a_user_id)
lookup user name
Render add new item selector.
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 CALENDAR_CONFIGURATION
const EXTERNAL_MAIL_PREFIX
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.
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