5 include_once 
"./Services/Object/classes/class.ilObjectGUI.php";
 
   26                 global $rbacsystem, 
$lng;
 
   29                 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
 
   30                 $this->lng->loadLanguageModule(
'adve');
 
   31                 $this->lng->loadLanguageModule(
'meta');
 
   33                 if (!$rbacsystem->checkAccess(
'read',$this->object->getRefId()))
 
   35                         $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read_adve"),$this->ilias->error_obj->WARNING);
 
   41                 $next_class = $this->ctrl->getNextClass($this);
 
   42                 $cmd = $this->ctrl->getCmd();
 
   48                         case 'ilpermissiongui':
 
   49                                 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   51                                 $ret =& $this->ctrl->forwardCommand($perm_gui);
 
   57                                         $cmd = 
"showGeneralPageEditorSettings";
 
   84                 $this->ctrl->redirect($this);
 
   97                 $editor = $this->
object->_getRichTextEditor();
 
   99                 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  101                 $this->form->setFormAction($ilCtrl->getFormAction($this));
 
  102                 $this->form->setTitle($lng->txt(
"adve_activation"));
 
  104                 if ($editor == 
"tinymce")
 
  108                 $this->form->addItem($cb);
 
  109                 $this->form->addCommandButton(
"saveSettings", $lng->txt(
"save"));
 
  111                 $tpl->setContent($this->form->getHTML());
 
  121                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.advanced_editing_assessment.html",
 
  122                         "Services/AdvancedEditing");
 
  124                 $alltags =& $this->
object->getHTMLTags();
 
  125                 $usedtags =& $this->
object->_getUsedHTMLTags(
"assessment");
 
  126                 foreach ($alltags as $tag)
 
  128                         $this->tpl->setCurrentBlock(
"html_tag_row");
 
  129                         $this->tpl->setVariable(
"HTML_TAG", $tag);
 
  130                         if (is_array($usedtags))
 
  132                                 if (in_array($tag, $usedtags))
 
  134                                         $this->tpl->setVariable(
"HTML_TAG_SELECTED", 
" selected=\"selected\"");
 
  137                         $this->tpl->parseCurrentBlock();
 
  140                 if ($ilAccess->checkAccess(
"write", 
"", $this->object->getRefId()))
 
  142                         $this->tpl->setCurrentBlock(
"save");
 
  143                         $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
  144                         $this->tpl->parseCurrentBlock();
 
  147                 $this->tpl->setCurrentBlock(
"adm_content");
 
  148                 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  149                 $this->tpl->setVariable(
"TXT_ASSESSMENT_SETTINGS", $this->lng->txt(
"advanced_editing_assessment_settings"));
 
  150                 $this->tpl->setVariable(
"TXT_ALLOW_HTML_TAGS", $this->lng->txt(
"advanced_editing_allow_html_tags"));
 
  152                 $this->tpl->parseCurrentBlock();
 
  163                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.advanced_editing_survey.html",
 
  164                         "Services/AdvancedEditing");
 
  166                 $alltags =& $this->
object->getHTMLTags();
 
  167                 $usedtags =& $this->
object->_getUsedHTMLTags(
"survey");
 
  168                 foreach ($alltags as $tag)
 
  170                         $this->tpl->setCurrentBlock(
"html_tag_row");
 
  171                         $this->tpl->setVariable(
"HTML_TAG", $tag);
 
  172                         if (is_array($usedtags))
 
  174                                 if (in_array($tag, $usedtags))
 
  176                                         $this->tpl->setVariable(
"HTML_TAG_SELECTED", 
" selected=\"selected\"");
 
  179                         $this->tpl->parseCurrentBlock();
 
  182                 if ($ilAccess->checkAccess(
"write", 
"", $this->object->getRefId()))
 
  184                         $this->tpl->setCurrentBlock(
"save");
 
  185                         $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
  186                         $this->tpl->parseCurrentBlock();
 
  189                 $this->tpl->setCurrentBlock(
"adm_content");
 
  190                 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  191                 $this->tpl->setVariable(
"TXT_SURVEY_SETTINGS", $this->lng->txt(
"advanced_editing_survey_settings"));
 
  192                 $this->tpl->setVariable(
"TXT_ALLOW_HTML_TAGS", $this->lng->txt(
"advanced_editing_allow_html_tags"));
 
  194                 $this->tpl->parseCurrentBlock();
 
  243                         $this->
object->_setRichTextEditor(
"tinymce");
 
  247                         $this->
object->_setRichTextEditor(
"");
 
  251                 $this->ctrl->redirect($this,
'settings');
 
  258                 $this->
object->_setUsedHTMLTags(
$_POST[
"html_tags"], 
"assessment");
 
  259                 $this->ctrl->redirect($this,
'assessment');
 
  266                 $this->
object->_setUsedHTMLTags(
$_POST[
"html_tags"], 
"survey");
 
  267                 $this->ctrl->redirect($this,
'survey');
 
  282                 $this->addPageEditorSettingsSubTabs();
 
  284                 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
 
  287                 $this->cgrp = 
$_GET[
"grp"];
 
  288                 if ($this->cgrp == 
"")
 
  290                         $this->cgrp = key($grps);
 
  293                 $ilCtrl->setParameter($this, 
"grp", $this->cgrp);
 
  294                 $ilTabs->setSubTabActive(
"adve_grp_".$this->cgrp);
 
  297                 $tpl->setContent($this->form->getHtml());
 
  309                 $lng->loadLanguageModule(
"content");
 
  311                 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  314                 if ($this->cgrp == 
"rep")
 
  316                         $this->form->setTitle($lng->txt(
"adve_activation"));
 
  317                         $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"advanced_editing_rep_page_editing"), 
"cat_page_edit");
 
  318                         $cb->
setInfo($this->lng->txt(
"advanced_editing_rep_page_editing_desc"));
 
  319                         if ($ilSetting->get(
"enable_cat_page_edit"))
 
  321                                 $cb->setChecked(
true);
 
  323                         $this->form->addItem($cb);
 
  326                         $sh->setTitle($lng->txt(
"adve_text_content_features"));
 
  327                         $this->form->addItem($sh);
 
  331                         $this->form->setTitle($lng->txt(
"adve_text_content_features"));
 
  335                 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
 
  337                 include_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
 
  339                 foreach ($buttons as $b => 
$t)
 
  342                         $cb = 
new ilCheckboxInputGUI(str_replace(
":", 
"", $this->lng->txt(
"cont_text_".$b)), 
"active_".$b);
 
  344                         $this->form->addItem($cb);
 
  348                 $this->form->addCommandButton(
"savePageEditorSettings", $lng->txt(
"save"));
 
  350                 $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  363                 if ($this->form->checkInput())
 
  365                         include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
 
  366                         include_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
 
  368                         foreach ($buttons as $b => 
$t)
 
  371                                         $this->form->getInput(
"active_".$b));
 
  374                         if (
$_GET[
"grp"] == 
"rep")
 
  376                                 $ilSetting->set(
"enable_cat_page_edit", (
int) 
$_POST[
"cat_page_edit"]);
 
  382                 $ilCtrl->setParameter($this, 
"grp", 
$_GET[
"grp"]);
 
  383                 $ilCtrl->redirect($this, 
"showPageEditorSettings");
 
  391                 global 
$tpl, $ilTabs;
 
  393                 $this->addPageEditorSettingsSubTabs();
 
  394                 $ilTabs->activateTab(
"adve_page_editor_settings");
 
  397                 $tpl->setContent($form->getHTML());
 
  407                 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  414                 $cb->
