ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 338 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)

Reimplemented from ilTestQuestionSetConfig.

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

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

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

+ Here is the call graph for this function:

◆ cloneToDbForTestId()

ilTestRandomQuestionSetConfig::cloneToDbForTestId ( int  $test_id)

Reimplemented from ilTestQuestionSetConfig.

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

147 : void
148 {
149 $this->insertDbRecord($test_id);
150 }

References insertDbRecord().

Referenced by cloneQuestionSetRelatedData().

+ 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.

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

References $res.

Referenced by doesQuestionSetRelatedDataExist(), and saveToDb().

+ Here is the caller graph for this function:

◆ deleteFromDb()

ilTestRandomQuestionSetConfig::deleteFromDb ( )

Reimplemented from ilTestQuestionSetConfig.

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

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 }

Referenced by removeQuestionSetRelatedData().

+ Here is the caller graph for this function:

◆ doesQuestionSetRelatedDataExist()

ilTestRandomQuestionSetConfig::doesQuestionSetRelatedDataExist ( )

Reimplemented from ilTestQuestionSetConfig.

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

260 : bool
261 {
262 if ($this->dbRecordExists($this->test_obj->getTestId())) {
263 return true;
264 }
265
266 $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
267
268 if ($sourcePoolDefinitionList->savedDefinitionsExist()) {
269 return true;
270 }
271
272 return false;
273 }

References buildSourcePoolDefinitionList(), and dbRecordExists().

+ Here is the call graph for this function:

◆ doesSelectableQuestionPoolsExist()

ilTestRandomQuestionSetConfig::doesSelectableQuestionPoolsExist ( )

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

374 : bool
375 {
376 return (bool) count($this->getSelectableQuestionPools());
377 }

References getSelectableQuestionPools().

+ Here is the call graph for this function:

◆ getBuildableMessages()

ilTestRandomQuestionSetConfig::getBuildableMessages ( )

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

References $buildableMessages.

◆ getCommaSeparatedSourceQuestionPoolLinks()

ilTestRandomQuestionSetConfig::getCommaSeparatedSourceQuestionPoolLinks ( )

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

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

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

+ 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 363 of file class.ilTestRandomQuestionSetConfig.php.

363 : array
364 {
365 return $this->test_obj->getAvailableQuestionpools(
366 true,
368 false,
369 true,
370 true
371 );
372 }

References arePoolsWithHomogeneousScoredQuestionsRequired().

Referenced by doesSelectableQuestionPoolsExist().

+ 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.

231 : bool
232 {
233 $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
234
235 return $sourcePoolDefinitionList->savedDefinitionsExist();
236 }

References buildSourcePoolDefinitionList().

Referenced by isQuestionSetConfigured().

+ 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.

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 }
setQuestionAmountConfigurationMode(?string $questionAmountConfigurationMode)
setLastQuestionSyncTimestamp(int $lastQuestionSyncTimestamp)
setQuestionAmountPerTest(?int $questionAmountPerTest)
setPoolsWithHomogeneousScoredQuestionsRequired(bool $requirePoolsWithHomogeneousScoredQuestions)

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

Referenced by loadFromDb().

+ 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.

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 }

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

Referenced by cloneToDbForTestId(), and saveToDb().

+ 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.

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 }

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

Referenced by isQuestionSetConfigured().

+ 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(), and QUESTION_AMOUNT_CONFIG_MODE_PER_POOL.

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

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

◆ isQuestionAmountConfigurationModePerTest()

ilTestRandomQuestionSetConfig::isQuestionAmountConfigurationModePerTest ( )

◆ isQuestionSetBuildable()

ilTestRandomQuestionSetConfig::isQuestionSetBuildable ( )

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

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

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

Referenced by isQuestionSetConfigured().

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

◆ isQuestionSetConfigured()

ilTestRandomQuestionSetConfig::isQuestionSetConfigured ( )

◆ isResultTaxonomyFilterSupported()

ilTestRandomQuestionSetConfig::isResultTaxonomyFilterSupported ( )

Reimplemented from ilTestQuestionSetConfig.

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

358 : bool
359 {
360 return true;
361 }

◆ isValidQuestionAmountConfigurationMode()

ilTestRandomQuestionSetConfig::isValidQuestionAmountConfigurationMode ( string  $amountMode)

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

70 : bool
71 {
72 switch ($amountMode) {
75
76 return true;
77 }
78
79 return false;
80 }

References QUESTION_AMOUNT_CONFIG_MODE_PER_POOL, and QUESTION_AMOUNT_CONFIG_MODE_PER_TEST.

◆ loadFromDb()

ilTestRandomQuestionSetConfig::loadFromDb ( )

Reimplemented from ilTestQuestionSetConfig.

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

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 }

References $res, and initFromArray().

Referenced by cloneQuestionSetRelatedData().

+ 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 314 of file class.ilTestRandomQuestionSetConfig.php.

314 : void
315 {
317
318 foreach ($definitionIdMap as $originalDefinitionId => $cloneDefinitionId) {
319 $originalKey = $this->test_obj->getRefId() . '_rndSelDef_' . $originalDefinitionId;
320 $mappedKey = $cloneTestOBJ->getRefId() . '_rndSelDef_' . $cloneDefinitionId;
321 $cwo->appendMapping($originalKey, $mappedKey);
322 $this->logger->info(__METHOD__ . ": Added random selection definition id mapping $originalKey <-> $mappedKey");
323 }
324 }
static _getInstance(int $a_copy_id)

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

Referenced by cloneQuestionSetRelatedData().

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

◆ removeQuestionSetRelatedData()

ilTestRandomQuestionSetConfig::removeQuestionSetRelatedData ( )

Reimplemented from ilTestQuestionSetConfig.

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

275 : void
276 {
277 $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
278 $sourcePoolDefinitionList->deleteDefinitions();
279
281 $this->db,
282 $this->logger,
283 $this->test_obj
284 );
285 $stagingPool->reset();
286
287 $this->deleteFromDb();
288 }

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

+ Here is the call graph for this function:

◆ saveToDb()

ilTestRandomQuestionSetConfig::saveToDb ( )

Reimplemented from ilTestQuestionSetConfig.

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

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 }

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

+ Here is the call graph for this function:

◆ setLastQuestionSyncTimestamp()

ilTestRandomQuestionSetConfig::setLastQuestionSyncTimestamp ( int  $lastQuestionSyncTimestamp)

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

92 : void
93 {
94 $this->lastQuestionSyncTimestamp = $lastQuestionSyncTimestamp;
95 }

References $lastQuestionSyncTimestamp.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ setPoolsWithHomogeneousScoredQuestionsRequired()

ilTestRandomQuestionSetConfig::setPoolsWithHomogeneousScoredQuestionsRequired ( bool  $requirePoolsWithHomogeneousScoredQuestions)

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

40 : void
41 {
42 $this->requirePoolsWithHomogeneousScoredQuestions = $requirePoolsWithHomogeneousScoredQuestions;
43 }

References $requirePoolsWithHomogeneousScoredQuestions.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ setQuestionAmountConfigurationMode()

ilTestRandomQuestionSetConfig::setQuestionAmountConfigurationMode ( ?string  $questionAmountConfigurationMode)

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

50 : void
51 {
52 $this->questionAmountConfigurationMode = $questionAmountConfigurationMode;
53 }

References $questionAmountConfigurationMode.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ setQuestionAmountPerTest()

ilTestRandomQuestionSetConfig::setQuestionAmountPerTest ( ?int  $questionAmountPerTest)

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

82 : void
83 {
84 $this->questionAmountPerTest = $questionAmountPerTest;
85 }

References $questionAmountPerTest.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ updateDbRecord()

ilTestRandomQuestionSetConfig::updateDbRecord ( int  $test_id)
private

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

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 }

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

Referenced by saveToDb().

+ 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 345 of file class.ilTestRandomQuestionSetConfig.php.

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

References $timestamp.

Referenced by cloneQuestionSetRelatedData().

+ 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: