5require_once
"./Services/Container/classes/class.ilContainerGUI.php";
43 $this->ctrl->saveParameter($this, array(
"ref_id",
"cmdClass"));
46 parent::__construct(
'', (
int)
$_GET[
'ref_id'],
true,
false);
48 $this->lng->loadLanguageModule(
'crs');
50 $this->SEARCH_USER = 1;
51 $this->SEARCH_GROUP = 2;
52 $this->SEARCH_COURSE = 3;
57 switch (
$_POST[
"action"]) {
59 case "deleteSubscribers":
60 $this->deleteSubscribers();
63 case "addSubscribers":
64 $this->addSubscribers();
67 case "addFromWaitingList":
68 $this->addFromWaitingList();
71 case "removeFromWaitingList":
72 $this->removeFromWaitingList();
91 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
94 $part->updateNotification(
$ilUser->getId(),
$ilSetting->get(
'mail_crs_admin_notification',
true));
96 parent::afterImport($a_new_object);
101 $this->ctrl->setCmd(
"view");
118 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
120 $this->ctrl->setCmdClass(get_class($course_content_obj));
121 $this->ctrl->setCmd(
'editUserTimings');
122 $this->ctrl->forwardCommand($course_content_obj);
135 $this->tabs_gui->setTabActive(
'view_content');
145 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
146 parent::viewObject();
151 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
155 if (
$ilCtrl->getNextClass() !=
"ilcolumngui") {
156 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
159 $this->object->getId(),
160 $this->object->getRefId(),
166 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
167 $this->tabs_gui->clearTargets();
168 $this->ctrl->setReturn($this,
'view_content');
170 $this->ctrl->setCmdClass(get_class($agreement));
171 $this->ctrl->forwardCommand($agreement);
176 include_once
"Services/Container/classes/class.ilContainerStartObjectsContentGUI.php";
178 $stgui->enableDesktop($this->object->getAboStatus(), $this);
179 return $stgui->getHTML();
189 $ret = parent::renderObject();
192 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
195 $this->ctrl->setCmdClass(get_class($course_content_obj));
196 $this->ctrl->forwardCommand($course_content_obj);
204 return parent::renderObject();
214 $this->ctrl->setCmd(
"showSummary");
215 $this->ctrl->setCmdClass(
"ilinfoscreengui");
231 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
234 $this->tabs_gui->setTabActive(
'info_short');
236 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
237 include_once
'Modules/Course/classes/class.ilCourseFile.php';
242 $info->enablePrivateNotes();
243 $info->enableFeedback();
245 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
246 $info->enableNewsEditing();
249 if (strlen($this->object->getImportantInformation()) or
250 strlen($this->object->getSyllabus()) or
252 $info->addSection($this->lng->txt(
'crs_general_informations'));
255 if (strlen($this->object->getImportantInformation())) {
257 $this->lng->txt(
'crs_important_info'),
263 if (strlen($this->object->getSyllabus())) {
264 $info->addProperty($this->lng->txt(
'crs_syllabus'), nl2br(
270 $tpl =
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'Modules/Course');
273 $tpl->setCurrentBlock(
"files");
274 $this->ctrl->setParameter($this,
'file_id',
$file->getFileId());
275 $tpl->setVariable(
"DOWN_LINK", $this->ctrl->getLinkTarget($this,
'sendfile'));
276 $tpl->setVariable(
"DOWN_NAME",
$file->getFileName());
277 $tpl->setVariable(
"DOWN_INFO_TXT", $this->lng->txt(
'crs_file_size_info'));
278 $tpl->setVariable(
"DOWN_SIZE",
$file->getFileSize());
279 $tpl->setVariable(
"TXT_BYTES", $this->lng->txt(
'bytes'));
280 $tpl->parseCurrentBlock();
283 $this->lng->txt(
'crs_file_download'),
288 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
290 $record_gui->setInfoObject(
$info);
291 $record_gui->parse();
294 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
297 if ($this->object->hasContactData()) {
298 $info->addSection($this->lng->txt(
"crs_contact"));
300 if (strlen($this->object->getContactName())) {
302 $this->lng->txt(
"crs_contact_name"),
303 $this->object->getContactName()
306 if (strlen($this->object->getContactResponsibility())) {
308 $this->lng->txt(
"crs_contact_responsibility"),
309 $this->object->getContactResponsibility()
312 if (strlen($this->object->getContactPhone())) {
314 $this->lng->txt(
"crs_contact_phone"),
315 $this->object->getContactPhone()
318 if ($this->object->getContactEmail()) {
319 include_once
'./Modules/Course/classes/class.ilCourseMailTemplateMemberContext.php';
320 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
322 $emails = explode(
",", $this->object->getContactEmail());
323 foreach ($emails as
$email) {
325 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true,
'Modules/Course');
339 'ref_id' => $this->object->getRefId(),
344 $etpl->setVariable(
"CONTACT_EMAIL",
$email);
345 $mailString .= $etpl->get() .
"<br />";
347 $info->addProperty($this->lng->txt(
"crs_contact_email"), $mailString);
349 if (strlen($this->object->getContactConsultation())) {
351 $this->lng->txt(
"crs_contact_consultation"),
352 nl2br($this->object->getContactConsultation())
359 $conts = $parts->getContacts();
360 if (count($conts) > 0) {
361 $info->addSection($this->lng->txt(
"crs_mem_contacts"));
362 foreach ($conts as $c) {
363 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
365 $pgui->setBackUrl($this->ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
366 $pgui->setEmbedded(
true);
367 $info->addProperty(
"", $pgui->getHTML());
378 $this->lng->loadLanguageModule(
"rep");
379 $info->addSection($this->lng->txt(
"rep_activation_availability"));
380 $info->showLDAPRoleGroupMappingInfo();
383 if ($this->object->getActivationUnlimitedStatus()) {
385 $this->lng->txt(
"rep_activation_access"),
386 $this->lng->txt(
'crs_visibility_limitless')
390 $this->lng->txt(
'rep_activation_access'),
397 switch ($this->object->getSubscriptionLimitationType()) {
399 $txt = $this->lng->txt(
"crs_info_reg_deactivated");
403 switch ($this->object->getSubscriptionType()) {
405 $txt = $this->lng->txt(
"crs_info_reg_confirmation");
408 $txt = $this->lng->txt(
"crs_info_reg_direct");
411 $txt = $this->lng->txt(
"crs_info_reg_password");
417 $info->addProperty($this->lng->txt(
"crs_info_reg"),
$txt);
421 if ($this->object->getSubscriptionUnlimitedStatus()) {
423 $this->lng->txt(
"crs_reg_until"),
424 $this->lng->txt(
'crs_unlimited')
426 } elseif ($this->object->getSubscriptionStart() < time()) {
428 $this->lng->txt(
"crs_reg_until"),
429 $this->lng->txt(
'crs_to') .
' ' .
432 } elseif ($this->object->getSubscriptionStart() > time()) {
434 $this->lng->txt(
"crs_reg_until"),
435 $this->lng->txt(
'crs_from') .
' ' .
439 if ($this->object->isSubscriptionMembershipLimited()) {
440 if ($this->object->getSubscriptionMinMembers()) {
442 $this->lng->txt(
"mem_min_users"),
443 $this->object->getSubscriptionMinMembers()
446 if ($this->object->getSubscriptionMaxMembers()) {
447 include_once
'./Modules/Course/classes/class.ilObjCourseAccess.php';
451 $this->lng->txt(
'mem_free_places'),
452 $reg_info[
'reg_info_free_places']
458 if ($this->object->getCancellationEnd()) {
460 $this->lng->txt(
'crs_cancellation_end'),
465 if ($this->object->getCourseStart()) {
467 $this->lng->txt(
'crs_period'),
469 $this->object->getCourseStart(),
470 $this->object->getCourseEnd()
476 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
479 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
481 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
485 $this->lng->loadLanguageModule(
'ps');
486 $info->addSection($this->lng->txt(
'crs_user_agreement_info'));
487 $info->addProperty($this->lng->txt(
'ps_export_data'), $field_info->exportableFieldsToInfoString());
490 $info->addProperty($this->lng->txt(
'ps_crs_user_fields'), $fields);
494 $info->enableLearningProgress(
true);
497 $this->ctrl->forwardCommand(
$info);
505 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
507 if ($noti->canCurrentUserEdit()) {
508 if ((
bool) $_REQUEST[
"crs_ntf"]) {
509 $noti->activateUser();
511 $noti->deactivateUser();
515 $this->ctrl->redirect($this,
"");
526 include_once
'Modules/Course/classes/class.ilCourseFile.php';
538 $this->tabs_gui->setTabActive(
'settings');
539 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
544 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'Modules/Course');
545 $this->tpl->setVariable(
'INFO_TABLE', $a_form->getHTML());
552 $table_data[
'id'] =
$file->getFileId();
553 $table_data[
'filename'] =
$file->getFileName();
554 $table_data[
'filetype'] =
$file->getFileType();
555 $table_data[
'filesize'] =
$file->getFileSize();
557 $rows[] = $table_data;
560 include_once(
"./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
562 $table_gui->setTitle($this->lng->txt(
"crs_info_download"));
563 $table_gui->setData(
$rows);
564 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
565 $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->lng->txt(
"delete"));
566 $table_gui->setSelectAllCheckbox(
"file_id");
567 $this->tpl->setVariable(
'INFO_FILE_TABLE', $table_gui->getHTML());
581 if (!count(
$_POST[
'file_id'])) {
588 $this->tabs_gui->setTabActive(
'settings');
589 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
591 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
595 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteInfoFiles"));
596 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
597 $c_gui->setCancel($this->lng->txt(
"cancel"),
"editInfo");
598 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteInfoFiles");
601 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
602 foreach (
$_POST[
"file_id"] as $file_id) {
604 $c_gui->addItem(
"file_id[]", $file_id,
$file->getFileName());
607 $this->tpl->setContent($c_gui->getHTML());
618 if (!count(
$_POST[
'file_id'])) {
623 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
625 foreach (
$_POST[
'file_id'] as $file_id) {
627 if ($this->object->getId() ==
$file->getCourseId()) {
645 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
647 $form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
648 $form->setMultipart(
true);
649 $form->setTitle($this->lng->txt(
'crs_general_info'));
650 $form->addCommandButton(
'updateInfo', $this->lng->txt(
'save'));
651 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
654 $area->setValue($this->object->getImportantInformation());
657 $form->addItem($area);
660 $area->setValue($this->object->getSyllabus());
663 $form->addItem($area);
666 $section->setTitle($this->lng->txt(
'crs_info_download'));
670 $file->enableFileNameSelection(
'file_name');
674 $section->setTitle($this->lng->txt(
'crs_contact'));
678 $text->setValue($this->object->getContactName());
680 $text->setMaxLength(70);
683 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
684 $text->setValue($this->object->getContactResponsibility());
686 $text->setMaxLength(70);
690 $text->setValue($this->object->getContactPhone());
692 $text->setMaxLength(40);
696 $text->setValue($this->object->getContactEmail());
697 $text->setInfo($this->lng->txt(
'crs_contact_email_info'));
699 $text->setMaxLength(255);
702 $area =
new ilTextAreaInputGUI($this->lng->txt(
'crs_contact_consultation'),
'contact_consultation');
703 $area->setValue($this->object->getContactConsultation());
706 $form->addItem($area);
708 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
710 $this->record_gui->setPropertyForm(
$form);
711 $this->record_gui->parse();
722 include_once
'Modules/Course/classes/class.ilCourseFile.php';
724 $file_obj->setCourseId($this->object->getId());
725 $file_obj->setFileName(strlen(
$_POST[
'file_name']) ?
727 $_FILES[
'file'][
'name']);
728 $file_obj->setFileSize($_FILES[
'file'][
'size']);
729 $file_obj->setFileType($_FILES[
'file'][
'type']);
730 $file_obj->setTemporaryName($_FILES[
'file'][
'tmp_name']);
731 $file_obj->setErrorCode($_FILES[
'file'][
'error']);
745 $ilErr->setMessage(
'');
747 $file_obj->validate();
748 $this->
object->validateInfoSettings();
749 if (strlen(
$ilErr->getMessage())) {
756 if (!$this->record_gui->importEditFormPostValues()) {
768 $this->
object->update();
770 $this->record_gui->writeEditForm();
774 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
776 $ecs->handleContentUpdate();
793 if (!
$form->checkInput()) {
794 $form->setValuesByPost();
801 $form->getInput(
'subscription_max') &&
802 $form->getInput(
'subscription_min') &&
803 (
$form->getInput(
'subscription_max') <
$form->getInput(
'subscription_min'))
805 $min =
$form->getItemByPostVar(
'subscription_min');
806 $min->setAlert($this->lng->txt(
'crs_subscription_min_members_err'));
814 $this->
object->setTitle(
$form->getInput(
'title'));
815 $this->
object->setDescription(
$form->getInput(
'desc'));
818 $crs_period =
$form->getItemByPostVar(
"period");
819 $this->
object->setCourseStart($crs_period->getStart());
820 $this->
object->setCourseEnd($crs_period->getEnd());
823 $this->
object->setOfflineStatus((
bool) !
$form->getInput(
'activation_online'));
826 $period =
$form->getItemByPostVar(
"access_period");
827 if ($period->getStart() && $period->getEnd()) {
829 $this->
object->setActivationStart($period->getStart()->get(
IL_CAL_UNIX));
830 $this->
object->setActivationEnd($period->getEnd()->get(
IL_CAL_UNIX));
831 $this->
object->setActivationVisibility((
int)
$form->getInput(
'activation_visibility'));
834 $this->
object->setActivationStart(
null);
835 $this->
object->setActivationEnd(
null);
839 $this->
object->setSubscriptionPassword(
$form->getInput(
'subscription_password'));
840 $this->
object->setSubscriptionStart(
null);
841 $this->
object->setSubscriptionEnd(
null);
843 $sub_type =
$form->getInput(
'subscription_type');
844 $sub_period =
$form->getItemByPostVar(
'subscription_period');
846 $this->
object->setSubscriptionType($sub_type);
848 if ($sub_period->getStart() && $sub_period->getEnd()) {
850 $this->
object->setSubscriptionStart($sub_period->getStart()->get(
IL_CAL_UNIX));
851 $this->
object->setSubscriptionEnd($sub_period->getEnd()->get(
IL_CAL_UNIX));
861 $this->
object->enableRegistrationAccessCode((
int)
$form->getInput(
'reg_code_enabled'));
862 $this->
object->setRegistrationAccessCode(
$form->getInput(
'reg_code'));
865 $this->
object->setCancellationEnd(
$form->getItemByPostVar(
"cancel_end")->getDate());
868 $this->
object->enableSubscriptionMembershipLimitation((
int)
$form->getInput(
'subscription_membership_limitation'));
869 $this->
object->setSubscriptionMaxMembers((
int)
$form->getInput(
'subscription_max'));
870 $this->
object->setSubscriptionMinMembers((
int)
$form->getInput(
'subscription_min'));
871 $old_autofill = $this->
object->hasWaitingListAutoFill();
872 switch ((
int)
$form->getInput(
'waiting_list')) {
874 $this->
object->enableWaitingList(
true);
875 $this->
object->setWaitingListAutoFill(
true);
879 $this->
object->enableWaitingList(
true);
880 $this->
object->setWaitingListAutoFill(
false);
884 $this->
object->enableWaitingList(
false);
885 $this->
object->setWaitingListAutoFill(
false);
890 $this->
object->setViewMode((
int)
$form->getInput(
'view_mode'));
894 $this->
object->setOrderType(
$form->getInput(
'sorting'));
898 $this->
object->setAboStatus((
int)
$form->getInput(
'abo'));
899 $this->
object->setShowMembers((
int)
$form->getInput(
'show_members'));
901 $this->
object->setShowMembersExport((
int)
$form->getInput(
'show_members_export'));
902 $this->
object->setMailToMembersType((
int)
$form->getInput(
'mail_type'));
904 $this->
object->enableSessionLimit((
int)
$form->getInput(
'sl'));
906 $session_sp =
$form->getInput(
'sp');
907 $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1);
908 $session_sn =
$form->getInput(
'sn');
909 $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1);
910 $this->
object->setAutoNotification(
$form->getInput(
'auto_notification') == 1 ?
true :
false);
913 $show_lp_sync_confirmation =
false;
916 if (isset(
$_POST[
'status_dt'])) {
921 $show_lp_sync_confirmation =
true;
923 $this->
object->setStatusDetermination((
int)
$form->getInput(
'status_dt'));
927 if (!$old_autofill && $this->object->hasWaitingListAutoFill()) {
928 $this->
object->handleAutoFill();
930 $this->
object->update();
933 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
935 $this->object->getId(),
949 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
955 if ($show_lp_sync_confirmation) {
960 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
962 if (!$ecs->handleSettingsUpdate()) {
963 $form->setValuesByPost();
975 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
977 $cgui->setFormAction($this->ctrl->getFormAction($this,
"setLPSync"));
978 $cgui->setHeaderText($this->lng->txt(
"crs_status_determination_sync"));
979 $cgui->setCancel($this->lng->txt(
"cancel"),
"edit");
980 $cgui->setConfirm($this->lng->txt(
"confirm"),
"setLPSync");
982 $tpl->setContent($cgui->getHTML());
988 $this->
object->update();
990 $this->
object->syncMembersStatusWithLP();
993 $this->ctrl->redirect($this,
"edit");
1005 $this->tabs_gui->setSubTabActive(
'crs_settings');
1011 parent::editObject();
1024 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1025 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
1028 $form->setTitle($this->lng->txt(
'crs_edit'));
1030 $form->addCommandButton(
'update', $this->lng->txt(
'save'));
1031 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
1033 $form->setFormAction($this->ctrl->getFormAction($this,
'update'));
1037 $title->setSubmitFormOnEnter(
true);
1038 $title->setValue($this->object->getTitle());
1041 $title->setRequired(
true);
1046 $desc->setValue($this->object->getLongDescription());
1049 $form->addItem($desc);
1055 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1057 $cdur->setInfo($this->lng->txt(
'crs_period_info'));
1058 if ($this->object->getCourseStart()) {
1059 $cdur->setStart($this->object->getCourseStart());
1061 if ($this->object->getCourseStart()) {
1062 $cdur->setEnd($this->object->getCourseEnd());
1064 $form->addItem($cdur);
1069 $this->lng->loadLanguageModule(
'rep');
1072 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
1075 $online =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_online'),
'activation_online');
1076 $online->setChecked(!$this->object->getOfflineStatus());
1077 $online->setInfo($this->lng->txt(
'crs_activation_online_info'));
1078 $form->addItem($online);
1085 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1087 $dur->setShowTime(
true);
1090 $form->addItem($dur);
1092 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'activation_visibility');
1093 $visible->setInfo($this->lng->txt(
'crs_activation_limited_visibility_info'));
1094 $visible->setChecked($this->object->getActivationVisibility());
1095 $dur->addSubItem($visible);
1099 $section->setTitle($this->lng->txt(
'crs_reg'));
1102 $reg_proc =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_registration_type'),
'subscription_type');
1103 $reg_proc->setValue(
1105 ? $this->object->getSubscriptionType()
1111 $reg_proc->addOption($opt);
1116 $pass->setRequired(
true);
1117 $pass->setInfo($this->lng->txt(
'crs_reg_password_info'));
1118 $pass->setSubmitFormOnEnter(
true);
1120 $pass->setMaxLength(32);
1121 $pass->setValue($this->object->getSubscriptionPassword());
1123 $opt->addSubItem(
$pass);
1124 $reg_proc->addOption($opt);
1127 $opt->setInfo($this->lng->txt(
'crs_registration_confirmation_info'));
1128 $reg_proc->addOption($opt);
1131 $opt->setInfo($this->lng->txt(
'crs_registration_deactivated'));
1132 $reg_proc->addOption($opt);
1134 $form->addItem($reg_proc);
1138 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'crs_reg_code'),
'reg_code_enabled');
1139 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1140 $reg_code->setValue(1);
1141 $reg_code->setInfo($this->lng->txt(
'crs_reg_code_enabled_info'));
1149 #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
1151 if (!$this->object->getRegistrationAccessCode()) {
1152 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1156 $reg_link->setValue($this->object->getRegistrationAccessCode());
1157 $form->addItem($reg_link);
1160 include_once
'./Services/Link/classes/class.ilLink.php';
1161 $val =
ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(),
'_rcode' . $this->object->getRegistrationAccessCode());
1162 $link->setHTML(
'<font class="small">' . $val .
'</font>');
1163 $reg_code->addSubItem($link);
1165 $form->addItem($reg_code);
1168 include_once
"Services/Form/classes/class.ilDateDurationInputGUI.php";
1170 $sdur->setShowTime(
true);
1171 if ($this->object->getSubscriptionStart()) {
1174 if ($this->object->getSubscriptionEnd()) {
1177 $form->addItem($sdur);
1180 $cancel =
new ilDateTimeInputGUI($this->lng->txt(
'crs_cancellation_end'),
'cancel_end');
1181 $cancel->setInfo($this->lng->txt(
'crs_cancellation_end_info'));
1182 $cancel_end = $this->
object->getCancellationEnd();
1184 $cancel->setDate($cancel_end);
1186 $form->addItem($cancel);
1189 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'crs_subscription_max_members_short'),
'subscription_membership_limitation');
1190 $lim->setInfo($this->lng->txt(
'crs_subscription_max_members_short_info'));
1192 $lim->setChecked($this->object->isSubscriptionMembershipLimited());
1195 $min->setSubmitFormOnEnter(
true);
1197 $min->setMaxLength(4);
1198 $min->setValue($this->object->getSubscriptionMinMembers() ? $this->object->getSubscriptionMinMembers() :
'');
1199 $min->setTitle($this->lng->txt(
'crs_subscription_min_members'));
1200 $min->setInfo($this->lng->txt(
'crs_subscription_min_members_info'));
1201 $lim->addSubItem($min);
1204 $max->setSubmitFormOnEnter(
true);
1206 $max->setMaxLength(4);
1207 $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() :
'');
1208 $max->setTitle($this->lng->txt(
'crs_subscription_max_members'));
1209 $max->setInfo($this->lng->txt(
'crs_reg_max_info'));
1211 $lim->addSubItem($max);
1233 $wait->addOption($option);
1235 $option =
new ilRadioOption($this->lng->txt(
'crs_waiting_list_no_autofill'), 1);
1236 $option->setInfo($this->lng->txt(
'crs_wait_info'));
1237 $wait->addOption($option);
1239 $option =
new ilRadioOption($this->lng->txt(
'crs_waiting_list_autofill'), 2);
1240 $option->setInfo($this->lng->txt(
'crs_waiting_list_autofill_info'));
1241 $wait->addOption($option);
1243 if ($this->object->hasWaitingListAutoFill()) {
1245 } elseif ($this->object->enabledWaitingList()) {
1249 $lim->addSubItem($wait);
1251 $form->addItem($lim);
1255 $pres->setTitle($this->lng->txt(
'crs_view_mode'));
1257 $form->addItem($pres);
1261 $view_type->setValue($this->object->getViewMode());
1264 $opts->setInfo($this->lng->txt(
'cntr_view_info_sessions'));
1265 $view_type->addOption($opts);
1270 $sess->setChecked($this->object->isSessionLimitEnabled());
1271 $sess->setInfo($this->lng->txt(
'sess_limit_info'));
1274 #$prev->setSubmitFormOnEnter(true);
1275 $prev->setMinValue(0);
1277 $this->object->getNumberOfPreviousSessions() == -1 ?
1279 $this->object->getNumberOfPreviousSessions()
1282 $prev->setMaxLength(3);
1283 $sess->addSubItem($prev);
1286 #$next->setSubmitFormOnEnter(true);
1287 $next->setMinValue(0);
1289 $this->object->getNumberOfNextSessions() == -1 ?
1291 $this->object->getNumberOfnextSessions()
1294 $next->setMaxLength(3);
1295 $sess->addSubItem($next);
1297 $opts->addSubItem(
$sess);
1303 $optsi->setInfo($this->lng->txt(
'cntr_view_info_simple'));
1304 $view_type->addOption($optsi);
1307 $optbt->setInfo($this->lng->txt(
'cntr_view_info_by_type'));
1308 $view_type->addOption($optbt);
1311 $opto->setInfo($this->lng->txt(
'crs_view_info_objective'));
1312 $view_type->addOption($opto);
1315 $optt->setInfo($this->lng->txt(
'crs_view_info_timing'));
1316 $view_type->addOption($optt);
1318 $form->addItem($view_type);
1333 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1335 include_once
'./Services/Object/classes/class.ilObjectLP.php';
1337 if ($olp->getCurrentMode()) {
1339 $lp_status->setTitle($this->lng->txt(
'crs_course_status_of_users'));
1340 $form->addItem($lp_status);
1342 $lp_status_options =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_status_determination'),
"status_dt");
1344 $lp_status_options->setValue($this->object->getStatusDetermination());
1347 $this->lng->txt(
'crs_status_determination_lp'),
1349 $this->lng->txt(
'crs_status_determination_lp_info')
1351 $lp_status_options->addOption($lp_option);
1353 $this->lng->txt(
'crs_status_determination_manual'),
1357 $form->addItem($lp_status_options);
1363 $feat->setTitle($this->lng->txt(
'obj_features'));
1364 $form->addItem($feat);
1366 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1368 $this->object->getId(),
1383 $mem->setChecked($this->object->getShowMembers());
1384 $mem->setInfo($this->lng->txt(
'crs_show_members_info'));
1385 $form->addItem($mem);
1387 $part_list =
new ilCheckboxInputGUI($this->lng->txt(
'crs_show_member_export'),
'show_members_export');
1388 $part_list->setChecked($this->object->getShowMembersExport());
1389 $part_list->setInfo($this->lng->txt(
'crs_show_member_export_info'));
1390 $mem->addSubItem($part_list);
1395 $mail_type->setValue($this->object->getMailToMembersType());
1398 $this->lng->txt(
'crs_mail_tutors_only'),
1400 $this->lng->txt(
'crs_mail_tutors_only_info')
1402 $mail_type->addOption($mail_tutors);
1405 $this->lng->txt(
'crs_mail_all'),
1407 $this->lng->txt(
'crs_mail_all_info')
1409 $mail_type->addOption($mail_all);
1410 $form->addItem($mail_type);
1418 $not =
new ilCheckboxInputGUI($this->lng->txt(
'crs_auto_notification'),
'auto_notification');
1420 $not->setInfo($this->lng->txt(
'crs_auto_notification_info'));
1421 $not->setChecked($this->object->getAutoNotification());
1422 $form->addItem($not);
1430 $desk =
new ilCheckboxInputGUI($this->lng->txt(
'crs_add_remove_from_desktop'),
'abo');
1431 $desk->setChecked($this->object->getAboStatus());
1432 $desk->setInfo($this->lng->txt(
'crs_add_remove_from_desktop_info'));
1433 $form->addItem($desk);
1437 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1439 $ecs->addSettingsToForm(
$form,
'crs');
1459 $this->tabs_gui->setTabActive(
'settings');
1460 $this->tabs_gui->activateSubTab(
'icon_settings');
1466 $tpl->setContent($a_form->getHTML());
1471 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
1473 $form->setFormAction($this->ctrl->getFormAction($this));
1478 $form->addCommandButton(
'updateCourseIcons', $this->lng->txt(
'save'));
1485 include_once
'Modules/Course/classes/class.ilCourseFile.php';
1501 if (
$form->checkInput()) {
1503 if ($ilSetting->get(
"custom_icons")) {
1504 if (
$_POST[
"cont_icon_delete"]) {
1505 $this->
object->removeCustomIcon();
1507 $this->
object->saveIcons($_FILES[
"cont_icon"][
'tmp_name']);
1511 $this->ctrl->redirect($this,
"editCourseIcons");
1514 $form->setValuesByPost();
1528 $this->tabs_gui->addSubTabTarget(
1530 $this->ctrl->getLinkTarget($this,
'edit'),
1535 $this->tabs_gui->addSubTabTarget(
1536 "crs_info_settings",
1537 $this->ctrl->getLinkTarget($this,
'editInfo'),
1542 $this->tabs_gui->addSubTabTarget(
1544 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerGUI',
'listConditions'),
1546 "ilConditionHandlerGUI"
1549 $this->tabs_gui->addSubTabTarget(
1550 "crs_start_objects",
1551 $this->ctrl->getLinkTargetByClass(
'ilContainerStartObjectsGUI',
'listStructure'),
1556 $this->tabs_gui->addSubTabTarget(
1558 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1563 if ($lti_settings->hasSettingsAccess()) {
1564 $this->tabs_gui->addSubTabTarget(
1566 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1571 if ($this->
ilias->getSetting(
"custom_icons")) {
1572 $this->tabs_gui->addSubTabTarget(
1574 $this->ctrl->getLinkTarget($this,
'editCourseIcons'),
1581 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
1583 $this->tabs_gui->addSubTabTarget(
1585 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
1592 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1593 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1596 $this->tabs_gui->addSubTabTarget(
1597 'crs_custom_user_fields',
1598 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1600 'ilobjectcustomuserfieldsgui'
1605 include_once
"Services/Certificate/classes/class.ilCertificate.php";
1607 $this->tabs_gui->addSubTabTarget(
1609 $this->ctrl->getLinkTargetByClass(
"ilcertificategui",
"certificateeditor"),
1615 if ($this->object->getUseNews()) {
1616 $this->tabs_gui->addSubTab(
1617 'obj_news_settings',
1618 $this->lng->txt(
"cont_news_settings"),
1619 $this->ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
1623 if ($this->object->getShowMembersExport()) {
1624 $this->tabs_gui->addSubTab(
1626 $this->lng->txt(
'crs_show_member_export_settings'),
1627 $this->ctrl->getLinkTargetByClass(
'ilmemberexportsettingsgui',
'')
1642 && !$this->isActiveAdministrationPanel()) {
1645 parent::showPossibleSubObjects();
1655 $this->
object->removeSmallIcon();
1656 $this->ctrl->redirect($this,
'editCourseIcons');
1666 $this->
object->removeBigIcon();
1667 $this->ctrl->redirect($this,
'editCourseIcons');
1678 $this->
object->removeTinyIcon();
1679 $this->ctrl->redirect($this,
'editCourseIcons');
1691 $a_new_object->getMemberObject()->updateNotification(
$ilUser->getId(),
$ilSetting->get(
'mail_crs_admin_notification',
true));
1693 $a_new_object->getMemberObject()->updateContact(
$ilUser->getId(), 1);
1698 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1706 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
1709 $this->ctrl->getLinkTarget($this,
"edit",
"",
false,
false)
1723 if (isset(
$_GET[
'admin_hide'])) {
1724 $ilUser->writePref(
'crs_admin_hide', (
int)
$_GET[
'admin_hide']);
1726 if (isset(
$_GET[
'tutor_hide'])) {
1727 $ilUser->writePref(
'crs_tutor_hide', (
int)
$_GET[
'tutor_hide']);
1729 if (isset(
$_GET[
'member_hide'])) {
1730 $ilUser->writePref(
'crs_member_hide', (
int)
$_GET[
'member_hide']);
1732 if (isset(
$_GET[
'subscriber_hide'])) {
1733 $ilUser->writePref(
'crs_subscriber_hide', (
int)
$_GET[
'subscriber_hide']);
1735 if (isset(
$_GET[
'wait_hide'])) {
1736 $ilUser->writePref(
'crs_wait_hide', (
int)
$_GET[
'wait_hide']);
1738 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
1740 if (isset(
$_GET[
'role_hide_' . $role_id])) {
1741 $ilUser->writePref(
'crs_role_hide_' . $role_id, (
int)
$_GET[
'role_hide_' . $role_id]);
1748 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1749 $this->show_tracking =
1754 if ($this->show_tracking) {
1755 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
1757 $this->show_tracking = $olp->isActive();
1760 if ($this->show_tracking) {
1761 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1766 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1769 if ($privacy->enabledCourseAccessTimes()) {
1770 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
1774 $do_prtf = (is_array($selected_columns) &&
1775 in_array(
'prtf', $selected_columns) &&
1778 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
1781 $this->ctrl->getLinkTarget($this,
"members")
1785 foreach ((array) $ids as $usr_id) {
1787 $tmp_data[
'firstname'] =
$name[
'firstname'];
1788 $tmp_data[
'lastname'] =
$name[
'lastname'];
1790 $tmp_data[
'passed'] = $this->
object->getMembersObject()->hasPassed($usr_id) ? 1 : 0;
1792 $tmp_data[
'passed_info'] = $this->
object->getMembersObject()->getPassedInfo($usr_id);
1794 $tmp_data[
'notification'] = $this->
object->getMembersObject()->isNotificationEnabled($usr_id) ? 1 : 0;
1795 $tmp_data[
'blocked'] = $this->
object->getMembersObject()->isBlocked($usr_id) ? 1 : 0;
1797 $tmp_data[
'contact'] = $this->
object->getMembersObject()->isContact($usr_id) ? 1 : 0;
1800 $tmp_data[
'usr_id'] = $usr_id;
1802 if ($this->show_tracking) {
1803 if (in_array($usr_id, $completed)) {
1805 } elseif (in_array($usr_id, $in_progress)) {
1807 } elseif (in_array($usr_id,
$failed)) {
1814 if ($privacy->enabledCourseAccessTimes()) {
1815 if (isset($progress[$usr_id][
'ts']) and $progress[$usr_id][
'ts']) {
1816 $tmp_data[
'access_ut'] = $progress[$usr_id][
'ts'];
1819 $tmp_data[
'access_ut'] = 0;
1820 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
1825 $tmp_data[
'prtf'] = $all_prtf[$usr_id];
1828 $members[$usr_id] = $tmp_data;
1830 return $members ? $members : array();
1843 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1846 include_once
'./Services/Object/classes/class.ilObjectLP.php';
1849 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
1850 $marks =
new ilLPMarks($this->object->getId(), $a_member_id);
1853 if ($marks->getCompleted() != $a_has_passed) {
1854 $marks->setCompleted($a_has_passed);
1858 include_once(
"./Modules/Course/classes/class.ilCourseAppEventListener.php");
1861 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
1876 if ($this->object->isSubscriptionMembershipLimited() and $this->object->getSubscriptionMaxMembers() and
1877 $this->object->getSubscriptionMaxMembers() <= $this->object->getMembersObject()->getCountMembers()) {
1883 if ($number = $this->object->getMembersObject()->autoFillSubscribers()) {
1899 if ($this->object->getMembersObject()->isLastAdmin(
$ilUser->getId())) {
1905 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
1907 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
1909 $cgui->setHeaderText($this->lng->txt(
'crs_unsubscribe_sure'));
1910 $cgui->setFormAction($this->ctrl->getFormAction($this));
1911 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancel");
1912 $cgui->setConfirm($this->lng->txt(
"crs_unsubscribe"),
"performUnsubscribe");
1913 $this->tpl->setContent($cgui->getHTML());
1930 $this->
object->getMembersObject()->delete($this->
ilias->account->getId());
1931 $this->
object->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->
ilias->account->getId());
1932 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNSUBSCRIBE,
$ilUser->getId());
1936 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->tree->getParentId($this->ref_id));
1937 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1945 if (
$GLOBALS[
'ilAccess']->checkAccess(
'visible',
'', $this->ref_id)) {
1948 $this->ctrl->getLinkTargetByClass(
1949 array(
"ilobjcoursegui",
"ilinfoscreengui"),
1955 if (
$GLOBALS[
'ilAccess']->checkAccess(
'leave',
'', $this->object->getRefId()) and $this->object->getMemberObject()->isMember()) {
1958 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
1973 $this->tabs_gui->addTab(
1975 $this->lng->txt(
"content"),
1976 $this->ctrl->getLinkTarget($this,
"view")
1987 $ilAccess =
$GLOBALS[
'DIC']->access();
1989 $ilHelp->setScreenIdComponent(
"crs");
1991 $this->ctrl->setParameter($this,
"ref_id", $this->ref_id);
1993 if ($ilAccess->checkAccess(
'read',
'', $this->ref_id)) {
1995 $this->tabs_gui->activateTab(
'view_content');
1996 if ($this->object->isNewsTimelineEffective()) {
1997 if (!$this->object->isNewsTimelineLandingPageEffective()) {
2000 $this->tabs_gui->addTab(
2002 $lng->txt(
"cont_news_timeline_tab"),
2003 $this->ctrl->getLinkTargetByClass(
"ilnewstimelinegui",
"show")
2005 if ($this->object->isNewsTimelineLandingPageEffective()) {
2014 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2015 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
2017 $this->tabs_gui->addTarget(
2019 $this->ctrl->getLinkTargetByClass(
'illoeditorgui',
''),
2026 $ilAccess->checkAccess(
'visible',
'', $this->ref_id) ||
2027 $ilAccess->checkAccess(
'join',
'', $this->ref_id) ||
2028 $ilAccess->checkAccess(
'read',
'', $this->ref_id)
2035 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilinfoscreengui"
2036 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
2039 $this->tabs_gui->addTarget(
2041 $this->ctrl->getLinkTargetByClass(
2042 array(
"ilobjcoursegui",
"ilinfoscreengui"),
2051 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2052 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilconditionhandlergui"
2053 &&
$_GET[
"item_id"] ==
"")
2056 $this->tabs_gui->addTarget(
2058 $this->ctrl->getLinkTarget($this,
"edit"),
2059 array(
"edit",
"editMapSettings",
"editCourseIcons",
"listStructure"),
2068 include_once
'./Services/Mail/classes/class.ilMail.php';
2071 include_once
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
2073 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
2076 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2077 include_once
'Services/Badge/classes/class.ilBadgeHandler.php';
2079 $this->tabs_gui->addTarget(
2080 "obj_tool_setting_badges",
2081 $this->ctrl->getLinkTargetByClass(
"ilbadgemanagementgui",
""),
2083 "ilbadgemanagementgui"
2089 include_once(
"./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
2091 $this->object->getId(),
2096 if ($skmg_set->get(
"enable_skmg")) {
2097 $this->tabs_gui->addTarget(
2098 "obj_tool_setting_skills",
2099 $this->ctrl->getLinkTargetByClass(array(
"ilcontainerskillgui",
"ilcontskillpresentationgui"),
""),
2101 array(
"ilcontainerskillgui",
"ilcontskillpresentationgui",
"ilcontskilladmingui")
2107 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2109 $this->tabs_gui->addTarget(
2110 'learning_progress',
2111 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
2113 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
2118 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
2119 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)
2121 $this->tabs_gui->addTarget(
2123 $this->ctrl->getLinkTargetByClass(
'illicenseoverviewgui',
''),
2125 "illicenseoverviewgui"
2130 if ($ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
2131 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
2133 $mdtab = $mdgui->getTab();
2135 $this->tabs_gui->addTarget(
2139 "ilobjectmetadatagui"
2144 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2145 $this->tabs_gui->addTarget(
2147 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
2153 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)) {
2154 $this->tabs_gui->addTarget(
2156 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
2157 array(
"perm",
"info",
"owner"),
2162 if ($this->ctrl->getTargetScript() ==
"adm_object.php") {
2163 $this->tabs_gui->addTarget(
2165 $this->ctrl->getLinkTarget($this,
"owner"),
2170 if ($this->tree->getSavedNodeData($this->ref_id)) {
2171 $this->tabs_gui->addTarget(
2173 $this->ctrl->getLinkTarget($this,
"trash"),
2180 if ($ilAccess->checkAccess(
'join',
'', $this->ref_id)
2181 and !$this->object->getMemberObject()->isAssigned()) {
2182 include_once
'./Modules/Course/classes/class.ilCourseWaitingList.php';
2184 $this->tabs_gui->addTab(
2186 $this->lng->txt(
'membership_leave'),
2187 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
2190 $this->tabs_gui->addTarget(
2192 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
"show"),
2198 if ($ilAccess->checkAccess(
'leave',
'', $this->object->getRefId())
2199 and $this->object->getMemberObject()->isMember()) {
2200 $this->tabs_gui->addTarget(
2202 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
2214 $next_class = $this->ctrl->getNextClass($this);
2215 $cmd = $this->ctrl->getCmd();
2224 $ilAccess->checkAccess(
'read',
'',
$_GET[
'ref_id'])) {
2225 include_once(
"./Services/Link/classes/class.ilLink.php");
2226 $ilNavigationHistory->addItem(
2233 $header_action =
true;
2235 switch ($next_class) {
2236 case 'illtiproviderobjectsettinggui':
2239 $this->tabs_gui->activateTab(
'settings');
2240 $this->tabs_gui->activateSubTab(
'lti_provider');
2242 $lti_gui->setCustomRolesForSelection(
$GLOBALS[
'DIC']->rbac()->review()->
getLocalRoles($this->object->getRefId()));
2243 $lti_gui->offerLTIRolesForSelection(
false);
2244 $this->ctrl->forwardCommand($lti_gui);
2247 case 'ilcoursemembershipgui':
2249 $this->tabs_gui->activateTab(
'members');
2251 include_once
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
2253 $this->ctrl->forwardCommand($mem_gui);
2256 case "ilinfoscreengui":
2260 case 'ilobjectmetadatagui':
2261 if (!$ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2262 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
2264 $this->tabs_gui->setTabActive(
'meta_data');
2265 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
2267 $this->ctrl->forwardCommand($md_gui);
2270 case 'ilcourseregistrationgui':
2271 $this->ctrl->setReturn($this,
'');
2272 $this->tabs_gui->setTabActive(
'join');
2273 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2275 $this->ctrl->forwardCommand($registration);
2278 case 'ilobjectcustomuserfieldsgui':
2279 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
2282 $this->tabs_gui->activateTab(
'settings');
2283 $this->tabs_gui->activateSubTab(
'crs_custom_user_fields');
2284 $this->ctrl->forwardCommand($cdf_gui);
2287 case "ilcourseobjectivesgui":
2288 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2290 $this->ctrl->setReturn($this,
"");
2292 $ret =&$this->ctrl->forwardCommand($reg_gui);
2295 case 'ilobjcoursegroupinggui':
2296 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
2298 $this->ctrl->setReturn($this,
'edit');
2300 $this->tabs_gui->activateTab(
'settings');
2301 $this->tabs_gui->activateSubTab(
'groupings');
2303 $this->ctrl->forwardCommand($crs_grp_gui);
2307 $this->tabs_gui->setTabActive(
'none');
2317 case "ilconditionhandlergui":
2318 include_once
'./Services/AccessControl/classes/class.ilConditionHandlerGUI.php';
2321 $this->tabs_gui->activateTab(
'settings');
2322 $this->tabs_gui->activateSubTab(
'preconditions');
2324 $this->ctrl->forwardCommand($new_gui);
2327 case "illearningprogressgui":
2328 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
2332 $this->object->getRefId(),
2335 $this->ctrl->forwardCommand($new_gui);
2336 $this->tabs_gui->setTabActive(
'learning_progress');
2340 case 'illicenseoverviewgui':
2341 include_once(
"./Services/License/classes/class.ilLicenseOverviewGUI.php");
2343 $ret =&$this->ctrl->forwardCommand($license_gui);
2344 $this->tabs_gui->setTabActive(
'licenses');
2347 case 'ilpermissiongui':
2348 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
2349 $this->tabs_gui->setTabActive(
'perm_settings');
2351 $ret =&$this->ctrl->forwardCommand($perm_gui);
2354 case 'ilcalendarpresentationgui':
2355 include_once(
'./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
2357 $ret = $this->ctrl->forwardCommand($cal);
2358 $header_action =
false;
2361 case 'ilcoursecontentinterface':
2363 $this->initCourseContentInterface();
2364 $this->cci_obj->cci_setContainer($this);
2366 $this->ctrl->forwardCommand($this->cci_obj);
2368 $this->tabs_gui->setTabActive(
'content');
2371 case 'ilcoursecontentgui':
2372 $this->ctrl->setReturn($this,
'members');
2373 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
2375 $this->ctrl->forwardCommand($course_content_obj);
2378 case 'ilpublicuserprofilegui':
2379 $this->tpl->enableDragDropFileUpload(
null);
2380 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
2382 $this->tabs_gui->setTabActive(
'members');
2384 $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass([
"ilCourseMembershipGUI",
"ilUsersGalleryGUI"],
'view'));
2385 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
2386 $html = $this->ctrl->forwardCommand($profile_gui);
2387 $this->tpl->setVariable(
"ADM_CONTENT",
$html);
2391 case 'ilmemberagreementgui':
2392 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
2393 $this->tabs_gui->clearTargets();
2395 $this->ctrl->setReturn($this,
'');
2397 $this->ctrl->forwardCommand($agreement);
2402 case "ilcontainerpagegui":
2405 $this->tpl->setContent(
$ret);
2409 case "ilcontainerstartobjectspagegui":
2411 include_once
"Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
2413 $ret = $this->ctrl->forwardCommand($pgui);
2415 $this->tpl->setContent(
$ret);
2419 case 'ilobjectcopygui':
2420 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
2422 $cp->setType(
'crs');
2423 $this->ctrl->forwardCommand($cp);
2426 case "ilobjstylesheetgui":
2432 $this->tabs_gui->setTabActive(
'export');
2433 include_once
'./Services/Export/classes/class.ilExportGUI.php';
2435 $exp->addFormat(
'xml');
2436 $this->ctrl->forwardCommand($exp);
2439 case "ilcommonactiondispatchergui":
2440 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
2442 $this->ctrl->forwardCommand($gui);
2445 case 'ildidactictemplategui':
2446 $this->ctrl->setReturn($this,
'edit');
2447 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
2449 $this->ctrl->forwardCommand($did);
2452 case "ilcertificategui":
2453 $this->tabs_gui->activateTab(
"settings");
2456 include_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
2457 include_once
"./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
2459 $this->ctrl->forwardCommand($output_gui);
2462 case 'ilobjectservicesettingsgui':
2463 $this->ctrl->setReturn($this,
'edit');
2465 $this->tabs_gui->activateTab(
'settings');
2466 $this->tabs_gui->acltivateSubTab(
'tool_settings');
2468 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2471 $this->object->getId(),
2476 $this->ctrl->forwardCommand(
$service);
2479 case 'illoeditorgui':
2480 #$this->tabs_gui->clearTargets();
2481 #$this->tabs_gui->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,''));
2482 $this->tabs_gui->activateTab(
'crs_objectives');
2484 include_once
'./Modules/Course/classes/Objectives/class.ilLOEditorGUI.php';
2486 $this->ctrl->forwardCommand(
$editor);
2489 case 'ilcontainerstartobjectsgui':
2490 $this->ctrl->setReturn($this,
'edit');
2491 $this->tabs_gui->clearTargets();
2492 $this->tabs_gui->setBackTarget(
2493 $this->lng->txt(
"back_to_crs_content"),
2494 $this->ctrl->getLinkTarget($this,
"edit")
2496 $this->tabs_gui->addTab(
2498 $this->lng->txt(
"crs_start_objects"),
2499 $this->ctrl->getLinkTargetByClass(
"ilcontainerstartobjectsgui",
"listStructure")
2502 $ilHelp->setScreenIdComponent(
"crs");
2504 include_once
'./Services/Container/classes/class.ilContainerStartObjectsGUI.php';
2506 $this->ctrl->forwardCommand($stgui);
2509 case 'illomembertestresultgui':
2510 include_once
'./Modules/Course/classes/Objectives/class.ilLOMemberTestResultGUI.php';
2511 $GLOBALS[
'ilCtrl']->setReturn($this,
'members');
2512 $GLOBALS[
'ilTabs']->clearTargets();
2515 $GLOBALS[
'ilCtrl']->getLinkTarget($this,
'members')
2519 $this->ctrl->forwardCommand($result_view);
2522 case 'ilmailmembersearchgui':
2523 include_once
'Services/Mail/classes/class.ilMail.php';
2528 $ilAccess->checkAccess(
'manage_members',
"", $this->object->getRefId())) &&
2529 $rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
2530 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),
$ilErr->MESSAGE);
2533 $this->tabs_gui->setTabActive(
'members');
2535 include_once
'./Services/Contact/classes/class.ilMailMemberSearchGUI.php';
2536 include_once
'./Services/Contact/classes/class.ilMailMemberCourseRoles.php';
2539 $mail_search->setObjParticipants(
2542 $this->ctrl->forwardCommand($mail_search);
2545 case 'ilbadgemanagementgui':
2546 $this->tabs_gui->setTabActive(
'obj_tool_setting_badges');
2547 include_once
'Services/Badge/classes/class.ilBadgeManagementGUI.php';
2549 $this->ctrl->forwardCommand($bgui);
2552 case "ilcontainernewssettingsgui":
2555 $this->tabs_gui->activateTab(
'settings');
2556 $this->tabs_gui->activateSubTab(
'obj_news_settings');
2557 include_once(
"./Services/Container/classes/class.ilContainerNewsSettingsGUI.php");
2559 $this->ctrl->forwardCommand($news_set_gui);
2562 case "ilnewstimelinegui":
2563 $this->tabs_gui->setTabActive(
'news_timeline');
2564 include_once(
"./Services/News/classes/class.ilNewsTimelineGUI.php");
2566 $t->setUserEditAll($ilAccess->checkAccess(
'write',
'', $this->object->getRefId(),
'grp'));
2568 $this->ctrl->forwardCommand(
$t);
2569 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
2572 $this->object->getId(),
2573 $this->object->getRefId(),
2578 case 'ilmemberexportsettingsgui':
2580 $this->tabs_gui->activateTab(
'properties');
2581 $this->tabs_gui->activateSubTab(
'export_members');
2582 include_once
'./Services/Membership/classes/Export/class.ilMemberExportSettingsGUI.php';
2584 $this->ctrl->forwardCommand($settings_gui);
2588 case "ilcontainerskillgui":
2589 $this->tabs_gui->activateTab(
'obj_tool_setting_skills');
2590 include_once(
"./Services/Container/Skills/classes/class.ilContainerSkillGUI.php");
2592 $this->ctrl->forwardCommand($gui);
2608 if ($cmd ==
'infoScreenGoto') {
2613 $cmd =
'infoScreen';
2617 if (!$this->creation_mode) {
2618 if ($cmd ==
"infoScreen") {
2626 if (!$this->creation_mode
2627 && $cmd !=
'infoScreen'
2628 && $cmd !=
'sendfile'
2629 && $cmd !=
'unsubscribe'
2630 && $cmd !=
'performUnsubscribe'
2631 && !$ilAccess->checkAccess(
"read",
'', $this->object->getRefId())
2633 || $cmd ==
'subscribe') {
2634 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
2635 if (
$rbacsystem->checkAccess(
'join', $this->object->getRefId()) &&
2637 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2638 $this->ctrl->redirectByClass(
"ilCourseRegistrationGUI");
2645 if ($cmd ==
'listObjectives') {
2646 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2648 $this->ctrl->setReturn($this,
"");
2650 $ret =&$this->ctrl->forwardCommand($obj_gui);
2660 if ($cmd ==
"" && $this->object->isNewsTimelineLandingPageEffective()) {
2661 $this->ctrl->redirectbyclass(
"ilnewstimelinegui");
2673 if ($header_action) {
2690 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
2695 if (!$this->object->getMemberObject()->isAssigned()) {
2699 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
2704 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2705 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
2711 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Missing course confirmation.');
2715 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
2717 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Missing required fields');
2735 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
2738 $buffer = $lic_set->get(
"license_warning");
2740 include_once(
"./Services/License/classes/class.ilLicense.php");
2742 foreach ($licensed_items as $item) {
2743 $license =
new ilLicense($item[
'obj_id']);
2744 $remaining = $license->getRemainingLicenses();
2746 $lng->loadlanguageModule(
"license");
2757 return array(
"ilCourseRegisterGUI",
'ilConditionHandlerGUI');
2763 switch ($this->ctrl->getCmd()) {
2765 #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
2775 $GLOBALS[
'ilCtrl']->redirectByClass(
'ilcoursemembershipgui');
2781 public static function _goto($a_target, $a_add =
"")
2785 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2786 if (substr($a_add, 0, 5) ==
'rcode') {
2787 if (
$ilUser->getId() == ANONYMOUS_USER_ID) {
2790 "login.php?target=" .
$_GET[
"target"] .
"&cmd=force_login&lang=" .
2803 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"manage_members",
"", $a_target)) {
2807 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
2811 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
2814 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
2816 $lng->txt(
"msg_no_perm_read_item"),
2835 $this->tabs_gui->activateTab(
'settings');
2836 $this->tabs_gui->activateSubTab(
'crs_map_settings');
2839 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
2843 $latitude = $this->
object->getLatitude();
2844 $longitude = $this->
object->getLongitude();
2845 $zoom = $this->
object->getLocationZoom();
2848 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
2850 $latitude =
$def[
"latitude"];
2851 $longitude =
$def[
"longitude"];
2852 $zoom =
$def[
"zoom"];
2855 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2859 $form->setTitle($this->lng->txt(
"crs_map_settings"));
2863 $this->lng->txt(
"crs_enable_map"),
2866 $public->setValue(
"1");
2867 $public->setChecked($this->object->getEnableCourseMap());
2868 $form->addItem($public);
2872 $this->lng->txt(
"crs_map_location"),
2875 $loc_prop->setLatitude($latitude);
2876 $loc_prop->setLongitude($longitude);
2877 $loc_prop->setZoom($zoom);
2878 $form->addItem($loc_prop);
2880 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
2882 $this->tpl->setVariable(
"ADM_CONTENT",
$form->getHTML());
2894 $this->
object->update();
2896 $ilCtrl->redirect($this,
"editMapSettings");
2911 'ilcoursecontentgui',
2914 $this->object->getAboStatus(),
2915 $this->object->getRefId(),
2916 $this->object->getId()
2931 $a_parent_ref_id = 0
2933 global
$lng, $ilAccess;
2936 if ($a_parent_ref_id == 0) {
2937 $a_parent_ref_id = $a_course_ref_id;
2941 if ($a_item_data[
'type'] ==
'tst' and
2943 $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));
2946 $a_item_list_gui->enableSubscribe($a_abo_status);
2948 $is_tutor = ($ilAccess->checkAccess(
2956 if ($a_show_path and $is_tutor) {
2957 $a_item_list_gui->addCustomProperty(
2959 ilContainer::_buildPath($a_item_data[
'ref_id'], $a_course_ref_id),
2973 if ($this->object->getType() !=
'crs') {
2976 if (!$ilAccess->checkAccess(
2979 $this->object->getRefId(),
2981 $this->object->getId()
2985 if ($this->object->enabledObjectiveView()) {
2996 if (!
$_SESSION[
'crs_timings_panel'][$this->object->getId()] or 1) {
2998 $this->tabs_gui->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"view"));
3000 $this->tabs_gui->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"disableAdministrationPanel"));
3004 $this->tabs_gui->addSubTabTarget(
3006 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editUserTimings')
3027 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
3030 if (is_array(
$_POST[$a_field][
'date'])) {
3031 $dt[
'year'] = (int)
$_POST[$a_field][
'date'][
'y'];
3032 $dt[
'mon'] = (int)
$_POST[$a_field][
'date'][
'm'];
3033 $dt[
'mday'] = (int)
$_POST[$a_field][
'date'][
'd'];
3034 $dt[
'hours'] = (int)
$_POST[$a_field][
'time'][
'h'];
3035 $dt[
'minutes'] = (int)
$_POST[$a_field][
'time'][
'm'];
3036 $dt[
'seconds'] = (int)
$_POST[$a_field][
'time'][
's'];
3038 $date = date_parse(
$_POST[$a_field][
'date'] .
" " .
$_POST[$a_field][
'time']);
3039 $dt[
'year'] = (int) $date[
'year'];
3040 $dt[
'mon'] = (int) $date[
'month'];
3041 $dt[
'mday'] = (int) $date[
'day'];
3042 $dt[
'hours'] = (int) $date[
'hour'];
3043 $dt[
'minutes'] = (int) $date[
'minute'];
3044 $dt[
'seconds'] = (int) $date[
'second'];
3062 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
3064 $confirm->setFormAction($this->ctrl->getFormAction($this));
3065 $confirm->setConfirm($this->lng->txt(
'reset'),
'reset');
3066 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
3068 $GLOBALS[
'tpl']->setContent($confirm->getHTML());
3076 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3078 $usr_results->delete();
3081 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestRun.php';
3082 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
3084 $this->object->getId(),
3088 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
3091 $tmp_obj_res->reset($this->object->getId());
3093 $ilUser->deletePref(
'crs_objectives_force_details_' . $this->object->getId());
3103 if ($ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
3107 include_once
'./Services/Container/classes/class.ilContainerStartObjects.php';
3109 $this->object->getRefId(),
3110 $this->object->getId()
3112 if (count($this->start_obj->getStartObjects()) &&
3113 !$this->start_obj->allFullfilled(
$ilUser->getId())) {
3128 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
3130 if (
$settings->isActive() and
$settings->getContainer() != $this->object->getRefId()) {
3131 $settings->setContainer($this->object->getRefId());
3135 parent::prepareOutput($a_show_subobjects);
3144 $link = chr(13) . chr(10) . chr(13) . chr(10);
3145 $link .= $this->lng->txt(
'crs_mail_permanent_link');
3146 $link .= chr(13) . chr(10) . chr(13) . chr(10);
3147 include_once
'./Services/Link/classes/class.ilLink.php';
3149 return rawurlencode(base64_encode($link));
3156 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3160 include_once
"Services/Certificate/classes/class.ilCertificate.php";
3164 $cert_url = $this->ctrl->getLinkTarget($this,
"deliverCertificate");
3166 $this->lng->loadLanguageModule(
"certificate");
3167 $lg->addCustomCommand($cert_url,
"download_certificate");
3172 $this->lng->txt(
"download_certificate"),
3180 include_once
"Services/Membership/classes/class.ilMembershipNotifications.php";
3183 if (!$noti->isCurrentUserActive()) {
3187 $this->lng->txt(
"crs_notification_deactivated")
3190 $this->ctrl->setParameter($this,
"crs_ntf", 1);
3191 $caption =
"crs_activate_notification";
3196 $this->lng->txt(
"crs_notification_activated")
3199 $this->ctrl->setParameter($this,
"crs_ntf", 0);
3200 $caption =
"crs_deactivate_notification";
3203 if ($noti->canCurrentUserEdit()) {
3204 $lg->addCustomCommand(
3205 $this->ctrl->getLinkTarget($this,
"saveNotification"),
3210 $this->ctrl->setParameter($this,
"crs_ntf",
"");
3222 if ($ilAccess->checkAccess(
'manage_members',
'', $this->ref_id)) {
3223 $user_id = $_REQUEST[
"member_id"];
3229 include_once
"Services/Certificate/classes/class.ilCertificate.php";
3234 $this->ctrl->redirect($this);
3237 include_once
"./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
3239 $certificate->outCertificate(array(
"user_id" => $user_id),
true);
3245 $this->ctrl->redirectByClass(array(
'ilrepositorygui',
'ilobjcoursegui',
'illoeditorgui'),
'materials');
3250 if (isset(
$_POST[
'position'][
"lobj"])) {
3251 $lobj =
$_POST[
'position'][
"lobj"];
3252 unset(
$_POST[
'position'][
"lobj"]);
3254 $objective_order = array();
3255 foreach ($lobj as $objective_id => $materials) {
3256 $objective_order[$objective_id] = $materials[0];
3257 unset($lobj[$objective_id][0]);
3261 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
3262 asort($objective_order);
3264 foreach (array_keys($objective_order) as $objective_id) {
3266 $obj->writePosition(++$pos);
3270 include_once
"Modules/Course/classes/class.ilCourseObjectiveMaterials.php";
3271 foreach ($lobj as $objective_id => $materials) {
3276 foreach (array_keys($materials) as $ass_id) {
3277 $objmat->writePosition($ass_id, ++$pos);
3282 return parent::saveSortingObject();
3291 include_once
'./Services/Link/classes/class.ilLink.php';
3301 $objective_id = (int) $_REQUEST[
'objective_id'];
3302 $test_id = (int) $_REQUEST[
'tid'];
3304 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3305 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
3306 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
3310 $this->object->getId(),
3313 $passed =
$res->getCompletedObjectiveIds();
3315 $has_completed =
false;
3316 if ($objective_id) {
3317 $objective_ids = array($objective_id);
3318 if (in_array($objective_id, $passed)) {
3319 $has_completed =
true;
3323 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
3327 if (count($objective_ids) == count($passed)) {
3328 $has_completed =
true;
3333 if ($has_completed) {
3339 include_once
'./Services/Link/classes/class.ilLink.php';
3351 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
3355 if ($a_objective_id) {
3356 $question = $this->lng->txt(
'crs_loc_objective_passed_confirmation');
3358 $question = $this->lng->txt(
'crs_loc_objectives_passed_confirmation');
3361 $confirm->addHiddenItem(
'objective_id', $a_objective_id);
3362 $confirm->addHiddenItem(
'tid', $a_test_id);
3363 $confirm->setConfirm($this->lng->txt(
'crs_loc_tst_start'),
'redirectLocToTestConfirmed');
3364 $confirm->setCancel($this->lng->txt(
'cancel'),
'view');
3368 $GLOBALS[
'tpl']->setContent($confirm->getHTML());
3381 $crs_admin = $this->
object->getDefaultAdminRole();
3382 $crs_member = $this->
object->getDefaultMemberRole();
3383 $local_roles = $this->
object->getLocalCourseRoles(
false);
3384 $crs_roles = array();
3387 if (in_array($crs_member, $local_roles)) {
3388 #$crs_roles[$crs_member] = ilObjRole::_getTranslation(array_search ($crs_member, $local_roles));
3389 #unset($local_roles[$crs_roles[$crs_member]]);
3392 foreach ($local_roles as
$title => $role_id) {
3400 if (count($a_exclude) > 0) {
3401 foreach ($a_exclude as $excluded_role) {
3402 if (isset($crs_roles[$excluded_role])) {
3403 unset($crs_roles[$excluded_role]);
3427 $this->ctrl->redirectByClass(
'ilUsersGalleryGUI');
3435 $this->ctrl->setReturn($this,
"view");
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
const IL_CRS_SUBSCRIPTION_LIMITED
const IL_CRS_VIEW_SESSIONS
const IL_CRS_ACTIVATION_UNLIMITED
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_ACTIVATION_LIMITED
const IL_CRS_SUBSCRIPTION_DEACTIVATED
const IL_CRS_SUBSCRIPTION_DIRECT
const IL_CRS_ADMIN
Base class for course and group participants.
static getInstance()
Constructor.
GUI class to create PDF certificates.
static isObjectActive($a_obj_id)
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(&$tpl)
show permanent link
forwardToStyleSheet()
Forward to style object.
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
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 setBlockedForLP($a_status)
Toggle LP blocking property status.
Test certificate adapter.
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 getDateTimeOfPassed($a_obj_id, $a_usr_id)
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)
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 _isEnabled()
Check, if licencing is enabled This check is called from the ilAccessHandler class.
const LIC_MODE_REPOSITORY
static _getLicensedChildObjects($a_ref_id)
Get a list of all sub objects with activated licensing.
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.
This class handles base functions for mail handling.
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.
removeSmallIconObject()
remove small icon
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?
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
editCourseIconsObject($a_form=null)
edit container icons
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()
checkLicenses($a_keep=false)
Check the remaining licenses of course objects and generate a message if raare.
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,...
updateCourseIconsObject()
update container icons
removeBigIconObject()
remove big icon
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
removeTinyIconObject()
remove small icon
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.
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
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
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 sendSuccess($a_info="", $a_keep=false)
Send Success Message 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 sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
if(@file_exists(dirname(__FILE__).'/lang/eng.php')) $certificate
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
redirection script todo: (a better solution should control the processing via a xml file)
if(isset($_POST['submit'])) $form
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
foreach($_POST as $key=> $value) $res
if($state['core:TerminatedAssocId'] !==null) $remaining