ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
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...
 
 setDisableUpload ($disable_upload)
 
 setDisableActions ($disable_actions)
 
 setDisableText ($disable_text)
 
 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...
 
 setMultiValues (array $a_values)
 
 render ($a_mode="")
 Render item. 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...
 

Protected Attributes

 $text_name = ''
 
 $image_name = ''
 
 $values = array()
 
 $allowMove = false
 
 $qstObject = null
 
 $suffixes = array()
 
 $hideImages = false
 
 $disable_text = false
 
 $disable_upload = false
 
 $disable_actions = false
 
- Protected Attributes inherited from ilTextInputGUI
 $value
 
 $maxlength = 200
 
 $size = 40
 
 $validationRegexp
 
 $validationFailureMessage = ''
 
 $suffix
 
 $style_css
 
 $css_class
 
 $ajax_datasource
 
 $ajax_datasource_delimiter
 
 $submit_form_on_enter = false
 
 $autocomplete_disabled = false
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- 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 16 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

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

References $lng, ilTextInputGUI\setSize(), and setSuffixes().

39  {
40  global $lng;
41 
42  parent::__construct($a_title, $a_postvar);
43  $this->setSuffixes(array("jpg", "jpeg", "png", "gif"));
44  $this->setSize('50');
45  $this->text_name = $lng->txt('answer_text');
46  $this->image_name = $lng->txt('answer_image');
47  }
setSuffixes($a_suffixes)
Set Accepted Suffixes.
setSize($a_size)
Set Size.
global $lng
Definition: privfeed.php:40
+ 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 200 of file class.ilMatchingWizardInputGUI.php.

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

201  {
202  global $lng;
203  include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
204  if (is_array($_POST[$this->getPostVar()]))
205  {
207  }
208  $foundvalues = $_POST[$this->getPostVar()];
209  if (is_array($foundvalues))
210  {
211  // check answers
212  if (is_array($foundvalues['answer']))
213  {
214  foreach ($foundvalues['answer'] as $aidx => $answervalue)
215  {
216  if (((strlen($answervalue)) == 0) && (strlen($foundvalues['imagename'][$aidx]) == 0))
217  {
218  $this->setAlert($lng->txt("msg_input_is_required"));
219  return FALSE;
220  }
221  }
222  }
223  if (!$this->hideImages)
224  {
225  if (is_array($_FILES[$this->getPostVar()]['error']['image']))
226  {
227  foreach ($_FILES[$this->getPostVar()]['error']['image'] as $index => $error)
228  {
229  // error handling
230  if ($error > 0)
231  {
232  switch ($error)
233  {
234  case UPLOAD_ERR_INI_SIZE:
235  $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
236  return false;
237  break;
238 
239  case UPLOAD_ERR_FORM_SIZE:
240  $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
241  return false;
242  break;
243 
244  case UPLOAD_ERR_PARTIAL:
245  $this->setAlert($lng->txt("form_msg_file_partially_uploaded"));
246  return false;
247  break;
248 
249  case UPLOAD_ERR_NO_FILE:
250  if ($this->getRequired())
251  {
252  if ((!strlen($foundvalues['imagename'][$index])) && (!strlen($foundvalues['answer'][$index])))
253  {
254  $this->setAlert($lng->txt("form_msg_file_no_upload"));
255  return false;
256  }
257  }
258  break;
259 
260  case UPLOAD_ERR_NO_TMP_DIR:
261  $this->setAlert($lng->txt("form_msg_file_missing_tmp_dir"));
262  return false;
263  break;
264 
265  case UPLOAD_ERR_CANT_WRITE:
266  $this->setAlert($lng->txt("form_msg_file_cannot_write_to_disk"));
267  return false;
268  break;
269 
270  case UPLOAD_ERR_EXTENSION:
271  $this->setAlert($lng->txt("form_msg_file_upload_stopped_ext"));
272  return false;
273  break;
274  }
275  }
276  }
277  }
278 
279  if (is_array($_FILES[$this->getPostVar()]['tmp_name']['image']))
280  {
281  foreach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname)
282  {
283  $filename = $_FILES[$this->getPostVar()]['name']['image'][$index];
284  $filename_arr = pathinfo($filename);
285  $suffix = $filename_arr["extension"];
286 
287  // check suffixes
288  if (strlen($tmpname) && is_array($this->getSuffixes()))
289  {
290  $vir = ilUtil::virusHandling($tmpname, $filename);
291  if ($vir[0] == false)
292  {
293  $this->setAlert($lng->txt("form_msg_file_virus_found")."<br />".$vir[1]);
294  return false;
295  }
296 
297  if (!in_array(strtolower($suffix), $this->getSuffixes()))
298  {
299  $this->setAlert($lng->txt("form_msg_file_wrong_file_type"));
300  return false;
301  }
302  }
303  }
304  }
305  }
306  }
307  return $this->checkSubItemsInput();
308  }
$_POST['username']
Definition: cron.php:12
static virusHandling($a_file, $a_orig_name="", $a_clean=true)
scan file for viruses and clean files if possible
& _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
getPostVar()
Get Post Variable.
setAlert($a_alert)
Set Alert Text.
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.
$filename
Definition: buildRTE.php:89
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ getAllowMove()

