From 571b6b347b5e92bbf057c959eb56d54129d15386 Mon Sep 17 00:00:00 2001 From: Livio Bieri Date: Wed, 25 Oct 2023 17:08:15 +0200 Subject: [PATCH] chore: harmonize cockpit_url and details_url --- server/vbv_lernwelt/dashboard/graphql/queries.py | 2 +- server/vbv_lernwelt/dashboard/graphql/types/attendance.py | 4 ++-- .../vbv_lernwelt/dashboard/tests/graphql/test_attendance.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/vbv_lernwelt/dashboard/graphql/queries.py b/server/vbv_lernwelt/dashboard/graphql/queries.py index 1729793f..1aa58790 100644 --- a/server/vbv_lernwelt/dashboard/graphql/queries.py +++ b/server/vbv_lernwelt/dashboard/graphql/queries.py @@ -49,7 +49,7 @@ class DashboardQuery(graphene.ObjectType): return CourseStatisticsType( id=course.id, # noqa course_title=course.title, # noqa - course_slug=course.slug, # noqa + course_slug=course.slug, # noqa course_session_selection_ids=list(course_session_ids), # noqa ) diff --git a/server/vbv_lernwelt/dashboard/graphql/types/attendance.py b/server/vbv_lernwelt/dashboard/graphql/types/attendance.py index ac162f67..032b4f2f 100644 --- a/server/vbv_lernwelt/dashboard/graphql/types/attendance.py +++ b/server/vbv_lernwelt/dashboard/graphql/types/attendance.py @@ -22,7 +22,7 @@ class PresenceRecord(graphene.ObjectType): due_date = graphene.String(required=True) participants_present = graphene.Int(required=True) participants_total = graphene.Int(required=True) - cockpit_url = graphene.String(required=True) + details_url = graphene.String(required=True) class AttendanceDayPresences(graphene.ObjectType): @@ -67,7 +67,7 @@ def attendance_day_presences( due_date=format_swiss_datetime(attendance_day.due_date.end), # noqa participants_present=participants_present, # noqa participants_total=participants_total, # noqa - cockpit_url=url, # noqa + details_url=url, # noqa ) ) diff --git a/server/vbv_lernwelt/dashboard/tests/graphql/test_attendance.py b/server/vbv_lernwelt/dashboard/tests/graphql/test_attendance.py index 29734f4e..3d70af66 100644 --- a/server/vbv_lernwelt/dashboard/tests/graphql/test_attendance.py +++ b/server/vbv_lernwelt/dashboard/tests/graphql/test_attendance.py @@ -90,7 +90,7 @@ class DashboardAttendanceTestCase(GraphQLTestCase): due_date participants_present participants_total - cockpit_url + details_url }} }} }} @@ -113,7 +113,7 @@ class DashboardAttendanceTestCase(GraphQLTestCase): self.assertEqual(record["participants_present"], 1) self.assertEqual(record["participants_total"], 3) self.assertEqual( - record["cockpit_url"], + record["details_url"], f"/course/test-lehrgang/cockpit/attendance?id={attendance_course.learning_content.id}&courseSessionId={course_session.id}", )