ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjExerciseSubItemListGUI Class Reference

Represents search sub item lists. More...

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

Public Member Functions

 __construct ($a_cmd_class)
 Constructor. More...
 
 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)
 

Protected Attributes

 $access
 
- Protected Attributes inherited from ilSubItemListGUI
 $ctrl
 
 $lng
 
 $cmdClass = null
 
 $tpl
 

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

Constructor & Destructor Documentation

◆ __construct()

ilObjExerciseSubItemListGUI::__construct (   $a_cmd_class)

Constructor.

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

References $DIC.

28  {
29  global $DIC;
30  parent::__construct($a_cmd_class);
31 
32  $this->access = $DIC->access();
33  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ getHTML()

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

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

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

56  {
57  $lng = $this->lng;
58 
59  $lng->loadLanguageModule('exc');
60 
61  $valid = false;
62  foreach ($this->getSubItemIds(true) as $sub_item) {
63  if (!$this->isAssignmentVisible($sub_item)) {
64  continue;
65  }
66  $valid = true;
67 
68  if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
69  $this->tpl->setCurrentBlock('sea_fragment');
70  $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
71  $this->tpl->parseCurrentBlock();
72  }
73  $this->tpl->setCurrentBlock('subitem');
74  $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('exc_assignment'));
75  $this->tpl->setVariable('SEPERATOR', ':');
76 
77  #$link_data = ilLinkResourceItems::lookupItem($this->getObjId(),$sub_item);
78  #$link_data = ilParameterAppender::_append($link_data);
79 
80  #$this->getItemListGUI()->setChildId($sub_item);
81  $this->tpl->setVariable('LINK', 'ilias.php?baseClass=ilExerciseHandlerGUI&cmd=showOverview&ref_id=' . $this->getRefId() . '&ass_id=' . $sub_item);
82  $this->tpl->setVariable('TITLE', ilExAssignment::lookupTitle($sub_item));
83 
84  if (count($this->getSubItemIds(true)) > 1) {
85  $this->parseRelevance($sub_item);
86  }
87 
88  $this->tpl->parseCurrentBlock();
89  }
90 
91  $this->showDetailsLink();
92 
93  return $valid ? $this->tpl->get() : '';
94  }
getHighlighter()
get highlighter
$valid
showDetailsLink()
show details link
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 40 of file class.ilObjExerciseSubItemListGUI.php.

References $access, and ilExAssignment\lookupAssignmentOnline().

Referenced by getHTML().

41  {
42  $ilAccess = $this->access;
43 
44  if ($ilAccess->checkAccess('write', '', $this->getRefId())) {
45  return true;
46  }
47 
49  }
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:

Field Documentation

◆ $access

ilObjExerciseSubItemListGUI::$access
protected

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

Referenced by isAssignmentVisible().


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