Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions components/ILIAS/Survey/Editing/class.ilSurveyEditorGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function questionsObject(): void
$ilToolbar->setFormAction($this->ctrl->getFormAction($this));
$types = new ilSelectInputGUI($this->lng->txt("create_new"), "sel_question_types");
$types->setOptions($qtypes);
$ilToolbar->addStickyItem($types, "");
$ilToolbar->addStickyItem($types, false);

$this->gui->button(
$this->lng->txt("svy_create_question"),
Expand Down Expand Up @@ -422,7 +422,7 @@ protected function insertQuestions(
}
}
if (!$insert_id && preg_match("/^cb_qb_(\d+)$/", $target, $matches)) {
$ids = $this->object->getQuestionblockQuestionIds($matches[1]);
$ids = $this->object->getQuestionblockQuestionIds((int) $matches[1]);
if (count($ids)) {
if ($insert_mode === 0) {
$insert_id = $ids[0];
Expand Down Expand Up @@ -695,7 +695,7 @@ public function changeDatatypeObject(): void
{
$ilUser = $this->user;

$ilUser->writePref('svy_insert_type', $this->request->getDataType());
$ilUser->writePref('svy_insert_type', (string) $this->request->getDataType());

switch ($this->request->getDataType()) {
case 2:
Expand Down Expand Up @@ -897,7 +897,7 @@ protected function initQuestionblockForm(
if ($a_question_ids) {
foreach ($a_question_ids as $q_id) {
$hidden = new ilHiddenInputGUI("qids[]");
$hidden->setValue($q_id);
$hidden->setValue((string) $q_id);
$form->addItem($hidden);
}
}
Expand All @@ -919,9 +919,9 @@ public function saveDefineQuestionblockObject(): void
$form = $this->initQuestionblockForm($block_id);
if ($form->checkInput()) {
$title = $form->getInput("title");
$show_questiontext = $form->getInput("show_questiontext");
$show_blocktitle = $form->getInput("show_blocktitle") ;
$compress_view = $form->getInput("compress_view") ;
$show_questiontext = (bool) $form->getInput("show_questiontext");
$show_blocktitle = (bool) $form->getInput("show_blocktitle");
$compress_view = (bool) $form->getInput("compress_view");
if ($block_id) {
$this->object->modifyQuestionblock(
$block_id,
Expand Down Expand Up @@ -1034,7 +1034,10 @@ public function saveHeadingObject(): void
$form = $this->initHeadingForm($q_id);
if ($form->checkInput()) {
$heading = $this->purifier->purify($form->getInput("heading"));
$this->object->saveHeading($heading, $form->getInput("insertbefore"));
$this->object->saveHeading(
$heading,
(int) $form->getInput("insertbefore")
);
$this->ctrl->redirect($this, "questions");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ protected function initEditForm(): ilPropertyFormGUI

// obligatory
$shuffle = new ilCheckboxInputGUI($this->lng->txt("obligatory"), "obligatory");
$shuffle->setValue(1);
$shuffle->setValue("1");
$shuffle->setRequired(false);
$form->addItem($shuffle);

Expand Down Expand Up @@ -339,7 +339,7 @@ protected function saveForm(): bool
$this->purifier->purify($form->getInput("question"))
);

$this->object->setObligatory($form->getInput("obligatory"));
$this->object->setObligatory((bool) $form->getInput("obligatory"));

$this->importEditFormValues($form);

Expand Down
Loading