ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilContainerSessionsContentGUI Class Reference

Shows all items in one block. More...

+ Inheritance diagram for ilContainerSessionsContentGUI:
+ Collaboration diagram for ilContainerSessionsContentGUI:

Public Member Functions

 __construct ($container_gui_obj)
 Constructor.
 getDetailsLevel ($a_session_id)
 get details level
 getMainContent ()
 Get content HTML for main column.
 __showMaterials ($a_tpl)
 Show Materials.
 addFooterRow ($tpl)
 add footer row
- 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, $a_pos_prefix="")
 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.
 getItemGroupsHTML ($a_tpl)
 Get item groups HTML.
 renderItemGroup ($a_tpl, $a_itgr)
 Render item group.

Protected Member Functions

 renderSessionLimitLink ($a_previous=true)
 Show link to show/hide all previous/next sessions.
 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 = array()
- 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 in one block.

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.ilContainerSessionsContentGUI.php.

Constructor & Destructor Documentation

ilContainerSessionsContentGUI::__construct (   $container_gui_obj)

Constructor.

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

References $lng, and initDetails().

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

+ Here is the call graph for this function:

Member Function Documentation

ilContainerSessionsContentGUI::__showMaterials (   $a_tpl)

Show Materials.

Definition at line 113 of file class.ilContainerSessionsContentGUI.php.

References $lng, $tpl, ilContainerContentGUI\addHeaderRow(), ilContainerContentGUI\addSeparatorRow(), ilContainerContentGUI\addStandardRow(), ilContainerContentGUI\clearAdminCommandsDetermination(), ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getContainerObject(), ilContainerContentGUI\getItemGroupsHTML(), ilContainerContentGUI\insertPageEmbeddedBlocks(), ilContainerContentGUI\newBlockTemplate(), ilContainerContentGUI\renderItem(), renderSessionLimitLink(), and ilUtil\sortArray().

Referenced by getMainContent().

{
global $ilAccess, $lng;
$this->items = $this->getContainerObject()->getSubItems($this->getContainerGUI()->isActiveAdministrationPanel());
$output_html = $this->getContainerGUI()->getContainerPageHTML();
// get embedded blocks
if ($output_html != "")
{
$output_html = $this->insertPageEmbeddedBlocks($output_html);
}
// sessions
$done_sessions = false;
$tpl = $this->newBlockTemplate();
if (
is_array($this->items["sess"]) or
$this->items['sess_link']['prev']['value'] or
$this->items['sess_link']['next']['value'])
{
$this->items['sess'] = ilUtil::sortArray($this->items['sess'],'start','ASC',true,true);
// all rows
$item_html = array();
$position = 1;
if($this->items['sess_link']['prev']['value'])
{
$item_html[] = $this->renderSessionLimitLink(true);
}
foreach($this->items["sess"] as $item_data)
{
if ($this->rendered_items[$item_data["child"]] !== true)
{
$html = $this->renderItem($item_data,$position++,true);
if ($html != "")
{
$item_html[] = $html;
}
}
}
if($this->items['sess_link']['next']['value'])
{
$item_html[] = $this->renderSessionLimitLink(false);
}
// if we have at least one item, output the block
if (count($item_html) > 0)
{
$this->addHeaderRow($tpl, "", $lng->txt("objs_sess"));
foreach($item_html as $h)
{
$this->addStandardRow($tpl, $h);
}
$done_sessions = true;
}
}
// all other items
if ($done_sessions)
{
}
// item groups
if (is_array($this->items["_all"]))
{
// all rows
$item_html = array();
$position = 1;
foreach($this->items["_all"] as $item_data)
{
if ($this->rendered_items[$item_data["child"]] !== true)
{
if ($item_data["type"] == "sess" || $item_data["type"] == "itgr")
{
continue;
}
$html = $this->renderItem($item_data,$position++,true);
if ($html != "")
{
$item_html[] = $html;
}
}
}
// if we have at least one item, output the block
if (count($item_html) > 0)
{
$this->addHeaderRow($tpl, "", $lng->txt("content"));
foreach($item_html as $h)
{
$this->addStandardRow($tpl, $h);
}
}
}
$output_html .= $tpl->get();
$a_tpl->setVariable("CONTAINER_PAGE_CONTENT", $output_html);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerSessionsContentGUI::addFooterRow (   $tpl)

add footer row

public

Parameters
@return

Definition at line 289 of file class.ilContainerSessionsContentGUI.php.

References $_GET, $ilCtrl, $tpl, ilContainerContentGUI\getContainerObject(), and ilUtil\getImagePath().

{
global $ilCtrl;
$tpl->setCurrentBlock('details_img');
$append = $this->details_level == 1 ? 'off' : '';
$tpl->setCurrentBlock('details_img');
$tpl->setVariable('DETAILS_SRC',ilUtil::getImagePath('details1'.$append.'.png'));
$tpl->setVariable('DETAILS_ALT',$this->lng->txt('details').' 1');
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->getContainerObject()->getRefId());
$ilCtrl->setParameterByClass("ilrepositorygui", "details_level", "1");
$tpl->setVariable('DETAILS_LINK',
$ilCtrl->getLinkTargetByClass("ilrepositorygui", ""));
$tpl->parseCurrentBlock();
$append = $this->details_level == 2 ? 'off' : '';
$tpl->setCurrentBlock('details_img');
$tpl->setVariable('DETAILS_SRC',ilUtil::getImagePath('details2'.$append.'.png'));
$tpl->setVariable('DETAILS_ALT',$this->lng->txt('details').' 2');
$ilCtrl->setParameterByClass("ilrepositorygui", "details_level", "2");
$tpl->setVariable('DETAILS_LINK',
$ilCtrl->getLinkTargetByClass("ilrepositorygui", ""));
$tpl->parseCurrentBlock();
$append = $this->details_level == 3 ? 'off' : '';
$tpl->setCurrentBlock('details_img');
$tpl->setVariable('DETAILS_SRC',ilUtil::getImagePath('details3'.$append.'.png'));
$tpl->setVariable('DETAILS_ALT',$this->lng->txt('details').' 3');
$ilCtrl->setParameterByClass("ilrepositorygui", "details_level", "3");
$tpl->setVariable('DETAILS_LINK',
$ilCtrl->getLinkTargetByClass("ilrepositorygui", ""));
$tpl->parseCurrentBlock();
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
$tpl->setCurrentBlock('container_details_row');
$tpl->setVariable('TXT_DETAILS',$this->lng->txt('details'));
$tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilContainerSessionsContentGUI::getDetailsLevel (   $a_session_id)

get details level

public

Parameters
int$a_session_id
Returns
int DEATAILS_LEVEL

Reimplemented from ilContainerContentGUI.

Definition at line 58 of file class.ilContainerSessionsContentGUI.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(in_array($a_session_id,$this->force_details))
{
}
else
{
}
}

