ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestQuestionSetConfigFactory Class Reference
+ Collaboration diagram for ilTestQuestionSetConfigFactory:

Public Member Functions

 __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 question set type (test mode) More...
 

Private Attributes

ilTestQuestionSetConfig $testQuestionSetConfig = null
 

Detailed Description

Definition at line 32 of file class.ilTestQuestionSetConfigFactory.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestQuestionSetConfigFactory::__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 
)

Definition at line 36 of file class.ilTestQuestionSetConfigFactory.php.

44  {
45  }

Member Function Documentation

◆ getQuestionSetConfig()

ilTestQuestionSetConfigFactory::getQuestionSetConfig ( )

creates and returns an instance of a test question set config that corresponds to the test's current question set type (test mode)

Definition at line 51 of file class.ilTestQuestionSetConfigFactory.php.

References $testQuestionSetConfig, ILIAS\Repository\lng(), ILIAS\Repository\logger(), and null.

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  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

Field Documentation

◆ $testQuestionSetConfig

ilTestQuestionSetConfig ilTestQuestionSetConfigFactory::$testQuestionSetConfig = null
private

Definition at line 34 of file class.ilTestQuestionSetConfigFactory.php.

Referenced by getQuestionSetConfig().


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