ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTestQuestionSetConfigFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
23
33{
35
36 public function __construct(
37 protected readonly ilTree $tree,
38 protected readonly ilDBInterface $db,
39 protected readonly ilLanguage $lng,
40 protected readonly TestLogger $logger,
41 protected readonly ilComponentRepository $component_repository,
42 protected readonly ilObjTest $test_obj,
43 protected readonly GeneralQuestionPropertiesRepository $questionrepository
44 ) {
45 }
46
52 {
53 if ($this->testQuestionSetConfig === null) {
54 if ($this->test_obj->isFixedTest()) {
55 $this->testQuestionSetConfig = new ilTestFixedQuestionSetConfig(
56 $this->tree,
57 $this->db,
58 $this->lng,
59 $this->logger,
60 $this->component_repository,
61 $this->test_obj,
62 $this->questionrepository
63 );
64 }
65 if ($this->test_obj->isRandomTest()) {
66 $this->testQuestionSetConfig = new ilTestRandomQuestionSetConfig(
67 $this->tree,
68 $this->db,
69 $this->lng,
70 $this->logger,
71 $this->component_repository,
72 $this->test_obj,
73 $this->questionrepository
74 );
75 }
76
77 $this->testQuestionSetConfig->loadFromDb();
78 }
79
81 }
82}
language handling
__construct(protected readonly ilTree $tree, protected readonly ilDBInterface $db, protected readonly ilLanguage $lng, protected readonly TestLogger $logger, protected readonly ilComponentRepository $component_repository, protected readonly ilObjTest $test_obj, protected readonly GeneralQuestionPropertiesRepository $questionrepository)
getQuestionSetConfig()
creates and returns an instance of a test question set config that corresponds to the test's current ...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Readable part of repository interface to ilComponentDataDB.
Interface ilDBInterface.
global $lng
Definition: privfeed.php:31