Code Duplication    Length = 7-7 lines in 2 locations

main/survey/survey.lib.php 2 locations

@@ 2935-2941 (lines=7) @@
2932
                );
2933
                $answers_of_user=array();
2934
            }
2935
            if($possible_answers_type[$row['question_id']] == 'open') {
2936
                $temp_id = 'open'.$open_question_iterator;
2937
                $answers_of_user[$row['question_id']][$temp_id] = $row;
2938
                $open_question_iterator++;
2939
            } else {
2940
                $answers_of_user[$row['question_id']][$row['option_id']] = $row;
2941
            }
2942
            $old_user = $row['user'];
2943
        }
2944
        // This is to display the last user
@@ 3218-3224 (lines=7) @@
3215
                $line++;
3216
                $column = 0;
3217
            }
3218
            if ($possible_answers_type[$row['question_id']] == 'open') {
3219
                $temp_id = 'open'.$open_question_iterator;
3220
                $answers_of_user[$row['question_id']][$temp_id] = $row;
3221
                $open_question_iterator++;
3222
            } else {
3223
                $answers_of_user[$row['question_id']][$row['option_id']] = $row;
3224
            }
3225
            $old_user = $row['user'];
3226
        }
3227