kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Create composable for Exam Report Data Fetching for LearnExamReportViewer

Open LianaHarris360 opened this issue 9 months ago • 14 comments

The current data fetching implementation of LearnExamReportViewer relies on Vuex state and indirectly on the HomePage’s initialization of activeClassesQuizzes.

To reduce technical debt and improve the reliability of the exam report flow, the exam report data fetching should be moved into a dedicated composable that exposes a clear API for fetching and managing exam report data.

State: https://github.com/learningequality/kolibri/blob/develop/kolibri/plugins/learn/assets/src/modules/examReportViewer/index.js#L7 Handlers: https://github.com/learningequality/kolibri/blob/develop/kolibri/plugins/learn/assets/src/modules/examReportViewer/handlers.js

These should be replaced by a new composable created in kolibri/plugins/learn/assets/src/composables and all references to the state and handlers should go through the composable instead.

LianaHarris360 avatar Mar 06 '25 22:03 LianaHarris360

@LianaHarris360 I hope this message finds you well Can i contribute to this issue If you like my proposal can you assign me this issue

Proposal: Create Composable for Exam Report Data Fetching in LearnExamReportViewer

Issue: #13168
Parent: Tracking Issue: Remove use of Vuex in favour of composables


Problem Statement

The current implementation of LearnExamReportViewer relies on Vuex state management and indirectly depends on the HomePage's initialization of activeClassesQuizzes. This creates tight coupling and makes the code harder to maintain and test.

Right now the LearnExamReportViewer getting its data primarily from Vuex state

Image


Proposed Solution

Create a dedicated composable useExamReport to handle exam report data fetching and state management. This will Make the LearnExamReportViewer fetch all the data it needs directly (e.g., the exam and its details) without relying on activeClassesQuizzes

  1. Decouple data fetching from UI components.
  2. Provide a clear API for exam report data.
  3. Reduce technical debt by moving away from Vuex.

a-s-t-e-y-a avatar Mar 07 '25 06:03 a-s-t-e-y-a

Hi @a-s-t-e-y-a thanks for volunteering to address this issue! It is currently blocked by an open pull request, I've updated the issue write-up to reflect this. It will be ready to be worked on once that PR is approved and merged.

LianaHarris360 avatar Mar 07 '25 15:03 LianaHarris360

@LianaHarris360 Thanks for the update! I'll keep an eye on the PR and get started once it's merged. Let me know if there’s anything else I can do in the meantime

a-s-t-e-y-a avatar Mar 08 '25 03:03 a-s-t-e-y-a

Hi @LianaHarris360 , Can I work on this one ?

Abhishek-Punhani avatar Mar 10 '25 14:03 Abhishek-Punhani

Someone has already asked to work on this issue and now that the blocking PR has been resolved, I will assign @a-s-t-e-y-a

LianaHarris360 avatar Mar 10 '25 14:03 LianaHarris360

@LianaHarris360 I'll start working on this

a-s-t-e-y-a avatar Mar 10 '25 18:03 a-s-t-e-y-a

I'd love to take on this issue! Please assign it to me, and I'll share the outcome in a few days.

Pariyul avatar Mar 10 '25 19:03 Pariyul

Hi, would love to take on this issue in future if needed... also willing to help @a-s-t-e-y-a in solving this.

ishaan-arora-1 avatar Mar 11 '25 17:03 ishaan-arora-1

This issue has already been assigned to someone, and it will only be re-assigned if the current person says they cannot complete it. We greatly appreciate the offers to contribute, but please avoid volunteering for tasks that have already been assigned to others.

LianaHarris360 avatar Mar 11 '25 18:03 LianaHarris360

@LianaHarris360 can you please review my PR

a-s-t-e-y-a avatar Mar 14 '25 16:03 a-s-t-e-y-a

@rtibbles @MisRob can you please review my PR

a-s-t-e-y-a avatar Mar 15 '25 03:03 a-s-t-e-y-a

Thanks for your work @a-s-t-e-y-a. One of us will review in the upcoming weeks. I will choose a reviewer later depending on the team's bandwith. I'd like to ask you to be thoughtful about using mentions as each of them sends a notification to team members, some of them are not even involved in this work. Please have patience.

MisRob avatar Mar 15 '25 08:03 MisRob

Thank you for your message and guidance. I’ll be more mindful with mentions to avoid unnecessary notifications. I’m happy to wait patiently for the next steps and will assist whenever the team is ready. Please let me know if there’s anything else I can do in the meantime.

a-s-t-e-y-a avatar Mar 15 '25 09:03 a-s-t-e-y-a

Thanks for your understanding @a-s-t-e-y-a

MisRob avatar Mar 17 '25 09:03 MisRob