Code Duplication    Length = 15-16 lines in 2 locations

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()

main/exercice/exercise.class.php 1 location

@@ 8004-8018 (lines=15) @@
8001
            $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
8002
            $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
8003
8004
            if (api_is_allowed_to_session_edit()) {
8005
                update_event_exercise(
8006
                    $exercise_stat_info['exe_id'],
8007
                    $this->selectId(),
8008
                    $total_score,
8009
                    $total_weight,
8010
                    api_get_session_id(),
8011
                    $learnpath_id,
8012
                    $learnpath_item_id,
8013
                    $learnpath_item_view_id,
8014
                    $exercise_stat_info['exe_duration'],
8015
                    '',
8016
                    array()
8017
                );
8018
            }
8019
8020
            // Send notification.
8021
            if (!api_is_allowed_to_edit(null, true)) {