ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCategoryWizardInputGUI Class Reference

This class represents a survey question category wizard property in a property form. More...

+ Inheritance diagram for ilCategoryWizardInputGUI:
+ Collaboration diagram for ilCategoryWizardInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 getUseOtherAnswer ()
 
 setUseOtherAnswer ($a_value)
 
 getCategoryCount ()
 
 setShowNeutralCategory ($a_value)
 
 getShowNeutralCategory ()
 
 setNeutralCategoryTitle ($a_title)
 
 getNeutralCategoryTitle ()
 
 setValue ($a_value)
 Set Value. More...
 
 setValues ($a_values)
 Set Values. More...
 
 getValues ()
 Get Values. More...
 
 setAllowMove ($a_allow_move)
 Set allow move. More...
 
 getAllowMove ()
 Get allow move. More...
 
 setShowWizard ($a_value)
 
 getShowWizard ()
 
 setCategoryText ($a_text)
 
 getCategoryText ()
 
 setShowSavePhrase ($a_value)
 
 getShowSavePhrase ()
 
 getDisabledScale ()
 
 setDisabledScale ($a_value)
 
 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...
 
 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...
 
 removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 

Protected Member Functions

 calcNeutralCategoryScale ()
 
- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Protected Attributes

 $values = array()
 
 $allowMove = false
 
 $disabled_scale = true
 
 $show_wizard = false
 
 $show_save_phrase = false
 
 $categorytext
 
 $show_neutral_category = false
 
 $neutral_category_title
 
 $use_other_answer
 
- 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
 $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 survey question category 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 31 of file class.ilCategoryWizardInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilCategoryWizardInputGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Definition at line 49 of file class.ilCategoryWizardInputGUI.php.

References $lng.

50  {
51  parent::__construct($a_title, $a_postvar);
52  global $lng;
53  $this->show_wizard = false;
54  $this->show_save_phrase = false;
55  $this->categorytext = $lng->txt('answer');
56  $this->use_other_answer = false;
57  }
global $lng
Definition: privfeed.php:40

Member Function Documentation

◆ calcNeutralCategoryScale()

ilCategoryWizardInputGUI::calcNeutralCategoryScale ( )
protected

Definition at line 75 of file class.ilCategoryWizardInputGUI.php.

76  {
77  if (is_object($this->values))
78  {
79  $scale = 0;
80  for ($i = 0; $i < $this->values->getCategoryCount(); $i++)
81  {
82  $cat = $this->values->getCategory($i);
83  if ($cat->neutral == 0) $scale += 1;
84  }
85  return $scale+1;
86  }
87  else
88  {
89  return 99;
90  }
91  }

◆ checkInput()

ilCategoryWizardInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Definition at line 223 of file class.ilCategoryWizardInputGUI.php.

References $_POST, $lng, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), ilFormPropertyGUI\setAlert(), and ilUtil\stripSlashesRecursive().

224  {
225  global $lng;
226  if (is_array($_POST[$this->getPostVar()])) $_POST[$this->getPostVar()] = ilUtil::stripSlashesRecursive($_POST[$this->getPostVar()]);
227  $foundvalues = $_POST[$this->getPostVar()];
228  if (is_array($foundvalues))
229  {
230  // check answers
231  if (is_array($foundvalues['answer']))
232  {
233  foreach ($foundvalues['answer'] as $idx => $answervalue)
234  {
235  if (((strlen($answervalue)) == 0) && ($this->getRequired() && (!$foundvalues['other'][$idx])))
236  {
237  $this->setAlert($lng->txt("msg_input_is_required"));
238  return FALSE;
239  }
240  }
241  }
242  // check neutral column
243  if (array_key_exists('neutral', $foundvalues))
244  {
245  if ((strlen($foundvalues['neutral']) == 0) && ($this->getRequired))
246  {
247  $this->setAlert($lng->txt("msg_input_is_required"));
248  return false;
249  }
250  }
251  // check scales
252  if (is_array($foundvalues['scale']))
253  {
254  foreach ($foundvalues['scale'] as $scale)
255  {
256  if ((strlen($scale)) == 0)
257  {
258  $this->setAlert($lng->txt("msg_input_is_required"));
259  return FALSE;
260  }
261  }
262  }
263  // check scales
264  if (is_array($foundvalues['scale']))
265  {
266  if (count(array_unique($foundvalues['scale'])) != count($foundvalues['scale']))
267  {
268  $this->setAlert($lng->txt("msg_duplicate_scale"));
269  return FALSE;
270  }
271  }
272  // check neutral column scale
273  if (strlen($_POST[$this->postvar . '_neutral_scale']))
274  {
275  if (is_array($foundvalues['scale']))
276  {
277  if (in_array($_POST[$this->postvar . '_neutral_scale'], $foundvalues['scale']))
278  {
279  $this->setAlert($lng->txt("msg_duplicate_scale"));
280  return FALSE;
281  }
282  }
283  }
284  }
285  else
286  {
287  $this->setAlert($lng->txt("msg_input_is_required"));
288  return FALSE;
289  }
290  return $this->checkSubItemsInput();
291  }
$_POST['username']
Definition: cron.php:12
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.
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ getAllowMove()

ilCategoryWizardInputGUI::getAllowMove ( )

Get allow move.

Returns
boolean Allow move

Definition at line 173 of file class.ilCategoryWizardInputGUI.php.

References $allowMove.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getCategoryCount()

ilCategoryWizardInputGUI::getCategoryCount ( )

Definition at line 69 of file class.ilCategoryWizardInputGUI.php.

70  {
71  if (!is_object($this->values)) return 0;
72  return $this->values->getCategoryCount();
73  }

◆ getCategoryText()

ilCategoryWizardInputGUI::getCategoryText ( )

Definition at line 193 of file class.ilCategoryWizardInputGUI.php.

References $categorytext.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getDisabledScale()

ilCategoryWizardInputGUI::getDisabledScale ( )

Definition at line 208 of file class.ilCategoryWizardInputGUI.php.

References $disabled_scale.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getNeutralCategoryTitle()

ilCategoryWizardInputGUI::getNeutralCategoryTitle ( )

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

References $neutral_category_title.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getShowNeutralCategory()

ilCategoryWizardInputGUI::getShowNeutralCategory ( )

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

References $show_neutral_category.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getShowSavePhrase()

ilCategoryWizardInputGUI::getShowSavePhrase ( )

Definition at line 203 of file class.ilCategoryWizardInputGUI.php.

References $show_save_phrase.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getShowWizard()

ilCategoryWizardInputGUI::getShowWizard ( )

Definition at line 183 of file class.ilCategoryWizardInputGUI.php.

References $show_wizard.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getUseOtherAnswer()

ilCategoryWizardInputGUI::getUseOtherAnswer ( )

Definition at line 59 of file class.ilCategoryWizardInputGUI.php.

References $use_other_answer.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getValues()

ilCategoryWizardInputGUI::getValues ( )

Get Values.

Returns
array Values

Definition at line 153 of file class.ilCategoryWizardInputGUI.php.

References $values.

◆ insert()

ilCategoryWizardInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

Definition at line 298 of file class.ilCategoryWizardInputGUI.php.

References $lng, $tpl, ilGlyphGUI\ADD, ilGlyphGUI\DOWN, ilGlyphGUI\get(), getAllowMove(), getCategoryText(), ilFormPropertyGUI\getDisabled(), getDisabledScale(), ilFormPropertyGUI\getFieldId(), ilUtil\getImagePath(), ilTextInputGUI\getMaxLength(), getNeutralCategoryTitle(), ilFormPropertyGUI\getPostVar(), getShowNeutralCategory(), getShowSavePhrase(), getShowWizard(), ilTextInputGUI\getSize(), getUseOtherAnswer(), ilUtil\prepareFormOutput(), ilGlyphGUI\REMOVE, and ilGlyphGUI\UP.

299  {
300  global $lng;
301 
302  $neutral_category = null;
303  $tpl = new ilTemplate("tpl.prop_categorywizardinput.html", true, true, "Modules/SurveyQuestionPool");
304  $i = 0;
305  if (is_object($this->values))
306  {
307  for ($i = 0; $i < $this->values->getCategoryCount(); $i++)
308  {
309  $cat = $this->values->getCategory($i);
310  if (!$cat->neutral)
311  {
312  $tpl->setCurrentBlock("prop_text_propval");
313  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($cat->title));
314  $tpl->parseCurrentBlock();
315  $tpl->setCurrentBlock("prop_scale_propval");
316  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->values->getScale($i)));
317  $tpl->parseCurrentBlock();
318 
319  if ($this->getUseOtherAnswer())
320  {
321  $tpl->setCurrentBlock("other_answer_checkbox");
322  $tpl->setVariable("POST_VAR", $this->getPostVar());
323  $tpl->setVariable("OTHER_ID", $this->getPostVar() . "[other][$i]");
324  $tpl->setVariable("ROW_NUMBER", $i);
325  if ($cat->other)
326  {
327  $tpl->setVariable("CHECKED_OTHER", ' checked="checked"');
328  }
329  $tpl->parseCurrentBlock();
330  }
331 
332  if ($this->getAllowMove())
333  {
334  $tpl->setCurrentBlock("move");
335  $tpl->setVariable("CMD_UP", "cmd[up" . $this->getFieldId() . "][$i]");
336  $tpl->setVariable("CMD_DOWN", "cmd[down" . $this->getFieldId() . "][$i]");
337  $tpl->setVariable("ID", $this->getPostVar() . "[$i]");
338  include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
339  $tpl->setVariable("UP_BUTTON", ilGlyphGUI::get(ilGlyphGUI::UP));
340  $tpl->setVariable("DOWN_BUTTON", ilGlyphGUI::get(ilGlyphGUI::DOWN));
341  $tpl->parseCurrentBlock();
342  }
343 
344  $tpl->setCurrentBlock("row");
345  $tpl->setVariable("POST_VAR", $this->getPostVar());
346  $tpl->setVariable("ROW_NUMBER", $i);
347  $tpl->setVariable("ID", $this->getPostVar() . "[answer][$i]");
348  $tpl->setVariable("SIZE", $this->getSize());
349  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
350  if ($this->getDisabled())
351  {
352  $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
353  }
354 
355  $tpl->setVariable("SCALE_ID", $this->getPostVar() . "[scale][$i]");
356  if ($this->getDisabledScale())
357  {
358  $tpl->setVariable("DISABLED_SCALE", " disabled=\"disabled\"");
359  }
360 
361  $tpl->setVariable("CMD_ADD", "cmd[add" . $this->getFieldId() . "][$i]");
362  $tpl->setVariable("CMD_REMOVE", "cmd[remove" . $this->getFieldId() . "][$i]");
363  include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
364  $tpl->setVariable("ADD_BUTTON", ilGlyphGUI::get(ilGlyphGUI::ADD));
365  $tpl->setVariable("REMOVE_BUTTON", ilGlyphGUI::get(ilGlyphGUI::REMOVE));
366  $tpl->parseCurrentBlock();
367  }
368  else
369  {
370  $neutral_category = $cat;
371  }
372  }
373  }
374 
375  if ($this->getShowWizard())
376  {
377  $tpl->setCurrentBlock("wizard");
378  $tpl->setVariable("CMD_WIZARD", 'cmd[addPhrase]');
379  $tpl->setVariable("WIZARD_BUTTON", ilUtil::getImagePath('wizard.svg'));
380  $tpl->setVariable("WIZARD_TEXT", $lng->txt('add_phrase'));
381  $tpl->parseCurrentBlock();
382  }
383 
384  if ($this->getShowSavePhrase())
385  {
386  $tpl->setCurrentBlock('savephrase');
387  $tpl->setVariable("POST_VAR", $this->getPostVar());
388  $tpl->setVariable("VALUE_SAVE_PHRASE", $lng->txt('save_phrase'));
389  $tpl->parseCurrentBlock();
390  }
391 
392  if ($this->getShowNeutralCategory())
393  {
394  if (is_object($neutral_category) && strlen($neutral_category->title))
395  {
396  $tpl->setCurrentBlock("prop_text_neutral_propval");
397  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($neutral_category->title));
398  $tpl->parseCurrentBlock();
399  }
400  if (strlen($this->getNeutralCategoryTitle()))
401  {
402  $tpl->setCurrentBlock("neutral_category_title");
403  $tpl->setVariable("NEUTRAL_COLS", ($this->getUseOtherAnswer()) ? 4 : 3);
404  $tpl->setVariable("CATEGORY_TITLE", ilUtil::prepareFormOutput($this->getNeutralCategoryTitle()));
405  $tpl->parseCurrentBlock();
406  }
407  $tpl->setCurrentBlock("prop_scale_neutral_propval");
408  $scale = ($neutral_category->scale > 0) ? $neutral_category->scale : $this->values->getNewScale();
409  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($scale));
410  $tpl->parseCurrentBlock();
411 
412  if ($this->getUseOtherAnswer())
413  {
414  $tpl->touchBlock('other_answer_neutral');
415  }
416 
417  $tpl->setCurrentBlock('neutral_row');
418  $tpl->setVariable("POST_VAR", $this->getPostVar());
419  $tpl->setVariable("ID", $this->getPostVar() . "_neutral");
420  $tpl->setVariable("SIZE", $this->getSize());
421  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
422  if ($this->getDisabled())
423  {
424  $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
425  }
426  $tpl->setVariable("SCALE_ID", $this->getPostVar() . "_neutral_scale");
427  if ($this->getDisabledScale())
428  {
429  $tpl->setVariable("DISABLED_SCALE", " disabled=\"disabled\"");
430  }
431  $tpl->parseCurrentBlock();
432  }
433 
434  if ($this->getUseOtherAnswer())
435  {
436  $tpl->setCurrentBlock('other_answer_title');
437  $tpl->setVariable("OTHER_TEXT", $lng->txt('use_other_answer'));
438  $tpl->parseCurrentBlock();
439  }
440 
441  $tpl->setVariable("ELEMENT_ID", $this->getPostVar());
442  $tpl->setVariable("ANSWER_TEXT", $this->getCategoryText());
443  $tpl->setVariable("SCALE_TEXT", $lng->txt('scale'));
444  $tpl->setVariable("ACTIONS_TEXT", $lng->txt('actions'));
445 
446  $a_tpl->setCurrentBlock("prop_generic");
447  $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
448  $a_tpl->parseCurrentBlock();
449 
450  global $tpl;
451  $tpl->addJavascript("./Services/Form/js/ServiceFormWizardInput.js");
452  $tpl->addJavascript("./Modules/SurveyQuestionPool/templates/default/categorywizard.js");
453  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaxLength()
Get Max Length.
getPostVar()
Get Post Variable.
static get($a_glyph, $a_text="")
Get glyph html.
global $tpl
Definition: ilias.php:8
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
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ setAllowMove()

