57         $this->glyph_factory = $DIC->ui()->factory()->symbol()->glyph();
    58         $this->renderer = $DIC->ui()->renderer();
    61         $this->validationRegexp = 
"";
    68         $answers = $this->forms_helper->transformArray($a_value, 
'answer', $this->
refinery->kindlyTo()->string());
    69         $images = $this->forms_helper->transformArray($a_value, 
'imagename', $this->
refinery->kindlyTo()->string());
    70         $points = $this->forms_helper->transformPoints($a_value);
    72         foreach ($answers as $index => 
$value) {
    75                 $points[$index] ?? 0.0,
    81             if ($this->forms_helper->inArray($images, $index)) {
    82                 $answer->setImage($images[$index]);
    84             $this->values[] = $answer;
    95         $this->values = $a_values;
   115         $this->singleline = $a_value;
   135         $this->qstObject = &$a_value;
   155         $this->allowMove = $a_allow_move;
   210         $this->minvalue = $a_minvalue;
   230         if (!is_array(
$data)) {
   231             $this->
setAlert($this->
lng->txt(
'msg_input_is_required'));
   236         $points = $this->forms_helper->checkPointsInputEnoughPositive(
$data, 
true);
   237         if (!is_array($points)) {
   241         foreach ($points as 
$value) {
   242             if ($value !== 0.0 && $this->
getMinValue() !== 
false) {
   245                     $this->
setAlert($this->
lng->txt(
'form_msg_value_too_low'));
   252         $answers = $this->forms_helper->transformArray(
$data, 
'answer', $this->
refinery->kindlyTo()->string());
   253         foreach ($answers as $answer) {
   254             if ($answer === 
'') {
   255                 $this->
setAlert($this->
lng->txt(
'msg_input_is_required'));
   267         foreach ($this->values as 
$value) {
   269                 if (is_object($value)) {
   270                     $tpl->setCurrentBlock(
"prop_text_propval");
   275                     $tpl->parseCurrentBlock();
   276                     $tpl->setCurrentBlock(
"prop_points_propval");
   281                     $tpl->parseCurrentBlock();
   283                 $tpl->setCurrentBlock(
'singleline');
   284                 $tpl->setVariable(
"SIZE", $this->
getSize());
   285                 $tpl->setVariable(
"SINGLELINE_ID", $this->
getPostVar() . 
"[answer][$i]");
   286                 $tpl->setVariable(
"SINGLELINE_ROW_NUMBER", $i);
   287                 $tpl->setVariable(
"SINGLELINE_POST_VAR", $this->
getPostVar());
   290                     $tpl->setVariable(
"DISABLED_SINGLELINE", 
" disabled=\"disabled\"");
   292                 $tpl->parseCurrentBlock();
   294                 if (is_object($value)) {
   295                     $tpl->setCurrentBlock(
"prop_points_propval");
   300                     $tpl->parseCurrentBlock();
   302                 $tpl->setCurrentBlock(
'multiline');
   304                 $tpl->setVariable(
"MULTILINE_ID", $this->
getPostVar() . 
"[answer][$i]");
   305                 $tpl->setVariable(
"MULTILINE_ROW_NUMBER", $i);
   306                 $tpl->setVariable(
"MULTILINE_POST_VAR", $this->
getPostVar());
   308                     $tpl->setVariable(
"DISABLED_MULTILINE", 
" disabled=\"disabled\"");
   310                 $tpl->parseCurrentBlock();
   313                 $tpl->setCurrentBlock(
"move");
   314                 $tpl->setVariable(
"CMD_UP", 
"cmd[up" . $this->
getFieldId() . 
"][$i]");
   315                 $tpl->setVariable(
"CMD_DOWN", 
"cmd[down" . $this->
getFieldId() . 
"][$i]");
   316                 $tpl->setVariable(
"ID", $this->
getPostVar() . 
"[$i]");
   317                 $tpl->setVariable(
"UP_BUTTON", $this->renderer->render(
   318                     $this->glyph_factory->up()->withAction(
'#')
   320                 $tpl->setVariable(
"DOWN_BUTTON", $this->renderer->render(
   321                     $this->glyph_factory->down()->withAction(
'#')
   323                 $tpl->parseCurrentBlock();
   325             $tpl->setCurrentBlock(
"row");
   326             $tpl->setVariable(
"POST_VAR", $this->
getPostVar());
   327             $tpl->setVariable(
"ROW_NUMBER", $i);
   328             $tpl->setVariable(
"ID", $this->
getPostVar() . 
"[answer][$i]");
   329             $tpl->setVariable(
"POINTS_ID", $this->
getPostVar() . 
"[points][$i]");
   331                 $tpl->setVariable(
"ADD_REMOVE_ID", $this->
getPostVar() . 
"[$i]");
   332                 $tpl->setVariable(
"CMD_ADD", 
"cmd[add" . $this->
getFieldId() . 
"][$i]");
   333                 $tpl->setVariable(
"CMD_REMOVE", 
"cmd[remove" . $this->
getFieldId() . 
"][$i]");
   334                 $tpl->setVariable(
"ADD_BUTTON", $this->renderer->render(
   335                     $this->glyph_factory->add()->withAction(
'#')
   337                 $tpl->setVariable(
"REMOVE_BUTTON", $this->renderer->render(
   338                     $this->glyph_factory->remove()->withAction(
'#')
   342                 $tpl->setVariable(
"DISABLED_POINTS", 
" disabled=\"disabled\"");
   344             $tpl->parseCurrentBlock();
   348         $tpl->setVariable(
"ELEMENT_ID", $this->
getPostVar());
   351         $tpl->setVariable(
"COMMANDS_TEXT", $this->
lng->txt(
'actions'));
   359         $tpl->addJavascript(
"assets/js/answerwizardinput.js");
   360         $tpl->addJavascript(
"assets/js/answerwizard.js");
   369         return $lng->
txt(
'answer_text');
   386         return "tpl.prop_answerwizardinput.html";
   391         $input_string = $this->
refinery->kindlyTo()->string()->transform($input);
   394             [
'{', 
'}', 
'\'],
   397                 ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401,
 parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
Class for answers with a binary state indicator. 
 
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
 
This is how a factory for glyphs looks like. 
 
setVariable($variable, $value='')
Sets a variable value. 
 
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
__construct(Container $dic, ilPlugin $plugin)