diff --git a/main/survey/preview.php b/main/survey/preview.php index 86e0641f86..7f37a6f52e 100755 --- a/main/survey/preview.php +++ b/main/survey/preview.php @@ -203,8 +203,8 @@ if (api_is_course_admin() || } $before = 0; - if (isset($_GET['show']) && isset($paged_questions[$_GET['show'] -1])) { - $before = count($paged_questions[$_GET['show'] -1]); + if (isset($_GET['show']) && isset($paged_questions[$_GET['show'] - 1])) { + $before = count($paged_questions[$_GET['show'] - 1]); } // Selecting the maximum number of pages diff --git a/main/survey/question.php b/main/survey/question.php index bd9722d351..ac28080c8f 100755 --- a/main/survey/question.php +++ b/main/survey/question.php @@ -138,7 +138,6 @@ switch ($_GET['type']) { break; } - // We are editing a question if (isset($_GET['question_id']) && !empty($_GET['question_id'])) { $formData = SurveyManager::get_question($_GET['question_id']); diff --git a/main/survey/survey.lib.php b/main/survey/survey.lib.php index 0fdacadc15..91796cfd07 100755 --- a/main/survey/survey.lib.php +++ b/main/survey/survey.lib.php @@ -806,7 +806,7 @@ class SurveyManager * This function duplicates a survey (and also all the question in that survey. * * @param int $surveyId id of the survey that has to be duplicated - * @param int $courseId id of the course which survey has to be duplicated + * @param int $courseId id of the course which survey has to be duplicated * * @return true * @@ -2208,7 +2208,6 @@ class SurveyManager ]; self::save_question($surveyData, $values); } - } } }