Skip to content

Commit aedc8c3

Browse files
feat!: Drop support for the legacy Group Configurations page.
The legacy Group Configurations page in Studio has been replaced with a new view in the Authoring MFE. This change removes the now unused JS/HTML/Python related to the old page. This work is part of #36108 BREAKING CHANGE: The 'legacy_studio.configurations' waffle flag will no longer be respected. The system will behave as if the flag is set to false permanently.
1 parent b041c0a commit aedc8c3

7 files changed

Lines changed: 7 additions & 212 deletions

File tree

cms/djangoapps/contentstore/utils.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
use_new_course_team_page,
4747
use_new_export_page,
4848
use_new_grading_page,
49-
use_new_group_configurations_page,
5049
use_new_import_page,
5150
use_new_schedule_details_page,
5251
use_new_unit_page,
@@ -495,13 +494,10 @@ def get_group_configurations_url(course_locator) -> str:
495494
"""
496495
Gets course authoring microfrontend URL for group configurations page view.
497496
"""
498-
group_configurations_url = None
499-
if use_new_group_configurations_page(course_locator):
500-
mfe_base_url = get_course_authoring_url(course_locator)
501-
course_mfe_url = f'{mfe_base_url}/course/{course_locator}/group_configurations'
502-
if mfe_base_url:
503-
group_configurations_url = course_mfe_url
504-
return group_configurations_url
497+
mfe_base_url = get_course_authoring_url(course_locator)
498+
if mfe_base_url:
499+
return f'{mfe_base_url}/course/{course_locator}/group_configurations'
500+
return ''
505501

506502

507503
def get_custom_pages_url(course_locator) -> str:

cms/djangoapps/contentstore/views/course.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@
101101
default_enable_flexible_peer_openassessments,
102102
use_new_advanced_settings_page,
103103
use_new_grading_page,
104-
use_new_group_configurations_page,
105104
use_new_schedule_details_page,
106105
)
107106
from ..utils import (
@@ -112,7 +111,6 @@
112111
get_course_rerun_context,
113112
get_course_settings,
114113
get_grading_url,
115-
get_group_configurations_context,
116114
get_group_configurations_url,
117115
get_lms_link_for_item,
118116
get_proctored_exam_settings_url,
@@ -1873,10 +1871,7 @@ def group_configurations_list_handler(request, course_key_string):
18731871
course = get_course_and_check_manage_group_configurations_access(course_key, request.user)
18741872

18751873
if 'text/html' in request.META.get('HTTP_ACCEPT', 'text/html'):
1876-
if use_new_group_configurations_page(course_key):
1877-
return redirect(get_group_configurations_url(course_key))
1878-
group_configurations_context = get_group_configurations_context(course, store)
1879-
return render_to_response('group_configurations.html', group_configurations_context)
1874+
return redirect(get_group_configurations_url(course_key))
18801875
elif "application/json" in request.META.get('HTTP_ACCEPT'):
18811876
if request.method == 'POST':
18821877
# create a new group configuration for the course

cms/djangoapps/contentstore/views/tests/test_exam_settings_view.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def _get_exam_settings_alert_text(raw_html_content):
5353
@ddt.data(
5454
"certificates_list_handler",
5555
"settings_handler",
56-
"group_configurations_list_handler",
5756
"grading_handler",
5857
"advanced_settings_handler"
5958
)
@@ -70,7 +69,6 @@ def test_view_without_exam_settings_enabled(self, handler):
7069
@ddt.data(
7170
"certificates_list_handler",
7271
"settings_handler",
73-
"group_configurations_list_handler",
7472
"grading_handler",
7573
"advanced_settings_handler"
7674
)

cms/djangoapps/contentstore/views/tests/test_group_configurations.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,11 @@
99

1010
import ddt
1111
from django.test import Client
12-
from edx_toggles.toggles.testutils import override_waffle_flag
1312
from openedx_authz.constants.roles import COURSE_DATA_RESEARCHER, COURSE_STAFF
1413
from rest_framework import status
1514

16-
from cms.djangoapps.contentstore import toggles
1715
from cms.djangoapps.contentstore.api.tests.base import BaseCourseViewTest
1816
from cms.djangoapps.contentstore.course_group_config import (
19-
CONTENT_GROUP_CONFIGURATION_NAME,
2017
ENROLLMENT_SCHEME,
2118
GroupConfiguration,
2219
)
@@ -274,27 +271,12 @@ def _url(self):
274271
"""
275272
return reverse_course_url('group_configurations_list_handler', self.course.id)
276273

277-
@override_waffle_flag(toggles.LEGACY_STUDIO_CONFIGURATIONS, True)
278274
def test_view_index_ok(self):
279275
"""
280-
Basic check that the groups configuration page responds correctly.
276+
Basic check that the groups configuration page redirects to the MFE.
281277
"""
282-
283-
# This creates a random UserPartition.
284-
self.course.user_partitions = [
285-
UserPartition(0, 'First name', 'First description', [Group(0, 'Group A'), Group(1, 'Group B'), Group(2, 'Group C')]), # lint-amnesty, pylint: disable=line-too-long
286-
]
287-
self.save_course()
288-
289-
if 'split_test' not in self.course.advanced_modules:
290-
self.course.advanced_modules.append('split_test')
291-
self.store.update_item(self.course, self.user.id)
292-
293278
response = self.client.get(self._url())
294-
self.assertEqual(response.status_code, 200) # noqa: PT009
295-
self.assertContains(response, 'First name', count=1)
296-
self.assertContains(response, 'Group C')
297-
self.assertContains(response, CONTENT_GROUP_CONFIGURATION_NAME)
279+
self.assertEqual(response.status_code, 302) # noqa: PT009
298280

299281
def test_unsupported_http_accept_header(self):
300282
"""

cms/static/cms/js/build.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
'js/factories/base',
2222
'js/factories/course_create_rerun',
2323
'js/factories/export',
24-
'js/factories/group_configurations',
2524
'js/certificates/factories/certificates_page_factory',
2625
'js/factories/index',
2726
'js/factories/manage_users',

cms/static/js/factories/group_configurations.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

cms/templates/group_configurations.html

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)