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
366 $stagingPool->reset();
386 $sourcePoolDefinitionList->loadDefinitions();
387 $sourcePoolDefinitionList->cloneDefinitionsForTestId($cloneTestOBJ->getTestId());
394 $sourcePoolDefinitionList->loadDefinitions();
395 $stagingPool->rebuild($sourcePoolDefinitionList);
396 $sourcePoolDefinitionList->saveDefinitions();
403 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php';
408 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionList.php';
410 $this->db, $testOBJ, $sourcePoolDefinitionFactory
413 return $sourcePoolDefinitionList;
418 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetStagingPoolBuilder.php';
428 $this->db->update(
'tst_rnd_quest_set_cfg',
430 'quest_sync_timestamp' => array(
'integer', (
int)
$timestamp)
433 'test_fi' => array(
'integer', $testId)
442 return $this->testOBJ->getAvailableQuestionpools(
456 return (
bool)$this->testOBJ->isTestFinalBroken();
461 return $lng->
txt(
'tst_old_style_rnd_quest_set_broken');
470 case 'ilmdeditorgui':
471 case 'ilpermissiongui':
479 'infoScreen',
'participants',
'npSetFilter',
'npResetFilter',
484 if( in_array(
$cmd, $cmds) )
498 'assQuestions',
'settings',
'manscoring',
'scoringadjust',
'statistics',
'history',
'export'