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

feat!: upgrade get_issued_certificates to DRF ( 24 ) #35534

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

Conversation

awais786
Copy link
Contributor

@awais786 awais786 commented Sep 25, 2024

Issue

Testing step via postman

  1. Use this URL in postman for post

expected result

{
    "certificates": [
        {
            "course_id": "course-v1:edx+cs201+2023",
            "mode": "audit",
            "total_issued_certificate": 1,
            "report_run_date": "September 25, 2024"
        }
    ],
    "queried_features": [
        "course_id",
        "mode",
        "total_issued_certificate",
        "report_run_date"
    ],
    "feature_names": {
        "course_id": "CourseID",
        "mode": "Certificate Type",
        "total_issued_certificate": "Total Certificates Issued",
        "report_run_date": "Date Report Run"
    }
}

You can pass the ?csv=false or ?csv=true to get the csv file.


Test via dashboard.

  1. Go to this page user your course id.
  2. select certificate tab.
Screenshot 2024-09-25 at 12 30 37 PM

This works with POST and GET both.

@awais786 awais786 changed the title Get issued certificates to drf feat!: upgrade get_issued_certificates to DRF Sep 25, 2024
@awais786 awais786 marked this pull request as ready for review September 25, 2024 08:12
@awais786 awais786 changed the title feat!: upgrade get_issued_certificates to DRF feat!: upgrade get_issued_certificates to DRF ( 24 ) Sep 25, 2024
common method for both post and get. This method will return all issued certificates.
"""
course_key = CourseKey.from_string(course_id)
csv_required = request.GET.get('csv', 'false')
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this be available if we're calling with the POST method? Also, it seems like the original implementation does not provide POST why are we adding POST support?

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