Code Duplication    Length = 7-7 lines in 2 locations

main/exercise/exercise.class.php 2 locations

@@ 2896-2902 (lines=7) @@
2893
            // User
2894
            if (api_is_allowed_to_session_edit()) {
2895
                if ($this->type == ALL_ON_ONE_PAGE || $nbrQuestions == $questionNum) {
2896
                    if ($this->review_answers) {
2897
                        $label = get_lang('ReviewQuestions');
2898
                        $class = 'btn btn-success';
2899
                    } else {
2900
                        $label = get_lang('EndTest');
2901
                        $class = 'btn btn-warning';
2902
                    }
2903
                } else {
2904
                    $label = get_lang('NextQuestion');
2905
                    $class = 'btn btn-primary';
@@ 2945-2951 (lines=7) @@
2942
2943
                    $html .= implode(PHP_EOL, $all_button);
2944
                } else {
2945
                    if ($this->review_answers) {
2946
                        $all_label = get_lang('ReviewQuestions');
2947
                        $class = 'btn btn-success';
2948
                    } else {
2949
                        $all_label = get_lang('EndTest');
2950
                        $class = 'btn btn-warning';
2951
                    }
2952
					$class .= ' question-validate-btn'; // used to select it with jquery
2953
                    $all_button[] = Display::button(
2954
                        'validate_all',