From 54e5e3d31fecfb4ffda1e4b2b3e5ec9e8d6ead00 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 10 Apr 2013 14:29:47 -0400 Subject: [PATCH] Adding the EDX_MKTG feature flag and links back to the marketing site --- lms/djangoapps/branding/views.py | 2 ++ lms/envs/aws.py | 1 + lms/templates/navigation.html | 20 +++++++++++++------- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lms/djangoapps/branding/views.py b/lms/djangoapps/branding/views.py index 9fe912e947..1b29b8eb09 100644 --- a/lms/djangoapps/branding/views.py +++ b/lms/djangoapps/branding/views.py @@ -22,6 +22,8 @@ def index(request): if settings.MITX_FEATURES.get('AUTH_USE_MIT_CERTIFICATES'): from external_auth.views import ssl_login return ssl_login(request) + if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE'): + return redirect(settings.MKTG_URLS.get('ROOT')) university = branding.get_university(request.META.get('HTTP_HOST')) if university is None: diff --git a/lms/envs/aws.py b/lms/envs/aws.py index aa30315eca..769caf615c 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -80,6 +80,7 @@ META_UNIVERSITIES = ENV_TOKENS.get('META_UNIVERSITIES', {}) COMMENTS_SERVICE_URL = ENV_TOKENS.get("COMMENTS_SERVICE_URL", '') COMMENTS_SERVICE_KEY = ENV_TOKENS.get("COMMENTS_SERVICE_KEY", '') CERT_QUEUE = ENV_TOKENS.get("CERT_QUEUE", 'test-pull') +MKTG_URLS = ENV_TOKENS.get('MKTG_URLS', {}) ############################## SECURE AUTH ITEMS ############### # Secret things: passwords, access keys, etc. diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html index 091078d009..ee51a5ff98 100644 --- a/lms/templates/navigation.html +++ b/lms/templates/navigation.html @@ -45,12 +45,16 @@ site_status_msg = get_site_status_msg(course_id) % endif % if user.is_authenticated(): + -
  1. @@ -69,18 +73,20 @@ site_status_msg = get_site_status_msg(course_id) % else: @@ -88,7 +94,7 @@ site_status_msg = get_site_status_msg(course_id)