Code Duplication    Length = 10-10 lines in 2 locations

main/exercise/exercise_submit.php 1 location

@@ 1229-1238 (lines=10) @@
1226
        );
1227
1228
        // Button save and continue
1229
        switch ($objExercise->type) {
1230
            case ONE_PER_PAGE:
1231
                $exercise_actions .= $objExercise->show_button($questionId, $current_question);
1232
                break;
1233
            case ALL_ON_ONE_PAGE :
1234
                $button  = '<a href="javascript://" class="btn btn-info" onclick="save_now(\''.$questionId.'\'); ">'.get_lang('SaveForNow').'</a>';
1235
                $button .= '<span id="save_for_now_'.$questionId.'"></span>&nbsp;';
1236
                $exercise_actions  .= Display::div($button, array('class'=>'exercise_save_now_button'));
1237
                break;
1238
        }
1239
1240
        // Checkbox review answers
1241
        if ($objExercise->review_answers) {

main/exercise/exercise.class.php 1 location

@@ 6879-6888 (lines=10) @@
6876
            echo $this->showQuestion($question_obj, false, $origin, $i, $showTitle, false, $user_choice, false, null, false, $this->getModelType(), $this->categoryMinusOne);
6877
6878
            // Button save and continue
6879
            switch ($this->type) {
6880
                case ONE_PER_PAGE:
6881
                    $exercise_actions .= $this->show_button($questionId, $current_question, null, $remindList);
6882
                    break;
6883
                case ALL_ON_ONE_PAGE:
6884
                    $button  = '<a href="javascript://" class="btn" onclick="save_now(\''.$questionId.'\', null, true, 1); ">'.get_lang('SaveForNow').'</a>';
6885
                    $button .= '<span id="save_for_now_'.$questionId.'" class="exercise_save_mini_message"></span>&nbsp;';
6886
                    $exercise_actions .= Display::div($button, array('class'=>'exercise_save_now_button'));
6887
                    break;
6888
            }
6889
6890
            if (!empty($questions_in_media)) {
6891
                $count_of_questions_inside_media = count($questions_in_media);