4require_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' 
foreach($mandatory_scripts as $file) $timestamp
Administration class for plugins.
static getInstance(ilDB $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
getQuestionAmountConfigurationMode()
const QUESTION_AMOUNT_CONFIG_MODE_PER_POOL
cloneToDbForTestId($testId)
saves the question set config for test with given id to the database
initFromArray($dataArray)
initialises the current object instance with values from matching properties within the passed array
updateLastQuestionSyncTimestampForTestId($testId, $timestamp)
dbRecordExists($testId)
checks wether a question set config for current test exists in the database
getSelectableQuestionPools()
removeQuestionSetRelatedData()
removes all question set config related data
isResultTaxonomyFilterSupported()
saveToDb()
saves the question set config for current test to the database
setQuestionAmountConfigurationMode($questionAmountConfigurationMode)
getDepenciesBrokenMessage(ilLanguage $lng)
setLastQuestionSyncTimestamp($lastQuestionSyncTimestamp)
isQuestionSetConfigured()
doesSelectableQuestionPoolsExist()
$lastQuestionSyncTimestamp
setQuestionAmountPerTest($questionAmountPerTest)
const QUESTION_AMOUNT_CONFIG_MODE_PER_TEST
isQuestionAmountConfigurationModePerPool()
getLastQuestionSyncTimestamp()
loadFromDb()
loads the question set config for current test from the database
doesQuestionSetRelatedDataExist()
checks wether question set config related data exists or not
arePoolsWithHomogeneousScoredQuestionsRequired()
resetQuestionSetRelatedTestSettings()
resets all test settings that depends on a non changed question set config
cloneQuestionSetRelatedData($cloneTestOBJ)
removes all question set config related data for cloned/copied test
deleteFromDb()
deletes the question set config for current test from the database
updateDbRecord($testId)
updates the record in the database that corresponds to the question set config for the current test
setPoolsWithHomogeneousScoredQuestionsRequired($requirePoolsWithHomogeneousScoredQuestions)
getQuestionAmountPerTest()
$requirePoolsWithHomogeneousScoredQuestions
isQuestionAmountConfigurationModePerTest()
getHiddenTabsOnBrokenDepencies()
hasSourcePoolDefinitions()
buildSourcePoolDefinitionList(ilObjTest $testOBJ)
insertDbRecord($testId)
inserts a new record for the question set config for the current test into the database
buildStagingPoolBuilder(ilObjTest $testOBJ)
__construct(ilTree $tree, ilDB $db, ilPluginAdmin $pluginAdmin, ilObjTest $testOBJ)
isValidRequestOnBrokenQuestionSetDepencies($nextClass, $cmd)
$questionAmountConfigurationMode
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...