ILIAS  release_8 Revision v8.24
ilTestQuestionSetConfig Class Reference
+ Inheritance diagram for ilTestQuestionSetConfig:
+ Collaboration diagram for ilTestQuestionSetConfig:

Public Member Functions

 __construct (ilTree $tree, ilDBInterface $db, ilComponentRepository $component_repository, ilObjTest $testOBJ)
 
 loadFromDb ()
 loads the question set config for current test from the database More...
 
 saveToDb ()
 saves the question set config for current test to the database More...
 
 cloneToDbForTestId ($testId)
 saves the question set config for test with given id to the database More...
 
 deleteFromDb ()
 deletes the question set config for current test from the database More...
 
 areDepenciesInVulnerableState ()
 
 getDepenciesInVulnerableStateMessage (ilLanguage $lng)
 
 areDepenciesBroken ()
 
 getDepenciesBrokenMessage (ilLanguage $lng)
 
 isValidRequestOnBrokenQuestionSetDepencies ($nextClass, $cmd)
 
 getHiddenTabsOnBrokenDepencies ()
 
 isQuestionSetConfigured ()
 
 doesQuestionSetRelatedDataExist ()
 checks wether question set config related data exists or not More...
 
 removeQuestionSetRelatedData ()
 removes all question set config related data More...
 
 resetQuestionSetRelatedTestSettings ()
 resets all test settings that depends on a non changed question set config More...
 
 cloneQuestionSetRelatedData (ilObjTest $cloneTestOBJ)
 removes all question set config related data for cloned/copied test More...
 
 getQuestionPoolPathString ($poolId)
 
 getFirstQuestionPoolRefIdByObjId (int $pool_obj_id)
 
 isResultTaxonomyFilterSupported ()
 

Protected Attributes

ilTree $tree
 
ilDBInterface $db
 
ilComponentRepository $component_repository
 
ilObjTest $testOBJ
 

Detailed Description

Definition at line 24 of file class.ilTestQuestionSetConfig.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestQuestionSetConfig::__construct ( ilTree  $tree,
ilDBInterface  $db,
ilComponentRepository  $component_repository,
ilObjTest  $testOBJ 
)

Definition at line 31 of file class.ilTestQuestionSetConfig.php.

36 {
37 $this->tree = $tree;
38 $this->db = $db;
39 $this->component_repository = $component_repository;
40 $this->testOBJ = $testOBJ;
41 }
ilComponentRepository $component_repository

References $component_repository, $db, $testOBJ, and $tree.

Member Function Documentation

◆ areDepenciesBroken()

ilTestQuestionSetConfig::areDepenciesBroken ( )

Reimplemented in ilObjTestDynamicQuestionSetConfig, and ilTestRandomQuestionSetConfig.

Definition at line 75 of file class.ilTestQuestionSetConfig.php.

75 : bool
76 {
77 return false;
78 }

◆ areDepenciesInVulnerableState()

ilTestQuestionSetConfig::areDepenciesInVulnerableState ( )

Reimplemented in ilObjTestDynamicQuestionSetConfig.

Definition at line 65 of file class.ilTestQuestionSetConfig.php.

65 : bool
66 {
67 return false;
68 }

◆ cloneQuestionSetRelatedData()

ilTestQuestionSetConfig::cloneQuestionSetRelatedData ( ilObjTest  $cloneTestOBJ)
abstract

removes all question set config related data for cloned/copied test

Parameters
ilObjTest$cloneTestOBJ

Reimplemented in ilTestFixedQuestionSetConfig, ilObjTestDynamicQuestionSetConfig, and ilTestRandomQuestionSetConfig.

◆ cloneToDbForTestId()

ilTestQuestionSetConfig::cloneToDbForTestId (   $testId)
abstract

saves the question set config for test with given id to the database

Parameters
$testId

Reimplemented in ilObjTestDynamicQuestionSetConfig, ilTestFixedQuestionSetConfig, and ilTestRandomQuestionSetConfig.

◆ deleteFromDb()

ilTestQuestionSetConfig::deleteFromDb ( )
abstract

deletes the question set config for current test from the database

Reimplemented in ilObjTestDynamicQuestionSetConfig, ilTestFixedQuestionSetConfig, and ilTestRandomQuestionSetConfig.

◆ doesQuestionSetRelatedDataExist()

ilTestQuestionSetConfig::doesQuestionSetRelatedDataExist ( )
abstract

checks wether question set config related data exists or not

Reimplemented in ilObjTestDynamicQuestionSetConfig, ilTestFixedQuestionSetConfig, and ilTestRandomQuestionSetConfig.

◆ getDepenciesBrokenMessage()

ilTestQuestionSetConfig::getDepenciesBrokenMessage ( ilLanguage  $lng)

Reimplemented in ilObjTestDynamicQuestionSetConfig, and ilTestRandomQuestionSetConfig.

Definition at line 80 of file class.ilTestQuestionSetConfig.php.

80 : string
81 {
82 return '';
83 }

◆ getDepenciesInVulnerableStateMessage()

ilTestQuestionSetConfig::getDepenciesInVulnerableStateMessage ( ilLanguage  $lng)

Reimplemented in ilObjTestDynamicQuestionSetConfig.

Definition at line 70 of file class.ilTestQuestionSetConfig.php.

70 : string
71 {
72 return '';
73 }

◆ getFirstQuestionPoolRefIdByObjId()

ilTestQuestionSetConfig::getFirstQuestionPoolRefIdByObjId ( int  $pool_obj_id)

Definition at line 132 of file class.ilTestQuestionSetConfig.php.

132 : int
133 {
134 $refs_ids = ilObject::_getAllReferences($pool_obj_id);
135 $refs_id = current($refs_ids);
136
137 return (int) $refs_id;
138 }
static _getAllReferences(int $id)
get all reference ids for object ID

References ilObject\_getAllReferences().

+ Here is the call graph for this function:

◆ getHiddenTabsOnBrokenDepencies()

ilTestQuestionSetConfig::getHiddenTabsOnBrokenDepencies ( )

Reimplemented in ilObjTestDynamicQuestionSetConfig, and ilTestRandomQuestionSetConfig.

Definition at line 90 of file class.ilTestQuestionSetConfig.php.

90 : array
91 {
92 return array();
93 }

◆ getQuestionPoolPathString()

ilTestQuestionSetConfig::getQuestionPoolPathString (   $poolId)
Parameters
integer$poolId
Returns
string

Definition at line 123 of file class.ilTestQuestionSetConfig.php.

123 : 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 }
Creates a path for a start and endnode.
const ROOT_FOLDER_ID
Definition: constants.php:32
$ref_id
Definition: ltiauth.php:67
$path
Definition: ltiservices.php:32

References $path, $ref_id, ilObject\_getAllReferences(), and ROOT_FOLDER_ID.

+ Here is the call graph for this function:

◆ isQuestionSetConfigured()

ilTestQuestionSetConfig::isQuestionSetConfigured ( )
abstract

Reimplemented in ilObjTestDynamicQuestionSetConfig, ilTestFixedQuestionSetConfig, and ilTestRandomQuestionSetConfig.

Referenced by ilObjTest\isComplete().

+ Here is the caller graph for this function:

◆ isResultTaxonomyFilterSupported()

ilTestQuestionSetConfig::isResultTaxonomyFilterSupported ( )
abstract

◆ isValidRequestOnBrokenQuestionSetDepencies()

ilTestQuestionSetConfig::isValidRequestOnBrokenQuestionSetDepencies (   $nextClass,
  $cmd 
)

Reimplemented in ilObjTestDynamicQuestionSetConfig, and ilTestRandomQuestionSetConfig.

Definition at line 85 of file class.ilTestQuestionSetConfig.php.

85 : bool
86 {
87 return true;
88 }

◆ loadFromDb()

ilTestQuestionSetConfig::loadFromDb ( )
abstract

loads the question set config for current test from the database

Reimplemented in ilObjTestDynamicQuestionSetConfig, ilTestFixedQuestionSetConfig, and ilTestRandomQuestionSetConfig.

◆ removeQuestionSetRelatedData()

ilTestQuestionSetConfig::removeQuestionSetRelatedData ( )
abstract

removes all question set config related data

Reimplemented in ilObjTestDynamicQuestionSetConfig, ilTestFixedQuestionSetConfig, and ilTestRandomQuestionSetConfig.

◆ resetQuestionSetRelatedTestSettings()

ilTestQuestionSetConfig::resetQuestionSetRelatedTestSettings ( )
abstract

resets all test settings that depends on a non changed question set config

Reimplemented in ilObjTestDynamicQuestionSetConfig, ilTestFixedQuestionSetConfig, and ilTestRandomQuestionSetConfig.

◆ saveToDb()

ilTestQuestionSetConfig::saveToDb ( )
abstract

saves the question set config for current test to the database

Reimplemented in ilObjTestDynamicQuestionSetConfig, ilTestFixedQuestionSetConfig, and ilTestRandomQuestionSetConfig.

Field Documentation

◆ $component_repository

ilComponentRepository ilTestQuestionSetConfig::$component_repository
protected

Definition at line 28 of file class.ilTestQuestionSetConfig.php.

Referenced by __construct().

◆ $db

ilDBInterface ilTestQuestionSetConfig::$db
protected

Definition at line 27 of file class.ilTestQuestionSetConfig.php.

Referenced by __construct().

◆ $testOBJ

◆ $tree

ilTree ilTestQuestionSetConfig::$tree
protected

Definition at line 26 of file class.ilTestQuestionSetConfig.php.

Referenced by __construct().


The documentation for this class was generated from the following file: