diff --git a/cms/envs/common.py b/cms/envs/common.py
index d6ce7cf47b..d4c627f3bd 100644
--- a/cms/envs/common.py
+++ b/cms/envs/common.py
@@ -136,12 +136,6 @@ FEATURES = {
# Turn off Video Upload Pipeline through Studio, by default
'ENABLE_VIDEO_UPLOAD_PIPELINE': False,
-
- # Is this an edX-owned domain? (edx.org)
- # for consistency in user-experience, keep the value of this feature flag
- # in sync with the one in lms/envs/common.py
- 'IS_EDX_DOMAIN': False,
-
# let students save and manage their annotations
# for consistency in user-experience, keep the value of this feature flag
# in sync with the one in lms/envs/common.py
diff --git a/cms/templates/widgets/sock.html b/cms/templates/widgets/sock.html
index 3d222fd9ed..45edafadbd 100644
--- a/cms/templates/widgets/sock.html
+++ b/cms/templates/widgets/sock.html
@@ -23,7 +23,6 @@ from django.core.urlresolvers import reverse
<%!
from django.conf import settings
- is_edx_domain = settings.FEATURES.get('IS_EDX_DOMAIN', False)
partner_email = settings.FEATURES.get('PARTNER_SUPPORT_EMAIL', '')
links = [{
@@ -31,16 +30,11 @@ from django.core.urlresolvers import reverse
'sr_mouseover_text': _('Access documentation on http://docs.edx.org'),
'text': _('edX Documentation'),
'condition': True
- }, {
- 'href': 'https://partners.edx.org',
- 'sr_mouseover_text': _('Access Course Staff Support on the Partner Portal to submit or review support tickets'),
- 'text': _('edX Partner Portal'),
- 'condition': is_edx_domain
}, {
'href': 'https://open.edx.org',
'sr_mouseover_text': _('Access the Open edX Portal'),
'text': _('Open edX Portal'),
- 'condition': not is_edx_domain
+ 'condition': True
}, {
'href': 'https://www.edx.org/course/overview-creating-edx-course-edx-edx101#.VO4eaLPF-n1',
'sr_mouseover_text': _('Enroll in edX101: Overview of Creating an edX Course'),
diff --git a/common/djangoapps/course_modes/tests/test_views.py b/common/djangoapps/course_modes/tests/test_views.py
index 369b16d8bc..23f1f5dcc8 100644
--- a/common/djangoapps/course_modes/tests/test_views.py
+++ b/common/djangoapps/course_modes/tests/test_views.py
@@ -14,6 +14,7 @@ from course_modes.tests.factories import CourseModeFactory
from student.tests.factories import CourseEnrollmentFactory, UserFactory
from student.models import CourseEnrollment
from course_modes.models import CourseMode, Mode
+from openedx.core.djangoapps.theming.test_util import with_is_edx_domain
@ddt.ddt
@@ -324,7 +325,7 @@ class CourseModeViewTest(UrlResetMixin, ModuleStoreTestCase):
self.assertEquals(course_modes, expected_modes)
@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms')
- @patch.dict(settings.FEATURES, {"IS_EDX_DOMAIN": True})
+ @with_is_edx_domain(True)
def test_hide_nav(self):
# Create the course modes
for mode in ["honor", "verified"]:
diff --git a/common/djangoapps/edxmako/shortcuts.py b/common/djangoapps/edxmako/shortcuts.py
index 50e53855b2..aaa60f465d 100644
--- a/common/djangoapps/edxmako/shortcuts.py
+++ b/common/djangoapps/edxmako/shortcuts.py
@@ -101,17 +101,6 @@ def marketing_link_context_processor(request):
)
-def open_source_footer_context_processor(request):
- """
- Checks the site name to determine whether to use the edX.org footer or the Open Source Footer.
- """
- return dict(
- [
- ("IS_EDX_DOMAIN", settings.FEATURES.get('IS_EDX_DOMAIN', False))
- ]
- )
-
-
def microsite_footer_context_processor(request):
"""
Checks the site name to determine whether to use the edX.org footer or the Open Source Footer.
diff --git a/common/djangoapps/edxmako/tests.py b/common/djangoapps/edxmako/tests.py
index 9fd7c0357f..12ccb54274 100644
--- a/common/djangoapps/edxmako/tests.py
+++ b/common/djangoapps/edxmako/tests.py
@@ -17,7 +17,6 @@ from edxmako.shortcuts import (
is_marketing_link_set,
is_any_marketing_link_set,
render_to_string,
- open_source_footer_context_processor
)
from student.tests.factories import UserFactory
from util.testing import UrlResetMixin
@@ -69,15 +68,6 @@ class ShortcutsTests(UrlResetMixin, TestCase):
self.assertTrue(is_any_marketing_link_set(['ABOUT', 'NOT_CONFIGURED']))
self.assertFalse(is_any_marketing_link_set(['NOT_CONFIGURED']))
- @ddt.data((True, None), (False, None))
- @ddt.unpack
- def test_edx_footer(self, expected_result, _):
- with patch.dict('django.conf.settings.FEATURES', {
- 'IS_EDX_DOMAIN': expected_result
- }):
- result = open_source_footer_context_processor({})
- self.assertEquals(expected_result, result.get('IS_EDX_DOMAIN'))
-
class AddLookupTests(TestCase):
"""
diff --git a/common/djangoapps/student/tests/test_email.py b/common/djangoapps/student/tests/test_email.py
index 1b56924dcf..84b3adb20c 100644
--- a/common/djangoapps/student/tests/test_email.py
+++ b/common/djangoapps/student/tests/test_email.py
@@ -22,6 +22,7 @@ from edxmako.shortcuts import render_to_string
from edxmako.tests import mako_middleware_process_request
from util.request import safe_get_host
from util.testing import EventTestMixin
+from openedx.core.djangoapps.theming.test_util import with_is_edx_domain
class TestException(Exception):
@@ -99,7 +100,7 @@ class ActivationEmailTests(TestCase):
self._create_account()
self._assert_activation_email(self.ACTIVATION_SUBJECT, self.OPENEDX_FRAGMENTS)
- @patch.dict(settings.FEATURES, {'IS_EDX_DOMAIN': True})
+ @with_is_edx_domain(True)
def test_activation_email_edx_domain(self):
self._create_account()
self._assert_activation_email(self.ACTIVATION_SUBJECT, self.EDX_DOMAIN_FRAGMENTS)
diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py
index fcd1a87fed..986a97f3c4 100644
--- a/common/djangoapps/student/tests/tests.py
+++ b/common/djangoapps/student/tests/tests.py
@@ -44,6 +44,7 @@ from certificates.tests.factories import GeneratedCertificateFactory # pylint:
from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification
import shoppingcart # pylint: disable=import-error
from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin
+from openedx.core.djangoapps.theming.test_util import with_is_edx_domain
# Explicitly import the cache from ConfigurationModel so we can reset it after each test
from config_models.models import cache
@@ -491,7 +492,7 @@ class DashboardTest(ModuleStoreTestCase):
self.assertEquals(response_2.status_code, 200)
@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms')
- @patch.dict(settings.FEATURES, {"IS_EDX_DOMAIN": True})
+ @with_is_edx_domain(True)
def test_dashboard_header_nav_has_find_courses(self):
self.client.login(username="jack", password="test")
response = self.client.get(reverse("dashboard"))
diff --git a/lms/djangoapps/branding/api.py b/lms/djangoapps/branding/api.py
index 336126d5f6..fa90d53309 100644
--- a/lms/djangoapps/branding/api.py
+++ b/lms/djangoapps/branding/api.py
@@ -111,18 +111,13 @@ def _footer_copyright():
Returns: unicode
"""
- org_name = (
- "edX Inc" if settings.FEATURES.get('IS_EDX_DOMAIN', False)
- else microsite.get_value('PLATFORM_NAME', settings.PLATFORM_NAME)
- )
-
return _(
# Translators: 'EdX', 'edX', and 'Open edX' are trademarks of 'edX Inc.'.
# Please do not translate any of these trademarks and company names.
u"\u00A9 {org_name}. All rights reserved except where noted. "
u"EdX, Open edX and the edX and Open EdX logos are registered trademarks "
u"or trademarks of edX Inc."
- ).format(org_name=org_name)
+ ).format(org_name=microsite.get_value('PLATFORM_NAME', settings.PLATFORM_NAME))
def _footer_openedx_link():
@@ -389,9 +384,7 @@ def get_logo_url():
# otherwise, use the legacy means to configure this
university = microsite.get_value('university')
- if university is None and settings.FEATURES.get('IS_EDX_DOMAIN', False):
- return staticfiles_storage.url('images/edx-theme/edx-logo-77x36.png')
- elif university:
+ if university:
return staticfiles_storage.url('images/{uni}-on-edx-logo.png'.format(uni=university))
else:
return staticfiles_storage.url('images/logo.png')
diff --git a/lms/djangoapps/branding/tests/test_views.py b/lms/djangoapps/branding/tests/test_views.py
index 64dd0f3b51..a6cb5d7249 100644
--- a/lms/djangoapps/branding/tests/test_views.py
+++ b/lms/djangoapps/branding/tests/test_views.py
@@ -1,6 +1,5 @@
# encoding: utf-8
"""Tests of Branding API views. """
-import contextlib
import json
import urllib
from django.test import TestCase
@@ -11,6 +10,7 @@ import mock
import ddt
from config_models.models import cache
from branding.models import BrandingApiConfig
+from openedx.core.djangoapps.theming.test_util import with_edx_domain_context
@ddt.ddt
@@ -42,7 +42,7 @@ class TestFooter(TestCase):
@ddt.unpack
def test_footer_content_types(self, is_edx_domain, accepts, content_type, content):
self._set_feature_flag(True)
- with self._set_is_edx_domain(is_edx_domain):
+ with with_edx_domain_context(is_edx_domain):
resp = self._get_footer(accepts=accepts)
self.assertEqual(resp.status_code, 200)
@@ -53,7 +53,7 @@ class TestFooter(TestCase):
@ddt.data(True, False)
def test_footer_json(self, is_edx_domain):
self._set_feature_flag(True)
- with self._set_is_edx_domain(is_edx_domain):
+ with with_edx_domain_context(is_edx_domain):
resp = self._get_footer()
self.assertEqual(resp.status_code, 200)
@@ -153,7 +153,7 @@ class TestFooter(TestCase):
def test_language_rtl(self, is_edx_domain, language, static_path):
self._set_feature_flag(True)
- with self._set_is_edx_domain(is_edx_domain):
+ with with_edx_domain_context(is_edx_domain):
resp = self._get_footer(accepts="text/html", params={'language': language})
self.assertEqual(resp.status_code, 200)
@@ -172,7 +172,7 @@ class TestFooter(TestCase):
def test_show_openedx_logo(self, is_edx_domain, show_logo):
self._set_feature_flag(True)
- with self._set_is_edx_domain(is_edx_domain):
+ with with_edx_domain_context(is_edx_domain):
params = {'show-openedx-logo': 1} if show_logo else {}
resp = self._get_footer(accepts="text/html", params=params)
@@ -195,7 +195,7 @@ class TestFooter(TestCase):
@ddt.unpack
def test_include_dependencies(self, is_edx_domain, include_dependencies):
self._set_feature_flag(True)
- with self._set_is_edx_domain(is_edx_domain):
+ with with_edx_domain_context(is_edx_domain):
params = {'include-dependencies': 1} if include_dependencies else {}
resp = self._get_footer(accepts="text/html", params=params)
@@ -227,9 +227,3 @@ class TestFooter(TestCase):
)
return self.client.get(url, HTTP_ACCEPT=accepts)
-
- @contextlib.contextmanager
- def _set_is_edx_domain(self, is_edx_domain):
- """Configure whether this an EdX-controlled domain. """
- with mock.patch.dict(settings.FEATURES, {'IS_EDX_DOMAIN': is_edx_domain}):
- yield
diff --git a/lms/djangoapps/branding/views.py b/lms/djangoapps/branding/views.py
index 0a9dbba76c..194d41d1bc 100644
--- a/lms/djangoapps/branding/views.py
+++ b/lms/djangoapps/branding/views.py
@@ -148,8 +148,7 @@ def _render_footer_html(request, show_openedx_logo, include_dependencies):
"""
bidi = 'rtl' if translation.get_language_bidi() else 'ltr'
- version = 'edx' if settings.FEATURES.get('IS_EDX_DOMAIN') else 'openedx'
- css_name = settings.FOOTER_CSS[version][bidi]
+ css_name = settings.FOOTER_CSS['openedx'][bidi]
context = {
'hide_openedx_link': not show_openedx_logo,
@@ -159,11 +158,7 @@ def _render_footer_html(request, show_openedx_logo, include_dependencies):
'include_dependencies': include_dependencies,
}
- return (
- render_to_response("footer-edx-v3.html", context)
- if settings.FEATURES.get("IS_EDX_DOMAIN", False)
- else render_to_response("footer.html", context)
- )
+ return render_to_response("footer.html", context)
@cache_control(must_revalidate=True, max_age=settings.FOOTER_BROWSER_CACHE_MAX_AGE)
diff --git a/lms/djangoapps/commerce/tests/test_views.py b/lms/djangoapps/commerce/tests/test_views.py
index 8b64a2a57a..59eadcb9e5 100644
--- a/lms/djangoapps/commerce/tests/test_views.py
+++ b/lms/djangoapps/commerce/tests/test_views.py
@@ -10,6 +10,7 @@ from django.test import TestCase
import mock
from student.tests.factories import UserFactory
+from openedx.core.djangoapps.theming.test_util import with_is_edx_domain
class UserMixin(object):
@@ -86,7 +87,7 @@ class ReceiptViewTests(UserMixin, TestCase):
self.assertRegexpMatches(response.content, user_message if is_user_message_expected else system_message)
self.assertNotRegexpMatches(response.content, user_message if not is_user_message_expected else system_message)
- @mock.patch.dict(settings.FEATURES, {"IS_EDX_DOMAIN": True})
+ @with_is_edx_domain(True)
def test_hide_nav_header(self):
self._login()
post_data = {'decision': 'ACCEPT', 'reason_code': '200', 'signed_field_names': 'dummy'}
diff --git a/lms/djangoapps/student_account/test/test_views.py b/lms/djangoapps/student_account/test/test_views.py
index 8718bdcaaa..145d6a5c3d 100644
--- a/lms/djangoapps/student_account/test/test_views.py
+++ b/lms/djangoapps/student_account/test/test_views.py
@@ -26,6 +26,7 @@ from student_account.views import account_settings_context
from third_party_auth.tests.testutil import simulate_running_pipeline, ThirdPartyAuthTestMixin
from util.testing import UrlResetMixin
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
+from openedx.core.djangoapps.theming.test_util import with_edx_domain_context
@ddt.ddt
@@ -254,7 +255,7 @@ class StudentAccountLoginAndRegistrationTest(ThirdPartyAuthTestMixin, UrlResetMi
# The response should have a "Sign In" button with the URL
# that preserves the querystring params
- with mock.patch.dict(settings.FEATURES, {'IS_EDX_DOMAIN': is_edx_domain}):
+ with with_edx_domain_context(is_edx_domain):
response = self.client.get(reverse(url_name), params)
expected_url = '/login?{}'.format(self._finish_auth_url_param(params + [('next', '/dashboard')]))
@@ -270,7 +271,7 @@ class StudentAccountLoginAndRegistrationTest(ThirdPartyAuthTestMixin, UrlResetMi
]
# Verify that this parameter is also preserved
- with mock.patch.dict(settings.FEATURES, {'IS_EDX_DOMAIN': is_edx_domain}):
+ with with_edx_domain_context(is_edx_domain):
response = self.client.get(reverse(url_name), params)
expected_url = '/login?{}'.format(self._finish_auth_url_param(params))
diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py
index 54f808d152..e2ade0adbf 100644
--- a/lms/djangoapps/verify_student/tests/test_views.py
+++ b/lms/djangoapps/verify_student/tests/test_views.py
@@ -37,6 +37,7 @@ from common.test.utils import XssTestMixin
from commerce.tests import TEST_PAYMENT_DATA, TEST_API_URL, TEST_API_SIGNING_KEY
from embargo.test_utils import restrict_course
from openedx.core.djangoapps.user_api.accounts.api import get_account_settings
+from openedx.core.djangoapps.theming.test_util import with_is_edx_domain
from shoppingcart.models import Order, CertificateItem
from student.tests.factories import UserFactory, CourseEnrollmentFactory
from student.models import CourseEnrollment
@@ -282,7 +283,7 @@ class TestPayAndVerifyView(UrlResetMixin, ModuleStoreTestCase, XssTestMixin):
)
self._assert_redirects_to_dashboard(response)
- @patch.dict(settings.FEATURES, {"IS_EDX_DOMAIN": True})
+ @with_is_edx_domain(True)
@ddt.data("verify_student_start_flow", "verify_student_begin_flow")
def test_pay_and_verify_hides_header_nav(self, payment_flow):
course = self._create_course("verified")
diff --git a/lms/envs/common.py b/lms/envs/common.py
index 68fcc3e6c7..75ae7e2199 100644
--- a/lms/envs/common.py
+++ b/lms/envs/common.py
@@ -180,9 +180,6 @@ FEATURES = {
# Enable Custom Courses for EdX
'CUSTOM_COURSES_EDX': False,
- # Is this an edX-owned domain? (used for edX specific messaging and images)
- 'IS_EDX_DOMAIN': False,
-
# Toggle to enable certificates of courses on dashboard
'ENABLE_VERIFIED_CERTIFICATES': False,
@@ -496,9 +493,6 @@ TEMPLATES = [
# Hack to get required link URLs to password reset templates
'edxmako.shortcuts.marketing_link_context_processor',
- # Allows the open edX footer to be leveraged in Django Templates.
- 'edxmako.shortcuts.open_source_footer_context_processor',
-
# Shoppingcart processor (detects if request.user has a cart)
'shoppingcart.context_processor.user_has_cart_context_processor',
diff --git a/lms/envs/dev.py b/lms/envs/dev.py
index 5fb2e93e9e..4124df3ba3 100644
--- a/lms/envs/dev.py
+++ b/lms/envs/dev.py
@@ -29,7 +29,6 @@ FEATURES['MULTIPLE_ENROLLMENT_ROLES'] = True
FEATURES['ENABLE_SHOPPING_CART'] = True
FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] = True
FEATURES['ENABLE_S3_GRADE_DOWNLOADS'] = True
-FEATURES['IS_EDX_DOMAIN'] = True # Is this an edX-owned domain? (used on instructor dashboard)
FEATURES['ENABLE_PAYMENT_FAKE'] = True
diff --git a/lms/templates/course_modes/choose.html b/lms/templates/course_modes/choose.html
new file mode 100644
index 0000000000..b15250a733
--- /dev/null
+++ b/lms/templates/course_modes/choose.html
@@ -0,0 +1,184 @@
+<%inherit file="../main.html" />
+<%!
+from django.utils.translation import ugettext as _
+from django.core.urlresolvers import reverse
+%>
+
+<%block name="bodyclass">register verification-process step-select-track%block>
+<%block name="pagetitle">
+ ${_("Enroll In {} | Choose Your Track").format(course_name)}
+%block>
+
+<%block name="js_extra">
+
+%block>
+
+<%block name="content">
+ % if error:
+
+
+
+
+
${_("Sorry, there was an error when trying to enroll you")}
+
+
+
+
+ %endif
+
+
+
+
+
+
+
+ ${_("Congratulations! You are now enrolled in {course_name}").format(course_name=course_name)}
+
+
+
+
+
+
+
+
+%block>
diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html
index d256c936a0..337018224c 100644
--- a/lms/templates/dashboard.html
+++ b/lms/templates/dashboard.html
@@ -151,13 +151,6 @@ import json
% endif
- % if settings.FEATURES.get('IS_EDX_DOMAIN') and settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
-
- % endif
-