17 if (is_array($a_value)) {
18 include_once
"./Modules/TestQuestionPool/classes/class.assAnswerErrorText.php";
19 if (is_array($a_value[
'points'])) {
20 foreach ($this->values as $idx => $key) {
21 $this->values[$idx]->points = (
22 str_replace(
",",
".", $a_value[
'points'][$idx])
39 if (is_array($foundvalues)) {
40 if (is_array($foundvalues[
'points'])) {
41 foreach ($foundvalues[
'points'] as $val) {
46 if (!is_numeric(str_replace(
",",
".", $val))) {
47 $this->
setAlert(
$lng->txt(
"form_msg_numeric_value_required"));
50 if ((
float) $val <= 0) {
76 $tpl =
new ilTemplate(
"tpl.prop_errortextcorrection_input.html",
true,
true,
"Modules/TestQuestionPool");
78 foreach ($this->values as
$value) {
79 $tpl->setCurrentBlock(
"prop_points_propval");
81 $tpl->parseCurrentBlock();
83 $tpl->setCurrentBlock(
"row");
88 $class = (
$i % 2 == 0) ?
"even" :
"odd";
92 if (
$i == count($this->values) - 1) {
95 $tpl->setVariable(
"ROW_CLASS", $class);
96 $tpl->setVariable(
"ROW_NUMBER",
$i);
103 $tpl->setVariable(
"VALUE_ID", $this->
getPostVar() .
"[value][$i]");
108 $tpl->parseCurrentBlock();
115 $tpl->setVariable(
"POINTS_TEXT",
$lng->txt(
'points'));
117 $a_tpl->setCurrentBlock(
"prop_generic");
118 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
119 $a_tpl->parseCurrentBlock();
An exception for terminatinating execution or to throw for unit testing.
setValue($a_value)
Set Value.
checkInput()
Check input, strip slashes etc.
insert($a_tpl)
Insert property html.
This class represents a key value pair wizard property in a property form.
getValueSize()
Get value size.
getKeyMaxlength()
Get key maxlength.
getValueMaxlength()
Get value maxlength.
getValueName()
Get value name.
getKeyName()
Get key name.
getKeySize()
Get key size.
special template class to simplify handling of ITX/PEAR
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl