Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LearnerSummaryPage: Fix quiz/lesson report links #13037

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>

<CoachImmersivePage
:appBarTitle="exam.title"
icon="back"
:primary="false"
:route="toolbarRoute"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@
>
<td>
<KRouterLink
:to="
classRoute('ReportsLearnerReportLessonPage', {
lessonId: tableRow.id,
})
"
:to="lessonLink(tableRow.id)"
:text="tableRow.title"
icon="lesson"
/>
Expand Down Expand Up @@ -190,7 +186,16 @@
return this.getLearnersForExam(quiz).includes(this.learner.id);
},
quizLink(quizId) {
return this.classRoute(PageNames.REPORTS_LEARNER_REPORT_QUIZ_PAGE_ROOT, { quizId });
return this.classRoute(PageNames.QUIZ_LEARNER_REPORT, {
quizId,
learnerId: this.learner.id,
questionId: 0,
interactionIndex: 0,
tryIndex: 0,
});
},
Copy link
Member

@AllanOXDi AllanOXDi Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the route definitions for this page is missing the meta.titleParts. (https://github.com/learningequality/kolibri/blob/13027-broken-links-learner-summary-page/kolibri/plugins/coach/assets/src/composables/useCoreCoach.js#L46) which might explain the failed page title. So, you might needs to check the route configuration for those specific pages (QUIZ_LEARNER_REPORT and LESSON_LEARNER_REPORT) and ensure their meta fields have titleParts defined.
Screenshot 2025-01-29 at 15 11 10

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it was caused by the appBarTitle being set specifically rather than letting it use the title parts, should be good now.

Thanks @AllanOXDi !

lessonLink(lessonId) {
return this.classRoute(PageNames.LESSON_LEARNER_REPORT, { lessonId });
},
exportCSVLessons() {
const filteredLessons = this.lessons
Expand Down