ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilContainerByTypeContentGUI Class Reference

Shows all items grouped by type. More...

+ Inheritance diagram for ilContainerByTypeContentGUI:
+ Collaboration diagram for ilContainerByTypeContentGUI:

Public Member Functions

 __construct ($container_gui_obj)
 Constructor.
 getDetailsLevel ($a_session_id)
 get details level
 getMainContent ()
 Get content HTML for main column.
 renderItemList ()
 Render Items.
- Public Member Functions inherited from ilContainerContentGUI
 __construct (&$container_gui_obj)
 Constructor.
 getContainerObject ()
 Get container object.
 getContainerGUI ()
 Get container GUI object.
 setOutput ()
 Sets view output into column layout.
 determinePageEmbeddedBlocks ($a_container_page_html)
 Determine all blocks that are embedded in the container page.
 addEmbeddedBlock ($block_type, $block_parameter)
 Add embedded block.
 getEmbeddedBlocks ()
 Get page embedded blocks.
 renderPageEmbeddedBlocks ()
 Render Page Embedded Blocks.
 renderItem ($a_item_data, $a_position=0, $a_force_icon=false)
 Render an item.
newBlockTemplate ()
 returns a new list block template
 addStandardRow (&$a_tpl, $a_html, $a_ref_id=0)
 add item row to template
 addHeaderRow ($a_tpl, $a_type="", $a_text="")
 Add header row to block template.
 resetRowType ()
 Reset row type (toggling background colors)
 insertPageEmbeddedBlocks ($a_output_html)
 Insert blocks into container page.
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row
 addSeparatorRow (&$a_tpl)
 Add separator row between two blocks.
 getGroupedObjTypes ()
 Get grouped repository object types.
 getIntroduction ()
 Get introduction.

Protected Member Functions

 initDetails ()
 init details
- Protected Member Functions inherited from ilContainerContentGUI
 getRightColumnHTML ()
 Get HTML for right column.
 getCenterColumnHTML ()
 Get HTML for center column.
 clearAdminCommandsDetermination ()
 cleaer administration commands determination
 determineAdminCommands ($a_ref_id, $a_admin_com_included_in_list=false)
 determin admin commands
 getItemGUI ($item_data, $a_show_path=false)
 Get ListGUI object for item.

Protected Attributes

 $force_details
- Protected Attributes inherited from ilContainerContentGUI
 $details_level = self::DETAILS_DEACTIVATED

Additional Inherited Members

- Data Fields inherited from ilContainerContentGUI
const DETAILS_DEACTIVATED = 0
const DETAILS_TITLE = 1
const DETAILS_ALL = 2
 $container_gui
 $container_obj

Detailed Description

Shows all items grouped by type.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 33 of file class.ilContainerByTypeContentGUI.php.

Constructor & Destructor Documentation

ilContainerByTypeContentGUI::__construct (   $container_gui_obj)

Constructor.

Reimplemented in ilContainerILincContentGUI.

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

References initDetails().

{
parent::__construct($container_gui_obj);
$this->initDetails();
}

+ Here is the call graph for this function:

Member Function Documentation

ilContainerByTypeContentGUI::getDetailsLevel (   $a_session_id)

get details level

public

Parameters
int$a_session_id
Returns
int DEATAILS_LEVEL

Reimplemented from ilContainerContentGUI.

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

References $_SESSION, ilContainerContentGUI\DETAILS_ALL, ilContainerContentGUI\DETAILS_DEACTIVATED, ilContainerContentGUI\DETAILS_TITLE, and ilContainerContentGUI\getContainerGUI().

{
if($this->getContainerGUI()->isActiveAdministrationPanel())
{
}
if(isset($_SESSION['sess']['expanded'][$a_session_id]))
{
return $_SESSION['sess']['expanded'][$a_session_id];
}
if($a_session_id == $this->force_details)
{
}
else
{
}
}

+ Here is the call graph for this function:

ilContainerByTypeContentGUI::getMainContent ( )

Get content HTML for main column.

Reimplemented from ilContainerContentGUI.

Definition at line 78 of file class.ilContainerByTypeContentGUI.php.

References $ilBench, $tpl, ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getContainerObject(), ilContainerContentGUI\getIntroduction(), and renderItemList().

{
global $ilBench, $tree, $ilTabs, $ilAccess;
$ilBench->start("ilContainerGUI", "0000__renderObject");
// see bug #7452
// $ilTabs->setSubTabActive($this->getContainerObject()->getType().'_content');
$tpl = new ilTemplate ("tpl.container_page.html", true, true,
"Services/Container");
// get all sub items
$ilBench->start("ilContainerGUI", "0100_getSubItems");
$this->items = $this->getContainerObject()->getSubItems(
$this->getContainerGUI()->isActiveAdministrationPanel());
$ilBench->stop("ilContainerGUI", "0100_getSubItems");
// Show introduction, if repository is empty
// @todo: maybe we move this
if (count($this->items) == 0 &&
$this->getContainerObject()->getRefId() == ROOT_FOLDER_ID &&
$ilAccess->checkAccess("write", "", $this->getContainerObject()->getRefId()))
{
$html = $this->getIntroduction();
$tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
}
else // show item list otherwise
{
$ilBench->start("ilContainerGUI", "0200_renderItemList");
$html = $this->renderItemList();
$tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
$ilBench->stop("ilContainerGUI", "0200_renderItemList");
}
// @todo: Move this completely to GUI class?
/* $this->getContainerGUI()->adminCommands = $this->adminCommands;
$this->getContainerGUI()->showAdministrationPanel($tpl);
$this->getContainerGUI()->showPossibleSubObjects();
$this->getContainerGUI()->showPermanentLink($tpl);*/
$this->html = $tpl->get();
return $this->html;
$ilBench->stop("ilContainerGUI", "0000__renderObject");
}

+ Here is the call graph for this function:

ilContainerByTypeContentGUI::initDetails ( )
protected

init details

protected

Parameters
@return

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

References $_GET, $_SESSION, ilContainerContentGUI\DETAILS_ALL, ilContainerContentGUI\DETAILS_TITLE, ilContainerContentGUI\getContainerObject(), ilSessionAppointment\lookupLastSessionByCourse(), and ilSessionAppointment\lookupNextSessionByCourse().

Referenced by __construct().

{
global $ilUser;
if($_GET['expand'])
{
if($_GET['expand'] > 0)
{
$_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_ALL;
}
else
{
$_SESSION['sess']['expanded'][abs((int) $_GET['expand'])] = self::DETAILS_TITLE;
}
}
if($this->getContainerObject()->getType() == 'crs')
{
include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
{
$this->force_details = $session;
}
{
$this->force_details = $session;
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerByTypeContentGUI::renderItemList ( )

Render Items.

Reimplemented in ilContainerILincContentGUI.

Definition at line 129 of file class.ilContainerByTypeContentGUI.php.

References $ilBench, $ilSetting, $lng, $tpl, $type, ilContainerContentGUI\addHeaderRow(), ilContainerContentGUI\addSeparatorRow(), ilContainerContentGUI\addStandardRow(), ilContainerContentGUI\clearAdminCommandsDetermination(), ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getGroupedObjTypes(), ilContainerContentGUI\insertPageEmbeddedBlocks(), ilContainerContentGUI\newBlockTemplate(), and ilContainerContentGUI\renderItem().

Referenced by getMainContent().

{
global $objDefinition, $ilBench, $ilSetting, $lng;
include_once("Services/Object/classes/class.ilObjectListGUIFactory.php");
$output_html = "";
$type_grps = $this->getGroupedObjTypes();
// old behaviour
/*
$xpage_id = ilContainer::_lookupContainerSetting($this->getContainerObject()->getId(),
"xhtml_page");
if ($xpage_id > 0 && $ilSetting->get("enable_cat_page_edit"))
{
include_once("Services/XHTMLPage/classes/class.ilXHTMLPage.php");
$xpage = new ilXHTMLPage($xpage_id);
$output_html.= $xpage->getContent();
}
*/
// new behaviour
$output_html.= $this->getContainerGUI()->getContainerPageHTML();
// get embedded blocks
if ($output_html != "")
{
$output_html = $this->insertPageEmbeddedBlocks($output_html);
}
$first = true;
// iterate all types
$tpl = $this->newBlockTemplate();
foreach ($type_grps as $type => $v)
{
if ($this->rendered_block["type"][$type] == "" &&
is_array($this->items[$type]))
{
// all rows
$item_r = array();
$position = 1;
foreach($this->items[$type] as $item_data)
{
$html = $this->renderItem($item_data,$position++);
if ($html != "")
{
$item_r[] = array("html" => $html, "id" => $item_data["child"]);
}
}
// if we have at least one item, output the block
if (count($item_r) > 0)
{
if (!$first)
{
}
$this->addHeaderRow($tpl, $type);
foreach($item_r as $h)
{
$this->addStandardRow($tpl, $h["html"], $h["id"]);
}
$first = false;
}
}
}
if (!$first)
{
$output_html.= $tpl->get();
}
/* old page
if ($xpage_id > 0)
{
$page_block = new ilTemplate("tpl.container_page_block.html", false, false,
"Services/Container");
$page_block->setVariable("CONTAINER_PAGE_CONTENT", $output_html);
$output_html = $page_block->get();
}
*/
return $output_html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilContainerByTypeContentGUI::$force_details
protected

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


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