ilMatchingWizardInputGUI::getAllowMove ( )

Get allow move.

Returns
boolean Allow move

Definition at line 168 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 148 of file class.ilMatchingWizardInputGUI.php.

References $qstObject.

◆ getSuffixes()

ilMatchingWizardInputGUI::getSuffixes ( )

Get Accepted Suffixes.

Returns
array Accepted Suffixes

Definition at line 88 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 118 of file class.ilMatchingWizardInputGUI.php.

References $values.

◆ insert()

ilMatchingWizardInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

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

References $lng, ilTextInputGUI\$suffix, $tpl, ilTextInputGUI\$value, getAllowMove(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilUtil\getFileSizeInfo(), ilUtil\getImagePath(), ilTextInputGUI\getMaxLength(), ilFormPropertyGUI\getPostVar(), ilTextInputGUI\getSize(), getSuffixes(), and ilUtil\prepareFormOutput().

316  {
317  global $lng;
318 
319  $tpl = new ilTemplate("tpl.prop_matchingwizardinput.html", true, true, "Modules/TestQuestionPool");
320  $i = 0;
321  foreach ($this->values as $value)
322  {
323  if (!$this->hideImages)
324  {
325  if (strlen($value->picture))
326  {
327  $imagename = $this->qstObject->getImagePathWeb() . $value->picture;
328  if ($this->qstObject->getThumbSize())
329  {
330  if (@file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value->picture))
331  {
332  $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value->picture;
333  }
334  }
335  $tpl->setCurrentBlock('image');
336  $tpl->setVariable('SRC_IMAGE', $imagename);
337  $tpl->setVariable('IMAGE_NAME', $value->picture);
338  $tpl->setVariable('ALT_IMAGE', ilUtil::prepareFormOutput($value->text));
339  $tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
340  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
341  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
342  if($this->disable_upload)
343  {
344  $tpl->setVariable('DISABLED_UPLOAD', 'type="hidden" disabled="disabled"');
345  }
346  $tpl->parseCurrentBlock();
347  }
348  $tpl->setCurrentBlock('addimage');
349  $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][$i]");
350  $tpl->setVariable("IMAGE_SUBMIT", $lng->txt("upload"));
351  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
352  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
353  if($this->disable_upload)
354  {
355  $tpl->setVariable('DISABLED_UPLOAD', 'type="hidden" disabled="disabled"');
356  }
357  $tpl->parseCurrentBlock();
358  }
359 
360  if (is_object($value))
361  {
362  $tpl->setCurrentBlock("prop_text_propval");
363  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->text));
364  $tpl->parseCurrentBlock();
365  }
366  // this block does not exist in the template
367 // $tpl->setCurrentBlock('singleline');
368  if($this->disable_text)
369  {
370  $tpl->setVariable("DISABLED_SINGLELINE", 'readonly="readonly"');
371  $tpl->setVariable("DISABLED_SINGLELINE_BTN", 'readonly="readonly"');
372  }
373  $tpl->setVariable("SIZE", $this->getSize());
374  $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][$i]");
375  $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
376  $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
377  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
378  if ($this->getDisabled())
379  {
380  $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
381  }
382  $tpl->parseCurrentBlock();
383  if ($this->getAllowMove())
384  {
385  $tpl->setCurrentBlock("move");
386  $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][$i]");
387  $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][$i]");
388  $tpl->setVariable("MOVE_ID", $this->getPostVar() . "[$i]");
389  $tpl->setVariable("UP_BUTTON", ilUtil::getImagePath('a_up.png'));
390  $tpl->setVariable("DOWN_BUTTON", ilUtil::getImagePath('a_down.png'));
391  $tpl->parseCurrentBlock();
392  }
393  $tpl->setCurrentBlock("row");
394  $class = ($i % 2 == 0) ? "even" : "odd";
395  if ($i == 0) $class .= " first";
396  if ($i == count($this->values)-1) $class .= " last";
397  $tpl->setVariable("ROW_CLASS", $class);
398  $tpl->setVariable("POST_VAR", $this->getPostVar());
399  $tpl->setVariable("ROW_NUMBER", $i+1);
400  $tpl->setVariable("ROW_IDENTIFIER", $value->identifier);
401 
402 
403  if($this->disable_actions)
404  {
405  //$tpl->setVariable( 'DISABLE_ACTIONS', 'disabled="disabled"' );
406  }
407  else
408  {
409  $tpl->setVariable("ID", $this->getPostVar() . "[answer][$i]");
410  $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][$i]");
411  $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][$i]");
412  $tpl->setVariable("ADD_BUTTON", ilUtil::getImagePath('edit_add.png'));
413  $tpl->setVariable("REMOVE_BUTTON", ilUtil::getImagePath('edit_remove.png'));
414  }
415  $tpl->parseCurrentBlock();
416  $i++;
417  }
418 
419  if (!$this->hideImages)
420  {
421  if (is_array($this->getSuffixes()))
422  {
423  $suff_str = $delim = "";
424  foreach($this->getSuffixes() as $suffix)
425  {
426  $suff_str.= $delim.".".$suffix;
427  $delim = ", ";
428  }
429  $tpl->setCurrentBlock('allowed_image_suffixes');
430  $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $lng->txt("file_allowed_suffixes")." ".$suff_str);
431  $tpl->parseCurrentBlock();
432  }
433  $tpl->setCurrentBlock("image_heading");
434  $tpl->setVariable("ANSWER_IMAGE", $this->image_name);
435  $tpl->setVariable("TXT_MAX_SIZE", ilUtil::getFileSizeInfo());
436  $tpl->parseCurrentBlock();
437  }
438 
439  $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
440  $tpl->setVariable("TEXT_YES", $lng->txt('yes'));
441  $tpl->setVariable("TEXT_NO", $lng->txt('no'));
442  $tpl->setVariable("DELETE_IMAGE_HEADER", $lng->txt('delete_image_header'));
443  $tpl->setVariable("DELETE_IMAGE_QUESTION", $lng->txt('delete_image_question'));
444  $tpl->setVariable("ANSWER_TEXT", $this->text_name);
445  $tpl->setVariable("NUMBER_TEXT", $lng->txt('row'));
446  if(!$this->disable_actions)
447  {
448  $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
449  }
450 
451  $a_tpl->setCurrentBlock("prop_generic");
452  $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
453  $a_tpl->parseCurrentBlock();
454  /*
455  global $tpl;
456  include_once "./Services/YUI/classes/class.ilYuiUtil.php";
457  ilYuiUtil::initDomEvent();
458  $tpl->addJavascript("./Modules/TestQuestionPool/templates/default/matchingwizard.js");*/
459  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaxLength()
Get Max Length.
getPostVar()
Get Post Variable.
static getFileSizeInfo()
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
global $lng
Definition: privfeed.php:40
+ 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 158 of file class.ilMatchingWizardInputGUI.php.

