5require_once 
"./Services/Container/classes/class.ilContainerGUI.php";
 
   41                $this->ctrl->saveParameter($this,array(
"ref_id",
"cmdClass"));
 
   44                parent::__construct(
'',(
int) 
$_GET[
'ref_id'],
true,
false);
 
   46                $this->lng->loadLanguageModule(
'crs');
 
   48                $this->SEARCH_USER = 1;
 
   49                $this->SEARCH_GROUP = 2;
 
   50                $this->SEARCH_COURSE = 3;
 
   58                        case "deleteSubscribers":
 
   59                                $this->deleteSubscribers();
 
   62                        case "addSubscribers":
 
   63                                $this->addSubscribers();
 
   66                        case "addFromWaitingList":
 
   67                                $this->addFromWaitingList();
 
   70                        case "removeFromWaitingList":
 
   71                                $this->removeFromWaitingList();
 
   90                include_once 
'./Modules/Course/classes/class.ilCourseParticipants.php';
 
   93                $part->updateNotification(
$ilUser->getId(), 
$ilSetting->get(
'mail_crs_admin_notification', 
true));
 
   95                parent::afterImport($a_new_object);
 
  100                $this->ctrl->setCmd(
"view");
 
  118                                include_once 
'./Modules/Course/classes/class.ilCourseContentGUI.php';
 
  120                                $this->ctrl->setCmdClass(get_class($course_content_obj));
 
  121                                $this->ctrl->setCmd(
'editUserTimings');
 
  122                                $this->ctrl->forwardCommand($course_content_obj);
 
  135                $this->tabs_gui->setTabActive(
'view_content');
 
  145                if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui")
 
  147                        parent::viewObject();
 
  152                include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
 
  156                if (
$ilCtrl->getNextClass() != 
"ilcolumngui")
 
  158                        include_once 
'Services/Tracking/classes/class.ilLearningProgress.php';
 
  160                                $this->object->getRefId(),
'crs');
 
  165                        include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
 
  166                        $this->tabs_gui->clearTargets();
 
  167                        $this->ctrl->setReturn($this,
'view_content');
 
  169                        $this->ctrl->setCmdClass(get_class($agreement));
 
  170                        $this->ctrl->forwardCommand($agreement);
 
  176                        include_once 
"Services/Container/classes/class.ilContainerStartObjectsContentGUI.php";
 
  178                        $stgui->enableDesktop($this->object->getAboStatus(), $this);
 
  179                        return $stgui->getHTML();
 
  190                        $ret = parent::renderObject();
 
  195                        include_once 
'./Modules/Course/classes/class.ilCourseContentGUI.php';
 
  198                        $this->ctrl->setCmdClass(get_class($course_content_obj));
 
  199                        $this->ctrl->forwardCommand($course_content_obj);
 
  207                return parent::renderObject();
 
  217                $this->ctrl->setCmd(
"showSummary");
 
  218                $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
  231                include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
 
  234                $this->tabs_gui->setTabActive(
'info_short');
 
  236                include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
  237                include_once 
