ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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)

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

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

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  }
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:66
+ 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 260 of file class.ilTestRandomQuestionSetConfig.php.

References buildSourcePoolDefinitionList(), and dbRecordExists().

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  }
+ Here is the call graph for this function:

◆ doesSelectableQuestionPoolsExist()

ilTestRandomQuestionSetConfig::doesSelectableQuestionPoolsExist ( )

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

References getSelectableQuestionPools().

374  : bool
375  {
376  return (bool) count($this->getSelectableQuestionPools());
377  }
+ 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 379 of file class.ilTestRandomQuestionSetConfig.php.

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

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

References arePoolsWithHomogeneousScoredQuestionsRequired().

Referenced by doesSelectableQuestionPoolsExist().

363  : array
364  {
365  return $this->test_obj->getAvailableQuestionpools(
366  true,
368  false,
369  true,
370  true
371  );
372  }
+ 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  $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
234 
235  return $sourcePoolDefinitionList->savedDefinitionsExist();
236  }
+ 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 238 of file class.ilTestRandomQuestionSetConfig.php.

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

Referenced by isQuestionSetConfigured().

238  : bool
239  {
240  $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList($this->test_obj);
241  $sourcePoolDefinitionList->loadDefinitions();
242 
243  $stagingPoolQuestionList = new ilTestRandomQuestionSetStagingPoolQuestionList($this->db, $this->component_repository);
244 
245  $questionSetBuilder = ilTestRandomQuestionSetBuilder::getInstance(
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)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isQuestionSetConfigured()

◆ isResultTaxonomyFilterSupported()

ilTestRandomQuestionSetConfig::isResultTaxonomyFilterSupported ( )

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) {
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, initFromArray(), and null.

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:66
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ 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.

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

Referenced by cloneQuestionSetRelatedData().

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)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeQuestionSetRelatedData()

ilTestRandomQuestionSetConfig::removeQuestionSetRelatedData ( )

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

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

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

Referenced by cloneQuestionSetRelatedData().

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