Code Duplication    Length = 7-7 lines in 2 locations

main/exercise/exercise.class.php 2 locations

@@ 2958-2964 (lines=7) @@
2955
            // User
2956
            if (api_is_allowed_to_session_edit()) {
2957
                if ($this->type == ALL_ON_ONE_PAGE || $nbrQuestions == $questionNum) {
2958
                    if ($this->review_answers) {
2959
                        $label = get_lang('ReviewQuestions');
2960
                        $class = 'btn btn-success';
2961
                    } else {
2962
                        $label = get_lang('EndTest');
2963
                        $class = 'btn btn-warning';
2964
                    }
2965
                } else {
2966
                    $label = get_lang('NextQuestion');
2967
                    $class = 'btn btn-primary';
@@ 3007-3013 (lines=7) @@
3004
3005
                    $html .= implode(PHP_EOL, $all_button);
3006
                } else {
3007
                    if ($this->review_answers) {
3008
                        $all_label = get_lang('ReviewQuestions');
3009
                        $class = 'btn btn-success';
3010
                    } else {
3011
                        $all_label = get_lang('EndTest');
3012
                        $class = 'btn btn-warning';
3013
                    }
3014
					$class .= ' question-validate-btn'; // used to select it with jquery
3015
                    $all_button[] = Display::button(
3016
                        'validate_all',