+ Here is the call graph for this function:

ilContainerSessionsContentGUI::getMainContent ( )

Get content HTML for main column.

Reimplemented from ilContainerContentGUI.

Definition at line 82 of file class.ilContainerSessionsContentGUI.php.

References $lng, $tpl, and __showMaterials().

{
global $lng,$ilTabs;
// see bug #7452
// $ilTabs->setSubTabActive($this->getContainerObject()->getType().'_content');
include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
$tpl = new ilTemplate("tpl.container_page.html", true, true,
"Services/Container");
// Feedback
// @todo
// $this->__showFeedBack();
// @todo: Move this completely to GUI class?
/* $this->getContainerGUI()->adminCommands = $this->adminCommands;
$this->getContainerGUI()->showAdministrationPanel($tpl);
$this->getContainerGUI()->showPossibleSubObjects();
$this->getContainerGUI()->showPermanentLink($tpl);*/
return $tpl->get();
}

+ Here is the call graph for this function:

ilContainerSessionsContentGUI::initDetails ( )
protected

init details

protected

Parameters
@return

Definition at line 337 of file class.ilContainerSessionsContentGUI.php.

References $_GET, $_SESSION, $ilUser, 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;
}
}
include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
{
$this->force_details = $session;
}
{
$this->force_details = array($session);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerSessionsContentGUI::renderSessionLimitLink (   $a_previous = true)
protected

Show link to show/hide all previous/next sessions.

Returns
string

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

References $ilCtrl, $ilUser, $lng, $tpl, ilContainerContentGUI\getContainerGUI(), and ilContainerContentGUI\getContainerObject().

Referenced by __showMaterials().

{
global $lng, $ilUser, $ilCtrl;
$lng->loadLanguageModule('crs');
$tpl = new ilTemplate('tpl.container_list_item.html',true,true,
"Services/Container");
$tpl->setVariable('DIV_CLASS','ilContainerListItemOuter');
$tpl->setCurrentBlock('item_title_linked');
if($a_previous)
{
$prefp = $ilUser->getPref('crs_sess_show_prev_'.$this->getContainerObject()->getId());
if($prefp)
{
$tpl->setVariable('TXT_TITLE_LINKED',$lng->txt('crs_link_hide_prev_sessions'));
$ilCtrl->setParameterByClass(get_class($this->getContainerGUI()),'crs_prev_sess',(int) !$prefp);
$tpl->setVariable('HREF_TITLE_LINKED',$ilCtrl->getLinkTargetByClass(get_class($this->getContainerGUI())));
$ilCtrl->clearParametersByClass(get_class($this->getContainerGUI()));
}
else
{
$tpl->setVariable('TXT_TITLE_LINKED',$lng->txt('crs_link_show_all_prev_sessions'));
$ilCtrl->setParameterByClass(get_class($this->getContainerGUI()),'crs_prev_sess',(int) !$prefp);
$tpl->setVariable('HREF_TITLE_LINKED',$ilCtrl->getLinkTargetByClass(get_class($this->getContainerGUI())));
$ilCtrl->clearParametersByClass(get_class($this->getContainerGUI()));
}
}
else
{
$prefn = $ilUser->getPref('crs_sess_show_next_'.$this->getContainerObject()->getId());
if($prefn)
{
$tpl->setVariable('TXT_TITLE_LINKED',$lng->txt('crs_link_hide_next_sessions'));
$ilCtrl->setParameterByClass(get_class($this->getContainerGUI()),'crs_next_sess',(int) !$prefn);
$tpl->setVariable('HREF_TITLE_LINKED',$ilCtrl->getLinkTargetByClass(get_class($this->getContainerGUI())));
$ilCtrl->clearParametersByClass(get_class($this->getContainerGUI()));
}
else
{
$tpl->setVariable('TXT_TITLE_LINKED',$lng->txt('crs_link_show_all_next_sessions'));
$ilCtrl->setParameterByClass(get_class($this->getContainerGUI()),'crs_next_sess',(int) !$prefn);
$tpl->setVariable('HREF_TITLE_LINKED',$ilCtrl->getLinkTargetByClass(get_class($this->getContainerGUI())));
$ilCtrl->clearParametersByClass(get_class($this->getContainerGUI()));
}
}
$tpl->parseCurrentBlock();
return $tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilContainerSessionsContentGUI::$force_details = array()
protected

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


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