ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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="")
 
 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...
 
 setValue ($a_value)
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 insert (ilTemplate $a_tpl)
 Insert property html. More...
 
 setPending (string $a_val)
 
 getPending ()
 
- 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 ()
 
 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)
 
- 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
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 

Protected Attributes

 $text_name = ''
 
 $image_name = ''
 
 $values = array()
 
 $qstObject = null
 
 $suffixes = array()
 
 $hideImages = false
 
GlyphFactory $glyph_factory
 
Renderer $renderer
 
UploadLimitResolver $upload_limit
 
- 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
 

Private Attributes

string $pending
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 symbol ()
 
 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)
 

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 33 of file class.ilMatchingWizardInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, ilFormPropertyGUI\$lng, ILIAS\MetaData\Repository\Validation\Data\__construct(), ilTextInputGUI\setMaxLength(), ilTextInputGUI\setSize(), setSuffixes(), and ilLanguage\txt().

48  {
49  parent::__construct($a_title, $a_postvar);
50 
51  global $DIC;
52  $this->glyph_factory = $DIC->ui()->factory()->symbol()->glyph();
53  $this->renderer = $DIC->ui()->renderer();
54  $this->upload_limit = $DIC['ui.upload_limit_resolver'];
55 
56  $this->setSuffixes(array("jpg", "jpeg", "png", "gif"));
57  $this->setSize('40');
58  $this->setMaxLength(800);
59 
60  $lng = $DIC['lng'];
61  $this->text_name = $lng->txt('answer_text');
62  $this->image_name = $lng->txt('answer_image');
63  }
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...
setSuffixes($a_suffixes)
Set Accepted Suffixes.
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
setMaxLength(?int $a_maxlength)
+ 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

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

References $DIC, $filename, ilFormPropertyGUI\$lng, ilTextInputGUI\$suffix, ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), ilSubEnabledFormPropertyGUI\checkSubItemsInput(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), getSuffixes(), ilFormPropertyGUI\setAlert(), ilArrayUtil\stripSlashesRecursive(), ilLanguage\txt(), and ilVirusScanner\virusHandling().

166  : bool
167  {
168  global $DIC;
169  $lng = $DIC['lng'];
170 
171  if (is_array($_POST[$this->getPostVar()])) {
172  $foundvalues = ilArrayUtil::stripSlashesRecursive(
173  $_POST[$this->getPostVar()],
174  true,
176  );
177  } else {
178  $foundvalues = $_POST[$this->getPostVar()];
179  }
180  if (is_array($foundvalues)) {
181  // check answers
182  if (is_array($foundvalues['answer'])) {
183  foreach ($foundvalues['answer'] as $aidx => $answervalue) {
184  if ($answervalue === '' && (
185  (!isset($foundvalues['imagename'][$aidx]) || $foundvalues['imagename'][$aidx] === '') &&
186  !isset($_FILES[$this->getPostVar()]['tmp_name']['image'][$aidx])
187  )) {
188  // If there is to text answer, no already staged image, and no uploaded image ...
189  $this->setAlert($lng->txt("msg_input_is_required"));
190  return false;
191  }
192  }
193  }
194 
195  if (!$this->hideImages) {
196  if (is_array($_FILES[$this->getPostVar()]['error']['image'])) {
197  foreach ($_FILES[$this->getPostVar()]['error']['image'] as $index => $error) {
198  // error handling
199  if ($error > 0) {
200  switch ($error) {
201  case UPLOAD_ERR_FORM_SIZE:
202  case UPLOAD_ERR_INI_SIZE:
203  $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
204  return false;
205  break;
206 
207  case UPLOAD_ERR_PARTIAL:
208  $this->setAlert($lng->txt("form_msg_file_partially_uploaded"));
209  return false;
210  break;
211 
212  case UPLOAD_ERR_NO_FILE:
213  if ($this->getRequired()) {
214  if ((!isset($foundvalues['imagename'][$index]) || $foundvalues['imagename'][$index] === '') &&
215  (!isset($foundvalues['answer'][$index]) && $foundvalues['answer'][$index] === '')) {
216  $this->setAlert($lng->txt("form_msg_file_no_upload"));
217  return false;
218  }
219  }
220  break;
221 
222  case UPLOAD_ERR_NO_TMP_DIR:
223  $this->setAlert($lng->txt("form_msg_file_missing_tmp_dir"));
224  return false;
225  break;
226 
227  case UPLOAD_ERR_CANT_WRITE:
228  $this->setAlert($lng->txt("form_msg_file_cannot_write_to_disk"));
229  return false;
230  break;
231 
232  case UPLOAD_ERR_EXTENSION:
233  $this->setAlert($lng->txt("form_msg_file_upload_stopped_ext"));
234  return false;
235  break;
236  }
237  }
238  }
239  }
240 
241  if (is_array($_FILES[$this->getPostVar()]['tmp_name']['image'])) {
242  foreach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname) {
243  $filename = $_FILES[$this->getPostVar()]['name']['image'][$index];
244  $filename_arr = pathinfo($filename);
245  $suffix = '';
246  if (isset($filename_arr['extension'])) {
247  $suffix = $filename_arr["extension"];
248  }
249 
250  // check suffixes
251  if ($tmpname != '' && is_array($this->getSuffixes())) {
252  $vir = ilVirusScanner::virusHandling($tmpname, $filename);
253  if ($vir[0] == false) {
254  $this->setAlert($lng->txt("form_msg_file_virus_found") . "<br />" . $vir[1]);
255  return false;
256  }
257 
258  if (!in_array(strtolower($suffix), $this->getSuffixes())) {
259  $this->setAlert($lng->txt("form_msg_file_wrong_file_type"));
260  return false;
261  }
262  }
263  }
264  }
265  }
266  }
267  return $this->checkSubItemsInput();
268  }
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...
static virusHandling(string $a_file, string $a_orig_name='', bool $a_clean=true)
global $DIC
Definition: feed.php:28
static _getUsedHTMLTagsAsString(string $a_module="")
Returns a string of all allowed HTML tags for text editing.
$filename
Definition: buildRTE.php:78
+ Here is the call graph for this function:

◆ getPending()

ilMatchingWizardInputGUI::getPending ( )

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

References $pending.

383  : string
384  {
385  return $this->pending;
386  }

◆ getQuestionObject()

ilMatchingWizardInputGUI::getQuestionObject ( )

Get question object.

Returns
object Value

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

References $qstObject.

140  : ?object
141  {
142  return $this->qstObject;
143  }

◆ getSuffixes()

ilMatchingWizardInputGUI::getSuffixes ( )

Get Accepted Suffixes.

Returns
array Accepted Suffixes

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

References $suffixes.

Referenced by checkInput(), and insert().

80  : array
81  {
82  return $this->suffixes;
83  }
+ Here is the caller graph for this function:

◆ getValues()

ilMatchingWizardInputGUI::getValues ( )

Get Values.

Returns
array Values

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

References $values.

110  : array
111  {
112  return $this->values;
113  }

◆ insert()

ilMatchingWizardInputGUI::insert ( ilTemplate  $a_tpl)

Insert property html.

Returns
void Size

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

References $DIC, ilFormPropertyGUI\$global_tpl, ilFormPropertyGUI\$lng, ilTextInputGUI\$suffix, ilTextInputGUI\$value, ilGlobalTemplateInterface\addOnLoadCode(), ilFormPropertyGUI\getDisabled(), ilFileUtils\getFileSizeInfo(), ilTextInputGUI\getMaxLength(), ilFormPropertyGUI\getPostVar(), ilTextInputGUI\getSize(), getSuffixes(), ILIAS\Repository\lng(), ilTemplate\parseCurrentBlock(), ilLegacyFormElementsUtil\prepareFormOutput(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ilLanguage\txt().

274  : void
275  {
276  global $DIC;
277  $lng = $DIC['lng'];
278  $global_tpl = $DIC['tpl'];
279  $global_tpl->addJavascript('./Modules/TestQuestionPool/templates/default/matchinginput.js');
280  $global_tpl->addOnLoadCode('il.test.matchingquestion.init();');
281 
282  $tpl = new ilTemplate("tpl.prop_matchingwizardinput.html", true, true, "Modules/TestQuestionPool");
283  $i = 0;
284  foreach ($this->values as $value) {
285  if (!$this->hideImages) {
286  if ($value->getPicture() &&
287  file_exists($this->qstObject->getImagePath() . $value->getPicture())
288  ) {
289  $imagename = $this->qstObject->getImagePathWeb() . $value->getPicture();
290  if ($this->qstObject->getThumbSize()) {
291  if (file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value->getPicture())) {
292  $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value->getPicture();
293  }
294  }
295 
296  $tpl->setCurrentBlock('image');
297  $tpl->setVariable('SRC_IMAGE', $imagename);
298  $tpl->setVariable('IMAGE_NAME', $value->getPicture());
299  $tpl->setVariable('ALT_IMAGE', ilLegacyFormElementsUtil::prepareFormOutput($value->getText()));
300  $tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
301  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
302  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
303  $tpl->parseCurrentBlock();
304  }
305  $tpl->setCurrentBlock('addimage');
306  $tpl->setVariable("IMAGE_BROWSE", $lng->txt('select_file'));
307  $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][$i]");
308  $tpl->setVariable('MAX_SIZE_WARNING', $this->lng->txt('form_msg_file_size_exceeds'));
309  $tpl->setVariable('MAX_SIZE', $this->upload_limit->getPhpUploadLimitInBytes());
310  $tpl->setVariable("IMAGE_SUBMIT", $lng->txt("upload"));
311  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
312  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
313  $tpl->parseCurrentBlock();
314  }
315 
316  if (is_object($value)) {
317  $tpl->setCurrentBlock("prop_text_propval");
318  $tpl->setVariable("PROPERTY_VALUE", ilLegacyFormElementsUtil::prepareFormOutput($value->getText()));
319  $tpl->parseCurrentBlock();
320  }
321  // this block does not exist in the template
322  // $tpl->setCurrentBlock('singleline');
323  $tpl->setVariable("SIZE", $this->getSize());
324  $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][$i]");
325  $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
326  $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
327  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
328  if ($this->getDisabled()) {
329  $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
330  }
331  $tpl->parseCurrentBlock();
332  $tpl->setCurrentBlock("row");
333  $tpl->setVariable("POST_VAR", $this->getPostVar());
334  $tpl->setVariable("ROW_NUMBER", $i + 1);
335  $tpl->setVariable("ROW_IDENTIFIER", $value->getIdentifier());
336  $tpl->setVariable("ID", $this->getPostVar() . "[answer][$i]");
337  $tpl->setVariable("ADD_BUTTON", $this->renderer->render(
338  $this->glyph_factory->add()->withAction('#')
339  ));
340  $tpl->setVariable("REMOVE_BUTTON", $this->renderer->render(
341  $this->glyph_factory->remove()->withAction('#')
342  ));
343  $tpl->parseCurrentBlock();
344  $i++;
345  }
346 
347  if (!$this->hideImages) {
348  if (is_array($this->getSuffixes())) {
349  $suff_str = $delim = "";
350  foreach ($this->getSuffixes() as $suffix) {
351  $suff_str .= $delim . "." . $suffix;
352  $delim = ", ";
353  }
354  $tpl->setCurrentBlock('allowed_image_suffixes');
355  $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $lng->txt("file_allowed_suffixes") . " " . $suff_str);
356  $tpl->parseCurrentBlock();
357  }
358  $tpl->setCurrentBlock("image_heading");
359  $tpl->setVariable("ANSWER_IMAGE", $this->image_name);
360  $tpl->setVariable("TXT_MAX_SIZE", ilFileUtils::getFileSizeInfo());
361  $tpl->parseCurrentBlock();
362  }
363 
364  $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
365  $tpl->setVariable("TEXT_YES", $lng->txt('yes'));
366  $tpl->setVariable("TEXT_NO", $lng->txt('no'));
367  $tpl->setVariable("DELETE_IMAGE_HEADER", $lng->txt('delete_image_header'));
368  $tpl->setVariable("DELETE_IMAGE_QUESTION", $lng->txt('delete_image_question'));
369  $tpl->setVariable("ANSWER_TEXT", $this->text_name);
370  $tpl->setVariable("NUMBER_TEXT", $lng->txt('row'));
371  $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
372 
373  $a_tpl->setCurrentBlock("prop_generic");
374  $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
375  $a_tpl->parseCurrentBlock();
376  }
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...
static prepareFormOutput($a_str, bool $a_strip=false)
global $DIC
Definition: feed.php:28
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:546
ilGlobalTemplateInterface $global_tpl
static getFileSizeInfo()
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ setHideImages()

ilMatchingWizardInputGUI::setHideImages (   $a_hide)

Set hide images.

Parameters
bool$a_hideHide images

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

Referenced by assMatchingQuestionGUI\populateAnswerSpecificFormPart().

90  : void
91  {
92  $this->hideImages = $a_hide;
93  }
+ Here is the caller graph for this function:

◆ setImageName()

ilMatchingWizardInputGUI::setImageName (   $a_value)

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

120  : void
121  {
122  $this->image_name = $a_value;
123  }

◆ setPending()

ilMatchingWizardInputGUI::setPending ( string  $a_val)

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

378  : void
379  {
380  $this->pending = $a_val;
381  }

◆ setQuestionObject()

ilMatchingWizardInputGUI::setQuestionObject (   $a_value)

Set question object.

Parameters
object$a_valuetest object

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

130  : void
131  {
132  $this->qstObject = &$a_value;
133  }

◆ setSuffixes()

ilMatchingWizardInputGUI::setSuffixes (   $a_suffixes)

Set Accepted Suffixes.

Parameters
array$a_suffixesAccepted Suffixes

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

Referenced by __construct().

70  : void
71  {
72  $this->suffixes = $a_suffixes;
73  }
+ Here is the caller graph for this function:

◆ setTextName()

ilMatchingWizardInputGUI::setTextName (   $a_value)

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

115  : void
116  {
117  $this->text_name = $a_value;
118  }

◆ setValue()

ilMatchingWizardInputGUI::setValue (   $a_value)

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

References ilTextInputGUI\$value.

145  : void
146  {
147  $this->values = array();
148  if (is_array($a_value)) {
149  if (is_array($a_value['answer'])) {
150  foreach ($a_value['answer'] as $index => $value) {
151  $answer = new assAnswerMatchingTerm(
152  $value,
153  $a_value['imagename'][$index] ?? 0,
154  $a_value['identifier'][$index] ?? 0
155  );
156  array_push($this->values, $answer);
157  }
158  }
159  }
160  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ setValues()

ilMatchingWizardInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

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

100  : void
101  {
102  $this->values = $a_values;
103  }

Field Documentation

◆ $glyph_factory

GlyphFactory ilMatchingWizardInputGUI::$glyph_factory
protected

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

◆ $hideImages

ilMatchingWizardInputGUI::$hideImages = false
protected

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

◆ $image_name

ilMatchingWizardInputGUI::$image_name = ''
protected

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

◆ $pending

string ilMatchingWizardInputGUI::$pending
private

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

Referenced by getPending().

◆ $qstObject

ilMatchingWizardInputGUI::$qstObject = null
protected

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

Referenced by getQuestionObject().

◆ $renderer

Renderer ilMatchingWizardInputGUI::$renderer
protected

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

◆ $suffixes

ilMatchingWizardInputGUI::$suffixes = array()
protected

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

Referenced by getSuffixes().

◆ $text_name

ilMatchingWizardInputGUI::$text_name = ''
protected

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

◆ $upload_limit

UploadLimitResolver ilMatchingWizardInputGUI::$upload_limit
protected

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

◆ $values

ilMatchingWizardInputGUI::$values = array()
protected

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

Referenced by getValues().


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