setInfo($this->lng->txt(
"adve_use_physical_info"));
 
  415                 $cb->setChecked($aset->get(
"use_physical"));
 
  418                 $form->addCommandButton(
"saveGeneralPageSettings", $lng->txt(
"save"));
 
  420                 $form->setTitle($lng->txt(
"adve_pe_general"));
 
  421                 $form->setFormAction($ilCtrl->getFormAction($this));
 
  434                 if ($form->checkInput())
 
  437                         $aset->set(
"use_physical", 
$_POST[
"use_physical"]);
 
  440                 $ilCtrl->redirect($this, 
"showGeneralPageEditorSettings");
 
  450                 if ($ilCtrl->getNextClass() != 
"ilpermissiongui" &&
 
  451                         !in_array($ilCtrl->getCmd(), array(
"showPageEditorSettings",
 
  452                                 "showGeneralPageEditorSettings", 
"", 
"view")))
 
  454                         $tabs_gui->addSubTabTarget(
"adve_general_settings",
 
  455                                                                                          $this->ctrl->getLinkTarget($this, 
"settings"),
 
  456                                                                                          array(
"settings", 
"saveSettings"),
 
  458                         $tabs_gui->addSubTabTarget(
"adve_assessment_settings",
 
  459                                                                                          $this->ctrl->getLinkTarget($this, 
"assessment"),
 
  460                                                                                          array(
"assessment", 
"saveAssessmentSettings"),
 
  462                         $tabs_gui->addSubTabTarget(
"adve_survey_settings",
 
  463                                                                                          $this->ctrl->getLinkTarget($this, 
"survey"),
 
  464                                                                                          array(
"survey", 
"saveSurveySettings"),
 
  470                         $tabs_gui->addSubTabTarget(
"adve_frm_post_settings",
 
  471                                                                                          $this->ctrl->getLinkTarget($this, 
"frmPost"),
 
  472                                                                                          array(
"frmPost", 
"saveFrmPostSettings"),
 
  483                         $this->
object->_setUsedHTMLTags((array)
$_POST[
'html_tags'], 
'frm_post');        
 
  490                 $this->ctrl->redirect($this,
'frmPost');
 
  495                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.advanced_editing_frm_post.html",
 
  496                         "Services/AdvancedEditing");
 
  498                 $alltags =& $this->
object->getHTMLTags();
 
  499                 $usedtags =& $this->
object->_getUsedHTMLTags(
"frm_post");
 
  500                 foreach ($alltags as $tag)
 
  502                         $this->tpl->setCurrentBlock(
"html_tag_row");
 
  503                         $this->tpl->setVariable(
"HTML_TAG", $tag);
 
  504                         if (is_array($usedtags))
 
  506                                 if (in_array($tag, $usedtags))
 
  508                                         $this->tpl->setVariable(
"HTML_TAG_SELECTED", 
" selected=\"selected\"");
 
  511                         $this->tpl->parseCurrentBlock();
 
  514                 $this->tpl->setCurrentBlock(
"adm_content");
 
  515                 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  516                 $this->tpl->setVariable(
"TXT_FRM_POST_SETTINGS", $this->lng->txt(
"advanced_editing_frm_post_settings"));
 
  517                 $this->tpl->setVariable(
"TXT_ALLOW_HTML_TAGS", $this->lng->txt(
"advanced_editing_allow_html_tags"));
 
  518                 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
  520                 $this->tpl->parseCurrentBlock();
 
  531                 $ilTabs->addSubTabTarget(
"adve_pe_general",
 
  532                          $ilCtrl->getLinkTarget($this, 
"showGeneralPageEditorSettings"),
 
  533                          array(
"showGeneralPageEditorSettings", 
"", 
"view")); 
 
  535                 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
 
  538                 foreach ($grps as $g => $types)
 
  540                         $ilCtrl->setParameter($this, 
"grp", $g);
 
  541                         $ilTabs->addSubTabTarget(
"adve_grp_".$g,
 
  542                                  $ilCtrl->getLinkTarget($this, 
"showPageEditorSettings"),
 
  543                                  array(
"showPageEditorSettings")); 
 
  545                 $ilCtrl->setParameter($this, 
"grp", 
$_GET[
"grp"]);
 
  558                 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
 
  560                         $tabs_gui->addTarget(
"adve_page_editor_settings",
 
  561                                 $this->ctrl->getLinkTarget($this, 
"showGeneralPageEditorSettings"),
 
  562                                         array(
"showPageEditorSettings", 
"",
"view"));
 
  564                         $tabs_gui->addTarget(
"adve_rte_settings",
 
  565                                 $this->ctrl->getLinkTarget($this, 
"settings"),
 
  566                                         array(
"settings",
"assessment", 
"survey", 
"learningModule",
 
  570                 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
 
  572                         $tabs_gui->addTarget(
"perm_settings",
 
  573                                 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"), array(
"perm",
"info",
"owner"), 
'ilpermissiongui');