ILIAS  release_7 Revision v7.30-3-g800a261c036
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)
 Set multi values. 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...
 
 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
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. 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
const ALLOWED_PAGE_HTML_TAGS = '<em>, <strong>'
 
 $values = []
 
 $allowMove = false
 
 $singleline = true
 
 $qstObject = null
 
 $suffixes = []
 
 $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

Reimplemented from ilSingleChoiceWizardInputGUI.

Reimplemented in ilAssMultipleChoiceCorrectionsInputGUI.

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

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

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

+ Here is the call graph for this function:

◆ insert()

ilMultipleChoiceWizardInputGUI::insert (   $a_tpl)

Insert property html.

Parameters
$a_tplilTemplate

Reimplemented from ilSingleChoiceWizardInputGUI.

Reimplemented in ilAssMultipleChoiceCorrectionsInputGUI.

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

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

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.

+ Here is the call graph for this function:

◆ setValue()

ilMultipleChoiceWizardInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Reimplemented from ilSingleChoiceWizardInputGUI.

Reimplemented in ilAssMultipleChoiceCorrectionsInputGUI.

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

21 {
22 $this->values = [];
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], $a_value['answer_id'][$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,...

References $index, and ilTextInputGUI\$value.


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