Code Duplication    Length = 10-10 lines in 2 locations

main/exercice/exercise_submit.php 1 location

@@ 1176-1185 (lines=10) @@
1173
        );
1174
1175
        // Button save and continue
1176
        switch ($objExercise->type) {
1177
            case ONE_PER_PAGE:
1178
                $exercise_actions .= $objExercise->show_button($questionId, $current_question);
1179
                break;
1180
            case ALL_ON_ONE_PAGE :
1181
                $button  = '<a href="javascript://" class="btn btn-info" onclick="save_now(\''.$questionId.'\'); ">'.get_lang('SaveForNow').'</a>';
1182
                $button .= '<span id="save_for_now_'.$questionId.'"></span>&nbsp;';
1183
                $exercise_actions  .= Display::div($button, array('class'=>'exercise_save_now_button'));
1184
                break;
1185
        }
1186
1187
        // Checkbox review answers
1188
        if ($objExercise->review_answers) {

main/exercice/exercise.class.php 1 location

@@ 6807-6816 (lines=10) @@
6804
            echo $this->showQuestion($question_obj, false, $origin, $i, $showTitle, false, $user_choice, false, null, false, $this->getModelType(), $this->categoryMinusOne);
6805
6806
            // Button save and continue
6807
            switch ($this->type) {
6808
                case ONE_PER_PAGE:
6809
                    $exercise_actions .= $this->show_button($questionId, $current_question, null, $remindList);
6810
                    break;
6811
                case ALL_ON_ONE_PAGE:
6812
                    $button  = '<a href="javascript://" class="btn" onclick="save_now(\''.$questionId.'\', null, true, 1); ">'.get_lang('SaveForNow').'</a>';
6813
                    $button .= '<span id="save_for_now_'.$questionId.'" class="exercise_save_mini_message"></span>&nbsp;';
6814
                    $exercise_actions .= Display::div($button, array('class'=>'exercise_save_now_button'));
6815
                    break;
6816
            }
6817
6818
            if (!empty($questions_in_media)) {
6819
                $count_of_questions_inside_media = count($questions_in_media);