Code Duplication    Length = 15-16 lines in 2 locations

main/exercice/exercise.class.php 1 location

@@ 7987-8001 (lines=15) @@
7984
            $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
7985
            $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
7986
7987
            if (api_is_allowed_to_session_edit()) {
7988
                update_event_exercise(
7989
                    $exercise_stat_info['exe_id'],
7990
                    $this->selectId(),
7991
                    $total_score,
7992
                    $total_weight,
7993
                    api_get_session_id(),
7994
                    $learnpath_id,
7995
                    $learnpath_item_id,
7996
                    $learnpath_item_view_id,
7997
                    $exercise_stat_info['exe_duration'],
7998
                    '',
7999
                    array()
8000
                );
8001
            }
8002
8003
            // Send notification.
8004
            if (!api_is_allowed_to_edit(null, true)) {

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

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