Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions cms/djangoapps/contentstore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
use_new_course_team_page,
use_new_export_page,
use_new_grading_page,
use_new_group_configurations_page,
use_new_import_page,
use_new_schedule_details_page,
use_new_unit_page,
Expand Down Expand Up @@ -495,13 +494,10 @@ def get_group_configurations_url(course_locator) -> str:
"""
Gets course authoring microfrontend URL for group configurations page view.
"""
group_configurations_url = None
if use_new_group_configurations_page(course_locator):
mfe_base_url = get_course_authoring_url(course_locator)
course_mfe_url = f'{mfe_base_url}/course/{course_locator}/group_configurations'
if mfe_base_url:
group_configurations_url = course_mfe_url
return group_configurations_url
mfe_base_url = get_course_authoring_url(course_locator)
if mfe_base_url:
return f'{mfe_base_url}/course/{course_locator}/group_configurations'
return ''


def get_custom_pages_url(course_locator) -> str:
Expand Down
7 changes: 1 addition & 6 deletions cms/djangoapps/contentstore/views/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
default_enable_flexible_peer_openassessments,
use_new_advanced_settings_page,
use_new_grading_page,
use_new_group_configurations_page,
use_new_schedule_details_page,
)
from ..utils import (
Expand All @@ -112,7 +111,6 @@
get_course_rerun_context,
get_course_settings,
get_grading_url,
get_group_configurations_context,
get_group_configurations_url,
get_lms_link_for_item,
get_proctored_exam_settings_url,
Expand Down Expand Up @@ -1873,10 +1871,7 @@ def group_configurations_list_handler(request, course_key_string):
course = get_course_and_check_manage_group_configurations_access(course_key, request.user)

if 'text/html' in request.META.get('HTTP_ACCEPT', 'text/html'):
if use_new_group_configurations_page(course_key):
return redirect(get_group_configurations_url(course_key))
group_configurations_context = get_group_configurations_context(course, store)
return render_to_response('group_configurations.html', group_configurations_context)
return redirect(get_group_configurations_url(course_key))
elif "application/json" in request.META.get('HTTP_ACCEPT'):
if request.method == 'POST':
# create a new group configuration for the course
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def _get_exam_settings_alert_text(raw_html_content):
@ddt.data(
"certificates_list_handler",
"settings_handler",
"group_configurations_list_handler",
"grading_handler",
"advanced_settings_handler"
)
Expand All @@ -70,7 +69,6 @@ def test_view_without_exam_settings_enabled(self, handler):
@ddt.data(
"certificates_list_handler",
"settings_handler",
"group_configurations_list_handler",
"grading_handler",
"advanced_settings_handler"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@

import ddt
from django.test import Client
from edx_toggles.toggles.testutils import override_waffle_flag
from openedx_authz.constants.roles import COURSE_DATA_RESEARCHER, COURSE_STAFF
from rest_framework import status

from cms.djangoapps.contentstore import toggles
from cms.djangoapps.contentstore.api.tests.base import BaseCourseViewTest
from cms.djangoapps.contentstore.course_group_config import (
CONTENT_GROUP_CONFIGURATION_NAME,
ENROLLMENT_SCHEME,
GroupConfiguration,
)
Expand Down Expand Up @@ -274,27 +271,12 @@ def _url(self):
"""
return reverse_course_url('group_configurations_list_handler', self.course.id)

@override_waffle_flag(toggles.LEGACY_STUDIO_CONFIGURATIONS, True)
def test_view_index_ok(self):
"""
Basic check that the groups configuration page responds correctly.
Basic check that the groups configuration page redirects to the MFE.
"""

# This creates a random UserPartition.
self.course.user_partitions = [
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
]
self.save_course()

if 'split_test' not in self.course.advanced_modules:
self.course.advanced_modules.append('split_test')
self.store.update_item(self.course, self.user.id)

response = self.client.get(self._url())
self.assertEqual(response.status_code, 200) # noqa: PT009
self.assertContains(response, 'First name', count=1)
self.assertContains(response, 'Group C')
self.assertContains(response, CONTENT_GROUP_CONFIGURATION_NAME)
self.assertEqual(response.status_code, 302) # noqa: PT009

def test_unsupported_http_accept_header(self):
"""
Expand Down
1 change: 0 additions & 1 deletion cms/static/cms/js/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
'js/factories/base',
'js/factories/course_create_rerun',
'js/factories/export',
'js/factories/group_configurations',
'js/certificates/factories/certificates_page_factory',
'js/factories/index',
'js/factories/manage_users',
Expand Down
35 changes: 0 additions & 35 deletions cms/static/js/factories/group_configurations.js

This file was deleted.

140 changes: 0 additions & 140 deletions cms/templates/group_configurations.html

This file was deleted.

Loading