5 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
37 $this->ctrl->saveParameter($this,array(
"ref_id",
"cmdClass"));
42 $this->lng->loadLanguageModule(
'crs');
44 $this->SEARCH_USER = 1;
45 $this->SEARCH_GROUP = 2;
46 $this->SEARCH_COURSE = 3;
54 case "deleteSubscribers":
58 case "addSubscribers":
59 $this->addSubscribers();
62 case "addFromWaitingList":
63 $this->addFromWaitingList();
66 case "removeFromWaitingList":
85 if(isset(
$_POST[
'btn_pressed'][
'deleteMembers']))
89 elseif(
$_POST[
'btn_pressed'][
'sendMailToSelectedUsers'])
101 if(isset(
$_GET[
'member_id']))
107 $_POST[
'member'] = array_unique(array_merge((array)
$_POST[
'members'],
108 (array) $_POST[
'tutors'],
109 (array) $_POST[
'admins'],
110 (array) $_POST[
'waiting'],
111 (array) $_POST[
'subscribers']));
115 if (!count(
$_POST[
"member"]))
125 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
130 'rcp_to' => implode(
',',$rcps),
145 #ilUtil::sendSuccess($this->lng->txt("action_aborted"),true);
154 if(!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"],
'crs'))
156 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_create"),$this->ilias->error_obj->MESSAGE);
158 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_create.html",
'Modules/Course');
160 $this->ctrl->setParameter($this,
"new_type",
'crs');
161 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"save"));
163 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"crs_new"));
164 $this->tpl->setVariable(
"TYPE_IMG",
166 $this->tpl->setVariable(
"ALT_IMG", $this->lng->txt(
"obj_crs"));
167 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
168 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"crs_add"));
169 $this->tpl->setVariable(
"CMD_SUBMIT",
"save");
170 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
171 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'title'));
172 $this->tpl->setVariable(
"TXT_DESC",$this->lng->txt(
'desc'));
175 $this->tpl->setVariable(
'CRS_NEW',$this->form_gui->getHTML());
178 $this->tpl->setVariable(
"IMPORT_FORM", $this->form->getHTML());
190 $lng->loadLanguageModule(
"form");
191 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
193 $this->form_gui->setTableWidth(
"600px");
194 $this->form_gui->setTitle($lng->txt(
"crs_new"));
196 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
201 $type_input->setValue(
"crs");
202 $this->form_gui->addItem($type_input);
207 $title_input->setMaxLength(128);
208 $this->form_gui->addItem($title_input);
212 $this->form_gui->addItem($desc_input);
215 $this->form_gui->addCommandButton(
"save", $lng->txt(
"save"));
216 $this->form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
228 $lng->loadLanguageModule(
"crs");
230 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
232 $this->form->setTableWidth(
'600px');
233 $this->form->setTarget(
"_top");
236 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
239 $fi->setRequired(
true);
240 $this->form->addItem($fi);
242 $this->form->addCommandButton(
"importFile", $lng->txt(
"import"));
243 $this->form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
244 $this->form->setTitle($lng->txt($a_new_type.
"_import"));
246 $this->form->setFormAction($ilCtrl->getFormAction($this));
257 if($new_id = parent::importFileObject())
261 $part->updateNotification($ilUser->getId(),1);
264 $this->ctrl->returnToParent($this);
271 $this->ctrl->setCmd(
"view");
289 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
291 $this->ctrl->setCmdClass(get_class($course_content_obj));
292 $this->ctrl->setCmd(
'editUserTimings');
293 $this->ctrl->forwardCommand($course_content_obj);
304 global $rbacsystem, $ilUser,
$ilCtrl;
314 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
321 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
325 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
327 $this->
object->getRefId(),
'crs');
331 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
332 $this->ctrl->setReturn($this,
'view_content');
334 $this->ctrl->setCmdClass(get_class($agreement));
335 $this->ctrl->forwardCommand($agreement);
357 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
360 $this->ctrl->setCmdClass(get_class($course_content_obj));
361 $this->ctrl->forwardCommand($course_content_obj);
379 $this->ctrl->setCmd(
"showSummary");
380 $this->ctrl->setCmdClass(
"ilinfoscreengui");
401 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
404 $this->tabs_gui->setTabActive(
'info_short');
406 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
407 include_once
'Modules/Course/classes/class.ilCourseFile.php';
412 $info->enablePrivateNotes();
413 $info->enableFeedback();
415 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
417 $info->enableNewsEditing();
421 if(strlen($this->object->getImportantInformation()) or
422 strlen($this->object->getSyllabus()) or
425 $info->addSection($this->lng->txt(
'crs_general_informations'));
428 if(strlen($this->object->getImportantInformation()))
430 $info->addProperty($this->lng->txt(
'crs_important_info'),
434 if(strlen($this->object->getSyllabus()))
436 $info->addProperty($this->lng->txt(
'crs_syllabus'), nl2br(
442 $tpl =
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'Modules/Course');
446 $tpl->setCurrentBlock(
"files");
447 $this->ctrl->setParameter($this,
'file_id',$file->getFileId());
448 $tpl->setVariable(
"DOWN_LINK",$this->ctrl->getLinkTarget($this,
'sendfile'));
449 $tpl->setVariable(
"DOWN_NAME",$file->getFileName());
450 $tpl->setVariable(
"DOWN_INFO_TXT",$this->lng->txt(
'crs_file_size_info'));
451 $tpl->setVariable(
"DOWN_SIZE",$file->getFileSize());
452 $tpl->setVariable(
"TXT_BYTES",$this->lng->txt(
'bytes'));
453 $tpl->parseCurrentBlock();
455 $info->addProperty($this->lng->txt(
'crs_file_download'),
459 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
462 $record_gui->parse();
465 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
468 if($this->object->hasContactData())
470 $info->addSection($this->lng->txt(
"crs_contact"));
472 if(strlen($this->object->getContactName()))
474 $info->addProperty($this->lng->txt(
"crs_contact_name"),
475 $this->
object->getContactName());
477 if(strlen($this->object->getContactResponsibility()))
479 $info->addProperty($this->lng->txt(
"crs_contact_responsibility"),
480 $this->
object->getContactResponsibility());
482 if(strlen($this->object->getContactPhone()))
484 $info->addProperty($this->lng->txt(
"crs_contact_phone"),
485 $this->
object->getContactPhone());
487 if($this->object->getContactEmail())
489 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
490 $emails = split(
",",$this->object->getContactEmail());
491 foreach ($emails as $email) {
492 $email = trim($email);
493 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true ,
'Modules/Course');
496 $etpl->setVariable(
"CONTACT_EMAIL", $email);
497 $mailString .= $etpl->get().
"<br />";
499 $info->addProperty($this->lng->txt(
"crs_contact_email"), $mailString);
501 if(strlen($this->object->getContactConsultation()))
503 $info->addProperty($this->lng->txt(
"crs_contact_consultation"),
504 nl2br($this->object->getContactConsultation()));
509 $info->addSection($this->lng->txt(
"access"));
510 $info->showLDAPRoleGroupMappingInfo();
513 if($this->object->getOfflineStatus())
515 $info->addProperty($this->lng->txt(
'crs_visibility'),
516 $this->lng->txt(
'crs_visibility_unvisible'));
518 elseif($this->object->getActivationUnlimitedStatus())
520 $info->addProperty($this->lng->txt(
"crs_visibility"),
521 $this->lng->txt(
'crs_unlimited'));
525 $info->addProperty($this->lng->txt(
'crs_visibility'),
531 switch($this->object->getSubscriptionLimitationType())
534 $txt = $this->lng->txt(
"crs_info_reg_deactivated");
538 switch($this->object->getSubscriptionType())
541 $txt = $this->lng->txt(
"crs_info_reg_confirmation");
544 $txt = $this->lng->txt(
"crs_info_reg_direct");
547 $txt = $this->lng->txt(
"crs_info_reg_password");
553 $info->addProperty($this->lng->txt(
"crs_info_reg"),$txt);
558 if($this->object->getSubscriptionUnlimitedStatus())
560 $info->addProperty($this->lng->txt(
"crs_reg_until"),
561 $this->lng->txt(
'crs_unlimited'));
563 elseif($this->object->getSubscriptionStart() < time())
565 $info->addProperty($this->lng->txt(
"crs_reg_until"),
566 $this->lng->txt(
'crs_to').
' '.
569 elseif($this->object->getSubscriptionStart() > time())
571 $info->addProperty($this->lng->txt(
"crs_reg_until"),
572 $this->lng->txt(
'crs_from').
' '.
575 if ($this->object->isSubscriptionMembershipLimited())
577 $info->addProperty($this->lng->txt(
"mem_free_places"),
578 max(0,$this->object->getSubscriptionMaxMembers()- count($this->object->getMembers())));
589 $info->addProperty($this->lng->txt(
"crs_archive"),
596 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
599 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
602 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
606 $this->lng->loadLanguageModule(
'ps');
607 $info->addSection($this->lng->txt(
'crs_user_agreement_info'));
608 $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
612 $info->addProperty($this->lng->txt(
'ps_crs_user_fields'),$fields);
616 $info->enableLearningProgress(
true);
619 $this->ctrl->forwardCommand($info);
624 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
637 $this->tabs_gui->setTabActive(
'settings');
638 $this->tabs_gui->setSubTabActive(
'crs_start_objects');
641 $crs_start =&
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
643 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_list_starter.html",
'Modules/Course');
644 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
646 if(!count($starter = $crs_start->getStartObjects()))
648 $this->tpl->setCurrentBlock(
"btn_cell");
649 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTarget($this,
'selectStarter'));
650 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
'crs_add_starter'));
651 $this->tpl->parseCurrentBlock();
658 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
660 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'obj_crs'));
661 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'crs_edit_start_objects'));
662 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
663 $this->tpl->setVariable(
"HEADER_OPT",$this->lng->txt(
'options'));
664 $this->tpl->setVariable(
"BTN_ADD",$this->lng->txt(
'crs_add_starter'));
667 foreach($starter as $start_id =>
$data)
671 if(strlen($tmp_obj->getDescription()))
673 $this->tpl->setCurrentBlock(
"description");
674 $this->tpl->setVariable(
"DESCRIPTION_STARTER",$tmp_obj->getDescription());
675 $this->tpl->parseCurrentBlock();
678 $this->tpl->setCurrentBlock(
"starter_row");
680 $this->tpl->setVariable(
"STARTER_TITLE",$tmp_obj->getTitle());
682 $this->ctrl->setParameter($this,
'del_starter',$start_id);
683 $this->tpl->setVariable(
"DELETE_LINK",$this->ctrl->getLinkTarget($this,
'deleteStarter'));
684 $this->tpl->setVariable(
"DELETE_ALT",$this->lng->txt(
'delete'));
685 $this->tpl->parseCurrentBlock();
691 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
702 $crs_start =&
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
714 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
717 $this->tabs_gui->setTabActive(
'settings');
718 $this->tabs_gui->setSubTabActive(
'crs_start_objects');
729 $crs_start =&
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
731 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_add_starter.html",
'Modules/Course');
733 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
735 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'obj_crs'));
736 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'crs_select_starter'));
737 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
738 $this->tpl->setVariable(
"BTN_ADD",$this->lng->txt(
'crs_add_starter'));
739 $this->tpl->setVariable(
"BTN_CANCEL",$this->lng->txt(
'cancel'));
742 $this->
object->initCourseItemObject();
744 foreach($crs_start->getPossibleStarters($this->object->items_obj) as $item_ref_id)
748 if(strlen($tmp_obj->getDescription()))
750 $this->tpl->setCurrentBlock(
"description");
751 $this->tpl->setVariable(
"DESCRIPTION_STARTER",$tmp_obj->getDescription());
752 $this->tpl->parseCurrentBlock();
755 $this->tpl->setCurrentBlock(
"starter_row");
758 $this->tpl->setVariable(
"STARTER_TITLE",$tmp_obj->getTitle());
759 $this->tpl->parseCurrentBlock();
765 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
776 if(!count(
$_POST[
'starter']))
784 $crs_start =&
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
786 foreach(
$_POST[
'starter'] as $item_ref_id)
788 if(!$crs_start->exists($item_ref_id))
791 $crs_start->
add($item_ref_id);
818 include_once
'Modules/Course/classes/class.ilCourseFile.php';
830 $this->tabs_gui->setTabActive(
'settings');
831 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
834 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'Modules/Course');
835 $this->tpl->setVariable(
'INFO_TABLE',$this->form->getHTML());
844 $table_data[
'id'] = $file->getFileId();
845 $table_data[
'filename'] = $file->getFileName();
846 $table_data[
'filetype'] = $file->getFileType();
847 $table_data[
'filesize'] = $file->getFileSize();
849 $rows[] = $table_data;
852 include_once(
"./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
854 $table_gui->setTitle($this->lng->txt(
"crs_info_download"));
855 $table_gui->setData($rows);
856 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
857 $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->lng->txt(
"delete"));
858 $table_gui->setSelectAllCheckbox(
"file_id");
859 $this->tpl->setVariable(
'INFO_FILE_TABLE',$table_gui->getHTML());
874 if(!count(
$_POST[
'file_id']))
882 $this->tabs_gui->setTabActive(
'settings');
883 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
885 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
889 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteInfoFiles"));
890 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
891 $c_gui->setCancel($this->lng->txt(
"cancel"),
"editInfo");
892 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteInfoFiles");
895 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
896 foreach(
$_POST[
"file_id"] as $file_id)
899 $c_gui->addItem(
"file_id[]", $file_id,
$file->getFileName());
902 $this->tpl->setContent($c_gui->getHTML());
913 if(!count(
$_POST[
'file_id']))
919 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
921 foreach(
$_POST[
'file_id'] as $file_id)
924 if($this->object->getId() ==
$file->getCourseId())
943 if(is_object($this->form))
948 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
950 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
951 $this->form->setMultipart(
true);
952 $this->form->setTitle($this->lng->txt(
'crs_general_info'));
953 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
954 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
957 $area->
setValue($this->object->getImportantInformation());
960 $this->form->addItem($area);
963 $area->
setValue($this->object->getSyllabus());
966 $this->form->addItem($area);
969 $section->setTitle($this->lng->txt(
'crs_info_download'));
970 $this->form->addItem($section);
973 $file->enableFileNameSelection(
'file_name');
974 $this->form->addItem(
$file);
977 $section->setTitle($this->lng->txt(
'crs_contact'));
978 $this->form->addItem($section);
980 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_name'),
'contact_name');
981 $text->
setValue($this->object->getContactName());
983 $text->setMaxLength(70);
984 $this->form->addItem($text);
986 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
987 $text->
setValue($this->object->getContactResponsibility());
989 $text->setMaxLength(70);
990 $this->form->addItem($text);
992 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_phone'),
'contact_phone');
993 $text->
setValue($this->object->getContactPhone());
995 $text->setMaxLength(40);
996 $this->form->addItem($text);
998 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_email'),
'contact_email');
999 $text->
setValue($this->object->getContactEmail());
1000 $text->setInfo($this->lng->txt(
'crs_contact_email_info'));
1002 $text->setMaxLength(255);
1003 $this->form->addItem($text);
1005 $area =
new ilTextAreaInputGUI($this->lng->txt(
'crs_contact_consultation'),
'contact_consultation');
1006 $area->
setValue($this->object->getContactConsultation());
1009 $this->form->addItem($area);
1011 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
1014 $record_gui->parse();
1030 include_once
'Modules/Course/classes/class.ilCourseFile.php';
1032 $file_obj->setCourseId($this->object->getId());
1033 $file_obj->setFileName(strlen(
$_POST[
'file_name']) ?
1035 $_FILES[
'file'][
'name']);
1036 $file_obj->setFileSize($_FILES[
'file'][
'size']);
1037 $file_obj->setFileType($_FILES[
'file'][
'type']);
1038 $file_obj->setTemporaryName($_FILES[
'file'][
'tmp_name']);
1039 $file_obj->setErrorCode($_FILES[
'file'][
'error']);
1049 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
1051 'crs',$this->object->getId());
1055 $ilErr->setMessage(
'');
1056 $file_obj->validate();
1057 $this->
object->validateInfoSettings();
1059 if(strlen($ilErr->getMessage()))
1065 $this->
object->update();
1066 $file_obj->create();
1067 $record_gui->saveValues();
1069 $this->
object->updateECSContent();
1081 $activation_start = $this->
loadDate(
'activation_start');
1082 $activation_end = $this->
loadDate(
'activation_end');
1083 $subscription_start = $this->
loadDate(
'subscription_start');
1084 $subscription_end = $this->
loadDate(
'subscription_end');
1085 $archive_start = $this->
loadDate(
'archive_start');
1086 $archive_end = $this->
loadDate(
'archive_end');
1088 $this->
object->setActivationType((
int)
$_POST[
'activation_type']);
1089 $this->
object->setActivationStart($activation_start->get(
IL_CAL_UNIX));
1090 $this->
object->setActivationEnd($activation_end->get(
IL_CAL_UNIX));
1091 $this->
object->setSubscriptionLimitationType((
int) $_POST[
'subscription_limitation_type']);
1092 $this->
object->setSubscriptionType((
int) $_POST[
'subscription_type']);
1094 $this->
object->setSubscriptionStart($subscription_start->get(
IL_CAL_UNIX));
1095 $this->
object->setSubscriptionEnd($subscription_end->get(
IL_CAL_UNIX));
1096 $this->
object->enableSubscriptionMembershipLimitation((
int) $_POST[
'subscription_membership_limitation']);
1097 $this->
object->setSubscriptionMaxMembers((
int) $_POST[
'subscription_max']);
1098 $this->
object->enableRegistrationAccessCode((
int) $_POST[
'reg_code_enabled']);
1100 $this->
object->enableWaitingList((
int) $_POST[
'waiting_list']);
1101 #$this->object->setSubscriptionNotify((int) $_POST['subscription_notification']);
1102 $this->
object->setViewMode((
int) $_POST[
'view_mode']);
1110 $this->
object->setOrderType((
int) $_POST[
'order_type']);
1112 $this->
object->setArchiveStart($archive_start->get(
IL_CAL_UNIX));
1113 $this->
object->setArchiveEnd($archive_end->get(
IL_CAL_UNIX));
1114 $this->
object->setArchiveType($_POST[
'archive_type']);
1115 $this->
object->setAboStatus((
int) $_POST[
'abo']);
1116 $this->
object->setShowMembers((
int) $_POST[
'show_members']);
1118 $this->
object->enableSessionLimit((
int) $_POST[
'sl']);
1119 $this->
object->setNumberOfPreviousSessions(is_numeric($_POST[
'sp']) ? (
int) $_POST[
'sp'] : -1 );
1120 $this->
object->setNumberOfnextSessions(is_numeric($_POST[
'sn']) ? (
int) $_POST[
'sn'] : -1 );
1122 if($this->object->validate())
1124 $this->
object->update();
1127 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1144 $this->ctrl->redirect($this,
'edit');
1164 include_once(
'./Services/WebServices/ECS/classes/class.ilECSSettings.php');
1168 if(!$ecs_settings->isEnabled())
1179 $this->
object->handleECSSettings((
bool)
$_POST[
'ecs_export'],(
int) $_POST[
'ecs_owner'],(array) $_POST[
'ecs_mids']);
1182 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
1183 $export =
new ilECSExport($this->object->getId());
1184 if($export->isExported())
1187 $rbacadmin->grantPermission($ecs_settings->getGlobalRole(),
1189 $this->
object->getRefId());
1194 $rbacadmin->revokePermission($this->object->getRefId(),
1195 $ecs_settings->getGlobalRole());
1223 $this->tabs_gui->setTabActive(
'settings');
1224 $this->tabs_gui->setSubTabActive(
'crs_settings');
1228 $this->tpl->setContent($this->form->getHTML());
1240 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1241 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
1243 if(!is_object($this->form))
1248 $this->form->setTitle($this->lng->txt(
'crs_edit'));
1251 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
1252 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1254 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
1258 $title->setSubmitFormOnEnter(
true);
1259 $title->setValue($this->object->getTitle());
1261 $title->setMaxLength(128);
1262 $title->setRequired(
true);
1263 $this->form->addItem(
$title);
1267 $desc->setValue($this->object->getLongDescription());
1270 $this->form->addItem(
$desc);
1274 $act_type->
setValue($this->object->getActivationType());
1277 $opt->
setInfo($this->lng->txt(
'crs_availability_unvisible_info'));
1278 $act_type->addOption($opt);
1281 $opt->
setInfo($this->lng->txt(
'crs_availability_limitless_info'));
1282 $act_type->addOption($opt);
1285 $opt->
setInfo($this->lng->txt(
'crs_availability_until_info'));
1288 #$start->setMode(ilDateTimeInputGUI::MODE_INPUT);
1292 $opt->addSubItem($start);
1295 #$end->setMode(ilDateTimeInputGUI::MODE_INPUT);
1299 $opt->addSubItem($end);
1301 $act_type->addOption($opt);
1303 $this->form->addItem($act_type);
1306 $section->setTitle($this->lng->txt(
'crs_reg'));
1307 $this->form->addItem($section);
1309 $reg_type =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_reg_period'),
'subscription_limitation_type');
1310 $reg_type->
setValue($this->object->getSubscriptionLimitationType());
1313 $opt->
setInfo($this->lng->txt(
'crs_registration_deactivated'));
1314 $reg_type->addOption($opt);
1317 $opt->
setInfo($this->lng->txt(
'crs_reg_unlim_info'));
1318 $reg_type->addOption($opt);
1321 $opt->
setInfo($this->lng->txt(
'crs_reg_lim_info'));
1327 $opt->addSubItem($start);
1333 $opt->addSubItem($end);
1335 $reg_type->addOption($opt);
1337 $this->form->addItem($reg_type);
1341 $reg_proc =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_registration_type'),
'subscription_type');
1342 $reg_proc->
setValue($this->object->getSubscriptionType());
1343 $reg_proc->setInfo($this->lng->txt(
'crs_reg_type_info'));
1346 $reg_proc->addOption($opt);
1349 $reg_proc->addOption($opt);
1354 $pass->setSubmitFormOnEnter(
true);
1356 $pass->setMaxLength(12);
1357 $pass->
setValue($this->object->getSubscriptionPassword());
1359 $opt->addSubItem($pass);
1360 $reg_proc->addOption($opt);
1362 $this->form->addItem($reg_proc);
1366 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1367 $reg_code->setValue(1);
1368 $reg_code->setInfo($this->lng->txt(
'crs_reg_code_enabled_info'));
1369 $reg_code->setOptionTitle($this->lng->txt(
'crs_reg_code'));
1377 #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
1379 if(!$this->object->getRegistrationAccessCode())
1381 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1385 $reg_link->setValue($this->object->getRegistrationAccessCode());
1386 $this->form->addItem($reg_link);
1390 include_once
'./classes/class.ilLink.php';
1391 $val =
ilLink::_getLink($this->object->getRefId(),$this->
object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode());
1392 $link->setHTML(
'<font class="small">'.$val.
'</font>');
1393 $reg_code->addSubItem($link);
1395 $this->form->addItem($reg_code);
1399 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'crs_subscription_max_members_short'),
'subscription_membership_limitation');
1401 $lim->setOptionTitle($this->lng->txt(
'crs_subscription_max_members'));
1402 $lim->setChecked($this->object->isSubscriptionMembershipLimited());
1405 $max->setSubmitFormOnEnter(
true);
1407 $max->setMaxLength(4);
1408 $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->
object->getSubscriptionMaxMembers() :
'');
1409 $max->setTitle($this->lng->txt(
'members').
':');
1410 $max->setInfo($this->lng->txt(
'crs_reg_max_info'));
1412 $lim->addSubItem($max);
1415 $wait->setOptionTitle($this->lng->txt(
'crs_waiting_list'));
1416 $wait->setChecked($this->object->enabledWaitingList());
1417 $wait->setInfo($this->lng->txt(
'crs_wait_info'));
1418 $lim->addSubItem($wait);
1420 $this->form->addItem($lim);
1424 $pres->setTitle($this->lng->txt(
'crs_view_mode'));
1426 $this->form->addItem($pres);
1430 $view_type->
setValue($this->object->getViewMode());
1433 $opt->
setInfo($this->lng->txt(
'cntr_view_info_sessions'));
1434 $view_type->addOption($opt);
1437 $opt->
setInfo($this->lng->txt(
'cntr_view_info_simple'));
1438 $view_type->addOption($opt);
1441 $opt->
setInfo($this->lng->txt(
'cntr_view_info_by_type'));
1442 $view_type->addOption($opt);
1445 $opt->
setInfo($this->lng->txt(
'crs_view_info_objective'));
1446 $view_type->addOption($opt);
1449 $opt->
setInfo($this->lng->txt(
'crs_view_info_timing'));
1450 $view_type->addOption($opt);
1475 $this->form->addItem($view_type);
1479 $sort->
setValue($this->object->getOrderType());
1482 $opt->
setInfo($this->lng->txt(
'crs_sort_title_info'));
1483 $sort->addOption($opt);
1486 $opt->
setInfo($this->lng->txt(
'crs_sort_manual_info'));
1487 $sort->addOption($opt);
1490 $opt->
setInfo($this->lng->txt(
'crs_sort_timing_info'));
1491 $sort->addOption($opt);
1494 $this->form->addItem($sort);
1498 $sess->setChecked($this->object->isSessionLimitEnabled());
1499 $sess->setInfo($this->lng->txt(
'sess_limit_info'));
1502 #$prev->setSubmitFormOnEnter(true);
1504 $prev->setValue($this->object->getNumberOfPreviousSessions() == -1 ?
1506 $this->
object->getNumberOfPreviousSessions()
1509 $prev->setMaxLength(3);
1510 $sess->addSubItem($prev);
1513 #$next->setSubmitFormOnEnter(true);
1515 $next->setValue($this->object->getNumberOfNextSessions() == -1 ?
1517 $this->
object->getNumberOfnextSessions()
1520 $next->setMaxLength(3);
1521 $sess->addSubItem($next);
1523 $this->form->addItem(
$sess);
1526 $further->setTitle($this->lng->txt(
'crs_further_settings'));
1527 $this->form->addItem($further);
1529 $desk =
new ilCheckboxInputGUI($this->lng->txt(
'crs_add_remove_from_desktop'),
'abo');
1530 $desk->
setChecked($this->object->getAboStatus());
1531 $desk->setInfo($this->lng->txt(
'crs_add_remove_from_desktop_info'));
1532 $this->form->addItem($desk);
1535 $mem->
setChecked($this->object->getShowMembers());
1536 $mem->setInfo($this->lng->txt(
'crs_show_members_info'));
1537 $this->form->addItem($mem);
1553 include_once(
'./Services/WebServices/ECS/classes/class.ilECSSettings.php');
1557 if(!$ecs_settings->isEnabled())
1562 $this->lng->loadLanguageModule(
'ecs');
1565 $ecs->setTitle($this->lng->txt(
'ecs_export'));
1566 $this->form->addItem($ecs);
1568 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
1569 $ecs_export =
new ilECSExport($this->object->getId());
1572 $exp->setRequired(
true);
1573 $exp->setValue($ecs_export->isExported() ? 1 : 0);
1575 $off =
new ilRadioOption($this->lng->txt(
'ecs_export_disabled'),0);
1576 $exp->addOption($off);
1578 $on =
new ilRadioOption($this->lng->txt(
'ecs_export_enabled'),1);
1579 $exp->addOption($on);
1581 $this->form->addItem($exp);
1587 if($ecs_export->getEContentId())
1589 include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentReader.php');
1592 $econtent_reader->
read();
1593 if($content = $econtent_reader->getEContent())
1595 $members = $content[0]->getParticipants();
1596 $owner = $content[0]->getOwner();
1600 include_once(
'./Services/WebServices/ECS/classes/class.ilECSCommunityReader.php');
1602 if(count($parts =
$reader->getPublishableParticipants()) > 1)
1604 $ilLog->write(__METHOD__.
': Found '.count($parts).
' participants for publishing');
1605 #$publish_as = new ilCustomInputGUI('','');
1606 #$publish_as->setHtml('<strong>'.$this->lng->txt('ecs_publish_as').'</strong>');
1608 #$publish_as = new ilCheckboxGroupInputGUI(
1609 # $this->lng->txt('ecs_publish_as'),
1616 foreach($parts as $participant)
1618 $community =
$reader->getCommunityById($participant->getCommunityId());
1620 $part =
new ilRadioOption($community->getTitle(),$participant->getMID());
1621 $part->
setInfo($community->getDescription());
1622 $coms->addOption($part);
1624 #$publish_as->addSubItem($coms);
1625 #$on->addSubItem($publish_as);
1626 $on->addSubItem($coms);
1631 $ilLog->write(__METHOD__.
': Found '.count($parts).
' participants for publishing');
1633 $owner_ids =
$reader->getOwnMIDs();
1634 $hidden->setValue($owner_ids[0]);
1635 $this->form->addItem($hidden);
1638 #$publish_for = new ilCustomInputGUI('','');
1640 $publish_for->
setValue((array) $members);
1642 #$publish_for->setHtml('<strong>'.$this->lng->txt('ecs_publish_for').'</strong>');
1644 foreach(
$reader->getEnabledParticipants() as $participant)
1646 $community =
$reader->getCommunityById($participant->getCommunityId());
1649 $community->getTitle().
': '.$participant->getParticipantName(),
1655 $community->getTitle().
': '.$participant->getParticipantName(),
1656 $participant->getMID()
1658 $publish_for->addOption($com);
1661 #$com = new ilCheckboxInputGUI('111','ecs_mids[]');
1662 #$com->setOptionTitle($community->getTitle().': '.$participant->getParticipantName());
1663 #$com->setValue($participant->getMID());
1664 #$com->setChecked(in_array($participant->getMID(),$members));
1665 #$publish_for->addSubItem($com);
1672 $ilLog->write(__METHOD__.
': Error connecting to ECS server. '.$exc->getMessage());
1677 $ilLog->write(__METHOD__.
': Error parsing ECS query: '.$exc->getMessage());
1699 $this->tabs_gui->setTabActive(
'settings');
1701 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_edit_icons.html",
'Modules/Course');
1703 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
'updateCourseIcons'));
1704 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
1705 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
1706 $this->tpl->setVariable(
"CMD_CANCEL",
"cancel");
1707 $this->tpl->setVariable(
"CMD_SUBMIT",
"updateCourseIcons");
1708 $this->tpl->parseCurrentBlock();
1713 include_once
'Modules/Course/classes/class.ilCourseFile.php';
1729 if ($this->ilias->getSetting(
"custom_icons"))
1731 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
1732 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
1736 $this->ctrl->redirect($this,
"editCourseIcons");
1746 global $rbacsystem,$ilUser,$ilAccess;
1751 $this->tabs_gui->addSubTabTarget(
"crs_settings",
1752 $this->ctrl->getLinkTarget($this,
'edit'),
1753 "edit", get_class($this));
1755 $this->tabs_gui->addSubTabTarget(
"crs_info_settings",
1756 $this->ctrl->getLinkTarget($this,
'editInfo'),
1757 "editInfo", get_class($this));
1759 $this->tabs_gui->addSubTabTarget(
"preconditions",
1760 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
1761 "",
"ilConditionHandlerInterface");
1762 $this->tabs_gui->addSubTabTarget(
"crs_start_objects",
1763 $this->ctrl->getLinkTarget($this,
'listStructure'),
1764 "listStructure", get_class($this));
1765 $this->tabs_gui->addSubTabTarget(
'groupings',
1766 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1771 if ($this->ilias->getSetting(
"custom_icons"))
1773 $this->tabs_gui->addSubTabTarget(
"icon_settings",
1774 $this->ctrl->getLinkTarget($this,
'editCourseIcons'),
1775 "editCourseIcons", get_class($this));
1779 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1782 $this->tabs_gui->addSubTabTarget(
"crs_map_settings",
1783 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
1784 "editMapSettings", get_class($this));
1788 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1789 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1793 $this->tabs_gui->addSubTabTarget(
'crs_custom_user_fields',
1794 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1796 'ilobjectcustomuserfieldsgui');
1800 case "item_activation":
1801 $this->tabs_gui->addSubTabTarget(
"activation",
1802 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
1803 "edit", get_class($this));
1804 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
1805 $this->tabs_gui->addSubTabTarget(
"preconditions",
1806 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
1807 "",
"ilConditionHandlerInterface");
1811 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1813 $this->tabs_gui->addSubTabTarget(
"crs_member_administration",
1814 $this->ctrl->getLinkTarget($this,
'members'),
1815 "members", get_class($this));
1817 $this->tabs_gui->addSubTabTarget(
"crs_members_groups",
1818 $this->ctrl->getLinkTargetByClass(
"ilCourseParticipantsGroupsGUI",
"show"),
1819 "",
"ilCourseParticipantsGroupsGUI");
1821 $this->tabs_gui->addSubTabTarget(
"crs_members_gallery",
1822 $this->ctrl->getLinkTarget($this,
'membersGallery'),
1823 "membersGallery", get_class($this));
1826 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1829 $this->tabs_gui->addSubTabTarget(
"crs_members_map",
1830 $this->ctrl->getLinkTarget($this,
'membersMap'),
1831 "membersMap", get_class($this));
1835 include_once
'Services/Mail/classes/class.ilMail.php';
1836 $mail =&
new ilMail($ilUser->getId());
1837 if($rbacsystem->checkAccess(
'mail_visible',$mail->getMailObjectReferenceId()))
1839 $this->tabs_gui->addSubTabTarget(
"mail_members",
1840 $this->ctrl->getLinkTarget($this,
'mailMembers'),
1841 "mailMembers", get_class($this));
1844 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1846 $this->tabs_gui->addSubTabTarget(
"events",
1847 $this->ctrl->getLinkTargetByClass(
'ilsessionoverviewgui',
'listSessions'),
1848 "",
'ilsessionoverviewgui');
1851 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
1854 $this->tabs_gui->addSubTabTarget(
'export_members',
1855 $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'),
1856 "",
'ilmemberexportgui');
1871 global $rbacadmin,$ilUser;
1882 $newObj->initCourseMemberObject();
1883 $newObj->members_obj->add($ilUser->getId(),
IL_CRS_ADMIN);
1884 $newObj->members_obj->updateNotification($ilUser->getId(),1);
1889 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1900 $this->ctrl->setParameter($this,
"ref_id", $newObj->getRefId());
1902 $this->ctrl->getLinkTarget($this,
"edit",
"",
false,
false)));
1922 if(!count(
$_POST[
'archives']))
1925 $this->archiveObject();
1929 if(count(
$_POST[
'archives']) > 1)
1932 $this->archiveObject();
1937 $this->
object->initCourseArchiveObject();
1939 $abs_path = $this->
object->archives_obj->getArchiveFile((
int)
$_POST[
'archives'][0]);
1940 $basename = basename($abs_path);
1955 if(isset(
$_GET[
'admin_hide']))
1957 $ilUser->writePref(
'crs_admin_hide',(
int)
$_GET[
'admin_hide']);
1959 if(isset(
$_GET[
'tutor_hide']))
1961 $ilUser->writePref(
'crs_tutor_hide',(
int)
$_GET[
'tutor_hide']);
1963 if(isset(
$_GET[
'member_hide']))
1965 $ilUser->writePref(
'crs_member_hide',(
int)
$_GET[
'member_hide']);
1967 if(isset(
$_GET[
'subscriber_hide']))
1969 $ilUser->writePref(
'crs_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1971 if(isset(
$_GET[
'wait_hide']))
1973 $ilUser->writePref(
'crs_wait_hide',(
int)
$_GET[
'wait_hide']);
1979 if($this->show_tracking)
1981 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1987 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1990 if($privacy->enabledCourseAccessTimes())
1992 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
1999 $tmp_data[
'firstname'] =
$name[
'firstname'];
2000 $tmp_data[
'lastname'] =
$name[
'lastname'];
2002 $tmp_data[
'passed'] = $this->
object->members_obj->hasPassed($usr_id) ? 1 : 0;
2003 $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
2004 $tmp_data[
'blocked'] = $this->
object->members_obj->isBlocked($usr_id) ? 1 : 0;
2005 $tmp_data[
'usr_id'] =
$usr_id;
2007 if($this->show_tracking)
2009 if(in_array($usr_id,$completed))
2013 elseif(in_array($usr_id,$in_progress))
2017 elseif(in_array($usr_id,$failed))
2027 if($privacy->enabledCourseAccessTimes())
2029 if(isset($progress[$usr_id][
'ts']) and $progress[
$usr_id][
'ts'])
2031 $tmp_data[
'access_ut'] = $progress[
$usr_id][
'ts'];
2036 $tmp_data[
'access_ut'] = 0;
2037 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
2040 $members[
$usr_id] = $tmp_data;
2042 return $members ? $members : array();
2057 include_once(
'./Modules/Course/classes/class.ilCourseParticipants.php');
2058 include_once(
'./Modules/Course/classes/class.ilCourseParticipantsTableGUI.php');
2059 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
2060 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
2063 if(isset(
$_GET[
'member_table_nav']))
2074 include_once(
'./Modules/Course/classes/class.ilCourseItems.php');
2079 $this->tabs_gui->setTabActive(
'members');
2080 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
2082 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_edit_members.html',
'Modules/Course');
2083 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
2088 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
2091 $ilToolbar->addInputItem($ul,
true);
2094 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
2101 $si->setOptions($options);
2102 $ilToolbar->addInputItem($si);
2105 $ilToolbar->addFormButton($lng->txt(
"add"),
"addAsMember");
2106 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2109 $ilToolbar->addSeparator();
2112 $ilToolbar->addButton($this->lng->txt(
"crs_search_users"),
2113 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
2116 $ilToolbar->addSeparator();
2119 $ilToolbar->addButton($this->lng->txt(
"crs_print_list"),
2120 $this->ctrl->getLinkTarget($this,
'printMembers'),
"_blank");
2126 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2128 if(count($wait = $waiting_list->getAllUsers()))
2130 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
2131 if($ilUser->getPref(
'crs_wait_hide'))
2134 $this->ctrl->setParameter($this,
'wait_hide',0);
2135 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2136 $this->lng->txt(
'show'),
2139 $this->ctrl->clearParameters($this);
2144 $this->ctrl->setParameter($this,
'wait_hide',1);
2145 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2146 $this->lng->txt(
'hide'),
2149 $this->ctrl->clearParameters($this);
2151 $table_gui->setUsers($wait);
2152 $table_gui->setTitle($this->lng->txt(
'crs_waiting_list'),
'icon_usr.gif',$this->lng->txt(
'crs_waiting_list'));
2153 $this->tpl->setVariable(
'TABLE_WAIT',$table_gui->getHTML());
2157 if(count($subscribers = $part->getSubscribers()))
2159 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
2160 if($ilUser->getPref(
'crs_subscriber_hide'))
2163 $this->ctrl->setParameter($this,
'subscriber_hide',0);
2164 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2165 $this->lng->txt(
'show'),
2168 $this->ctrl->clearParameters($this);
2173 $this->ctrl->setParameter($this,
'subscriber_hide',1);
2174 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2175 $this->lng->txt(
'hide'),
2178 $this->ctrl->clearParameters($this);
2180 $table_gui->setSubscribers($subscribers);
2181 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
2182 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
2187 if(count($part->getAdmins()))
2191 $showEditLink = $rbacsystem->checkAccess(
"edit_permission", $this->object->getRefId());
2192 if($ilUser->getPref(
'crs_admin_hide'))
2195 $this->ctrl->setParameter($this,
'admin_hide',0);
2196 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2197 $this->lng->txt(
'show'),
2200 $this->ctrl->clearParameters($this);
2205 $this->ctrl->setParameter($this,
'admin_hide',1);
2206 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2207 $this->lng->txt(
'hide'),
2210 $this->ctrl->clearParameters($this);
2212 $table_gui->setTitle($this->lng->txt(
'crs_administrators'),
'icon_usr.gif',$this->lng->txt(
'crs_administrators'));
2214 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
2216 if(count($part->getTutors()))
2218 if($ilUser->getPref(
'crs_tutor_hide'))
2221 $this->ctrl->setParameter($this,
'tutor_hide',0);
2222 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2223 $this->lng->txt(
'show'),
2226 $this->ctrl->clearParameters($this);
2231 $this->ctrl->setParameter($this,
'tutor_hide',1);
2232 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2233 $this->lng->txt(
'hide'),
2236 $this->ctrl->clearParameters($this);
2238 $table_gui->setTitle($this->lng->txt(
'crs_tutors'),
'icon_usr.gif',$this->lng->txt(
'crs_tutors'));
2240 $this->tpl->setVariable(
'TUTORS',$table_gui->getHTML());
2242 if(count($part->getMembers()))
2244 if($ilUser->getPref(
'crs_member_hide'))
2247 $this->ctrl->setParameter($this,
'member_hide',0);
2248 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2249 $this->lng->txt(
'show'),
2252 $this->ctrl->clearParameters($this);
2257 $this->ctrl->setParameter($this,
'member_hide',1);
2258 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2259 $this->lng->txt(
'hide'),
2262 $this->ctrl->clearParameters($this);
2264 $table_gui->setTitle($this->lng->txt(
'crs_members'),
'icon_usr.gif',$this->lng->txt(
'crs_members'));
2266 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
2271 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'crs_selected_users'));
2272 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
2273 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
2274 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'crs_mem_send_mail'));
2284 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
2300 $visible_members = array_intersect(array_unique((array)
$_POST[
'visible_member_ids']),$this->object->members_obj->getAdmins());
2301 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
2302 $notification = is_array($_POST[
'notification']) ? $_POST[
'notification'] : array();
2318 $visible_members = array_intersect(array_unique((array)
$_POST[
'visible_member_ids']),$this->object->members_obj->getTutors());
2319 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
2320 $notification = is_array($_POST[
'notification']) ? $_POST[
'notification'] : array();
2336 $visible_members = array_intersect(array_unique((array)
$_POST[
'visible_member_ids']),$this->object->members_obj->getMembers());
2337 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
2338 $blocked = is_array($_POST[
'blocked']) ? $_POST[
'blocked'] : array();
2346 global $ilAccess,
$ilErr,$ilUser,$rbacadmin;
2348 foreach($visible_members as $member_id)
2350 $this->
object->members_obj->updatePassed($member_id,in_array($member_id,$passed));
2354 $this->
object->members_obj->updateNotification($member_id,in_array($member_id,$notification));
2355 $this->
object->members_obj->updateBlocked($member_id,
false);
2359 if($this->object->members_obj->isBlocked($member_id) and !in_array($member_id,$blocked))
2361 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_UNBLOCK_MEMBER,$member_id);
2363 if(!$this->object->members_obj->isBlocked($member_id) and in_array($member_id,$blocked))
2365 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_BLOCK_MEMBER,$member_id);
2367 $this->
object->members_obj->updateNotification($member_id,
false);
2368 $this->
object->members_obj->updateBlocked($member_id,in_array($member_id,$blocked));
2382 include_once
'./Modules/Course/classes/class.ilObjCourseGrouping.php';
2384 $this->
object->initCourseMemberObject();
2385 $this->
object->initWaitingList();
2386 if($this->object->waiting_list_obj->getCountUsers())
2389 $f_result = array();
2390 foreach($this->object->waiting_list_obj->getAllUsers() as $waiting_data)
2395 $waiting_list_ids[] = $waiting_data[
'usr_id'];
2399 $this->
object->getId()) as $course_data)
2402 if($course_data[
'id'] != $this->object->getId() and
2403 $tmp_members->isGroupingMember($tmp_obj->getId(),$course_data[
'unique']))
2405 $message .= (
'<br /><font class="alert">'.$this->lng->txt(
'crs_member_of').
' ');
2411 $f_result[$counter][] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname().$message;
2412 $f_result[$counter][] = $tmp_obj->getLogin();
2425 if(count($this->object->members_obj->getSubscribers()))
2428 $f_result = array();
2429 foreach($this->object->members_obj->getSubscribers() as $member_id)
2431 $member_data = $this->
object->members_obj->getSubscriberData($member_id);
2436 $subscriber_ids[$counter] = $member_id;
2439 $f_result[$counter][] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
2440 $f_result[$counter][] = $tmp_obj->getLogin();
2461 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
2477 $participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'tutors'],(array) $_POST[
'members']));
2479 if(!count($participants))
2487 $this->tabs_gui->setTabActive(
'members');
2488 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
2490 include_once(
'./Modules/Course/classes/class.ilCourseEditParticipantsTableGUI.php');
2492 $table_gui->setTitle($this->lng->txt(
'crs_header_edit_members'),
'icon_usr.gif',$this->lng->txt(
'crs_header_edit_members'));
2495 $this->tpl->setContent($table_gui->getHTML());
2508 global $rbacsystem, $rbacreview;
2512 if(!count(
$_POST[
'participants']))
2519 $notifications =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
2520 $passed =
$_POST[
'passed'] ?
$_POST[
'passed'] : array();
2521 $blocked =
$_POST[
'blocked'] ?
$_POST[
'blocked'] : array();
2524 $hasEditPermissionAccess = $rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId());
2528 $assignableLocalCourseRoles = array();
2529 $courseAdminRoleId = $this->
object->getDefaultAdminRole();
2530 foreach ($this->object->getLocalCourseRoles(
false) as
$title => $role_id)
2532 $assignableLocalCourseRoles[$role_id] =
$title;
2538 $memberIsCourseAdmin = $rbacreview->isAssigned($usr_id, $courseAdminRoleId);
2543 if (! $hasEditPermissionAccess && $memberIsCourseAdmin &&
2544 ! in_array($courseAdminRoleId,
$_POST[
'roles'][$usr_id])
2551 foreach ((array)
$_POST[
'roles'][$usr_id] as $role_id)
2553 if(!array_key_exists($role_id, $assignableLocalCourseRoles))
2559 if(!$hasEditPermissionAccess &&
2560 $role_id == $courseAdminRoleId &&
2561 !$memberIsCourseAdmin)
2573 if(!isset(
$_POST[
'roles'][$admin_id]))
2578 if(in_array($courseAdminRoleId,
$_POST[
'roles'][$admin_id]))
2588 $_POST[
'members'] = $_POST[
'participants'];
2593 foreach(
$_POST[
'participants'] as $usr_id)
2595 $this->
object->members_obj->updateRoleAssignments($usr_id,(array)
$_POST[
'roles'][$usr_id]);
2598 $this->
object->members_obj->updateNotification($usr_id,0);
2599 if(($this->object->members_obj->isTutor($usr_id) or $this->
object->members_obj->isAdmin($usr_id)) and in_array($usr_id,$notifications))
2601 $this->
object->members_obj->updateNotification($usr_id,1);
2604 $this->
object->members_obj->updateBlocked($usr_id,0);
2605 if((!$this->object->members_obj->isAdmin($usr_id) and !$this->
object->members_obj->isTutor($usr_id)) and in_array($usr_id,$blocked))
2607 $this->
object->members_obj->updateBlocked($usr_id,1);
2609 $this->
object->members_obj->updatePassed($usr_id,in_array($usr_id,$passed));
2610 $this->
object->members_obj->sendNotification(
2611 $this->object->members_obj->NOTIFY_STATUS_CHANGED,
2627 $this->
object->initCourseMemberObject();
2632 if(!isset(
$_GET[
"member_id"]) or !$this->object->members_obj->isAssigned((
int)
$_GET[
"member_id"]))
2634 $this->ilias->raiseError($this->lng->txt(
"crs_no_valid_member_id_given"),$this->ilias->error_obj->MESSAGE);
2639 $passed = $this->
object->members_obj->hasPassed((
int) $_GET[
'member_id']);
2640 $notify = $this->
object->members_obj->isNotificationEnabled((
int) $_GET[
'member_id']);
2641 $blocked = $this->
object->members_obj->isBlocked((
int) $_GET[
'member_id']);
2643 $this->
object->members_obj->updateRoleAssignments((
int) $_GET[
'member_id'],
$_POST[
'roles']);
2644 $this->
object->members_obj->updatePassed((
int) $_GET[
'member_id'],(
int)
$_POST[
'passed']);
2645 $this->
object->members_obj->updateNotification((
int) $_GET[
'member_id'],(
int) $_POST[
'notification']);
2646 $this->
object->members_obj->updateBlocked((
int) $_GET[
'member_id'],(
int) $_POST[
'blocked']);
2648 if($passed != $this->object->members_obj->hasPassed((
int) $_GET[
'member_id']) or
2649 $notify != $this->
object->members_obj->isNotificationEnabled((
int) $_GET[
'member_id']) or
2650 $blocked != $this->
object->members_obj->isBlocked((
int) $_GET[
'member_id']))
2652 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_STATUS_CHANGED,(
int) $_GET[
'member_id']);
2666 if(!strlen(trim(
$_POST[
'user_login'])))
2672 $users = explode(
',',
$_POST[
'user_login']);
2674 foreach($users as $user)
2684 $_POST[
'user'][] = $user_id;
2698 if(!is_array(
$_POST[
"user"]))
2703 $this->
object->initCourseMemberObject();
2706 foreach(
$_POST[
"user"] as $user_id)
2712 if($this->object->members_obj->isAssigned($user_id))
2716 switch(
$_POST[
'member_type'])
2722 $this->
object->members_obj->add($user_id,
IL_CRS_TUTOR);
2725 $this->
object->members_obj->add($user_id,
IL_CRS_ADMIN);
2729 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_USER,$user_id);
2738 unset(
$_SESSION[
'crs_usr_search_result']);
2741 $this->ctrl->redirect($this,
'members');
2753 if(!count(
$_POST[
"waiting"]))
2760 $this->
object->initCourseMemberObject();
2762 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2766 foreach(
$_POST[
"waiting"] as $user_id)
2772 if($this->object->members_obj->isAssigned($user_id))
2777 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_USER,$user_id);
2809 if(!count(
$_POST[
'waiting']))
2816 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2819 foreach(
$_POST[
"waiting"] as $user_id)
2822 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_SUBSCRIBER,$user_id);
2843 if(!is_array(
$_SESSION[
"crs_delete_waiting_list_ids"]))
2851 $this->
object->initWaitingList();
2854 $this->
object->waiting_list_obj->removeFromList($usr_id);
2865 global $rbacsystem,
$ilErr;
2870 if(!is_array(
$_POST[
"subscribers"]))
2877 $this->
object->initCourseMemberObject();
2879 if(!$this->object->members_obj->assignSubscribers(
$_POST[
"subscribers"]))
2889 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_SUBSCRIBER,$usr_id);
2903 $this->
object->initCourseMemberObject();
2905 if($this->object->isSubscriptionMembershipLimited() and $this->
object->getSubscriptionMaxMembers() and
2906 $this->
object->getSubscriptionMaxMembers() <= $this->
object->members_obj->getCountMembers())
2913 if($number = $this->object->members_obj->autoFillSubscribers())
2931 $this->tabs_gui->setTabActive(
'members');
2941 if(!is_array(
$_POST[
"subscriber"]) or !count(
$_POST[
"subscriber"]))
2951 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_editMembers.html",
'Modules/Course');
2952 $this->
object->initCourseMemberObject();
2958 $f_result = array();
2960 foreach(
$_POST[
"subscriber"] as $member_id)
2962 $member_data = $this->
object->members_obj->getSubscriberData($member_id);
2967 $f_result[$counter][] = $tmp_obj->getLogin();
2968 $f_result[$counter][] = $tmp_obj->getFirstname();
2969 $f_result[$counter][] = $tmp_obj->getLastname();
2983 $this->tabs_gui->setTabActive(
'members');
2993 if(!is_array(
$_POST[
"waiting_list"]) or !count(
$_POST[
"waiting_list"]))
3003 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_editMembers.html",
'Modules/Course');
3004 $this->
object->initCourseMemberObject();
3005 $this->
object->initWaitingList();
3011 $f_result = array();
3013 foreach(
$_POST[
"waiting_list"] as $wait_id)
3015 $user_data =& $this->
object->waiting_list_obj->getUser($wait_id);
3019 $f_result[$counter][] = $tmp_obj->getLogin();
3020 $f_result[$counter][] = $tmp_obj->getFirstname();
3021 $f_result[$counter][] = $tmp_obj->getLastname();
3022 #$f_result[$counter][] = strftime("%Y-%m-%d %R",$user_data["time"]);
3038 if($this->object->members_obj->isLastAdmin($ilUser->getId()))
3046 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
3048 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_unsubscribe_sure.html",
'Modules/Course');
3051 $this->tpl->setVariable(
"UNSUB_FORMACTION",$this->ctrl->getFormAction($this));
3052 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
"cancel"));
3053 $this->tpl->setVariable(
"CMD_SUBMIT",
'performUnsubscribe');
3054 $this->tpl->setVariable(
"TXT_SUBMIT",$this->lng->txt(
"crs_unsubscribe"));
3062 global $rbacsystem,$ilAccess;
3073 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
3074 #$this->setSubTabs('members');
3077 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_unsubscribe_sure.html",
'Modules/Course');
3080 $this->tpl->setVariable(
"UNSUB_FORMACTION",$this->ctrl->getFormAction($this));
3081 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
"cancel"));
3082 $this->tpl->setVariable(
"CMD_SUBMIT",
'performUnsubscribe');
3083 $this->tpl->setVariable(
"TXT_SUBMIT",$this->lng->txt(
"crs_unsubscribe"));
3090 global $rbacsystem,$ilUser;
3094 $this->
object->initCourseMemberObject();
3095 $this->
object->members_obj->delete($this->ilias->account->getId());
3096 $this->
object->members_obj->sendUnsubscribeNotificationToAdmins($this->ilias->account->getId());
3097 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_UNSUBSCRIBE,$ilUser->getId());
3101 ilUtil::redirect(
"repository.php?ref_id=".$this->tree->getParentId($this->ref_id));
3111 $this->tabs_gui->setTabActive(
'members');
3112 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
3114 $participants = array_merge((array)
$_POST[
'admins'],(array) $_POST[
'tutors'], (array) $_POST[
'members']);
3124 $this->
object->initCourseMemberObject();
3125 if(!$this->object->members_obj->checkLastAdmin($participants))
3134 if(!$ilAccess->checkAccess(
'edit_permission',
'',$this->object->getRefId()))
3138 foreach ($participants as
$usr_id)
3140 if($part->isAdmin($usr_id))
3150 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
3152 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
3153 $confirm->setHeaderText($this->lng->txt(
'crs_header_delete_members'));
3154 $confirm->setConfirm($this->lng->txt(
'confirm'),
'removeMembers');
3155 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
3159 $confirm->addItem(
'participants[]',
3160 $participant[
'usr_id'],
3161 $participant[
'lastname'].
', '.$participant[
'firstname'].
' ['.$participant[
'login'].
']',
3165 $this->tpl->setContent($confirm->getHTML());
3171 global $rbacreview, $rbacsystem;
3175 if(!is_array(
$_POST[
"participants"]) or !count(
$_POST[
"participants"]))
3182 $this->
object->initCourseMemberObject();
3186 if (! $rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId()))
3189 $courseAdminRoleId = null;
3190 foreach ($this->object->getLocalCourseRoles(
false) as
$title => $role_id)
3192 if (substr($title, 0, 12) ==
'il_crs_admin')
3194 $courseAdminRoleId = $role_id;
3200 if ($rbacreview->isAssigned($usr_id, $courseAdminRoleId))
3209 if(!$this->object->members_obj->deleteParticipants(
$_POST[
"participants"]))
3232 if(!
$_POST[
'subscribers'])
3239 $this->
object->initCourseMemberObject();
3241 if(!$this->object->members_obj->deleteSubscribers(
$_POST[
"subscribers"]))
3251 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_SUBSCRIBER,$usr_id);
3265 global $rbacsystem,$ilAccess,$ilUser,
$lng;
3267 $this->
object->initCourseMemberObject();
3269 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
3271 if($ilAccess->checkAccess(
'read',
'',$this->ref_id))
3273 $tabs_gui->addTab(
'view_content', $lng->txt(
"content"),
3274 $this->ctrl->getLinkTarget($this,
''));
3277 if ($ilAccess->checkAccess(
'visible',
'',$this->ref_id))
3284 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilinfoscreengui"
3285 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
3288 $tabs_gui->addTarget(
"info_short",
3289 $this->ctrl->getLinkTargetByClass(
3290 array(
"ilobjcoursegui",
"ilinfoscreengui"),
"showSummary"),
3292 "",
"", $force_active);
3294 if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3296 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilconditionhandlerinterface"
3297 &&
$_GET[
"item_id"] ==
"")
3300 $tabs_gui->addTarget(
"settings",
3301 $this->ctrl->getLinkTarget($this,
"edit"),
3302 array(
"edit",
"editMapSettings",
"editCourseIcons",
"listStructure"),
"",
"", $force_active);
3306 if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3308 $tabs_gui->addTarget(
"members",
3309 $this->ctrl->getLinkTarget($this,
"members"),
3313 elseif ($ilAccess->checkAccess(
'read',
'',$this->ref_id) &&
3314 $this->
object->getShowMembers() == $this->
object->SHOW_MEMBERS_ENABLED &&
3315 $ilUser->getId() != ANONYMOUS_USER_ID)
3317 $tabs_gui->addTarget(
"members",
3318 $this->ctrl->getLinkTarget($this,
"membersGallery"),
3324 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
3327 $tabs_gui->addTarget(
'learning_progress',
3328 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
3330 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
3334 if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3336 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
3339 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilcourseobjectivesgui")
3342 $tabs_gui->addTarget(
"crs_objectives",
3343 $this->ctrl->getLinkTarget($this,
"listObjectives"),
3345 get_class($this),
"", $force_active);
3350 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
3351 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)
3354 $tabs_gui->addTarget(
"licenses",
3355 $this->ctrl->getLinkTargetByClass(
'illicenseoverviewgui',
''),
3356 "",
"illicenseoverviewgui");
3360 if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3362 $tabs_gui->addTarget(
"meta_data",
3363 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'ilmdeditorgui'),
'listSection'),
3368 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
3370 $tabs_gui->addTarget(
3372 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
3378 if ($ilAccess->checkAccess(
'edit_permission',
'',$this->ref_id))
3380 $tabs_gui->addTarget(
"perm_settings",
3381 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
3382 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
3385 if ($this->ctrl->getTargetScript() ==
"adm_object.php")
3387 $tabs_gui->addTarget(
"show_owner",
3388 $this->ctrl->getLinkTarget($this,
"owner"),
"owner", get_class($this));
3390 if ($this->tree->getSavedNodeData($this->ref_id))
3392 $tabs_gui->addTarget(
"trash",
3393 $this->ctrl->getLinkTarget($this,
"trash"),
"trash", get_class($this));
3397 if($ilAccess->checkAccess(
'join',
'',$this->ref_id)
3398 and !$this->
object->members_obj->isAssigned($ilUser->getId()))
3400 include_once
'./Modules/Course/classes/class.ilCourseWaitingList.php';
3405 $this->lng->txt(
'membership_leave'),
3406 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
3413 $tabs_gui->addTarget(
"join",
3414 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
"show"),
3419 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId())
3420 and $this->object->members_obj->isMember($ilUser->getId()))
3422 $tabs_gui->addTarget(
"crs_unsubscribe",
3423 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
3432 foreach($a_members as $member_id)
3435 $member_data = $this->
object->members_obj->getSubscriberData($member_id);
3439 $print_member[$member_id][
'login'] = $tmp_obj->getLogin();
3440 $print_member[$member_id][
'name'] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
3462 global $ilAccess,
$lng;
3464 $lng->loadLanguageModule(
'trac');
3466 #$is_admin = (bool) $ilAccess->checkAccess("write",'',$this->object->getRefId());
3469 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3472 if($privacy->enabledCourseAccessTimes())
3474 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
3478 if($this->show_tracking)
3480 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
3487 foreach($a_members as $member_id)
3492 $print_member[$member_id][
'login'] = $tmp_obj->getLogin();
3493 $print_member[$member_id][
'name'] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
3495 if($this->object->members_obj->isAdmin($member_id))
3497 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_admin");
3499 elseif($this->object->members_obj->isTutor($member_id))
3501 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_tutor");
3503 elseif($this->object->members_obj->isMember($member_id))
3505 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_member");
3507 if($this->object->members_obj->isAdmin($member_id) or $this->
object->members_obj->isTutor($member_id))
3509 if($this->object->members_obj->isNotificationEnabled($member_id))
3511 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_notify");
3515 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_no_notify");
3520 if($this->object->members_obj->isBlocked($member_id))
3522 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_blocked");
3526 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_unblocked");
3532 $print_member[$member_id][
'passed'] = $this->
object->members_obj->hasPassed($member_id) ?
3533 $this->lng->txt(
'crs_member_passed') :
3534 $this->lng->txt(
'crs_member_not_passed');
3537 if($privacy->enabledCourseAccessTimes())
3539 if(isset($progress[$member_id][
'ts']) and $progress[$member_id][
'ts'])
3547 $print_member[$member_id][
'access'] = $this->lng->txt(
'no_date');
3550 if($this->show_tracking)
3552 if(in_array($member_id,$completed))
3556 elseif(in_array($member_id,$in_progress))
3560 elseif(in_array($member_id,$failed))
3591 case 'notification':
3607 $tpl =
new ilTemplate(
'tpl.crs_members_print.html',
true,
true,
'Modules/Course');
3609 $this->
object->initCourseMemberObject();
3611 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3613 if($privacy->enabledCourseAccessTimes())
3615 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
3619 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
3620 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
3627 if(count($members = $this->object->members_obj->getParticipants()))
3631 foreach($members as $member_data)
3633 if($this->show_tracking)
3635 $tpl->setCurrentBlock(
'progress_row');
3636 $tpl->setVariable(
'VAL_PROGRESS',$member_data[
'progress']);
3637 $tpl->parseCurrentBlock();
3640 if($privacy->enabledCourseAccessTimes())
3642 $tpl->setCurrentBlock(
'access_row');
3643 $tpl->setVariable(
'VAL_ACCESS',$member_data[
'access']);
3644 $tpl->parseCurrentBlock();
3646 $tpl->setCurrentBlock(
"members_row");
3647 $tpl->setVariable(
"LOGIN",$member_data[
'login']);
3648 $tpl->setVariable(
"NAME",$member_data[
'name']);
3649 $tpl->setVariable(
"ROLE",$member_data[
'role']);
3650 $tpl->setVariable(
"STATUS",$member_data[
'status']);
3651 $tpl->setVariable(
"PASSED",$member_data[
'passed']);
3655 $tpl->setVariable(
"STATUS",$member_data[
'status']);
3656 $tpl->setVariable(
"PASSED",$member_data[
'passed']);
3658 $tpl->parseCurrentBlock();
3661 $tpl->setCurrentBlock(
"members");
3663 $tpl->setVariable(
"MEMBERS_IMG_ALT",$this->lng->txt(
'crs_header_members'));
3664 $tpl->setVariable(
"MEMBERS_TABLE_HEADER",$this->lng->txt(
'crs_members_table'));
3665 $tpl->setVariable(
"TXT_LOGIN",$this->lng->txt(
'username'));
3666 $tpl->setVariable(
"TXT_NAME",$this->lng->txt(
'name'));
3667 $tpl->setVariable(
"TXT_ROLE",$this->lng->txt(
'crs_role'));
3669 if($this->show_tracking)
3671 $tpl->setCurrentBlock(
'progress');
3672 $tpl->setVariable(
'TXT_PROGRESS',$this->lng->txt(
'learning_progress'));
3673 $tpl->parseCurrentBlock();
3676 if($privacy->enabledCourseAccessTimes())
3678 $tpl->setCurrentBlock(
'access');
3679 $tpl->setVariable(
'TXT_ACCESS',$this->lng->txt(
'last_access'));
3680 $tpl->parseCurrentBlock();
3686 $tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'crs_status'));
3687 $tpl->setVariable(
"TXT_PASSED",$this->lng->txt(
'crs_passed'));
3690 $tpl->parseCurrentBlock();
3694 if(count($members = $this->object->members_obj->getSubscribers()))
3697 foreach($members as $member_data)
3699 $tpl->setCurrentBlock(
"subscribers_row");
3700 $tpl->setVariable(
"SLOGIN",$member_data[
'login']);
3701 $tpl->setVariable(
"SNAME",$member_data[
'name']);
3702 $tpl->setVariable(
"STIME",$member_data[
"time"]);
3703 $tpl->parseCurrentBlock();
3706 $tpl->setCurrentBlock(
"subscribers");
3708 $tpl->setVariable(
"SUBSCRIBERS_IMG_ALT",$this->lng->txt(
'crs_subscribers'));
3709 $tpl->setVariable(
"SUBSCRIBERS_TABLE_HEADER",$this->lng->txt(
'crs_subscribers'));
3710 $tpl->setVariable(
"TXT_SLOGIN",$this->lng->txt(
'username'));
3711 $tpl->setVariable(
"TXT_SNAME",$this->lng->txt(
'name'));
3712 $tpl->setVariable(
"TXT_STIME",$this->lng->txt(
'crs_time'));
3713 $tpl->parseCurrentBlock();
3717 $tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
3720 $headline = $this->lng->txt(
'obj_crs').
': '.$this->
object->getTitle().
3723 $tpl->setVariable(
"HEADLINE",$headline);
3736 global $rbacsystem,
$ilErr, $ilAccess, $ilUser;
3738 $is_admin = (bool) $ilAccess->checkAccess(
"write",
"", $this->object->getRefId());
3741 $this->object->getShowMembers() == $this->
object->SHOW_MEMBERS_DISABLED)
3743 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
3747 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
3750 $this->tabs_gui->setTabActive(
'members');
3751 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
3753 $this->
object->initCourseMemberObject();
3756 if(count($members = $this->object->members_obj->getParticipants()))
3758 $ordered_members = array();
3760 foreach($members as $member_id)
3770 array_push($ordered_members,array(
"id" => $member_id,
3771 "login" => $usr_obj->getLogin(),
3772 "lastname" => $usr_obj->getLastName(),
3773 "firstname" => $usr_obj->getFirstName(),
3774 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
3775 "usr_obj" => $usr_obj));
3780 foreach($ordered_members as $member)
3782 $usr_obj = $member[
"usr_obj"];
3784 if(!$usr_obj->getActive())
3789 $public_profile = in_array($usr_obj->getPref(
"public_profile"), array(
"y",
"g")) ?
"y" :
"";
3792 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
3793 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
3796 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
3798 if($this->object->members_obj->isAdmin($member[
"id"]) or $this->
object->members_obj->isTutor($member[
"id"]))
3800 if ($public_profile ==
"y")
3802 $this->tpl->setCurrentBlock(
"tutor_linked");
3803 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
3804 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3805 $this->tpl->parseCurrentBlock();
3809 $this->tpl->setCurrentBlock(
"tutor_not_linked");
3810 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3811 $this->tpl->parseCurrentBlock();
3813 $this->tpl->setCurrentBlock(
"tutor");
3817 if ($public_profile ==
"y")
3819 $this->tpl->setCurrentBlock(
"member_linked");
3820 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
3821 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3822 $this->tpl->parseCurrentBlock();
3826 $this->tpl->setCurrentBlock(
"member_not_linked");
3827 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3828 $this->tpl->parseCurrentBlock();
3830 $this->tpl->setCurrentBlock(
"member");
3834 if ($public_profile ==
"y")
3836 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
3837 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
3839 $this->tpl->setVariable(
"LOGIN", $member[
"login"]);
3840 $this->tpl->parseCurrentBlock();
3843 $this->tpl->setCurrentBlock(
"members");
3844 $this->tpl->setVariable(
"MEMBERS_TABLE_HEADER",$this->lng->txt(
'crs_members_title'));
3845 $this->tpl->parseCurrentBlock();
3849 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
3852 $headline = $this->
object->getTitle().
"<br/>".$this->
object->getDescription();
3854 $this->tpl->setVariable(
"HEADLINE",$headline);
3863 include_once
"./Services/Table/classes/class.ilTableGUI.php";
3874 $offset =
$_GET[
"update_members"] ?
$_GET[
"offset"] : 0;
3875 $order =
$_GET[
"update_members"] ?
$_GET[
"sort_by"] :
'login';
3876 $direction =
$_GET[
"update_members"] ?
$_GET[
"sort_order"] :
'';
3880 $offset =
$_GET[
"update_subscribers"] ?
$_GET[
"offset"] : 0;
3881 $order =
$_GET[
"update_subscribers"] ?
$_GET[
"sort_by"] :
'sub_time';
3882 $direction =
$_GET[
"update_subscribers"] ?
$_GET[
"sort_order"] :
'';
3886 $offset =
$_GET[
"offset"];
3887 $order =
$_GET[
"sort_by"] ?
$_GET[
"sort_by"] :
"title";
3888 $direction =
$_GET[
"sort_order"];
3892 $offset =
$_GET[
"offset"];
3893 $order =
$_GET[
"sort_by"] ?
$_GET[
"sort_by"] :
"title";
3894 $direction =
$_GET[
"sort_order"];
3898 $offset =
$_GET[
"offset"];
3900 if (
$_GET[
"sort_by"] ==
"title" or empty(
$_GET[
"sort_by"]))
3902 $_GET[
"sort_by"] =
"login";
3904 $order =
$_GET[
"sort_by"];
3905 $direction =
$_GET[
"sort_order"];
3909 $tbl->setOrderColumn($order);
3910 $tbl->setOrderDirection($direction);
3911 $tbl->setOffset($offset);
3912 $tbl->setLimit(
$_GET[
"limit"]);
3913 $tbl->setMaxCount(count($result_set));
3914 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
3915 $tbl->setData($result_set);
3922 $tpl =& $tbl->getTemplateObject();
3924 $tpl->setCurrentBlock(
"tbl_form_header");
3925 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
3926 $tpl->parseCurrentBlock();
3927 $tpl->setCurrentBlock(
"tbl_action_btn");
3928 $tpl->setVariable(
"BTN_NAME",
"cancelMember");
3929 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"cancel"));
3930 $tpl->parseCurrentBlock();
3931 $tpl->setCurrentBlock(
"tbl_action_btn");
3932 $tpl->setVariable(
"BTN_NAME",
"performRemoveFromWaitingList");
3933 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
3934 $tpl->parseCurrentBlock();
3935 $tpl->setCurrentBlock(
"tbl_action_row");
3936 $tpl->setVariable(
"COLUMN_COUNTS",4);
3938 $tpl->parseCurrentBlock();
3940 $tbl->setTitle($this->lng->txt(
"crs_header_remove_from_waiting_list"),
"icon_usr_b.gif",
3941 $this->lng->txt(
"crs_header_remove_from_waiting_list"));
3942 $tbl->setHeaderNames(array($this->lng->txt(
"username"),
3943 $this->lng->txt(
"firstname"),
3944 $this->lng->txt(
"lastname"),
3945 $this->lng->txt(
"crs_time")));
3946 $tbl->setHeaderVars(array(
"login",
3950 array(
"ref_id" => $this->object->getRefId(),
3952 "cmdClass" =>
"ilobjcoursegui",
3953 "cmdNode" =>
$_GET[
"cmdNode"]));
3955 $tbl->setColumnWidth(array(
"25%",
"25%",
"25%",
"25%"));
3960 $this->tpl->setVariable(
"EDIT_MEMBER_TABLE",$tbl->tpl->get());
3968 $tpl =& $tbl->getTemplateObject();
3970 $tpl->setCurrentBlock(
"tbl_form_header");
3971 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
3972 $tpl->parseCurrentBlock();
3973 $tpl->setCurrentBlock(
"tbl_action_btn");
3974 $tpl->setVariable(
"BTN_NAME",
"removeSubscribers");
3975 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
3976 $tpl->parseCurrentBlock();
3977 $tpl->setCurrentBlock(
"tbl_action_btn");
3978 $tpl->setVariable(
"BTN_NAME",
"cancelMember");
3979 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"cancel"));
3980 $tpl->parseCurrentBlock();
3981 $tpl->setCurrentBlock(
"tbl_action_row");
3982 $tpl->setVariable(
"COLUMN_COUNTS",4);
3984 $tpl->parseCurrentBlock();
3986 $tbl->setTitle($this->lng->txt(
"crs_header_delete_subscribers"),
"icon_usr_b.gif",$this->lng->txt(
"crs_header_delete_members"));
3987 $tbl->setHeaderNames(array($this->lng->txt(
"username"),
3988 $this->lng->txt(
"firstname"),
3989 $this->lng->txt(
"lastname"),
3990 $this->lng->txt(
"crs_time")));
3991 $tbl->setHeaderVars(array(
"login",
3995 array(
"ref_id" => $this->object->getRefId(),
3997 "cmdClass" =>
"ilobjcoursegui",
3998 "cmdNode" =>
$_GET[
"cmdNode"]));
4000 $tbl->setColumnWidth(array(
"25%",
"25%",
"25%",
"25%"));
4005 $this->tpl->setVariable(
"EDIT_MEMBER_TABLE",$tbl->tpl->get());
4014 $actions = array(
"addSubscribers" => $this->lng->txt(
"crs_add_subscribers"),
4015 "deleteSubscribers" => $this->lng->txt(
"crs_delete_subscribers"));
4018 $tpl =& $tbl->getTemplateObject();
4021 $tpl->setCurrentBlock(
"tbl_action_row");
4024 $tpl->setCurrentBlock(
"plain_button");
4025 $tpl->setVariable(
"PBTN_NAME",
"autoFill");
4026 $tpl->setVariable(
"PBTN_VALUE",$this->lng->txt(
"crs_auto_fill"));
4027 $tpl->parseCurrentBlock();
4028 $tpl->setCurrentBlock(
"plain_buttons");
4029 $tpl->parseCurrentBlock();
4031 $tpl->setVariable(
"COLUMN_COUNTS",4);
4035 $tpl->setCurrentBlock(
"tbl_action_select");
4037 $tpl->setVariable(
"BTN_NAME",
"gateway");
4038 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"execute"));
4039 $tpl->parseCurrentBlock();
4041 $tbl->enable(
'select_all');
4042 $tbl->setFormName(
"subscriber_form");
4043 $tbl->setSelectAllCheckbox(
"subscriber");
4045 $tpl->setCurrentBlock(
"tbl_action_row");
4046 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
4047 $tpl->parseCurrentBlock();
4050 $tbl->setTitle($this->lng->txt(
"crs_subscribers"),
"icon_usr.gif",$this->lng->txt(
"crs_header_members"));
4051 $tbl->setHeaderNames(array(
'',
4052 $this->lng->txt(
"name"),
4053 $this->lng->txt(
"login"),
4054 $this->lng->txt(
"crs_time")));
4055 $tbl->setHeaderVars(array(
"",
4059 array(
"ref_id" => $this->object->getRefId(),
4061 "update_subscribers" => 1,
4062 "cmdClass" =>
"ilobjcoursegui",
4063 "cmdNode" =>
$_GET[
"cmdNode"]));
4064 $tbl->setColumnWidth(array(
'1%'));
4069 $this->tpl->setCurrentBlock(
'sub_wait_table');
4070 $this->tpl->setVariable(
'SUB_WAIT_NAME',
'subscriber_form');
4071 $this->tpl->setVariable(
'SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
4072 $this->tpl->setVariable(
"SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
4073 $this->tpl->parseCurrentBlock();
4079 $actions = array(
"addFromWaitingList" => $this->lng->txt(
"crs_add_subscribers"),
4080 "removeFromWaitingList" => $this->lng->txt(
"crs_delete_from_waiting_list"));
4083 $tpl =& $tbl->getTemplateObject();
4085 $tbl->enable(
'select_all');
4086 $tbl->setFormName(
"wait_form");
4087 $tbl->setSelectAllCheckbox(
"waiting_list");
4091 $tpl->setCurrentBlock(
"tbl_action_row");
4093 $tpl->setVariable(
"COLUMN_COUNTS",5);
4097 $tpl->setCurrentBlock(
"tbl_action_select");
4099 $tpl->setVariable(
"BTN_NAME",
"gateway");
4100 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"execute"));
4101 $tpl->parseCurrentBlock();
4103 $tpl->setCurrentBlock(
"tbl_action_row");
4104 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
4105 $tpl->parseCurrentBlock();
4108 $tbl->setTitle($this->lng->txt(
"crs_waiting_list"),
"icon_usr.gif",$this->lng->txt(
"crs_waiting_list"));
4109 $tbl->setHeaderNames(array(
'',
4110 $this->lng->txt(
"name"),
4111 $this->lng->txt(
"login"),
4112 $this->lng->txt(
"crs_time")));
4113 $tbl->setHeaderVars(array(
"",
4117 array(
"ref_id" => $this->object->getRefId(),
4119 "update_subscribers" => 1,
4120 "cmdClass" =>
"ilobjcoursegui",
4121 "cmdNode" =>
$_GET[
"cmdNode"]));
4122 $tbl->setColumnWidth(array(
'1%'));
4127 $this->tpl->setCurrentBlock(
'sub_wait_table');
4128 $this->tpl->setVariable(
'SUB_WAIT_NAME',
'wait_form');
4129 $this->tpl->setVariable(
'SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
4130 $this->tpl->setVariable(
"SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
4131 $this->tpl->parseCurrentBlock();
4143 for($i=0;$i<=60;$i++)
4145 $days[$i] = $i < 10 ?
"0".$i : $i;
4150 for($i=0;$i<24;$i++)
4152 $days[$i] = $i < 10 ?
"0".$i : $i;
4157 for($i=1;$i<32;$i++)
4159 $days[$i] = $i < 10 ?
"0".$i : $i;
4164 for($i=1;$i<13;$i++)
4166 $month[$i] = $i < 10 ?
"0".$i : $i;
4171 for($i = date(
"Y",time());$i < date(
"Y",time()) + 3;++$i)
4181 return mktime($a_time_arr[
"hour"],
4182 $a_time_arr[
"minute"],
4183 $a_time_arr[
"second"],
4184 $a_time_arr[
"month"],
4186 $a_time_arr[
"year"]);
4190 unset(
$_SESSION[
"crs_delete_member_ids"]);
4191 unset(
$_SESSION[
"crs_delete_subscriber_ids"]);
4201 global $rbacreview,
$ilErr, $ilAccess, $ilObjDataCache,
$ilias;
4202 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
4204 $this->lng->loadLanguageModule(
'mail');
4207 $is_admin = (bool) $ilAccess->checkAccess(
"write",
"", $this->object->getRefId());
4210 $this->object->getShowMembers() == $this->
object->SHOW_MEMBERS_DISABLED)
4212 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
4216 $this->tabs_gui->setTabActive(
'members');
4217 $this->tabs_gui->setSubTabActive(
'mail_members');
4219 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
4222 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
4224 $this->tpl->setVariable(
"SELECT_ACTION",
'ilias.php?baseClass=ilmailgui&view=my_courses&search_crs='.$this->object->getId());
4225 $this->tpl->setVariable(
"MAIL_SELECTED",$this->lng->txt(
'send_mail_selected'));
4226 $this->tpl->setVariable(
"MAIL_MEMBERS",$this->lng->txt(
'send_mail_members'));
4227 $this->tpl->setVariable(
"MAIL_TUTOR",$this->lng->txt(
'send_mail_tutors'));
4228 $this->tpl->setVariable(
"MAIL_ADMIN",$this->lng->txt(
'send_mail_admins'));
4230 $this->tpl->setVariable(
"OK",$this->lng->txt(
'next'));
4233 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
4234 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
4237 $sorted_role_ids = array();
4239 foreach($role_ids as $role_id)
4244 $sorted_role_ids[2] = $role_id;
4248 $sorted_role_ids[1] = $role_id;
4252 $sorted_role_ids[0] = $role_id;
4256 $sorted_role_ids[$counter++] = $role_id;
4261 ksort($sorted_role_ids,SORT_NUMERIC);
4262 foreach ((array) $sorted_role_ids as $role_id)
4264 $this->tpl->setCurrentBlock(
"mailbox_row");
4265 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
4269 if(count($ids_for_role_title) >= 2)
4271 $ilias->setSetting(
'pear_mail_enable',
true);
4275 htmlspecialchars($role_addr)
4280 $this->tpl->setVariable(
"MAILBOX",$role_addr);
4285 $this->tpl->setVariable(
"MAILBOX",
ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id)).
" (" . $role_addr .
")");
4288 $this->tpl->parseCurrentBlock();
4294 global $rbacsystem,$ilUser,$ilAccess,
$ilErr,$ilTabs,$ilNavigationHistory,
$ilCtrl;
4296 $next_class = $this->ctrl->getNextClass($this);
4297 $cmd = $this->ctrl->getCmd();
4303 $ilAccess->checkAccess(
'read',
'',
$_GET[
'ref_id']))
4305 $ilNavigationHistory->addItem(
$_GET[
'ref_id'],
4306 'repository.php?cmd=frameset&ref_id='.
$_GET[
'ref_id'],
'crs');
4311 if(IS_PAYMENT_ENABLED)
4313 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
4317 $ilTabs->setTabActive(
'info_short');
4319 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
4320 $this->ctrl->setReturn($this,
'');
4322 $this->ctrl->forwardCommand($pp_gui);
4330 case "ilinfoscreengui":
4334 case 'ilmdeditorgui':
4335 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
4337 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
4338 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
4340 $this->ctrl->forwardCommand($md_gui);
4341 $this->tabs_gui->setTabActive(
'meta_data');
4344 case 'ilcourseregistrationgui':
4345 $this->ctrl->setReturn($this,
'');
4346 $this->tabs_gui->setTabActive(
'join');
4347 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
4349 $this->ctrl->forwardCommand($registration);
4352 case 'ilobjectcustomuserfieldsgui':
4353 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
4357 $this->tabs_gui->setTabActive(
'settings');
4358 $this->ctrl->forwardCommand($cdf_gui);
4361 case "ilcourseobjectivesgui":
4362 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
4364 $this->ctrl->setReturn($this,
"");
4366 $ret =& $this->ctrl->forwardCommand($reg_gui);
4369 case 'ilobjcoursegroupinggui':
4370 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
4372 $this->ctrl->setReturn($this,
'edit');
4375 $this->ctrl->forwardCommand($crs_grp_gui);
4376 $this->tabs_gui->setTabActive(
'settings');
4377 $this->tabs_gui->setSubTabActive(
'groupings');
4381 $this->tabs_gui->setTabActive(
'none');
4391 case "ilconditionhandlerinterface":
4392 include_once
'./classes/class.ilConditionHandlerInterface.php';
4395 if($_GET[
'item_id'])
4397 $this->ctrl->saveParameter($this,
'item_id',$_GET[
'item_id']);
4398 $this->tabs_gui->setTabActive(
'content');
4402 $this->ctrl->forwardCommand($new_gui);
4407 $this->tabs_gui->setTabActive(
'settings');
4410 $this->ctrl->forwardCommand($new_gui);
4414 case "illearningprogressgui":
4415 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
4418 $this->object->getRefId(),
4419 $_GET[
'user_id'] ? $_GET[
'user_id'] : $ilUser->getId());
4420 $this->ctrl->forwardCommand($new_gui);
4421 $this->tabs_gui->setTabActive(
'learning_progress');
4424 case 'illicenseoverviewgui':
4425 include_once(
"./Services/License/classes/class.ilLicenseOverviewGUI.php");
4427 $ret =& $this->ctrl->forwardCommand($license_gui);
4428 $this->tabs_gui->setTabActive(
'licenses');
4431 case 'ilpermissiongui':
4432 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
4433 $this->tabs_gui->setTabActive(
'perm_settings');
4435 $ret =& $this->ctrl->forwardCommand($perm_gui);
4438 case 'ilrepositorysearchgui':
4439 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
4441 $rep_search->setCallback($this,
4442 'assignMembersObject',
4453 $this->ctrl->setReturn($this,
'members');
4454 $ret =& $this->ctrl->forwardCommand($rep_search);
4456 $this->tabs_gui->setTabActive(
'members');
4457 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
4460 case 'ilcoursecontentinterface':
4462 $this->initCourseContentInterface();
4463 $this->cci_obj->cci_setContainer($this);
4465 $this->ctrl->forwardCommand($this->cci_obj);
4467 $this->tabs_gui->setTabActive(
'content');
4470 case 'ilcoursecontentgui':
4471 $this->ctrl->setReturn($this,
'members');
4472 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
4474 $this->ctrl->forwardCommand($course_content_obj);
4477 case 'ilpublicuserprofilegui':
4478 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
4481 $this->tabs_gui->setTabActive(
'members');
4482 $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this,
"membersGallery"));
4483 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
4484 $html = $this->ctrl->forwardCommand($profile_gui);
4485 $this->tpl->setVariable(
"ADM_CONTENT", $html);
4488 case 'ilmemberexportgui':
4489 include_once(
'./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
4492 $this->tabs_gui->setTabActive(
'members');
4493 $this->tabs_gui->setSubTabActive(
'export_members');
4495 $this->ctrl->forwardCommand($export);
4498 case 'ilmemberagreementgui':
4499 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
4500 $this->ctrl->setReturn($this,
'');
4502 $this->ctrl->forwardCommand($agreement);
4505 case 'ilsessionoverviewgui':
4506 include_once(
'./Modules/Session/classes/class.ilSessionOverviewGUI.php');
4509 $this->tabs_gui->setTabActive(
'members');
4510 $this->tabs_gui->setSubTabActive(
'events');
4512 $this->ctrl->forwardCommand($overview);
4515 case 'ilcourseitemadministrationgui':
4516 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
4517 $this->tabs_gui->clearSubTabs();
4518 $this->ctrl->setReturn($this,
'view');
4520 $this->ctrl->forwardCommand($item_adm_gui);
4524 case "ilpageobjectgui":
4528 $this->tpl->setContent($ret);
4532 case 'ilobjectcopygui':
4533 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
4535 $cp->setType(
'crs');
4536 $this->ctrl->forwardCommand($cp);
4539 case "ilobjstylesheetgui":
4543 case 'ilcourseparticipantsgroupsgui':
4544 include_once
'./Modules/Course/classes/class.ilCourseParticipantsGroupsGUI.php';
4548 $this->tabs_gui->setTabActive(
'members');
4549 $this->ctrl->forwardCommand($cmg_gui);
4553 $this->tabs_gui->setTabActive(
'export');
4554 include_once
'./Services/Export/classes/class.ilExportGUI.php';
4556 $exp->addFormat(
'xml');
4557 $this->ctrl->forwardCommand($exp);
4561 if(!$this->creation_mode)
4571 if( !$this->creation_mode
4572 &&
$cmd !=
'infoScreen'
4573 &&
$cmd !=
'sendfile'
4574 &&
$cmd !=
'unsubscribe'
4575 &&
$cmd !=
'performUnsubscribe'
4576 && !$ilAccess->checkAccess(
"read",
'',$this->object->getRefId())
4578 ||
$cmd ==
'subscribe')
4580 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
4581 if($rbacsystem->checkAccess(
'join',$this->object->getRefId()) &&
4584 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
4585 $this->ctrl->redirectByClass(
"ilCourseRegistrationGUI");
4594 if(
$cmd ==
'listObjectives')
4596 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
4598 $this->ctrl->setReturn($this,
"");
4600 $ret =& $this->ctrl->forwardCommand($obj_gui);
4604 if((!$this->creation_mode)&&(!$rbacsystem->checkAccess(
"write",$this->object->getRefId())))
4606 $this->ctrl->setReturn($this,
'view');
4607 include_once(
'Services/Feedback/classes/class.ilFeedbackGUI.php');
4609 $feedbackGUI->handleRequiredFeedback($this->object->getRefId());
4639 global $ilUser,$ilAccess;
4641 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
4647 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
4652 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
4658 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
4659 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
4669 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
4689 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
4693 $buffer = $lic_set->get(
"license_warning");
4695 include_once(
"./Services/License/classes/class.ilLicense.php");
4697 foreach ($licensed_items as $item)
4699 $license =&
new ilLicense($item[
'obj_id']);
4700 $remaining = $license->getRemainingLicenses();
4701 if ($remaining <= $buffer)
4703 $lng->loadlanguageModule(
"license");
4704 ilUtil::sendInfo(sprintf($this->lng->txt(
"course_licenses_rare"), $remaining), $a_keep);
4714 return array(
"ilCourseRegisterGUI",
'ilConditionHandlerInterface');
4720 $this->initCourseContentInterface();
4721 $this->cci_obj->cci_setContainer($this);
4722 $this->cci_obj->cci_objectives();
4728 $this->tabs_gui->setTabActive(
'edit_content');
4730 $this->initCourseContentInterface();
4731 $this->cci_obj->cci_setContainer($this);
4732 $this->cci_obj->cci_view();
4738 $this->initCourseContentInterface();
4739 $this->cci_obj->cci_setContainer($this);
4740 $this->cci_obj->cci_objectives_ask_reset();
4748 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
4751 $tmp_obj_res->
reset($this->object->getId());
4755 $this->initCourseContentInterface();
4756 $this->cci_obj->cci_setContainer($this);
4757 $this->cci_obj->cci_objectives();
4764 include_once
'./classes/class.ilConditionHandlerInterface.php';
4766 if(!is_object($this->chi_obj))
4768 if(
$_GET[
'item_id'])
4771 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
4785 switch ($this->ctrl->getCmd())
4788 #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
4800 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
4801 if(substr($a_add,0,5) ==
'rcode')
4803 if($ilUser->getId() == ANONYMOUS_USER_ID)
4807 "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
4808 $ilUser->getCurrentLanguage()
4820 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"write",
"", $a_target))
4823 $_GET[
"cmd"] =
"members";
4824 $_GET[
"ref_id"] = $a_target;
4825 include(
"repository.php");
4829 if ($ilAccess->checkAccess(
"read",
"", $a_target))
4831 $_GET[
"cmd"] =
"frameset";
4832 $_GET[
"ref_id"] = $a_target;
4833 include(
"repository.php");
4839 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
4841 $_GET[
"cmd"] =
"infoScreen";
4842 $_GET[
"ref_id"] = $a_target;
4843 include(
"repository.php");
4848 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
4850 $_GET[
"cmd"] =
"frameset";
4851 $_GET[
"target"] =
"";
4852 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
4855 include(
"repository.php");
4860 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
4866 return mktime($time[
'h'],$time[
'm'],0,$date[
'm'],$date[
'd'],$date[
'y']);
4871 return array(
'y' => date(
'Y',$a_unix_time),
4872 'm' => date(
'n',$a_unix_time),
4873 'd' => date(
'd',$a_unix_time));
4878 return array(
'h' => date(
'G',$a_unix_time),
4879 'm' => date(
'i',$a_unix_time),
4880 's' => date(
's',$a_unix_time));
4890 global $ilUser,
$ilCtrl, $ilUser, $ilAccess;
4893 $this->tabs_gui->setTabActive(
'settings');
4896 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
4901 $latitude = $this->
object->getLatitude();
4902 $longitude = $this->
object->getLongitude();
4903 $zoom = $this->
object->getLocationZoom();
4906 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
4909 $latitude = $def[
"latitude"];
4910 $longitude = $def[
"longitude"];
4911 $zoom = $def[
"zoom"];
4917 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
4919 $form->setFormAction($ilCtrl->getFormAction($this));
4921 $form->setTitle($this->lng->txt(
"crs_map_settings"));
4927 $public->setChecked($this->object->getEnableCourseMap());
4928 $form->addItem($public);
4934 $loc_prop->setLongitude($longitude);
4935 $loc_prop->setZoom($zoom);
4936 $form->addItem($loc_prop);
4938 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
4940 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
4952 $this->
object->update();
4954 $ilCtrl->redirect($this,
"editMapSettings");
4964 $this->tabs_gui->setTabActive(
"members");
4966 $this->tabs_gui->setSubTabActive(
"crs_members_map");
4968 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
4974 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
4976 $map->setMapId(
"course_map");
4977 $map->setWidth(
"700px");
4978 $map->setHeight(
"500px");
4979 $map->setLatitude($this->object->getLatitude());
4980 $map->setLongitude($this->object->getLongitude());
4981 $map->setZoom($this->object->getLocationZoom());
4982 $map->setEnableTypeControl(
true);
4983 $map->setEnableNavigationControl(
true);
4984 $map->setEnableCentralMarker(
true);
4987 $this->
object->initCourseMemberObject();
4988 if(count($members = $this->object->members_obj->getParticipants()))
4990 foreach($members as $user_id)
4992 $map->addUserMarker($user_id);
4996 $tpl->setContent($map->getHTML());
4997 $tpl->setLeftContent($map->getUserListHTML());
5006 $this->object->getAboStatus(), $this->
object->getRefId(), $this->
object->getId());
5012 static function _modifyItemGUI($a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path,
5013 $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id = 0)
5018 if ($a_parent_ref_id == 0)
5020 $a_parent_ref_id = $a_course_ref_id;
5024 if($a_item_data[
'type'] ==
'tst' and
5027 $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));
5032 if(isset($a_item_data[
'timing_type']))
5034 switch($a_item_data[
'timing_type'])
5054 $a_item_list_gui->enableSubscribe($a_abo_status);
5057 if ($activation !=
"")
5059 $a_item_list_gui->addCustomProperty($lng->txt($a_item_data[
'activation_info']), $activation,
5063 $is_tutor = ($ilAccess->checkAccess(
'write',
'',
5064 $a_course_ref_id,
'crs', $a_course_obj_id));
5066 if($a_show_path and $is_tutor)
5068 $a_item_list_gui->addCustomProperty($lng->txt(
'path'),
5077 $ilCtrl->setParameterByClass(
'ilcourseitemadministrationgui',
"ref_id",
5079 $ilCtrl->setParameterByClass(
'ilcourseitemadministrationgui',
"item_id",
5080 $a_item_data[
'child']);
5081 $a_item_list_gui->addCustomCommand($ilCtrl->getLinkTargetByClass(
5082 array(strtolower($a_cmd_class),
'ilCourseItemAdministrationGUI'),
5095 if ($this->object->getType() !=
'crs')
5099 if (!$ilAccess->checkAccess(
'write',
'',
5100 $this->object->getRefId(),
'crs',$this->
object->getId()))
5104 if($this->object->enabledObjectiveView())
5118 if(!
$_SESSION[
'crs_timings_panel'][$this->object->getId()] or 1)
5122 $this->tabs_gui->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"view"));
5126 $this->tabs_gui->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"disableAdministrationPanel"));
5129 include_once
'Modules/Course/classes/class.ilCourseItems.php';
5132 $this->tabs_gui->addSubTabTarget(
'timings_timings',
5133 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editUserTimings'));
5160 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
5162 $dt[
'year'] = (int)
$_POST[$a_field][
'date'][
'y'];
5163 $dt[
'mon'] = (int)
$_POST[$a_field][
'date'][
'm'];
5164 $dt[
'mday'] = (int)
$_POST[$a_field][
'date'][
'd'];
5165 $dt[
'hours'] = (int)
$_POST[$a_field][
'time'][
'h'];
5166 $dt[
'minutes'] = (int)
$_POST[$a_field][
'time'][
'm'];
5167 $dt[
'seconds'] = (int)
$_POST[$a_field][
'time'][
's'];
5182 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_objectives_ask_reset.html",
'Modules/Course');
5184 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
5185 $this->tpl->setVariable(
"INFO_STRING",$this->lng->txt(
'crs_objectives_reset_sure'));
5186 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
5187 $this->tpl->setVariable(
"TXT_RESET",$this->lng->txt(
'reset'));
5196 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
5199 $tmp_obj_res->
reset($this->object->getId());
5201 $ilUser->deletePref(
'crs_objectives_force_details_'.$this->object->getId());
5209 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
5211 global $ilAccess,$ilUser;
5213 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
5217 $this->start_obj =
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
5218 if(count($this->start_obj->getStartObjects()) and !$this->start_obj->allFullfilled($ilUser->getId()))
5227 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
5228 include_once
'./Services/Repository/classes/class.ilRepositoryExplorer.php';
5229 include_once
'./classes/class.ilLink.php';
5231 global $rbacsystem,
$ilias,$ilUser,$ilAccess,$ilObjDataCache;
5233 $this->tabs_gui->setSubTabActive(
'view');
5235 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_start_view.html",
'Modules/Course');
5236 $this->tpl->setVariable(
"INFO_STRING",$this->lng->txt(
'crs_info_start'));
5237 $this->tpl->setVariable(
"TBL_TITLE_START",$this->lng->txt(
'crs_table_start_objects'));
5238 $this->tpl->setVariable(
"HEADER_NR",$this->lng->txt(
'crs_nr'));
5239 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
5240 $this->tpl->setVariable(
"HEADER_EDITED",$this->lng->txt(
'crs_objective_accomplished'));
5243 $lm_continue =&
new ilCourseLMHistory($this->object->getRefId(),$ilUser->getId());
5247 foreach($this->start_obj->getStartObjects() as $start)
5249 $obj_id = $ilObjDataCache->lookupObjId($start[
'item_ref_id']);
5250 $ref_id = $start[
'item_ref_id'];
5257 $obj_frame = $obj_frame ? $obj_frame :
'';
5260 $obj_frame =
$type ==
'tst' ?
'' : $obj_frame;
5262 $contentObj =
false;
5264 if($ilAccess->checkAccess(
'read',
'',
$ref_id))
5266 $this->tpl->setCurrentBlock(
"start_read");
5267 $this->tpl->setVariable(
"READ_TITLE_START",$ilObjDataCache->lookupTitle(
$obj_id));
5268 $this->tpl->setVariable(
"READ_TARGET_START",$obj_frame);
5269 $this->tpl->setVariable(
"READ_LINK_START", $obj_link.
'&crs_show_result='.$this->object->getRefId());
5270 $this->tpl->parseCurrentBlock();
5274 $this->tpl->setCurrentBlock(
"start_visible");
5275 $this->tpl->setVariable(
"VISIBLE_LINK_START",$ilObjDataCache->lookupTitle(
$obj_id));
5276 $this->tpl->parseCurrentBlock();
5280 if(isset($continue_data[
$ref_id]))
5282 $this->tpl->setCurrentBlock(
"link");
5283 $this->tpl->setVariable(
"LINK_HREF",
ilLink::_getLink($ref_id,
'',array(
'obj_id',
5284 $continue_data[$ref_id][
'lm_page_id'])));
5285 #$this->tpl->setVariable("CONTINUE_LINK_TARGET",$target);
5286 $this->tpl->setVariable(
"LINK_NAME",$this->lng->txt(
'continue_work'));
5287 $this->tpl->parseCurrentBlock();
5291 if(!$ilUser->isDesktopItem($ref_id,
$type) and
5292 $this->
object->getAboStatus())
5294 if ($ilAccess->checkAccess(
'read',
'',$ref_id))
5296 $this->tpl->setCurrentBlock(
"link");
5297 $this->ctrl->setParameterByClass(get_class($this),
'item_ref_id',$ref_id);
5298 $this->ctrl->setParameterByClass(get_class($this),
'item_id',$ref_id);
5299 $this->ctrl->setParameterByClass(get_class($this),
'type',
$type);
5301 $this->tpl->setVariable(
"LINK_HREF",$this->ctrl->getLinkTarget($this,
'addToDesk'));
5302 $this->tpl->setVariable(
"LINK_NAME", $this->lng->txt(
"to_desktop"));
5303 $this->tpl->parseCurrentBlock();
5306 elseif($this->object->getAboStatus())
5308 $this->tpl->setCurrentBlock(
"link");
5309 $this->ctrl->setParameterByClass(get_class($this),
'item_ref_id',$ref_id);
5310 $this->ctrl->setParameterByClass(get_class($this),
'item_id',$ref_id);
5311 $this->ctrl->setParameterByClass(get_class($this),
'type',
$type);
5313 $this->tpl->setVariable(
"LINK_HREF",$this->ctrl->getLinkTarget($this,
'removeFromDesk'));
5314 $this->tpl->setVariable(
"LINK_NAME", $this->lng->txt(
"unsubscribe"));
5315 $this->tpl->parseCurrentBlock();
5320 if(strlen($ilObjDataCache->lookupDescription(
$obj_id)))
5322 $this->tpl->setCurrentBlock(
"start_description");
5323 $this->tpl->setVariable(
"DESCRIPTION_START",$ilObjDataCache->lookupDescription(
$obj_id));
5324 $this->tpl->parseCurrentBlock();
5328 if($this->start_obj->isFullfilled($ilUser->getId(),
$ref_id))
5330 $accomplished =
'accomplished';
5334 $accomplished =
'not_accomplished';
5336 $this->tpl->setCurrentBlock(
"start_row");
5338 $this->tpl->setVariable(
"EDITED_ALT",$this->lng->txt(
'crs_objective_'.$accomplished));
5339 $this->tpl->setVariable(
"ROW_CLASS",
'option_value');
5340 $this->tpl->setVariable(
"ROW_CLASS_CENTER",
'option_value_center');
5341 $this->tpl->setVariable(
"OBJ_NR_START",++$counter.
'.');
5342 $this->tpl->parseCurrentBlock();
5356 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
5358 if($settings->isActive() and $settings->getContainer() != $this->
object->getRefId())
5360 $settings->setContainer($this->object->getRefId());
5361 $rbacsystem->initMemberView();
5373 $link = chr(13).chr(10).chr(13).chr(10);
5374 $link .= $this->lng->txt(
'crs_mail_permanent_link');
5375 $link .= chr(13).chr(10).chr(13).chr(10);
5376 include_once
'./classes/class.ilLink.php';
5378 return rawurlencode(base64_encode($link));