83 return $this->sourceQuestionPoolTitle;
93 $this->sourceQuestionPoolTitle = $sourceQuestionPoolTitle;
160 foreach ($dataArray as $field => $value) {
178 $res = $this->db->queryF(
179 "SELECT * FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
181 array($this->testOBJ->getTestId())
184 while ($row = $this->db->fetchAssoc(
$res)) {
222 $aff = $this->db->manipulateF(
223 "DELETE FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
225 array($this->testOBJ->getTestId())
239 $res = $this->db->queryF(
240 "SELECT COUNT(*) cnt FROM tst_dyn_quest_set_cfg WHERE test_fi = %s",
245 $row = $this->db->fetchAssoc(
$res);
247 return (
bool) $row[
'cnt'];
259 'tst_dyn_quest_set_cfg',
268 'test_fi' => array(
'integer', $testId)
281 $this->db->insert(
'tst_dyn_quest_set_cfg', array(
282 'test_fi' => array(
'integer', $testId),
345 if (!count($poolRefs)) {
346 $sourceQuestionPoolSummaryString = sprintf(
347 $lng->txt(
'tst_dyn_quest_set_src_qpl_summary_string_deleted'),
348 $this->getSourceQuestionPoolTitle()
351 return $sourceQuestionPoolSummaryString;
354 foreach ($poolRefs as
$refId) {
355 if (!$this->tree->isDeleted(
$refId)) {
356 $sourceQuestionPoolSummaryString = sprintf(
357 $lng->txt(
'tst_dynamic_question_set_source_questionpool_summary_string'),
358 $this->getSourceQuestionPoolTitle(),
359 $this->getQuestionPoolPathString($this->getSourceQuestionPoolId()),
360 $this->getSourceQuestionPoolNumQuestions()
363 return $sourceQuestionPoolSummaryString;
367 $sourceQuestionPoolSummaryString = sprintf(
368 $lng->txt(
'tst_dyn_quest_set_src_qpl_summary_string_trashed'),
369 $this->getSourceQuestionPoolTitle(),
370 $this->getSourceQuestionPoolNumQuestions()
373 return $sourceQuestionPoolSummaryString;
382 SELECT COUNT(*) num from qpl_questions
383 WHERE obj_fi = %s AND original_id IS NULL
386 $res = $this->db->queryF(
392 $row = $this->db->fetchAssoc(
$res);
405 foreach ($poolRefs as
$refId) {
406 if (!$this->tree->isDeleted(
$refId)) {
417 $lng->txt(
'tst_dyn_quest_set_pool_trashed'),
418 $this->getSourceQuestionPoolTitle()
432 if (count($poolRefs)) {
442 $lng->txt(
'tst_dyn_quest_set_pool_deleted'),
443 $this->getSourceQuestionPoolTitle()
453 if (!$this->testOBJ->participantDataExist()) {
457 switch ($nextClass) {
458 case 'ilobjtestdynamicquestionsetconfiggui':
460 case 'ilobjectmetadatagui':
461 case 'ilpermissiongui':
469 'infoScreen',
'participants',
'npSetFilter',
'npResetFilter',
470 'deleteAllUserResults',
'confirmDeleteAllUserResults',
471 'deleteSingleUserResults',
'confirmDeleteSelectedUserData',
'cancelDeleteSelectedUserData'
474 if (in_array($cmd, $cmds)) {
487 'settings',
'manscoring',
'scoringadjust',
'statistics',
'history',
'export'
495 if ($this->sourceQuestionPoolRefIds ===
null) {
526 return "<a href=\"$href\" alt=\"$title\">$title</a>";
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $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
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(int $id)
get all reference ids for object ID