4 require_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),
353 if( !count($poolRefs) )
355 $sourceQuestionPoolSummaryString = sprintf(
356 $lng->
txt(
'tst_dyn_quest_set_src_qpl_summary_string_deleted'),
360 return $sourceQuestionPoolSummaryString;
363 foreach($poolRefs as $refId)
365 if( !$this->tree->isDeleted($refId) )
367 $sourceQuestionPoolSummaryString = sprintf(
368 $lng->
txt(
'tst_dynamic_question_set_source_questionpool_summary_string'),
374 return $sourceQuestionPoolSummaryString;
378 $sourceQuestionPoolSummaryString = sprintf(
379 $lng->
txt(
'tst_dyn_quest_set_src_qpl_summary_string_trashed'),
384 return $sourceQuestionPoolSummaryString;
393 SELECT COUNT(*) num from qpl_questions 394 WHERE obj_fi = %s AND original_id IS NULL 397 $res = $this->db->queryF(
415 foreach( $poolRefs as $refId )
417 if( !$this->tree->isDeleted($refId) )
444 if( count($poolRefs) )
465 if( !$this->testOBJ->participantDataExist() )
472 case 'ilobjtestdynamicquestionsetconfiggui':
474 case 'ilmdeditorgui':
475 case 'ilpermissiongui':
483 'infoScreen',
'participants',
'npSetFilter',
'npResetFilter',
484 'deleteAllUserResults',
'confirmDeleteAllUserResults',
485 'deleteSingleUserResults',
'confirmDeleteSelectedUserData',
'cancelDeleteSelectedUserData' 488 if( in_array(
$cmd, $cmds) )
502 'settings',
'manscoring',
'scoringadjust',
'statistics',
'history',
'export' 510 if( $this->sourceQuestionPoolRefIds === null )
526 FROM tst_dyn_quest_set_cfg 528 ON tst_tests.test_id = tst_dyn_quest_set_cfg.test_fi 529 WHERE source_qpl_fi = %s 534 require_once
'Modules/Test/classes/class.ilDynamicTestQuestionChangeListener.php';
539 $questionChangeListener->addTestObjId(
$row[
'obj_fi'] );
542 return $questionChangeListener;
saveToDb()
saves the question set config for current test to the database
static getPoolQuestionChangeListener(ilDB $db, $poolObjId)
isPreviousQuestionsListEnabled()
isValidRequestOnBrokenQuestionSetDepencies($nextClass, $cmd)
initFromArray($dataArray)
initialises the current object instance with values from matching properties within the passed array ...
loadFromDb()
loads the question set config for current test from the database
getHiddenTabsOnBrokenDepencies()
isTaxonomyFilterEnabled()
isser for taxonomie filter enabled
setPreviousQuestionsListEnabled($previousQuestionsListEnabled)
setTaxonomyFilterEnabled($taxonomyFilterEnabled)
setter for taxonomie filter enabled
getQuestionPoolPathString($poolId)
setOrderingTaxonomyId($orderingTaxonomyId)
getter for ordering taxonomy id
static _getAllReferences($a_id)
get all reference ids of object
deleteFromDb()
deletes the question set config for current test from the database
setAnswerStatusFilterEnabled($answerStatusFilterEnabled)
fetchAssoc($a_set)
Fetch row as associative array from result set.
$previousQuestionsListEnabled
getDepenciesInVulnerableStateMessage(ilLanguage $lng)
isQuestionSetConfigured()
returns the fact wether a useable question set config exists or not
getSourceQuestionPoolTitle()
getter for source question pool title
$sourceQuestionPoolRefIds
$answerStatusFilterEnabled
setSourceQuestionPoolId($sourceQuestionPoolId)
getter for source question pool id
getSourceQuestionPoolRefIds()
updateDbRecord($testId)
updates the record in the database that corresponds to the question set config for the current test ...
queryF($a_query, $a_types, $a_values)
Formatted query (for SELECTS).
isAnswerStatusFilterEnabled()
getSourceQuestionPoolNumQuestions()
cloneQuestionSetRelatedData($cloneTestOBJ)
removes all question set config related data for cloned/copied test
insertDbRecord($testId)
inserts a new record for the question set config for the current test into the database ...
areDepenciesInVulnerableState()
txt($a_topic, $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getOrderingTaxonomyId()
setter for ordering taxonomy id
getSourceQuestionPoolSummaryString(ilLanguage $lng)
setSourceQuestionPoolTitle($sourceQuestionPoolTitle)
getter for source question pool title
getSourceQuestionPoolId()
getter for source question pool id
getDepenciesBrokenMessage(ilLanguage $lng)
dbRecordExists($testId)
checks wether a question set config for current test exists in the database
removeQuestionSetRelatedData()
removes all question set config related data (in this case it's only the config itself) ...
doesQuestionSetRelatedDataExist()
returns the fact wether a useable question set config exists or not
cloneToDbForTestId($testId)
saves the question set config for test with given id to the database