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: [FC-0044] certificates API DRF #34339

Merged

Conversation

ruzniaievdm
Copy link
Contributor

@ruzniaievdm ruzniaievdm commented Mar 7, 2024

Settings

TUTOR_GROVE_WAFFLE_FLAGS:
  - name: contentstore.new_studio_mfe.use_new_certificates_page
    everyone: true

Description

This PR addresses a need in the development of the Course Certificate Page feature within the frontend-app-course-authoring repository. The core objective is the implement of a DRF endpoint designed to render and deliver certificate data for course.

How to configure certificates:

Certificate Pages:

  1. Legacy cms - http://localhost:18010/certificates/{location}.
  2. MFE - http://localhost:2001/course/{location}/certificates.

Testing API instructions:

  1. Run master devstack.
  2. Start platform make dev.up.lms+cms and make checkout on this branch.
  3. Go to http://localhost:18010/api-docs.
  4. Find the required API endpoint /api/contentstore/v1/certificates/{location}.

Testing MFE instructions:

  1. Run master devstack.
  2. Start platform make dev.up.lms+cms+frontend-app-course-authoring and make checkout on this branch.
  3. Enable the MFE Certificates Page feature by adding a waffle flag contentstore.new_studio_mfe.use_new_certificates_page on the http://localhost:18010/admin/waffle/flag/
  4. Go to http://localhost:2001/course/{location}/certificates.

Related PR's:

Certificate issue

openedx/platform-roadmap#317

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 7, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @ruzniaievdm! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/api-certificates branch from b02a49a to 2e6b656 Compare March 7, 2024 17:38
@mphilbrick211 mphilbrick211 added the FC Relates to an Axim Funded Contribution project label Mar 8, 2024
@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/api-certificates branch from 2e6b656 to e682381 Compare March 11, 2024 09:59
Copy link
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

Can you please include in the description the complete steps, from scratch, on how to test this properly? Including how to enable the feature, how to use the waffle flags, and how to create a certificate?

@ruzniaievdm
Copy link
Contributor Author

@arbrandes I've updated the description with new links to the certificate configuration for the course including enabling the feature for certificate MFE page.

```json
{
"certificate_activation_handler_url": "/certificates/activation/course-v1:org+101+101/",
"certificate_web_view_url": "///certificates/course/course-v1:org+101+101?preview=honor",
Copy link
Member

Choose a reason for hiding this comment

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

Is this url supposed to start with three forward slashes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Original method for this field is get_lms_link_for_certificate_web_view here which contains return "//{certificate_web_base}/certificates/course/{course_id}?preview={mode}".format(). Therefore I can assume that this is the real value for the certificate_web_view_url field.

@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/api-certificates branch from eb4f416 to 745509e Compare March 20, 2024 19:21
@GlugovGrGlib GlugovGrGlib force-pushed the ruzniaievdm/feat/api-certificates branch from 745509e to cfee3b1 Compare March 20, 2024 22:23
@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/api-certificates branch from cfee3b1 to 0c6f0bd Compare March 21, 2024 15:42
@ruzniaievdm ruzniaievdm force-pushed the ruzniaievdm/feat/api-certificates branch from 0c6f0bd to f7b61d5 Compare March 21, 2024 18:39
@KristinAoki KristinAoki merged commit 85dd7f3 into openedx:master Mar 22, 2024
67 checks passed
@openedx-webhooks
Copy link

@ruzniaievdm 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants