ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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)
 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...
 

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

 $tpl
 
 $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
 $ctrl
 
 $lng
 
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 

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

Reimplemented from ilTextInputGUI.

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

55 {
56 global $DIC;
57
58 $this->lng = $DIC->language();
59 $this->tpl = $DIC["tpl"];
60 $lng = $DIC->language();
61
62 parent::__construct($a_title, $a_postvar);
63
64 $this->show_wizard = false;
65 $this->show_save_phrase = false;
66 $this->categorytext = $lng->txt('answer');
67 $this->use_other_answer = false;
68
69 $this->setMaxLength(1000); // #6218
70 }
setMaxLength($a_maxlength)
Set Max Length.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, ilFormPropertyGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), and ilTextInputGUI\setMaxLength().

+ Here is the call graph for this function:

Member Function Documentation

◆ calcNeutralCategoryScale()

ilCategoryWizardInputGUI::calcNeutralCategoryScale ( )
protected

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

91 {
92 if (is_object($this->values)) {
93 $scale = 0;
94 for ($i = 0; $i < $this->values->getCategoryCount(); $i++) {
95 $cat = $this->values->getCategory($i);
96 if ($cat->neutral == 0) {
97 $scale += 1;
98 }
99 }
100 return $scale + 1;
101 } else {
102 return 99;
103 }
104 }
$i
Definition: metadata.php:24

References $i.

◆ checkInput()

ilCategoryWizardInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilTextInputGUI.

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

232 {
234 if (is_array($_POST[$this->getPostVar()])) {
236 }
237 $foundvalues = $_POST[$this->getPostVar()];
238 if (is_array($foundvalues)) {
239 // check answers
240 if (is_array($foundvalues['answer'])) {
241 foreach ($foundvalues['answer'] as $idx => $answervalue) {
242 if (((strlen($answervalue)) == 0) && ($this->getRequired() && (!$foundvalues['other'][$idx]))) {
243 $this->setAlert($lng->txt("msg_input_is_required"));
244 return false;
245 }
246 }
247 }
248 // check neutral column
249 if (array_key_exists('neutral', $foundvalues)) {
250 if ((strlen($foundvalues['neutral']) == 0) && ($this->getRequired)) {
251 $this->setAlert($lng->txt("msg_input_is_required"));
252 return false;
253 }
254 }
255 // check scales
256 if (is_array($foundvalues['scale'])) {
257 foreach ($foundvalues['scale'] as $scale) {
258 //scales required
259 if ((strlen($scale)) == 0) {
260 $this->setAlert($lng->txt("msg_input_is_required"));
261 return false;
262 }
263 //scales positive number
264 if (!ctype_digit($scale) || $scale <= 0) {
265 $this->setAlert($lng->txt("msg_input_only_positive_numbers"));
266 return false;
267 }
268 }
269 //scales no duplicates.
270 if (count(array_unique($foundvalues['scale'])) != count($foundvalues['scale'])) {
271 $this->setAlert($lng->txt("msg_duplicate_scale"));
272 return false;
273 }
274 }
275
276 // check neutral column scale
277 if (strlen($_POST[$this->postvar . '_neutral_scale'])) {
278 if (is_array($foundvalues['scale'])) {
279 if (in_array($_POST[$this->postvar . '_neutral_scale'], $foundvalues['scale'])) {
280 $this->setAlert($lng->txt("msg_duplicate_scale"));
281 return false;
282 }
283 }
284 }
285 } else {
286 $this->setAlert($lng->txt("msg_input_is_required"));
287 return false;
288 }
289 return $this->checkSubItemsInput();
290 }
$_POST["username"]
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.

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

+ Here is the call graph for this function:

◆ getAllowMove()

ilCategoryWizardInputGUI::getAllowMove ( )

Get allow move.

Returns
boolean Allow move

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

References $allowMove.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getCategoryCount()

ilCategoryWizardInputGUI::getCategoryCount ( )

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

83 {
84 if (!is_object($this->values)) {
85 return 0;
86 }
87 return $this->values->getCategoryCount();
88 }

◆ getCategoryText()

ilCategoryWizardInputGUI::getCategoryText ( )

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

References $categorytext.

Referenced by insert().

+ Here is the caller graph for this function:

◆ getDisabledScale()

ilCategoryWizardInputGUI::getDisabledScale ( )

Definition at line 216 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 121 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 111 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 211 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 191 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 72 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 161 of file class.ilCategoryWizardInputGUI.php.

References $values.

◆ insert()

ilCategoryWizardInputGUI::insert (   $a_tpl)

Insert property html.

Returns
int Size

Reimplemented from ilTextInputGUI.

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

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

References $i, ilFormPropertyGUI\$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.

+ 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 171 of file class.ilCategoryWizardInputGUI.php.

172 {
173 $this->allowMove = $a_allow_move;
174 }

◆ setCategoryText()

ilCategoryWizardInputGUI::setCategoryText (   $a_text)

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

197 {
198 $this->categorytext = $a_text;
199 }

◆ setDisabledScale()

ilCategoryWizardInputGUI::setDisabledScale (   $a_value)

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

222 {
223 $this->disabled_scale = $a_value;
224 }

◆ setNeutralCategoryTitle()

ilCategoryWizardInputGUI::setNeutralCategoryTitle (   $a_title)

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

117 {
118 $this->neutral_category_title = $a_title;
119 }

◆ setShowNeutralCategory()

ilCategoryWizardInputGUI::setShowNeutralCategory (   $a_value)

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

107 {
108 $this->show_neutral_category = $a_value;
109 }

◆ setShowSavePhrase()

ilCategoryWizardInputGUI::setShowSavePhrase (   $a_value)

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

207 {
208 $this->show_save_phrase = $a_value;
209 }

◆ setShowWizard()

ilCategoryWizardInputGUI::setShowWizard (   $a_value)

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

187 {
188 $this->show_wizard = $a_value;
189 }

◆ setUseOtherAnswer()

ilCategoryWizardInputGUI::setUseOtherAnswer (   $a_value)

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

78 {
79 $this->use_other_answer = ($a_value) ? true : false;
80 }

◆ setValue()

ilCategoryWizardInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Reimplemented from ilTextInputGUI.

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

132 {
133 $this->values = new SurveyCategories();
134 if (is_array($a_value)) {
135 if (is_array($a_value['answer'])) {
136 foreach ($a_value['answer'] as $index => $value) {
137 $this->values->addCategory($value, $a_value['other'][$index], null, null, $a_value['scale'][$index]);
138 }
139 }
140 }
141 if (array_key_exists('neutral', $a_value)) {
142 $this->values->addCategory($a_value['neutral'], 0, 1, null, $_POST[$this->postvar . '_neutral_scale']);
143 }
144 }
Class SurveyCategories.
$index
Definition: metadata.php:128

References $_POST, $index, and ilTextInputGUI\$value.

◆ setValues()

ilCategoryWizardInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

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

152 {
153 $this->values = $a_values;
154 }

Field Documentation

◆ $allowMove

ilCategoryWizardInputGUI::$allowMove = false
protected

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

Referenced by getAllowMove().

◆ $categorytext

ilCategoryWizardInputGUI::$categorytext
protected

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

Referenced by getCategoryText().

◆ $disabled_scale

ilCategoryWizardInputGUI::$disabled_scale = true
protected

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

Referenced by getDisabledScale().

◆ $neutral_category_title

ilCategoryWizardInputGUI::$neutral_category_title
protected

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

Referenced by getNeutralCategoryTitle().

◆ $show_neutral_category

ilCategoryWizardInputGUI::$show_neutral_category = false
protected

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

Referenced by getShowNeutralCategory().

◆ $show_save_phrase

ilCategoryWizardInputGUI::$show_save_phrase = false
protected

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

Referenced by getShowSavePhrase().

◆ $show_wizard

ilCategoryWizardInputGUI::$show_wizard = false
protected

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

Referenced by getShowWizard().

◆ $tpl

ilCategoryWizardInputGUI::$tpl
protected

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

Referenced by insert().

◆ $use_other_answer

ilCategoryWizardInputGUI::$use_other_answer
protected

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

Referenced by getUseOtherAnswer().

◆ $values

ilCategoryWizardInputGUI::$values = array()
protected

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

Referenced by getValues().


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