Code Duplication    Length = 9-12 lines in 2 locations

main/survey/survey.lib.php 2 locations

@@ 3365-3376 (lines=12) @@
3362
        echo get_lang('SelectXAxis').': ';
3363
        echo '<select name="xaxis">';
3364
        echo '<option value="">---</option>';
3365
        foreach ($questions as $key => & $question) {
3366
            if (is_array($allowed_question_types)) {
3367
                if (in_array($question['type'], $allowed_question_types)) {
3368
                    echo '<option value="'.$question['question_id'].'"';
3369
                    if (isset($_GET['xaxis']) && $_GET['xaxis'] == $question['question_id']) {
3370
                        echo ' selected="selected"';
3371
                    }
3372
                    echo '">'.api_substr(strip_tags($question['question']), 0, 50).'</option>';
3373
                }
3374
            }
3375
3376
        }
3377
        echo '</select><br /><br />';
3378
        // Y axis
3379
        echo get_lang('SelectYAxis').': ';
@@ 3382-3390 (lines=9) @@
3379
        echo get_lang('SelectYAxis').': ';
3380
        echo '<select name="yaxis">';
3381
        echo '<option value="">---</option>';
3382
        foreach ($questions as $key => &$question) {
3383
            if (in_array($question['type'], $allowed_question_types)) {
3384
                echo '<option value="'.$question['question_id'].'"';
3385
                if (isset($_GET['yaxis']) && $_GET['yaxis'] == $question['question_id']) {
3386
                    echo ' selected="selected"';
3387
                }
3388
                echo '">'.api_substr(strip_tags($question['question']), 0, 50).'</option>';
3389
            }
3390
        }
3391
        echo '</select><br /><br />';
3392
        echo '<button class="save" type="submit" name="Submit" value="Submit">'.get_lang('CompareQuestions').'</button>';
3393
        echo '</form>';