ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Factory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25use ILIAS\UI\Factory as UIFactory;
26use ILIAS\UI\Renderer as UIRenderer;
27use ILIAS\UI\Component\Listing\Descriptive as DescriptiveListing;
29use ILIAS\Refinery\Factory as Refinery;
30use ILIAS\HTTP\Services as HTTPService;
31use ILIAS\Data\Factory as DataFactory;
33
35{
36 public function __construct(
37 protected UIFactory $ui_factory,
38 protected UIRenderer $ui_renderer,
39 protected Refinery $refinery,
40 protected DataFactory $data_factory,
41 protected HTTPService $http,
42 protected Language $lng
43 ) {
44 }
45
47 AttemptSolutions $attempt_result,
48 Settings $settings,
49 string $title,
50 bool $for_print
53 $this->ui_factory,
54 $this->ui_renderer,
55 $this->refinery,
56 $this->http,
57 $this->data_factory,
58 $this->lng,
59 $attempt_result,
60 $settings,
61 $title,
62 $for_print
63 );
64 }
65
67 \ilObjTest $test_obj,
68 bool $is_user_output
69 ): Settings {
70 $settings_result = $test_obj->getScoreSettings()->getResultDetailsSettings();
71
72 $show_hidden_questions = false;
73 $show_optional_questions = true;
74 $show_best_solution = $is_user_output ?
75 $settings_result->getShowSolutionListComparison() :
76 (bool) \ilSession::get('tst_results_show_best_solutions');
77
78 return new Settings(
79 $test_obj->getId(),
80 $show_hidden_questions,
81 $show_optional_questions,
82 $show_best_solution,
83 $settings_result->getShowSolutionFeedback(),
84 $settings_result->getShowSolutionAnswersOnly(),
85 $settings_result->getShowSolutionSuggested()
86 );
87 }
88}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
Class Services.
Definition: Services.php:38
getAttemptResultsSettings(\ilObjTest $test_obj, bool $is_user_output)
Definition: Factory.php:66
__construct(protected UIFactory $ui_factory, protected UIRenderer $ui_renderer, protected Refinery $refinery, protected DataFactory $data_factory, protected HTTPService $http, protected Language $lng)
Definition: Factory.php:36
getAttemptResultsPresentationTable(AttemptSolutions $attempt_result, Settings $settings, string $title, bool $for_print)
Definition: Factory.php:46
getShowSolutionListComparison()
static get(string $a_var)
$http
Definition: deliver.php:30
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes a View Control Container.
Definition: ViewControl.php:30
An entity that renders components to a string output.
Definition: Renderer.php:31
static http()
Fetches the global http state from ILIAS.
global $lng
Definition: privfeed.php:31