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
16e1ecf6
Commit
16e1ecf6
authored
May 20, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some pylint violations
parent
ed2c1cf0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
+3
-3
lms/djangoapps/courseware/module_render.py
+4
-5
No files found.
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
View file @
16e1ecf6
...
...
@@ -407,7 +407,7 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
self
.
assertTrue
(
changed
)
def
test_get_max_score
(
self
):
changed
=
self
.
combinedoe
.
update_task_states
()
self
.
combinedoe
.
update_task_states
()
self
.
combinedoe
.
state
=
"done"
self
.
combinedoe
.
is_scored
=
True
max_score
=
self
.
combinedoe
.
max_score
()
...
...
@@ -611,11 +611,11 @@ class OpenEndedModuleXmlTest(unittest.TestCase, DummyModulestore):
self
.
assertEqual
(
module
.
current_task_number
,
1
)
#Get html and other data client will request
html
=
module
.
get_html
()
module
.
get_html
()
legend
=
module
.
handle_ajax
(
"get_legend"
,
{})
self
.
assertTrue
(
isinstance
(
legend
,
basestring
))
status
=
module
.
handle_ajax
(
"get_status"
,
{})
module
.
handle_ajax
(
"get_status"
,
{})
module
.
handle_ajax
(
"skip_post_assessment"
,
{})
self
.
assertTrue
(
isinstance
(
legend
,
basestring
))
...
...
lms/djangoapps/courseware/module_render.py
View file @
16e1ecf6
...
...
@@ -214,12 +214,11 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours
#This is a hacky way to pass settings to the combined open ended xmodule
#It needs an S3 interface to upload images to S3
#It needs the open ended grading interface in order to get peer grading to be done
#TODO: refactor these settings into module-specific settings when possible.
#this first checks to see if the descriptor is the correct one, and only sends settings if it is
#Get descriptor metadata fields indicating needs for various settings
needs_open_ended_interface
=
hasattr
(
descriptor
,
"needs_open_ended_interface"
)
and
descriptor
.
needs_open_ended_interface
needs_s3_interface
=
hasattr
(
descriptor
,
"needs_s3_interface"
)
and
descriptor
.
needs_s3_interface
needs_s3_interface
=
hasattr
(
descriptor
,
"needs_s3_interface"
)
and
descriptor
.
needs_s3_interface
#Initialize interfaces to None
open_ended_grading_interface
=
None
...
...
@@ -232,9 +231,9 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours
open_ended_grading_interface
[
'mock_staff_grading'
]
=
settings
.
MOCK_STAFF_GRADING
if
needs_s3_interface
:
s3_interface
=
{
'access_key'
:
getattr
(
settings
,
'AWS_ACCESS_KEY_ID'
,
''
),
'secret_access_key'
:
getattr
(
settings
,
'AWS_SECRET_ACCESS_KEY'
,
''
),
'storage_bucket_name'
:
getattr
(
settings
,
'AWS_STORAGE_BUCKET_NAME'
,
'openended'
)
'access_key'
:
getattr
(
settings
,
'AWS_ACCESS_KEY_ID'
,
''
),
'secret_access_key'
:
getattr
(
settings
,
'AWS_SECRET_ACCESS_KEY'
,
''
),
'storage_bucket_name'
:
getattr
(
settings
,
'AWS_STORAGE_BUCKET_NAME'
,
'openended'
)
}
def
inner_get_module
(
descriptor
):
...
...
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