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

Public Member Functions

 __construct (ilTestRandomQuestionSetSourcePoolDefinition $sourcePoolDefinition)
 ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCheck constructor. More...
 
 getSourcePoolDefinition ()
 
 getIntersectionQuantitySharingDefinitionList ()
 
 setIntersectionQuantitySharingDefinitionList ($intersectionQuantitySharingDefinitionList)
 
 getOverallQuestionAmount ()
 
 setOverallQuestionAmount ($overallQuestionAmount)
 
 getExclusiveQuestionAmount ()
 
 setExclusiveQuestionAmount ($exclusiveQuestionAmount)
 
 getAvailableSharedQuestionAmount ()
 
 setAvailableSharedQuestionAmount ($availableSharedQuestionAmount)
 
 isRequiredAmountGuaranteedAvailable ()
 
 getDistributionReport (ilLanguage $lng)
 

Protected Member Functions

 getReservedSharedQuestionAmount ()
 
 getRemainingRequiredQuestionAmount ()
 
 isRequiredQuestionAmountSatisfiedByOverallQuestionQuantity ()
 
 isRequiredQuestionAmountSatisfiedByExclusiveQuestionQuantity ()
 
 isRemainingRequiredQuestionAmountSatisfiedBySharedQuestionQuantity ()
 
 sourcePoolDefinitionIntersectionsExist ()
 
 getRuleSatisfactionResultMessage (ilLanguage $lng)
 
 getConcurrentRuleConflictMessage (ilLanguage $lng)
 
 buildIntersectionQuestionSharingDefinitionsString (ilLanguage $lng)
 

Protected Attributes

 $sourcePoolDefinition
 
 $intersectionQuantitySharingDefinitionList
 
 $overallQuestionAmount
 
 $exclusiveQuestionAmount
 
 $availableSharedQuestionAmount
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::__construct ( ilTestRandomQuestionSetSourcePoolDefinition  $sourcePoolDefinition)

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCheck constructor.

Parameters
ilTestRandomQuestionSetSourcePoolDefinition$sourcePoolDefinition

Definition at line 59 of file class.ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation.php.

References $sourcePoolDefinition.

Member Function Documentation

◆ buildIntersectionQuestionSharingDefinitionsString()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::buildIntersectionQuestionSharingDefinitionsString ( ilLanguage  $lng)
protected
Parameters
ilLanguage$lng
Returns
string

Definition at line 271 of file class.ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation.php.

References getIntersectionQuantitySharingDefinitionList(), and ilLanguage\txt().

Referenced by getConcurrentRuleConflictMessage().

271  : string
272  {
273  $definitionsString = [];
274 
275  foreach ($this->getIntersectionQuantitySharingDefinitionList() as $definition) {
276  $definitionsString[] = sprintf(
277  $lng->txt('tst_msg_rand_quest_set_rule_label'),
278  $definition->getSequencePosition()
279  );
280  }
281 
282  $definitionsString = '<ul><li>' . implode('</li><li>', $definitionsString) . '</li></ul>';
283  return $definitionsString;
284  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAvailableSharedQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getAvailableSharedQuestionAmount ( )

◆ getConcurrentRuleConflictMessage()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getConcurrentRuleConflictMessage ( ilLanguage  $lng)
protected

Definition at line 248 of file class.ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation.php.

References buildIntersectionQuestionSharingDefinitionsString(), getAvailableSharedQuestionAmount(), getReservedSharedQuestionAmount(), isRequiredQuestionAmountSatisfiedByOverallQuestionQuantity(), and ilLanguage\txt().

Referenced by getDistributionReport().

248  : string
249  {
250  $definitionsString = '<br />' . $this->buildIntersectionQuestionSharingDefinitionsString($lng);
251 
253  return sprintf(
254  $lng->txt('tst_msg_rand_quest_set_rule_not_satisfied_reserved_shared'),
256  $definitionsString
257  );
258  }
259 
260  return sprintf(
261  $lng->txt('tst_msg_rand_quest_set_rule_not_satisfied_missing_shared'),
263  $definitionsString
264  );
265  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDistributionReport()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getDistributionReport ( ilLanguage  $lng)

◆ getExclusiveQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getExclusiveQuestionAmount ( )

◆ getIntersectionQuantitySharingDefinitionList()

◆ getOverallQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getOverallQuestionAmount ( )

◆ getRemainingRequiredQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getRemainingRequiredQuestionAmount ( )
protected

◆ getReservedSharedQuestionAmount()

◆ getRuleSatisfactionResultMessage()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getRuleSatisfactionResultMessage ( ilLanguage  $lng)
protected

Definition at line 229 of file class.ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation.php.

References getOverallQuestionAmount(), getSourcePoolDefinition(), isRequiredQuestionAmountSatisfiedByOverallQuestionQuantity(), and ilLanguage\txt().

Referenced by getDistributionReport().

229  : string
230  {
232  return sprintf(
233  $lng->txt('tst_msg_rand_quest_set_rule_not_satisfied_reserved'),
234  $this->getSourcePoolDefinition()->getSequencePosition(),
235  $this->getSourcePoolDefinition()->getQuestionAmount(),
236  $this->getOverallQuestionAmount()
237  );
238  }
239 
240  return sprintf(
241  $lng->txt('tst_msg_rand_quest_set_rule_not_satisfied_missing'),
242  $this->getSourcePoolDefinition()->getSequencePosition(),
243  $this->getSourcePoolDefinition()->getQuestionAmount(),
244  $this->getOverallQuestionAmount()
245  );
246  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSourcePoolDefinition()

◆ isRemainingRequiredQuestionAmountSatisfiedBySharedQuestionQuantity()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::isRemainingRequiredQuestionAmountSatisfiedBySharedQuestionQuantity ( )
protected

◆ isRequiredAmountGuaranteedAvailable()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::isRequiredAmountGuaranteedAvailable ( )

◆ isRequiredQuestionAmountSatisfiedByExclusiveQuestionQuantity()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::isRequiredQuestionAmountSatisfiedByExclusiveQuestionQuantity ( )
protected

◆ isRequiredQuestionAmountSatisfiedByOverallQuestionQuantity()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::isRequiredQuestionAmountSatisfiedByOverallQuestionQuantity ( )
protected

◆ setAvailableSharedQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::setAvailableSharedQuestionAmount (   $availableSharedQuestionAmount)

◆ setExclusiveQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::setExclusiveQuestionAmount (   $exclusiveQuestionAmount)

◆ setIntersectionQuantitySharingDefinitionList()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::setIntersectionQuantitySharingDefinitionList (   $intersectionQuantitySharingDefinitionList)

◆ setOverallQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::setOverallQuestionAmount (   $overallQuestionAmount)

◆ sourcePoolDefinitionIntersectionsExist()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::sourcePoolDefinitionIntersectionsExist ( )
protected
Returns
bool

Definition at line 193 of file class.ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation.php.

References getIntersectionQuantitySharingDefinitionList().

Referenced by getDistributionReport().

193  : bool
194  {
195  if ($this->getIntersectionQuantitySharingDefinitionList()->getDefinitionCount() > 0) {
196  return true;
197  }
198 
199  return false;
200  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $availableSharedQuestionAmount

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::$availableSharedQuestionAmount
protected

◆ $exclusiveQuestionAmount

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::$exclusiveQuestionAmount
protected

◆ $intersectionQuantitySharingDefinitionList

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::$intersectionQuantitySharingDefinitionList
protected

◆ $overallQuestionAmount

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::$overallQuestionAmount
protected

◆ $sourcePoolDefinition

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::$sourcePoolDefinition
protected

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