Code Duplication    Length = 5-5 lines in 2 locations

main/exercise/exercise.class.php 2 locations

@@ 5435-5439 (lines=5) @@
5432
            $mail_content = $msg1;
5433
            $subject = get_lang('OpenQuestionsAttempted');
5434
5435
            if (api_get_session_id()) {
5436
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5437
            } else {
5438
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5439
            }
5440
5441
            if (!empty($teachers)) {
5442
                foreach ($teachers as $user_id => $teacher_data) {
@@ 5526-5530 (lines=5) @@
5523
            $mail_content = $msg1;
5524
            $subject = get_lang('OralQuestionsAttempted');
5525
5526
            if (api_get_session_id()) {
5527
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5528
            } else {
5529
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5530
            }
5531
5532
            if (!empty($teachers)) {
5533
                foreach ($teachers as $user_id => $teacher_data) {