Commit 44bddf8a by sanfordstudent Committed by GitHub

Merge pull request #13610 from edx/sstudent/TNL-4171

Removing Scored/has_score from randomized content block
parents db2eb2dc 39fb66fc
...@@ -99,12 +99,6 @@ class LibraryContentFields(object): ...@@ -99,12 +99,6 @@ class LibraryContentFields(object):
values=_get_capa_types(), values=_get_capa_types(),
scope=Scope.settings, scope=Scope.settings,
) )
has_score = Boolean(
display_name=_("Scored"),
help=_("Set this value to True if this module is either a graded assignment or a practice problem."),
default=False,
scope=Scope.settings,
)
selected = List( selected = List(
# This is a list of (block_type, block_id) tuples used to record # This is a list of (block_type, block_id) tuples used to record
# which random/first set of matching blocks was selected per user # which random/first set of matching blocks was selected per user
......
...@@ -140,7 +140,6 @@ class StudioLibraryContentEditor(ComponentEditorView): ...@@ -140,7 +140,6 @@ class StudioLibraryContentEditor(ComponentEditorView):
# Labels used to identify the fields on the edit modal: # Labels used to identify the fields on the edit modal:
LIBRARY_LABEL = "Library" LIBRARY_LABEL = "Library"
COUNT_LABEL = "Count" COUNT_LABEL = "Count"
SCORED_LABEL = "Scored"
PROBLEM_TYPE_LABEL = "Problem Type" PROBLEM_TYPE_LABEL = "Problem Type"
@property @property
...@@ -175,26 +174,6 @@ class StudioLibraryContentEditor(ComponentEditorView): ...@@ -175,26 +174,6 @@ class StudioLibraryContentEditor(ComponentEditorView):
EmptyPromise(lambda: self.count == count, "count is updated in modal.").fulfill() EmptyPromise(lambda: self.count == count, "count is updated in modal.").fulfill()
@property @property
def scored(self):
"""
Gets value of scored select
"""
value = self.get_selected_option_text(self.SCORED_LABEL)
if value == 'True':
return True
elif value == 'False':
return False
raise ValueError("Unknown value {value} set for {label}".format(value=value, label=self.SCORED_LABEL))
@scored.setter
def scored(self, scored):
"""
Sets value of scored select
"""
self.set_select_value(self.SCORED_LABEL, str(scored))
EmptyPromise(lambda: self.scored == scored, "scored is updated in modal.").fulfill()
@property
def capa_type(self): def capa_type(self):
""" """
Gets value of CAPA type select Gets value of CAPA type select
......
...@@ -68,7 +68,6 @@ class LibraryContentTestBase(UniqueCourseTest): ...@@ -68,7 +68,6 @@ class LibraryContentTestBase(UniqueCourseTest):
'source_library_id': unicode(self.library_key), 'source_library_id': unicode(self.library_key),
'mode': 'random', 'mode': 'random',
'max_count': 1, 'max_count': 1,
'has_score': False
} }
self.lib_block = XBlockFixtureDesc('library_content', "Library Content", metadata=library_content_metadata) self.lib_block = XBlockFixtureDesc('library_content', "Library Content", metadata=library_content_metadata)
......
...@@ -65,7 +65,6 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe ...@@ -65,7 +65,6 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe
'source_library_id': unicode(self.library_key), 'source_library_id': unicode(self.library_key),
'mode': 'random', 'mode': 'random',
'max_count': 1, 'max_count': 1,
'has_score': False
} }
course_fixture.add_children( course_fixture.add_children(
...@@ -84,13 +83,8 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe ...@@ -84,13 +83,8 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe
""" """
return StudioLibraryContainerXBlockWrapper.from_xblock_wrapper(xblock) return StudioLibraryContainerXBlockWrapper.from_xblock_wrapper(xblock)
@ddt.data( @ddt.data(1, 2, 3)
(1, True), def test_can_edit_metadata(self, max_count):
(2, False),
(3, True),
)
@ddt.unpack
def test_can_edit_metadata(self, max_count, scored):
""" """
Scenario: Given I have a library, a course and library content xblock in a course Scenario: Given I have a library, a course and library content xblock in a course
When I go to studio unit page for library content block When I go to studio unit page for library content block
...@@ -103,7 +97,6 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe ...@@ -103,7 +97,6 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe
edit_modal = StudioLibraryContentEditor(self.browser, library_container.locator) edit_modal = StudioLibraryContentEditor(self.browser, library_container.locator)
edit_modal.library_name = library_name edit_modal.library_name = library_name
edit_modal.count = max_count edit_modal.count = max_count
edit_modal.scored = scored
library_container.save_settings() # saving settings library_container.save_settings() # saving settings
...@@ -112,7 +105,6 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe ...@@ -112,7 +105,6 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe
edit_modal = StudioLibraryContentEditor(self.browser, library_container.locator) edit_modal = StudioLibraryContentEditor(self.browser, library_container.locator)
self.assertEqual(edit_modal.library_name, library_name) self.assertEqual(edit_modal.library_name, library_name)
self.assertEqual(edit_modal.count, max_count) self.assertEqual(edit_modal.count, max_count)
self.assertEqual(edit_modal.scored, scored)
def test_no_library_shows_library_not_configured(self): def test_no_library_shows_library_not_configured(self):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment