/**
  * Constructor
  * @access	public
  */
 public function ilPCLoginPageElementGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
     if (!is_object($this->content_obj)) {
         $this->content_obj = new ilPCLoginPageElement($this->getPage());
     }
 }
 /**
  * Constructor
  * @access	public
  */
 function ilPCQuestionGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     global $ilCtrl;
     $this->scormlmid = $a_pg_obj->parent_id;
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
     $ilCtrl->saveParameter($this, array("qpool_ref_id"));
 }
Пример #3
0
 /**
  * Constructor
  * @access	public
  */
 public function __construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     $this->pg_obj = $a_pg_obj;
     $this->content_obj = $a_content_obj;
     $this->hier_id = $a_hier_id;
     $this->pc_id = $a_pc_id;
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
 function ilPCPlaceHolderGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     $this->pg_obj = $a_pg_obj;
     $this->content_obj = $a_content_obj;
     $this->hier_id = $a_hier_id;
     $this->pc_id = $a_pc_id;
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
 function ilPCMediaObjectGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id = 0, $a_pc_id = "")
 {
     global $ilCtrl;
     $this->ctrl =& $ilCtrl;
     //echo "constructor target:".$_SESSION["il_map_il_target"].":<br>";
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
     $this->setCharacteristics(array("Media" => $this->lng->txt("cont_Media")));
 }
 /**
  * Constructor
  * @access	public
  */
 function ilPCPluggedGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_plugin_name = "", $a_pc_id = "")
 {
     global $ilCtrl;
     $this->setPluginName($a_plugin_name);
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
     if ($a_plugin_name != "") {
         $ilCtrl->setParameter($this, "plugin_name", rawurlencode($a_plugin_name));
     }
     $ilCtrl->saveParameter($this, "plugin_name");
 }
 /**
  * Constructor
  * @access	public
  */
 function ilPCTableDataGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
 /**
  * Constructor
  * @access	public
  */
 function ilPCFileListGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
     $this->setCharacteristics(array("FileListItem" => $this->lng->txt("cont_FileListItem")));
 }
Пример #9
0
 /**
  * Constructor
  * @access	public
  */
 function ilPCProfileGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
 /**
  * Constructor
  * @access	public
  */
 function ilPCConsultationHoursGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
Пример #11
0
 /**
  * Constructor
  * @access	public
  */
 function ilPCBlogGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
 /**
  * Save page editor settings form
  *
  */
 public function savePageEditorSettingsObject()
 {
     global $tpl, $lng, $ilCtrl, $ilSetting;
     $this->initPageEditorForm();
     if ($this->form->checkInput()) {
         include_once "./Services/COPage/classes/class.ilPageEditorSettings.php";
         include_once "./Services/COPage/classes/class.ilPageContentGUI.php";
         $buttons = ilPageContentGUI::_getCommonBBButtons();
         foreach ($buttons as $b => $t) {
             ilPageEditorSettings::writeSetting($_GET["grp"], "active_" . $b, $this->form->getInput("active_" . $b));
         }
         if ($_GET["grp"] == "test") {
             $ilSetting->set("enable_tst_page_edit", (int) $_POST["tst_page_edit"]);
         } elseif ($_GET["grp"] == "rep") {
             $ilSetting->set("enable_cat_page_edit", (int) $_POST["cat_page_edit"]);
         }
         ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
     }
     $ilCtrl->setParameter($this, "grp", $_GET["grp"]);
     $ilCtrl->redirect($this, "showPageEditorSettings");
 }
 /**
  * Constructor
  */
 function ilPCContentTemplateGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
Пример #14
0
 /**
  * Constructor
  * @access	public
  */
 function ilPCSectionGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
     $this->setCharacteristics(ilPCSectionGUI::_getStandardCharacteristics());
 }
 /**
  * Constructor
  * @access	public
  */
 function ilPCResourcesGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     global $tree;
     $this->rep_tree = $tree;
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
 /**
  * Prepare content for js output
  */
 static function xml2outputJS($s_text, $char, $a_pc_id)
 {
     //		$s_text = "<div class='ilc_text_block_".$char."' id='$a_pc_id'>".$s_text."</div>";
     $s_text = $s_text;
     // lists
     $s_text = str_replace(array("<SimpleBulletList>", "</SimpleBulletList>"), array("<ul class='ilc_list_u_BulletedList'>", "</ul>"), $s_text);
     $s_text = str_replace(array("<SimpleNumberedList>", "</SimpleNumberedList>"), array("<ol class='ilc_list_o_NumberedList'>", "</ol>"), $s_text);
     $s_text = str_replace(array("<SimpleListItem>", "</SimpleListItem>"), array("<li class='ilc_list_item_StandardListItem'>", "</li>"), $s_text);
     $s_text = str_replace(array("<SimpleListItem/>"), array("<li class='ilc_list_item_StandardListItem'></li>"), $s_text);
     //$s_text = str_replace("<SimpleBulletList><br />", "<SimpleBulletList>", $s_text);
     //$s_text = str_replace("<SimpleNumberedList><br />", "<SimpleNumberedList>", $s_text);
     //$s_text = str_replace("</SimpleListItem><br />", "</SimpleListItem>", $s_text);
     // spans
     include_once "./Services/COPage/classes/class.ilPageContentGUI.php";
     foreach (ilPageContentGUI::_getCommonBBButtons() as $bb => $cl) {
         if (!in_array($bb, array("code", "tex", "fn", "xln"))) {
             $s_text = str_replace("[" . $bb . "]", '<span class="ilc_text_inline_' . $cl . '">', $s_text);
             $s_text = str_replace("[/" . $bb . "]", '</span>', $s_text);
         }
     }
     // code
     $s_text = str_replace(array("[code]", "[/code]"), array("<code>", "</code>"), $s_text);
     return $s_text;
 }
Пример #17
0
 /**
  * Get table templates
  */
 function getTemplateOptions()
 {
     return parent::getTemplateOptions("table");
 }
Пример #18
0
 /**
  * Constructor
  * @access	public
  */
 function ilPCListItemGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
Пример #19
0
 /**
  * Constructor
  * @access	public
  */
 function ilPCPluggedGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_plugin_name = "", $a_pc_id = "")
 {
     global $ilCtrl;
     $this->setPluginName($a_plugin_name);
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
 function __construct($a_pg_obj, $a_content_obj, $a_hier_id = 0, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
 /**
  * Handle ajax content
  */
 static function handleAjaxContent($a_content)
 {
     $a_content = "<dummy>" . $a_content . "</dummy>";
     $doc = new DOMDocument();
     $content = ilUtil::stripSlashes($a_content, false);
     //		$content = str_replace("&lt;", "<", $content);
     //		$content = str_replace("&gt;", ">", $content);
     //echo "<br><br>".htmlentities($content); mk();
     $res = $doc->loadXML($content);
     if (!$res) {
         return false;
     }
     // convert tags
     $xpath = new DOMXpath($doc);
     $elements = $xpath->query("//span");
     include_once "./Services/Utilities/classes/class.ilDOM2Util.php";
     while (!is_null($elements) && !is_null($element = $elements->item(0))) {
         //$element = $elements->item(0);
         $class = $element->getAttribute("class");
         if (substr($class, 0, 16) == "ilc_text_inline_") {
             $class_arr = explode(" ", $class);
             $cnode = ilDOM2Util::changeName($element, "il" . substr($class_arr[0], 16), false);
             for ($i = 1; $i < count($class_arr); $i++) {
                 $cnode = ilDOM2Util::addParent($cnode, "il" . substr($class_arr[$i], 16));
             }
         } else {
             ilDOM2Util::replaceByChilds($element);
         }
         $elements = $xpath->query("//span");
     }
     // convert tags
     $xpath = new DOMXpath($doc);
     $elements = $xpath->query("/dummy/div");
     $ret = array();
     if (!is_null($elements)) {
         foreach ($elements as $element) {
             $id = $element->getAttribute("id");
             $class = $element->getAttribute("class");
             $class = substr($class, 15);
             if (trim($class) == "") {
                 $class = "Standard";
             }
             $text = $doc->saveXML($element);
             $text = str_replace("<br/>", "\n", $text);
             // remove wrapping div
             $pos = strpos($text, ">");
             $text = substr($text, $pos + 1);
             $pos = strrpos($text, "<");
             $text = substr($text, 0, $pos);
             // todo: remove empty spans <span ...> </span>
             // replace tags by bbcode
             foreach (ilPageContentGUI::_getCommonBBButtons() as $bb => $cl) {
                 if (!in_array($bb, array("code", "tex", "fn", "xln"))) {
                     $text = str_replace("<il" . $cl . ">", "[" . $bb . "]", $text);
                     $text = str_replace("</il" . $cl . ">", "[/" . $bb . "]", $text);
                     $text = str_replace("<il" . $cl . "/>", "", $text);
                 }
             }
             $text = str_replace(array("<code>", "</code>"), array("[code]", "[/code]"), $text);
             $text = str_replace("<code/>", "", $text);
             $text = str_replace('<ul class="ilc_list_u_BulletedList"/>', "", $text);
             $text = str_replace('<ul class="ilc_list_o_NumberedList"/>', "", $text);
             $ret[] = array("text" => $text, "id" => $id, "class" => $class);
         }
     }
     // we should only have one here!
     return $ret[0];
 }
 /**
  * Constructor
  */
 function ilPCQuestionOverviewGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
 /**
  * Constructor
  * @access	public
  */
 function ilPCVerificationGUI(&$a_pg_obj, &$a_content_obj, $a_hier_id, $a_pc_id = "")
 {
     parent::ilPageContentGUI($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
 }
Пример #24
0
 /**
  * Get Tiny Menu
  */
 static function getTinyMenu($a_par_type, $a_int_links = false, $a_wiki_links = false, $a_keywords = false, $a_style_id = 0, $a_paragraph_styles = true, $a_save_return = true, $a_anchors = false, $a_save_new = true)
 {
     global $lng, $ilCtrl;
     $mathJaxSetting = new ilSetting("MathJax");
     include_once "./Services/COPage/classes/class.ilPageEditorSettings.php";
     include_once "./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
     $btpl = new ilTemplate("tpl.tiny_menu.html", true, true, "Services/COPage");
     // debug ghost element
     if (DEVMODE == 1) {
         $btpl->touchBlock("debug_ghost");
     }
     // bullet list
     $btpl->touchBlock("blist_button");
     ilTooltipGUI::addTooltip("il_edm_blist", $lng->txt("cont_blist"), "iltinymenu_bd");
     // numbered list
     $btpl->touchBlock("nlist_button");
     ilTooltipGUI::addTooltip("il_edm_nlist", $lng->txt("cont_nlist"), "iltinymenu_bd");
     // list indent
     $btpl->touchBlock("list_indent");
     ilTooltipGUI::addTooltip("ilIndentBut", $lng->txt("cont_list_indent"), "iltinymenu_bd");
     // list outdent
     $btpl->touchBlock("list_outdent");
     ilTooltipGUI::addTooltip("ilOutdentBut", $lng->txt("cont_list_outdent"), "iltinymenu_bd");
     if ($a_int_links) {
         $btpl->touchBlock("bb_ilink_button");
         ilTooltipGUI::addTooltip("iosEditInternalLinkTrigger", $lng->txt("cont_link_to_internal"), "iltinymenu_bd");
     }
     ilTooltipGUI::addTooltip("il_edm_xlink", $lng->txt("cont_link_to_external"), "iltinymenu_bd");
     // remove format
     $btpl->touchBlock("rformat_button");
     ilTooltipGUI::addTooltip("il_edm_rformat", $lng->txt("cont_remove_format"), "iltinymenu_bd");
     if ($a_paragraph_styles) {
         // new paragraph
         $btpl->setCurrentBlock("new_par");
         $btpl->setVariable("IMG_NEWPAR", "+");
         $btpl->parseCurrentBlock();
         ilTooltipGUI::addTooltip("il_edm_newpar", $lng->txt("cont_insert_new_paragraph"), "iltinymenu_bd");
         $btpl->setCurrentBlock("par_edit");
         $btpl->setVariable("TXT_PAR_FORMAT", $lng->txt("cont_par_format"));
         include_once "./Services/COPage/classes/class.ilPCParagraphGUI.php";
         $btpl->setVariable("STYLE_SELECTOR", ilPCParagraphGUI::getStyleSelector($a_selected, ilPCParagraphGUI::_getCharacteristics($a_style_id), true));
         ilTooltipGUI::addTooltip("ilAdvSelListAnchorText_style_selection", $lng->txt("cont_paragraph_styles"), "iltinymenu_bd");
         $btpl->parseCurrentBlock();
     }
     if ($a_keywords) {
         $btpl->setCurrentBlock("bb_kw_button");
         $btpl->setVariable("CC_KW", "kw");
         $btpl->parseCurrentBlock();
         ilTooltipGUI::addTooltip("il_edm_kw", $lng->txt("cont_text_keyword"), "iltinymenu_bd");
     }
     if ($a_wiki_links) {
         $btpl->setCurrentBlock("bb_wikilink_button2");
         $btpl->setVariable("TXT_WIKI_BUTTON2", $lng->txt("obj_wiki"));
         $btpl->setVariable("WIKI_BUTTON2_URL", $ilCtrl->getLinkTargetByClass("ilwikipagegui", ""));
         $btpl->parseCurrentBlock();
         $btpl->setCurrentBlock("bb_wikilink_button");
         $btpl->setVariable("TXT_WLN2", $lng->txt("obj_wiki"));
         $btpl->parseCurrentBlock();
         ilTooltipGUI::addTooltip("il_edm_wlink", $lng->txt("cont_link_to_wiki"), "iltinymenu_bd");
     }
     $aset = new ilSetting("adve");
     include_once "./Services/COPage/classes/class.ilPageContentGUI.php";
     foreach (ilPageContentGUI::_getCommonBBButtons() as $c => $st) {
         // these are handled via drop down now...
         if (in_array($c, array("com", "quot", "acc", "code"))) {
             continue;
         }
         if (ilPageEditorSettings::lookupSettingByParentType($a_par_type, "active_" . $c, true)) {
             $cc_code = $c;
             if ($aset->get("use_physical")) {
                 $cc_code = str_replace(array("str", "emp", "imp"), array("B", "I", "U"), $cc_code);
             }
             if ($c != "tex" || $mathJaxSetting->get("enable") || defined("URL_TO_LATEX")) {
                 $btpl->setCurrentBlock("bb_" . $c . "_button");
                 $btpl->setVariable("CC_" . strtoupper($c), $cc_code);
                 $btpl->parseCurrentBlock();
                 ilTooltipGUI::addTooltip("il_edm_cc_" . $c, $lng->txt("cont_cc_" . $c), "iltinymenu_bd");
                 //					$btpl->setVariable("TXT_".strtoupper($c), $this->lng->txt("cont_text_".$c));
             }
         }
     }
     if ($mathJaxSetting->get("enable") || defined("URL_TO_LATEX")) {
         ilTooltipGUI::addTooltip("il_edm_tex", $lng->txt("cont_tex"), "iltinymenu_bd");
     }
     ilTooltipGUI::addTooltip("il_edm_fn", $lng->txt("cont_fn"), "iltinymenu_bd");
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $sdd = new ilAdvancedSelectionListGUI();
     $sdd->setPullRight(false);
     $sdd->setListTitle($lng->txt("save") . "...");
     if ($a_save_return) {
         $btpl->setCurrentBlock("save_return");
         $btpl->setVariable("TXT_SAVE_RETURN", $lng->txt("save_return"));
         $btpl->parseCurrentBlock();
         $sdd->addItem($lng->txt("save_return"), "", "#", "", "", "", "", "", "ilCOPage.cmdSaveReturn(false); return false;");
     }
     if ($a_save_new) {
         $btpl->setCurrentBlock("save_new");
         $btpl->setVariable("TXT_SAVE_NEW", $lng->txt("save_new"));
         $btpl->parseCurrentBlock();
         $sdd->addItem($lng->txt("save_new"), "", "#", "", "", "", "", "", "ilCOPage.cmdSaveReturn(true); return false;");
     }
     $sdd->addItem($lng->txt("save"), "", "#", "", "", "", "", "", "ilCOPage.cmdSave(null); return false;");
     $sdd->addItem($lng->txt("cancel"), "", "#", "", "", "", "", "", "ilCOPage.cmdCancel(); return false;");
     if ($a_anchors) {
         $btpl->setCurrentBlock("bb_anc_button");
         $btpl->setVariable("CC_ANC", "anc");
         $btpl->parseCurrentBlock();
         ilTooltipGUI::addTooltip("il_edm_anc", $lng->txt("cont_anchor"), "iltinymenu_bd");
     }
     $btpl->setVariable("SAVE_DROPDOWN", $sdd->getHTML());
     /*		// footnote
     		$btpl->setVariable("TXT_ILN", $this->lng->txt("cont_text_iln"));
     		$btpl->setVariable("TXT_BB_TIP", $this->lng->txt("cont_bb_tip"));
     		$btpl->setVariable("TXT_WLN", $lng->txt("wiki_wiki_page"));
     */
     //		$btpl->setVariable("PAR_TA_NAME", $a_ta_name);
     $btpl->setVariable("TXT_SAVE", $lng->txt("save"));
     $btpl->setVariable("TXT_CANCEL", $lng->txt("cancel"));
     $btpl->setVariable("TXT_CHAR_FORMAT", $lng->txt("cont_char_format"));
     $btpl->setVariable("TXT_LISTS", $lng->txt("cont_lists"));
     $btpl->setVariable("TXT_LINKS", $lng->txt("cont_links"));
     $btpl->setVariable("TXT_MORE_FUNCTIONS", $lng->txt("cont_more_functions"));
     $btpl->setVariable("TXT_SAVING", $lng->txt("cont_saving"));
     include_once "./Services/COPage/classes/class.ilPCParagraphGUI.php";
     $btpl->setVariable("CHAR_STYLE_SELECTOR", ilPCParagraphGUI::getCharStyleSelector($a_par_type));
     ilTooltipGUI::addTooltip("ilAdvSelListAnchorElement_char_style_selection", $lng->txt("cont_more_character_styles"), "iltinymenu_bd");
     return $btpl->get();
 }