ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Questions\Question\Views\Participant Class Reference
+ Inheritance diagram for ILIAS\Questions\Question\Views\Participant:
+ Collaboration diagram for ILIAS\Questions\Question\Views\Participant:

Public Member Functions

 __construct (private readonly Language $lng, private readonly Refinery $refinery, private readonly UIFactory $ui_factory, private readonly RequiredCapabilities $required_capabilities, private readonly Question $question, private readonly ?Attempt $attempt_data, private readonly ViewConfiguration $view_configuration)
 
 getAttemptId ()
 
 getUI ()
 
 getUI ()
 

Detailed Description

Definition at line 33 of file Participant.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Questions\Question\Views\Participant::__construct ( private readonly Language  $lng,
private readonly Refinery  $refinery,
private readonly UIFactory  $ui_factory,
private readonly RequiredCapabilities  $required_capabilities,
private readonly Question  $question,
private readonly ?Attempt  $attempt_data,
private readonly ViewConfiguration  $view_configuration 
)

Definition at line 35 of file Participant.php.

43 {
44 }

Member Function Documentation

◆ getAttemptId()

ILIAS\Questions\Question\Views\Participant::getAttemptId ( )

Definition at line 46 of file Participant.php.

46 : ?Uuid
47 {
48 return $this->attempt_data?->getId();
49 }

◆ getUI()

ILIAS\Questions\Question\Views\Participant::getUI ( )
Returns
list<Component>

Implements ILIAS\Questions\Presentation\Layout\Viewable.

Definition at line 52 of file Participant.php.

52 : array
53 {
54 $question_page = new \QstsQuestionPageGUI(
55 $this->question,
56 $this->question->getParentObjId(),
57 $this->required_capabilities,
58 $this->view_configuration
59 )->withAttemptData($this->attempt_data);
60 $question_page->setPresentationTitle($this->question->getTitle());
61
62
63 if ($this->view_configuration->showMarks()) {
64 $content[] = $this->ui_factory->listing()->characteristicValue()->text(
65 [
66 $this->lng->txt('awarded_points') => $this->refinery->kindlyTo()->string()->transform(
67 $this->attempt_data?->getResponseForQuestion(
68 $this->question->getId()
69 )?->getAwardedPoints() ?? 0
70 )
71 ]
72 );
73 $content[] = $this->ui_factory->divider()->horizontal();
74 }
75
76 $content[] = $this->ui_factory->legacy()->content(
77 $question_page->presentation()
78 );
79
80 return $content;
81 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

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