ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilTestRandomQuestionSetConfig Class Reference
+ Inheritance diagram for ilTestRandomQuestionSetConfig:
+ Collaboration diagram for ilTestRandomQuestionSetConfig:

Public Member Functions

 __construct (ilTree $tree, ilDB $db, ilPluginAdmin $pluginAdmin, ilObjTest $testOBJ)
 
 setPoolsWithHomogeneousScoredQuestionsRequired ($requirePoolsWithHomogeneousScoredQuestions)
 
 arePoolsWithHomogeneousScoredQuestionsRequired ()
 
 setQuestionAmountConfigurationMode ($questionAmountConfigurationMode)
 
 getQuestionAmountConfigurationMode ()
 
 isQuestionAmountConfigurationModePerPool ()
 
 isQuestionAmountConfigurationModePerTest ()
 
 setQuestionAmountPerTest ($questionAmountPerTest)
 
 getQuestionAmountPerTest ()
 
 setLastQuestionSyncTimestamp ($lastQuestionSyncTimestamp)
 
 getLastQuestionSyncTimestamp ()
 
 initFromArray ($dataArray)
 initialises the current object instance with values from matching properties within the passed array More...
 
 loadFromDb ()
 loads the question set config for current test from the database More...
 
 saveToDb ()
 saves the question set config for current test to the database More...
 
 cloneToDbForTestId ($testId)
 saves the question set config for test with given id to the database More...
 
 deleteFromDb ()
 deletes the question set config for current test from the database More...
 
 isQuestionSetConfigured ()
 
 hasSourcePoolDefinitions ()
 
 isQuestionSetBuildable ()
 
 doesQuestionSetRelatedDataExist ()
 checks wether question set config related data exists or not More...
 
 removeQuestionSetRelatedData ()
 removes all question set config related data More...
 
 resetQuestionSetRelatedTestSettings ()
 resets all test settings that depends on a non changed question set config More...
 
 cloneQuestionSetRelatedData ($cloneTestOBJ)
 removes all question set config related data for cloned/copied test More...
 
 updateLastQuestionSyncTimestampForTestId ($testId, $timestamp)
 
 isResultTaxonomyFilterSupported ()
 
 getSelectableQuestionPools ()
 
 doesSelectableQuestionPoolsExist ()
 
 areDepenciesBroken ()
 
 getDepenciesBrokenMessage (ilLanguage $lng)
 
 isValidRequestOnBrokenQuestionSetDepencies ($nextClass, $cmd)
 
 getHiddenTabsOnBrokenDepencies ()
 
- Public Member Functions inherited from ilTestQuestionSetConfig
 __construct (ilTree $tree, ilDB $db, ilPluginAdmin $pluginAdmin, ilObjTest $testOBJ)
 
 loadFromDb ()
 loads the question set config for current test from the database More...
 
 saveToDb ()
 saves the question set config for current test to the database More...
 
 cloneToDbForTestId ($testId)
 saves the question set config for test with given id to the database More...
 
 deleteFromDb ()
 deletes the question set config for current test from the database More...
 
 areDepenciesInVulnerableState ()
 
 getDepenciesInVulnerableStateMessage (ilLanguage $lng)
 
 areDepenciesBroken ()
 
 getDepenciesBrokenMessage (ilLanguage $lng)
 
 isValidRequestOnBrokenQuestionSetDepencies ($nextClass, $cmd)
 
 getHiddenTabsOnBrokenDepencies ()
 
 isQuestionSetConfigured ()
 
 doesQuestionSetRelatedDataExist ()
 checks wether question set config related data exists or not More...
 
 removeQuestionSetRelatedData ()
 removes all question set config related data More...
 
 resetQuestionSetRelatedTestSettings ()
 resets all test settings that depends on a non changed question set config More...
 
 cloneQuestionSetRelatedData ($cloneTestOBJ)
 removes all question set config related data for cloned/copied test More...
 
 getQuestionPoolPathString ($poolId)
 
 isResultTaxonomyFilterSupported ()
 

