31 foreach ($this->forms_helper->transformPoints($a_value) as $index => $points) {
32 $this->values[$index] = $this->values[$index]->withPoints($points);
39 $result = $this->forms_helper->checkPointsInput(
$data, $this->
getRequired());
41 if (!is_array($result)) {
46 foreach ($result as $points) {
48 $this->
setAlert($this->
lng->txt(
'positive_numbers_required'));
61 $tpl =
new ilTemplate(
'tpl.prop_errortextcorrection_input.html',
true,
true,
'components/ILIAS/TestQuestionPool');
63 foreach ($this->values as
$value) {
64 $tpl->setCurrentBlock(
'prop_points_propval');
66 $tpl->parseCurrentBlock();
68 $tpl->setCurrentBlock(
'row');
73 $class = ($i % 2 === 0) ?
'even' :
'odd';
77 if ($i === count($this->values) - 1) {
80 $tpl->setVariable(
'ROW_CLASS', $class);
81 $tpl->setVariable(
'ROW_NUMBER', $i);
83 $tpl->setVariable(
'KEY_SIZE', $this->
getKeySize());
84 $tpl->setVariable(
'KEY_ID', $this->
getPostVar() .
"[key][$i]");
88 $tpl->setVariable(
'VALUE_ID', $this->
getPostVar() .
"[value][$i]");
91 $tpl->setVariable(
'POST_VAR', $this->
getPostVar());
93 $tpl->parseCurrentBlock();
97 $tpl->setVariable(
'ELEMENT_ID', $this->
getPostVar());
98 $tpl->setVariable(
'KEY_TEXT', $this->
getKeyName());
100 $tpl->setVariable(
'POINTS_TEXT',
$lng->
txt(
'points'));
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
getKeyName()
Get key name.
insert(ilTemplate $a_tpl)
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...
getKeySize()
Get key size.
setVariable($variable, $value='')
Sets a variable value.
getValueName()
Get value name.
getValueSize()
Get value size.
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
getValueMaxlength()
Get value maxlength.
This class represents a key value pair wizard property in a property form.
getKeyMaxlength()
Get key maxlength.