Code Duplication    Length = 9-14 lines in 2 locations

main/inc/lib/exercise.lib.php 2 locations

@@ 1046-1054 (lines=9) @@
1043
                            <td width="45%">
1044
HTML;
1045
1046
                            if (isset($select_items[$lines_count])) {
1047
                                $s .= <<<HTML
1048
                                <div id="window_{$windowId}_answer" class="window window_right_question">
1049
                                    <strong>{$select_items[$lines_count]['letter']}.</strong> {$select_items[$lines_count]['answer']}
1050
                                </div>
1051
HTML;
1052
                            } else {
1053
                                $s .= '&nbsp;';
1054
                            }
1055
1056
                            $s .= '</td></tr>';
1057
@@ 1060-1073 (lines=14) @@
1057
1058
                            $lines_count++;
1059
1060
                            if (($lines_count - 1) == $num_suggestions) {
1061
                                while (isset($select_items[$lines_count])) {
1062
                                    $s .= <<<HTML
1063
                                    <tr>
1064
                                        <td colspan="2"></td>
1065
                                        <td>
1066
                                            <strong>{$select_items[$lines_count]['letter']}</strong>
1067
                                            {$select_items[$lines_count]['answer']}
1068
                                        </td>
1069
                                    </tr>
1070
HTML;
1071
                                    $lines_count++;
1072
                                }
1073
                            }
1074
                            $matching_correct_answer++;
1075
                        }
1076
                        break;