ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPageObjectGUI Class Reference

Class ilPageObjectGUI. More...

+ Inheritance diagram for ilPageObjectGUI:
+ Collaboration diagram for ilPageObjectGUI:

Public Member Functions

 ilPageObjectGUI ($a_parent_type, $a_id=0, $a_old_nr=0)
 Constructor public.
 initPageObject ($a_parent_type, $a_id, $a_old_nr)
 setBibId ($a_id)
 Set Bib Id.
 getBibId ()
 Get Bib Id.
 setPageObject ($a_pg_obj)
 Set Page Object.
 getPageObject ()
 Get Page Object.
 setOutputMode ($a_mode=IL_PAGE_PRESENTATION)
 Set Output Mode.
 getOutputMode ()
 setTemplateOutput ($a_output=true)
 outputToTemplate ()
 setPresentationTitle ($a_title="")
 getPresentationTitle ()
 setHeader ($a_title="")
 getHeader ()
 setLinkParams ($l_params="")
 getLinkParams ()
 setLinkFrame ($l_frame="")
 getLinkFrame ()
 setLinkXML ($link_xml)
 getLinkXML ()
 setQuestionXML ($question_xml)
 setQuestionHTML ($question_html)
 getQuestionXML ()
 getQuestionHTML ()
 setTemplateTargetVar ($a_variable)
 getTemplateTargetVar ()
 setTemplateOutputVar ($a_value)
 getTemplateOutputVar ()
 setOutputSubmode ($a_mode)
 getOutputSubmode ()
 setSourcecodeDownloadScript ($script_name)
 getSourcecodeDownloadScript ()
 enableCitation ($a_enabled)
 isEnabledCitation ()
 setLocator (&$a_locator)
 setTabs ($a_tabs)
 setPageBackTitle ($a_title)
 setFileDownloadLink ($a_download_link)
 getFileDownloadLink ()
 setFullscreenLink ($a_fullscreen_link)
 getFullscreenLink ()
 setIntLinkHelpDefault ($a_type, $a_id)
 setIntLinkReturn ($a_return)
 enableChangeComments ($a_enabled)
 isEnabledChangeComments ()
 enableNotes ($a_enabled, $a_parent_id)
 isEnabledNotes ()
 enableContentIncludes ($a_enable)
 Enable content includes.
 isEnabledContentIncludes ()
 Are content includes enabled?
 setOfflineDirectory ($offdir)
 set offline directory to offdir
 getOfflineDirectory ()
 get offline directory
 setViewPageLink ($a_link, $a_target="")
 set link for "view page" button
 getViewPageLink ()
 get view page link
 getViewPageTarget ()
 get view page target frame
 setActivationListener (&$a_obj, $a_meth)
 setEnabledActivation ($a_act)
 getEnabledActivation ()
 setEnabledScheduledActivation ($a_act)
 getEnabledScheduledActivation ()
 setTabHook ($a_object, $a_function)
 Set tab hook.
 setEnabledInternalLinks ($a_enabledinternallinks)
 Set Enable internal links.
 getEnabledInternalLinks ()
 Get Enable internal links.
 setEditPreview ($a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit.
 getEditPreview ()
 Get Display first Edit tab, then Preview tab, instead of Page and Edit.
 setPreventHTMLUnmasking ($a_preventhtmlunmasking)
 Set Prevent HTML Unmasking (true/false).
 getPreventHTMLUnmasking ()
 Get Prevent HTML Unmasking (true/false).
 setEnabledTabs ($a_enabledtabs)
 Set Output tabs.
 getEnabledTabs ()
 Get Output tabs.
 setEnabledRepositoryObjects ($a_enabledrepositoryobjects)
 Set Enable Repository Objects Content Component.
 getEnabledRepositoryObjects ()
 Get Enable Repository Objects Content Component.
 setEnabledMaps ($a_enabledmaps)
 Set Enable Maps Content Component.
 getEnabledMaps ()
 Get Enable Maps Content Component.
 setEnabledPCTabs ($a_enabledpctabs)
 Set Enable Tabs Content Component.
 getEnabledPCTabs ()
 Get Enable Tabs Content Component.
 setEnabledFileLists ($a_enabledfilelists)
 Set Enable File Lists Content Componente (Default is true).
 getEnabledFileLists ()
 Get Enable File Lists Content Componente (Default is true).
 setEnabledPageFocus ($a_enabledpagefocus)
 Set Enable page focus.
 getEnabledPageFocus ()
 Get Enable page focus.
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater.
 setPrependingHtml ($a_prependinghtml)
 Set Prepending HTML.
 getPrependingHtml ()
 Get Prepending HTML.
 setEnabledWikiLinks ($a_enablewikilinks)
 Set Enable Wiki Links.
 getEnabledWikiLinks ()
 Get Enable Wiki Links.
 setEnableEditing ($a_enableediting)
 Set Enable Editing.
 getEnableEditing ()
 Get Enable Editing.
 setRawPageContent ($a_rawpagecontent)
 Set Get raw page content only.
 getRawPageContent ()
 Get Get raw page content only.
 setLayoutMode ($a_layout_mode)
 Set Layout Mode.
 getLayoutMode ()
 Get Layout Mode enabled/disabled.
 setStyleId ($a_styleid)
 Set Style Id.
 getStyleId ()
 Get Style Id.
 setEnabledSelfAssessment ($a_enabledselfassessment)
 Set Enable Self Assessment Questions.
 getEnabledSelfAssessment ()
 Get Enable Self Assessment Questions.
 setCompareMode ($a_val)
 Set compare mode.
 getCompareMode ()
 Get compare mode.
 activateMetaDataEditor ($a_rep_obj_id, $a_sub_obj_id, $a_type, $a_observer_obj=NULL, $a_observer_func="")
 Activate meda data editor.
 determineFileDownloadLink ()
 Determine file download link.
 determineFullscreenLink ()
 Determine fullscreen link.
 determineSourcecodeDownloadScript ()
 Determine source code download script.
 getComponentPluginsXML ()
 Put information about activated plugins into XML.
executeCommand ()
 execute command
 deactivatePage ()
 activatePage ()
 showPage ()
 setDefaultLinkXml ()
 Set standard link xml.
 downloadFile ()
 Download file of file lists.
 displayMediaFullscreen ()
 Show media in fullscreen mode.
 download_paragraph ()
 download source code paragraph
 insertMaps ($a_html)
 Insert Maps.
 insertContentIncludes ($a_html)
 Insert Maps.
 postOutputProcessing ($a_output)
 Finalizing output processing.
 insertHelp ($a_tpl)
 Insert help texts.
 preview ()
 edit ()
 presentation ($a_mode=IL_PAGE_PRESENTATION)
 getHTML ()
 showMediaFullscreen ($a_style_id=0)
 show fullscreen view of media object
 displayValidationError ($a_error)
 display validation error
 history ()
 Get history table as HTML.
 rollbackConfirmation ()
 Rollback confirmation.
 rollback ()
 Rollback to a previous version.
 getTabs ($a_activate="")
 adds tabs to tab gui object
 compareVersion ()
 Compares two revisions of the page.
 replaceDiffTags ($a_html)
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration)
 initActivationForm ()
 Init activation form.
 getActivationFormValues ()
 Get values for activation form.
 saveActivation ()
 Save Activation.
 getNotesHTML ($a_mode="")
 Get notes HTML.

Data Fields

 $ilias
 $tpl
 $lng
 $ctrl
 $obj
 $output_mode
 $output_submode
 $presentation_title
 $target_script
 $return_location
 $target_var
 $template_output_var
 $output2template
 $link_params
 $bib_id
 $citation
 $sourcecode_download_script
 $change_comments
 $question_html
 $activation = false
 $activated = true
 $enabledinternallinks = true
 $editpreview = false
 $use_meta_data = false
 $enabledtabs = true
 $enabledpctabs = false
 $link_xml_set = false
 $enableediting = true
 $rawpagecontent = false
 $layoutmode = false
 $enabledcontentincludes = false
 $compare_mode = false

Detailed Description

Class ilPageObjectGUI.

User Interface for Page Objects Editing

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilPageObjectGUI.php 38330 2012-11-22 12:54:26Z akill

ilPageObjectGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI ilPageObjectGUI: ilPublicUserProfileGUI, ilNoteGUI

Definition at line 32 of file class.ilPageObjectGUI.php.

Member Function Documentation

ilPageObjectGUI::activateMetaDataEditor (   $a_rep_obj_id,
  $a_sub_obj_id,
  $a_type,
  $a_observer_obj = NULL,
  $a_observer_func = "" 
)

Activate meda data editor.

Parameters
int$a_rep_obj_idobject id as used in repository
int$a_sub_obj_idsub object id
string$a_typeobject type
object$a_observer_objobserver object
object$a_observer_funcobserver function

Definition at line 835 of file class.ilPageObjectGUI.php.

{
$this->use_meta_data = true;
$this->meta_data_rep_obj_id = $a_rep_obj_id;
$this->meta_data_sub_obj_id = $a_sub_obj_id;
$this->meta_data_type = $a_type;
$this->meta_data_observer_obj = $a_observer_obj;
$this->meta_data_observer_func = $a_observer_func;
}
ilPageObjectGUI::activatePage ( )

Definition at line 1022 of file class.ilPageObjectGUI.php.

References getPageObject().

{
$this->getPageObject()->setActivationStart(null);
$this->getPageObject()->setActivationEnd(null);
$this->getPageObject()->setActive(true);
$this->getPageObject()->update();
$this->ctrl->redirectByClass("ilpageobjectgui", "edit");
}

+ Here is the call graph for this function:

ilPageObjectGUI::compareVersion ( )

Compares two revisions of the page.

Definition at line 2348 of file class.ilPageObjectGUI.php.

References $_POST, $lng, $tpl, getEnableEditing(), getPresentationTitle(), IL_PAGE_PREVIEW, ilPageObjectGUI(), and replaceDiffTags().

{
global $lng;
if (!$this->getEnableEditing())
{
return;
}
$tpl = new ilTemplate("tpl.page_compare.html", true, true, "Services/COPage");
$compare = $this->obj->compareVersion($_POST["left"], $_POST["right"]);
// left page
$lpage = $compare["l_page"];
$lpage_gui = new ilPageObjectGUI("wpg");
$lpage_gui->setOutputMode(IL_PAGE_PREVIEW);
$lpage_gui->setPageObject($lpage);
$lpage_gui->setPreventHTMLUnmasking(true);
$lpage_gui->setPresentationTitle($this->getPresentationTitle());
$lpage_gui->setCompareMode(true);
$lhtml = $lpage_gui->showPage();
$lhtml = $this->replaceDiffTags($lhtml);
$lhtml = str_replace("&lt;br /&gt;", "<br />", $lhtml);
$tpl->setVariable("LEFT", $lhtml);
// right page
$rpage = $compare["r_page"];
$rpage_gui = new ilPageObjectGUI("wpg");
$rpage_gui->setOutputMode(IL_PAGE_PREVIEW);
$rpage_gui->setPageObject($rpage);
$rpage_gui->setPreventHTMLUnmasking(true);
$rpage_gui->setPresentationTitle($this->getPresentationTitle());
$rpage_gui->setCompareMode(true);
$rhtml = $rpage_gui->showPage();
$rhtml = $this->replaceDiffTags($rhtml);
$rhtml = str_replace("&lt;br /&gt;", "<br />", $rhtml);
$tpl->setVariable("RIGHT", $rhtml);
$tpl->setVariable("TXT_NEW", $lng->txt("cont_pc_new"));
$tpl->setVariable("TXT_MODIFIED", $lng->txt("cont_pc_modified"));
$tpl->setVariable("TXT_DELETED", $lng->txt("cont_pc_deleted"));
//var_dump($left);
//var_dump($right);
return $tpl->get();
}

+ Here is the call graph for this function:

ilPageObjectGUI::deactivatePage ( )

Definition at line 1013 of file class.ilPageObjectGUI.php.

References getPageObject().

{
$this->getPageObject()->setActivationStart(null);
$this->getPageObject()->setActivationEnd(null);
$this->getPageObject()->setActive(false);
$this->getPageObject()->update();
$this->ctrl->redirectByClass("ilpageobjectgui", "edit");
}

+ Here is the call graph for this function:

ilPageObjectGUI::determineFileDownloadLink ( )

Determine file download link.

Returns
string file download link

Definition at line 851 of file class.ilPageObjectGUI.php.

References $ilCtrl, getFileDownloadLink(), and getOutputMode().

Referenced by insertContentIncludes(), and showPage().

{
global $ilCtrl;
$file_download_link = $this->getFileDownloadLink();
if ($this->getFileDownloadLink() == "" && $this->getOutputMode() != "offline")
{
$file_download_link = $ilCtrl->getLinkTarget($this, "downloadFile");
}
return $file_download_link;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::determineFullscreenLink ( )

Determine fullscreen link.

Returns
string fullscreen link

Definition at line 868 of file class.ilPageObjectGUI.php.

References $ilCtrl, getFullscreenLink(), and getOutputMode().

Referenced by insertContentIncludes(), and showPage().

{
global $ilCtrl;
$fullscreen_link = $this->getFullscreenLink();
if ($this->getFullscreenLink() == "" && $this->getOutputMode() != "offline")
{
$fullscreen_link = $ilCtrl->getLinkTarget($this, "displayMediaFullscreen");
}
return $fullscreen_link;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::determineSourcecodeDownloadScript ( )

Determine source code download script.

Returns
string sourcecode download script

Definition at line 885 of file class.ilPageObjectGUI.php.

References $ilCtrl, $l, $sourcecode_download_script, and getOutputMode().

Referenced by insertContentIncludes(), and showPage().

{
global $ilCtrl;
if ($this->sourcecode_download_script == "" && $this->getOutputMode() != "offline")
{
$l = $ilCtrl->getLinkTarget($this, "");
}
return $l;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::displayMediaFullscreen ( )

Show media in fullscreen mode.

Definition at line 1836 of file class.ilPageObjectGUI.php.

References $_GET, $params, $tpl, ilMediaItem\_getMapAreasIntLinks(), exit, ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), getPageObject(), ilUtil\getStyleSheetLocation(), ilUtil\getWebspaceDir(), IL_MODE_OUTPUT, xslt_create(), xslt_free(), and xslt_process().

{
$tpl = new ilTemplate("tpl.fullscreen.html", true, true, "Modules/LearningModule");
$tpl->setCurrentBlock("ilMedia");
//$int_links = $page_object->getInternalLinks();
$med_links = ilMediaItem::_getMapAreasIntLinks($_GET["mob_id"]);
// @todo
//$link_xml = $this->getLinkXML($med_links, $this->getLayoutLinkTargets());
require_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
$media_obj = new ilObjMediaObject($_GET["mob_id"]);
require_once("./Services/COPage/classes/class.ilPageObject.php");
$pg_obj = $this->getPageObject();
$pg_obj->buildDom();
$xml = "<dummy>";
// todo: we get always the first alias now (problem if mob is used multiple
// times in page)
$xml.= $pg_obj->getMediaAliasElement($_GET["mob_id"]);
$xml.= $media_obj->getXML(IL_MODE_OUTPUT);
$xml.= $link_xml;
$xml.="</dummy>";
$xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
$args = array( '/_xml' => $xml, '/_xsl' => $xsl );
$xh = xslt_create();
//echo "<b>XML:</b>".htmlentities($xml);
// determine target frames for internal links
$wb_path = ilUtil::getWebspaceDir("output");
$enlarge_path = ilUtil::getImagePath("enlarge.gif");
$params = array ('mode' => "fullscreen", 'enlarge_path' => $enlarge_path,
'link_params' => "ref_id=".$_GET["ref_id"],'fullscreen_link' => "",
'ref_id' => $_GET["ref_id"], 'webspace_path' => $wb_path);
$output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
//echo xslt_error($xh);
xslt_free($xh);
// unmask user html
$tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
$tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$tpl->setVariable("MEDIA_CONTENT", $output);
echo $tpl->get();
}

+ Here is the call graph for this function:

ilPageObjectGUI::displayValidationError (   $a_error)

display validation error

Parameters
string$a_errorerror string

Definition at line 2159 of file class.ilPageObjectGUI.php.

References $error.

Referenced by showPage().

{
if(is_array($a_error))
{
$error_str = "<b>Validation Error(s):</b><br>";
foreach ($a_error as $error)
{
$err_mess = implode($error, " - ");
if (!is_int(strpos($err_mess, ":0:")))
{
$error_str .= htmlentities($err_mess)."<br />";
}
}
$this->tpl->setVariable("MESSAGE", $error_str);
}
}

+ Here is the caller graph for this function:

ilPageObjectGUI::download_paragraph ( )

download source code paragraph

Definition at line 1888 of file class.ilPageObjectGUI.php.

References $_GET, and getPageObject().

{
$pg_obj = $this->getPageObject();
$pg_obj->send_paragraph($_GET["par_id"], $_GET["downloadtitle"]);
}

+ Here is the call graph for this function:

ilPageObjectGUI::downloadFile ( )

Download file of file lists.

Definition at line 1824 of file class.ilPageObjectGUI.php.

References $_GET, $file, and exit.

{
$file = explode("_", $_GET["file_id"]);
require_once("./Modules/File/classes/class.ilObjFile.php");
$fileObj =& new ilObjFile($file[count($file) - 1], false);
$fileObj->sendFile();
}
ilPageObjectGUI::edit ( )

Definition at line 2057 of file class.ilPageObjectGUI.php.

References $ilCtrl, $lng, getEnableEditing(), IL_PAGE_EDIT, isEnabledNotes(), ilUtil\sendFailure(), setOutputMode(), and showPage().

Referenced by executeCommand().

{
global $tree, $lng, $ilCtrl;
if (!$this->getEnableEditing())
{
ilUtil::sendFailure($lng->txt("permission_denied"), true);
$ilCtrl->redirect($this, "preview");
}
// scorm2004-start
$html = $this->showPage();
if ($this->isEnabledNotes())
{
$html.= "<br /><br />".$this->getNotesHTML($a_mode = "");
}
// scorm2004-end
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::editActivation ( )

Edit activation (only, if scheduled page activation is activated in administration)

Definition at line 2409 of file class.ilPageObjectGUI.php.

References $ilCtrl, $lng, $tpl, getActivationFormValues(), and initActivationForm().

{
global $ilCtrl, $lng, $tpl;
$atpl = new ilTemplate("tpl.page_activation.php", true, true, "Services/COPage");
$atpl->setVariable("FORM", $this->form->getHTML());
$atpl->setCurrentBlock("updater");
$atpl->setVariable("UPDATER_FRAME", $this->exp_frame);
$atpl->setVariable("EXP_ID_UPDATER", $this->exp_id);
$atpl->setVariable("HREF_UPDATER", $this->exp_target_script);
$atpl->parseCurrentBlock();
$tpl->setContent($atpl->get());
}

+ Here is the call graph for this function:

ilPageObjectGUI::enableChangeComments (   $a_enabled)

Definition at line 355 of file class.ilPageObjectGUI.php.

{
$this->change_comments = $a_enabled;
}
ilPageObjectGUI::enableCitation (   $a_enabled)

Definition at line 299 of file class.ilPageObjectGUI.php.

{
$this->citation = $a_enabled;
}
ilPageObjectGUI::enableContentIncludes (   $a_enable)

Enable content includes.

Definition at line 379 of file class.ilPageObjectGUI.php.

{
$this->enablecontentincludes = $a_enable;
}
ilPageObjectGUI::enableNotes (   $a_enabled,
  $a_parent_id 
)

Definition at line 365 of file class.ilPageObjectGUI.php.

Referenced by ilSCORM2004PageGUI\__construct().

{
$this->notes_enabled = $a_enabled;
$this->notes_parent_id = $a_parent_id;
}

+ Here is the caller graph for this function:

& ilPageObjectGUI::executeCommand ( )

execute command

Reimplemented in ilPageLayoutGUI, ilSCORM2004PageGUI, ilMediaPoolPageGUI, and ilWikiPageGUI.

Definition at line 932 of file class.ilPageObjectGUI.php.

References $_GET, $cmd, $ilCtrl, $lng, $ret, edit(), getEnableEditing(), getHeader(), getPageObject(), getTabs(), and ilUtil\sendFailure().

{
global $ilCtrl, $ilTabs, $lng;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
//$this->ctrl->addTab("clipboard", $this->ctrl->getLinkTargetByClass("ilEditClipboardGUI", "view")
// , "view", "ilEditClipboardGUI");
$this->getTabs();
$ilCtrl->setReturn($this, "edit");
//echo "-".$next_class."-";
switch($next_class)
{
case 'ilmdeditorgui':
//$this->setTabs();
$ilTabs->setTabActive("meta_data");
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->meta_data_rep_obj_id,
$this->meta_data_sub_obj_id, $this->meta_data_type);
if (is_object($this->meta_data_observer_obj))
{
$md_gui->addObserver($this->meta_data_observer_obj,
$this->meta_data_observer_func, "General");
}
$this->ctrl->forwardCommand($md_gui);
break;
case "ileditclipboardgui":
//$this->tabs_gui->clearTargets();
//$this->ctrl->setReturn($this, "view");
$clip_gui = new ilEditClipboardGUI();
$clip_gui->setPageBackTitle($this->page_back_title);
//$ret =& $clip_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($clip_gui);
break;
// notes
case "ilnotegui":
switch($_GET["notes_mode"])
{
default:
$html = $this->edit();
$ilTabs->setTabActive("edit");
return $html;
}
break;
case 'ilpublicuserprofilegui':
require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
$profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
$ret = $this->ctrl->forwardCommand($profile_gui);
break;
case "ilpageeditorgui":
if (!$this->getEnableEditing())
{
ilUtil::sendFailure($lng->txt("permission_denied"), true);
$ilCtrl->redirect($this, "preview");
}
$page_editor =& new ilPageEditorGUI($this->getPageObject(), $this);
$page_editor->setLocator($this->locator);
$page_editor->setHeader($this->getHeader());
$page_editor->setPageBackTitle($this->page_back_title);
$page_editor->setIntLinkHelpDefault($this->int_link_def_type,
$this->int_link_def_id);
$page_editor->setIntLinkReturn($this->int_link_return);
//$page_editor->executeCommand();
$ret =& $this->ctrl->forwardCommand($page_editor);
break;
default:
$cmd = $this->ctrl->getCmd("preview");
$ret = $this->$cmd();
break;
}
//echo "+$ret+";
return $ret;
}

+ Here is the call graph for this function:

ilPageObjectGUI::getActivationFormValues ( )

Get values for activation form.

Definition at line 2463 of file class.ilPageObjectGUI.php.

References getPageObject(), and IL_CAL_DATETIME.

Referenced by editActivation().

{
$values = array();
$values["activation"] = "deactivated";
if ($this->getPageObject()->getActive())
{
$values["activation"] = "activated";
}
$dt_prop = $this->form->getItemByPostVar("start");
if ($this->getPageObject()->getActivationStart() != "")
{
$values["activation"] = "scheduled";
$dt_prop->setDate(new ilDateTime($this->getPageObject()->getActivationStart(),
}
$dt_prop = $this->form->getItemByPostVar("end");
if ($this->getPageObject()->getActivationEnd() != "")
{
$values["activation"] = "scheduled";
$dt_prop->setDate(new ilDateTime($this->getPageObject()->getActivationEnd(),
}
$this->form->setValuesByArray($values);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::getBibId ( )

Get Bib Id.

Definition at line 137 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->bib_id ? $this->bib_id : 0;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getCompareMode ( )

Get compare mode.

Returns
boolean compare_mode

Definition at line 821 of file class.ilPageObjectGUI.php.

References $compare_mode.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getComponentPluginsXML ( )

Put information about activated plugins into XML.

Definition at line 900 of file class.ilPageObjectGUI.php.

References getOutputMode(), IL_COMP_SERVICE, and ilPageComponentPlugin\TXT_CMD_INSERT.

{
$xml = "";
if($this->getOutputMode() == "edit")
{
global $ilPluginAdmin;
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE,
"COPage", "pgcp");
foreach ($pl_names as $pl_name)
{
$plugin = $ilPluginAdmin->getPluginObject(IL_COMP_SERVICE,
"COPage", "pgcp", $pl_name);
if ($plugin->isValidParentType($this->getPageObject()->getParentType()))
{
$xml = '<ComponentPlugin Name="'.$plugin->getPluginName().
'" InsertText="'.$plugin->getUIText(ilPageComponentPlugin::TXT_CMD_INSERT).'" />';
}
}
}
if ($xml != "")
{
$xml = "<ComponentPlugins>".$xml."</ComponentPlugins>";
}
return $xml;
}

+ Here is the call graph for this function:

ilPageObjectGUI::getEditPreview ( )

Get Display first Edit tab, then Preview tab, instead of Page and Edit.

Returns
boolean Edit/Preview mode

Definition at line 509 of file class.ilPageObjectGUI.php.

References $editpreview.

Referenced by getTabs().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledActivation ( )

Definition at line 450 of file class.ilPageObjectGUI.php.

References $activation.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledFileLists ( )

Get Enable File Lists Content Componente (Default is true).

Returns
boolean Enable File Lists Content Componente (Default is true)

Definition at line 629 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enabledfilelists;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledInternalLinks ( )

Get Enable internal links.

Returns
boolean Enable internal links

Definition at line 489 of file class.ilPageObjectGUI.php.

References $enabledinternallinks.

ilPageObjectGUI::getEnabledMaps ( )

Get Enable Maps Content Component.

Returns
boolean Enable Maps Content Component

Definition at line 589 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enabledmaps;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledPageFocus ( )

Get Enable page focus.

Returns
boolean Enable page focus

Definition at line 649 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enabledpagefocus;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledPCTabs ( )

Get Enable Tabs Content Component.

Returns
boolean Enable Tabs Content Component

Definition at line 609 of file class.ilPageObjectGUI.php.

References $enabledpctabs.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledRepositoryObjects ( )

Get Enable Repository Objects Content Component.

Returns
boolean Enable Repository Objects Content Component

Definition at line 569 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enabledrepositoryobjects;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledScheduledActivation ( )

Definition at line 460 of file class.ilPageObjectGUI.php.

Referenced by getTabs(), and showPage().

{
return $this->scheduled_activation;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledSelfAssessment ( )

Get Enable Self Assessment Questions.

Returns
boolean Enable Self Assessment Questions

Definition at line 801 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enabledselfassessment;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledTabs ( )

Get Output tabs.

Returns
boolean Output tabs

Definition at line 549 of file class.ilPageObjectGUI.php.

References $enabledtabs.

Referenced by getTabs().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledWikiLinks ( )

Get Enable Wiki Links.

Returns
boolean Enable Wiki Links

Definition at line 701 of file class.ilPageObjectGUI.php.

{
return $this->enablewikilinks;
}
ilPageObjectGUI::getEnableEditing ( )

Get Enable Editing.

Returns
boolean Enable Editing

Definition at line 721 of file class.ilPageObjectGUI.php.

References $enableediting.

Referenced by compareVersion(), edit(), executeCommand(), getTabs(), history(), rollback(), and rollbackConfirmation().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getFileDownloadLink ( )

Definition at line 329 of file class.ilPageObjectGUI.php.

Referenced by determineFileDownloadLink().

{
return $this->file_download_link;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getFullscreenLink ( )

Definition at line 339 of file class.ilPageObjectGUI.php.

Referenced by determineFullscreenLink().

{
return $this->fullscreen_link;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getHeader ( )

Definition at line 202 of file class.ilPageObjectGUI.php.

Referenced by executeCommand().

{
return $this->header;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getHTML ( )

Definition at line 2090 of file class.ilPageObjectGUI.php.

References getTabs(), and showPage().

{
$this->getTabs("preview");
return $this->showPage();
}

+ Here is the call graph for this function:

ilPageObjectGUI::getLayoutMode ( )

Get Layout Mode enabled/disabled.

Returns
boolean Get Layout Mode Setting

Definition at line 761 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->layout_mode;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getLinkFrame ( )

Definition at line 222 of file class.ilPageObjectGUI.php.

{
return $this->link_frame;
}
ilPageObjectGUI::getLinkParams ( )

Definition at line 212 of file class.ilPageObjectGUI.php.

References $link_params.

{
}
ilPageObjectGUI::getLinkXML ( )

Definition at line 233 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->link_xml;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getNotesHTML (   $a_mode = "")

Get notes HTML.

Definition at line 2527 of file class.ilPageObjectGUI.php.

References $ilCtrl, and ilNoteGUI\enablePrivateNotes().

{
global $ilCtrl;
// notes
$ilCtrl->setParameter($this, "nodes_mode", $a_mode);
include_once("Services/Notes/classes/class.ilNoteGUI.php");
$notes_gui = new ilNoteGUI($this->notes_parent_id,
(int) $this->obj->getId(), "pg");
// if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
// {
// $notes_gui->enablePublicNotesDeletion(true);
// }
$notes_gui->enablePrivateNotes();
$notes_gui->enablePublicNotes();
$next_class = $ilCtrl->getNextClass($this);
if ($next_class == "ilnotegui")
{
$html = $this->ctrl->forwardCommand($notes_gui);
}
else
{
$html = $notes_gui->getNotesHTML();
}
return $html;
}

+ Here is the call graph for this function:

ilPageObjectGUI::getOfflineDirectory ( )

get offline directory

Returns
directory where to store offline files

Definition at line 406 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->offline_directory;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getOutputMode ( )
ilPageObjectGUI::getOutputSubmode ( )

Definition at line 285 of file class.ilPageObjectGUI.php.

References $output_submode.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getPrependingHtml ( )

Get Prepending HTML.

Returns
string Prepending HTML

Definition at line 681 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->prependinghtml;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getPresentationTitle ( )

Definition at line 192 of file class.ilPageObjectGUI.php.

References $presentation_title.

Referenced by compareVersion(), and showPage().

+ Here is the caller graph for this function:

ilPageObjectGUI::getPreventHTMLUnmasking ( )

Get Prevent HTML Unmasking (true/false).

Returns
boolean Prevent HTML Unmasking (true/false)

Definition at line 529 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->preventhtmlunmasking;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getQuestionHTML ( )

Definition at line 253 of file class.ilPageObjectGUI.php.

References $question_html.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getQuestionXML ( )

Definition at line 248 of file class.ilPageObjectGUI.php.

{
return $this->question_xml;
}
ilPageObjectGUI::getRawPageContent ( )

Get Get raw page content only.

Returns
boolean Get raw page content only

Definition at line 741 of file class.ilPageObjectGUI.php.

References $rawpagecontent.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getSourcecodeDownloadScript ( )
ilPageObjectGUI::getStyleId ( )

Get Style Id.

Returns
int Style Id

Definition at line 781 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->styleid;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getTabs (   $a_activate = "")

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Reimplemented in ilWikiPageGUI, and ilMediaPoolPageGUI.

Definition at line 2266 of file class.ilPageObjectGUI.php.

References $ilCtrl, getEditPreview(), getEnabledScheduledActivation(), getEnabledTabs(), and getEnableEditing().

Referenced by executeCommand(), and getHTML().

{
global $ilTabs, $ilCtrl;
if (!$this->getEnabledTabs())
{
return;
}
//echo "-".$ilCtrl->getNextClass()."-".$ilCtrl->getCmd()."-";
// back to upper context
if (!$this->getEditPreview())
{
$ilTabs->addTarget("pg", $ilCtrl->getLinkTarget($this, "preview")
, array("", "preview"));
if ($this->getEnableEditing())
{
$ilTabs->addTarget("edit", $ilCtrl->getLinkTarget($this, "edit")
, array("", "edit"));
}
}
else
{
if ($this->getEnableEditing())
{
$ilTabs->addTarget("edit", $ilCtrl->getLinkTarget($this, "edit")
, array("", "edit"));
}
$ilTabs->addTarget("cont_preview", $ilCtrl->getLinkTarget($this, "preview")
, array("", "preview"));
}
//$tabs_gui->addTarget("properties", $this->ctrl->getLinkTarget($this, "properties")
// , "properties", get_class($this));
if ($this->use_meta_data && !$this->layout_mode)
{
$ilTabs->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
"", "ilmdeditorgui");
}
if ($this->getEnableEditing() && !$this->layout_mode)
{
$ilTabs->addTarget("history", $this->ctrl->getLinkTarget($this, "history")
, "history", get_class($this));
}
/* $tabs = $this->ctrl->getTabs();
foreach ($tabs as $tab)
{
$tabs_gui->addTarget($tab["lang_var"], $tab["link"]
, $tab["cmd"], $tab["class"]);
}
*/
if ($this->getEnableEditing())
{
$ilTabs->addTarget("clipboard", $this->ctrl->getLinkTargetByClass("ilEditClipboardGUI", "view")
, "view", "ilEditClipboardGUI");
}
{
$ilTabs->addTarget("cont_activation", $this->ctrl->getLinkTarget($this, "editActivation"),
"editActivation", get_class($this));
}
// external hook to add tabs
if (is_array($this->tab_hook))
{
$func = $this->tab_hook["func"];
$this->tab_hook["obj"]->$func();
}
//$ilTabs->setTabActive("pg");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::getTemplateOutputVar ( )

Definition at line 274 of file class.ilPageObjectGUI.php.

References $template_output_var.

Referenced by showPage().

+ Here is the caller graph for this function:

ilPageObjectGUI::getTemplateTargetVar ( )

Definition at line 263 of file class.ilPageObjectGUI.php.

References $target_var.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getViewPageLink ( )

get view page link

Definition at line 426 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->view_page_link;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getViewPageTarget ( )

get view page target frame

Definition at line 434 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->view_page_target;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::history ( )

Get history table as HTML.

Definition at line 2179 of file class.ilPageObjectGUI.php.

References $lng, $tpl, getEnableEditing(), and getPageObject().

{
global $tpl, $lng, $ilAccess;
if (!$this->getEnableEditing())
{
return;
}
$tpl->addJavaScript("./Services/COPage/js/page_history.js");
include_once("./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
$table_gui = new ilPageHistoryTableGUI($this, "history");
$table_gui->setId("hist_table");
$entries = $this->getPageObject()->getHistoryEntries();
$entries[] = array('page_id' => $this->getPageObject()->getId(),
'parent_type' => $this->getPageObject()->getParentType(),
'hdate' => $this->getPageObject()->getLastChange(),
'parent_id' => $this->getPageObject()->getParentId(),
'nr' => 0,
'sortkey' => 999999,
'user' => $this->getPageObject()->last_change_user);
$table_gui->setData($entries);
return $table_gui->getHTML();
}

+ Here is the call graph for this function:

ilPageObjectGUI::ilPageObjectGUI (   $a_parent_type,
  $a_id = 0,
  $a_old_nr = 0 
)

Constructor public.

Definition at line 71 of file class.ilPageObjectGUI.php.

References $_GET, $ilCtrl, $ilias, $lng, $tpl, IL_PAGE_PRESENTATION, initPageObject(), setEnabledFileLists(), setEnabledMaps(), setEnabledPageFocus(), setEnabledPCTabs(), setEnabledRepositoryObjects(), setEnabledSelfAssessment(), setEnabledWikiLinks(), setLayoutMode(), setOutputMode(), setPreventHTMLUnmasking(), and setTemplateOutput().

Referenced by compareVersion(), ilWikiPageGUI\executeCommand(), ilMediaPoolPageGUI\executeCommand(), ilSCORM2004PageGUI\executeCommand(), and ilPageLayoutGUI\executeCommand().

{
global $ilias, $tpl, $lng, $ilCtrl,$ilTabs;
$this->ctrl =& $ilCtrl;
if ($a_old_nr == 0 && $_GET["old_nr"] > 0)
{
$a_old_nr = $_GET["old_nr"];
}
$this->ilias =& $ilias;
$this->tpl =& $tpl;
$this->ctrl =& $ilCtrl;
$this->lng =& $lng;
// defaults (as in learning modules)
$this->setEnabledMaps(false);
$this->setEnabledPCTabs(false);
$this->setEnabledFileLists(true);
$this->setEnabledSelfAssessment(false);
$this->setEnabledPageFocus(true);
$this->setLayoutMode(false);
if ($a_id > 0)
{
$this->initPageObject($a_parent_type, $a_id, $a_old_nr);
}
$this->output2template = true;
$this->question_xml = "";
$this->question_html = "";
$this->tabs_gui =& $ilTabs;
// USED FOR TRANSLATIONS
$this->template_output_var = "PAGE_CONTENT";
$this->citation = false;
$this->change_comments = false;
$this->page_back_title = $this->lng->txt("page");
$lng->loadLanguageModule("content");
$this->setPreventHTMLUnmasking(false);
$this->setEnabledWikiLinks(false);
$this->setTemplateOutput(false);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::initActivationForm ( )

Init activation form.

Definition at line 2428 of file class.ilPageObjectGUI.php.

References $ilCtrl, $lng, ilRadioOption\addSubItem(), and ilDateTimeInputGUI\setShowTime().

Referenced by editActivation(), and saveActivation().

{
global $ilCtrl, $lng;
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($ilCtrl->getFormAction($this));
$this->form->setTitle($lng->txt("cont_page_activation"));
// activation type radio
$rad = new ilRadioGroupInputGUI($lng->txt("cont_activation"), "activation");
$rad_op1 = new ilRadioOption($lng->txt("cont_activated"), "activated");
$rad->addOption($rad_op1);
$rad_op2 = new ilRadioOption($lng->txt("cont_deactivated"), "deactivated");
$rad->addOption($rad_op2);
$rad_op3 = new ilRadioOption($lng->txt("cont_scheduled_activation"), "scheduled");
$dt_prop = new ilDateTimeInputGUI($lng->txt("cont_start"), "start");
$dt_prop->setShowTime(true);
$rad_op3->addSubItem($dt_prop);
$dt_prop2 = new ilDateTimeInputGUI($lng->txt("cont_end"), "end");
$dt_prop2->setShowTime(true);
$rad_op3->addSubItem($dt_prop2);
$rad->addOption($rad_op3);
$this->form->addCommandButton("saveActivation", $lng->txt("save"));
$this->form->addItem($rad);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::initPageObject (   $a_parent_type,
  $a_id,
  $a_old_nr 
)

Reimplemented in ilSCORM2004PageGUI, ilMediaPoolPageGUI, and ilWikiPageGUI.

Definition at line 119 of file class.ilPageObjectGUI.php.

References setPageObject().

Referenced by ilPageObjectGUI().

{
$page = new ilPageObject($a_parent_type, $a_id, $a_old_nr);
$this->setPageObject($page);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::insertContentIncludes (   $a_html)

Insert Maps.

Definition at line 1944 of file class.ilPageObjectGUI.php.

References $ilCtrl, $param, $start, ilMediaPoolPage\_exists(), determineFileDownloadLink(), determineFullscreenLink(), determineSourcecodeDownloadScript(), getOutputMode(), and IL_PAGE_OFFLINE.

Referenced by showPage().

{
global $ilCtrl;
$c_pos = 0;
$start = strpos($a_html, "{{{{{ContentInclude;");
if (is_int($start))
{
$end = strpos($a_html, "}}}}}", $start);
}
$i = 1;
while ($end > 0)
{
$param = substr($a_html, $start + 20, $end - $start - 20);
$param = explode(";", $param);
if ($param[0] == "mep" && is_numeric($param[1]) && $param[2] <= 0)
{
include_once("./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
{
$page_gui = new ilMediaPoolPageGUI($param[1]);
if ($this->getOutputMode() != "offline")
{
$page_gui->setFileDownloadLink($this->determineFileDownloadLink());
$page_gui->setFullscreenLink($this->determineFullscreenLink());
$page_gui->setSourceCodeDownloadScript($this->determineSourcecodeDownloadScript());
}
else
{
$page_gui->setOutputMode(IL_PAGE_OFFLINE);
}
$html = $page_gui->getRawContent();
}
else
{
$html = "";
}
$h2 = substr($a_html, 0, $start).
$html.
substr($a_html, $end + 5);
$a_html = $h2;
$i++;
}
$start = strpos($a_html, "{{{{{ContentInclude;", $start + 5);
$end = 0;
if (is_int($start))
{
$end = strpos($a_html, "}}}}}", $start);
}
}
return $a_html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::insertHelp (   $a_tpl)

Insert help texts.

Definition at line 2012 of file class.ilPageObjectGUI.php.

References $lng, and ilUtil\getImagePath().

Referenced by showPage().

{
global $lng;
$a_tpl->setCurrentBlock("help_img");
$a_tpl->setVariable("IMG_HELP", ilUtil::getImagePath("streaked_area.gif"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_item");
$a_tpl->setVariable("TXT_HELP", $lng->txt("cont_add_elements"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_img");
$a_tpl->setVariable("IMG_HELP", ilUtil::getImagePath("icon_cont_el_s.gif"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_img");
$a_tpl->setVariable("IMG_HELP", ilUtil::getImagePath("drop_streaked_area.gif"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_item");
$a_tpl->setVariable("TXT_HELP", $lng->txt("cont_drag_and_drop_elements"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_img");
$a_tpl->setVariable("IMG_HELP", ilUtil::getImagePath("icon_cont_el_s.gif"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_item");
$a_tpl->setVariable("TXT_HELP", $lng->txt("cont_double_click_to_delete"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help");
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::insertMaps (   $a_html)

Insert Maps.

Definition at line 1897 of file class.ilPageObjectGUI.php.

References $param, and $start.

Referenced by showPage().

{
$c_pos = 0;
$start = strpos($a_html, "[[[[[Map;");
if (is_int($start))
{
$end = strpos($a_html, "]]]]]", $start);
}
$i = 1;
while ($end > 0)
{
$param = substr($a_html, $start + 9, $end - $start - 9);
$param = explode(";", $param);
if (is_numeric($param[0]) && is_numeric($param[1]) && is_numeric($param[2]))
{
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
$map_gui = new ilGoogleMapGUI();
$map_gui->setMapId("map_".$i);
$map_gui->setLatitude($param[0]);
$map_gui->setLongitude($param[1]);
$map_gui->setZoom($param[2]);
$map_gui->setWidth($param[3]."px");
$map_gui->setHeight($param[4]."px");
$map_gui->setEnableTypeControl(true);
$map_gui->setEnableNavigationControl(true);
$map_gui->setEnableCentralMarker(true);
$h2 = substr($a_html, 0, $start).
$map_gui->getHtml().
substr($a_html, $end + 5);
$a_html = $h2;
$i++;
}
$start = strpos($a_html, "[[[[[Map;", $start + 5);
$end = 0;
if (is_int($start))
{
$end = strpos($a_html, "]]]]]", $start);
}
}
return $a_html;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::isEnabledChangeComments ( )

Definition at line 360 of file class.ilPageObjectGUI.php.

References $change_comments.

Referenced by showPage().

+ Here is the caller graph for this function:

ilPageObjectGUI::isEnabledCitation ( )

Definition at line 304 of file class.ilPageObjectGUI.php.

References $citation.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::isEnabledContentIncludes ( )

Are content includes enabled?

Definition at line 387 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enablecontentincludes;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::isEnabledNotes ( )

Definition at line 371 of file class.ilPageObjectGUI.php.

Referenced by edit().

{
return $this->notes_enabled;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::outputToTemplate ( )

Definition at line 182 of file class.ilPageObjectGUI.php.

References $output2template.

Referenced by showPage().

+ Here is the caller graph for this function:

ilPageObjectGUI::postOutputProcessing (   $a_output)

Finalizing output processing.

Maybe overwritten in derived classes, e.g. in wiki module.

Reimplemented in ilWikiPageGUI.

Definition at line 2004 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $a_output;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::presentation (   $a_mode = IL_PAGE_PRESENTATION)

Definition at line 2082 of file class.ilPageObjectGUI.php.

References setOutputMode(), and showPage().

{
global $tree;
$this->setOutputMode($a_mode);
return $this->showPage();
}

+ Here is the call graph for this function:

ilPageObjectGUI::preview ( )

Reimplemented in ilWikiPageGUI, and ilMediaPoolPageGUI.

Definition at line 2047 of file class.ilPageObjectGUI.php.

References IL_PAGE_PREVIEW, setOutputMode(), and showPage().

{
global $tree;
return $this->showPage();
}

+ Here is the call graph for this function:

ilPageObjectGUI::replaceDiffTags (   $a_html)

Definition at line 2396 of file class.ilPageObjectGUI.php.

Referenced by compareVersion().

{
$a_html = str_replace("[ilDiffInsStart]", '<span class="ilDiffIns">', $a_html);
$a_html = str_replace("[ilDiffDelStart]", '<span class="ilDiffDel">', $a_html);
$a_html = str_replace("[ilDiffInsEnd]", '</span>', $a_html);
$a_html = str_replace("[ilDiffDelEnd]", '</span>', $a_html);
return $a_html;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::rollback ( )

Rollback to a previous version.

Definition at line 2238 of file class.ilPageObjectGUI.php.

References $_GET, $ilCtrl, and getEnableEditing().

{
global $ilCtrl;
if (!$this->getEnableEditing())
{
return;
}
$hentry = $this->obj->getHistoryEntry($_GET["rollback_nr"]);
if ($hentry["content"] != "")
{
$this->obj->setXMLContent($hentry["content"]);
$this->obj->buildDom(true);
if ($this->obj->update())
{
$ilCtrl->redirect($this, "history");
}
}
$ilCtrl->redirect($this, "history");
}

+ Here is the call graph for this function:

ilPageObjectGUI::rollbackConfirmation ( )

Rollback confirmation.

Definition at line 2208 of file class.ilPageObjectGUI.php.

References $_GET, $ilCtrl, $lng, $tpl, ilDatePresentation\formatDate(), getEnableEditing(), and IL_CAL_DATETIME.

{
global $tpl, $lng, $ilAccess, $ilCtrl;
if (!$this->getEnableEditing())
{
return;
}
include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
$c_gui = new ilConfirmationGUI();
// set confirm/cancel commands
$ilCtrl->setParameter($this, "rollback_nr", $_GET["old_nr"]);
$c_gui->setFormAction($ilCtrl->getFormAction($this, "rollback"));
$c_gui->setHeaderText($lng->txt("cont_rollback_confirmation"));
$c_gui->setCancel($lng->txt("cancel"), "history");
$c_gui->setConfirm($lng->txt("confirm"), "rollback");
$hentry = $this->obj->getHistoryEntry($_GET["old_nr"]);
$c_gui->addItem("id[]", $_GET["old_nr"],
$tpl->setContent($c_gui->getHTML());
}

+ Here is the call graph for this function:

ilPageObjectGUI::saveActivation ( )

Save Activation.

Definition at line 2493 of file class.ilPageObjectGUI.php.

References $_POST, $ilCtrl, $lng, $tpl, getPageObject(), IL_CAL_DATETIME, initActivationForm(), and ilUtil\sendSuccess().

{
global $tpl, $lng, $ilCtrl;
if ($this->form->checkInput())
{
$this->getPageObject()->setActive(true);
$this->getPageObject()->setActivationStart(null);
$this->getPageObject()->setActivationEnd(null);
if ($_POST["activation"] == "deactivated")
{
$this->getPageObject()->setActive(false);
}
if ($_POST["activation"] == "scheduled")
{
$this->getPageObject()->setActive(false);
$this->getPageObject()->setActivationStart(
$this->form->getItemByPostVar("start")->getDate()->get(IL_CAL_DATETIME));
$this->getPageObject()->setActivationEnd(
$this->form->getItemByPostVar("end")->getDate()->get(IL_CAL_DATETIME));
}
$this->getPageObject()->update();
ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "editActivation");
}
$this->form->getValuesByPost();
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilPageObjectGUI::setActivationListener ( $a_obj,
  $a_meth 
)

Definition at line 439 of file class.ilPageObjectGUI.php.

{
$this->act_obj =& $a_obj;
$this->act_meth = $a_meth;
}
ilPageObjectGUI::setBibId (   $a_id)

Set Bib Id.

Definition at line 128 of file class.ilPageObjectGUI.php.

{
// USED FOR SELECTION WHICH PAGE TURNS AND LATER PAGES SHOULD BE SHOWN
$this->bib_id = $a_id;
}
ilPageObjectGUI::setCompareMode (   $a_val)

Set compare mode.

Parameters
booleancompare_mode

Definition at line 811 of file class.ilPageObjectGUI.php.

{
$this->compare_mode = $a_val;
}
ilPageObjectGUI::setDefaultLinkXml ( )

Set standard link xml.

Definition at line 1755 of file class.ilPageObjectGUI.php.

References $target_arr, $target_id, $type, ilLMObject\_lookupContObjID(), ilObject\_lookupObjId(), ilObject\_lookupType(), getPageObject(), and setLinkXML().

Referenced by showPage().

{
$int_links = $this->getPageObject()->getInternalLinks();
$link_info = "<IntLinkInfos>";
$targetframe = "None";
foreach ($int_links as $int_link)
{
$target = $int_link["Target"];
if (substr($target, 0, 4) == "il__")
{
$target_arr = explode("_", $target);
$type = $int_link["Type"];
// anchor
$anc = $anc_add = "";
if ($int_link["Anchor"] != "")
{
$anc = $int_link["Anchor"];
$anc_add = "_".rawurlencode($int_link["Anchor"]);
}
switch($type)
{
case "PageObject":
case "StructureObject":
$ltarget="_top";
if ($type == "PageObject")
{
$href = "./goto.php?target=pg_".$target_id.$anc_add;
}
else
{
$href = "./goto.php?target=st_".$target_id;
}
break;
case "GlossaryItem":
$ltarget="_blank";
$href = "./goto.php?target=git_".$target_id;
break;
case "MediaObject":
$ltarget="_blank";
$href = "";
break;
case "RepositoryItem":
$ltarget="_top";
$obj_type = ilObject::_lookupType($target_id, true);
$href = "./goto.php?target=".$obj_type."_".$target_id;
break;
}
$anc_par = 'Anchor="'.$anc.'"';
$link_info.="<IntLinkInfo Target=\"$target\" Type=\"$type\" ".$anc_par." ".
"TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
}
}
$link_info.= "</IntLinkInfos>";
$this->setLinkXML($link_info);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::setEditPreview (   $a_editpreview)

Set Display first Edit tab, then Preview tab, instead of Page and Edit.

Parameters
boolean$a_editpreviewEdit/preview mode

Definition at line 499 of file class.ilPageObjectGUI.php.

Referenced by ilLMPageObjectGUI\editLayout(), ilLMPageObjectGUI\executeCommand(), ilSCORM2004PageNodeGUI\executeCommand(), and ilTermDefinitionEditorGUI\executeCommand().

{
$this->editpreview = $a_editpreview;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledActivation (   $a_act)

Definition at line 445 of file class.ilPageObjectGUI.php.

{
$this->activation = $a_act;
}
ilPageObjectGUI::setEnabledFileLists (   $a_enabledfilelists)

Set Enable File Lists Content Componente (Default is true).

Parameters
boolean$a_enabledfilelistsEnable File Lists Content Componente (Default is true)

Definition at line 619 of file class.ilPageObjectGUI.php.

Referenced by ilPageObjectGUI().

{
$this->enabledfilelists = $a_enabledfilelists;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledInternalLinks (   $a_enabledinternallinks)

Set Enable internal links.

Parameters
boolean$a_enabledinternallinksEnable internal links

Definition at line 479 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\__construct(), ilMediaPoolPageGUI\__construct(), ilSCORM2004PageGUI\__construct(), and ilPageLayoutGUI\__construct().

{
$this->enabledinternallinks = $a_enabledinternallinks;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledMaps (   $a_enabledmaps)

Set Enable Maps Content Component.

Parameters
boolean$a_enabledmapsEnable Maps Content Component

Definition at line 579 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\__construct(), ilMediaPoolPageGUI\__construct(), ilSCORM2004PageGUI\__construct(), ilPageLayoutGUI\__construct(), and ilPageObjectGUI().

{
$this->enabledmaps = $a_enabledmaps;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledPageFocus (   $a_enabledpagefocus)

Set Enable page focus.

Parameters
boolean$a_enabledpagefocusEnable page focus

Definition at line 639 of file class.ilPageObjectGUI.php.

Referenced by ilPageObjectGUI().

{
$this->enabledpagefocus = $a_enabledpagefocus;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledPCTabs (   $a_enabledpctabs)

Set Enable Tabs Content Component.

Parameters
boolean$a_enabledpctabsEnable Tabs Content Component

Definition at line 599 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\__construct(), ilSCORM2004PageGUI\__construct(), and ilPageObjectGUI().

{
$this->enabledpctabs = $a_enabledpctabs;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledRepositoryObjects (   $a_enabledrepositoryobjects)

Set Enable Repository Objects Content Component.

Parameters
boolean$a_enabledrepositoryobjectsEnable Repository Objects Content Component

Definition at line 559 of file class.ilPageObjectGUI.php.

Referenced by ilPageObjectGUI().

{
$this->enabledrepositoryobjects = $a_enabledrepositoryobjects;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledScheduledActivation (   $a_act)

Definition at line 455 of file class.ilPageObjectGUI.php.

{
$this->scheduled_activation = $a_act;
}
ilPageObjectGUI::setEnabledSelfAssessment (   $a_enabledselfassessment)

Set Enable Self Assessment Questions.

Parameters
boolean$a_enabledselfassessmentEnable Self Assessment Questions

Definition at line 791 of file class.ilPageObjectGUI.php.

Referenced by ilSCORM2004PageGUI\__construct(), ilPageLayoutGUI\__construct(), and ilPageObjectGUI().

{
$this->enabledselfassessment = $a_enabledselfassessment;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledTabs (   $a_enabledtabs)

Set Output tabs.

Parameters
boolean$a_enabledtabsOutput tabs

Definition at line 539 of file class.ilPageObjectGUI.php.

{
$this->enabledtabs = $a_enabledtabs;
}
ilPageObjectGUI::setEnabledWikiLinks (   $a_enablewikilinks)

Set Enable Wiki Links.

Parameters
boolean$a_enablewikilinksEnable Wiki Links

Definition at line 691 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\__construct(), ilMediaPoolPageGUI\__construct(), and ilPageObjectGUI().

{
$this->enablewikilinks = $a_enablewikilinks;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnableEditing (   $a_enableediting)

Set Enable Editing.

Parameters
boolean$a_enableeditingEnable Editing

Definition at line 711 of file class.ilPageObjectGUI.php.

{
$this->enableediting = $a_enableediting;
}
ilPageObjectGUI::setExplorerUpdater (   $a_exp_frame,
  $a_exp_id,
  $a_exp_target_script 
)

Set Explorer Updater.

Parameters
object$a_treeTree Object

Definition at line 659 of file class.ilPageObjectGUI.php.

{
$this->exp_frame = $a_exp_frame;
$this->exp_id = $a_exp_id;
$this->exp_target_script = $a_exp_target_script;
}
ilPageObjectGUI::setFileDownloadLink (   $a_download_link)

Definition at line 324 of file class.ilPageObjectGUI.php.

{
$this->file_download_link = $a_download_link;
}
ilPageObjectGUI::setFullscreenLink (   $a_fullscreen_link)

Definition at line 334 of file class.ilPageObjectGUI.php.

{
$this->fullscreen_link = $a_fullscreen_link;
}
ilPageObjectGUI::setHeader (   $a_title = "")

Definition at line 197 of file class.ilPageObjectGUI.php.

{
$this->header = $a_title;
}
ilPageObjectGUI::setIntLinkHelpDefault (   $a_type,
  $a_id 
)

Definition at line 344 of file class.ilPageObjectGUI.php.

Referenced by ilPaymentObjectGUI\forwardToPageObject(), and ilObjPaymentSettingsGUI\forwardToPageObject().

{
$this->int_link_def_type = $a_type;
$this->int_link_def_id = $a_id;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setIntLinkReturn (   $a_return)

Definition at line 350 of file class.ilPageObjectGUI.php.

{
$this->int_link_return = $a_return;
}
ilPageObjectGUI::setLayoutMode (   $a_layout_mode)

Set Layout Mode.

Parameters
boolean$a_layout_modeSetLayoutMode for editor

Definition at line 751 of file class.ilPageObjectGUI.php.

Referenced by ilPageLayoutGUI\__construct(), and ilPageObjectGUI().

{
$this->layout_mode = $a_layout_mode;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setLinkFrame (   $l_frame = "")

Definition at line 217 of file class.ilPageObjectGUI.php.

{
$this->link_frame = $l_frame;
}
ilPageObjectGUI::setLinkParams (   $l_params = "")

Definition at line 207 of file class.ilPageObjectGUI.php.

{
$this->link_params = $l_params;
}
ilPageObjectGUI::setLinkXML (   $link_xml)

Definition at line 227 of file class.ilPageObjectGUI.php.

Referenced by setDefaultLinkXml().

{
$this->link_xml = $link_xml;
$this->link_xml_set = true;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setLocator ( $a_locator)

Definition at line 309 of file class.ilPageObjectGUI.php.

{
$this->locator =& $a_locator;
}
ilPageObjectGUI::setOfflineDirectory (   $offdir)

set offline directory to offdir

Parameters
offdircontains diretory where to store files

Definition at line 397 of file class.ilPageObjectGUI.php.

{
$this->offline_directory = $offdir;
}
ilPageObjectGUI::setOutputMode (   $a_mode = IL_PAGE_PRESENTATION)

Set Output Mode.

Parameters
stringMode IL_PAGE_PRESENTATION | IL_PAGE_EDIT | IL_PAGE_PREVIEW

Definition at line 167 of file class.ilPageObjectGUI.php.

Referenced by edit(), ilPageObjectGUI(), presentation(), and preview().

{
$this->output_mode = $a_mode;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setOutputSubmode (   $a_mode)

Definition at line 279 of file class.ilPageObjectGUI.php.

{
// USED FOR TRANSLATION PRESENTATION OF dbk OBJECTS
$this->output_submode = $a_mode;
}
ilPageObjectGUI::setPageBackTitle (   $a_title)

Definition at line 319 of file class.ilPageObjectGUI.php.

{
$this->page_back_title = $a_title;
}
ilPageObjectGUI::setPageObject (   $a_pg_obj)
ilPageObjectGUI::setPrependingHtml (   $a_prependinghtml)

Set Prepending HTML.

Parameters
string$a_prependinghtmlPrepending HTML

Definition at line 671 of file class.ilPageObjectGUI.php.

{
$this->prependinghtml = $a_prependinghtml;
}
ilPageObjectGUI::setPresentationTitle (   $a_title = "")

Definition at line 187 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\executeCommand(), ilSCORM2004ScoGUI\sco_preview(), ilMediaPoolPageGUI\showPage(), and ilWikiPageGUI\showPage().

{
$this->presentation_title = $a_title;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setPreventHTMLUnmasking (   $a_preventhtmlunmasking)

Set Prevent HTML Unmasking (true/false).

Parameters
boolean$a_preventhtmlunmaskingPrevent HTML Unmasking (true/false)

Definition at line 519 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\__construct(), ilMediaPoolPageGUI\__construct(), ilSCORM2004PageGUI\__construct(), ilPageLayoutGUI\__construct(), and ilPageObjectGUI().

{
$this->preventhtmlunmasking = $a_preventhtmlunmasking;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setQuestionHTML (   $question_html)

Definition at line 243 of file class.ilPageObjectGUI.php.

References $question_html.

Referenced by ilSCORM2004PageGUI\showPage().

{
$this->question_html = $question_html;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setQuestionXML (   $question_xml)

Definition at line 238 of file class.ilPageObjectGUI.php.

{
$this->question_xml = $question_xml;
}
ilPageObjectGUI::setRawPageContent (   $a_rawpagecontent)

Set Get raw page content only.

Parameters
boolean$a_rawpagecontentGet raw page content only

Definition at line 731 of file class.ilPageObjectGUI.php.

Referenced by ilMediaPoolPageGUI\getRawContent().

{
$this->rawpagecontent = $a_rawpagecontent;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setSourcecodeDownloadScript (   $script_name)

Definition at line 291 of file class.ilPageObjectGUI.php.

References $script_name.

{
$this->sourcecode_download_script = $script_name;
}
ilPageObjectGUI::setStyleId (   $a_styleid)

Set Style Id.

Parameters
int$a_styleidStyle Id

Definition at line 771 of file class.ilPageObjectGUI.php.

Referenced by ilContainerGUI\initStylePropertiesForm().

{
$this->styleid = $a_styleid;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setTabHook (   $a_object,
  $a_function 
)

Set tab hook.

Definition at line 468 of file class.ilPageObjectGUI.php.

{
$this->tab_hook = array("obj" => $a_object, "func" => $a_function);
}
ilPageObjectGUI::setTabs (   $a_tabs)

Definition at line 314 of file class.ilPageObjectGUI.php.

{
$this->tabs_gui = $a_tabs;
}
ilPageObjectGUI::setTemplateOutput (   $a_output = true)

Definition at line 177 of file class.ilPageObjectGUI.php.

Referenced by ilGlossaryTermGUI\confirmDefinitionDeletion(), ilObjGlossaryGUI\confirmDefinitionDeletion(), ilPageObjectGUI(), ilMediaPoolPageGUI\showPage(), ilSCORM2004PageGUI\showPage(), and ilWikiPageGUI\showPage().

{
$this->output2template = $a_output;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setTemplateOutputVar (   $a_value)

Definition at line 268 of file class.ilPageObjectGUI.php.

{
// USED FOR TRANSLATION PRESENTATION OF dbk OBJECTS
$this->template_output_var = $a_value;
}
ilPageObjectGUI::setTemplateTargetVar (   $a_variable)

Definition at line 258 of file class.ilPageObjectGUI.php.

Referenced by assQuestionGUI\getILIASPage(), and assQuestionGUI\outQuestionPage().

{
$this->target_var = $a_variable;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setViewPageLink (   $a_link,
  $a_target = "" 
)

set link for "view page" button

Parameters
stringlink target
stringtarget frame

Definition at line 417 of file class.ilPageObjectGUI.php.

{
$this->view_page_link = $a_link;
$this->view_page_target = $a_target;
}
ilPageObjectGUI::showMediaFullscreen (   $a_style_id = 0)

show fullscreen view of media object

Definition at line 2099 of file class.ilPageObjectGUI.php.

References $_GET, $params, ilObject\_lookupTitle(), ilPageObject\buildDom(), ilUtil\getStyleSheetLocation(), ilUtil\getWebspaceDir(), IL_MODE_ALIAS, IL_MODE_OUTPUT, xslt_create(), xslt_error(), xslt_free(), and xslt_process().

{
$this->tpl = new ilTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", 0);
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable("PAGETITLE", " - ".ilObject::_lookupTitle($_GET["mob_id"]));
$this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$this->tpl->setCurrentBlock("ilMedia");
require_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
$media_obj =& new ilObjMediaObject($_GET["mob_id"]);
if (!empty ($_GET["pg_id"]))
{
require_once("./Services/COPage/classes/class.ilPageObject.php");
$pg_obj =& new ilPageObject($this->obj->getParentType(), $_GET["pg_id"]);
$pg_obj->buildDom();
$xml = "<dummy>";
// todo: we get always the first alias now (problem if mob is used multiple
// times in page)
$xml.= $pg_obj->getMediaAliasElement($_GET["mob_id"]);
$xml.= $media_obj->getXML(IL_MODE_OUTPUT);
$xml.="</dummy>";
}
else
{
$xml = "<dummy>";
$xml.= $media_obj->getXML(IL_MODE_ALIAS);
$xml.= $media_obj->getXML(IL_MODE_OUTPUT);
$xml.="</dummy>";
}
//echo htmlentities($xml); exit;
$xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
$args = array( '/_xml' => $xml, '/_xsl' => $xsl );
$xh = xslt_create();
//echo "<b>XML:</b>".htmlentities($xml);
// determine target frames for internal links
//$pg_frame = $_GET["frame"];
$wb_path = ilUtil::getWebspaceDir("output");
// $wb_path = "../".$this->ilias->ini->readVariable("server","webspace_dir");
$mode = "fullscreen";
$params = array ('mode' => $mode, 'webspace_path' => $wb_path);
$output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
echo xslt_error($xh);
xslt_free($xh);
// unmask user html
$this->tpl->setVariable("MEDIA_CONTENT", $output);
}

+ Here is the call graph for this function:

ilPageObjectGUI::showPage ( )

Reimplemented in ilWikiPageGUI.

Definition at line 1034 of file class.ilPageObjectGUI.php.

References $_GET, $_SESSION, $GLOBALS, $ilBench, $ilCtrl, $ilias, $ilSetting, $link_params, $lng, $params, $sourcecode_download_script, $tpl, ilPageEditorGUI\_doJSEditing(), ilObject\_exists(), ilInternalLink\_getTargetsOfSource(), ilPageEditorGUI\_isBrowserJSEditCapable(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilAccordionGUI\addCss(), ilAccordionGUI\addJavaScript(), ilUtil\buildLatexImages(), determineFileDownloadLink(), determineFullscreenLink(), determineSourcecodeDownloadScript(), displayValidationError(), exit, ilDatePresentation\formatDate(), ilUtil\formSelect(), ilEditClipboard\getAction(), getBibId(), getCompareMode(), getEnabledActivation(), getEnabledFileLists(), getEnabledMaps(), getEnabledPageFocus(), getEnabledPCTabs(), getEnabledRepositoryObjects(), getEnabledScheduledActivation(), getEnabledSelfAssessment(), ilUtil\getImagePath(), getLayoutMode(), getLinkXML(), ilUserUtil\getNamePresentation(), getOfflineDirectory(), getOutputMode(), getOutputSubmode(), getPageObject(), getPrependingHtml(), getPresentationTitle(), getPreventHTMLUnmasking(), getQuestionHTML(), getRawPageContent(), getStyleId(), getTemplateOutputVar(), getTemplateTargetVar(), getViewPageLink(), getViewPageTarget(), ilUtil\getWebspaceDir(), ilObjContentObject\hasSuccessorPage(), IL_CAL_DATETIME, IL_PAGE_OFFLINE, IL_PAGE_PRESENTATION, IL_PAGE_PREVIEW, IL_PAGE_PRINT, ILIAS_VERSION, ilYuiUtil\initConnection(), ilYuiUtil\initDragDrop(), insertContentIncludes(), insertHelp(), ilUtil\insertLatexImages(), insertMaps(), isEnabledChangeComments(), isEnabledCitation(), isEnabledContentIncludes(), ilMediaPoolPage\lookupTitle(), outputToTemplate(), postOutputProcessing(), ilUtil\sendFailure(), setDefaultLinkXml(), xslt_create(), xslt_free(), and xslt_process().

Referenced by edit(), getHTML(), ilMediaPoolPageGUI\getRawContent(), presentation(), preview(), ilMediaPoolPageGUI\showPage(), and ilSCORM2004PageGUI\showPage().

{
global $tree, $ilUser, $ilias, $lng, $ilCtrl, $ilBench, $ilSetting;
$ilBench->start("ContentPresentation", "ilPageObjectGUI_showPage");
// init template
//if($this->outputToTemplate())
//{
if($this->getOutputMode() == "edit")
{
//echo ":".$this->getTemplateTargetVar().":";
$tpl = new ilTemplate("tpl.page_edit_wysiwyg.html", true, true, "Services/COPage");
//$this->tpl->addBlockFile($this->getTemplateTargetVar(), "adm_content", "tpl.page_edit_wysiwyg.html", "Services/COPage");
// to do: status dependent class
$tpl->setVariable("CLASS_PAGE_TD", "ilc_Page");
// user comment
{
$tpl->setCurrentBlock("change_comment");
$tpl->setVariable("TXT_ADD_COMMENT", $this->lng->txt("cont_add_change_comment"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("adm_content");
}
// explorer updater
if ($this->exp_frame != "")
{
$tpl->setCurrentBlock("updater");
$tpl->setVariable("UPDATER_FRAME", $this->exp_frame);
$tpl->setVariable("EXP_ID_UPDATER", $this->exp_id);
$tpl->setVariable("HREF_UPDATER", $this->exp_target_script);
$tpl->parseCurrentBlock();
}
/* $tpl->setVariable("TXT_INSERT_BEFORE", $this->lng->txt("cont_set_before"));
$tpl->setVariable("TXT_INSERT_AFTER", $this->lng->txt("cont_set_after"));
$tpl->setVariable("TXT_INSERT_CANCEL", $this->lng->txt("cont_set_cancel"));
$tpl->setVariable("TXT_CONFIRM_DELETE", $this->lng->txt("cont_confirm_delete"));
*/
$tpl->setVariable("WYSIWYG_ACTION",
$ilCtrl->getFormActionByClass("ilpageeditorgui", "", "", true));
{
$tpl->setVariable("TXT_JAVA_SCRIPT_CAPABLE", "<br />".$this->lng->txt("cont_browser_not_js_capable"));
}
$tpl->setVariable("TXT_CHANGE_EDIT_MODE", $this->lng->txt("cont_set_edit_mode"));
if ($this->getEnabledActivation())
{
$tpl->setCurrentBlock("de_activate_page");
if ($this->getPageObject()->getActive())
{
$tpl->setVariable("TXT_DE_ACTIVATE_PAGE", $this->lng->txt("cont_deactivate_page"));
$tpl->setVariable("CMD_DE_ACTIVATE_PAGE", "deactivatePage");
}
else
{
$tpl->setVariable("TXT_DE_ACTIVATE_PAGE", $this->lng->txt("cont_activate_page"));
$tpl->setVariable("CMD_DE_ACTIVATE_PAGE", "activatePage");
}
$tpl->parseCurrentBlock();
}
$med_mode = array("enable" => $this->lng->txt("cont_enable_media"),
"disable" => $this->lng->txt("cont_disable_media"));
$sel_media_mode = ($ilUser->getPref("ilPageEditor_MediaMode") == "disable")
? "disable"
: "enable";
$js_mode = array("enable" => $this->lng->txt("cont_enable_js"),
"disable" => $this->lng->txt("cont_disable_js"));
$tpl->setVariable("SEL_MEDIA_MODE",
ilUtil::formSelect($sel_media_mode, "media_mode", $med_mode, false, true,
0, "ilEditSelect"));
// HTML active/inactive
$html_mode = array("enable" => $this->lng->txt("cont_enable_html"),
"disable" => $this->lng->txt("cont_disable_html"));
$sel_html_mode = ($ilUser->getPref("ilPageEditor_HTMLMode") == "disable")
? "disable"
: "enable";
if (!$this->getPreventHTMLUnmasking())
{
$tpl->setVariable("SEL_HTML_MODE",
ilUtil::formSelect($sel_html_mode, "html_mode", $html_mode, false, true,
0, "ilEditSelect"));
}
$tpl->setVariable("PREPENDING_HTML", $this->getPrependingHtml());
$tpl->setVariable("TXT_CONFIRM_DELETE", $lng->txt("cont_confirm_delete"));
if ($this->getViewPageLink() != "")
{
$tpl->setCurrentBlock("view_link");
$tpl->setVariable("LINK_VIEW_PAGE",
$this->getViewPageLink());
$tpl->setVariable("TARGET_VIEW_PAGE",
$this->getViewPageTarget());
$tpl->setVariable("TXT_VIEW_PAGE", $this->lng->txt("view"));
$tpl->parseCurrentBlock();
}
// javascript activation
$sel_js_mode = "disable";
if($ilSetting->get("enable_js_edit", 1))
{
$sel_js_mode = (ilPageEditorGUI::_doJSEditing())
? "enable"
: "disable";
}
// get js files for JS enabled editing
if ($sel_js_mode == "enable")
{
$this->insertHelp($tpl);
include_once("./Services/YUI/classes/class.ilYuiUtil.php");
$GLOBALS["tpl"]->addJavaScript("./Services/COPage/js/ilcopagecallback.js");
//$GLOBALS["tpl"]->addJavaScript("./Services/RTE/tiny_mce/tiny_mce.js");
$GLOBALS["tpl"]->addJavaScript("./Services/COPage/js/ilpageedit.js");
//$GLOBALS["tpl"]->addJavascript("Services/COPage/js/wz_dragdrop.js");
$GLOBALS["tpl"]->addJavascript("Services/COPage/js/page_editing.js");
$tpl->touchBlock("init_dragging");
}
if($ilias->getSetting("enable_js_edit"))
{
$tpl->setVariable("SEL_JAVA_SCRIPT",
ilUtil::formSelect($sel_js_mode, "js_mode", $js_mode, false, true,
0, "ilEditSelect"));
}
// multiple actions
$tpl->setCurrentBlock("multi_actions");
if ($sel_js_mode == "enable")
{
$tpl->setVariable("ONCLICK_DE_ACTIVATE_SELECTED", 'onclick="return ilEditMultiAction(\'activateSelected\');"');
$tpl->setVariable("ONCLICK_DELETE_SELECTED", 'onclick="return ilEditMultiAction(\'deleteSelected\');"');
$tpl->setVariable("ONCLICK_ASSIGN_CHARACTERISTIC", 'onclick="return ilEditMultiAction(\'assignCharacteristicForm\');"');
$tpl->setVariable("ONCLICK_COPY_SELECTED", 'onclick="return ilEditMultiAction(\'copySelected\');"');
$tpl->setVariable("ONCLICK_CUT_SELECTED", 'onclick="return ilEditMultiAction(\'cutSelected\');"');
}
$tpl->setVariable("TXT_DE_ACTIVATE_SELECTED", $this->lng->txt("cont_ed_enable"));
$tpl->setVariable("TXT_ASSIGN_CHARACTERISTIC", $this->lng->txt("cont_assign_characteristic"));
$tpl->setVariable("TXT_DELETE_SELECTED", $this->lng->txt("cont_delete_selected"));
$tpl->setVariable("TXT_COPY_SELECTED", $this->lng->txt("copy"));
$tpl->setVariable("TXT_CUT_SELECTED", $this->lng->txt("cut"));
$tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
}
else
{
if($this->getOutputSubmode() == 'translation')
{
$tpl = new ilTemplate("tpl.page_translation_content.html", true, true, "Services/COPage");
}
else
{
// presentation
if ($this->getOutputMode() != IL_PAGE_PREVIEW)
{
$tpl = new ilTemplate("tpl.page_content.html", true, true, "Services/COPage");
if ($this->getEnabledPageFocus())
{
$tpl->touchBlock("page_focus");
}
}
else // preview
{
$tpl = new ilTemplate("tpl.page_preview.html", true, true, "Services/COPage");
include_once("./Services/User/classes/class.ilUserUtil.php");
$c_old_nr = $this->getPageObject()->old_nr;
if ($c_old_nr > 0)
{
$hist_info =
$this->getPageObject()->getHistoryInfo($c_old_nr);
if (!$this->getCompareMode())
{
// previous revision
if (is_array($hist_info["previous"]))
{
$tpl->setCurrentBlock("previous_rev");
$tpl->setVariable("TXT_PREV_REV", $lng->txt("cont_previous_rev"));
$ilCtrl->setParameter($this, "old_nr", $hist_info["previous"]["nr"]);
$tpl->setVariable("HREF_PREV",
$ilCtrl->getLinkTarget($this, "preview"));
$tpl->parseCurrentBlock();
}
else
{
$tpl->setCurrentBlock("previous_rev_disabled");
$tpl->setVariable("TXT_PREV_REV", $lng->txt("cont_previous_rev"));
$tpl->parseCurrentBlock();
}
// next revision
$tpl->setCurrentBlock("next_rev");
$tpl->setVariable("TXT_NEXT_REV", $lng->txt("cont_next_rev"));
$ilCtrl->setParameter($this, "old_nr", $hist_info["next"]["nr"]);
$tpl->setVariable("HREF_NEXT",
$ilCtrl->getLinkTarget($this, "preview"));
$tpl->parseCurrentBlock();
// latest revision
$tpl->setCurrentBlock("latest_rev");
$tpl->setVariable("TXT_LATEST_REV", $lng->txt("cont_latest_rev"));
$ilCtrl->setParameter($this, "old_nr", "");
$tpl->setVariable("HREF_LATEST",
$ilCtrl->getLinkTarget($this, "preview"));
$tpl->parseCurrentBlock();
// rollback
if ($c_old_nr > 0 && $ilUser->getId() != ANONYMOUS_USER_ID)
{
$tpl->setCurrentBlock("rollback");
$ilCtrl->setParameter($this, "old_nr", $c_old_nr);
$tpl->setVariable("HREF_ROLLBACK",
$ilCtrl->getLinkTarget($this, "rollbackConfirmation"));
$ilCtrl->setParameter($this, "old_nr", "");
$tpl->setVariable("TXT_ROLLBACK",
$lng->txt("cont_rollback"));
$tpl->parseCurrentBlock();
}
}
$tpl->setCurrentBlock("hist_nav");
$tpl->setVariable("TXT_REVISION", $lng->txt("cont_revision"));
$tpl->setVariable("VAL_REVISION_DATE",
ilDatePresentation::formatDate(new ilDateTime($hist_info["current"]["hdate"], IL_CAL_DATETIME)));
$tpl->setVariable("VAL_REV_USER",
ilUserUtil::getNamePresentation($hist_info["current"]["user_id"]));
$tpl->parseCurrentBlock();
}
}
}
}
{
$tpl->setVariable("FORMACTION", $this->ctrl->getFormActionByClass("ilpageeditorgui"));
}
// output media object edit list (of media links)
if($this->getOutputMode() == "edit")
{
$links = ilInternalLink::_getTargetsOfSource($this->obj->getParentType().":pg",
$this->obj->getId());
$mob_links = array();
foreach($links as $link)
{
if ($link["type"] == "mob")
{
if (ilObject::_exists($link["id"]) && ilObject::_lookupType($link["id"]) == "mob")
{
$mob_links[$link["id"]] = ilObject::_lookupTitle($link["id"])." [".$link["id"]."]";
}
}
}
// linked media objects
if (count($mob_links) > 0)
{
$tpl->setCurrentBlock("med_link");
$tpl->setVariable("TXT_LINKED_MOBS", $this->lng->txt("cont_linked_mobs"));
$tpl->setVariable("SEL_MED_LINKS",
ilUtil::formSelect(0, "mob_id", $mob_links, false, true));
$tpl->setVariable("TXT_EDIT_MEDIA", $this->lng->txt("cont_edit_mob"));
$tpl->setVariable("TXT_COPY_TO_CLIPBOARD", $this->lng->txt("cont_copy_to_clipboard"));
//$this->tpl->setVariable("TXT_COPY_TO_POOL", $this->lng->txt("cont_copy_to_mediapool"));
$tpl->parseCurrentBlock();
}
// content snippets used
$snippets = $this->getPageObject()->collectContentIncludes();
if (count($snippets) > 0)
{
foreach ($snippets as $s)
{
include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
$sn_arr[$s["id"]] = ilMediaPoolPage::lookupTitle($s["id"]);
}
$tpl->setCurrentBlock("med_link");
$tpl->setVariable("TXT_CONTENT_SNIPPETS_USED", $this->lng->txt("cont_snippets_used"));
$tpl->setVariable("SEL_SNIPPETS",
ilUtil::formSelect(0, "ci_id", $sn_arr, false, true));
$tpl->setVariable("TXT_SHOW_INFO", $this->lng->txt("cont_show_info"));
$tpl->parseCurrentBlock();
}
// scheduled activation?
if (!$this->getPageObject()->getActive() &&
$this->getPageObject()->getActivationStart() != "" &&
{
$tpl->setCurrentBlock("activation_txt");
$tpl->setVariable("TXT_SCHEDULED_ACTIVATION", $lng->txt("cont_scheduled_activation"));
$tpl->setVariable("SA_FROM",
new ilDateTime($this->getPageObject()->getActivationStart(),
$tpl->setVariable("SA_TO",
new ilDateTime($this->getPageObject()->getActivationEnd(),
$tpl->parseCurrentBlock();
}
}
if ($_GET["reloadTree"] == "y")
{
$tpl->setCurrentBlock("reload_tree");
if ($this->obj->getParentType() == "dbk")
{
$tpl->setVariable("LINK_TREE",
$this->ctrl->getLinkTargetByClass("ilobjdlbookgui", "explorer"));
}
else
{
$tpl->setVariable("LINK_TREE",
$this->ctrl->getLinkTargetByClass("ilobjlearningmodulegui", "explorer"));
}
$tpl->parseCurrentBlock();
}
// }
// get content
$builded = $this->obj->buildDom();
// manage hierarchical ids
if($this->getOutputMode() == "edit")
{
// add pc ids, if necessary
if (!$this->obj->checkPCIds())
{
$this->obj->insertPCIds();
$this->obj->update(true, true);
}
$this->obj->addFileSizes();
$this->obj->addHierIDs();
$hids = $this->obj->getHierIds();
$row1_ids = $this->obj->getFirstRowIds();
$col1_ids = $this->obj->getFirstColumnIds();
$litem_ids = $this->obj->getListItemIds();
$fitem_ids = $this->obj->getFileItemIds();
// standard menues
$hids = $this->obj->getHierIds();
foreach($hids as $hid)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_".$hid);
$tpl->parseCurrentBlock();
}
// column menues for tables
foreach($col1_ids as $hid)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_r".$hid);
$tpl->parseCurrentBlock();
}
// row menues for tables
foreach($row1_ids as $hid)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_c".$hid);
$tpl->parseCurrentBlock();
}
// list item menues
foreach($litem_ids as $hid)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_i".$hid);
$tpl->parseCurrentBlock();
}
// file item menues
foreach($fitem_ids as $hid)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_i".$hid);
$tpl->parseCurrentBlock();
}
}
else
{
$this->obj->addFileSizes();
}
//echo "<br>-".htmlentities($this->obj->getXMLContent())."-<br><br>";
//echo "<br>-".htmlentities($this->getLinkXML())."-";
// set default link xml, if nothing was set yet
if (!$this->link_xml_set)
{
}
//$content = $this->obj->getXMLFromDom(false, true, true,
// $this->getLinkXML().$this->getQuestionXML().$this->getComponentPluginsXML());
$link_xml = $this->getLinkXML();
if ($this->getStyleId() > 0)
{
if (ilObject::_lookupType($this->getStyleId()) == "sty")
{
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$style = new ilObjStyleSheet($this->getStyleId());
$template_xml = $style->getTemplateXML();
$disable_auto_margins = "n";
if ($style->lookupStyleSetting("disable_auto_margins"))
{
$disable_auto_margins = "y";
}
}
}
$content = $this->obj->getXMLFromDom(false, true, true,
$link_xml.$this->getQuestionXML().$template_xml);
// get page component plugins
// check validation errors
if($builded !== true)
{
$this->displayValidationError($builded);
}
else
{
$this->displayValidationError($_SESSION["il_pg_error"]);
}
unset($_SESSION["il_pg_error"]);
if(isset($_SESSION["citation_error"]))
{
ilUtil::sendFailure($this->lng->txt("cont_citation_selection_not_valid"));
session_unregister("citation_error");
unset($_SESSION["citation_error"]);
}
// get title
$pg_title = $this->getPresentationTitle();
$add_path = ilUtil::getImagePath("add.gif");
$col_path = ilUtil::getImagePath("col.gif");
$row_path = ilUtil::getImagePath("row.gif");
$item_path = ilUtil::getImagePath("item.gif");
$med_disabled_path = ilUtil::getImagePath("media_disabled.gif");
if ($this->getOutputMode() != "offline")
{
$enlarge_path = ilUtil::getImagePath("enlarge.gif");
$wb_path = ilUtil::getWebspaceDir("output");
}
else
{
$enlarge_path = "images/enlarge.gif";
$wb_path = ".";
}
$pg_title_class = ($this->getOutputMode() == "print")
? "ilc_PrintPageTitle"
: "";
// page splitting only for learning modules and
// digital books
$enable_split_new = ($this->obj->getParentType() == "lm" ||
$this->obj->getParentType() == "dbk")
? "y"
: "n";
// page splitting to next page only for learning modules and
// digital books if next page exists in tree
if (($this->obj->getParentType() == "lm" ||
$this->obj->getParentType() == "dbk") &&
ilObjContentObject::hasSuccessorPage($this->obj->getParentId(),
$this->obj->getId()))
{
$enable_split_next = "y";
}
else
{
$enable_split_next = "n";
}
$paragraph_plugins = new ilParagraphPlugins();
$paragraph_plugins->initialize ();
{
$paragraph_plugin_string = $paragraph_plugins->serializeToString();
$_SESSION ["paragraph_plugins"] = $paragraph_plugins;
}
$img_path = ilUtil::getImagePath("", false, $this->getOutputMode(), $this->getOutputMode() == "offline");
//$wb_path = "../".$this->ilias->ini->readVariable("server","webspace_dir");
//echo "-".$this->sourcecode_download_script.":";
if ($this->getEnabledPCTabs())
{
//include_once("./Services/YUI/classes/class.ilYuiUtil.php");
//ilYuiUtil::initTabView();
include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
}
$file_download_link = $this->determineFileDownloadLink();
$fullscreen_link = $this->determineFullscreenLink();
$this->sourcecode_download_script = $this->determineSourcecodeDownloadScript();
// default values for various parameters (should be used by
// all instances in the future)
$media_mode = ($this->getOutputMode() == "edit")
? $ilUser->getPref("ilPageEditor_MediaMode")
: "enable";
include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
$paste = (ilEditClipboard::getAction() == "copy" &&
$this->getOutputMode() == "edit");
// added UTF-8 encoding otherwise umlaute are converted too
$params = array ('mode' => $this->getOutputMode(), 'pg_title' => htmlentities($pg_title,ENT_QUOTES,"UTF-8"),
'pg_id' => $this->obj->getId(), 'pg_title_class' => $pg_title_class,
'webspace_path' => $wb_path, 'enlarge_path' => $enlarge_path,
'img_add' => $add_path,
'img_col' => $col_path,
'img_row' => $row_path,
'img_item' => $item_path,
'enable_split_new' => $enable_split_new,
'enable_split_next' => $enable_split_next,
'link_params' => $this->link_params,
'file_download_link' => $file_download_link,
'fullscreen_link' => $fullscreen_link,
'med_disabled_path' => $med_disabled_path,
'img_path' => $img_path,
'parent_id' => $this->obj->getParentId(),
'download_script' => $this->sourcecode_download_script,
'encoded_download_script' => urlencode($this->sourcecode_download_script),
// digilib
'bib_id' => $this->getBibId(),'citation' => (int) $this->isEnabledCitation(),
'pagebreak' => $this->lng->txt('dgl_pagebreak'),
'page' => $this->lng->txt('page'),
'citate_page' => $this->lng->txt('citate_page'),
'citate_from' => $this->lng->txt('citate_from'),
'citate_to' => $this->lng->txt('citate_to'),
'citate' => $this->lng->txt('citate'),
'enable_rep_objects' => $this->getEnabledRepositoryObjects() ? "y" : "n",
'enable_map' => $this->getEnabledMaps() ? "y" : "n",
'enable_tabs' => $this->getEnabledPCTabs() ? "y" : "n",
'enable_sa_qst' => $this->getEnabledSelfAssessment() ? "y" : "n",
'enable_file_list' => $this->getEnabledFileLists() ? "y" : "n",
'enable_content_includes' => $this->isEnabledContentIncludes() ? "y" : "n",
'paste' => $paste ? "y" : "n",
'media_mode' => $media_mode,
'javascript' => $sel_js_mode,
'paragraph_plugins' => $paragraph_plugin_string,
'disable_auto_margins' => $disable_auto_margins
);
if($this->link_frame != "") // todo other link types
$params["pg_frame"] = $this->link_frame;
//$content = str_replace("&nbsp;", "", $content);
// this ensures that cache is emptied with every update
$params["version"] = ILIAS_VERSION;
// ensure no cache hit, if included files/media objects have been changed
$params["incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
// run xslt
$md5 = md5(serialize($params).$link_xml.$template_xml);
//$a = microtime();
// check cache (same parameters, non-edit mode and rendered time
// > last change
if (($this->getOutputMode() == "preview" || $this->getOutputMode() == "presentation") &&
$md5 == $this->obj->getRenderMd5() &&
($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
$this->obj->getRenderedTime() != "" &&
$this->obj->old_nr == 0)
{
// cache hit
$output = $this->obj->getRenderedContent();
}
else
{
if ($this->getLayoutMode() == true) {
$xsl = file_get_contents("./Services/COPage/xsl/page_layout.xsl");
} else {
$xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
}
//echo htmlentities($content);
$args = array( '/_xml' => $content, '/_xsl' => $xsl );
$xh = xslt_create();
// echo "<b>XSLT</b>:".htmlentities($xsl).":<br>";
// echo "mode:".$this->getOutputMode().":<br>";
$output = xslt_process($xh, "arg:/_xml","arg:/_xsl", NULL, $args, $params);
if (($this->getOutputMode() == "presentation" || $this->getOutputMode() == "preview")
&& $this->obj->old_nr == 0)
{
//echo "writerenderedcontent";
$this->obj->writeRenderedContent($output, $md5);
}
//echo xslt_error($xh);
xslt_free($xh);
}
//$b = microtime();
//echo "$a - $b";
//echo "<pre>".htmlentities($output)."</pre>";
// unmask user html
if (($this->getOutputMode() != "edit" ||
$ilUser->getPref("ilPageEditor_HTMLMode") != "disable")
{
$output = str_replace("&lt;","<",$output);
$output = str_replace("&gt;",">",$output);
}
$output = str_replace("&amp;", "&", $output);
// replace latex code: todo: finish
if ($this->getOutputMode() != "offline")
{
$output = ilUtil::insertLatexImages($output);
}
else
{
$output = ilUtil::buildLatexImages($output,
}
$output = $this->insertContentIncludes($output);
// workaround for preventing template engine
// from hiding paragraph text that is enclosed
// in curly brackets (e.g. "{a}", see ilLMEditorGUI::executeCommand())
$output = str_replace("{", "&#123;", $output);
$output = str_replace("}", "&#125;", $output);
// remove all newlines (important for code / pre output)
$output = str_replace("\n", "", $output);
// add question HTML
$qhtml = $this->getQuestionHTML();
if (is_array($qhtml))
{
foreach ($qhtml as $k => $h)
{
$output = str_replace("&#123;&#123;&#123;&#123;&#123;Question;il__qst_$k&#125;&#125;&#125;&#125;&#125;", " ".$h, $output);
}
}
//echo htmlentities($output);
$output = $this->postOutputProcessing($output);
//echo htmlentities($output);
if($this->getOutputMode() == "edit" && !$this->getPageObject()->getActive($this->getEnabledScheduledActivation()))
{
$output = '<div class="il_editarea_disabled">'.$output.'</div>';
}
$output = $this->insertMaps($output);
$output = $this->obj->insertSourceCodeParagraphs($output, $this->getOutputMode());
$ilBench->stop("ContentPresentation", "ilPageObjectGUI_showPage");
// output
if ($ilCtrl->isAsynch())
{
$tpl->setVariable($this->getTemplateOutputVar(), $output);
echo $tpl->get();
$tpl->setVariable($this->getTemplateOutputVar(), $output);
$tpl->setCurrentBlock("adm_content");
$tpl->parseCurrentBlock();
echo $tpl->get("adm_content");
}
if ($this->outputToTemplate())
{
$tpl->setVariable($this->getTemplateOutputVar(), $output);
$this->tpl->setVariable($this->getTemplateTargetVar(), $tpl->get());
return $output;
}
else
{
if ($this->getRawPageContent()) // e.g. needed in glossaries
{
return $output;
}
else
{
$tpl->setVariable($this->getTemplateOutputVar(), $output);
return $tpl->get();
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilPageObjectGUI::$activated = true

Definition at line 54 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$activation = false

Definition at line 53 of file class.ilPageObjectGUI.php.

Referenced by getEnabledActivation().

ilPageObjectGUI::$bib_id

Definition at line 48 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$change_comments

Definition at line 51 of file class.ilPageObjectGUI.php.

Referenced by isEnabledChangeComments().

ilPageObjectGUI::$citation

Definition at line 49 of file class.ilPageObjectGUI.php.

Referenced by isEnabledCitation().

ilPageObjectGUI::$compare_mode = false

Definition at line 65 of file class.ilPageObjectGUI.php.

Referenced by getCompareMode().

ilPageObjectGUI::$ctrl

Definition at line 37 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$editpreview = false

Definition at line 56 of file class.ilPageObjectGUI.php.

Referenced by getEditPreview().

ilPageObjectGUI::$enabledcontentincludes = false

Definition at line 64 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$enabledinternallinks = true

Definition at line 55 of file class.ilPageObjectGUI.php.

Referenced by getEnabledInternalLinks().

ilPageObjectGUI::$enabledpctabs = false

Definition at line 59 of file class.ilPageObjectGUI.php.

Referenced by getEnabledPCTabs().

ilPageObjectGUI::$enabledtabs = true

Definition at line 58 of file class.ilPageObjectGUI.php.

Referenced by getEnabledTabs().

ilPageObjectGUI::$enableediting = true

Definition at line 61 of file class.ilPageObjectGUI.php.

Referenced by getEnableEditing().

ilPageObjectGUI::$ilias

Definition at line 34 of file class.ilPageObjectGUI.php.

Referenced by ilPageObjectGUI(), and showPage().

ilPageObjectGUI::$layoutmode = false

Definition at line 63 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$link_params

Definition at line 47 of file class.ilPageObjectGUI.php.

Referenced by getLinkParams(), and showPage().

ilPageObjectGUI::$link_xml_set = false

Definition at line 60 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$obj

Definition at line 38 of file class.ilPageObjectGUI.php.

Referenced by getPageObject().

ilPageObjectGUI::$output2template

Definition at line 46 of file class.ilPageObjectGUI.php.

Referenced by outputToTemplate().

ilPageObjectGUI::$output_mode

Definition at line 39 of file class.ilPageObjectGUI.php.

Referenced by getOutputMode().

ilPageObjectGUI::$output_submode

Definition at line 40 of file class.ilPageObjectGUI.php.

Referenced by getOutputSubmode().

ilPageObjectGUI::$presentation_title

Definition at line 41 of file class.ilPageObjectGUI.php.

Referenced by getPresentationTitle().

ilPageObjectGUI::$question_html

Definition at line 52 of file class.ilPageObjectGUI.php.

Referenced by getQuestionHTML(), and setQuestionHTML().

ilPageObjectGUI::$rawpagecontent = false

Definition at line 62 of file class.ilPageObjectGUI.php.

Referenced by getRawPageContent().

ilPageObjectGUI::$return_location

Definition at line 43 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$sourcecode_download_script
ilPageObjectGUI::$target_script

Definition at line 42 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$target_var

Definition at line 44 of file class.ilPageObjectGUI.php.

Referenced by getTemplateTargetVar().

ilPageObjectGUI::$template_output_var

Definition at line 45 of file class.ilPageObjectGUI.php.

Referenced by getTemplateOutputVar().

ilPageObjectGUI::$use_meta_data = false

Definition at line 57 of file class.ilPageObjectGUI.php.


The documentation for this class was generated from the following file: