diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py
index a70349bec3..b19833bbed 100644
--- a/common/djangoapps/student/views.py
+++ b/common/djangoapps/student/views.py
@@ -52,6 +52,10 @@ def csrf_token(context):
' name="csrfmiddlewaretoken" value="%s" />' % (csrf_token))
+# NOTE: This view is not linked to directly--it is called from
+# branding/views.py:index(), which is cached for anonymous users.
+# This means that it should always return the same thing for anon
+# users. (in particular, no switching based on query params allowed)
def index(request, extra_context={}, user=None):
'''
Render the edX main page.
@@ -82,8 +86,6 @@ def index(request, extra_context={}, user=None):
domain=domain)
context = {'universities': universities, 'entries': entries}
context.update(extra_context)
- if request.REQUEST.get('next', False):
- context['show_login_immediately'] = True
return render_to_response('index.html', context)
def course_from_id(course_id):
diff --git a/lms/static/js/query-params.js b/lms/static/js/query-params.js
new file mode 100644
index 0000000000..16aae021df
--- /dev/null
+++ b/lms/static/js/query-params.js
@@ -0,0 +1,9 @@
+// http://james.padolsey.com/javascript/bujs-1-getparameterbyname/
+function getParameterByName(name) {
+ var match = RegExp('[?&]' + name + '=([^&]*)')
+ .exec(window.location.search);
+
+ return match ?
+ decodeURIComponent(match[1].replace(/\+/g, ' '))
+ : null;
+}
diff --git a/lms/templates/index.html b/lms/templates/index.html
index 8cabe62f09..89b4d06eab 100644
--- a/lms/templates/index.html
+++ b/lms/templates/index.html
@@ -145,12 +145,22 @@
+
+<%block name="js_extra">
+
+
+%block>
+
% if show_signup_immediately is not UNDEFINED:
+ ## NOTE: This won't work in production, because anonymous views are cached, so it will
+ ## show either with or without this extra js for 3 minutes at a time.
-% elif show_login_immediately is not UNDEFINED:
-
-% endif
\ No newline at end of file
+% endif
diff --git a/lms/templates/university_profile/base.html b/lms/templates/university_profile/base.html
index d5f8e2ff27..b72dd9165f 100644
--- a/lms/templates/university_profile/base.html
+++ b/lms/templates/university_profile/base.html
@@ -14,4 +14,17 @@
<%block name="university_description" />
+
+<%block name="js_extra">
+
+
+%block>
+
+