ILIAS  release_8 Revision v8.24
ilAnswerWizardInputGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 
 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 (ilTemplate $a_tpl)
 
- Public Member Functions inherited from ilTextInputGUI
 __construct (string $a_title="", string $a_postvar="")
 
 setValue ($a_value)
 
 getValue ()
 
 setValidationFailureMessage (string $a_msg)
 
 getValidationFailureMessage ()
 
 setValidationRegexp (string $a_value)
 
 getValidationRegexp ()
 
 setMaxLength (?int $a_maxlength)
 
 getMaxLength ()
 
 setSize (int $a_size)
 
 setInlineStyle (string $a_style)
 
 getInlineStyle ()
 
 setCssClass (string $a_class)
 
 getCssClass ()
 
 setValueByArray (array $a_values)
 
 getSize ()
 
 setSuffix (string $a_value)
 
 getSuffix ()
 
 setInputType (string $a_type)
 set input type More...
 
 getInputType ()
 
 setSubmitFormOnEnter (bool $a_val)
 
 getSubmitFormOnEnter ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
 getDataSource ()
 
 setDataSource (string $href, string $a_delimiter=null)
 
 setDataSourceSubmitOnSelection (bool $a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl (string $a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 render (string $a_mode="")
 
 insert (ilTemplate $a_tpl)
 
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 
 setDisableHtmlAutoComplete (bool $autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
 getPostValueForComparison ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem (ilFormPropertyGUI $a_item)
 
 getSubItems ()
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct (string $a_title="", string $a_postvar="")
 
 executeCommand ()
 
 getType ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setPostVar (string $a_postvar)
 
 getPostVar ()
 
 getFieldId ()
 
 setInfo (string $a_info)
 
 getInfo ()
 
 setAlert (string $a_alert)
 
 getAlert ()
 
 setRequired (bool $a_required)
 
 getRequired ()
 
 setDisabled (bool $a_disabled)
 
 getDisabled ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm (ilPropertyFormGUI $a_parentform)
 
 getParentForm ()
 
 setParent (ilFormPropertyGUI $a_val)
 
 getParent ()
 
 getSubForm ()
 
 hideSubForm ()
 
 setHiddenTitle (string $a_val)
 
 getHiddenTitle ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
 serializeData ()
 
 unserializeData (string $a_data)
 
 setParentTable ($a_val)
 Set parent table. More...
 
 getParentTable ()
 Get parent table. More...
 
 writeToSession ()
 
 clearFromSession ()
 
 readFromSession ()
 
 getHiddenTag (string $a_post_var, string $a_value)
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 getMulti ()
 
 setMultiValues (array $a_values)
 
 getMultiValues ()
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback (string $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...
 
 setRequestParam (string $key, $val)
 This writes the request (aka post) values. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Protected Member Functions

 getTextInputLabel ($lng)
 
 getPointsInputLabel ($lng)
 
 getTemplate ()
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType (string $a_type)
 
 checkParentFormTable ()
 
 getSessionKey ()
 
 getMultiIconsHTML ()
 
 int ($key)
 
 intArray ($key)
 
 str ($key)
 
 raw ($key)
 
 strArray ($key)
 
 arrayArray ($key)
 
 isRequestParamArray (string $key)
 
 getRequestParam (string $key, Refinery\Transformation $t)
 

Protected Attributes

 $values = array()
 
 $allowMove = false
 
 $allowAddRemove = true
 
 $singleline = true
 
 $qstObject = null
 
 $minvalue = false
 
 $minvalueShouldBeGreater = false
 
- Protected Attributes inherited from ilTextInputGUI
 $value = null
 
int $maxlength = 200
 
int $size = 40
 
string $validationRegexp = ""
 
string $validationFailureMessage = ''
 
string $suffix = ""
 
string $style_css = ""
 
string $css_class = ""
 
string $ajax_datasource = ""
 
string $ajax_datasource_delimiter = null
 
bool $ajax_datasource_commit = false
 
string $ajax_datasource_commit_url = ""
 
bool $submit_form_on_enter = false
 
bool $autocomplete_disabled = false
 
string $input_type = ""
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
array $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
array $set_params = []
 
ilTable2GUI $parent_table = null
 
ilFormPropertyGUI $parent_gui = null
 
ilCtrl $ctrl
 
ilLanguage $lng
 
string $type = ""
 
string $title = ""
 
string $postvar = ""
 
string $info = ""
 
string $alert = ""
 
bool $required = false
 
ilPropertyFormGUI $parentform = null
 
string $hidden_title = ""
 
bool $multi = false
 
bool $multi_sortable = false
 
bool $multi_addremove = true
 
array $multi_values = []
 
RequestInterface $request
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
bool $disabled = false
 
ilGlobalTemplateInterface $global_tpl = null
 

Additional Inherited Members

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

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 26 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 42 of file class.ilAnswerWizardInputGUI.php.

43 {
44 parent::__construct($a_title, $a_postvar);
45 $this->setSize('25');
46 $this->validationRegexp = "";
47 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), and ilTextInputGUI\setSize().

+ 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

Reimplemented from ilTextInputGUI.

Reimplemented in ilAssAnswerCorrectionsInputGUI, ilAssClozeTestCombinationVariantsInputGUI, and ilAssLongmenuCorrectionsInputGUI.

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

203 : bool
204 {
205 global $DIC;
206 $lng = $DIC['lng'];
207
208 $foundvalues = $_POST[$this->getPostVar()];
209 if (is_array($foundvalues)) {
210 $foundvalues = ilArrayUtil::stripSlashesRecursive($foundvalues);
211 // check answers
212 if (is_array($foundvalues['answer'])) {
213 foreach ($foundvalues['answer'] as $aidx => $answervalue) {
214 if ((strlen($answervalue)) == 0) {
215 $this->setAlert($lng->txt("msg_input_is_required"));
216 return false;
217 }
218 }
219 }
220 // check points
221 $max = 0;
222 if (is_array($foundvalues['points'])) {
223 foreach ($foundvalues['points'] as $points) {
224 if ($points > $max) {
225 $max = $points;
226 }
227 if (((strlen($points)) == 0) || (!is_numeric($points))) {
228 $this->setAlert($lng->txt("form_msg_numeric_value_required"));
229 return false;
230 }
231 if ($this->minvalueShouldBeGreater()) {
232 if (trim($points) != "" &&
233 $this->getMinValue() !== false &&
234 $points <= $this->getMinValue()) {
235 $this->setAlert($lng->txt("form_msg_value_too_low"));
236
237 return false;
238 }
239 } else {
240 if (trim($points) != "" &&
241 $this->getMinValue() !== false &&
242 $points < $this->getMinValue()) {
243 $this->setAlert($lng->txt("form_msg_value_too_low"));
244
245 return false;
246 }
247 }
248 }
249 }
250 if ($max == 0) {
251 $this->setAlert($lng->txt("enter_enough_positive_points"));
252 return false;
253 }
254 } else {
255 $this->setAlert($lng->txt("msg_input_is_required"));
256 return false;
257 }
258
259 return $this->checkSubItemsInput();
260 }
minvalueShouldBeGreater()
Get minvalueShouldBeGreater.
static stripSlashesRecursive($a_data, bool $a_strip_html=true, string $a_allow="")
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...
global $DIC
Definition: feed.php:28

References $DIC, ilFormPropertyGUI\$lng, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), getMinValue(), ilFormPropertyGUI\getPostVar(), minvalueShouldBeGreater(), ilFormPropertyGUI\setAlert(), ilArrayUtil\stripSlashesRecursive(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getAllowMove()

ilAnswerWizardInputGUI::getAllowMove ( )

Get allow move.

Returns
boolean Allow move

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

140 : bool
141 {
142 return $this->allowMove;
143 }

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 195 of file class.ilAnswerWizardInputGUI.php.

References $minvalue.

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

+ Here is the caller graph for this function:

◆ getPointsInputLabel()

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

Reimplemented in ilLogicalAnswerComparisonExpressionInputGUI.

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

371 {
372 return $lng->txt('points');
373 }

References ilFormPropertyGUI\$lng, and ilLanguage\txt().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionObject()

ilAnswerWizardInputGUI::getQuestionObject ( )

Get question object.

Returns
object Value

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

120 : ?object
121 {
122 return $this->qstObject;
123 }

References $qstObject.

◆ getSingleline()

ilAnswerWizardInputGUI::getSingleline ( )

Get singleline.

Returns
boolean Value

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

100 : bool
101 {
102 return $this->singleline;
103 }

References $singleline.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getTemplate()

ilAnswerWizardInputGUI::getTemplate ( )
protected
Returns
string

Reimplemented in ilLogicalAnswerComparisonExpressionInputGUI.

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

378 : string
379 {
380 return "tpl.prop_answerwizardinput.html";
381 }

Referenced by insert().

+ Here is the caller graph for this function:

◆ getTextInputLabel()

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

Reimplemented in ilLogicalAnswerComparisonExpressionInputGUI.

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

362 {
363 return $lng->txt('answer_text');
364 }

References ilFormPropertyGUI\$lng, and ilLanguage\txt().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getValues()

ilAnswerWizardInputGUI::getValues ( )

Get Values.

Returns
array Values

Reimplemented in ilLogicalAnswerComparisonExpressionInputGUI.

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

80 : array
81 {
82 return $this->values;
83 }

References $values.

◆ insert()

ilAnswerWizardInputGUI::insert ( ilTemplate  $a_tpl)

Reimplemented from ilTextInputGUI.

Reimplemented in ilAssAnswerCorrectionsInputGUI, ilAssClozeTestCombinationVariantsInputGUI, and ilAssLongmenuCorrectionsInputGUI.

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

262 : void
263 {
264 global $DIC;
265 $lng = $DIC['lng'];
266
267 $tpl = new ilTemplate($this->getTemplate(), true, true, "Modules/TestQuestionPool");
268 $i = 0;
269 foreach ($this->values as $value) {
270 if ($this->getSingleline()) {
271 if (is_object($value)) {
272 $tpl->setCurrentBlock("prop_text_propval");
273 $tpl->setVariable(
274 "PROPERTY_VALUE",
276 );
277 $tpl->parseCurrentBlock();
278 $tpl->setCurrentBlock("prop_points_propval");
279 $tpl->setVariable(
280 "PROPERTY_VALUE",
282 );
283 $tpl->parseCurrentBlock();
284 }
285 $tpl->setCurrentBlock('singleline');
286 $tpl->setVariable("SIZE", $this->getSize());
287 $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][$i]");
288 $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
289 $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
290 $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
291 if ($this->getDisabled()) {
292 $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
293 }
294 $tpl->parseCurrentBlock();
295 } elseif (!$this->getSingleline()) {
296 if (is_object($value)) {
297 $tpl->setCurrentBlock("prop_points_propval");
298 $tpl->setVariable(
299 "PROPERTY_VALUE",
301 );
302 $tpl->parseCurrentBlock();
303 }
304 $tpl->setCurrentBlock('multiline');
305 $tpl->setVariable("PROPERTY_VALUE", $this->qstObject->prepareTextareaOutput($value->getAnswertext()));
306 $tpl->setVariable("MULTILINE_ID", $this->getPostVar() . "[answer][$i]");
307 $tpl->setVariable("MULTILINE_ROW_NUMBER", $i);
308 $tpl->setVariable("MULTILINE_POST_VAR", $this->getPostVar());
309 if ($this->getDisabled()) {
310 $tpl->setVariable("DISABLED_MULTILINE", " disabled=\"disabled\"");
311 }
312 $tpl->parseCurrentBlock();
313 }
314 if ($this->getAllowMove()) {
315 $tpl->setCurrentBlock("move");
316 $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][$i]");
317 $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][$i]");
318 $tpl->setVariable("ID", $this->getPostVar() . "[$i]");
319 $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
320 $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
321 $tpl->parseCurrentBlock();
322 }
323 $tpl->setCurrentBlock("row");
324 $tpl->setVariable("POST_VAR", $this->getPostVar());
325 $tpl->setVariable("ROW_NUMBER", $i);
326 $tpl->setVariable("ID", $this->getPostVar() . "[answer][$i]");
327 $tpl->setVariable("POINTS_ID", $this->getPostVar() . "[points][$i]");
328 if ($this->isAddRemoveAllowed()) {
329 $tpl->setVariable("ADD_REMOVE_ID", $this->getPostVar() . "[$i]");
330 $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][$i]");
331 $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][$i]");
332 $tpl->setVariable("ADD_BUTTON", ilGlyphGUI::get(ilGlyphGUI::ADD));
333 $tpl->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
334 }
335 if ($this->getDisabled()) {
336 $tpl->setVariable("DISABLED_POINTS", " disabled=\"disabled\"");
337 }
338 $tpl->parseCurrentBlock();
339 $i++;
340 }
341
342 $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
343 $tpl->setVariable("ANSWER_TEXT", $this->getTextInputLabel($lng));
344 $tpl->setVariable("POINTS_TEXT", $this->getPointsInputLabel($lng));
345 $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
346
347 $a_tpl->setCurrentBlock("prop_generic");
348 $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
349 $a_tpl->parseCurrentBlock();
350
351 global $DIC;
352 $tpl = $DIC['tpl'];
353 $tpl->addJavascript("./Services/Form/js/ServiceFormWizardInput.js");
354 $tpl->addJavascript("./Modules/TestQuestionPool/templates/default/answerwizard.js");
355 }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
static get(string $a_glyph, string $a_text="")
static prepareFormOutput($a_str, bool $a_strip=false)
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
$i
Definition: metadata.php:41

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(), ilTemplate\parseCurrentBlock(), ilLegacyFormElementsUtil\prepareFormOutput(), ilGlyphGUI\REMOVE, ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), ilLanguage\txt(), and ilGlyphGUI\UP.

+ Here is the call graph for this function:

◆ isAddRemoveAllowed()

ilAnswerWizardInputGUI::isAddRemoveAllowed ( )
Returns
bool

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

148 : bool
149 {
151 }

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 176 of file class.ilAnswerWizardInputGUI.php.

References $minvalueShouldBeGreater.

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

+ Here is the caller graph for this function:

◆ setAllowAddRemove()

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

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

156 : void
157 {
158 $this->allowAddRemove = $allowAddRemove;
159 }

References $allowAddRemove.

◆ setAllowMove()

ilAnswerWizardInputGUI::setAllowMove (   $a_allow_move)

Set allow move.

Parameters
boolean$a_allow_moveAllow move

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

130 : void
131 {
132 $this->allowMove = $a_allow_move;
133 }

◆ setMinValue()

ilAnswerWizardInputGUI::setMinValue (   $a_minvalue)

Set Minimum Value.

Parameters
float$a_minvalueMinimum Value

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

185 : void
186 {
187 $this->minvalue = $a_minvalue;
188 }

◆ setMinvalueShouldBeGreater()

ilAnswerWizardInputGUI::setMinvalueShouldBeGreater (   $a_bool)

Set minvalueShouldBeGreater.

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

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

166 : void
167 {
168 $this->minvalueShouldBeGreater = $a_bool;
169 }

References 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 110 of file class.ilAnswerWizardInputGUI.php.

110 : void
111 {
112 $this->qstObject = &$a_value;
113 }

◆ setSingleline()

ilAnswerWizardInputGUI::setSingleline (   $a_value)

Set singleline.

Parameters
boolean$a_valueValue

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

90 : void
91 {
92 $this->singleline = $a_value;
93 }

◆ setValue()

ilAnswerWizardInputGUI::setValue (   $a_value)
Parameters
string | array$a_value

Reimplemented from ilTextInputGUI.

Reimplemented in ilAssAnswerCorrectionsInputGUI, and ilAssClozeTestCombinationVariantsInputGUI.

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

49 : void
50 {
51 $this->values = array();
52 if (is_array($a_value)) {
53 if (is_array($a_value['answer'])) {
54 foreach ($a_value['answer'] as $index => $value) {
55 $answer = new ASS_AnswerBinaryStateImage($value, $a_value['points'][$index], $index, 1, -1);
56 if (isset($a_value['imagename'][$index])) {
57 $answer->setImage($a_value['imagename'][$index]);
58 }
59 array_push($this->values, $answer);
60 }
61 }
62 }
63 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$index
Definition: metadata.php:145

References $index, and ilTextInputGUI\$value.

◆ setValues()

ilAnswerWizardInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

Reimplemented in ilLogicalAnswerComparisonExpressionInputGUI.

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

70 : void
71 {
72 $this->values = $a_values;
73 }

Field Documentation

◆ $allowAddRemove

ilAnswerWizardInputGUI::$allowAddRemove = true
protected

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

Referenced by isAddRemoveAllowed(), and setAllowAddRemove().

◆ $allowMove

ilAnswerWizardInputGUI::$allowMove = false
protected

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

Referenced by getAllowMove().

◆ $minvalue

ilAnswerWizardInputGUI::$minvalue = false
protected

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

Referenced by getMinValue().

◆ $minvalueShouldBeGreater

ilAnswerWizardInputGUI::$minvalueShouldBeGreater = false
protected

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

Referenced by minvalueShouldBeGreater().

◆ $qstObject

ilAnswerWizardInputGUI::$qstObject = null
protected

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

Referenced by getQuestionObject().

◆ $singleline

ilAnswerWizardInputGUI::$singleline = true
protected

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

Referenced by getSingleline().

◆ $values

ilAnswerWizardInputGUI::$values = array()
protected

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