ILIAS  release_8 Revision v8.24
class.ilTestQuestionSetConfig.php
Go to the documentation of this file.
1<?php
2
25{
26 protected ilTree $tree;
27 protected ilDBInterface $db;
30
31 public function __construct(
36 ) {
37 $this->tree = $tree;
38 $this->db = $db;
39 $this->component_repository = $component_repository;
40 $this->testOBJ = $testOBJ;
41 }
42
46 abstract public function loadFromDb();
47
51 abstract public function saveToDb();
52
58 abstract public function cloneToDbForTestId($testId);
59
63 abstract public function deleteFromDb();
64
65 public function areDepenciesInVulnerableState(): bool
66 {
67 return false;
68 }
69
71 {
72 return '';
73 }
74
75 public function areDepenciesBroken(): bool
76 {
77 return false;
78 }
79
80 public function getDepenciesBrokenMessage(ilLanguage $lng): string
81 {
82 return '';
83 }
84
85 public function isValidRequestOnBrokenQuestionSetDepencies($nextClass, $cmd): bool
86 {
87 return true;
88 }
89
90 public function getHiddenTabsOnBrokenDepencies(): array
91 {
92 return array();
93 }
94
95 abstract public function isQuestionSetConfigured();
96
100 abstract public function doesQuestionSetRelatedDataExist();
101
105 abstract public function removeQuestionSetRelatedData(): void;
106
110 abstract public function resetQuestionSetRelatedTestSettings();
111
117 abstract public function cloneQuestionSetRelatedData(ilObjTest $cloneTestOBJ);
118
123 public function getQuestionPoolPathString($poolId): string
124 {
125 $ref_id = current(ilObject::_getAllReferences($poolId));
126
127 $path = new ilPathGUI();
128 $path->enableTextOnly(true);
129 return $path->getPath(ROOT_FOLDER_ID, (int) $ref_id);
130 }
131
132 public function getFirstQuestionPoolRefIdByObjId(int $pool_obj_id): int
133 {
134 $refs_ids = ilObject::_getAllReferences($pool_obj_id);
135 $refs_id = current($refs_ids);
136
137 return (int) $refs_id;
138 }
139
140 abstract public function isResultTaxonomyFilterSupported();
141}
language handling
static _getAllReferences(int $id)
get all reference ids for object ID
Creates a path for a start and endnode.
isValidRequestOnBrokenQuestionSetDepencies($nextClass, $cmd)
ilComponentRepository $component_repository
loadFromDb()
loads the question set config for current test from the database
removeQuestionSetRelatedData()
removes all question set config related data
resetQuestionSetRelatedTestSettings()
resets all test settings that depends on a non changed question set config
deleteFromDb()
deletes the question set config for current test from the database
saveToDb()
saves the question set config for current test to the database
cloneQuestionSetRelatedData(ilObjTest $cloneTestOBJ)
removes all question set config related data for cloned/copied test
getDepenciesInVulnerableStateMessage(ilLanguage $lng)
getFirstQuestionPoolRefIdByObjId(int $pool_obj_id)
doesQuestionSetRelatedDataExist()
checks wether question set config related data exists or not
cloneToDbForTestId($testId)
saves the question set config for test with given id to the database
__construct(ilTree $tree, ilDBInterface $db, ilComponentRepository $component_repository, ilObjTest $testOBJ)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const ROOT_FOLDER_ID
Definition: constants.php:32
Readable part of repository interface to ilComponentDataDB.
Interface ilDBInterface.
$ref_id
Definition: ltiauth.php:67
$path
Definition: ltiservices.php:32
$lng