Data Fields

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

Private Member Functions

 dbRecordExists ($testId)
 checks wether a question set config for current test exists in the database More...
 
 updateDbRecord ($testId)
 updates the record in the database that corresponds to the question set config for the current test More...
 
 insertDbRecord ($testId)
 inserts a new record for the question set config for the current test into the database More...
 
 buildSourcePoolDefinitionList (ilObjTest $testOBJ)
 
 buildStagingPoolBuilder (ilObjTest $testOBJ)
 

Private Attributes

 $requirePoolsWithHomogeneousScoredQuestions = null
 
 $questionAmountConfigurationMode = null
 
 $questionAmountPerTest = null
 
 $lastQuestionSyncTimestamp = null
 

Additional Inherited Members

- Protected Attributes inherited from ilTestQuestionSetConfig
 $tree = null
 
 $db = null
 
 $pluginAdmin = null
 
 $testOBJ = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ areDepenciesBroken()

ilTestRandomQuestionSetConfig::areDepenciesBroken ( )

Reimplemented from ilTestQuestionSetConfig.

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

467 {
468 return (bool)$this->testOBJ->isTestFinalBroken();
469 }

◆ arePoolsWithHomogeneousScoredQuestionsRequired()

ilTestRandomQuestionSetConfig::arePoolsWithHomogeneousScoredQuestionsRequired ( )

◆ buildSourcePoolDefinitionList()

ilTestRandomQuestionSetConfig::buildSourcePoolDefinitionList ( ilObjTest  $testOBJ)
private

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

409 {
410 require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php';
411 $sourcePoolDefinitionFactory = new ilTestRandomQuestionSetSourcePoolDefinitionFactory(
412 $this->db, $testOBJ
413 );
414
415 require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionList.php';
416 $sourcePoolDefinitionList = new ilTestRandomQuestionSetSourcePoolDefinitionList(
417 $this->db, $testOBJ, $sourcePoolDefinitionFactory
418 );
419
420 return $sourcePoolDefinitionList;
421 }

References ilTestQuestionSetConfig\$testOBJ.

Referenced by cloneQuestionSetRelatedData(), doesQuestionSetRelatedDataExist(), hasSourcePoolDefinitions(), isQuestionSetBuildable(), and removeQuestionSetRelatedData().

+ Here is the caller graph for this function:

◆ buildStagingPoolBuilder()

ilTestRandomQuestionSetConfig::buildStagingPoolBuilder ( ilObjTest  $testOBJ)
private

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

424 {
425 require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetStagingPoolBuilder.php';
426 $stagingPool = new ilTestRandomQuestionSetStagingPoolBuilder($this->db, $testOBJ);
427
428 return $stagingPool;
429 }

References ilTestQuestionSetConfig\$testOBJ.

Referenced by cloneQuestionSetRelatedData().

+ Here is the caller graph for this function:

◆ cloneQuestionSetRelatedData()

ilTestRandomQuestionSetConfig::cloneQuestionSetRelatedData (   $cloneTestOBJ)

removes all question set config related data for cloned/copied test

Parameters
ilObjTest$cloneTestOBJ

Reimplemented from ilTestQuestionSetConfig.

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

384 {
385 // clone general config
386
387 $this->loadFromDb();
388 $this->cloneToDbForTestId($cloneTestOBJ->getTestId());
389
390 // clone source pool definitions (selection rules)
391
392 $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->testOBJ);
393 $sourcePoolDefinitionList->loadDefinitions();
394 $sourcePoolDefinitionList->cloneDefinitionsForTestId($cloneTestOBJ->getTestId());
395
396 // build new question stage for cloned test
397
398 $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($cloneTestOBJ);
399 $stagingPool = $this->buildStagingPoolBuilder($cloneTestOBJ);
400
401 $sourcePoolDefinitionList->loadDefinitions();
402 $stagingPool->rebuild($sourcePoolDefinitionList);
403 $sourcePoolDefinitionList->saveDefinitions();
404
405 $this->updateLastQuestionSyncTimestampForTestId($cloneTestOBJ->getTestId(), time());
406 }
cloneToDbForTestId($testId)
saves the question set config for test with given id to the database
loadFromDb()
loads the question set config for current test from the database

