ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
class.ilTestQuestionSetConfig.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
23
30{
31 public function __construct(
32 protected readonly ilTree $tree,
33 protected readonly ilDBInterface $db,
34 protected readonly ilLanguage $lng,
35 protected readonly TestLogger $logger,
36 protected readonly ilComponentRepository $component_repository,
37 protected readonly ilObjTest $test_obj,
38 protected readonly GeneralQuestionPropertiesRepository $questionrepository
39 ) {
40 }
41
42 abstract public function loadFromDb(): void;
43 abstract public function saveToDb(): void;
44 abstract public function cloneToDbForTestId(int $testId): void;
45 abstract public function deleteFromDb(): void;
46
47 abstract public function isQuestionSetConfigured(): bool;
48 abstract public function doesQuestionSetRelatedDataExist(): bool;
49 abstract public function removeQuestionSetRelatedData(): void;
50 abstract public function cloneQuestionSetRelatedData(ilObjTest $clone_test_obj): void;
51
52 public function getTestObject(): ilObjTest
53 {
54 return $this->test_obj;
55 }
56
57 public function getQuestionPoolPathString(int $pool_id): string
58 {
59 $ref_id = current(ilObject::_getAllReferences($pool_id));
60
61 $path = new ilPathGUI();
62 $path->enableTextOnly(true);
63 return $path->getPath(ROOT_FOLDER_ID, (int) $ref_id);
64 }
65
66 public function getFirstQuestionPoolRefIdByObjId(int $pool_obj_id): int
67 {
68 $refs_ids = ilObject::_getAllReferences($pool_obj_id);
69 $refs_id = current($refs_ids);
70
71 return (int) $refs_id;
72 }
73
74 abstract public function isResultTaxonomyFilterSupported(): bool;
75}
language handling
static _getAllReferences(int $id)
get all reference ids for object ID
getFirstQuestionPoolRefIdByObjId(int $pool_obj_id)
cloneToDbForTestId(int $testId)
__construct(protected readonly ilTree $tree, protected readonly ilDBInterface $db, protected readonly ilLanguage $lng, protected readonly TestLogger $logger, protected readonly ilComponentRepository $component_repository, protected readonly ilObjTest $test_obj, protected readonly GeneralQuestionPropertiesRepository $questionrepository)
cloneQuestionSetRelatedData(ilObjTest $clone_test_obj)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
const ROOT_FOLDER_ID
Definition: constants.php:32
Readable part of repository interface to ilComponentDataDB.
Interface ilDBInterface.
global $lng
Definition: privfeed.php:26