Code Duplication    Length = 5-5 lines in 2 locations

main/exercise/exercise.class.php 2 locations

@@ 5430-5434 (lines=5) @@
5427
            $mail_content = $msg1;
5428
            $subject = get_lang('OpenQuestionsAttempted');
5429
5430
            if (api_get_session_id()) {
5431
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5432
            } else {
5433
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5434
            }
5435
5436
            if (!empty($teachers)) {
5437
                foreach ($teachers as $user_id => $teacher_data) {
@@ 5521-5525 (lines=5) @@
5518
            $mail_content = $msg1;
5519
            $subject = get_lang('OralQuestionsAttempted');
5520
5521
            if (api_get_session_id()) {
5522
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5523
            } else {
5524
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5525
            }
5526
5527
            if (!empty($teachers)) {
5528
                foreach ($teachers as $user_id => $teacher_data) {