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

Sync opencraft-release/palm.1 with Upstream 20240212-1707697215 #631

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions lms/djangoapps/certificates/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,19 @@ def test_html_view_site_configuration_missing(self):
response,
'This should not survive being overwritten by static content',
)

@override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED, GOOGLE_ANALYTICS_4_ID='GA-abc')
@with_site_configuration(configuration={'platform_name': 'My Platform Site'})
def test_html_view_with_g4(self):
test_url = get_certificate_url(
user_id=self.user.id,
course_id=str(self.course.id),
uuid=self.cert.verify_uuid
)
self._add_course_certificates(count=1, signatory_count=2)
response = self.client.get(test_url)
self.assertContains(
response,
'awarded this My Platform Site Honor Code Certificate of Completion',
)
self.assertContains(response, 'googletagmanager')
6 changes: 4 additions & 2 deletions lms/templates/certificates/accomplishment-base.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<%page expression_filter="h"/>
<%namespace name='static' file='/static_content.html'/>
<%! from django.utils.translation import gettext as _%>

<%!
from django.utils.translation import gettext as _
from openedx.core.djangolib.js_utils import js_escaped_string
%>
<%
# set doc language direction
from django.utils.translation import get_language_bidi
Expand Down
Loading