ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
SurveyMultipleChoiceQuestionGUI Class Reference

MultipleChoice survey question GUI representation. More...

+ Inheritance diagram for SurveyMultipleChoiceQuestionGUI:
+ Collaboration diagram for SurveyMultipleChoiceQuestionGUI:

Public Member Functions

 setQuestionTabs ()
 
 getParsedAnswers (array $a_working_data=null, $a_only_user_anwers=false)
 
 getPrintView ($question_title=1, $show_questiontext=1, $survey_id=null, array $a_working_data=null)
 Creates a HTML representation of the question. More...
 
 getWorkingForm ($working_data="", $question_title=1, $show_questiontext=1, $error_message="", $survey_id=null)
 Creates the question output form for the learner. More...
 
- Public Member Functions inherited from SurveyQuestionGUI
 __construct ($a_id=-1)
 
 setQuestionTabs ()
 
executeCommand ()
 
 getQuestionType ()
 Returns the question type string. More...
 
 setBackUrl ($a_url)
 
 setQuestionTabsForClass ($guiclass)
 
 getPrintView ($question_title=1, $show_questiontext=1)
 
 preview ()
 Creates a preview of the question. More...
 
 getWorkingForm ($working_data="", $question_title=1, $show_questiontext=1, $error_message="", $survey_id=null)
 
 material ($checkonly=false)
 Material tab of the survey questions. More...
 
 deleteMaterial ()
 
 addMaterial ()
 Add materials to a question. More...
 
 removeMaterial ()
 
 cancelExplorer ()
 
 addPG ()
 
 addST ()
 
 addGIT ()
 
 linkChilds ()
 
 savePhrase ($a_reload=false)
 Creates an output to save the current answers as a phrase. More...
 
 confirmSavePhrase ()
 Save a new phrase to the database. More...
 

Protected Member Functions

 initObject ()
 
 addFieldsToEditForm (ilPropertyFormGUI $a_form)
 
 validateEditForm (ilPropertyFormGUI $a_form)
 
 importEditFormValues (ilPropertyFormGUI $a_form)
 
- Protected Member Functions inherited from SurveyQuestionGUI
 initObject ()
 
 outQuestionText ($template)
 
 initEditForm ()
 
 addCommandButtons ($a_form)
 
 editQuestion (ilPropertyFormGUI $a_form=null)
 
 saveSync ()
 
 saveReturn ()
 
 saveForm ()
 
 save ($a_return=false, $a_sync=false)
 
 copySyncForm ()
 
 syncCopies ()
 
 originalSyncForm ()
 
 sync ()
 
 cancelSync ()
 
 redirectAfterSaving ($a_return=false)
 Redirect to calling survey or to edit form. More...
 
 cancel ()
 
 validateEditForm (ilPropertyFormGUI $a_form)
 
 addFieldsToEditForm (ilPropertyFormGUI $a_form)
 
 importEditFormValues (ilPropertyFormGUI $a_form)
 
 getPrintViewQuestionTitle ($question_title=1)
 
 getMaterialOutput ()
 Creates the HTML output of the question material(s) More...
 
 initPhrasesForm ()
 
 addPhrase (ilPropertyFormGUI $a_form=null)
 Creates an output for the addition of phrases. More...
 
 addSelectedPhrase ()
 
 renderStatisticsDetailsTable (array $a_head, array $a_rows, array $a_foot=null)
 

Additional Inherited Members

- Static Public Member Functions inherited from SurveyQuestionGUI
static _getQuestionGUI ($questiontype, $question_id=-1)
 Creates a question gui representation. More...
 
static _getGUIClassNameForId ($a_q_id)
 
static _getClassNameForQType ($q_type)
 
- Data Fields inherited from SurveyQuestionGUI
 $object
 
- Protected Attributes inherited from SurveyQuestionGUI
 $rbacsystem
 
 $user
 
 $access
 
 $tree
 
 $toolbar
 
 $tabs
 
 $tpl
 
 $lng
 
 $ctrl
 
 $cumulated
 
 $parent_url
 
 $log
 

Detailed Description

MultipleChoice survey question GUI representation.

The SurveyMultipleChoiceQuestionGUI class encapsulates the GUI representation for multiple choice survey question types.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m

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

Member Function Documentation

◆ addFieldsToEditForm()

SurveyMultipleChoiceQuestionGUI::addFieldsToEditForm ( ilPropertyFormGUI  $a_form)
protected

Definition at line 29 of file class.SurveyMultipleChoiceQuestionGUI.php.

References ilPropertyFormGUI\addItem(), ilFormPropertyGUI\setRequired(), ilNumberInputGUI\setSize(), and ilCheckboxInputGUI\setValue().

30  {
31  // orientation
32  $orientation = new ilRadioGroupInputGUI($this->lng->txt("orientation"), "orientation");
33  $orientation->setRequired(false);
34  $orientation->addOption(new ilRadioOption($this->lng->txt('vertical'), 0));
35  $orientation->addOption(new ilRadioOption($this->lng->txt('horizontal'), 1));
36  $a_form->addItem($orientation);
37 
38  // minimum answers
39  $minanswers = new ilCheckboxInputGUI($this->lng->txt("use_min_answers"), "use_min_answers");
40  $minanswers->setValue(1);
41  $minanswers->setOptionTitle($this->lng->txt("use_min_answers_option"));
42  $minanswers->setRequired(false);
43 
44  $nranswers = new ilNumberInputGUI($this->lng->txt("nr_min_answers"), "nr_min_answers");
45  $nranswers->setSize(5);
46  $nranswers->setDecimals(0);
47  $nranswers->setRequired(false);
48  $nranswers->setMinValue(1);
49  $minanswers->addSubItem($nranswers);
50 
51  $nrmaxanswers = new ilNumberInputGUI($this->lng->txt("nr_max_answers"), "nr_max_answers");
52  $nrmaxanswers->setSize(5);
53  $nrmaxanswers->setDecimals(0);
54  $nrmaxanswers->setRequired(false);
55  $nrmaxanswers->setMinValue(1);
56  $minanswers->addSubItem($nrmaxanswers);
57 
58  $a_form->addItem($minanswers);
59 
60  // Answers
61  $answers = new ilCategoryWizardInputGUI($this->lng->txt("answers"), "answers");
62  $answers->setRequired(false);
63  $answers->setAllowMove(true);
64  $answers->setShowWizard(false);
65  $answers->setShowSavePhrase(false);
66  $answers->setUseOtherAnswer(true);
67  $answers->setShowNeutralCategory(true);
68  $answers->setNeutralCategoryTitle($this->lng->txt('svy_neutral_answer'));
69  $answers->setDisabledScale(false);
70  $a_form->addItem($answers);
71 
72 
73  // values
74  $orientation->setValue($this->object->getOrientation());
75  $minanswers->setChecked($this->object->use_min_answers);
76  $nranswers->setValue($this->object->nr_min_answers);
77  $nrmaxanswers->setValue($this->object->nr_max_answers);
78  if (!$this->object->getCategories()->getCategoryCount()) {
79  $this->object->getCategories()->addCategory("");
80  }
81  $answers->setValues($this->object->getCategories());
82  }
This class represents an option in a radio group.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
This class represents a survey question category wizard property in a property form.
setSize($a_size)
Set Size.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:

◆ getParsedAnswers()

SurveyMultipleChoiceQuestionGUI::getParsedAnswers ( array  $a_working_data = null,
  $a_only_user_anwers = false 
)

Definition at line 142 of file class.SurveyMultipleChoiceQuestionGUI.php.

References $i.

Referenced by getPrintView().

143  {
144  if (is_array($a_working_data)) {
145  $user_answers = $a_working_data;
146  }
147 
148  $options = array();
149  for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
150  $cat = $this->object->categories->getCategory($i);
151  $value = ($cat->scale) ? ($cat->scale - 1) : $i;
152 
153  $checked = "unchecked";
154  $text = null;
155  if (is_array($a_working_data)) {
156  foreach ($user_answers as $user_answer) {
157  if ($value == $user_answer["value"]) {
158  $checked = "checked";
159  if ($user_answer["textanswer"]) {
160  $text = $user_answer["textanswer"];
161  }
162  break;
163  }
164  }
165  }
166 
167  // "other" options have to be last or horizontal will be screwed
168  $idx = $cat->other . "_" . $value;
169 
170  if (!$a_only_user_anwers || $checked == "checked") {
171  $options[$idx] = array(
172  "value" => $value
173  ,"title" => trim($cat->title)
174  ,"other" => (bool) $cat->other
175  ,"checked" => $checked
176  ,"textanswer" => $text
177  );
178  }
179 
180  ksort($options);
181  }
182 
183  return array_values($options);
184  }
$i
Definition: metadata.php:24
+ Here is the caller graph for this function:

◆ getPrintView()

SurveyMultipleChoiceQuestionGUI::getPrintView (   $question_title = 1,
  $show_questiontext = 1,
  $survey_id = null,
array  $a_working_data = null 
)

Creates a HTML representation of the question.

private

Definition at line 191 of file class.SurveyMultipleChoiceQuestionGUI.php.

References ilUtil\getHtmlPath(), ilUtil\getImagePath(), getParsedAnswers(), SurveyQuestionGUI\getPrintViewQuestionTitle(), SurveyQuestionGUI\outQuestionText(), and ilUtil\prepareFormOutput().

192  {
193  $options = $this->getParsedAnswers($a_working_data);
194 
195  $template = new ilTemplate("tpl.il_svy_qpl_mc_printview.html", true, true, "Modules/SurveyQuestionPool");
196  switch ($this->object->getOrientation()) {
197  case 0:
198  // vertical orientation
199  foreach ($options as $option) {
200  if ($option["other"]) {
201  $template->setCurrentBlock("other_row");
202  $template->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_" . $option["checked"] . ".png")));
203  $template->setVariable("ALT_CHECKBOX", $this->lng->txt($option["checked"]));
204  $template->setVariable("TITLE_CHECKBOX", $this->lng->txt($option["checked"]));
205  $template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($option["title"]));
206  $template->setVariable("OTHER_ANSWER", $option["textanswer"]
207  ? ilUtil::prepareFormOutput($option["textanswer"])
208  : "&nbsp;");
209  $template->parseCurrentBlock();
210  } else {
211  $template->setCurrentBlock("mc_row");
212  $template->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_" . $option["checked"] . ".png")));
213  $template->setVariable("ALT_CHECKBOX", $this->lng->txt($option["checked"]));
214  $template->setVariable("TITLE_CHECKBOX", $this->lng->txt($option["checked"]));
215  $template->setVariable("TEXT_MC", ilUtil::prepareFormOutput($option["title"]));
216  $template->parseCurrentBlock();
217  }
218  }
219  break;
220  case 1:
221  // horizontal orientation
222  foreach ($options as $option) {
223  $template->setCurrentBlock("checkbox_col");
224  $template->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_" . $option["checked"] . ".png")));
225  $template->setVariable("ALT_CHECKBOX", $this->lng->txt($option["checked"]));
226  $template->setVariable("TITLE_CHECKBOX", $this->lng->txt($option["checked"]));
227  $template->parseCurrentBlock();
228  }
229  foreach ($options as $option) {
230  if ($option["other"]) {
231  $template->setCurrentBlock("other_text_col");
232  $template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($option["title"]));
233  $template->setVariable("OTHER_ANSWER", $option["textanswer"]
234  ? ilUtil::prepareFormOutput($option["textanswer"])
235  : "&nbsp;");
236  $template->parseCurrentBlock();
237  } else {
238  $template->setCurrentBlock("text_col");
239  $template->setVariable("TEXT_MC", ilUtil::prepareFormOutput($option["title"]));
240  $template->parseCurrentBlock();
241  }
242  }
243  break;
244  }
245 
246  if ($this->object->use_min_answers) {
247  $template->setCurrentBlock('min_max_msg');
248  if ($this->object->nr_min_answers > 0 && $this->object->nr_max_answers > 0) {
249  $template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_min_max_nr_answers'), $this->object->nr_min_answers, $this->object->nr_max_answers));
250  } elseif ($this->object->nr_min_answers > 0) {
251  $template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_min_nr_answers'), $this->object->nr_min_answers));
252  } elseif ($this->object->nr_max_answers > 0) {
253  $template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_max_nr_answers'), $this->object->nr_max_answers));
254  }
255  $template->parseCurrentBlock();
256  }
257  if ($show_questiontext) {
258  $this->outQuestionText($template);
259  }
260  if ($question_title) {
261  $template->setVariable("QUESTION_TITLE", $this->getPrintViewQuestionTitle($question_title));
262  }
263  $template->parseCurrentBlock();
264  return $template->get();
265  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static getHtmlPath($relative_path)
get url of path
getPrintViewQuestionTitle($question_title=1)
getParsedAnswers(array $a_working_data=null, $a_only_user_anwers=false)
+ Here is the call graph for this function:

◆ getWorkingForm()

SurveyMultipleChoiceQuestionGUI::getWorkingForm (   $working_data = "",
  $question_title = 1,
  $show_questiontext = 1,
  $error_message = "",
  $survey_id = null 
)

Creates the question output form for the learner.

public

Definition at line 277 of file class.SurveyMultipleChoiceQuestionGUI.php.

References $i, SurveyQuestionGUI\getMaterialOutput(), SurveyQuestionGUI\outQuestionText(), and ilUtil\prepareFormOutput().

278  {
279  $template = new ilTemplate("tpl.il_svy_out_mc.html", true, true, "Modules/SurveyQuestionPool");
280  $template->setCurrentBlock("material");
281  $template->setVariable("TEXT_MATERIAL", $this->getMaterialOutput());
282  $template->parseCurrentBlock();
283  switch ($this->object->getOrientation()) {
284  case 0:
285  // vertical orientation
286  for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
287  $cat = $this->object->categories->getCategory($i);
288  if ($cat->other) {
289  $template->setCurrentBlock("other_row");
290  if (strlen($cat->title)) {
291  $template->setVariable("OTHER_LABEL", $cat->title);
292  }
293  $template->setVariable("VALUE_MC", ($cat->scale) ? ($cat->scale - 1) : $i);
294  $template->setVariable("QUESTION_ID", $this->object->getId());
295  if (is_array($working_data)) {
296  foreach ($working_data as $value) {
297  if (strlen($value["value"])) {
298  if ($value["value"] == $cat->scale - 1) {
299  $template->setVariable("OTHER_VALUE", ' value="' . ilUtil::prepareFormOutput($value['textanswer']) . '"');
300  if (!$value['uncheck']) {
301  $template->setVariable("CHECKED_MC", " checked=\"checked\"");
302  }
303  }
304  }
305  }
306  }
307  $template->parseCurrentBlock();
308  } else {
309  $template->setCurrentBlock("mc_row");
310  if ($cat->neutral) {
311  $template->setVariable('ROWCLASS', ' class="neutral"');
312  }
313  $template->setVariable("TEXT_MC", ilUtil::prepareFormOutput($cat->title));
314  $template->setVariable("VALUE_MC", ($cat->scale) ? ($cat->scale - 1) : $i);
315  $template->setVariable("QUESTION_ID", $this->object->getId());
316  if (is_array($working_data)) {
317  foreach ($working_data as $value) {
318  if (strlen($value["value"])) {
319  if ($value["value"] == $cat->scale - 1) {
320  if (!$value['uncheck']) {
321  $template->setVariable("CHECKED_MC", " checked=\"checked\"");
322  }
323  }
324  }
325  }
326  }
327  $template->parseCurrentBlock();
328  }
329  $template->touchBlock('outer_row');
330  }
331  break;
332  case 1:
333  // horizontal orientation
334 
335  // #15477 - reverting the categorizing of answers
336  for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
337  $cat = $this->object->categories->getCategory($i);
338 
339  // checkbox
340  $template->setCurrentBlock("checkbox_col");
341  if ($cat->neutral) {
342  $template->setVariable('COLCLASS', ' neutral');
343  }
344  $template->setVariable("VALUE_MC", ($cat->scale) ? ($cat->scale - 1) : $i);
345  $template->setVariable("QUESTION_ID", $this->object->getId());
346  if (is_array($working_data)) {
347  foreach ($working_data as $value) {
348  if (strlen($value["value"])) {
349  if ($value["value"] == $cat->scale - 1) {
350  if (!$value['uncheck']) {
351  $template->setVariable("CHECKED_MC", " checked=\"checked\"");
352  }
353  }
354  }
355  }
356  }
357  $template->parseCurrentBlock();
358 
359  // answer & input
360  if ($cat->other) {
361  $template->setCurrentBlock("text_other_col");
362  $template->setVariable("VALUE_MC", ($cat->scale) ? ($cat->scale - 1) : $i);
363  $template->setVariable("QUESTION_ID", $this->object->getId());
364  if (strlen($cat->title)) {
365  $template->setVariable("OTHER_LABEL", $cat->title);
366  }
367  if (is_array($working_data)) {
368  foreach ($working_data as $value) {
369  if (strlen($value["value"])) {
370  if ($value["value"] == $cat->scale - 1) {
371  $template->setVariable("OTHER_VALUE", ' value="' . ilUtil::prepareFormOutput($value['textanswer']) . '"');
372  }
373  }
374  }
375  }
376  $template->parseCurrentBlock();
377  }
378  // answer
379  else {
380  $template->setCurrentBlock("text_col");
381  if ($cat->neutral) {
382  $template->setVariable('COLCLASS', ' neutral');
383  }
384  $template->setVariable("VALUE_MC", ($cat->scale) ? ($cat->scale - 1) : $i);
385  $template->setVariable("TEXT_MC", ilUtil::prepareFormOutput($cat->title));
386  $template->setVariable("QUESTION_ID", $this->object->getId());
387  $template->parseCurrentBlock();
388  }
389  $template->touchBlock('text_outer_col');
390  }
391  break;
392  }
393 
394  $template->setCurrentBlock("question_data");
395  if ($this->object->use_min_answers) {
396  $template->setCurrentBlock('min_max_msg');
397  if ($this->object->nr_min_answers > 0 && $this->object->nr_max_answers > 0) {
398  if ($this->object->nr_min_answers == $this->object->nr_max_answers) {
399  $template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_min_max_exact_answers'), $this->object->nr_min_answers));
400  } else {
401  $template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_min_max_nr_answers'), $this->object->nr_min_answers, $this->object->nr_max_answers));
402  }
403  } elseif ($this->object->nr_min_answers > 0) {
404  $template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_min_nr_answers'), $this->object->nr_min_answers));
405  } elseif ($this->object->nr_max_answers > 0) {
406  $template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_max_nr_answers'), $this->object->nr_max_answers));
407  }
408  $template->parseCurrentBlock();
409  }
410  if (strcmp($error_message, "") != 0) {
411  $template->setVariable("ERROR_MESSAGE", "<p class=\"warning\">$error_message</p>");
412  }
413  if ($show_questiontext) {
414  $this->outQuestionText($template);
415  }
416  if ($question_title) {
417  $template->setVariable("QUESTION_TITLE", $this->object->getTitle());
418  }
419  $template->parseCurrentBlock();
420  return $template->get();
421  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaterialOutput()
Creates the HTML output of the question material(s)
$i
Definition: metadata.php:24
+ Here is the call graph for this function:

◆ importEditFormValues()

SurveyMultipleChoiceQuestionGUI::importEditFormValues ( ilPropertyFormGUI  $a_form)
protected

Definition at line 120 of file class.SurveyMultipleChoiceQuestionGUI.php.

References $_POST, and ilPropertyFormGUI\getInput().

121  {
122  $this->object->setOrientation($a_form->getInput("orientation"));
123  $this->object->use_other_answer = ($a_form->getInput('use_other_answer')) ? 1 : 0;
124  $this->object->other_answer_label = $this->object->use_other_answer ? $a_form->getInput('other_answer_label') : null;
125  $this->object->use_min_answers = ($a_form->getInput('use_min_answers')) ? true : false;
126  $this->object->nr_min_answers = ($a_form->getInput('nr_min_answers') > 0) ? $a_form->getInput('nr_min_answers') : null;
127  $this->object->nr_max_answers = ($a_form->getInput('nr_max_answers') > 0) ? $a_form->getInput('nr_max_answers') : null;
128  $this->object->label = $a_form->getInput('label');
129 
130  $this->object->categories->flushCategories();
131 
132  foreach ($_POST['answers']['answer'] as $key => $value) {
133  if (strlen($value)) {
134  $this->object->getCategories()->addCategory($value, $_POST['answers']['other'][$key], 0, null, $_POST['answers']['scale'][$key]);
135  }
136  }
137  if (strlen($_POST['answers']['neutral'])) {
138  $this->object->getCategories()->addCategory($_POST['answers']['neutral'], 0, 1, null, $_POST['answers_neutral_scale']);
139  }
140  }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
$_POST["username"]
+ Here is the call graph for this function:

◆ initObject()

SurveyMultipleChoiceQuestionGUI::initObject ( )
protected

Definition at line 15 of file class.SurveyMultipleChoiceQuestionGUI.php.

16  {
17  $this->object = new SurveyMultipleChoiceQuestion();
18  }

◆ setQuestionTabs()

SurveyMultipleChoiceQuestionGUI::setQuestionTabs ( )

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

References SurveyQuestionGUI\setQuestionTabsForClass().

25  {
26  $this->setQuestionTabsForClass("surveymultiplechoicequestiongui");
27  }
+ Here is the call graph for this function:

◆ validateEditForm()

SurveyMultipleChoiceQuestionGUI::validateEditForm ( ilPropertyFormGUI  $a_form)
protected

Definition at line 84 of file class.SurveyMultipleChoiceQuestionGUI.php.

References $_POST, $errors, ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), and ilUtil\sendFailure().

85  {
86  if ($a_form->getInput("use_min_answers")) {
87  // #13927 - see importEditFormValues()
88  $cnt_answers = 0;
89  foreach ($_POST['answers']['answer'] as $key => $value) {
90  if (strlen($value)) {
91  $cnt_answers++;
92  }
93  }
94  if (strlen($_POST['answers']['neutral'])) {
95  $cnt_answers++;
96  }
97  /* this would be the DB-values
98  $cnt_answers = $a_form->getItemByPostVar("answers");
99  $cnt_answers = $cnt_answers->getCategoryCount();
100  */
101  $min_anwers = $a_form->getInput("nr_min_answers");
102  $max_anwers = $a_form->getInput("nr_max_answers");
103 
104  if ($min_anwers &&
105  $min_anwers > $cnt_answers) {
106  $a_form->getItemByPostVar("nr_min_answers")->setAlert($this->lng->txt('err_minvalueganswers'));
107  $errors = true;
108  }
109  if ($max_anwers > 0 &&
110  ($max_anwers > $cnt_answers || $max_anwers < $min_anwers)) {
111  $a_form->getItemByPostVar("nr_max_answers")->setAlert($this->lng->txt('err_maxvaluegeminvalue'));
112  $errors = true;
113  }
114  }
115 
116  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
117  return !$errors;
118  }
$errors
getItemByPostVar($a_post_var)
Get Item by POST variable.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

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