'Modules/Course/classes/class.ilCourseFile.php';
 
  242                $info->enablePrivateNotes();
 
  243                $info->enableFeedback();
 
  245                if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]))
 
  247                        $info->enableNewsEditing();
 
  250                if(strlen($this->object->getImportantInformation()) or
 
  251                   strlen($this->object->getSyllabus()) or
 
  254                        $info->addSection($this->lng->txt(
'crs_general_informations'));
 
  257                if(strlen($this->object->getImportantInformation()))
 
  259                        $info->addProperty($this->lng->txt(
'crs_important_info'),
 
  263                if(strlen($this->object->getSyllabus()))
 
  265                        $info->addProperty($this->lng->txt(
'crs_syllabus'), nl2br(
 
  271                        $tpl = 
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'Modules/Course');
 
  275                                $tpl->setCurrentBlock(
"files");
 
  276                                $this->ctrl->setParameter($this,
'file_id',
$file->getFileId());
 
  277                                $tpl->setVariable(
"DOWN_LINK",$this->ctrl->getLinkTarget($this,
'sendfile'));
 
  278                                $tpl->setVariable(
"DOWN_NAME",
$file->getFileName());
 
  279                                $tpl->setVariable(
"DOWN_INFO_TXT",$this->lng->txt(
'crs_file_size_info'));
 
  280                                $tpl->setVariable(
"DOWN_SIZE",
$file->getFileSize());
 
  281                                $tpl->setVariable(
"TXT_BYTES",$this->lng->txt(
'bytes'));
 
  282                                $tpl->parseCurrentBlock();
 
  284                        $info->addProperty($this->lng->txt(
'crs_file_download'),
 
  288                include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  290                $record_gui->setInfoObject(
$info);
 
  291                $record_gui->parse();
 
  294                $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
 
  297                if($this->object->hasContactData())
 
  299                        $info->addSection($this->lng->txt(
"crs_contact"));
 
  301                if(strlen($this->object->getContactName()))
 
  303                        $info->addProperty($this->lng->txt(
"crs_contact_name"),
 
  304                                                           $this->object->getContactName());
 
  306                if(strlen($this->object->getContactResponsibility()))
 
  308                        $info->addProperty($this->lng->txt(
"crs_contact_responsibility"),
 
  309                                                           $this->object->getContactResponsibility());
 
  311                if(strlen($this->object->getContactPhone()))
 
  313                        $info->addProperty($this->lng->txt(
"crs_contact_phone"),
 
  314                                                           $this->object->getContactPhone());
 
  316                if($this->object->getContactEmail())
 
  318                        include_once 
'./Modules/Course/classes/class.ilCourseMailTemplateMemberContext.php';
 
  319            require_once 
'Services/Mail/classes/class.ilMailFormCall.php';
 
  321                        $emails = explode(
",",$this->object->getContactEmail());
 
  322                        foreach ($emails as $email) {
 
  323                                $email = trim($email);
 
  324                                $etpl = 
new ilTemplate(
"tpl.crs_contact_email.html", 
true, 
true , 
'Modules/Course');
 
  328                                                $info, 
'showSummary', array(),
 
  336                                                        'ref_id' => $this->object->getRefId(),
 
  341                                $etpl->setVariable(
"CONTACT_EMAIL", $email);                            
 
  342                                $mailString .= $etpl->get().
"<br />";
 
  344                        $info->addProperty($this->lng->txt(
"crs_contact_email"), $mailString);
 
  346                if(strlen($this->object->getContactConsultation()))
 
  348                        $info->addProperty($this->lng->txt(
"crs_contact_consultation"),
 
  349                                                           nl2br($this->object->getContactConsultation()));
 
  355                $conts = $parts->getContacts();
 
  356                if (count($conts) > 0)
 
  358                        $info->addSection($this->lng->txt(
"crs_mem_contacts"));
 
  359                        foreach ($conts as $c)
 
  361                                include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
 
  363                                $pgui->setBackUrl($this->ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
 
  364                                $pgui->setEmbedded(
true);
 
  365                                $info->addProperty(
"", $pgui->getHTML());
 
  376                $this->lng->loadLanguageModule(
"rep");
 
  377                $info->addSection($this->lng->txt(
"rep_activation_availability"));
 
  378                $info->showLDAPRoleGroupMappingInfo();
 
  381                if($this->object->getActivationUnlimitedStatus())
 
  383                        $info->addProperty($this->lng->txt(
"rep_activation_access"),
 
  384                                $this->lng->txt(
'crs_visibility_limitless'));
 
  388                        $info->addProperty($this->lng->txt(
'rep_activation_access'),
 
  394                switch($this->object->getSubscriptionLimitationType())
 
  397                                $txt = $this->lng->txt(
"crs_info_reg_deactivated");
 
  401                                switch($this->object->getSubscriptionType())
 
  404                                                $txt = $this->lng->txt(
"crs_info_reg_confirmation");
 
  407                                                $txt = $this->lng->txt(
"crs_info_reg_direct");
 
  410                                                $txt = $this->lng->txt(
"crs_info_reg_password");
 
  416                $info->addProperty($this->lng->txt(
"crs_info_reg"),
$txt);
 
  421                        if($this->object->getSubscriptionUnlimitedStatus())
 
  423                                $info->addProperty($this->lng->txt(
"crs_reg_until"),
 
  424                                                                   $this->lng->txt(
'crs_unlimited'));
 
  426                        elseif($this->object->getSubscriptionStart() < time())
 
  428                                $info->addProperty($this->lng->txt(
"crs_reg_until"),
 
  429                                                                   $this->lng->txt(
'crs_to').
' '.
 
  432                        elseif($this->object->getSubscriptionStart() > time())
 
  434                                $info->addProperty($this->lng->txt(
"crs_reg_until"),
 
  435                                                                   $this->lng->txt(
'crs_from').
' '.
 
  438                        if ($this->object->isSubscriptionMembershipLimited()) 
 
  440                                if($this->object->getSubscriptionMinMembers())
 
  443                                                $this->lng->txt(
"mem_min_users"),
 
  444                                                $this->object->getSubscriptionMinMembers()
 
  447                                if($this->object->getSubscriptionMaxMembers())
 
  449                                        include_once 
'./Modules/Course/classes/class.ilObjCourseAccess.php';
 
  453                                                $this->lng->txt(
'mem_free_places'),
 
  454                                                $reg_info[
'reg_info_free_places']
 
  460                if($this->object->getCancellationEnd())
 
  462                        $info->addProperty($this->lng->txt(
'crs_cancellation_end'),
 
  466                if($this->object->getCourseStart())
 
  468                        $info->addProperty($this->lng->txt(
'crs_period'),
 
  470                                        $this->object->getCourseStart(),
 
  471                                        $this->object->getCourseEnd()
 
  476                include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
  479                include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
 
  482                        include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
 
  486                        $this->lng->loadLanguageModule(
'ps');
 
  487                        $info->addSection($this->lng->txt(
'crs_user_agreement_info'));
 
  488                        $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
 
  492                                $info->addProperty($this->lng->txt(
'ps_crs_user_fields'),$fields);
 
  496                $info->enableLearningProgress(
true);
 
  499                $this->ctrl->forwardCommand(
$info);
 
  507                include_once 
"Services/Membership/classes/class.ilMembershipNotifications.php";
 
  509                if($noti->canCurrentUserEdit())
 
  511                        if((
bool)$_REQUEST[
"crs_ntf"])
 
  513                                $noti->activateUser();
 
  517                                $noti->deactivateUser();
 
  521                $this->ctrl->redirect($this, 
"");
 
  532                include_once 
'Modules/Course/classes/class.ilCourseFile.php';
 
  544                $this->tabs_gui->setTabActive(
'settings');
 
  545                $this->tabs_gui->setSubTabActive(
'crs_info_settings');
 
  551                $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'Modules/Course');
 
  552                $this->tpl->setVariable(
'INFO_TABLE',$a_form->getHTML());
 
  561                        $table_data[
'id'] = 
$file->getFileId();
 
  562                        $table_data[
'filename'] = 
$file->getFileName();
 
  563                        $table_data[
'filetype'] = 
$file->getFileType();
 
  564                        $table_data[
'filesize'] = 
$file->getFileSize();
 
  566                        $rows[] = $table_data; 
 
  569                include_once(
"./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
 
  571                $table_gui->setTitle($this->lng->txt(
"crs_info_download"));
 
  572                $table_gui->setData($rows);
 
  573                $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
  574                $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->lng->txt(
"delete"));
 
  575                $table_gui->setSelectAllCheckbox(
"file_id");
 
  576                $this->tpl->setVariable(
'INFO_FILE_TABLE',$table_gui->getHTML());
 
  591                if(!count(
$_POST[
'file_id']))
 
  599                $this->tabs_gui->setTabActive(
'settings');
 
  600                $this->tabs_gui->setSubTabActive(
'crs_info_settings');
 
  602                include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  606                $c_gui->setFormAction($this->ctrl->getFormAction($this, 
"deleteInfoFiles"));
 
  607                $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
  608                $c_gui->setCancel($this->lng->txt(
"cancel"), 
"editInfo");
 
  609                $c_gui->setConfirm($this->lng->txt(
"confirm"), 
"deleteInfoFiles");
 
  612                include_once(
'Modules/Course/classes/class.ilCourseFile.php');
 
  613                foreach(
$_POST[
"file_id"] as $file_id)
 
  616                        $c_gui->addItem(
"file_id[]", $file_id, 
$file->getFileName());
 
  619                $this->tpl->setContent($c_gui->getHTML());
 
  630                if(!count(
$_POST[
'file_id']))
 
  636                include_once(
'Modules/Course/classes/class.ilCourseFile.php');
 
  638                foreach(
$_POST[
'file_id'] as $file_id)
 
  641                        if($this->object->getId() == 
$file->getCourseId())
 
  660                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  662                $form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
 
  663                $form->setMultipart(
true);
 
  664                $form->setTitle($this->lng->txt(
'crs_general_info'));
 
  665                $form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
 
  666                $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
 
  669                $area->setValue($this->object->getImportantInformation());
 
  672                $form->addItem($area);
 
  675                $area->setValue($this->object->getSyllabus());
 
  678                $form->addItem($area);
 
  681                $section->setTitle($this->lng->txt(
'crs_info_download'));
 
  685                $file->enableFileNameSelection(
'file_name');
 
  686                $form->addItem(
$file);
 
  689                $section->setTitle($this->lng->txt(
'crs_contact'));
 
  693                $text->setValue($this->object->getContactName());
 
  695                $text->setMaxLength(70);
 
  696                $form->addItem(
$text);
 
  698                $text = 
new ilTextInputGUI($this->lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
 
  699                $text->setValue($this->object->getContactResponsibility());
 
  701                $text->setMaxLength(70);
 
  702                $form->addItem(
$text);
 
  705                $text->setValue($this->object->getContactPhone());
 
  707                $text->setMaxLength(40);
 
  708                $form->addItem(
$text);
 
  711                $text->setValue($this->object->getContactEmail());
 
  712                $text->setInfo($this->lng->txt(
'crs_contact_email_info'));
 
  714                $text->setMaxLength(255);
 
  715                $form->addItem(
$text);
 
  717                $area = 
new ilTextAreaInputGUI($this->lng->txt(
'crs_contact_consultation'),
'contact_consultation');
 
  718                $area->setValue($this->object->getContactConsultation());
 
  721                $form->addItem($area);
 
  723                include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  725                $this->record_gui->setPropertyForm($form);
 
  726                $this->record_gui->parse();
 
  737                include_once 
'Modules/Course/classes/class.ilCourseFile.php';
 
  739                $file_obj->setCourseId($this->object->getId());
 
  740                $file_obj->setFileName(strlen(
$_POST[
'file_name']) ?
 
  742                                                           $_FILES[
'file'][
'name']);
 
  743                $file_obj->setFileSize($_FILES[
'file'][
'size']);
 
  744                $file_obj->setFileType($_FILES[
'file'][
'type']);
 
  745                $file_obj->setTemporaryName($_FILES[
'file'][
'tmp_name']);
 
  746                $file_obj->setErrorCode($_FILES[
'file'][
'error']);
 
  760                $ilErr->setMessage(
'');
 
  762                $file_obj->validate();
 
  763                $this->
object->validateInfoSettings();
 
  764                if(strlen(
$ilErr->getMessage()))
 
  772                if(!$this->record_gui->importEditFormPostValues())
 
  787                $this->
object->update();
 
  789                $this->record_gui->writeEditForm();
 
  793                include_once 
'Modules/Course/classes/class.ilECSCourseSettings.php';
 
  795                $ecs->handleContentUpdate();
 
  812                if(!$form->checkInput())
 
  814                        $form->setValuesByPost();
 
  822                $this->
object->setTitle($form->getInput(
'title'));
 
  823                $this->
object->setDescription($form->getInput(
'desc'));
 
  826                $crs_period = $form->getItemByPostVar(
"period");
 
  827                $this->
object->setCourseStart($crs_period->getStart());
 
  828                $this->
object->setCourseEnd($crs_period->getEnd());
 
  831                $this->
object->setOfflineStatus((
bool) !$form->getInput(
'activation_online'));
 
  834                $period = $form->getItemByPostVar(
"access_period");
 
  835                if($period->getStart() && $period->getEnd())
 
  838                        $this->
object->setActivationStart($period->getStart()->get(
IL_CAL_UNIX));
 
  839                        $this->
object->setActivationEnd($period->getEnd()->get(
IL_CAL_UNIX));
 
  840                        $this->
object->setActivationVisibility((
int) $form->getInput(
'activation_visibility'));
 
  845                        $this->
object->setActivationStart(
null);
 
  846                        $this->
object->setActivationEnd(
null);                  
 
  850                $this->
object->setSubscriptionPassword($form->getInput(
'subscription_password'));
 
  851                $this->
object->setSubscriptionStart(
null);
 
  852                $this->
object->setSubscriptionEnd(
null);
 
  854                $sub_type = $form->getInput(
'subscription_type');
 
  855                $sub_period = $form->getItemByPostVar(
'subscription_period');
 
  857                $this->
object->setSubscriptionType($sub_type);
 
  860                        if($sub_period->getStart() && $sub_period->getEnd())
 
  863                                $this->
object->setSubscriptionStart($sub_period->getStart()->get(
IL_CAL_UNIX));
 
  864                                $this->
object->setSubscriptionEnd($sub_period->getEnd()->get(
IL_CAL_UNIX));
 
  878                $this->
object->enableRegistrationAccessCode((
int) $form->getInput(
'reg_code_enabled'));
 
  879                $this->
object->setRegistrationAccessCode($form->getInput(
'reg_code'));
 
  882                $this->
object->setCancellationEnd($form->getItemByPostVar(
"cancel_end")->getDate());    
 
  885                $this->
object->enableSubscriptionMembershipLimitation((
int) $form->getInput(
'subscription_membership_limitation'));
 
  886                $this->
object->setSubscriptionMaxMembers((
int) $form->getInput(
'subscription_max'));            
 
  887                $this->
object->setSubscriptionMinMembers((
int) $form->getInput(
'subscription_min'));
 
  888                $old_autofill = $this->
object->hasWaitingListAutoFill();
 
  889                switch((
int) $form->getInput(
'waiting_list'))
 
  892                                $this->
object->enableWaitingList(
true);
 
  893                                $this->
object->setWaitingListAutoFill(
true);
 
  897                                $this->
object->enableWaitingList(
true);
 
  898                                $this->
object->setWaitingListAutoFill(
false);
 
  902                                $this->
object->enableWaitingList(
false);
 
  903                                $this->
object->setWaitingListAutoFill(
false);
 
  908                $this->
object->setViewMode((
int) $form->getInput(
'view_mode'));
 
  915                        $this->
object->setOrderType($form->getInput(
'sorting'));
 
  919                $this->
object->setAboStatus((
int) $form->getInput(
'abo'));
 
  920                $this->
object->setShowMembers((
int) $form->getInput(
'show_members'));
 
  921                $this->
object->setMailToMembersType((
int) $form->getInput(
'mail_type'));
 
  923                $this->
object->enableSessionLimit((
int) $form->getInput(
'sl'));
 
  925                $session_sp = $form->getInput(
'sp');
 
  926                $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1 );
 
  927                $session_sn = $form->getInput(
'sn');
 
  928                $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1 );
 
  929                $this->
object->setAutoNotification($form->getInput(
'auto_notification') == 1 ? 
true : 
false);
 
  932                $show_lp_sync_confirmation = 
false;
 
  935                if(isset(
$_POST[
'status_dt']))
 
  942                                $show_lp_sync_confirmation = 
true;
 
  946                                $this->
object->setStatusDetermination((
int) $form->getInput(
'status_dt'));
 
  950                if(!$old_autofill && $this->object->hasWaitingListAutoFill())
 
  952                        $this->
object->handleAutoFill();
 
  954                $this->
object->update();
 
  957                include_once 
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
 
  959                        $this->object->getId(),
 
  971                require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
  977                if($show_lp_sync_confirmation)
 
  983                include_once 
'Modules/Course/classes/class.ilECSCourseSettings.php';    
 
  985                if(!$ecs->handleSettingsUpdate())
 
  987                        $form->setValuesByPost();
 
  999                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 1001                $cgui->setFormAction($this->ctrl->getFormAction($this, 
"setLPSync"));
 
 1002                $cgui->setHeaderText($this->lng->txt(
"crs_status_determination_sync"));
 
 1003                $cgui->setCancel($this->lng->txt(
"cancel"), 
"edit");
 
 1004                $cgui->setConfirm($this->lng->txt(
"confirm"), 
"setLPSync");
 
 1006                $tpl->setContent($cgui->getHTML());
 
 1012                $this->
object->update();
 
 1014                $this->
object->syncMembersStatusWithLP();
 
 1017                $this->ctrl->redirect($this, 
"edit");
 
 1029                $this->tabs_gui->setSubTabActive(
'crs_settings');
 
 1033                        $GLOBALS[
'tpl']->setContent($form->getHTML());
 
 1038                        parent::editObject();
 
 1051                include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
 
 1052                include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
 
 1055                $form->setTitle($this->lng->txt(
'crs_edit'));
 
 1057                $form->addCommandButton(
'update',$this->lng->txt(
'save'));
 
 1058                $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
 
 1060                $form->setFormAction($this->ctrl->getFormAction($this,
'update'));
 
 1064                $title->setSubmitFormOnEnter(
true);
 
 1065                $title->setValue($this->object->getTitle());
 
 1068                $title->setRequired(
true);
 
 1073                $desc->setValue($this->object->getLongDescription());
 
 1076                $form->addItem($desc);
 
 1082                include_once 
"Services/Form/classes/class.ilDateDurationInputGUI.php";
 
 1084                $cdur->setInfo($this->lng->txt(
'crs_period_info'));                     
 
 1085                if($this->object->getCourseStart())
 
 1087                        $cdur->setStart($this->object->getCourseStart());
 
 1089                if($this->object->getCourseStart())
 
 1091                        $cdur->setEnd($this->object->getCourseEnd());
 
 1093                $form->addItem($cdur);                  
 
 1098                $this->lng->loadLanguageModule(
'rep');
 
 1101                $section->setTitle($this->lng->txt(
'rep_activation_availability'));
 
 1104                $online = 
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_online'),
'activation_online');
 
 1105                $online->setChecked(!$this->object->getOfflineStatus());
 
 1106                $online->setInfo($this->lng->txt(
'crs_activation_online_info'));
 
 1107                $form->addItem($online);                                
 
 1114                include_once 
"Services/Form/classes/class.ilDateDurationInputGUI.php";
 
 1116                $dur->setShowTime(
true);                                                                                                                                        
 
 1119                $form->addItem($dur);
 
 1121                        $visible = 
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'), 
'activation_visibility');
 
 1122                        $visible->setInfo($this->lng->txt(
'crs_activation_limited_visibility_info'));
 
 1123                        $visible->setChecked($this->object->getActivationVisibility());
 
 1124                        $dur->addSubItem($visible);
 
 1128                $section->setTitle($this->lng->txt(
'crs_reg'));
 
 1131                $reg_proc = 
new ilRadioGroupInputGUI($this->lng->txt(
'crs_registration_type'),
'subscription_type');
 
 1132                $reg_proc->setValue(
 
 1134                                ? $this->object->getSubscriptionType()
 
 1139                        $reg_proc->addOption($opt);
 
 1144                                $pass->setInfo($this->lng->txt(
'crs_reg_password_info'));
 
 1145                                $pass->setSubmitFormOnEnter(
true);
 
 1147                                $pass->setMaxLength(12);
 
 1148                                $pass->setValue($this->object->getSubscriptionPassword());
 
 1150                        $opt->addSubItem(
$pass);
 
 1151                        $reg_proc->addOption($opt);
 
 1154                        $opt->setInfo($this->lng->txt(
'crs_registration_confirmation_info'));
 
 1155                        $reg_proc->addOption($opt);                     
 
 1158                        $opt->setInfo($this->lng->txt(
'crs_registration_deactivated'));
 
 1159                        $reg_proc->addOption($opt);                     
 
 1161                $form->addItem($reg_proc);
 
 1165                $reg_code = 
new ilCheckboxInputGUI($this->lng->txt(
'crs_reg_code'),
'reg_code_enabled');
 
 1166                $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
 
 1167                $reg_code->setValue(1);
 
 1168                $reg_code->setInfo($this->lng->txt(
'crs_reg_code_enabled_info'));
 
 1176                #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link')); 
 1178                if(!$this->object->getRegistrationAccessCode())
 
 1180                        include_once 
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
 
 1184                $reg_link->setValue($this->object->getRegistrationAccessCode());
 
 1185                $form->addItem($reg_link);
 
 1188                include_once 
'./Services/Link/classes/class.ilLink.php';
 
 1189                $val = 
ilLink::_getLink($this->object->getRefId(),$this->object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode()); 
 
 1190                $link->setHTML(
'<font class="small">'.$val.
'</font>');
 
 1191                $reg_code->addSubItem($link);
 
 1193                $form->addItem($reg_code);
 
 1196                include_once 
"Services/Form/classes/class.ilDateDurationInputGUI.php";
 
 1198                $sdur->setShowTime(
true);               
 
 1199                if($this->object->getSubscriptionStart())
 
 1203                if($this->object->getSubscriptionEnd())
 
 1207                $form->addItem($sdur);
 
 1210                $cancel = 
new ilDateTimeInputGUI($this->lng->txt(
'crs_cancellation_end'), 
'cancel_end');
 
 1211                $cancel->setInfo($this->lng->txt(
'crs_cancellation_end_info'));
 
 1212                $cancel_end = $this->
object->getCancellationEnd();      
 
 1215                        $cancel->setDate($cancel_end);
 
 1217                $form->addItem($cancel);
 
 1220                $lim = 
new ilCheckboxInputGUI($this->lng->txt(
'crs_subscription_max_members_short'),
'subscription_membership_limitation');
 
 1221                $lim->setInfo($this->lng->txt(
'crs_subscription_max_members_short_info'));
 
 1223                $lim->setChecked($this->object->isSubscriptionMembershipLimited());
 
 1226                        $min->setSubmitFormOnEnter(
true);
 
 1228                        $min->setMaxLength(4);
 
 1229                        $min->setValue($this->object->getSubscriptionMinMembers() ? $this->object->getSubscriptionMinMembers() : 
'');
 
 1230                        $min->setTitle($this->lng->txt(
'crs_subscription_min_members'));
 
 1231                        $min->setInfo($this->lng->txt(
'crs_subscription_min_members_info'));                    
 
 1232                        $lim->addSubItem($min);
 
 1235                        $max->setSubmitFormOnEnter(
true);
 
 1237                        $max->setMaxLength(4);
 
 1238                        $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() : 
'');
 
 1239                        $max->setTitle($this->lng->txt(
'crs_subscription_max_members'));
 
 1240                        $max->setInfo($this->lng->txt(
'crs_reg_max_info'));
 
 1242                $lim->addSubItem($max);
 
 1264                        $wait->addOption($option);
 
 1266                        $option = 
new ilRadioOption($this->lng->txt(
'crs_waiting_list_no_autofill'), 1);
 
 1267                        $option->setInfo($this->lng->txt(
'crs_wait_info'));
 
 1268                        $wait->addOption($option);
 
 1270                        $option = 
new ilRadioOption($this->lng->txt(
'crs_waiting_list_autofill'), 2);
 
 1271                        $option->setInfo($this->lng->txt(
'crs_waiting_list_autofill_info'));
 
 1272                        $wait->addOption($option);
 
 1274                        if($this->object->hasWaitingListAutoFill())
 
 1278                        else if($this->object->enabledWaitingList())
 
 1283                $lim->addSubItem($wait);
 
 1285                $form->addItem($lim);
 
 1289                $pres->setTitle($this->lng->txt(
'crs_view_mode'));
 
 1291                $form->addItem($pres);          
 
 1295                $view_type->setValue($this->object->getViewMode());
 
 1298                        $opts->setInfo($this->lng->txt(
'cntr_view_info_sessions'));
 
 1299                        $view_type->addOption($opts);
 
 1304                                $sess->setChecked($this->object->isSessionLimitEnabled());
 
 1305                                $sess->setInfo($this->lng->txt(
'sess_limit_info'));
 
 1308                                        #$prev->setSubmitFormOnEnter(true); 
 1309                                        $prev->setMinValue(0);
 
 1310                                        $prev->setValue($this->object->getNumberOfPreviousSessions() == -1 ?
 
 1312                                                $this->object->getNumberOfPreviousSessions()
 
 1315                                        $prev->setMaxLength(3);
 
 1316                                        $sess->addSubItem($prev);
 
 1319                                        #$next->setSubmitFormOnEnter(true); 
 1320                                        $next->setMinValue(0);
 
 1321                                        $next->setValue($this->object->getNumberOfNextSessions() == -1 ?
 
 1323                                                $this->object->getNumberOfnextSessions()
 
 1326                                        $next->setMaxLength(3);
 
 1327                                        $sess->addSubItem($next);
 
 1329                                $opts->addSubItem(
$sess);
 
 1335                        $optsi->setInfo($this->lng->txt(
'cntr_view_info_simple'));
 
 1336                        $view_type->addOption($optsi);
 
 1339                        $optbt->setInfo($this->lng->txt(
'cntr_view_info_by_type'));
 
 1340                        $view_type->addOption($optbt);
 
 1343                        $opto->setInfo($this->lng->txt(
'crs_view_info_objective'));
 
 1344                        $view_type->addOption($opto);
 
 1347                        $optt->setInfo($this->lng->txt(
'crs_view_info_timing'));
 
 1348                        $view_type->addOption($optt);
 
 1350                $form->addItem($view_type);
 
 1365                include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
 
 1368                        include_once 
'./Services/Object/classes/class.ilObjectLP.php';
 
 1370                        if($olp->getCurrentMode())
 
 1373                                $lp_status->setTitle($this->lng->txt(
'crs_course_status_of_users'));
 
 1374                                $form->addItem($lp_status);
 
 1376                                $lp_status_options = 
new ilRadioGroupInputGUI($this->lng->txt(
'crs_status_determination'), 
"status_dt");
 
 1378                                $lp_status_options->setValue($this->object->getStatusDetermination());
 
 1380                                $lp_option = 
new ilRadioOption($this->lng->txt(
'crs_status_determination_lp'),
 
 1382                                $lp_status_options->addOption($lp_option);
 
 1383                                $lp_status_options->addOption(
new ilRadioOption($this->lng->txt(
'crs_status_determination_manual'),
 
 1386                                $form->addItem($lp_status_options);
 
 1392                $feat->setTitle($this->lng->txt(
'obj_features'));
 
 1393                $form->addItem($feat);
 
 1395                include_once 
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
 
 1397                                $this->object->getId(),
 
 1410                $mem->setChecked($this->object->getShowMembers());
 
 1411                $mem->setInfo($this->lng->txt(
'crs_show_members_info'));
 
 1412                $form->addItem($mem);
 
 1416                $mail_type->setValue($this->object->getMailToMembersType());
 
 1419                        $this->lng->txt(
'crs_mail_tutors_only_info'));
 
 1420                $mail_type->addOption($mail_tutors);
 
 1423                        $this->lng->txt(
'crs_mail_all_info'));
 
 1424                $mail_type->addOption($mail_all);
 
 1425                $form->addItem($mail_type);
 
 1433                $not = 
new ilCheckboxInputGUI($this->lng->txt(
'crs_auto_notification'), 
'auto_notification');
 
 1435                $not->setInfo($this->lng->txt(
'crs_auto_notification_info'));
 
 1436                $not->setChecked( $this->object->getAutoNotification() );
 
 1437                $form->addItem($not);
 
 1445                $desk = 
new ilCheckboxInputGUI($this->lng->txt(
'crs_add_remove_from_desktop'),
'abo');
 
 1446                $desk->setChecked($this->object->getAboStatus());
 
 1447                $desk->setInfo($this->lng->txt(
'crs_add_remove_from_desktop_info'));
 
 1448                $form->addItem($desk);
 
 1452                include_once 
'Modules/Course/classes/class.ilECSCourseSettings.php';
 
 1454                $ecs->addSettingsToForm($form, 
'crs');
 
 1474                $this->tabs_gui->setTabActive(
'settings');
 
 1475                $this->tabs_gui->activateSubTab(
'icon_settings');
 
 1482                $tpl->setContent($a_form->getHTML());
 
 1487                include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
 1489                $form->setFormAction($this->ctrl->getFormAction($this));        
 
 1494                $form->addCommandButton(
'updateCourseIcons', $this->lng->txt(
'save'));                                  
 
 1501                include_once 
'Modules/Course/classes/class.ilCourseFile.php';
 
 1517                if($form->checkInput())
 
 1522                                if(
$_POST[
"cont_icon_delete"])
 
 1524                                        $this->
object->removeCustomIcon();
 
 1526                                $this->
object->saveIcons($_FILES[
"cont_icon"][
'tmp_name']);
 
 1530                        $this->ctrl->redirect($this,
"editCourseIcons");
 
 1533                $form->setValuesByPost();
 
 1548                                $this->tabs_gui->addSubTabTarget(
"crs_settings",
 
 1549                                                                                                 $this->ctrl->getLinkTarget($this,
'edit'),
 
 1550                                                                                                 "edit", get_class($this));
 
 1552                                $this->tabs_gui->addSubTabTarget(
"crs_info_settings",
 
 1553                                                                                                 $this->ctrl->getLinkTarget($this,
'editInfo'),
 
 1554                                                                                                 "editInfo", get_class($this));
 
 1556                                $this->tabs_gui->addSubTabTarget(
"preconditions",
 
 1557                                                                                                 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerGUI',
'listConditions'),
 
 1558                                                                                                 "", 
"ilConditionHandlerGUI");
 
 1560                                $this->tabs_gui->addSubTabTarget(
"crs_start_objects",
 
 1561                                                                                                 $this->ctrl->getLinkTargetByClass(
'ilContainerStartObjectsGUI',
'listStructure'),
 
 1562                                                                                                 "listStructure", get_class($this));
 
 1564                                $this->tabs_gui->addSubTabTarget(
'groupings',
 
 1565                                                                                                 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
 
 1570                                if ($this->
ilias->getSetting(
"custom_icons"))
 
 1572                                        $this->tabs_gui->addSubTabTarget(
"icon_settings",
 
 1573                                                                                                         $this->ctrl->getLinkTarget($this,
'editCourseIcons'),
 
 1574                                                                                                         "editCourseIcons", get_class($this));
 
 1578                                include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
 
 1581                                        $this->tabs_gui->addSubTabTarget(
"crs_map_settings",
 
 1582                                                 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
 
 1583                                                 "editMapSettings", get_class($this));
 
 1587                                include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
 1588                                include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
 
 1592                                        $this->tabs_gui->addSubTabTarget(
'crs_custom_user_fields',
 
 1593                                                                                                        $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
 
 1595                                                                                                        'ilobjectcustomuserfieldsgui');
 
 1599                                include_once 
"Services/Certificate/classes/class.ilCertificate.php";
 
 1602                                        $this->tabs_gui->addSubTabTarget(
 
 1604                                                $this->ctrl->getLinkTargetByClass(
"ilcertificategui", 
"certificateeditor"),
 
 1605                                                "", 
"ilcertificategui");                                        
 
 1608                                if ($this->object->getUseNews())
 
 1610                                        $this->tabs_gui->addSubTab(
'obj_news_settings',
 
 1611                                                $this->lng->txt(
"cont_news_settings"),
 
 1612                                                $this->ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui'));
 
 1625                        && !$this->isActiveAdministrationPanel())
 
 1629                parent::showPossibleSubObjects();
 
 1639                $this->
object->removeSmallIcon();
 
 1640                $this->ctrl->redirect($this,
'editCourseIcons');         
 
 1650                $this->
object->removeBigIcon();
 
 1651                $this->ctrl->redirect($this,
'editCourseIcons');         
 
 1662                $this->
object->removeTinyIcon();
 
 1663                $this->ctrl->redirect($this,
'editCourseIcons');         
 
 1675                $a_new_object->getMemberObject()->updateNotification(
$ilUser->getId(),
$ilSetting->get(
'mail_crs_admin_notification', 
true));
 
 1677                $a_new_object->getMemberObject()->updateContact(
$ilUser->getId(),1);
 
 1682                require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
 1690                $this->ctrl->setParameter($this, 
"ref_id", $a_new_object->
getRefId());
 
 1692                        $this->ctrl->getLinkTarget($this, 
"edit", 
"", 
false, 
false)));
 
 1705                if(isset(
$_GET[
'admin_hide']))
 
 1707                        $ilUser->writePref(
'crs_admin_hide',(
int) 
$_GET[
'admin_hide']);
 
 1709                if(isset(
$_GET[
'tutor_hide']))
 
 1711                        $ilUser->writePref(
'crs_tutor_hide',(
int) 
$_GET[
'tutor_hide']);
 
 1713                if(isset(
$_GET[
'member_hide']))
 
 1715                        $ilUser->writePref(
'crs_member_hide',(
int) 
$_GET[
'member_hide']);
 
 1717                if(isset(
$_GET[
'subscriber_hide']))
 
 1719                        $ilUser->writePref(
'crs_subscriber_hide',(
int) 
$_GET[
'subscriber_hide']);
 
 1721                if(isset(
$_GET[
'wait_hide']))
 
 1723                        $ilUser->writePref(
'crs_wait_hide',(
int) 
$_GET[
'wait_hide']);
 
 1725                include_once 
'./Modules/Course/classes/class.ilCourseParticipants.php';
 
 1728                        if(isset(
$_GET[
'role_hide_'.$role_id]))
 
 1730                                $ilUser->writePref(
'crs_role_hide_'.$role_id,(
int) 
$_GET[
'role_hide_'.$role_id]);
 
 1737                include_once 
'./Services/Tracking/classes/class.ilObjUserTracking.php';
 
 1738                $this->show_tracking = 
 
 1742                if($this->show_tracking)
 
 1744                        include_once(
'./Services/Object/classes/class.ilObjectLP.php');
 
 1746                        $this->show_tracking = $olp->isActive();
 
 1749                if($this->show_tracking)
 
 1751                        include_once 
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
 
 1756                include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
 1759                if($privacy->enabledCourseAccessTimes())
 
 1761                        include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
 
 1765                $do_prtf = (is_array($selected_columns) && 
 
 1766                        in_array(
'prtf', $selected_columns) &&
 
 1770                        include_once 
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
 
 1772                                $this->ctrl->getLinkTarget($this, 
"members"));
 
 1775                foreach((array) $ids as $usr_id)
 
 1778                        $tmp_data[
'firstname'] = $name[
'firstname'];
 
 1779                        $tmp_data[
'lastname'] = $name[
'lastname'];
 
 1781                        $tmp_data[
'passed'] = $this->
object->getMembersObject()->hasPassed($usr_id) ? 1 : 0;
 
 1784                                $tmp_data[
'passed_info'] = $this->
object->getMembersObject()->getPassedInfo($usr_id);
 
 1786                        $tmp_data[
'notification'] = $this->
object->getMembersObject()->isNotificationEnabled($usr_id) ? 1 : 0;
 
 1787                        $tmp_data[
'blocked'] = $this->
object->getMembersObject()->isBlocked($usr_id) ? 1 : 0;
 
 1789                        $tmp_data[
'contact'] = $this->
object->getMembersObject()->isContact($usr_id) ? 1 : 0;
 
 1792                        $tmp_data[
'usr_id'] = $usr_id;
 
 1794                        if($this->show_tracking)
 
 1796                                if(in_array($usr_id,$completed))
 
 1800                                elseif(in_array($usr_id,$in_progress))
 
 1804                                elseif(in_array($usr_id,
$failed))
 
 1814                        if($privacy->enabledCourseAccessTimes())
 
 1816                                if(isset($progress[$usr_id][
'ts']) and $progress[$usr_id][
'ts'])
 
 1818                                        $tmp_data[
'access_ut'] = $progress[$usr_id][
'ts'];
 
 1823                                        $tmp_data[
'access_ut'] = 0;
 
 1824                                        $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
 
 1830                                $tmp_data[
'prtf'] = $all_prtf[$usr_id];
 
 1833                        $members[$usr_id] = $tmp_data;
 
 1835                return $members ? $members : array();
 
 1848                include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
 
 1852                        include_once 
'./Services/Object/classes/class.ilObjectLP.php';
 
 1856                                include_once 
'Services/Tracking/classes/class.ilLPMarks.php';
 
 1857                                $marks = 
new ilLPMarks($this->object->getId(), $a_member_id);
 
 1860                                if($marks->getCompleted() != $a_has_passed)
 
 1862                                        $marks->setCompleted($a_has_passed);
 
 1866                                        include_once(
"./Modules/Course/classes/class.ilCourseAppEventListener.php");
 
 1869                                        include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
 
 1884                if($this->object->isSubscriptionMembershipLimited() and $this->object->getSubscriptionMaxMembers() and 
 
 1885                   $this->object->getSubscriptionMaxMembers() <= $this->object->getMembersObject()->getCountMembers())
 
 1892                if($number = $this->object->getMembersObject()->autoFillSubscribers())
 
 1911                if($this->object->getMembersObject()->isLastAdmin(
$ilUser->getId()))
 
 1918                $this->tabs_gui->setTabActive(
'crs_unsubscribe');
 
 1920                include_once 
"Services/Utilities/classes/class.ilConfirmationGUI.php";
 
 1922                $cgui->setHeaderText($this->lng->txt(
'crs_unsubscribe_sure'));
 
 1923                $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 1924                $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancel");
 
 1925                $cgui->setConfirm($this->lng->txt(
"crs_unsubscribe"), 
"performUnsubscribe");            
 
 1926                $this->tpl->setContent($cgui->getHTML());                                                       
 
 1943                $this->
object->getMembersObject()->delete($this->
ilias->account->getId());
 
 1944                $this->
object->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->
ilias->account->getId());
 
 1945                $this->
object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNSUBSCRIBE,
$ilUser->getId());
 
 1949                $ilCtrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", $this->tree->getParentId($this->ref_id));
 
 1950                $ilCtrl->redirectByClass(
"ilrepositorygui", 
"");
 
 1958                if (
$GLOBALS[
'ilAccess']->checkAccess(
'visible',
'',$this->ref_id))
 
 1960                        $GLOBALS[
'ilTabs']->addTarget(
"info_short",
 
 1961                                                                 $this->ctrl->getLinkTargetByClass(
 
 1962                                                                 array(
"ilobjcoursegui", 
"ilinfoscreengui"), 
"showSummary"),
 
 1966                if(
$GLOBALS[
'ilAccess']->checkAccess(
'leave',
'',$this->object->getRefId()) and $this->object->getMemberObject()->isMember())
 
 1968                        $GLOBALS[
'ilTabs']->addTarget(
"crs_unsubscribe",
 
 1969                                        $this->ctrl->getLinkTarget($this, 
"unsubscribe"), 
 
 1984                $this->tabs_gui->addTab(
"view_content", $this->lng->txt(
"content"),
 
 1985                        $this->ctrl->getLinkTarget($this, 
"view"));
 
 1993                global $rbacsystem,$ilAccess,
$ilUser, 
$lng, $ilHelp;
 
 1995                $ilHelp->setScreenIdComponent(
"crs");
 
 1997                $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
 
 1999                if($ilAccess->checkAccess(
'read',
'',$this->ref_id))
 
 2002                        $this->tabs_gui->activateTab(
'view_content');
 
 2003                        if ($this->object->isNewsTimelineEffective())
 
 2005                                if (!$this->object->isNewsTimelineLandingPageEffective())
 
 2009                                $this->tabs_gui->addTab(
"news_timeline", 
$lng->txt(
"cont_news_timeline_tab"),
 
 2010                                        $this->ctrl->getLinkTargetByClass(
"ilnewstimelinegui", 
"show"));
 
 2011                                if ($this->object->isNewsTimelineLandingPageEffective())
 
 2023                if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
 
 2025                        include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
 
 2028                                $this->tabs_gui->addTarget(
 
 2030                                                $this->ctrl->getLinkTargetByClass(
'illoeditorgui',
''),
 
 2037                if ($ilAccess->checkAccess(
'visible',
'',$this->ref_id))
 
 2044                        $force_active = (strtolower(
$_GET[
"cmdClass"]) == 
"ilinfoscreengui" 
 2045                                || strtolower(
$_GET[
"cmdClass"]) == 
"ilnotegui")
 
 2048                        $this->tabs_gui->addTarget(
"info_short",
 
 2049                                                                 $this->ctrl->getLinkTargetByClass(
 
 2050                                                                 array(
"ilobjcoursegui", 
"ilinfoscreengui"), 
"showSummary"),
 
 2052                                                                 "", 
"", $force_active);
 
 2054                if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
 
 2056                        $force_active = (strtolower(
$_GET[
"cmdClass"]) == 
"ilconditionhandlergui" 
 2057                                && 
$_GET[
"item_id"] == 
"")
 
 2060                        $this->tabs_gui->addTarget(
"settings",
 
 2061                                $this->ctrl->getLinkTarget($this, 
"edit"),
 
 2062                                array(
"edit", 
"editMapSettings", 
"editCourseIcons", 
"listStructure"), 
"", 
"", $force_active);
 
 2066                include_once 
'./Modules/Course/classes/class.ilCourseParticipants.php';
 
 2068                include_once 
'./Services/Mail/classes/class.ilMail.php';
 
 2071                include_once 
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
 
 2073                $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
 
 2076                if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
 
 2078                        include_once 
'Services/Badge/classes/class.ilBadgeHandler.php';
 
 2081                                $this->tabs_gui->addTarget(
"obj_tool_setting_badges",
 
 2082                                         $this->ctrl->getLinkTargetByClass(
"ilbadgemanagementgui", 
""), 
 
 2084                                         "ilbadgemanagementgui");
 
 2090                include_once 
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
 
 2093                        $this->tabs_gui->addTarget(
'learning_progress',
 
 2094                                                                 $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
 
 2096                                                                 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
 
 2100                include_once(
"Services/License/classes/class.ilLicenseAccess.php");
 
 2101                if ($ilAccess->checkAccess(
'edit_permission', 
'', $this->ref_id)
 
 2104                        $this->tabs_gui->addTarget(
"licenses",
 
 2105                                $this->ctrl->getLinkTargetByClass(
'illicenseoverviewgui', 
''),
 
 2106                        "", 
"illicenseoverviewgui");
 
 2110                if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
 
 2112                        include_once 
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
 
 2114                        $mdtab = $mdgui->getTab();
 
 2117                                $this->tabs_gui->addTarget(
"meta_data",
 
 2120                                                                         "ilobjectmetadatagui");
 
 2124                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 2126                        $this->tabs_gui->addTarget(
 
 2128                                $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
 
 2134                if ($ilAccess->checkAccess(
'edit_permission',
'',$this->ref_id))
 
 2136                        $this->tabs_gui->addTarget(
"perm_settings",
 
 2137                                                                 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"),
 
 2138                                                                 array(
"perm",
"info",
"owner"), 
'ilpermissiongui');
 
 2141                if ($this->ctrl->getTargetScript() == 
"adm_object.php")
 
 2143                        $this->tabs_gui->addTarget(
"show_owner",
 
 2144                                                                 $this->ctrl->getLinkTarget($this, 
"owner"), 
"owner", get_class($this));
 
 2146                        if ($this->tree->getSavedNodeData($this->ref_id))
 
 2148                                $this->tabs_gui->addTarget(
"trash",
 
 2149                                                                         $this->ctrl->getLinkTarget($this, 
"trash"), 
"trash", get_class($this));
 
 2153                if($ilAccess->checkAccess(
'join',
'',$this->ref_id)
 
 2154                        and !$this->object->getMemberObject()->isAssigned())
 
 2156                        include_once 
'./Modules/Course/classes/class.ilCourseWaitingList.php';
 
 2159                                $this->tabs_gui->addTab(
 
 2161                                        $this->lng->txt(
'membership_leave'),
 
 2162                                        $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
 
 2169                                $this->tabs_gui->addTarget(
"join",
 
 2170                                                                         $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui', 
"show"), 
 
 2175                if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId())
 
 2176                        and $this->object->getMemberObject()->isMember())
 
 2178                        $this->tabs_gui->addTarget(
"crs_unsubscribe",
 
 2179                                                                 $this->ctrl->getLinkTarget($this, 
"unsubscribe"), 
 
 2191                $next_class = $this->ctrl->getNextClass($this);
 
 2192                $cmd = $this->ctrl->getCmd();
 
 2201                        $ilAccess->checkAccess(
'read', 
'', 
$_GET[
'ref_id']))
 
 2203                        include_once(
"./Services/Link/classes/class.ilLink.php");
 
 2204                        $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
 
 2210                        case 'ilcoursemembershipgui':
 
 2212                                $this->tabs_gui->activateTab(
'members');
 
 2214                                include_once 
'./Modules/Course/classes/class.ilCourseMembershipGUI.php';
 
 2216                                $this->ctrl->forwardCommand($mem_gui);
 
 2219                        case "ilinfoscreengui":
 
 2223                        case 'ilobjectmetadatagui';
 
 2224                                if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 2226                                        $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
 
 2228                                $this->tabs_gui->setTabActive(
'meta_data');
 
 2229                                include_once 
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
 
 2231                                $this->ctrl->forwardCommand($md_gui);
 
 2234                        case 'ilcourseregistrationgui':
 
 2235                                $this->ctrl->setReturn($this,
'');
 
 2236                                $this->tabs_gui->setTabActive(
'join');
 
 2237                                include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
 
 2239                                $this->ctrl->forwardCommand($registration);
 
 2242                        case 'ilobjectcustomuserfieldsgui':
 
 2243                                include_once 
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
 
 2246                                $this->tabs_gui->setTabActive(
'settings');
 
 2247                                $this->ctrl->forwardCommand($cdf_gui);
 
 2250                        case "ilcourseobjectivesgui":
 
 2251                                include_once 
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
 
 2253                                $this->ctrl->setReturn($this,
"");
 
 2255                                $ret =& $this->ctrl->forwardCommand($reg_gui);
 
 2258                        case 'ilobjcoursegroupinggui':
 
 2259                                include_once 
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
 
 2261                                $this->ctrl->setReturn($this,
'edit');
 
 2264                                $this->ctrl->forwardCommand($crs_grp_gui);
 
 2265                                $this->tabs_gui->setTabActive(
'settings');
 
 2266                                $this->tabs_gui->setSubTabActive(
'groupings');
 
 2270                                $this->tabs_gui->setTabActive(
'none');
 
 2280                        case "ilconditionhandlergui":
 
 2281                                include_once 
'./Services/AccessControl/classes/class.ilConditionHandlerGUI.php';                                
 
 2284                                $this->tabs_gui->setTabActive(
'settings');
 
 2286                                $this->ctrl->forwardCommand($new_gui);                          
 
 2289                        case "illearningprogressgui":
 
 2290                                include_once 
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
 
 2293                                                                                                          $this->object->getRefId(),
 
 2295                                $this->ctrl->forwardCommand($new_gui);
 
 2296                                $this->tabs_gui->setTabActive(
'learning_progress');
 
 2300                        case 'illicenseoverviewgui':
 
 2301                                include_once(
"./Services/License/classes/class.ilLicenseOverviewGUI.php");
 
 2303                                $ret =& $this->ctrl->forwardCommand($license_gui);
 
 2304                                $this->tabs_gui->setTabActive(
'licenses');
 
 2307                        case 'ilpermissiongui':
 
 2308                                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
 2309                                $this->tabs_gui->setTabActive(
'perm_settings');
 
 2311                                $ret =& $this->ctrl->forwardCommand($perm_gui);
 
 2315                        case 'ilcoursecontentinterface':
 
 2317                                $this->initCourseContentInterface();
 
 2318                                $this->cci_obj->cci_setContainer($this);
 
 2320                                $this->ctrl->forwardCommand($this->cci_obj);
 
 2322                                $this->tabs_gui->setTabActive(
'content');
 
 2325                        case 'ilcoursecontentgui':
 
 2326                                $this->ctrl->setReturn($this,
'members');
 
 2327                                include_once 
'./Modules/Course/classes/class.ilCourseContentGUI.php';
 
 2329                                $this->ctrl->forwardCommand($course_content_obj);
 
 2332                        case 'ilpublicuserprofilegui':
 
 2333                                $this->tpl->enableDragDropFileUpload(
null);                             
 
 2334                                require_once 
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
 
 2336                                $this->tabs_gui->setTabActive(
'members');
 
 2338                                $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass([
"ilCourseMembershipGUI", 
"ilUsersGalleryGUI"],
'view'));
 
 2339                                $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
 
 2340                                $html = $this->ctrl->forwardCommand($profile_gui);
 
 2341                                $this->tpl->setVariable(
"ADM_CONTENT", 
$html);                          
 
 2345                        case 'ilmemberagreementgui':
 
 2346                                include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
 
 2347                                $this->tabs_gui->clearTargets();
 
 2349                                $this->ctrl->setReturn($this,
'');
 
 2351                                $this->ctrl->forwardCommand($agreement);
 
 2356                        case "ilcontainerpagegui":
 
 2360                                        $this->tpl->setContent(
$ret);
 
 2364                        case "ilcontainerstartobjectspagegui":
 
 2366                                include_once 
"Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
 
 2368                                $ret = $this->ctrl->forwardCommand($pgui);
 
 2371                                        $this->tpl->setContent(
$ret);
 
 2375                        case 'ilobjectcopygui':
 
 2376                                include_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
 2378                                $cp->setType(
'crs');
 
 2379                                $this->ctrl->forwardCommand($cp);
 
 2382                        case "ilobjstylesheetgui":
 
 2388                                $this->tabs_gui->setTabActive(
'export');
 
 2389                                include_once 
'./Services/Export/classes/class.ilExportGUI.php';
 
 2391                                $exp->addFormat(
'xml');
 
 2392                                $this->ctrl->forwardCommand($exp);
 
 2395                        case "ilcommonactiondispatchergui":
 
 2396                                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
 2398                                $this->ctrl->forwardCommand($gui);
 
 2401                        case 'ildidactictemplategui':
 
 2402                                $this->ctrl->setReturn($this,
'edit');
 
 2403                                include_once 
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
 
 2405                                $this->ctrl->forwardCommand($did);
 
 2408                        case "ilcertificategui":
 
 2409                                $this->tabs_gui->activateTab(
"settings");
 
 2412                                include_once 
"./Services/Certificate/classes/class.ilCertificateGUI.php";
 
 2413                                include_once 
"./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
 
 2415                                $this->ctrl->forwardCommand($output_gui);
 
 2418                        case 'ilobjectservicesettingsgui':
 
 2419                                $this->ctrl->setReturn($this,
'edit');
 
 2421                                $this->tabs_gui->activateTab(
'settings');
 
 2422                                $this->tabs_gui->acltivateSubTab(
'tool_settings');
 
 2424                                include_once 
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
 
 2427                                                $this->object->getId(),
 
 2431                                $this->ctrl->forwardCommand($service);
 
 2434                        case 'illoeditorgui':
 
 2435                                #$this->tabs_gui->clearTargets(); 
 2436                                #$this->tabs_gui->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,'')); 
 2437                                $this->tabs_gui->activateTab(
'crs_objectives');
 
 2439                                include_once 
'./Modules/Course/classes/Objectives/class.ilLOEditorGUI.php';
 
 2441                                $this->ctrl->forwardCommand($editor);
 
 2444                        case 'ilcontainerstartobjectsgui':
 
 2445                                $this->ctrl->setReturn($this,
'edit');
 
 2446                                $this->tabs_gui->clearTargets();
 
 2447                                $this->tabs_gui->setBackTarget($this->lng->txt(
"back_to_crs_content"),
 
 2448                                        $this->ctrl->getLinkTarget($this, 
"edit"));
 
 2449                                $this->tabs_gui->addTab(
"start",
 
 2450                                        $this->lng->txt(
"crs_start_objects"),
 
 2451                                        $this->ctrl->getLinkTargetByClass(
"ilcontainerstartobjectsgui", 
"listStructure"));
 
 2453                                $ilHelp->setScreenIdComponent(
"crs");
 
 2455                                include_once 
'./Services/Container/classes/class.ilContainerStartObjectsGUI.php';
 
 2457                                $this->ctrl->forwardCommand($stgui);
 
 2460                        case 'illomembertestresultgui':
 
 2461                                include_once 
'./Modules/Course/classes/Objectives/class.ilLOMemberTestResultGUI.php';
 
 2462                                $GLOBALS[
'ilCtrl']->setReturn($this, 
'members');
 
 2463                                $GLOBALS[
'ilTabs']->clearTargets();
 
 2466                                        $GLOBALS[
'ilCtrl']->getLinkTarget($this,
'members')
 
 2470                                $this->ctrl->forwardCommand($result_view);
 
 2473                        case 'ilmailmembersearchgui':
 
 2474                                include_once 
'Services/Mail/classes/class.ilMail.php';
 
 2478                                        $ilAccess->checkAccess(
'manage_members',
"",$this->object->getRefId())) &&
 
 2479                                        $rbacsystem->checkAccess(
'internal_mail',$mail->getMailObjectReferenceId()))
 
 2481                                        $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),
$ilErr->MESSAGE);
 
 2484                                $this->tabs_gui->setTabActive(
'members');
 
 2486                                include_once 
'./Services/Contact/classes/class.ilMailMemberSearchGUI.php';
 
 2487                                include_once 
'./Services/Contact/classes/class.ilMailMemberCourseRoles.php';
 
 2491                                $this->ctrl->forwardCommand($mail_search);
 
 2494                        case 'ilbadgemanagementgui':
 
 2495                                $this->tabs_gui->setTabActive(
'obj_tool_setting_badges');
 
 2496                                include_once 
'Services/Badge/classes/class.ilBadgeManagementGUI.php';
 
 2498                                $this->ctrl->forwardCommand($bgui);
 
 2501                        case "ilcontainernewssettingsgui":
 
 2503                                $this->tabs_gui->setTabActive(
'settings');
 
 2504                                include_once(
"./Services/Container/classes/class.ilContainerNewsSettingsGUI.php");
 
 2506                                $this->ctrl->forwardCommand($news_set_gui);
 
 2509                        case "ilnewstimelinegui":
 
 2510                                $this->tabs_gui->setTabActive(
'news_timeline');
 
 2511                                include_once(
"./Services/News/classes/class.ilNewsTimelineGUI.php");
 
 2513                                $t->setUserEditAll($ilAccess->checkAccess(
'write',
'',$this->object->getRefId(),
'grp'));
 
 2515                                $this->ctrl->forwardCommand(
$t);
 
 2531                if(
$cmd == 
'infoScreenGoto')
 
 2540                        $cmd = 
'infoScreen';
 
 2544                if(!$this->creation_mode)
 
 2546                                        if (
$cmd == 
"infoScreen")
 
 2557                if( !$this->creation_mode
 
 2558                    && 
$cmd != 
'infoScreen' 
 2559                    && 
$cmd != 
'sendfile' 
 2560                    && 
$cmd != 
'unsubscribe' 
 2561                    && 
$cmd != 
'performUnsubscribe' 
 2562                    && !$ilAccess->checkAccess(
"read",
'',$this->object->getRefId())
 
 2564                    || 
$cmd == 
'subscribe')
 
 2566                    include_once 
'./Modules/Course/classes/class.ilCourseParticipants.php';
 
 2567                    if($rbacsystem->checkAccess(
'join',$this->object->getRefId()) &&
 
 2570                        include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
 
 2571                        $this->ctrl->redirectByClass(
"ilCourseRegistrationGUI");
 
 2580                if(
$cmd == 
'listObjectives')
 
 2582                    include_once 
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
 
 2584                    $this->ctrl->setReturn($this,
"");
 
 2586                    $ret =& $this->ctrl->forwardCommand($obj_gui);
 
 2597                                if (
$cmd == 
"" && $this->object->isNewsTimelineLandingPageEffective())
 
 2599                                        $this->ctrl->redirectbyclass(
"ilnewstimelinegui");
 
 2627                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 2633                if(!$this->object->getMemberObject()->isAssigned())
 
 2638                include_once 
'./Services/Container/classes/class.ilMemberViewSettings.php';
 
 2644                include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
 2645                include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
 
 2652                        $GLOBALS[
'ilLog']->write(__METHOD__.
': Missing course confirmation.');
 
 2656                include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
 
 2659                        $GLOBALS[
'ilLog']->write(__METHOD__.
': Missing required fields');
 
 2677                include_once(
"Services/License/classes/class.ilLicenseAccess.php");
 
 2681                        $buffer = $lic_set->get(
"license_warning");
 
 2683                        include_once(
"./Services/License/classes/class.ilLicense.php");
 
 2685                        foreach ($licensed_items as $item)
 
 2687                                $license = 
new ilLicense($item[
'obj_id']);
 
 2688                                $remaining = $license->getRemainingLicenses();
 
 2689                                if ($remaining <= $buffer)
 
 2691                                        $lng->loadlanguageModule(
"license");
 
 2702                return array(
"ilCourseRegisterGUI",
'ilConditionHandlerGUI');
 
 2708                switch ($this->ctrl->getCmd())
 
 2711                                #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
 
 2721                $GLOBALS[
'ilCtrl']->redirectByClass(
'ilcoursemembershipgui');
 
 2727        public static function _goto($a_target, $a_add = 
"")
 
 2731                include_once 
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
 
 2732                if(substr($a_add,0,5) == 
'rcode')
 
 2734                        if(
$ilUser->getId() == ANONYMOUS_USER_ID)
 
 2738                                        "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
 
 2751                if ($a_add == 
"mem" && $ilAccess->checkAccess(
"manage_members", 
"", $a_target))
 
 2756                if ($ilAccess->checkAccess(
"read", 
"", $a_target))
 
 2763                        if ($ilAccess->checkAccess(
"visible", 
"", $a_target))
 
 2769                                if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID))
 
 2789                $this->tabs_gui->setTabActive(
'settings');
 
 2792                        !$ilAccess->checkAccess(
"write", 
"", $this->object->getRefId()))
 
 2797                $latitude = $this->
object->getLatitude();
 
 2798                $longitude = $this->
object->getLongitude();
 
 2799                $zoom = $this->
object->getLocationZoom();
 
 2802                if ($latitude == 0 && $longitude == 0 && $zoom == 0)
 
 2805                        $latitude = $def[
"latitude"];
 
 2806                        $longitude = $def[
"longitude"];
 
 2807                        $zoom =  $def[
"zoom"];
 
 2810                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 2812                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
 2814                $form->setTitle($this->lng->txt(
"crs_map_settings"));
 
 2819                $public->setValue(
"1");
 
 2820                $public->setChecked($this->object->getEnableCourseMap());
 
 2821                $form->addItem($public);
 
 2826                $loc_prop->setLatitude($latitude);
 
 2827                $loc_prop->setLongitude($longitude);
 
 2828                $loc_prop->setZoom($zoom);
 
 2829                $form->addItem($loc_prop);
 
 2831                $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
 
 2833                $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
 
 2845                $this->
object->update();
 
 2847                $ilCtrl->redirect($this, 
"editMapSettings");
 
 2861                        $this->object->getAboStatus(), $this->object->getRefId(), $this->object->getId());
 
 2867        public static function _modifyItemGUI($a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path,
 
 2868                $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id = 0)
 
 2870                global 
$lng, $ilAccess;
 
 2873                if ($a_parent_ref_id == 0)
 
 2875                        $a_parent_ref_id = $a_course_ref_id;
 
 2879                if($a_item_data[
'type'] == 
'tst' and
 
 2882                        $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));                                
 
 2885                $a_item_list_gui->enableSubscribe($a_abo_status);
 
 2887                $is_tutor = ($ilAccess->checkAccess(
'write',
'',
 
 2888                        $a_course_ref_id,
'crs', $a_course_obj_id));
 
 2890                if($a_show_path and $is_tutor)
 
 2892                        $a_item_list_gui->addCustomProperty(
$lng->txt(
'path'),                          
 
 2893                                ilContainer::_buildPath($a_item_data[
'ref_id'], $a_course_ref_id),
 
 2906                if ($this->object->getType() != 
'crs')
 
 2910                if (!$ilAccess->checkAccess(
'write',
'',
 
 2911                        $this->object->getRefId(),
'crs',$this->object->getId()))
 
 2915                        if($this->object->enabledObjectiveView())
 
 2929                if(!
$_SESSION[
'crs_timings_panel'][$this->object->getId()] or 1)
 
 2933                                $this->tabs_gui->addSubTab(
"view_content", 
$lng->txt(
"view"), 
$ilCtrl->getLinkTargetByClass(
"ilobjcoursegui", 
"view"));
 
 2937                                $this->tabs_gui->addSubTab(
"view_content", 
$lng->txt(
"view"), 
$ilCtrl->getLinkTargetByClass(
"ilobjcoursegui", 
"disableAdministrationPanel"));
 
 2942                        $this->tabs_gui->addSubTabTarget(
'timings_timings',
 
 2943                                $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editUserTimings'));
 
 2963                include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
 
 2966                if(is_array(
$_POST[$a_field][
'date']))
 
 2968                        $dt[
'year'] = (int) 
$_POST[$a_field][
'date'][
'y'];
 
 2969                        $dt[
'mon'] = (int) 
$_POST[$a_field][
'date'][
'm'];
 
 2970                        $dt[
'mday'] = (int) 
$_POST[$a_field][
'date'][
'd'];
 
 2971                        $dt[
'hours'] = (int) 
$_POST[$a_field][
'time'][
'h'];
 
 2972                        $dt[
'minutes'] = (int) 
$_POST[$a_field][
'time'][
'm'];
 
 2973                        $dt[
'seconds'] = (int) 
$_POST[$a_field][
'time'][
's'];
 
 2977                        $date = date_parse(
$_POST[$a_field][
'date'].
" ".
$_POST[$a_field][
'time']);
 
 2978                        $dt[
'year'] = (int) $date[
'year'];
 
 2979                        $dt[
'mon'] = (int) $date[
'month'];
 
 2980                        $dt[
'mday'] = (int) $date[
'day'];
 
 2981                        $dt[
'hours'] = (int) $date[
'hour'];
 
 2982                        $dt[
'minutes'] = (int) $date[
'minute'];
 
 2983                        $dt[
'seconds'] = (int) $date[
'second'];
 
 3001                include_once 
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
 
 3003                $confirm->setFormAction($this->ctrl->getFormAction($this));
 
 3004                $confirm->setConfirm($this->lng->txt(
'reset'), 
'reset');
 
 3005                $confirm->setCancel($this->lng->txt(
'cancel'), 
'cancel');
 
 3007                $GLOBALS[
'tpl']->setContent($confirm->getHTML());
 
 3015                include_once 
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
 
 3017                $usr_results->delete();
 
 3020                include_once 
'./Modules/Course/classes/Objectives/class.ilLOTestRun.php';
 
 3021                include_once 
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
 3023                        $this->object->getId(), 
 
 3027                include_once 
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
 
 3030                $tmp_obj_res->reset($this->object->getId());
 
 3032                $ilUser->deletePref(
'crs_objectives_force_details_'.$this->object->getId());
 
 3042                if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 3047                include_once 
'./Services/Container/classes/class.ilContainerStartObjects.php';
 
 3049                        $this->object->getId());
 
 3050                if(count($this->start_obj->getStartObjects()) && 
 
 3051                        !$this->start_obj->allFullfilled(
$ilUser->getId()))
 
 3068                        include_once 
'./Services/Container/classes/class.ilMemberViewSettings.php';
 
 3070                        if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
 
 3072                                $settings->setContainer($this->object->getRefId());
 
 3073                                $rbacsystem->initMemberView();                          
 
 3076                parent::prepareOutput($a_show_subobjects);
 
 3085                $link = chr(13).chr(10).chr(13).chr(10);
 
 3086                $link .= $this->lng->txt(
'crs_mail_permanent_link');
 
 3087                $link .= chr(13).chr(10).chr(13).chr(10);
 
 3088                include_once 
'./Services/Link/classes/class.ilLink.php';
 
 3090                return rawurlencode(base64_encode($link));
 
 3097                $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
 
 3102                        include_once 
"Services/Certificate/classes/class.ilCertificate.php";
 
 3107                                $cert_url = $this->ctrl->getLinkTarget($this, 
"deliverCertificate");
 
 3109                                $this->lng->loadLanguageModule(
"certificate");
 
 3110                                $lg->addCustomCommand($cert_url, 
"download_certificate");
 
 3112                                $lg->addHeaderIcon(
"cert_icon",
 
 3114                                                $this->lng->txt(
"download_certificate"),
 
 3121                        include_once 
"Services/Membership/classes/class.ilMembershipNotifications.php";                 
 
 3125                                if(!$noti->isCurrentUserActive())
 
 3127                                        $lg->addHeaderIcon(
"not_icon",
 
 3129                                                $this->lng->txt(
"crs_notification_deactivated"));
 
 3131                                        $this->ctrl->setParameter($this, 
"crs_ntf", 1);
 
 3132                                        $caption = 
"crs_activate_notification";
 
 3136                                        $lg->addHeaderIcon(
"not_icon",
 
 3138                                                $this->lng->txt(
"crs_notification_activated"));
 
 3140                                        $this->ctrl->setParameter($this, 
"crs_ntf", 0);
 
 3141                                        $caption = 
"crs_deactivate_notification";
 
 3144                                if($noti->canCurrentUserEdit())
 
 3146                                        $lg->addCustomCommand($this->ctrl->getLinkTarget($this, 
"saveNotification"),
 
 3150                                $this->ctrl->setParameter($this, 
"crs_ntf", 
"");
 
 3162                if ($ilAccess->checkAccess(
'manage_members',
'',$this->ref_id))
 
 3164                        $user_id = $_REQUEST[
"member_id"];
 
 3171                include_once 
"Services/Certificate/classes/class.ilCertificate.php";
 
 3177                        $this->ctrl->redirect($this);
 
 3180                include_once 
"./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
 
 3182                $certificate->outCertificate(array(
"user_id" => $user_id), 
true);                               
 
 3188                $this->ctrl->redirectByClass(array(
'ilrepositorygui',
'ilobjcoursegui',
'illoeditorgui'),
'materials');
 
 3193                if(isset(
$_POST[
'position'][
"lobj"]))
 
 3195                        $lobj = 
$_POST[
'position'][
"lobj"];
 
 3196                        unset(
$_POST[
'position'][
"lobj"]);
 
 3198                        $objective_order = array();
 
 3199                        foreach($lobj as $objective_id => $materials)
 
 3201                                $objective_order[$objective_id] = $materials[0];
 
 3202                                unset($lobj[$objective_id][0]);
 
 3206                        include_once 
"Modules/Course/classes/class.ilCourseObjective.php";
 
 3207                        asort($objective_order);
 
 3209                        foreach(array_keys($objective_order) as $objective_id)
 
 3212                                $obj->writePosition(++$pos);
 
 3216                        include_once 
"Modules/Course/classes/class.ilCourseObjectiveMaterials.php";
 
 3217                        foreach($lobj as $objective_id => $materials)
 
 3223                                foreach(array_keys($materials) as $ass_id)
 
 3225                                        $objmat->writePosition($ass_id, ++$pos);
 
 3230                return parent::saveSortingObject();
 
 3239                include_once 
'./Services/Link/classes/class.ilLink.php';
 
 3250                $objective_id = (int) $_REQUEST[
'objective_id'];
 
 3251                $test_id = (int) $_REQUEST[
'tid'];
 
 3253                include_once 
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
 
 3254                include_once 
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
 
 3255                include_once 
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
 
 3259                                $this->object->getId(),
 
 3261                $passed = 
$res->getCompletedObjectiveIds();
 
 3263                $has_completed = FALSE;
 
 3266                        $objective_ids = array($objective_id);
 
 3267                        if(in_array($objective_id, $passed))
 
 3269                                $has_completed = TRUE;
 
 3275                        include_once 
'./Modules/Course/classes/class.ilCourseObjective.php';
 
 3279                        if(count($objective_ids) == count($passed))
 
 3281                                $has_completed = TRUE;
 
 3293                include_once 
'./Services/Link/classes/class.ilLink.php';
 
 3306                include_once 
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
 
 3312                        $question = $this->lng->txt(
'crs_loc_objective_passed_confirmation');
 
 3316                        $question = $this->lng->txt(
'crs_loc_objectives_passed_confirmation');
 
 3319                $confirm->addHiddenItem(
'objective_id', $a_objective_id);
 
 3320                $confirm->addHiddenItem(
'tid', $a_test_id);
 
 3321                $confirm->setConfirm($this->lng->txt(
'crs_loc_tst_start'), 
'redirectLocToTestConfirmed');
 
 3322                $confirm->setCancel($this->lng->txt(
'cancel'), 
'view');
 
 3326                $GLOBALS[
'tpl']->setContent($confirm->getHTML());
 
 3339                $crs_admin = $this->
object->getDefaultAdminRole();
 
 3340                $crs_member = $this->
object->getDefaultMemberRole();
 
 3341                $local_roles = $this->
object->getLocalCourseRoles(
false);
 
 3342                $crs_roles = array();
 
 3345                if(in_array($crs_member, $local_roles))
 
 3347                        #$crs_roles[$crs_member] = ilObjRole::_getTranslation(array_search ($crs_member, $local_roles)); 
 3348                        #unset($local_roles[$crs_roles[$crs_member]]); 
 3351                foreach($local_roles as 
$title => $role_id)
 
 3361                if(count($a_exclude) > 0)
 
 3363                        foreach($a_exclude as $excluded_role)
 
 3365                                if(isset($crs_roles[$excluded_role]))
 
 3367                                        unset($crs_roles[$excluded_role]);
 
 3391                $this->ctrl->redirectByClass(
'ilUsersGalleryGUI');
 
 3399                $this->ctrl->setReturn($this, 
"view");
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
const IL_CRS_SUBSCRIPTION_LIMITED
const IL_CRS_VIEW_SESSIONS
const IL_CRS_ACTIVATION_UNLIMITED
const IL_CRS_VIEW_OBJECTIVE
const IL_CRS_VIEW_BY_TYPE
const IL_CRS_SUBSCRIPTION_PASSWORD
const IL_CRS_SUBSCRIPTION_CONFIRMATION
const IL_CRS_SUBSCRIPTION_UNLIMITED
const IL_CRS_ACTIVATION_LIMITED
const IL_CRS_SUBSCRIPTION_DEACTIVATED
const IL_CRS_SUBSCRIPTION_DIRECT
const IL_CRS_ADMIN
Base class for course and group participants.
static getInstance()
Constructor.
GUI class to create PDF certificates.
static isObjectActive($a_obj_id)
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
class ilConditionHandlerGUI
Confirmation screen class.
afterUpdate()
Post (successful) object update hook.
isActiveAdministrationPanel()
& forwardToPageObject()
forward command to page object
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.
showPermanentLink(&$tpl)
show permanent link
forwardToStyleSheet()
Forward to style object.
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
News settings for containers.
Class ilContainerStartObjectsContentGUI.
Class ilContainerStartObjectsGUI.
Container start objects page GUI class.
static setBlockedForLP($a_status)
Toggle LP blocking property status.
Test certificate adapter.
const MAIL_ALLOWED_TUTORS
Class ilCourseContentGUI.
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
static _hasFields($a_container_id)
Check if there are any define fields.
static _fieldsToInfoString($a_obj_id)
Fields to info string.
static _readFilesByCourse($a_course_id)
class ilCourseObjectiveMaterials
static _getCountObjectives($a_obj_id, $a_activated_only=false)
get count objectives
static _getObjectiveIds($course_id, $a_activated_only=false)
class ilobjcourseobjectivesgui
static _getInstanceByObjId($a_obj_id, $a_usr_id)
Get singleton instance.
static getDateTimeOfPassed($a_obj_id, $a_usr_id)
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static getMemberRoles($a_ref_id)
Get member roles.
GUI class for course registrations.
static _checkRequired($a_usr_id, $a_obj_id)
Check required fields.
static formatPeriod(ilDateTime $start, ilDateTime $end)
Format a period of two date Shows: 14.
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
GUI class for didactic template settings inside repository objects.
Class ilECSCourseSettings.
static _getInstanceByType($a_type)
Get Singleton Instance.
Export User Interface Class.
static deleteRuns($a_container_id, $a_user_id)
Delete runs @global type $ilDB.
const LP_MODE_MANUAL_BY_TUTOR
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
const LP_STATUS_COMPLETED
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
static _lookupProgressByObjId($a_obj_id)
lookup progress for a specific object
static _isEnabled()
Check, if licencing is enabled This check is called from the ilAccessHandler class.
const LIC_MODE_REPOSITORY
static _getLicensedChildObjects($a_ref_id)
Get a list of all sub objects with activated licensing.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
Class ilMailMemberCourseRoles.
Class ilMailMemberSearchGUI.
This class handles base functions for mail handling.
static isActivated()
Checks whether Map feature is activated.
static getDefaultSettings()
Get default longitude, latitude and zoom.
static _hasAccepted($a_usr_id, $a_obj_id)
Check if user has accepted agreement.
static getInstance()
Get instance.
Membership notification settings.
static isActive()
Is feature active?
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
static generateCode()
Generate new registration key.
static getInstance($a_ref_id, $a_include_auto_entries)
Get instance.
static lookupRegistrationInfo($a_obj_id)
Lookup registration info @global ilDB $ilDB @global ilObjUser $ilUser @global ilLanguage $lng.
removeSmallIconObject()
remove small icon
static _modifyItemGUI($a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path, $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id=0)
We need a static version of this, e.g.
checkAgreement()
Check agreement and redirect if it is not accepted.
deliverCertificateObject()
setContentSubTabs()
Set content sub tabs.
afterSave(ilObject $a_new_object)
save object @access public
membersObject()
Called from goto?
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify Item ListGUI for presentation in container.
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add file manager link.
hasAdminPermission()
user has admin permission or "edit permission" permission on this course
editCourseIconsObject($a_form=null)
edit container icons
executeCommand()
execute command note: this method is overwritten in all container objects
updateLPFromStatus($a_member_id, $a_has_passed)
sync course status and lp status
saveNotificationObject()
:TEMP: Save notification setting (from infoscreen)
afterImport(ilObject $a_new_object)
add course admin after import file
initInfoEditor()
init info editor
editMapSettingsObject()
Edit Map Settings.
static _goto($a_target, $a_add="")
goto target course
setSubTabs($a_tab)
set sub tabs
editInfoObject(ilPropertyFormGUI $a_form=null)
Edit info page informations.
addContentTab()
Add content tab.
getLocalRoles($a_exclude=array())
createMailSignature()
Create a course mail signature.
redirectLocToTestConfirmedObject()
checkLicenses($a_keep=false)
Check the remaining licenses of course objects and generate a message if raare.
saveSortingObject()
Save Sorting.
__construct()
Constructor @access public.
setSideColumnReturn()
Set return point for side column actions.
loadDate($a_field)
load date
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
updateCourseIconsObject()
update container icons
redirectLocToTestObject($a_force_new_run=NULL)
Test redirection will be moved lo adapter.
removeBigIconObject()
remove big icon
updateObject()
Update course settings @global type $ilUser.
askResetObject()
ask reset test results
getAgreementTabs()
Get tabs for member agreement.
infoScreen()
show information screen
setShowHidePrefs()
set preferences (show/hide tabel content)
jump2UsersGalleryObject()
unsubscribeObject()
DEPRECATED?
confirmDeleteInfoFilesObject()
show info file donfimation table
removeTinyIconObject()
remove small icon
editObject(ilPropertyFormGUI $form=null)
edit object
viewObject()
list childs of current object
deleteInfoFilesObject()
Delete info files.
redirectLocToTestConfirmation($a_objective_id, $a_test_id)
Show confirmation whether user wants to start a new run or resume a previous run.
showPossibleSubObjects()
show possible sub objects selection list
renderObject()
render the object
performUnsubscribeObject()
prepareOutput($a_show_subobjects=true)
Handle member view.
getEditFormValues()
Get values for edit form.
readMemberData($ids, $selected_columns=null)
Class ilObjCourseGroupingGUI.
static _lookupViewMode($a_id)
lookup view mode of container
const STATUS_DETERMINATION_MANUAL
static _registrationEnabled($a_obj_id)
Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.
const STATUS_DETERMINATION_LP
static _isActivated($a_obj_id)
Is activated.
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, $a_back_url=null)
static _getTranslation($a_role_title)
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
GUI class for the workflow of copying objects.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
addHeaderAction()
Add header action menu.
static getInstance($a_obj_id)
GUI class for service settings (calendar, notes, comments)
const AUTO_RATING_NEW_OBJECTS
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
const CALENDAR_VISIBILITY
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
update()
update object in db
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
getId()
get object id @access public
static _lookupType($a_id, $a_reference=false)
lookup object type
static getInstanceByObjId($a_obj_id)
Get instance by obj type.
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
GUI class for public user profile presentation.
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
if(@file_exists(dirname(__FILE__).'/lang/eng.php')) $certificate
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
redirection script todo: (a better solution should control the processing via a xml file)
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file