ILIAS  release_4-4 Revision
ilMultipleChoiceWizardInputGUI Class Reference

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

+ Inheritance diagram for ilMultipleChoiceWizardInputGUI:
+ Collaboration diagram for ilMultipleChoiceWizardInputGUI:

Public Member Functions

 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 ilSingleChoiceWizardInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setDisableUpload ($disable_upload)
 
 setDisableActions ($disable_actions)
 
 setDisableText ($disable_text)
 
 setValue ($a_value)
 Set Value. More...
 
 setSuffixes ($a_suffixes)
 Set Accepted Suffixes. More...
 
 setHideImages ($a_hide)
 Set hide images. More...
 
 getSuffixes ()
 Get Accepted Suffixes. More...
 
 setShowPoints ($a_value)
 
 getShowPoints ()
 
 setValues ($a_values)
 Set Values. More...
 
 getValues ()
 Get Values. More...
 
 setSingleline ($a_value)
 Set singleline. More...
 
 getSingleline ()
 Get singleline. More...
 
 setQuestionObject ($a_value)
 Set question object. More...
 
 getQuestionObject ()
 Get question object. More...
 
 setAllowMove ($a_allow_move)
 Set allow move. More...
 
 getAllowMove ()
 Get allow move. More...
 
 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...
 

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 
- Protected Attributes inherited from ilSingleChoiceWizardInputGUI
 $values = array()
 
 $allowMove = false
 
 $singleline = true
 
 $qstObject = null
 
 $suffixes = array()
 
 $showPoints = true
 
 $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
 

Detailed Description

This class represents a multiple choice wizard property in a property form.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

Definition at line 13 of file class.ilMultipleChoiceWizardInputGUI.php.

Member Function Documentation

◆ checkInput()

ilMultipleChoiceWizardInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Definition at line 42 of file class.ilMultipleChoiceWizardInputGUI.php.

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

43  {
44  global $lng;
45 
46  include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
47  if (is_array($_POST[$this->getPostVar()])) $_POST[$this->getPostVar()] = ilUtil::stripSlashesRecursive($_POST[$this->getPostVar()], false, ilObjAdvancedEditing::_getUsedHTMLTagsAsString("assessment"));
48  $foundvalues = $_POST[$this->getPostVar()];
49  if (is_array($foundvalues))
50  {
51  // check answers
52  if (is_array($foundvalues['answer']))
53  {
54  foreach ($foundvalues['answer'] as $aidx => $answervalue)
55  {
56  if (((strlen($answervalue)) == 0) && (strlen($foundvalues['imagename'][$aidx]) == 0))
57  {
58  $this->setAlert($lng->txt("msg_input_is_required"));
59  return FALSE;
60  }
61  }
62  }
63  // check points
64  $max = 0;
65  if (is_array($foundvalues['points']))
66  {
67  foreach ($foundvalues['points'] as $points)
68  {
69  if ($points > $max) $max = $points;
70  if (((strlen($points)) == 0) || (!is_numeric($points)))
71  {
72  $this->setAlert($lng->txt("form_msg_numeric_value_required"));
73  return FALSE;
74  }
75  }
76  foreach ($foundvalues['points_unchecked'] as $points)
77  {
78  if ($points > $max) $max = $points;
79  if (((strlen($points)) == 0) || (!is_numeric($points)))
80  {
81  $this->setAlert($lng->txt("form_msg_numeric_value_required"));
82  return FALSE;
83  }
84  }
85  }
86  if ($max == 0)
87  {
88  $this->setAlert($lng->txt("enter_enough_positive_points"));
89  return false;
90  }
91 
92  if (is_array($_FILES) && count($_FILES) && $this->getSingleline())
93  {
94  if (!$this->hideImages)
95  {
96  if (is_array($_FILES[$this->getPostVar()]['error']['image']))
97  {
98  foreach ($_FILES[$this->getPostVar()]['error']['image'] as $index => $error)
99  {
100  // error handling
101  if ($error > 0)
102  {
103  switch ($error)
104  {
105  case UPLOAD_ERR_INI_SIZE:
106  $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
107  return false;
108  break;
109 
110  case UPLOAD_ERR_FORM_SIZE:
111  $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
112  return false;
113  break;
114 
115  case UPLOAD_ERR_PARTIAL:
116  $this->setAlert($lng->txt("form_msg_file_partially_uploaded"));
117  return false;
118  break;
119 
120  case UPLOAD_ERR_NO_FILE:
121  if ($this->getRequired())
122  {
123  if ((!strlen($foundvalues['imagename'][$index])) && (!strlen($foundvalues['answer'][$index])))
124  {
125  $this->setAlert($lng->txt("form_msg_file_no_upload"));
126  return false;
127  }
128  }
129  break;
130 
131  case UPLOAD_ERR_NO_TMP_DIR:
132  $this->setAlert($lng->txt("form_msg_file_missing_tmp_dir"));
133  return false;
134  break;
135 
136  case UPLOAD_ERR_CANT_WRITE:
137  $this->setAlert($lng->txt("form_msg_file_cannot_write_to_disk"));
138  return false;
139  break;
140 
141  case UPLOAD_ERR_EXTENSION:
142  $this->setAlert($lng->txt("form_msg_file_upload_stopped_ext"));
143  return false;
144  break;
145  }
146  }
147  }
148  }
149  else
150  {
151  if ($this->getRequired())
152  {
153  $this->setAlert($lng->txt("form_msg_file_no_upload"));
154  return false;
155  }
156  }
157 
158  if (is_array($_FILES[$this->getPostVar()]['tmp_name']['image']))
159  {
160  foreach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname)
161  {
162  $filename = $_FILES[$this->getPostVar()]['name']['image'][$index];
163  $filename_arr = pathinfo($filename);
164  $suffix = $filename_arr["extension"];
165  $mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];
166  $size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];
167  // check suffixes
168  if (strlen($tmpname) && is_array($this->getSuffixes()))
169  {
170  if (!in_array(strtolower($suffix), $this->getSuffixes()))
171  {
172  $this->setAlert($lng->txt("form_msg_file_wrong_file_type"));
173  return false;
174  }
175  }
176  }
177  }
178 
179  if (is_array($_FILES[$this->getPostVar()]['tmp_name']['image']))
180  {
181  foreach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname)
182  {
183  $filename = $_FILES[$this->getPostVar()]['name']['image'][$index];
184  $filename_arr = pathinfo($filename);
185  $suffix = $filename_arr["extension"];
186  $mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];
187  $size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];
188  // virus handling
189  if (strlen($tmpname))
190  {
191  $vir = ilUtil::virusHandling($tmpname, $filename);
192  if ($vir[0] == false)
193  {
194  $this->setAlert($lng->txt("form_msg_file_virus_found")."<br />".$vir[1]);
195  return false;
196  }
197  }
198  }
199  }
200  }
201  }
202  }
203  else
204  {
205  $this->setAlert($lng->txt("msg_input_is_required"));
206  return FALSE;
207  }
208 
209  return $this->checkSubItemsInput();
210  }
$_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:

◆ insert()

ilMultipleChoiceWizardInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

Definition at line 217 of file class.ilMultipleChoiceWizardInputGUI.php.

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

