ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTestRandomQuestionsQuantitiesDistribution Class Reference
+ Collaboration diagram for ilTestRandomQuestionsQuantitiesDistribution:

Public Member Functions

 __construct (private ilDBInterface $db, private ilTestRandomSourcePoolDefinitionQuestionCollectionProvider $question_collection_provider, private ilTestRandomQuestionSetSourcePoolDefinitionList $source_pool_definition_list)
 
 initialise ()
 
 reset ()
 
 calculateQuantities (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 

Protected Member Functions

 buildSourcePoolDefinitionListInstance ()
 
 buildRandomQuestionCollectionInstance ()
 
 buildQuestionCollectionSubsetApplicationInstance ()
 
 buildQuestionCollectionSubsetApplicationListInstance ()
 
 resetQuestRelatedSrcPoolDefRegister ()
 
 registerQuestRelatedSrcPoolDef (int $question_id, ilTestRandomQuestionSetSourcePoolDefinition $definition)
 
 getQuestRelatedSrcPoolDefinitionList ($questionId)
 
 resetSrcPoolDefRelatedQuestRegister ()
 
 registerSrcPoolDefRelatedQuest (int $definition_id, ilTestRandomQuestionSetQuestion $random_set_question)
 
 getSrcPoolDefRelatedQuestionCollection (int $definition_id)
 
 initialiseRegisters ()
 
 resetRegisters ()
 
 getSrcPoolDefQuestionCombinationCollection ()
 
 getExclusiveQuestionCollection (int $definition_id)
 
 getSharedQuestionCollection (int $definition_id)
 
 getIntersectionQuestionCollection (int $this_definition_id, int $that_definition_id)
 
 getIntersectionQstCollectionByDefinitionMap (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 
 getIntersectionQuestionCollectionSubsetApplicationList (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 
 getIntersectionSharingDefinitionList (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 
 isQuestionUsedByMultipleSrcPoolDefinitions (ilTestRandomQuestionSetQuestion $question)
 
 getSrcPoolDefRelatedQuestionAmount (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 
 getExclusiveQuestionAmount (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 
 getAvailableSharedQuestionAmount (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 
 getRequiredSharedQuestionAmount (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 
 requiresSharedQuestions (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 

Protected Attributes

array $quest_related_src_pool_def_register = []
 
array $src_pool_def_related_quest_register = []
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTestRandomQuestionsQuantitiesDistribution::__construct ( private ilDBInterface  $db,
private ilTestRandomSourcePoolDefinitionQuestionCollectionProvider  $question_collection_provider,
private ilTestRandomQuestionSetSourcePoolDefinitionList  $source_pool_definition_list 
)

Definition at line 41 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

45  {
46  }

Member Function Documentation

◆ buildQuestionCollectionSubsetApplicationInstance()

ilTestRandomQuestionsQuantitiesDistribution::buildQuestionCollectionSubsetApplicationInstance ( )
protected

◆ buildQuestionCollectionSubsetApplicationListInstance()

ilTestRandomQuestionsQuantitiesDistribution::buildQuestionCollectionSubsetApplicationListInstance ( )
protected

◆ buildRandomQuestionCollectionInstance()

ilTestRandomQuestionsQuantitiesDistribution::buildRandomQuestionCollectionInstance ( )
protected

◆ buildSourcePoolDefinitionListInstance()

ilTestRandomQuestionsQuantitiesDistribution::buildSourcePoolDefinitionListInstance ( )
protected

Definition at line 48 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

Referenced by getIntersectionSharingDefinitionList(), and registerQuestRelatedSrcPoolDef().

49  {
50  $any_test_object = new ilObjTest();
51  $non_required_db = $this->db;
52  $non_used_factory = new ilTestRandomQuestionSetSourcePoolDefinitionFactory($non_required_db, $any_test_object);
53  return new ilTestRandomQuestionSetSourcePoolDefinitionList($non_required_db, $any_test_object, $non_used_factory);
54  }
+ Here is the caller graph for this function:

◆ calculateQuantities()

ilTestRandomQuestionsQuantitiesDistribution::calculateQuantities ( ilTestRandomQuestionSetSourcePoolDefinition  $definition)
Parameters
ilTestRandomQuestionSetSourcePoolDefinition$definition
Returns
ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation

Definition at line 368 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References getAvailableSharedQuestionAmount(), getExclusiveQuestionAmount(), getIntersectionSharingDefinitionList(), and getSrcPoolDefRelatedQuestionAmount().

369  {
370  $quantityCalculation = new ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation($definition);
371 
372  $quantityCalculation->setOverallQuestionAmount($this->getSrcPoolDefRelatedQuestionAmount($definition));
373  $quantityCalculation->setExclusiveQuestionAmount($this->getExclusiveQuestionAmount($definition));
374  $quantityCalculation->setAvailableSharedQuestionAmount($this->getAvailableSharedQuestionAmount($definition));
375 
376  $quantityCalculation->setIntersectionQuantitySharingDefinitionList(
377  $this->getIntersectionSharingDefinitionList($definition)
378  );
379 
380  return $quantityCalculation;
381  }
getIntersectionSharingDefinitionList(ilTestRandomQuestionSetSourcePoolDefinition $definition)
getAvailableSharedQuestionAmount(ilTestRandomQuestionSetSourcePoolDefinition $definition)
getExclusiveQuestionAmount(ilTestRandomQuestionSetSourcePoolDefinition $definition)
getSrcPoolDefRelatedQuestionAmount(ilTestRandomQuestionSetSourcePoolDefinition $definition)
+ Here is the call graph for this function:

◆ getAvailableSharedQuestionAmount()

ilTestRandomQuestionsQuantitiesDistribution::getAvailableSharedQuestionAmount ( ilTestRandomQuestionSetSourcePoolDefinition  $definition)
protected
Parameters
ilTestRandomQuestionSetSourcePoolDefinition$definition
Returns
integer $availableSharedQuestionAmount

Definition at line 319 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References ilTestRandomQuestionSetSourcePoolDefinition\getId(), getIntersectionQuestionCollectionSubsetApplicationList(), and getSharedQuestionCollection().

Referenced by calculateQuantities().

319  : int
320  {
321  $intersectionSubsetApplicationList = $this->getIntersectionQuestionCollectionSubsetApplicationList($definition);
322 
323  foreach ($this->getSharedQuestionCollection($definition->getId()) as $sharedQuestion) {
324  $intersectionSubsetApplicationList->handleQuestionRequest($sharedQuestion);
325  }
326 
327  return $intersectionSubsetApplicationList->getNonReservedQuestionAmount();
328  }
getIntersectionQuestionCollectionSubsetApplicationList(ilTestRandomQuestionSetSourcePoolDefinition $definition)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExclusiveQuestionAmount()

ilTestRandomQuestionsQuantitiesDistribution::getExclusiveQuestionAmount ( ilTestRandomQuestionSetSourcePoolDefinition  $definition)
protected
Parameters
ilTestRandomQuestionSetSourcePoolDefinition$definition
Returns
integer

Definition at line 310 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References getExclusiveQuestionCollection(), and ilTestRandomQuestionSetSourcePoolDefinition\getId().

Referenced by calculateQuantities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExclusiveQuestionCollection()

ilTestRandomQuestionsQuantitiesDistribution::getExclusiveQuestionCollection ( int  $definition_id)
protected

Definition at line 166 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References buildRandomQuestionCollectionInstance(), getSrcPoolDefRelatedQuestionCollection(), and isQuestionUsedByMultipleSrcPoolDefinitions().

Referenced by getExclusiveQuestionAmount(), getRequiredSharedQuestionAmount(), and getSharedQuestionCollection().

167  {
168  $exclusiveQstCollection = $this->buildRandomQuestionCollectionInstance();
169 
170  foreach ($this->getSrcPoolDefRelatedQuestionCollection($definition_id) as $question) {
171  if ($this->isQuestionUsedByMultipleSrcPoolDefinitions($question)) {
172  continue;
173  }
174 
175  $exclusiveQstCollection->addQuestion($question);
176  }
177 
178  return $exclusiveQstCollection;
179  }
isQuestionUsedByMultipleSrcPoolDefinitions(ilTestRandomQuestionSetQuestion $question)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIntersectionQstCollectionByDefinitionMap()

ilTestRandomQuestionsQuantitiesDistribution::getIntersectionQstCollectionByDefinitionMap ( ilTestRandomQuestionSetSourcePoolDefinition  $definition)
protected
Returns
array[ $definitionId => ilTestRandomQuestionSetQuestionCollection ]

Definition at line 203 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References ilTestRandomQuestionSetSourcePoolDefinition\getId(), getIntersectionQuestionCollection(), getQuestRelatedSrcPoolDefinitionList(), and getSharedQuestionCollection().

Referenced by getIntersectionQuestionCollectionSubsetApplicationList().

205  : array {
206  $intersectionQstCollectionsByDefId = [];
207 
208  $sharedQuestionCollection = $this->getSharedQuestionCollection($definition->getId());
209  foreach ($sharedQuestionCollection as $sharedQuestion) {
210  $relatedSrcPoolDefList = $this->getQuestRelatedSrcPoolDefinitionList($sharedQuestion->getQuestionId());
211  foreach ($relatedSrcPoolDefList as $otherDefinition) {
212  if ($otherDefinition->getId() == $definition->getId()) {
213  continue;
214  }
215 
216  if (isset($intersectionQstCollectionsByDefId[$otherDefinition->getId()])) {
217  continue;
218  }
219 
220  $intersectionQuestionCollection = $this->getIntersectionQuestionCollection(
221  $definition->getId(),
222  $otherDefinition->getId()
223  );
224 
225  $intersectionQstCollectionsByDefId[$otherDefinition->getId()] = $intersectionQuestionCollection;
226  }
227  }
228 
229  return $intersectionQstCollectionsByDefId;
230  }
getIntersectionQuestionCollection(int $this_definition_id, int $that_definition_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIntersectionQuestionCollection()

ilTestRandomQuestionsQuantitiesDistribution::getIntersectionQuestionCollection ( int  $this_definition_id,
int  $that_definition_id 
)
protected

Definition at line 188 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References getSharedQuestionCollection().

Referenced by getIntersectionQstCollectionByDefinitionMap().

192  $this_def_related_shared_qst_collection = $this->getSharedQuestionCollection($this_definition_id);
193  $that_def_related_shared_qst_collection = $this->getSharedQuestionCollection($that_definition_id);
194 
195  return $this_def_related_shared_qst_collection->getIntersectionCollection(
196  $that_def_related_shared_qst_collection
197  );
198  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIntersectionQuestionCollectionSubsetApplicationList()

ilTestRandomQuestionsQuantitiesDistribution::getIntersectionQuestionCollectionSubsetApplicationList ( ilTestRandomQuestionSetSourcePoolDefinition  $definition)
protected
Parameters
ilTestRandomQuestionSetSourcePoolDefinition$definition
Returns
ilTestRandomQuestionCollectionSubsetApplicationList

Definition at line 236 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References buildQuestionCollectionSubsetApplicationInstance(), buildQuestionCollectionSubsetApplicationListInstance(), and getIntersectionQstCollectionByDefinitionMap().

Referenced by getAvailableSharedQuestionAmount().

237  {
238  $qstCollectionSubsetApplicationList = $this->buildQuestionCollectionSubsetApplicationListInstance();
239 
240  $intersectionQstCollectionByDefIdMap = $this->getIntersectionQstCollectionByDefinitionMap($definition);
241  foreach ($intersectionQstCollectionByDefIdMap as $otherDefinitionId => $intersectionCollection) {
242  /* @var ilTestRandomQuestionSetQuestionCollection $intersectionCollection */
243 
244  $qstCollectionSubsetApplication = $this->buildQuestionCollectionSubsetApplicationInstance();
245  $qstCollectionSubsetApplication->setQuestions($intersectionCollection->getQuestions());
246  $qstCollectionSubsetApplication->setApplicantId($otherDefinitionId);
247 
248  $qstCollectionSubsetApplication->setRequiredAmount(
249  $this->source_pool_definition_list->getDefinition($otherDefinitionId)->getQuestionAmount()
250  );
251 
252  $qstCollectionSubsetApplicationList->addCollectionSubsetApplication($qstCollectionSubsetApplication);
253  }
254 
255  return $qstCollectionSubsetApplicationList;
256  }
getIntersectionQstCollectionByDefinitionMap(ilTestRandomQuestionSetSourcePoolDefinition $definition)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIntersectionSharingDefinitionList()

ilTestRandomQuestionsQuantitiesDistribution::getIntersectionSharingDefinitionList ( ilTestRandomQuestionSetSourcePoolDefinition  $definition)
protected
Parameters
ilTestRandomQuestionSetSourcePoolDefinition$definition
Returns
ilTestRandomQuestionSetSourcePoolDefinitionList

Definition at line 264 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References buildSourcePoolDefinitionListInstance(), ilTestRandomQuestionSetSourcePoolDefinition\getId(), getQuestRelatedSrcPoolDefinitionList(), and getSharedQuestionCollection().

Referenced by calculateQuantities().

265  {
266  $intersectionSharingDefinitionList = $this->buildSourcePoolDefinitionListInstance();
267 
268  $sharedQuestionCollection = $this->getSharedQuestionCollection($definition->getId());
269  foreach ($sharedQuestionCollection as $sharedQuestion) {
270  $relatedSrcPoolDefList = $this->getQuestRelatedSrcPoolDefinitionList($sharedQuestion->getQuestionId());
271  foreach ($relatedSrcPoolDefList as $otherDefinition) {
272  if ($otherDefinition->getId() == $definition->getId()) {
273  continue;
274  }
275 
276  if ($intersectionSharingDefinitionList->hasDefinition($otherDefinition->getId())) {
277  continue;
278  }
279 
280  $intersectionSharingDefinitionList->addDefinition($otherDefinition);
281  }
282  }
283 
284  return $intersectionSharingDefinitionList;
285  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestRelatedSrcPoolDefinitionList()

ilTestRandomQuestionsQuantitiesDistribution::getQuestRelatedSrcPoolDefinitionList (   $questionId)
protected
Parameters
$questionId
Returns
ilTestRandomQuestionSetSourcePoolDefinitionList

Definition at line 100 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References null.

Referenced by getIntersectionQstCollectionByDefinitionMap(), and getIntersectionSharingDefinitionList().

101  {
102  if (isset($this->quest_related_src_pool_def_register[$questionId])) {
103  return $this->quest_related_src_pool_def_register[$questionId];
104  }
105 
106  return null;
107  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getRequiredSharedQuestionAmount()

ilTestRandomQuestionsQuantitiesDistribution::getRequiredSharedQuestionAmount ( ilTestRandomQuestionSetSourcePoolDefinition  $definition)
protected
Parameters
ilTestRandomQuestionSetSourcePoolDefinition$definition
Returns
integer

Definition at line 334 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References getExclusiveQuestionCollection(), ilTestRandomQuestionSetSourcePoolDefinition\getId(), and ilTestRandomQuestionSetSourcePoolDefinition\getQuestionAmount().

Referenced by requiresSharedQuestions().

334  : int
335  {
336  $exclusiveQstCollection = $this->getExclusiveQuestionCollection($definition->getId());
337  $missingExclsuiveQstCount = $exclusiveQstCollection->getMissingCount($definition->getQuestionAmount());
338  return $missingExclsuiveQstCount;
339  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSharedQuestionCollection()

ilTestRandomQuestionsQuantitiesDistribution::getSharedQuestionCollection ( int  $definition_id)
protected

Definition at line 181 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References getExclusiveQuestionCollection(), and getSrcPoolDefRelatedQuestionCollection().

Referenced by getAvailableSharedQuestionAmount(), getIntersectionQstCollectionByDefinitionMap(), getIntersectionQuestionCollection(), and getIntersectionSharingDefinitionList().

182  {
183  $srcPoolDefRelatedQstCollection = $this->getSrcPoolDefRelatedQuestionCollection($definition_id);
184  $exclusiveQstCollection = $this->getExclusiveQuestionCollection($definition_id);
185  return $srcPoolDefRelatedQstCollection->getRelativeComplementCollection($exclusiveQstCollection);
186  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSrcPoolDefQuestionCombinationCollection()

ilTestRandomQuestionsQuantitiesDistribution::getSrcPoolDefQuestionCombinationCollection ( )
protected

Definition at line 159 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

Referenced by initialiseRegisters().

160  {
161  return $this->question_collection_provider->getSrcPoolDefListRelatedQuestCombinationCollection(
162  $this->source_pool_definition_list
163  );
164  }
+ Here is the caller graph for this function:

◆ getSrcPoolDefRelatedQuestionAmount()

ilTestRandomQuestionsQuantitiesDistribution::getSrcPoolDefRelatedQuestionAmount ( ilTestRandomQuestionSetSourcePoolDefinition  $definition)
protected
Parameters
ilTestRandomQuestionSetSourcePoolDefinition$definition

Definition at line 301 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References ilTestRandomQuestionSetSourcePoolDefinition\getId(), and getSrcPoolDefRelatedQuestionCollection().

Referenced by calculateQuantities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSrcPoolDefRelatedQuestionCollection()

ilTestRandomQuestionsQuantitiesDistribution::getSrcPoolDefRelatedQuestionCollection ( int  $definition_id)
protected

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

Referenced by getExclusiveQuestionCollection(), getSharedQuestionCollection(), and getSrcPoolDefRelatedQuestionAmount().

124  {
125  if (isset($this->src_pool_def_related_quest_register[$definition_id])) {
126  return $this->src_pool_def_related_quest_register[$definition_id];
127  }
128 
130  }
+ Here is the caller graph for this function:

◆ initialise()

ilTestRandomQuestionsQuantitiesDistribution::initialise ( )

Definition at line 352 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References initialiseRegisters().

+ Here is the call graph for this function:

◆ initialiseRegisters()

ilTestRandomQuestionsQuantitiesDistribution::initialiseRegisters ( )
protected

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

References getSrcPoolDefQuestionCombinationCollection(), registerQuestRelatedSrcPoolDef(), and registerSrcPoolDefRelatedQuest().

Referenced by initialise().

132  : void
133  {
134  foreach ($this->getSrcPoolDefQuestionCombinationCollection() as $random_question) {
135  $source_pool_definition = $this->source_pool_definition_list->getDefinition(
136  $random_question->getSourcePoolDefinitionId()
137  );
138 
140  $random_question->getSourcePoolDefinitionId(),
141  $random_question
142  );
143 
144  if ($source_pool_definition && $random_question->getQuestionId()) {
146  $random_question->getQuestionId(),
147  $source_pool_definition
148  );
149  }
150  }
151  }
registerSrcPoolDefRelatedQuest(int $definition_id, ilTestRandomQuestionSetQuestion $random_set_question)
registerQuestRelatedSrcPoolDef(int $question_id, ilTestRandomQuestionSetSourcePoolDefinition $definition)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isQuestionUsedByMultipleSrcPoolDefinitions()

ilTestRandomQuestionsQuantitiesDistribution::isQuestionUsedByMultipleSrcPoolDefinitions ( ilTestRandomQuestionSetQuestion  $question)
protected
Parameters
ilTestRandomQuestionSetQuestion$question
Returns
bool

Definition at line 291 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References ilTestRandomQuestionSetQuestion\getQuestionId().

Referenced by getExclusiveQuestionCollection().

291  : bool
292  {
293  /* @var ilTestRandomQuestionSetSourcePoolDefinitionList $qstRelatedSrcPoolDefList */
294  $qstRelatedSrcPoolDefList = $this->quest_related_src_pool_def_register[$question->getQuestionId()];
295  return $qstRelatedSrcPoolDefList->getDefinitionCount() > 1;
296  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerQuestRelatedSrcPoolDef()

ilTestRandomQuestionsQuantitiesDistribution::registerQuestRelatedSrcPoolDef ( int  $question_id,
ilTestRandomQuestionSetSourcePoolDefinition  $definition 
)
protected

Definition at line 87 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References buildSourcePoolDefinitionListInstance().

Referenced by initialiseRegisters().

88  {
89  if (!array_key_exists($question_id, $this->quest_related_src_pool_def_register)) {
90  $this->quest_related_src_pool_def_register[$question_id] = $this->buildSourcePoolDefinitionListInstance();
91  }
92 
93  $this->quest_related_src_pool_def_register[$question_id]->addDefinition($definition);
94  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerSrcPoolDefRelatedQuest()

ilTestRandomQuestionsQuantitiesDistribution::registerSrcPoolDefRelatedQuest ( int  $definition_id,
ilTestRandomQuestionSetQuestion  $random_set_question 
)
protected

Definition at line 114 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References buildRandomQuestionCollectionInstance().

Referenced by initialiseRegisters().

114  : void
115  {
116  if (!isset($this->src_pool_def_related_quest_register[$definition_id])) {
117  $this->src_pool_def_related_quest_register[$definition_id] = $this->buildRandomQuestionCollectionInstance();
118  }
119 
120  $this->src_pool_def_related_quest_register[$definition_id]->addQuestion($random_set_question);
121  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requiresSharedQuestions()

ilTestRandomQuestionsQuantitiesDistribution::requiresSharedQuestions ( ilTestRandomQuestionSetSourcePoolDefinition  $definition)
protected
Parameters
ilTestRandomQuestionSetSourcePoolDefinition$definition
Returns
bool

Definition at line 345 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References getRequiredSharedQuestionAmount().

345  : bool
346  {
347  return $this->getRequiredSharedQuestionAmount($definition) > 0;
348  }
getRequiredSharedQuestionAmount(ilTestRandomQuestionSetSourcePoolDefinition $definition)
+ Here is the call graph for this function:

◆ reset()

ilTestRandomQuestionsQuantitiesDistribution::reset ( )

Definition at line 357 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

References resetRegisters().

+ Here is the call graph for this function:

◆ resetQuestRelatedSrcPoolDefRegister()

ilTestRandomQuestionsQuantitiesDistribution::resetQuestRelatedSrcPoolDefRegister ( )
protected

Definition at line 82 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

Referenced by resetRegisters().

83  {
84  $this->quest_related_src_pool_def_register = [];
85  }
+ Here is the caller graph for this function:

◆ resetRegisters()

ilTestRandomQuestionsQuantitiesDistribution::resetRegisters ( )
protected

◆ resetSrcPoolDefRelatedQuestRegister()

ilTestRandomQuestionsQuantitiesDistribution::resetSrcPoolDefRelatedQuestRegister ( )
protected

Definition at line 109 of file class.ilTestRandomQuestionsQuantitiesDistribution.php.

Referenced by resetRegisters().

110  {
111  $this->src_pool_def_related_quest_register = [];
112  }
+ Here is the caller graph for this function:

Field Documentation

◆ $quest_related_src_pool_def_register

array ilTestRandomQuestionsQuantitiesDistribution::$quest_related_src_pool_def_register = []
protected

◆ $src_pool_def_related_quest_register

array ilTestRandomQuestionsQuantitiesDistribution::$src_pool_def_related_quest_register = []
protected

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