Code Duplication    Length = 7-7 lines in 2 locations

main/exercice/exercise.class.php 2 locations

@@ 5278-5284 (lines=7) @@
5275
            $mail_content = $msg1;
5276
            $subject = get_lang('OpenQuestionsAttempted');
5277
5278
            if (api_get_session_id()) {
5279
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5280
            } else {
5281
                $teachers = CourseManager::getTeacherListFromCourse(
5282
                    $course_info['real_id']
5283
                );
5284
            }
5285
5286
            if (!empty($teachers)) {
5287
                foreach ($teachers as $user_id => $teacher_data) {
@@ 5371-5377 (lines=7) @@
5368
            $mail_content = $msg1;
5369
            $subject = get_lang('OralQuestionsAttempted');
5370
5371
            if (api_get_session_id()) {
5372
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5373
            } else {
5374
                $teachers = CourseManager::getTeacherListFromCourse(
5375
                    $course_info['real_id']
5376
                );
5377
            }
5378
5379
            if (!empty($teachers)) {
5380
                foreach ($teachers as $user_id => $teacher_data) {