Code Duplication    Length = 7-8 lines in 2 locations

main/exercice/exercise.class.php 1 location

@@ 6946-6952 (lines=7) @@
6943
            $num_suggestions = 0;
6944
6945
            if ($answerType == MATCHING || $answerType == DRAGGABLE) {
6946
                if ($answerType == DRAGGABLE) {
6947
                    $s .= '<div class="ui-widget ui-helper-clearfix">
6948
                            <ul class="drag_question ui-helper-reset ui-helper-clearfix">';
6949
                } else {
6950
                    $s .= '<div id="drag'.$questionId.'_question" class="drag_question">';
6951
                    $s .= '<table class="data_table">';
6952
                }
6953
6954
                $j = 1; //iterate through answers
6955
                $letter = 'A'; //mark letters for each answer

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

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