Code Duplication    Length = 10-26 lines in 2 locations

main/exercice/exercise.class.php 1 location

@@ 6988-6997 (lines=10) @@
6985
                $s .= Display::tag('tr', $header, array('style' => 'text-align:left;'));
6986
            }
6987
6988
            if ($show_comment) {
6989
                if (in_array($answerType, array(MULTIPLE_ANSWER, MULTIPLE_ANSWER_COMBINATION, UNIQUE_ANSWER, UNIQUE_ANSWER_NO_OPTION, GLOBAL_MULTIPLE_ANSWER))) {
6990
                    $header = Display::tag('th', get_lang('Options'));
6991
                    if ($exercise_feedback == EXERCISE_FEEDBACK_TYPE_END) {
6992
                        $header .= Display::tag('th', get_lang('Feedback'));
6993
                    }
6994
                    $s .= '<table class="data_table">';
6995
                    $s.= Display::tag('tr', $header, array('style' => 'text-align:left;'));
6996
                }
6997
            }
6998
6999
            $matching_correct_answer = 0;
7000
            $user_choice_array = array();

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

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