Redirect from LMS courses page to marketing courses page
(Only if marketing site is enabled)
This commit is contained in:
@@ -6,6 +6,7 @@ from django_future.csrf import ensure_csrf_cookie
|
||||
import student.views
|
||||
import branding
|
||||
import courseware.views
|
||||
from mitxmako.shortcuts import marketing_link
|
||||
from util.cache import cache_if_anonymous
|
||||
|
||||
|
||||
@@ -36,9 +37,12 @@ def index(request):
|
||||
@cache_if_anonymous
|
||||
def courses(request):
|
||||
"""
|
||||
Render the "find courses" page. If subdomain branding is on, this is the
|
||||
university profile page, otherwise it's the edX courseware.views.courses page
|
||||
Render the "find courses" page. If the marketing site is enabled, redirect
|
||||
to that. Otherwise, if subdomain branding is on, this is the university
|
||||
profile page. Otherwise, it's the edX courseware.views.courses page
|
||||
"""
|
||||
if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE', False):
|
||||
return redirect(marketing_link('COURSES'), permanent=True)
|
||||
|
||||
university = branding.get_university(request.META.get('HTTP_HOST'))
|
||||
if university is None:
|
||||
|
||||
Reference in New Issue
Block a user