ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 getQuestionPoolPathString(int $pool_id): string
53 {
54 $ref_id = current(ilObject::_getAllReferences($pool_id));
55
56 $path = new ilPathGUI();
57 $path->enableTextOnly(true);
58 return $path->getPath(ROOT_FOLDER_ID, (int) $ref_id);
59 }
60
61 public function getFirstQuestionPoolRefIdByObjId(int $pool_obj_id): int
62 {
63 $refs_ids = ilObject::_getAllReferences($pool_obj_id);
64 $refs_id = current($refs_ids);
65
66 return (int) $refs_id;
67 }
68
69 abstract public function isResultTaxonomyFilterSupported(): bool;
70}
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.
$ref_id
Definition: ltiauth.php:66
$path
Definition: ltiservices.php:30
global $lng
Definition: privfeed.php:31