Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 3721-3736 (lines=16) @@
3718
            $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
3719
            $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
3720
3721
            if (api_is_allowed_to_session_edit()) {
3722
                Event::update_event_exercice(
3723
                    $exercise_stat_info['exe_id'],
3724
                    $objExercise->selectId(),
3725
                    $total_score,
3726
                    $total_weight,
3727
                    api_get_session_id(),
3728
                    $learnpath_id,
3729
                    $learnpath_item_id,
3730
                    $learnpath_item_view_id,
3731
                    $exercise_stat_info['exe_duration'],
3732
                    $question_list,
3733
                    '',
3734
                    array()
3735
                );
3736
            }
3737
3738
            // Send notification ..
3739
            if (!api_is_allowed_to_edit(null, true) && !api_is_excluded_user_type()

main/exercice/exercise.class.php 1 location

@@ 7919-7933 (lines=15) @@
7916
            $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
7917
            $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
7918
7919
            if (api_is_allowed_to_session_edit()) {
7920
                update_event_exercise(
7921
                    $exercise_stat_info['exe_id'],
7922
                    $this->selectId(),
7923
                    $total_score,
7924
                    $total_weight,
7925
                    api_get_session_id(),
7926
                    $learnpath_id,
7927
                    $learnpath_item_id,
7928
                    $learnpath_item_view_id,
7929
                    $exercise_stat_info['exe_duration'],
7930
                    '',
7931
                    array()
7932
                );
7933
            }
7934
7935
            // Send notification.
7936
            if (!api_is_allowed_to_edit(null, true)) {