From f9c1af775c744024e504de776b6fb3aa101d435b Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Wed, 13 Sep 2023 11:08:48 -0400 Subject: [PATCH] feat: change problem default display name (#33240) --- cms/djangoapps/contentstore/helpers.py | 2 +- cms/djangoapps/contentstore/views/component.py | 2 +- cms/djangoapps/contentstore/views/tests/test_block.py | 2 +- .../content_libraries/tests/test_content_libraries.py | 2 +- xmodule/capa_block.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cms/djangoapps/contentstore/helpers.py b/cms/djangoapps/contentstore/helpers.py index c7a39be8f7..c2cc876f19 100644 --- a/cms/djangoapps/contentstore/helpers.py +++ b/cms/djangoapps/contentstore/helpers.py @@ -147,7 +147,7 @@ def xblock_type_display_name(xblock, default_display_name=None): elif category == 'vertical': return _('Unit') elif category == 'problem': - # The problem XBlock's display_name.default is not helpful ("Blank Advanced Problem") but changing it could have + # The problem XBlock's display_name.default is not helpful ("Blank Problem") but changing it could have # too many ripple effects in other places, so we have a special case for capa problems here. # Note: With a ProblemBlock instance, we could actually check block.problem_types to give a more specific # description like "Multiple Choice Problem", but that won't work if our 'block' argument is just the block_type diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 148b259898..3c31637d4c 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -336,7 +336,7 @@ def get_component_templates(courselike, library=False): # lint-amnesty, pylint: template_id = "peer-assessment" elif category == 'problem': # Override generic "Problem" name to describe this blank template: - display_name = _("Blank Advanced Problem") + display_name = _("Blank Problem") templates_for_category.append( create_template_dict(display_name, category, support_level_without_template, template_id, 'advanced') ) diff --git a/cms/djangoapps/contentstore/views/tests/test_block.py b/cms/djangoapps/contentstore/views/tests/test_block.py index ce5771ef83..49e08b6a9c 100644 --- a/cms/djangoapps/contentstore/views/tests/test_block.py +++ b/cms/djangoapps/contentstore/views/tests/test_block.py @@ -2779,7 +2779,7 @@ class TestComponentTemplates(CourseTestCase): self._verify_basic_component("video", "Video", "us") problem_templates = self.get_templates_of_type("problem") problem_no_boilerplate = self.get_template( - problem_templates, "Blank Advanced Problem" + problem_templates, "Blank Problem" ) self.assertIsNotNone(problem_no_boilerplate) self.assertEqual("us", problem_no_boilerplate["support_level"]) diff --git a/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py b/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py index 693082c35a..42d5bccf34 100644 --- a/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py +++ b/openedx/core/djangoapps/content_libraries/tests/test_content_libraries.py @@ -313,7 +313,7 @@ class ContentLibrariesTestMixin: block_data = self._add_block_to_library(lib_id, "problem", "problem1") self.assertDictContainsEntries(block_data, { "id": "lb:CL-TEST:testlib1:problem:problem1", - "display_name": "Blank Advanced Problem", + "display_name": "Blank Problem", "block_type": "problem", "has_unpublished_changes": True, }) diff --git a/xmodule/capa_block.py b/xmodule/capa_block.py index 94d4b2a61f..67d5fd58c2 100644 --- a/xmodule/capa_block.py +++ b/xmodule/capa_block.py @@ -168,7 +168,7 @@ class ProblemBlock( scope=Scope.settings, # it'd be nice to have a useful default but it screws up other things; so, # use display_name_with_default for those - default=_("Blank Advanced Problem") + default=_("Blank Problem") ) attempts = Integer( help=_("Number of attempts taken by the student on this problem"),