Skip to content

feat: export ora2 summary to DRF #36555

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Talha-Rizwan
Copy link
Contributor

@Talha-Rizwan Talha-Rizwan commented Apr 21, 2025

#35353 issue for tracking

Description

Converts the function-based export_ora2_summary view to a DRF class-based view
This change maintains all existing functionality while providing a more standardized API structure.

Key changes:

  • Created ExportOra2SummaryView class inheriting from APIView
  • Maintained existing permission requirements
  • No functional changes, purely architectural improvement for consistency and maintainability.

To Test the api, try POST request on this url

expected response:
status: "The ORA summary report is being created. To view the status of the report, see Pending Tasks below."

a celery task will be triggered and a csv file will be generated.

verify via instructor dashbaord

  1. go to this page

  2. click on the button "Generate ORA Summart Report"

Screenshot 2025-04-21 at 2 33 50 PM
  1. output like this will be generated:
Screenshot 2025-04-21 at 3 32 21 PM
  1. A csv file will be ready to be downloaded once the celery task is completed

@Talha-Rizwan
Copy link
Contributor Author

@awais786 PR is ready for review.

report_type = _('ORA summary')
task_api.submit_export_ora2_summary(request, course_key)
success_status = SUCCESS_MESSAGE_TEMPLATE.format(report_type=report_type)
authentication_classes = (
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove this. It will use default DRF authentication classes.

@Talha-Rizwan Talha-Rizwan requested a review from awais786 April 21, 2025 12:55
@Talha-Rizwan Talha-Rizwan force-pushed the export_ora2_summary-to-drf branch from cb4e2cd to a1edf7a Compare April 29, 2025 09:04
@Talha-Rizwan Talha-Rizwan force-pushed the export_ora2_summary-to-drf branch from a1edf7a to 1c4ba4f Compare June 4, 2025 17:56
@Talha-Rizwan
Copy link
Contributor Author

@feanil please review.

@feanil
Copy link
Contributor

feanil commented Jun 11, 2025

@awais786 you've done enough of these DRF changes now that if something looks good to you, feel free to approve and merge it. I don't need to serve as a blocking review if you think it's good to go unless you have specific concerns. I don't need to review everything, just tag me on ones that you think might be risky or where you have less confidence.

@awais786
Copy link
Contributor

@feanil got it, I will merge this and others after review.

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.

3 participants