ilCategoryWizardInputGUI::setAllowMove (   $a_allow_move)

Set allow move.

Parameters
boolean$a_allow_moveAllow move

Definition at line 163 of file class.ilCategoryWizardInputGUI.php.

164  {
165  $this->allowMove = $a_allow_move;
166  }

◆ setCategoryText()

ilCategoryWizardInputGUI::setCategoryText (   $a_text)

Definition at line 188 of file class.ilCategoryWizardInputGUI.php.

189  {
190  $this->categorytext = $a_text;
191  }

◆ setDisabledScale()

ilCategoryWizardInputGUI::setDisabledScale (   $a_value)

Definition at line 213 of file class.ilCategoryWizardInputGUI.php.

214  {
215  $this->disabled_scale = $a_value;
216  }

◆ setNeutralCategoryTitle()

ilCategoryWizardInputGUI::setNeutralCategoryTitle (   $a_title)

Definition at line 103 of file class.ilCategoryWizardInputGUI.php.

104  {
105  $this->neutral_category_title = $a_title;
106  }

◆ setShowNeutralCategory()

ilCategoryWizardInputGUI::setShowNeutralCategory (   $a_value)

Definition at line 93 of file class.ilCategoryWizardInputGUI.php.

94  {
95  $this->show_neutral_category = $a_value;
96  }

◆ setShowSavePhrase()

ilCategoryWizardInputGUI::setShowSavePhrase (   $a_value)

Definition at line 198 of file class.ilCategoryWizardInputGUI.php.

199  {
200  $this->show_save_phrase = $a_value;
201  }

◆ setShowWizard()

ilCategoryWizardInputGUI::setShowWizard (   $a_value)

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

179  {
180  $this->show_wizard = $a_value;
181  }

◆ setUseOtherAnswer()

ilCategoryWizardInputGUI::setUseOtherAnswer (   $a_value)

Definition at line 64 of file class.ilCategoryWizardInputGUI.php.

65  {
66  $this->use_other_answer = ($a_value) ? true : false;
67  }

◆ setValue()

ilCategoryWizardInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Definition at line 118 of file class.ilCategoryWizardInputGUI.php.

References $_POST, and ilTextInputGUI\$value.

119  {
120  include_once "./Modules/SurveyQuestionPool/classes/class.SurveyCategories.php";
121  $this->values = new SurveyCategories();
122  if (is_array($a_value))
123  {
124  if (is_array($a_value['answer']))
125  {
126  foreach ($a_value['answer'] as $index => $value)
127  {
128  $this->values->addCategory($value, $a_value['other'][$index], null, null, $a_value['scale'][$index]);
129  }
130  }
131  }
132  if (array_key_exists('neutral', $a_value))
133  {
134  $this->values->addCategory($a_value['neutral'], 0, 1, null, $_POST[$this->postvar . '_neutral_scale']);
135  }
136  }
$_POST['username']
Definition: cron.php:12
Class SurveyCategories.

◆ setValues()

ilCategoryWizardInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

Definition at line 143 of file class.ilCategoryWizardInputGUI.php.

144  {
145  $this->values = $a_values;
146  }

Field Documentation

◆ $allowMove

ilCategoryWizardInputGUI::$allowMove = false
protected

Definition at line 34 of file class.ilCategoryWizardInputGUI.php.

Referenced by getAllowMove().

◆ $categorytext

ilCategoryWizardInputGUI::$categorytext
protected

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

Referenced by getCategoryText().

◆ $disabled_scale

ilCategoryWizardInputGUI::$disabled_scale = true
protected

Definition at line 35 of file class.ilCategoryWizardInputGUI.php.

Referenced by getDisabledScale().

◆ $neutral_category_title

ilCategoryWizardInputGUI::$neutral_category_title
protected

Definition at line 40 of file class.ilCategoryWizardInputGUI.php.

Referenced by getNeutralCategoryTitle().

◆ $show_neutral_category

ilCategoryWizardInputGUI::$show_neutral_category = false
protected

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

Referenced by getShowNeutralCategory().

◆ $show_save_phrase

ilCategoryWizardInputGUI::$show_save_phrase = false
protected

Definition at line 37 of file class.ilCategoryWizardInputGUI.php.

Referenced by getShowSavePhrase().

◆ $show_wizard

ilCategoryWizardInputGUI::$show_wizard = false
protected

Definition at line 36 of file class.ilCategoryWizardInputGUI.php.

Referenced by getShowWizard().

◆ $use_other_answer

ilCategoryWizardInputGUI::$use_other_answer
protected

Definition at line 41 of file class.ilCategoryWizardInputGUI.php.

Referenced by getUseOtherAnswer().

◆ $values

ilCategoryWizardInputGUI::$values = array()
protected

Definition at line 33 of file class.ilCategoryWizardInputGUI.php.

Referenced by getValues().


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