ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 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)
 
- Public Member Functions inherited from ilTextInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setValidationFailureMessage ($a_msg)
 Set message string for validation failure. More...
 
 getValidationFailureMessage ()
 
 setValidationRegexp ($a_value)
 Set validation regexp. More...
 
 getValidationRegexp ()
 Get validation regexp. More...
 
 setMaxLength ($a_maxlength)
 Set Max Length. More...
 
 getMaxLength ()
 Get Max Length. More...
 
 setSize ($a_size)
 Set Size. More...
 
 setInlineStyle ($a_style)
 Set inline style. More...
 
 getInlineStyle ()
 Get inline style. More...
 
 setCssClass ($a_class)
 
 getCssClass ()
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 getSize ()
 Get Size. More...
 
 setSuffix ($a_value)
 Set suffix. More...
 
 getSuffix ()
 Get suffix. More...
 
 setInputType ($a_type)
 set input type More...
 
 getInputType ()
 get input type More...
 
 setSubmitFormOnEnter ($a_val)
 Set submit form on enter. More...
 
 getSubmitFormOnEnter ()
 Get submit form on enter. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getDataSource ()
 get datasource link for js autocomplete More...
 
 setDataSource ($href, $a_delimiter=null)
 set datasource link for js autocomplete More...
 
 setDataSourceSubmitOnSelection ($a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl ($a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 insert ($a_tpl)
 Insert property html. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
 getToolbarHTML ()
 Get HTML for toolbar. More...
 
 setDisableHtmlAutoComplete ($autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 
- Protected Attributes inherited from ilSingleChoiceWizardInputGUI
 $values = array()
 
 $allowMove = false
 
 $singleline = true
 
 $qstObject = null
 
 $suffixes = array()
 
 $showPoints = true
 
 $hideImages = false
 
- Protected Attributes inherited from ilTextInputGUI
 $value
 
 $maxlength = 200
 
 $size = 40
 
 $validationRegexp
 
 $validationFailureMessage = ''
 
 $suffix
 
 $style_css
 
 $css_class
 
 $ajax_datasource
 
 $ajax_datasource_delimiter
 
 $ajax_datasource_commit = false
 
 $ajax_datasource_commit_url
 
 $submit_form_on_enter = false
 
 $autocomplete_disabled = false
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $ctrl
 
 $lng
 
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

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 39 of file class.ilMultipleChoiceWizardInputGUI.php.

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

40  {
41  global $DIC;
42  $lng = $DIC['lng'];
43 
44  include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
45  if (is_array($_POST[$this->getPostVar()])) {
47  }
48  $foundvalues = $_POST[$this->getPostVar()];
49  if (is_array($foundvalues)) {
50  // check answers
51  if (is_array($foundvalues['answer'])) {
52  foreach ($foundvalues['answer'] as $aidx => $answervalue) {
53  if (((strlen($answervalue)) == 0) && (strlen($foundvalues['imagename'][$aidx]) == 0)) {
54  $this->setAlert($lng->txt("msg_input_is_required"));
55  return false;
56  }
57  }
58  }
59  // check points
60  $max = 0;
61  if (is_array($foundvalues['points'])) {
62  foreach ($foundvalues['points'] as $points) {
63  if ($points > $max) {
64  $max = $points;
65  }
66  if (((strlen($points)) == 0) || (!is_numeric($points))) {
67  $this->setAlert($lng->txt("form_msg_numeric_value_required"));
68  return false;
69  }
70  }
71  foreach ($foundvalues['points_unchecked'] as $points) {
72  if (((strlen($points)) == 0) || (!is_numeric($points))) {
73  $this->setAlert($lng->txt("form_msg_numeric_value_required"));
74  return false;
75  }
76  }
77  }
78  if ($max == 0) {
79  $this->setAlert($lng->txt("enter_enough_positive_points_checked"));
80  return false;
81  }
82 
83  if (is_array($_FILES) && count($_FILES) && $this->getSingleline()) {
84  if (!$this->hideImages) {
85  if (is_array($_FILES[$this->getPostVar()]['error']['image'])) {
86  foreach ($_FILES[$this->getPostVar()]['error']['image'] as $index => $error) {
87  // error handling
88  if ($error > 0) {
89  switch ($error) {
90  case UPLOAD_ERR_INI_SIZE:
91  $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
92  return false;
93  break;
94 
95  case UPLOAD_ERR_FORM_SIZE:
96  $this->setAlert($lng->txt("form_msg_file_size_exceeds"));
97  return false;
98  break;
99 
100  case UPLOAD_ERR_PARTIAL:
101  $this->setAlert($lng->txt("form_msg_file_partially_uploaded"));
102  return false;
103  break;
104 
105  case UPLOAD_ERR_NO_FILE:
106  if ($this->getRequired()) {
107  if ((!strlen($foundvalues['imagename'][$index])) && (!strlen($foundvalues['answer'][$index]))) {
108  $this->setAlert($lng->txt("form_msg_file_no_upload"));
109  return false;
110  }
111  }
112  break;
113 
114  case UPLOAD_ERR_NO_TMP_DIR:
115  $this->setAlert($lng->txt("form_msg_file_missing_tmp_dir"));
116  return false;
117  break;
118 
119  case UPLOAD_ERR_CANT_WRITE:
120  $this->setAlert($lng->txt("form_msg_file_cannot_write_to_disk"));
121  return false;
122  break;
123 
124  case UPLOAD_ERR_EXTENSION:
125  $this->setAlert($lng->txt("form_msg_file_upload_stopped_ext"));
126  return false;
127  break;
128  }
129  }
130  }
131  } else {
132  if ($this->getRequired()) {
133  $this->setAlert($lng->txt("form_msg_file_no_upload"));
134  return false;
135  }
136  }
137 
138  if (is_array($_FILES[$this->getPostVar()]['tmp_name']['image'])) {
139  foreach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname) {
140  $filename = $_FILES[$this->getPostVar()]['name']['image'][$index];
141  $filename_arr = pathinfo($filename);
142  $suffix = $filename_arr["extension"];
143  $mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];
144  $size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];
145  // check suffixes
146  if (strlen($tmpname) && is_array($this->getSuffixes())) {
147  if (!in_array(strtolower($suffix), $this->getSuffixes())) {
148  $this->setAlert($lng->txt("form_msg_file_wrong_file_type"));
149  return false;
150  }
151  }
152  }
153  }
154 
155  if (is_array($_FILES[$this->getPostVar()]['tmp_name']['image'])) {
156  foreach ($_FILES[$this->getPostVar()]['tmp_name']['image'] as $index => $tmpname) {
157  $filename = $_FILES[$this->getPostVar()]['name']['image'][$index];
158  $filename_arr = pathinfo($filename);
159  $suffix = $filename_arr["extension"];
160  $mimetype = $_FILES[$this->getPostVar()]['type']['image'][$index];
161  $size_bytes = $_FILES[$this->getPostVar()]['size']['image'][$index];
162  // virus handling
163  if (strlen($tmpname)) {
164  $vir = ilUtil::virusHandling($tmpname, $filename);
165  if ($vir[0] == false) {
166  $this->setAlert($lng->txt("form_msg_file_virus_found") . "<br />" . $vir[1]);
167  return false;
168  }
169  }
170  }
171  }
172  }
173  }
174  } else {
175  $this->setAlert($lng->txt("msg_input_is_required"));
176  return false;
177  }
178 
179  return $this->checkSubItemsInput();
180  }
static virusHandling($a_file, $a_orig_name="", $a_clean=true)
scan file for viruses and clean files if possible
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
global $DIC
Definition: saml.php:7
getPostVar()
Get Post Variable.
$index
Definition: metadata.php:60
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
$_POST["username"]
+ Here is the call graph for this function:

◆ insert()

ilMultipleChoiceWizardInputGUI::insert (   $a_tpl)

Insert property html.

Parameters
$a_tplilTemplate

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

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

187  {
188  global $DIC;
189  $lng = $DIC['lng'];
190 
191  $tpl = new ilTemplate("tpl.prop_multiplechoicewizardinput.html", true, true, "Modules/TestQuestionPool");
192  $i = 0;
193  foreach ($this->values as $value) {
194  if ($this->getSingleline()) {
195  if (!$this->hideImages) {
196  if (strlen($value->getImage())) {
197  $imagename = $this->qstObject->getImagePathWeb() . $value->getImage();
198  if (($this->getSingleline()) && ($this->qstObject->getThumbSize())) {
199  if (@file_exists($this->qstObject->getImagePath() . $this->qstObject->getThumbPrefix() . $value->getImage())) {
200  $imagename = $this->qstObject->getImagePathWeb() . $this->qstObject->getThumbPrefix() . $value->getImage();
201  }
202  }
203  $tpl->setCurrentBlock('image');
204  $tpl->setVariable('SRC_IMAGE', $imagename);
205  $tpl->setVariable('IMAGE_NAME', $value->getImage());
206  $tpl->setVariable('ALT_IMAGE', ilUtil::prepareFormOutput($value->getAnswertext()));
207  $tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
208  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
209  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
210  $tpl->parseCurrentBlock();
211  }
212  $tpl->setCurrentBlock('addimage');
213  $tpl->setVariable("IMAGE_BROWSE", $lng->txt('select_file'));
214  $tpl->setVariable("IMAGE_ID", $this->getPostVar() . "[image][$i]");
215  $tpl->setVariable("IMAGE_SUBMIT", $lng->txt("upload"));
216  $tpl->setVariable("IMAGE_ROW_NUMBER", $i);
217  $tpl->setVariable("IMAGE_POST_VAR", $this->getPostVar());
218  $tpl->parseCurrentBlock();
219  }
220 
221  if (is_object($value)) {
222  $tpl->setCurrentBlock("prop_text_propval");
223  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getAnswertext()));
224  $tpl->parseCurrentBlock();
225  $tpl->setCurrentBlock("prop_points_propval");
226  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPointsChecked()));
227  $tpl->parseCurrentBlock();
228  $tpl->setCurrentBlock("prop_points_unchecked_propval");
229  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPointsUnchecked()));
230  $tpl->parseCurrentBlock();
231  }
232  $tpl->setCurrentBlock('singleline');
233  $tpl->setVariable("SIZE", $this->getSize());
234  $tpl->setVariable("SINGLELINE_ID", $this->getPostVar() . "[answer][$i]");
235  $tpl->setVariable("SINGLELINE_ROW_NUMBER", $i);
236  $tpl->setVariable("SINGLELINE_POST_VAR", $this->getPostVar());
237  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
238  if ($this->getDisabled()) {
239  $tpl->setVariable("DISABLED_SINGLELINE", " disabled=\"disabled\"");
240  }
241  $tpl->parseCurrentBlock();
242  } elseif (!$this->getSingleline()) {
243  if (is_object($value)) {
244  $tpl->setCurrentBlock("prop_points_propval");
245  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPoints()));
246  $tpl->parseCurrentBlock();
247  $tpl->setCurrentBlock("prop_points_unchecked_propval");
248  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getPointsUnchecked()));
249  $tpl->parseCurrentBlock();
250  }
251  $tpl->setCurrentBlock('multiline');
252  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($value->getAnswertext()));
253  $tpl->setVariable("MULTILINE_ID", $this->getPostVar() . "[answer][$i]");
254  $tpl->setVariable("MULTILINE_ROW_NUMBER", $i);
255  $tpl->setVariable("MULTILINE_POST_VAR", $this->getPostVar());
256  if ($this->getDisabled()) {
257  $tpl->setVariable("DISABLED_MULTILINE", " disabled=\"disabled\"");
258  }
259  $tpl->parseCurrentBlock();
260  }
261  if ($this->getAllowMove()) {
262  $tpl->setCurrentBlock("move");
263  $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][$i]");
264  $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][$i]");
265  $tpl->setVariable("ID", $this->getPostVar() . "[$i]");
266  $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
267  $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
268  $tpl->parseCurrentBlock();
269  }
270  $tpl->setCurrentBlock("row");
271  $tpl->setVariable("POST_VAR", $this->getPostVar());
272  $tpl->setVariable("ROW_NUMBER", $i);
273  $tpl->setVariable("ID", $this->getPostVar() . "[answer][$i]");
274  $tpl->setVariable("POINTS_ID", $this->getPostVar() . "[points][$i]");
275  $tpl->setVariable("POINTS_UNCHECKED_ID", $this->getPostVar() . "[points_unchecked][$i]");
276  $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][$i]");
277  $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][$i]");
278  if ($this->getDisabled()) {
279  $tpl->setVariable("DISABLED_POINTS", " disabled=\"disabled\"");
280  }
281  $tpl->setVariable("ADD_BUTTON", ilGlyphGUI::get(ilGlyphGUI::ADD));
282  $tpl->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
283  $tpl->parseCurrentBlock();
284  $i++;
285  }
286 
287  if ($this->getSingleline()) {
288  if (!$this->hideImages) {
289  if (is_array($this->getSuffixes())) {
290  $suff_str = $delim = "";
291  foreach ($this->getSuffixes() as $suffix) {
292  $suff_str .= $delim . "." . $suffix;
293  $delim = ", ";
294  }
295  $tpl->setCurrentBlock('allowed_image_suffixes');
296  $tpl->setVariable("TXT_ALLOWED_SUFFIXES", $lng->txt("file_allowed_suffixes") . " " . $suff_str);
297  $tpl->parseCurrentBlock();
298  }
299 
300  $tpl->setCurrentBlock("image_heading");
301  $tpl->setVariable("ANSWER_IMAGE", $lng->txt('answer_image'));
302  $tpl->setVariable("TXT_MAX_SIZE", ilUtil::getFileSizeInfo());
303  $tpl->parseCurrentBlock();
304  }
305  }
306 
307  $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
308  $tpl->setVariable("TEXT_YES", $lng->txt('yes'));
309  $tpl->setVariable("TEXT_NO", $lng->txt('no'));
310  $tpl->setVariable("DELETE_IMAGE_HEADER", $lng->txt('delete_image_header'));
311  $tpl->setVariable("DELETE_IMAGE_QUESTION", $lng->txt('delete_image_question'));
312  $tpl->setVariable("ANSWER_TEXT", $lng->txt('answer_text'));
313  $tpl->setVariable("POINTS_TEXT", $lng->txt('points'));
314  $tpl->setVariable("COMMANDS_TEXT", $lng->txt('actions'));
315  $tpl->setVariable("POINTS_CHECKED_TEXT", $lng->txt('checkbox_checked'));
316  $tpl->setVariable("POINTS_UNCHECKED_TEXT", $lng->txt('checkbox_unchecked'));
317 
318  $a_tpl->setCurrentBlock("prop_generic");
319  $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
320  $a_tpl->parseCurrentBlock();
321 
322  global $DIC;
323  $tpl = $DIC['tpl'];
324  $tpl->addJavascript("./Services/Form/js/ServiceFormWizardInput.js");
325  $tpl->addJavascript("./Modules/TestQuestionPool/templates/default/multiplechoicewizard.js");
326  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaxLength()
Get Max Length.
global $DIC
Definition: saml.php:7
$tpl
Definition: ilias.php:10
getPostVar()
Get Post Variable.
static get($a_glyph, $a_text="")
Get glyph html.
static getFileSizeInfo()
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
$i
Definition: disco.tpl.php:19
+ 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 $index, and ilTextInputGUI\$value.

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

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