feat: change problem default display name (#33240)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')
|
||||
)
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user