Skip to content

Commit

Permalink
fixed moving questions
Browse files Browse the repository at this point in the history
  • Loading branch information
alex40724 committed Oct 27, 2023
1 parent 2548a44 commit 25a62e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion Modules/Survey/Editing/class.ilSurveyEditorGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ protected function insertQuestions(
$this->tpl->setOnScreenMessage('info', $this->lng->txt("no_target_selected_for_move"), true);
} else {
$this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
if ($this->edit_manager->getMoveSurveyId() !== $this->object->getId()) {
if ($this->edit_manager->getMoveSurveyId() === $this->object->getId()) {
$this->object->moveQuestions(
$this->edit_manager->getMoveSurveyQuestions(),
$insert_id,
Expand Down
3 changes: 0 additions & 3 deletions Modules/Survey/Page/class.ilSurveyPageEditGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ protected function appendNewQuestionToSurvey(
bool $a_force_duplicate = false
): int {
$ilDB = $this->db;

$this->log->debug("append question, id: " . $a_new_id . ", duplicate: " . $a_duplicate . ", force: " . $a_force_duplicate);

// get maximum sequence index in test
Expand All @@ -232,7 +231,6 @@ protected function appendNewQuestionToSurvey(
if ($this->object->isQuestionInSurvey($survey_question_id)) {
return $survey_question_id;
}

// append to survey
$next_id = $ilDB->nextId('svy_svy_qst');
$affectedRows = $ilDB->manipulateF(
Expand Down Expand Up @@ -630,7 +628,6 @@ protected function paste(int $a_id): void
foreach ($nodes as $qid) {
// create new questions
$question = ilObjSurvey::_instanciateQuestion($qid);

// handle exisiting copies
$title = $question->getTitle();
$max = 0;
Expand Down

0 comments on commit 25a62e5

Please sign in to comment.