Skip to content

Conversation

@Ang-m4
Copy link
Contributor

@Ang-m4 Ang-m4 commented Dec 9, 2025

Description

This pull request adds the logic needed to generate CSV reports for enrollments, courses, and learners.
For this, I implemented new helper functions that can read serializer data (or any dictionary) and resolve nested values using the __ notation.

Key changes

  • Added a new reports helper to handle CSV report generation with some utility functions for nested field lookups.
  • Added three new report endpoints:
    • /manage/catalogs/<id>/enrollments/report
    • /manage/catalogs/<id>/learners/report
    • /manage/catalogs/<id>/courses/report

How to test

  1. Make sure you have a catalog with:
    • Learners assigned,
    • Courses added,
    • Enrollments created.
  2. Go to the Swagger UI and locate the new report endpoints under the manager section.
  3. Call:
    • /manage/catalogs/<id>/enrollments/report
    • /manage/catalogs/<id>/learners/report
    • /manage/catalogs/<id>/courses/report

@Ang-m4 Ang-m4 changed the title Afg/reports logic feat: add helper functions for generating CSV reports Dec 9, 2025
@Ang-m4 Ang-m4 marked this pull request as ready for review December 9, 2025 21:35
@Ang-m4 Ang-m4 requested a review from Alec4r December 9, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants