Code Duplication    Length = 10-26 lines in 2 locations

main/exercice/exercise.class.php 1 location

@@ 7041-7050 (lines=10) @@
7038
                $s .= Display::tag('tr', $header, array('style' => 'text-align:left;'));
7039
            }
7040
7041
            if ($show_comment) {
7042
                if (in_array($answerType, array(MULTIPLE_ANSWER, MULTIPLE_ANSWER_COMBINATION, UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION, GLOBAL_MULTIPLE_ANSWER))) {
7043
                    $header = Display::tag('th', get_lang('Options'));
7044
                    if ($exercise_feedback == EXERCISE_FEEDBACK_TYPE_END) {
7045
                        $header .= Display::tag('th', get_lang('Feedback'));
7046
                    }
7047
                    $s .= '<table class="data_table">';
7048
                    $s.= Display::tag('tr', $header, array('style' => 'text-align:left;'));
7049
                }
7050
            }
7051
7052
            $matching_correct_answer = 0;
7053
            $user_choice_array = array();

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

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