4require_once
'Modules/Test/classes/class.ilTestQuestionSetConfig.php';
75 return $this->sourceQuestionPoolTitle;
85 $this->sourceQuestionPoolTitle = $sourceQuestionPoolTitle;
168 foreach($dataArray as $field => $value)
189 $res = $this->db->queryF(
190 "SELECT * FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
191 array(
'integer'), array($this->testOBJ->getTestId())
194 while(
$row = $this->db->fetchAssoc(
$res) )
236 $aff = $this->db->manipulateF(
237 "DELETE FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
238 array(
'integer'), array($this->testOBJ->getTestId())
252 $res = $this->db->queryF(
253 "SELECT COUNT(*) cnt FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
254 array(
'integer'), array($testId)
259 return (
bool)
$row[
'cnt'];
270 $this->db->update(
'tst_dyn_quest_set_cfg',
280 'test_fi' => array(
'integer', $testId)
293 $this->db->insert(
'tst_dyn_quest_set_cfg', array(
294 'test_fi' => array(
'integer', $testId),
358 if( !count($poolRefs) )
360 $sourceQuestionPoolSummaryString = sprintf(
361 $lng->txt(
'tst_dyn_quest_set_src_qpl_summary_string_deleted'),
362 $this->getSourceQuestionPoolTitle()
365 return $sourceQuestionPoolSummaryString;
368 foreach($poolRefs as $refId)
370 if( !$this->tree->isDeleted($refId) )
372 $sourceQuestionPoolSummaryString = sprintf(
373 $lng->txt(
'tst_dynamic_question_set_source_questionpool_summary_string'),
374 $this->getSourceQuestionPoolTitle(),
375 $this->getQuestionPoolPathString($this->getSourceQuestionPoolId()),
376 $this->getSourceQuestionPoolNumQuestions()
379 return $sourceQuestionPoolSummaryString;
383 $sourceQuestionPoolSummaryString = sprintf(
384 $lng->txt(
'tst_dyn_quest_set_src_qpl_summary_string_trashed'),
385 $this->getSourceQuestionPoolTitle(),
386 $this->getSourceQuestionPoolNumQuestions()
389 return $sourceQuestionPoolSummaryString;
398 SELECT COUNT(*) num from qpl_questions
399 WHERE obj_fi = %s AND original_id IS NULL
402 $res = $this->db->queryF(
420 foreach( $poolRefs as $refId )
422 if( !$this->tree->isDeleted($refId) )
434 $lng->txt(
'tst_dyn_quest_set_pool_trashed'), $this->getSourceQuestionPoolTitle()
449 if( count($poolRefs) )
460 $lng->txt(
'tst_dyn_quest_set_pool_deleted'), $this->getSourceQuestionPoolTitle()
470 if( !$this->testOBJ->participantDataExist() )
477 case 'ilobjtestdynamicquestionsetconfiggui':
479 case 'ilmdeditorgui':
480 case 'ilpermissiongui':
488 'infoScreen',
'participants',
'npSetFilter',
'npResetFilter',
489 'deleteAllUserResults',
'confirmDeleteAllUserResults',
490 'deleteSingleUserResults',
'confirmDeleteSelectedUserData',
'cancelDeleteSelectedUserData'
493 if( in_array(
$cmd, $cmds) )
507 'settings',
'manscoring',
'scoringadjust',
'statistics',
'history',
'export'
515 if( $this->sourceQuestionPoolRefIds ===
null )
531 FROM tst_dyn_quest_set_cfg
533 ON tst_tests.test_id = tst_dyn_quest_set_cfg.test_fi
534 WHERE source_qpl_fi = %s
537 $res =
$db->queryF(
$query, array(
'integer'), array($poolObjId));
539 require_once
'Modules/Test/classes/class.ilDynamicTestQuestionChangeListener.php';
544 $questionChangeListener->addTestObjId(
$row[
'obj_fi'] );
547 return $questionChangeListener;
saveToDb()
saves the question set config for current test to the database
getSourceQuestionPoolId()
getter for source question pool id
insertDbRecord($testId)
inserts a new record for the question set config for the current test into the database
getDepenciesBrokenMessage(ilLanguage $lng)
cloneToDbForTestId($testId)
saves the question set config for test with given id to the database
setTaxonomyFilterEnabled($taxonomyFilterEnabled)
setter for taxonomie filter enabled
updateDbRecord($testId)
updates the record in the database that corresponds to the question set config for the current test
setAnswerStatusFilterEnabled($answerStatusFilterEnabled)
setSourceQuestionPoolId($sourceQuestionPoolId)
getter for source question pool id
$previousQuestionsListEnabled
setPreviousQuestionsListEnabled($previousQuestionsListEnabled)
setOrderingTaxonomyId($orderingTaxonomyId)
getter for ordering taxonomy id
resetQuestionSetRelatedTestSettings()
resets all test settings that depends on a non changed question set config
doesQuestionSetRelatedDataExist()
returns the fact wether a useable question set config exists or not
static getPoolQuestionChangeListener(ilDB $db, $poolObjId)
getHiddenTabsOnBrokenDepencies()
getSourceQuestionPoolRefIds()
cloneQuestionSetRelatedData($cloneTestOBJ)
removes all question set config related data for cloned/copied test
isPreviousQuestionsListEnabled()
getSourceQuestionPoolTitle()
getter for source question pool title
setSourceQuestionPoolTitle($sourceQuestionPoolTitle)
getter for source question pool title
isTaxonomyFilterEnabled()
isser for taxonomie filter enabled
isQuestionSetConfigured()
returns the fact wether a useable question set config exists or not
isAnswerStatusFilterEnabled()
isAnyQuestionFilterEnabled()
$answerStatusFilterEnabled
areDepenciesInVulnerableState()
getSourceQuestionPoolNumQuestions()
loadFromDb()
loads the question set config for current test from the database
getSourceQuestionPoolSummaryString(ilLanguage $lng)
initFromArray($dataArray)
initialises the current object instance with values from matching properties within the passed array
$sourceQuestionPoolRefIds
dbRecordExists($testId)
checks wether a question set config for current test exists in the database
getDepenciesInVulnerableStateMessage(ilLanguage $lng)
deleteFromDb()
deletes the question set config for current test from the database
isResultTaxonomyFilterSupported()
removeQuestionSetRelatedData()
removes all question set config related data (in this case it's only the config itself)
isValidRequestOnBrokenQuestionSetDepencies($nextClass, $cmd)
getOrderingTaxonomyId()
setter for ordering taxonomy id
static _getAllReferences($a_id)
get all reference ids of object