ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilTestRandomQuestionSetConfig Class Reference
+ Inheritance diagram for ilTestRandomQuestionSetConfig:
+ Collaboration diagram for ilTestRandomQuestionSetConfig:

Public Member Functions

 setPoolsWithHomogeneousScoredQuestionsRequired (bool $requirePoolsWithHomogeneousScoredQuestions)
 
 arePoolsWithHomogeneousScoredQuestionsRequired ()
 
 setQuestionAmountConfigurationMode (?string $questionAmountConfigurationMode)
 
 getQuestionAmountConfigurationMode ()
 
 isQuestionAmountConfigurationModePerPool ()
 
 isQuestionAmountConfigurationModePerTest ()
 
 isValidQuestionAmountConfigurationMode (string $amountMode)
 
 setQuestionAmountPerTest (?int $questionAmountPerTest)
 
 getQuestionAmountPerTest ()
 
 setLastQuestionSyncTimestamp (int $lastQuestionSyncTimestamp)
 
 getLastQuestionSyncTimestamp ()
 
 getBuildableMessages ()
 
 initFromArray (array $data_array)
 
 loadFromDb ()
 
 saveToDb ()
 
 cloneToDbForTestId (int $test_id)
 
 deleteFromDb ()
 
 isQuestionSetConfigured ()
 
 isQuestionAmountConfigComplete ()
 
 hasSourcePoolDefinitions ()
 
 isQuestionSetBuildable ()
 
 doesQuestionSetRelatedDataExist ()
 
 removeQuestionSetRelatedData ()
 
 cloneQuestionSetRelatedData (ilObjTest $clone_test_obj)
 
 updateLastQuestionSyncTimestampForTestId (int $test_id, int $timestamp)
 
 isResultTaxonomyFilterSupported ()
 
 getSelectableQuestionPools ()
 
 doesSelectableQuestionPoolsExist ()
 
 getCommaSeparatedSourceQuestionPoolLinks ()
 
- Public Member Functions inherited from ilTestQuestionSetConfig
 __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)
 
 loadFromDb ()
 
 saveToDb ()
 
 cloneToDbForTestId (int $testId)
 
 deleteFromDb ()
 
 isQuestionSetConfigured ()
 
 doesQuestionSetRelatedDataExist ()
 
 removeQuestionSetRelatedData ()
 
 cloneQuestionSetRelatedData (ilObjTest $clone_test_obj)
 
 getQuestionPoolPathString (int $pool_id)
 
 getFirstQuestionPoolRefIdByObjId (int $pool_obj_id)
 
 isResultTaxonomyFilterSupported ()
 

Data Fields

const QUESTION_AMOUNT_CONFIG_MODE_PER_TEST = 'TEST'
 
const QUESTION_AMOUNT_CONFIG_MODE_PER_POOL = 'POOL'
 

Private Member Functions

 dbRecordExists (int $test_id)
 
 updateDbRecord (int $test_id)
 
 insertDbRecord (int $test_id)
 
 registerClonedSourcePoolDefinitionIdMapping (ilObjTest $cloneTestOBJ, array $definitionIdMap)
 
 buildSourcePoolDefinitionList (ilObjTest $test_obj)
 
 buildStagingPoolBuilder (ilObjTest $test_obj)
 

Private Attributes

bool $requirePoolsWithHomogeneousScoredQuestions = null
 
string $questionAmountConfigurationMode = null
 
int $questionAmountPerTest = null
 
int $lastQuestionSyncTimestamp = null
 
array $buildableMessages = []
 

Detailed Description

Definition at line 29 of file class.ilTestRandomQuestionSetConfig.php.

Member Function Documentation

◆ arePoolsWithHomogeneousScoredQuestionsRequired()

ilTestRandomQuestionSetConfig::arePoolsWithHomogeneousScoredQuestionsRequired ( )

Definition at line 45 of file class.ilTestRandomQuestionSetConfig.php.

References $requirePoolsWithHomogeneousScoredQuestions.

Referenced by getSelectableQuestionPools(), insertDbRecord(), and updateDbRecord().

+ Here is the caller graph for this function:

◆ buildSourcePoolDefinitionList()

◆ buildStagingPoolBuilder()

ilTestRandomQuestionSetConfig::buildStagingPoolBuilder ( ilObjTest  $test_obj)
private

Definition at line 337 of file class.ilTestRandomQuestionSetConfig.php.

References ILIAS\Repository\logger().

Referenced by cloneQuestionSetRelatedData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneQuestionSetRelatedData()

ilTestRandomQuestionSetConfig::cloneQuestionSetRelatedData ( ilObjTest  $clone_test_obj)

Definition at line 289 of file class.ilTestRandomQuestionSetConfig.php.

References buildSourcePoolDefinitionList(), buildStagingPoolBuilder(), cloneToDbForTestId(), ilObjTest\getTestId(), loadFromDb(), registerClonedSourcePoolDefinitionIdMapping(), and updateLastQuestionSyncTimestampForTestId().

289  : void
290  {
291  $this->loadFromDb();
292  $this->cloneToDbForTestId($clone_test_obj->getTestId());
293 
294  // clone source pool definitions (selection rules)
295 
296  $source_pool_definition_list_orig = $this->buildSourcePoolDefinitionList($this->test_obj);
297  $source_pool_definition_list_orig->loadDefinitions();
298  $definition_id_map = $source_pool_definition_list_orig->cloneDefinitionsForTestId($clone_test_obj->getTestId());
299  $this->registerClonedSourcePoolDefinitionIdMapping($clone_test_obj, $definition_id_map);
300 
301  // build new question stage for cloned test
302 
303  $source_pool_definition_list_clone = $this->buildSourcePoolDefinitionList($clone_test_obj);
304  $staging_pool = $this->buildStagingPoolBuilder($clone_test_obj);
305 
306  $source_pool_definition_list_clone->loadDefinitions();
307  $staging_pool->rebuild($source_pool_definition_list_clone);
308  $source_pool_definition_list_clone->saveDefinitions();
309 
310  $this->updateLastQuestionSyncTimestampForTestId($clone_test_obj->getTestId(), time());
311  }
updateLastQuestionSyncTimestampForTestId(int $test_id, int $timestamp)
getTestId()
Gets the database id of the additional test data.
registerClonedSourcePoolDefinitionIdMapping(ilObjTest $cloneTestOBJ, array $definitionIdMap)
+ Here is the call graph for this function:

◆ cloneToDbForTestId()

ilTestRandomQuestionSetConfig::cloneToDbForTestId ( int  $test_id)

Definition at line 147 of file class.ilTestRandomQuestionSetConfig.php.

References insertDbRecord().

Referenced by cloneQuestionSetRelatedData().

147  : void
148  {
149  $this->insertDbRecord($test_id);
150  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dbRecordExists()

ilTestRandomQuestionSetConfig::dbRecordExists ( int  $test_id)
private

Definition at line 161 of file class.ilTestRandomQuestionSetConfig.php.

References $res.

Referenced by doesQuestionSetRelatedDataExist(), and saveToDb().

161  : bool
162  {
163  $res = $this->db->queryF(
164  "SELECT COUNT(*) cnt FROM tst_rnd_quest_set_cfg WHERE test_fi = %s",
165  ['integer'],
166  [$test_id]
167  );
168 
169  $row = $this->db->fetchAssoc($res);
170 
171  return (bool) $row['cnt'];
172  }
$res
Definition: ltiservices.php:69
+ Here is the caller graph for this function:

◆ deleteFromDb()

ilTestRandomQuestionSetConfig::deleteFromDb ( )

Definition at line 152 of file class.ilTestRandomQuestionSetConfig.php.

Referenced by removeQuestionSetRelatedData().

152  : void
153  {
154  $this->db->manipulateF(
155  "DELETE FROM tst_rnd_quest_set_cfg WHERE test_fi = %s",
156  ['integer'],
157  [$this->test_obj->getTestId()]
158  );
159  }
+ Here is the caller graph for this function:

◆ doesQuestionSetRelatedDataExist()

ilTestRandomQuestionSetConfig::doesQuestionSetRelatedDataExist ( )

Definition at line 259 of file class.ilTestRandomQuestionSetConfig.php.

References buildSourcePoolDefinitionList(), and dbRecordExists().

259  : bool
260  {
261  if ($this->dbRecordExists($this->test_obj->getTestId())) {
262  return true;
263  }
264 
265  $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
266 
267  if ($sourcePoolDefinitionList->savedDefinitionsExist()) {
268  return true;
269  }
270 
271  return false;
272  }
+ Here is the call graph for this function:

◆ doesSelectableQuestionPoolsExist()

ilTestRandomQuestionSetConfig::doesSelectableQuestionPoolsExist ( )

Definition at line 373 of file class.ilTestRandomQuestionSetConfig.php.

References getSelectableQuestionPools().

373  : bool
374  {
375  return (bool) count($this->getSelectableQuestionPools());
376  }
+ Here is the call graph for this function:

◆ getBuildableMessages()

ilTestRandomQuestionSetConfig::getBuildableMessages ( )

Definition at line 102 of file class.ilTestRandomQuestionSetConfig.php.

References $buildableMessages.

102  : array
103  {
105  }

◆ getCommaSeparatedSourceQuestionPoolLinks()

ilTestRandomQuestionSetConfig::getCommaSeparatedSourceQuestionPoolLinks ( )

Definition at line 378 of file class.ilTestRandomQuestionSetConfig.php.

References $refId, ilObject\_getAllReferences(), and buildSourcePoolDefinitionList().

378  : string
379  {
380  $definitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
381  $definitionList->loadDefinitions();
382 
383  $poolTitles = [];
384 
385  foreach ($definitionList as $definition) {
386  $refId = current(ilObject::_getAllReferences($definition->getPoolId()));
387  $href = ilLink::_getLink($refId, 'qpl');
388  $title = $definition->getPoolTitle();
389 
390  $poolTitles[$definition->getPoolId()] = "<a href=\"$href\" alt=\"$title\">$title</a>";
391  }
392 
393  return implode(', ', $poolTitles);
394  }
static _getAllReferences(int $id)
get all reference ids for object ID
$refId
Definition: xapitoken.php:56
+ Here is the call graph for this function:

◆ getLastQuestionSyncTimestamp()

ilTestRandomQuestionSetConfig::getLastQuestionSyncTimestamp ( )

Definition at line 97 of file class.ilTestRandomQuestionSetConfig.php.

References $lastQuestionSyncTimestamp.

Referenced by insertDbRecord(), isQuestionSetConfigured(), and updateDbRecord().

+ Here is the caller graph for this function:

◆ getQuestionAmountConfigurationMode()

◆ getQuestionAmountPerTest()

ilTestRandomQuestionSetConfig::getQuestionAmountPerTest ( )

Definition at line 87 of file class.ilTestRandomQuestionSetConfig.php.

References $questionAmountPerTest.

Referenced by insertDbRecord(), isQuestionAmountConfigComplete(), and updateDbRecord().

+ Here is the caller graph for this function:

◆ getSelectableQuestionPools()

ilTestRandomQuestionSetConfig::getSelectableQuestionPools ( )

Definition at line 362 of file class.ilTestRandomQuestionSetConfig.php.

References arePoolsWithHomogeneousScoredQuestionsRequired().

Referenced by doesSelectableQuestionPoolsExist().

362  : array
363  {
364  return $this->test_obj->getAvailableQuestionpools(
365  true,
367  false,
368  true,
369  true
370  );
371  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasSourcePoolDefinitions()

ilTestRandomQuestionSetConfig::hasSourcePoolDefinitions ( )

Definition at line 231 of file class.ilTestRandomQuestionSetConfig.php.

References buildSourcePoolDefinitionList().

Referenced by isQuestionSetConfigured().

231  : bool
232  {
233  return $this->buildSourcePoolDefinitionList($this->test_obj)
234  ->savedDefinitionsExist();
235  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFromArray()

ilTestRandomQuestionSetConfig::initFromArray ( array  $data_array)

Definition at line 107 of file class.ilTestRandomQuestionSetConfig.php.

References setLastQuestionSyncTimestamp(), setPoolsWithHomogeneousScoredQuestionsRequired(), setQuestionAmountConfigurationMode(), and setQuestionAmountPerTest().

Referenced by loadFromDb().

107  : void
108  {
109  foreach ($data_array as $field => $value) {
110  switch ($field) {
111  case 'req_pools_homo_scored': $this->setPoolsWithHomogeneousScoredQuestionsRequired((bool) $value);
112  break;
113  case 'quest_amount_cfg_mode': $this->setQuestionAmountConfigurationMode($value);
114  break;
115  case 'quest_amount_per_test': $this->setQuestionAmountPerTest($value);
116  break;
117  case 'quest_sync_timestamp': $this->setLastQuestionSyncTimestamp($value);
118  break;
119  }
120  }
121  }
setQuestionAmountPerTest(?int $questionAmountPerTest)
setLastQuestionSyncTimestamp(int $lastQuestionSyncTimestamp)
setPoolsWithHomogeneousScoredQuestionsRequired(bool $requirePoolsWithHomogeneousScoredQuestions)
setQuestionAmountConfigurationMode(?string $questionAmountConfigurationMode)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertDbRecord()

ilTestRandomQuestionSetConfig::insertDbRecord ( int  $test_id)
private

Definition at line 190 of file class.ilTestRandomQuestionSetConfig.php.

References arePoolsWithHomogeneousScoredQuestionsRequired(), getLastQuestionSyncTimestamp(), getQuestionAmountConfigurationMode(), and getQuestionAmountPerTest().

Referenced by cloneToDbForTestId(), and saveToDb().

190  : void
191  {
192  $this->db->insert(
193  'tst_rnd_quest_set_cfg',
194  [
195  'test_fi' => ['integer', $test_id],
196  'req_pools_homo_scored' => ['integer', (int) $this->arePoolsWithHomogeneousScoredQuestionsRequired()],
197  'quest_amount_cfg_mode' => ['text', $this->getQuestionAmountConfigurationMode()],
198  'quest_amount_per_test' => ['integer', (int) $this->getQuestionAmountPerTest()],
199  'quest_sync_timestamp' => ['integer', (int) $this->getLastQuestionSyncTimestamp()]
200  ]
201  );
202  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isQuestionAmountConfigComplete()

ilTestRandomQuestionSetConfig::isQuestionAmountConfigComplete ( )

Definition at line 212 of file class.ilTestRandomQuestionSetConfig.php.

References buildSourcePoolDefinitionList(), getQuestionAmountPerTest(), and isQuestionAmountConfigurationModePerPool().

Referenced by isQuestionSetConfigured().

212  : bool
213  {
215  $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
216 
217  $sourcePoolDefinitionList->loadDefinitions();
218 
219  foreach ($sourcePoolDefinitionList as $definition) {
220  if ($definition->getQuestionAmount() < 1) {
221  return false;
222  }
223  }
224  } elseif ($this->getQuestionAmountPerTest() < 1) {
225  return false;
226  }
227 
228  return true;
229  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isQuestionAmountConfigurationModePerPool()

ilTestRandomQuestionSetConfig::isQuestionAmountConfigurationModePerPool ( )

Definition at line 60 of file class.ilTestRandomQuestionSetConfig.php.

References getQuestionAmountConfigurationMode().

Referenced by ilTestRandomQuestionSetBuilder\getInstance(), and isQuestionAmountConfigComplete().

60  : bool
61  {
62  return $this->getQuestionAmountConfigurationMode() == self::QUESTION_AMOUNT_CONFIG_MODE_PER_POOL;
63  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isQuestionAmountConfigurationModePerTest()

ilTestRandomQuestionSetConfig::isQuestionAmountConfigurationModePerTest ( )

Definition at line 65 of file class.ilTestRandomQuestionSetConfig.php.

References getQuestionAmountConfigurationMode().

65  : bool
66  {
67  return $this->getQuestionAmountConfigurationMode() == self::QUESTION_AMOUNT_CONFIG_MODE_PER_TEST;
68  }
+ Here is the call graph for this function:

◆ isQuestionSetBuildable()

ilTestRandomQuestionSetConfig::isQuestionSetBuildable ( )

Definition at line 237 of file class.ilTestRandomQuestionSetConfig.php.

References buildSourcePoolDefinitionList(), ilTestRandomQuestionSetBuilder\getInstance(), ILIAS\Repository\lng(), and ILIAS\Repository\logger().

Referenced by isQuestionSetConfigured().

237  : bool
238  {
239  $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
240  $sourcePoolDefinitionList->loadDefinitions();
241 
242  $stagingPoolQuestionList = new ilTestRandomQuestionSetStagingPoolQuestionList($this->db, $this->component_repository);
243 
244  $questionSetBuilder = ilTestRandomQuestionSetBuilder::getInstance(
245  $this->db,
246  $this->lng,
247  $this->logger,
248  $this->test_obj,
249  $this,
250  $sourcePoolDefinitionList,
251  $stagingPoolQuestionList
252  );
253 
254  $buildable = $questionSetBuilder->checkBuildable();
255  $this->buildableMessages = $questionSetBuilder->getCheckMessages();
256  return $buildable;
257  }
static getInstance(ilDBInterface $db, ilLanguage $lng, TestLogger $logger, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isQuestionSetConfigured()

◆ isResultTaxonomyFilterSupported()

ilTestRandomQuestionSetConfig::isResultTaxonomyFilterSupported ( )

Definition at line 357 of file class.ilTestRandomQuestionSetConfig.php.

357  : bool
358  {
359  return true;
360  }

◆ isValidQuestionAmountConfigurationMode()

ilTestRandomQuestionSetConfig::isValidQuestionAmountConfigurationMode ( string  $amountMode)

Definition at line 70 of file class.ilTestRandomQuestionSetConfig.php.

70  : bool
71  {
72  switch ($amountMode) {
73  case self::QUESTION_AMOUNT_CONFIG_MODE_PER_POOL:
74  case self::QUESTION_AMOUNT_CONFIG_MODE_PER_TEST:
75 
76  return true;
77  }
78 
79  return false;
80  }

◆ loadFromDb()

ilTestRandomQuestionSetConfig::loadFromDb ( )

Definition at line 123 of file class.ilTestRandomQuestionSetConfig.php.

References $res, and initFromArray().

Referenced by cloneQuestionSetRelatedData().

123  : void
124  {
125  $res = $this->db->queryF(
126  "SELECT * FROM tst_rnd_quest_set_cfg WHERE test_fi = %s",
127  ['integer'],
128  [$this->test_obj->getTestId()]
129  );
130 
131  $row = $this->db->fetchAssoc($res);
132  if ($row !== null) {
133  $this->initFromArray($row);
134  }
135  }
$res
Definition: ltiservices.php:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerClonedSourcePoolDefinitionIdMapping()

ilTestRandomQuestionSetConfig::registerClonedSourcePoolDefinitionIdMapping ( ilObjTest  $cloneTestOBJ,
array  $definitionIdMap 
)
private

Definition at line 313 of file class.ilTestRandomQuestionSetConfig.php.

References ilCopyWizardOptions\_getInstance(), ilObject\getRefId(), ilObjTest\getTmpCopyWizardCopyId(), and ILIAS\Repository\logger().

Referenced by cloneQuestionSetRelatedData().

313  : void
314  {
316 
317  foreach ($definitionIdMap as $originalDefinitionId => $cloneDefinitionId) {
318  $originalKey = $this->test_obj->getRefId() . '_rndSelDef_' . $originalDefinitionId;
319  $mappedKey = $cloneTestOBJ->getRefId() . '_rndSelDef_' . $cloneDefinitionId;
320  $cwo->appendMapping($originalKey, $mappedKey);
321  $this->logger->info(__METHOD__ . ": Added random selection definition id mapping $originalKey <-> $mappedKey");
322  }
323  }
static _getInstance(int $a_copy_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeQuestionSetRelatedData()

ilTestRandomQuestionSetConfig::removeQuestionSetRelatedData ( )

Definition at line 274 of file class.ilTestRandomQuestionSetConfig.php.

References buildSourcePoolDefinitionList(), deleteFromDb(), and ILIAS\Repository\logger().

274  : void
275  {
276  $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
277  $sourcePoolDefinitionList->deleteDefinitions();
278 
280  $this->db,
281  $this->logger,
282  $this->test_obj
283  );
284  $stagingPool->reset();
285 
286  $this->deleteFromDb();
287  }
+ Here is the call graph for this function:

◆ saveToDb()

ilTestRandomQuestionSetConfig::saveToDb ( )

Definition at line 137 of file class.ilTestRandomQuestionSetConfig.php.

References dbRecordExists(), insertDbRecord(), and updateDbRecord().

137  : void
138  {
139  if ($this->dbRecordExists($this->test_obj->getTestId())) {
140  $this->updateDbRecord($this->test_obj->getTestId());
141  return;
142  }
143 
144  $this->insertDbRecord($this->test_obj->getTestId());
145  }
+ Here is the call graph for this function:

◆ setLastQuestionSyncTimestamp()

ilTestRandomQuestionSetConfig::setLastQuestionSyncTimestamp ( int  $lastQuestionSyncTimestamp)

Definition at line 92 of file class.ilTestRandomQuestionSetConfig.php.

References $lastQuestionSyncTimestamp.

Referenced by initFromArray().

92  : void
93  {
94  $this->lastQuestionSyncTimestamp = $lastQuestionSyncTimestamp;
95  }
+ Here is the caller graph for this function:

◆ setPoolsWithHomogeneousScoredQuestionsRequired()

ilTestRandomQuestionSetConfig::setPoolsWithHomogeneousScoredQuestionsRequired ( bool  $requirePoolsWithHomogeneousScoredQuestions)

Definition at line 40 of file class.ilTestRandomQuestionSetConfig.php.

References $requirePoolsWithHomogeneousScoredQuestions.

Referenced by initFromArray().

40  : void
41  {
42  $this->requirePoolsWithHomogeneousScoredQuestions = $requirePoolsWithHomogeneousScoredQuestions;
43  }
+ Here is the caller graph for this function:

◆ setQuestionAmountConfigurationMode()

ilTestRandomQuestionSetConfig::setQuestionAmountConfigurationMode ( ?string  $questionAmountConfigurationMode)

Definition at line 50 of file class.ilTestRandomQuestionSetConfig.php.

References $questionAmountConfigurationMode.

Referenced by initFromArray().

50  : void
51  {
52  $this->questionAmountConfigurationMode = $questionAmountConfigurationMode;
53  }
+ Here is the caller graph for this function:

◆ setQuestionAmountPerTest()

ilTestRandomQuestionSetConfig::setQuestionAmountPerTest ( ?int  $questionAmountPerTest)

Definition at line 82 of file class.ilTestRandomQuestionSetConfig.php.

References $questionAmountPerTest.

Referenced by initFromArray().

82  : void
83  {
84  $this->questionAmountPerTest = $questionAmountPerTest;
85  }
+ Here is the caller graph for this function:

◆ updateDbRecord()

ilTestRandomQuestionSetConfig::updateDbRecord ( int  $test_id)
private

Definition at line 174 of file class.ilTestRandomQuestionSetConfig.php.

References arePoolsWithHomogeneousScoredQuestionsRequired(), getLastQuestionSyncTimestamp(), getQuestionAmountConfigurationMode(), and getQuestionAmountPerTest().

Referenced by saveToDb().

174  : void
175  {
176  $this->db->update(
177  'tst_rnd_quest_set_cfg',
178  [
179  'req_pools_homo_scored' => ['integer', (int) $this->arePoolsWithHomogeneousScoredQuestionsRequired()],
180  'quest_amount_cfg_mode' => ['text', $this->getQuestionAmountConfigurationMode()],
181  'quest_amount_per_test' => ['integer', (int) $this->getQuestionAmountPerTest()],
182  'quest_sync_timestamp' => ['integer', (int) $this->getLastQuestionSyncTimestamp()]
183  ],
184  [
185  'test_fi' => ['integer', $test_id]
186  ]
187  );
188  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLastQuestionSyncTimestampForTestId()

ilTestRandomQuestionSetConfig::updateLastQuestionSyncTimestampForTestId ( int  $test_id,
int  $timestamp 
)

Definition at line 344 of file class.ilTestRandomQuestionSetConfig.php.

Referenced by cloneQuestionSetRelatedData().

344  : void
345  {
346  $this->db->update(
347  'tst_rnd_quest_set_cfg',
348  [
349  'quest_sync_timestamp' => ['integer', (int) $timestamp]
350  ],
351  [
352  'test_fi' => ['integer', $test_id]
353  ]
354  );
355  }
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:70
+ Here is the caller graph for this function:

Field Documentation

◆ $buildableMessages

array ilTestRandomQuestionSetConfig::$buildableMessages = []
private

Definition at line 38 of file class.ilTestRandomQuestionSetConfig.php.

Referenced by getBuildableMessages().

◆ $lastQuestionSyncTimestamp

int ilTestRandomQuestionSetConfig::$lastQuestionSyncTimestamp = null
private

◆ $questionAmountConfigurationMode

string ilTestRandomQuestionSetConfig::$questionAmountConfigurationMode = null
private

◆ $questionAmountPerTest

int ilTestRandomQuestionSetConfig::$questionAmountPerTest = null
private

◆ $requirePoolsWithHomogeneousScoredQuestions

bool ilTestRandomQuestionSetConfig::$requirePoolsWithHomogeneousScoredQuestions = null
private

◆ QUESTION_AMOUNT_CONFIG_MODE_PER_POOL

◆ QUESTION_AMOUNT_CONFIG_MODE_PER_TEST


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