From 220ee41aa5ab4419c0fa36256ae5598f00518b76 Mon Sep 17 00:00:00 2001 From: Julio Date: Fri, 5 Nov 2021 15:44:52 +0100 Subject: [PATCH] Surveys: Fix edit doodle --- public/main/survey/edit_meeting.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/public/main/survey/edit_meeting.php b/public/main/survey/edit_meeting.php index 88ca0c51f8..a17cc19ebd 100644 --- a/public/main/survey/edit_meeting.php +++ b/public/main/survey/edit_meeting.php @@ -211,7 +211,6 @@ if ($form->validate()) { Database::query($sql); } else { $params = [ - 'c_id' => api_get_course_int_id(), 'survey_id' => $surveyData['iid'], 'survey_question' => $formattedDate, 'survey_question_comment' => '', @@ -219,14 +218,12 @@ if ($form->validate()) { 'display' => 'horizontal', 'sort' => $counter, 'shared_question_id' => '0', + 'survey_group_pri' => 0, + 'survey_group_sec1' => 0, + 'survey_group_sec2' => 0, 'max_value' => 0, ]; - $questionId = Database::insert($questionTable, $params); - if ($questionId) { - $sql = "UPDATE $questionTable SET question_id = $questionId - WHERE iid = $questionId"; - Database::query($sql); - } + Database::insert($questionTable, $params); $counter++; } }