26     protected \ILIAS\Survey\InternalGUIService 
$gui;
    39         string $a_postvar = 
""    43         $this->
lng = $DIC->language();
    44         $this->tpl = $DIC[
"tpl"];
    45         $lng = $DIC->language();
    49         $this->show_wizard = 
false;
    50         $this->categorytext = 
$lng->
txt(
'answer');
    51         $this->use_other_answer = 
false;
    54         $this->gui = $DIC->survey()->internal()->gui();
    64         $this->use_other_answer = $a_value;
    69         if (!is_object($this->values)) {
    72         return $this->values->getCategoryCount();
    77         if (is_object($this->values)) {
    79             for ($i = 0; $i < $this->values->getCategoryCount(); $i++) {
    80                 $cat = $this->values->getCategory($i);
    81                 if ($cat->neutral == 0) {
    93         $this->show_neutral_category = $a_value;
   103         $this->neutral_category_title = $a_title;
   117         if (is_array($a_value)) {
   118             if (is_array($a_value[
'answer'])) {
   119                 foreach ($a_value[
'answer'] as $index => 
$value) {
   120                     $this->values->addCategory(
   122                         $a_value[
'other'][$index] ?? 0,
   125                         isset($a_value[
'scale'][$index]) && (
int) $a_value[
'scale'][$index] > 0
   126                             ? (
int) $a_value[
'scale'][$index]
   132         if (array_key_exists(
'neutral', $a_value)) {
   133             $scale = $this->
str($this->postvar . 
'_neutral_scale');
   134             $scale = ($scale === 
"")
   137             $this->values->addCategory(
   149         $this->values = $a_values;
   159         $this->allowMove = $a_allow_move;
   169         $this->show_wizard = $a_value;
   179         $this->categorytext = $a_text;
   194         $this->disabled_scale = $a_value;
   204         if (count($foundvalues) > 0) {
   206             if (is_array($foundvalues[
'answer'] ?? 
false)) {
   207                 foreach ($foundvalues[
'answer'] as $idx => $answervalue) {
   208                     if (((strlen($answervalue ?? 
"")) == 0) && ($this->
getRequired() && (!isset($foundvalues[
'other'][$idx])))) {
   223             if (isset($foundvalues[
'scale'])) {
   224                 foreach ($foundvalues[
'scale'] as $scale) {
   226                     if ((strlen($scale ?? 
"")) == 0) {
   231                     if (!ctype_digit($scale) || $scale <= 0) {
   237                 if (count(array_unique($foundvalues[
'scale'])) !== count($foundvalues[
'scale'])) {
   244             if ($neutral_scale != 
"") {
   245                 if (isset($foundvalues[
'scale'])) {
   246                     if (in_array($neutral_scale, $foundvalues[
'scale'])) {
   274         return $val[
"neutral"];
   282         $neutral_category = null;
   283         $tpl = 
new ilTemplate(
"tpl.prop_categorywizardinput.html", 
true, 
true, 
"Modules/SurveyQuestionPool");
   284         if (is_object($this->values)) {
   285             for ($i = 0; $i < $this->values->getCategoryCount(); $i++) {
   286                 $cat = $this->values->getCategory($i);
   287                 if (!$cat->neutral) {
   304                             $tpl->
setVariable(
"CHECKED_OTHER", 
' checked="checked"');
   314                         $tpl->
setVariable(
"UP_BUTTON", $this->gui->symbol()->glyph(
"up")->render());
   315                         $tpl->
setVariable(
"DOWN_BUTTON", $this->gui->symbol()->glyph(
"down")->render());
   326                         $tpl->
setVariable(
"DISABLED", 
" disabled=\"disabled\"");
   331                         $tpl->
setVariable(
"DISABLED_SCALE", 
" disabled=\"disabled\"");
   336                     $tpl->
setVariable(
"ADD_BUTTON", $this->gui->symbol()->glyph(
"add")->render());
   337                     $tpl->
setVariable(
"REMOVE_BUTTON", $this->gui->symbol()->glyph(
"remove")->render());
   340                     $neutral_category = $cat;
   347             if (is_object($neutral_category) && strlen($neutral_category->title ?? 
"")) {
   365             $scale = (is_object($neutral_category) && $neutral_category->scale > 0) ? $neutral_category->scale : $this->values->getNewScale();
   379                 $tpl->
setVariable(
"DISABLED", 
" disabled=\"disabled\"");
   383                 $tpl->
setVariable(
"DISABLED_SCALE", 
" disabled=\"disabled\"");
   404         $tpl->
addJavaScript(
"./Services/Form/js/ServiceFormWizardInput.js");
   405         $tpl->
addJavaScript(
"./Modules/SurveyQuestionPool/Categories/js/categorywizard.js");
 
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
static stripSlashesRecursive($a_data, bool $a_strip_html=true, string $a_allow="")
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
touchBlock(string $block)
overwrites ITX::touchBlock. 
 
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string. 
 
setVariable(string $variable, $value='')
Sets the given variable to the given value. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setVariable($variable, $value='')
Sets a variable value. 
 
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header. 
 
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block. 
 
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
setMaxLength(?int $a_maxlength)
 
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.