Code Duplication    Length = 7-8 lines in 2 locations

main/exercice/exercise.class.php 1 location

@@ 6893-6899 (lines=7) @@
6890
            $num_suggestions = 0;
6891
6892
            if ($answerType == MATCHING || $answerType == DRAGGABLE) {
6893
                if ($answerType == DRAGGABLE) {
6894
                    $s .= '<div class="ui-widget ui-helper-clearfix">
6895
                            <ul class="drag_question ui-helper-reset ui-helper-clearfix">';
6896
                } else {
6897
                    $s .= '<div id="drag'.$questionId.'_question" class="drag_question">';
6898
                    $s .= '<table class="data_table">';
6899
                }
6900
6901
                $j = 1; //iterate through answers
6902
                $letter = 'A'; //mark letters for each answer

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

@@ 108-115 (lines=8) @@
105
            $num_suggestions = 0;
106
107
            if (in_array($answerType, [MATCHING, DRAGGABLE, MATCHING_DRAGGABLE])) {
108
                if ($answerType == DRAGGABLE) {
109
                    $s .= '<div class="col-md-12 ui-widget ui-helper-clearfix">
110
                        <div class="clearfix">
111
                        <ul class="exercise-draggable-answer ui-helper-reset ui-helper-clearfix">';
112
                } else {
113
                    $s .= '<div id="drag'.$questionId.'_question" class="drag_question">
114
                           <table class="data_table">';
115
                }
116
117
                // Iterate through answers
118
                $x = 1;