ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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

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

Constructor & Destructor Documentation

◆ __construct()

ilObjExerciseSubItemListGUI::__construct (   $a_cmd_class)

Constructor.

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

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

24  {
25  global $DIC;
26  parent::__construct($a_cmd_class);
27 
28  $this->access = $DIC->access();
29  }
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

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

Definition at line 51 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().

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

References $access, and ilExAssignment\lookupAssignmentOnline().

Referenced by getHTML().

37  {
38  $ilAccess = $this->access;
39 
40  if ($ilAccess->checkAccess('write', '', $this->getRefId())) {
41  return true;
42  }
43 
45  }
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 17 of file class.ilObjExerciseSubItemListGUI.php.

Referenced by isAssignmentVisible().


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