Code Duplication    Length = 5-5 lines in 2 locations

main/exercice/exercise.class.php 2 locations

@@ 5349-5353 (lines=5) @@
5346
            $mail_content = $msg1;
5347
            $subject = get_lang('OpenQuestionsAttempted');
5348
5349
            if (api_get_session_id()) {
5350
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5351
            } else {
5352
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5353
            }
5354
5355
            if (!empty($teachers)) {
5356
                foreach ($teachers as $user_id => $teacher_data) {
@@ 5440-5444 (lines=5) @@
5437
            $mail_content = $msg1;
5438
            $subject = get_lang('OralQuestionsAttempted');
5439
5440
            if (api_get_session_id()) {
5441
                $teachers = CourseManager::get_coach_list_from_course_code($courseCode, api_get_session_id());
5442
            } else {
5443
                $teachers = CourseManager::get_teacher_list_from_course_code($courseCode);
5444
            }
5445
5446
            if (!empty($teachers)) {
5447
                foreach ($teachers as $user_id => $teacher_data) {