ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjLearningModuleSubItemListGUI Class Reference
+ Inheritance diagram for ilObjLearningModuleSubItemListGUI:
+ Collaboration diagram for ilObjLearningModuleSubItemListGUI:

Public Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from ilSubItemListGUI
static setShowDetails ($a_obj_id)
 set show details. More...
 
static resetDetails ()
 reset details As long as static::resetDetails is not possible this method is final More...
 
static enabledDetails ($a_obj_id)
 enabled show details As long as static::enableDetails is not possible this method is final More...
 
- Protected Member Functions inherited from ilSubItemListGUI
 showDetailsLink ()
 show details link More...
 
 parseRelevance ($sub_item)
 
- 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

◆ getHTML()

ilObjLearningModuleSubItemListGUI::getHTML ( )

get html

Returns

Reimplemented from ilSubItemListGUI.

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

42 {
43 global $lng,$ilUser;
44
45 include_once 'Modules/LearningModule/classes/class.ilLMObject.php';
46 foreach($this->getSubItemIds(true) as $sub_item)
47 {
48 if(is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(),$sub_item)))
49 {
50 $this->tpl->setCurrentBlock('sea_fragment');
51 $this->tpl->setVariable('TXT_FRAGMENT',$this->getHighlighter()->getContent($this->getObjId(),$sub_item));
52 $this->tpl->parseCurrentBlock();
53 }
54 $this->tpl->setCurrentBlock('subitem');
55
56 $this->tpl->setVariable('SEPERATOR',':');
57
58
59 switch(ilLMObject::_lookupType($sub_item,$this->getObjId()))
60 {
61 case 'pg':
62 $this->getItemListGUI()->setChildId($sub_item);
63 $this->tpl->setVariable("SUBITEM_TYPE",$lng->txt('obj_pg'));
64 $link = $this->getItemListGUI()->getCommandLink('page');
65 include_once './Services/Search/classes/class.ilUserSearchCache.php';
66 $link .= ('&srcstring=1');
67 $this->tpl->setVariable('LINK',$link);
68 $this->tpl->setVariable('TARGET',$this->getItemListGUI()->getCommandFrame('page'));
69 $this->tpl->setVariable('TITLE',ilLMObject::_lookupTitle($sub_item));
70 break;
71
72 case 'st':
73
74 $this->getItemListGUI()->setChildId($sub_item);
75 $this->tpl->setVariable("SUBITEM_TYPE",$lng->txt('obj_st'));
76 $link = $this->getItemListGUI()->getCommandLink('page');
77 include_once './Services/Search/classes/class.ilUserSearchCache.php';
78 $link .= ('&srcstring=1');
79 $this->tpl->setVariable('LINK',$link);
80 $this->tpl->setVariable('TARGET',$this->getItemListGUI()->getCommandFrame('page'));
81 $this->tpl->setVariable('TITLE',ilLMObject::_lookupTitle($sub_item));
82 break;
83
84 default:
85
86 if(ilObject::_lookupType($sub_item) != 'file')
87 {
88 return '';
89 }
90
91 $this->getItemListGUI()->setChildId('il__file_'.$sub_item);
92 $this->tpl->setVariable('SUBITEM_TYPE',$lng->txt('obj_file'));
93 $link = $this->getItemListGUI()->getCommandLink('downloadFile');
94 $this->tpl->setVariable('LINK',$link);
95 $this->tpl->setVariable('TITLE',ilObject::_lookupTitle($sub_item));
96 break;
97 }
98
99 if(count($this->getSubItemIds(true)) > 1)
100 {
101 $this->parseRelevance($sub_item);
102 }
103
104 $this->tpl->parseCurrentBlock();
105 }
106
107 $this->showDetailsLink();
108
109 return $this->tpl->get();
110 }
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
static _lookupTitle($a_obj_id)
Lookup title.
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
getItemListGUI()
get item list gui
getSubItemIds($a_limited=false)
get sub item ids
showDetailsLink()
show details link
getHighlighter()
get highlighter
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15

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

+ Here is the call graph for this function:

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