fix: abstract edX-specific strings
This commit is contained in:
@@ -9,6 +9,7 @@ from unittest import mock
|
||||
import ddt
|
||||
from django.conf import settings
|
||||
from django.http import QueryDict
|
||||
from django.test.utils import override_settings
|
||||
from django.urls import reverse
|
||||
from django.utils.http import urlquote_plus
|
||||
from django.utils.timezone import now
|
||||
@@ -613,6 +614,7 @@ class TestCourseHomePageAccess(CourseHomePageTestCase):
|
||||
|
||||
@override_waffle_flag(COURSE_HOME_USE_LEGACY_FRONTEND, active=True)
|
||||
@override_waffle_flag(COURSE_PRE_START_ACCESS_FLAG, active=True)
|
||||
@override_settings(PLATFORM_NAME="edX")
|
||||
def test_masters_course_message(self):
|
||||
enroll_button_html = "<button class=\"enroll-btn btn-link\">Enroll now</button>"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ View logic for handling course messages.
|
||||
from datetime import datetime
|
||||
|
||||
from babel.dates import format_date, format_timedelta
|
||||
from django.conf import settings
|
||||
from django.contrib import auth
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.http import urlquote_plus
|
||||
@@ -142,8 +143,10 @@ def _register_course_home_messages(request, course, user_access, course_start_da
|
||||
# if a course is a Master's only course, we will not offer user ability to self-enroll
|
||||
CourseHomeMessages.register_info_message(
|
||||
request,
|
||||
Text(_('You must be enrolled in the course to see course content. '
|
||||
'Please contact your degree administrator or edX Support if you have questions.')),
|
||||
Text(_(
|
||||
'You must be enrolled in the course to see course content. '
|
||||
'Please contact your degree administrator or {platform_name} Support if you have questions.'
|
||||
)).format(platform_name=settings.PLATFORM_NAME),
|
||||
title=title
|
||||
)
|
||||
elif not course.invitation_only:
|
||||
|
||||
Reference in New Issue
Block a user