Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
39fb66fc
Commit
39fb66fc
authored
Sep 29, 2016
by
Sanford Student
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing scored/has_score from randomized content block
for TNL-4171
parent
91bae670
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
38 deletions
+2
-38
common/lib/xmodule/xmodule/library_content_module.py
+0
-6
common/test/acceptance/pages/studio/library.py
+0
-21
common/test/acceptance/tests/lms/test_library.py
+0
-1
common/test/acceptance/tests/studio/test_studio_library_container.py
+2
-10
No files found.
common/lib/xmodule/xmodule/library_content_module.py
View file @
39fb66fc
...
...
@@ -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
...
...
common/test/acceptance/pages/studio/library.py
View file @
39fb66fc
...
...
@@ -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
...
...
@@ -175,26 +174,6 @@ class StudioLibraryContentEditor(ComponentEditorView):
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
):
"""
Gets value of CAPA type select
...
...
common/test/acceptance/tests/lms/test_library.py
View file @
39fb66fc
...
...
@@ -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
)
...
...
common/test/acceptance/tests/studio/test_studio_library_container.py
View file @
39fb66fc
...
...
@@ -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
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment