Merge branch 'master' into iamsobanjaved/django-42-lts

This commit is contained in:
Awais Qureshi
2024-01-31 13:46:58 +05:00
committed by GitHub
30 changed files with 634 additions and 247 deletions

View File

@@ -165,3 +165,19 @@ class CertificatesViewsSiteTests(ModuleStoreTestCase):
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')

View File

@@ -68,6 +68,10 @@ from openedx.core.djangoapps.theming.helpers_dirs import (
from openedx.core.lib.derived import derived, derived_collection_entry
from openedx.core.release import doc_version
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
try:
from skill_tagging.skill_tagging_mixin import SkillTaggingMixin
except ImportError:
SkillTaggingMixin = None
################################### FEATURES ###################################
# .. setting_name: PLATFORM_NAME
@@ -1633,6 +1637,8 @@ from xmodule.x_module import XModuleMixin # lint-amnesty, pylint: disable=wrong
# This should be moved into an XBlock Runtime/Application object
# once the responsibility of XBlock creation is moved out of modulestore - cpennington
XBLOCK_MIXINS = (LmsBlockMixin, InheritanceMixin, XModuleMixin, EditInfoMixin)
if SkillTaggingMixin:
XBLOCK_MIXINS += (SkillTaggingMixin,)
XBLOCK_EXTRA_MIXINS = ()
# .. setting_name: XBLOCK_FIELD_DATA_WRAPPERS
@@ -5472,3 +5478,31 @@ derived_collection_entry('EVENT_BUS_PRODUCER_CONFIG', 'org.openedx.learning.cert
derived_collection_entry('EVENT_BUS_PRODUCER_CONFIG', 'org.openedx.learning.certificate.revoked.v1',
'learning-certificate-lifecycle', 'enabled')
BEAMER_PRODUCT_ID = ""
#### Survey Report ####
# .. toggle_name: SURVEY_REPORT_ENABLE
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Set to True to enable the feature to generate and send survey reports.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-01-30
SURVEY_REPORT_ENABLE = True
# .. setting_name: SURVEY_REPORT_ENDPOINT
# .. setting_default: Open edX organization endpoint
# .. setting_description: Endpoint where the report will be sent.
SURVEY_REPORT_ENDPOINT = 'https://hooks.zapier.com/hooks/catch/11595998/3ouwv7m/'
# .. toggle_name: ANONYMOUS_SURVEY_REPORT
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If enable, the survey report will be send a UUID as ID instead of use lms site name.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2023-02-21
ANONYMOUS_SURVEY_REPORT = False
# .. setting_name: SURVEY_REPORT_CHECK_THRESHOLD
# .. setting_default: every 6 months
# .. setting_description: Survey report banner will appear if a survey report is not sent in the months defined.
SURVEY_REPORT_CHECK_THRESHOLD = 6
# .. setting_name: SURVEY_REPORT_EXTRA_DATA
# .. setting_default: empty dictionary
# .. setting_description: Dictionary with additional information that you want to share in the report.
SURVEY_REPORT_EXTRA_DATA = {}

View File

@@ -1125,14 +1125,6 @@ COURSE_LIVE_GLOBAL_CREDENTIALS["BIG_BLUE_BUTTON"] = {
"URL": ENV_TOKENS.get('BIG_BLUE_BUTTON_GLOBAL_URL', None),
}
############## Settings for survey report ##############
SURVEY_REPORT_EXTRA_DATA = ENV_TOKENS.get('SURVEY_REPORT_EXTRA_DATA', {})
SURVEY_REPORT_ENDPOINT = ENV_TOKENS.get('SURVEY_REPORT_ENDPOINT',
'https://hooks.zapier.com/hooks/catch/11595998/3ouwv7m/')
ANONYMOUS_SURVEY_REPORT = ENV_TOKENS.get('ANONYMOUS_SURVEY_REPORT', False)
SURVEY_REPORT_CHECK_THRESHOLD = ENV_TOKENS.get('SURVEY_REPORT_CHECK_THRESHOLD', 6)
AVAILABLE_DISCUSSION_TOURS = ENV_TOKENS.get('AVAILABLE_DISCUSSION_TOURS', [])
############## NOTIFICATIONS EXPIRY ##############

View File

@@ -664,6 +664,7 @@ MFE_CONFIG_OVERRIDES = {
SURVEY_REPORT_EXTRA_DATA = {}
SURVEY_REPORT_ENDPOINT = "https://example.com/survey_report"
SURVEY_REPORT_CHECK_THRESHOLD = 6
SURVEY_REPORT_ENABLE = True
ANONYMOUS_SURVEY_REPORT = False
######################## Subscriptions API SETTINGS ########################

View File

@@ -21,6 +21,6 @@
{% endblock %}
{% block header %}{{ block.super }}
{% block messages %}{{ block.super }}
{% include "survey_report/admin_banner.html" %}
{% endblock %}
{% endblock %}

View File

@@ -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