Code Duplication    Length = 5-5 lines in 2 locations

main/exercice/exercise.class.php 2 locations

@@ 5280-5284 (lines=5) @@
5277
            $mail_content = $msg1;
5278
            $subject = get_lang('OpenQuestionsAttempted');
5279
5280
            if (api_get_session_id()) {
5281
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5282
            } else {
5283
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5284
            }
5285
5286
            if (!empty($teachers)) {
5287
                foreach ($teachers as $user_id => $teacher_data) {
@@ 5371-5375 (lines=5) @@
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::get_teacher_list_from_course_code($courseCode);
5375
            }
5376
5377
            if (!empty($teachers)) {
5378
                foreach ($teachers as $user_id => $teacher_data) {