Skip to content

Commit

Permalink
Merge pull request #631 from open-craft/sync-open-release/palm.master…
Browse files Browse the repository at this point in the history
…-20240212-1707697215

Sync opencraft-release/palm.1 with Upstream 20240212-1707697215
  • Loading branch information
Agrendalath authored Feb 18, 2024
2 parents 23d37ac + c270b4f commit e51709d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
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

0 comments on commit e51709d

Please sign in to comment.