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

fix: add missing function import in certificate template #33904

Conversation

kaustavb12
Copy link
Contributor

@kaustavb12 kaustavb12 commented Dec 10, 2023

Description

Currently the default certificate template breaks during rendering if GOOGLE_ANALYTICS_4_ID is defined, because of a missing import.

This PR fixes this issue.

Supporting information

Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

  1. Login to this sandbox using the default credentials openedx/openedx.
  2. Go to the instructor tab of the demo course and open the network tab in developer tools of your browser to check calls to googletagmanager.com with the dummy id GTM-ABCD123. This verifies that GOOGLE_ANALYTICS_4_ID is configured correctly for this sandbox.
  3. Go to the certificates page in Studio for the demo course and click on Preview Certificate.
  4. Verify certificate with the default template is rendered correctly.

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

Other information

Private Ref: OpenCraft Internal Ticket - BB-8212

Sandbox configuration

Settings

TUTOR_GROVE_LMS_ENV: |
  GOOGLE_ANALYTICS_4_ID: "GTM-ABCD123"

@openedx-webhooks
Copy link

Thanks for the pull request, @kaustavb12! 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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Dec 10, 2023
@Cup0fCoffee
Copy link
Contributor

👍

  • I tested this: locally using devstack
  • I read through the code
  • [n/a] I checked for accessibility issues
  • [n/a] Includes documentation
  • I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository.

@pomegranited pomegranited self-requested a review January 25, 2024 23:28
Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

👍 Thank you for this bugfix @kaustavb12 !

I'll merge this tomorrow if there are no objections. CC @mphilbrick211

  • I tested this by following the PR instructions and checking the sandbox configuration.
  • I read through the code
  • I checked for accessibility issues N/A
  • Includes documentation bugfix N/A
  • User-facing strings are extracted for translation N/A

@pomegranited pomegranited merged commit d0a49d1 into openedx:master Jan 30, 2024
63 checks passed
@pomegranited pomegranited deleted the kaustav/add_missing_function_certificate_template branch January 30, 2024 22:48
@openedx-webhooks
Copy link

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

kaustavb12 added a commit to open-craft/edx-platform that referenced this pull request Feb 2, 2024
* fix: add missing function import in certificate template
* test: add test case to check certificates generated when GA4 is enabled

(cherry picked from commit d0a49d1)
kaustavb12 added a commit to open-craft/edx-platform that referenced this pull request Feb 2, 2024
* fix: add missing function import in certificate template
* test: add test case to check certificates generated when GA4 is enabled

(cherry picked from commit d0a49d1)
pomegranited pushed a commit that referenced this pull request Feb 5, 2024
…4171)

* fix: add missing function import in certificate template
* test: add test case to check certificates generated when GA4 is enabled

(cherry picked from commit d0a49d1)
pomegranited pushed a commit that referenced this pull request Feb 5, 2024
…4170)

* fix: add missing function import in certificate template
* test: add test case to check certificates generated when GA4 is enabled

(cherry picked from commit d0a49d1)
andrii-hantkovskyi pushed a commit to raccoongang/edx-platform that referenced this pull request May 29, 2024
andrii-hantkovskyi pushed a commit to raccoongang/edx-platform that referenced this pull request May 29, 2024
patch: add missing function import in certificate template (openedx#33904)

See merge request hippoteam/aspen-courses/edx-platform!7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants