ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMatchingWizardInputGUI Class Reference

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

+ Inheritance diagram for ilMatchingWizardInputGUI:
+ Collaboration diagram for ilMatchingWizardInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setSuffixes ($a_suffixes)
 Set Accepted Suffixes. More...
 
 getSuffixes ()
 Get Accepted Suffixes. More...
 
 setHideImages ($a_hide)
 Set hide images. More...
 
 setValues ($a_values)
 Set Values. More...
 
 getValues ()
 Get Values. More...
 
 setTextName ($a_value)
 
 setImageName ($a_value)
 
 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...
 
 setValue ($a_value)
 Set 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)
 Set multi values. More...
 
 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
 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 Attributes

 $text_name = ''
 
 $image_name = ''
 
 $values = array()
 
 $allowMove = false
 
 $qstObject = null
 
 $suffixes = array()
 
 $hideImages = 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...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. 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
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable
Returns
\ilMatchingWizardInputGUI

Reimplemented from ilTextInputGUI.

Definition at line 35 of file class.ilMatchingWizardInputGUI.php.

36 {
37 global $DIC;
38 $lng = $DIC['lng'];
39
40 parent::__construct($a_title, $a_postvar);
41 $this->setSuffixes(array("jpg", "jpeg", "png", "gif"));
42 $this->setSize('40');
43 $this->text_name = $lng->txt('answer_text');
44 $this->image_name = $lng->txt('answer_image');
45 }
setSuffixes($a_suffixes)
Set Accepted Suffixes.
setSize($a_size)
Set Size.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, ilFormPropertyGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), ilTextInputGUI\setSize(), and setSuffixes().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilMatchingWizardInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilTextInputGUI.

Definition at line 171 of file class.ilMatchingWizardInputGUI.php.

172 {
173 global $DIC;
174 $lng = $DIC['lng'];
175 include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
176 if (is_array($_POST[$this->getPostVar()])) {
178 }
179 $foundvalues = $_POST[$this->getPostVar()];
180 if (is_array($foundvalues)) {
181 // check answers
182 if (is_array($foundvalues['answer'])) {
183 foreach ($foundvalues['answer'] as $aidx => $answervalue) {
184 if (((strlen($answervalue)) == 0) && (strlen($foundvalues['imagename'][$aidx]) == 0)) {
185 $this->setAlert($lng->txt("msg_input_is_required"));
186 return false;
187 }
188 }
189 }
190 if (!$this->hideImages) {
191 if (is_array($_FILES[$this->getPostVar()]['error']['image'])) {
192 foreach ($_FILES[$this->getPostVar()]['error']['image'] as $index => $error) {
193 // error handling
194 if ($error > 0) {
195 switch ($error) {
196 case UPLOAD_ERR_INI_SIZE:
197 $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
198 return false;
199 break;
200
201 case UPLOAD_ERR_FORM_SIZE:
202 $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
203 return false;
204 break;
205
206 case UPLOAD_ERR_PARTIAL:
207 $this->setAlert($lng->txt("form_msg_file_partially_uploaded"));
208 return false;
209 break;
210
211 case UPLOAD_ERR_NO_FILE:
212 if ($this->getRequired()) {
213 if ((!strlen($foundvalues['imagename'][$index])) && (!strlen($foundvalues['answer'][$index]))) {
214 $this->setAlert($lng->txt("form_msg_file_no_upload"));
215 return false;
216 }
217 }
218 break;
219
220 case UPLOAD_ERR_NO_TMP_DIR:
221 $this->setAlert($lng->txt("form_msg_file_missing_tmp_dir"));
222 return false;
223 break;
224
225 case UPLOAD_ERR_CANT_WRITE:
226 $this->setAlert($lng->txt("form_msg_file_cannot_write_to_disk"));
227 return false;
228 break;
229
230 case UPLOAD_ERR_EXTENSION:
231 $this->setAlert($lng->txt("form_msg_file_upload_stopped_ext"));
232 return false;
233 break;
234 }
235 }
236 }
237 }
238
239 if (is_array($_FILES[$this->getPostVar()]['tmp_name']['image'])) {
240 foreach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname) {
241 $filename = $_FILES[$this->getPostVar()]['name']['image'][$index];
242 $filename_arr = pathinfo($filename);
243 $suffix = $filename_arr["extension"];
244
245 // check suffixes
246 if (strlen($tmpname) && is_array($this->getSuffixes())) {
247 $vir = ilUtil::virusHandling($tmpname, $filename);
248 if ($vir[0] == false) {
249 $this->setAlert($lng->txt("form_msg_file_virus_found") . "<br />" . $vir[1]);
250 return false;
251 }
252
253 if (!in_array(strtolower($suffix), $this->getSuffixes())) {
254 $this->setAlert($lng->txt("form_msg_file_wrong_file_type"));
255 return false;
256 }
257 }
258 }
259 }
260 }
261 }
262 return $this->checkSubItemsInput();
263 }
$filename
Definition: buildRTE.php:89
$_POST["username"]
getPostVar()
Get Post Variable.
setAlert($a_alert)
Set Alert Text.
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.
static virusHandling($a_file, $a_orig_name="", $a_clean=true)
scan file for viruses and clean files if possible
$index
Definition: metadata.php:128

References $_POST, $DIC, $filename, $index, ilFormPropertyGUI\$lng, ilTextInputGUI\$suffix, ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), ilSubEnabledFormPropertyGUI\checkSubItemsInput(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), getSuffixes(), ilFormPropertyGUI\setAlert(), ilUtil\stripSlashesRecursive(), and ilUtil\virusHandling().

+ Here is the call graph for this function:

◆ getAllowMove()

ilMatchingWizardInputGUI::getAllowMove ( )

Get allow move.

Returns
boolean Allow move

Definition at line 142 of file class.ilMatchingWizardInputGUI.php.

References $allowMove.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getQuestionObject()

ilMatchingWizardInputGUI::getQuestionObject ( )

Get question object.

Returns
object Value

Definition at line 122 of file class.ilMatchingWizardInputGUI.php.

References $qstObject.

◆ getSuffixes()

ilMatchingWizardInputGUI::getSuffixes ( )

Get Accepted Suffixes.

Returns
array Accepted Suffixes

Definition at line 62 of file class.ilMatchingWizardInputGUI.php.

References $suffixes.

Referenced by checkInput(), and insert().

+ Here is the caller graph for this function:

◆ getValues()

ilMatchingWizardInputGUI::getValues ( )

Get Values.

Returns
array Values

Definition at line 92 of file class.ilMatchingWizardInputGUI.php.

References $values.

◆ insert()

ilMatchingWizardInputGUI::insert (   $a_tpl)

Insert property html.

Returns
int Size

Reimplemented from ilTextInputGUI.

Definition at line 270 of file class.ilMatchingWizardInputGUI.php.

271 {
272 global $DIC;
273 $lng = $DIC['lng'];
274
275 $tpl = new ilTemplate("tpl.prop_matchingwizardinput.html", true, true, "Modules/TestQuestionPool");
276 $i = 0;
277 foreach ($this->values as $value) {
278 if (!$this->hideImages) {
279 if (strlen($value->picture)) {
280 $imagename = $this->qstObject->getImagePathWeb() . $value->picture;
281 if ($this->qstObject->getThumbSize()) {
282 if (@file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value->picture)) {
283 $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value->picture;
284 }
285 }
286 $tpl->setCurrentBlock('image');
287 $tpl->setVariable('SRC_IMAGE', $imagename);
288 $tpl->setVariable('IMAGE_NAME', $value->picture);
289 $tpl->setVariable('ALT_IMAGE', ilUtil::prepareFormOutput($value->text));
290 $tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
291 $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
292 $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
293 $tpl->parseCurrentBlock();
294 }
295 $tpl->setCurrentBlock('addimage');
296 $tpl->setVariable("IMAGE_BROWSE", $lng->txt('select_file'));
297 $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][$i]");
298 $tpl->setVariable("IMAGE_SUBMIT", $lng->txt("upload"));
299 $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
300 $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
301 $tpl->parseCurrentBlock();
302 }
303
304 if (is_object($value)) {
305 $tpl->setCurrentBlock("prop_text_propval");
306 $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->text));
307 $tpl->parseCurrentBlock();
308 }
309 // this block does not exist in the template
310 // $tpl->setCurrentBlock('singleline');
311 $tpl->setVariable("SIZE", $this->getSize());
312 $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][$i]");
313 $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
314 $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
315 $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
316 if ($this->getDisabled()) {
317 $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
318 }
319 $tpl->parseCurrentBlock();
320 if ($this->getAllowMove()) {
321 $tpl->setCurrentBlock("move");
322 $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][$i]");
323 $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][$i]");
324 $tpl->setVariable("ID", $this->getPostVar() . "[$i]");
325 $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
326 $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
327 $tpl->parseCurrentBlock();
328 }
329 $tpl->setCurrentBlock("row");
330 $tpl->setVariable("POST_VAR", $this->getPostVar());
331 $tpl->setVariable("ROW_NUMBER", $i + 1);
332 $tpl->setVariable("ROW_IDENTIFIER", $value->identifier);
333 $tpl->setVariable("ID", $this->getPostVar() . "[answer][$i]");
334 $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][$i]");
335 $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][$i]");
336 $tpl->setVariable("ADD_BUTTON", ilGlyphGUI::get(ilGlyphGUI::ADD));
337 $tpl->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
338 $tpl->parseCurrentBlock();
339 $i++;
340 }
341
342 if (!$this->hideImages) {
343 if (is_array($this->getSuffixes())) {
344 $suff_str = $delim = "";
345 foreach ($this->getSuffixes() as $suffix) {
346 $suff_str .= $delim . "." . $suffix;
347 $delim = ", ";
348 }
349 $tpl->setCurrentBlock('allowed_image_suffixes');
350 $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $lng->txt("file_allowed_suffixes") . " " . $suff_str);
351 $tpl->parseCurrentBlock();
352 }
353 $tpl->setCurrentBlock("image_heading");
354 $tpl->setVariable("ANSWER_IMAGE", $this->image_name);
355 $tpl->setVariable("TXT_MAX_SIZE", ilUtil::getFileSizeInfo());
356 $tpl->parseCurrentBlock();
357 }
358
359 $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
360 $tpl->setVariable("TEXT_YES", $lng->txt('yes'));
361 $tpl->setVariable("TEXT_NO", $lng->txt('no'));
362 $tpl->setVariable("DELETE_IMAGE_HEADER", $lng->txt('delete_image_header'));
363 $tpl->setVariable("DELETE_IMAGE_QUESTION", $lng->txt('delete_image_question'));
364 $tpl->setVariable("ANSWER_TEXT", $this->text_name);
365 $tpl->setVariable("NUMBER_TEXT", $lng->txt('row'));
366 $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
367
368 $a_tpl->setCurrentBlock("prop_generic");
369 $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
370 $a_tpl->parseCurrentBlock();
371 }
getFieldId()
Get Post Variable.
static get($a_glyph, $a_text="")
Get glyph html.
special template class to simplify handling of ITX/PEAR
getMaxLength()
Get Max Length.
static getFileSizeInfo()
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
$i
Definition: metadata.php:24
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl

References $DIC, $i, ilFormPropertyGUI\$lng, ilTextInputGUI\$suffix, $tpl, ilTextInputGUI\$value, ilGlyphGUI\ADD, ilGlyphGUI\DOWN, ilGlyphGUI\get(), getAllowMove(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilUtil\getFileSizeInfo(), ilTextInputGUI\getMaxLength(), ilFormPropertyGUI\getPostVar(), ilTextInputGUI\getSize(), getSuffixes(), ilUtil\prepareFormOutput(), ilGlyphGUI\REMOVE, and ilGlyphGUI\UP.

+ Here is the call graph for this function:

◆ setAllowMove()

ilMatchingWizardInputGUI::setAllowMove (   $a_allow_move)

Set allow move.

Parameters
boolean$a_allow_moveAllow move

Definition at line 132 of file class.ilMatchingWizardInputGUI.php.

133 {
134 $this->allowMove = $a_allow_move;
135 }

◆ setHideImages()

ilMatchingWizardInputGUI::setHideImages (   $a_hide)

Set hide images.

Parameters
bool$a_hideHide images

Definition at line 72 of file class.ilMatchingWizardInputGUI.php.

73 {
74 $this->hideImages = $a_hide;
75 }

◆ setImageName()

ilMatchingWizardInputGUI::setImageName (   $a_value)

Definition at line 102 of file class.ilMatchingWizardInputGUI.php.

103 {
104 $this->image_name = $a_value;
105 }

◆ setQuestionObject()

ilMatchingWizardInputGUI::setQuestionObject (   $a_value)

Set question object.

Parameters
object$a_valuetest object

Definition at line 112 of file class.ilMatchingWizardInputGUI.php.

113 {
114 $this->qstObject = &$a_value;
115 }

◆ setSuffixes()

ilMatchingWizardInputGUI::setSuffixes (   $a_suffixes)

Set Accepted Suffixes.

Parameters
array$a_suffixesAccepted Suffixes

Definition at line 52 of file class.ilMatchingWizardInputGUI.php.

53 {
54 $this->suffixes = $a_suffixes;
55 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setTextName()

ilMatchingWizardInputGUI::setTextName (   $a_value)

Definition at line 97 of file class.ilMatchingWizardInputGUI.php.

98 {
99 $this->text_name = $a_value;
100 }

◆ setValue()

ilMatchingWizardInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Reimplemented from ilTextInputGUI.

Definition at line 152 of file class.ilMatchingWizardInputGUI.php.

153 {
154 $this->values = array();
155 if (is_array($a_value)) {
156 if (is_array($a_value['answer'])) {
157 foreach ($a_value['answer'] as $index => $value) {
158 include_once "./Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php";
159 $answer = new assAnswerMatchingTerm($value, $a_value['imagename'][$index], $a_value['identifier'][$index]);
160 array_push($this->values, $answer);
161 }
162 }
163 }
164 }
Class for matching question terms.

References $index, and ilTextInputGUI\$value.

◆ setValues()

ilMatchingWizardInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

Definition at line 82 of file class.ilMatchingWizardInputGUI.php.

83 {
84 $this->values = $a_values;
85 }

Field Documentation

◆ $allowMove

ilMatchingWizardInputGUI::$allowMove = false
protected

Definition at line 22 of file class.ilMatchingWizardInputGUI.php.

Referenced by getAllowMove().

◆ $hideImages

ilMatchingWizardInputGUI::$hideImages = false
protected

Definition at line 25 of file class.ilMatchingWizardInputGUI.php.

◆ $image_name

ilMatchingWizardInputGUI::$image_name = ''
protected

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

◆ $qstObject

ilMatchingWizardInputGUI::$qstObject = null
protected

Definition at line 23 of file class.ilMatchingWizardInputGUI.php.

Referenced by getQuestionObject().

◆ $suffixes

ilMatchingWizardInputGUI::$suffixes = array()
protected

Definition at line 24 of file class.ilMatchingWizardInputGUI.php.

Referenced by getSuffixes().

◆ $text_name

ilMatchingWizardInputGUI::$text_name = ''
protected

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

◆ $values

ilMatchingWizardInputGUI::$values = array()
protected

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

Referenced by getValues().


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