From 39fb66fccf35caec1da173d86efbd7eea0f494be Mon Sep 17 00:00:00 2001 From: Sanford Student Date: Thu, 29 Sep 2016 17:14:42 -0400 Subject: [PATCH] removing scored/has_score from randomized content block for TNL-4171 --- .../xmodule/xmodule/library_content_module.py | 6 ------ .../test/acceptance/pages/studio/library.py | 21 ------------------- .../test/acceptance/tests/lms/test_library.py | 1 - .../studio/test_studio_library_container.py | 12 ++--------- 4 files changed, 2 insertions(+), 38 deletions(-) diff --git a/common/lib/xmodule/xmodule/library_content_module.py b/common/lib/xmodule/xmodule/library_content_module.py index 7d7a174038..ae46a775b5 100644 --- a/common/lib/xmodule/xmodule/library_content_module.py +++ b/common/lib/xmodule/xmodule/library_content_module.py @@ -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 diff --git a/common/test/acceptance/pages/studio/library.py b/common/test/acceptance/pages/studio/library.py index 73562aba76..e11c91e472 100644 --- a/common/test/acceptance/pages/studio/library.py +++ b/common/test/acceptance/pages/studio/library.py @@ -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): """ diff --git a/common/test/acceptance/tests/lms/test_library.py b/common/test/acceptance/tests/lms/test_library.py index a42bf211c2..5eb18f423f 100644 --- a/common/test/acceptance/tests/lms/test_library.py +++ b/common/test/acceptance/tests/lms/test_library.py @@ -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) diff --git a/common/test/acceptance/tests/studio/test_studio_library_container.py b/common/test/acceptance/tests/studio/test_studio_library_container.py index 1d7bf1831a..dcc1d376a3 100644 --- a/common/test/acceptance/tests/studio/test_studio_library_container.py +++ b/common/test/acceptance/tests/studio/test_studio_library_container.py @@ -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): """