19declare(strict_types=0);
62 public function __construct($a_data,
int $a_id,
bool $a_call_by_reference =
true,
bool $a_prepare_output =
true)
69 $this->
help = $DIC->help();
70 $this->
logger = $DIC->logger()->crs();
71 $this->navigation_history =
$DIC[
'ilNavigationHistory'];
72 $this->
ctrl->saveParameter($this, [
'ref_id']);
73 $this->
lng->loadLanguageModule(
'crs');
74 $this->
lng->loadLanguageModule(
'cert');
75 $this->
lng->loadLanguageModule(
'obj');
78 $this->news =
$DIC->news();
93 $part->updateNotification(
95 (
bool) $this->settings->get(
'mail_crs_admin_notification',
'1')
97 parent::afterImport($new_object);
107 if (strtolower($this->std_request->getBaseClass()) ===
"iladministrationgui") {
108 parent::viewObject();
112 $this->tabs_gui->setTabActive(
'view_content');
115 if (strtolower($this->std_request->getBaseClass()) ===
"iladministrationgui") {
116 parent::viewObject();
121 if ($this->
ctrl->getNextClass() !=
"ilcolumngui") {
123 $this->
user->getId(),
124 $this->object->getId(),
125 $this->object->getRefId(),
131 $this->
ctrl->redirectByClass(ilMemberAgreementGUI::class);
138 $stgui->enableDesktop($this->
object->getAboStatus(), $this);
150 parent::renderObject();
160 $this->tabs_gui->activateTab(
'view_content');
161 parent::deleteObject(
$error);
166 parent::renderObject();
177 $this->
ctrl->redirectByClass([
179 ilInfoScreenGUI::class
189 $this->tabs_gui->setTabActive(
'info_short');
193 $info->enablePrivateNotes();
194 $info->enableFeedback();
196 $info->enableBookingInfo(
true);
197 if ($this->
access->checkAccess(
"write",
"", $this->ref_id)) {
198 $info->enableNewsEditing();
202 strlen($this->
object->getImportantInformation()) ||
203 strlen($this->
object->getSyllabus()) ||
204 strlen((
string) $this->
object->getTargetGroup()) ||
206 $info->addSection($this->
lng->txt(
'crs_general_informations'));
209 if (strlen($this->
object->getImportantInformation())) {
211 $this->
lng->txt(
'crs_important_info'),
217 if (strlen($this->
object->getSyllabus())) {
218 $info->addProperty($this->
lng->txt(
'crs_syllabus'), nl2br(
222 if (strlen((
string) $this->
object->getTargetGroup())) {
224 $this->
lng->txt(
'crs_target_group'),
232 $tpl =
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'components/ILIAS/Course');
234 foreach ($files as $file) {
236 $this->
ctrl->setParameter($this,
'file_id', $file->getFileId());
245 $this->
lng->txt(
'crs_file_download'),
255 $info->addMetaDataSections($this->
object->getId(), 0, $this->object->getType());
258 if ($this->
object->hasContactData()) {
259 $info->addSection($this->
lng->txt(
"crs_contact"));
261 if (strlen($this->
object->getContactName())) {
263 $this->
lng->txt(
"crs_contact_name"),
264 $this->object->getContactName()
267 if (strlen($this->
object->getContactResponsibility())) {
269 $this->
lng->txt(
"crs_contact_responsibility"),
270 $this->object->getContactResponsibility()
273 if (strlen($this->
object->getContactPhone())) {
275 $this->
lng->txt(
"crs_contact_phone"),
276 $this->object->getContactPhone()
279 if ($this->
object->getContactEmail()) {
281 $has_mail_access = $this->rbacsystem->checkAccessOfUser(
282 $this->
user->getId(),
286 $emails = explode(
",", $this->
object->getContactEmail());
288 foreach ($emails as $email) {
289 $email = trim($email);
290 if (!$has_mail_access) {
291 $mailString .= $email .
"<br />";
294 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true,
'components/ILIAS/Course');
308 'ref_id' => $this->
object->getRefId(),
313 $etpl->setVariable(
"CONTACT_EMAIL", $email);
314 $mailString .= $etpl->get() .
"<br />";
316 $info->addProperty($this->
lng->txt(
"crs_contact_email"), $mailString);
318 if (strlen($this->
object->getContactConsultation())) {
320 $this->
lng->txt(
"crs_contact_consultation"),
321 nl2br($this->
object->getContactConsultation())
326 $conts =
$parts->getContacts();
328 $info->addSection($this->
lng->txt(
"crs_mem_contacts"));
329 foreach ($conts as
$c) {
331 $pgui->setBackUrl($this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
332 $pgui->setEmbedded(
true);
333 $info->addProperty(
"", $pgui->getHTML());
338 $info->enableAvailability(
false);
339 $this->
lng->loadLanguageModule(
"rep");
340 $info->addSection($this->
lng->txt(
"rep_activation_availability"));
341 $info->showLDAPRoleGroupMappingInfo();
344 $info->addAccessPeriodProperty();
347 switch ($this->
object->getSubscriptionLimitationType()) {
349 $txt = $this->
lng->txt(
"crs_info_reg_deactivated");
353 switch ($this->
object->getSubscriptionType()) {
355 $txt = $this->
lng->txt(
"crs_info_reg_confirmation");
358 $txt = $this->
lng->txt(
"crs_info_reg_direct");
361 $txt = $this->
lng->txt(
"crs_info_reg_password");
367 $info->addProperty($this->
lng->txt(
"crs_info_reg"),
$txt);
369 if ($this->
object->getSubscriptionUnlimitedStatus()) {
371 $this->
lng->txt(
"crs_reg_until"),
372 $this->lng->txt(
'crs_unlimited')
374 } elseif ($this->
object->getSubscriptionStart() < time()) {
376 $this->
lng->txt(
"crs_reg_until"),
377 $this->lng->txt(
'crs_to') .
' ' .
380 } elseif ($this->
object->getSubscriptionStart() > time()) {
382 $this->
lng->txt(
"crs_reg_until"),
383 $this->lng->txt(
'crs_from') .
' ' .
387 if ($this->
object->isSubscriptionMembershipLimited()) {
388 if ($this->
object->getSubscriptionMinMembers()) {
390 $this->
lng->txt(
"mem_min_users"),
391 $this->object->getSubscriptionMinMembers()
394 if ($this->
object->getSubscriptionMaxMembers()) {
397 $this->
lng->txt(
'mem_free_places'),
398 (
string) ($reg_info[
'reg_info_free_places'] ??
'0')
404 if ($this->
object->getCancellationEnd()) {
406 $this->
lng->txt(
'crs_cancellation_end'),
413 !$this->object->getCourseStart()->
isNull()
416 $this->
lng->txt(
'crs_period'),
418 $this->object->getCourseStart(),
419 $this->object->getCourseEnd()
430 $this->
lng->loadLanguageModule(
'ps');
431 $info->addSection($this->
lng->txt(
'crs_user_agreement_info'));
432 $info->addProperty($this->
lng->txt(
'ps_export_data'), $field_info->exportableFieldsToInfoString());
435 $info->addProperty($this->
lng->txt(
'ps_crs_user_fields'), $fields);
438 $info->enableLearningProgress(
true);
447 if ($noti->canCurrentUserEdit()) {
449 if ($this->
http->wrapper()->query()->has(
'crs_ntf')) {
450 $crs_ntf = $this->
http->wrapper()->query()->retrieve(
456 $noti->activateUser();
458 $noti->deactivateUser();
461 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
462 $this->
ctrl->redirect($this,
"");
469 $this->tabs_gui->setTabActive(
'settings');
470 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
475 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'components/ILIAS/Course');
476 $this->tpl->setVariable(
'INFO_TABLE', $a_form->getHTML());
482 foreach ($files as $file) {
483 $table_data[
'id'] = $file->getFileId();
484 $table_data[
'filename'] = $file->getFileName();
485 $table_data[
'filetype'] = $file->getFileType();
486 $table_data[
'filesize'] = $file->getFileSize();
488 $rows[] = $table_data;
491 $table_gui->setTitle($this->
lng->txt(
"crs_info_download"));
492 $table_gui->setData($rows);
493 $table_gui->addCommandButton(
"cancel", $this->
lng->txt(
"cancel"));
494 $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->
lng->txt(
"delete"));
495 $table_gui->setSelectAllCheckbox(
"file_id");
496 $this->tpl->setVariable(
'INFO_FILE_TABLE', $table_gui->getHTML());
502 if ($this->
http->wrapper()->post()->has(
'file_id')) {
503 $file_ids = $this->
http->wrapper()->post()->retrieve(
505 $this->
refinery->kindlyTo()->listOf(
506 $this->refinery->kindlyTo()->int()
510 if (count($file_ids) === 0) {
511 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
517 $this->tabs_gui->setTabActive(
'settings');
518 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
523 $c_gui->setFormAction($this->
ctrl->getFormAction($this,
"deleteInfoFiles"));
524 $c_gui->setHeaderText($this->
lng->txt(
"info_delete_sure"));
525 $c_gui->setCancel($this->
lng->txt(
"cancel"),
"editInfo");
526 $c_gui->setConfirm($this->
lng->txt(
"confirm"),
"deleteInfoFiles");
529 foreach ($file_ids as $file_id) {
531 $c_gui->addItem(
"file_id[]", $file_id, $file->getFileName());
533 $this->tpl->setContent($c_gui->getHTML());
539 if ($this->
http->wrapper()->post()->has(
'file_id')) {
540 $file_ids = $this->
http->wrapper()->post()->retrieve(
542 $this->
refinery->kindlyTo()->listOf(
543 $this->refinery->kindlyTo()->int()
548 if (count($file_ids) === 0) {
549 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
554 foreach ($file_ids as $file_id) {
556 if ($this->
object->getId() == $file->getCourseId()) {
560 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'));
574 $area->setValue($this->
object->getImportantInformation());
580 $area->setValue($this->
object->getSyllabus());
585 $tg = new \ilTextAreaInputGUI($this->
lng->txt(
'crs_target_group'),
'target_group');
586 $tg->setValue($this->
object->getTargetGroup() ??
"");
591 $section->setTitle($this->
lng->txt(
'crs_info_download'));
595 $file->enableFileNameSelection(
'file_name');
599 $section->setTitle($this->
lng->txt(
'crs_contact'));
603 $text->setValue($this->
object->getContactName());
605 $text->setMaxLength(70);
608 $text =
new ilTextInputGUI($this->
lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
609 $text->setValue($this->
object->getContactResponsibility());
611 $text->setMaxLength(70);
614 $text =
new ilTextInputGUI($this->
lng->txt(
'crs_contact_phone'),
'contact_phone');
615 $text->setValue($this->
object->getContactPhone());
617 $text->setMaxLength(40);
620 $text =
new ilTextInputGUI($this->
lng->txt(
'crs_contact_email'),
'contact_email');
621 $text->setValue($this->
object->getContactEmail());
622 $text->setInfo($this->
lng->txt(
'crs_contact_email_info'));
624 $text->setMaxLength(255);
628 $area->setValue($this->
object->getContactConsultation());
638 $this->record_gui->setPropertyForm(
$form);
639 $this->record_gui->parse();
652 $this->
object->setImportantInformation((
string)
$form->
getInput(
'important'));
653 $this->
object->setSyllabus((
string)
$form->
getInput(
'syllabus'));
654 $this->
object->setTargetGroup((
string)
$form->
getInput(
'target_group'));
655 $this->
object->setContactName((
string)
$form->
getInput(
'contact_name'));
656 $this->
object->setContactResponsibility((
string)
$form->
getInput(
'contact_responsibility'));
657 $this->
object->setContactPhone((
string)
$form->
getInput(
'contact_phone'));
658 $this->
object->setContactEmail((
string)
$form->
getInput(
'contact_email'));
659 $this->
object->setContactConsultation((
string)
$form->
getInput(
'contact_consultation'));
666 $file_obj->setCourseId($this->
object->getId());
667 $file_obj->setFileName((
string) $file_name);
668 $file_obj->setFileSize((
int) $file_info[
'size']);
669 $file_obj->setFileType((
string) $file_info[
'type']);
670 $file_obj->setTemporaryName((
string) $file_info[
'tmp_name']);
671 $file_obj->setErrorCode((
int) $file_info[
'error']);
674 $this->
error->setMessage(
'');
675 $file_obj->validate();
676 $this->
object->validateInfoSettings();
677 if (strlen($this->
error->getMessage())) {
680 if (!$this->record_gui->importEditFormPostValues()) {
685 $this->tpl->setOnScreenMessage(
'failure', $this->
error->getMessage());
691 $this->
object->update();
693 $this->record_gui->writeEditForm();
697 $ecs->handleContentUpdate();
699 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"crs_settings_saved"));
702 $this->tpl->setOnScreenMessage(
704 $this->
lng->txt(
'settings_saved')
718 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC']->
language()->txt(
'err_check_input'));
730 $min->setAlert($this->
lng->txt(
'crs_subscription_min_members_err'));
731 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC']->
language()->txt(
'err_check_input'));
740 $this->tpl->setOnScreenMessage(
742 $GLOBALS[
'DIC']->
language()->txt(
'crs_tile_and_objective_view_not_supported')
751 $this->tpl->setOnScreenMessage(
753 $GLOBALS[
'DIC']->
language()->txt(
'crs_tile_and_session_limit_not_supported')
767 $this->
object->setCoursePeriod(
768 $crs_period->getStart(),
769 $crs_period->getEnd()
774 if ($period->getStart() && $period->getEnd()) {
775 $this->
object->setActivationStart($period->getStart()->get(
IL_CAL_UNIX));
776 $this->
object->setActivationEnd($period->getEnd()->get(
IL_CAL_UNIX));
777 $this->
object->setActivationVisibility((
int)
$form->
getInput(
'activation_visibility'));
779 $this->
object->setActivationStart(0);
780 $this->
object->setActivationEnd(0);
784 $this->
object->setSubscriptionPassword(
$form->
getInput(
'subscription_password'));
785 $this->
object->setSubscriptionStart(0);
786 $this->
object->setSubscriptionEnd(0);
792 $this->
object->setSubscriptionType(
798 if ($sub_period->getStart() && $sub_period->getEnd()) {
800 $this->
object->setSubscriptionStart($sub_period->getStart()->get(
IL_CAL_UNIX));
801 $this->
object->setSubscriptionEnd($sub_period->getEnd()->get(
IL_CAL_UNIX));
807 $this->
object->setSubscriptionLimitationType(ilCourseConstants::IL_CRS_SUBSCRIPTION_DEACTIVATED);
811 $this->
object->enableRegistrationAccessCode((
bool)
$form->
getInput(
'reg_code_enabled'));
812 $this->
object->setRegistrationAccessCode(
$form->
getInput(
'reg_code'));
818 $this->
object->enableSubscriptionMembershipLimitation((
bool)
$form->
getInput(
'subscription_membership_limitation'));
819 $this->
object->setSubscriptionMaxMembers((
int)
$form->
getInput(
'subscription_max'));
820 $this->
object->setSubscriptionMinMembers((
int)
$form->
getInput(
'subscription_min'));
823 $this->
object->enableWaitingList(
true);
824 $this->
object->setWaitingListAutoFill(
true);
828 $this->
object->enableWaitingList(
true);
829 $this->
object->setWaitingListAutoFill(
false);
833 $this->
object->enableWaitingList(
false);
834 $this->
object->setWaitingListAutoFill(
false);
837 $this->
object->handleAutoFill();
839 $property_online = $this->
object->getObjectProperties()->getPropertyIsOnline();
840 $online =
$form->
getInput(
'activation_online') ? $property_online->withOnline() : $property_online->withOffline();
841 $this->
object->getObjectProperties()->storePropertyIsOnline($online);
843 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTitleIconVisibility();
844 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTopActionsVisibility();
846 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveIcon();
847 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTileImage();
850 $this->
object->setViewMode((
int)
$form->
getInput(
'view_mode'));
853 $this->
object->setTimingMode((
int)
$form->
getInput(
'timing_mode'));
855 $this->
object->setTimingMode((
int)
$form->
getInput(
'timing_mode'));
856 $this->
object->setOrderType((
int)
$form->
getInput(
'sorting'));
860 "\n\n\nValue: " . (
int)
$form->
getInput(
'tutorial_support_block_checkbox') .
"\n\n\n"
862 $this->
object->setTutorialSupportBlockSettingValue(
867 $this->
object->setShowMembers((
bool)
$form->
getInput(
'show_members'));
870 $this->
object->setShowMembersExport((
bool)
$form->
getInput(
'show_members_export'));
872 $this->
object->setMailToMembersType((
int)
$form->
getInput(
'mail_type'));
874 $this->
object->enableSessionLimit((
int)
$form->
getInput(
'sl'));
877 $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1);
879 $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1);
880 $this->
object->setAutoNotification(
$form->
getInput(
'auto_notification') == 1 ?
true :
false);
883 $show_lp_sync_confirmation =
false;
886 if ($this->
http->wrapper()->post()->has(
'status_dt')) {
887 $status_dt = $this->
http->wrapper()->post()->retrieve(
895 $show_lp_sync_confirmation =
true;
897 $this->
object->setStatusDetermination($status_dt);
901 $this->
object->update();
906 $this->getSubServices()
913 if ($show_lp_sync_confirmation) {
920 if (!$ecs->handleSettingsUpdate(
$form)) {
922 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC']->
language()->txt(
'err_check_input'));
931 !is_null($sub_period->getStart()) ||
932 !is_null($sub_period->getEnd())
935 $this->tpl->setOnScreenMessage(
937 $this->
lng->txt(
'crs_msg_no_self_registration_period_if_self_enrolment_disabled'),
941 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC']->
language()->txt(
'err_check_input'));
962 if ($this->news->isGloballyActivated()) {
972 $cgui->setFormAction($this->
ctrl->getFormAction($this,
"setLPSync"));
973 $cgui->setHeaderText($this->
lng->txt(
"crs_status_determination_sync"));
974 $cgui->setCancel($this->
lng->txt(
"cancel"),
"edit");
975 $cgui->setConfirm($this->
lng->txt(
"confirm"),
"setLPSync");
976 $this->tpl->setContent($cgui->getHTML());
982 $this->
object->update();
983 $this->
object->syncMembersStatusWithLP();
984 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
985 $this->
ctrl->redirect($this,
"edit");
991 $this->tabs_gui->setSubTabActive(
'general');
996 parent::editObject();
1023 $this->initFormTitleDescription(
$form);
1030 $this->
lng->loadLanguageModule(
'mem');
1031 $cdur->enableToggleFullTime(
1032 $this->
lng->txt(
'mem_period_without_time'),
1033 !$this->object->getCourseStartTimeIndication()
1035 $cdur->setShowTime(
true);
1036 $cdur->setInfo($this->
lng->txt(
'crs_period_info'));
1037 $cdur->setStart($this->
object->getCourseStart());
1038 $cdur->setEnd($this->
object->getCourseEnd());
1043 $this->
lng->loadLanguageModule(
'rep');
1046 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
1050 $online->setChecked(!$this->
object->getOfflineStatus());
1051 $online->setInfo($this->
lng->txt(
'crs_activation_online_info'));
1055 $dur->setShowTime(
true);
1061 $this->
lng->txt(
'rep_activation_limited_visibility'),
1062 'activation_visibility'
1064 $visible->setInfo($this->
lng->txt(
'crs_activation_limited_visibility_info'));
1065 $visible->setChecked((
bool) $this->
object->getActivationVisibility());
1066 $dur->addSubItem($visible);
1069 $section->setTitle($this->
lng->txt(
'crs_reg'));
1074 $sdur->setShowTime(
true);
1075 if ($this->
object->getSubscriptionStart()) {
1078 if ($this->
object->getSubscriptionEnd()) {
1083 $reg_proc->setValue(
1085 ? (
string) $this->object->getSubscriptionType()
1090 $this->
lng->txt(
'crs_subscription_options_direct'),
1091 (
string) ilCourseConstants::IL_CRS_SUBSCRIPTION_DIRECT
1093 $reg_proc->addOption($opt);
1096 $this->
lng->txt(
'crs_subscription_options_password'),
1100 $pass =
new ilTextInputGUI($this->
lng->txt(
"password"),
'subscription_password');
1101 $pass->setRequired(
true);
1102 $pass->setInfo($this->
lng->txt(
'crs_reg_password_info'));
1103 $pass->setSubmitFormOnEnter(
true);
1105 $pass->setMaxLength(32);
1106 $pass->setValue($this->
object->getSubscriptionPassword());
1108 $opt->addSubItem($pass);
1109 $reg_proc->addOption($opt);
1112 $this->
lng->txt(
'crs_subscription_options_confirmation'),
1115 $opt->setInfo($this->
lng->txt(
'crs_registration_confirmation_info'));
1116 $reg_proc->addOption($opt);
1119 $this->
lng->txt(
'crs_reg_selfreg'),
1122 $opt_self_enrollment_enabled->addSubItem($reg_proc);
1123 $opt_self_enrollment_enabled->addSubItem($sdur);
1125 $this->
lng->txt(
'crs_reg_no_selfreg'),
1128 $opt_self_enrollment_disabled->setInfo($this->
lng->txt(
'crs_registration_deactivated'));
1130 $this->
lng->txt(
'crs_registration_type'),
1131 'subscription_limitation_type'
1133 $reg_proc_subscription_reg_type->setValue(
1134 $this->
object->getSubscriptionLimitationType() !== ilCourseConstants::IL_CRS_SUBSCRIPTION_DEACTIVATED
1138 $reg_proc_subscription_reg_type->addOption($opt_self_enrollment_enabled);
1139 $reg_proc_subscription_reg_type->addOption($opt_self_enrollment_disabled);
1144 $reg_code->setChecked($this->
object->isRegistrationAccessCodeEnabled());
1145 $reg_code->setValue(
'1');
1146 $reg_code->setInfo($this->
lng->txt(
'crs_reg_code_enabled_info'));
1149 if (!$this->
object->getRegistrationAccessCode()) {
1153 $reg_link->setValue($this->
object->getRegistrationAccessCode());
1157 $val = ilLink::_getLink(
1158 $this->
object->getRefId(),
1159 $this->object->getType(),
1161 'rcode' . $this->
object->getRegistrationAccessCode()
1163 $link->setHtml(
'<span class="small">' . $val .
'</span>');
1164 $reg_code->addSubItem($link);
1170 $cancel->setInfo($this->
lng->txt(
'crs_cancellation_end_info'));
1171 $cancel_end = $this->
object->getCancellationEnd();
1173 $cancel->setDate($cancel_end);
1179 $this->
lng->txt(
'crs_subscription_max_members_short'),
1180 'subscription_membership_limitation'
1182 $lim->setInfo($this->
lng->txt(
'crs_subscription_max_members_short_info'));
1183 $lim->setValue((
string) 1);
1184 $lim->setChecked($this->
object->isSubscriptionMembershipLimited());
1187 $min->setSubmitFormOnEnter(
true);
1189 $min->setMaxLength(4);
1190 $min->setValue($this->
object->getSubscriptionMinMembers() ?:
'');
1191 $min->setTitle($this->
lng->txt(
'crs_subscription_min_members'));
1192 $min->setInfo($this->
lng->txt(
'crs_subscription_min_members_info'));
1193 $lim->addSubItem($min);
1196 $max->setSubmitFormOnEnter(
true);
1198 $max->setMaxLength(4);
1199 $max->setValue($this->
object->getSubscriptionMaxMembers() ?:
'');
1200 $max->setTitle($this->
lng->txt(
'crs_subscription_max_members'));
1201 $max->setInfo($this->
lng->txt(
'crs_reg_max_info'));
1203 $lim->addSubItem($max);
1207 $wait->addOption($option);
1209 $option =
new ilRadioOption($this->
lng->txt(
'crs_waiting_list_no_autofill'),
'1');
1210 $option->setInfo($this->
lng->txt(
'crs_wait_info'));
1211 $wait->addOption($option);
1213 $option =
new ilRadioOption($this->
lng->txt(
'crs_waiting_list_autofill'),
'2');
1214 $option->setInfo($this->
lng->txt(
'crs_waiting_list_autofill_info'));
1215 $wait->addOption($option);
1217 if ($this->
object->hasWaitingListAutoFill()) {
1218 $wait->setValue(
'2');
1219 } elseif ($this->
object->enabledWaitingList()) {
1220 $wait->setValue(
'1');
1222 $wait->setValue(
'0');
1224 $lim->addSubItem($wait);
1227 $pres->setTitle($this->
lng->txt(
'crs_view_mode'));
1232 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTitleIconVisibility();
1235 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTopActionsVisibility();
1238 if ($setting->get(
"rep_breadcr_crs") && $setting->get(
"rep_breadcr_crs_overwrite")) {
1239 $add = $setting->get(
"rep_breadcr_crs_default")
1240 ?
" (" . $this->
lng->txt(
"crs_breadcrumb_crs_only") .
")"
1241 :
" (" . $this->
lng->txt(
"crs_breadcrumb_full_path") .
")";
1243 self::BREADCRUMB_DEFAULT => $this->
lng->txt(
"crs_sys_default") . $add,
1244 self::BREADCRUMB_CRS_ONLY => $this->lng->txt(
"crs_breadcrumb_crs_only"),
1245 self::BREADCRUMB_FULL_PATH => $this->lng->txt(
"crs_breadcrumb_full_path")
1249 $si->setOptions($options);
1254 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addIcon();
1257 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTileImage();
1264 $view_type->setValue($this->
object->getViewMode());
1267 $this->
lng->txt(
'cntr_view_sessions'),
1270 $opts->setInfo($this->
lng->txt(
'cntr_view_info_sessions'));
1271 $view_type->addOption($opts);
1275 $sess->setValue(
'1');
1276 $sess->setChecked($this->
object->isSessionLimitEnabled());
1277 $sess->setInfo($this->
lng->txt(
'sess_limit_info'));
1280 #$prev->setSubmitFormOnEnter(true);
1281 $prev->setMinValue(0);
1283 $this->
object->getNumberOfPreviousSessions() == -1 ?
1285 $this->object->getNumberOfPreviousSessions()
1288 $prev->setMaxLength(3);
1289 $sess->addSubItem($prev);
1292 #$next->setSubmitFormOnEnter(true);
1293 $next->setMinValue(0);
1295 $this->
object->getNumberOfNextSessions() == -1 ?
1297 $this->object->getNumberOfnextSessions()
1300 $next->setMaxLength(3);
1301 $sess->addSubItem($next);
1303 $opts->addSubItem($sess);
1306 $optsi->setInfo($this->
lng->txt(
'cntr_view_info_simple'));
1307 $view_type->addOption($optsi);
1310 $this->
lng->txt(
'cntr_view_by_type'),
1313 $optbt->setInfo($this->
lng->txt(
'cntr_view_info_by_type'));
1314 $view_type->addOption($optbt);
1317 $this->
lng->txt(
'crs_view_objective'),
1320 $opto->setInfo($this->
lng->txt(
'crs_view_info_objective'));
1321 $view_type->addOption($opto);
1324 $optt->setInfo($this->
lng->txt(
'crs_view_info_timing'));
1328 $timing->setValue($this->
object->getTimingMode());
1331 $this->
lng->txt(
'crs_view_timing_absolute'),
1334 $absolute->setInfo($this->
lng->txt(
'crs_view_info_timing_absolute'));
1335 $timing->addOption($absolute);
1338 $this->
lng->txt(
'crs_view_timing_relative'),
1341 $relative->setInfo($this->
lng->txt(
'crs_view_info_timing_relative'));
1342 $timing->addOption($relative);
1344 $optt->addSubItem($timing);
1347 $view_type->addOption($optt);
1362 $this->
lng->txt(
'tutorial_support_block_setting_title'),
1363 'tutorial_support_block_checkbox'
1366 $tutorial_support_panel_checkbox->setChecked((
bool) $this->
object->getTutorialSupportBlockSettingValue());
1367 $tutorial_support_panel_checkbox->setInfo($this->
lng->txt(
'tutorial_support_block_byline'));
1373 if ($olp->getCurrentMode()) {
1375 $lp_status->setTitle($this->
lng->txt(
'crs_course_status_of_users'));
1380 $lp_status_options->setValue($this->
object->getStatusDetermination());
1383 $this->
lng->txt(
'crs_status_determination_lp'),
1385 $this->lng->txt(
'crs_status_determination_lp_info')
1387 $lp_status_options->addOption($lp_option);
1389 $this->
lng->txt(
'crs_status_determination_manual'),
1399 $feat->setTitle($this->
lng->txt(
'obj_features'));
1405 $this->getSubServices()
1409 $mem->setChecked($this->
object->getShowMembers());
1410 $mem->setInfo($this->
lng->txt(
'crs_show_members_info'));
1415 $part_list =
new ilCheckboxInputGUI($this->
lng->txt(
'crs_show_member_export'),
'show_members_export');
1416 $part_list->setChecked($this->
object->getShowMembersExport());
1417 $part_list->setInfo($this->
lng->txt(
'crs_show_member_export_info'));
1418 $mem->addSubItem($part_list);
1423 $mail_type->setValue($this->
object->getMailToMembersType());
1426 $this->
lng->txt(
'crs_mail_tutors_only'),
1428 $this->lng->txt(
'crs_mail_tutors_only_info')
1430 $mail_type->addOption($mail_tutors);
1433 $this->
lng->txt(
'crs_mail_all'),
1435 $this->lng->txt(
'crs_mail_all_info')
1437 $mail_type->addOption($mail_all);
1447 $not->setValue(
'1');
1448 $not->setInfo($this->
lng->txt(
'crs_auto_notification_info'));
1449 $not->setChecked($this->
object->getAutoNotification());
1453 $desk->setChecked($this->
object->getAboStatus());
1454 $desk->setInfo($this->
lng->txt(
'crs_add_remove_from_desktop_info'));
1459 $ecs->addSettingsToForm(
$form,
'crs');
1466 if ($this->
http->wrapper()->query()->has(
'file_id')) {
1467 $file_id = $this->
http->wrapper()->query()->retrieve(
1480 $this->tabs_gui->addSubTabTarget(
1482 $this->
ctrl->getLinkTarget($this,
'edit'),
1487 $this->tabs_gui->addSubTabTarget(
1488 "crs_info_settings",
1489 $this->
ctrl->getLinkTarget($this,
'editInfo'),
1494 $this->tabs_gui->addSubTabTarget(
1496 $this->
ctrl->getLinkTargetByClass(
'ilConditionHandlerGUI',
'listConditions'),
1498 "ilConditionHandlerGUI"
1501 $this->tabs_gui->addSubTabTarget(
1502 "crs_start_objects",
1503 $this->
ctrl->getLinkTargetByClass(
'ilContainerStartObjectsGUI',
'listStructure'),
1508 $this->tabs_gui->addSubTabTarget(
1510 $this->
ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1515 if ($lti_settings->hasSettingsAccess()) {
1516 $this->tabs_gui->addSubTabTarget(
1518 $this->
ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1524 $this->tabs_gui->addSubTabTarget(
1526 $this->
ctrl->getLinkTarget($this,
'editMapSettings'),
1534 $this->tabs_gui->addSubTabTarget(
1535 'crs_custom_user_fields',
1536 $this->
ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1538 'ilobjectcustomuserfieldsgui'
1544 if (
true === $validator->validate()) {
1545 $this->tabs_gui->addSubTabTarget(
1547 $this->
ctrl->getLinkTargetByClass(
"ilcertificategui",
"certificateeditor"),
1553 if ($this->
object->getUseNews()) {
1554 $this->tabs_gui->addSubTab(
1555 'obj_news_settings',
1556 $this->
lng->txt(
"cont_news_settings"),
1557 $this->ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
1560 if ($this->
object->getShowMembersExport()) {
1561 $this->tabs_gui->addSubTab(
1563 $this->
lng->txt(
'crs_show_member_export_settings'),
1564 $this->ctrl->getLinkTargetByClass(
'ilmemberexportsettingsgui',
'')
1567 $this->tabs_gui->addSubTabTarget(
1568 "obj_multilinguality",
1569 $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
""),
1571 TranslationGUI::class
1584 !$this->isActiveAdministrationPanel()) {
1594 foreach ($disabled_object_types as
$type) {
1595 unset($createble_object_types[
$type]);
1610 $new_object->getMemberObject()->updateNotification(
1611 $this->
user->getId(),
1612 $this->settings->get(
'mail_crs_admin_notification',
'1')
1614 $new_object->getMemberObject()->updateContact($this->
user->getId(), 1);
1621 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"crs_added"),
true);
1622 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
1625 $this->
ctrl->getLinkTarget($this,
"edit",
"")
1629 public function readMemberData(array $ids, ?array $selected_columns =
null,
bool $skip_names =
false): array
1636 if ($show_tracking) {
1638 $show_tracking = $olp->isActive();
1641 if ($show_tracking) {
1648 if ($privacy->enabledCourseAccessTimes()) {
1652 $do_prtf = (is_array($selected_columns) &&
1653 in_array(
'prtf', $selected_columns) &&
1658 $this->
ctrl->getLinkTarget($this,
"members")
1663 foreach ($ids as $usr_id) {
1673 $tmp_data[
'firstname'] = $name[
'firstname'];
1674 $tmp_data[
'lastname'] = $name[
'lastname'];
1675 $tmp_data[
'login'] = $name[
'login'];
1677 $tmp_data[
'passed'] = $this->
object->getMembersObject()->hasPassed($usr_id) ? 1 : 0;
1679 $tmp_data[
'passed_info'] = $this->
object->getMembersObject()->getPassedInfo($usr_id);
1681 $tmp_data[
'notification'] = $this->
object->getMembersObject()->isNotificationEnabled($usr_id) ? 1 : 0;
1682 $tmp_data[
'blocked'] = $this->
object->getMembersObject()->isBlocked($usr_id) ? 1 : 0;
1683 $tmp_data[
'contact'] = $this->
object->getMembersObject()->isContact($usr_id) ? 1 : 0;
1685 $tmp_data[
'usr_id'] = $usr_id;
1687 if ($show_tracking) {
1688 if (in_array($usr_id, $completed)) {
1690 } elseif (in_array($usr_id, $in_progress)) {
1692 } elseif (in_array($usr_id, $failed)) {
1699 if ($privacy->enabledCourseAccessTimes()) {
1700 if (isset($progress[$usr_id][
'ts']) && $progress[$usr_id][
'ts']) {
1701 $tmp_data[
'access_ut'] = $progress[$usr_id][
'ts'];
1703 $progress[$usr_id][
'ts'],
1707 $tmp_data[
'access_ut'] = 0;
1708 $tmp_data[
'access_time'] = $this->
lng->txt(
'no_date');
1713 $tmp_data[
'prtf'] = $all_prtf[$usr_id] ??
null;
1716 $members[$usr_id] = $tmp_data;
1733 if ($marks->getCompleted() !== $a_has_passed) {
1734 $marks->setCompleted($a_has_passed);
1749 $this->
object->isSubscriptionMembershipLimited() &&
1750 $this->object->getSubscriptionMaxMembers() &&
1751 $this->object->getSubscriptionMaxMembers() <= $this->object->getMembersObject()->getCountMembers()
1753 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"crs_max_members_reached"));
1757 if ($number = $this->
object->getMembersObject()->autoFillSubscribers()) {
1758 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"crs_number_users_added") .
" " . $number);
1760 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"crs_no_users_added"));
1770 if ($this->
object->getMembersObject()->isLastAdmin($this->user->getId())) {
1771 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'crs_min_one_admin'));
1776 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
1778 $cgui->setHeaderText($this->
lng->txt(
'crs_unsubscribe_sure'));
1779 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1780 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancel");
1781 $cgui->setConfirm($this->
lng->txt(
"crs_unsubscribe"),
"performUnsubscribe");
1782 $this->tpl->setContent($cgui->getHTML());
1793 $this->
getObject()->getMembersObject()->delete($this->
user->getId());
1794 $this->
getObject()->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->
user->getId());
1795 $this->
getObject()->getMembersObject()->sendNotification(
1797 $this->
user->getId()
1799 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'crs_unsubscribed_from_crs'),
true);
1801 $this->
ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->tree->getParentId($this->ref_id));
1802 $this->
ctrl->redirectByClass(
"ilrepositorygui",
"");
1808 if ($this->
access->checkAccess(
'visible',
'', $this->ref_id)) {
1809 $this->
tabs->addTarget(
1811 $this->
ctrl->getLinkTargetByClass(
1812 array(
"ilobjcoursegui",
"ilinfoscreengui"),
1819 $this->
access->checkAccess(
'leave',
'', $this->object->getRefId()) &&
1820 $this->object->getMemberObject()->isMember()
1822 $this->
tabs->addTarget(
1824 $this->
ctrl->getLinkTarget($this,
"unsubscribe"),
1833 $this->tabs_gui->addTab(
1835 $this->
lng->txt(
"content"),
1836 $this->ctrl->getLinkTarget($this,
"view")
1842 $this->
help->setScreenIdComponent(
"crs");
1843 $this->
ctrl->setParameter($this,
"ref_id", $this->ref_id);
1845 if ($this->
access->checkAccess(
'read',
'', $this->ref_id)) {
1847 $this->tabs_gui->activateTab(
'view_content');
1848 if ($this->
object->isNewsTimelineEffective()) {
1849 if (!$this->
object->isNewsTimelineLandingPageEffective()) {
1852 $this->tabs_gui->addTab(
1854 $this->
lng->txt(
"cont_news_timeline_tab"),
1855 $this->ctrl->getLinkTargetByClass(
"ilnewstimelinegui",
"show")
1857 if ($this->
object->isNewsTimelineLandingPageEffective()) {
1867 $this->
tabs->addTab(
1869 $this->
lng->txt(
'timings_timings'),
1870 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'manageTimings')
1874 $this->
tabs->addTab(
1876 $this->
lng->txt(
'timings_timings'),
1877 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'managePersonalTimings')
1882 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1884 $this->tabs_gui->addTarget(
1886 $this->
ctrl->getLinkTargetByClass(
'illoeditorgui',
''),
1893 $this->
access->checkAccess(
'visible',
'', $this->ref_id) ||
1894 $this->access->checkAccess(
'join',
'', $this->ref_id) ||
1895 $this->access->checkAccess(
'read',
'', $this->ref_id)
1898 strcasecmp($this->
ctrl->getCmdClass(), ilInfoScreenGUI::class) === 0 ||
1899 strcasecmp($this->
ctrl->getCmdClass(), ilNoteGUI::class) === 0;
1900 $this->tabs_gui->addTarget(
1902 $this->
ctrl->getLinkTargetByClass(
1903 array(
"ilobjcoursegui",
"ilinfoscreengui"),
1912 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1914 strcasecmp($this->
ctrl->getCmdClass(), ilConditionHandlerGUI::class) &&
1915 !$this->
http->wrapper()->query()->has(
'item_id');
1916 $this->tabs_gui->addTarget(
1918 $this->
ctrl->getLinkTarget($this,
"edit"),
1919 array(
"edit",
"editMapSettings",
"editCourseIcons",
"listStructure"),
1930 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1933 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1935 $this->tabs_gui->addTarget(
1936 "obj_tool_setting_badges",
1937 $this->
ctrl->getLinkTargetByClass(
"ilbadgemanagementgui",
""),
1939 "ilbadgemanagementgui"
1946 $this->tabs_gui->addTarget(
1947 "obj_tool_setting_skills",
1948 $this->
ctrl->getLinkTargetByClass(array(
"ilcontainerskillgui",
"ilcontskillpresentationgui"),
""),
1950 array(
"ilcontainerskillgui",
"ilcontskillpresentationgui",
"ilcontskilladmingui")
1956 $this->object->getId(),
1960 $this->tabs_gui->addTarget(
1961 "obj_tool_setting_booking",
1962 $this->
ctrl->getLinkTargetByClass(array(
"ilbookinggatewaygui"),
"")
1968 $this->tabs_gui->addTarget(
1969 'learning_progress',
1970 $this->
ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
1972 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
1977 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1979 $mdtab = $mdgui->getTab();
1981 $this->tabs_gui->addTarget(
1985 "ilobjectmetadatagui"
1990 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1991 $this->tabs_gui->addTarget(
1993 $this->
ctrl->getLinkTargetByClass(
'ilexportgui',
''),
1999 if ($this->
access->checkAccess(
'edit_permission',
'', $this->ref_id)) {
2000 $this->tabs_gui->addTarget(
2002 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
2003 array(
"perm",
"info",
"owner"),
2009 if ($this->
access->checkAccess(
'join',
'', $this->ref_id) && !$this->object->getMemberObject()->isAssigned()) {
2011 $this->tabs_gui->addTab(
2013 $this->
lng->txt(
'membership_leave'),
2014 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
2017 $this->tabs_gui->addTarget(
2019 $this->
ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
"show"),
2025 if ($this->
access->checkAccess(
'leave',
'', $this->object->getRefId()) && $this->object->getMemberObject()->isMember()) {
2026 $this->tabs_gui->addTarget(
2028 $this->
ctrl->getLinkTarget($this,
"unsubscribe"),
2037 $next_class = $this->
ctrl->getNextClass($this);
2038 $cmd = $this->
ctrl->getCmd();
2044 $this->
access->checkAccess(
'read',
'', $this->ref_id)) {
2045 $this->navigation_history->addItem(
2047 ilLink::_getLink($this->ref_id,
"crs"),
2051 $header_action =
true;
2052 switch ($next_class) {
2053 case strtolower(ilRepositoryTrashGUI::class):
2054 $ru = new \ilRepositoryTrashGUI($this);
2055 $this->
ctrl->setReturn($this,
'trash');
2056 $this->
ctrl->forwardCommand($ru);
2059 case 'illtiproviderobjectsettinggui':
2062 $this->tabs_gui->activateTab(
'settings');
2063 $this->tabs_gui->activateSubTab(
'lti_provider');
2066 $lti_gui->offerLTIRolesForSelection(
false);
2067 $this->
ctrl->forwardCommand($lti_gui);
2070 case 'ilcoursemembershipgui':
2072 $this->tabs_gui->activateTab(
'members');
2075 $this->
ctrl->forwardCommand($mem_gui);
2078 case "ilinfoscreengui":
2082 case 'ilobjectmetadatagui':
2083 if (!$this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
2084 $this->
error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->WARNING);
2086 $this->tabs_gui->setTabActive(
'meta_data');
2088 $this->
ctrl->forwardCommand($md_gui);
2091 case 'ilcourseregistrationgui':
2092 $this->
ctrl->setReturn($this,
'');
2093 $this->tabs_gui->setTabActive(
'join');
2095 $this->
ctrl->forwardCommand($registration);
2098 case 'ilobjectcustomuserfieldsgui':
2101 $this->tabs_gui->activateTab(
'settings');
2102 $this->tabs_gui->activateSubTab(
'crs_custom_user_fields');
2103 $this->
ctrl->forwardCommand($cdf_gui);
2106 case "ilcourseobjectivesgui":
2108 $this->
ctrl->setReturn($this,
"");
2110 $this->
ctrl->forwardCommand($reg_gui);
2113 case 'ilobjcoursegroupinggui':
2115 $this->
ctrl->setReturn($this,
'edit');
2117 $this->tabs_gui->activateTab(
'settings');
2118 $this->tabs_gui->activateSubTab(
'groupings');
2121 if ($this->
http->wrapper()->query()->has(
'obj_id')) {
2122 $grouping_id = $this->
http->wrapper()->query()->retrieve(
2128 $this->
ctrl->forwardCommand($crs_grp_gui);
2131 case "ilpropertyformgui":
2138 $this->
ctrl->setReturn($this,
"");
2139 $this->tabs_gui->setTabActive(
'none');
2148 case "ilconditionhandlergui":
2151 $this->tabs_gui->activateTab(
'settings');
2152 $this->tabs_gui->activateSubTab(
'preconditions');
2154 $this->
ctrl->forwardCommand($new_gui);
2157 case "illearningprogressgui":
2160 if ($this->
http->wrapper()->query()->has(
'user_id')) {
2168 $this->
object->getRefId(),
2171 $this->
ctrl->forwardCommand($new_gui);
2172 $this->tabs_gui->setTabActive(
'learning_progress');
2175 case 'ilpermissiongui':
2176 $this->tabs_gui->setTabActive(
'perm_settings');
2178 $this->
ctrl->forwardCommand($perm_gui);
2181 case 'ilcalendarpresentationgui':
2183 $ret = $this->
ctrl->forwardCommand($cal);
2184 $header_action =
false;
2187 case 'ilcoursecontentgui':
2188 $this->
ctrl->setReturn($this,
'members');
2190 $this->
ctrl->forwardCommand($course_content_obj);
2193 case strtolower(PublicProfileGUI::class):
2194 $this->tpl->enableDragDropFileUpload(
null);
2196 $this->tabs_gui->setTabActive(
'members');
2199 if ($this->
http->wrapper()->query()->has(
'user_id')) {
2206 $profile_gui->setBackUrl($this->
ctrl->getLinkTargetByClass([
"ilCourseMembershipGUI",
2209 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
2210 $html = $this->
ctrl->forwardCommand($profile_gui);
2211 $this->tpl->setVariable(
"ADM_CONTENT",
$html);
2214 case 'ilmemberagreementgui':
2215 $this->tabs_gui->clearTargets();
2217 $this->
ctrl->setReturn($this,
'');
2219 $this->
ctrl->forwardCommand($agreement);
2223 case "ilcontainerpagegui":
2226 $this->tpl->setContent($ret);
2228 $header_action =
false;
2231 case "ilcontainerstartobjectspagegui":
2234 $ret = $this->
ctrl->forwardCommand($pgui);
2236 $this->tpl->setContent($ret);
2240 case 'ilobjectcopygui':
2242 $cp->setType(
'crs');
2243 $this->
ctrl->forwardCommand($cp);
2246 case "ilobjectcontentstylesettingsgui":
2253 $settings_gui =
$DIC->contentStyle()->gui()
2254 ->objectSettingsGUIForRefId(
2256 $this->
object->getRefId()
2258 $this->
ctrl->forwardCommand($settings_gui);
2262 $this->tabs_gui->setTabActive(
'export');
2264 $exp->addFormat(
'xml');
2265 $this->
ctrl->forwardCommand($exp);
2268 case "ilcommonactiondispatchergui":
2273 case 'ildidactictemplategui':
2274 $this->
ctrl->setReturn($this,
'edit');
2276 $this->
ctrl->forwardCommand($did);
2279 case "ilcertificategui":
2280 $this->tabs_gui->activateTab(
"settings");
2282 $this->tabs_gui->activateSubTab(
'certificate');
2285 $output_gui = $guiFactory->create($this->
object);
2286 $this->
ctrl->forwardCommand($output_gui);
2289 case 'illoeditorgui':
2290 #$this->tabs_gui->clearTargets();
2291 #$this->tabs_gui->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,''));
2292 $this->tabs_gui->activateTab(
'crs_objectives');
2295 $this->
ctrl->forwardCommand($editor);
2296 if (strtolower($this->
ctrl->getCmdClass()) ===
"illopagegui") {
2297 $header_action =
false;
2301 case 'ilcontainerstartobjectsgui':
2302 $this->
ctrl->setReturn($this,
'edit');
2303 $this->tabs_gui->clearTargets();
2304 $this->tabs_gui->setBackTarget(
2305 $this->
lng->txt(
"back_to_crs_content"),
2306 $this->ctrl->getLinkTarget($this,
"edit")
2308 $this->tabs_gui->addTab(
2310 $this->
lng->txt(
"crs_start_objects"),
2311 $this->ctrl->getLinkTargetByClass(
"ilcontainerstartobjectsgui",
"listStructure")
2313 $this->tabs_gui->activateTab(
"start");
2314 if (strtolower($this->
ctrl->getCmdClass()) ==
2315 "ilcontainerstartobjectspagegui") {
2316 $header_action =
false;
2320 $ilHelp =
$DIC[
'ilHelp'];
2321 $this->
help->setScreenIdComponent(
"crs");
2323 $this->
ctrl->forwardCommand($stgui);
2326 case 'illomembertestresultgui':
2327 $GLOBALS[
'DIC'][
'ilCtrl']->setReturn($this,
'members');
2328 $GLOBALS[
'DIC'][
'ilTabs']->clearTargets();
2329 $GLOBALS[
'DIC'][
'ilTabs']->setBackTarget(
2330 $GLOBALS[
'DIC'][
'lng']->txt(
'back'),
2331 $GLOBALS[
'DIC'][
'ilCtrl']->getLinkTarget($this,
'members')
2335 if ($this->
http->wrapper()->query()->has(
'uid')) {
2336 $uid = $this->
http->wrapper()->query()->retrieve(
2342 $this->
ctrl->forwardCommand($result_view);
2345 case 'ilmailmembersearchgui':
2350 $this->access->checkAccess(
'manage_members',
"", $this->object->getRefId())) &&
2351 $this->rbac_system->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
2352 $this->
error->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->error->MESSAGE);
2355 $this->tabs_gui->setTabActive(
'members');
2359 $this->
object->getRefId(),
2362 $mail_search->setObjParticipants(
2365 $this->
ctrl->forwardCommand($mail_search);
2368 case 'ilbadgemanagementgui':
2369 $this->tabs_gui->setTabActive(
'obj_tool_setting_badges');
2371 $this->
ctrl->forwardCommand($bgui);
2374 case "ilcontainernewssettingsgui":
2376 $this->tabs_gui->activateTab(
'settings');
2377 $this->tabs_gui->activateSubTab(
'obj_news_settings');
2379 $news_set_gui->setTimeline(
true);
2380 $news_set_gui->setCronNotifications(
true);
2381 $news_set_gui->setHideByDate(
true);
2382 $this->
ctrl->forwardCommand($news_set_gui);
2385 case "ilnewstimelinegui":
2387 $this->
ctrl->redirectByClass(self::class,
"view");
2389 $this->tabs_gui->setTabActive(
'news_timeline');
2391 $this->
object->getRefId(),
2392 $this->object->getNewsTimelineAutoEntries()
2394 $t->setUserEditAll($this->
access->checkAccess(
'write',
'', $this->object->getRefId(),
'grp'));
2396 $this->
ctrl->forwardCommand($t);
2398 $this->
user->getId(),
2399 $this->object->getId(),
2400 $this->object->getRefId(),
2405 case 'ilmemberexportsettingsgui':
2407 $this->tabs_gui->activateTab(
'properties');
2408 $this->tabs_gui->activateSubTab(
'export_members');
2410 $this->
ctrl->forwardCommand($settings_gui);
2413 case "ilcontainerskillgui":
2414 $this->tabs_gui->activateTab(
'obj_tool_setting_skills');
2419 case strtolower(TranslationGUI::class):
2422 $this->tabs_gui->activateTab(
"settings");
2423 $this->tabs_gui->activateSubTab(
"obj_multilinguality");
2437 $this->
ctrl->forwardCommand($transgui);
2440 case "ilbookinggatewaygui":
2441 $this->tabs_gui->activateTab(
'obj_tool_setting_booking');
2448 if ($cmd ==
'infoScreenGoto') {
2453 $cmd =
'infoScreen';
2457 if (!$this->creation_mode) {
2458 if ($cmd ==
"infoScreen") {
2465 if (!$this->creation_mode
2466 && $cmd !=
'infoScreen'
2467 && $cmd !=
'sendfile'
2468 && $cmd !=
'unsubscribe'
2469 && $cmd !=
'deliverCertificate'
2470 && $cmd !=
'performUnsubscribe'
2471 && $cmd !=
'removeFromDesk'
2473 && !$this->
access->checkAccess(
"read",
'', $this->object->getRefId())
2475 || $cmd ==
'subscribe'
2476 || $cmd ===
'leaveWaitList') {
2477 if ($this->rbac_system->checkAccess(
'join', $this->object->getRefId()) &&
2479 $this->
ctrl->redirectByClass(
"ilCourseRegistrationGUI");
2486 if ($cmd ==
'listObjectives') {
2487 $this->
ctrl->setReturn($this,
"");
2489 $this->
ctrl->forwardCommand($obj_gui);
2493 if ($cmd ==
"" && $this->
object->isNewsTimelineLandingPageEffective()) {
2494 $this->
ctrl->redirectByClass(
"ilnewstimelinegui");
2505 if ($header_action) {
2512 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
2517 if (!$this->
object->getMemberObject()->isAssigned()) {
2534 $this->
logger->warning(
'Missing course confirmation.');
2539 $this->
logger->warning(
'Missing required fields');
2547 return array(
"ilCourseRegisterGUI",
'ilConditionHandlerGUI');
2552 $this->
ctrl->redirectByClass(
'ilcoursemembershipgui');
2555 public static function _goto($a_target,
string $a_add =
""): void
2558 $main_tpl =
$DIC->ui()->mainTemplate();
2559 $ilAccess =
$DIC[
'ilAccess'];
2562 $ilUser =
$DIC[
'ilUser'];
2566 $a_target = (
int) $a_target;
2568 if (substr($a_add, 0, 5) ==
'rcode') {
2571 if (
$http->wrapper()->query()->has(
'target')) {
2572 $target =
$http->wrapper()->query()->retrieve(
2579 "login.php?target=" . $target .
"&cmd=force_login&lang=" .
2580 $ilUser->getCurrentLanguage()
2592 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"manage_members",
"", $a_target)) {
2600 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2604 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
2608 $main_tpl->setOnScreenMessage(
'failure', sprintf(
2609 $lng->
txt(
"msg_no_perm_read_item"),
2622 $this->tabs_gui->activateTab(
'settings');
2623 $this->tabs_gui->activateSubTab(
'crs_map_settings');
2626 !$this->
access->checkAccess(
"write",
"", $this->object->getRefId())) {
2630 $latitude = $this->
object->getLatitude();
2631 $longitude = $this->
object->getLongitude();
2632 $zoom = $this->
object->getLocationZoom();
2635 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
2637 $latitude = $def[
"latitude"];
2638 $longitude = $def[
"longitude"];
2639 $zoom = $def[
"zoom"];
2648 $this->
lng->txt(
"crs_enable_map"),
2651 $public->setValue(
"1");
2652 $public->setChecked($this->
object->getEnableCourseMap());
2657 $this->
lng->txt(
"crs_map_location"),
2660 $loc_prop->setLatitude((
float) $latitude);
2661 $loc_prop->setLongitude((
float) $longitude);
2662 $loc_prop->setZoom((
int) $zoom);
2667 $this->tpl->setVariable(
"ADM_CONTENT",
$form->
getHTML());
2677 if ($this->
http->wrapper()->post()->has(
'location')) {
2678 $custom_transformer = $this->
refinery->custom()->transformation(
2679 fn($array) => $array
2686 $enable_map =
false;
2687 if ($this->
http->wrapper()->post()->has(
'enable_map')) {
2688 $enable_map = $this->
http->wrapper()->post()->retrieve(
2690 $this->
refinery->kindlyTo()->bool()
2693 $this->
object->setLatitude(
$location[
'latitude']);
2694 $this->
object->setLongitude(
$location[
'longitude']);
2695 $this->
object->setLocationZoom(
$location[
'zoom']);
2696 $this->
object->setEnableCourseMap($enable_map);
2697 $this->
object->update();
2698 $this->
ctrl->redirect($this,
"editMapSettings");
2708 'ilcoursecontentgui',
2710 $this->
object->getAboStatus(),
2711 $this->object->getRefId(),
2712 $this->object->getId()
2718 string $a_cmd_class,
2721 int $a_course_ref_id,
2722 int $a_course_obj_id,
2723 int $a_parent_ref_id = 0
2727 $ilAccess =
$DIC->access();
2730 if ($a_parent_ref_id == 0) {
2731 $a_parent_ref_id = $a_course_ref_id;
2736 $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));
2741 $is_tutor = ($ilAccess->checkAccess(
2757 $ilAccess =
$DIC[
'ilAccess'];
2759 $ilCtrl =
$DIC[
'ilCtrl'];
2761 if ($this->
object->getType() !=
'crs') {
2764 if (!$this->
access->checkAccess(
2767 $this->object->getRefId(),
2769 $this->object->getId()
2773 if ($this->
object->enabledObjectiveView()) {
2780 if (!$this->isActiveAdministrationPanel()) {
2781 $this->tabs_gui->addSubTab(
2784 $this->ctrl->getLinkTargetByClass(
"ilobjcoursegui",
"view")
2787 $this->tabs_gui->addSubTab(
2790 $this->ctrl->getLinkTargetByClass(
"ilobjcoursegui",
"disableAdministrationPanel")
2795 $this->addStandardContainerSubTabs(
false);
2802 $confirm->setHeaderText($this->
lng->txt(
'crs_objectives_reset_sure'));
2803 $confirm->setFormAction($this->
ctrl->getFormAction($this));
2804 $confirm->setConfirm($this->
lng->txt(
'reset'),
'reset');
2805 $confirm->setCancel($this->
lng->txt(
'cancel'),
'cancel');
2806 $this->tpl->setContent($confirm->getHTML());
2812 $usr_results->delete();
2819 $tmp_obj_res->reset($this->
object->getId());
2821 $this->
user->deletePref(
'crs_objectives_force_details_' . $this->
object->getId());
2822 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'crs_objectives_reseted'));
2823 $this->viewObject();
2828 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
2832 $this->
object->getRefId(),
2833 $this->object->getId()
2835 if (count($this->start_obj->getStartObjects()) &&
2836 !$this->start_obj->allFullfilled($this->user->getId())) {
2848 $link = chr(13) . chr(10) . chr(13) . chr(10);
2849 $link .= $this->
lng->txt(
'crs_mail_permanent_link');
2850 $link .= chr(13) . chr(10) . chr(13) . chr(10);
2851 $link .= ilLink::_getLink($this->
object->getRefId());
2852 return rawurlencode(base64_encode($link));
2857 $lg = parent::initHeaderAction($sub_type, $sub_id);
2863 if ($validator->isCertificateDownloadable($this->user->getId(), $this->object->getId())) {
2864 $cert_url = $this->
ctrl->getLinkTarget($this,
"deliverCertificate");
2866 $this->
lng->loadLanguageModule(
"certificate");
2867 $lg->addCustomCommand($cert_url,
"download_certificate");
2872 $this->
lng->txt(
"download_certificate"),
2882 if (!$noti->isCurrentUserActive()) {
2886 $this->
lng->txt(
"crs_notification_deactivated")
2889 $this->
ctrl->setParameter($this,
"crs_ntf", 1);
2890 $caption =
"crs_activate_notification";
2895 $this->
lng->txt(
"crs_notification_activated")
2898 $this->
ctrl->setParameter($this,
"crs_ntf", 0);
2899 $caption =
"crs_deactivate_notification";
2902 if ($noti->canCurrentUserEdit()) {
2903 $lg->addCustomCommand(
2904 $this->
ctrl->getLinkTarget($this,
"saveNotification"),
2909 $this->
ctrl->setParameter($this,
"crs_ntf",
"");
2922 if ($this->
access->checkAccess(
'manage_members',
'', $this->ref_id)) {
2924 if ($this->
http->wrapper()->query()->has(
'member_id')) {
2935 $objId = $this->
object->getId();
2939 if (
false === $validator->isCertificateDownloadable(
$user_id,
$objId)) {
2940 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
2941 $this->
ctrl->redirect($this);
2951 $this->
lng->txt(
'error_creating_certificate_pdf')
2958 $this->
ctrl->redirectByClass(array(
'ilrepositorygui',
'ilobjcoursegui',
'illoeditorgui'),
'materials');
2963 $post_position = (array) ($this->
http->request()->getParsedBody()[
'position'] ?? []);
2964 if (isset($post_position[
'lobj'])) {
2965 $lobj = $post_position[
'lobj'];
2966 $objective_order = array();
2967 foreach ($lobj as $objective_id => $materials) {
2968 $objective_order[$objective_id] = $materials[0];
2969 unset($lobj[$objective_id][0]);
2972 asort($objective_order);
2974 foreach (array_keys($objective_order) as $objective_id) {
2976 $obj->writePosition(++$pos);
2980 foreach ($lobj as $objective_id => $materials) {
2985 foreach (array_keys($materials) as
$ass_id) {
2986 $objmat->writePosition(
$ass_id, ++$pos);
2990 parent::saveSortingObject();
2996 if ($this->
http->wrapper()->query()->has(
'tid')) {
2997 $tid = $this->
http->wrapper()->query()->retrieve(
3001 } elseif ($this->
http->wrapper()->post()->has(
'tid')) {
3002 $tid = $this->
http->wrapper()->post()->retrieve(
3013 if ($this->
http->wrapper()->query()->has(
'tid')) {
3014 $tid = $this->
http->wrapper()->query()->retrieve(
3020 if ($this->
http->wrapper()->query()->has(
'objective_id')) {
3021 $objective_id = $this->
http->wrapper()->query()->retrieve(
3029 $this->user->getId()
3031 $passed =
$res->getCompletedObjectiveIds();
3033 $has_completed =
false;
3034 if ($objective_id) {
3035 $objective_ids = array($objective_id);
3036 if (in_array($objective_id, $passed)) {
3037 $has_completed =
true;
3044 if (count($objective_ids) === count($passed)) {
3045 $has_completed =
true;
3050 if ($has_completed) {
3052 $this->redirectLocToTestConfirmation($objective_id, $tid);
3064 $confirm->setFormAction(
$GLOBALS[
'DIC'][
'ilCtrl']->getFormAction($this));
3066 if ($a_objective_id) {
3067 $question = $this->
lng->txt(
'crs_loc_objective_passed_confirmation');
3069 $question = $this->
lng->txt(
'crs_loc_objectives_passed_confirmation');
3072 $confirm->setHeaderText($question);
3073 $confirm->addHiddenItem(
'objective_id', (
string) $a_objective_id);
3074 $confirm->addHiddenItem(
'tid', (
string) $a_test_id);
3075 $confirm->setConfirm($this->
lng->txt(
'crs_loc_tst_start'),
'redirectLocToTestConfirmed');
3076 $confirm->setCancel($this->
lng->txt(
'cancel'),
'view');
3079 $this->tpl->setContent($confirm->getHTML());
3089 $crs_admin = $this->
object->getDefaultAdminRole();
3090 $crs_member = $this->
object->getDefaultMemberRole();
3091 $local_roles = $this->
object->getLocalCourseRoles(
false);
3095 if (in_array($crs_member, $local_roles)) {
3096 #$crs_roles[$crs_member] = ilObjRole::_getTranslation(array_search ($crs_member, $local_roles));
3097 #unset($local_roles[$crs_roles[$crs_member]]);
3100 foreach ($local_roles as $title => $role_id) {
3101 if ($role_id == $crs_admin && !$this->hasAdminPermission()) {
3108 if ($a_exclude !== []) {
3109 foreach ($a_exclude as $excluded_role) {
3110 if (isset($crs_roles[$excluded_role])) {
3111 unset($crs_roles[$excluded_role]);
3122 $this->checkPermissionBool(
'edit_permission');
3127 $this->
ctrl->redirectByClass(ilUsersGalleryGUI::class);
3135 $this->
ctrl->setReturn($this,
"view");
Render add new item selector.
GUI class for object translation handling.
kindlyTo()
Combined validations and transformations for primitive data types that establish a baseline for furth...
GUI class for public user profile presentation.
setInfoObject(ilInfoScreenGUI $info)
get info sections
@ilCtrl_Calls ilBadgeManagementGUI: ilPropertyFormGUI
This class is used for integration 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(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
class ilConditionHandlerGUI
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isAccessible(int $ref_id)
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
ILIAS Container InternalGUIService $gui
afterUpdate()
Post (successful) object update hook.
isActiveAdministrationPanel()
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
saveListPresentation(ilPropertyFormGUI $form)
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
saveSortingSettings(ilPropertyFormGUI $form)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Skills for container (course/group) (top gui class)
Class ilContainerStartObjectsContentGUI.
Class ilContainerStartObjectsGUI.
Container start objects page GUI class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static setBlockedForLP(bool $a_status)
Toggle LP blocking property status.
const IL_CRS_VIEW_OBJECTIVE
const IL_CRS_VIEW_BY_TYPE
const IL_CRS_SUBSCRIPTION_CONFIRMATION
const IL_CRS_SUBSCRIPTION_DEACTIVATED
const IL_CRS_SUBSCRIPTION_PASSWORD
const IL_CRS_SUBSCRIPTION_LIMITED
const IL_CRS_VIEW_TIMING_ABSOLUTE
const IL_CRS_SUBSCRIPTION_UNLIMITED
const IL_CRS_VIEW_TIMING_RELATIVE
const MAIL_ALLOWED_TUTORS
const IL_CRS_SUBSCRIPTION_DIRECT
const IL_CRS_VIEW_SESSIONS
Class ilCourseContentGUI.
static _getFields(int $a_container_id, $a_sort=self::IL_CDF_SORT_NAME)
Get all fields of a container.
static _fieldsToInfoString(int $a_obj_id)
static _hasFields(int $a_container_id)
Check if there are any define fields.
static _readFilesByCourse(int $a_course_id)
const TYPE_UNSUBSCRIBE_MEMBER
class ilCourseObjectiveMaterials
static _getCountObjectives(int $a_obj_id, bool $a_activated_only=false)
static _getObjectiveIds(int $course_id, bool $a_activated_only=false)
class ilobjcourseobjectivesgui
static _getInstanceByObjId(int $a_obj_id, int $a_usr_id)
static _getInstanceByObjId(int $a_obj_id)
GUI class for course registrations.
static _checkRequired(int $a_usr_id, int $a_obj_id)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates 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(string $a_type)
Get Singleton Instance.
Export User Interface Class.
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
static getValidFilename(string $a_filename)
static deleteRuns(int $a_container_id, int $a_user_id)
const LP_MODE_MANUAL_BY_TUTOR
static _lookupCompletedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)
const LP_STATUS_COMPLETED
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS
GUI class for LTI provider object settings.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _lookupProgressByObjId(int $a_obj_id)
lookup progress for a specific object
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
Component logger with individual log levels by component id.
static getMailObjectRefId()
Class ilMailMemberCourseRoles.
static isActivated()
Checks whether Map feature is activated.
static getDefaultSettings()
Get default longitude, latitude and zoom.
static _hasAccepted(int $a_usr_id, int $a_obj_id)
Check if user has accepted agreement.
Membership notification settings.
static isActiveForRefId(int $ref_id)
static generateCode()
Generate new registration key.
static handleCode(int $a_ref_id, string $a_type, string $a_code)
Last visited history for repository items.
static getInstance(int $a_ref_id, bool $a_include_auto_entries)
static lookupRegistrationInfo(int $a_obj_id)
editInfoObject(?ilPropertyFormGUI $a_form=null)
readMemberData(array $ids, ?array $selected_columns=null, bool $skip_names=false)
setSubTabs(string $a_tab)
modifyItemGUI(ilObjectListGUI $a_item_list_gui, array $a_item_data)
@inheritDoc
renderAddNewItem(string ... $disabled_object_types)
deliverCertificateObject()
setContentSubTabs()
@inheritDoc
static _modifyItemGUI(ilObjectListGUI $a_item_list_gui, string $a_cmd_class, array $a_item_data, bool $a_abo_status, int $a_course_ref_id, int $a_course_obj_id, int $a_parent_ref_id=0)
const BREADCRUMB_FULL_PATH
__construct($a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
ilContainerStartObjects $start_obj
ilNavigationHistory $navigation_history
afterImport(ilObject $new_object)
Post (successful) object import hook.
static _goto($a_target, string $a_add="")
createMailSignature()
Create a course mail signature.
redirectLocToTestConfirmedObject()
setSideColumnReturn()
@inheritDoc
redirectLocToTestObject($a_force_new_run=null)
updateLPFromStatus(int $a_member_id, bool $a_has_passed)
sync course status and lp status
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
ilAdvancedMDRecordGUI $record_gui
getTabs()
@abstract overwrite in derived GUI class of your object type
const BREADCRUMB_CRS_ONLY
updateObject()
updates object entry in object_data
redirectLocToTestConfirmation(int $a_objective_id, int $a_test_id)
Show confirmation whether user wants to start a new run or resume a previous run.
afterSave(ilObject $new_object)
@inheritDoc
editObject(?ilPropertyFormGUI $form=null)
jump2UsersGalleryObject()
confirmDeleteInfoFilesObject()
initHeaderAction(?string $sub_type=null, ?int $sub_id=null)
Add header action menu.
deleteObject(bool $error=false)
Display deletion confirmation screen.
getLocalRoles(array $a_exclude=array())
showPossibleSubObjects()
@inheritDoc
performUnsubscribeObject()
getEditFormValues()
values are already set in initEditForm Returning an empty array avoid overriding these values.
Class ilObjCourseGroupingGUI.
static _lookupViewMode(int $a_id)
const int STATUS_DETERMINATION_MANUAL
const int STATUS_DETERMINATION_LP
static _registrationEnabled(int $a_obj_id)
Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.
static _isActivated(int $a_obj_id)
Is activated.
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, ?string $a_back_url=null)
static _getTranslation(string $a_role_title)
static _enabledLearningProgress()
static _enabledUserRelatedData()
static _lookupName(int $a_user_id)
GUI class for the workflow of copying objects.
addAdoptContentLinkToToolbar()
buildAddNewItemElements(array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
ilGlobalTemplateInterface $tpl
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
getCreatableObjectTypes()
initDidacticTemplate(ilPropertyFormGUI $form)
addHeaderAction()
Add header action menu.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
prepareOutput(bool $show_sub_objects=true)
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.
static getInstance(int $obj_id)
enableSubscribe(bool $status)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
const AUTO_RATING_NEW_OBJECTS
const CALENDAR_CONFIGURATION
const EXTERNAL_MAIL_PREFIX
const ORGU_POSITION_ACCESS
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
Class ilObject Basic functions for all objects.
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
static getInstanceByObjId(int $a_obj_id)
Get instance by obj type.
static _isParticipant(int $a_ref_id, int $a_usr_id)
Static function to check if a user is a participant of the container object.
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 makeClickable(string $a_text, bool $detectGotoLinks=false, ?string $ilias_http_path=null)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static redirect(string $a_script)
static _isOnList(int $a_usr_id, int $a_obj_id)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
const MESSAGE_TYPE_SUCCESS
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc