5 require_once 
"./Services/Container/classes/class.ilContainerGUI.php";
 
   37                 $this->ctrl->saveParameter($this,array(
"ref_id",
"cmdClass"));
 
   42                 $this->lng->loadLanguageModule(
'crs');
 
   44                 $this->SEARCH_USER = 1;
 
   45                 $this->SEARCH_GROUP = 2;
 
   46                 $this->SEARCH_COURSE = 3;
 
   54                         case "deleteSubscribers":
 
   58                         case "addSubscribers":
 
   59                                 $this->addSubscribers();
 
   62                         case "addFromWaitingList":
 
   63                                 $this->addFromWaitingList();
 
   66                         case "removeFromWaitingList":
 
   85                 if(isset(
$_POST[
'btn_pressed'][
'deleteMembers']))
 
   89                 elseif(
$_POST[
'btn_pressed'][
'sendMailToSelectedUsers'])
 
  101                 if(isset(
$_GET[
'member_id']))
 
  107                         $_POST[
'member'] = array_unique(array_merge((array) 
$_POST[
'members'],
 
  108                                 (array) $_POST[
'tutors'],
 
  109                                 (array) $_POST[
'admins'],
 
  110                                 (array) $_POST[
'waiting'],
 
  111                                 (array) $_POST[
'subscribers']));
 
  115                 if (!count(
$_POST[
"member"]))
 
  125         require_once 
'Services/Mail/classes/class.ilMailFormCall.php';
 
  130                                 'rcp_to' => implode(
',',$rcps),
 
  145                 #ilUtil::sendSuccess($this->lng->txt("action_aborted"),true); 
  154                 if(!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"],
'crs'))
 
  156                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_create"),$this->ilias->error_obj->MESSAGE);
 
  158                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_create.html",
'Modules/Course');
 
  160                 $this->ctrl->setParameter($this, 
"new_type",
'crs');
 
  161                 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this, 
"save"));
 
  163                 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt(
"crs_new"));
 
  164                 $this->tpl->setVariable(
"TYPE_IMG",
 
  166                 $this->tpl->setVariable(
"ALT_IMG", $this->lng->txt(
"obj_crs"));
 
  167                 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
  168                 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"crs_add"));
 
  169                 $this->tpl->setVariable(
"CMD_SUBMIT", 
"save");
 
  170                 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
 
  171                 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'title'));
 
  172                 $this->tpl->setVariable(
"TXT_DESC",$this->lng->txt(
'desc'));
 
  175                 $this->tpl->setVariable(
'CRS_NEW',$this->form_gui->getHTML());
 
  178                 $this->tpl->setVariable(
"IMPORT_FORM", $this->form->getHTML());
 
  190                 $lng->loadLanguageModule(
"form");
 
  191                 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  193                 $this->form_gui->setTableWidth(
"600px");
 
  194                 $this->form_gui->setTitle($lng->txt(
"crs_new"));
 
  196                 $this->form_gui->setFormAction($ilCtrl->getFormAction($this));
 
  201                 $type_input->setValue(
"crs");
 
  202                 $this->form_gui->addItem($type_input);
 
  207                 $title_input->setMaxLength(128);
 
  208                 $this->form_gui->addItem($title_input);
 
  212                 $this->form_gui->addItem($desc_input);
 
  215                 $this->form_gui->addCommandButton(
"save", $lng->txt(
"save"));
 
  216                 $this->form_gui->addCommandButton(
"cancel", $lng->txt(
"cancel"));
 
  228                 $lng->loadLanguageModule(
"crs");
 
  230                 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  232                 $this->form->setTableWidth(
'600px');
 
  233                 $this->form->setTarget(
"_top");
 
  236                 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
  239                 $fi->setRequired(
true);
 
  240                 $this->form->addItem($fi);
 
  242                 $this->form->addCommandButton(
"importFile", $lng->txt(
"import"));
 
  243                 $this->form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
 
  244                 $this->form->setTitle($lng->txt($a_new_type.
"_import"));
 
  246                 $this->form->setFormAction($ilCtrl->getFormAction($this));
 
  257                 if($new_id = parent::importFileObject())
 
  261                         $part->updateNotification($ilUser->getId(),1);
 
  264                         $this->ctrl->returnToParent($this);
 
  271                 $this->ctrl->setCmd(
"view");
 
  289                                 include_once 
'./Modules/Course/classes/class.ilCourseContentGUI.php';
 
  291                                 $this->ctrl->setCmdClass(get_class($course_content_obj));
 
  292                                 $this->ctrl->setCmd(
'editUserTimings');
 
  293                                 $this->ctrl->forwardCommand($course_content_obj);
 
  304                 global $rbacsystem, $ilUser, 
$ilCtrl;
 
  314                 if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui")
 
  321                 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
 
  325                 include_once 
'Services/Tracking/classes/class.ilLearningProgress.php';
 
  327                         $this->
object->getRefId(),
'crs');
 
  331                         include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
 
  332                         $this->ctrl->setReturn($this,
'view_content');
 
  334                         $this->ctrl->setCmdClass(get_class($agreement));
 
  335                         $this->ctrl->forwardCommand($agreement);
 
  357                         include_once 
'./Modules/Course/classes/class.ilCourseContentGUI.php';
 
  360                         $this->ctrl->setCmdClass(get_class($course_content_obj));
 
  361                         $this->ctrl->forwardCommand($course_content_obj);
 
  379                 $this->ctrl->setCmd(
"showSummary");
 
  380                 $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
  401                 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
 
  404                 $this->tabs_gui->setTabActive(
'info_short');
 
  406                 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
  407                 include_once 
'Modules/Course/classes/class.ilCourseFile.php';
 
  412                 $info->enablePrivateNotes();
 
  413                 $info->enableFeedback();
 
  415                 if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]))
 
  417                         $info->enableNewsEditing();
 
  421                 if(strlen($this->object->getImportantInformation()) or
 
  422                    strlen($this->object->getSyllabus()) or
 
  425                         $info->addSection($this->lng->txt(
'crs_general_informations'));
 
  428                 if(strlen($this->object->getImportantInformation()))
 
  430                         $info->addProperty($this->lng->txt(
'crs_important_info'),
 
  434                 if(strlen($this->object->getSyllabus()))
 
  436                         $info->addProperty($this->lng->txt(
'crs_syllabus'), nl2br(
 
  442                         $tpl = 
new ilTemplate(
'tpl.event_info_file.html',
true,
true,
'Modules/Course');
 
  446                                 $tpl->setCurrentBlock(
"files");
 
  447                                 $this->ctrl->setParameter($this,
'file_id',$file->getFileId());
 
  448                                 $tpl->setVariable(
"DOWN_LINK",$this->ctrl->getLinkTarget($this,
'sendfile'));
 
  449                                 $tpl->setVariable(
"DOWN_NAME",$file->getFileName());
 
  450                                 $tpl->setVariable(
"DOWN_INFO_TXT",$this->lng->txt(
'crs_file_size_info'));
 
  451                                 $tpl->setVariable(
"DOWN_SIZE",$file->getFileSize());
 
  452                                 $tpl->setVariable(
"TXT_BYTES",$this->lng->txt(
'bytes'));
 
  453                                 $tpl->parseCurrentBlock();
 
  455                         $info->addProperty($this->lng->txt(
'crs_file_download'),
 
  459                 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
  462                 $record_gui->parse();
 
  465                 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
 
  468                 if($this->object->hasContactData())
 
  470                         $info->addSection($this->lng->txt(
"crs_contact"));
 
  472                 if(strlen($this->object->getContactName()))
 
  474                         $info->addProperty($this->lng->txt(
"crs_contact_name"),
 
  475                                                            $this->
object->getContactName());
 
  477                 if(strlen($this->object->getContactResponsibility()))
 
  479                         $info->addProperty($this->lng->txt(
"crs_contact_responsibility"),
 
  480                                                            $this->
object->getContactResponsibility());
 
  482                 if(strlen($this->object->getContactPhone()))
 
  484                         $info->addProperty($this->lng->txt(
"crs_contact_phone"),
 
  485                                                            $this->
object->getContactPhone());
 
  487                 if($this->object->getContactEmail())
 
  489             require_once 
'Services/Mail/classes/class.ilMailFormCall.php';
 
  490                         $emails = split(
",",$this->object->getContactEmail());
 
  491                         foreach ($emails as $email) {
 
  492                                 $email = trim($email);
 
  493                                 $etpl = 
new ilTemplate(
"tpl.crs_contact_email.html", 
true, 
true , 
'Modules/Course');
 
  496                                 $etpl->setVariable(
"CONTACT_EMAIL", $email);                            
 
  497                                 $mailString .= $etpl->get().
"<br />";
 
  499                         $info->addProperty($this->lng->txt(
"crs_contact_email"), $mailString);
 
  501                 if(strlen($this->object->getContactConsultation()))
 
  503                         $info->addProperty($this->lng->txt(
"crs_contact_consultation"),
 
  504                                                            nl2br($this->object->getContactConsultation()));
 
  509                 $info->addSection($this->lng->txt(
"access"));
 
  510                 $info->showLDAPRoleGroupMappingInfo();
 
  513                 if($this->object->getOfflineStatus())
 
  515                         $info->addProperty($this->lng->txt(
'crs_visibility'),
 
  516                                                            $this->lng->txt(
'crs_visibility_unvisible'));
 
  518                 elseif($this->object->getActivationUnlimitedStatus())
 
  520                         $info->addProperty($this->lng->txt(
"crs_visibility"),
 
  521                                 $this->lng->txt(
'crs_unlimited'));
 
  525                         $info->addProperty($this->lng->txt(
'crs_visibility'),
 
  531                 switch($this->object->getSubscriptionLimitationType())
 
  534                                 $txt = $this->lng->txt(
"crs_info_reg_deactivated");
 
  538                                 switch($this->object->getSubscriptionType())
 
  541                                                 $txt = $this->lng->txt(
"crs_info_reg_confirmation");
 
  544                                                 $txt = $this->lng->txt(
"crs_info_reg_direct");
 
  547                                                 $txt = $this->lng->txt(
"crs_info_reg_password");
 
  553                 $info->addProperty($this->lng->txt(
"crs_info_reg"),$txt);
 
  558                         if($this->object->getSubscriptionUnlimitedStatus())
 
  560                                 $info->addProperty($this->lng->txt(
"crs_reg_until"),
 
  561                                                                    $this->lng->txt(
'crs_unlimited'));
 
  563                         elseif($this->object->getSubscriptionStart() < time())
 
  565                                 $info->addProperty($this->lng->txt(
"crs_reg_until"),
 
  566                                                                    $this->lng->txt(
'crs_to').
' '.
 
  569                         elseif($this->object->getSubscriptionStart() > time())
 
  571                                 $info->addProperty($this->lng->txt(
"crs_reg_until"),
 
  572                                                                    $this->lng->txt(
'crs_from').
' '.
 
  575                         if ($this->object->isSubscriptionMembershipLimited()) 
 
  577                                 $info->addProperty($this->lng->txt(
"mem_free_places"),
 
  578                                                                    max(0,$this->object->getSubscriptionMaxMembers()- count($this->object->getMembers())));
 
  589                                 $info->addProperty($this->lng->txt(
"crs_archive"),
 
  596                 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
  599                 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
 
  602                         include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
 
  606                         $this->lng->loadLanguageModule(
'ps');
 
  607                         $info->addSection($this->lng->txt(
'crs_user_agreement_info'));
 
  608                         $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
 
  612                                 $info->addProperty($this->lng->txt(
'ps_crs_user_fields'),$fields);
 
  616                 $info->enableLearningProgress(
true);
 
  619                 $this->ctrl->forwardCommand($info);
 
  624                 include_once 
'./Modules/Course/classes/class.ilCourseStart.php';
 
  637                 $this->tabs_gui->setTabActive(
'settings');
 
  638                 $this->tabs_gui->setSubTabActive(
'crs_start_objects');
 
  641                 $crs_start =& 
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
 
  643                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_list_starter.html",
'Modules/Course');
 
  644                 $this->tpl->addBlockfile(
"BUTTONS", 
"buttons", 
"tpl.buttons.html");
 
  646                 if(!count($starter = $crs_start->getStartObjects()))
 
  648                         $this->tpl->setCurrentBlock(
"btn_cell");
 
  649                         $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTarget($this,
'selectStarter'));
 
  650                         $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
'crs_add_starter'));
 
  651                         $this->tpl->parseCurrentBlock();
 
  658                 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
  660                 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'obj_crs'));
 
  661                 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'crs_edit_start_objects'));
 
  662                 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
 
  663                 $this->tpl->setVariable(
"HEADER_OPT",$this->lng->txt(
'options'));
 
  664                 $this->tpl->setVariable(
"BTN_ADD",$this->lng->txt(
'crs_add_starter'));
 
  667                 foreach($starter as $start_id => 
$data)
 
  671                         if(strlen($tmp_obj->getDescription()))
 
  673                                 $this->tpl->setCurrentBlock(
"description");
 
  674                                 $this->tpl->setVariable(
"DESCRIPTION_STARTER",$tmp_obj->getDescription());
 
  675                                 $this->tpl->parseCurrentBlock();
 
  678                         $this->tpl->setCurrentBlock(
"starter_row");
 
  680                         $this->tpl->setVariable(
"STARTER_TITLE",$tmp_obj->getTitle());
 
  682                         $this->ctrl->setParameter($this,
'del_starter',$start_id);
 
  683                         $this->tpl->setVariable(
"DELETE_LINK",$this->ctrl->getLinkTarget($this,
'deleteStarter'));
 
  684                         $this->tpl->setVariable(
"DELETE_ALT",$this->lng->txt(
'delete'));
 
  685                         $this->tpl->parseCurrentBlock();
 
  691                 include_once 
'./Modules/Course/classes/class.ilCourseStart.php';
 
  702                 $crs_start =& 
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
 
  714                 include_once 
'./Modules/Course/classes/class.ilCourseStart.php';
 
  717                 $this->tabs_gui->setTabActive(
'settings');
 
  718                 $this->tabs_gui->setSubTabActive(
'crs_start_objects');
 
  729                 $crs_start =& 
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
 
  731                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_add_starter.html",
'Modules/Course');
 
  733                 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
  735                 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'obj_crs'));
 
  736                 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'crs_select_starter'));
 
  737                 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
 
  738                 $this->tpl->setVariable(
"BTN_ADD",$this->lng->txt(
'crs_add_starter'));
 
  739                 $this->tpl->setVariable(
"BTN_CANCEL",$this->lng->txt(
'cancel'));
 
  742                 $this->
object->initCourseItemObject();
 
  744                 foreach($crs_start->getPossibleStarters($this->object->items_obj) as $item_ref_id)
 
  748                         if(strlen($tmp_obj->getDescription()))
 
  750                                 $this->tpl->setCurrentBlock(
"description");
 
  751                                 $this->tpl->setVariable(
"DESCRIPTION_STARTER",$tmp_obj->getDescription());
 
  752                                 $this->tpl->parseCurrentBlock();
 
  755                         $this->tpl->setCurrentBlock(
"starter_row");
 
  758                         $this->tpl->setVariable(
"STARTER_TITLE",$tmp_obj->getTitle());
 
  759                         $this->tpl->parseCurrentBlock();
 
  765                 include_once 
'./Modules/Course/classes/class.ilCourseStart.php';
 
  776                 if(!count(
$_POST[
'starter']))
 
  784                 $crs_start =& 
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
 
  786                 foreach(
$_POST[
'starter'] as $item_ref_id)
 
  788                         if(!$crs_start->exists($item_ref_id))
 
  791                                 $crs_start->
add($item_ref_id);
 
  818                 include_once 
'Modules/Course/classes/class.ilCourseFile.php';
 
  830                 $this->tabs_gui->setTabActive(
'settings');
 
  831                 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
 
  834                 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit_info.html',
'Modules/Course');
 
  835                 $this->tpl->setVariable(
'INFO_TABLE',$this->form->getHTML());
 
  844                         $table_data[
'id'] = $file->getFileId();
 
  845                         $table_data[
'filename'] = $file->getFileName();
 
  846                         $table_data[
'filetype'] = $file->getFileType();
 
  847                         $table_data[
'filesize'] = $file->getFileSize();
 
  849                         $rows[] = $table_data; 
 
  852                 include_once(
"./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
 
  854                 $table_gui->setTitle($this->lng->txt(
"crs_info_download"));
 
  855                 $table_gui->setData($rows);
 
  856                 $table_gui->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
  857                 $table_gui->addMultiCommand(
"confirmDeleteInfoFiles", $this->lng->txt(
"delete"));
 
  858                 $table_gui->setSelectAllCheckbox(
"file_id");
 
  859                 $this->tpl->setVariable(
'INFO_FILE_TABLE',$table_gui->getHTML());
 
  874                 if(!count(
$_POST[
'file_id']))
 
  882                 $this->tabs_gui->setTabActive(
'settings');
 
  883                 $this->tabs_gui->setSubTabActive(
'crs_info_settings');
 
  885                 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  889                 $c_gui->setFormAction($this->ctrl->getFormAction($this, 
"deleteInfoFiles"));
 
  890                 $c_gui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
  891                 $c_gui->setCancel($this->lng->txt(
"cancel"), 
"editInfo");
 
  892                 $c_gui->setConfirm($this->lng->txt(
"confirm"), 
"deleteInfoFiles");
 
  895                 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
 
  896                 foreach(
$_POST[
"file_id"] as $file_id)
 
  899                         $c_gui->addItem(
"file_id[]", $file_id, 
$file->getFileName());
 
  902                 $this->tpl->setContent($c_gui->getHTML());
 
  913                 if(!count(
$_POST[
'file_id']))
 
  919                 include_once(
'Modules/Course/classes/class.ilCourseFile.php');
 
  921                 foreach(
$_POST[
'file_id'] as $file_id)
 
  924                         if($this->object->getId() == 
$file->getCourseId())
 
  943                 if(is_object($this->form))
 
  948                 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  950                 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
 
  951                 $this->form->setMultipart(
true);
 
  952                 $this->form->setTitle($this->lng->txt(
'crs_general_info'));
 
  953                 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
 
  954                 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
 
  957                 $area->
setValue($this->object->getImportantInformation());
 
  960                 $this->form->addItem($area);
 
  963                 $area->
setValue($this->object->getSyllabus());
 
  966                 $this->form->addItem($area);
 
  969                 $section->setTitle($this->lng->txt(
'crs_info_download'));
 
  973                 $file->enableFileNameSelection(
'file_name');
 
  974                 $this->form->addItem(
$file);
 
  977                 $section->setTitle($this->lng->txt(
'crs_contact'));
 
  980                 $text = 
new ilTextInputGUI($this->lng->txt(
'crs_contact_name'),
'contact_name');
 
  981                 $text->
setValue($this->object->getContactName());
 
  983                 $text->setMaxLength(70);
 
  984                 $this->form->addItem($text);
 
  986                 $text = 
new ilTextInputGUI($this->lng->txt(
'crs_contact_responsibility'),
'contact_responsibility');
 
  987                 $text->
setValue($this->object->getContactResponsibility());
 
  989                 $text->setMaxLength(70);
 
  990                 $this->form->addItem($text);
 
  992                 $text = 
new ilTextInputGUI($this->lng->txt(
'crs_contact_phone'),
'contact_phone');
 
  993                 $text->
setValue($this->object->getContactPhone());
 
  995                 $text->setMaxLength(40);
 
  996                 $this->form->addItem($text);
 
  998                 $text = 
new ilTextInputGUI($this->lng->txt(
'crs_contact_email'),
'contact_email');
 
  999                 $text->
setValue($this->object->getContactEmail());
 
 1000                 $text->setInfo($this->lng->txt(
'crs_contact_email_info'));
 
 1002                 $text->setMaxLength(255);
 
 1003                 $this->form->addItem($text);
 
 1005                 $area = 
new ilTextAreaInputGUI($this->lng->txt(
'crs_contact_consultation'),
'contact_consultation');
 
 1006                 $area->
setValue($this->object->getContactConsultation());
 
 1009                 $this->form->addItem($area);
 
 1011                 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
 1014                 $record_gui->parse();
 
 1030                 include_once 
'Modules/Course/classes/class.ilCourseFile.php';
 
 1032                 $file_obj->setCourseId($this->object->getId());
 
 1033                 $file_obj->setFileName(strlen(
$_POST[
'file_name']) ?
 
 1035                                                            $_FILES[
'file'][
'name']);
 
 1036                 $file_obj->setFileSize($_FILES[
'file'][
'size']);
 
 1037                 $file_obj->setFileType($_FILES[
'file'][
'type']);
 
 1038                 $file_obj->setTemporaryName($_FILES[
'file'][
'tmp_name']);
 
 1039                 $file_obj->setErrorCode($_FILES[
'file'][
'error']);
 
 1049                 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
 
 1051                         'crs',$this->object->getId());
 
 1055                 $ilErr->setMessage(
'');
 
 1056                 $file_obj->validate();
 
 1057                 $this->
object->validateInfoSettings();
 
 1059                 if(strlen($ilErr->getMessage()))
 
 1065                 $this->
object->update();
 
 1066                 $file_obj->create();
 
 1067                 $record_gui->saveValues();
 
 1069                 $this->
object->updateECSContent();
 
 1081                 $activation_start = $this->
loadDate(
'activation_start');
 
 1082                 $activation_end = $this->
loadDate(
'activation_end');
 
 1083                 $subscription_start = $this->
loadDate(
'subscription_start');
 
 1084                 $subscription_end = $this->
loadDate(
'subscription_end');
 
 1085                 $archive_start = $this->
loadDate(
'archive_start');
 
 1086                 $archive_end = $this->
loadDate(
'archive_end');
 
 1088                 $this->
object->setActivationType((
int) 
$_POST[
'activation_type']);
 
 1089                 $this->
object->setActivationStart($activation_start->get(
IL_CAL_UNIX));
 
 1090                 $this->
object->setActivationEnd($activation_end->get(
IL_CAL_UNIX));
 
 1091                 $this->
object->setSubscriptionLimitationType((
int) $_POST[
'subscription_limitation_type']);
 
 1092                 $this->
object->setSubscriptionType((
int) $_POST[
'subscription_type']);
 
 1094                 $this->
object->setSubscriptionStart($subscription_start->get(
IL_CAL_UNIX));
 
 1095                 $this->
object->setSubscriptionEnd($subscription_end->get(
IL_CAL_UNIX));
 
 1096                 $this->
object->enableSubscriptionMembershipLimitation((
int) $_POST[
'subscription_membership_limitation']);
 
 1097                 $this->
object->setSubscriptionMaxMembers((
int) $_POST[
'subscription_max']);
 
 1098                 $this->
object->enableRegistrationAccessCode((
int) $_POST[
'reg_code_enabled']);
 
 1100                 $this->
object->enableWaitingList((
int) $_POST[
'waiting_list']);
 
 1101                 #$this->object->setSubscriptionNotify((int) $_POST['subscription_notification']); 
 1102                 $this->
object->setViewMode((
int) $_POST[
'view_mode']);
 
 1110                         $this->
object->setOrderType((
int) $_POST[
'order_type']);
 
 1112                 $this->
object->setArchiveStart($archive_start->get(
IL_CAL_UNIX));
 
 1113                 $this->
object->setArchiveEnd($archive_end->get(
IL_CAL_UNIX));
 
 1114                 $this->
object->setArchiveType($_POST[
'archive_type']);
 
 1115                 $this->
object->setAboStatus((
int) $_POST[
'abo']);
 
 1116                 $this->
object->setShowMembers((
int) $_POST[
'show_members']);
 
 1118                 $this->
object->enableSessionLimit((
int) $_POST[
'sl']);
 
 1119                 $this->
object->setNumberOfPreviousSessions(is_numeric($_POST[
'sp']) ? (
int) $_POST[
'sp'] : -1 );
 
 1120                 $this->
object->setNumberOfnextSessions(is_numeric($_POST[
'sn']) ? (
int) $_POST[
'sn'] : -1 );
 
 1122                 if($this->object->validate())
 
 1124                         $this->
object->update();
 
 1127                         require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
 1144                         $this->ctrl->redirect($this,
'edit');
 
 1164                 include_once(
'./Services/WebServices/ECS/classes/class.ilECSSettings.php');
 
 1168                 if(!$ecs_settings->isEnabled())
 
 1179                         $this->
object->handleECSSettings((
bool) 
$_POST[
'ecs_export'],(
int) $_POST[
'ecs_owner'],(array) $_POST[
'ecs_mids']);
 
 1182                         include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
 
 1183                         $export = 
new ilECSExport($this->object->getId());
 
 1184                         if($export->isExported())
 
 1187                                 $rbacadmin->grantPermission($ecs_settings->getGlobalRole(),
 
 1189                                         $this->
object->getRefId());
 
 1194                                 $rbacadmin->revokePermission($this->object->getRefId(),
 
 1195                                         $ecs_settings->getGlobalRole());
 
 1223                 $this->tabs_gui->setTabActive(
'settings');
 
 1224                 $this->tabs_gui->setSubTabActive(
'crs_settings');
 
 1228                 $this->tpl->setContent($this->form->getHTML());
 
 1240                 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
 
 1241                 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
 
 1243                 if(!is_object($this->form))
 
 1248                 $this->form->setTitle($this->lng->txt(
'crs_edit'));
 
 1251                 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
 
 1252                 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
 
 1254                 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
 
 1258                 $title->setSubmitFormOnEnter(
true);
 
 1259                 $title->setValue($this->object->getTitle());
 
 1261                 $title->setMaxLength(128);
 
 1262                 $title->setRequired(
true);
 
 1263                 $this->form->addItem(
$title);
 
 1267                 $desc->
setValue($this->object->getLongDescription());
 
 1270                 $this->form->addItem($desc);
 
 1274                 $act_type->
setValue($this->object->getActivationType());
 
 1277                         $opt->
setInfo($this->lng->txt(
'crs_availability_unvisible_info'));
 
 1278                         $act_type->addOption($opt);
 
 1281                         $opt->
setInfo($this->lng->txt(
'crs_availability_limitless_info'));
 
 1282                         $act_type->addOption($opt);
 
 1285                         $opt->
setInfo($this->lng->txt(
'crs_availability_until_info'));
 
 1288                                 #$start->setMode(ilDateTimeInputGUI::MODE_INPUT); 
 1292                                 $opt->addSubItem($start);
 
 1295                                 #$end->setMode(ilDateTimeInputGUI::MODE_INPUT); 
 1299                                 $opt->addSubItem($end);
 
 1301                         $act_type->addOption($opt);
 
 1303                 $this->form->addItem($act_type);
 
 1306                 $section->setTitle($this->lng->txt(
'crs_reg'));
 
 1309                 $reg_type = 
new ilRadioGroupInputGUI($this->lng->txt(
'crs_reg_period'),
'subscription_limitation_type');
 
 1310                 $reg_type->
setValue($this->object->getSubscriptionLimitationType());            
 
 1313                         $opt->
setInfo($this->lng->txt(
'crs_registration_deactivated'));
 
 1314                         $reg_type->addOption($opt);
 
 1317                         $opt->
setInfo($this->lng->txt(
'crs_reg_unlim_info'));
 
 1318                         $reg_type->addOption($opt);
 
 1321                         $opt->
setInfo($this->lng->txt(
'crs_reg_lim_info'));
 
 1327                                 $opt->addSubItem($start);
 
 1333                                 $opt->addSubItem($end);
 
 1335                         $reg_type->addOption($opt);
 
 1337                 $this->form->addItem($reg_type);
 
 1341                 $reg_proc = 
new ilRadioGroupInputGUI($this->lng->txt(
'crs_registration_type'),
'subscription_type');
 
 1342                 $reg_proc->
setValue($this->object->getSubscriptionType());
 
 1343                 $reg_proc->setInfo($this->lng->txt(
'crs_reg_type_info'));
 
 1346                         $reg_proc->addOption($opt);
 
 1349                         $reg_proc->addOption($opt);
 
 1354                                 $pass->setSubmitFormOnEnter(
true);
 
 1356                                 $pass->setMaxLength(12);
 
 1357                                 $pass->
setValue($this->object->getSubscriptionPassword());
 
 1359                         $opt->addSubItem($pass);
 
 1360                         $reg_proc->addOption($opt);
 
 1362                 $this->form->addItem($reg_proc);
 
 1366                 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
 
 1367                 $reg_code->setValue(1);
 
 1368                 $reg_code->setInfo($this->lng->txt(
'crs_reg_code_enabled_info'));
 
 1369                 $reg_code->setOptionTitle($this->lng->txt(
'crs_reg_code'));
 
 1377                 #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link')); 
 1379                 if(!$this->object->getRegistrationAccessCode())
 
 1381                         include_once 
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
 
 1385                 $reg_link->setValue($this->object->getRegistrationAccessCode());
 
 1386                 $this->form->addItem($reg_link);
 
 1390                 include_once 
'./classes/class.ilLink.php';
 
 1391                 $val = 
ilLink::_getLink($this->object->getRefId(),$this->
object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode()); 
 
 1392                 $link->setHTML(
'<font class="small">'.$val.
'</font>');
 
 1393                 $reg_code->addSubItem($link);
 
 1395                 $this->form->addItem($reg_code);
 
 1399                 $lim = 
new ilCheckboxInputGUI($this->lng->txt(
'crs_subscription_max_members_short'),
'subscription_membership_limitation');
 
 1401                 $lim->setOptionTitle($this->lng->txt(
'crs_subscription_max_members'));
 
 1402                 $lim->setChecked($this->object->isSubscriptionMembershipLimited());
 
 1405                         $max->setSubmitFormOnEnter(
true);
 
 1407                         $max->setMaxLength(4);
 
 1408                         $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->
object->getSubscriptionMaxMembers() : 
'');
 
 1409                         $max->setTitle($this->lng->txt(
'members').
':');
 
 1410                         $max->setInfo($this->lng->txt(
'crs_reg_max_info'));
 
 1412                 $lim->addSubItem($max);
 
 1415                         $wait->setOptionTitle($this->lng->txt(
'crs_waiting_list'));
 
 1416                         $wait->setChecked($this->object->enabledWaitingList());
 
 1417                         $wait->setInfo($this->lng->txt(
'crs_wait_info'));
 
 1418                         $lim->addSubItem($wait);
 
 1420                 $this->form->addItem($lim);
 
 1424                 $pres->setTitle($this->lng->txt(
'crs_view_mode'));
 
 1426                 $this->form->addItem($pres);
 
 1430                 $view_type->
setValue($this->object->getViewMode());
 
 1433                         $opt->
setInfo($this->lng->txt(
'cntr_view_info_sessions'));
 
 1434                         $view_type->addOption($opt);
 
 1437                         $opt->
setInfo($this->lng->txt(
'cntr_view_info_simple'));
 
 1438                         $view_type->addOption($opt);
 
 1441                         $opt->
setInfo($this->lng->txt(
'cntr_view_info_by_type'));
 
 1442                         $view_type->addOption($opt);
 
 1445                         $opt->
setInfo($this->lng->txt(
'crs_view_info_objective'));
 
 1446                         $view_type->addOption($opt);
 
 1449                         $opt->
setInfo($this->lng->txt(
'crs_view_info_timing'));
 
 1450                         $view_type->addOption($opt);
 
 1475                 $this->form->addItem($view_type);
 
 1479                 $sort->
setValue($this->object->getOrderType());
 
 1482                         $opt->
setInfo($this->lng->txt(
'crs_sort_title_info'));
 
 1483                         $sort->addOption($opt);
 
 1486                         $opt->
setInfo($this->lng->txt(
'crs_sort_manual_info'));
 
 1487                         $sort->addOption($opt);
 
 1490                         $opt->
setInfo($this->lng->txt(
'crs_sort_timing_info'));
 
 1491                         $sort->addOption($opt);
 
 1494                 $this->form->addItem($sort);
 
 1498                 $sess->setChecked($this->object->isSessionLimitEnabled());
 
 1499                 $sess->setInfo($this->lng->txt(
'sess_limit_info'));
 
 1502                         #$prev->setSubmitFormOnEnter(true); 
 1504                         $prev->setValue($this->object->getNumberOfPreviousSessions() == -1 ?
 
 1506                                 $this->
object->getNumberOfPreviousSessions()
 
 1509                         $prev->setMaxLength(3);
 
 1510                         $sess->addSubItem($prev);
 
 1513                         #$next->setSubmitFormOnEnter(true); 
 1515                         $next->setValue($this->object->getNumberOfNextSessions() == -1 ?
 
 1517                                 $this->
object->getNumberOfnextSessions()
 
 1520                         $next->setMaxLength(3);
 
 1521                         $sess->addSubItem($next);
 
 1523                 $this->form->addItem(
$sess);
 
 1526                 $further->setTitle($this->lng->txt(
'crs_further_settings'));
 
 1527                 $this->form->addItem($further);
 
 1529                 $desk = 
new ilCheckboxInputGUI($this->lng->txt(
'crs_add_remove_from_desktop'),
'abo');
 
 1530                 $desk->
setChecked($this->object->getAboStatus());
 
 1531                 $desk->setInfo($this->lng->txt(
'crs_add_remove_from_desktop_info'));
 
 1532                 $this->form->addItem($desk);
 
 1535                 $mem->
setChecked($this->object->getShowMembers());
 
 1536                 $mem->setInfo($this->lng->txt(
'crs_show_members_info'));
 
 1537                 $this->form->addItem($mem);
 
 1553                 include_once(
'./Services/WebServices/ECS/classes/class.ilECSSettings.php');
 
 1557                 if(!$ecs_settings->isEnabled())
 
 1562                 $this->lng->loadLanguageModule(
'ecs');
 
 1565                 $ecs->setTitle($this->lng->txt(
'ecs_export'));
 
 1566                 $this->form->addItem($ecs);
 
 1568                 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
 
 1569                 $ecs_export = 
new ilECSExport($this->object->getId());
 
 1572                 $exp->setRequired(
true);
 
 1573                 $exp->setValue($ecs_export->isExported() ? 1 : 0);
 
 1575                         $off = 
new ilRadioOption($this->lng->txt(
'ecs_export_disabled'),0);
 
 1576                         $exp->addOption($off);
 
 1578                         $on = 
new ilRadioOption($this->lng->txt(
'ecs_export_enabled'),1);
 
 1579                         $exp->addOption($on);
 
 1581                 $this->form->addItem($exp);
 
 1587                         if($ecs_export->getEContentId())
 
 1589                                 include_once(
'./Services/WebServices/ECS/classes/class.ilECSEContentReader.php');
 
 1592                                 $econtent_reader->
read();
 
 1593                                 if($content = $econtent_reader->getEContent())
 
 1595                                         $members = $content[0]->getParticipants();
 
 1596                                         $owner = $content[0]->getOwner();
 
 1600                         include_once(
'./Services/WebServices/ECS/classes/class.ilECSCommunityReader.php');
 
 1602                         if(count($parts = 
$reader->getPublishableParticipants()) > 1)
 
 1604                                 $ilLog->write(__METHOD__.
': Found '.count($parts).
' participants for publishing');
 
 1605                                 #$publish_as = new ilCustomInputGUI('',''); 
 1606                                 #$publish_as->setHtml('<strong>'.$this->lng->txt('ecs_publish_as').'</strong>'); 
 1608                                 #$publish_as = new ilCheckboxGroupInputGUI( 
 1609                                 #       $this->lng->txt('ecs_publish_as'), 
 1616                                 foreach($parts as $participant)
 
 1618                                         $community = 
$reader->getCommunityById($participant->getCommunityId());
 
 1620                                         $part = 
new ilRadioOption($community->getTitle(),$participant->getMID());
 
 1621                                         $part->
setInfo($community->getDescription());
 
 1622                                         $coms->addOption($part);
 
 1624                                 #$publish_as->addSubItem($coms); 
 1625                                 #$on->addSubItem($publish_as); 
 1626                                 $on->addSubItem($coms);
 
 1631                                 $ilLog->write(__METHOD__.
': Found '.count($parts).
' participants for publishing');
 
 1633                                 $owner_ids = 
$reader->getOwnMIDs();
 
 1634                                 $hidden->setValue($owner_ids[0]);
 
 1635                                 $this->form->addItem($hidden);
 
 1638                         #$publish_for = new ilCustomInputGUI('',''); 
 1640                         $publish_for->
setValue((array) $members);
 
 1642                         #$publish_for->setHtml('<strong>'.$this->lng->txt('ecs_publish_for').'</strong>'); 
 1644                         foreach(
$reader->getEnabledParticipants() as $participant)
 
 1646                                 $community = 
$reader->getCommunityById($participant->getCommunityId());
 
 1649                                         $community->getTitle().
': '.$participant->getParticipantName(),
 
 1655                                         $community->getTitle().
': '.$participant->getParticipantName(),
 
 1656                                         $participant->getMID()
 
 1658                                 $publish_for->addOption($com);                                  
 
 1661                                 #$com = new ilCheckboxInputGUI('111','ecs_mids[]'); 
 1662                                 #$com->setOptionTitle($community->getTitle().': '.$participant->getParticipantName()); 
 1663                                 #$com->setValue($participant->getMID()); 
 1664                                 #$com->setChecked(in_array($participant->getMID(),$members)); 
 1665                                 #$publish_for->addSubItem($com); 
 1672                         $ilLog->write(__METHOD__.
': Error connecting to ECS server. '.$exc->getMessage());
 
 1677                         $ilLog->write(__METHOD__.
': Error parsing ECS query: '.$exc->getMessage());
 
 1699                 $this->tabs_gui->setTabActive(
'settings');
 
 1701                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_edit_icons.html",
'Modules/Course');
 
 1703                 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
'updateCourseIcons'));
 
 1704                 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
 1705                 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
 
 1706                 $this->tpl->setVariable(
"CMD_CANCEL", 
"cancel");
 
 1707                 $this->tpl->setVariable(
"CMD_SUBMIT", 
"updateCourseIcons");
 
 1708                 $this->tpl->parseCurrentBlock();
 
 1713                 include_once 
'Modules/Course/classes/class.ilCourseFile.php';
 
 1729                 if ($this->ilias->getSetting(
"custom_icons"))
 
 1731                         $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
 
 1732                                 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
 
 1736                 $this->ctrl->redirect($this,
"editCourseIcons");
 
 1746                 global $rbacsystem,$ilUser,$ilAccess;
 
 1751                                 $this->tabs_gui->addSubTabTarget(
"crs_settings",
 
 1752                                                                                                  $this->ctrl->getLinkTarget($this,
'edit'),
 
 1753                                                                                                  "edit", get_class($this));
 
 1755                                 $this->tabs_gui->addSubTabTarget(
"crs_info_settings",
 
 1756                                                                                                  $this->ctrl->getLinkTarget($this,
'editInfo'),
 
 1757                                                                                                  "editInfo", get_class($this));
 
 1759                                 $this->tabs_gui->addSubTabTarget(
"preconditions",
 
 1760                                                                                                  $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
 
 1761                                                                                                  "", 
"ilConditionHandlerInterface");
 
 1762                                 $this->tabs_gui->addSubTabTarget(
"crs_start_objects",
 
 1763                                                                                                  $this->ctrl->getLinkTarget($this,
'listStructure'),
 
 1764                                                                                                  "listStructure", get_class($this));
 
 1765                                 $this->tabs_gui->addSubTabTarget(
'groupings',
 
 1766                                                                                                  $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
 
 1771                                 if ($this->ilias->getSetting(
"custom_icons"))
 
 1773                                         $this->tabs_gui->addSubTabTarget(
"icon_settings",
 
 1774                                                                                                          $this->ctrl->getLinkTarget($this,
'editCourseIcons'),
 
 1775                                                                                                          "editCourseIcons", get_class($this));
 
 1779                                 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
 
 1782                                         $this->tabs_gui->addSubTabTarget(
"crs_map_settings",
 
 1783                                                  $this->ctrl->getLinkTarget($this,
'editMapSettings'),
 
 1784                                                  "editMapSettings", get_class($this));
 
 1788                                 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
 1789                                 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
 
 1793                                         $this->tabs_gui->addSubTabTarget(
'crs_custom_user_fields',
 
 1794                                                                                                         $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
 
 1796                                                                                                         'ilobjectcustomuserfieldsgui');
 
 1800                         case "item_activation":
 
 1801                                 $this->tabs_gui->addSubTabTarget(
"activation",
 
 1802                                                                                                  $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
 
 1803                                                                                                  "edit", get_class($this));
 
 1804                                 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int) 
$_GET[
'item_id']);
 
 1805                                 $this->tabs_gui->addSubTabTarget(
"preconditions",
 
 1806                                                                                                  $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
 
 1807                                                                                                  "", 
"ilConditionHandlerInterface");
 
 1811                                 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 1813                                         $this->tabs_gui->addSubTabTarget(
"crs_member_administration",
 
 1814                                                                                                          $this->ctrl->getLinkTarget($this,
'members'),
 
 1815                                                                                                          "members", get_class($this));
 
 1817                                         $this->tabs_gui->addSubTabTarget(
"crs_members_groups",
 
 1818                                                                                                          $this->ctrl->getLinkTargetByClass(
"ilCourseParticipantsGroupsGUI", 
"show"),
 
 1819                                                                                                          "", 
"ilCourseParticipantsGroupsGUI");
 
 1821                                 $this->tabs_gui->addSubTabTarget(
"crs_members_gallery",
 
 1822                                                                                                  $this->ctrl->getLinkTarget($this,
'membersGallery'),
 
 1823                                                                                                  "membersGallery", get_class($this));
 
 1826                                 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
 
 1829                                         $this->tabs_gui->addSubTabTarget(
"crs_members_map",
 
 1830                                                 $this->ctrl->getLinkTarget($this,
'membersMap'),
 
 1831                                                 "membersMap", get_class($this));
 
 1835                                 include_once 
'Services/Mail/classes/class.ilMail.php';
 
 1836                                 $mail =& 
new ilMail($ilUser->getId());
 
 1837                                 if($rbacsystem->checkAccess(
'mail_visible',$mail->getMailObjectReferenceId()))
 
 1839                                         $this->tabs_gui->addSubTabTarget(
"mail_members",
 
 1840                                                                                                          $this->ctrl->getLinkTarget($this,
'mailMembers'),
 
 1841                                                                                                          "mailMembers", get_class($this));
 
 1844                                 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 1846                                         $this->tabs_gui->addSubTabTarget(
"events",
 
 1847                                                                                                          $this->ctrl->getLinkTargetByClass(
'ilsessionoverviewgui',
'listSessions'),
 
 1848                                                                                                          "", 
'ilsessionoverviewgui');
 
 1851                                 include_once 
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
 
 1854                                         $this->tabs_gui->addSubTabTarget(
'export_members',
 
 1855                                                                                                         $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'),
 
 1856                                                                                                         "", 
'ilmemberexportgui');
 
 1871                 global $rbacadmin,$ilUser;
 
 1882                 $newObj->initCourseMemberObject();
 
 1883                 $newObj->members_obj->add($ilUser->getId(),
IL_CRS_ADMIN);
 
 1884                 $newObj->members_obj->updateNotification($ilUser->getId(),1);
 
 1889                 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
 1900                 $this->ctrl->setParameter($this, 
"ref_id", $newObj->getRefId());
 
 1902                         $this->ctrl->getLinkTarget($this, 
"edit", 
"", 
false, 
false)));
 
 1922                 if(!count(
$_POST[
'archives']))
 
 1925                         $this->archiveObject();
 
 1929                 if(count(
$_POST[
'archives']) > 1)
 
 1932                         $this->archiveObject();
 
 1937                 $this->
object->initCourseArchiveObject();
 
 1939                 $abs_path = $this->
object->archives_obj->getArchiveFile((
int) 
$_POST[
'archives'][0]);
 
 1940                 $basename = basename($abs_path);
 
 1955                 if(isset(
$_GET[
'admin_hide']))
 
 1957                         $ilUser->writePref(
'crs_admin_hide',(
int) 
$_GET[
'admin_hide']);
 
 1959                 if(isset(
$_GET[
'tutor_hide']))
 
 1961                         $ilUser->writePref(
'crs_tutor_hide',(
int) 
$_GET[
'tutor_hide']);
 
 1963                 if(isset(
$_GET[
'member_hide']))
 
 1965                         $ilUser->writePref(
'crs_member_hide',(
int) 
$_GET[
'member_hide']);
 
 1967                 if(isset(
$_GET[
'subscriber_hide']))
 
 1969                         $ilUser->writePref(
'crs_subscriber_hide',(
int) 
$_GET[
'subscriber_hide']);
 
 1971                 if(isset(
$_GET[
'wait_hide']))
 
 1973                         $ilUser->writePref(
'crs_wait_hide',(
int) 
$_GET[
'wait_hide']);
 
 1979                 if($this->show_tracking)
 
 1981                         include_once 
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
 
 1987                 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
 1990                 if($privacy->enabledCourseAccessTimes())
 
 1992                         include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
 
 1999                         $tmp_data[
'firstname'] = $name[
'firstname'];
 
 2000                         $tmp_data[
'lastname'] = $name[
'lastname'];
 
 2002                         $tmp_data[
'passed'] = $this->
object->members_obj->hasPassed($usr_id) ? 1 : 0;
 
 2003                         $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
 
 2004                         $tmp_data[
'blocked'] = $this->
object->members_obj->isBlocked($usr_id) ? 1 : 0;
 
 2005                         $tmp_data[
'usr_id'] = 
$usr_id;
 
 2007                         if($this->show_tracking)
 
 2009                                 if(in_array($usr_id,$completed))
 
 2013                                 elseif(in_array($usr_id,$in_progress))
 
 2017                                 elseif(in_array($usr_id,
$failed))
 
 2027                         if($privacy->enabledCourseAccessTimes())
 
 2029                                 if(isset($progress[$usr_id][
'ts']) and $progress[
$usr_id][
'ts'])
 
 2031                                         $tmp_data[
'access_ut'] = $progress[
$usr_id][
'ts'];
 
 2036                                         $tmp_data[
'access_ut'] = 0;
 
 2037                                         $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
 
 2040                         $members[
$usr_id] = $tmp_data;
 
 2042                 return $members ? $members : array();
 
 2057                 include_once(
'./Modules/Course/classes/class.ilCourseParticipants.php');
 
 2058                 include_once(
'./Modules/Course/classes/class.ilCourseParticipantsTableGUI.php');
 
 2059                 include_once 
'./Services/Tracking/classes/class.ilObjUserTracking.php';
 
 2060                 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
 
 2063                 if(isset(
$_GET[
'member_table_nav']))
 
 2074                 include_once(
'./Modules/Course/classes/class.ilCourseItems.php');
 
 2079                 $this->tabs_gui->setTabActive(
'members');
 
 2080                 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
 
 2082                 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_edit_members.html',
'Modules/Course');
 
 2083                 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
 
 2088                 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
 
 2091                 $ilToolbar->addInputItem($ul, 
true);
 
 2094                 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
 2101                 $si->setOptions($options);
 
 2102                 $ilToolbar->addInputItem($si);
 
 2105                 $ilToolbar->addFormButton($lng->txt(
"add"), 
"addAsMember");
 
 2106                 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
 
 2109                 $ilToolbar->addSeparator();
 
 2112                 $ilToolbar->addButton($this->lng->txt(
"crs_search_users"),
 
 2113                         $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
 
 2116                 $ilToolbar->addSeparator();
 
 2119                 $ilToolbar->addButton($this->lng->txt(
"crs_print_list"),
 
 2120                         $this->ctrl->getLinkTarget($this, 
'printMembers'), 
"_blank");
 
 2126                 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
 
 2128                 if(count($wait = $waiting_list->getAllUsers()))
 
 2130                         include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
 
 2131                         if($ilUser->getPref(
'crs_wait_hide'))
 
 2134                                 $this->ctrl->setParameter($this,
'wait_hide',0);
 
 2135                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2136                                         $this->lng->txt(
'show'),
 
 2139                                 $this->ctrl->clearParameters($this);
 
 2144                                 $this->ctrl->setParameter($this,
'wait_hide',1);
 
 2145                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2146                                         $this->lng->txt(
'hide'),
 
 2149                                 $this->ctrl->clearParameters($this);
 
 2151                         $table_gui->setUsers($wait);
 
 2152                         $table_gui->setTitle($this->lng->txt(
'crs_waiting_list'),
'icon_usr.gif',$this->lng->txt(
'crs_waiting_list'));
 
 2153                         $this->tpl->setVariable(
'TABLE_WAIT',$table_gui->getHTML());
 
 2157                 if(count($subscribers = $part->getSubscribers()))
 
 2159                         include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
 
 2160                         if($ilUser->getPref(
'crs_subscriber_hide'))
 
 2163                                 $this->ctrl->setParameter($this,
'subscriber_hide',0);
 
 2164                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2165                                         $this->lng->txt(
'show'),
 
 2168                                 $this->ctrl->clearParameters($this);
 
 2173                                 $this->ctrl->setParameter($this,
'subscriber_hide',1);
 
 2174                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2175                                         $this->lng->txt(
'hide'),
 
 2178                                 $this->ctrl->clearParameters($this);
 
 2180                         $table_gui->setSubscribers($subscribers);
 
 2181                         $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
 
 2182                         $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
 
 2187                 if(count($part->getAdmins()))
 
 2191                         $showEditLink = $rbacsystem->checkAccess(
"edit_permission", $this->object->getRefId());
 
 2192                         if($ilUser->getPref(
'crs_admin_hide'))
 
 2195                                 $this->ctrl->setParameter($this,
'admin_hide',0);
 
 2196                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2197                                         $this->lng->txt(
'show'),
 
 2200                                 $this->ctrl->clearParameters($this);
 
 2205                                 $this->ctrl->setParameter($this,
'admin_hide',1);
 
 2206                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2207                                         $this->lng->txt(
'hide'),
 
 2210                                 $this->ctrl->clearParameters($this);
 
 2212                         $table_gui->setTitle($this->lng->txt(
'crs_administrators'),
'icon_usr.gif',$this->lng->txt(
'crs_administrators'));
 
 2214                         $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());        
 
 2216                 if(count($part->getTutors()))
 
 2218                         if($ilUser->getPref(
'crs_tutor_hide'))
 
 2221                                 $this->ctrl->setParameter($this,
'tutor_hide',0);
 
 2222                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2223                                         $this->lng->txt(
'show'),
 
 2226                                 $this->ctrl->clearParameters($this);
 
 2231                                 $this->ctrl->setParameter($this,
'tutor_hide',1);
 
 2232                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2233                                         $this->lng->txt(
'hide'),
 
 2236                                 $this->ctrl->clearParameters($this);
 
 2238                         $table_gui->setTitle($this->lng->txt(
'crs_tutors'),
'icon_usr.gif',$this->lng->txt(
'crs_tutors'));
 
 2240                         $this->tpl->setVariable(
'TUTORS',$table_gui->getHTML());        
 
 2242                 if(count($part->getMembers()))
 
 2244                         if($ilUser->getPref(
'crs_member_hide'))
 
 2247                                 $this->ctrl->setParameter($this,
'member_hide',0);
 
 2248                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2249                                         $this->lng->txt(
'show'),
 
 2252                                 $this->ctrl->clearParameters($this);
 
 2257                                 $this->ctrl->setParameter($this,
'member_hide',1);
 
 2258                                 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
 
 2259                                         $this->lng->txt(
'hide'),
 
 2262                                 $this->ctrl->clearParameters($this);
 
 2264                         $table_gui->setTitle($this->lng->txt(
'crs_members'),
'icon_usr.gif',$this->lng->txt(
'crs_members'));
 
 2266                         $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());       
 
 2271                 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'crs_selected_users'));
 
 2272                 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
 
 2273                 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
 
 2274                 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'crs_mem_send_mail'));
 
 2284                 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
 
 2300                 $visible_members = array_intersect(array_unique((array) 
$_POST[
'visible_member_ids']),$this->object->members_obj->getAdmins());
 
 2301                 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
 
 2302                 $notification = is_array($_POST[
'notification']) ? $_POST[
'notification'] : array();
 
 2318                 $visible_members = array_intersect(array_unique((array) 
$_POST[
'visible_member_ids']),$this->object->members_obj->getTutors());
 
 2319                 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
 
 2320                 $notification = is_array($_POST[
'notification']) ? $_POST[
'notification'] : array();
 
 2336                 $visible_members = array_intersect(array_unique((array) 
$_POST[
'visible_member_ids']),$this->object->members_obj->getMembers());
 
 2337                 $passed = is_array($_POST[
'passed']) ? $_POST[
'passed'] : array();
 
 2338                 $blocked = is_array($_POST[
'blocked']) ? $_POST[
'blocked'] : array();
 
 2346                 global $ilAccess,
$ilErr,$ilUser,$rbacadmin;
 
 2348                 foreach($visible_members as $member_id)
 
 2350                         $this->
object->members_obj->updatePassed($member_id,in_array($member_id,$passed));
 
 2354                                         $this->
object->members_obj->updateNotification($member_id,in_array($member_id,$notification));
 
 2355                                         $this->
object->members_obj->updateBlocked($member_id,
false);
 
 2359                                         if($this->object->members_obj->isBlocked($member_id) and !in_array($member_id,$blocked))
 
 2361                                                 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_UNBLOCK_MEMBER,$member_id);
 
 2363                                         if(!$this->object->members_obj->isBlocked($member_id) and in_array($member_id,$blocked))
 
 2365                                                 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_BLOCK_MEMBER,$member_id);
 
 2367                                         $this->
object->members_obj->updateNotification($member_id,
false);
 
 2368                                         $this->
object->members_obj->updateBlocked($member_id,in_array($member_id,$blocked));
 
 2382                 include_once 
'./Modules/Course/classes/class.ilObjCourseGrouping.php';
 
 2384                 $this->
object->initCourseMemberObject();
 
 2385                 $this->
object->initWaitingList();
 
 2386                 if($this->object->waiting_list_obj->getCountUsers())
 
 2389                         $f_result = array();
 
 2390                         foreach($this->object->waiting_list_obj->getAllUsers() as $waiting_data)
 
 2395                                         $waiting_list_ids[] = $waiting_data[
'usr_id'];
 
 2399                                                 $this->
object->getId()) as $course_data)
 
 2402                                                 if($course_data[
'id'] != $this->object->getId() and
 
 2403                                                         $tmp_members->isGroupingMember($tmp_obj->getId(),$course_data[
'unique']))
 
 2405                                                         $message .= (
'<br /><font class="alert">'.$this->lng->txt(
'crs_member_of').
' ');
 
 2411                                         $f_result[$counter][]   = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname().$message;
 
 2412                                         $f_result[$counter][]   = $tmp_obj->getLogin();
 
 2425                 if(count($this->object->members_obj->getSubscribers()))
 
 2428                         $f_result = array();
 
 2429                         foreach($this->object->members_obj->getSubscribers() as $member_id)
 
 2431                                 $member_data = $this->
object->members_obj->getSubscriberData($member_id);
 
 2436                                         $subscriber_ids[$counter] = $member_id;
 
 2439                                         $f_result[$counter][]   = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
 
 2440                                         $f_result[$counter][]   = $tmp_obj->getLogin();
 
 2461                 $_POST[
'members'] = array((
int) 
$_GET[
'member_id']);
 
 2477                 $participants = array_unique(array_merge((array) 
$_POST[
'admins'],(array) $_POST[
'tutors'],(array) $_POST[
'members']));
 
 2479                 if(!count($participants))
 
 2487                 $this->tabs_gui->setTabActive(
'members');
 
 2488                 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
 
 2490                 include_once(
'./Modules/Course/classes/class.ilCourseEditParticipantsTableGUI.php');
 
 2492                 $table_gui->setTitle($this->lng->txt(
'crs_header_edit_members'),
'icon_usr.gif',$this->lng->txt(
'crs_header_edit_members'));
 
 2495                 $this->tpl->setContent($table_gui->getHTML());
 
 2508                 global $rbacsystem, $rbacreview;
 
 2512                 if(!count(
$_POST[
'participants']))
 
 2519                 $notifications = 
$_POST[
'notification'] ? 
$_POST[
'notification'] : array();
 
 2520                 $passed = 
$_POST[
'passed'] ? 
$_POST[
'passed'] : array();
 
 2521                 $blocked = 
$_POST[
'blocked'] ? 
$_POST[
'blocked'] : array();
 
 2524                 $hasEditPermissionAccess = $rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId());
 
 2528                 $assignableLocalCourseRoles = array();
 
 2529         $courseAdminRoleId = $this->
object->getDefaultAdminRole();
 
 2530                 foreach ($this->object->getLocalCourseRoles(
false) as 
$title => $role_id)
 
 2532                         $assignableLocalCourseRoles[$role_id] = 
$title;
 
 2538                         $memberIsCourseAdmin = $rbacreview->isAssigned($usr_id, $courseAdminRoleId);
 
 2543                         if (! $hasEditPermissionAccess && $memberIsCourseAdmin &&
 
 2544                                 ! in_array($courseAdminRoleId, 
$_POST[
'roles'][$usr_id])
 
 2551                         foreach ((array) 
$_POST[
'roles'][$usr_id] as $role_id)
 
 2553                                 if(!array_key_exists($role_id, $assignableLocalCourseRoles))
 
 2559                         if(!$hasEditPermissionAccess && 
 
 2560                                         $role_id == $courseAdminRoleId &&
 
 2561                                         !$memberIsCourseAdmin)
 
 2573                         if(!isset(
$_POST[
'roles'][$admin_id]))
 
 2578                         if(in_array($courseAdminRoleId,
$_POST[
'roles'][$admin_id]))
 
 2588                         $_POST[
'members'] = $_POST[
'participants'];
 
 2593                 foreach(
$_POST[
'participants'] as $usr_id)
 
 2595                         $this->
object->members_obj->updateRoleAssignments($usr_id,(array) 
$_POST[
'roles'][$usr_id]);
 
 2598                         $this->
object->members_obj->updateNotification($usr_id,0);
 
 2599                         if(($this->object->members_obj->isTutor($usr_id) or $this->
object->members_obj->isAdmin($usr_id)) and in_array($usr_id,$notifications))
 
 2601                                 $this->
object->members_obj->updateNotification($usr_id,1);
 
 2604                         $this->
object->members_obj->updateBlocked($usr_id,0);
 
 2605                         if((!$this->object->members_obj->isAdmin($usr_id) and !$this->
object->members_obj->isTutor($usr_id)) and in_array($usr_id,$blocked))
 
 2607                                 $this->
object->members_obj->updateBlocked($usr_id,1);
 
 2609                         $this->
object->members_obj->updatePassed($usr_id,in_array($usr_id,$passed));
 
 2610                         $this->
object->members_obj->sendNotification(
 
 2611                                 $this->object->members_obj->NOTIFY_STATUS_CHANGED,
 
 2627                 $this->
object->initCourseMemberObject();
 
 2632                 if(!isset(
$_GET[
"member_id"]) or !$this->object->members_obj->isAssigned((
int) 
$_GET[
"member_id"]))
 
 2634                         $this->ilias->raiseError($this->lng->txt(
"crs_no_valid_member_id_given"),$this->ilias->error_obj->MESSAGE);
 
 2639                 $passed = $this->
object->members_obj->hasPassed((
int) $_GET[
'member_id']);
 
 2640                 $notify = $this->
object->members_obj->isNotificationEnabled((
int) $_GET[
'member_id']);
 
 2641                 $blocked = $this->
object->members_obj->isBlocked((
int) $_GET[
'member_id']);
 
 2643                 $this->
object->members_obj->updateRoleAssignments((
int) $_GET[
'member_id'],
$_POST[
'roles']);
 
 2644                 $this->
object->members_obj->updatePassed((
int) $_GET[
'member_id'],(
int) 
$_POST[
'passed']);
 
 2645                 $this->
object->members_obj->updateNotification((
int) $_GET[
'member_id'],(
int) $_POST[
'notification']);
 
 2646                 $this->
object->members_obj->updateBlocked((
int) $_GET[
'member_id'],(
int) $_POST[
'blocked']);
 
 2648                 if($passed != $this->object->members_obj->hasPassed((
int) $_GET[
'member_id']) or
 
 2649                         $notify != $this->
object->members_obj->isNotificationEnabled((
int) $_GET[
'member_id']) or
 
 2650                         $blocked != $this->
object->members_obj->isBlocked((
int) $_GET[
'member_id']))
 
 2652                         $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_STATUS_CHANGED,(
int) $_GET[
'member_id']);
 
 2666                 if(!strlen(trim(
$_POST[
'user_login'])))
 
 2672                 $users = explode(
',', 
$_POST[
'user_login']);
 
 2674                 foreach($users as 
$user)
 
 2684                         $_POST[
'user'][] = $user_id;
 
 2698                 if(!is_array(
$_POST[
"user"]))
 
 2703                 $this->
object->initCourseMemberObject();
 
 2706                 foreach(
$_POST[
"user"] as $user_id)
 
 2712                         if($this->object->members_obj->isAssigned($user_id))
 
 2716                         switch(
$_POST[
'member_type'])
 
 2722                                         $this->
object->members_obj->add($user_id,
IL_CRS_TUTOR);
 
 2725                                         $this->
object->members_obj->add($user_id,
IL_CRS_ADMIN);
 
 2729                         $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_USER,$user_id);
 
 2731                         include_once 
'./Modules/Forum/classes/class.ilForumNotification.php';
 
 2741                         unset(
$_SESSION[
'crs_usr_search_result']);
 
 2744                         $this->ctrl->redirect($this,
'members');
 
 2756                 if(!count(
$_POST[
"waiting"]))
 
 2763                 $this->
object->initCourseMemberObject();
 
 2765                 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
 
 2769                 foreach(
$_POST[
"waiting"] as $user_id)
 
 2775                         if($this->object->members_obj->isAssigned($user_id))
 
 2780                         $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_USER,$user_id);
 
 2783                         include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
 
 2814                 if(!count(
$_POST[
'waiting']))
 
 2821                 include_once(
'./Modules/Course/classes/class.ilCourseWaitingList.php');
 
 2824                 foreach(
$_POST[
"waiting"] as $user_id)
 
 2827                         $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_SUBSCRIBER,$user_id);
 
 2848                 if(!is_array(
$_SESSION[
"crs_delete_waiting_list_ids"]))
 
 2856                 $this->
object->initWaitingList();
 
 2859                         $this->
object->waiting_list_obj->removeFromList($usr_id);
 
 2870                 global $rbacsystem,
$ilErr;
 
 2875                 if(!is_array(
$_POST[
"subscribers"]))
 
 2882                 $this->
object->initCourseMemberObject();
 
 2884                 if(!$this->object->members_obj->assignSubscribers(
$_POST[
"subscribers"]))
 
 2894                                 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_SUBSCRIBER,$usr_id);
 
 2896                                 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
 
 2911                 $this->
object->initCourseMemberObject();
 
 2913                 if($this->object->isSubscriptionMembershipLimited() and $this->
object->getSubscriptionMaxMembers() and 
 
 2914                    $this->
object->getSubscriptionMaxMembers() <= $this->
object->members_obj->getCountMembers())
 
 2921                 if($number = $this->object->members_obj->autoFillSubscribers())
 
 2939                 $this->tabs_gui->setTabActive(
'members');
 
 2949                 if(!is_array(
$_POST[
"subscriber"]) or !count(
$_POST[
"subscriber"]))
 
 2959                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_editMembers.html",
'Modules/Course');
 
 2960                 $this->
object->initCourseMemberObject();
 
 2966                 $f_result = array();
 
 2968                 foreach(
$_POST[
"subscriber"] as $member_id)
 
 2970                         $member_data = $this->
object->members_obj->getSubscriberData($member_id);
 
 2975                                 $f_result[$counter][]   = $tmp_obj->getLogin();
 
 2976                                 $f_result[$counter][]   = $tmp_obj->getFirstname();
 
 2977                                 $f_result[$counter][]   = $tmp_obj->getLastname();
 
 2991                 $this->tabs_gui->setTabActive(
'members');
 
 3001                 if(!is_array(
$_POST[
"waiting_list"]) or !count(
$_POST[
"waiting_list"]))
 
 3011                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_editMembers.html",
'Modules/Course');
 
 3012                 $this->
object->initCourseMemberObject();
 
 3013                 $this->
object->initWaitingList();
 
 3019                 $f_result = array();
 
 3021                 foreach(
$_POST[
"waiting_list"] as $wait_id)
 
 3023                         $user_data =& $this->
object->waiting_list_obj->getUser($wait_id);
 
 3027                                 $f_result[$counter][]   = $tmp_obj->getLogin();
 
 3028                                 $f_result[$counter][]   = $tmp_obj->getFirstname();
 
 3029                                 $f_result[$counter][]   = $tmp_obj->getLastname();
 
 3030                                 #$f_result[$counter][]   = strftime("%Y-%m-%d %R",$user_data["time"]); 
 3046                 if($this->object->members_obj->isLastAdmin($ilUser->getId()))
 
 3054                 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
 
 3056                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_unsubscribe_sure.html",
'Modules/Course');
 
 3059                 $this->tpl->setVariable(
"UNSUB_FORMACTION",$this->ctrl->getFormAction($this));
 
 3060                 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
"cancel"));
 
 3061                 $this->tpl->setVariable(
"CMD_SUBMIT",
'performUnsubscribe');
 
 3062                 $this->tpl->setVariable(
"TXT_SUBMIT",$this->lng->txt(
"crs_unsubscribe"));
 
 3070                 global $rbacsystem,$ilAccess;
 
 3081                 $this->tabs_gui->setTabActive(
'crs_unsubscribe');
 
 3082                 #$this->setSubTabs('members'); 
 3085                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_unsubscribe_sure.html",
'Modules/Course');
 
 3088                 $this->tpl->setVariable(
"UNSUB_FORMACTION",$this->ctrl->getFormAction($this));
 
 3089                 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
"cancel"));
 
 3090                 $this->tpl->setVariable(
"CMD_SUBMIT",
'performUnsubscribe');
 
 3091                 $this->tpl->setVariable(
"TXT_SUBMIT",$this->lng->txt(
"crs_unsubscribe"));
 
 3098                 global $rbacsystem,$ilUser;
 
 3102                 $this->
object->initCourseMemberObject();
 
 3103                 $this->
object->members_obj->delete($this->ilias->account->getId());
 
 3104                 $this->
object->members_obj->sendUnsubscribeNotificationToAdmins($this->ilias->account->getId());
 
 3105                 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_UNSUBSCRIBE,$ilUser->getId());
 
 3107                 include_once 
'./Modules/Forum/classes/class.ilForumNotification.php';
 
 3112                 ilUtil::redirect(
"repository.php?ref_id=".$this->tree->getParentId($this->ref_id));
 
 3122                 $this->tabs_gui->setTabActive(
'members');
 
 3123                 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
 
 3125                 $participants = array_merge((array) 
$_POST[
'admins'],(array) $_POST[
'tutors'], (array) $_POST[
'members']);
 
 3135                 $this->
object->initCourseMemberObject();
 
 3136                 if(!$this->object->members_obj->checkLastAdmin($participants))
 
 3145                 if(!$ilAccess->checkAccess(
'edit_permission', 
'',$this->object->getRefId()))
 
 3149                         foreach ($participants as 
$usr_id)
 
 3151                                 if($part->isAdmin($usr_id))
 
 3161                 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
 
 3163                 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
 
 3164                 $confirm->setHeaderText($this->lng->txt(
'crs_header_delete_members'));
 
 3165                 $confirm->setConfirm($this->lng->txt(
'confirm'),
'removeMembers');
 
 3166                 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
 
 3170                         $confirm->addItem(
'participants[]',
 
 3171                                 $participant[
'usr_id'],
 
 3172                                 $participant[
'lastname'].
', '.$participant[
'firstname'].
' ['.$participant[
'login'].
']',
 
 3176                 $this->tpl->setContent($confirm->getHTML());
 
 3182                 global $rbacreview, $rbacsystem;
 
 3186                 if(!is_array(
$_POST[
"participants"]) or !count(
$_POST[
"participants"]))
 
 3193                 $this->
object->initCourseMemberObject();
 
 3197                 if (! $rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId()))
 
 3200                         $courseAdminRoleId = null;
 
 3201                         foreach ($this->object->getLocalCourseRoles(
false) as 
$title => $role_id)
 
 3203                                 if (substr($title, 0, 12) == 
'il_crs_admin')
 
 3205                                         $courseAdminRoleId = $role_id;
 
 3211                                 if ($rbacreview->isAssigned($usr_id, $courseAdminRoleId))
 
 3220                 if(!$this->object->members_obj->deleteParticipants(
$_POST[
"participants"]))
 
 3229                         include_once 
'./Modules/Forum/classes/class.ilForumNotification.php';
 
 3234                                 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_MEMBER,$usr_id);
 
 3250                 if(!
$_POST[
'subscribers'])
 
 3257                 $this->
object->initCourseMemberObject();
 
 3259                 if(!$this->object->members_obj->deleteSubscribers(
$_POST[
"subscribers"]))
 
 3269                                 $this->
object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_SUBSCRIBER,$usr_id);
 
 3283                 global $rbacsystem,$ilAccess,$ilUser, 
$lng;
 
 3285                 $this->
object->initCourseMemberObject();
 
 3287                 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
 
 3289                 if($ilAccess->checkAccess(
'read',
'',$this->ref_id))
 
 3291                         $tabs_gui->addTab(
'view_content', $lng->txt(
"content"),
 
 3292                                                                  $this->ctrl->getLinkTarget($this,
''));
 
 3295                 if ($ilAccess->checkAccess(
'visible',
'',$this->ref_id))
 
 3302                         $force_active = (strtolower(
$_GET[
"cmdClass"]) == 
"ilinfoscreengui" 
 3303                                 || strtolower(
$_GET[
"cmdClass"]) == 
"ilnotegui")
 
 3306                         $tabs_gui->addTarget(
"info_short",
 
 3307                                                                  $this->ctrl->getLinkTargetByClass(
 
 3308                                                                  array(
"ilobjcoursegui", 
"ilinfoscreengui"), 
"showSummary"),
 
 3310                                                                  "", 
"", $force_active);
 
 3312                 if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
 
 3314                         $force_active = (strtolower(
$_GET[
"cmdClass"]) == 
"ilconditionhandlerinterface" 
 3315                                 && 
$_GET[
"item_id"] == 
"")
 
 3318                         $tabs_gui->addTarget(
"settings",
 
 3319                                 $this->ctrl->getLinkTarget($this, 
"edit"),
 
 3320                                 array(
"edit", 
"editMapSettings", 
"editCourseIcons", 
"listStructure"), 
"", 
"", $force_active);
 
 3324                 if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
 
 3326                         $tabs_gui->addTarget(
"members",
 
 3327                                                                  $this->ctrl->getLinkTarget($this, 
"members"), 
 
 3331                 elseif ($ilAccess->checkAccess(
'read',
'',$this->ref_id) &&
 
 3332                         $this->
object->getShowMembers() == $this->
object->SHOW_MEMBERS_ENABLED &&
 
 3333                         $ilUser->getId() != ANONYMOUS_USER_ID)
 
 3335                         $tabs_gui->addTarget(
"members",
 
 3336                                                                  $this->ctrl->getLinkTarget($this, 
"membersGallery"), 
 
 3342                 include_once 
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
 
 3345                         $tabs_gui->addTarget(
'learning_progress',
 
 3346                                                                  $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'illearningprogressgui'),
''),
 
 3348                                                                  array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
 
 3352                 if($ilAccess->checkAccess(
'write',
'',$this->ref_id))
 
 3354                         include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
 
 3357                                 $force_active = (strtolower(
$_GET[
"cmdClass"]) == 
"ilcourseobjectivesgui")
 
 3360                                 $tabs_gui->addTarget(
"crs_objectives",
 
 3361                                                                          $this->ctrl->getLinkTarget($this,
"listObjectives"), 
 
 3363                                                                          get_class($this), 
"", $force_active);
 
 3368                 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
 
 3369                 if ($ilAccess->checkAccess(
'edit_permission', 
'', $this->ref_id)
 
 3372                         $tabs_gui->addTarget(
"licenses",
 
 3373                                 $this->ctrl->getLinkTargetByClass(
'illicenseoverviewgui', 
''),
 
 3374                         "", 
"illicenseoverviewgui");
 
 3378                 if ($ilAccess->checkAccess(
'write',
'',$this->ref_id))
 
 3380                         $tabs_gui->addTarget(
"meta_data",
 
 3381                                                                  $this->ctrl->getLinkTargetByClass(array(
'ilobjcoursegui',
'ilmdeditorgui'),
'listSection'),
 
 3386                 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 3388                         $tabs_gui->addTarget(
 
 3390                                 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
 
 3396                 if ($ilAccess->checkAccess(
'edit_permission',
'',$this->ref_id))
 
 3398                         $tabs_gui->addTarget(
"perm_settings",
 
 3399                                                                  $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"),
 
 3400                                                                  array(
"perm",
"info",
"owner"), 
'ilpermissiongui');
 
 3403                 if ($this->ctrl->getTargetScript() == 
"adm_object.php")
 
 3405                         $tabs_gui->addTarget(
"show_owner",
 
 3406                                                                  $this->ctrl->getLinkTarget($this, 
"owner"), 
"owner", get_class($this));
 
 3408                         if ($this->tree->getSavedNodeData($this->ref_id))
 
 3410                                 $tabs_gui->addTarget(
"trash",
 
 3411                                                                          $this->ctrl->getLinkTarget($this, 
"trash"), 
"trash", get_class($this));
 
 3415                 if($ilAccess->checkAccess(
'join',
'',$this->ref_id)
 
 3416                         and !$this->
object->members_obj->isAssigned($ilUser->getId()))
 
 3418                         include_once 
'./Modules/Course/classes/class.ilCourseWaitingList.php';
 
 3423                                         $this->lng->txt(
'membership_leave'),
 
 3424                                         $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui',
'show',
'')
 
 3431                                 $tabs_gui->addTarget(
"join",
 
 3432                                                                          $this->ctrl->getLinkTargetByClass(
'ilcourseregistrationgui', 
"show"), 
 
 3437                 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId())
 
 3438                         and $this->object->members_obj->isMember($ilUser->getId()))
 
 3440                         $tabs_gui->addTarget(
"crs_unsubscribe",
 
 3441                                                                  $this->ctrl->getLinkTarget($this, 
"unsubscribe"), 
 
 3450                 foreach($a_members as $member_id)
 
 3453                         $member_data = $this->
object->members_obj->getSubscriberData($member_id);
 
 3457                                 $print_member[$member_id][
'login'] = $tmp_obj->getLogin();
 
 3458                                 $print_member[$member_id][
'name'] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
 
 3480                 global $ilAccess,
$lng;
 
 3482                 $lng->loadLanguageModule(
'trac');
 
 3484                 #$is_admin = (bool) $ilAccess->checkAccess("write",'',$this->object->getRefId()); 
 3487                 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
 3490                 if($privacy->enabledCourseAccessTimes())
 
 3492                         include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
 
 3496                 if($this->show_tracking)
 
 3498                         include_once 
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
 
 3505                 foreach($a_members as $member_id)
 
 3510                                 $print_member[$member_id][
'login'] = $tmp_obj->getLogin();
 
 3511                                 $print_member[$member_id][
'name'] = $tmp_obj->getLastname().
', '.$tmp_obj->getFirstname();
 
 3513                                 if($this->object->members_obj->isAdmin($member_id))
 
 3515                                         $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_admin");
 
 3517                                 elseif($this->object->members_obj->isTutor($member_id))
 
 3519                                         $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_tutor");
 
 3521                                 elseif($this->object->members_obj->isMember($member_id))
 
 3523                                         $print_member[$member_id][
'role'] = $this->lng->txt(
"il_crs_member");
 
 3525                                 if($this->object->members_obj->isAdmin($member_id) or $this->
object->members_obj->isTutor($member_id))
 
 3527                                         if($this->object->members_obj->isNotificationEnabled($member_id))
 
 3529                                                 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_notify");
 
 3533                                                 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_no_notify");
 
 3538                                         if($this->object->members_obj->isBlocked($member_id))
 
 3540                                                 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_blocked");
 
 3544                                                 $print_member[$member_id][
'status'] = $this->lng->txt(
"crs_unblocked");
 
 3550                                         $print_member[$member_id][
'passed'] = $this->
object->members_obj->hasPassed($member_id) ?
 
 3551                                                                           $this->lng->txt(
'crs_member_passed') :
 
 3552                                                                           $this->lng->txt(
'crs_member_not_passed');
 
 3555                                 if($privacy->enabledCourseAccessTimes())
 
 3557                                         if(isset($progress[$member_id][
'ts']) and $progress[$member_id][
'ts'])
 
 3565                                                 $print_member[$member_id][
'access'] = $this->lng->txt(
'no_date');
 
 3568                                 if($this->show_tracking)
 
 3570                                         if(in_array($member_id,$completed))
 
 3574                                         elseif(in_array($member_id,$in_progress))
 
 3578                                         elseif(in_array($member_id,
$failed))
 
 3609                         case 'notification':
 
 3625                 $tpl = 
new ilTemplate(
'tpl.crs_members_print.html',
true,
true,
'Modules/Course');
 
 3627                 $this->
object->initCourseMemberObject();
 
 3629                 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
 3631                 if($privacy->enabledCourseAccessTimes())
 
 3633                         include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
 
 3637                 include_once 
'./Services/Tracking/classes/class.ilObjUserTracking.php';
 
 3638                 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
 
 3645                 if(count($members = $this->object->members_obj->getParticipants()))
 
 3649                         foreach($members as $member_data)
 
 3651                                 if($this->show_tracking)
 
 3653                                         $tpl->setCurrentBlock(
'progress_row');
 
 3654                                         $tpl->setVariable(
'VAL_PROGRESS',$member_data[
'progress']);
 
 3655                                         $tpl->parseCurrentBlock();
 
 3658                                 if($privacy->enabledCourseAccessTimes())
 
 3660                                         $tpl->setCurrentBlock(
'access_row');
 
 3661                                         $tpl->setVariable(
'VAL_ACCESS',$member_data[
'access']);
 
 3662                                         $tpl->parseCurrentBlock();
 
 3664                                 $tpl->setCurrentBlock(
"members_row");
 
 3665                                 $tpl->setVariable(
"LOGIN",$member_data[
'login']);
 
 3666                                 $tpl->setVariable(
"NAME",$member_data[
'name']);
 
 3667                                 $tpl->setVariable(
"ROLE",$member_data[
'role']);
 
 3668                                 $tpl->setVariable(
"STATUS",$member_data[
'status']);
 
 3669                                 $tpl->setVariable(
"PASSED",$member_data[
'passed']);
 
 3673                                         $tpl->setVariable(
"STATUS",$member_data[
'status']);
 
 3674                                         $tpl->setVariable(
"PASSED",$member_data[
'passed']);
 
 3676                                 $tpl->parseCurrentBlock();
 
 3679                         $tpl->setCurrentBlock(
"members");
 
 3681                         $tpl->setVariable(
"MEMBERS_IMG_ALT",$this->lng->txt(
'crs_header_members'));
 
 3682                         $tpl->setVariable(
"MEMBERS_TABLE_HEADER",$this->lng->txt(
'crs_members_table'));
 
 3683                         $tpl->setVariable(
"TXT_LOGIN",$this->lng->txt(
'username'));
 
 3684                         $tpl->setVariable(
"TXT_NAME",$this->lng->txt(
'name'));
 
 3685                         $tpl->setVariable(
"TXT_ROLE",$this->lng->txt(
'crs_role'));
 
 3687                         if($this->show_tracking)
 
 3689                                 $tpl->setCurrentBlock(
'progress');
 
 3690                                 $tpl->setVariable(
'TXT_PROGRESS',$this->lng->txt(
'learning_progress'));
 
 3691                                 $tpl->parseCurrentBlock();
 
 3694                         if($privacy->enabledCourseAccessTimes())
 
 3696                                 $tpl->setCurrentBlock(
'access');
 
 3697                                 $tpl->setVariable(
'TXT_ACCESS',$this->lng->txt(
'last_access'));
 
 3698                                 $tpl->parseCurrentBlock();
 
 3704                                 $tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'crs_status'));
 
 3705                                 $tpl->setVariable(
"TXT_PASSED",$this->lng->txt(
'crs_passed'));
 
 3708                         $tpl->parseCurrentBlock();
 
 3712                 if(count($members = $this->object->members_obj->getSubscribers()))
 
 3715                         foreach($members as $member_data)
 
 3717                                 $tpl->setCurrentBlock(
"subscribers_row");
 
 3718                                 $tpl->setVariable(
"SLOGIN",$member_data[
'login']);
 
 3719                                 $tpl->setVariable(
"SNAME",$member_data[
'name']);
 
 3720                                 $tpl->setVariable(
"STIME",$member_data[
"time"]);
 
 3721                                 $tpl->parseCurrentBlock();
 
 3724                         $tpl->setCurrentBlock(
"subscribers");
 
 3726                         $tpl->setVariable(
"SUBSCRIBERS_IMG_ALT",$this->lng->txt(
'crs_subscribers'));
 
 3727                         $tpl->setVariable(
"SUBSCRIBERS_TABLE_HEADER",$this->lng->txt(
'crs_subscribers'));
 
 3728                         $tpl->setVariable(
"TXT_SLOGIN",$this->lng->txt(
'username'));
 
 3729                         $tpl->setVariable(
"TXT_SNAME",$this->lng->txt(
'name'));
 
 3730                         $tpl->setVariable(
"TXT_STIME",$this->lng->txt(
'crs_time'));
 
 3731                         $tpl->parseCurrentBlock();
 
 3735                 $tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
 
 3738                 $headline = $this->lng->txt(
'obj_crs').
': '.$this->
object->getTitle().
 
 3741                 $tpl->setVariable(
"HEADLINE",$headline);
 
 3754                 global $rbacsystem, 
$ilErr, $ilAccess, $ilUser;
 
 3756                 $is_admin = (bool) $ilAccess->checkAccess(
"write", 
"", $this->object->getRefId());
 
 3759                         $this->object->getShowMembers() == $this->
object->SHOW_MEMBERS_DISABLED)
 
 3761                         $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
 
 3765                 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
 
 3768                 $this->tabs_gui->setTabActive(
'members');
 
 3769                 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
 
 3771                 $this->
object->initCourseMemberObject();
 
 3774                 if(count($members = $this->object->members_obj->getParticipants()))
 
 3776                         $ordered_members = array();
 
 3778                         foreach($members as $member_id)
 
 3788                                 array_push($ordered_members,array(
"id" => $member_id, 
 
 3789                                                                   "login" => $usr_obj->getLogin(),
 
 3790                                                                   "lastname" => $usr_obj->getLastName(),
 
 3791                                                                   "firstname" => $usr_obj->getFirstName(),
 
 3792                                                                   "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
 
 3793                                                                   "usr_obj" => $usr_obj));
 
 3798                         foreach($ordered_members as $member)
 
 3800                           $usr_obj = $member[
"usr_obj"];
 
 3802                           if(!$usr_obj->getActive())
 
 3807                           $public_profile = in_array($usr_obj->getPref(
"public_profile"), array(
"y", 
"g")) ? 
"y" : 
"";
 
 3810                                 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui", 
"user", $member[
"id"]);
 
 3811                                 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
 
 3814                                 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
 
 3816                                 if($this->object->members_obj->isAdmin($member[
"id"]) or $this->
object->members_obj->isTutor($member[
"id"]))
 
 3818                                         if ($public_profile == 
"y")
 
 3820                                                 $this->tpl->setCurrentBlock(
"tutor_linked");
 
 3821                                                 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
 
 3822                                                 $this->tpl->setVariable(
"SRC_USR_IMAGE", 
$file);
 
 3823                                                 $this->tpl->parseCurrentBlock();
 
 3827                                                 $this->tpl->setCurrentBlock(
"tutor_not_linked");
 
 3828                                                 $this->tpl->setVariable(
"SRC_USR_IMAGE", 
$file);
 
 3829                                                 $this->tpl->parseCurrentBlock();
 
 3831                                         $this->tpl->setCurrentBlock(
"tutor");
 
 3835                                         if ($public_profile == 
"y")
 
 3837                                                 $this->tpl->setCurrentBlock(
"member_linked");
 
 3838                                                 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
 
 3839                                                 $this->tpl->setVariable(
"SRC_USR_IMAGE", 
$file);
 
 3840                                                 $this->tpl->parseCurrentBlock();
 
 3844                                                 $this->tpl->setCurrentBlock(
"member_not_linked");
 
 3845                                                 $this->tpl->setVariable(
"SRC_USR_IMAGE", 
$file);
 
 3846                                                 $this->tpl->parseCurrentBlock();
 
 3848                                         $this->tpl->setCurrentBlock(
"member");
 
 3852                                 if ($public_profile == 
"y")
 
 3854                                         $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
 
 3855                                         $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
 
 3857                                 $this->tpl->setVariable(
"LOGIN", $member[
"login"]);
 
 3858                                 $this->tpl->parseCurrentBlock();
 
 3861                         $this->tpl->setCurrentBlock(
"members"); 
 
 3862                         $this->tpl->setVariable(
"MEMBERS_TABLE_HEADER",$this->lng->txt(
'crs_members_title'));
 
 3863                         $this->tpl->parseCurrentBlock();
 
 3867                 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
 
 3870                 $headline = $this->
object->getTitle().
"<br/>".$this->
object->getDescription();
 
 3872                 $this->tpl->setVariable(
"HEADLINE",$headline);
 
 3881                 include_once 
"./Services/Table/classes/class.ilTableGUI.php";
 
 3892                                 $offset = 
$_GET[
"update_members"] ? 
$_GET[
"offset"] : 0;
 
 3893                                 $order = 
$_GET[
"update_members"] ? 
$_GET[
"sort_by"] : 
'login';
 
 3894                                 $direction = 
$_GET[
"update_members"] ? 
$_GET[
"sort_order"] : 
'';
 
 3898                                 $offset = 
$_GET[
"update_subscribers"] ? 
$_GET[
"offset"] : 0;
 
 3899                                 $order = 
$_GET[
"update_subscribers"] ? 
$_GET[
"sort_by"] : 
'sub_time';
 
 3900                                 $direction = 
$_GET[
"update_subscribers"] ? 
$_GET[
"sort_order"] : 
'';
 
 3904                                 $offset = 
$_GET[
"offset"];
 
 3905                         $order = 
$_GET[
"sort_by"] ? 
$_GET[
"sort_by"] : 
"title";
 
 3906                                 $direction = 
$_GET[
"sort_order"];
 
 3910                                 $offset = 
$_GET[
"offset"];
 
 3911                         $order = 
$_GET[
"sort_by"] ? 
$_GET[
"sort_by"] : 
"title";
 
 3912                                 $direction = 
$_GET[
"sort_order"];
 
 3916                                 $offset = 
$_GET[
"offset"];
 
 3918                         if (
$_GET[
"sort_by"] == 
"title" or empty(
$_GET[
"sort_by"]))
 
 3920                     $_GET[
"sort_by"] = 
"login";
 
 3922                 $order = 
$_GET[
"sort_by"];
 
 3923                                 $direction = 
$_GET[
"sort_order"];
 
 3927                 $tbl->setOrderColumn($order);
 
 3928                 $tbl->setOrderDirection($direction);
 
 3929                 $tbl->setOffset($offset);
 
 3930                 $tbl->setLimit(
$_GET[
"limit"]);
 
 3931                 $tbl->setMaxCount(count($result_set));
 
 3932                 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
 
 3933                 $tbl->setData($result_set);
 
 3940                 $tpl =& $tbl->getTemplateObject();
 
 3942                 $tpl->setCurrentBlock(
"tbl_form_header");
 
 3943                 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 3944                 $tpl->parseCurrentBlock();
 
 3945                 $tpl->setCurrentBlock(
"tbl_action_btn");
 
 3946                 $tpl->setVariable(
"BTN_NAME",
"cancelMember");
 
 3947                 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"cancel"));
 
 3948                 $tpl->parseCurrentBlock();
 
 3949                 $tpl->setCurrentBlock(
"tbl_action_btn");
 
 3950                 $tpl->setVariable(
"BTN_NAME",
"performRemoveFromWaitingList");
 
 3951                 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
 
 3952                 $tpl->parseCurrentBlock();
 
 3953                 $tpl->setCurrentBlock(
"tbl_action_row");
 
 3954                 $tpl->setVariable(
"COLUMN_COUNTS",4);
 
 3956                 $tpl->parseCurrentBlock();
 
 3958                 $tbl->setTitle($this->lng->txt(
"crs_header_remove_from_waiting_list"),
"icon_usr_b.gif",
 
 3959                                            $this->lng->txt(
"crs_header_remove_from_waiting_list"));
 
 3960                 $tbl->setHeaderNames(array($this->lng->txt(
"username"),
 
 3961                                                                    $this->lng->txt(
"firstname"),
 
 3962                                                                    $this->lng->txt(
"lastname"),
 
 3963                                                                    $this->lng->txt(
"crs_time")));
 
 3964                 $tbl->setHeaderVars(array(
"login",
 
 3968                                                         array(
"ref_id" => $this->object->getRefId(),
 
 3970                                                                   "cmdClass" => 
"ilobjcoursegui",
 
 3971                                                                   "cmdNode" => 
$_GET[
"cmdNode"]));
 
 3973                 $tbl->setColumnWidth(array(
"25%",
"25%",
"25%",
"25%"));
 
 3978                 $this->tpl->setVariable(
"EDIT_MEMBER_TABLE",$tbl->tpl->get());
 
 3986                 $tpl =& $tbl->getTemplateObject();
 
 3988                 $tpl->setCurrentBlock(
"tbl_form_header");
 
 3989                 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 3990                 $tpl->parseCurrentBlock();
 
 3991                 $tpl->setCurrentBlock(
"tbl_action_btn");
 
 3992                 $tpl->setVariable(
"BTN_NAME",
"removeSubscribers");
 
 3993                 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"delete"));
 
 3994                 $tpl->parseCurrentBlock();
 
 3995                 $tpl->setCurrentBlock(
"tbl_action_btn");
 
 3996                 $tpl->setVariable(
"BTN_NAME",
"cancelMember");
 
 3997                 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"cancel"));
 
 3998                 $tpl->parseCurrentBlock();
 
 3999                 $tpl->setCurrentBlock(
"tbl_action_row");
 
 4000                 $tpl->setVariable(
"COLUMN_COUNTS",4);
 
 4002                 $tpl->parseCurrentBlock();
 
 4004                 $tbl->setTitle($this->lng->txt(
"crs_header_delete_subscribers"),
"icon_usr_b.gif",$this->lng->txt(
"crs_header_delete_members"));
 
 4005                 $tbl->setHeaderNames(array($this->lng->txt(
"username"),
 
 4006                                                                    $this->lng->txt(
"firstname"),
 
 4007                                                                    $this->lng->txt(
"lastname"),
 
 4008                                                                    $this->lng->txt(
"crs_time")));
 
 4009                 $tbl->setHeaderVars(array(
"login",
 
 4013                                                         array(
"ref_id" => $this->object->getRefId(),
 
 4015                                                                   "cmdClass" => 
"ilobjcoursegui",
 
 4016                                                                   "cmdNode" => 
$_GET[
"cmdNode"]));
 
 4018                 $tbl->setColumnWidth(array(
"25%",
"25%",
"25%",
"25%"));
 
 4023                 $this->tpl->setVariable(
"EDIT_MEMBER_TABLE",$tbl->tpl->get());
 
 4032                 $actions = array(
"addSubscribers"               => $this->lng->txt(
"crs_add_subscribers"),
 
 4033                                                  "deleteSubscribers"    => $this->lng->txt(
"crs_delete_subscribers"));
 
 4036                 $tpl =& $tbl->getTemplateObject();
 
 4039                 $tpl->setCurrentBlock(
"tbl_action_row");
 
 4042                 $tpl->setCurrentBlock(
"plain_button");
 
 4043                 $tpl->setVariable(
"PBTN_NAME",
"autoFill");
 
 4044                 $tpl->setVariable(
"PBTN_VALUE",$this->lng->txt(
"crs_auto_fill"));
 
 4045                 $tpl->parseCurrentBlock();
 
 4046                 $tpl->setCurrentBlock(
"plain_buttons");
 
 4047                 $tpl->parseCurrentBlock();
 
 4049                 $tpl->setVariable(
"COLUMN_COUNTS",4);
 
 4053                 $tpl->setCurrentBlock(
"tbl_action_select");
 
 4055                 $tpl->setVariable(
"BTN_NAME",
"gateway");
 
 4056                 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"execute"));
 
 4057                 $tpl->parseCurrentBlock();
 
 4059                 $tbl->enable(
'select_all');
 
 4060                 $tbl->setFormName(
"subscriber_form");
 
 4061                 $tbl->setSelectAllCheckbox(
"subscriber");
 
 4063                 $tpl->setCurrentBlock(
"tbl_action_row");
 
 4064                 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
 
 4065                 $tpl->parseCurrentBlock();
 
 4068                 $tbl->setTitle($this->lng->txt(
"crs_subscribers"),
"icon_usr.gif",$this->lng->txt(
"crs_header_members"));
 
 4069                 $tbl->setHeaderNames(array(
'',
 
 4070                                                                    $this->lng->txt(
"name"),
 
 4071                                                                    $this->lng->txt(
"login"),
 
 4072                                                                    $this->lng->txt(
"crs_time")));
 
 4073                 $tbl->setHeaderVars(array(
"",
 
 4077                                                         array(
"ref_id" => $this->object->getRefId(),
 
 4079                                                                   "update_subscribers" => 1,
 
 4080                                                                   "cmdClass" => 
"ilobjcoursegui",
 
 4081                                                                   "cmdNode" => 
$_GET[
"cmdNode"]));
 
 4082                 $tbl->setColumnWidth(array(
'1%'));
 
 4087                 $this->tpl->setCurrentBlock(
'sub_wait_table');
 
 4088                 $this->tpl->setVariable(
'SUB_WAIT_NAME',
'subscriber_form');
 
 4089                 $this->tpl->setVariable(
'SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
 
 4090                 $this->tpl->setVariable(
"SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
 
 4091                 $this->tpl->parseCurrentBlock();
 
 4097                 $actions = array(
"addFromWaitingList"           => $this->lng->txt(
"crs_add_subscribers"),
 
 4098                                                  "removeFromWaitingList"        => $this->lng->txt(
"crs_delete_from_waiting_list"));
 
 4101                 $tpl =& $tbl->getTemplateObject();
 
 4103                 $tbl->enable(
'select_all');
 
 4104                 $tbl->setFormName(
"wait_form");
 
 4105                 $tbl->setSelectAllCheckbox(
"waiting_list");
 
 4109                 $tpl->setCurrentBlock(
"tbl_action_row");
 
 4111                 $tpl->setVariable(
"COLUMN_COUNTS",5);
 
 4115                 $tpl->setCurrentBlock(
"tbl_action_select");
 
 4117                 $tpl->setVariable(
"BTN_NAME",
"gateway");
 
 4118                 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"execute"));
 
 4119                 $tpl->parseCurrentBlock();
 
 4121                 $tpl->setCurrentBlock(
"tbl_action_row");
 
 4122                 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
 
 4123                 $tpl->parseCurrentBlock();
 
 4126                 $tbl->setTitle($this->lng->txt(
"crs_waiting_list"),
"icon_usr.gif",$this->lng->txt(
"crs_waiting_list"));
 
 4127                 $tbl->setHeaderNames(array(
'',
 
 4128                                                                    $this->lng->txt(
"name"),
 
 4129                                                                    $this->lng->txt(
"login"),
 
 4130                                                                    $this->lng->txt(
"crs_time")));
 
 4131                 $tbl->setHeaderVars(array(
"",
 
 4135                                                         array(
"ref_id" => $this->object->getRefId(),
 
 4137                                                                   "update_subscribers" => 1,
 
 4138                                                                   "cmdClass" => 
"ilobjcoursegui",
 
 4139                                                                   "cmdNode" => 
$_GET[
"cmdNode"]));
 
 4140                 $tbl->setColumnWidth(array(
'1%'));
 
 4145                 $this->tpl->setCurrentBlock(
'sub_wait_table');
 
 4146                 $this->tpl->setVariable(
'SUB_WAIT_NAME',
'wait_form');
 
 4147                 $this->tpl->setVariable(
'SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
 
 4148                 $this->tpl->setVariable(
"SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
 
 4149                 $this->tpl->parseCurrentBlock();
 
 4161                                 for($i=0;$i<=60;$i++)
 
 4163                                         $days[$i] = $i < 10 ? 
"0".$i : $i;
 
 4168                                 for($i=0;$i<24;$i++)
 
 4170                                         $days[$i] = $i < 10 ? 
"0".$i : $i;
 
 4175                                 for($i=1;$i<32;$i++)
 
 4177                                         $days[$i] = $i < 10 ? 
"0".$i : $i;
 
 4182                                 for($i=1;$i<13;$i++)
 
 4184                                         $month[$i] = $i < 10 ? 
"0".$i : $i;
 
 4189                                 for($i = date(
"Y",time());$i < date(
"Y",time()) + 3;++$i)
 
 4199                 return mktime($a_time_arr[
"hour"],
 
 4200                                           $a_time_arr[
"minute"],
 
 4201                                           $a_time_arr[
"second"],
 
 4202                                           $a_time_arr[
"month"],
 
 4204                                           $a_time_arr[
"year"]);
 
 4208                 unset(
$_SESSION[
"crs_delete_member_ids"]);
 
 4209                 unset(
$_SESSION[
"crs_delete_subscriber_ids"]);
 
 4219                 global $rbacreview, 
$ilErr, $ilAccess, $ilObjDataCache, 
$ilias;
 
 4220                 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
 
 4222                 $this->lng->loadLanguageModule(
'mail');
 
 4225                 $is_admin = (bool) $ilAccess->checkAccess(
"write", 
"", $this->object->getRefId());
 
 4228                         $this->object->getShowMembers() == $this->
object->SHOW_MEMBERS_DISABLED)
 
 4230                         $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
 
 4234                 $this->tabs_gui->setTabActive(
'members');
 
 4235                 $this->tabs_gui->setSubTabActive(
'mail_members');
 
 4237                 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
 
 4240         require_once 
'Services/Mail/classes/class.ilMailFormCall.php';
 
 4242                 $this->tpl->setVariable(
"SELECT_ACTION",
'ilias.php?baseClass=ilmailgui&view=my_courses&search_crs='.$this->object->getId());
 
 4243                 $this->tpl->setVariable(
"MAIL_SELECTED",$this->lng->txt(
'send_mail_selected'));
 
 4244                 $this->tpl->setVariable(
"MAIL_MEMBERS",$this->lng->txt(
'send_mail_members'));
 
 4245                 $this->tpl->setVariable(
"MAIL_TUTOR",$this->lng->txt(
'send_mail_tutors'));
 
 4246                 $this->tpl->setVariable(
"MAIL_ADMIN",$this->lng->txt(
'send_mail_admins'));
 
 4248                 $this->tpl->setVariable(
"OK",$this->lng->txt(
'next'));
 
 4251                 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
 
 4252                 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'], 
false);
 
 4255                 $sorted_role_ids = array();
 
 4257                 foreach($role_ids as $role_id)
 
 4262                                         $sorted_role_ids[2] = $role_id;
 
 4266                                         $sorted_role_ids[1] = $role_id;
 
 4270                                         $sorted_role_ids[0] = $role_id;
 
 4274                                         $sorted_role_ids[$counter++] = $role_id;
 
 4279                 ksort($sorted_role_ids,SORT_NUMERIC);
 
 4280                 foreach ((array) $sorted_role_ids as $role_id)
 
 4282                         $this->tpl->setCurrentBlock(
"mailbox_row");
 
 4283                         $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
 
 4287                         if(count($ids_for_role_title) >= 2)
 
 4289                                 $ilias->setSetting(
'pear_mail_enable',
true);
 
 4293                                         htmlspecialchars($role_addr)
 
 4298                                 $this->tpl->setVariable(
"MAILBOX",$role_addr);
 
 4303                                 $this->tpl->setVariable(
"MAILBOX",
ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id)). 
" (" . $role_addr . 
")");
 
 4306                         $this->tpl->parseCurrentBlock();
 
 4312                 global $rbacsystem,$ilUser,$ilAccess,
$ilErr,$ilTabs,$ilNavigationHistory,
$ilCtrl;
 
 4314                 $next_class = $this->ctrl->getNextClass($this);
 
 4315                 $cmd = $this->ctrl->getCmd();
 
 4321                         $ilAccess->checkAccess(
'read', 
'', 
$_GET[
'ref_id']))
 
 4323                         $ilNavigationHistory->addItem(
$_GET[
'ref_id'],
 
 4324                                 'repository.php?cmd=frameset&ref_id='.
$_GET[
'ref_id'], 
'crs');
 
 4329                         if(IS_PAYMENT_ENABLED)
 
 4331                                 include_once 
'Services/Payment/classes/class.ilPaymentObject.php';
 
 4335                                         $ilTabs->setTabActive(
'info_short');
 
 4337                                         include_once 
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
 
 4338                                         $this->ctrl->setReturn($this, 
'');
 
 4340                                         $this->ctrl->forwardCommand($pp_gui);
 
 4348                         case "ilinfoscreengui":
 
 4352                         case 'ilmdeditorgui':
 
 4353                                 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 4355                                         $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->WARNING);
 
 4358                                 include_once 
'Services/MetaData/classes/class.ilMDEditorGUI.php';
 
 4360                                 $md_gui =& 
new ilMDEditorGUI($this->object->getId(), 0, $this->
object->getType());
 
 4361                                 $md_gui->
addObserver($this->
object,
'MDUpdateListener',
'General');
 
 4363                                 $this->ctrl->forwardCommand($md_gui);
 
 4364                                 $this->tabs_gui->setTabActive(
'meta_data');
 
 4367                         case 'ilcourseregistrationgui':
 
 4368                                 $this->ctrl->setReturn($this,
'');
 
 4369                                 $this->tabs_gui->setTabActive(
'join');
 
 4370                                 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
 
 4372                                 $this->ctrl->forwardCommand($registration);
 
 4375                         case 'ilobjectcustomuserfieldsgui':
 
 4376                                 include_once 
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
 
 4380                                 $this->tabs_gui->setTabActive(
'settings');
 
 4381                                 $this->ctrl->forwardCommand($cdf_gui);
 
 4384                         case "ilcourseobjectivesgui":
 
 4385                                 include_once 
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
 
 4387                                 $this->ctrl->setReturn($this,
"");
 
 4389                                 $ret =& $this->ctrl->forwardCommand($reg_gui);
 
 4392                         case 'ilobjcoursegroupinggui':
 
 4393                                 include_once 
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
 
 4395                                 $this->ctrl->setReturn($this,
'edit');
 
 4398                                 $this->ctrl->forwardCommand($crs_grp_gui);
 
 4399                                 $this->tabs_gui->setTabActive(
'settings');
 
 4400                                 $this->tabs_gui->setSubTabActive(
'groupings');
 
 4404                                 $this->tabs_gui->setTabActive(
'none');
 
 4414                         case "ilconditionhandlerinterface":
 
 4415                                 include_once 
'./classes/class.ilConditionHandlerInterface.php';
 
 4418                                 if($_GET[
'item_id'])
 
 4420                                         $this->ctrl->saveParameter($this,
'item_id',$_GET[
'item_id']);
 
 4421                                         $this->tabs_gui->setTabActive(
'content');
 
 4425                                         $this->ctrl->forwardCommand($new_gui);
 
 4430                                         $this->tabs_gui->setTabActive(
'settings');
 
 4433                                         $this->ctrl->forwardCommand($new_gui);
 
 4437                         case "illearningprogressgui":
 
 4438                                 include_once 
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
 
 4441                                                                                                           $this->object->getRefId(),
 
 4442                                                                                                           $_GET[
'user_id'] ? $_GET[
'user_id'] : $ilUser->getId());
 
 4443                                 $this->ctrl->forwardCommand($new_gui);
 
 4444                                 $this->tabs_gui->setTabActive(
'learning_progress');
 
 4447                         case 'illicenseoverviewgui':
 
 4448                                 include_once(
"./Services/License/classes/class.ilLicenseOverviewGUI.php");
 
 4450                                 $ret =& $this->ctrl->forwardCommand($license_gui);
 
 4451                                 $this->tabs_gui->setTabActive(
'licenses');
 
 4454                         case 'ilpermissiongui':
 
 4455                                 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
 4456                                 $this->tabs_gui->setTabActive(
'perm_settings');
 
 4458                                 $ret =& $this->ctrl->forwardCommand($perm_gui);
 
 4461                         case 'ilrepositorysearchgui':
 
 4462                                 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
 
 4464                                 $rep_search->setCallback($this,
 
 4465                                         'assignMembersObject',
 
 4476                                 $this->ctrl->setReturn($this,
'members');
 
 4477                                 $ret =& $this->ctrl->forwardCommand($rep_search);
 
 4479                                 $this->tabs_gui->setTabActive(
'members');
 
 4480                                 $this->tabs_gui->setSubTabActive(
'crs_member_administration');
 
 4483                         case 'ilcoursecontentinterface':
 
 4485                                 $this->initCourseContentInterface();
 
 4486                                 $this->cci_obj->cci_setContainer($this);
 
 4488                                 $this->ctrl->forwardCommand($this->cci_obj);
 
 4490                                 $this->tabs_gui->setTabActive(
'content');
 
 4493                         case 'ilcoursecontentgui':
 
 4494                                 $this->ctrl->setReturn($this,
'members');
 
 4495                                 include_once 
'./Modules/Course/classes/class.ilCourseContentGUI.php';
 
 4497                                 $this->ctrl->forwardCommand($course_content_obj);
 
 4500                         case 'ilpublicuserprofilegui':
 
 4501                                 require_once 
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
 
 4504                                 $this->tabs_gui->setTabActive(
'members');
 
 4505                                 $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this, 
"membersGallery"));
 
 4506                                 $this->tabs_gui->setSubTabActive(
'crs_members_gallery');
 
 4507                                 $html = $this->ctrl->forwardCommand($profile_gui);
 
 4508                                 $this->tpl->setVariable(
"ADM_CONTENT", $html);
 
 4511                         case 'ilmemberexportgui':
 
 4512                                 include_once(
'./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
 
 4515                                 $this->tabs_gui->setTabActive(
'members');
 
 4516                                 $this->tabs_gui->setSubTabActive(
'export_members');
 
 4518                                 $this->ctrl->forwardCommand($export);
 
 4521                         case 'ilmemberagreementgui':
 
 4522                                 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
 
 4523                                 $this->ctrl->setReturn($this,
'');
 
 4525                                 $this->ctrl->forwardCommand($agreement);
 
 4528                         case 'ilsessionoverviewgui':
 
 4529                                 include_once(
'./Modules/Session/classes/class.ilSessionOverviewGUI.php');
 
 4532                                 $this->tabs_gui->setTabActive(
'members');
 
 4533                                 $this->tabs_gui->setSubTabActive(
'events');
 
 4535                                 $this->ctrl->forwardCommand($overview);                         
 
 4538                         case 'ilcourseitemadministrationgui':
 
 4539                                 include_once 
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
 
 4540                                 $this->tabs_gui->clearSubTabs();
 
 4541                                 $this->ctrl->setReturn($this,
'view');
 
 4543                                 $this->ctrl->forwardCommand($item_adm_gui);
 
 4547                         case "ilpageobjectgui":
 
 4551                                         $this->tpl->setContent($ret);
 
 4555                         case 'ilobjectcopygui':
 
 4556                                 include_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
 4558                                 $cp->setType(
'crs');
 
 4559                                 $this->ctrl->forwardCommand($cp);
 
 4562                         case "ilobjstylesheetgui":
 
 4566                         case 'ilcourseparticipantsgroupsgui':
 
 4567                                 include_once 
'./Modules/Course/classes/class.ilCourseParticipantsGroupsGUI.php';
 
 4571                                 $this->tabs_gui->setTabActive(
'members');
 
 4572                                 $this->ctrl->forwardCommand($cmg_gui);
 
 4576                                 $this->tabs_gui->setTabActive(
'export');
 
 4577                                 include_once 
'./Services/Export/classes/class.ilExportGUI.php';
 
 4579                                 $exp->addFormat(
'xml');
 
 4580                                 $this->ctrl->forwardCommand($exp);
 
 4584                                 if(!$this->creation_mode)
 
 4594                                 if( !$this->creation_mode
 
 4595                                         && 
$cmd != 
'infoScreen' 
 4596                                         && 
$cmd != 
'sendfile' 
 4597                                         && 
$cmd != 
'unsubscribe' 
 4598                                         && 
$cmd != 
'performUnsubscribe' 
 4599                                         && !$ilAccess->checkAccess(
"read",
'',$this->object->getRefId())
 
 4601                                         || 
$cmd == 
'subscribe')
 
 4603                                         include_once 
'./Modules/Course/classes/class.ilCourseParticipants.php';
 
 4604                                         if($rbacsystem->checkAccess(
'join',$this->object->getRefId()) &&
 
 4607                                                 include_once(
'./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
 
 4608                                                 $this->ctrl->redirectByClass(
"ilCourseRegistrationGUI");
 
 4617                                 if(
$cmd == 
'listObjectives')
 
 4619                                         include_once 
'./Modules/Course/classes/class.ilCourseObjectivesGUI.php';
 
 4621                                         $this->ctrl->setReturn($this,
"");
 
 4623                                         $ret =& $this->ctrl->forwardCommand($obj_gui);
 
 4627                                 if((!$this->creation_mode)&&(!$rbacsystem->checkAccess(
"write",$this->object->getRefId())))
 
 4629                                         $this->ctrl->setReturn($this,
'view');
 
 4630                                         include_once(
'Services/Feedback/classes/class.ilFeedbackGUI.php');
 
 4632                                         $feedbackGUI->handleRequiredFeedback($this->object->getRefId());
 
 4662                 global $ilUser,$ilAccess;
 
 4664                 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 4670                 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
 
 4675                 include_once 
'./Services/Container/classes/class.ilMemberViewSettings.php';
 
 4681                 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
 4682                 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
 
 4692                 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
 
 4712                 include_once(
"Services/License/classes/class.ilLicenseAccess.php");
 
 4716                         $buffer = $lic_set->get(
"license_warning");
 
 4718                         include_once(
"./Services/License/classes/class.ilLicense.php");
 
 4720                         foreach ($licensed_items as $item)
 
 4722                                 $license =& 
new ilLicense($item[
'obj_id']);
 
 4723                                 $remaining = $license->getRemainingLicenses();
 
 4724                                 if ($remaining <= $buffer)
 
 4726                                         $lng->loadlanguageModule(
"license");
 
 4727                                         ilUtil::sendInfo(sprintf($this->lng->txt(
"course_licenses_rare"), $remaining), $a_keep);
 
 4737                 return array(
"ilCourseRegisterGUI",
'ilConditionHandlerInterface');
 
 4743                 $this->initCourseContentInterface();
 
 4744                 $this->cci_obj->cci_setContainer($this);
 
 4745                 $this->cci_obj->cci_objectives();
 
 4751                 $this->tabs_gui->setTabActive(
'edit_content');
 
 4753                 $this->initCourseContentInterface();
 
 4754                 $this->cci_obj->cci_setContainer($this);
 
 4755                 $this->cci_obj->cci_view();
 
 4761                 $this->initCourseContentInterface();
 
 4762                 $this->cci_obj->cci_setContainer($this);
 
 4763                 $this->cci_obj->cci_objectives_ask_reset();
 
 4771                 include_once 
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
 
 4774                 $tmp_obj_res->
reset($this->object->getId());
 
 4778                 $this->initCourseContentInterface();
 
 4779                 $this->cci_obj->cci_setContainer($this);
 
 4780                 $this->cci_obj->cci_objectives();
 
 4787                 include_once 
'./classes/class.ilConditionHandlerInterface.php';
 
 4789                 if(!is_object($this->chi_obj))
 
 4791                         if(
$_GET[
'item_id'])
 
 4794                                 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
 
 4808                 switch ($this->ctrl->getCmd())
 
 4811                                 #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "")); 
 4823                 include_once 
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
 
 4824                 if(substr($a_add,0,5) == 
'rcode')
 
 4826                         if($ilUser->getId() == ANONYMOUS_USER_ID)
 
 4830                                         "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
 
 4831                                         $ilUser->getCurrentLanguage()
 
 4843                 if ($a_add == 
"mem" && $ilAccess->checkAccess(
"write", 
"", $a_target))
 
 4846                         $_GET[
"cmd"] = 
"members";
 
 4847                         $_GET[
"ref_id"] = $a_target;
 
 4848                         include(
"repository.php");
 
 4852                 if ($ilAccess->checkAccess(
"read", 
"", $a_target))
 
 4854                         $_GET[
"cmd"] = 
"frameset";
 
 4855                         $_GET[
"ref_id"] = $a_target;
 
 4856                         include(
"repository.php");
 
 4862                         if ($ilAccess->checkAccess(
"visible", 
"", $a_target))
 
 4864                                 $_GET[
"cmd"] = 
"infoScreen";
 
 4865                                 $_GET[
"ref_id"] = $a_target;
 
 4866                                 include(
"repository.php");
 
 4871                                 if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID))
 
 4873                                         $_GET[
"cmd"] = 
"frameset";
 
 4874                                         $_GET[
"target"] = 
"";
 
 4875                                         $_GET[
"ref_id"] = ROOT_FOLDER_ID;
 
 4878                                         include(
"repository.php");
 
 4883                 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
 
 4889                 return mktime($time[
'h'],$time[
'm'],0,$date[
'm'],$date[
'd'],$date[
'y']);
 
 4894                 return array(
'y' => date(
'Y',$a_unix_time),
 
 4895                                          'm' => date(
'n',$a_unix_time),
 
 4896                                          'd' => date(
'd',$a_unix_time));
 
 4901                 return array(
'h' => date(
'G',$a_unix_time),
 
 4902                                          'm' => date(
'i',$a_unix_time),
 
 4903                                          's' => date(
's',$a_unix_time));
 
 4913                 global $ilUser, 
$ilCtrl, $ilUser, $ilAccess;
 
 4916                 $this->tabs_gui->setTabActive(
'settings');
 
 4919                         !$ilAccess->checkAccess(
"write", 
"", $this->object->getRefId()))
 
 4924                 $latitude = $this->
object->getLatitude();
 
 4925                 $longitude = $this->
object->getLongitude();
 
 4926                 $zoom = $this->
object->getLocationZoom();
 
 4929                 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
 
 4932                         $latitude = $def[
"latitude"];
 
 4933                         $longitude = $def[
"longitude"];
 
 4934                         $zoom =  $def[
"zoom"];
 
 4940                 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 4942                 $form->setFormAction($ilCtrl->getFormAction($this));
 
 4944                 $form->setTitle($this->lng->txt(
"crs_map_settings"));
 
 4950                 $public->setChecked($this->object->getEnableCourseMap());
 
 4951                 $form->addItem($public);
 
 4957                 $loc_prop->setLongitude($longitude);
 
 4958                 $loc_prop->setZoom($zoom);
 
 4959                 $form->addItem($loc_prop);
 
 4961                 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
 
 4963                 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
 
 4975                 $this->
object->update();
 
 4977                 $ilCtrl->redirect($this, 
"editMapSettings");
 
 4987                 $this->tabs_gui->setTabActive(
"members");
 
 4989                 $this->tabs_gui->setSubTabActive(
"crs_members_map");
 
 4991                 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
 
 4997                 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
 
 4999                 $map->setMapId(
"course_map");
 
 5000                 $map->setWidth(
"700px");
 
 5001                 $map->setHeight(
"500px");
 
 5002                 $map->setLatitude($this->object->getLatitude());
 
 5003                 $map->setLongitude($this->object->getLongitude());
 
 5004                 $map->setZoom($this->object->getLocationZoom());
 
 5005                 $map->setEnableTypeControl(
true);
 
 5006                 $map->setEnableNavigationControl(
true);
 
 5007                 $map->setEnableCentralMarker(
true);
 
 5010                 $this->
object->initCourseMemberObject();
 
 5011                 if(count($members = $this->object->members_obj->getParticipants()))
 
 5013                         foreach($members as $user_id)
 
 5015                                 $map->addUserMarker($user_id);
 
 5019                 $tpl->setContent($map->getHTML());
 
 5020                 $tpl->setLeftContent($map->getUserListHTML());
 
 5029                         $this->object->getAboStatus(), $this->
object->getRefId(), $this->
object->getId());
 
 5035         static function _modifyItemGUI($a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path,
 
 5036                 $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id = 0)
 
 5041                 if ($a_parent_ref_id == 0)
 
 5043                         $a_parent_ref_id = $a_course_ref_id;
 
 5047                 if($a_item_data[
'type'] == 
'tst' and
 
 5050                         $a_item_list_gui->addCommandLinkParameter(array(
'crs_show_result' => $a_course_ref_id));                                
 
 5055                 if(isset($a_item_data[
'timing_type']))
 
 5057                         switch($a_item_data[
'timing_type'])
 
 5077                 $a_item_list_gui->enableSubscribe($a_abo_status);
 
 5080                 if ($activation != 
"")
 
 5082                         $a_item_list_gui->addCustomProperty($lng->txt($a_item_data[
'activation_info']), $activation,
 
 5086                 $is_tutor = ($ilAccess->checkAccess(
'write',
'',
 
 5087                         $a_course_ref_id,
'crs', $a_course_obj_id));
 
 5089                 if($a_show_path and $is_tutor)
 
 5091                         $a_item_list_gui->addCustomProperty($lng->txt(
'path'),
 
 5100                         $ilCtrl->setParameterByClass(
'ilcourseitemadministrationgui',
"ref_id",
 
 5102                         $ilCtrl->setParameterByClass(
'ilcourseitemadministrationgui',
"item_id",
 
 5103                                 $a_item_data[
'child']);
 
 5104                         $a_item_list_gui->addCustomCommand($ilCtrl->getLinkTargetByClass(
 
 5105                                 array(strtolower($a_cmd_class), 
'ilCourseItemAdministrationGUI'),
 
 5118                 if ($this->object->getType() != 
'crs')
 
 5122                 if (!$ilAccess->checkAccess(
'write',
'',
 
 5123                         $this->object->getRefId(),
'crs',$this->
object->getId()))
 
 5127                         if($this->object->enabledObjectiveView())
 
 5141                 if(!
$_SESSION[
'crs_timings_panel'][$this->object->getId()] or 1)
 
 5145                                 $this->tabs_gui->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui", 
"view"));
 
 5149                                 $this->tabs_gui->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(
"ilobjcoursegui", 
"disableAdministrationPanel"));
 
 5152                 include_once 
'Modules/Course/classes/class.ilCourseItems.php';
 
 5155                         $this->tabs_gui->addSubTabTarget(
'timings_timings',
 
 5156                                 $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editUserTimings'));
 
 5183                 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
 
 5185                 $dt[
'year'] = (int) 
$_POST[$a_field][
'date'][
'y'];
 
 5186                 $dt[
'mon'] = (int) 
$_POST[$a_field][
'date'][
'm'];
 
 5187                 $dt[
'mday'] = (int) 
$_POST[$a_field][
'date'][
'd'];
 
 5188                 $dt[
'hours'] = (int) 
$_POST[$a_field][
'time'][
'h'];
 
 5189                 $dt[
'minutes'] = (int) 
$_POST[$a_field][
'time'][
'm'];
 
 5190                 $dt[
'seconds'] = (int) 
$_POST[$a_field][
'time'][
's'];
 
 5205                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_objectives_ask_reset.html",
'Modules/Course');
 
 5207                 $this->tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
 
 5208                 $this->tpl->setVariable(
"INFO_STRING",$this->lng->txt(
'crs_objectives_reset_sure'));
 
 5209                 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
 
 5210                 $this->tpl->setVariable(
"TXT_RESET",$this->lng->txt(
'reset'));
 
 5219                 include_once 
'./Modules/Course/classes/class.ilCourseObjectiveResult.php';
 
 5222                 $tmp_obj_res->
reset($this->object->getId());
 
 5224                 $ilUser->deletePref(
'crs_objectives_force_details_'.$this->object->getId());
 
 5232                 include_once 
'./Modules/Course/classes/class.ilCourseStart.php';
 
 5234                 global $ilAccess,$ilUser;
 
 5236                 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
 
 5240                 $this->start_obj = 
new ilCourseStart($this->object->getRefId(),$this->
object->getId());
 
 5241                 if(count($this->start_obj->getStartObjects()) and !$this->start_obj->allFullfilled($ilUser->getId()))
 
 5250                 include_once 
'./Modules/Course/classes/class.ilCourseLMHistory.php';
 
 5251                 include_once 
'./Services/Repository/classes/class.ilRepositoryExplorer.php';
 
 5252                 include_once 
'./classes/class.ilLink.php';
 
 5254                 global $rbacsystem,
$ilias,$ilUser,$ilAccess,$ilObjDataCache;
 
 5256                 $this->tabs_gui->setSubTabActive(
'view');
 
 5258                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.crs_start_view.html",
'Modules/Course');
 
 5259                 $this->tpl->setVariable(
"INFO_STRING",$this->lng->txt(
'crs_info_start'));
 
 5260                 $this->tpl->setVariable(
"TBL_TITLE_START",$this->lng->txt(
'crs_table_start_objects'));
 
 5261                 $this->tpl->setVariable(
"HEADER_NR",$this->lng->txt(
'crs_nr'));
 
 5262                 $this->tpl->setVariable(
"HEADER_DESC",$this->lng->txt(
'description'));
 
 5263                 $this->tpl->setVariable(
"HEADER_EDITED",$this->lng->txt(
'crs_objective_accomplished'));
 
 5266                 $lm_continue =& 
new ilCourseLMHistory($this->object->getRefId(),$ilUser->getId());
 
 5270                 foreach($this->start_obj->getStartObjects() as $start)
 
 5272                         $obj_id = $ilObjDataCache->lookupObjId($start[
'item_ref_id']);
 
 5273                         $ref_id = $start[
'item_ref_id'];
 
 5274                         $type = $ilObjDataCache->lookupType(
$obj_id);
 
 5280                         $obj_frame = $obj_frame ? $obj_frame : 
'';
 
 5283                         $obj_frame = $type == 
'tst' ? 
'' : $obj_frame;
 
 5285                         $contentObj = 
false;
 
 5287                         if($ilAccess->checkAccess(
'read',
'',
$ref_id))
 
 5289                                 $this->tpl->setCurrentBlock(
"start_read");
 
 5290                                 $this->tpl->setVariable(
"READ_TITLE_START",$ilObjDataCache->lookupTitle(
$obj_id));
 
 5291                                 $this->tpl->setVariable(
"READ_TARGET_START",$obj_frame);
 
 5292                                 $this->tpl->setVariable(
"READ_LINK_START", $obj_link.
'&crs_show_result='.$this->object->getRefId());
 
 5293                                 $this->tpl->parseCurrentBlock();
 
 5297                                 $this->tpl->setCurrentBlock(
"start_visible");
 
 5298                                 $this->tpl->setVariable(
"VISIBLE_LINK_START",$ilObjDataCache->lookupTitle(
$obj_id));
 
 5299                                 $this->tpl->parseCurrentBlock();
 
 5303                         if(isset($continue_data[
$ref_id]))
 
 5305                                 $this->tpl->setCurrentBlock(
"link");
 
 5306                                 $this->tpl->setVariable(
"LINK_HREF",
ilLink::_getLink($ref_id,
'',array(
'obj_id',
 
 5307                                                                                                                                                                           $continue_data[$ref_id][
'lm_page_id'])));
 
 5308                                 #$this->tpl->setVariable("CONTINUE_LINK_TARGET",$target); 
 5309                                 $this->tpl->setVariable(
"LINK_NAME",$this->lng->txt(
'continue_work'));
 
 5310                                 $this->tpl->parseCurrentBlock();
 
 5314                         if(!$ilUser->isDesktopItem($ref_id,$type) and
 
 5315                            $this->
object->getAboStatus())
 
 5317                                 if ($ilAccess->checkAccess(
'read',
'',$ref_id))
 
 5319                                         $this->tpl->setCurrentBlock(
"link");
 
 5320                                         $this->ctrl->setParameterByClass(get_class($this),
'item_ref_id',$ref_id);
 
 5321                                         $this->ctrl->setParameterByClass(get_class($this),
'item_id',$ref_id);
 
 5322                                         $this->ctrl->setParameterByClass(get_class($this),
'type',$type);
 
 5324                                         $this->tpl->setVariable(
"LINK_HREF",$this->ctrl->getLinkTarget($this,
'addToDesk'));
 
 5325                                         $this->tpl->setVariable(
"LINK_NAME", $this->lng->txt(
"to_desktop"));
 
 5326                                         $this->tpl->parseCurrentBlock();
 
 5329                         elseif($this->object->getAboStatus())
 
 5331                                         $this->tpl->setCurrentBlock(
"link");
 
 5332                                         $this->ctrl->setParameterByClass(get_class($this),
'item_ref_id',$ref_id);
 
 5333                                         $this->ctrl->setParameterByClass(get_class($this),
'item_id',$ref_id);
 
 5334                                         $this->ctrl->setParameterByClass(get_class($this),
'type',$type);
 
 5336                                         $this->tpl->setVariable(
"LINK_HREF",$this->ctrl->getLinkTarget($this,
'removeFromDesk'));
 
 5337                                         $this->tpl->setVariable(
"LINK_NAME", $this->lng->txt(
"unsubscribe"));
 
 5338                                         $this->tpl->parseCurrentBlock();
 
 5343                         if(strlen($ilObjDataCache->lookupDescription(
$obj_id)))
 
 5345                                 $this->tpl->setCurrentBlock(
"start_description");
 
 5346                                 $this->tpl->setVariable(
"DESCRIPTION_START",$ilObjDataCache->lookupDescription(
$obj_id));
 
 5347                                 $this->tpl->parseCurrentBlock();
 
 5351                         if($this->start_obj->isFullfilled($ilUser->getId(),
$ref_id))
 
 5353                                 $accomplished = 
'accomplished';
 
 5357                                 $accomplished = 
'not_accomplished';
 
 5359                         $this->tpl->setCurrentBlock(
"start_row");
 
 5361                         $this->tpl->setVariable(
"EDITED_ALT",$this->lng->txt(
'crs_objective_'.$accomplished));
 
 5362                         $this->tpl->setVariable(
"ROW_CLASS",
'option_value');
 
 5363                         $this->tpl->setVariable(
"ROW_CLASS_CENTER",
'option_value_center');
 
 5364                         $this->tpl->setVariable(
"OBJ_NR_START",++$counter.
'.');
 
 5365                         $this->tpl->parseCurrentBlock();
 
 5379                         include_once 
'./Services/Container/classes/class.ilMemberViewSettings.php';
 
 5381                         if($settings->isActive() and $settings->getContainer() != $this->
object->getRefId())
 
 5383                                 $settings->setContainer($this->object->getRefId());
 
 5384                                 $rbacsystem->initMemberView();                          
 
 5396                 $link = chr(13).chr(10).chr(13).chr(10);
 
 5397                 $link .= $this->lng->txt(
'crs_mail_permanent_link');
 
 5398                 $link .= chr(13).chr(10).chr(13).chr(10);
 
 5399                 include_once 
'./classes/class.ilLink.php';
 
 5401                 return rawurlencode(base64_encode($link));