4require_once
'Modules/Test/classes/class.ilTestQuestionSetConfig.php';
70 return $this->sourceQuestionPoolTitle;
80 $this->sourceQuestionPoolTitle = $sourceQuestionPoolTitle;
147 foreach ($dataArray as $field => $value) {
165 $res = $this->db->queryF(
166 "SELECT * FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
168 array($this->testOBJ->getTestId())
171 while ($row = $this->db->fetchAssoc(
$res)) {
209 $aff = $this->db->manipulateF(
210 "DELETE FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
212 array($this->testOBJ->getTestId())
226 $res = $this->db->queryF(
227 "SELECT COUNT(*) cnt FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
232 $row = $this->db->fetchAssoc(
$res);
234 return (
bool) $row[
'cnt'];
246 'tst_dyn_quest_set_cfg',
255 'test_fi' => array(
'integer', $testId)
268 $this->db->insert(
'tst_dyn_quest_set_cfg', array(
269 'test_fi' => array(
'integer', $testId),
332 if (!count($poolRefs)) {
333 $sourceQuestionPoolSummaryString = sprintf(
334 $lng->txt(
'tst_dyn_quest_set_src_qpl_summary_string_deleted'),
335 $this->getSourceQuestionPoolTitle()
338 return $sourceQuestionPoolSummaryString;
341 foreach ($poolRefs as
$refId) {
342 if (!$this->tree->isDeleted(
$refId)) {
343 $sourceQuestionPoolSummaryString = sprintf(
344 $lng->txt(
'tst_dynamic_question_set_source_questionpool_summary_string'),
345 $this->getSourceQuestionPoolTitle(),
346 $this->getQuestionPoolPathString($this->getSourceQuestionPoolId()),
347 $this->getSourceQuestionPoolNumQuestions()
350 return $sourceQuestionPoolSummaryString;
354 $sourceQuestionPoolSummaryString = sprintf(
355 $lng->txt(
'tst_dyn_quest_set_src_qpl_summary_string_trashed'),
356 $this->getSourceQuestionPoolTitle(),
357 $this->getSourceQuestionPoolNumQuestions()
360 return $sourceQuestionPoolSummaryString;
369 SELECT COUNT(*) num from qpl_questions
370 WHERE obj_fi = %s AND original_id IS NULL
373 $res = $this->db->queryF(
379 $row = $this->db->fetchAssoc(
$res);
392 foreach ($poolRefs as
$refId) {
393 if (!$this->tree->isDeleted(
$refId)) {
404 $lng->txt(
'tst_dyn_quest_set_pool_trashed'),
405 $this->getSourceQuestionPoolTitle()
419 if (count($poolRefs)) {
429 $lng->txt(
'tst_dyn_quest_set_pool_deleted'),
430 $this->getSourceQuestionPoolTitle()
440 if (!$this->testOBJ->participantDataExist()) {
444 switch ($nextClass) {
445 case 'ilobjtestdynamicquestionsetconfiggui':
447 case 'ilobjectmetadatagui':
448 case 'ilpermissiongui':
456 'infoScreen',
'participants',
'npSetFilter',
'npResetFilter',
457 'deleteAllUserResults',
'confirmDeleteAllUserResults',
458 'deleteSingleUserResults',
'confirmDeleteSelectedUserData',
'cancelDeleteSelectedUserData'
461 if (in_array($cmd, $cmds)) {
474 'settings',
'manscoring',
'scoringadjust',
'statistics',
'history',
'export'
482 if ($this->sourceQuestionPoolRefIds ===
null) {
497 FROM tst_dyn_quest_set_cfg
499 ON tst_tests.test_id = tst_dyn_quest_set_cfg.test_fi
500 WHERE source_qpl_fi = %s
503 $res =
$db->queryF(
$query, array(
'integer'), array($poolObjId));
505 require_once
'Modules/Test/classes/class.ilDynamicTestQuestionChangeListener.php';
508 while ($row =
$db->fetchAssoc(
$res)) {
509 $questionChangeListener->addTestObjId($row[
'obj_fi']);
512 return $questionChangeListener;
539 return "<a href=\"$href\" alt=\"$title\">$title</a>";
An exception for terminatinating execution or to throw for unit testing.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
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
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
getHiddenTabsOnBrokenDepencies()
getSourceQuestionPoolRefIds()
getSourceQuestionPoolTitle()
getter for source question pool title
setSourceQuestionPoolTitle($sourceQuestionPoolTitle)
getter for source question pool title
static getPoolQuestionChangeListener(ilDBInterface $db, $poolObjId)
isTaxonomyFilterEnabled()
isser for taxonomie filter enabled
getSourceQuestionPoolLink()
isQuestionSetConfigured()
returns the fact wether a useable question set config exists or not
isAnswerStatusFilterEnabled()
isAnyQuestionFilterEnabled()
$answerStatusFilterEnabled
areDepenciesInVulnerableState()
getSourceQuestionPoolNumQuestions()
cloneQuestionSetRelatedData(ilObjTest $cloneTestOBJ)
removes all question set config related data for cloned/copied test
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
getTestId()
Gets the database id of the additional test data.
static _getAllReferences($a_id)
get all reference ids of object
foreach($_POST as $key=> $value) $res