From 16fd2932900c7bc659699b04a052580f29ea1d78 Mon Sep 17 00:00:00 2001 From: Riku Rauhala Date: Mon, 7 Oct 2024 10:10:53 +0300 Subject: [PATCH] [Course statistics] Fix missing enrollments --- .../components/CourseStatistics/SingleCourseStats/index.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/services/frontend/src/components/CourseStatistics/SingleCourseStats/index.jsx b/services/frontend/src/components/CourseStatistics/SingleCourseStats/index.jsx index f90bd4243..19c2650a0 100644 --- a/services/frontend/src/components/CourseStatistics/SingleCourseStats/index.jsx +++ b/services/frontend/src/components/CourseStatistics/SingleCourseStats/index.jsx @@ -235,10 +235,7 @@ const SingleCourseStats = ({ } const countStudentEnrollmentStats = (allAttempts, filteredEnrollments, displayEnrollments) => { - const enrolledStudentsWithNoGrade = filteredEnrollments.filter(({ studentNumber, state }) => { - if (state !== 'ENROLLED') { - return false - } + const enrolledStudentsWithNoGrade = filteredEnrollments.filter(({ studentNumber }) => { const hasFailed = allAttempts.categories.failed ? allAttempts.categories.failed.includes(studentNumber) : false const hasPassed = allAttempts.categories.passed ? allAttempts.categories.passed.includes(studentNumber) : false return !hasFailed && !hasPassed