159  {
160  $this->allowMove = $a_allow_move;
161  }

◆ setDisableActions()

ilMatchingWizardInputGUI::setDisableActions (   $disable_actions)
Parameters
boolean$disable_actions

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

References $disable_actions.

61  {
62  $this->disable_actions = $disable_actions;
63  }

◆ setDisableText()

ilMatchingWizardInputGUI::setDisableText (   $disable_text)
Parameters
boolean$disable_text

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

References $disable_text.

69  {
70  $this->disable_text = $disable_text;
71  }

◆ setDisableUpload()

ilMatchingWizardInputGUI::setDisableUpload (   $disable_upload)
Parameters
boolean$disable_upload

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

References $disable_upload.

53  {
54  $this->disable_upload = $disable_upload;
55  }

◆ setHideImages()

ilMatchingWizardInputGUI::setHideImages (   $a_hide)

Set hide images.

Parameters
bool$a_hideHide images

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

Referenced by assMatchingQuestionGUI\populateAnswerSpecificFormPart().

99  {
100  $this->hideImages = $a_hide;
101  }
+ Here is the caller graph for this function:

◆ setImageName()

ilMatchingWizardInputGUI::setImageName (   $a_value)

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

129  {
130  $this->image_name = $a_value;
131  }

◆ setQuestionObject()

ilMatchingWizardInputGUI::setQuestionObject (   $a_value)

Set question object.

Parameters
object$a_valuetest object

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

139  {
140  $this->qstObject =& $a_value;
141  }

◆ setSuffixes()

ilMatchingWizardInputGUI::setSuffixes (   $a_suffixes)

Set Accepted Suffixes.

Parameters
array$a_suffixesAccepted Suffixes

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

Referenced by __construct().

79  {
80  $this->suffixes = $a_suffixes;
81  }
+ Here is the caller graph for this function:

◆ setTextName()

ilMatchingWizardInputGUI::setTextName (   $a_value)

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

124  {
125  $this->text_name = $a_value;
126  }

◆ setValue()

ilMatchingWizardInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

References ilTextInputGUI\$value.

179  {
180  $this->values = array();
181  if (is_array($a_value))
182  {
183  if (is_array($a_value['answer']))
184  {
185  foreach ($a_value['answer'] as $index => $value)
186  {
187  include_once "./Modules/TestQuestionPool/classes/class.assAnswerMatchingTerm.php";
188  $answer = new assAnswerMatchingTerm($value, $a_value['imagename'][$index], $a_value['identifier'][$index]);
189  array_push($this->values, $answer);
190  }
191  }
192  }
193  }
Class for matching question terms.

◆ setValues()

ilMatchingWizardInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

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

109  {
110  $this->values = $a_values;
111  }

Field Documentation

◆ $allowMove

ilMatchingWizardInputGUI::$allowMove = false
protected

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

Referenced by getAllowMove().

◆ $disable_actions

ilMatchingWizardInputGUI::$disable_actions = false
protected

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

Referenced by setDisableActions().

◆ $disable_text

ilMatchingWizardInputGUI::$disable_text = false
protected

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

Referenced by setDisableText().

◆ $disable_upload

ilMatchingWizardInputGUI::$disable_upload = false
protected

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

Referenced by setDisableUpload().

◆ $hideImages

ilMatchingWizardInputGUI::$hideImages = false
protected

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

◆ $image_name

ilMatchingWizardInputGUI::$image_name = ''
protected

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

◆ $qstObject

ilMatchingWizardInputGUI::$qstObject = null
protected

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

Referenced by getQuestionObject().

◆ $suffixes

ilMatchingWizardInputGUI::$suffixes = array()
protected

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

Referenced by getSuffixes().

◆ $text_name

ilMatchingWizardInputGUI::$text_name = ''
protected

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

◆ $values

ilMatchingWizardInputGUI::$values = array()
protected

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

Referenced by getValues().


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