References buildSourcePoolDefinitionList(), buildStagingPoolBuilder(), cloneToDbForTestId(), loadFromDb(), and updateLastQuestionSyncTimestampForTestId().

+ Here is the call graph for this function:

◆ cloneToDbForTestId()

ilTestRandomQuestionSetConfig::cloneToDbForTestId (   $testId)

saves the question set config for test with given id to the database

Parameters
$testId

Reimplemented from ilTestQuestionSetConfig.

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

197 {
198 $this->insertDbRecord($testId);
199 }
insertDbRecord($testId)
inserts a new record for the question set config for the current test into the database

References insertDbRecord().

Referenced by cloneQuestionSetRelatedData().

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

◆ dbRecordExists()

ilTestRandomQuestionSetConfig::dbRecordExists (   $testId)
private

checks wether a question set config for current test exists in the database

Parameters
$testId
Returns
boolean

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

221 {
222 $res = $this->db->queryF(
223 "SELECT COUNT(*) cnt FROM tst_rnd_quest_set_cfg WHERE test_fi = %s",
224 array('integer'), array($testId)
225 );
226
227 $row = $this->db->fetchAssoc($res);
228
229 return (bool)$row['cnt'];
230 }

References $res, and $row.

Referenced by doesQuestionSetRelatedDataExist(), and saveToDb().

+ Here is the caller graph for this function:

◆ deleteFromDb()

ilTestRandomQuestionSetConfig::deleteFromDb ( )

deletes the question set config for current test from the database

Reimplemented from ilTestQuestionSetConfig.

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

205 {
206 $this->db->manipulateF(
207 "DELETE FROM tst_rnd_quest_set_cfg WHERE test_fi = %s",
208 array('integer'), array($this->testOBJ->getTestId())
209 );
210 }

Referenced by removeQuestionSetRelatedData().

+ Here is the caller graph for this function:

◆ doesQuestionSetRelatedDataExist()

ilTestRandomQuestionSetConfig::doesQuestionSetRelatedDataExist ( )

checks wether question set config related data exists or not

Reimplemented from ilTestQuestionSetConfig.

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

340 {
341 if( $this->dbRecordExists($this->testOBJ->getTestId()) )
342 {
343 return true;
344 }
345
346 $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->testOBJ);
347
348 if( $sourcePoolDefinitionList->savedDefinitionsExist() )
349 {
350 return true;
351 }
352
353 return false;
354 }
dbRecordExists($testId)
checks wether a question set config for current test exists in the database

References buildSourcePoolDefinitionList(), and dbRecordExists().

+ Here is the call graph for this function:

◆ doesSelectableQuestionPoolsExist()

ilTestRandomQuestionSetConfig::doesSelectableQuestionPoolsExist ( )

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

460 {
461 return (bool)count($this->getSelectableQuestionPools());
462 }

References getSelectableQuestionPools().

+ Here is the call graph for this function:

◆ getDepenciesBrokenMessage()

ilTestRandomQuestionSetConfig::getDepenciesBrokenMessage ( ilLanguage  $lng)

Reimplemented from ilTestQuestionSetConfig.

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

472 {
473 return $lng->txt('tst_old_style_rnd_quest_set_broken');
474 }
global $lng
Definition: privfeed.php:40

References $lng.

◆ getHiddenTabsOnBrokenDepencies()

ilTestRandomQuestionSetConfig::getHiddenTabsOnBrokenDepencies ( )

Reimplemented from ilTestQuestionSetConfig.

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

508 {
509 return array(
510 'assQuestions', 'settings', 'manscoring', 'scoringadjust', 'statistics', 'history', 'export'
511 );
512 }

◆ getLastQuestionSyncTimestamp()

ilTestRandomQuestionSetConfig::getLastQuestionSyncTimestamp ( )
Returns
integer

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

References $lastQuestionSyncTimestamp.

Referenced by insertDbRecord(), and updateDbRecord().

+ Here is the caller graph for this function:

◆ getQuestionAmountConfigurationMode()

◆ getQuestionAmountPerTest()

ilTestRandomQuestionSetConfig::getQuestionAmountPerTest ( )
Returns
integer

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

References $questionAmountPerTest.

Referenced by insertDbRecord(), and updateDbRecord().

+ Here is the caller graph for this function:

◆ getSelectableQuestionPools()

ilTestRandomQuestionSetConfig::getSelectableQuestionPools ( )

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

453 {
454 return $this->testOBJ->getAvailableQuestionpools(
455 true, $this->arePoolsWithHomogeneousScoredQuestionsRequired(), false, true, true
456 );
457 }

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

319 {
320 $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->testOBJ);
321
322 return $sourcePoolDefinitionList->savedDefinitionsExist();
323 }

References buildSourcePoolDefinitionList().

Referenced by isQuestionSetConfigured().

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

◆ initFromArray()

ilTestRandomQuestionSetConfig::initFromArray (   $dataArray)

initialises the current object instance with values from matching properties within the passed array

Parameters
array$dataArray

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

139 {
140 foreach($dataArray as $field => $value)
141 {
142 switch($field)
143 {
144 case 'req_pools_homo_scored': $this->setPoolsWithHomogeneousScoredQuestionsRequired($value); break;
145 case 'quest_amount_cfg_mode': $this->setQuestionAmountConfigurationMode($value); break;
146 case 'quest_amount_per_test': $this->setQuestionAmountPerTest($value); break;
147 case 'quest_sync_timestamp': $this->setLastQuestionSyncTimestamp($value); break;
148 }
149 }
150 }
setQuestionAmountConfigurationMode($questionAmountConfigurationMode)
setLastQuestionSyncTimestamp($lastQuestionSyncTimestamp)
setPoolsWithHomogeneousScoredQuestionsRequired($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 (   $testId)
private

inserts a new record for the question set config for the current test into the database

Parameters
$testId

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

260 {
261 $this->db->insert('tst_rnd_quest_set_cfg', array(
262 'test_fi' => array('integer', $testId),
263 'req_pools_homo_scored' => array('integer', (int)$this->arePoolsWithHomogeneousScoredQuestionsRequired()),
264 'quest_amount_cfg_mode' => array('text', $this->getQuestionAmountConfigurationMode()),
265 'quest_amount_per_test' => array('integer', (int)$this->getQuestionAmountPerTest()),
266 'quest_sync_timestamp' => array('integer', (int)$this->getLastQuestionSyncTimestamp())
267 ));
268 }

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:

◆ isQuestionAmountConfigurationModePerPool()

ilTestRandomQuestionSetConfig::isQuestionAmountConfigurationModePerPool ( )

◆ isQuestionAmountConfigurationModePerTest()

ilTestRandomQuestionSetConfig::isQuestionAmountConfigurationModePerTest ( )

◆ isQuestionSetBuildable()

ilTestRandomQuestionSetConfig::isQuestionSetBuildable ( )

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

326 {
327 $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->testOBJ);
328 $sourcePoolDefinitionList->loadDefinitions();
329
330 require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetStagingPoolQuestionList.php';
331 $stagingPoolQuestionList = new ilTestRandomQuestionSetStagingPoolQuestionList($this->db, $this->pluginAdmin);
332
333 require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetBuilder.php';
334 $questionSetBuilder = ilTestRandomQuestionSetBuilder::getInstance($this->db, $this->testOBJ, $this, $sourcePoolDefinitionList, $stagingPoolQuestionList);
335
336 return $questionSetBuilder->checkBuildable();
337 }
static getInstance(ilDB $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)

References buildSourcePoolDefinitionList(), and ilTestRandomQuestionSetBuilder\getInstance().

Referenced by isQuestionSetConfigured().

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

◆ isQuestionSetConfigured()

