diff --git a/server/vbv_lernwelt/dashboard/graphql/queries.py b/server/vbv_lernwelt/dashboard/graphql/queries.py index 7579fd56..30bd8608 100644 --- a/server/vbv_lernwelt/dashboard/graphql/queries.py +++ b/server/vbv_lernwelt/dashboard/graphql/queries.py @@ -118,6 +118,7 @@ class DashboardQuery(graphene.ObjectType): _, success_total, fail_total = competences( course_slug=str(course.slug), course_session_selection_ids=course_session_for_user, + user_selection_ids=[str(user.id)], ) # assignment diff --git a/server/vbv_lernwelt/dashboard/tests/graphql/test_dashboard.py b/server/vbv_lernwelt/dashboard/tests/graphql/test_dashboard.py index 5a8e0e40..4bdd58d6 100644 --- a/server/vbv_lernwelt/dashboard/tests/graphql/test_dashboard.py +++ b/server/vbv_lernwelt/dashboard/tests/graphql/test_dashboard.py @@ -46,6 +46,12 @@ class DashboardTestCase(GraphQLTestCase): course_session=cs_3, user=member, role=CourseSessionUser.Role.MEMBER ) + other_member = create_user("hans") + + add_course_session_user( + course_session=cs_1, user=other_member, role=CourseSessionUser.Role.MEMBER + ) + # setup assignments create_assignment_completion( user=member, @@ -92,6 +98,15 @@ class DashboardTestCase(GraphQLTestCase): completion_status="FAIL", ) + mark_course_completion( + page=create_performance_criteria_page( + course=course, course_page=course_page, circle=circle + ), + user=other_member, + course_session=cs_1, + completion_status="SUCCESS", + ) + self.client.force_login(member) query = f"""query($course_id: ID!) {{