ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 

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)

Reimplemented from ilSubItemListGUI.

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

30 {
31 global $DIC;
32 parent::__construct($a_cmd_class);
33
34 $this->access = $DIC->access();
35 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilObjExerciseSubItemListGUI::getHTML ( )

Reimplemented from ilSubItemListGUI.

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

49 : string
50 {
52
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 $this->tpl->parseCurrentBlock();
74 }
75
76 $this->showDetailsLink();
77
78 return $valid ? $this->tpl->get() : '';
79 }
static lookupTitle(int $a_id)
loadLanguageModule(string $a_module)
Load language module.
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...
getSubItemIds(bool $limited=false)
$valid

References $lng, $valid, ILIAS\UI\Implementation\Component\Input\ViewControl\getContent(), and ilExAssignment\lookupTitle().

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

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)

Field Documentation

◆ $access

ilAccessHandler ilObjExerciseSubItemListGUI::$access
protected

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


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