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
Changes from 1 commit
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
Next Next commit
LearnerSummaryPage: Fix incorrect PageNames in generating quiz/lesson…
… report links
  • Loading branch information
nucleogenesis committed Jan 30, 2025
commit caf1f8f50d456f10175dc4c740a9114cb3c70219
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,10 @@
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 });
Copy link
Member

Choose a reason for hiding this comment

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

Here this route is failing because we are not passing the questionId, interactionIndex and tryIndex params. Here it would be better to use the QUIZ_LEARNER_PAGE_ROOT page that the only thing that it does is that it redirects it to the QUIZ_LEARNER_REPORT page but defines default values for these params, so we dont need to do it here.

},
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