51                 $this->show_wizard = 
false;
 
   52                 $this->show_save_phrase = 
false;
 
   53                 $this->categorytext = $lng->txt(
'row_text');
 
   54                 $this->use_other_answer = 
false;
 
   64                 $this->use_other_answer = ($a_value) ? 
true : 
false;
 
   74                 include_once 
"./Modules/SurveyQuestionPool/classes/class.SurveyCategories.php";
 
   76                 if (is_array($a_value))
 
   78                         if (is_array($a_value[
'answer']))
 
   80                                 foreach ($a_value[
'answer'] as $index => 
$value)
 
   82                                         $this->values->addCategory(
$value, $a_value[
'other'][$index]);
 
   95                 $this->values = $a_values;
 
  115                 $this->allowMove = $a_allow_move;
 
  130                 $this->show_wizard = $a_value;
 
  140                 $this->categorytext = $a_text;
 
  150                 $this->labeltext = $a_text;
 
  160                 $this->show_save_phrase = $a_value;
 
  178                 if (is_array($foundvalues))
 
  181                         if (is_array($foundvalues[
'answer']))
 
  183                                 foreach ($foundvalues[
'answer'] as $idx => $answervalue)
 
  185                                         if (((strlen($answervalue)) == 0) && ($this->
getRequired() && (!$foundvalues[
'other'][$idx])))
 
  187                                                 $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  195                         $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  211                 $tpl = 
new ilTemplate(
"tpl.prop_matrixrowwizardinput.html", 
true, 
true, 
"Modules/SurveyQuestionPool");
 
  213                 if (is_object($this->values))
 
  215                         for ($i = 0; $i < $this->values->getCategoryCount(); $i++)
 
  217                                 $cat = $this->values->getCategory($i);
 
  218                                 $tpl->setCurrentBlock(
"prop_text_propval");
 
  220                                 $tpl->parseCurrentBlock();
 
  221                                 $tpl->setCurrentBlock(
"prop_label_propval");
 
  223                                 $tpl->parseCurrentBlock();
 
  227                                         $tpl->setCurrentBlock(
"other_answer_checkbox");
 
  229                                         $tpl->setVariable(
"OTHER_ID", $this->
getPostVar() . 
"[other][$i]");
 
  230                                         $tpl->setVariable(
"ROW_NUMBER", $i);
 
  233                                                 $tpl->setVariable(
"CHECKED_OTHER", 
' checked="checked"');
 
  235                                         $tpl->parseCurrentBlock();
 
  240                                         $tpl->setCurrentBlock(
"move");
 
  241                                         $tpl->setVariable(
"CMD_UP", 
"cmd[up" . $this->
getFieldId() . 
"][$i]");
 
  242                                         $tpl->setVariable(
"CMD_DOWN", 
"cmd[down" . $this->
getFieldId() . 
"][$i]");
 
  246                                         $tpl->parseCurrentBlock();
 
  248                                 $tpl->setCurrentBlock(
"row");
 
  249                                 $class = ($i % 2 == 0) ? 
"even" : 
"odd";
 
  250                                 if ($i == 0) $class .= 
" first";
 
  251                                 if ($i == $this->values->getCategoryCount()-1) $class .= 
" last";
 
  252                                 $tpl->setVariable(
"ROW_CLASS", $class);
 
  254                                 $tpl->setVariable(
"ROW_NUMBER", $i);
 
  256                                 $tpl->setVariable(
"ID_LABEL", $this->
getPostVar() . 
"[label][$i]");
 
  258                                 $tpl->setVariable(
"SIZE_LABEL", 15);
 
  262                                         $tpl->setVariable(
"DISABLED", 
" disabled=\"disabled\"");
 
  263                                         $tpl->setVariable(
"DISABLED_LABEL", 
" disabled=\"disabled\"");
 
  266                                 $tpl->setVariable(
"CMD_ADD", 
"cmd[add" . $this->
getFieldId() . 
"][$i]");
 
  267                                 $tpl->setVariable(
"CMD_REMOVE", 
"cmd[remove" . $this->
getFieldId() . 
"][$i]");
 
  270                                 $tpl->parseCurrentBlock();
 
  276                         $tpl->setCurrentBlock(
"wizard");
 
  277                         $tpl->setVariable(
"CMD_WIZARD", 
'cmd[wizard' . $this->
getFieldId() . 
']');
 
  279                         $tpl->setVariable(
"WIZARD_TEXT", $lng->txt(
'add_phrase'));
 
  280                         $tpl->parseCurrentBlock();
 
  285                         $tpl->setCurrentBlock(
'savephrase');
 
  287                         $tpl->setVariable(
"VALUE_SAVE_PHRASE", $lng->txt(
'save_phrase'));
 
  288                         $tpl->parseCurrentBlock();
 
  293                         $tpl->setCurrentBlock(
'other_answer_title');
 
  294                         $tpl->setVariable(
"OTHER_TEXT", $lng->txt(
'use_other_answer'));
 
  295                         $tpl->parseCurrentBlock();
 
  301                 $tpl->setVariable(
"ACTIONS_TEXT", $lng->txt(
'actions'));
 
  303                 $a_tpl->setCurrentBlock(
"prop_generic");
 
  304                 $a_tpl->setVariable(
"PROP_GENERIC", 
$tpl->get());
 
  305                 $a_tpl->parseCurrentBlock();
 
  308                 include_once 
"./Services/YUI/classes/class.ilYuiUtil.php";
 
  310                 $tpl->addJavascript(
"./Modules/SurveyQuestionPool/templates/default/matrixrowwizard.js");