Code Duplication    Length = 5-5 lines in 2 locations

main/exercice/exercise.class.php 2 locations

@@ 5334-5338 (lines=5) @@
5331
            $mail_content = $msg1;
5332
            $subject = get_lang('OpenQuestionsAttempted');
5333
5334
            if (api_get_session_id()) {
5335
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5336
            } else {
5337
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5338
            }
5339
5340
            if (!empty($teachers)) {
5341
                foreach ($teachers as $user_id => $teacher_data) {
@@ 5425-5429 (lines=5) @@
5422
            $mail_content = $msg1;
5423
            $subject = get_lang('OralQuestionsAttempted');
5424
5425
            if (api_get_session_id()) {
5426
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5427
            } else {
5428
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5429
            }
5430
5431
            if (!empty($teachers)) {
5432
                foreach ($teachers as $user_id => $teacher_data) {