Skip to content
Snippets Groups Projects
Commit 4c79b195 authored by permcu's avatar permcu
Browse files

Return school-term for statistics-by-person-query

Query can send no school-term and will receive the result for the
current school-term. With the additional school-term parameter the
frontend now knows which school-term is current.
parent 604ee125
No related branches found
No related tags found
1 merge request!361Resolve "Add statistics page for absences"
fragment statistics on StatisticsByPersonType {
schoolTerm
participationCount
absenceCount
absenceReasons {
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment