38 $this->open_answer_indexes = $a_indexes;
46 $this->open_answer_indexes[] = $a_idx;
56 return in_array($a_idx,(array) $this->open_answer_indexes);
73 if (is_array($foundvalues))
75 foreach ($foundvalues as $idx =>
$value)
80 $this->
setAlert($lng->txt(
"msg_input_is_required"));
88 $this->
setAlert($lng->txt(
"msg_wrong_format"));
96 $this->
setAlert($lng->txt(
"msg_input_is_required"));
116 $tpl =
new ilTemplate(
"tpl.prop_selectbuilder.html",
true,
true,
"Services/Form");
118 foreach ($this->values as
$value)
120 if(!is_string($value))
125 if (strlen((
string) $value))
127 $tpl->setCurrentBlock(
"prop_text_propval");
129 $tpl->parseCurrentBlock();
133 $tpl->setCurrentBlock(
"move");
134 $tpl->setVariable(
"CMD_UP",
"cmd[up" . $this->
getFieldId() .
"][$i]");
135 $tpl->setVariable(
"CMD_DOWN",
"cmd[down" . $this->
getFieldId() .
"][$i]");
139 $tpl->parseCurrentBlock();
141 $tpl->setCurrentBlock(
"row");
142 $class = ($i % 2 == 0) ?
"even" :
"odd";
143 if ($i == 0) $class .=
" first";
144 if ($i == count($this->values)-1) $class .=
" last";
145 $tpl->setVariable(
"ROW_CLASS", $class);
147 #$tpl->setVariable('POST_VAR_OPEN',$this->getPostVar().'[open]'.'['.$i.']');
148 $tpl->setVariable(
'POST_VAR_OPEN',$this->
getPostVar().
'_open'.
'['.$i.
']');
149 $tpl->setVariable(
'POST_VAR_OPEN_ID', $this->
getPostVar().
'_open['.$i.
']');
153 $tpl->setVariable(
'PROP_OPEN_CHECKED',
'checked="checked"');
157 $tpl->setVariable(
'PROP_OPEN_DISABLED',
'disabled="disabled"');
161 $tpl->setVariable(
"CMD_ADD",
"cmd[add" . $this->
getFieldId() .
"][$i]");
162 $tpl->setVariable(
"CMD_REMOVE",
"cmd[remove" . $this->
getFieldId() .
"][$i]");
167 $tpl->setVariable(
"DISABLED",
168 " disabled=\"disabled\"");
172 $tpl->parseCurrentBlock();
177 $a_tpl->setCurrentBlock(
"prop_generic");
178 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
179 $a_tpl->parseCurrentBlock();
182 include_once
"./Services/YUI/classes/class.ilYuiUtil.php";
184 $tpl->addJavascript(
"./Services/Form/templates/default/textwizard.js");