removing scored/has_score from randomized content block
for TNL-4171
This commit is contained in:
@@ -99,12 +99,6 @@ class LibraryContentFields(object):
|
||||
values=_get_capa_types(),
|
||||
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(
|
||||
# This is a list of (block_type, block_id) tuples used to record
|
||||
# which random/first set of matching blocks was selected per user
|
||||
|
||||
@@ -140,7 +140,6 @@ class StudioLibraryContentEditor(ComponentEditorView):
|
||||
# Labels used to identify the fields on the edit modal:
|
||||
LIBRARY_LABEL = "Library"
|
||||
COUNT_LABEL = "Count"
|
||||
SCORED_LABEL = "Scored"
|
||||
PROBLEM_TYPE_LABEL = "Problem Type"
|
||||
|
||||
@property
|
||||
@@ -174,26 +173,6 @@ class StudioLibraryContentEditor(ComponentEditorView):
|
||||
count_text.send_keys(count)
|
||||
EmptyPromise(lambda: self.count == count, "count is updated in modal.").fulfill()
|
||||
|
||||
@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):
|
||||
"""
|
||||
|
||||
@@ -68,7 +68,6 @@ class LibraryContentTestBase(UniqueCourseTest):
|
||||
'source_library_id': unicode(self.library_key),
|
||||
'mode': 'random',
|
||||
'max_count': 1,
|
||||
'has_score': False
|
||||
}
|
||||
|
||||
self.lib_block = XBlockFixtureDesc('library_content', "Library Content", metadata=library_content_metadata)
|
||||
|
||||
@@ -65,7 +65,6 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe
|
||||
'source_library_id': unicode(self.library_key),
|
||||
'mode': 'random',
|
||||
'max_count': 1,
|
||||
'has_score': False
|
||||
}
|
||||
|
||||
course_fixture.add_children(
|
||||
@@ -84,13 +83,8 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe
|
||||
"""
|
||||
return StudioLibraryContainerXBlockWrapper.from_xblock_wrapper(xblock)
|
||||
|
||||
@ddt.data(
|
||||
(1, True),
|
||||
(2, False),
|
||||
(3, True),
|
||||
)
|
||||
@ddt.unpack
|
||||
def test_can_edit_metadata(self, max_count, scored):
|
||||
@ddt.data(1, 2, 3)
|
||||
def test_can_edit_metadata(self, max_count):
|
||||
"""
|
||||
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
|
||||
@@ -103,7 +97,6 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe
|
||||
edit_modal = StudioLibraryContentEditor(self.browser, library_container.locator)
|
||||
edit_modal.library_name = library_name
|
||||
edit_modal.count = max_count
|
||||
edit_modal.scored = scored
|
||||
|
||||
library_container.save_settings() # saving settings
|
||||
|
||||
@@ -112,7 +105,6 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSe
|
||||
edit_modal = StudioLibraryContentEditor(self.browser, library_container.locator)
|
||||
self.assertEqual(edit_modal.library_name, library_name)
|
||||
self.assertEqual(edit_modal.count, max_count)
|
||||
self.assertEqual(edit_modal.scored, scored)
|
||||
|
||||
def test_no_library_shows_library_not_configured(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user