Code Duplication    Length = 5-5 lines in 2 locations

main/exercise/exercise.class.php 2 locations

@@ 5480-5484 (lines=5) @@
5477
            $mail_content = $msg1;
5478
            $subject = get_lang('OpenQuestionsAttempted');
5479
5480
            if (api_get_session_id()) {
5481
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5482
            } else {
5483
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5484
            }
5485
5486
            if (!empty($teachers)) {
5487
                foreach ($teachers as $user_id => $teacher_data) {
@@ 5578-5582 (lines=5) @@
5575
            $mail_content = $msg1;
5576
            $subject = get_lang('OralQuestionsAttempted');
5577
5578
            if (api_get_session_id()) {
5579
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5580
            } else {
5581
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5582
            }
5583
5584
            if (!empty($teachers)) {
5585
                foreach ($teachers as $user_id => $teacher_data) {