Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 3934-3949 (lines=16) @@
3931
                $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
3932
                $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
3933
3934
                if (api_is_allowed_to_session_edit()) {
3935
                    Event::update_event_exercise(
3936
                        $exercise_stat_info['exe_id'],
3937
                        $objExercise->selectId(),
3938
                        $total_score,
3939
                        $total_weight,
3940
                        api_get_session_id(),
3941
                        $learnpath_id,
3942
                        $learnpath_item_id,
3943
                        $learnpath_item_view_id,
3944
                        $exercise_stat_info['exe_duration'],
3945
                        $question_list,
3946
                        '',
3947
                        array()
3948
                    );
3949
                }
3950
            }
3951
3952
            // Send notification

main/exercise/exercise.class.php 1 location

@@ 7270-7284 (lines=15) @@
7267
            $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];
7268
            $learnpath_item_view_id = $exercise_stat_info['orig_lp_item_view_id'];
7269
7270
            if (api_is_allowed_to_session_edit()) {
7271
                Event::update_event_exercise(
7272
                    $exercise_stat_info['exe_id'],
7273
                    $this->selectId(),
7274
                    $total_score,
7275
                    $total_weight,
7276
                    api_get_session_id(),
7277
                    $learnpath_id,
7278
                    $learnpath_item_id,
7279
                    $learnpath_item_view_id,
7280
                    $exercise_stat_info['exe_duration'],
7281
                    '',
7282
                    array()
7283
                );
7284
            }
7285
7286
            // Send notification.
7287
            if (!api_is_allowed_to_edit(null, true)) {