ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjExerciseSubItemListGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct (string $a_cmd_class)
 
 getHTML ()
 
- Public Member Functions inherited from ilSubItemListGUI
 __construct (string $cmd_class)
 
 getCmdClass ()
 
 setHighlighter (?ilLuceneHighlighterResultParser $highlighter)
 
 getHighlighter ()
 
 getRefId ()
 
 getObjId ()
 
 getType ()
 
 getSubItemIds (bool $limited=false)
 
 getItemListGUI ()
 
 init (ilObjectListGUI $item_list_gui, int $ref_id, array $subitem_ids)
 
 getHTML ()
 

Protected Member Functions

 isAssignmentVisible (int $a_ass_id)
 
- Protected Member Functions inherited from ilSubItemListGUI
 showDetailsLink ()
 
 parseRelevance (int $sub_item)
 

Protected Attributes

ilAccessHandler $access
 
- Protected Attributes inherited from ilSubItemListGUI
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
string $cmd_class = ''
 
ilTemplate $tpl = null
 
ilLuceneHighlighterResultParser $highlighter = null
 
array $subitem_ids = []
 
ilObjectListGUI $item_list_gui = null
 
int $ref_id = 0
 
int $obj_id = 0
 
string $type = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from ilSubItemListGUI
static setShowDetails (int $obj_id)
 set show details. More...
 
static resetDetails ()
 As long as static::resetDetails is not possible this method is final. More...
 
static enabledDetails (int $obj_id)
 As long as static::enableDetails is not possible this method is final. More...
 
- Static Protected Attributes inherited from ilSubItemListGUI
static int $MAX_SUBITEMS = 5
 
static array $details = []
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Represents search sub item lists

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilObjExerciseSubItemListGUI::__construct ( string  $a_cmd_class)

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

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

30  {
31  global $DIC;
32  parent::__construct($a_cmd_class);
33 
34  $this->access = $DIC->access();
35  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilObjExerciseSubItemListGUI::getHTML ( )

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

References ilSubItemListGUI\$lng, $valid, ILIAS\UI\Implementation\Component\Input\ViewControl\getContent(), ilSubItemListGUI\getHighlighter(), ilSubItemListGUI\getObjId(), ilSubItemListGUI\getRefId(), ilSubItemListGUI\getSubItemIds(), isAssignmentVisible(), ilLanguage\loadLanguageModule(), ilExAssignment\lookupTitle(), ilSubItemListGUI\parseRelevance(), ilSubItemListGUI\showDetailsLink(), and ilLanguage\txt().

49  : string
50  {
51  $lng = $this->lng;
52 
53  $lng->loadLanguageModule('exc');
54 
55  $valid = false;
56  foreach ($this->getSubItemIds(true) as $sub_item) {
57  if (!$this->isAssignmentVisible($sub_item)) {
58  continue;
59  }
60  $valid = true;
61 
62  if (is_object($this->getHighlighter()) && strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
63  $this->tpl->setCurrentBlock('sea_fragment');
64  $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
65  $this->tpl->parseCurrentBlock();
66  }
67  $this->tpl->setCurrentBlock('subitem');
68  $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('exc_assignment'));
69  $this->tpl->setVariable('SEPERATOR', ':');
70 
71  $this->tpl->setVariable('LINK', 'ilias.php?baseClass=ilExerciseHandlerGUI&cmd=showOverview&ref_id=' . $this->getRefId() . '&ass_id=' . $sub_item);
72  $this->tpl->setVariable('TITLE', ilExAssignment::lookupTitle($sub_item));
73 
74  if (count($this->getSubItemIds(true)) > 1) {
75  $this->parseRelevance($sub_item);
76  }
77 
78  $this->tpl->parseCurrentBlock();
79  }
80 
81  $this->showDetailsLink();
82 
83  return $valid ? $this->tpl->get() : '';
84  }
getSubItemIds(bool $limited=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
parseRelevance(int $sub_item)
$valid
static lookupTitle(int $a_id)
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ isAssignmentVisible()

ilObjExerciseSubItemListGUI::isAssignmentVisible ( int  $a_ass_id)
protected

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

References $access, and ilExAssignment\lookupAssignmentOnline().

Referenced by getHTML().

39  : bool {
40  $ilAccess = $this->access;
41 
42  if ($ilAccess->checkAccess('write', '', $this->getRefId())) {
43  return true;
44  }
45 
47  }
static lookupAssignmentOnline(int $a_ass_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilObjExerciseSubItemListGUI::$access
protected

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

Referenced by isAssignmentVisible().


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