protected function renderConsultationHours($a_user_id, $a_mode, $a_group_ids) { return $this->addPlaceholderInfo(parent::renderConsultationHours($a_user_id, $a_mode, $a_group_ids)); }
/** * Export page html */ function exportPageHTML($a_post_id) { global $lng; // page include_once "Services/Portfolio/classes/class.ilPortfolioPageGUI.php"; $pgui = new ilPortfolioPageGUI($this->object->getId(), $a_post_id); $pgui->setOutputMode("offline"); $page_content = $pgui->showPage(); $this->writeExportFile("prtf_" . $a_post_id . ".html", $page_content, $pgui->getJsOnloadCode()); }
protected function renderPageElement($a_type, $a_html) { return parent::renderPageElement($a_type, $this->addPlaceholderInfo($a_html)); }
/** * Get portfolio template page gui instance * * @param int $a_page_id * @return ilPortfolioPageGUI */ protected function getPageGUIInstance($a_page_id) { include_once "Modules/Portfolio/classes/class.ilPortfolioPageGUI.php"; $page_gui = new ilPortfolioPageGUI($this->object->getId(), $a_page_id, 0, $this->object->hasPublicComments()); $page_gui->setAdditional($this->getAdditional()); return $page_gui; }
/** * Export page html */ function exportPageHTML($a_post_id) { global $lng; // page include_once "Modules/Portfolio/classes/class.ilPortfolioPageGUI.php"; $pgui = new ilPortfolioPageGUI($this->object->getId(), $a_post_id); $pgui->setOutputMode("offline"); $pgui->setFullscreenLink("fullscreen.html"); // #12930 - see page.xsl $page_content = $pgui->showPage(); $material = $pgui->getExportMaterial(); $this->export_material[] = $material; $this->writeExportFile("prtf_" . $a_post_id . ".html", $page_content, $pgui->getJsOnloadCode(), $material["js"]); }
/** * Show user page */ function preview($a_return = false, $a_content = false, $a_show_notes = true) { global $ilUser, $tpl, $ilCtrl, $ilTabs, $lng; // public profile if ($_REQUEST["back_url"]) { $back = $_REQUEST["back_url"]; } else { if ($_GET["baseClass"] != "ilPublicUserProfileGUI" && $ilUser->getId() && $ilUser->getId() != ANONYMOUS_USER_ID) { if (!$this->checkAccess("write")) { $ilCtrl->setParameter($this, "user", $this->portfolio->getOwner()); $back = $ilCtrl->getLinkTarget($this, "showOther"); $ilCtrl->setParameter($this, "user", ""); } else { $back = $ilCtrl->getLinkTarget($this, "pages"); } } } $tpl->setTopBar($back); $portfolio_id = $this->portfolio->getId(); $user_id = $this->portfolio->getOwner(); $ilTabs->clearTargets(); include_once "./Services/Portfolio/classes/class.ilPortfolioPage.php"; $pages = ilPortfolioPage::getAllPages($portfolio_id); $current_page = $_GET["user_page"]; // display first page of portfolio if none given if (!$current_page && $pages) { $current_page = $pages; $current_page = array_shift($current_page); $current_page = $current_page["id"]; } // render tabs $current_blog = null; if (count($pages) > 1) { foreach ($pages as $p) { if ($p["type"] == ilPortfolioPage::TYPE_BLOG) { // needed for blog comments (see below) if ($p["id"] == $current_page) { $current_blog = (int) $p["title"]; } include_once "Modules/Blog/classes/class.ilObjBlog.php"; $p["title"] = ilObjBlog::_lookupTitle($p["title"]); } $ilCtrl->setParameter($this, "user_page", $p["id"]); $ilTabs->addTab("user_page_" . $p["id"], $p["title"], $ilCtrl->getLinkTarget($this, "preview")); } $ilTabs->activateTab("user_page_" . $current_page); } $ilCtrl->setParameter($this, "user_page", $current_page); if (!$a_content) { // get current page content include_once "./Services/Portfolio/classes/class.ilPortfolioPageGUI.php"; $page_gui = new ilPortfolioPageGUI($portfolio_id, $current_page, 0, $this->portfolio->hasPublicComments()); $page_gui->setEmbedded(true); $page_gui->setAdditional($this->getAdditional()); $content = $ilCtrl->getHTML($page_gui); } else { $content = $a_content; } if ($a_return && $this->checkAccess("write")) { return $content; } // blog posting comments are handled within the blog $notes = ""; if ($a_show_notes && $this->portfolio->hasPublicComments() && !$current_blog) { include_once "./Services/Notes/classes/class.ilNoteGUI.php"; $note_gui = new ilNoteGUI($portfolio_id, $current_page, "pfpg"); $note_gui->setRepositoryMode(false); $note_gui->enablePublicNotes(true); $note_gui->enablePrivateNotes(false); $note_gui->enablePublicNotesDeletion($ilUser->getId() == $user_id); $next_class = $ilCtrl->getNextClass($this); if ($next_class == "ilnotegui") { $notes = $ilCtrl->forwardCommand($note_gui); } else { $notes = $note_gui->getNotesHTML(); } } if ($this->perma_link === null) { include_once 'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php'; $plink = new ilPermanentLinkGUI("prtf", $this->portfolio->getId()); $plink = $plink->getHTML(); } else { $plink = $this->perma_link; } self::renderFullscreenHeader($this->portfolio, $tpl, $user_id); // wiki/forum will set locator items $tpl->setVariable("LOCATOR", ""); // #10717 $tpl->setContent($content . '<div class="ilClearFloat">' . $notes . $plink . '</div>'); $tpl->setFrameFixedWidth(true); echo $tpl->show("DEFAULT", true, true); exit; }