5 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
38 $this->ctrl->saveParameter($this,array(
"ref_id",
"cmdClass"));
43 $this->lng->loadLanguageModule(
'crs');
45 $this->SEARCH_USER = 1;
46 $this->SEARCH_GROUP = 2;
47 $this->SEARCH_COURSE = 3;
55 case "deleteSubscribers":
59 case "addSubscribers":
60 $this->addSubscribers();
63 case "addFromWaitingList":
64 $this->addFromWaitingList();
67 case "removeFromWaitingList":
86 if(isset(
$_POST[
'btn_pressed'][
'deleteMembers']))
90 elseif(
$_POST[
'btn_pressed'][
'sendMailToSelectedUsers'])
102 if(isset(
$_GET[
'member_id']))
108 $_POST[
'member'] = array_unique(array_merge((array)
$_POST[
'members'],
109 (array) $_POST[
'tutors'],
110 (array) $_POST[
'admins'],
111 (array) $_POST[
'waiting'],
112 (array) $_POST[
'subscribers'],
113 (array) $_POST[
'roles']
118 if (!count(
$_POST[
"member"]))
128 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
133 'rcp_to' => implode(
',',$rcps),
148 #ilUtil::sendSuccess($this->lng->txt("action_aborted"),true);
161 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
164 $part->updateNotification($ilUser->getId(), 1);
171 $this->ctrl->setCmd(
"view");
189 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
191 $this->ctrl->setCmdClass(get_class($course_content_obj));
192 $this->ctrl->setCmd(
'editUserTimings');
193 $this->ctrl->forwardCommand($course_content_obj);
214 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
221 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
225 if ($ilCtrl->getNextClass() !=
"ilcolumngui")
227 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
229 $this->
object->getRefId(),
'crs');
234 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
235 $this->ctrl->setReturn($this,
'view_content');
237 $this->ctrl->setCmdClass(get_class($agreement));
238 $this->ctrl->forwardCommand($agreement);
260 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
263 $this->ctrl->setCmdClass(get_class($course_content_obj));
264 $this->ctrl->forwardCommand($course_content_obj);
282 $this->ctrl->setCmd(
"showSummary");
283 $this->ctrl->setCmdClass(
"ilinfoscreengui");
297 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
300 $this->tabs_gui->setTabActive(
'info_short');
302 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
303 include_once
'Modules/Course/classes/class.ilCourseFile.php';
308 $info->enablePrivateNotes();
309 $info->enableFeedback();
311 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
313 $info->enableNewsEditing();
316 if(strlen($this->object->getImportantInformation()) or
317 strlen($this->object->getSyllabus()) or
320 $info->addSection($this->lng->txt(
'crs_general_informations'));
323 if(strlen($this->object->getImportantInformation()))
325 $info->addProperty($this->lng->txt(
'crs_important_info'),
329 if(strlen($this->object->getSyllabus()))
331 $info->addProperty($this->lng->txt(
'crs_syllabus'), nl2br(
337 $tpl =
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'Modules/Course');
339 foreach($files as
$file)
341 $tpl->setCurrentBlock(
"files");
342 $this->ctrl->setParameter($this,
'file_id',$file->getFileId());
343 $tpl->setVariable(
"DOWN_LINK",$this->ctrl->getLinkTarget($this,
'sendfile'));
344 $tpl->setVariable(
"DOWN_NAME",$file->getFileName());
345 $tpl->setVariable(
"DOWN_INFO_TXT",$this->lng->txt(
'crs_file_size_info'));
346 $tpl->setVariable(
"DOWN_SIZE",$file->getFileSize());
347 $tpl->setVariable(
"TXT_BYTES",$this->lng->txt(
'bytes'));
348 $tpl->parseCurrentBlock();
350 $info->addProperty($this->lng->txt(
'crs_file_download'),
354 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
357 $record_gui->parse();
360 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
363 if($this->object->hasContactData())
365 $info->addSection($this->lng->txt(
"crs_contact"));
367 if(strlen($this->object->getContactName()))
369 $info->addProperty($this->lng->txt(
"crs_contact_name"),
370 $this->
object->getContactName());
372 if(strlen($this->object->getContactResponsibility()))
374 $info->addProperty($this->lng->txt(
"crs_contact_responsibility"),
375 $this->
object->getContactResponsibility());
377 if(strlen($this->object->getContactPhone()))
379 $info->addProperty($this->lng->txt(
"crs_contact_phone"),
380 $this->
object->getContactPhone());
382 if($this->object->getContactEmail())
384 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
385 $emails = split(
",",$this->object->getContactEmail());
386 foreach ($emails as $email) {
387 $email = trim($email);
388 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true ,
'Modules/Course');
391 $etpl->setVariable(
"CONTACT_EMAIL", $email);
392 $mailString .= $etpl->get().
"<br />";
394 $info->addProperty($this->lng->txt(
"crs_contact_email"), $mailString);
396 if(strlen($this->object->getContactConsultation()))
398 $info->addProperty($this->lng->txt(
"crs_contact_consultation"),
399 nl2br($this->object->getContactConsultation()));
406 $this->lng->loadLanguageModule(
"rep");
407 $info->addSection($this->lng->txt(
"rep_activation_availability"));
408 $info->showLDAPRoleGroupMappingInfo();
411 if($this->object->getActivationUnlimitedStatus())
413 $info->addProperty($this->lng->txt(
"rep_activation_access"),
414 $this->lng->txt(
'crs_visibility_limitless'));
418 $info->addProperty($this->lng->txt(
'rep_activation_access'),
424 switch($this->object->getSubscriptionLimitationType())
427 $txt = $this->lng->txt(
"crs_info_reg_deactivated");
431 switch($this->object->getSubscriptionType())
434 $txt = $this->lng->txt(
"crs_info_reg_confirmation");
437 $txt = $this->lng->txt(
"crs_info_reg_direct");
440 $txt = $this->lng->txt(
"crs_info_reg_password");
446 $info->addProperty($this->lng->txt(
"crs_info_reg"),$txt);
451 if($this->object->getSubscriptionUnlimitedStatus())
453 $info->addProperty($this->lng->txt(
"crs_reg_until"),
454 $this->lng->txt(
'crs_unlimited'));
456 elseif($this->object->getSubscriptionStart() < time())
458 $info->addProperty($this->lng->txt(
"crs_reg_until"),
459 $this->lng->txt(
'crs_to').
' '.
462 elseif($this->object->getSubscriptionStart() > time())
464 $info->addProperty($this->lng->txt(
"crs_reg_until"),
465 $this->lng->txt(
'crs_from').
' '.
468 if ($this->object->isSubscriptionMembershipLimited())
470 include_once
'./Services/Membership/classes/class.ilParticipants.php';
472 $this->lng->txt(
"mem_free_places"),
485 $info->addProperty($this->lng->txt(
"crs_archive"),
492 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
495 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
498 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
502 $this->lng->loadLanguageModule(
'ps');
503 $info->addSection($this->lng->txt(
'crs_user_agreement_info'));
504 $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
508 $info->addProperty($this->lng->txt(
'ps_crs_user_fields'),$fields);
512 $info->enableLearningProgress(
true);
515 $this->ctrl->forwardCommand($info);
525 $ilUser->setPref(
"grpcrs_ntf_".$this->ref_id, (
bool)
$_REQUEST[
"crs_ntf"]);
526 $ilUser->writePrefs();
529 $this->ctrl->redirect($this,
"");
539 global
$tpl, $ilToolbar;
544 $this->tabs_gui->setTabActive(
'settings');
545 $this->tabs_gui->setSubTabActive(
'crs_start_objects');
547 $ilToolbar->addButton($this->lng->txt(
'crs_add_starter'),
548 $this->ctrl->getLinkTarget($this,
'selectStarter'));
550 include_once
'./Modules/Course/classes/class.ilCourseStartObjectsTableGUI.php';
552 $tpl->setContent($table->getHTML());
559 if(!count(
$_POST[
'starter']))
567 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
569 $cgui->setFormAction($this->ctrl->getFormAction($this,
"listStructure"));
570 $cgui->setHeaderText($this->lng->txt(
"crs_starter_delete_sure"));
571 $cgui->setCancel($this->lng->txt(
"cancel"),
"listStructure");
572 $cgui->setConfirm($this->lng->txt(
"delete"),
"deleteStarter");
575 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
576 $crs_start =
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
578 foreach(
$_POST[
'starter'] as $starter_id)
584 $cgui->addItem(
"starter[]", $starter_id,
$title, $icon, $alt);
587 $tpl->setContent($cgui->getHTML());
594 if(!count(
$_POST[
'starter']))
600 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
601 $crs_start =
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
602 foreach(
$_POST[
'starter'] as $starter_id)
604 $crs_start->
delete((
int)$starter_id);
621 $this->tabs_gui->clearTargets();
622 $this->tabs_gui->setBackTarget($this->lng->txt(
'back'),
623 $this->ctrl->getLinkTarget($this,
'listStructure'));
625 include_once
'./Modules/Course/classes/class.ilCourseStartObjectsTableGUI.php';
628 $tpl->setContent($table->getHTML());
637 if(!count(
$_POST[
'starter']))
645 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
646 $crs_start =&
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
648 foreach(
$_POST[
'starter'] as $item_ref_id)
650 if(!$crs_start->exists($item_ref_id))
653 $crs_start->
add($item_ref_id);
680 include_once
'Modules/Course/classes/class.ilCourseFile.php';
692 $this->tabs_gui->setTabActive(
'settings');
693 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
696 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'Modules/Course');
697 $this->tpl->setVariable(
'INFO_TABLE',$form->getHTML());
704 foreach($files as
$file)
706 $table_data[
'id'] = $file->getFileId();
707 $table_data[
'filename'] = $file->getFileName();
708 $table_data[
'filetype'] = $file->getFileType();
709 $table_data[
'filesize'] = $file->getFileSize();
711 $rows[] = $table_data;
714 include_once(
"./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
716 $table_gui->setTitle($this->lng->txt(
"crs_info_download"));
717 $table_gui->setData($rows);
718 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
719 $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->lng->txt(
"delete"));
720 $table_gui->setSelectAllCheckbox(
"file_id");
721 $this->tpl->setVariable(
'INFO_FILE_TABLE',$table_gui->getHTML());
736 if(!count(
$_POST[
'file_id']))
744 $this->tabs_gui->setTabActive(
'settings');
745 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
747 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
751 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteInfoFiles"));
752 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
753 $c_gui->setCancel($this->lng->txt(
"cancel"),
"editInfo");
754 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteInfoFiles");
757 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
758 foreach(
$_POST[
"file_id"] as $file_id)
761 $c_gui->addItem(
"file_id[]", $file_id,
$file->getFileName());
764 $this->tpl->setContent($c_gui->getHTML());
775 if(!count(
$_POST[
'file_id']))
781 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
783 foreach(
$_POST[
'file_id'] as $file_id)
786 if($this->object->getId() ==
$file->getCourseId())
805 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
807 $form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
808 $form->setMultipart(
true);
809 $form->setTitle($this->lng->txt(
'crs_general_info'));
810 $form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
811 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
814 $area->
setValue($this->object->getImportantInformation());
817 $form->addItem($area);
820 $area->
setValue($this->object->getSyllabus());
823 $form->addItem($area);
826 $section->setTitle($this->lng->txt(
'crs_info_download'));
830 $file->enableFileNameSelection(
'file_name');
831 $form->addItem(
$file);
834 $section->setTitle($this->lng->txt(
'crs_contact'));
837 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_name'),
'contact_name');
838 $text->
setValue($this->object->getContactName());
840 $text->setMaxLength(70);
841 $form->addItem($text);
843 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
844 $text->
setValue($this->object->getContactResponsibility());
846 $text->setMaxLength(70);
847 $form->addItem($text);
849 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_phone'),
'contact_phone');
850 $text->
setValue($this->object->getContactPhone());
852 $text->setMaxLength(40);
853 $form->addItem($text);
855 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_email'),
'contact_email');
856 $text->
setValue($this->object->getContactEmail());
857 $text->setInfo($this->lng->txt(
'crs_contact_email_info'));
859 $text->setMaxLength(255);
860 $form->addItem($text);
862 $area =
new ilTextAreaInputGUI($this->lng->txt(
'crs_contact_consultation'),
'contact_consultation');
863 $area->
setValue($this->object->getContactConsultation());
866 $form->addItem($area);
868 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
871 $record_gui->parse();
882 include_once
'Modules/Course/classes/class.ilCourseFile.php';
884 $file_obj->setCourseId($this->object->getId());
885 $file_obj->setFileName(strlen(
$_POST[
'file_name']) ?
887 $_FILES[
'file'][
'name']);
888 $file_obj->setFileSize($_FILES[
'file'][
'size']);
889 $file_obj->setFileType($_FILES[
'file'][
'type']);
890 $file_obj->setTemporaryName($_FILES[
'file'][
'tmp_name']);
891 $file_obj->setErrorCode($_FILES[
'file'][
'error']);
901 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
903 'crs',$this->object->getId());
907 $ilErr->setMessage(
'');
908 $file_obj->validate();
909 $this->
object->validateInfoSettings();
911 if(strlen($ilErr->getMessage()))
917 $this->
object->update();
919 $record_gui->saveValues();
922 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
924 $ecs->handleContentUpdate();
939 $activation_start = $this->
loadDate(
'activation_start');
940 $activation_end = $this->
loadDate(
'activation_end');
941 $subscription_start = $this->
loadDate(
'subscription_start');
942 $subscription_end = $this->
loadDate(
'subscription_end');
943 $archive_start = $this->
loadDate(
'archive_start');
944 $archive_end = $this->
loadDate(
'archive_end');
946 $this->
object->setOfflineStatus(!(
bool)
$_POST[
'activation_online']);
947 $this->
object->setActivationType((
int)$_POST[
'activation_type']);
948 $this->
object->setActivationStart($activation_start->get(
IL_CAL_UNIX));
949 $this->
object->setActivationEnd($activation_end->get(
IL_CAL_UNIX));
950 $this->
object->setActivationVisibility((
int)$_POST[
'activation_visibility']);
951 $this->
object->setSubscriptionLimitationType((
int) $_POST[
'subscription_limitation_type']);
952 $this->
object->setSubscriptionType((
int) $_POST[
'subscription_type']);
954 $this->
object->setSubscriptionStart($subscription_start->get(
IL_CAL_UNIX));
955 $this->
object->setSubscriptionEnd($subscription_end->get(
IL_CAL_UNIX));
956 $this->
object->enableSubscriptionMembershipLimitation((
int) $_POST[
'subscription_membership_limitation']);
957 $this->
object->setSubscriptionMaxMembers((
int) $_POST[
'subscription_max']);
958 $this->
object->enableRegistrationAccessCode((
int) $_POST[
'reg_code_enabled']);
960 $this->
object->enableWaitingList((
int) $_POST[
'waiting_list']);
961 #$this->object->setSubscriptionNotify((int) $_POST['subscription_notification']);
962 $this->
object->setViewMode((
int) $_POST[
'view_mode']);
970 $this->
object->setOrderType((
int) $_POST[
'order_type']);
972 $this->
object->setArchiveStart($archive_start->get(
IL_CAL_UNIX));
973 $this->
object->setArchiveEnd($archive_end->get(
IL_CAL_UNIX));
974 $this->
object->setArchiveType($_POST[
'archive_type']);
975 $this->
object->setAboStatus((
int) $_POST[
'abo']);
976 $this->
object->setShowMembers((
int) $_POST[
'show_members']);
978 $this->
object->enableSessionLimit((
int) $_POST[
'sl']);
979 $this->
object->setNumberOfPreviousSessions(is_numeric($_POST[
'sp']) ? (
int) $_POST[
'sp'] : -1 );
980 $this->
object->setNumberOfnextSessions(is_numeric($_POST[
'sn']) ? (
int) $_POST[
'sn'] : -1 );
982 $this->
object->setAutoNotification($_POST[
'auto_notification'] == 1 ?
true :
false);
985 $show_lp_sync_confirmation =
false;
988 if(isset($_POST[
'status_dt']))
993 $show_lp_sync_confirmation =
true;
997 $this->
object->setStatusDetermination((
int)$_POST[
'status_dt']);
1002 if($this->object->validate())
1004 $this->
object->update();
1007 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1014 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1016 $this->object->getId(),
1025 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1027 if(!$ecs->handleSettingsUpdate())
1033 if($show_lp_sync_confirmation)
1052 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1054 $cgui->setFormAction($this->ctrl->getFormAction($this,
"setLPSync"));
1055 $cgui->setHeaderText($this->lng->txt(
"crs_status_determination_sync"));
1056 $cgui->setCancel($this->lng->txt(
"cancel"),
"edit");
1057 $cgui->setConfirm($this->lng->txt(
"confirm"),
"setLPSync");
1059 $tpl->setContent($cgui->getHTML());
1065 $this->
object->update();
1067 $this->
object->syncMembersStatusWithLP();
1070 $this->ctrl->redirect($this,
"edit");
1084 $this->tabs_gui->setSubTabActive(
'crs_settings');
1096 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1097 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
1100 $form->setTitle($this->lng->txt(
'crs_edit'));
1103 $form->addCommandButton(
'update',$this->lng->txt(
'save'));
1104 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1106 $form->setFormAction($this->ctrl->getFormAction($this,
'update'));
1110 $title->setSubmitFormOnEnter(
true);
1111 $title->setValue($this->object->getTitle());
1113 $title->setMaxLength(128);
1114 $title->setRequired(
true);
1119 $desc->
setValue($this->object->getLongDescription());
1122 $form->addItem($desc);
1130 $this->lng->loadLanguageModule(
'rep');
1133 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
1136 $online =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_online'),
'activation_online');
1137 $online->
setChecked(!$this->object->getOfflineStatus());
1138 $online->setInfo($this->lng->txt(
'crs_activation_online_info'));
1139 $form->addItem($online);
1141 $act_type =
new ilRadioGroupInputGUI($this->lng->txt(
'rep_activation_access'),
'activation_type');
1142 $act_type->
setValue($this->object->getActivationType());
1145 $opt->
setInfo($this->lng->txt(
'crs_availability_limitless_info'));
1146 $act_type->addOption($opt);
1149 $opt->
setInfo($this->lng->txt(
'crs_availability_until_info'));
1151 $start =
new ilDateTimeInputGUI($this->lng->txt(
'rep_activation_limited_start'),
'activation_start');
1152 #$start->setMode(ilDateTimeInputGUI::MODE_INPUT);
1156 $opt->addSubItem($start);
1158 $end =
new ilDateTimeInputGUI($this->lng->txt(
'rep_activation_limited_end'),
'activation_end');
1159 #$end->setMode(ilDateTimeInputGUI::MODE_INPUT);
1163 $opt->addSubItem($end);
1165 $visible =
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'),
'activation_visibility');
1166 $visible->
setInfo($this->lng->txt(
'crs_activation_limited_visibility_info'));
1167 $visible->setChecked($this->object->getActivationVisibility());
1168 $opt->addSubItem($visible);
1170 $act_type->addOption($opt);
1172 $form->addItem($act_type);
1176 $section->setTitle($this->lng->txt(
'crs_reg'));
1179 $reg_type =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_reg_period'),
'subscription_limitation_type');
1180 $reg_type->
setValue($this->object->getSubscriptionLimitationType());
1183 $opt->
setInfo($this->lng->txt(
'crs_registration_deactivated'));
1184 $reg_type->addOption($opt);
1187 $opt->
setInfo($this->lng->txt(
'crs_reg_unlim_info'));
1188 $reg_type->addOption($opt);
1191 $opt->
setInfo($this->lng->txt(
'crs_reg_lim_info'));
1197 $opt->addSubItem($start);
1203 $opt->addSubItem($end);
1205 $reg_type->addOption($opt);
1207 $form->addItem($reg_type);
1211 $reg_proc =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_registration_type'),
'subscription_type');
1212 $reg_proc->
setValue($this->object->getSubscriptionType());
1213 $reg_proc->setInfo($this->lng->txt(
'crs_reg_type_info'));
1216 $reg_proc->addOption($opt);
1219 $reg_proc->addOption($opt);
1224 $pass->setSubmitFormOnEnter(
true);
1226 $pass->setMaxLength(12);
1227 $pass->
setValue($this->object->getSubscriptionPassword());
1229 $opt->addSubItem($pass);
1230 $reg_proc->addOption($opt);
1232 $form->addItem($reg_proc);
1236 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1237 $reg_code->setValue(1);
1238 $reg_code->setInfo($this->lng->txt(
'crs_reg_code_enabled_info'));
1239 $reg_code->setOptionTitle($this->lng->txt(
'crs_reg_code'));
1247 #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
1249 if(!$this->object->getRegistrationAccessCode())
1251 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1255 $reg_link->setValue($this->object->getRegistrationAccessCode());
1256 $form->addItem($reg_link);
1260 include_once
'./Services/Link/classes/class.ilLink.php';
1261 $val =
ilLink::_getLink($this->object->getRefId(),$this->
object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode());
1262 $link->setHTML(
'<font class="small">'.$val.
'</font>');
1263 $reg_code->addSubItem($link);
1265 $form->addItem($reg_code);
1269 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'crs_subscription_max_members_short'),
'subscription_membership_limitation');
1271 $lim->setOptionTitle($this->lng->txt(
'crs_subscription_max_members'));
1272 $lim->setChecked($this->object->isSubscriptionMembershipLimited());
1275 $max->setSubmitFormOnEnter(
true);
1277 $max->setMaxLength(4);
1278 $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->
object->getSubscriptionMaxMembers() :
'');
1279 $max->setTitle($this->lng->txt(
'members').
':');
1280 $max->setInfo($this->lng->txt(
'crs_reg_max_info'));
1282 $lim->addSubItem($max);
1285 $wait->setOptionTitle($this->lng->txt(
'crs_waiting_list'));
1286 $wait->setChecked($this->object->enabledWaitingList());
1287 $wait->setInfo($this->lng->txt(
'crs_wait_info'));
1288 $lim->addSubItem($wait);
1290 $form->addItem($lim);
1292 $not =
new ilCheckboxInputGUI($this->lng->txt(
'crs_auto_notification'),
'auto_notification');
1294 $not->setInfo($this->lng->txt(
'crs_auto_notification_info'));
1295 $not->setChecked( $this->object->getAutoNotification() );
1296 $form->addItem($not);
1299 $pres->setTitle($this->lng->txt(
'crs_view_mode'));
1301 $form->addItem($pres);
1305 $view_type->
setValue($this->object->getViewMode());
1308 $opts->
setInfo($this->lng->txt(
'cntr_view_info_sessions'));
1309 $view_type->addOption($opts);
1314 $sess->setChecked($this->object->isSessionLimitEnabled());
1315 $sess->setInfo($this->lng->txt(
'sess_limit_info'));
1318 #$prev->setSubmitFormOnEnter(true);
1320 $prev->setValue($this->object->getNumberOfPreviousSessions() == -1 ?
1322 $this->
object->getNumberOfPreviousSessions()
1325 $prev->setMaxLength(3);
1326 $sess->addSubItem($prev);
1329 #$next->setSubmitFormOnEnter(true);
1331 $next->setValue($this->object->getNumberOfNextSessions() == -1 ?
1333 $this->
object->getNumberOfnextSessions()
1336 $next->setMaxLength(3);
1337 $sess->addSubItem($next);
1339 $opts->addSubItem(
$sess);
1345 $optsi->
setInfo($this->lng->txt(
'cntr_view_info_simple'));
1346 $view_type->addOption($optsi);
1349 $optbt->
setInfo($this->lng->txt(
'cntr_view_info_by_type'));
1350 $view_type->addOption($optbt);
1353 $opto->
setInfo($this->lng->txt(
'crs_view_info_objective'));
1354 $view_type->addOption($opto);
1357 $optt->
setInfo($this->lng->txt(
'crs_view_info_timing'));
1358 $view_type->addOption($optt);
1383 $form->addItem($view_type);
1387 $sort->
setValue($this->object->getOrderType());
1390 $opt->
setInfo($this->lng->txt(
'crs_sort_title_info'));
1391 $sort->addOption($opt);
1394 $opt->
setInfo($this->lng->txt(
'crs_sort_manual_info'));
1395 $sort->addOption($opt);
1398 $opt->
setInfo($this->lng->txt(
'crs_sort_timing_info'));
1399 $sort->addOption($opt);
1402 $form->addItem($sort);
1404 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1406 $this->object->getId(),
1415 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
1418 include_once
'./Services/Tracking/classes/class.ilLPObjSettings.php';
1420 if($lp_settings->getMode())
1423 $lp_status->setTitle($this->lng->txt(
'crs_course_status_of_users'));
1424 $form->addItem($lp_status);
1426 $lp_status_options =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_status_determination'),
"status_dt");
1428 $lp_status_options->setValue($this->object->getStatusDetermination());
1430 $lp_option =
new ilRadioOption($this->lng->txt(
'crs_status_determination_lp'),
1432 $lp_status_options->addOption($lp_option);
1433 $lp_status_options->addOption(
new ilRadioOption($this->lng->txt(
'crs_status_determination_manual'),
1436 $form->addItem($lp_status_options);
1441 $further->setTitle($this->lng->txt(
'crs_further_settings'));
1442 $form->addItem($further);
1444 $desk =
new ilCheckboxInputGUI($this->lng->txt(
'crs_add_remove_from_desktop'),
'abo');
1445 $desk->
setChecked($this->object->getAboStatus());
1446 $desk->setInfo($this->lng->txt(
'crs_add_remove_from_desktop_info'));
1447 $form->addItem($desk);
1450 $mem->
setChecked($this->object->getShowMembers());
1451 $mem->setInfo($this->lng->txt(
'crs_show_members_info'));
1452 $form->addItem($mem);
1455 include_once
'Modules/Course/classes/class.ilECSCourseSettings.php';
1457 $ecs->addSettingsToForm($form,
'crs');
1477 $this->tabs_gui->setTabActive(
'settings');
1484 $tpl->setContent($a_form->getHTML());
1489 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
1491 $form->setFormAction($this->ctrl->getFormAction($this));
1496 $form->addCommandButton(
'updateCourseIcons', $this->lng->txt(
'save'));
1503 include_once
'Modules/Course/classes/class.ilCourseFile.php';
1517 if($form->checkInput())
1520 if ($this->ilias->getSetting(
"custom_icons"))
1522 if(
$_POST[
"cont_big_icon_delete"])
1524 $this->
object->removeBigIcon();
1526 if(
$_POST[
"cont_small_icon_delete"])
1528 $this->
object->removeSmallIcon();
1530 if(
$_POST[
"cont_tiny_icon_delete"])
1532 $this->
object->removeTinyIcon();
1534 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
1535 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
1539 $this->ctrl->redirect($this,
"editCourseIcons");
1542 $form->setValuesByPost();
1557 $this->tabs_gui->addSubTabTarget(
"crs_settings",
1558 $this->ctrl->getLinkTarget($this,
'edit'),
1559 "edit", get_class($this));
1561 $this->tabs_gui->addSubTabTarget(
"crs_info_settings",
1562 $this->ctrl->getLinkTarget($this,
'editInfo'),
1563 "editInfo", get_class($this));
1565 $this->tabs_gui->addSubTabTarget(
"preconditions",
1566 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
1567 "",
"ilConditionHandlerInterface");
1568 $this->tabs_gui->addSubTabTarget(
"crs_start_objects",
1569 $this->ctrl->getLinkTarget($this,
'listStructure'),
1570 "listStructure", get_class($this));
1571 $this->tabs_gui->addSubTabTarget(
'groupings',
1572 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1577 if ($this->ilias->getSetting(
"custom_icons"))
1579 $this->tabs_gui->addSubTabTarget(
"icon_settings",
1580 $this->ctrl->getLinkTarget($this,
'editCourseIcons'),
1581 "editCourseIcons", get_class($this));
1585 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1588 $this->tabs_gui->addSubTabTarget(
"crs_map_settings",
1589 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
1590 "editMapSettings", get_class($this));
1594 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1595 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1599 $this->tabs_gui->addSubTabTarget(
'crs_custom_user_fields',
1600 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1602 'ilobjectcustomuserfieldsgui');
1606 include_once
"Services/Certificate/classes/class.ilCertificate.php";
1609 $this->tabs_gui->addSubTabTarget(
1611 $this->ctrl->getLinkTargetByClass(
"ilcertificategui",
"certificateeditor"));
1616 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1618 $this->tabs_gui->addSubTabTarget(
"crs_member_administration",
1619 $this->ctrl->getLinkTarget($this,
'members'),
1620 "members", get_class($this));
1622 $this->tabs_gui->addSubTabTarget(
"crs_members_groups",
1623 $this->ctrl->getLinkTargetByClass(
"ilCourseParticipantsGroupsGUI",
"show"),
1624 "",
"ilCourseParticipantsGroupsGUI");
1626 $this->tabs_gui->addSubTabTarget(
"crs_members_gallery",
1627 $this->ctrl->getLinkTarget($this,
'membersGallery'),
1628 "membersGallery", get_class($this));
1631 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1634 $this->tabs_gui->addSubTabTarget(
"crs_members_map",
1635 $this->ctrl->getLinkTarget($this,
'membersMap'),
1636 "membersMap", get_class($this));
1640 include_once
'Services/Mail/classes/class.ilMail.php';
1641 $mail =&
new ilMail($ilUser->getId());
1642 if($rbacsystem->checkAccess(
'internal_mail',$mail->getMailObjectReferenceId()))
1644 $this->tabs_gui->addSubTabTarget(
"mail_members",
1645 $this->ctrl->getLinkTarget($this,
'mailMembers'),
1646 "mailMembers", get_class($this));
1649 $childs = (array) $tree->getChildsByType($this->object->getRefId(),
'sess');
1650 if(count($childs) && $ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1652 $this->tabs_gui->addSubTabTarget(
"events",
1653 $this->ctrl->getLinkTargetByClass(
'ilsessionoverviewgui',
'listSessions'),
1654 "",
'ilsessionoverviewgui');
1657 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
1660 $this->tabs_gui->addSubTabTarget(
'export_members',
1661 $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'),
1662 "",
'ilmemberexportgui');
1678 $this->
object->removeSmallIcon();
1679 $this->ctrl->redirect($this,
'editCourseIcons');
1689 $this->
object->removeBigIcon();
1690 $this->ctrl->redirect($this,
'editCourseIcons');
1701 $this->
object->removeTinyIcon();
1702 $this->ctrl->redirect($this,
'editCourseIcons');
1713 $a_new_object->getMemberObject()->add($ilUser->getId(),
IL_CRS_ADMIN);
1714 $a_new_object->getMemberObject()->updateNotification($ilUser->getId(),1);
1718 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1726 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
1728 $this->ctrl->getLinkTarget($this,
"edit",
"",
false,
false)));
1745 if(!count(
$_POST[
'archives']))
1748 $this->archiveObject();
1752 if(count(
$_POST[
'archives']) > 1)
1755 $this->archiveObject();
1760 $this->
object->initCourseArchiveObject();
1762 $abs_path = $this->
object->archives_obj->getArchiveFile((
int)
$_POST[
'archives'][0]);
1763 $basename = basename($abs_path);
1778 if(isset(
$_GET[
'admin_hide']))
1780 $ilUser->writePref(
'crs_admin_hide',(
int)
$_GET[
'admin_hide']);
1782 if(isset(
$_GET[
'tutor_hide']))
1784 $ilUser->writePref(
'crs_tutor_hide',(
int)
$_GET[
'tutor_hide']);
1786 if(isset(
$_GET[
'member_hide']))
1788 $ilUser->writePref(
'crs_member_hide',(
int)
$_GET[
'member_hide']);
1790 if(isset(
$_GET[
'subscriber_hide']))
1792 $ilUser->writePref(
'crs_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1794 if(isset(
$_GET[
'wait_hide']))
1796 $ilUser->writePref(
'crs_wait_hide',(
int)
$_GET[
'wait_hide']);
1798 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
1801 if(isset(
$_GET[
'role_hide_'.$role_id]))
1803 $ilUser->writePref(
'crs_role_hide_'.$role_id,(
int)
$_GET[
'role_hide_'.$role_id]);
1810 if($this->show_tracking)
1812 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1817 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1820 if($privacy->enabledCourseAccessTimes())
1822 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
1826 foreach((array) $ids as
$usr_id)
1829 $tmp_data[
'firstname'] = $name[
'firstname'];
1830 $tmp_data[
'lastname'] = $name[
'lastname'];
1832 $tmp_data[
'passed'] = $this->
object->getMembersObject()->hasPassed(
$usr_id) ? 1 : 0;
1835 $tmp_data[
'passed_info'] = $this->
object->getMembersObject()->getPassedInfo(
$usr_id);
1837 $tmp_data[
'notification'] = $this->
object->getMembersObject()->isNotificationEnabled(
$usr_id) ? 1 : 0;
1838 $tmp_data[
'blocked'] = $this->
object->getMembersObject()->isBlocked(
$usr_id) ? 1 : 0;
1839 $tmp_data[
'usr_id'] =
$usr_id;
1841 if($this->show_tracking)
1843 if(in_array(
$usr_id,$completed))
1847 elseif(in_array(
$usr_id,$in_progress))
1861 if($privacy->enabledCourseAccessTimes())
1865 $tmp_data[
'access_ut'] = $progress[
$usr_id][
'ts'];
1870 $tmp_data[
'access_ut'] = 0;
1871 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
1874 $members[
$usr_id] = $tmp_data;
1876 return $members ? $members : array();
1892 include_once(
'./Modules/Course/classes/class.ilCourseParticipants.php');
1893 include_once(
'./Modules/Course/classes/class.ilCourseParticipantsTableGUI.php');
1894 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1895 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
1898 if(isset(
$_GET[
'member_table_nav']))
1908 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
1913 $this->tabs_gui->setTabActive(
'members');
1914 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
1916 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_edit_members.html',
'Modules/Course');
1917 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
1920 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
1942 'auto_complete_name' => $lng->txt(
'user'),
1943 'user_type' => $types,
1944 'submit_name' => $lng->txt(
'add')
1949 $ilToolbar->addSeparator();
1952 $ilToolbar->addButton($this->lng->txt(
"crs_search_users"),
1953 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
1956 $ilToolbar->addSeparator();
1959 $ilToolbar->addButton($this->lng->txt(
"crs_print_list"),
1960 $this->ctrl->getLinkTarget($this,
'printMembers'));
1970 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
1972 if(count($wait = $waiting_list->getAllUsers()))
1974 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
1975 if($ilUser->getPref(
'crs_wait_hide'))
1978 $this->ctrl->setParameter($this,
'wait_hide',0);
1979 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1980 $this->lng->txt(
'show'),
1983 $this->ctrl->clearParameters($this);
1988 $this->ctrl->setParameter($this,
'wait_hide',1);
1989 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1990 $this->lng->txt(
'hide'),
1993 $this->ctrl->clearParameters($this);
1995 $table_gui->setUsers($wait);
1996 $table_gui->setTitle($this->lng->txt(
'crs_waiting_list'),
'icon_usr.png',$this->lng->txt(
'crs_waiting_list'));
1997 $this->tpl->setVariable(
'TABLE_WAIT',$table_gui->getHTML());
2003 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
2004 if($ilUser->getPref(
'crs_subscriber_hide'))
2007 $this->ctrl->setParameter($this,
'subscriber_hide',0);
2008 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2009 $this->lng->txt(
'show'),
2012 $this->ctrl->clearParameters($this);
2017 $this->ctrl->setParameter($this,
'subscriber_hide',1);
2018 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2019 $this->lng->txt(
'hide'),
2022 $this->ctrl->clearParameters($this);
2024 $table_gui->readSubscriberData();
2025 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.png',$this->lng->txt(
'group_new_registrations'));
2026 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
2031 if($rbacreview->getNumberOfAssignedUsers(array($this->object->getDefaultAdminRole())))
2037 $ilAccess->checkAccess(
"edit_permission",
'', $this->object->getRefId()) or
2040 if($ilUser->getPref(
'crs_admin_hide'))
2047 $this->timings_enabled,
2049 $this->object->getDefaultAdminRole(),
2052 $this->ctrl->setParameter($this,
'admin_hide',0);
2054 $this->lng->txt(
'show'),
2057 $this->ctrl->clearParameters($this);
2066 $this->timings_enabled,
2068 $this->object->getDefaultAdminRole(),
2071 $this->ctrl->setParameter($this,
'admin_hide',1);
2073 $this->lng->txt(
'hide'),
2076 $this->ctrl->clearParameters($this);
2078 $table_gui->setTitle($this->lng->txt(
'crs_administrators'),
'icon_usr.png',$this->lng->txt(
'crs_administrators'));
2079 $table_gui->parse();
2080 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
2082 if($rbacreview->getNumberOfAssignedUsers(array($this->object->getDefaultTutorRole())))
2084 if($ilUser->getPref(
'crs_tutor_hide'))
2091 $this->timings_enabled,
2093 $this->object->getDefaultTutorRole(),
2096 $this->ctrl->setParameter($this,
'tutor_hide',0);
2098 $this->lng->txt(
'show'),
2101 $this->ctrl->clearParameters($this);
2110 $this->timings_enabled,
2112 $this->object->getDefaultTutorRole(),
2115 $this->ctrl->setParameter($this,
'tutor_hide',1);
2117 $this->lng->txt(
'hide'),
2120 $this->ctrl->clearParameters($this);
2122 $table_gui->setTitle($this->lng->txt(
'crs_tutors'),
'icon_usr.png',$this->lng->txt(
'crs_tutors'));
2123 $table_gui->parse();
2124 $this->tpl->setVariable(
'TUTORS',$table_gui->getHTML());
2126 if($rbacreview->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole())))
2128 if($ilUser->getPref(
'crs_member_hide'))
2134 $this->show_tracking,
2135 $this->timings_enabled,
2137 $this->object->getDefaultMemberRole(),
2141 $this->ctrl->setParameter($this,
'member_hide',0);
2143 $this->lng->txt(
'show'),
2146 $this->ctrl->clearParameters($this);
2154 $this->show_tracking,
2155 $this->timings_enabled,
2157 $this->object->getDefaultMemberRole(),
2160 $this->ctrl->setParameter($this,
'member_hide',1);
2162 $this->lng->txt(
'hide'),
2165 $this->ctrl->clearParameters($this);
2167 $table_gui->setTitle($this->lng->txt(
'crs_members'),
'icon_usr.png',$this->lng->txt(
'crs_members'));
2168 $table_gui->parse();
2169 $this->tpl->setCurrentBlock(
'member_block');
2170 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
2171 $this->tpl->parseCurrentBlock();
2177 if(!(
$GLOBALS[
'rbacreview']->getNumberOfAssignedUsers(array($role_id))))
2181 if($ilUser->getPref(
'crs_role_hide_'.$role_id))
2187 $this->show_tracking,
2188 $this->timings_enabled,
2193 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,0);
2195 $this->ctrl->getLinkTarget($this,
'members'),
2196 $this->lng->txt(
'show'),
2200 $this->ctrl->clearParameters($this);
2208 $this->show_tracking,
2209 $this->timings_enabled,
2214 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,1);
2216 $this->ctrl->getLinkTarget($this,
'members'),
2217 $this->lng->txt(
'hide'),
2221 $this->ctrl->clearParameters($this);
2225 $table_gui->parse();
2226 $this->tpl->setCurrentBlock(
'member_block');
2227 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
2228 $this->tpl->parseCurrentBlock();
2232 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'crs_selected_users'));
2233 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
2234 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
2235 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'crs_mem_send_mail'));
2253 $visible_members = array_intersect(array_unique((array)
$_POST[
'visible_member_ids']),$this->object->getMembersObject()->getAdmins());
2254 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
2255 $notification = is_array($_POST[
'notification']) ? $_POST[
'notification'] : array();
2271 $visible_members = array_intersect(array_unique((array)
$_POST[
'visible_member_ids']),$this->object->getMembersObject()->getTutors());
2272 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
2273 $notification = is_array($_POST[
'notification']) ? $_POST[
'notification'] : array();
2289 $visible_members = array_intersect(array_unique((array)
$_POST[
'visible_member_ids']),$this->object->getMembersObject()->getMembers());
2290 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
2291 $blocked = is_array($_POST[
'blocked']) ? $_POST[
'blocked'] : array();
2306 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
2311 $users = array_merge($users,$rbacreview->assignedUsers($role_id));
2314 $passed = is_array(
$_POST[
'passed']) ?
$_POST[
'passed'] : array();
2315 $blocked = is_array(
$_POST[
'blocked']) ?
$_POST[
'blocked'] : array();
2330 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
2334 include_once
'./Services/Tracking/classes/class.ilLPObjSettings.php';
2338 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
2339 $marks =
new ilLPMarks($this->object->getId(), $a_member_id);
2342 if($marks->getCompleted() != $a_has_passed)
2347 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
2358 foreach($visible_members as $member_id)
2360 $this->
object->getMembersObject()->updatePassed($member_id,in_array($member_id,$passed),
true);
2367 $this->
object->getMembersObject()->updateNotification($member_id,in_array($member_id,$notification));
2368 $this->
object->getMembersObject()->updateBlocked($member_id,
false);
2372 if($this->object->getMembersObject()->isBlocked($member_id) and !in_array($member_id,$blocked))
2374 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNBLOCK_MEMBER,$member_id);
2376 if(!$this->object->getMembersObject()->isBlocked($member_id) and in_array($member_id,$blocked))
2378 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_BLOCK_MEMBER,$member_id);
2380 $this->
object->getMembersObject()->updateNotification($member_id,
false);
2381 $this->
object->getMembersObject()->updateBlocked($member_id,in_array($member_id,$blocked));
2395 include_once
'./Modules/Course/classes/class.ilObjCourseGrouping.php';
2397 $this->
object->initWaitingList();
2398 if($this->object->waiting_list_obj->getCountUsers())
2401 $f_result = array();
2402 foreach($this->object->waiting_list_obj->getAllUsers() as $waiting_data)
2407 $waiting_list_ids[] = $waiting_data[
'usr_id'];
2411 $this->
object->getId()) as $course_data)
2414 if($course_data[
'id'] != $this->object->getId() and
2415 $tmp_members->isGroupingMember($tmp_obj->getId(),$course_data[
'unique']))
2417 $message .= (
'<br /><font class="alert">'.$this->lng->txt(
'crs_member_of').
' ');
2423 $f_result[$counter][] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname().$message;
2424 $f_result[$counter][] = $tmp_obj->getLogin();
2445 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
2461 $post_participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'tutors'],(array) $_POST[
'members'], (array) $_POST[
'roles']));
2463 $participants = array_intersect((array) $post_participants, (array) $real_participants);
2467 if(!count($participants))
2475 $this->tabs_gui->setTabActive(
'members');
2476 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
2478 include_once(
'./Modules/Course/classes/class.ilCourseEditParticipantsTableGUI.php');
2480 $table_gui->setTitle($this->lng->txt(
'crs_header_edit_members'),
'icon_usr.png',$this->lng->txt(
'crs_header_edit_members'));
2483 $this->tpl->setContent($table_gui->getHTML());
2496 global $rbacsystem, $rbacreview,
$ilUser, $ilAccess;
2500 if(!count(
$_POST[
'participants']))
2507 $notifications =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
2508 $passed =
$_POST[
'passed'] ?
$_POST[
'passed'] : array();
2509 $blocked =
$_POST[
'blocked'] ?
$_POST[
'blocked'] : array();
2512 $hasEditPermissionAccess =
2514 $ilAccess->checkAccess(
'edit_permission',
'',$this->object->getRefId()) or
2520 $assignableLocalCourseRoles = array();
2521 $courseAdminRoleId = $this->
object->getDefaultAdminRole();
2522 foreach ($this->object->getLocalCourseRoles(
false) as
$title => $role_id)
2524 $assignableLocalCourseRoles[$role_id] =
$title;
2530 $memberIsCourseAdmin = $rbacreview->isAssigned($usr_id, $courseAdminRoleId);
2535 if (! $hasEditPermissionAccess && $memberIsCourseAdmin &&
2536 ! in_array($courseAdminRoleId,
$_POST[
'roles'][$usr_id])
2543 foreach ((array)
$_POST[
'roles'][$usr_id] as $role_id)
2545 if(!array_key_exists($role_id, $assignableLocalCourseRoles))
2551 if(!$hasEditPermissionAccess &&
2552 $role_id == $courseAdminRoleId &&
2553 !$memberIsCourseAdmin)
2565 if(!isset(
$_POST[
'roles'][$admin_id]))
2570 if(in_array($courseAdminRoleId,
$_POST[
'roles'][$admin_id]))
2580 $_POST[
'members'] = $_POST[
'participants'];
2585 foreach(
$_POST[
'participants'] as $usr_id)
2587 $this->
object->getMembersObject()->updateRoleAssignments($usr_id,(array)
$_POST[
'roles'][$usr_id]);
2590 $this->
object->getMembersObject()->updateNotification($usr_id,0);
2591 if(($this->object->getMembersObject()->isTutor($usr_id) or $this->
object->getMembersObject()->isAdmin($usr_id)) and in_array($usr_id,$notifications))
2593 $this->
object->getMembersObject()->updateNotification($usr_id,1);
2596 $this->
object->getMembersObject()->updateBlocked($usr_id,0);
2597 if((!$this->object->getMembersObject()->isAdmin($usr_id) and !$this->
object->getMembersObject()->isTutor($usr_id)) and in_array($usr_id,$blocked))
2599 $this->
object->getMembersObject()->updateBlocked($usr_id,1);
2601 $this->
object->getMembersObject()->updatePassed($usr_id,in_array($usr_id,$passed),
true);
2602 $this->
object->getMembersObject()->sendNotification(
2603 $this->object->getMembersObject()->NOTIFY_STATUS_CHANGED,
2624 if(!isset(
$_GET[
"member_id"]) or !$this->object->getMembersObject()->isAssigned((
int)
$_GET[
"member_id"]))
2626 $this->ilias->raiseError($this->lng->txt(
"crs_no_valid_member_id_given"),$this->ilias->error_obj->MESSAGE);
2631 $passed = $this->
object->getMembersObject()->hasPassed((
int) $_GET[
'member_id']);
2632 $notify = $this->
object->getMembersObject()->isNotificationEnabled((
int) $_GET[
'member_id']);
2633 $blocked = $this->
object->getMembersObject()->isBlocked((
int) $_GET[
'member_id']);
2635 $this->
object->getMembersObject()->updateRoleAssignments((
int) $_GET[
'member_id'],
$_POST[
'roles']);
2636 $this->
object->getMembersObject()->updatePassed((
int) $_GET[
'member_id'],(
int)
$_POST[
'passed'],
true);
2637 $this->
object->getMembersObject()->updateNotification((
int) $_GET[
'member_id'],(
int) $_POST[
'notification']);
2638 $this->
object->getMembersObject()->updateBlocked((
int) $_GET[
'member_id'],(
int) $_POST[
'blocked']);
2640 if($passed != $this->object->getMembersObject()->hasPassed((
int) $_GET[
'member_id']) or
2641 $notify != $this->
object->getMembersObject()->isNotificationEnabled((
int) $_GET[
'member_id']) or
2642 $blocked != $this->
object->getMembersObject()->isBlocked((
int) $_GET[
'member_id']))
2644 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_STATUS_CHANGED,(int) $_GET[
'member_id']);
2668 if(!count($a_usr_ids))
2675 foreach($a_usr_ids as $user_id)
2681 if($this->object->getMembersObject()->isAssigned($user_id))
2688 $this->
object->getMembersObject()->add($user_id,
IL_CRS_MEMBER);
2691 $this->
object->getMembersObject()->add($user_id,
IL_CRS_TUTOR);
2694 $this->
object->getMembersObject()->add($user_id,
IL_CRS_ADMIN);
2698 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_ACCEPT_USER,$user_id);
2700 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
2703 $this->
object->checkLPStatusSync($user_id);
2712 unset(
$_SESSION[
'crs_usr_search_result']);
2715 $this->ctrl->redirect($this,
'members');
2727 if(!count(
$_POST[
"waiting"]))
2734 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2738 foreach(
$_POST[
"waiting"] as $user_id)
2744 if($this->object->getMembersObject()->isAssigned($user_id))
2748 $this->
object->getMembersObject()->add($user_id,
IL_CRS_MEMBER);
2749 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_ACCEPT_USER,$user_id);
2752 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
2755 $this->
object->checkLPStatusSync($user_id);
2786 if(!count(
$_POST[
'waiting']))
2793 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2796 foreach(
$_POST[
"waiting"] as $user_id)
2799 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_DISMISS_SUBSCRIBER,$user_id);
2820 if(!is_array(
$_SESSION[
"crs_delete_waiting_list_ids"]))
2828 $this->
object->initWaitingList();
2831 $this->
object->waiting_list_obj->removeFromList($usr_id);
2842 global $rbacsystem,
$ilErr;
2847 if(!is_array(
$_POST[
"subscribers"]))
2855 if(!$this->object->getMembersObject()->assignSubscribers(
$_POST[
"subscribers"]))
2865 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_ACCEPT_SUBSCRIBER,
$usr_id);
2867 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
2870 $this->
object->checkLPStatusSync($usr_id);
2885 if($this->object->isSubscriptionMembershipLimited() and $this->
object->getSubscriptionMaxMembers() and
2886 $this->
object->getSubscriptionMaxMembers() <= $this->
object->getMembersObject()->getCountMembers())
2893 if($number = $this->object->getMembersObject()->autoFillSubscribers())
2911 $this->tabs_gui->setTabActive(
'members');
2921 if(!is_array(
$_POST[
"subscriber"]) or !count(
$_POST[
"subscriber"]))
2931 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_editMembers.html",
'Modules/Course');
2937 $f_result = array();
2939 foreach(
$_POST[
"subscriber"] as $member_id)
2941 $member_data = $this->
object->getMembersObject()->getSubscriberData($member_id);
2946 $f_result[$counter][] = $tmp_obj->getLogin();
2947 $f_result[$counter][] = $tmp_obj->getFirstname();
2948 $f_result[$counter][] = $tmp_obj->getLastname();
2962 $this->tabs_gui->setTabActive(
'members');
2972 if(!is_array(
$_POST[
"waiting_list"]) or !count(
$_POST[
"waiting_list"]))
2982 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_editMembers.html",
'Modules/Course');
2983 $this->
object->initWaitingList();
2989 $f_result = array();
2991 foreach(
$_POST[
"waiting_list"] as $wait_id)
2993 $user_data =& $this->
object->waiting_list_obj->getUser($wait_id);
2997 $f_result[$counter][] = $tmp_obj->getLogin();
2998 $f_result[$counter][] = $tmp_obj->getFirstname();
2999 $f_result[$counter][] = $tmp_obj->getLastname();
3000 #$f_result[$counter][] = strftime("%Y-%m-%d %R",$user_data["time"]);
3016 if($this->object->getMembersObject()->isLastAdmin($ilUser->getId()))
3023 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
3025 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
3027 $cgui->setHeaderText($this->lng->txt(
'crs_unsubscribe_sure'));
3028 $cgui->setFormAction($this->ctrl->getFormAction($this));
3029 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancel");
3030 $cgui->setConfirm($this->lng->txt(
"crs_unsubscribe"),
"performUnsubscribe");
3031 $this->tpl->setContent($cgui->getHTML());
3048 $this->
object->getMembersObject()->delete($this->ilias->account->getId());
3049 $this->
object->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->ilias->account->getId());
3050 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNSUBSCRIBE,$ilUser->getId());
3052 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
3057 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->tree->getParentId($this->ref_id));
3058 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
3073 $this->tabs_gui->setTabActive(
'members');
3074 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
3076 $participants = array_merge((array)
$_POST[
'admins'],(array) $_POST[
'tutors'], (array) $_POST[
'members'], (array) $_POST[
'roles']);
3086 if(!$this->object->getMemberObject()->checkLastAdmin($participants))
3096 !$ilAccess->checkAccess(
'edit_permission',
'',$this->object->getRefId()) and
3100 foreach ($participants as
$usr_id)
3103 if($part->isAdmin())
3113 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
3115 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
3116 $confirm->setHeaderText($this->lng->txt(
'crs_header_delete_members'));
3117 $confirm->setConfirm($this->lng->txt(
'confirm'),
'removeMembers');
3118 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
3120 foreach($participants as
$usr_id)
3124 $confirm->addItem(
'participants[]',
3126 $name[
'lastname'].
', '.$name[
'firstname'].
' ['.$name[
'login'].
']',
3130 $this->tpl->setContent($confirm->getHTML());
3142 global $rbacreview, $rbacsystem, $ilAccess,
$ilUser;
3146 if(!is_array(
$_POST[
"participants"]) or !count(
$_POST[
"participants"]))
3157 !$ilAccess->checkAccess(
'edit_permission',
'', $this->object->getRefId()) and
3162 $courseAdminRoleId = null;
3163 foreach ($this->object->getLocalCourseRoles(
false) as
$title => $role_id)
3165 if (substr($title, 0, 12) ==
'il_crs_admin')
3167 $courseAdminRoleId = $role_id;
3173 if ($rbacreview->isAssigned($usr_id, $courseAdminRoleId))
3182 if(!$this->object->getMembersObject()->deleteParticipants(
$_POST[
"participants"]))
3191 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
3196 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_DISMISS_MEMBER,
$usr_id);
3212 if(!
$_POST[
'subscribers'])
3219 if(!$this->object->getMembersObject()->deleteSubscribers(
$_POST[
"subscribers"]))
3229 $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_DISMISS_SUBSCRIBER,
$usr_id);
3243 global $rbacsystem,$ilAccess,
$ilUser,
$lng, $ilHelp;
3245 $ilHelp->setScreenIdComponent(
"crs");
3247 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
3249 if($ilAccess->checkAccess(
'read',
'',$this->ref_id))
3251 $tabs_gui->addTab(
'view_content', $lng->txt(
"content"),
3252 $this->ctrl->getLinkTarget($this,
''));
3255 if ($ilAccess->checkAccess(
'visible',
'',$this->ref_id))
3262 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilinfoscreengui"
3263 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
3266 $tabs_gui->addTarget(
"info_short",
3267 $this->ctrl->getLinkTargetByClass(
3268 array(
"ilobjcoursegui",
"ilinfoscreengui"),
"showSummary"),
3270 "",
"", $force_active);
3272 if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3274 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilconditionhandlerinterface"
3275 &&
$_GET[
"item_id"] ==
"")
3278 $tabs_gui->addTarget(
"settings",
3279 $this->ctrl->getLinkTarget($this,
"edit"),
3280 array(
"edit",
"editMapSettings",
"editCourseIcons",
"listStructure"),
"",
"", $force_active);
3287 if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3289 $tabs_gui->addTarget(
"members",
3290 $this->ctrl->getLinkTarget($this,
"members"),
3294 elseif ($this->object->getShowMembers() == $this->
object->SHOW_MEMBERS_ENABLED &&
3297 $tabs_gui->addTarget(
"members",
3298 $this->ctrl->getLinkTarget($this,
"membersGallery"),
3304 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
3307 $tabs_gui->addTarget(
'learning_progress',
3308 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
3310 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
3315 if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3317 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
3320 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilcourseobjectivesgui")
3323 $tabs_gui->addTarget(
"crs_objectives",
3324 $this->ctrl->getLinkTarget($this,
"listObjectives"),
3326 get_class($this),
"", $force_active);
3331 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
3332 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)
3335 $tabs_gui->addTarget(
"licenses",
3336 $this->ctrl->getLinkTargetByClass(
'illicenseoverviewgui',
''),
3337 "",
"illicenseoverviewgui");
3341 if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3343 $tabs_gui->addTarget(
"meta_data",
3344 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'ilmdeditorgui'),
'listSection'),
3349 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
3351 $tabs_gui->addTarget(
3353 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
3359 if ($ilAccess->checkAccess(
'edit_permission',
'',$this->ref_id))
3361 $tabs_gui->addTarget(
"perm_settings",
3362 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
3363 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
3366 if ($this->ctrl->getTargetScript() ==
"adm_object.php")
3368 $tabs_gui->addTarget(
"show_owner",
3369 $this->ctrl->getLinkTarget($this,
"owner"),
"owner", get_class($this));
3371 if ($this->tree->getSavedNodeData($this->ref_id))
3373 $tabs_gui->addTarget(
"trash",
3374 $this->ctrl->getLinkTarget($this,
"trash"),
"trash", get_class($this));
3378 if($ilAccess->checkAccess(
'join',
'',$this->ref_id)
3379 and !$this->
object->getMemberObject()->isAssigned())
3381 include_once
'./Modules/Course/classes/class.ilCourseWaitingList.php';
3386 $this->lng->txt(
'membership_leave'),
3387 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
3394 $tabs_gui->addTarget(
"join",
3395 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
"show"),
3400 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId())
3401 and $this->object->getMemberObject()->isMember())
3403 $tabs_gui->addTarget(
"crs_unsubscribe",
3404 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
3413 foreach($a_members as $member_id)
3416 $member_data = $this->
object->getMembersObject()->getSubscriberData($member_id);
3420 $print_member[$member_id][
'login'] = $tmp_obj->getLogin();
3421 $print_member[$member_id][
'name'] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
3443 global $ilAccess,
$lng;
3445 $lng->loadLanguageModule(
'trac');
3447 #$is_admin = (bool) $ilAccess->checkAccess("write",'',$this->object->getRefId());
3450 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3453 if($privacy->enabledCourseAccessTimes())
3455 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
3459 if($this->show_tracking)
3461 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
3467 foreach($a_members as $member_id)
3472 $print_member[$member_id][
'login'] = $tmp_obj->getLogin();
3473 $print_member[$member_id][
'name'] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
3475 if($this->object->getMembersObject()->isAdmin($member_id))
3477 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_admin");
3479 elseif($this->object->getMembersObject()->isTutor($member_id))
3481 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_tutor");
3483 elseif($this->object->getMembersObject()->isMember($member_id))
3485 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_member");
3487 if($this->object->getMembersObject()->isAdmin($member_id) or $this->
object->getMembersObject()->isTutor($member_id))
3489 if($this->object->getMembersObject()->isNotificationEnabled($member_id))
3491 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_notify");
3495 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_no_notify");
3500 if($this->object->getMembersObject()->isBlocked($member_id))
3502 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_blocked");
3506 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_unblocked");
3512 $print_member[$member_id][
'passed'] = $this->
object->getMembersObject()->hasPassed($member_id) ?
3513 $this->lng->txt(
'crs_member_passed') :
3514 $this->lng->txt(
'crs_member_not_passed');
3517 if($privacy->enabledCourseAccessTimes())
3519 if(isset($progress[$member_id][
'ts']) and $progress[$member_id][
'ts'])
3527 $print_member[$member_id][
'access'] = $this->lng->txt(
'no_date');
3530 if($this->show_tracking)
3532 if(in_array($member_id,$completed))
3536 elseif(in_array($member_id,$in_progress))
3540 elseif(in_array($member_id,
$failed))
3571 case 'notification':
3585 $ilTabs->clearTargets();
3586 $ilTabs->setBackTarget($this->lng->txt(
'back'),
3587 $this->ctrl->getLinkTarget($this,
'members'));
3590 $form = $list->initForm(
'printMembersOutput');
3591 $this->tpl->setContent($form->getHTML());
3596 include_once(
'./Modules/Course/classes/class.ilCourseParticipants.php');
3599 include_once
'Services/Membership/classes/class.ilAttendanceList.php';
3601 $list->setId(
'crsmemlst');
3603 $list->setTitle($this->lng->txt(
'crs_members_print_title'),
3604 $this->lng->txt(
'obj_crs').
': '.$this->
object->getTitle());
3606 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
3607 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
3611 if($this->show_tracking)
3613 $list->addPreset(
'progress', $this->lng->txt(
'learning_progress'),
true);
3616 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3618 if($privacy->enabledCourseAccessTimes())
3620 $list->addPreset(
'access', $this->lng->txt(
'last_access'),
true);
3623 $list->addPreset(
'status', $this->lng->txt(
'crs_status'),
true);
3624 $list->addPreset(
'passed', $this->lng->txt(
'crs_passed'),
true);
3631 return $this->members_data[$a_user_id];
3637 $list->initFromForm();
3638 $list->setCallback(array($this,
'getAttendanceListUserData'));
3640 $this->members_data = $this->
fetchPrintMemberData($this->object->getMembersObject()->getParticipants());
3642 echo $list->getFullscreenHTML();
3683 $is_admin = (bool) $ilAccess->checkAccess(
"write",
"", $this->object->getRefId());
3686 $this->object->getShowMembers() == $this->
object->SHOW_MEMBERS_DISABLED)
3688 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
3692 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
3695 $this->tabs_gui->setTabActive(
'members');
3696 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
3699 if(count($members = $this->object->getMembersObject()->getParticipants()))
3701 $ordered_members = array();
3703 foreach($members as $member_id)
3713 array_push($ordered_members,array(
"id" => $member_id,
3714 "login" => $usr_obj->getLogin(),
3715 "lastname" => $usr_obj->getLastName(),
3716 "firstname" => $usr_obj->getFirstName(),
3717 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
3718 "usr_obj" => $usr_obj));
3723 foreach($ordered_members as $member)
3725 $usr_obj = $member[
"usr_obj"];
3727 if(!$usr_obj->getActive())
3732 $public_profile = in_array($usr_obj->getPref(
"public_profile"), array(
"y",
"g")) ?
"y" :
"";
3735 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
3736 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
3739 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
3741 if ($public_profile ==
"y") {
3742 $this->tpl->setCurrentBlock(
"member_linked");
3743 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
3744 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3745 $this->tpl->parseCurrentBlock();
3748 $this->tpl->setCurrentBlock(
"member_not_linked");
3749 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3750 $this->tpl->parseCurrentBlock();
3752 $this->tpl->setCurrentBlock(
"member");
3754 if ($this->object->getMembersObject()->isAdmin($member[
"id"])) {
3755 $this->tpl->setVariable(
"MEMBER_CLASS",
"il_Admin");
3757 elseif ($this->object->getMembersObject()->isTutor($member[
"id"])) {
3758 $this->tpl->setVariable(
"MEMBER_CLASS",
"il_Tutor");
3761 $this->tpl->setVariable(
"MEMBER_CLASS",
"il_Member");
3765 if ($public_profile ==
"y")
3767 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
3768 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
3770 $this->tpl->setVariable(
"LOGIN", $member[
"login"]);
3771 $this->tpl->parseCurrentBlock();
3773 $this->tpl->setCurrentBlock(
"members");
3774 $this->tpl->setVariable(
"MEMBERS_TABLE_HEADER",$this->lng->txt(
'crs_members_title'));
3775 $this->tpl->parseCurrentBlock();
3778 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
3781 $headline = $this->
object->getTitle().
"<br/>".$this->
object->getDescription();
3783 $this->tpl->setVariable(
"HEADLINE",$headline);
3792 include_once
"./Services/Table/classes/class.ilTableGUI.php";
3803 $offset =
$_GET[
"update_members"] ?
$_GET[
"offset"] : 0;
3804 $order =
$_GET[
"update_members"] ?
$_GET[
"sort_by"] :
'login';
3805 $direction =
$_GET[
"update_members"] ?
$_GET[
"sort_order"] :
'';
3809 $offset =
$_GET[
"update_subscribers"] ?
$_GET[
"offset"] : 0;
3810 $order =
$_GET[
"update_subscribers"] ?
$_GET[
"sort_by"] :
'sub_time';
3811 $direction =
$_GET[
"update_subscribers"] ?
$_GET[
"sort_order"] :
'';
3815 $offset =
$_GET[
"offset"];
3816 $order =
$_GET[
"sort_by"] ?
$_GET[
"sort_by"] :
"title";
3817 $direction =
$_GET[
"sort_order"];
3821 $offset =
$_GET[
"offset"];
3822 $order =
$_GET[
"sort_by"] ?
$_GET[
"sort_by"] :
"title";
3823 $direction =
$_GET[
"sort_order"];
3827 $offset =
$_GET[
"offset"];
3829 if (
$_GET[
"sort_by"] ==
"title" or empty(
$_GET[
"sort_by"]))
3831 $_GET[
"sort_by"] =
"login";
3833 $order =
$_GET[
"sort_by"];
3834 $direction =
$_GET[
"sort_order"];
3838 $tbl->setOrderColumn($order);
3839 $tbl->setOrderDirection($direction);
3840 $tbl->setOffset($offset);
3841 $tbl->setLimit(
$_GET[
"limit"]);
3842 $tbl->setMaxCount(count($result_set));
3843 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
3844 $tbl->setData($result_set);
3851 $tpl =& $tbl->getTemplateObject();
3853 $tpl->setCurrentBlock(
"tbl_form_header");
3854 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
3855 $tpl->parseCurrentBlock();
3856 $tpl->setCurrentBlock(
"tbl_action_btn");
3857 $tpl->setVariable(
"BTN_NAME",
"cancelMember");
3858 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"cancel"));
3859 $tpl->parseCurrentBlock();
3860 $tpl->setCurrentBlock(
"tbl_action_btn");
3861 $tpl->setVariable(
"BTN_NAME",
"performRemoveFromWaitingList");
3862 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
3863 $tpl->parseCurrentBlock();
3864 $tpl->setCurrentBlock(
"tbl_action_row");
3865 $tpl->setVariable(
"COLUMN_COUNTS",4);
3867 $tpl->parseCurrentBlock();
3869 $tbl->setTitle($this->lng->txt(
"crs_header_remove_from_waiting_list"),
"icon_usr_b.png",
3870 $this->lng->txt(
"crs_header_remove_from_waiting_list"));
3871 $tbl->setHeaderNames(array($this->lng->txt(
"username"),
3872 $this->lng->txt(
"firstname"),
3873 $this->lng->txt(
"lastname"),
3874 $this->lng->txt(
"crs_time")));
3875 $tbl->setHeaderVars(array(
"login",
3879 array(
"ref_id" => $this->object->getRefId(),
3881 "cmdClass" =>
"ilobjcoursegui",
3882 "cmdNode" =>
$_GET[
"cmdNode"]));
3884 $tbl->setColumnWidth(array(
"25%",
"25%",
"25%",
"25%"));
3889 $this->tpl->setVariable(
"EDIT_MEMBER_TABLE",$tbl->tpl->get());
3897 $tpl =& $tbl->getTemplateObject();
3899 $tpl->setCurrentBlock(
"tbl_form_header");
3900 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
3901 $tpl->parseCurrentBlock();
3902 $tpl->setCurrentBlock(
"tbl_action_btn");
3903 $tpl->setVariable(
"BTN_NAME",
"removeSubscribers");
3904 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
3905 $tpl->parseCurrentBlock();
3906 $tpl->setCurrentBlock(
"tbl_action_btn");
3907 $tpl->setVariable(
"BTN_NAME",
"cancelMember");
3908 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"cancel"));
3909 $tpl->parseCurrentBlock();
3910 $tpl->setCurrentBlock(
"tbl_action_row");
3911 $tpl->setVariable(
"COLUMN_COUNTS",4);
3913 $tpl->parseCurrentBlock();
3915 $tbl->setTitle($this->lng->txt(
"crs_header_delete_subscribers"),
"icon_usr_b.png",$this->lng->txt(
"crs_header_delete_members"));
3916 $tbl->setHeaderNames(array($this->lng->txt(
"username"),
3917 $this->lng->txt(
"firstname"),
3918 $this->lng->txt(
"lastname"),
3919 $this->lng->txt(
"crs_time")));
3920 $tbl->setHeaderVars(array(
"login",
3924 array(
"ref_id" => $this->object->getRefId(),
3926 "cmdClass" =>
"ilobjcoursegui",
3927 "cmdNode" =>
$_GET[
"cmdNode"]));
3929 $tbl->setColumnWidth(array(
"25%",
"25%",
"25%",
"25%"));
3934 $this->tpl->setVariable(
"EDIT_MEMBER_TABLE",$tbl->tpl->get());
3943 $actions = array(
"addFromWaitingList" => $this->lng->txt(
"crs_add_subscribers"),
3944 "removeFromWaitingList" => $this->lng->txt(
"crs_delete_from_waiting_list"));
3947 $tpl =& $tbl->getTemplateObject();
3949 $tbl->enable(
'select_all');
3950 $tbl->setFormName(
"wait_form");
3951 $tbl->setSelectAllCheckbox(
"waiting_list");
3955 $tpl->setCurrentBlock(
"tbl_action_row");
3957 $tpl->setVariable(
"COLUMN_COUNTS",5);
3961 $tpl->setCurrentBlock(
"tbl_action_select");
3963 $tpl->setVariable(
"BTN_NAME",
"gateway");
3964 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"execute"));
3965 $tpl->parseCurrentBlock();
3967 $tpl->setCurrentBlock(
"tbl_action_row");
3968 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
3969 $tpl->parseCurrentBlock();
3972 $tbl->setTitle($this->lng->txt(
"crs_waiting_list"),
"icon_usr.png",$this->lng->txt(
"crs_waiting_list"));
3973 $tbl->setHeaderNames(array(
'',
3974 $this->lng->txt(
"name"),
3975 $this->lng->txt(
"login"),
3976 $this->lng->txt(
"crs_time")));
3977 $tbl->setHeaderVars(array(
"",
3981 array(
"ref_id" => $this->object->getRefId(),
3983 "update_subscribers" => 1,
3984 "cmdClass" =>
"ilobjcoursegui",
3985 "cmdNode" =>
$_GET[
"cmdNode"]));
3986 $tbl->setColumnWidth(array(
'1%'));
3991 $this->tpl->setCurrentBlock(
'sub_wait_table');
3992 $this->tpl->setVariable(
'SUB_WAIT_NAME',
'wait_form');
3993 $this->tpl->setVariable(
'SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
3994 $this->tpl->setVariable(
"SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
3995 $this->tpl->parseCurrentBlock();
4007 for($i=0;$i<=60;$i++)
4009 $days[$i] = $i < 10 ?
"0".$i : $i;
4014 for($i=0;$i<24;$i++)
4016 $days[$i] = $i < 10 ?
"0".$i : $i;
4021 for($i=1;$i<32;$i++)
4023 $days[$i] = $i < 10 ?
"0".$i : $i;
4028 for($i=1;$i<13;$i++)
4030 $month[$i] = $i < 10 ?
"0".$i : $i;
4035 for($i = date(
"Y",time());$i < date(
"Y",time()) + 3;++$i)
4045 return mktime($a_time_arr[
"hour"],
4046 $a_time_arr[
"minute"],
4047 $a_time_arr[
"second"],
4048 $a_time_arr[
"month"],
4050 $a_time_arr[
"year"]);
4054 unset(
$_SESSION[
"crs_delete_member_ids"]);
4055 unset(
$_SESSION[
"crs_delete_subscriber_ids"]);
4065 global $rbacreview,
$ilErr, $ilAccess, $ilObjDataCache,
$ilias;
4066 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
4068 $this->lng->loadLanguageModule(
'mail');
4069 if(!isset(
$_GET[
'returned_from_mail']))
4074 $is_admin = (bool) $ilAccess->checkAccess(
"write",
"", $this->object->getRefId());
4077 $this->object->getShowMembers() == $this->
object->SHOW_MEMBERS_DISABLED)
4079 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
4083 $this->tabs_gui->setTabActive(
'members');
4084 $this->tabs_gui->setSubTabActive(
'mail_members');
4086 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
4089 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
4091 $this->tpl->setVariable(
"SELECT_ACTION",
'ilias.php?baseClass=ilmailgui&view=my_courses&search_crs='.$this->object->getId());
4092 $this->tpl->setVariable(
"MAIL_SELECTED",$this->lng->txt(
'send_mail_selected'));
4093 $this->tpl->setVariable(
"MAIL_MEMBERS",$this->lng->txt(
'send_mail_members'));
4094 $this->tpl->setVariable(
"MAIL_TUTOR",$this->lng->txt(
'send_mail_tutors'));
4095 $this->tpl->setVariable(
"MAIL_ADMIN",$this->lng->txt(
'send_mail_admins'));
4097 $this->tpl->setVariable(
"OK",$this->lng->txt(
'next'));
4100 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
4101 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
4104 $sorted_role_ids = array();
4106 foreach($role_ids as $role_id)
4111 $sorted_role_ids[2] = $role_id;
4115 $sorted_role_ids[1] = $role_id;
4119 $sorted_role_ids[0] = $role_id;
4123 $sorted_role_ids[$counter++] = $role_id;
4128 ksort($sorted_role_ids,SORT_NUMERIC);
4129 foreach ((array) $sorted_role_ids as $role_id)
4131 $this->tpl->setCurrentBlock(
"mailbox_row");
4132 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
4136 if(count($ids_for_role_title) >= 2)
4138 $ilias->setSetting(
'pear_mail_enable', 1);
4142 htmlspecialchars($role_addr)
4144 if (ilMail::_usePearMail())
4147 $this->tpl->setVariable(
"MAILBOX",$role_addr);
4152 $this->tpl->setVariable(
"MAILBOX",
ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id)).
" (" . $role_addr .
")");
4155 $this->tpl->parseCurrentBlock();
4163 $next_class = $this->ctrl->getNextClass($this);
4164 $cmd = $this->ctrl->getCmd();
4170 $ilAccess->checkAccess(
'read',
'',
$_GET[
'ref_id']))
4172 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset");
4174 $ilNavigationHistory->addItem(
$_GET[
'ref_id'],
4180 if(IS_PAYMENT_ENABLED)
4182 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
4185 $ilTabs->setTabActive(
'info_short');
4187 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
4188 $this->ctrl->setReturn($this,
'');
4190 $this->ctrl->forwardCommand($pp_gui);
4198 case "ilinfoscreengui":
4202 case 'ilmdeditorgui':
4203 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
4205 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->WARNING);
4208 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
4210 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
4211 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
4213 $this->ctrl->forwardCommand($md_gui);
4214 $this->tabs_gui->setTabActive(
'meta_data');
4217 case 'ilcourseregistrationgui':
4218 $this->ctrl->setReturn($this,
'infoScreen');
4219 $this->tabs_gui->setTabActive(
'join');
4220 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
4222 $this->ctrl->forwardCommand($registration);
4225 case 'ilobjectcustomuserfieldsgui':
4226 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
4230 $this->tabs_gui->setTabActive(
'settings');
4231 $this->ctrl->forwardCommand($cdf_gui);
4234 case "ilcourseobjectivesgui":
4235 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
4237 $this->ctrl->setReturn($this,
"");
4239 $ret =& $this->ctrl->forwardCommand($reg_gui);
4242 case 'ilobjcoursegroupinggui':
4243 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
4245 $this->ctrl->setReturn($this,
'edit');
4248 $this->ctrl->forwardCommand($crs_grp_gui);
4249 $this->tabs_gui->setTabActive(
'settings');
4250 $this->tabs_gui->setSubTabActive(
'groupings');
4254 $this->tabs_gui->setTabActive(
'none');
4264 case "ilconditionhandlerinterface":
4265 include_once
'./Services/AccessControl/classes/class.ilConditionHandlerInterface.php';
4268 $this->tabs_gui->setTabActive(
'settings');
4270 $this->ctrl->forwardCommand($new_gui);
4273 case "illearningprogressgui":
4274 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
4277 $this->object->getRefId(),
4278 $_GET[
'user_id'] ? $_GET[
'user_id'] : $ilUser->getId());
4279 $this->ctrl->forwardCommand($new_gui);
4280 $this->tabs_gui->setTabActive(
'learning_progress');
4283 case 'illicenseoverviewgui':
4284 include_once(
"./Services/License/classes/class.ilLicenseOverviewGUI.php");
4286 $ret =& $this->ctrl->forwardCommand($license_gui);
4287 $this->tabs_gui->setTabActive(
'licenses');
4290 case 'ilpermissiongui':
4291 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
4292 $this->tabs_gui->setTabActive(
'perm_settings');
4294 $ret =& $this->ctrl->forwardCommand($perm_gui);
4297 case 'ilrepositorysearchgui':
4298 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
4303 $rep_search->setCallback($this,
4304 'assignMembersObject',
4314 $rep_search->setCallback($this,
4315 'assignMembersObject',
4328 $this->ctrl->setReturn($this,
'members');
4329 $ret =& $this->ctrl->forwardCommand($rep_search);
4331 $this->tabs_gui->setTabActive(
'members');
4332 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
4335 case 'ilcoursecontentinterface':
4337 $this->initCourseContentInterface();
4338 $this->cci_obj->cci_setContainer($this);
4340 $this->ctrl->forwardCommand($this->cci_obj);
4342 $this->tabs_gui->setTabActive(
'content');
4345 case 'ilcoursecontentgui':
4346 $this->ctrl->setReturn($this,
'members');
4347 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
4349 $this->ctrl->forwardCommand($course_content_obj);
4352 case 'ilpublicuserprofilegui':
4353 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
4356 $this->tabs_gui->setTabActive(
'members');
4357 $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this,
"membersGallery"));
4358 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
4359 $html = $this->ctrl->forwardCommand($profile_gui);
4360 $this->tpl->setVariable(
"ADM_CONTENT", $html);
4363 case 'ilmemberexportgui':
4364 include_once(
'./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
4367 $this->tabs_gui->setTabActive(
'members');
4368 $this->tabs_gui->setSubTabActive(
'export_members');
4370 $this->ctrl->forwardCommand($export);
4373 case 'ilmemberagreementgui':
4374 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
4375 $this->ctrl->setReturn($this,
'');
4377 $this->ctrl->forwardCommand($agreement);
4380 case 'ilsessionoverviewgui':
4382 $this->tabs_gui->setTabActive(
'members');
4383 $this->tabs_gui->setSubTabActive(
'events');
4385 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
4388 include_once(
'./Modules/Session/classes/class.ilSessionOverviewGUI.php');
4390 $this->ctrl->forwardCommand($overview);
4394 case "ilpageobjectgui":
4398 $this->tpl->setContent($ret);
4402 case 'ilobjectcopygui':
4403 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
4405 $cp->setType(
'crs');
4406 $this->ctrl->forwardCommand($cp);
4409 case "ilobjstylesheetgui":
4413 case 'ilcourseparticipantsgroupsgui':
4414 include_once
'./Modules/Course/classes/class.ilCourseParticipantsGroupsGUI.php';
4418 $this->tabs_gui->setTabActive(
'members');
4419 $this->ctrl->forwardCommand($cmg_gui);
4423 $this->tabs_gui->setTabActive(
'export');
4424 include_once
'./Services/Export/classes/class.ilExportGUI.php';
4426 $exp->addFormat(
'xml');
4427 $this->ctrl->forwardCommand($exp);
4430 case "ilcommonactiondispatchergui":
4431 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
4433 $this->ctrl->forwardCommand($gui);
4436 case 'ildidactictemplategui':
4437 $this->ctrl->setReturn($this,
'edit');
4438 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
4440 $this->ctrl->forwardCommand($did);
4443 case "ilcertificategui":
4444 $this->tabs_gui->activateTab(
"settings");
4447 include_once
"./Services/Certificate/classes/class.ilCertificateGUI.php";
4448 include_once
"./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
4450 $this->ctrl->forwardCommand($output_gui);
4453 case 'ilobjectservicesettingsgui':
4454 $this->ctrl->setReturn($this,
'edit');
4456 $this->tabs_gui->activateTab(
'settings');
4457 $this->tabs_gui->activateSubTab(
'tool_settings');
4459 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
4462 $this->object->getId(),
4466 $this->ctrl->forwardCommand($service);
4482 if(
$cmd ==
'infoScreenGoto')
4491 $cmd =
'infoScreen';
4495 if(!$this->creation_mode)
4497 if (
$cmd ==
"infoScreen")
4508 if( !$this->creation_mode
4509 &&
$cmd !=
'infoScreen'
4510 &&
$cmd !=
'sendfile'
4511 &&
$cmd !=
'unsubscribe'
4512 &&
$cmd !=
'performUnsubscribe'
4513 && !$ilAccess->checkAccess(
"read",
'',$this->object->getRefId())
4515 ||
$cmd ==
'subscribe')
4517 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
4518 if($rbacsystem->checkAccess(
'join',$this->object->getRefId()) &&
4521 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
4522 $this->ctrl->redirectByClass(
"ilCourseRegistrationGUI");
4531 if(
$cmd ==
'listObjectives')
4533 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
4535 $this->ctrl->setReturn($this,
"");
4537 $ret =& $this->ctrl->forwardCommand($obj_gui);
4572 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
4578 if(!$this->object->getMemberObject()->isAssigned())
4583 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
4589 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
4590 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
4600 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
4620 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
4624 $buffer = $lic_set->get(
"license_warning");
4626 include_once(
"./Services/License/classes/class.ilLicense.php");
4628 foreach ($licensed_items as $item)
4630 $license =&
new ilLicense($item[
'obj_id']);
4631 $remaining = $license->getRemainingLicenses();
4632 if ($remaining <= $buffer)
4634 $lng->loadlanguageModule(
"license");
4635 ilUtil::sendInfo(sprintf($this->lng->txt(
"course_licenses_rare"), $remaining), $a_keep);
4645 return array(
"ilCourseRegisterGUI",
'ilConditionHandlerInterface');
4651 $this->initCourseContentInterface();
4652 $this->cci_obj->cci_setContainer($this);
4653 $this->cci_obj->cci_objectives();
4659 $this->tabs_gui->setTabActive(
'edit_content');
4661 $this->initCourseContentInterface();
4662 $this->cci_obj->cci_setContainer($this);
4663 $this->cci_obj->cci_view();
4669 $this->initCourseContentInterface();
4670 $this->cci_obj->cci_setContainer($this);
4671 $this->cci_obj->cci_objectives_ask_reset();
4679 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
4682 $tmp_obj_res->
reset($this->object->getId());
4686 $this->initCourseContentInterface();
4687 $this->cci_obj->cci_setContainer($this);
4688 $this->cci_obj->cci_objectives();
4694 switch ($this->ctrl->getCmd())
4697 #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
4709 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
4710 if(substr($a_add,0,5) ==
'rcode')
4712 if($ilUser->getId() == ANONYMOUS_USER_ID)
4716 "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
4717 $ilUser->getCurrentLanguage()
4729 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"write",
"", $a_target))
4734 if ($ilAccess->checkAccess(
"read",
"", $a_target))
4741 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
4747 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
4755 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
4761 return mktime($time[
'h'],$time[
'm'],0,$date[
'm'],$date[
'd'],$date[
'y']);
4766 return array(
'y' => date(
'Y',$a_unix_time),
4767 'm' => date(
'n',$a_unix_time),
4768 'd' => date(
'd',$a_unix_time));
4773 return array(
'h' => date(
'G',$a_unix_time),
4774 'm' => date(
'i',$a_unix_time),
4775 's' => date(
's',$a_unix_time));
4788 $this->tabs_gui->setTabActive(
'settings');
4791 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
4796 $latitude = $this->
object->getLatitude();
4797 $longitude = $this->
object->getLongitude();
4798 $zoom = $this->
object->getLocationZoom();
4801 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
4804 $latitude = $def[
"latitude"];
4805 $longitude = $def[
"longitude"];
4806 $zoom = $def[
"zoom"];
4812 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
4814 $form->setFormAction($ilCtrl->getFormAction($this));
4816 $form->setTitle($this->lng->txt(
"crs_map_settings"));
4822 $public->setChecked($this->object->getEnableCourseMap());
4823 $form->addItem($public);
4829 $loc_prop->setLongitude($longitude);
4830 $loc_prop->setZoom($zoom);
4831 $form->addItem($loc_prop);
4833 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
4835 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
4847 $this->
object->update();
4849 $ilCtrl->redirect($this,
"editMapSettings");
4859 $this->tabs_gui->setTabActive(
"members");
4861 $this->tabs_gui->setSubTabActive(
"crs_members_map");
4863 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
4869 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
4871 $map->setMapId(
"course_map");
4872 $map->setWidth(
"700px");
4873 $map->setHeight(
"500px");
4874 $map->setLatitude($this->object->getLatitude());
4875 $map->setLongitude($this->object->getLongitude());
4876 $map->setZoom($this->object->getLocationZoom());
4877 $map->setEnableTypeControl(
true);
4878 $map->setEnableNavigationControl(
true);
4879 $map->setEnableCentralMarker(
true);
4881 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
4885 foreach($members as $user_id)
4887 $map->addUserMarker($user_id);
4891 $tpl->setContent($map->getHTML());
4892 $tpl->setLeftContent($map->getUserListHTML());
4901 $this->object->getAboStatus(), $this->
object->getRefId(), $this->
object->getId());
4907 static function _modifyItemGUI($a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path,
4908 $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id = 0)
4910 global
$lng, $ilAccess;
4913 if ($a_parent_ref_id == 0)
4915 $a_parent_ref_id = $a_course_ref_id;
4919 if($a_item_data[
'type'] ==
'tst' and
4922 $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));
4925 $a_item_list_gui->enableSubscribe($a_abo_status);
4927 $is_tutor = ($ilAccess->checkAccess(
'write',
'',
4928 $a_course_ref_id,
'crs', $a_course_obj_id));
4930 if($a_show_path and $is_tutor)
4932 $a_item_list_gui->addCustomProperty($lng->txt(
'path'),
4946 if ($this->object->getType() !=
'crs')
4950 if (!$ilAccess->checkAccess(
'write',
'',
4951 $this->object->getRefId(),
'crs',$this->
object->getId()))
4955 if($this->object->enabledObjectiveView())
4969 if(!
$_SESSION[
'crs_timings_panel'][$this->object->getId()] or 1)
4973 $this->tabs_gui->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"view"));
4977 $this->tabs_gui->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"disableAdministrationPanel"));
4982 $this->tabs_gui->addSubTabTarget(
'timings_timings',
4983 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editUserTimings'));
5002 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
5005 if(is_array(
$_POST[$a_field][
'date']))
5007 $dt[
'year'] = (int)
$_POST[$a_field][
'date'][
'y'];
5008 $dt[
'mon'] = (int)
$_POST[$a_field][
'date'][
'm'];
5009 $dt[
'mday'] = (int)
$_POST[$a_field][
'date'][
'd'];
5010 $dt[
'hours'] = (int)
$_POST[$a_field][
'time'][
'h'];
5011 $dt[
'minutes'] = (int)
$_POST[$a_field][
'time'][
'm'];
5012 $dt[
'seconds'] = (int)
$_POST[$a_field][
'time'][
's'];
5016 $date = date_parse(
$_POST[$a_field][
'date'].
" ".
$_POST[$a_field][
'time']);
5017 $dt[
'year'] = (int) $date[
'year'];
5018 $dt[
'mon'] = (int) $date[
'month'];
5019 $dt[
'mday'] = (int) $date[
'day'];
5020 $dt[
'hours'] = (int) $date[
'hour'];
5021 $dt[
'minutes'] = (int) $date[
'minute'];
5022 $dt[
'seconds'] = (int) $date[
'second'];
5038 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_objectives_ask_reset.html",
'Modules/Course');
5040 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
5041 $this->tpl->setVariable(
"INFO_STRING",$this->lng->txt(
'crs_objectives_reset_sure'));
5042 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
5043 $this->tpl->setVariable(
"TXT_RESET",$this->lng->txt(
'reset'));
5052 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
5055 $tmp_obj_res->
reset($this->object->getId());
5057 $ilUser->deletePref(
'crs_objectives_force_details_'.$this->object->getId());
5065 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
5069 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
5073 $this->start_obj =
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
5074 if(count($this->start_obj->getStartObjects()) and !$this->start_obj->allFullfilled($ilUser->getId()))
5083 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
5084 include_once
'./Services/Repository/classes/class.ilRepositoryExplorer.php';
5085 include_once
'./Services/Link/classes/class.ilLink.php';
5087 global $rbacsystem,
$ilias,
$ilUser,$ilAccess,$ilObjDataCache;
5089 $this->tabs_gui->setSubTabActive(
'view');
5091 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_start_view.html",
'Modules/Course');
5092 $this->tpl->setVariable(
"INFO_STRING",$this->lng->txt(
'crs_info_start'));
5093 $this->tpl->setVariable(
"TBL_TITLE_START",$this->lng->txt(
'crs_table_start_objects'));
5094 $this->tpl->setVariable(
"HEADER_NR",$this->lng->txt(
'crs_nr'));
5095 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
5096 $this->tpl->setVariable(
"HEADER_EDITED",$this->lng->txt(
'crs_objective_accomplished'));
5099 $lm_continue =&
new ilCourseLMHistory($this->object->getRefId(),$ilUser->getId());
5103 foreach($this->start_obj->getStartObjects() as $start)
5105 $obj_id = $ilObjDataCache->lookupObjId($start[
'item_ref_id']);
5106 $ref_id = $start[
'item_ref_id'];
5107 $type = $ilObjDataCache->lookupType(
$obj_id);
5113 $obj_frame = $obj_frame ? $obj_frame :
'';
5116 $obj_frame = $type ==
'tst' ?
'' : $obj_frame;
5118 $contentObj =
false;
5120 if($ilAccess->checkAccess(
'read',
'',
$ref_id))
5122 $this->tpl->setCurrentBlock(
"start_read");
5123 $this->tpl->setVariable(
"READ_TITLE_START",$ilObjDataCache->lookupTitle(
$obj_id));
5124 $this->tpl->setVariable(
"READ_TARGET_START",$obj_frame);
5125 $this->tpl->setVariable(
"READ_LINK_START", $obj_link.
'&crs_show_result='.$this->object->getRefId());
5126 $this->tpl->parseCurrentBlock();
5130 $this->tpl->setCurrentBlock(
"start_visible");
5131 $this->tpl->setVariable(
"VISIBLE_LINK_START",$ilObjDataCache->lookupTitle(
$obj_id));
5132 $this->tpl->parseCurrentBlock();
5136 if(isset($continue_data[
$ref_id]))
5138 $this->tpl->setCurrentBlock(
"link");
5139 $this->tpl->setVariable(
"LINK_HREF",
ilLink::_getLink($ref_id,
'',array(
'obj_id',
5140 $continue_data[$ref_id][
'lm_page_id'])));
5141 #$this->tpl->setVariable("CONTINUE_LINK_TARGET",$target);
5142 $this->tpl->setVariable(
"LINK_NAME",$this->lng->txt(
'continue_work'));
5143 $this->tpl->parseCurrentBlock();
5147 if(!$ilUser->isDesktopItem($ref_id,$type) and
5148 $this->
object->getAboStatus())
5150 if ($ilAccess->checkAccess(
'read',
'',$ref_id))
5152 $this->tpl->setCurrentBlock(
"link");
5153 $this->ctrl->setParameterByClass(get_class($this),
'item_ref_id',$ref_id);
5154 $this->ctrl->setParameterByClass(get_class($this),
'item_id',$ref_id);
5155 $this->ctrl->setParameterByClass(get_class($this),
'type',$type);
5157 $this->tpl->setVariable(
"LINK_HREF",$this->ctrl->getLinkTarget($this,
'addToDesk'));
5158 $this->tpl->setVariable(
"LINK_NAME", $this->lng->txt(
"to_desktop"));
5159 $this->tpl->parseCurrentBlock();
5162 elseif($this->object->getAboStatus())
5164 $this->tpl->setCurrentBlock(
"link");
5165 $this->ctrl->setParameterByClass(get_class($this),
'item_ref_id',$ref_id);
5166 $this->ctrl->setParameterByClass(get_class($this),
'item_id',$ref_id);
5167 $this->ctrl->setParameterByClass(get_class($this),
'type',$type);
5169 $this->tpl->setVariable(
"LINK_HREF",$this->ctrl->getLinkTarget($this,
'removeFromDesk'));
5170 $this->tpl->setVariable(
"LINK_NAME", $this->lng->txt(
"unsubscribe"));
5171 $this->tpl->parseCurrentBlock();
5176 if(strlen($ilObjDataCache->lookupDescription(
$obj_id)))
5178 $this->tpl->setCurrentBlock(
"start_description");
5179 $this->tpl->setVariable(
"DESCRIPTION_START",$ilObjDataCache->lookupDescription(
$obj_id));
5180 $this->tpl->parseCurrentBlock();
5184 if($this->start_obj->isFullfilled($ilUser->getId(),
$ref_id))
5186 $accomplished =
'accomplished';
5190 $accomplished =
'not_accomplished';
5192 $this->tpl->setCurrentBlock(
"start_row");
5194 $this->tpl->setVariable(
"EDITED_ALT",$this->lng->txt(
'crs_objective_'.$accomplished));
5195 $this->tpl->setVariable(
"ROW_CLASS",
'option_value');
5196 $this->tpl->setVariable(
"ROW_CLASS_CENTER",
'option_value_center');
5197 $this->tpl->setVariable(
"OBJ_NR_START",++$counter.
'.');
5198 $this->tpl->parseCurrentBlock();
5212 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
5214 if($settings->isActive() and $settings->getContainer() != $this->
object->getRefId())
5216 $settings->setContainer($this->object->getRefId());
5217 $rbacsystem->initMemberView();
5229 $link = chr(13).chr(10).chr(13).chr(10);
5230 $link .= $this->lng->txt(
'crs_mail_permanent_link');
5231 $link .= chr(13).chr(10).chr(13).chr(10);
5232 include_once
'./Services/Link/classes/class.ilLink.php';
5234 return rawurlencode(base64_encode($link));
5246 include_once
"Services/Certificate/classes/class.ilCertificate.php";
5251 $cert_url = $this->ctrl->getLinkTarget($this,
"deliverCertificate");
5253 $this->lng->loadLanguageModule(
"certificate");
5254 $lg->addCustomCommand($cert_url,
"download_certificate");
5256 $lg->addHeaderIcon(
"cert_icon",
5258 $this->lng->txt(
"download_certificate"),
5265 if($ilSetting->get(
"crsgrp_ntf"))
5267 if(!$ilUser->getPref(
"grpcrs_ntf_".$this->ref_id))
5269 $lg->addHeaderIcon(
"not_icon",
5271 $this->lng->txt(
"crs_notification_deactivated"));
5273 $this->ctrl->setParameter($this,
"crs_ntf", 1);
5274 $caption =
"crs_activate_notification";
5278 $lg->addHeaderIcon(
"not_icon",
5280 $this->lng->txt(
"crs_notification_activated"));
5282 $this->ctrl->setParameter($this,
"crs_ntf", 0);
5283 $caption =
"crs_deactivate_notification";
5286 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,
"saveNotification"),
5290 $this->ctrl->setParameter($this,
"crs_ntf",
"");
5302 if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
5308 $user_id = $ilUser->getId();
5311 include_once
"Services/Certificate/classes/class.ilCertificate.php";
5317 $this->ctrl->redirect($this);
5320 include_once
"./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
5322 $certificate->outCertificate(array(
"user_id" => $user_id),
true);