ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestQuestionSetConfigFactory Class Reference
+ Collaboration diagram for ilTestQuestionSetConfigFactory:

Public Member Functions

 __construct (protected ilTree $tree, protected ilDBInterface $db, protected ilLanguage $lng, protected ilLogger $log, protected ilComponentRepository $component_repository, protected ilObjTest $test_obj, protected QuestionInfoService $questioninfo)
 
 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 31 of file class.ilTestQuestionSetConfigFactory.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestQuestionSetConfigFactory::__construct ( protected ilTree  $tree,
protected ilDBInterface  $db,
protected ilLanguage  $lng,
protected ilLogger  $log,
protected ilComponentRepository  $component_repository,
protected ilObjTest  $test_obj,
protected QuestionInfoService  $questioninfo 
)

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

43  {
44  }

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 50 of file class.ilTestQuestionSetConfigFactory.php.

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

51  {
52  if ($this->testQuestionSetConfig === null) {
53  if ($this->test_obj->isFixedTest()) {
54  $this->testQuestionSetConfig = new ilTestFixedQuestionSetConfig(
55  $this->tree,
56  $this->db,
57  $this->lng,
58  $this->log,
59  $this->component_repository,
60  $this->test_obj,
61  $this->questioninfo
62  );
63  }
64  if ($this->test_obj->isRandomTest()) {
65  $this->testQuestionSetConfig = new ilTestRandomQuestionSetConfig(
66  $this->tree,
67  $this->db,
68  $this->lng,
69  $this->log,
70  $this->component_repository,
71  $this->test_obj,
72  $this->questioninfo
73  );
74  }
75 
76  $this->testQuestionSetConfig->loadFromDb();
77  }
78 
80  }
+ Here is the call graph for this function:

Field Documentation

◆ $testQuestionSetConfig

ilTestQuestionSetConfig ilTestQuestionSetConfigFactory::$testQuestionSetConfig = null
private

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

Referenced by getQuestionSetConfig().


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