Code Duplication    Length = 5-6 lines in 2 locations

main/survey/survey.lib.php 2 locations

@@ 2804-2808 (lines=5) @@
2801
                } else {
2802
                    foreach ($possible_option as $option_id => & $value) {
2803
                        if ($questions[$question_id]['type'] == 'percentage') {
2804
                            if (!empty($answers_of_user[$question_id][$option_id])) {
2805
                                echo "<td align='center'>";
2806
                                echo $answers_of_user[$question_id][$option_id]['value'];
2807
                                echo "</td>";
2808
                            }
2809
                        }
2810
                        else {
2811
                            echo '<td align="center">';
@@ 2813-2818 (lines=6) @@
2810
                        else {
2811
                            echo '<td align="center">';
2812
                            if (!empty($answers_of_user[$question_id][$option_id])) {
2813
                                if ($answers_of_user[$question_id][$option_id]['value'] != 0) {
2814
                                    echo $answers_of_user[$question_id][$option_id]['value'];
2815
                                }
2816
                                else {
2817
                                    echo 'v';
2818
                                }
2819
                            }
2820
                        } // </hub>
2821
                    }