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

Create composable for Exam Report Data Fetching for LearnExamReportViewer #13168

Open
LianaHarris360 opened this issue Mar 6, 2025 · 14 comments
Assignees
Labels

Comments

@LianaHarris360
Copy link
Member

LianaHarris360 commented Mar 6, 2025

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 LianaHarris360 added this to the upcoming patch milestone Mar 6, 2025
@a-s-t-e-y-a
Copy link

@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.

@LianaHarris360
Copy link
Member Author

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.

@a-s-t-e-y-a
Copy link

@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

@LianaHarris360 LianaHarris360 added TAG: tech update / debt Change not visible to user DEV: frontend help wanted Open source contributors welcome labels Mar 10, 2025
@Abhishek-Punhani
Copy link
Contributor

Hi @LianaHarris360 , Can I work on this one ?

@LianaHarris360
Copy link
Member Author

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

@a-s-t-e-y-a
Copy link

@LianaHarris360 I'll start working on this

@Pariyul
Copy link

Pariyul commented Mar 10, 2025

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

@ishaan-arora-1
Copy link

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.

@LianaHarris360
Copy link
Member Author

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.

a-s-t-e-y-a added a commit to a-s-t-e-y-a/kolibri that referenced this issue Mar 13, 2025
a-s-t-e-y-a added a commit to a-s-t-e-y-a/kolibri that referenced this issue Mar 13, 2025
…reate-composable-for-exam-report-data-fetching-for-LearnExamReportViewer
@a-s-t-e-y-a
Copy link

@LianaHarris360 can you please review my PR

@a-s-t-e-y-a
Copy link

a-s-t-e-y-a commented Mar 15, 2025

@rtibbles @MisRob can you please review my PR

@MisRob
Copy link
Member

MisRob commented Mar 15, 2025

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.

@a-s-t-e-y-a
Copy link

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.

@MisRob
Copy link
Member

MisRob commented Mar 17, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants