ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMatchingWizardInputGUI 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 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...
 
 setAllowMove ($a_allow_move)
 Set allow move. More...
 
 getAllowMove ()
 Get allow move. 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()
 
 $allowMove = false
 
 $qstObject = null
 
 $suffixes = array()
 
 $hideImages = 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
 

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
 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 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
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

44  {
45  global $DIC;
46  $lng = $DIC['lng'];
47 
48  parent::__construct($a_title, $a_postvar);
49  $this->setSuffixes(array("jpg", "jpeg", "png", "gif"));
50  $this->setSize('40');
51  $this->setMaxLength(800);
52  $this->text_name = $lng->txt('answer_text');
53  $this->image_name = $lng->txt('answer_image');
54  }
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
setMaxLength(?int $a_maxlength)
__construct(Container $dic, ilPlugin $plugin)
+ 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 177 of file class.ilMatchingWizardInputGUI.php.

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

177  : bool
178  {
179  global $DIC;
180  $lng = $DIC['lng'];
181  include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
182  if (is_array($_POST[$this->getPostVar()])) {
183  $foundvalues = ilArrayUtil::stripSlashesRecursive(
184  $_POST[$this->getPostVar()],
185  true,
187  );
188  } else {
189  $foundvalues = $_POST[$this->getPostVar()];
190  }
191  if (is_array($foundvalues)) {
192  // check answers
193  if (is_array($foundvalues['answer'])) {
194  foreach ($foundvalues['answer'] as $aidx => $answervalue) {
195  if ($answervalue === '' && (
196  (!isset($foundvalues['imagename'][$aidx]) || $foundvalues['imagename'][$aidx] === '') &&
197  !isset($_FILES[$this->getPostVar()]['tmp_name']['image'][$aidx])
198  )) {
199  // If there is to text answer, no already staged image, and no uploaded image ...
200  $this->setAlert($lng->txt("msg_input_is_required"));
201  return false;
202  }
203  }
204  }
205 
206  if (!$this->hideImages) {
207  if (is_array($_FILES[$this->getPostVar()]['error']['image'])) {
208  foreach ($_FILES[$this->getPostVar()]['error']['image'] as $index => $error) {
209  // error handling
210  if ($error > 0) {
211  switch ($error) {
212  case UPLOAD_ERR_FORM_SIZE:
213  case UPLOAD_ERR_INI_SIZE:
214  $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
215  return false;
216  break;
217 
218  case UPLOAD_ERR_PARTIAL:
219  $this->setAlert($lng->txt("form_msg_file_partially_uploaded"));
220  return false;
221  break;
222 
223  case UPLOAD_ERR_NO_FILE:
224  if ($this->getRequired()) {
225  if ((!isset($foundvalues['imagename'][$index]) || $foundvalues['imagename'][$index] === '') &&
226  (!isset($foundvalues['answer'][$index]) && $foundvalues['answer'][$index] === '')) {
227  $this->setAlert($lng->txt("form_msg_file_no_upload"));
228  return false;
229  }
230  }
231  break;
232 
233  case UPLOAD_ERR_NO_TMP_DIR:
234  $this->setAlert($lng->txt("form_msg_file_missing_tmp_dir"));
235  return false;
236  break;
237 
238  case UPLOAD_ERR_CANT_WRITE:
239  $this->setAlert($lng->txt("form_msg_file_cannot_write_to_disk"));
240  return false;
241  break;
242 
243  case UPLOAD_ERR_EXTENSION:
244  $this->setAlert($lng->txt("form_msg_file_upload_stopped_ext"));
245  return false;
246  break;
247  }
248  }
249  }
250  }
251 
252  if (is_array($_FILES[$this->getPostVar()]['tmp_name']['image'])) {
253  foreach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname) {
254  $filename = $_FILES[$this->getPostVar()]['name']['image'][$index];
255  $filename_arr = pathinfo($filename);
256  $suffix = '';
257  if (isset($filename_arr['extension'])) {
258  $suffix = $filename_arr["extension"];
259  }
260 
261  // check suffixes
262  if ($tmpname != '' && is_array($this->getSuffixes())) {
263  $vir = ilVirusScanner::virusHandling($tmpname, $filename);
264  if ($vir[0] == false) {
265  $this->setAlert($lng->txt("form_msg_file_virus_found") . "<br />" . $vir[1]);
266  return false;
267  }
268 
269  if (!in_array(strtolower($suffix), $this->getSuffixes())) {
270  $this->setAlert($lng->txt("form_msg_file_wrong_file_type"));
271  return false;
272  }
273  }
274  }
275  }
276  }
277  }
278  return $this->checkSubItemsInput();
279  }
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)
$index
Definition: metadata.php:145
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:

◆ getAllowMove()

ilMatchingWizardInputGUI::getAllowMove ( )

Get allow move.

Returns
boolean Allow move

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

References $allowMove.

Referenced by insert().

151  : bool
152  {
153  return $this->allowMove;
154  }
+ Here is the caller graph for this function:

◆ getPending()

ilMatchingWizardInputGUI::getPending ( )

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

References $pending.

393  : string
394  {
395  return $this->pending;
396  }

◆ getQuestionObject()

ilMatchingWizardInputGUI::getQuestionObject ( )

Get question object.

Returns
object Value

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

References $qstObject.

131  : ?object
132  {
133  return $this->qstObject;
134  }

◆ getSuffixes()

ilMatchingWizardInputGUI::getSuffixes ( )

Get Accepted Suffixes.

Returns
array Accepted Suffixes

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

References $suffixes.

Referenced by checkInput(), and insert().

71  : array
72  {
73  return $this->suffixes;
74  }
+ Here is the caller graph for this function:

◆ getValues()

ilMatchingWizardInputGUI::getValues ( )

Get Values.

Returns
array Values

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

References $values.

101  : array
102  {
103  return $this->values;
104  }

◆ insert()

ilMatchingWizardInputGUI::insert ( ilTemplate  $a_tpl)

Insert property html.

Returns
void Size

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

References $DIC, $i, ilFormPropertyGUI\$lng, ilTextInputGUI\$suffix, $tpl, ilTextInputGUI\$value, ilGlyphGUI\ADD, ilGlyphGUI\DOWN, ilGlyphGUI\get(), getAllowMove(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilFileUtils\getFileSizeInfo(), ilTextInputGUI\getMaxLength(), ilFormPropertyGUI\getPostVar(), ilTextInputGUI\getSize(), getSuffixes(), ilTemplate\parseCurrentBlock(), ilLegacyFormElementsUtil\prepareFormOutput(), ilGlyphGUI\REMOVE, ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), ilLanguage\txt(), and ilGlyphGUI\UP.

285  : void
286  {
287  global $DIC;
288  $lng = $DIC['lng'];
289 
290  $tpl = new ilTemplate("tpl.prop_matchingwizardinput.html", true, true, "Modules/TestQuestionPool");
291  $i = 0;
292  foreach ($this->values as $value) {
293  if (!$this->hideImages) {
294  if (strlen($value->getPicture())) {
295  $imagename = $this->qstObject->getImagePathWeb() . $value->getPicture();
296  if ($this->qstObject->getThumbSize()) {
297  if (@file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value->getPicture())) {
298  $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value->getPicture();
299  }
300  }
301  $tpl->setCurrentBlock('image');
302  $tpl->setVariable('SRC_IMAGE', $imagename);
303  $tpl->setVariable('IMAGE_NAME', $value->getPicture());
304  $tpl->setVariable('ALT_IMAGE', ilLegacyFormElementsUtil::prepareFormOutput($value->getText()));
305  $tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
306  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
307  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
308  $tpl->parseCurrentBlock();
309  }
310  $tpl->setCurrentBlock('addimage');
311  $tpl->setVariable("IMAGE_BROWSE", $lng->txt('select_file'));
312  $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][$i]");
313  $tpl->setVariable("IMAGE_SUBMIT", $lng->txt("upload"));
314  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
315  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
316  $tpl->parseCurrentBlock();
317  }
318 
319  if (is_object($value)) {
320  $tpl->setCurrentBlock("prop_text_propval");
321  $tpl->setVariable("PROPERTY_VALUE", ilLegacyFormElementsUtil::prepareFormOutput($value->getText()));
322  $tpl->parseCurrentBlock();
323  }
324  // this block does not exist in the template
325  // $tpl->setCurrentBlock('singleline');
326  $tpl->setVariable("SIZE", $this->getSize());
327  $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][$i]");
328  $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
329  $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
330  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
331  if ($this->getDisabled()) {
332  $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
333  }
334  $tpl->parseCurrentBlock();
335  if ($this->getAllowMove()) {
336  $tpl->setCurrentBlock("move");
337  $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][$i]");
338  $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][$i]");
339  $tpl->setVariable("ID", $this->getPostVar() . "[$i]");
340  $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
341  $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
342  $tpl->parseCurrentBlock();
343  }
344  $tpl->setCurrentBlock("row");
345  $tpl->setVariable("POST_VAR", $this->getPostVar());
346  $tpl->setVariable("ROW_NUMBER", $i + 1);
347  $tpl->setVariable("ROW_IDENTIFIER", $value->getIdentifier());
348  $tpl->setVariable("ID", $this->getPostVar() . "[answer][$i]");
349  $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][$i]");
350  $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][$i]");
351  $tpl->setVariable("ADD_BUTTON", ilGlyphGUI::get(ilGlyphGUI::ADD));
352  $tpl->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
353  $tpl->parseCurrentBlock();
354  $i++;
355  }
356 
357  if (!$this->hideImages) {
358  if (is_array($this->getSuffixes())) {
359  $suff_str = $delim = "";
360  foreach ($this->getSuffixes() as $suffix) {
361  $suff_str .= $delim . "." . $suffix;
362  $delim = ", ";
363  }
364  $tpl->setCurrentBlock('allowed_image_suffixes');
365  $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $lng->txt("file_allowed_suffixes") . " " . $suff_str);
366  $tpl->parseCurrentBlock();
367  }
368  $tpl->setCurrentBlock("image_heading");
369  $tpl->setVariable("ANSWER_IMAGE", $this->image_name);
370  $tpl->setVariable("TXT_MAX_SIZE", ilFileUtils::getFileSizeInfo());
371  $tpl->parseCurrentBlock();
372  }
373 
374  $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
375  $tpl->setVariable("TEXT_YES", $lng->txt('yes'));
376  $tpl->setVariable("TEXT_NO", $lng->txt('no'));
377  $tpl->setVariable("DELETE_IMAGE_HEADER", $lng->txt('delete_image_header'));
378  $tpl->setVariable("DELETE_IMAGE_QUESTION", $lng->txt('delete_image_question'));
379  $tpl->setVariable("ANSWER_TEXT", $this->text_name);
380  $tpl->setVariable("NUMBER_TEXT", $lng->txt('row'));
381  $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
382 
383  $a_tpl->setCurrentBlock("prop_generic");
384  $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
385  $a_tpl->parseCurrentBlock();
386  }
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 get(string $a_glyph, string $a_text="")
static prepareFormOutput($a_str, bool $a_strip=false)
global $DIC
Definition: feed.php:28
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
static getFileSizeInfo()
setCurrentBlock(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
+ 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 141 of file class.ilMatchingWizardInputGUI.php.

141  : void
142  {
143  $this->allowMove = $a_allow_move;
144  }

◆ setHideImages()

ilMatchingWizardInputGUI::setHideImages (   $a_hide)

Set hide images.

Parameters
bool$a_hideHide images

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

Referenced by assMatchingQuestionGUI\populateAnswerSpecificFormPart().

81  : void
82  {
83  $this->hideImages = $a_hide;
84  }
+ Here is the caller graph for this function:

◆ setImageName()

ilMatchingWizardInputGUI::setImageName (   $a_value)

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

111  : void
112  {
113  $this->image_name = $a_value;
114  }

◆ setPending()

ilMatchingWizardInputGUI::setPending ( string  $a_val)

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

388  : void
389  {
390  $this->pending = $a_val;
391  }

◆ setQuestionObject()

ilMatchingWizardInputGUI::setQuestionObject (   $a_value)

Set question object.

Parameters
object$a_valuetest object

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

121  : void
122  {
123  $this->qstObject = &$a_value;
124  }

◆ setSuffixes()

ilMatchingWizardInputGUI::setSuffixes (   $a_suffixes)

Set Accepted Suffixes.

Parameters
array$a_suffixesAccepted Suffixes

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

Referenced by __construct().

61  : void
62  {
63  $this->suffixes = $a_suffixes;
64  }
+ Here is the caller graph for this function:

◆ setTextName()

ilMatchingWizardInputGUI::setTextName (   $a_value)

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

106  : void
107  {
108  $this->text_name = $a_value;
109  }

◆ setValue()

ilMatchingWizardInputGUI::setValue (   $a_value)

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

References $index, and ilTextInputGUI\$value.

156  : void
157  {
158  $this->values = array();
159  if (is_array($a_value)) {
160  if (is_array($a_value['answer'])) {
161  foreach ($a_value['answer'] as $index => $value) {
162  $answer = new assAnswerMatchingTerm(
163  $value,
164  $a_value['imagename'][$index] ?? '',
165  $a_value['identifier'][$index] ?? ''
166  );
167  array_push($this->values, $answer);
168  }
169  }
170  }
171  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$index
Definition: metadata.php:145

◆ setValues()

ilMatchingWizardInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

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

91  : void
92  {
93  $this->values = $a_values;
94  }

Field Documentation

◆ $allowMove

ilMatchingWizardInputGUI::$allowMove = false
protected

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

Referenced by getAllowMove().

◆ $hideImages

ilMatchingWizardInputGUI::$hideImages = false
protected

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

◆ $image_name

ilMatchingWizardInputGUI::$image_name = ''
protected

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

◆ $pending

string ilMatchingWizardInputGUI::$pending
private

Definition at line 34 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().

◆ $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 35 of file class.ilMatchingWizardInputGUI.php.

◆ $values

ilMatchingWizardInputGUI::$values = array()
protected

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

Referenced by getValues().


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