chore: harmonize cockpit_url and details_url
This commit is contained in:
parent
d2d5f22536
commit
571b6b347b
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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}",
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue