Code Duplication    Length = 10-10 lines in 2 locations

main/exercice/exercise.class.php 1 location

@@ 6726-6735 (lines=10) @@
6723
            echo $this->showQuestion($question_obj, false, $origin, $i, $showTitle, false, $user_choice, false, null, false, $this->getModelType(), $this->categoryMinusOne);
6724
6725
            // Button save and continue
6726
            switch ($this->type) {
6727
                case ONE_PER_PAGE:
6728
                    $exercise_actions .= $this->show_button($questionId, $current_question, null, $remindList);
6729
                    break;
6730
                case ALL_ON_ONE_PAGE:
6731
                    $button  = '<a href="javascript://" class="btn" onclick="save_now(\''.$questionId.'\', null, true, 1); ">'.get_lang('SaveForNow').'</a>';
6732
                    $button .= '<span id="save_for_now_'.$questionId.'" class="exercise_save_mini_message"></span>&nbsp;';
6733
                    $exercise_actions .= Display::div($button, array('class'=>'exercise_save_now_button'));
6734
                    break;
6735
            }
6736
6737
            if (!empty($questions_in_media)) {
6738
                $count_of_questions_inside_media = count($questions_in_media);

main/exercice/exercise_submit.php 1 location

@@ 1192-1201 (lines=10) @@
1189
        );
1190
1191
        // Button save and continue
1192
        switch ($objExercise->type) {
1193
            case ONE_PER_PAGE:
1194
                $exercise_actions .= $objExercise->show_button($questionId, $current_question);
1195
                break;
1196
            case ALL_ON_ONE_PAGE :
1197
                $button  = '<a href="javascript://" class="btn btn-info" onclick="save_now(\''.$questionId.'\'); ">'.get_lang('SaveForNow').'</a>';
1198
                $button .= '<span id="save_for_now_'.$questionId.'"></span>&nbsp;';
1199
                $exercise_actions  .= Display::div($button, array('class'=>'exercise_save_now_button'));
1200
                break;
1201
        }
1202
1203
        // Checkbox review answers
1204
        if ($objExercise->review_answers) {