ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation Class Reference
+ Collaboration diagram for ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation:

Public Member Functions

 __construct (ilTestRandomQuestionSetSourcePoolDefinition $sourcePoolDefinition)
 ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCheck constructor. More...
 
 getSourcePoolDefinition ()
 
 setSourcePoolDefinition ($sourcePoolDefinition)
 
 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 42 of file class.ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation.php.

References setSourcePoolDefinition().

+ Here is the call graph for this function:

Member Function Documentation

◆ buildIntersectionQuestionSharingDefinitionsString()

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

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

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

Referenced by getConcurrentRuleConflictMessage().

263  {
264  $definitionsString = array();
265 
266  foreach ($this->getIntersectionQuantitySharingDefinitionList() as $definition) {
267  $definitionsString[] = sprintf(
268  $lng->txt('tst_msg_rand_quest_set_rule_label'),
269  $definition->getSequencePosition()
270  );
271  }
272 
273  $definitionsString = '<ul><li>' . implode('</li><li>', $definitionsString) . '</li></ul>';
274  return $definitionsString;
275  }
txt($a_topic, $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 239 of file class.ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation.php.

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

Referenced by getDistributionReport().

240  {
241  $definitionsString = '<br />' . $this->buildIntersectionQuestionSharingDefinitionsString($lng);
242 
244  return sprintf(
245  $lng->txt('tst_msg_rand_quest_set_rule_not_satisfied_reserved_shared'),
247  $definitionsString
248  );
249  }
250 
251  return sprintf(
252  $lng->txt('tst_msg_rand_quest_set_rule_not_satisfied_missing_shared'),
254  $definitionsString
255  );
256  }
txt($a_topic, $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()

◆ getExclusiveQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getExclusiveQuestionAmount ( )

◆ getIntersectionQuantitySharingDefinitionList()

◆ getOverallQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getOverallQuestionAmount ( )

◆ getRemainingRequiredQuestionAmount()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getRemainingRequiredQuestionAmount ( )
protected

◆ getReservedSharedQuestionAmount()

◆ getRuleSatisfactionResultMessage()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::getRuleSatisfactionResultMessage ( ilLanguage  $lng)
protected

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

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

Referenced by getDistributionReport().

221  {
223  return sprintf(
224  $lng->txt('tst_msg_rand_quest_set_rule_not_satisfied_reserved'),
225  $this->getSourcePoolDefinition()->getSequencePosition(),
226  $this->getSourcePoolDefinition()->getQuestionAmount(),
227  $this->getOverallQuestionAmount()
228  );
229  }
230 
231  return sprintf(
232  $lng->txt('tst_msg_rand_quest_set_rule_not_satisfied_missing'),
233  $this->getSourcePoolDefinition()->getSequencePosition(),
234  $this->getSourcePoolDefinition()->getQuestionAmount(),
235  $this->getOverallQuestionAmount()
236  );
237  }
txt($a_topic, $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)

◆ setSourcePoolDefinition()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::setSourcePoolDefinition (   $sourcePoolDefinition)
Parameters
ilTestRandomQuestionSetSourcePoolDefinition$sourcePoolDefinition

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

References $sourcePoolDefinition.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ sourcePoolDefinitionIntersectionsExist()

ilTestRandomQuestionsSrcPoolDefinitionQuantitiesCalculation::sourcePoolDefinitionIntersectionsExist ( )
protected
Returns
bool

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

References getIntersectionQuantitySharingDefinitionList().

Referenced by getDistributionReport().

185  {
186  if ($this->getIntersectionQuantitySharingDefinitionList()->getDefinitionCount() > 0) {
187  return true;
188  }
189 
190  return false;
191  }
+ 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: