ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjExerciseSubItemListGUI Class Reference

Represents search sub item lists. More...

+ Inheritance diagram for ilObjExerciseSubItemListGUI:
+ Collaboration diagram for ilObjExerciseSubItemListGUI:

Public Member Functions

 getHTML ()
 
- 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 ()
 

Protected Member Functions

 isAssignmentVisible ($a_ass_id)
 Check if read access to assignments is granted. More...
 
- Protected Member Functions inherited from ilSubItemListGUI
 showDetailsLink ()
 show details link More...
 
 parseRelevance ($sub_item)
 

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 Attributes inherited from ilSubItemListGUI
 $cmdClass = null
 
 $tpl
 
- Static Protected Attributes inherited from ilSubItemListGUI
static $MAX_SUBITEMS = 5
 

Detailed Description

Represents search sub item lists.

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

Definition at line 16 of file class.ilObjExerciseSubItemListGUI.php.

Member Function Documentation

◆ getHTML()

ilObjExerciseSubItemListGUI::getHTML ( )
See also
ilSubItemListGUI::getHTML()

Definition at line 39 of file class.ilObjExerciseSubItemListGUI.php.

References $lng, $valid, ilSubItemListGUI\getHighlighter(), ilSubItemListGUI\getObjId(), ilSubItemListGUI\getRefId(), ilSubItemListGUI\getSubItemIds(), isAssignmentVisible(), ilExAssignment\lookupTitle(), ilSubItemListGUI\parseRelevance(), and ilSubItemListGUI\showDetailsLink().

40  {
41  global $lng;
42 
43  $lng->loadLanguageModule('exc');
44 
45  $valid = false;
46  foreach($this->getSubItemIds(true) as $sub_item)
47  {
48  if(!$this->isAssignmentVisible($sub_item))
49  {
50  continue;
51  }
52  $valid = true;
53 
54  if(is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(),$sub_item)))
55  {
56  $this->tpl->setCurrentBlock('sea_fragment');
57  $this->tpl->setVariable('TXT_FRAGMENT',$this->getHighlighter()->getContent($this->getObjId(),$sub_item));
58  $this->tpl->parseCurrentBlock();
59  }
60  $this->tpl->setCurrentBlock('subitem');
61  $this->tpl->setVariable('SUBITEM_TYPE',$lng->txt('exc_assignment'));
62  $this->tpl->setVariable('SEPERATOR',':');
63 
64  #$link_data = ilLinkResourceItems::lookupItem($this->getObjId(),$sub_item);
65  #$link_data = ilParameterAppender::_append($link_data);
66 
67  #$this->getItemListGUI()->setChildId($sub_item);
68  $this->tpl->setVariable('LINK','ilias.php?baseClass=ilExerciseHandlerGUI&cmd=showOverview&ref_id='.$this->getRefId().'&ass_id='.$sub_item);
69  $this->tpl->setVariable('TITLE',ilExAssignment::lookupTitle($sub_item));
70 
71  if(count($this->getSubItemIds(true)) > 1)
72  {
73  $this->parseRelevance($sub_item);
74  }
75 
76  $this->tpl->parseCurrentBlock();
77  }
78 
79  $this->showDetailsLink();
80 
81  return $valid ? $this->tpl->get() : '';
82 
83 
84  }
getHighlighter()
get highlighter
$valid
showDetailsLink()
show details link
global $lng
Definition: privfeed.php:17
static lookupTitle($a_id)
Lookup title.
isAssignmentVisible($a_ass_id)
Check if read access to assignments is granted.
getSubItemIds($a_limited=false)
get sub item ids
+ Here is the call graph for this function:

◆ isAssignmentVisible()

ilObjExerciseSubItemListGUI::isAssignmentVisible (   $a_ass_id)
protected

Check if read access to assignments is granted.

Parameters
intassignment id
Returns

Definition at line 23 of file class.ilObjExerciseSubItemListGUI.php.

References ilExAssignment\lookupAssignmentOnline().

Referenced by getHTML().

24  {
25  global $ilAccess;
26 
27  if($ilAccess->checkAccess('write','',$this->getRefId()))
28  {
29  return true;
30  }
31 
33  }
static lookupAssignmentOnline($a_ass_id)
Check if assignment is online.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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