ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjLearningModuleSubItemListGUI Class Reference
+ Inheritance diagram for ilObjLearningModuleSubItemListGUI:
+ Collaboration diagram for ilObjLearningModuleSubItemListGUI:

Public Member Functions

 getHTML ()
 get html
- Public Member Functions inherited from ilSubItemListGUI
 __construct ($a_cmd_class)
 Constructor.
 getCmdClass ()
 get cmd class
 setHighlighter ($a_highlighter)
 set highlighter
 getHighlighter ()
 get highlighter
 getRefId ()
 get ref id
 getObjId ()
 get obj id
 getType ()
 get type
 getSubItemIds ($a_limited=false)
 get sub item ids
 getItemListGUI ()
 get item list gui
 init ($item_list_gui, $a_ref_id, $a_subitem_ids)
 init

Additional Inherited Members

- Static Public Member Functions inherited from ilSubItemListGUI
static setShowDetails ($a_obj_id)
 set show details.
static resetDetails ()
 reset details As long as static::resetDetails is not possible this method is final
static enabledDetails ($a_obj_id)
 enabled show details As long as static::enableDetails is not possible this method is final
- Protected Member Functions inherited from ilSubItemListGUI
 showDetailsLink ()
 show details link
- Protected Attributes inherited from ilSubItemListGUI
 $cmdClass = null
 $tpl
- Static Protected Attributes inherited from ilSubItemListGUI
static $MAX_SUBITEMS = 5

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Member Function Documentation

ilObjLearningModuleSubItemListGUI::getHTML ( )

get html

Returns

Reimplemented from ilSubItemListGUI.

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

References $lng, ilLMObject\_lookupTitle(), ilObject\_lookupTitle(), ilLMObject\_lookupType(), ilObject\_lookupType(), ilSubItemListGUI\getHighlighter(), ilSubItemListGUI\getItemListGUI(), ilSubItemListGUI\getObjId(), ilSubItemListGUI\getSubItemIds(), and ilSubItemListGUI\showDetailsLink().

{
global $lng,$ilUser;
include_once 'Modules/LearningModule/classes/class.ilLMObject.php';
foreach($this->getSubItemIds(true) as $sub_item)
{
if(is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(),$sub_item)))
{
$this->tpl->setCurrentBlock('sea_fragment');
$this->tpl->setVariable('TXT_FRAGMENT',$this->getHighlighter()->getContent($this->getObjId(),$sub_item));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock('subitem');
$this->tpl->setVariable('SEPERATOR',':');
switch(ilLMObject::_lookupType($sub_item,$this->getObjId()))
{
case 'pg':
$this->getItemListGUI()->setChildId($sub_item);
$this->tpl->setVariable("SUBITEM_TYPE",$lng->txt('obj_pg'));
$link = $this->getItemListGUI()->getCommandLink('page');
include_once './Services/Search/classes/class.ilUserSearchCache.php';
$link .= ('&srcstring=1');
$this->tpl->setVariable('LINK',$link);
$this->tpl->setVariable('TARGET',$this->getItemListGUI()->getCommandFrame('page'));
$this->tpl->setVariable('TITLE',ilLMObject::_lookupTitle($sub_item));
break;
case 'st':
$this->getItemListGUI()->setChildId($sub_item);
$this->tpl->setVariable("SUBITEM_TYPE",$lng->txt('obj_st'));
$link = $this->getItemListGUI()->getCommandLink('page');
include_once './Services/Search/classes/class.ilUserSearchCache.php';
$link .= ('&srcstring=1');
$this->tpl->setVariable('LINK',$link);
$this->tpl->setVariable('TARGET',$this->getItemListGUI()->getCommandFrame('page'));
$this->tpl->setVariable('TITLE',ilLMObject::_lookupTitle($sub_item));
break;
default:
if(ilObject::_lookupType($sub_item) != 'file')
{
return '';
}
$this->getItemListGUI()->setChildId('il__file_'.$sub_item);
$this->tpl->setVariable('SUBITEM_TYPE',$lng->txt('obj_file'));
$link = $this->getItemListGUI()->getCommandLink('downloadFile');
$this->tpl->setVariable('LINK',$link);
$this->tpl->setVariable('TITLE',ilObject::_lookupTitle($sub_item));
break;
}
$this->tpl->parseCurrentBlock();
}
$this->showDetailsLink();
return $this->tpl->get();
}

+ Here is the call graph for this function:


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