5 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
36 $this->ctrl->saveParameter($this,array(
"ref_id",
"cmdClass"));
41 $this->lng->loadLanguageModule(
'crs');
43 $this->SEARCH_USER = 1;
44 $this->SEARCH_GROUP = 2;
45 $this->SEARCH_COURSE = 3;
53 case "deleteSubscribers":
57 case "addSubscribers":
58 $this->addSubscribers();
61 case "addFromWaitingList":
62 $this->addFromWaitingList();
65 case "removeFromWaitingList":
84 if(isset(
$_POST[
'btn_pressed'][
'deleteMembers']))
100 if(isset(
$_GET[
'member_id']))
106 $_POST[
'member'] = array_unique(array_merge((array)
$_POST[
'members'],
107 (array) $_POST[
'tutors'],
108 (array) $_POST[
'admins'],
109 (array) $_POST[
'waiting'],
110 (array) $_POST[
'subscribers']));
114 if (!count(
$_POST[
"member"]))
124 ilUtil::redirect(
"ilias.php?baseClass=ilmailgui&type=new&rcp_to=".implode(
',',$rcps));
137 #ilUtil::sendSuccess($this->lng->txt("action_aborted"),true);
146 if(!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"],
'crs'))
148 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_create"),$this->ilias->error_obj->MESSAGE);
150 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_create.html",
'Modules/Course');
152 $this->ctrl->setParameter($this,
"new_type",
'crs');
153 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"save"));
155 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"crs_new"));
156 $this->tpl->setVariable(
"TYPE_IMG",
158 $this->tpl->setVariable(
"ALT_IMG", $this->lng->txt(
"obj_crs"));
159 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
160 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"crs_add"));
161 $this->tpl->setVariable(
"CMD_SUBMIT",
"save");
162 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
163 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'title'));
164 $this->tpl->setVariable(
"TXT_DESC",$this->lng->txt(
'desc'));
168 $this->tpl->setVariable(
"TXT_IMPORT_CRS", $this->lng->txt(
"import_crs"));
169 $this->tpl->setVariable(
"TXT_CRS_FILE", $this->lng->txt(
"file"));
170 $this->tpl->setVariable(
"TXT_IMPORT", $this->lng->txt(
"import"));
173 $umf=get_cfg_var(
"upload_max_filesize");
175 $pms=get_cfg_var(
"post_max_size");
178 $max_filesize=min($umf, $pms);
180 $max_filesize=max($umf, $pms);
183 $this->tpl->setVariable(
"TXT_FILE_INFO", $this->lng->txt(
"file_notice").$max_filesize);
192 global $_FILES, $rbacsystem,
$ilDB;
195 if($_FILES[
'xmldoc'][
'tmp_name'] ==
'none' or !$_FILES[
'xmldoc'][
'tmp_name'])
197 $this->ilias->raiseError(
"No file selected!",$this->ilias->error_obj->MESSAGE);
201 $info = pathinfo($_FILES[
"xmldoc"][
"name"]);
202 if (strtolower($info[
"extension"]) !=
"zip")
204 $this->ilias->raiseError(
"File must be a zip file!",$this->ilias->error_obj->MESSAGE);
208 include_once(
"Modules/Course/classes/class.ilObjCourse.php");
211 $newObj->setType(
'crs');
212 $newObj->setTitle($_FILES[
"xmldoc"][
"name"]);
213 $newObj->setDescription(
"");
214 $newObj->create(
true);
215 $newObj->createReference();
216 $newObj->putInTree(
$_GET[
"ref_id"]);
217 $newObj->setPermissions(
$_GET[
"ref_id"]);
218 $newObj->initDefaultRoles();
221 include_once
'Modules/Course/classes/class.ilFileDataCourse.php';
225 $course_files->
createImportFile($_FILES[
"xmldoc"][
"tmp_name"],$_FILES[
'xmldoc'][
'name']);
226 $course_files->unpackImportFile();
227 $course_files->validateImportFile();
229 include_once
'Modules/Course/classes/class.ilCourseXMLParser.php';
236 $newObj->MDUpdateListener(
'General');
239 #$course_files->deleteImportFile();
243 $this->ctrl->setParameter($this,
"ref_id", $newObj->getRefId());
245 $this->ctrl->getLinkTarget($this,
"edit")));
253 $this->ctrl->setCmd(
"view");
271 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
273 $this->ctrl->setCmdClass(get_class($course_content_obj));
274 $this->ctrl->setCmd(
'editUserTimings');
275 $this->ctrl->forwardCommand($course_content_obj);
286 global $rbacsystem, $ilUser,
$ilCtrl;
296 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
303 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
308 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
314 include_once(
'Modules/Course/classes/class.ilCourseAgreementGUI.php');
315 $this->ctrl->setReturn($this,
'view_content');
317 $this->ctrl->setCmdClass(get_class($agreement));
318 $this->ctrl->forwardCommand($agreement);
340 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
343 $this->ctrl->setCmdClass(get_class($course_content_obj));
344 $this->ctrl->forwardCommand($course_content_obj);
362 $this->ctrl->setCmd(
"showSummary");
363 $this->ctrl->setCmdClass(
"ilinfoscreengui");
384 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
387 $this->tabs_gui->setTabActive(
'info_short');
389 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
390 include_once
'Modules/Course/classes/class.ilCourseFile.php';
395 $info->enablePrivateNotes();
396 $info->enableFeedback();
398 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
400 $info->enableNewsEditing();
404 if(strlen($this->object->getImportantInformation()) or
405 strlen($this->object->getSyllabus()) or
408 $info->addSection($this->lng->txt(
'crs_general_informations'));
411 if(strlen($this->object->getImportantInformation()))
413 $info->addProperty($this->lng->txt(
'crs_important_info'),
417 if(strlen($this->object->getSyllabus()))
419 $info->addProperty($this->lng->txt(
'crs_syllabus'), nl2br(
425 $tpl =
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'Modules/Course');
429 $tpl->setCurrentBlock(
"files");
430 $this->ctrl->setParameter($this,
'file_id',$file->getFileId());
431 $tpl->setVariable(
"DOWN_LINK",$this->ctrl->getLinkTarget($this,
'sendfile'));
432 $tpl->setVariable(
"DOWN_NAME",$file->getFileName());
433 $tpl->setVariable(
"DOWN_INFO_TXT",$this->lng->txt(
'crs_file_size_info'));
434 $tpl->setVariable(
"DOWN_SIZE",$file->getFileSize());
435 $tpl->setVariable(
"TXT_BYTES",$this->lng->txt(
'bytes'));
436 $tpl->parseCurrentBlock();
438 $info->addProperty($this->lng->txt(
'crs_file_download'),
442 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
445 $record_gui->parse();
448 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
451 if($this->object->hasContactData())
453 $info->addSection($this->lng->txt(
"crs_contact"));
455 if(strlen($this->object->getContactName()))
457 $info->addProperty($this->lng->txt(
"crs_contact_name"),
458 $this->
object->getContactName());
460 if(strlen($this->object->getContactResponsibility()))
462 $info->addProperty($this->lng->txt(
"crs_contact_responsibility"),
463 $this->
object->getContactResponsibility());
465 if(strlen($this->object->getContactPhone()))
467 $info->addProperty($this->lng->txt(
"crs_contact_phone"),
468 $this->
object->getContactPhone());
470 if($this->object->getContactEmail())
472 $emails = split(
",",$this->object->getContactEmail());
473 foreach ($emails as $email) {
474 $email = trim($email);
475 $etpl =
new ilTemplate(
"tpl.crs_contact_email.html",
true,
true ,
'Modules/Course');
476 $etpl->setVariable(
"EMAIL_LINK",
"ilias.php?baseClass=ilmailgui&type=new&rcp_to=".$email);
477 $etpl->setVariable(
"CONTACT_EMAIL", $email);
478 $mailString .= $etpl->get().
"<br />";
480 $info->addProperty($this->lng->txt(
"crs_contact_email"), $mailString);
482 if(strlen($this->object->getContactConsultation()))
484 $info->addProperty($this->lng->txt(
"crs_contact_consultation"),
485 nl2br($this->object->getContactConsultation()));
490 $info->addSection($this->lng->txt(
"access"));
491 $info->showLDAPRoleGroupMappingInfo();
494 if($this->object->getOfflineStatus())
496 $info->addProperty($this->lng->txt(
'crs_visibility'),
497 $this->lng->txt(
'crs_visibility_unvisible'));
499 elseif($this->object->getActivationUnlimitedStatus())
501 $info->addProperty($this->lng->txt(
"crs_visibility"),
502 $this->lng->txt(
'crs_unlimited'));
506 $info->addProperty($this->lng->txt(
'crs_visibility'),
512 switch($this->object->getSubscriptionLimitationType())
515 $txt = $this->lng->txt(
"crs_info_reg_deactivated");
519 switch($this->object->getSubscriptionType())
522 $txt = $this->lng->txt(
"crs_info_reg_confirmation");
525 $txt = $this->lng->txt(
"crs_info_reg_direct");
528 $txt = $this->lng->txt(
"crs_info_reg_password");
534 $info->addProperty($this->lng->txt(
"crs_info_reg"),$txt);
539 if($this->object->getSubscriptionUnlimitedStatus())
541 $info->addProperty($this->lng->txt(
"crs_reg_until"),
542 $this->lng->txt(
'crs_unlimited'));
544 elseif($this->object->getSubscriptionStart() < time())
546 $info->addProperty($this->lng->txt(
"crs_reg_until"),
547 $this->lng->txt(
'crs_to').
' '.
550 elseif($this->object->getSubscriptionStart() > time())
552 $info->addProperty($this->lng->txt(
"crs_reg_until"),
553 $this->lng->txt(
'crs_from').
' '.
556 if ($this->object->isSubscriptionMembershipLimited())
558 $info->addProperty($this->lng->txt(
"mem_free_places"),
559 max(0,$this->object->getSubscriptionMaxMembers()- count($this->object->getMembers())));
570 $info->addProperty($this->lng->txt(
"crs_archive"),
577 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
580 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
583 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
587 $this->lng->loadLanguageModule(
'ps');
588 $info->addSection($this->lng->txt(
'crs_user_agreement_info'));
589 $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
593 $info->addProperty($this->lng->txt(
'ps_crs_user_fields'),$fields);
597 $info->enableLearningProgress(
true);
600 $this->ctrl->forwardCommand($info);
605 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
618 $this->tabs_gui->setTabActive(
'settings');
619 $this->tabs_gui->setSubTabActive(
'crs_start_objects');
622 $crs_start =&
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
624 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_list_starter.html",
'Modules/Course');
625 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
627 if(!count($starter = $crs_start->getStartObjects()))
629 $this->tpl->setCurrentBlock(
"btn_cell");
630 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTarget($this,
'selectStarter'));
631 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
'crs_add_starter'));
632 $this->tpl->parseCurrentBlock();
639 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
641 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'obj_crs'));
642 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'crs_edit_start_objects'));
643 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
644 $this->tpl->setVariable(
"HEADER_OPT",$this->lng->txt(
'options'));
645 $this->tpl->setVariable(
"BTN_ADD",$this->lng->txt(
'crs_add_starter'));
648 foreach($starter as $start_id =>
$data)
652 if(strlen($tmp_obj->getDescription()))
654 $this->tpl->setCurrentBlock(
"description");
655 $this->tpl->setVariable(
"DESCRIPTION_STARTER",$tmp_obj->getDescription());
656 $this->tpl->parseCurrentBlock();
659 $this->tpl->setCurrentBlock(
"starter_row");
661 $this->tpl->setVariable(
"STARTER_TITLE",$tmp_obj->getTitle());
663 $this->ctrl->setParameter($this,
'del_starter',$start_id);
664 $this->tpl->setVariable(
"DELETE_LINK",$this->ctrl->getLinkTarget($this,
'deleteStarter'));
665 $this->tpl->setVariable(
"DELETE_ALT",$this->lng->txt(
'delete'));
666 $this->tpl->parseCurrentBlock();
672 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
683 $crs_start =&
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
695 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
698 $this->tabs_gui->setTabActive(
'settings');
699 $this->tabs_gui->setSubTabActive(
'crs_start_objects');
710 $crs_start =&
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
712 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_add_starter.html",
'Modules/Course');
714 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
716 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'obj_crs'));
717 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'crs_select_starter'));
718 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
719 $this->tpl->setVariable(
"BTN_ADD",$this->lng->txt(
'crs_add_starter'));
720 $this->tpl->setVariable(
"BTN_CANCEL",$this->lng->txt(
'cancel'));
723 $this->
object->initCourseItemObject();
725 foreach($crs_start->getPossibleStarters($this->object->items_obj) as $item_ref_id)
729 if(strlen($tmp_obj->getDescription()))
731 $this->tpl->setCurrentBlock(
"description");
732 $this->tpl->setVariable(
"DESCRIPTION_STARTER",$tmp_obj->getDescription());
733 $this->tpl->parseCurrentBlock();
736 $this->tpl->setCurrentBlock(
"starter_row");
739 $this->tpl->setVariable(
"STARTER_TITLE",$tmp_obj->getTitle());
740 $this->tpl->parseCurrentBlock();
746 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
757 if(!count(
$_POST[
'starter']))
765 $crs_start =&
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
767 foreach(
$_POST[
'starter'] as $item_ref_id)
769 if(!$crs_start->exists($item_ref_id))
772 $crs_start->
add($item_ref_id);
799 include_once
'Modules/Course/classes/class.ilCourseFile.php';
811 $this->tabs_gui->setTabActive(
'settings');
812 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
815 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'Modules/Course');
816 $this->tpl->setVariable(
'INFO_TABLE',$this->form->getHTML());
825 $table_data[
'id'] = $file->getFileId();
826 $table_data[
'filename'] = $file->getFileName();
827 $table_data[
'filetype'] = $file->getFileType();
828 $table_data[
'filesize'] = $file->getFileSize();
830 $rows[] = $table_data;
833 include_once(
"./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
835 $table_gui->setTitle($this->lng->txt(
"crs_info_download"));
836 $table_gui->setData($rows);
837 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
838 $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->lng->txt(
"delete"));
839 $table_gui->setSelectAllCheckbox(
"file_id");
840 $this->tpl->setVariable(
'INFO_FILE_TABLE',$table_gui->getHTML());
855 if(!count(
$_POST[
'file_id']))
863 $this->tabs_gui->setTabActive(
'settings');
864 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
866 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
870 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"deleteInfoFiles"));
871 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
872 $c_gui->setCancel($this->lng->txt(
"cancel"),
"editInfo");
873 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"deleteInfoFiles");
876 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
877 foreach(
$_POST[
"file_id"] as $file_id)
880 $c_gui->addItem(
"file_id[]", $file_id,
$file->getFileName());
883 $this->tpl->setContent($c_gui->getHTML());
894 if(!count(
$_POST[
'file_id']))
900 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
902 foreach(
$_POST[
'file_id'] as $file_id)
905 if($this->object->getId() ==
$file->getCourseId())
924 if(is_object($this->form))
929 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
931 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
932 $this->form->setMultipart(
true);
933 $this->form->setTitle($this->lng->txt(
'crs_general_info'));
934 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
935 $this->form->addCommandButton(
'editInfo',$this->lng->txt(
'cancel'));
938 $area->
setValue($this->object->getImportantInformation());
941 $this->form->addItem($area);
944 $area->
setValue($this->object->getSyllabus());
947 $this->form->addItem($area);
950 $section->setTitle($this->lng->txt(
'crs_info_download'));
954 $file->enableFileNameSelection(
'file_name');
955 $this->form->addItem(
$file);
958 $section->setTitle($this->lng->txt(
'crs_contact'));
961 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_name'),
'contact_name');
962 $text->
setValue($this->object->getContactName());
964 $text->setMaxLength(70);
965 $this->form->addItem($text);
967 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
968 $text->
setValue($this->object->getContactResponsibility());
970 $text->setMaxLength(70);
971 $this->form->addItem($text);
973 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_phone'),
'contact_phone');
974 $text->
setValue($this->object->getContactPhone());
976 $text->setMaxLength(40);
977 $this->form->addItem($text);
979 $text =
new ilTextInputGUI($this->lng->txt(
'crs_contact_email'),
'contact_email');
980 $text->
setValue($this->object->getContactEmail());
981 $text->setInfo($this->lng->txt(
'crs_contact_email_info'));
983 $text->setMaxLength(255);
984 $this->form->addItem($text);
986 $area =
new ilTextAreaInputGUI($this->lng->txt(
'crs_contact_consultation'),
'contact_consultation');
987 $area->
setValue($this->object->getContactConsultation());
990 $this->form->addItem($area);
992 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
995 $record_gui->parse();
1011 include_once
'Modules/Course/classes/class.ilCourseFile.php';
1013 $file_obj->setCourseId($this->object->getId());
1014 $file_obj->setFileName(strlen(
$_POST[
'file_name']) ?
1016 $_FILES[
'file'][
'name']);
1017 $file_obj->setFileSize($_FILES[
'file'][
'size']);
1018 $file_obj->setFileType($_FILES[
'file'][
'type']);
1019 $file_obj->setTemporaryName($_FILES[
'file'][
'tmp_name']);
1020 $file_obj->setErrorCode($_FILES[
'file'][
'error']);
1030 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
1032 'crs',$this->object->getId());
1036 $ilErr->setMessage(
'');
1037 $file_obj->validate();
1038 $this->
object->validateInfoSettings();
1040 if(strlen($ilErr->getMessage()))
1046 $this->
object->update();
1047 $file_obj->create();
1048 $record_gui->saveValues();
1050 $this->
object->updateECSContent();
1062 $activation_start = $this->
loadDate(
'activation_start');
1063 $activation_end = $this->
loadDate(
'activation_end');
1064 $subscription_start = $this->
loadDate(
'subscription_start');
1065 $subscription_end = $this->
loadDate(
'subscription_end');
1066 $archive_start = $this->
loadDate(
'archive_start');
1067 $archive_end = $this->
loadDate(
'archive_end');
1069 $this->
object->setActivationType((
int)
$_POST[
'activation_type']);
1070 $this->
object->setActivationStart($activation_start->get(
IL_CAL_UNIX));
1071 $this->
object->setActivationEnd($activation_end->get(
IL_CAL_UNIX));
1072 $this->
object->setSubscriptionLimitationType((
int) $_POST[
'subscription_limitation_type']);
1073 $this->
object->setSubscriptionType((
int) $_POST[
'subscription_type']);
1075 $this->
object->setSubscriptionStart($subscription_start->get(
IL_CAL_UNIX));
1076 $this->
object->setSubscriptionEnd($subscription_end->get(
IL_CAL_UNIX));
1077 $this->
object->enableSubscriptionMembershipLimitation((
int) $_POST[
'subscription_membership_limitation']);
1078 $this->
object->setSubscriptionMaxMembers((
int) $_POST[
'subscription_max']);
1079 $this->
object->enableWaitingList((
int) $_POST[
'waiting_list']);
1080 #$this->object->setSubscriptionNotify((int) $_POST['subscription_notification']);
1081 $this->
object->setViewMode((
int) $_POST[
'view_mode']);
1089 $this->
object->setOrderType((
int) $_POST[
'order_type']);
1091 $this->
object->setArchiveStart($archive_start->get(
IL_CAL_UNIX));
1092 $this->
object->setArchiveEnd($archive_end->get(
IL_CAL_UNIX));
1093 $this->
object->setArchiveType($_POST[
'archive_type']);
1094 $this->
object->setAboStatus((
int) $_POST[
'abo']);
1095 $this->
object->setShowMembers((
int) $_POST[
'show_members']);
1097 $this->
object->enableSessionLimit((
int) $_POST[
'sl']);
1098 $this->
object->setNumberOfPreviousSessions(is_numeric($_POST[
'sp']) ? (
int) $_POST[
'sp'] : -1 );
1099 $this->
object->setNumberOfnextSessions(is_numeric($_POST[
'sn']) ? (
int) $_POST[
'sn'] : -1 );
1101 if($this->object->validate())
1103 $this->
object->update();
1106 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1123 $this->ctrl->redirect($this,
'edit');
1143 include_once(
'./Services/WebServices/ECS/classes/class.ilECSSettings.php');
1147 if(!$ecs_settings->isEnabled())
1158 $this->
object->handleECSSettings((
bool)
$_POST[
'ecs_export'],(
int) $_POST[
'ecs_owner'],(array) $_POST[
'ecs_mids']);
1161 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
1162 $export =
new ilECSExport($this->object->getId());
1163 if($export->isExported())
1166 $rbacadmin->grantPermission($ecs_settings->getGlobalRole(),
1168 $this->
object->getRefId());
1173 $rbacadmin->revokePermission($this->object->getRefId(),
1174 $ecs_settings->getGlobalRole());
1202 $this->tabs_gui->setTabActive(
'settings');
1203 $this->tabs_gui->setSubTabActive(
'crs_settings');
1207 $this->tpl->setContent($this->form->getHTML());
1219 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
1220 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
1222 if(!is_object($this->form))
1227 $this->form->setTitle($this->lng->txt(
'crs_edit'));
1230 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
1231 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1233 $this->form->setTableWidth(
'75%');
1234 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
1238 $title->setSubmitFormOnEnter(
true);
1239 $title->setValue($this->object->getTitle());
1241 $title->setMaxLength(128);
1242 $title->setRequired(
true);
1243 $this->form->addItem(
$title);
1247 $desc->setValue($this->object->getLongDescription());
1250 $this->form->addItem(
$desc);
1254 $act_type->
setValue($this->object->getActivationType());
1257 $opt->
setInfo($this->lng->txt(
'crs_availability_unvisible_info'));
1258 $act_type->addOption($opt);
1261 $opt->
setInfo($this->lng->txt(
'crs_availability_limitless_info'));
1262 $act_type->addOption($opt);
1265 $opt->
setInfo($this->lng->txt(
'crs_availability_until_info'));
1268 $start->setShowTime(
true);
1270 $start->setDate($start_date);
1271 $opt->addSubItem(
$start);
1277 $opt->addSubItem($end);
1279 $act_type->addOption($opt);
1281 $this->form->addItem($act_type);
1284 $section->setTitle($this->lng->txt(
'crs_reg'));
1287 $reg_type =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_reg_period'),
'subscription_limitation_type');
1288 $reg_type->
setValue($this->object->getSubscriptionLimitationType());
1291 $opt->
setInfo($this->lng->txt(
'crs_registration_deactivated'));
1292 $reg_type->addOption($opt);
1295 $opt->
setInfo($this->lng->txt(
'crs_reg_unlim_info'));
1296 $reg_type->addOption($opt);
1299 $opt->
setInfo($this->lng->txt(
'crs_reg_lim_info'));
1302 $start->setShowTime(
true);
1304 $start->setDate($start_date);
1305 $opt->addSubItem(
$start);
1311 $opt->addSubItem($end);
1313 $reg_type->addOption($opt);
1315 $this->form->addItem($reg_type);
1319 $reg_proc =
new ilRadioGroupInputGUI($this->lng->txt(
'crs_registration_type'),
'subscription_type');
1320 $reg_proc->
setValue($this->object->getSubscriptionType());
1321 $reg_proc->setInfo($this->lng->txt(
'crs_reg_type_info'));
1324 $reg_proc->addOption($opt);
1327 $reg_proc->addOption($opt);
1332 $pass->setSubmitFormOnEnter(
true);
1334 $pass->setMaxLength(12);
1335 $pass->
setValue($this->object->getSubscriptionPassword());
1337 $opt->addSubItem($pass);
1338 $reg_proc->addOption($opt);
1340 $this->form->addItem($reg_proc);
1343 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'crs_subscription_max_members_short'),
'subscription_membership_limitation');
1345 $lim->setOptionTitle($this->lng->txt(
'crs_subscription_max_members'));
1346 $lim->setChecked($this->object->isSubscriptionMembershipLimited());
1349 $max->setSubmitFormOnEnter(
true);
1351 $max->setMaxLength(4);
1352 $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->
object->getSubscriptionMaxMembers() :
'');
1353 $max->setTitle($this->lng->txt(
'members').
':');
1354 $max->setInfo($this->lng->txt(
'crs_reg_max_info'));
1356 $lim->addSubItem($max);
1359 $wait->setOptionTitle($this->lng->txt(
'crs_waiting_list'));
1360 $wait->setChecked($this->object->enabledWaitingList());
1361 $wait->setInfo($this->lng->txt(
'crs_wait_info'));
1362 $lim->addSubItem($wait);
1364 $this->form->addItem($lim);
1367 $pres->setTitle($this->lng->txt(
'crs_view_mode'));
1369 $this->form->addItem($pres);
1373 $view_type->
setValue($this->object->getViewMode());
1376 $opt->
setInfo($this->lng->txt(
'cntr_view_info_sessions'));
1377 $view_type->addOption($opt);
1380 $opt->
setInfo($this->lng->txt(
'cntr_view_info_simple'));
1381 $view_type->addOption($opt);
1384 $opt->
setInfo($this->lng->txt(
'cntr_view_info_by_type'));
1385 $view_type->addOption($opt);
1388 $opt->
setInfo($this->lng->txt(
'crs_view_info_objective'));
1389 $view_type->addOption($opt);
1392 $opt->
setInfo($this->lng->txt(
'crs_view_info_timing'));
1393 $view_type->addOption($opt);
1396 $opt->
setInfo($this->lng->txt(
'crs_archive_info'));
1399 $down->setOptionTitle($this->lng->txt(
'crs_archive_download'));
1401 $opt->addSubItem($down);
1404 $start->setShowTime(
true);
1406 $start->setDate($start_date);
1407 $opt->addSubItem(
$start);
1413 $opt->addSubItem($end);
1415 $view_type->addOption($opt);
1416 $this->form->addItem($view_type);
1420 $sort->
setValue($this->object->getOrderType());
1423 $opt->
setInfo($this->lng->txt(
'crs_sort_title_info'));
1424 $sort->addOption($opt);
1427 $opt->
setInfo($this->lng->txt(
'crs_sort_manual_info'));
1428 $sort->addOption($opt);
1431 $opt->
setInfo($this->lng->txt(
'crs_sort_timing_info'));
1432 $sort->addOption($opt);
1435 $this->form->addItem($sort);
1439 $sess->setChecked($this->object->isSessionLimitEnabled());
1440 $sess->setInfo($this->lng->txt(
'sess_limit_info'));
1443 #$prev->setSubmitFormOnEnter(true);
1445 $prev->setValue($this->object->getNumberOfPreviousSessions() == -1 ?
1447 $this->
object->getNumberOfPreviousSessions()
1450 $prev->setMaxLength(3);
1451 $sess->addSubItem($prev);
1454 #$next->setSubmitFormOnEnter(true);
1456 $next->setValue($this->object->getNumberOfNextSessions() == -1 ?
1458 $this->
object->getNumberOfnextSessions()
1461 $next->setMaxLength(3);
1462 $sess->addSubItem($next);
1464 $this->form->addItem(
$sess);
1467 $further->setTitle($this->lng->txt(
'crs_further_settings'));
1468 $this->form->addItem($further);
1470 $desk =
new ilCheckboxInputGUI($this->lng->txt(
'crs_add_remove_from_desktop'),
'abo');
1471 $desk->
setChecked($this->object->getAboStatus());
1472 $desk->setInfo($this->lng->txt(
'crs_add_remove_from_desktop_info'));
1473 $this->form->addItem($desk);
1476 $mem->
setChecked($this->object->getShowMembers());
1477 $mem->setInfo($this->lng->txt(
'crs_show_members_info'));
1478 $this->form->addItem($mem);
1494 include_once(
'./Services/WebServices/ECS/classes/class.ilECSSettings.php');
1498 if(!$ecs_settings->isEnabled())
1503 $this->lng->loadLanguageModule(
'ecs');
1506 $ecs->setTitle($this->lng->txt(
'ecs_export'));
1507 $this->form->addItem($ecs);
1509 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
1510 $ecs_export =
new ilECSExport($this->object->getId());
1513 $exp->setRequired(
true);
1514 $exp->setValue($ecs_export->isExported() ? 1 : 0);
1516 $off =
new ilRadioOption($this->lng->txt(
'ecs_export_disabled'),0);
1517 $exp->addOption($off);
1519 $on =
new ilRadioOption($this->lng->txt(
'ecs_export_enabled'),1);
1520 $exp->addOption($on);
1522 $this->form->addItem($exp);
1528 if($ecs_export->getEContentId())
1530 include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentReader.php');
1533 $econtent_reader->
read();
1534 if($content = $econtent_reader->getEContent())
1536 $members = $content[0]->getParticipants();
1537 $owner = $content[0]->getOwner();
1541 include_once(
'./Services/WebServices/ECS/classes/class.ilECSCommunityReader.php');
1543 if(count($parts =
$reader->getPublishableParticipants()) > 1)
1545 $ilLog->write(__METHOD__.
': Found '.count($parts).
' participants for publishing');
1546 #$publish_as = new ilCustomInputGUI('','');
1547 #$publish_as->setHtml('<strong>'.$this->lng->txt('ecs_publish_as').'</strong>');
1549 #$publish_as = new ilCheckboxGroupInputGUI(
1550 # $this->lng->txt('ecs_publish_as'),
1557 foreach($parts as $participant)
1559 $community =
$reader->getCommunityById($participant->getCommunityId());
1561 $part =
new ilRadioOption($community->getTitle(),$participant->getMID());
1562 $part->
setInfo($community->getDescription());
1563 $coms->addOption($part);
1565 #$publish_as->addSubItem($coms);
1566 #$on->addSubItem($publish_as);
1567 $on->addSubItem($coms);
1572 $ilLog->write(__METHOD__.
': Found '.count($parts).
' participants for publishing');
1574 $owner_ids =
$reader->getOwnMIDs();
1575 $hidden->setValue($owner_ids[0]);
1576 $this->form->addItem($hidden);
1579 #$publish_for = new ilCustomInputGUI('','');
1581 $publish_for->
setValue((array) $members);
1583 #$publish_for->setHtml('<strong>'.$this->lng->txt('ecs_publish_for').'</strong>');
1585 foreach(
$reader->getEnabledParticipants() as $participant)
1587 $community =
$reader->getCommunityById($participant->getCommunityId());
1590 $community->getTitle().
': '.$participant->getParticipantName(),
1596 $community->getTitle().
': '.$participant->getParticipantName(),
1597 $participant->getMID()
1599 $publish_for->addOption($com);
1602 #$com = new ilCheckboxInputGUI('111','ecs_mids[]');
1603 #$com->setOptionTitle($community->getTitle().': '.$participant->getParticipantName());
1604 #$com->setValue($participant->getMID());
1605 #$com->setChecked(in_array($participant->getMID(),$members));
1606 #$publish_for->addSubItem($com);
1613 $ilLog->write(__METHOD__.
': Error connecting to ECS server. '.$exc->getMessage());
1618 $ilLog->write(__METHOD__.
': Error parsing ECS query: '.$exc->getMessage());
1640 $this->tabs_gui->setTabActive(
'settings');
1642 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_edit_icons.html",
'Modules/Course');
1644 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
'updateCourseIcons'));
1645 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
1646 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
1647 $this->tpl->setVariable(
"CMD_CANCEL",
"cancel");
1648 $this->tpl->setVariable(
"CMD_SUBMIT",
"updateCourseIcons");
1649 $this->tpl->parseCurrentBlock();
1654 include_once
'Modules/Course/classes/class.ilCourseFile.php';
1676 if ($this->ilias->getSetting(
"custom_icons"))
1678 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
1679 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
1683 $this->ctrl->redirect($this,
"editCourseIcons");
1693 global $rbacsystem,$ilUser,$ilAccess;
1698 $this->tabs_gui->addSubTabTarget(
"crs_settings",
1699 $this->ctrl->getLinkTarget($this,
'edit'),
1700 "edit", get_class($this));
1702 $this->tabs_gui->addSubTabTarget(
"crs_info_settings",
1703 $this->ctrl->getLinkTarget($this,
'editInfo'),
1704 "editInfo", get_class($this));
1706 $this->tabs_gui->addSubTabTarget(
"preconditions",
1707 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
1708 "",
"ilConditionHandlerInterface");
1709 $this->tabs_gui->addSubTabTarget(
"crs_start_objects",
1710 $this->ctrl->getLinkTarget($this,
'listStructure'),
1711 "listStructure", get_class($this));
1712 $this->tabs_gui->addSubTabTarget(
'groupings',
1713 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1718 if ($this->ilias->getSetting(
"custom_icons"))
1720 $this->tabs_gui->addSubTabTarget(
"icon_settings",
1721 $this->ctrl->getLinkTarget($this,
'editCourseIcons'),
1722 "editCourseIcons", get_class($this));
1726 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1729 $this->tabs_gui->addSubTabTarget(
"crs_map_settings",
1730 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
1731 "editMapSettings", get_class($this));
1735 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1736 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1739 if($rbacsystem->checkAccess(
'export_member_data',$privacy->getPrivacySettingsRefId()) and
1740 ($privacy->enabledExport() or
1743 $this->tabs_gui->addSubTabTarget(
'user_fields',
1744 $this->ctrl->getLinkTargetByClass(
'ilcourseuserfieldsgui'),
1746 'ilcourseuserfieldsgui');
1750 case "item_activation":
1751 $this->tabs_gui->addSubTabTarget(
"activation",
1752 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
1753 "edit", get_class($this));
1754 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
1755 $this->tabs_gui->addSubTabTarget(
"preconditions",
1756 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
1757 "",
"ilConditionHandlerInterface");
1761 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1763 $this->tabs_gui->addSubTabTarget(
"crs_member_administration",
1764 $this->ctrl->getLinkTarget($this,
'members'),
1765 "members", get_class($this));
1767 $this->tabs_gui->addSubTabTarget(
"crs_members_gallery",
1768 $this->ctrl->getLinkTarget($this,
'membersGallery'),
1769 "membersGallery", get_class($this));
1772 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1775 $this->tabs_gui->addSubTabTarget(
"crs_members_map",
1776 $this->ctrl->getLinkTarget($this,
'membersMap'),
1777 "membersMap", get_class($this));
1781 include_once
'Services/Mail/classes/class.ilMail.php';
1782 $mail =&
new ilMail($ilUser->getId());
1783 if($rbacsystem->checkAccess(
'mail_visible',$mail->getMailObjectReferenceId()))
1785 $this->tabs_gui->addSubTabTarget(
"mail_members",
1786 $this->ctrl->getLinkTarget($this,
'mailMembers'),
1787 "mailMembers", get_class($this));
1790 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1792 $this->tabs_gui->addSubTabTarget(
"events",
1793 $this->ctrl->getLinkTargetByClass(
'ilsessionoverviewgui',
'listSessions'),
1794 "",
'ilsessionoverviewgui');
1797 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
1800 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId())
1801 && $privacy->enabledExport() and $rbacsystem->checkAccess(
'export_member_data',$privacy->getPrivacySettingsRefId()))
1803 $this->tabs_gui->addSubTabTarget(
'export_members',
1804 $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'));
1820 $this->
object->removeSmallIcon();
1831 $this->
object->removeBigIcon();
1843 $this->
object->removeTinyIcon();
1853 global $rbacadmin,$ilUser;
1855 if(!
$_POST[
'Fobject'][
'title'])
1862 $newObj->initDefaultRoles();
1863 $newObj->initCourseMemberObject();
1864 $newObj->members_obj->add($ilUser->getId(),
IL_CRS_ADMIN);
1865 $newObj->members_obj->updateNotification($ilUser->getId(),1);
1868 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1879 $this->ctrl->setParameter($this,
"ref_id", $newObj->getRefId());
1881 $this->ctrl->getLinkTarget($this,
"edit")));
1901 if(!count(
$_POST[
'archives']))
1904 $this->archiveObject();
1908 if(count(
$_POST[
'archives']) > 1)
1911 $this->archiveObject();
1916 $this->
object->initCourseArchiveObject();
1918 $abs_path = $this->
object->archives_obj->getArchiveFile((
int)
$_POST[
'archives'][0]);
1919 $basename = basename($abs_path);
1934 if(isset(
$_GET[
'admin_hide']))
1936 $ilUser->writePref(
'crs_admin_hide',(
int)
$_GET[
'admin_hide']);
1938 if(isset(
$_GET[
'tutor_hide']))
1940 $ilUser->writePref(
'crs_tutor_hide',(
int)
$_GET[
'tutor_hide']);
1942 if(isset(
$_GET[
'member_hide']))
1944 $ilUser->writePref(
'crs_member_hide',(
int)
$_GET[
'member_hide']);
1946 if(isset(
$_GET[
'subscriber_hide']))
1948 $ilUser->writePref(
'crs_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1950 if(isset(
$_GET[
'wait_hide']))
1952 $ilUser->writePref(
'crs_wait_hide',(
int)
$_GET[
'wait_hide']);
1958 if($this->show_tracking)
1960 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1966 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1969 if($privacy->enabledCourseAccessTimes())
1971 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
1978 $tmp_data[
'firstname'] =
$name[
'firstname'];
1979 $tmp_data[
'lastname'] =
$name[
'lastname'];
1981 $tmp_data[
'passed'] = $this->
object->members_obj->hasPassed($usr_id) ? 1 : 0;
1982 $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
1983 $tmp_data[
'blocked'] = $this->
object->members_obj->isBlocked($usr_id) ? 1 : 0;
1984 $tmp_data[
'usr_id'] =
$usr_id;
1986 if($this->show_tracking)
1988 if(in_array($usr_id,$completed))
1992 elseif(in_array($usr_id,$in_progress))
2006 if($privacy->enabledCourseAccessTimes())
2008 if(isset($progress[$usr_id][
'ts']) and $progress[
$usr_id][
'ts'])
2010 $tmp_data[
'access_ut'] = $progress[
$usr_id][
'ts'];
2015 $tmp_data[
'access_ut'] = 0;
2016 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
2019 $members[] = $tmp_data;
2021 return $members ? $members : array();
2036 include_once(
'./Modules/Course/classes/class.ilCourseParticipants.php');
2037 include_once(
'./Modules/Course/classes/class.ilCourseParticipantsTableGUI.php');
2038 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
2039 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
2042 if(isset(
$_GET[
'member_table_nav']))
2053 include_once(
'./Modules/Course/classes/class.ilCourseItems.php');
2058 $this->tabs_gui->setTabActive(
'members');
2059 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
2061 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_edit_members.html',
'Modules/Course');
2062 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
2067 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
2070 $ilToolbar->addInputItem($ul,
true);
2073 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
2080 $si->setOptions($options);
2081 $ilToolbar->addInputItem($si);
2084 $ilToolbar->addFormButton($lng->txt(
"add"),
"addAsMember");
2085 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2088 $ilToolbar->addSeparator();
2091 $ilToolbar->addButton($this->lng->txt(
"crs_search_users"),
2092 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
2095 $ilToolbar->addSeparator();
2098 $ilToolbar->addButton($this->lng->txt(
"crs_print_list"),
2099 $this->ctrl->getLinkTarget($this,
'printMembers'),
"_blank");
2105 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2107 if(count($wait = $waiting_list->getAllUsers()))
2109 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
2110 if($ilUser->getPref(
'crs_wait_hide'))
2113 $this->ctrl->setParameter($this,
'wait_hide',0);
2114 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2115 $this->lng->txt(
'show'),
2118 $this->ctrl->clearParameters($this);
2123 $this->ctrl->setParameter($this,
'wait_hide',1);
2124 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2125 $this->lng->txt(
'hide'),
2128 $this->ctrl->clearParameters($this);
2130 $table_gui->setUsers($wait);
2131 $table_gui->setTitle($this->lng->txt(
'crs_waiting_list'),
'icon_usr.gif',$this->lng->txt(
'crs_waiting_list'));
2132 $this->tpl->setVariable(
'TABLE_WAIT',$table_gui->getHTML());
2136 if(count($subscribers = $part->getSubscribers()))
2138 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
2139 if($ilUser->getPref(
'crs_subscriber_hide'))
2142 $this->ctrl->setParameter($this,
'subscriber_hide',0);
2143 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2144 $this->lng->txt(
'show'),
2147 $this->ctrl->clearParameters($this);
2152 $this->ctrl->setParameter($this,
'subscriber_hide',1);
2153 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2154 $this->lng->txt(
'hide'),
2157 $this->ctrl->clearParameters($this);
2159 $table_gui->setSubscribers($subscribers);
2160 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
2161 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
2166 if(count($part->getAdmins()))
2170 $showEditLink = $rbacsystem->checkAccess(
"edit_permission", $this->object->getRefId());
2171 if($ilUser->getPref(
'crs_admin_hide'))
2174 $this->ctrl->setParameter($this,
'admin_hide',0);
2175 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2176 $this->lng->txt(
'show'),
2179 $this->ctrl->clearParameters($this);
2184 $this->ctrl->setParameter($this,
'admin_hide',1);
2185 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2186 $this->lng->txt(
'hide'),
2189 $this->ctrl->clearParameters($this);
2191 $table_gui->setTitle($this->lng->txt(
'crs_administrators'),
'icon_usr.gif',$this->lng->txt(
'crs_administrators'));
2193 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
2195 if(count($part->getTutors()))
2197 if($ilUser->getPref(
'crs_tutor_hide'))
2200 $this->ctrl->setParameter($this,
'tutor_hide',0);
2201 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2202 $this->lng->txt(
'show'),
2205 $this->ctrl->clearParameters($this);
2210 $this->ctrl->setParameter($this,
'tutor_hide',1);
2211 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2212 $this->lng->txt(
'hide'),
2215 $this->ctrl->clearParameters($this);
2217 $table_gui->setTitle($this->lng->txt(
'crs_tutors'),
'icon_usr.gif',$this->lng->txt(
'crs_tutors'));
2219 $this->tpl->setVariable(
'TUTORS',$table_gui->getHTML());
2221 if(count($part->getMembers()))
2223 if($ilUser->getPref(
'crs_member_hide'))
2226 $this->ctrl->setParameter($this,
'member_hide',0);
2227 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2228 $this->lng->txt(
'show'),
2231 $this->ctrl->clearParameters($this);
2236 $this->ctrl->setParameter($this,
'member_hide',1);
2237 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
2238 $this->lng->txt(
'hide'),
2241 $this->ctrl->clearParameters($this);
2244 $table_gui->setTitle($this->lng->txt(
'crs_members'),
'icon_usr.gif',$this->lng->txt(
'crs_members'));
2246 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
2251 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'crs_selected_users'));
2252 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
2253 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
2254 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'crs_mem_send_mail'));
2264 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
2280 $visible_members = array_intersect(array_unique((array)
$_POST[
'visible_member_ids']),$this->object->members_obj->getAdmins());
2281 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
2282 $notification = is_array($_POST[
'notification']) ? $_POST[
'notification'] : array();
2298 $visible_members = array_intersect(array_unique((array)
$_POST[
'visible_member_ids']),$this->object->members_obj->getTutors());
2299 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
2300 $notification = is_array($_POST[
'notification']) ? $_POST[
'notification'] : array();
2316 $visible_members = array_intersect(array_unique((array)
$_POST[
'visible_member_ids']),$this->object->members_obj->getMembers());
2317 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
2318 $blocked = is_array($_POST[
'blocked']) ? $_POST[
'blocked'] : array();
2326 global $ilAccess,
$ilErr,$ilUser,$rbacadmin;
2328 foreach($visible_members as $member_id)
2330 $this->
object->members_obj->updatePassed($member_id,in_array($member_id,$passed));
2334 $this->
object->members_obj->updateNotification($member_id,in_array($member_id,$notification));
2335 $this->
object->members_obj->updateBlocked($member_id,
false);
2339 if($this->object->members_obj->isBlocked($member_id) and !in_array($member_id,$blocked))
2341 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_UNBLOCK_MEMBER,$member_id);
2343 if(!$this->object->members_obj->isBlocked($member_id) and in_array($member_id,$blocked))
2345 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_BLOCK_MEMBER,$member_id);
2347 $this->
object->members_obj->updateNotification($member_id,
false);
2348 $this->
object->members_obj->updateBlocked($member_id,in_array($member_id,$blocked));
2362 include_once
'./Modules/Course/classes/class.ilObjCourseGrouping.php';
2364 $this->
object->initCourseMemberObject();
2365 $this->
object->initWaitingList();
2366 if($this->object->waiting_list_obj->getCountUsers())
2369 $f_result = array();
2370 foreach($this->object->waiting_list_obj->getAllUsers() as $waiting_data)
2375 $waiting_list_ids[] = $waiting_data[
'usr_id'];
2379 $this->
object->getId()) as $course_data)
2382 if($course_data[
'id'] != $this->object->getId() and
2383 $tmp_members->isGroupingMember($tmp_obj->getId(),$course_data[
'unique']))
2385 $message .= (
'<br /><font class="alert">'.$this->lng->txt(
'crs_member_of').
' ');
2391 $f_result[$counter][] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname().$message;
2392 $f_result[$counter][] = $tmp_obj->getLogin();
2405 if(count($this->object->members_obj->getSubscribers()))
2408 $f_result = array();
2409 foreach($this->object->members_obj->getSubscribers() as $member_id)
2411 $member_data = $this->
object->members_obj->getSubscriberData($member_id);
2416 $subscriber_ids[$counter] = $member_id;
2419 $f_result[$counter][] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
2420 $f_result[$counter][] = $tmp_obj->getLogin();
2441 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
2457 $participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'tutors'],(array) $_POST[
'members']));
2459 if(!count($participants))
2467 $this->tabs_gui->setTabActive(
'members');
2468 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
2470 include_once(
'./Modules/Course/classes/class.ilCourseEditParticipantsTableGUI.php');
2472 $table_gui->setTitle($this->lng->txt(
'crs_header_edit_members'),
'icon_usr.gif',$this->lng->txt(
'crs_header_edit_members'));
2475 $this->tpl->setContent($table_gui->getHTML());
2488 global $rbacsystem, $rbacreview;
2492 if(!count(
$_POST[
'participants']))
2499 $notifications =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
2500 $passed =
$_POST[
'passed'] ?
$_POST[
'passed'] : array();
2501 $blocked =
$_POST[
'blocked'] ?
$_POST[
'blocked'] : array();
2504 $hasEditPermissionAccess = $rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId());
2508 $assignableLocalCourseRoles = array();
2509 $courseAdminRoleId = $this->
object->getDefaultAdminRole();
2510 foreach ($this->object->getLocalCourseRoles(
false) as
$title => $role_id)
2512 $assignableLocalCourseRoles[$role_id] =
$title;
2518 $memberIsCourseAdmin = $rbacreview->isAssigned($usr_id, $courseAdminRoleId);
2523 if (! $hasEditPermissionAccess && $memberIsCourseAdmin &&
2524 ! in_array($courseAdminRoleId,
$_POST[
'roles'][$usr_id])
2531 foreach ((array)
$_POST[
'roles'][$usr_id] as $role_id)
2533 if(!array_key_exists($role_id, $assignableLocalCourseRoles))
2539 if(!$hasEditPermissionAccess &&
2540 $role_id == $courseAdminRoleId &&
2541 !$memberIsCourseAdmin)
2553 if(!isset(
$_POST[
'roles'][$admin_id]))
2558 if(in_array($courseAdminRoleId,
$_POST[
'roles'][$admin_id]))
2568 $_POST[
'members'] = $_POST[
'participants'];
2573 foreach(
$_POST[
'participants'] as $usr_id)
2575 $this->
object->members_obj->updateRoleAssignments($usr_id,(array)
$_POST[
'roles'][$usr_id]);
2578 $this->
object->members_obj->updateNotification($usr_id,0);
2579 if(($this->object->members_obj->isTutor($usr_id) or $this->
object->members_obj->isAdmin($usr_id)) and in_array($usr_id,$notifications))
2581 $this->
object->members_obj->updateNotification($usr_id,1);
2584 $this->
object->members_obj->updateBlocked($usr_id,0);
2585 if((!$this->object->members_obj->isAdmin($usr_id) and !$this->
object->members_obj->isTutor($usr_id)) and in_array($usr_id,$blocked))
2587 $this->
object->members_obj->updateBlocked($usr_id,1);
2589 $this->
object->members_obj->updatePassed($usr_id,in_array($usr_id,$passed));
2590 $this->
object->members_obj->sendNotification(
2591 $this->object->members_obj->NOTIFY_STATUS_CHANGED,
2607 $this->
object->initCourseMemberObject();
2612 if(!isset(
$_GET[
"member_id"]) or !$this->object->members_obj->isAssigned((
int)
$_GET[
"member_id"]))
2614 $this->ilias->raiseError($this->lng->txt(
"crs_no_valid_member_id_given"),$this->ilias->error_obj->MESSAGE);
2619 $passed = $this->
object->members_obj->hasPassed((
int) $_GET[
'member_id']);
2620 $notify = $this->
object->members_obj->isNotificationEnabled((
int) $_GET[
'member_id']);
2621 $blocked = $this->
object->members_obj->isBlocked((
int) $_GET[
'member_id']);
2623 $this->
object->members_obj->updateRoleAssignments((
int) $_GET[
'member_id'],
$_POST[
'roles']);
2624 $this->
object->members_obj->updatePassed((
int) $_GET[
'member_id'],(
int)
$_POST[
'passed']);
2625 $this->
object->members_obj->updateNotification((
int) $_GET[
'member_id'],(
int) $_POST[
'notification']);
2626 $this->
object->members_obj->updateBlocked((
int) $_GET[
'member_id'],(
int) $_POST[
'blocked']);
2628 if($passed != $this->object->members_obj->hasPassed((
int) $_GET[
'member_id']) or
2629 $notify != $this->
object->members_obj->isNotificationEnabled((
int) $_GET[
'member_id']) or
2630 $blocked != $this->
object->members_obj->isBlocked((
int) $_GET[
'member_id']))
2632 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_STATUS_CHANGED,(
int) $_GET[
'member_id']);
2646 if(!strlen(trim(
$_POST[
'user_login'])))
2652 $users = explode(
',',
$_POST[
'user_login']);
2654 foreach($users as
$user)
2676 if(!is_array(
$_POST[
"user"]))
2681 $this->
object->initCourseMemberObject();
2684 foreach(
$_POST[
"user"] as $user_id)
2690 if($this->object->members_obj->isAssigned($user_id))
2694 switch(
$_POST[
'member_type'])
2700 $this->
object->members_obj->add($user_id,
IL_CRS_TUTOR);
2703 $this->
object->members_obj->add($user_id,
IL_CRS_ADMIN);
2707 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_USER,$user_id);
2715 unset(
$_SESSION[
'crs_usr_search_result']);
2718 $this->ctrl->redirect($this,
'members');
2730 if(!count(
$_POST[
"waiting"]))
2737 $this->
object->initCourseMemberObject();
2739 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2743 foreach(
$_POST[
"waiting"] as $user_id)
2749 if($this->object->members_obj->isAssigned($user_id))
2754 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_USER,$user_id);
2786 if(!count(
$_POST[
'waiting']))
2793 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
2796 foreach(
$_POST[
"waiting"] as $user_id)
2799 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_SUBSCRIBER,$user_id);
2820 if(!is_array(
$_SESSION[
"crs_delete_waiting_list_ids"]))
2828 $this->
object->initWaitingList();
2831 $this->
object->waiting_list_obj->removeFromList($usr_id);
2842 global $rbacsystem,
$ilErr;
2847 if(!is_array(
$_POST[
"subscribers"]))
2854 $this->
object->initCourseMemberObject();
2856 if(!$this->object->members_obj->assignSubscribers(
$_POST[
"subscribers"]))
2866 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_SUBSCRIBER,$usr_id);
2880 $this->
object->initCourseMemberObject();
2882 if($this->object->isSubscriptionMembershipLimited() and $this->
object->getSubscriptionMaxMembers() and
2883 $this->
object->getSubscriptionMaxMembers() <= $this->
object->members_obj->getCountMembers())
2890 if($number = $this->object->members_obj->autoFillSubscribers())
2908 $this->tabs_gui->setTabActive(
'members');
2918 if(!is_array(
$_POST[
"subscriber"]) or !count(
$_POST[
"subscriber"]))
2928 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_editMembers.html",
'Modules/Course');
2929 $this->
object->initCourseMemberObject();
2935 $f_result = array();
2937 foreach(
$_POST[
"subscriber"] as $member_id)
2939 $member_data = $this->
object->members_obj->getSubscriberData($member_id);
2944 $f_result[$counter][] = $tmp_obj->getLogin();
2945 $f_result[$counter][] = $tmp_obj->getFirstname();
2946 $f_result[$counter][] = $tmp_obj->getLastname();
2960 $this->tabs_gui->setTabActive(
'members');
2970 if(!is_array(
$_POST[
"waiting_list"]) or !count(
$_POST[
"waiting_list"]))
2980 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_editMembers.html",
'Modules/Course');
2981 $this->
object->initCourseMemberObject();
2982 $this->
object->initWaitingList();
2988 $f_result = array();
2990 foreach(
$_POST[
"waiting_list"] as $wait_id)
2992 $user_data =& $this->
object->waiting_list_obj->getUser($wait_id);
2996 $f_result[$counter][] = $tmp_obj->getLogin();
2997 $f_result[$counter][] = $tmp_obj->getFirstname();
2998 $f_result[$counter][] = $tmp_obj->getLastname();
2999 #$f_result[$counter][] = strftime("%Y-%m-%d %R",$user_data["time"]);
3015 if($this->object->members_obj->isLastAdmin($ilUser->getId()))
3023 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
3025 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_unsubscribe_sure.html",
'Modules/Course');
3028 $this->tpl->setVariable(
"UNSUB_FORMACTION",$this->ctrl->getFormAction($this));
3029 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
"cancel"));
3030 $this->tpl->setVariable(
"CMD_SUBMIT",
'performUnsubscribe');
3031 $this->tpl->setVariable(
"TXT_SUBMIT",$this->lng->txt(
"crs_unsubscribe"));
3039 global $rbacsystem,$ilAccess;
3050 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
3051 #$this->setSubTabs('members');
3054 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_unsubscribe_sure.html",
'Modules/Course');
3057 $this->tpl->setVariable(
"UNSUB_FORMACTION",$this->ctrl->getFormAction($this));
3058 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
"cancel"));
3059 $this->tpl->setVariable(
"CMD_SUBMIT",
'performUnsubscribe');
3060 $this->tpl->setVariable(
"TXT_SUBMIT",$this->lng->txt(
"crs_unsubscribe"));
3067 global $rbacsystem,$ilUser;
3071 $this->
object->initCourseMemberObject();
3072 $this->
object->members_obj->delete($this->ilias->account->getId());
3073 $this->
object->members_obj->sendUnsubscribeNotificationToAdmins($this->ilias->account->getId());
3074 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_UNSUBSCRIBE,$ilUser->getId());
3078 ilUtil::redirect(
"repository.php?ref_id=".$this->tree->getParentId($this->ref_id));
3086 $this->tabs_gui->setTabActive(
'members');
3087 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
3089 $participants = array_merge((array)
$_POST[
'admins'],(array) $_POST[
'tutors'], (array) $_POST[
'members']);
3099 $this->
object->initCourseMemberObject();
3100 if(!$this->object->members_obj->checkLastAdmin($participants))
3108 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
3110 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
3111 $confirm->setHeaderText($this->lng->txt(
'crs_header_delete_members'));
3112 $confirm->setConfirm($this->lng->txt(
'confirm'),
'removeMembers');
3113 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
3117 $confirm->addItem(
'participants[]',
3118 $participant[
'usr_id'],
3119 $participant[
'lastname'].
', '.$participant[
'firstname'].
' ['.$participant[
'login'].
']',
3123 $this->tpl->setContent($confirm->getHTML());
3129 global $rbacreview, $rbacsystem;
3133 if(!is_array(
$_POST[
"participants"]) or !count(
$_POST[
"participants"]))
3140 $this->
object->initCourseMemberObject();
3144 if (! $rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId()))
3147 $courseAdminRoleId = null;
3148 foreach ($this->object->getLocalCourseRoles(
false) as
$title => $role_id)
3150 if (substr($title, 0, 12) ==
'il_crs_admin')
3152 $courseAdminRoleId = $role_id;
3158 if ($rbacreview->isAssigned($usr_id, $courseAdminRoleId))
3167 if(!$this->object->members_obj->deleteParticipants(
$_POST[
"participants"]))
3179 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_MEMBER,$usr_id);
3194 if(!
$_POST[
'subscribers'])
3201 $this->
object->initCourseMemberObject();
3203 if(!$this->object->members_obj->deleteSubscribers(
$_POST[
"subscribers"]))
3213 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_SUBSCRIBER,$usr_id);
3227 global $rbacsystem,$ilAccess,$ilUser,
$lng;
3229 $this->
object->initCourseMemberObject();
3231 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
3233 if($ilAccess->checkAccess(
'read',
'',$this->ref_id))
3235 $tabs_gui->addTab(
'view_content', $lng->txt(
"content"),
3236 $this->ctrl->getLinkTarget($this,
''));
3238 if ($ilAccess->checkAccess(
'visible',
'',$this->ref_id))
3245 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilinfoscreengui"
3246 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
3249 $tabs_gui->addTarget(
"info_short",
3250 $this->ctrl->getLinkTargetByClass(
3251 array(
"ilobjcoursegui",
"ilinfoscreengui"),
"showSummary"),
3253 "",
"", $force_active);
3255 if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3257 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilconditionhandlerinterface"
3258 &&
$_GET[
"item_id"] ==
"")
3261 $tabs_gui->addTarget(
"settings",
3262 $this->ctrl->getLinkTarget($this,
"edit"),
3263 array(
"edit",
"editMapSettings",
"editCourseIcons",
"listStructure"),
"",
"", $force_active);
3267 if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3269 $tabs_gui->addTarget(
"meta_data",
3270 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'ilmdeditorgui'),
'listSection'),
3276 if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3278 $tabs_gui->addTarget(
"members",
3279 $this->ctrl->getLinkTarget($this,
"members"),
3283 elseif ($ilAccess->checkAccess(
'read',
'',$this->ref_id) &&
3284 $this->
object->getShowMembers() == $this->
object->SHOW_MEMBERS_ENABLED &&
3285 $ilUser->getId() != ANONYMOUS_USER_ID)
3287 $tabs_gui->addTarget(
"members",
3288 $this->ctrl->getLinkTarget($this,
"membersGallery"),
3295 if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
3297 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
3300 $force_active = (strtolower(
$_GET[
"cmdClass"]) ==
"ilcourseobjectivesgui")
3303 $tabs_gui->addTarget(
"crs_objectives",
3304 $this->ctrl->getLinkTarget($this,
"listObjectives"),
3306 get_class($this),
"", $force_active);
3312 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
3315 $tabs_gui->addTarget(
'learning_progress',
3316 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
3318 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
3322 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
3323 if ($ilAccess->checkAccess(
'edit_permission',
'', $this->ref_id)
3326 $tabs_gui->addTarget(
"licenses",
3327 $this->ctrl->getLinkTargetByClass(
'illicenseoverviewgui',
''),
3328 "",
"illicenseoverviewgui");
3331 if ($ilAccess->checkAccess(
'edit_permission',
'',$this->ref_id))
3333 $tabs_gui->addTarget(
"perm_settings",
3334 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
3335 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
3338 if ($this->ctrl->getTargetScript() ==
"adm_object.php")
3340 $tabs_gui->addTarget(
"show_owner",
3341 $this->ctrl->getLinkTarget($this,
"owner"),
"owner", get_class($this));
3343 if ($this->tree->getSavedNodeData($this->ref_id))
3345 $tabs_gui->addTarget(
"trash",
3346 $this->ctrl->getLinkTarget($this,
"trash"),
"trash", get_class($this));
3350 if($rbacsystem->checkAccess(
'join',$this->ref_id)
3351 and !$this->
object->members_obj->isAssigned($ilUser->getId()))
3353 include_once
'./Modules/Course/classes/class.ilCourseWaitingList.php';
3358 $this->lng->txt(
'membership_leave'),
3359 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
3366 $tabs_gui->addTarget(
"join",
3367 $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
"show"),
3372 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId())
3373 and $this->object->members_obj->isMember($ilUser->getId()))
3375 $tabs_gui->addTarget(
"crs_unsubscribe",
3376 $this->ctrl->getLinkTarget($this,
"unsubscribe"),
3385 foreach($a_members as $member_id)
3388 $member_data = $this->
object->members_obj->getSubscriberData($member_id);
3392 $print_member[$member_id][
'login'] = $tmp_obj->getLogin();
3393 $print_member[$member_id][
'name'] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
3415 global $ilAccess,
$lng;
3417 $lng->loadLanguageModule(
'trac');
3419 #$is_admin = (bool) $ilAccess->checkAccess("write",'',$this->object->getRefId());
3422 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3425 if($privacy->enabledCourseAccessTimes())
3427 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
3431 if($this->show_tracking)
3433 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
3440 foreach($a_members as $member_id)
3445 $print_member[$member_id][
'login'] = $tmp_obj->getLogin();
3446 $print_member[$member_id][
'name'] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
3448 if($this->object->members_obj->isAdmin($member_id))
3450 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_admin");
3452 elseif($this->object->members_obj->isTutor($member_id))
3454 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_tutor");
3456 elseif($this->object->members_obj->isMember($member_id))
3458 $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_member");
3460 if($this->object->members_obj->isAdmin($member_id) or $this->
object->members_obj->isTutor($member_id))
3462 if($this->object->members_obj->isNotificationEnabled($member_id))
3464 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_notify");
3468 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_no_notify");
3473 if($this->object->members_obj->isBlocked($member_id))
3475 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_blocked");
3479 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_unblocked");
3485 $print_member[$member_id][
'passed'] = $this->
object->members_obj->hasPassed($member_id) ?
3486 $this->lng->txt(
'crs_member_passed') :
3487 $this->lng->txt(
'crs_member_not_passed');
3490 if($privacy->enabledCourseAccessTimes())
3492 if(isset($progress[$member_id][
'ts']) and $progress[$member_id][
'ts'])
3498 $print_member[$member_id][
'access'] = $this->lng->txt(
'no_date');
3501 if($this->show_tracking)
3503 if(in_array($member_id,$completed))
3507 elseif(in_array($member_id,$in_progress))
3542 case 'notification':
3558 $tpl =
new ilTemplate(
'tpl.crs_members_print.html',
true,
true,
'Modules/Course');
3560 $this->
object->initCourseMemberObject();
3562 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3564 if($privacy->enabledCourseAccessTimes())
3566 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
3570 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
3571 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
3578 if(count($members = $this->object->members_obj->getParticipants()))
3581 foreach($members as $member_data)
3583 if($this->show_tracking)
3585 $tpl->setCurrentBlock(
'progress_row');
3586 $tpl->setVariable(
'VAL_PROGRESS',$member_data[
'progress']);
3587 $tpl->parseCurrentBlock();
3590 if($privacy->enabledCourseAccessTimes())
3592 $tpl->setCurrentBlock(
'access_row');
3593 $tpl->setVariable(
'VAL_ACCESS',$member_data[
'access']);
3594 $tpl->parseCurrentBlock();
3596 $tpl->setCurrentBlock(
"members_row");
3597 $tpl->setVariable(
"LOGIN",$member_data[
'login']);
3598 $tpl->setVariable(
"NAME",$member_data[
'name']);
3599 $tpl->setVariable(
"ROLE",$member_data[
'role']);
3600 $tpl->setVariable(
"STATUS",$member_data[
'status']);
3601 $tpl->setVariable(
"PASSED",$member_data[
'passed']);
3605 $tpl->setVariable(
"STATUS",$member_data[
'status']);
3606 $tpl->setVariable(
"PASSED",$member_data[
'passed']);
3608 $tpl->parseCurrentBlock();
3611 $tpl->setCurrentBlock(
"members");
3613 $tpl->setVariable(
"MEMBERS_IMG_ALT",$this->lng->txt(
'crs_header_members'));
3614 $tpl->setVariable(
"MEMBERS_TABLE_HEADER",$this->lng->txt(
'crs_members_table'));
3615 $tpl->setVariable(
"TXT_LOGIN",$this->lng->txt(
'username'));
3616 $tpl->setVariable(
"TXT_NAME",$this->lng->txt(
'name'));
3617 $tpl->setVariable(
"TXT_ROLE",$this->lng->txt(
'crs_role'));
3619 if($this->show_tracking)
3621 $tpl->setCurrentBlock(
'progress');
3622 $tpl->setVariable(
'TXT_PROGRESS',$this->lng->txt(
'learning_progress'));
3623 $tpl->parseCurrentBlock();
3626 if($privacy->enabledCourseAccessTimes())
3628 $tpl->setCurrentBlock(
'access');
3629 $tpl->setVariable(
'TXT_ACCESS',$this->lng->txt(
'last_access'));
3630 $tpl->parseCurrentBlock();
3636 $tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'crs_status'));
3637 $tpl->setVariable(
"TXT_PASSED",$this->lng->txt(
'crs_passed'));
3640 $tpl->parseCurrentBlock();
3644 if(count($members = $this->object->members_obj->getSubscribers()))
3647 foreach($members as $member_data)
3649 $tpl->setCurrentBlock(
"subscribers_row");
3650 $tpl->setVariable(
"SLOGIN",$member_data[
'login']);
3651 $tpl->setVariable(
"SNAME",$member_data[
'name']);
3652 $tpl->setVariable(
"STIME",$member_data[
"time"]);
3653 $tpl->parseCurrentBlock();
3656 $tpl->setCurrentBlock(
"subscribers");
3658 $tpl->setVariable(
"SUBSCRIBERS_IMG_ALT",$this->lng->txt(
'crs_subscribers'));
3659 $tpl->setVariable(
"SUBSCRIBERS_TABLE_HEADER",$this->lng->txt(
'crs_subscribers'));
3660 $tpl->setVariable(
"TXT_SLOGIN",$this->lng->txt(
'username'));
3661 $tpl->setVariable(
"TXT_SNAME",$this->lng->txt(
'name'));
3662 $tpl->setVariable(
"TXT_STIME",$this->lng->txt(
'crs_time'));
3663 $tpl->parseCurrentBlock();
3667 $tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
3670 $headline = $this->lng->txt(
'obj_crs').
': '.$this->
object->getTitle().
3673 $tpl->setVariable(
"HEADLINE",$headline);
3686 global $rbacsystem,
$ilErr, $ilAccess, $ilUser;
3688 $is_admin = (bool) $ilAccess->checkAccess(
"write",
"", $this->object->getRefId());
3691 $this->object->getShowMembers() == $this->
object->SHOW_MEMBERS_DISABLED)
3693 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
3697 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
3700 $this->tabs_gui->setTabActive(
'members');
3701 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
3703 $this->
object->initCourseMemberObject();
3706 if(count($members = $this->object->members_obj->getParticipants()))
3708 $ordered_members = array();
3710 foreach($members as $member_id)
3720 array_push($ordered_members,array(
"id" => $member_id,
3721 "login" => $usr_obj->getLogin(),
3722 "lastname" => $usr_obj->getLastName(),
3723 "firstname" => $usr_obj->getFirstName(),
3724 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
3725 "usr_obj" => $usr_obj));
3730 foreach($ordered_members as $member)
3732 $usr_obj = $member[
"usr_obj"];
3734 $public_profile = in_array($usr_obj->getPref(
"public_profile"), array(
"y",
"g")) ?
"y" :
"";
3737 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
3738 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
3741 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
3743 if($this->object->members_obj->isAdmin($member[
"id"]) or $this->
object->members_obj->isTutor($member[
"id"]))
3745 if ($public_profile ==
"y")
3747 $this->tpl->setCurrentBlock(
"tutor_linked");
3748 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
3749 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3750 $this->tpl->parseCurrentBlock();
3754 $this->tpl->setCurrentBlock(
"tutor_not_linked");
3755 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3756 $this->tpl->parseCurrentBlock();
3758 $this->tpl->setCurrentBlock(
"tutor");
3762 if ($public_profile ==
"y")
3764 $this->tpl->setCurrentBlock(
"member_linked");
3765 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
3766 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3767 $this->tpl->parseCurrentBlock();
3771 $this->tpl->setCurrentBlock(
"member_not_linked");
3772 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
3773 $this->tpl->parseCurrentBlock();
3775 $this->tpl->setCurrentBlock(
"member");
3779 if ($public_profile ==
"y")
3781 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
3782 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
3784 $this->tpl->setVariable(
"LOGIN", $member[
"login"]);
3785 $this->tpl->parseCurrentBlock();
3788 $this->tpl->setCurrentBlock(
"members");
3789 $this->tpl->setVariable(
"MEMBERS_TABLE_HEADER",$this->lng->txt(
'crs_members_title'));
3790 $this->tpl->parseCurrentBlock();
3794 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
3797 $headline = $this->
object->getTitle().
"<br/>".$this->
object->getDescription();
3799 $this->tpl->setVariable(
"HEADLINE",$headline);
3808 include_once
"./Services/Table/classes/class.ilTableGUI.php";
3819 $offset =
$_GET[
"update_members"] ?
$_GET[
"offset"] : 0;
3820 $order =
$_GET[
"update_members"] ?
$_GET[
"sort_by"] :
'login';
3821 $direction =
$_GET[
"update_members"] ?
$_GET[
"sort_order"] :
'';
3825 $offset =
$_GET[
"update_subscribers"] ?
$_GET[
"offset"] : 0;
3826 $order =
$_GET[
"update_subscribers"] ?
$_GET[
"sort_by"] :
'sub_time';
3827 $direction =
$_GET[
"update_subscribers"] ?
$_GET[
"sort_order"] :
'';
3831 $offset =
$_GET[
"offset"];
3832 $order =
$_GET[
"sort_by"] ?
$_GET[
"sort_by"] :
"title";
3833 $direction =
$_GET[
"sort_order"];
3837 $offset =
$_GET[
"offset"];
3838 $order =
$_GET[
"sort_by"] ?
$_GET[
"sort_by"] :
"title";
3839 $direction =
$_GET[
"sort_order"];
3843 $offset =
$_GET[
"offset"];
3845 if (
$_GET[
"sort_by"] ==
"title" or empty(
$_GET[
"sort_by"]))
3847 $_GET[
"sort_by"] =
"login";
3849 $order =
$_GET[
"sort_by"];
3850 $direction =
$_GET[
"sort_order"];
3854 $tbl->setOrderColumn($order);
3855 $tbl->setOrderDirection($direction);
3856 $tbl->setOffset($offset);
3857 $tbl->setLimit(
$_GET[
"limit"]);
3858 $tbl->setMaxCount(count($result_set));
3859 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
3860 $tbl->setData($result_set);
3867 $tpl =& $tbl->getTemplateObject();
3869 $tpl->setCurrentBlock(
"tbl_form_header");
3870 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
3871 $tpl->parseCurrentBlock();
3872 $tpl->setCurrentBlock(
"tbl_action_btn");
3873 $tpl->setVariable(
"BTN_NAME",
"cancelMember");
3874 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"cancel"));
3875 $tpl->parseCurrentBlock();
3876 $tpl->setCurrentBlock(
"tbl_action_btn");
3877 $tpl->setVariable(
"BTN_NAME",
"performRemoveFromWaitingList");
3878 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
3879 $tpl->parseCurrentBlock();
3880 $tpl->setCurrentBlock(
"tbl_action_row");
3881 $tpl->setVariable(
"COLUMN_COUNTS",4);
3883 $tpl->parseCurrentBlock();
3885 $tbl->setTitle($this->lng->txt(
"crs_header_remove_from_waiting_list"),
"icon_usr_b.gif",
3886 $this->lng->txt(
"crs_header_remove_from_waiting_list"));
3887 $tbl->setHeaderNames(array($this->lng->txt(
"username"),
3888 $this->lng->txt(
"firstname"),
3889 $this->lng->txt(
"lastname"),
3890 $this->lng->txt(
"crs_time")));
3891 $tbl->setHeaderVars(array(
"login",
3895 array(
"ref_id" => $this->object->getRefId(),
3897 "cmdClass" =>
"ilobjcoursegui",
3898 "cmdNode" =>
$_GET[
"cmdNode"]));
3900 $tbl->setColumnWidth(array(
"25%",
"25%",
"25%",
"25%"));
3905 $this->tpl->setVariable(
"EDIT_MEMBER_TABLE",$tbl->tpl->get());
3913 $tpl =& $tbl->getTemplateObject();
3915 $tpl->setCurrentBlock(
"tbl_form_header");
3916 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
3917 $tpl->parseCurrentBlock();
3918 $tpl->setCurrentBlock(
"tbl_action_btn");
3919 $tpl->setVariable(
"BTN_NAME",
"removeSubscribers");
3920 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
3921 $tpl->parseCurrentBlock();
3922 $tpl->setCurrentBlock(
"tbl_action_btn");
3923 $tpl->setVariable(
"BTN_NAME",
"cancelMember");
3924 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"cancel"));
3925 $tpl->parseCurrentBlock();
3926 $tpl->setCurrentBlock(
"tbl_action_row");
3927 $tpl->setVariable(
"COLUMN_COUNTS",4);
3929 $tpl->parseCurrentBlock();
3931 $tbl->setTitle($this->lng->txt(
"crs_header_delete_subscribers"),
"icon_usr_b.gif",$this->lng->txt(
"crs_header_delete_members"));
3932 $tbl->setHeaderNames(array($this->lng->txt(
"username"),
3933 $this->lng->txt(
"firstname"),
3934 $this->lng->txt(
"lastname"),
3935 $this->lng->txt(
"crs_time")));
3936 $tbl->setHeaderVars(array(
"login",
3940 array(
"ref_id" => $this->object->getRefId(),
3942 "cmdClass" =>
"ilobjcoursegui",
3943 "cmdNode" =>
$_GET[
"cmdNode"]));
3945 $tbl->setColumnWidth(array(
"25%",
"25%",
"25%",
"25%"));
3950 $this->tpl->setVariable(
"EDIT_MEMBER_TABLE",$tbl->tpl->get());
3959 $actions = array(
"addSubscribers" => $this->lng->txt(
"crs_add_subscribers"),
3960 "deleteSubscribers" => $this->lng->txt(
"crs_delete_subscribers"));
3963 $tpl =& $tbl->getTemplateObject();
3966 $tpl->setCurrentBlock(
"tbl_action_row");
3969 $tpl->setCurrentBlock(
"plain_button");
3970 $tpl->setVariable(
"PBTN_NAME",
"autoFill");
3971 $tpl->setVariable(
"PBTN_VALUE",$this->lng->txt(
"crs_auto_fill"));
3972 $tpl->parseCurrentBlock();
3973 $tpl->setCurrentBlock(
"plain_buttons");
3974 $tpl->parseCurrentBlock();
3976 $tpl->setVariable(
"COLUMN_COUNTS",4);
3980 $tpl->setCurrentBlock(
"tbl_action_select");
3982 $tpl->setVariable(
"BTN_NAME",
"gateway");
3983 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"execute"));
3984 $tpl->parseCurrentBlock();
3986 $tbl->enable(
'select_all');
3987 $tbl->setFormName(
"subscriber_form");
3988 $tbl->setSelectAllCheckbox(
"subscriber");
3990 $tpl->setCurrentBlock(
"tbl_action_row");
3991 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
3992 $tpl->parseCurrentBlock();
3995 $tbl->setTitle($this->lng->txt(
"crs_subscribers"),
"icon_usr.gif",$this->lng->txt(
"crs_header_members"));
3996 $tbl->setHeaderNames(array(
'',
3997 $this->lng->txt(
"name"),
3998 $this->lng->txt(
"login"),
3999 $this->lng->txt(
"crs_time")));
4000 $tbl->setHeaderVars(array(
"",
4004 array(
"ref_id" => $this->object->getRefId(),
4006 "update_subscribers" => 1,
4007 "cmdClass" =>
"ilobjcoursegui",
4008 "cmdNode" =>
$_GET[
"cmdNode"]));
4009 $tbl->setColumnWidth(array(
'1%'));
4014 $this->tpl->setCurrentBlock(
'sub_wait_table');
4015 $this->tpl->setVariable(
'SUB_WAIT_NAME',
'subscriber_form');
4016 $this->tpl->setVariable(
'SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
4017 $this->tpl->setVariable(
"SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
4018 $this->tpl->parseCurrentBlock();
4024 $actions = array(
"addFromWaitingList" => $this->lng->txt(
"crs_add_subscribers"),
4025 "removeFromWaitingList" => $this->lng->txt(
"crs_delete_from_waiting_list"));
4028 $tpl =& $tbl->getTemplateObject();
4030 $tbl->enable(
'select_all');
4031 $tbl->setFormName(
"wait_form");
4032 $tbl->setSelectAllCheckbox(
"waiting_list");
4036 $tpl->setCurrentBlock(
"tbl_action_row");
4038 $tpl->setVariable(
"COLUMN_COUNTS",5);
4042 $tpl->setCurrentBlock(
"tbl_action_select");
4044 $tpl->setVariable(
"BTN_NAME",
"gateway");
4045 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"execute"));
4046 $tpl->parseCurrentBlock();
4048 $tpl->setCurrentBlock(
"tbl_action_row");
4049 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
4050 $tpl->parseCurrentBlock();
4053 $tbl->setTitle($this->lng->txt(
"crs_waiting_list"),
"icon_usr.gif",$this->lng->txt(
"crs_waiting_list"));
4054 $tbl->setHeaderNames(array(
'',
4055 $this->lng->txt(
"name"),
4056 $this->lng->txt(
"login"),
4057 $this->lng->txt(
"crs_time")));
4058 $tbl->setHeaderVars(array(
"",
4062 array(
"ref_id" => $this->object->getRefId(),
4064 "update_subscribers" => 1,
4065 "cmdClass" =>
"ilobjcoursegui",
4066 "cmdNode" =>
$_GET[
"cmdNode"]));
4067 $tbl->setColumnWidth(array(
'1%'));
4072 $this->tpl->setCurrentBlock(
'sub_wait_table');
4073 $this->tpl->setVariable(
'SUB_WAIT_NAME',
'wait_form');
4074 $this->tpl->setVariable(
'SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
4075 $this->tpl->setVariable(
"SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
4076 $this->tpl->parseCurrentBlock();
4088 for($i=0;$i<=60;$i++)
4090 $days[$i] = $i < 10 ?
"0".$i : $i;
4095 for($i=0;$i<24;$i++)
4097 $days[$i] = $i < 10 ?
"0".$i : $i;
4102 for($i=1;$i<32;$i++)
4104 $days[$i] = $i < 10 ?
"0".$i : $i;
4109 for($i=1;$i<13;$i++)
4111 $month[$i] = $i < 10 ?
"0".$i : $i;
4116 for($i = date(
"Y",time());$i < date(
"Y",time()) + 3;++$i)
4126 return mktime($a_time_arr[
"hour"],
4127 $a_time_arr[
"minute"],
4128 $a_time_arr[
"second"],
4129 $a_time_arr[
"month"],
4131 $a_time_arr[
"year"]);
4135 unset(
$_SESSION[
"crs_delete_member_ids"]);
4136 unset(
$_SESSION[
"crs_delete_subscriber_ids"]);
4146 global $rbacreview,
$ilErr, $ilAccess, $ilObjDataCache;
4147 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
4150 $is_admin = (bool) $ilAccess->checkAccess(
"write",
"", $this->object->getRefId());
4153 $this->object->getShowMembers() == $this->
object->SHOW_MEMBERS_DISABLED)
4155 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
4159 $this->tabs_gui->setTabActive(
'members');
4160 $this->tabs_gui->setSubTabActive(
'mail_members');
4163 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
4166 $this->tpl->setVariable(
"MAILACTION",
'ilias.php?baseClass=ilmailgui&type=role');
4167 $this->tpl->setVariable(
"SELECT_ACTION",
'ilias.php?baseClass=ilmailgui&view=my_courses&search_crs='.$this->object->getId());
4168 $this->tpl->setVariable(
"MAIL_SELECTED",$this->lng->txt(
'send_mail_selected'));
4169 $this->tpl->setVariable(
"MAIL_MEMBERS",$this->lng->txt(
'send_mail_members'));
4170 $this->tpl->setVariable(
"MAIL_TUTOR",$this->lng->txt(
'send_mail_tutors'));
4171 $this->tpl->setVariable(
"MAIL_ADMIN",$this->lng->txt(
'send_mail_admins'));
4173 $this->tpl->setVariable(
"OK",$this->lng->txt(
'ok'));
4176 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
4177 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
4180 $sorted_role_ids = array();
4182 foreach($role_ids as $role_id)
4187 $sorted_role_ids[2] = $role_id;
4191 $sorted_role_ids[1] = $role_id;
4195 $sorted_role_ids[0] = $role_id;
4199 $sorted_role_ids[$counter++] = $role_id;
4203 ksort($sorted_role_ids,SORT_NUMERIC);
4204 foreach ((array) $sorted_role_ids as $role_id)
4206 $this->tpl->setCurrentBlock(
"mailbox_row");
4207 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
4209 htmlspecialchars($role_addr)
4214 $this->tpl->setVariable(
"MAILBOX",$role_addr);
4219 $this->tpl->setVariable(
"MAILBOX",
ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id)).
" (" . $role_addr .
")");
4222 $this->tpl->parseCurrentBlock();
4228 global $rbacsystem,$ilUser,$ilAccess,
$ilErr,$ilTabs,$ilNavigationHistory,
$ilCtrl;
4230 $next_class = $this->ctrl->getNextClass($this);
4231 $cmd = $this->ctrl->getCmd();
4237 $ilAccess->checkAccess(
'read',
'',
$_GET[
'ref_id']))
4239 $ilNavigationHistory->addItem(
$_GET[
'ref_id'],
4240 'repository.php?cmd=frameset&ref_id='.
$_GET[
'ref_id'],
'crs');
4245 include_once
'payment/classes/class.ilPaymentObject.php';
4249 $ilTabs->setTabActive(
'info_short');
4251 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
4252 $this->ctrl->setReturn($this,
'');
4254 $this->ctrl->forwardCommand($pp_gui);
4261 case "ilinfoscreengui":
4265 case 'ilmdeditorgui':
4266 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
4268 $md_gui =&
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
4269 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
4271 $this->ctrl->forwardCommand($md_gui);
4272 $this->tabs_gui->setTabActive(
'meta_data');
4275 case 'ilcourseregistrationgui':
4276 $this->ctrl->setReturn($this,
'');
4277 $this->tabs_gui->setTabActive(
'join');
4278 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
4280 $this->ctrl->forwardCommand($registration);
4283 case 'ilcourseuserfieldsgui':
4284 include_once
'Modules/Course/classes/Export/class.ilCourseUserFieldsGUI.php';
4288 $this->tabs_gui->setTabActive(
'settings');
4289 $this->ctrl->forwardCommand($cdf_gui);
4292 case "ilcourseobjectivesgui":
4293 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
4295 $this->ctrl->setReturn($this,
"");
4297 $ret =& $this->ctrl->forwardCommand($reg_gui);
4300 case 'ilobjcoursegroupinggui':
4301 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
4303 $this->ctrl->setReturn($this,
'edit');
4306 $this->ctrl->forwardCommand($crs_grp_gui);
4307 $this->tabs_gui->setTabActive(
'settings');
4308 $this->tabs_gui->setSubTabActive(
'groupings');
4312 $this->tabs_gui->setTabActive(
'none');
4322 case "ilconditionhandlerinterface":
4323 include_once
'./classes/class.ilConditionHandlerInterface.php';
4326 if($_GET[
'item_id'])
4328 $this->ctrl->saveParameter($this,
'item_id',$_GET[
'item_id']);
4329 $this->tabs_gui->setTabActive(
'content');
4333 $this->ctrl->forwardCommand($new_gui);
4338 $this->tabs_gui->setTabActive(
'settings');
4341 $this->ctrl->forwardCommand($new_gui);
4345 case "illearningprogressgui":
4346 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
4349 $this->object->getRefId(),
4350 $_GET[
'user_id'] ? $_GET[
'user_id'] : $ilUser->getId());
4351 $this->ctrl->forwardCommand($new_gui);
4352 $this->tabs_gui->setTabActive(
'learning_progress');
4355 case 'illicenseoverviewgui':
4356 include_once(
"./Services/License/classes/class.ilLicenseOverviewGUI.php");
4358 $ret =& $this->ctrl->forwardCommand($license_gui);
4359 $this->tabs_gui->setTabActive(
'licenses');
4362 case 'ilpermissiongui':
4363 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
4364 $this->tabs_gui->setTabActive(
'perm_settings');
4366 $ret =& $this->ctrl->forwardCommand($perm_gui);
4369 case 'ilrepositorysearchgui':
4370 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
4372 $rep_search->setCallback($this,
4373 'assignMembersObject',
4384 $this->ctrl->setReturn($this,
'members');
4385 $ret =& $this->ctrl->forwardCommand($rep_search);
4387 $this->tabs_gui->setTabActive(
'members');
4388 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
4391 case 'ilcoursecontentinterface':
4393 $this->initCourseContentInterface();
4394 $this->cci_obj->cci_setContainer($this);
4396 $this->ctrl->forwardCommand($this->cci_obj);
4398 $this->tabs_gui->setTabActive(
'content');
4401 case 'ilcoursecontentgui':
4402 $this->ctrl->setReturn($this,
'members');
4403 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
4405 $this->ctrl->forwardCommand($course_content_obj);
4408 case 'ilpublicuserprofilegui':
4409 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
4411 $html = $this->ctrl->forwardCommand($profile_gui);
4413 $this->tabs_gui->setTabActive(
'members');
4414 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
4415 $this->tpl->setVariable(
"ADM_CONTENT", $html);
4418 case 'ilmemberexportgui':
4419 include_once(
'./Modules/Course/classes/Export/class.ilMemberExportGUI.php');
4422 $this->tabs_gui->setTabActive(
'members');
4423 $this->tabs_gui->setSubTabActive(
'export_members');
4425 $this->ctrl->forwardCommand($export);
4428 case 'ilcourseagreementgui':
4432 case 'ilsessionoverviewgui':
4433 include_once(
'./Modules/Session/classes/class.ilSessionOverviewGUI.php');
4436 $this->tabs_gui->setTabActive(
'members');
4437 $this->tabs_gui->setSubTabActive(
'events');
4439 $this->ctrl->forwardCommand($overview);
4442 case 'ilcourseitemadministrationgui':
4443 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
4444 $this->tabs_gui->clearSubTabs();
4445 $this->ctrl->setReturn($this,
'view');
4447 $this->ctrl->forwardCommand($item_adm_gui);
4451 case "ilpageobjectgui":
4455 $this->tpl->setContent($ret);
4459 case 'ilobjectcopygui':
4460 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
4462 $cp->setType(
'crs');
4463 $this->ctrl->forwardCommand($cp);
4466 case "ilobjstylesheetgui":
4471 if(!$this->creation_mode)
4481 if( !$this->creation_mode
4482 &&
$cmd !=
'infoScreen'
4483 &&
$cmd !=
'sendfile'
4484 &&
$cmd !=
'unsubscribe'
4485 &&
$cmd !=
'performUnsubscribe'
4486 && !$ilAccess->checkAccess(
"read",
'',$this->object->getRefId())
4488 ||
$cmd ==
'subscribe')
4490 include_once
'./Modules/Course/classes/class.ilCourseParticipants.php';
4491 if($rbacsystem->checkAccess(
'join',$this->object->getRefId()) &&
4494 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
4495 $this->ctrl->redirectByClass(
"ilCourseRegistrationGUI");
4504 if(
$cmd ==
'listObjectives')
4506 include_once
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
4508 $this->ctrl->setReturn($this,
"");
4510 $ret =& $this->ctrl->forwardCommand($obj_gui);
4514 if((!$this->creation_mode)&&(!$rbacsystem->checkAccess(
"write",$this->object->getRefId())))
4516 $this->ctrl->setReturn($this,
'view');
4517 include_once(
'Services/Feedback/classes/class.ilFeedbackGUI.php');
4519 $feedbackGUI->handleRequiredFeedback($this->object->getRefId());
4549 global $ilUser,$ilAccess;
4551 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
4557 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
4562 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
4568 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
4569 include_once(
'Modules/Course/classes/class.ilCourseAgreement.php');
4579 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
4599 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
4603 $buffer = $lic_set->get(
"license_warning");
4605 include_once(
"./Services/License/classes/class.ilLicense.php");
4607 foreach ($licensed_items as $item)
4609 $license =&
new ilLicense($item[
'obj_id']);
4610 $remaining = $license->getRemainingLicenses();
4611 if ($remaining <= $buffer)
4613 $lng->loadlanguageModule(
"license");
4614 ilUtil::sendInfo(sprintf($this->lng->txt(
"course_licenses_rare"), $remaining), $a_keep);
4629 include_once(
'Modules/Course/classes/class.ilCourseAgreementGUI.php');
4630 $this->ctrl->setReturn($this,
'');
4632 $this->ctrl->forwardCommand($agreement);
4638 return array(
"ilCourseRegisterGUI",
'ilConditionHandlerInterface');
4644 $this->initCourseContentInterface();
4645 $this->cci_obj->cci_setContainer($this);
4646 $this->cci_obj->cci_objectives();
4652 $this->tabs_gui->setTabActive(
'edit_content');
4654 $this->initCourseContentInterface();
4655 $this->cci_obj->cci_setContainer($this);
4656 $this->cci_obj->cci_view();
4662 $this->initCourseContentInterface();
4663 $this->cci_obj->cci_setContainer($this);
4664 $this->cci_obj->cci_objectives_ask_reset();
4672 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
4675 $tmp_obj_res->
reset($this->object->getId());
4679 $this->initCourseContentInterface();
4680 $this->cci_obj->cci_setContainer($this);
4681 $this->cci_obj->cci_objectives();
4688 include_once
'./classes/class.ilConditionHandlerInterface.php';
4690 if(!is_object($this->chi_obj))
4692 if(
$_GET[
'item_id'])
4695 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
4709 switch ($this->ctrl->getCmd())
4712 #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
4724 if ($ilAccess->checkAccess(
"read",
"", $a_target))
4726 $_GET[
"cmd"] =
"frameset";
4727 $_GET[
"ref_id"] = $a_target;
4728 include(
"repository.php");
4734 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
4736 $_GET[
"cmd"] =
"infoScreen";
4737 $_GET[
"ref_id"] = $a_target;
4738 include(
"repository.php");
4743 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
4745 $_GET[
"cmd"] =
"frameset";
4746 $_GET[
"target"] =
"";
4747 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
4750 include(
"repository.php");
4755 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
4761 return mktime($time[
'h'],$time[
'm'],0,$date[
'm'],$date[
'd'],$date[
'y']);
4766 return array(
'y' => date(
'Y',$a_unix_time),
4767 'm' => date(
'n',$a_unix_time),
4768 'd' => date(
'd',$a_unix_time));
4773 return array(
'h' => date(
'G',$a_unix_time),
4774 'm' => date(
'i',$a_unix_time),
4775 's' => date(
's',$a_unix_time));
4785 global $ilUser,
$ilCtrl, $ilUser, $ilAccess;
4788 $this->tabs_gui->setTabActive(
'settings');
4791 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
4796 $latitude = $this->
object->getLatitude();
4797 $longitude = $this->
object->getLongitude();
4798 $zoom = $this->
object->getLocationZoom();
4801 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
4804 $latitude = $def[
"latitude"];
4805 $longitude = $def[
"longitude"];
4806 $zoom = $def[
"zoom"];
4812 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
4814 $form->setFormAction($ilCtrl->getFormAction($this));
4816 $form->setTitle($this->lng->txt(
"crs_map_settings"));
4822 $public->setChecked($this->object->getEnableCourseMap());
4823 $form->addItem($public);
4829 $loc_prop->setLongitude($longitude);
4830 $loc_prop->setZoom($zoom);
4831 $form->addItem($loc_prop);
4833 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
4835 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
4847 $this->
object->update();
4849 $ilCtrl->redirect($this,
"editMapSettings");
4859 $this->tabs_gui->setTabActive(
"members");
4861 $this->tabs_gui->setSubTabActive(
"crs_members_map");
4863 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
4869 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
4871 $map->setMapId(
"course_map");
4872 $map->setWidth(
"700px");
4873 $map->setHeight(
"500px");
4874 $map->setLatitude($this->object->getLatitude());
4875 $map->setLongitude($this->object->getLongitude());
4876 $map->setZoom($this->object->getLocationZoom());
4877 $map->setEnableTypeControl(
true);
4878 $map->setEnableNavigationControl(
true);
4879 $map->setEnableCentralMarker(
true);
4882 $this->
object->initCourseMemberObject();
4883 if(count($members = $this->object->members_obj->getParticipants()))
4885 foreach($members as $user_id)
4887 $map->addUserMarker($user_id);
4891 $tpl->setContent(
$map->getHTML());
4892 $tpl->setLeftContent(
$map->getUserListHTML());
4901 $this->object->getAboStatus(), $this->
object->getRefId(), $this->
object->getId());
4907 static function _modifyItemGUI($a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path,
4908 $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id = 0)
4913 if ($a_parent_ref_id == 0)
4915 $a_parent_ref_id = $a_course_ref_id;
4919 if($a_item_data[
'type'] ==
'tst' and
4922 $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));
4927 if(isset($a_item_data[
'timing_type']))
4929 switch($a_item_data[
'timing_type'])
4949 $a_item_list_gui->enableSubscribe($a_abo_status);
4952 if ($activation !=
"")
4954 $a_item_list_gui->addCustomProperty($lng->txt($a_item_data[
'activation_info']), $activation,
4958 $is_tutor = ($ilAccess->checkAccess(
'write',
'',
4959 $a_course_ref_id,
'crs', $a_course_obj_id));
4961 if($a_show_path and $is_tutor)
4963 $a_item_list_gui->addCustomProperty($lng->txt(
'path'),
4972 $ilCtrl->setParameterByClass(
'ilcourseitemadministrationgui',
"ref_id",
4974 $ilCtrl->setParameterByClass(
'ilcourseitemadministrationgui',
"item_id",
4975 $a_item_data[
'child']);
4976 $a_item_list_gui->addCustomCommand($ilCtrl->getLinkTargetByClass(
4977 array(strtolower($a_cmd_class),
'ilCourseItemAdministrationGUI'),
4990 if ($this->object->getType() !=
'crs')
4994 if (!$ilAccess->checkAccess(
'write',
'',
4995 $this->object->getRefId(),
'crs',$this->
object->getId()))
4999 if($this->object->enabledObjectiveView())
5013 if(!
$_SESSION[
'crs_timings_panel'][$this->object->getId()] or 1)
5017 $this->tabs_gui->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"view"));
5021 $this->tabs_gui->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui",
"disableAdministrationPanel"));
5024 include_once
'Modules/Course/classes/class.ilCourseItems.php';
5027 $this->tabs_gui->addSubTabTarget(
'timings_timings',
5028 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editUserTimings'));
5035 $this->tabs_gui->addSubTabTarget(
'crs_archives',
5036 $this->ctrl->getLinkTargetByClass(
5037 array(
'ilcoursecontentgui',
'ilcoursearchivesgui'),
'view'));
5054 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
5056 $dt[
'year'] = (int)
$_POST[$a_field][
'date'][
'y'];
5057 $dt[
'mon'] = (int)
$_POST[$a_field][
'date'][
'm'];
5058 $dt[
'mday'] = (int)
$_POST[$a_field][
'date'][
'd'];
5059 $dt[
'hours'] = (int)
$_POST[$a_field][
'time'][
'h'];
5060 $dt[
'minutes'] = (int)
$_POST[$a_field][
'time'][
'm'];
5061 $dt[
'seconds'] = (int)
$_POST[$a_field][
'time'][
's'];
5076 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_objectives_ask_reset.html",
'Modules/Course');
5078 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
5079 $this->tpl->setVariable(
"INFO_STRING",$this->lng->txt(
'crs_objectives_reset_sure'));
5080 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
5081 $this->tpl->setVariable(
"TXT_RESET",$this->lng->txt(
'reset'));
5090 include_once
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
5093 $tmp_obj_res->
reset($this->object->getId());
5095 $ilUser->deletePref(
'crs_objectives_force_details_'.$this->object->getId());
5103 include_once
'./Modules/Course/classes/class.ilCourseStart.php';
5105 global $ilAccess,$ilUser;
5107 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
5111 $this->start_obj =
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
5112 if(count($this->start_obj->getStartObjects()) and !$this->start_obj->allFullfilled($ilUser->getId()))
5121 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
5122 include_once
'./Services/Repository/classes/class.ilRepositoryExplorer.php';
5123 include_once
'./classes/class.ilLink.php';
5125 global $rbacsystem,
$ilias,$ilUser,$ilAccess,$ilObjDataCache;
5127 $this->tabs_gui->setSubTabActive(
'view');
5129 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.crs_start_view.html",
'Modules/Course');
5130 $this->tpl->setVariable(
"INFO_STRING",$this->lng->txt(
'crs_info_start'));
5131 $this->tpl->setVariable(
"TBL_TITLE_START",$this->lng->txt(
'crs_table_start_objects'));
5132 $this->tpl->setVariable(
"HEADER_NR",$this->lng->txt(
'crs_nr'));
5133 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
5134 $this->tpl->setVariable(
"HEADER_EDITED",$this->lng->txt(
'crs_objective_accomplished'));
5137 $lm_continue =&
new ilCourseLMHistory($this->object->getRefId(),$ilUser->getId());
5141 foreach($this->start_obj->getStartObjects() as
$start)
5143 $obj_id = $ilObjDataCache->lookupObjId(
$start[
'item_ref_id']);
5151 $obj_frame = $obj_frame ? $obj_frame :
'';
5154 $obj_frame =
$type ==
'tst' ?
'' : $obj_frame;
5156 $contentObj =
false;
5158 if($ilAccess->checkAccess(
'read',
'',
$ref_id))
5160 $this->tpl->setCurrentBlock(
"start_read");
5161 $this->tpl->setVariable(
"READ_TITLE_START",$ilObjDataCache->lookupTitle(
$obj_id));
5162 $this->tpl->setVariable(
"READ_TARGET_START",$obj_frame);
5163 $this->tpl->setVariable(
"READ_LINK_START", $obj_link.
'&crs_show_result='.$this->object->getRefId());
5164 $this->tpl->parseCurrentBlock();
5168 $this->tpl->setCurrentBlock(
"start_visible");
5169 $this->tpl->setVariable(
"VISIBLE_LINK_START",$ilObjDataCache->lookupTitle(
$obj_id));
5170 $this->tpl->parseCurrentBlock();
5174 if(isset($continue_data[
$ref_id]))
5176 $this->tpl->setCurrentBlock(
"link");
5177 $this->tpl->setVariable(
"LINK_HREF",
ilLink::_getLink($ref_id,
'',array(
'obj_id',
5178 $continue_data[$ref_id][
'lm_page_id'])));
5179 #$this->tpl->setVariable("CONTINUE_LINK_TARGET",$target);
5180 $this->tpl->setVariable(
"LINK_NAME",$this->lng->txt(
'continue_work'));
5181 $this->tpl->parseCurrentBlock();
5185 if(!$ilUser->isDesktopItem($ref_id,
$type) and
5186 $this->
object->getAboStatus())
5188 if ($ilAccess->checkAccess(
'read',
'',$ref_id))
5190 $this->tpl->setCurrentBlock(
"link");
5191 $this->ctrl->setParameterByClass(get_class($this),
'item_ref_id',$ref_id);
5192 $this->ctrl->setParameterByClass(get_class($this),
'item_id',$ref_id);
5193 $this->ctrl->setParameterByClass(get_class($this),
'type',
$type);
5195 $this->tpl->setVariable(
"LINK_HREF",$this->ctrl->getLinkTarget($this,
'addToDesk'));
5196 $this->tpl->setVariable(
"LINK_NAME", $this->lng->txt(
"to_desktop"));
5197 $this->tpl->parseCurrentBlock();
5200 elseif($this->object->getAboStatus())
5202 $this->tpl->setCurrentBlock(
"link");
5203 $this->ctrl->setParameterByClass(get_class($this),
'item_ref_id',$ref_id);
5204 $this->ctrl->setParameterByClass(get_class($this),
'item_id',$ref_id);
5205 $this->ctrl->setParameterByClass(get_class($this),
'type',
$type);
5207 $this->tpl->setVariable(
"LINK_HREF",$this->ctrl->getLinkTarget($this,
'removeFromDesk'));
5208 $this->tpl->setVariable(
"LINK_NAME", $this->lng->txt(
"unsubscribe"));
5209 $this->tpl->parseCurrentBlock();
5214 if(strlen($ilObjDataCache->lookupDescription(
$obj_id)))
5216 $this->tpl->setCurrentBlock(
"start_description");
5217 $this->tpl->setVariable(
"DESCRIPTION_START",$ilObjDataCache->lookupDescription(
$obj_id));
5218 $this->tpl->parseCurrentBlock();
5222 if($this->start_obj->isFullfilled($ilUser->getId(),
$ref_id))
5224 $accomplished =
'accomplished';
5228 $accomplished =
'not_accomplished';
5230 $this->tpl->setCurrentBlock(
"start_row");
5232 $this->tpl->setVariable(
"EDITED_ALT",$this->lng->txt(
'crs_objective_'.$accomplished));
5233 $this->tpl->setVariable(
"ROW_CLASS",
'option_value');
5234 $this->tpl->setVariable(
"ROW_CLASS_CENTER",
'option_value_center');
5235 $this->tpl->setVariable(
"OBJ_NR_START",++$counter.
'.');
5236 $this->tpl->parseCurrentBlock();
5250 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
5252 if($settings->isActive() and $settings->getContainer() != $this->
object->getRefId())
5254 $settings->setContainer($this->object->getRefId());
5255 $rbacsystem->initMemberView();