60                 $this->values = array();
 
   61                 if (is_array($a_value))
 
   63                         if (is_array($a_value[
'key']))
 
   65                                 foreach ($a_value[
'key'] as $idx => $key)
 
   67                                         array_push($this->values, array($key, $a_value[
'value'][$idx]));
 
   80                 $this->key_size = $a_size;
 
  100                 $this->value_size = $a_size;
 
  120                 $this->key_maxlength = $a_maxlength;
 
  140                 $this->value_maxlength = $a_maxlength;
 
  160                 $this->value_name = $a_name;
 
  180                 $this->key_name = $a_name;
 
  200                 $this->values = $a_values;
 
  220                 $this->allowMove = $a_allow_move;
 
  244                 if (is_array($foundvalues))
 
  247                         if (is_array($foundvalues[
'key']) && is_array($foundvalues[
'value']))
 
  249                                 foreach ($foundvalues[
'key'] as $val)
 
  253                                                 $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  257                                 foreach ($foundvalues[
'value'] as $val)
 
  261                                                 $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  270                                         $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  279                                 $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  295                 $tpl = 
new ilTemplate(
"tpl.prop_kvpwizardinput.html", 
true, 
true, 
"Modules/TestQuestionPool");
 
  297                 foreach ($this->values as 
$value)
 
  299                         if (is_array($value))
 
  301                                 $tpl->setCurrentBlock(
"prop_key_propval");
 
  303                                 $tpl->parseCurrentBlock();
 
  304                                 $tpl->setCurrentBlock(
"prop_value_propval");
 
  306                                 $tpl->parseCurrentBlock();
 
  310                                 $tpl->setCurrentBlock(
"move");
 
  311                                 $tpl->setVariable(
"CMD_UP", 
"cmd[up" . $this->
getFieldId() . 
"][$i]");
 
  312                                 $tpl->setVariable(
"CMD_DOWN", 
"cmd[down" . $this->
getFieldId() . 
"][$i]");
 
  316                                 $tpl->parseCurrentBlock();
 
  319                         $tpl->setCurrentBlock(
"row");
 
  320                         $class = ($i % 2 == 0) ? 
"even" : 
"odd";
 
  321                         if ($i == 0) $class .= 
" first";
 
  322                         if ($i == count($this->values)-1) $class .= 
" last";
 
  323                         $tpl->setVariable(
"ROW_CLASS", $class);
 
  324                         $tpl->setVariable(
"ROW_NUMBER", $i);
 
  331                         $tpl->setVariable(
"VALUE_ID", $this->
getPostVar() . 
"[value][$i]");
 
  335                         $tpl->setVariable(
"CMD_ADD", 
"cmd[add" . $this->
getFieldId() . 
"][$i]");
 
  336                         $tpl->setVariable(
"CMD_REMOVE", 
"cmd[remove" . $this->
getFieldId() . 
"][$i]");
 
  342                         $tpl->parseCurrentBlock();
 
  350                 $a_tpl->setCurrentBlock(
"prop_generic");
 
  351                 $a_tpl->setVariable(
"PROP_GENERIC", 
$tpl->get());
 
  352                 $a_tpl->parseCurrentBlock();
 
  355                 include_once 
"./Services/YUI/classes/class.ilYuiUtil.php";
 
  357                 $tpl->addJavascript(
"./Modules/TestQuestionPool/templates/default/kvpwizard.js");