5require_once
"./Services/Container/classes/class.ilContainerGUI.php";
46 $ilHelp =
$DIC[
'ilHelp'];
50 $this->ctrl->saveParameter($this, array(
"ref_id",
"cmdClass"));
53 parent::__construct(
'', (
int)
$_GET[
'ref_id'],
true,
false);
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");
217 $ilAccess =
$DIC[
'ilAccess'];
226 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
229 $this->tabs_gui->setTabActive(
'info_short');
231 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
232 include_once
'Modules/Course/classes/class.ilCourseFile.php';
237 $info->enablePrivateNotes();
238 $info->enableFeedback();
240 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
241 $info->enableNewsEditing();
244 if (strlen($this->object->getImportantInformation()) or
245 strlen($this->object->getSyllabus()) or
247 $info->addSection($this->lng->txt(
'crs_general_informations'));
250 if (strlen($this->object->getImportantInformation())) {
252 $this->lng->txt(
'crs_important_info'),
258 if (strlen($this->object->getSyllabus())) {
259 $info->addProperty($this->lng->txt(
'crs_syllabus'), nl2br(
265 $tpl =
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'Modules/Course');
267 foreach (
$files as $file) {
268 $tpl->setCurrentBlock(
"files");
269 $this->ctrl->setParameter($this,
'file_id', $file->getFileId());
270 $tpl->setVariable(
"DOWN_LINK", $this->ctrl->getLinkTarget($this,
'sendfile'));
271 $tpl->setVariable(
"DOWN_NAME", $file->getFileName());
272 $tpl->setVariable(
"DOWN_INFO_TXT", $this->lng->txt(
'crs_file_size_info'));
273 $tpl->setVariable(
"DOWN_SIZE", $file->getFileSize());
274 $tpl->setVariable(
"TXT_BYTES", $this->lng->txt(
'bytes'));
275 $tpl->parseCurrentBlock();
278 $this->lng->txt(
'crs_file_download'),
283 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
285 $record_gui->setInfoObject(
$info);
286 $record_gui->parse();
289 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
292 if ($this->object->hasContactData()) {
293 $info->addSection($this->lng->txt(
"crs_contact"));
295 if (strlen($this->object->getContactName())) {
297 $this->lng->txt(
"crs_contact_name"),
298 $this->object->getContactName()
301 if (strlen($this->object->getContactResponsibility())) {
303 $this->lng->txt(
"crs_contact_responsibility"),
304 $this->object->getContactResponsibility()
307 if (strlen($this->object->getContactPhone())) {
309 $this->lng->txt(
"crs_contact_phone"),
310 $this->object->getContactPhone()
313 if ($this->object->getContactEmail()) {
314 include_once
'./Modules/Course/classes/class.ilCourseMailTemplateMemberContext.php';
315 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
317 $emails = explode(
",", $this->object->getContactEmail());
318 foreach ($emails as
$email) {
320 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true,
'Modules/Course');
334 'ref_id' => $this->object->getRefId(),
339 $etpl->setVariable(
"CONTACT_EMAIL",
$email);
340 $mailString .= $etpl->get() .
"<br />";
342 $info->addProperty($this->lng->txt(
"crs_contact_email"), $mailString);
344 if (strlen($this->object->getContactConsultation())) {
346 $this->lng->txt(
"crs_contact_consultation"),
347 nl2br($this->object->getContactConsultation())
354 $conts = $parts->getContacts();
355 if (count($conts) > 0) {
356 $info->addSection($this->lng->txt(
"crs_mem_contacts"));
357 foreach ($conts as
$c) {
358 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
360 $pgui->setBackUrl($this->ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
361 $pgui->setEmbedded(
true);
362 $info->addProperty(
"", $pgui->getHTML());
373 $this->lng->loadLanguageModule(
"rep");
374 $info->addSection($this->lng->txt(
"rep_activation_availability"));
375 $info->showLDAPRoleGroupMappingInfo();
378 if ($this->object->getActivationUnlimitedStatus()) {
380 $this->lng->txt(
"rep_activation_access"),
381 $this->lng->txt(
'crs_visibility_limitless')
385 $this->lng->txt(
'rep_activation_access'),
392 switch ($this->object->getSubscriptionLimitationType()) {
394 $txt = $this->lng->txt(
"crs_info_reg_deactivated");
398 switch ($this->object->getSubscriptionType()) {
400 $txt = $this->lng->txt(
"crs_info_reg_confirmation");
403 $txt = $this->lng->txt(
"crs_info_reg_direct");
406 $txt = $this->lng->txt(
"crs_info_reg_password");
412 $info->addProperty($this->lng->txt(
"crs_info_reg"),
$txt);
416 if ($this->object->getSubscriptionUnlimitedStatus()) {
418 $this->lng->txt(
"crs_reg_until"),
419 $this->lng->txt(
'crs_unlimited')
421 } elseif ($this->object->getSubscriptionStart() < time()) {
423 $this->lng->txt(
"crs_reg_until"),
424 $this->lng->txt(
'crs_to') .
' ' .
427 } elseif ($this->object->getSubscriptionStart() > time()) {
429 $this->lng->txt(
"crs_reg_until"),
430 $this->lng->txt(
'crs_from') .
' ' .
434 if ($this->object->isSubscriptionMembershipLimited()) {
435 if ($this->object->getSubscriptionMinMembers()) {
437 $this->lng->txt(
"mem_min_users"),
438 $this->object->getSubscriptionMinMembers()
441 if ($this->object->getSubscriptionMaxMembers()) {
442 include_once
'./Modules/Course/classes/class.ilObjCourseAccess.php';
446 $this->lng->txt(
'mem_free_places'),
447 $reg_info[
'reg_info_free_places']
453 if ($this->object->getCancellationEnd()) {
455 $this->lng->txt(
'crs_cancellation_end'),
460 if ($this->object->getCourseStart()) {
462 $this->lng->txt(
'crs_period'),
464 $this->object->getCourseStart(),
465 $this->object->getCourseEnd()
471 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
474 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
476 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
480 $this->lng->loadLanguageModule(
'ps');
481 $info->addSection($this->lng->txt(
'crs_user_agreement_info'));
482 $info->addProperty($this->lng->txt(
'ps_export_data'), $field_info->exportableFieldsToInfoString());
485 $info->addProperty($this->lng->txt(
'ps_crs_user_fields'), $fields);
489 $info->enableLearningProgress(
true);
492 $this->ctrl->forwardCommand(
$info);
500 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
502 if ($noti->canCurrentUserEdit()) {
503 if ((
bool) $_REQUEST[
"crs_ntf"]) {
504 $noti->activateUser();
506 $noti->deactivateUser();
509 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
510 $this->ctrl->redirect($this,
"");
521 include_once
'Modules/Course/classes/class.ilCourseFile.php';
526 $ilAccess =
$DIC[
'ilAccess'];
536 $this->tabs_gui->setTabActive(
'settings');
537 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
542 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'Modules/Course');
543 $this->tpl->setVariable(
'INFO_TABLE', $a_form->getHTML());
549 foreach (
$files as $file) {
550 $table_data[
'id'] = $file->getFileId();
551 $table_data[
'filename'] = $file->getFileName();
552 $table_data[
'filetype'] = $file->getFileType();
553 $table_data[
'filesize'] = $file->getFileSize();
555 $rows[] = $table_data;
558 include_once(
"./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
560 $table_gui->setTitle($this->lng->txt(
"crs_info_download"));
561 $table_gui->setData(
$rows);
562 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
563 $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->lng->txt(
"delete"));
564 $table_gui->setSelectAllCheckbox(
"file_id");
565 $this->tpl->setVariable(
'INFO_FILE_TABLE', $table_gui->getHTML());
579 if (!count(
$_POST[
'file_id'])) {
586 $this->tabs_gui->setTabActive(
'settings');
587 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
589 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
593 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteInfoFiles"));
594 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
595 $c_gui->setCancel($this->lng->txt(
"cancel"),
"editInfo");
596 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteInfoFiles");
599 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
600 foreach (
$_POST[
"file_id"] as $file_id) {
602 $c_gui->addItem(
"file_id[]", $file_id, $file->getFileName());
605 $this->tpl->setContent($c_gui->getHTML());
616 if (!count(
$_POST[
'file_id'])) {
621 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
623 foreach (
$_POST[
'file_id'] as $file_id) {
625 if ($this->object->getId() == $file->getCourseId()) {
629 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'));
643 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
645 $form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
646 $form->setMultipart(
true);
647 $form->setTitle($this->lng->txt(
'crs_general_info'));
648 $form->addCommandButton(
'updateInfo', $this->lng->txt(
'save'));
649 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
652 $area->setValue($this->object->getImportantInformation());
655 $form->addItem($area);
658 $area->setValue($this->object->getSyllabus());
661 $form->addItem($area);
664 $section->setTitle($this->lng->txt(
'crs_info_download'));
668 $file->enableFileNameSelection(
'file_name');
669 $form->addItem($file);
672 $section->setTitle($this->lng->txt(
'crs_contact'));
676 $text->setValue($this->object->getContactName());
678 $text->setMaxLength(70);
681 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
682 $text->setValue($this->object->getContactResponsibility());
684 $text->setMaxLength(70);
688 $text->setValue($this->object->getContactPhone());
690 $text->setMaxLength(40);
694 $text->setValue($this->object->getContactEmail());
695 $text->setInfo($this->lng->txt(
'crs_contact_email_info'));
697 $text->setMaxLength(255);
700 $area =
new ilTextAreaInputGUI($this->lng->txt(
'crs_contact_consultation'),
'contact_consultation');
701 $area->setValue($this->object->getContactConsultation());
704 $form->addItem($area);
706 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
708 $this->record_gui->setPropertyForm(
$form);
709 $this->record_gui->parse();
719 $ilAccess =
$DIC[
'ilAccess'];
723 include_once
'Modules/Course/classes/class.ilCourseFile.php';
725 $file_obj->setCourseId($this->object->getId());
726 $file_obj->setFileName(strlen(
$_POST[
'file_name']) ?
728 $_FILES[
'file'][
'name']);
729 $file_obj->setFileSize($_FILES[
'file'][
'size']);
730 $file_obj->setFileType($_FILES[
'file'][
'type']);
731 $file_obj->setTemporaryName($_FILES[
'file'][
'tmp_name']);
732 $file_obj->setErrorCode($_FILES[
'file'][
'error']);
748 $file_obj->validate();
749 $this->
object->validateInfoSettings();
750 if (strlen(
$ilErr->getMessage())) {
757 if (!$this->record_gui->importEditFormPostValues()) {
769 $this->
object->update();
771 $this->record_gui->writeEditForm();
775 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
777 $ecs->handleContentUpdate();
779 ilUtil::sendSuccess($this->lng->txt(
"crs_settings_saved"));
797 if (!
$form->checkInput()) {
798 $form->setValuesByPost();
805 $form->getInput(
'subscription_max') &&
806 $form->getInput(
'subscription_min') &&
807 (
$form->getInput(
'subscription_max') <
$form->getInput(
'subscription_min'))
809 $min =
$form->getItemByPostVar(
'subscription_min');
810 $min->setAlert($this->lng->txt(
'crs_subscription_min_members_err'));
817 $form->getInput(
'list_presentation') ==
"tile" &&
824 if (
$form->getInput(
'sl') ==
"1" &&
825 $form->getInput(
'list_presentation') ==
"tile") {
833 $this->
object->setTitle(
$form->getInput(
'title'));
834 $this->
object->setDescription(
$form->getInput(
'desc'));
837 $crs_period =
$form->getItemByPostVar(
"period");
838 $this->
object->setCourseStart($crs_period->getStart());
839 $this->
object->setCourseEnd($crs_period->getEnd());
842 $this->
object->setOfflineStatus((
bool) !
$form->getInput(
'activation_online'));
845 $period =
$form->getItemByPostVar(
"access_period");
846 if ($period->getStart() && $period->getEnd()) {
847 $this->
object->setActivationStart($period->getStart()->get(
IL_CAL_UNIX));
848 $this->
object->setActivationEnd($period->getEnd()->get(
IL_CAL_UNIX));
849 $this->
object->setActivationVisibility((
int)
$form->getInput(
'activation_visibility'));
851 $this->
object->setActivationStart(
null);
852 $this->
object->setActivationEnd(
null);
856 $this->
object->setSubscriptionPassword(
$form->getInput(
'subscription_password'));
857 $this->
object->setSubscriptionStart(
null);
858 $this->
object->setSubscriptionEnd(
null);
860 $sub_type =
$form->getInput(
'subscription_type');
861 $sub_period =
$form->getItemByPostVar(
'subscription_period');
863 $this->
object->setSubscriptionType($sub_type);
865 if ($sub_period->getStart() && $sub_period->getEnd()) {
867 $this->
object->setSubscriptionStart($sub_period->getStart()->get(
IL_CAL_UNIX));
868 $this->
object->setSubscriptionEnd($sub_period->getEnd()->get(
IL_CAL_UNIX));
878 $this->
object->enableRegistrationAccessCode((
int)
$form->getInput(
'reg_code_enabled'));
879 $this->
object->setRegistrationAccessCode(
$form->getInput(
'reg_code'));
882 $this->
object->setCancellationEnd(
$form->getItemByPostVar(
"cancel_end")->getDate());
885 $this->
object->enableSubscriptionMembershipLimitation((
int)
$form->getInput(
'subscription_membership_limitation'));
886 $this->
object->setSubscriptionMaxMembers((
int)
$form->getInput(
'subscription_max'));
887 $this->
object->setSubscriptionMinMembers((
int)
$form->getInput(
'subscription_min'));
888 $old_autofill = $this->
object->hasWaitingListAutoFill();
889 switch ((
int)
$form->getInput(
'waiting_list')) {
891 $this->
object->enableWaitingList(
true);
892 $this->
object->setWaitingListAutoFill(
true);
896 $this->
object->enableWaitingList(
true);
897 $this->
object->setWaitingListAutoFill(
false);
901 $this->
object->enableWaitingList(
false);
902 $this->
object->setWaitingListAutoFill(
false);
907 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTitleIconVisibility();
910 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTopActionsVisibility();
915 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveIcon();
918 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTileImage();
925 $this->
object->setViewMode((
int)
$form->getInput(
'view_mode'));
928 $this->
object->setTimingMode((
int)
$form->getInput(
'timing_mode'));
930 $this->
object->setTimingMode(
$form->getInput(
'timing_mode'));
931 $this->
object->setOrderType(
$form->getInput(
'sorting'));
934 $this->
object->setAboStatus((
int)
$form->getInput(
'abo'));
935 $this->
object->setShowMembers((
int)
$form->getInput(
'show_members'));
938 $this->
object->setShowMembersExport((
int)
$form->getInput(
'show_members_export'));
940 $this->
object->setMailToMembersType((
int)
$form->getInput(
'mail_type'));
942 $this->
object->enableSessionLimit((
int)
$form->getInput(
'sl'));
944 $session_sp =
$form->getInput(
'sp');
945 $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1);
946 $session_sn =
$form->getInput(
'sn');
947 $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1);
948 $this->
object->setAutoNotification(
$form->getInput(
'auto_notification') == 1 ?
true :
false);
951 $show_lp_sync_confirmation =
false;
954 if (isset(
$_POST[
'status_dt'])) {
959 $show_lp_sync_confirmation =
true;
961 $this->
object->setStatusDetermination((
int)
$form->getInput(
'status_dt'));
965 if (!$old_autofill && $this->object->hasWaitingListAutoFill()) {
966 $this->
object->handleAutoFill();
968 $this->
object->update();
971 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
973 $this->object->getId(),
987 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
995 if ($show_lp_sync_confirmation) {
1000 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1002 if (!$ecs->handleSettingsUpdate()) {
1003 $form->setValuesByPost();
1017 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1019 $cgui->setFormAction($this->ctrl->getFormAction($this,
"setLPSync"));
1020 $cgui->setHeaderText($this->lng->txt(
"crs_status_determination_sync"));
1021 $cgui->setCancel($this->lng->txt(
"cancel"),
"edit");
1022 $cgui->setConfirm($this->lng->txt(
"confirm"),
"setLPSync");
1024 $tpl->setContent($cgui->getHTML());
1030 $this->
object->update();
1032 $this->
object->syncMembersStatusWithLP();
1034 ilUtil::sendSuccess($this->lng->txt(
"settings_saved"),
true);
1035 $this->ctrl->redirect($this,
"edit");
1047 $this->tabs_gui->setSubTabActive(
'crs_settings');
1053 parent::editObject();
1069 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1070 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
1073 $form->setTitle($this->lng->txt(
'crs_edit'));
1075 $form->addCommandButton(
'update', $this->lng->txt(
'save'));
1076 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
1078 $form->setFormAction($this->ctrl->getFormAction($this,
'update'));
1081 $this->initFormTitleDescription(
$form);
1087 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1089 $cdur->setInfo($this->lng->txt(
'crs_period_info'));
1090 if ($this->object->getCourseStart()) {
1091 $cdur->setStart($this->object->getCourseStart());
1093 if ($this->object->getCourseStart()) {
1094 $cdur->setEnd($this->object->getCourseEnd());
1096 $form->addItem($cdur);
1101 $this->lng->loadLanguageModule(
'rep');
1104 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
1107 $online =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_online'),
'activation_online');
1108 $online->setChecked(!$this->object->getOfflineStatus());
1109 $online->setInfo($this->lng->txt(
'crs_activation_online_info'));
1110 $form->addItem($online);
1112 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1114 $dur->setShowTime(
true);
1117 $form->addItem($dur);
1119 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'activation_visibility');
1120 $visible->setInfo($this->lng->txt(
'crs_activation_limited_visibility_info'));
1121 $visible->setChecked($this->object->getActivationVisibility());
1122 $dur->addSubItem($visible);
1126 $section->setTitle($this->lng->txt(
'crs_reg'));
1129 $reg_proc =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_registration_type'),
'subscription_type');
1130 $reg_proc->setValue(
1132 ? $this->object->getSubscriptionType()
1138 $reg_proc->addOption($opt);
1143 $pass->setRequired(
true);
1144 $pass->setInfo($this->lng->txt(
'crs_reg_password_info'));
1145 $pass->setSubmitFormOnEnter(
true);
1147 $pass->setMaxLength(32);
1148 $pass->setValue($this->object->getSubscriptionPassword());
1150 $opt->addSubItem(
$pass);
1151 $reg_proc->addOption($opt);
1154 $opt->setInfo($this->lng->txt(
'crs_registration_confirmation_info'));
1155 $reg_proc->addOption($opt);
1158 $opt->setInfo($this->lng->txt(
'crs_registration_deactivated'));
1159 $reg_proc->addOption($opt);
1161 $form->addItem($reg_proc);
1165 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'crs_reg_code'),
'reg_code_enabled');
1166 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1167 $reg_code->setValue(1);
1168 $reg_code->setInfo($this->lng->txt(
'crs_reg_code_enabled_info'));
1176 #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
1178 if (!$this->object->getRegistrationAccessCode()) {
1179 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1183 $reg_link->setValue($this->object->getRegistrationAccessCode());
1184 $form->addItem($reg_link);
1187 include_once
'./Services/Link/classes/class.ilLink.php';
1188 $val =
ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(),
'_rcode' . $this->object->getRegistrationAccessCode());
1189 $link->setHTML(
'<span class="small">' . $val .
'</span>');
1190 $reg_code->addSubItem($link);
1192 $form->addItem($reg_code);
1195 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1197 $sdur->setShowTime(
true);
1198 if ($this->object->getSubscriptionStart()) {
1201 if ($this->object->getSubscriptionEnd()) {
1204 $form->addItem($sdur);
1207 $cancel =
new ilDateTimeInputGUI($this->lng->txt(
'crs_cancellation_end'),
'cancel_end');
1208 $cancel->setInfo($this->lng->txt(
'crs_cancellation_end_info'));
1209 $cancel_end = $this->
object->getCancellationEnd();
1211 $cancel->setDate($cancel_end);
1213 $form->addItem($cancel);
1216 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'crs_subscription_max_members_short'),
'subscription_membership_limitation');
1217 $lim->setInfo($this->lng->txt(
'crs_subscription_max_members_short_info'));
1219 $lim->setChecked($this->object->isSubscriptionMembershipLimited());
1222 $min->setSubmitFormOnEnter(
true);
1224 $min->setMaxLength(4);
1225 $min->setValue($this->object->getSubscriptionMinMembers() ? $this->object->getSubscriptionMinMembers() :
'');
1226 $min->setTitle($this->lng->txt(
'crs_subscription_min_members'));
1227 $min->setInfo($this->lng->txt(
'crs_subscription_min_members_info'));
1228 $lim->addSubItem($min);
1231 $max->setSubmitFormOnEnter(
true);
1233 $max->setMaxLength(4);
1234 $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() :
'');
1235 $max->setTitle($this->lng->txt(
'crs_subscription_max_members'));
1236 $max->setInfo($this->lng->txt(
'crs_reg_max_info'));
1238 $lim->addSubItem($max);
1260 $wait->addOption($option);
1262 $option =
new ilRadioOption($this->lng->txt(
'crs_waiting_list_no_autofill'), 1);
1263 $option->setInfo($this->lng->txt(
'crs_wait_info'));
1264 $wait->addOption($option);
1266 $option =
new ilRadioOption($this->lng->txt(
'crs_waiting_list_autofill'), 2);
1267 $option->setInfo($this->lng->txt(
'crs_waiting_list_autofill_info'));
1268 $wait->addOption($option);
1270 if ($this->object->hasWaitingListAutoFill()) {
1272 } elseif ($this->object->enabledWaitingList()) {
1276 $lim->addSubItem($wait);
1278 $form->addItem($lim);
1282 $pres->setTitle($this->lng->txt(
'crs_view_mode'));
1284 $form->addItem($pres);
1287 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTitleIconVisibility();
1290 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTopActionsVisibility();
1293 if ($setting->get(
"rep_breadcr_crs_overwrite")) {
1294 $add = $setting->get(
"rep_breadcr_crs_default")
1295 ?
" (" . $this->lng->txt(
"crs_breadcrumb_crs_only") .
")"
1296 :
" (" . $this->lng->txt(
"crs_breadcrumb_full_path") .
")";
1298 self::BREADCRUMB_DEFAULT => $this->lng->txt(
"crs_sys_default") . $add,
1299 self::BREADCRUMB_CRS_ONLY => $this->lng->txt(
"crs_breadcrumb_crs_only"),
1300 self::BREADCRUMB_FULL_PATH => $this->lng->txt(
"crs_breadcrumb_full_path")
1310 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addIcon();
1313 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTileImage();
1320 $view_type->setValue($this->object->getViewMode());
1323 $opts->setInfo($this->lng->txt(
'cntr_view_info_sessions'));
1324 $view_type->addOption($opts);
1329 $sess->setChecked($this->object->isSessionLimitEnabled());
1330 $sess->setInfo($this->lng->txt(
'sess_limit_info'));
1333 #$prev->setSubmitFormOnEnter(true);
1334 $prev->setMinValue(0);
1336 $this->object->getNumberOfPreviousSessions() == -1 ?
1338 $this->object->getNumberOfPreviousSessions()
1341 $prev->setMaxLength(3);
1342 $sess->addSubItem($prev);
1345 #$next->setSubmitFormOnEnter(true);
1346 $next->setMinValue(0);
1348 $this->object->getNumberOfNextSessions() == -1 ?
1350 $this->object->getNumberOfnextSessions()
1353 $next->setMaxLength(3);
1354 $sess->addSubItem($next);
1356 $opts->addSubItem(
$sess);
1362 $optsi->setInfo($this->lng->txt(
'cntr_view_info_simple'));
1363 $view_type->addOption($optsi);
1366 $optbt->setInfo($this->lng->txt(
'cntr_view_info_by_type'));
1367 $view_type->addOption($optbt);
1370 $opto->setInfo($this->lng->txt(
'crs_view_info_objective'));
1371 $view_type->addOption($opto);
1374 $optt->setInfo($this->lng->txt(
'crs_view_info_timing'));
1378 $timing->setValue($this->object->getTimingMode());
1381 $absolute->setInfo($this->lng->txt(
'crs_view_info_timing_absolute'));
1382 $timing->addOption($absolute);
1385 $relative->setInfo($this->lng->txt(
'crs_view_info_timing_relative'));
1386 $timing->addOption($relative);
1388 $optt->addSubItem($timing);
1391 $view_type->addOption($optt);
1393 $form->addItem($view_type);
1408 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1410 include_once
'./Services/Object/classes/class.ilObjectLP.php';
1412 if ($olp->getCurrentMode()) {
1414 $lp_status->setTitle($this->lng->txt(
'crs_course_status_of_users'));
1415 $form->addItem($lp_status);
1417 $lp_status_options =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_status_determination'),
"status_dt");
1419 $lp_status_options->setValue($this->object->getStatusDetermination());
1422 $this->lng->txt(
'crs_status_determination_lp'),
1424 $this->lng->txt(
'crs_status_determination_lp_info')
1426 $lp_status_options->addOption($lp_option);
1428 $this->lng->txt(
'crs_status_determination_manual'),
1432 $form->addItem($lp_status_options);
1438 $feat->setTitle($this->lng->txt(
'obj_features'));
1439 $form->addItem($feat);
1441 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1443 $this->object->getId(),
1458 $mem->setChecked($this->object->getShowMembers());
1459 $mem->setInfo($this->lng->txt(
'crs_show_members_info'));
1460 $form->addItem($mem);
1464 $part_list =
new ilCheckboxInputGUI($this->lng->txt(
'crs_show_member_export'),
'show_members_export');
1465 $part_list->setChecked($this->object->getShowMembersExport());
1466 $part_list->setInfo($this->lng->txt(
'crs_show_member_export_info'));
1467 $mem->addSubItem($part_list);
1472 $mail_type->setValue($this->object->getMailToMembersType());
1475 $this->lng->txt(
'crs_mail_tutors_only'),
1477 $this->lng->txt(
'crs_mail_tutors_only_info')
1479 $mail_type->addOption($mail_tutors);
1482 $this->lng->txt(
'crs_mail_all'),
1484 $this->lng->txt(
'crs_mail_all_info')
1486 $mail_type->addOption($mail_all);
1487 $form->addItem($mail_type);
1495 $not =
new ilCheckboxInputGUI($this->lng->txt(
'crs_auto_notification'),
'auto_notification');
1497 $not->setInfo($this->lng->txt(
'crs_auto_notification_info'));
1498 $not->setChecked($this->object->getAutoNotification());
1499 $form->addItem($not);
1507 $desk =
new ilCheckboxInputGUI($this->lng->txt(
'crs_add_remove_from_desktop'),
'abo');
1508 $desk->setChecked($this->object->getAboStatus());
1509 $desk->setInfo($this->lng->txt(
'crs_add_remove_from_desktop_info'));
1510 $form->addItem($desk);
1514 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1516 $ecs->addSettingsToForm(
$form,
'crs');
1528 include_once
'Modules/Course/classes/class.ilCourseFile.php';
1530 ilUtil::deliverFile($file->getAbsolutePath(), $file->getFileName(), $file->getFileType());
1543 $ilAccess =
$DIC[
'ilAccess'];
1548 $this->tabs_gui->addSubTabTarget(
1550 $this->ctrl->getLinkTarget($this,
'edit'),
1555 $this->tabs_gui->addSubTabTarget(
1556 "crs_info_settings",
1557 $this->ctrl->getLinkTarget($this,
'editInfo'),
1562 $this->tabs_gui->addSubTabTarget(
1564 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerGUI',
'listConditions'),
1566 "ilConditionHandlerGUI"
1569 $this->tabs_gui->addSubTabTarget(
1570 "crs_start_objects",
1571 $this->ctrl->getLinkTargetByClass(
'ilContainerStartObjectsGUI',
'listStructure'),
1576 $this->tabs_gui->addSubTabTarget(
1578 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1583 if ($lti_settings->hasSettingsAccess()) {
1584 $this->tabs_gui->addSubTabTarget(
1586 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1591 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
1593 $this->tabs_gui->addSubTabTarget(
1595 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
1602 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1603 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1606 $this->tabs_gui->addSubTabTarget(
1607 'crs_custom_user_fields',
1608 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1610 'ilobjectcustomuserfieldsgui'
1615 include_once
"Services/Certificate/classes/class.ilCertificate.php";
1617 $this->tabs_gui->addSubTabTarget(
1619 $this->ctrl->getLinkTargetByClass(
"ilcertificategui",
"certificateeditor"),
1625 if ($this->object->getUseNews()) {
1626 $this->tabs_gui->addSubTab(
1627 'obj_news_settings',
1628 $this->lng->txt(
"cont_news_settings"),
1629 $this->ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
1633 if ($this->object->getShowMembersExport()) {
1634 $this->tabs_gui->addSubTab(
1636 $this->lng->txt(
'crs_show_member_export_settings'),
1637 $this->ctrl->getLinkTargetByClass(
'ilmemberexportsettingsgui',
'')
1641 $this->tabs_gui->addSubTabTarget(
1642 "obj_multilinguality",
1643 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
""),
1645 "ilobjecttranslationgui"
1659 && !$this->isActiveAdministrationPanel()) {
1662 parent::showPossibleSubObjects();
1679 $a_new_object->getMemberObject()->updateNotification(
$ilUser->getId(),
$ilSetting->get(
'mail_crs_admin_notification',
true));
1681 $a_new_object->getMemberObject()->updateContact(
$ilUser->getId(), 1);
1686 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1694 ilUtil::sendSuccess($this->lng->txt(
"crs_added"),
true);
1696 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
1699 $this->ctrl->getLinkTarget($this,
"edit",
"",
false,
false)
1715 if (isset(
$_GET[
'admin_hide'])) {
1716 $ilUser->writePref(
'crs_admin_hide', (
int)
$_GET[
'admin_hide']);
1718 if (isset(
$_GET[
'tutor_hide'])) {
1719 $ilUser->writePref(
'crs_tutor_hide', (
int)
$_GET[
'tutor_hide']);
1721 if (isset(
$_GET[
'member_hide'])) {
1722 $ilUser->writePref(
'crs_member_hide', (
int)
$_GET[
'member_hide']);
1724 if (isset(
$_GET[
'subscriber_hide'])) {
1725 $ilUser->writePref(
'crs_subscriber_hide', (
int)
$_GET[
'subscriber_hide']);
1727 if (isset(
$_GET[
'wait_hide'])) {
1728 $ilUser->writePref(
'crs_wait_hide', (
int)
$_GET[
'wait_hide']);
1730 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
1732 if (isset(
$_GET[
'role_hide_' . $role_id])) {
1733 $ilUser->writePref(
'crs_role_hide_' . $role_id, (
int)
$_GET[
'role_hide_' . $role_id]);
1740 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1741 $this->show_tracking =
1746 if ($this->show_tracking) {
1747 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
1749 $this->show_tracking = $olp->isActive();
1752 if ($this->show_tracking) {
1753 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1758 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1761 if ($privacy->enabledCourseAccessTimes()) {
1762 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
1766 $do_prtf = (is_array($selected_columns) &&
1767 in_array(
'prtf', $selected_columns) &&
1770 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
1773 $this->ctrl->getLinkTarget($this,
"members")
1777 foreach ((array) $ids as $usr_id) {
1779 $tmp_data[
'firstname'] =
$name[
'firstname'];
1780 $tmp_data[
'lastname'] =
$name[
'lastname'];
1782 $tmp_data[
'passed'] = $this->
object->getMembersObject()->hasPassed($usr_id) ? 1 : 0;
1784 $tmp_data[
'passed_info'] = $this->
object->getMembersObject()->getPassedInfo($usr_id);
1786 $tmp_data[
'notification'] = $this->
object->getMembersObject()->isNotificationEnabled($usr_id) ? 1 : 0;
1787 $tmp_data[
'blocked'] = $this->
object->getMembersObject()->isBlocked($usr_id) ? 1 : 0;
1789 $tmp_data[
'contact'] = $this->
object->getMembersObject()->isContact($usr_id) ? 1 : 0;
1792 $tmp_data[
'usr_id'] = $usr_id;
1794 if ($this->show_tracking) {
1795 if (in_array($usr_id, $completed)) {
1797 } elseif (in_array($usr_id, $in_progress)) {
1799 } elseif (in_array($usr_id,
$failed)) {
1806 if ($privacy->enabledCourseAccessTimes()) {
1807 if (isset($progress[$usr_id][
'ts']) and $progress[$usr_id][
'ts']) {
1808 $tmp_data[
'access_ut'] = $progress[$usr_id][
'ts'];
1811 $tmp_data[
'access_ut'] = 0;
1812 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
1817 $tmp_data[
'prtf'] = $all_prtf[$usr_id];
1820 $members[$usr_id] = $tmp_data;
1822 return $members ? $members : array();
1837 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1840 include_once
'./Services/Object/classes/class.ilObjectLP.php';
1843 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
1844 $marks =
new ilLPMarks($this->object->getId(), $a_member_id);
1847 if ($marks->getCompleted() != $a_has_passed) {
1848 $marks->setCompleted($a_has_passed);
1852 include_once(
"./Modules/Course/classes/class.ilCourseAppEventListener.php");
1855 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
1872 if ($this->object->isSubscriptionMembershipLimited() and $this->object->getSubscriptionMaxMembers() and
1873 $this->object->getSubscriptionMaxMembers() <= $this->object->getMembersObject()->getCountMembers()) {
1879 if ($number = $this->object->getMembersObject()->autoFillSubscribers()) {
1880 ilUtil::sendSuccess($this->lng->txt(
"crs_number_users_added") .
" " . $number);
1897 if ($this->object->getMembersObject()->isLastAdmin(
$ilUser->getId())) {
1903 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
1905 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
1907 $cgui->setHeaderText($this->lng->txt(
'crs_unsubscribe_sure'));
1908 $cgui->setFormAction($this->ctrl->getFormAction($this));
1909 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancel");
1910 $cgui->setConfirm($this->lng->txt(
"crs_unsubscribe"),
"performUnsubscribe");
1911 $this->tpl->setContent($cgui->getHTML());
1931 $this->
object->getMembersObject()->delete($this->
ilias->account->getId());
1932 $this->
object->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->
ilias->account->getId());
1933 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNSUBSCRIBE,
$ilUser->getId());
1935 ilUtil::sendSuccess($this->lng->txt(
'crs_unsubscribed_from_crs'),
true);
1937 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->tree->getParentId($this->ref_id));
1938 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1946 if (
$GLOBALS[
'DIC'][
'ilAccess']->checkAccess(
'visible',
'', $this->ref_id)) {
1947 $GLOBALS[
'DIC'][
'ilTabs']->addTarget(
1949 $this->ctrl->getLinkTargetByClass(
1950 array(
"ilobjcoursegui",
"ilinfoscreengui"),
1956 if (
$GLOBALS[
'DIC'][
'ilAccess']->checkAccess(
'leave',
'', $this->object->getRefId()) and $this->object->getMemberObject()->isMember()) {
1957 $GLOBALS[
'DIC'][
'ilTabs']->addTarget(
1959 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
1974 $this->tabs_gui->addTab(
1976 $this->lng->txt(
"content"),
1977 $this->ctrl->getLinkTarget($this,
"view")
1990 $ilHelp =
$DIC[
'ilHelp'];
1992 $ilAccess =
$GLOBALS[
'DIC']->access();
1994 $ilHelp->setScreenIdComponent(
"crs");
1996 $this->ctrl->setParameter($this,
"ref_id", $this->ref_id);
1998 if ($ilAccess->checkAccess(
'read',
'', $this->ref_id)) {
2000 $this->tabs_gui->activateTab(
'view_content');
2001 if ($this->object->isNewsTimelineEffective()) {
2002 if (!$this->object->isNewsTimelineLandingPageEffective()) {
2005 $this->tabs_gui->addTab(
2007 $lng->txt(
"cont_news_timeline_tab"),
2008 $this->ctrl->getLinkTargetByClass(
"ilnewstimelinegui",
"show")
2010 if ($this->object->isNewsTimelineLandingPageEffective()) {
2019 $ilAccess->checkAccess(
'write',
'', $this->ref_id)
2021 $this->tabs->addTab(
2023 $lng->txt(
'timings_timings'),
2024 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'manageTimings')
2028 $this->object->getMemberObject()->isParticipant() and
2029 $ilAccess->checkAccess(
'read',
'', $this->ref_id)) {
2030 $this->tabs->addTab(
2032 $lng->txt(
'timings_timings'),
2033 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'managePersonalTimings')
2040 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2041 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
2043 $this->tabs_gui->addTarget(
2045 $this->ctrl->getLinkTargetByClass(
'illoeditorgui',
''),
2052 $ilAccess->checkAccess(
'visible',
'', $this->ref_id) ||
2053 $ilAccess->checkAccess(
'join',
'', $this->ref_id) ||
2054 $ilAccess->checkAccess(
'read',
'', $this->ref_id)
2061 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilinfoscreengui"
2062 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
2065 $this->tabs_gui->addTarget(
2067 $this->ctrl->getLinkTargetByClass(
2068 array(
"ilobjcoursegui",
"ilinfoscreengui"),
2077 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2078 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilconditionhandlergui"
2079 &&
$_GET[
"item_id"] ==
"")
2082 $this->tabs_gui->addTarget(
2084 $this->ctrl->getLinkTarget($this,
"edit"),
2085 array(
"edit",
"editMapSettings",
"editCourseIcons",
"listStructure"),
2094 include_once
'./Services/Mail/classes/class.ilMail.php';
2097 include_once
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
2099 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
2102 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2103 include_once
'Services/Badge/classes/class.ilBadgeHandler.php';
2105 $this->tabs_gui->addTarget(
2106 "obj_tool_setting_badges",
2107 $this->ctrl->getLinkTargetByClass(
"ilbadgemanagementgui",
""),
2109 "ilbadgemanagementgui"
2115 include_once(
"./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
2117 $this->object->getId(),
2122 if ($skmg_set->get(
"enable_skmg")) {
2123 $this->tabs_gui->addTarget(
2124 "obj_tool_setting_skills",
2125 $this->ctrl->getLinkTargetByClass(array(
"ilcontainerskillgui",
"ilcontskillpresentationgui"),
""),
2127 array(
"ilcontainerskillgui",
"ilcontskillpresentationgui",
"ilcontskilladmingui")
2133 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2135 $this->tabs_gui->addTarget(
2136 'learning_progress',
2137 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
2139 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
2144 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2145 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
2147 $mdtab = $mdgui->getTab();
2149 $this->tabs_gui->addTarget(
2153 "ilobjectmetadatagui"
2158 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2159 $this->tabs_gui->addTarget(
2161 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
2167 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)) {
2168 $this->tabs_gui->addTarget(
2170 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
2171 array(
"perm",
"info",
"owner"),
2177 if ($ilAccess->checkAccess(
'join',
'', $this->ref_id)
2178 and !$this->object->getMemberObject()->isAssigned()) {
2179 include_once
'./Modules/Course/classes/class.ilCourseWaitingList.php';
2181 $this->tabs_gui->addTab(
2183 $this->lng->txt(
'membership_leave'),
2184 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
2187 $this->tabs_gui->addTarget(
2189 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
"show"),
2195 if ($ilAccess->checkAccess(
'leave',
'', $this->object->getRefId())
2196 and $this->object->getMemberObject()->isMember()) {
2197 $this->tabs_gui->addTarget(
2199 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
2213 $ilAccess =
$DIC[
'ilAccess'];
2215 $ilTabs =
$DIC[
'ilTabs'];
2216 $ilNavigationHistory =
$DIC[
'ilNavigationHistory'];
2218 $ilToolbar =
$DIC[
'ilToolbar'];
2220 $next_class = $this->ctrl->getNextClass($this);
2221 $cmd = $this->ctrl->getCmd();
2230 $ilAccess->checkAccess(
'read',
'',
$_GET[
'ref_id'])) {
2231 include_once(
"./Services/Link/classes/class.ilLink.php");
2232 $ilNavigationHistory->addItem(
2239 $header_action =
true;
2240 switch ($next_class) {
2241 case 'illtiproviderobjectsettinggui':
2244 $this->tabs_gui->activateTab(
'settings');
2245 $this->tabs_gui->activateSubTab(
'lti_provider');
2247 $lti_gui->setCustomRolesForSelection(
$GLOBALS[
'DIC']->rbac()->review()->
getLocalRoles($this->object->getRefId()));
2248 $lti_gui->offerLTIRolesForSelection(
false);
2249 $this->ctrl->forwardCommand($lti_gui);
2252 case 'ilcoursemembershipgui':
2254 $this->tabs_gui->activateTab(
'members');
2256 include_once
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
2258 $this->ctrl->forwardCommand($mem_gui);
2261 case "ilinfoscreengui":
2265 case 'ilobjectmetadatagui':
2266 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2267 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
2269 $this->tabs_gui->setTabActive(
'meta_data');
2270 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
2272 $this->ctrl->forwardCommand($md_gui);
2275 case 'ilcourseregistrationgui':
2276 $this->ctrl->setReturn($this,
'');
2277 $this->tabs_gui->setTabActive(
'join');
2278 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2280 $this->ctrl->forwardCommand($registration);
2283 case 'ilobjectcustomuserfieldsgui':
2284 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
2287 $this->tabs_gui->activateTab(
'settings');
2288 $this->tabs_gui->activateSubTab(
'crs_custom_user_fields');
2289 $this->ctrl->forwardCommand($cdf_gui);
2292 case "ilcourseobjectivesgui":
2293 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2295 $this->ctrl->setReturn($this,
"");
2297 $ret = &$this->ctrl->forwardCommand($reg_gui);
2300 case 'ilobjcoursegroupinggui':
2301 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
2303 $this->ctrl->setReturn($this,
'edit');
2305 $this->tabs_gui->activateTab(
'settings');
2306 $this->tabs_gui->activateSubTab(
'groupings');
2308 $this->ctrl->forwardCommand($crs_grp_gui);
2312 case "ilpropertyformgui":
2315 $this->ctrl->forwardCommand(
$form);
2319 $this->tabs_gui->setTabActive(
'none');
2329 case "ilconditionhandlergui":
2330 include_once
'./Services/Conditions/classes/class.ilConditionHandlerGUI.php';
2333 $this->tabs_gui->activateTab(
'settings');
2334 $this->tabs_gui->activateSubTab(
'preconditions');
2336 $this->ctrl->forwardCommand($new_gui);
2339 case "illearningprogressgui":
2340 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
2344 $this->object->getRefId(),
2347 $this->ctrl->forwardCommand($new_gui);
2348 $this->tabs_gui->setTabActive(
'learning_progress');
2351 case 'ilpermissiongui':
2352 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
2353 $this->tabs_gui->setTabActive(
'perm_settings');
2355 $ret = &$this->ctrl->forwardCommand($perm_gui);
2358 case 'ilcalendarpresentationgui':
2359 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
2361 $ret = $this->ctrl->forwardCommand($cal);
2362 $header_action =
false;
2365 case 'ilcoursecontentinterface':
2367 $this->initCourseContentInterface();
2368 $this->cci_obj->cci_setContainer($this);
2370 $this->ctrl->forwardCommand($this->cci_obj);
2372 $this->tabs_gui->setTabActive(
'content');
2375 case 'ilcoursecontentgui':
2376 $this->ctrl->setReturn($this,
'members');
2377 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
2379 $this->ctrl->forwardCommand($course_content_obj);
2382 case 'ilpublicuserprofilegui':
2383 $this->tpl->enableDragDropFileUpload(
null);
2384 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
2386 $this->tabs_gui->setTabActive(
'members');
2388 $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass([
"ilCourseMembershipGUI",
"ilUsersGalleryGUI"],
'view'));
2389 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
2390 $html = $this->ctrl->forwardCommand($profile_gui);
2391 $this->tpl->setVariable(
"ADM_CONTENT",
$html);
2395 case 'ilmemberagreementgui':
2396 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
2397 $this->tabs_gui->clearTargets();
2399 $this->ctrl->setReturn($this,
'');
2401 $this->ctrl->forwardCommand($agreement);
2406 case "ilcontainerpagegui":
2409 $this->tpl->setContent(
$ret);
2413 case "ilcontainerstartobjectspagegui":
2415 include_once
"Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
2417 $ret = $this->ctrl->forwardCommand($pgui);
2419 $this->tpl->setContent(
$ret);
2423 case 'ilobjectcopygui':
2424 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
2426 $cp->setType(
'crs');
2427 $this->ctrl->forwardCommand($cp);
2430 case "ilobjstylesheetgui":
2436 $this->tabs_gui->setTabActive(
'export');
2437 include_once
'./Services/Export/classes/class.ilExportGUI.php';
2439 $exp->addFormat(
'xml');
2440 $this->ctrl->forwardCommand($exp);
2443 case "ilcommonactiondispatchergui":
2444 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
2446 $this->ctrl->forwardCommand($gui);
2449 case 'ildidactictemplategui':
2450 $this->ctrl->setReturn($this,
'edit');
2451 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
2453 $this->ctrl->forwardCommand($did);
2456 case "ilcertificategui":
2457 $this->tabs_gui->activateTab(
"settings");
2459 $this->tabs_gui->activateSubTab(
'certificate');
2462 $output_gui = $guiFactory->create($this->
object);
2463 $this->ctrl->forwardCommand($output_gui);
2466 case 'ilobjectservicesettingsgui':
2467 $this->ctrl->setReturn($this,
'edit');
2469 $this->tabs_gui->activateTab(
'settings');
2470 $this->tabs_gui->acltivateSubTab(
'tool_settings');
2472 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2475 $this->object->getId(),
2480 $this->ctrl->forwardCommand($service);
2483 case 'illoeditorgui':
2484 #$this->tabs_gui->clearTargets();
2485 #$this->tabs_gui->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,''));
2486 $this->tabs_gui->activateTab(
'crs_objectives');
2488 include_once
'./Modules/Course/classes/Objectives/class.ilLOEditorGUI.php';
2490 $this->ctrl->forwardCommand(
$editor);
2493 case 'ilcontainerstartobjectsgui':
2494 $this->ctrl->setReturn($this,
'edit');
2495 $this->tabs_gui->clearTargets();
2496 $this->tabs_gui->setBackTarget(
2497 $this->lng->txt(
"back_to_crs_content"),
2498 $this->ctrl->getLinkTarget($this,
"edit")
2500 $this->tabs_gui->addTab(
2502 $this->lng->txt(
"crs_start_objects"),
2503 $this->ctrl->getLinkTargetByClass(
"ilcontainerstartobjectsgui",
"listStructure")
2507 $ilHelp =
$DIC[
'ilHelp'];
2508 $ilHelp->setScreenIdComponent(
"crs");
2510 include_once
'./Services/Container/classes/class.ilContainerStartObjectsGUI.php';
2512 $this->ctrl->forwardCommand($stgui);
2515 case 'illomembertestresultgui':
2516 include_once
'./Modules/Course/classes/Objectives/class.ilLOMemberTestResultGUI.php';
2517 $GLOBALS[
'DIC'][
'ilCtrl']->setReturn($this,
'members');
2518 $GLOBALS[
'DIC'][
'ilTabs']->clearTargets();
2519 $GLOBALS[
'DIC'][
'ilTabs']->setBackTarget(
2520 $GLOBALS[
'DIC'][
'lng']->txt(
'back'),
2521 $GLOBALS[
'DIC'][
'ilCtrl']->getLinkTarget($this,
'members')
2525 $this->ctrl->forwardCommand($result_view);
2528 case 'ilmailmembersearchgui':
2529 include_once
'Services/Mail/classes/class.ilMail.php';
2534 $ilAccess->checkAccess(
'manage_members',
"", $this->object->getRefId())) &&
2535 $rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
2536 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),
$ilErr->MESSAGE);
2539 $this->tabs_gui->setTabActive(
'members');
2541 include_once
'./Services/Contact/classes/class.ilMailMemberSearchGUI.php';
2542 include_once
'./Services/Contact/classes/class.ilMailMemberCourseRoles.php';
2545 $mail_search->setObjParticipants(
2548 $this->ctrl->forwardCommand($mail_search);
2551 case 'ilbadgemanagementgui':
2552 $this->tabs_gui->setTabActive(
'obj_tool_setting_badges');
2553 include_once
'Services/Badge/classes/class.ilBadgeManagementGUI.php';
2555 $this->ctrl->forwardCommand($bgui);
2558 case "ilcontainernewssettingsgui":
2560 $this->tabs_gui->activateTab(
'settings');
2561 $this->tabs_gui->activateSubTab(
'obj_news_settings');
2563 $news_set_gui->setTimeline(
true);
2564 $news_set_gui->setCronNotifications(
true);
2565 $news_set_gui->setHideByDate(
true);
2566 $this->ctrl->forwardCommand($news_set_gui);
2569 case "ilnewstimelinegui":
2570 $this->tabs_gui->setTabActive(
'news_timeline');
2571 include_once(
"./Services/News/classes/class.ilNewsTimelineGUI.php");
2573 $t->setUserEditAll($ilAccess->checkAccess(
'write',
'', $this->object->getRefId(),
'grp'));
2575 $this->ctrl->forwardCommand(
$t);
2576 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
2579 $this->object->getId(),
2580 $this->object->getRefId(),
2585 case 'ilmemberexportsettingsgui':
2587 $this->tabs_gui->activateTab(
'properties');
2588 $this->tabs_gui->activateSubTab(
'export_members');
2589 include_once
'./Services/Membership/classes/Export/class.ilMemberExportSettingsGUI.php';
2591 $this->ctrl->forwardCommand($settings_gui);
2595 case "ilcontainerskillgui":
2596 $this->tabs_gui->activateTab(
'obj_tool_setting_skills');
2597 include_once(
"./Services/Container/Skills/classes/class.ilContainerSkillGUI.php");
2599 $this->ctrl->forwardCommand($gui);
2603 case 'ilobjecttranslationgui':
2606 $this->tabs_gui->activateTab(
"settings");
2607 $this->tabs_gui->activateSubTab(
"obj_multilinguality");
2608 include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
2610 $this->ctrl->forwardCommand($transgui);
2627 if ($cmd ==
'infoScreenGoto') {
2632 $cmd =
'infoScreen';
2636 if (!$this->creation_mode) {
2637 if ($cmd ==
"infoScreen") {
2645 if (!$this->creation_mode
2646 && $cmd !=
'infoScreen'
2647 && $cmd !=
'sendfile'
2648 && $cmd !=
'unsubscribe'
2649 && $cmd !=
'deliverCertificate'
2650 && $cmd !=
'performUnsubscribe'
2651 && !$ilAccess->checkAccess(
"read",
'', $this->object->getRefId())
2653 || $cmd ==
'subscribe') {
2654 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
2655 if (
$rbacsystem->checkAccess(
'join', $this->object->getRefId()) &&
2657 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2658 $this->ctrl->redirectByClass(
"ilCourseRegistrationGUI");
2665 if ($cmd ==
'listObjectives') {
2666 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2668 $this->ctrl->setReturn($this,
"");
2670 $ret = &$this->ctrl->forwardCommand($obj_gui);
2678 if ($cmd ==
"" && $this->object->isNewsTimelineLandingPageEffective()) {
2679 $this->ctrl->redirectbyclass(
"ilnewstimelinegui");
2691 if ($header_action) {
2709 $ilAccess =
$DIC[
'ilAccess'];
2711 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2716 if (!$this->object->getMemberObject()->isAssigned()) {
2720 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
2725 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2726 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
2732 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': Missing course confirmation.');
2736 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
2738 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': Missing required fields');
2747 return array(
"ilCourseRegisterGUI",
'ilConditionHandlerGUI');
2754 $ilLocator =
$DIC[
'ilLocator'];
2755 switch ($this->ctrl->getCmd()) {
2757 #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
2767 $GLOBALS[
'DIC'][
'ilCtrl']->redirectByClass(
'ilcoursemembershipgui');
2773 public static function _goto($a_target, $a_add =
"")
2777 $ilAccess =
$DIC[
'ilAccess'];
2782 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2783 if (substr($a_add, 0, 5) ==
'rcode') {
2784 if (
$ilUser->getId() == ANONYMOUS_USER_ID) {
2787 "login.php?target=" .
$_GET[
"target"] .
"&cmd=force_login&lang=" .
2800 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"manage_members",
"", $a_target)) {
2804 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2808 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
2811 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
2813 $lng->txt(
"msg_no_perm_read_item"),
2834 $ilAccess =
$DIC[
'ilAccess'];
2837 $this->tabs_gui->activateTab(
'settings');
2838 $this->tabs_gui->activateSubTab(
'crs_map_settings');
2841 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
2845 $latitude = $this->
object->getLatitude();
2846 $longitude = $this->
object->getLongitude();
2847 $zoom = $this->
object->getLocationZoom();
2850 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
2852 $latitude =
$def[
"latitude"];
2853 $longitude =
$def[
"longitude"];
2854 $zoom =
$def[
"zoom"];
2857 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2861 $form->setTitle($this->lng->txt(
"crs_map_settings"));
2865 $this->lng->txt(
"crs_enable_map"),
2868 $public->setValue(
"1");
2869 $public->setChecked($this->object->getEnableCourseMap());
2870 $form->addItem($public);
2874 $this->lng->txt(
"crs_map_location"),
2877 $loc_prop->setLatitude($latitude);
2878 $loc_prop->setLongitude($longitude);
2879 $loc_prop->setZoom($zoom);
2880 $form->addItem($loc_prop);
2882 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
2884 $this->tpl->setVariable(
"ADM_CONTENT",
$form->getHTML());
2899 $this->
object->update();
2901 $ilCtrl->redirect($this,
"editMapSettings");
2916 'ilcoursecontentgui',
2919 $this->object->getAboStatus(),
2920 $this->object->getRefId(),
2921 $this->object->getId()
2936 $a_parent_ref_id = 0
2941 $ilAccess =
$DIC[
'ilAccess'];
2944 if ($a_parent_ref_id == 0) {
2945 $a_parent_ref_id = $a_course_ref_id;
2949 if ($a_item_data[
'type'] ==
'tst' and
2951 $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));
2954 $a_item_list_gui->enableSubscribe($a_abo_status);
2956 $is_tutor = ($ilAccess->checkAccess(
2964 if ($a_show_path and $is_tutor) {
2965 $a_item_list_gui->addCustomProperty(
2967 ilContainer::_buildPath($a_item_data[
'ref_id'], $a_course_ref_id),
2981 $ilAccess =
$DIC[
'ilAccess'];
2985 if ($this->object->getType() !=
'crs') {
2988 if (!$ilAccess->checkAccess(
2991 $this->object->getRefId(),
2993 $this->object->getId()
2997 if ($this->object->enabledObjectiveView()) {
3008 if (!
$_SESSION[
'crs_timings_panel'][$this->object->getId()] or 1) {
3010 $this->tabs_gui->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"view"));
3012 $this->tabs_gui->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"disableAdministrationPanel"));
3037 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
3040 if (is_array(
$_POST[$a_field][
'date'])) {
3041 $dt[
'year'] = (int)
$_POST[$a_field][
'date'][
'y'];
3042 $dt[
'mon'] = (int)
$_POST[$a_field][
'date'][
'm'];
3043 $dt[
'mday'] = (int)
$_POST[$a_field][
'date'][
'd'];
3044 $dt[
'hours'] = (int)
$_POST[$a_field][
'time'][
'h'];
3045 $dt[
'minutes'] = (int)
$_POST[$a_field][
'time'][
'm'];
3046 $dt[
'seconds'] = (int)
$_POST[$a_field][
'time'][
's'];
3048 $date = date_parse(
$_POST[$a_field][
'date'] .
" " .
$_POST[$a_field][
'time']);
3049 $dt[
'year'] = (int) $date[
'year'];
3050 $dt[
'mon'] = (int) $date[
'month'];
3051 $dt[
'mday'] = (int) $date[
'day'];
3052 $dt[
'hours'] = (int) $date[
'hour'];
3053 $dt[
'minutes'] = (int) $date[
'minute'];
3054 $dt[
'seconds'] = (int) $date[
'second'];
3072 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
3074 $confirm->setFormAction($this->ctrl->getFormAction($this));
3075 $confirm->setConfirm($this->lng->txt(
'reset'),
'reset');
3076 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
3078 $GLOBALS[
'DIC'][
'tpl']->setContent($confirm->getHTML());
3088 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3090 $usr_results->delete();
3093 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestRun.php';
3094 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
3096 $this->object->getId(),
3100 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
3103 $tmp_obj_res->reset($this->object->getId());
3105 $ilUser->deletePref(
'crs_objectives_force_details_' . $this->object->getId());
3107 ilUtil::sendSuccess($this->lng->txt(
'crs_objectives_reseted'));
3115 $ilAccess =
$DIC[
'ilAccess'];
3118 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
3122 include_once
'./Services/Container/classes/class.ilContainerStartObjects.php';
3124 $this->object->getRefId(),
3125 $this->object->getId()
3127 if (count($this->start_obj->getStartObjects()) &&
3128 !$this->start_obj->allFullfilled(
$ilUser->getId())) {
3145 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
3147 if (
$settings->isActive() and
$settings->getContainer() != $this->object->getRefId()) {
3148 $settings->setContainer($this->object->getRefId());
3152 parent::prepareOutput($a_show_subobjects);
3161 $link = chr(13) . chr(10) . chr(13) . chr(10);
3162 $link .= $this->lng->txt(
'crs_mail_permanent_link');
3163 $link .= chr(13) . chr(10) . chr(13) . chr(10);
3164 include_once
'./Services/Link/classes/class.ilLink.php';
3166 return rawurlencode(base64_encode($link));
3175 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3181 if (
true === $validator->isCertificateDownloadable(
$ilUser->getId(), $this->object->getId())) {
3182 $cert_url = $this->ctrl->getLinkTarget($this,
"deliverCertificate");
3184 $this->lng->loadLanguageModule(
"certificate");
3185 $lg->addCustomCommand($cert_url,
"download_certificate");
3190 $this->lng->txt(
"download_certificate"),
3198 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
3201 if (!$noti->isCurrentUserActive()) {
3205 $this->lng->txt(
"crs_notification_deactivated")
3208 $this->ctrl->setParameter($this,
"crs_ntf", 1);
3209 $caption =
"crs_activate_notification";
3214 $this->lng->txt(
"crs_notification_activated")
3217 $this->ctrl->setParameter($this,
"crs_ntf", 0);
3218 $caption =
"crs_deactivate_notification";
3221 if ($noti->canCurrentUserEdit()) {
3222 $lg->addCustomCommand(
3223 $this->ctrl->getLinkTarget($this,
"saveNotification"),
3228 $this->ctrl->setParameter($this,
"crs_ntf",
"");
3240 $ilAccess =
$DIC[
'ilAccess'];
3243 if ($ilAccess->checkAccess(
'manage_members',
'', $this->ref_id)) {
3244 $user_id = $_REQUEST[
"member_id"];
3250 $objId = (int) $this->object->getId();
3254 if (
false === $validator->isCertificateDownloadable($user_id, $objId)) {
3256 $this->ctrl->redirect($this);
3261 $certLogger =
$DIC->logger()->cert();
3268 $this->lng->txt(
'error_creating_certificate_pdf')
3271 $pdfAction->downloadPdf((
int) $user_id, $objId);
3277 $this->ctrl->redirectByClass(array(
'ilrepositorygui',
'ilobjcoursegui',
'illoeditorgui'),
'materials');
3282 if (isset(
$_POST[
'position'][
"lobj"])) {
3283 $lobj =
$_POST[
'position'][
"lobj"];
3284 unset(
$_POST[
'position'][
"lobj"]);
3286 $objective_order = array();
3287 foreach ($lobj as $objective_id => $materials) {
3288 $objective_order[$objective_id] = $materials[0];
3289 unset($lobj[$objective_id][0]);
3293 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
3294 asort($objective_order);
3296 foreach (array_keys($objective_order) as $objective_id) {
3298 $obj->writePosition(++$pos);
3302 include_once
"Modules/Course/classes/class.ilCourseObjectiveMaterials.php";
3303 foreach ($lobj as $objective_id => $materials) {
3308 foreach (array_keys($materials) as $ass_id) {
3309 $objmat->writePosition($ass_id, ++$pos);
3314 return parent::saveSortingObject();
3323 include_once
'./Services/Link/classes/class.ilLink.php';
3333 $objective_id = (int) $_REQUEST[
'objective_id'];
3334 $test_id = (int) $_REQUEST[
'tid'];
3336 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3337 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
3338 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
3342 $this->object->getId(),
3345 $passed =
$res->getCompletedObjectiveIds();
3347 $has_completed =
false;
3348 if ($objective_id) {
3349 $objective_ids = array($objective_id);
3350 if (in_array($objective_id, $passed)) {
3351 $has_completed =
true;
3355 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
3359 if (count($objective_ids) == count($passed)) {
3360 $has_completed =
true;
3365 if ($has_completed) {
3371 include_once
'./Services/Link/classes/class.ilLink.php';
3383 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
3387 if ($a_objective_id) {
3388 $question = $this->lng->txt(
'crs_loc_objective_passed_confirmation');
3390 $question = $this->lng->txt(
'crs_loc_objectives_passed_confirmation');
3393 $confirm->addHiddenItem(
'objective_id', $a_objective_id);
3394 $confirm->addHiddenItem(
'tid', $a_test_id);
3395 $confirm->setConfirm($this->lng->txt(
'crs_loc_tst_start'),
'redirectLocToTestConfirmed');
3396 $confirm->setCancel($this->lng->txt(
'cancel'),
'view');
3400 $GLOBALS[
'DIC'][
'tpl']->setContent($confirm->getHTML());
3413 $crs_admin = $this->
object->getDefaultAdminRole();
3414 $crs_member = $this->
object->getDefaultMemberRole();
3415 $local_roles = $this->
object->getLocalCourseRoles(
false);
3416 $crs_roles = array();
3419 if (in_array($crs_member, $local_roles)) {
3420 #$crs_roles[$crs_member] = ilObjRole::_getTranslation(array_search ($crs_member, $local_roles));
3421 #unset($local_roles[$crs_roles[$crs_member]]);
3424 foreach ($local_roles as
$title => $role_id) {
3432 if (count($a_exclude) > 0) {
3433 foreach ($a_exclude as $excluded_role) {
3434 if (isset($crs_roles[$excluded_role])) {
3435 unset($crs_roles[$excluded_role]);
3461 $this->ctrl->redirectByClass(
'ilUsersGalleryGUI');
3469 $this->ctrl->setReturn($this,
"view");
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.
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.
static getInstance()
Get instance.
Membership notification settings.
static isActive()
Is feature active?
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 information screen
setShowHidePrefs()
set preferences (show/hide tabel content)
jump2UsersGalleryObject()
unsubscribeObject()
DEPRECATED?
confirmDeleteInfoFilesObject()
show info file donfimation table
editObject(ilPropertyFormGUI $form=null)
edit object
viewObject()
list childs of current object
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.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
Class ilPdfGeneratorConstantsTest.
redirection script todo: (a better solution should control the processing via a xml file)
if(isset($_POST['submit'])) $form
foreach($_POST as $key=> $value) $res