Code Duplication    Length = 7-8 lines in 2 locations

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 list-inline">';
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;

main/exercice/exercise.class.php 1 location

@@ 6882-6888 (lines=7) @@
6879
            $num_suggestions = 0;
6880
6881
            if ($answerType == MATCHING || $answerType == DRAGGABLE) {
6882
                if ($answerType == DRAGGABLE) {
6883
                    $s .= '<div class="ui-widget ui-helper-clearfix">
6884
                            <ul class="drag_question ui-helper-reset ui-helper-clearfix">';
6885
                } else {
6886
                    $s .= '<div id="drag'.$questionId.'_question" class="drag_question">';
6887
                    $s .= '<table class="data_table">';
6888
                }
6889
6890
                $j = 1; //iterate through answers
6891
                $letter = 'A'; //mark letters for each answer