4 require_once
'Modules/Test/classes/class.ilTestQuestionSetConfig.php';
140 foreach($dataArray as $field => $value)
159 $res = $this->db->queryF(
160 "SELECT * FROM tst_rnd_quest_set_cfg WHERE test_fi = %s",
161 array(
'integer'), array($this->testOBJ->getTestId())
164 while(
$row = $this->db->fetchAssoc(
$res) )
206 $this->db->manipulateF(
207 "DELETE FROM tst_rnd_quest_set_cfg WHERE test_fi = %s",
208 array(
'integer'), array($this->testOBJ->getTestId())
222 $res = $this->db->queryF(
223 "SELECT COUNT(*) cnt FROM tst_rnd_quest_set_cfg WHERE test_fi = %s",
224 array(
'integer'), array($testId)
229 return (
bool)
$row[
'cnt'];
240 $this->db->update(
'tst_rnd_quest_set_cfg',
248 'test_fi' => array(
'integer', $testId)
261 $this->db->insert(
'tst_rnd_quest_set_cfg', array(
262 'test_fi' => array(
'integer', $testId),
274 if( !$this->isQuestionAmountConfigComplete() )
292 public function isQuestionAmountConfigComplete()
298 $sourcePoolDefinitionList->loadDefinitions();
300 foreach($sourcePoolDefinitionList as $definition)
304 if( $definition->getQuestionAmount() < 1 )
322 return $sourcePoolDefinitionList->savedDefinitionsExist();
328 $sourcePoolDefinitionList->loadDefinitions();
330 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetStagingPoolQuestionList.php';
333 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilder.php';
336 return $questionSetBuilder->checkBuildable();
348 if( $sourcePoolDefinitionList->savedDefinitionsExist() )
359 $sourcePoolDefinitionList->deleteDefinitions();
361 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetStagingPoolBuilder.php';
363 $this->db, $this->testOBJ
365 $stagingPool->reset();
374 $this->testOBJ->setResultFilterTaxIds(array());
375 $this->testOBJ->saveToDb(
true);
393 $sourcePoolDefinitionList->loadDefinitions();
394 $sourcePoolDefinitionList->cloneDefinitionsForTestId($cloneTestOBJ->getTestId());
401 $sourcePoolDefinitionList->loadDefinitions();
402 $stagingPool->rebuild($sourcePoolDefinitionList);
403 $sourcePoolDefinitionList->saveDefinitions();
410 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php';
415 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionList.php';
417 $this->db, $testOBJ, $sourcePoolDefinitionFactory
420 return $sourcePoolDefinitionList;
425 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetStagingPoolBuilder.php';
435 $this->db->update(
'tst_rnd_quest_set_cfg',
437 'quest_sync_timestamp' => array(
'integer', (
int)
$timestamp)
440 'test_fi' => array(
'integer', $testId)
454 return $this->testOBJ->getAvailableQuestionpools(
468 return (
bool)$this->testOBJ->isTestFinalBroken();
473 return $lng->
txt(
'tst_old_style_rnd_quest_set_broken');
482 case 'ilmdeditorgui':
483 case 'ilpermissiongui':
491 'infoScreen',
'participants',
'npSetFilter',
'npResetFilter',
496 if( in_array(
$cmd, $cmds) )
510 'assQuestions',
'settings',
'manscoring',
'scoringadjust',
'statistics',
'history',
'export'