Skip to content

Commit

Permalink
Feat(Course, Enrollment, Student): Add completion number for course m…
Browse files Browse the repository at this point in the history
…etrics use case
  • Loading branch information
Artur-Poffo committed Feb 12, 2024
1 parent caf5961 commit 60edf92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ describe('Get course metrics use case', () => {
ageAverage: 20,
growthPercentage: 0,
growthPercentageFromLastYear: 0,
completionNumber: 1,
completionPercentage: 100
})
})
Expand Down Expand Up @@ -176,6 +177,7 @@ describe('Get course metrics use case', () => {
ageAverage: 40,
growthPercentage: 0,
growthPercentageFromLastYear: 0,
completionNumber: 1,
completionPercentage: 50
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ResourceNotFoundError | NotAllowedError,
ageAverage: number
growthPercentage: number
growthPercentageFromLastYear: number
completionNumber: number
completionPercentage: number
}
>
Expand Down Expand Up @@ -109,6 +110,7 @@ export class GetCourseMetricsUseCase implements UseCase< GetCourseMetricsUseCase
ageAverage: studentsAgeAverage,
growthPercentage,
growthPercentageFromLastYear,
completionNumber: sumOfCompletedEnrollments,
completionPercentage: studentsCompletionPercentage
})
}
Expand Down

0 comments on commit 60edf92

Please sign in to comment.