|
ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Collaboration diagram for assFormulaQuestionResult:Public Member Functions | |
| __construct (private string $result, private ?string $range_min_txt, private ?string $range_max_txt, private float $tolerance, private ?assFormulaQuestionUnit $unit, private ?string $formula, private float $points, private int $precision, private bool $rating_simple=true, private ?float $rating_sign=null, private ?float $rating_value=null, private ?float $rating_unit=null, private float $result_type=0) | |
| substituteFormula (array $variables, array $results) | |
| calculateFormula ($variables, $results, $question_id=0, $use_precision=true) | |
| findValidRandomVariables ($variables, $results) | |
| suggestRange ($variables, $results) | |
| isCorrect ($variables, $results, $value, $unit=null) | |
| getReachedPoints (array $variables, array $results, string $answer_value, ?assFormulaQuestionUnit $answer_unit, array $units) | |
| getResultInfo ($variables, $results, $value, $unit, $units) | |
| setResult ($result) | |
| getResult () | |
| setRangeMin (?string $range_min) | |
| getRangeMin () | |
| getRangeMinBase () | |
| setRangeMax (?string $range_max) | |
| getRangeMax () | |
| getRangeMaxBase () | |
| setTolerance ($tolerance) | |
| getTolerance () | |
| setUnit (?assFormulaQuestionUnit $unit) | |
| getUnit () | |
| setFormula (?string $formula) | |
| getFormula () | |
| setPoints (float $points) | |
| getPoints () | |
| setRatingSimple (bool $rating_simple) | |
| getRatingSimple () | |
| setRatingSign (float $rating_sign) | |
| getRatingSign () | |
| setRatingValue (float $rating_value) | |
| getRatingValue () | |
| setRatingUnit (float $rating_unit) | |
| getRatingUnit () | |
| setPrecision (float $precision) | |
| getPrecision () | |
| setResultType (int $a_result_type) | |
| getResultType () | |
| setRangeMaxTxt (string $range_max_txt) | |
| getRangeMaxTxt () | |
| setRangeMinTxt (string $range_min_txt) | |
| getRangeMinTxt () | |
| getAvailableResultUnits ($question_id) | |
Static Public Member Functions | |
| static | getResultTypeByQstId ($a_qst_id, $a_result) |
| static | isCoprimeFraction ($numerator, $denominator) |
| static | convertDecimalToCoprimeFraction ($decimal_value, $tolerance=1.e-9) |
| static | getGreatestCommonDivisor ($a, $b) |
Data Fields | |
| const | RESULT_NO_SELECTION = 0 |
| const | RESULT_DEC = 1 |
| const | RESULT_FRAC = 2 |
| const | RESULT_CO_FRAC = 3 |
Protected Member Functions | |
| isInTolerance ($user_answer, $expected, $tolerated_percentage) | |
Private Member Functions | |
| checkSign (float $v1, float $v2) | |
| calculateCorrectResult (array $variables, array $results) | |
| transformAnswerValueAccordingToType (string $value, ?assFormulaQuestionUnit $unit) | |
Private Attributes | |
| ilGlobalTemplateInterface | $main_tpl |
| Refinery | $refinery |
| ilLanguage | $lng |
| $available_units = [] | |
| float | $range_min = null |
| float | $range_max = null |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Formula Question Result
\
Definition at line 27 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::__construct | ( | private string | $result, |
| private ?string | $range_min_txt, | ||
| private ?string | $range_max_txt, | ||
| private float | $tolerance, | ||
| private ?assFormulaQuestionUnit | $unit, | ||
| private ?string | $formula, | ||
| private float | $points, | ||
| private int | $precision, | ||
| private bool | $rating_simple = true, |
||
| private ?float | $rating_sign = null, |
||
| private ?float | $rating_value = null, |
||
| private ?float | $rating_unit = null, |
||
| private float | $result_type = 0 |
||
| ) |
Definition at line 42 of file class.assFormulaQuestionResult.php.
References $DIC, ILIAS\Repository\lng(), ILIAS\Repository\refinery(), setRangeMax(), and setRangeMin().
Here is the call graph for this function:
|
private |
Definition at line 461 of file class.assFormulaQuestionResult.php.
References calculateFormula().
Referenced by getReachedPoints().
Here is the call graph for this function:
Here is the caller graph for this function:| assFormulaQuestionResult::calculateFormula | ( | $variables, | |
| $results, | |||
$question_id = 0, |
|||
$use_precision = true |
|||
| ) |
Definition at line 101 of file class.assFormulaQuestionResult.php.
References $res, $results, ilMath\_div(), getAvailableResultUnits(), getPrecision(), getResultType(), getUnit(), and substituteFormula().
Referenced by calculateCorrectResult().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 409 of file class.assFormulaQuestionResult.php.
Referenced by getReachedPoints(), and getResultInfo().
Here is the caller graph for this function:
|
static |
Definition at line 773 of file class.assFormulaQuestionResult.php.
References Vendor\Package\$a, and Vendor\Package\$b.
Referenced by assFormulaQuestion\getBestSolution(), and assFormulaQuestion\substituteVariables().
Here is the caller graph for this function:| assFormulaQuestionResult::findValidRandomVariables | ( | $variables, | |
| $results | |||
| ) |
Definition at line 141 of file class.assFormulaQuestionResult.php.
References $results, getRangeMax(), getRangeMaxBase(), getRangeMin(), getRangeMinBase(), and substituteFormula().
Here is the call graph for this function:| assFormulaQuestionResult::getAvailableResultUnits | ( | $question_id | ) |
Definition at line 828 of file class.assFormulaQuestionResult.php.
References $available_units, $DIC, $ilDB, and $res.
Referenced by calculateFormula().
Here is the caller graph for this function:| assFormulaQuestionResult::getFormula | ( | ) |
Definition at line 651 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\buildResultsForLog(), and substituteFormula().
Here is the caller graph for this function:
|
static |
Definition at line 818 of file class.assFormulaQuestionResult.php.
References Vendor\Package\$a, and Vendor\Package\$b.
| assFormulaQuestionResult::getPoints | ( | ) |
Definition at line 661 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\buildResultsForLog(), getReachedPoints(), and getResultInfo().
Here is the caller graph for this function:| assFormulaQuestionResult::getPrecision | ( | ) |
Definition at line 711 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\buildResultsForLog(), calculateFormula(), isCorrect(), isInTolerance(), suggestRange(), and transformAnswerValueAccordingToType().
Here is the caller graph for this function:| assFormulaQuestionResult::getRangeMax | ( | ) |
Definition at line 612 of file class.assFormulaQuestionResult.php.
References $range_max.
Referenced by findValidRandomVariables(), and getRangeMaxBase().
Here is the caller graph for this function:| assFormulaQuestionResult::getRangeMaxBase | ( | ) |
Definition at line 617 of file class.assFormulaQuestionResult.php.
References ilMath\_mul(), getRangeMax(), and getUnit().
Referenced by findValidRandomVariables().
Here is the call graph for this function:
Here is the caller graph for this function:| assFormulaQuestionResult::getRangeMaxTxt | ( | ) |
Definition at line 731 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\buildResultsForLog().
Here is the caller graph for this function:| assFormulaQuestionResult::getRangeMin | ( | ) |
Definition at line 587 of file class.assFormulaQuestionResult.php.
References $range_min.
Referenced by findValidRandomVariables(), and getRangeMinBase().
Here is the caller graph for this function:| assFormulaQuestionResult::getRangeMinBase | ( | ) |
Definition at line 592 of file class.assFormulaQuestionResult.php.
References ilMath\_mul(), getRangeMin(), and getUnit().
Referenced by findValidRandomVariables().
Here is the call graph for this function:
Here is the caller graph for this function:| assFormulaQuestionResult::getRangeMinTxt | ( | ) |
Definition at line 741 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\buildResultsForLog().
Here is the caller graph for this function:| assFormulaQuestionResult::getRatingSign | ( | ) |
Definition at line 681 of file class.assFormulaQuestionResult.php.
Referenced by getReachedPoints(), and getResultInfo().
Here is the caller graph for this function:| assFormulaQuestionResult::getRatingSimple | ( | ) |
Definition at line 671 of file class.assFormulaQuestionResult.php.
Referenced by getReachedPoints(), and getResultInfo().
Here is the caller graph for this function:| assFormulaQuestionResult::getRatingUnit | ( | ) |
Definition at line 701 of file class.assFormulaQuestionResult.php.
Referenced by getReachedPoints(), and getResultInfo().
Here is the caller graph for this function:| assFormulaQuestionResult::getRatingValue | ( | ) |
Definition at line 691 of file class.assFormulaQuestionResult.php.
Referenced by getReachedPoints(), and getResultInfo().
Here is the caller graph for this function:| assFormulaQuestionResult::getReachedPoints | ( | array | $variables, |
| array | $results, | ||
| string | $answer_value, | ||
| ?assFormulaQuestionUnit | $answer_unit, | ||
| array | $units | ||
| ) |
| assFormulaQuestionUnit[] | $units |
Definition at line 417 of file class.assFormulaQuestionResult.php.
References ilMath\_div(), ilMath\_mul(), calculateCorrectResult(), checkSign(), assFormulaQuestionUnit\getBaseUnit(), getPoints(), getRatingSign(), getRatingSimple(), getRatingUnit(), getRatingValue(), getTolerance(), isCorrect(), isInTolerance(), and transformAnswerValueAccordingToType().
Here is the call graph for this function:| assFormulaQuestionResult::getResult | ( | ) |
Definition at line 571 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\addResult(), assFormulaQuestion\addResultUnit(), assFormulaQuestion\addResultUnits(), assFormulaQuestion\buildResultsForLog(), assFormulaQuestion\getResultUnits(), assFormulaQuestion\hasResultUnit(), assFormulaQuestionGUI\resetSavedPreviewSession(), and substituteFormula().
Here is the caller graph for this function:| assFormulaQuestionResult::getResultInfo | ( | $variables, | |
| $results, | |||
| $value, | |||
| $unit, | |||
| $units | |||
| ) |
Definition at line 507 of file class.assFormulaQuestionResult.php.
References $results, ilMath\_mul(), checkSign(), getPoints(), getRatingSign(), getRatingSimple(), getRatingUnit(), getRatingValue(), getTolerance(), getUnit(), isCorrect(), isInTolerance(), and substituteFormula().
Here is the call graph for this function:| assFormulaQuestionResult::getResultType | ( | ) |
Definition at line 721 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\buildResultsForLog(), calculateFormula(), isCorrect(), and transformAnswerValueAccordingToType().
Here is the caller graph for this function:
|
static |
Definition at line 746 of file class.assFormulaQuestionResult.php.
References $DIC, $ilDB, and $res.
Referenced by assFormulaQuestionGUI\getPreview(), and assFormulaQuestionGUI\getTestOutput().
Here is the caller graph for this function:| assFormulaQuestionResult::getTolerance | ( | ) |
Definition at line 631 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\buildResultsForLog(), getReachedPoints(), getResultInfo(), and isCorrect().
Here is the caller graph for this function:| assFormulaQuestionResult::getUnit | ( | ) |
Definition at line 641 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\buildResultsForLog(), calculateFormula(), getRangeMaxBase(), getRangeMinBase(), getResultInfo(), isCorrect(), and suggestRange().
Here is the caller graph for this function:
|
static |
Definition at line 766 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::isCorrect | ( | $variables, | |
| $results, | |||
| $value, | |||
$unit = null |
|||
| ) |
| $variables | array formula variables containing units | |
| $results | array formula results containing units | |
| $value | string user input value | |
| null | $unit | user input unit |
Definition at line 219 of file class.assFormulaQuestionResult.php.
References $results, ilMath\_div(), ilMath\_mul(), getPrecision(), getResultType(), getTolerance(), getUnit(), isInTolerance(), RESULT_CO_FRAC, RESULT_DEC, RESULT_FRAC, RESULT_NO_SELECTION, and substituteFormula().
Referenced by getReachedPoints(), and getResultInfo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 398 of file class.assFormulaQuestionResult.php.
References ilMath\_add(), ilMath\_div(), ilMath\_mul(), ilMath\_sub(), and getPrecision().
Referenced by getReachedPoints(), getResultInfo(), and isCorrect().
Here is the call graph for this function:
Here is the caller graph for this function:| assFormulaQuestionResult::setFormula | ( | ?string | $formula | ) |
Definition at line 646 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setPoints | ( | float | $points | ) |
Definition at line 656 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setPrecision | ( | float | $precision | ) |
Definition at line 706 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setRangeMax | ( | ?string | $range_max | ) |
Definition at line 601 of file class.assFormulaQuestionResult.php.
Referenced by __construct(), and suggestRange().
Here is the caller graph for this function:| assFormulaQuestionResult::setRangeMaxTxt | ( | string | $range_max_txt | ) |
Definition at line 726 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setRangeMin | ( | ?string | $range_min | ) |
Definition at line 576 of file class.assFormulaQuestionResult.php.
Referenced by __construct(), and suggestRange().
Here is the caller graph for this function:| assFormulaQuestionResult::setRangeMinTxt | ( | string | $range_min_txt | ) |
Definition at line 736 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setRatingSign | ( | float | $rating_sign | ) |
Definition at line 676 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setRatingSimple | ( | bool | $rating_simple | ) |
Definition at line 666 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setRatingUnit | ( | float | $rating_unit | ) |
Definition at line 696 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setRatingValue | ( | float | $rating_value | ) |
Definition at line 686 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setResult | ( | $result | ) |
Definition at line 566 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setResultType | ( | int | $a_result_type | ) |
Definition at line 716 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setTolerance | ( | $tolerance | ) |
Definition at line 626 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::setUnit | ( | ?assFormulaQuestionUnit | $unit | ) |
Definition at line 636 of file class.assFormulaQuestionResult.php.
| assFormulaQuestionResult::substituteFormula | ( | array | $variables, |
| array | $results | ||
| ) |
Definition at line 75 of file class.assFormulaQuestionResult.php.
References getFormula(), getResult(), and ILIAS\Repository\lng().
Referenced by calculateFormula(), findValidRandomVariables(), getResultInfo(), isCorrect(), and suggestRange().
Here is the call graph for this function:
Here is the caller graph for this function:| assFormulaQuestionResult::suggestRange | ( | $variables, | |
| $results | |||
| ) |
Definition at line 177 of file class.assFormulaQuestionResult.php.
References $results, ilMath\_div(), ilMath\_mul(), getPrecision(), getUnit(), setRangeMax(), setRangeMin(), and substituteFormula().
Here is the call graph for this function:
|
private |
Definition at line 469 of file class.assFormulaQuestionResult.php.
References ilMath\_div(), getPrecision(), getResultType(), ILIAS\Repository\refinery(), and ILIAS\Refinery\transform().
Referenced by getReachedPoints().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 38 of file class.assFormulaQuestionResult.php.
Referenced by getAvailableResultUnits().
|
private |
Definition at line 36 of file class.assFormulaQuestionResult.php.
|
private |
Definition at line 34 of file class.assFormulaQuestionResult.php.
|
private |
Definition at line 40 of file class.assFormulaQuestionResult.php.
Referenced by getRangeMax().
|
private |
Definition at line 39 of file class.assFormulaQuestionResult.php.
Referenced by getRangeMin().
|
private |
Definition at line 35 of file class.assFormulaQuestionResult.php.
| const assFormulaQuestionResult::RESULT_CO_FRAC = 3 |
Definition at line 32 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\getBestSolution(), isCorrect(), assFormulaQuestionTest\simpleRatedCalculationsData(), and assFormulaQuestion\substituteVariables().
| const assFormulaQuestionResult::RESULT_DEC = 1 |
Definition at line 30 of file class.assFormulaQuestionResult.php.
Referenced by isCorrect(), assFormulaQuestionTest\simpleRatedCalculationsData(), and assFormulaQuestion\substituteVariables().
| const assFormulaQuestionResult::RESULT_FRAC = 2 |
Definition at line 31 of file class.assFormulaQuestionResult.php.
Referenced by assFormulaQuestion\getBestSolution(), isCorrect(), assFormulaQuestionTest\simpleRatedCalculationsData(), and assFormulaQuestion\substituteVariables().
| const assFormulaQuestionResult::RESULT_NO_SELECTION = 0 |
Definition at line 29 of file class.assFormulaQuestionResult.php.
Referenced by isCorrect(), assFormulaQuestionTest\simpleRatedCalculationsData(), and assFormulaQuestion\substituteVariables().