Code Duplication    Length = 15-16 lines in 2 locations

main/inc/lib/exercise.lib.php 1 location

@@ 3757-3772 (lines=16) @@
3754
            $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
3755
            $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
3756
3757
            if (api_is_allowed_to_session_edit()) {
3758
                Event::update_event_exercice(
3759
                    $exercise_stat_info['exe_id'],
3760
                    $objExercise->selectId(),
3761
                    $total_score,
3762
                    $total_weight,
3763
                    api_get_session_id(),
3764
                    $learnpath_id,
3765
                    $learnpath_item_id,
3766
                    $learnpath_item_view_id,
3767
                    $exercise_stat_info['exe_duration'],
3768
                    $question_list,
3769
                    '',
3770
                    array()
3771
                );
3772
            }
3773
3774
            // Send notification
3775
            if (!api_is_allowed_to_edit(null, true) &&

main/exercise/exercise.class.php 1 location

@@ 8076-8090 (lines=15) @@
8073
            $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
8074
            $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
8075
8076
            if (api_is_allowed_to_session_edit()) {
8077
                update_event_exercise(
8078
                    $exercise_stat_info['exe_id'],
8079
                    $this->selectId(),
8080
                    $total_score,
8081
                    $total_weight,
8082
                    api_get_session_id(),
8083
                    $learnpath_id,
8084
                    $learnpath_item_id,
8085
                    $learnpath_item_view_id,
8086
                    $exercise_stat_info['exe_duration'],
8087
                    '',
8088
                    array()
8089
                );
8090
            }
8091
8092
            // Send notification.
8093
            if (!api_is_allowed_to_edit(null, true)) {