Public Member Functions | Data Fields

ilTableOfContentsExplorer Class Reference

Inheritance diagram for ilTableOfContentsExplorer:
Collaboration diagram for ilTableOfContentsExplorer:

Public Member Functions

 ilTableOfContentsExplorer ($a_target, &$a_lm_obj, $a_export_format="")
 Constructor public.
 setOfflineMode ($a_offline=true)
 set offline mode
 offlineMode ()
 get offline mode
 buildTitle ($a_title, $a_id, $a_type)
 standard implementation for title, maybe overwritten by derived classes
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 get target frame
 buildLinkTarget ($a_node_id, $a_type)
 build link target
 getImage ($a_name)
 get image path (may be overwritten by derived classes)
 forceExpanded ($a_obj_id)
 force expansion of node
 isVisible ($a_id, $a_type)

Data Fields

 $root_id
 $output
 $offline

Detailed Description

Definition at line 35 of file class.ilLMTableOfContentsExplorer.php.


Member Function Documentation

ilTableOfContentsExplorer::buildFrameTarget ( a_type,
a_child = 0,
a_obj_id = 0 
)

get target frame

Reimplemented from ilExplorer.

Definition at line 150 of file class.ilLMTableOfContentsExplorer.php.

References ilFrameTargetInfo::_getFrame(), and offlineMode().

        {
                // Determine whether the view of a learning resource should
                // be shown in the frameset of ilias, or in a separate window.
                //$showViewInFrameset = $this->ilias->ini->readVariable("layout","view_target") == "frame";
                $showViewInFrameset = true;

                if ($this->offlineMode() &&
                        $this->export_format == "scorm")
                {
                        return "";
                }

                if ($showViewInFrameset && !$this->offlineMode())
                {
                        return ilFrameTargetInfo::_getFrame("MainContent");
                }
                else
                {
                        return "_top";
                }
        }

Here is the call graph for this function:

ilTableOfContentsExplorer::buildLinkTarget ( a_node_id,
a_type 
)

build link target

Reimplemented from ilExplorer.

Definition at line 176 of file class.ilLMTableOfContentsExplorer.php.

References ilLMObject::_lookupNID(), and offlineMode().

        {
                if (!$this->offlineMode())
                {
                        return parent::buildLinkTarget($a_node_id, $a_type);
                }
                else
                {
                        if ($a_node_id < 1)
                        {
                                $a_node_id = $this->tree->getRootId();
                        }
                        if ($a_type != "pg")
                        {
                                $a_node = $this->tree->fetchSuccessorNode($a_node_id, "pg");
                                $a_node_id = $a_node["child"];
                        }

                        if ($nid = ilLMObject::_lookupNID($this->lm_obj->getId(), $a_node_id, "pg"))
                        {
                                return "lm_pg_".$nid.".html";
                        }
                        else
                        {
                                return "lm_pg_".$a_node_id.".html";
                        }
                }
        }

Here is the call graph for this function:

ilTableOfContentsExplorer::buildTitle ( a_title,
a_id,
a_type 
)

standard implementation for title, maybe overwritten by derived classes

Reimplemented from ilExplorer.

Definition at line 114 of file class.ilLMTableOfContentsExplorer.php.

References $_GET, $lng, ilObjContentObject::_checkPreconditionsOfPage(), ilLMPageObject::_getPresentationTitle(), ilStructureObject::_getPresentationTitle(), and ilObject::_lookupObjId().

        {
                global $lng;

                include_once("content/classes/class.ilObjContentObject.php");
                $access_str = "";
                if (!ilObjContentObject::_checkPreconditionsOfPage(
                        ilObject::_lookupObjId($_GET["ref_id"]), $a_id))
                {
                        $access_str = " (".$lng->txt("cont_no_access").")";
                }
                
                if ($a_type == "st")
                {
                        return ilStructureObject::_getPresentationTitle($a_id,
                                $this->lm_obj->isActiveNumbering()).$access_str;
                }

                if ($this->lm_obj->getTOCMode() == "chapters" || $a_type != "pg")
                {
                        return $a_title.$access_str;
                }
                else
                {
                        if ($a_type == "pg")
                        {
                                return ilLMPageObject::_getPresentationTitle($a_id,
                                        $this->lm_obj->getPageHeader(), $this->lm_obj->isActiveNumbering()).$access_str;
                        }
                }
                
        }

Here is the call graph for this function:

ilTableOfContentsExplorer::forceExpanded ( a_obj_id  ) 

force expansion of node

Reimplemented from ilExplorer.

Definition at line 221 of file class.ilLMTableOfContentsExplorer.php.

References offlineMode().

        {
                if ($this->offlineMode())
                {
                        return true;
                }
                else
                {
                        return true;
                }
        }

Here is the call graph for this function:

ilTableOfContentsExplorer::getImage ( a_name  ) 

get image path (may be overwritten by derived classes)

Definition at line 213 of file class.ilLMTableOfContentsExplorer.php.

References ilUtil::getImagePath(), and offlineMode().

        {
                return ilUtil::getImagePath($a_name, false, "output", $this->offlineMode());
        }

Here is the call graph for this function:

ilTableOfContentsExplorer::ilTableOfContentsExplorer ( a_target,
&$  a_lm_obj,
a_export_format = "" 
)

Constructor public.

Parameters:
string scriptname
int user_id

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

References $_GET, ilFrameTargetInfo::_getFrame(), ilExplorer::addFilter(), ilLMExplorer::ilLMExplorer(), ilExplorer::setExpandTarget(), ilExplorer::setFiltered(), ilExplorer::setFilterMode(), ilExplorer::setFrameTarget(), and ilExplorer::setSessionExpandVariable().

        {
                parent::ilLMExplorer($a_target, $a_lm_obj);
                $this->setExpandTarget("lm_presentation.php?cmd=".$_GET["cmd"]."&ref_id=".$this->lm_obj->getRefId());
                $this->setSessionExpandVariable("lmtocexpand");
                $this->export_format = $a_export_format;
                $this->lm_obj =& $a_lm_obj;

                $this->addFilter("du");
                $this->addFilter("st");
                if ($a_lm_obj->getTOCMode() == "pages")
                {
                        $this->addFilter("pg");
                }
                $this->setFiltered(true);
                $this->setFilterMode(IL_FM_POSITIVE);

                // Determine whether the view of a learning resource should
                // be shown in the frameset of ilias, or in a separate window.
                //$showViewInFrameset = $this->ilias->ini->readVariable("layout","view_target") == "frame";
                $showViewInFrameset = true;

                if ($showViewInFrameset)
                {
                        $this->setFrameTarget(ilFrameTargetInfo::_getFrame("MainContent"));
                }
                else
                {
                        $this->setFrameTarget("_top");
                }

        }

Here is the call graph for this function:

ilTableOfContentsExplorer::isVisible ( a_id,
a_type 
)

Reimplemented from ilExplorer.

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

References ilLMObject::_lookupActive().

        {
                if(!ilLMObject::_lookupActive($a_id))
                {
                        return false;
                }
                else
                {
                        return true;
                }
        }

Here is the call graph for this function:

ilTableOfContentsExplorer::offlineMode (  ) 

get offline mode

Definition at line 106 of file class.ilLMTableOfContentsExplorer.php.

Referenced by buildFrameTarget(), buildLinkTarget(), forceExpanded(), and getImage().

        {
                return $this->offline;
        }

Here is the caller graph for this function:

ilTableOfContentsExplorer::setOfflineMode ( a_offline = true  ) 

set offline mode

Definition at line 89 of file class.ilLMTableOfContentsExplorer.php.

References ilExplorer::setFrameTarget().

        {
                $this->offline = $a_offline;

                if ($a_offline)
                {
                        if ($this->export_format == "scorm")
                        {
                                $this->setFrameTarget("");
                        }
                }

        }

Here is the call graph for this function:


Field Documentation

ilTableOfContentsExplorer::$offline

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

ilTableOfContentsExplorer::$output

Reimplemented from ilLMExplorer.

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

ilTableOfContentsExplorer::$root_id

Reimplemented from ilLMExplorer.

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


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