ilTestRandomQuestionSetConfig::isQuestionSetConfigured ( )

Reimplemented from ilTestQuestionSetConfig.

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

273 {
274 if( !$this->isQuestionAmountConfigComplete() )
275 {
276 return false;
277 }
278
279 if( !$this->hasSourcePoolDefinitions() )
280 {
281 return false;
282 }
283
284 if( !$this->isQuestionSetBuildable() )
285 {
286 return false;
287 }
288
289 return true;
290 }

References hasSourcePoolDefinitions(), and isQuestionSetBuildable().

+ Here is the call graph for this function:

◆ isResultTaxonomyFilterSupported()

ilTestRandomQuestionSetConfig::isResultTaxonomyFilterSupported ( )

Reimplemented from ilTestQuestionSetConfig.

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

446 {
447 return true;
448 }

◆ isValidRequestOnBrokenQuestionSetDepencies()

ilTestRandomQuestionSetConfig::isValidRequestOnBrokenQuestionSetDepencies (   $nextClass,
  $cmd 
)

Reimplemented from ilTestQuestionSetConfig.

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

477 {
478 //vd($nextClass, $cmd);
479
480 switch( $nextClass )
481 {
482 case 'ilmdeditorgui':
483 case 'ilpermissiongui':
484
485 return true;
486
487 case 'ilobjtestgui':
488 case '':
489
490 $cmds = array(
491 'infoScreen', 'participants', 'npSetFilter', 'npResetFilter',
492 //'deleteAllUserResults', 'confirmDeleteAllUserResults',
493 //'deleteSingleUserResults', 'confirmDeleteSelectedUserData', 'cancelDeleteSelectedUserData'
494 );
495
496 if( in_array($cmd, $cmds) )
497 {
498 return true;
499 }
500
501 break;
502 }
503
504 return false;
505 }
$cmd
Definition: sahs_server.php:35

References $cmd.

◆ loadFromDb()

ilTestRandomQuestionSetConfig::loadFromDb ( )

loads the question set config for current test from the database

Returns
boolean

Reimplemented from ilTestQuestionSetConfig.

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

158 {
159 $res = $this->db->queryF(
160 "SELECT * FROM tst_rnd_quest_set_cfg WHERE test_fi = %s",
161 array('integer'), array($this->testOBJ->getTestId())
162 );
163
164 while( $row = $this->db->fetchAssoc($res) )
165 {
166 $this->initFromArray($row);
167
168 return true;
169 }
170
171 return false;
172 }
initFromArray($dataArray)
initialises the current object instance with values from matching properties within the passed array

References $res, $row, and initFromArray().

Referenced by cloneQuestionSetRelatedData().

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

◆ removeQuestionSetRelatedData()

ilTestRandomQuestionSetConfig::removeQuestionSetRelatedData ( )

removes all question set config related data

Reimplemented from ilTestQuestionSetConfig.

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

357 {
358 $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->testOBJ);
359 $sourcePoolDefinitionList->deleteDefinitions();
360
361 require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetStagingPoolBuilder.php';
363 $this->db, $this->testOBJ
364 );
365 $stagingPool->reset();
366
368
369 $this->deleteFromDb();
370 }
resetQuestionSetRelatedTestSettings()
resets all test settings that depends on a non changed question set config
deleteFromDb()
deletes the question set config for current test from the database

References buildSourcePoolDefinitionList(), deleteFromDb(), and resetQuestionSetRelatedTestSettings().

+ Here is the call graph for this function:

◆ resetQuestionSetRelatedTestSettings()

ilTestRandomQuestionSetConfig::resetQuestionSetRelatedTestSettings ( )

resets all test settings that depends on a non changed question set config

Reimplemented from ilTestQuestionSetConfig.

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

373 {
374 $this->testOBJ->setResultFilterTaxIds(array());
375 $this->testOBJ->saveToDb(true);
376 }

Referenced by removeQuestionSetRelatedData().

+ Here is the caller graph for this function:

◆ saveToDb()

ilTestRandomQuestionSetConfig::saveToDb ( )

saves the question set config for current test to the database

Returns
boolean

Reimplemented from ilTestQuestionSetConfig.

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

180 {
181 if( $this->dbRecordExists($this->testOBJ->getTestId()) )
182 {
183 $this->updateDbRecord($this->testOBJ->getTestId());
184 }
185 else
186 {
187 $this->insertDbRecord($this->testOBJ->getTestId());
188 }
189 }
updateDbRecord($testId)
updates the record in the database that corresponds to the question set config for the current test

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

+ Here is the call graph for this function:

◆ setLastQuestionSyncTimestamp()

ilTestRandomQuestionSetConfig::setLastQuestionSyncTimestamp (   $lastQuestionSyncTimestamp)
Parameters
integer$lastQuestionSyncTimestamp

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

118 {
119 $this->lastQuestionSyncTimestamp = $lastQuestionSyncTimestamp;
120 }

References $lastQuestionSyncTimestamp.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ setPoolsWithHomogeneousScoredQuestionsRequired()

ilTestRandomQuestionSetConfig::setPoolsWithHomogeneousScoredQuestionsRequired (   $requirePoolsWithHomogeneousScoredQuestions)
Parameters
boolean$requirePoolsWithHomogeneousScoredQuestions

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

54 {
55 $this->requirePoolsWithHomogeneousScoredQuestions = $requirePoolsWithHomogeneousScoredQuestions;
56 }

References $requirePoolsWithHomogeneousScoredQuestions.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ setQuestionAmountConfigurationMode()

ilTestRandomQuestionSetConfig::setQuestionAmountConfigurationMode (   $questionAmountConfigurationMode)
Parameters
string$questionAmountConfigurationMode

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

70 {
71 $this->questionAmountConfigurationMode = $questionAmountConfigurationMode;
72 }

References $questionAmountConfigurationMode.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ setQuestionAmountPerTest()

ilTestRandomQuestionSetConfig::setQuestionAmountPerTest (   $questionAmountPerTest)
Parameters
integer$questionAmountPerTest

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

102 {
103 $this->questionAmountPerTest = $questionAmountPerTest;
104 }

References $questionAmountPerTest.

Referenced by initFromArray().

+ Here is the caller graph for this function:

◆ updateDbRecord()

ilTestRandomQuestionSetConfig::updateDbRecord (   $testId)
private

updates the record in the database that corresponds to the question set config for the current test

Parameters
$testId

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

239 {
240 $this->db->update('tst_rnd_quest_set_cfg',
241 array(
242 'req_pools_homo_scored' => array('integer', (int)$this->arePoolsWithHomogeneousScoredQuestionsRequired()),
243 'quest_amount_cfg_mode' => array('text', $this->getQuestionAmountConfigurationMode()),
244 'quest_amount_per_test' => array('integer', (int)$this->getQuestionAmountPerTest()),
245 'quest_sync_timestamp' => array('integer', (int)$this->getLastQuestionSyncTimestamp())
246 ),
247 array(
248 'test_fi' => array('integer', $testId)
249 )
250 );
251 }

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 (   $testId,
  $timestamp 
)

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

434 {
435 $this->db->update('tst_rnd_quest_set_cfg',
436 array(
437 'quest_sync_timestamp' => array('integer', (int)$timestamp)
438 ),
439 array(
440 'test_fi' => array('integer', $testId)
441 )
442 );
443 }
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81

References $timestamp.

Referenced by cloneQuestionSetRelatedData().

+ Here is the caller graph for this function:

Field Documentation

◆ $lastQuestionSyncTimestamp

ilTestRandomQuestionSetConfig::$lastQuestionSyncTimestamp = null
private

◆ $questionAmountConfigurationMode

ilTestRandomQuestionSetConfig::$questionAmountConfigurationMode = null
private

◆ $questionAmountPerTest

ilTestRandomQuestionSetConfig::$questionAmountPerTest = null
private

◆ $requirePoolsWithHomogeneousScoredQuestions

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: