Skip to content

Commit 453c451

Browse files
authored
Merge branch 'master' into pwnage101/ENT-11569
2 parents 27230ed + 6efb92c commit 453c451

24 files changed

Lines changed: 86 additions & 794 deletions

cms/djangoapps/contentstore/tests/test_contentstore.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,12 +2142,13 @@ def _test_page(self, page, status_code=200):
21422142
resp = self.client.get_html(page)
21432143
self.assertEqual(resp.status_code, status_code) # noqa: PT009
21442144

2145-
@override_waffle_flag(toggles.LEGACY_STUDIO_LOGGED_OUT_HOME, True)
2146-
def test_how_it_works_legacy(self):
2147-
self._test_page("/howitworks")
2145+
def test_homepage_redirects_to_home(self):
2146+
# Root URL permanently redirects to studio home (sign-in page).
2147+
self._test_page("/", 301)
21482148

2149-
def test_how_it_works_redirect_to_signin(self):
2150-
self._test_page("/howitworks", 302)
2149+
def test_howitworks_redirects_to_home(self):
2150+
# Legacy landing page permanently redirects; preserves bookmarks.
2151+
self._test_page("/howitworks", 301)
21512152

21522153
def test_signup(self):
21532154
# deprecated signup url redirects to LMS register.

cms/djangoapps/contentstore/tests/tests.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
import datetime
1212
import time
13-
from unittest import mock
14-
from urllib.parse import quote_plus, unquote
13+
from urllib.parse import unquote
1514

1615
from ddt import data, ddt, unpack
1716
from django.conf import settings
@@ -179,32 +178,6 @@ def test_inactive_session_timeout(self):
179178
# re-request, and we should get a redirect to login page
180179
self.assertRedirects(resp, settings.LOGIN_URL + '?next=/home/', target_status_code=302)
181180

182-
@data(
183-
(True, 'assertContains'),
184-
(False, 'assertNotContains'))
185-
@unpack
186-
@override_waffle_flag(toggles.LEGACY_STUDIO_LOGGED_OUT_HOME, True)
187-
def test_signin_and_signup_buttons_index_page(self, allow_account_creation, assertion_method_name):
188-
"""
189-
Navigate to the home page and check the Sign Up button is hidden when ALLOW_PUBLIC_ACCOUNT_CREATION flag
190-
is turned off, and not when it is turned on. The Sign In button should always appear.
191-
"""
192-
with mock.patch.dict(settings.FEATURES, {"ALLOW_PUBLIC_ACCOUNT_CREATION": allow_account_creation}):
193-
response = self.client.get(reverse('homepage'))
194-
assertion_method = getattr(self, assertion_method_name)
195-
login_url = quote_plus(f"http://testserver{settings.LOGIN_URL}")
196-
assertion_method(
197-
response,
198-
f'<a class="action action-signup" href="{settings.LMS_ROOT_URL}/register'
199-
f'?next={login_url}">Sign Up</a>'
200-
)
201-
self.assertContains(
202-
response,
203-
'<a class="action action-signin" href="/login/?next=http%3A%2F%2Ftestserver%2F">'
204-
'Sign In</a>'
205-
)
206-
207-
208181
class ForumTestCase(CourseTestCase):
209182
"""Tests class to verify course to forum operations"""
210183

cms/djangoapps/contentstore/toggles.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -519,28 +519,6 @@ def enable_course_optimizer(course_id):
519519
return ENABLE_COURSE_OPTIMIZER.is_enabled(course_id)
520520

521521

522-
# .. toggle_name: legacy_studio.logged_out_home
523-
# .. toggle_implementation: WaffleFlag
524-
# .. toggle_default: False
525-
# .. toggle_description: Temporarily fall back to the old Studio "How it Works" page when unauthenticated
526-
# .. toggle_use_cases: temporary
527-
# .. toggle_creation_date: 2025-03-14
528-
# .. toggle_target_removal_date: 2025-09-14
529-
# .. toggle_tickets: https://github.com/openedx/edx-platform/issues/36275
530-
# .. toggle_warning: In Ulmo, this toggle will be removed, along with the legacy page. The only available
531-
# behavior will be to send the user to the log-in page with a redirect to Studio Course Listing (/home).
532-
LEGACY_STUDIO_LOGGED_OUT_HOME = WaffleFlag('legacy_studio.logged_out_home', __name__)
533-
534-
535-
def use_legacy_logged_out_home():
536-
"""
537-
Returns whether the old "how it works" page should be shown.
538-
539-
If not, then we should just go to the login page w/ redirect to studio course listing.
540-
"""
541-
return LEGACY_STUDIO_LOGGED_OUT_HOME.is_enabled()
542-
543-
544522
# .. toggle_name: contentstore.enable_course_optimizer_check_prev_run_links
545523
# .. toggle_implementation: CourseWaffleFlag
546524
# .. toggle_default: False

cms/djangoapps/contentstore/views/public.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@
88
from django.http.response import Http404
99
from django.shortcuts import redirect
1010

11-
from common.djangoapps.edxmako.shortcuts import render_to_response
12-
1311
from ..config.waffle import ENABLE_ACCESSIBILITY_POLICY_PAGE
14-
from ..toggles import use_legacy_logged_out_home
1512

1613
__all__ = [
17-
'register_redirect_to_lms', 'login_redirect_to_lms', 'howitworks', 'accessibility',
14+
'register_redirect_to_lms', 'login_redirect_to_lms', 'accessibility',
1815
'redirect_to_lms_login_for_admin',
1916
]
2017

@@ -62,15 +59,6 @@ def _build_next_param(request):
6259
return ''
6360

6461

65-
def howitworks(request):
66-
"""
67-
Deprecated logged-out home page. New behavior is just login w/ redirect to studio course list.
68-
"""
69-
if use_legacy_logged_out_home() and not request.user.is_authenticated:
70-
return render_to_response('howitworks.html', {})
71-
return redirect('/home/')
72-
73-
7462
def accessibility(request):
7563
"""
7664
Display the accessibility accommodation form.

cms/envs/mock.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -739,10 +739,6 @@ SOCIAL_SHARING_SETTINGS:
739739
DASHBOARD_FACEBOOK: true
740740
DASHBOARD_TWITTER: true
741741
SOFTWARE_SECURE_RETRY_MAX_ATTEMPTS: 5
742-
STATICFILES_STORAGE_KWARGS:
743-
openedx.core.storage.ProductionS3Storage:
744-
bucket_name: static
745-
default_acl: null
746742
STATIC_ROOT_BASE: /edx/var/edxapp/staticfiles
747743
STATIC_URL_BASE: /static/
748744
STUDIO_NAME: Studio

cms/static/images/hiw-feature1.png

-98 KB
Binary file not shown.

cms/static/images/hiw-feature2.png

-48.8 KB
Binary file not shown.

cms/static/images/hiw-feature3.png

-80.4 KB
Binary file not shown.
-24 KB
Binary file not shown.
-19.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)