diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/statistics.graphql b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/statistics.graphql index c9aa8e1ed5ad60c21772315730c323dc3997b0e4..09f07ba475b32e826f9cae8431d778cbdc915db4 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/statistics/statistics.graphql +++ b/aleksis/apps/alsijil/frontend/components/coursebook/statistics/statistics.graphql @@ -1,4 +1,5 @@ fragment statistics on StatisticsByPersonType { + schoolTerm participationCount absenceCount absenceReasons { diff --git a/aleksis/apps/alsijil/schema/statistics.py b/aleksis/apps/alsijil/schema/statistics.py index ee3dd29b357680b40e504c6d03d8c8f1bca6fdbf..3f673666b27d275ec5e5d5f07c46bac464988820 100644 --- a/aleksis/apps/alsijil/schema/statistics.py +++ b/aleksis/apps/alsijil/schema/statistics.py @@ -27,6 +27,7 @@ class ExtraMarkWithCountType(graphene.ObjectType): class StatisticsByPersonType(graphene.ObjectType): + school_term = graphene.Int() participation_count = graphene.Int() absence_count = graphene.Int() absence_reasons = graphene.List(AbsenceReasonWithCountType) @@ -34,6 +35,9 @@ class StatisticsByPersonType(graphene.ObjectType): tardiness_count = graphene.Int() extra_marks = graphene.List(ExtraMarkWithCountType) + def resolve_school_term(root, info): + return 1 + def resolve_participation_count(root, info): return 3