From 62bacea371f9c23cecaa27392226a3cba74cd1a8 Mon Sep 17 00:00:00 2001
From: Chris Dodge
Date: Fri, 31 May 2013 11:10:14 -0400
Subject: [PATCH 1/3] use the right link to the login page in a particular use
case: clicking activation email when not logged in
---
cms/templates/registration/activation_complete.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cms/templates/registration/activation_complete.html b/cms/templates/registration/activation_complete.html
index 8cc3dc8c56..9e29a224f5 100644
--- a/cms/templates/registration/activation_complete.html
+++ b/cms/templates/registration/activation_complete.html
@@ -18,7 +18,7 @@
%if user_logged_in:
Visit your dashboard to see your courses.
%else:
- You can now login.
+ You can now login.
%endif
From 7efcd981358d2a8a92ae6b8ea1d6f191cd352b94 Mon Sep 17 00:00:00 2001
From: Chris Dodge
Date: Fri, 31 May 2013 11:25:28 -0400
Subject: [PATCH 2/3] fix up styles in header for this particular use case
---
cms/templates/registration/activation_complete.html | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/cms/templates/registration/activation_complete.html b/cms/templates/registration/activation_complete.html
index 9e29a224f5..a4d028ef5b 100644
--- a/cms/templates/registration/activation_complete.html
+++ b/cms/templates/registration/activation_complete.html
@@ -3,6 +3,12 @@
<%namespace name='static' file='../static_content.html'/>
+%if not user_logged_in:
+<%block name="bodyclass">
+ not-signedin
+%block>
+%endif
+
<%block name="content">
From 91d3f4ddff2798a2daeb108658baab8ed5f80729 Mon Sep 17 00:00:00 2001
From: Chris Dodge
Date: Sun, 2 Jun 2013 00:43:17 -0400
Subject: [PATCH 3/3] add simple content check for the activation page when the
user is not logged in
---
cms/djangoapps/contentstore/tests/tests.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py
index 34e5da4b4d..f769652493 100644
--- a/cms/djangoapps/contentstore/tests/tests.py
+++ b/cms/djangoapps/contentstore/tests/tests.py
@@ -111,6 +111,18 @@ class AuthTestCase(ContentStoreTestCase):
# Now login should work
self.login(self.email, self.pw)
+ def test_login_link_on_activation_age(self):
+ self.create_account(self.username, self.email, self.pw)
+ # we want to test the rendering of the activation page when the user isn't logged in
+ self.client.logout()
+ resp = self._activate_user(self.email)
+ self.assertEqual(resp.status_code, 200)
+
+ # check the the HTML has links to the right login page. Note that this is merely a content
+ # check and thus could be fragile should the wording change on this page
+ expected = 'You can now login.'
+ self.assertIn(expected, resp.content)
+
def test_private_pages_auth(self):
"""Make sure pages that do require login work."""
auth_pages = (