218  {
219  global $lng;
220 
221  $tpl = new ilTemplate("tpl.prop_multiplechoicewizardinput.html", true, true, "Modules/TestQuestionPool");
222  $i = 0;
223  foreach ($this->values as $value)
224  {
225  if ($this->getSingleline())
226  {
227  if (!$this->hideImages)
228  {
229  if (strlen($value->getImage()))
230  {
231  $imagename = $this->qstObject->getImagePathWeb() . $value->getImage();
232  if (($this->getSingleline()) && ($this->qstObject->getThumbSize()))
233  {
234  if (@file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value->getImage()))
235  {
236  $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value->getImage();
237  }
238  }
239  $tpl->setCurrentBlock('image');
240  $tpl->setVariable('SRC_IMAGE', $imagename);
241  $tpl->setVariable('IMAGE_NAME', $value->getImage());
242  $tpl->setVariable('ALT_IMAGE', ilUtil::prepareFormOutput($value->getAnswertext()));
243  $tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
244  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
245  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
246  if($this->disable_upload)
247  {
248  $tpl->setVariable('DISABLED_UPLOAD', 'type="hidden" disabled="disabled"');
249  }
250  $tpl->parseCurrentBlock();
251  }
252  $tpl->setCurrentBlock('addimage');
253  $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][$i]");
254  $tpl->setVariable("IMAGE_SUBMIT", $lng->txt("upload"));
255  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
256  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
257  if($this->disable_upload)
258  {
259  $tpl->setVariable('DISABLED_UPLOAD', 'type="hidden" disabled="disabled"');
260  }
261  $tpl->parseCurrentBlock();
262  }
263 
264  if (is_object($value))
265  {
266  $tpl->setCurrentBlock("prop_text_propval");
267  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getAnswertext()));
268  $tpl->parseCurrentBlock();
269  $tpl->setCurrentBlock("prop_points_propval");
270  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPointsChecked()));
271  $tpl->parseCurrentBlock();
272  $tpl->setCurrentBlock("prop_points_unchecked_propval");
273  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPointsUnchecked()));
274  $tpl->parseCurrentBlock();
275  }
276  $tpl->setCurrentBlock('singleline');
277  if($this->disable_text)
278  {
279  $tpl->setVariable("DISABLED_SINGLELINE", 'readonly="readonly"');
280  $tpl->setVariable("DISABLED_SINGLELINE_BTN", 'readonly="readonly"');
281  }
282  $tpl->setVariable("SIZE", $this->getSize());
283  $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][$i]");
284  $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
285  $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
286  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
287  if ($this->getDisabled())
288  {
289  $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
290  }
291  $tpl->parseCurrentBlock();
292  }
293  else if (!$this->getSingleline())
294  {
295  if (is_object($value))
296  {
297  $tpl->setCurrentBlock("prop_points_propval");
298  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPoints()));
299  $tpl->parseCurrentBlock();
300  $tpl->setCurrentBlock("prop_points_unchecked_propval");
301  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPointsUnchecked()));
302  $tpl->parseCurrentBlock();
303  }
304  $tpl->setCurrentBlock('multiline');
305  if($this->disable_text)
306  {
307  $tpl->setVariable("DISABLED_MULTILINE", 'readonly="readonly"');
308  }
309 
310  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getAnswertext()));
311  $tpl->setVariable("MULTILINE_ID", $this->getPostVar() . "[answer][$i]");
312  $tpl->setVariable("MULTILINE_ROW_NUMBER", $i);
313  $tpl->setVariable("MULTILINE_POST_VAR", $this->getPostVar());
314  if ($this->getDisabled())
315  {
316  $tpl->setVariable("DISABLED_MULTILINE", " disabled=\"disabled\"");
317  }
318  $tpl->parseCurrentBlock();
319  }
320  if ($this->getAllowMove())
321  {
322  $tpl->setCurrentBlock("move");
323  $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][$i]");
324  $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][$i]");
325  $tpl->setVariable("MOVE_ID", $this->getPostVar() . "[$i]");
326  $tpl->setVariable("UP_BUTTON", ilUtil::getImagePath('a_up.png'));
327  $tpl->setVariable("DOWN_BUTTON", ilUtil::getImagePath('a_down.png'));
328  $tpl->parseCurrentBlock();
329  }
330  $tpl->setCurrentBlock("row");
331  $class = ($i % 2 == 0) ? "even" : "odd";
332  if ($i == 0) $class .= " first";
333  if ($i == count($this->values)-1) $class .= " last";
334  $tpl->setVariable("ROW_CLASS", $class);
335  $tpl->setVariable("POST_VAR", $this->getPostVar());
336  $tpl->setVariable("ROW_NUMBER", $i);
337  $tpl->setVariable("POINTS_ID", $this->getPostVar() . "[points][$i]");
338  $tpl->setVariable("POINTS_UNCHECKED_ID", $this->getPostVar() . "[points_unchecked][$i]");
339  if(!$this->disable_actions)
340  {
341  $tpl->setVariable( "CMD_ADD", "cmd[add" . $this->getFieldId() . "][$i]" );
342  $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][$i]");
343  $tpl->setVariable("ID", $this->getPostVar() . "[answer][$i]");
344  }
345  if ($this->getDisabled())
346  {
347  $tpl->setVariable("DISABLED_POINTS", " disabled=\"disabled\"");
348  }
349  if($this->disable_actions)
350  {
351  //$tpl->setVariable( 'DISABLE_ACTIONS', 'disabled="disabled"' );
352  }
353  else
354  {
355  $tpl->setVariable("ADD_BUTTON", ilUtil::getImagePath('edit_add.png'));
356  $tpl->setVariable("REMOVE_BUTTON", ilUtil::getImagePath('edit_remove.png'));
357  }
358  $tpl->parseCurrentBlock();
359  $i++;
360  }
361 
362  if ($this->getSingleline())
363  {
364  if (!$this->hideImages)
365  {
366  if (is_array($this->getSuffixes()))
367  {
368  $suff_str = $delim = "";
369  foreach($this->getSuffixes() as $suffix)
370  {
371  $suff_str.= $delim.".".$suffix;
372  $delim = ", ";
373  }
374  $tpl->setCurrentBlock('allowed_image_suffixes');
375  $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $lng->txt("file_allowed_suffixes")." ".$suff_str);
376  $tpl->parseCurrentBlock();
377  }
378 
379  $tpl->setCurrentBlock("image_heading");
380  $tpl->setVariable("ANSWER_IMAGE", $lng->txt('answer_image'));
381  $tpl->setVariable("TXT_MAX_SIZE", ilUtil::getFileSizeInfo());
382  $tpl->parseCurrentBlock();
383  }
384  }
385 
386  $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
387  $tpl->setVariable("TEXT_YES", $lng->txt('yes'));
388  $tpl->setVariable("TEXT_NO", $lng->txt('no'));
389  $tpl->setVariable("DELETE_IMAGE_HEADER", $lng->txt('delete_image_header'));
390  $tpl->setVariable("DELETE_IMAGE_QUESTION", $lng->txt('delete_image_question'));
391  $tpl->setVariable("ANSWER_TEXT", $lng->txt('answer_text'));
392  $tpl->setVariable("POINTS_TEXT", $lng->txt('points'));
393  if(!$this->disable_actions)
394  {
395  $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
396  }
397  $tpl->setVariable("POINTS_CHECKED_TEXT", $lng->txt('checkbox_checked'));
398  $tpl->setVariable("POINTS_UNCHECKED_TEXT", $lng->txt('checkbox_unchecked'));
399 
400  $a_tpl->setCurrentBlock("prop_generic");
401  $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
402  $a_tpl->parseCurrentBlock();
403 
404  global $tpl;
405  include_once "./Services/YUI/classes/class.ilYuiUtil.php";
407  $tpl->addJavascript("./Modules/TestQuestionPool/templates/default/multiplechoicewizard.js");
408  }
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
static initDomEvent()
Init YUI DomEvent.
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:

◆ setValue()

ilMultipleChoiceWizardInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

References ilTextInputGUI\$value.

21  {
22  $this->values = array();
23  if (is_array($a_value))
24  {
25  if (is_array($a_value['answer']))
26  {
27  foreach ($a_value['answer'] as $index => $value)
28  {
29  include_once "./Modules/TestQuestionPool/classes/class.assAnswerMultipleResponseImage.php";
30  $answer = new ASS_AnswerMultipleResponseImage($value, $a_value['points'][$index], $index, $a_value['points_unchecked'][$index], $a_value['imagename'][$index]);
31  array_push($this->values, $answer);
32  }
33  }
34  }
35  }
ASS_AnswerBinaryStateImage is a class for answers with a binary state indicator (checked/unchecked, set/unset) and an image file.

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