ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
|
Public Member Functions | |
__construct () | |
checkPointsInput ($data, bool $required, string $key='points') | |
Checks if the provides points of an input are valid. More... | |
checkPointsInputEnoughPositive ($data, bool $required, string $key='points') | |
Extends the checkPointsInput function by checking if at least one point is greater than 0.0. More... | |
transformArray ($data, string $key, Transformation $transformation) | |
transformPoints ($data, string $key='points') | |
inArray ($array, $key) | |
Returns true if the given key is set in the array and the value is not empty. More... | |
Protected Attributes | |
Refinery | $refinery |
Definition at line 28 of file ilTestLegacyFormsHelper.php.
ILIAS\TestQuestionPool\ilTestLegacyFormsHelper::__construct | ( | ) |
Definition at line 32 of file ilTestLegacyFormsHelper.php.
References $DIC, and ILIAS\Repository\refinery().
ILIAS\TestQuestionPool\ilTestLegacyFormsHelper::checkPointsInput | ( | $data, | |
bool | $required, | ||
string | $key = 'points' |
||
) |
Checks if the provides points of an input are valid.
The function returns the language key of the error message if either the input is not an array or one of the points are not numeric. If the input is valid, the function returns the points as an array of floats.
Definition at line 46 of file ilTestLegacyFormsHelper.php.
References $data, Vendor\Package\$e, ILIAS\TestQuestionPool\ilTestLegacyFormsHelper\inArray(), ILIAS\Repository\refinery(), and ILIAS\Refinery\transform().
Referenced by ILIAS\TestQuestionPool\ilTestLegacyFormsHelper\checkPointsInputEnoughPositive().
ILIAS\TestQuestionPool\ilTestLegacyFormsHelper::checkPointsInputEnoughPositive | ( | $data, | |
bool | $required, | ||
string | $key = 'points' |
||
) |
Extends the checkPointsInput function by checking if at least one point is greater than 0.0.
If not, the function returns the language key of the error message.
Definition at line 71 of file ilTestLegacyFormsHelper.php.
References $data, and ILIAS\TestQuestionPool\ilTestLegacyFormsHelper\checkPointsInput().
ILIAS\TestQuestionPool\ilTestLegacyFormsHelper::inArray | ( | $array, | |
$key | |||
) |
Returns true if the given key is set in the array and the value is not empty.
Definition at line 111 of file ilTestLegacyFormsHelper.php.
Referenced by ILIAS\TestQuestionPool\ilTestLegacyFormsHelper\checkPointsInput(), ILIAS\TestQuestionPool\ilTestLegacyFormsHelper\transformArray(), and ILIAS\TestQuestionPool\ilTestLegacyFormsHelper\transformPoints().
ILIAS\TestQuestionPool\ilTestLegacyFormsHelper::transformArray | ( | $data, | |
string | $key, | ||
Transformation | $transformation | ||
) |
Definition at line 81 of file ilTestLegacyFormsHelper.php.
References $data, ILIAS\TestQuestionPool\ilTestLegacyFormsHelper\inArray(), ILIAS\Repository\refinery(), and ILIAS\Refinery\transform().
ILIAS\TestQuestionPool\ilTestLegacyFormsHelper::transformPoints | ( | $data, | |
string | $key = 'points' |
||
) |
Definition at line 96 of file ilTestLegacyFormsHelper.php.
References $data, ILIAS\TestQuestionPool\ilTestLegacyFormsHelper\inArray(), null, ILIAS\Repository\refinery(), and ILIAS\Refinery\transform().
|
protected |
Definition at line 30 of file ilTestLegacyFormsHelper.php.