Code Duplication    Length = 10-26 lines in 2 locations

main/inc/lib/exercise.lib.php 1 location

@@ 232-257 (lines=26) @@
229
                );
230
            }
231
232
            if ($show_comment) {
233
                if (
234
                in_array(
235
                    $answerType,
236
                    array(
237
                        MULTIPLE_ANSWER,
238
                        MULTIPLE_ANSWER_COMBINATION,
239
                        UNIQUE_ANSWER,
240
                        UNIQUE_ANSWER_IMAGE,
241
                        UNIQUE_ANSWER_NO_OPTION,
242
                        GLOBAL_MULTIPLE_ANSWER
243
                    )
244
                )
245
                ) {
246
                    $header = Display::tag('th', get_lang('Options'));
247
                    if ($exercise_feedback == EXERCISE_FEEDBACK_TYPE_END) {
248
                        $header .= Display::tag('th', get_lang('Feedback'));
249
                    }
250
                    $s .= '<table class="table table-hover table-striped">';
251
                    $s .= Display::tag(
252
                        'tr',
253
                        $header,
254
                        array('style' => 'text-align:left;')
255
                    );
256
                }
257
            }
258
259
            $matching_correct_answer = 0;
260
            $user_choice_array = array();

main/exercise/exercise.class.php 1 location

@@ 7132-7141 (lines=10) @@
7129
                $s .= Display::tag('tr', $header, array('style' => 'text-align:left;'));
7130
            }
7131
7132
            if ($show_comment) {
7133
                if (in_array($answerType, array(MULTIPLE_ANSWER, MULTIPLE_ANSWER_COMBINATION, UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION, GLOBAL_MULTIPLE_ANSWER))) {
7134
                    $header = Display::tag('th', get_lang('Options'));
7135
                    if ($exercise_feedback == EXERCISE_FEEDBACK_TYPE_END) {
7136
                        $header .= Display::tag('th', get_lang('Feedback'));
7137
                    }
7138
                    $s .= '<table class="data_table">';
7139
                    $s.= Display::tag('tr', $header, array('style' => 'text-align:left;'));
7140
                }
7141
            }
7142
7143
            $matching_correct_answer = 0;
7144
            $user_choice_array = array();