ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAnswerWizardInputGUI Class Reference

This class represents a single choice wizard property in a property form. More...

+ Inheritance diagram for ilAnswerWizardInputGUI:
+ Collaboration diagram for ilAnswerWizardInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 setValues ($a_values)
 Set Values. More...
 
 getValues ()
 Get Values. More...
 
 setSingleline ($a_value)
 Set singleline. More...
 
 getSingleline ()
 Get singleline. More...
 
 setQuestionObject ($a_value)
 Set question object. More...
 
 getQuestionObject ()
 Get question object. More...
 
 setAllowMove ($a_allow_move)
 Set allow move. More...
 
 getAllowMove ()
 Get allow move. More...
 
 isAddRemoveAllowed ()
 
 setAllowAddRemove ($allowAddRemove)
 
 setMinvalueShouldBeGreater ($a_bool)
 Set minvalueShouldBeGreater. More...
 
 minvalueShouldBeGreater ()
 Get minvalueShouldBeGreater. More...
 
 setMinValue ($a_minvalue)
 Set Minimum Value. More...
 
 getMinValue ()
 Get Minimum Value. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 insert ($a_tpl)
 Insert property html. More...
 
- Public Member Functions inherited from ilTextInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setValidationFailureMessage ($a_msg)
 Set message string for validation failure. More...
 
 getValidationFailureMessage ()
 
 setValidationRegexp ($a_value)
 Set validation regexp. More...
 
 getValidationRegexp ()
 Get validation regexp. More...
 
 setMaxLength ($a_maxlength)
 Set Max Length. More...
 
 getMaxLength ()
 Get Max Length. More...
 
 setSize ($a_size)
 Set Size. More...
 
 setInlineStyle ($a_style)
 Set inline style. More...
 
 getInlineStyle ()
 Get inline style. More...
 
 setCssClass ($a_class)
 
 getCssClass ()
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 getSize ()
 Get Size. More...
 
 setSuffix ($a_value)
 Set suffix. More...
 
 getSuffix ()
 Get suffix. More...
 
 setInputType ($a_type)
 set input type More...
 
 getInputType ()
 get input type More...
 
 setSubmitFormOnEnter ($a_val)
 Set submit form on enter. More...
 
 getSubmitFormOnEnter ()
 Get submit form on enter. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getDataSource ()
 get datasource link for js autocomplete More...
 
 setDataSource ($href, $a_delimiter=null)
 set datasource link for js autocomplete More...
 
 setDataSourceSubmitOnSelection ($a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl ($a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 insert ($a_tpl)
 Insert property html. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
 getToolbarHTML ()
 Get HTML for toolbar. More...
 
 setDisableHtmlAutoComplete ($autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 

Protected Member Functions

 getTextInputLabel ($lng)
 
 getPointsInputLabel ($lng)
 
 getTemplate ()
 
 sanitizeSuperGlobalSubmitValue ()
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Protected Attributes

 $values = array()
 
 $allowMove = false
 
 $allowAddRemove = true
 
 $singleline = true
 
 $qstObject = null
 
 $minvalue = false
 
 $minvalueShouldBeGreater = false
 
- Protected Attributes inherited from ilTextInputGUI
 $value
 
 $maxlength = 200
 
 $size = 40
 
 $validationRegexp
 
 $validationFailureMessage = ''
 
 $suffix
 
 $style_css
 
 $css_class
 
 $ajax_datasource
 
 $ajax_datasource_delimiter
 
 $ajax_datasource_commit = false
 
 $ajax_datasource_commit_url
 
 $submit_form_on_enter = false
 
 $autocomplete_disabled = false
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $ctrl
 
 $lng
 
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 

Detailed Description

This class represents a single choice wizard property in a property form.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

Definition at line 13 of file class.ilAnswerWizardInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilAnswerWizardInputGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Definition at line 29 of file class.ilAnswerWizardInputGUI.php.

References ilTextInputGUI\setSize().

30  {
31  parent::__construct($a_title, $a_postvar);
32  $this->setSize('25');
33  $this->validationRegexp = "";
34  }
setSize($a_size)
Set Size.
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilAnswerWizardInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Definition at line 194 of file class.ilAnswerWizardInputGUI.php.

References $_POST, $DIC, ilFormPropertyGUI\$lng, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), getMinValue(), ilFormPropertyGUI\getPostVar(), minvalueShouldBeGreater(), sanitizeSuperGlobalSubmitValue(), and ilFormPropertyGUI\setAlert().

195  {
196  global $DIC;
197  $lng = $DIC['lng'];
199  $foundvalues = $_POST[$this->getPostVar()];
200  if (is_array($foundvalues)) {
201  // check answers
202  if (is_array($foundvalues['answer'])) {
203  foreach ($foundvalues['answer'] as $aidx => $answervalue) {
204  if ((strlen($answervalue)) == 0) {
205  $this->setAlert($lng->txt("msg_input_is_required"));
206  return false;
207  }
208  }
209  }
210  // check points
211  $max = 0;
212  if (is_array($foundvalues['points'])) {
213  foreach ($foundvalues['points'] as $points) {
214  if ($points > $max) {
215  $max = $points;
216  }
217  if (((strlen($points)) == 0) || (!is_numeric($points))) {
218  $this->setAlert($lng->txt("form_msg_numeric_value_required"));
219  return false;
220  }
221  if ($this->minvalueShouldBeGreater()) {
222  if (trim($points) != "" &&
223  $this->getMinValue() !== false &&
224  $points <= $this->getMinValue()) {
225  $this->setAlert($lng->txt("form_msg_value_too_low"));
226 
227  return false;
228  }
229  } else {
230  if (trim($points) != "" &&
231  $this->getMinValue() !== false &&
232  $points < $this->getMinValue()) {
233  $this->setAlert($lng->txt("form_msg_value_too_low"));
234 
235  return false;
236  }
237  }
238  }
239  }
240  if ($max == 0) {
241  $this->setAlert($lng->txt("enter_enough_positive_points"));
242  return false;
243  }
244  } else {
245  $this->setAlert($lng->txt("msg_input_is_required"));
246  return false;
247  }
248 
249  return $this->checkSubItemsInput();
250  }
global $DIC
Definition: saml.php:7
getPostVar()
Get Post Variable.
setAlert($a_alert)
Set Alert Text.
minvalueShouldBeGreater()
Get minvalueShouldBeGreater.
$_POST["username"]
+ Here is the call graph for this function:

◆ getAllowMove()

ilAnswerWizardInputGUI::getAllowMove ( )

Get allow move.

Returns
boolean Allow move

Definition at line 130 of file class.ilAnswerWizardInputGUI.php.

References $allowMove.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getMinValue()

ilAnswerWizardInputGUI::getMinValue ( )

Get Minimum Value.

Returns
float Minimum Value

Definition at line 185 of file class.ilAnswerWizardInputGUI.php.

References $minvalue.

Referenced by ilAssClozeTestCombinationVariantsInputGUI\checkInput(), ilAssAnswerCorrectionsInputGUI\checkInput(), and checkInput().

+ Here is the caller graph for this function:

◆ getPointsInputLabel()

ilAnswerWizardInputGUI::getPointsInputLabel (   $lng)
protected
Parameters
$lng
Returns
mixed

Definition at line 356 of file class.ilAnswerWizardInputGUI.php.

References ilFormPropertyGUI\$lng.

Referenced by ilAssAnswerCorrectionsInputGUI\insert(), and insert().

357  {
358  return $lng->txt('points');
359  }
+ Here is the caller graph for this function:

◆ getQuestionObject()

ilAnswerWizardInputGUI::getQuestionObject ( )

Get question object.

Returns
object Value

Definition at line 110 of file class.ilAnswerWizardInputGUI.php.

References $qstObject.

◆ getSingleline()

ilAnswerWizardInputGUI::getSingleline ( )

Get singleline.

Returns
boolean Value

Definition at line 90 of file class.ilAnswerWizardInputGUI.php.

References $singleline.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getTemplate()

ilAnswerWizardInputGUI::getTemplate ( )
protected
Returns
string

Definition at line 364 of file class.ilAnswerWizardInputGUI.php.

Referenced by insert().

365  {
366  return "tpl.prop_answerwizardinput.html";
367  }
+ Here is the caller graph for this function:

◆ getTextInputLabel()

ilAnswerWizardInputGUI::getTextInputLabel (   $lng)
protected
Parameters
$lng
Returns
mixed

Definition at line 347 of file class.ilAnswerWizardInputGUI.php.

References ilFormPropertyGUI\$lng.

Referenced by ilAssAnswerCorrectionsInputGUI\insert(), and insert().

348  {
349  return $lng->txt('answer_text');
350  }
+ Here is the caller graph for this function:

◆ getValues()

ilAnswerWizardInputGUI::getValues ( )

Get Values.

Returns
array Values

Definition at line 70 of file class.ilAnswerWizardInputGUI.php.

References $values.

◆ insert()

ilAnswerWizardInputGUI::insert (   $a_tpl)

Insert property html.

Returns
int Size

Definition at line 257 of file class.ilAnswerWizardInputGUI.php.

References $DIC, $i, ilFormPropertyGUI\$lng, $tpl, ilTextInputGUI\$value, ilGlyphGUI\ADD, ilGlyphGUI\DOWN, ilGlyphGUI\get(), getAllowMove(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilTextInputGUI\getMaxLength(), getPointsInputLabel(), ilFormPropertyGUI\getPostVar(), getSingleline(), ilTextInputGUI\getSize(), getTemplate(), getTextInputLabel(), isAddRemoveAllowed(), ilUtil\prepareFormOutput(), ilGlyphGUI\REMOVE, and ilGlyphGUI\UP.

258  {
259  global $DIC;
260  $lng = $DIC['lng'];
261 
262  $tpl = new ilTemplate($this->getTemplate(), true, true, "Modules/TestQuestionPool");
263  $i = 0;
264  foreach ($this->values as $value) {
265  if ($this->getSingleline()) {
266  if (is_object($value)) {
267  $tpl->setCurrentBlock("prop_text_propval");
268  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getAnswertext()));
269  $tpl->parseCurrentBlock();
270  $tpl->setCurrentBlock("prop_points_propval");
271  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPoints()));
272  $tpl->parseCurrentBlock();
273  }
274  $tpl->setCurrentBlock('singleline');
275  $tpl->setVariable("SIZE", $this->getSize());
276  $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][$i]");
277  $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
278  $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
279  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
280  if ($this->getDisabled()) {
281  $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
282  }
283  $tpl->parseCurrentBlock();
284  } elseif (!$this->getSingleline()) {
285  if (is_object($value)) {
286  $tpl->setCurrentBlock("prop_points_propval");
287  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPoints()));
288  $tpl->parseCurrentBlock();
289  }
290  $tpl->setCurrentBlock('multiline');
291  $tpl->setVariable("PROPERTY_VALUE", $this->qstObject->prepareTextareaOutput($value->getAnswertext()));
292  $tpl->setVariable("MULTILINE_ID", $this->getPostVar() . "[answer][$i]");
293  $tpl->setVariable("MULTILINE_ROW_NUMBER", $i);
294  $tpl->setVariable("MULTILINE_POST_VAR", $this->getPostVar());
295  if ($this->getDisabled()) {
296  $tpl->setVariable("DISABLED_MULTILINE", " disabled=\"disabled\"");
297  }
298  $tpl->parseCurrentBlock();
299  }
300  if ($this->getAllowMove()) {
301  $tpl->setCurrentBlock("move");
302  $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][$i]");
303  $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][$i]");
304  $tpl->setVariable("ID", $this->getPostVar() . "[$i]");
305  $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
306  $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
307  $tpl->parseCurrentBlock();
308  }
309  $tpl->setCurrentBlock("row");
310  $tpl->setVariable("POST_VAR", $this->getPostVar());
311  $tpl->setVariable("ROW_NUMBER", $i);
312  $tpl->setVariable("ID", $this->getPostVar() . "[answer][$i]");
313  $tpl->setVariable("POINTS_ID", $this->getPostVar() . "[points][$i]");
314  if ($this->isAddRemoveAllowed()) {
315  $tpl->setVariable("ADD_REMOVE_ID", $this->getPostVar() . "[$i]");
316  $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][$i]");
317  $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][$i]");
318  $tpl->setVariable("ADD_BUTTON", ilGlyphGUI::get(ilGlyphGUI::ADD));
319  $tpl->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
320  }
321  if ($this->getDisabled()) {
322  $tpl->setVariable("DISABLED_POINTS", " disabled=\"disabled\"");
323  }
324  $tpl->parseCurrentBlock();
325  $i++;
326  }
327 
328  $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
329  $tpl->setVariable("ANSWER_TEXT", $this->getTextInputLabel($lng));
330  $tpl->setVariable("POINTS_TEXT", $this->getPointsInputLabel($lng));
331  $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
332 
333  $a_tpl->setCurrentBlock("prop_generic");
334  $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
335  $a_tpl->parseCurrentBlock();
336 
337  global $DIC;
338  $tpl = $DIC['tpl'];
339  $tpl->addJavascript("./Services/Form/js/ServiceFormWizardInput.js");
340  $tpl->addJavascript("./Modules/TestQuestionPool/templates/default/answerwizard.js");
341  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaxLength()
Get Max Length.
global $DIC
Definition: saml.php:7
$tpl
Definition: ilias.php:10
getPostVar()
Get Post Variable.
static get($a_glyph, $a_text="")
Get glyph html.
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:

◆ isAddRemoveAllowed()

ilAnswerWizardInputGUI::isAddRemoveAllowed ( )
Returns
bool

Definition at line 138 of file class.ilAnswerWizardInputGUI.php.

References $allowAddRemove.

Referenced by insert().

+ Here is the caller graph for this function:

◆ minvalueShouldBeGreater()

ilAnswerWizardInputGUI::minvalueShouldBeGreater ( )

Get minvalueShouldBeGreater.

Returns
boolean true if the minimum value should be greater than minvalue

Definition at line 166 of file class.ilAnswerWizardInputGUI.php.

References $minvalueShouldBeGreater.

Referenced by ilAssClozeTestCombinationVariantsInputGUI\checkInput(), ilAssAnswerCorrectionsInputGUI\checkInput(), checkInput(), and setMinvalueShouldBeGreater().

+ Here is the caller graph for this function:

◆ sanitizeSuperGlobalSubmitValue()

ilAnswerWizardInputGUI::sanitizeSuperGlobalSubmitValue ( )
protected

Definition at line 369 of file class.ilAnswerWizardInputGUI.php.

References $_POST, ilFormPropertyGUI\getPostVar(), and ilUtil\stripSlashesRecursive().

Referenced by ilAssClozeTestCombinationVariantsInputGUI\checkInput(), ilAssAnswerCorrectionsInputGUI\checkInput(), and checkInput().

370  {
371  if (isset($_POST[$this->getPostVar()]) && is_array($_POST[$this->getPostVar()])) {
373  }
374  }
getPostVar()
Get Post Variable.
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAllowAddRemove()

ilAnswerWizardInputGUI::setAllowAddRemove (   $allowAddRemove)
Parameters
bool$allowAddRemove

Definition at line 146 of file class.ilAnswerWizardInputGUI.php.

References $allowAddRemove.

147  {
148  $this->allowAddRemove = $allowAddRemove;
149  }

◆ setAllowMove()

ilAnswerWizardInputGUI::setAllowMove (   $a_allow_move)

Set allow move.

Parameters
boolean$a_allow_moveAllow move

Definition at line 120 of file class.ilAnswerWizardInputGUI.php.

121  {
122  $this->allowMove = $a_allow_move;
123  }

◆ setMinValue()

ilAnswerWizardInputGUI::setMinValue (   $a_minvalue)

Set Minimum Value.

Parameters
float$a_minvalueMinimum Value

Definition at line 175 of file class.ilAnswerWizardInputGUI.php.

176  {
177  $this->minvalue = $a_minvalue;
178  }

◆ setMinvalueShouldBeGreater()

ilAnswerWizardInputGUI::setMinvalueShouldBeGreater (   $a_bool)

Set minvalueShouldBeGreater.

Parameters
boolean$a_booltrue if the minimum value should be greater than minvalue

Definition at line 156 of file class.ilAnswerWizardInputGUI.php.

References minvalueShouldBeGreater().

157  {
158  $this->minvalueShouldBeGreater = $a_bool;
159  }
minvalueShouldBeGreater()
Get minvalueShouldBeGreater.
+ Here is the call graph for this function:

◆ setQuestionObject()

ilAnswerWizardInputGUI::setQuestionObject (   $a_value)

Set question object.

Parameters
object$a_valuetest object

Definition at line 100 of file class.ilAnswerWizardInputGUI.php.

101  {
102  $this->qstObject = &$a_value;
103  }

◆ setSingleline()

ilAnswerWizardInputGUI::setSingleline (   $a_value)

Set singleline.

Parameters
boolean$a_valueValue

Definition at line 80 of file class.ilAnswerWizardInputGUI.php.

81  {
82  $this->singleline = $a_value;
83  }

◆ setValue()

ilAnswerWizardInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Definition at line 41 of file class.ilAnswerWizardInputGUI.php.

References $index, and ilTextInputGUI\$value.

42  {
43  $this->values = array();
44  if (is_array($a_value)) {
45  if (is_array($a_value['answer'])) {
46  foreach ($a_value['answer'] as $index => $value) {
47  include_once "./Modules/TestQuestionPool/classes/class.assAnswerBinaryStateImage.php";
48  $answer = new ASS_AnswerBinaryStateImage($value, $a_value['points'][$index], $index, 1, $a_value['imagename'][$index]);
49  array_push($this->values, $answer);
50  }
51  }
52  }
53  }
Class for answers with a binary state indicator.
$index
Definition: metadata.php:60

◆ setValues()

ilAnswerWizardInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

Definition at line 60 of file class.ilAnswerWizardInputGUI.php.

61  {
62  $this->values = $a_values;
63  }

Field Documentation

◆ $allowAddRemove

ilAnswerWizardInputGUI::$allowAddRemove = true
protected

Definition at line 17 of file class.ilAnswerWizardInputGUI.php.

Referenced by isAddRemoveAllowed(), and setAllowAddRemove().

◆ $allowMove

ilAnswerWizardInputGUI::$allowMove = false
protected

Definition at line 16 of file class.ilAnswerWizardInputGUI.php.

Referenced by getAllowMove().

◆ $minvalue

ilAnswerWizardInputGUI::$minvalue = false
protected

Definition at line 20 of file class.ilAnswerWizardInputGUI.php.

Referenced by getMinValue().

◆ $minvalueShouldBeGreater

ilAnswerWizardInputGUI::$minvalueShouldBeGreater = false
protected

Definition at line 21 of file class.ilAnswerWizardInputGUI.php.

Referenced by minvalueShouldBeGreater().

◆ $qstObject

ilAnswerWizardInputGUI::$qstObject = null
protected

Definition at line 19 of file class.ilAnswerWizardInputGUI.php.

Referenced by getQuestionObject().

◆ $singleline

ilAnswerWizardInputGUI::$singleline = true
protected

Definition at line 18 of file class.ilAnswerWizardInputGUI.php.

Referenced by getSingleline().

◆ $values

ilAnswerWizardInputGUI::$values = array()
protected

The documentation for this class was generated from the following file: