fix: various links that broke when moving stuff around

This commit is contained in:
Livio Bieri 2024-03-13 16:02:03 +01:00
parent 9e30efd59d
commit 8e076c3dac
6 changed files with 10 additions and 7 deletions

View File

@ -171,7 +171,7 @@ function findUserPointsHtml(userId: string) {
props.learningContent.content_type !== props.learningContent.content_type !==
'learnpath.LearningContentEdoniqTest' 'learnpath.LearningContentEdoniqTest'
" "
:to="`/course/${props.courseSession.course.slug}/cockpit/assignment/${learningContent.content_assignment.id}/${csu.user_id}`" :to="`/course/${props.courseSession.course.slug}/assignment-evaluation/${learningContent.content_assignment.id}/${csu.user_id}`"
class="link lg:w-full lg:text-right" class="link lg:w-full lg:text-right"
data-cy="show-results" data-cy="show-results"
> >

View File

@ -148,7 +148,7 @@ const courseSessionDetailResult = useCourseSessionDetailQuery();
</template> </template>
<template #link> <template #link>
<router-link <router-link
:to="`/course/${props.courseSlug}/cockpit/profile/${csu.user_id}`" :to="`/course/${props.courseSlug}/profile/${csu.user_id}`"
class="link w-full lg:text-right" class="link w-full lg:text-right"
> >
{{ $t("general.profileLink") }} {{ $t("general.profileLink") }}

View File

@ -172,7 +172,7 @@ watch(
<div> <div>
<router-link <router-link
class="link" class="link"
:to="`/course/${courseSlug}/cockpit/profile/${profileUser.user_id}`" :to="`/course/${courseSlug}/profile/${profileUser.user_id}`"
> >
{{ $t("general.profileLink") }} {{ $t("general.profileLink") }}
</router-link> </router-link>

View File

@ -234,10 +234,13 @@ const router = createRouter({
}, },
{ {
path: "/course/:courseSlug/cockpit", path: "/course/:courseSlug/cockpit",
component: () => import("@/pages/cockpit/cockpitPage/CockpitExpertPage.vue"),
props: true,
name: "cockpit", name: "cockpit",
children: [ children: [
{
path: "",
component: () => import("@/pages/cockpit/cockpitPage/CockpitExpertPage.vue"),
props: true,
},
{ {
path: "profile/:userId/:circleSlug", path: "profile/:userId/:circleSlug",
component: () => import("@/pages/cockpit/CockpitUserCirclePage.vue"), component: () => import("@/pages/cockpit/CockpitUserCirclePage.vue"),

View File

@ -72,7 +72,7 @@ def get_assignment_completions(
)[0], )[0],
user_id=user.id, user_id=user.id,
last_name=user.last_name, last_name=user.last_name,
url=f"/course/{course_session.course.slug}/cockpit/assignment/{assignment.id}/{user.id}", url=f"/course/{course_session.course.slug}/assignment-evaluation/{assignment.id}/{user.id}",
) )
for user in sorted_participants for user in sorted_participants
] ]

View File

@ -86,7 +86,7 @@ class AttendanceServicesTestCase(TestCase):
self.assertEqual(result.status, expected_statuses[result.last_name]) self.assertEqual(result.status, expected_statuses[result.last_name])
self.assertEqual( self.assertEqual(
result.url, result.url,
f"/course/test-lehrgang/cockpit/assignment/{self.assignment.id}/{result.user_id}", f"/course/test-lehrgang/assignment-evaluation/{self.assignment.id}/{result.user_id}",
) )
def test_praxis_assignment_status(self): def test_praxis_assignment_status(self):