Code Duplication    Length = 15-16 lines in 2 locations

main/exercice/exercise.class.php 1 location

@@ 7930-7944 (lines=15) @@
7927
            $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
7928
            $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
7929
7930
            if (api_is_allowed_to_session_edit()) {
7931
                update_event_exercise(
7932
                    $exercise_stat_info['exe_id'],
7933
                    $this->selectId(),
7934
                    $total_score,
7935
                    $total_weight,
7936
                    api_get_session_id(),
7937
                    $learnpath_id,
7938
                    $learnpath_item_id,
7939
                    $learnpath_item_view_id,
7940
                    $exercise_stat_info['exe_duration'],
7941
                    '',
7942
                    array()
7943
                );
7944
            }
7945
7946
            // Send notification.
7947
            if (!api_is_allowed_to_edit(null, true)) {

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

@@ 3708-3723 (lines=16) @@
3705
            $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
3706
            $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
3707
3708
            if (api_is_allowed_to_session_edit()) {
3709
                Event::update_event_exercice(
3710
                    $exercise_stat_info['exe_id'],
3711
                    $objExercise->selectId(),
3712
                    $total_score,
3713
                    $total_weight,
3714
                    api_get_session_id(),
3715
                    $learnpath_id,
3716
                    $learnpath_item_id,
3717
                    $learnpath_item_view_id,
3718
                    $exercise_stat_info['exe_duration'],
3719
                    $question_list,
3720
                    '',
3721
                    array()
3722
                );
3723
            }
3724
3725
            // Send notification ..
3726
            if (!api_is_allowed_to_edit(null, true) && !api_is_excluded_user_type()