Skip to content

Commit

Permalink
chore: ensure that live quizzes are counted on course summary instead…
Browse files Browse the repository at this point in the history
… of sessions
  • Loading branch information
sjschlapbach committed Nov 4, 2024
1 parent c9bc053 commit fa4cbc6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/graphql/src/services/courses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,11 @@ export async function getCourseSummary(
include: {
_count: {
select: {
sessions: true,
liveQuizzes: {
where: {
isDeleted: false,
},
},
practiceQuizzes: {
where: {
isDeleted: false,
Expand Down Expand Up @@ -637,7 +641,7 @@ export async function getCourseSummary(

return {
numOfParticipations: course._count.participations,
numOfLiveQuizzes: course._count.sessions,
numOfLiveQuizzes: course._count.liveQuizzes,
numOfPracticeQuizzes: course._count.practiceQuizzes,
numOfMicroLearnings: course._count.microLearnings,
numOfGroupActivities: course._count.groupActivities,
Expand Down

0 comments on commit fa4cbc6

Please sign in to comment.