18 $this->values[
$index][
'points'] = $a_value[
'points'][
$index];
25 $lng = $DIC->language();
32 if (is_array(
$values[
'points'])) {
33 foreach (
$values[
'points'] as $points) {
37 if (((strlen($points)) == 0) || (!is_numeric($points))) {
38 $this->
setAlert(
$lng->txt(
"form_msg_numeric_value_required"));
42 if (trim($points) !=
"" &&
50 if (trim($points) !=
"" &&
61 $this->
setAlert(
$lng->txt(
"enter_enough_positive_points"));
70 $tpl =
new ilTemplate(
'tpl.prop_gap_combi_answers_input.html',
true,
true,
'Modules/TestQuestionPool');
74 foreach ($this->values as $varId => $variant) {
75 foreach ($variant[
'gaps'] as $gapIndex => $answer) {
76 $gaps[$gapIndex] = $gapIndex;
78 $tpl->setCurrentBlock(
'gap_answer');
79 $tpl->setVariable(
'GAP_ANSWER', $answer);
80 $tpl->parseCurrentBlock();
83 $tpl->setCurrentBlock(
'variant');
85 $tpl->setVariable(
'POINTS', $variant[
'points']);
86 $tpl->parseCurrentBlock();
89 foreach ($gaps as $gapIndex) {
90 $tpl->setCurrentBlock(
'gap_header');
91 $tpl->setVariable(
'GAP_HEADER',
'Gap ' . ($gapIndex + 1));
92 $tpl->parseCurrentBlock();
95 $tpl->setVariable(
'POINTS_HEADER',
'Points');
97 $a_tpl->setCurrentBlock(
"prop_generic");
98 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
99 $a_tpl->parseCurrentBlock();
special template class to simplify handling of ITX/PEAR