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
500499b6
Commit
500499b6
authored
Nov 08, 2014
by
stv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PEP8: E231 missing whitespace after '[:,]'
parent
b388ab9d
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
23 additions
and
22 deletions
+23
-22
cms/djangoapps/contentstore/views/preview.py
+1
-1
common/djangoapps/microsite_configuration/templatetags/microsite.py
+1
-1
common/djangoapps/terrain/stubs/http.py
+2
-2
common/djangoapps/terrain/stubs/tests/test_lti_stub.py
+1
-1
common/djangoapps/terrain/stubs/xqueue.py
+2
-1
common/lib/sandbox-packages/verifiers/draganddrop.py
+8
-8
common/lib/xmodule/xmodule/open_ended_grading_classes/peer_grading_service.py
+1
-1
common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py
+1
-1
lms/djangoapps/courseware/features/high-level-tabs.py
+1
-1
lms/djangoapps/notification_prefs/tests.py
+2
-2
lms/djangoapps/notification_prefs/views.py
+1
-1
lms/djangoapps/open_ended_grading/staff_grading_service.py
+1
-1
lms/djangoapps/staticbook/views.py
+1
-1
No files found.
cms/djangoapps/contentstore/views/preview.py
View file @
500499b6
...
...
@@ -151,7 +151,7 @@ def _preview_module_system(request, descriptor):
replace_urls
=
partial
(
static_replace
.
replace_static_urls
,
data_directory
=
None
,
course_id
=
course_id
),
user
=
request
.
user
,
can_execute_unsafe_code
=
(
lambda
:
can_execute_unsafe_code
(
course_id
)),
get_python_lib_zip
=
(
lambda
:
get_python_lib_zip
(
contentstore
,
course_id
)),
get_python_lib_zip
=
(
lambda
:
get_python_lib_zip
(
contentstore
,
course_id
)),
mixins
=
settings
.
XBLOCK_MIXINS
,
course_id
=
course_id
,
anonymous_student_id
=
'student'
,
...
...
common/djangoapps/microsite_configuration/templatetags/microsite.py
View file @
500499b6
...
...
@@ -43,7 +43,7 @@ def platform_name():
@register.simple_tag
(
name
=
"favicon_path"
)
def
favicon_path
(
default
=
getattr
(
settings
,
'FAVICON_PATH'
,
'images/favicon.ico'
)):
def
favicon_path
(
default
=
getattr
(
settings
,
'FAVICON_PATH'
,
'images/favicon.ico'
)):
"""
Django template tag that outputs the configured favicon:
{
%
favicon_path
%
}
...
...
common/djangoapps/terrain/stubs/http.py
View file @
500499b6
...
...
@@ -123,8 +123,8 @@ class StubHttpRequestHandler(BaseHTTPRequestHandler, object):
# By default, `parse_qs` returns a list of values for each param
# For convenience, we replace lists of 1 element with just the element
return
{
k
:
v
[
0
]
if
len
(
v
)
==
1
else
v
for
k
,
v
in
urlparse
.
parse_qs
(
query
)
.
items
()
k
ey
:
value
[
0
]
if
len
(
value
)
==
1
else
value
for
k
ey
,
value
in
urlparse
.
parse_qs
(
query
)
.
items
()
}
@lazy
...
...
common/djangoapps/terrain/stubs/tests/test_lti_stub.py
View file @
500499b6
...
...
@@ -35,7 +35,7 @@ class StubLtiServiceTest(unittest.TestCase):
'launch_presentation_return_url'
:
''
,
'lis_outcome_service_url'
:
'http://localhost:8001/test_callback'
,
'lis_result_sourcedid'
:
''
,
'resource_link_id'
:
''
,
'resource_link_id'
:
''
,
}
def
test_invalid_request_url
(
self
):
...
...
common/djangoapps/terrain/stubs/xqueue.py
View file @
500499b6
...
...
@@ -214,6 +214,7 @@ class StubXQueueService(StubHttpService):
except for 'default' and 'register_submission_url' which have special meaning
"""
return
{
key
:
val
for
key
,
val
in
self
.
config
.
iteritems
()
key
:
value
for
key
,
value
in
self
.
config
.
iteritems
()
if
key
not
in
self
.
NON_QUEUE_CONFIG_KEYS
}
.
items
()
common/lib/sandbox-packages/verifiers/draganddrop.py
View file @
500499b6
...
...
@@ -21,7 +21,7 @@ or:
{ "molecule": "[100, 200]" },
]
}
values are (x,y) coordinates of centers of dragged images.
values are (x,
y) coordinates of centers of dragged images.
"""
import
json
...
...
@@ -77,7 +77,7 @@ class PositionsCompare(list):
list or string::
"abc" - target
[10, 20] - list of integers
[[10,20], 200] list of list and integer
[[10,
20], 200] list of list and integer
"""
def
__eq__
(
self
,
other
):
...
...
@@ -223,10 +223,10 @@ class DragAndDrop(object):
Examples:
- many draggables per position:
user ['1',
'2','2',
'2'] is 'anyof' equal to ['1', '2', '3']
user ['1',
'2', '2',
'2'] is 'anyof' equal to ['1', '2', '3']
- draggables can be placed in any order:
user ['1',
'2','3',
'4'] is 'anyof' equal to ['4', '2', '1', 3']
user ['1',
'2', '3',
'4'] is 'anyof' equal to ['4', '2', '1', 3']
'unordered_equal' is same as 'exact' but disregards on order
...
...
@@ -235,7 +235,7 @@ class DragAndDrop(object):
Equality functon depends on type of element. They declared in
PositionsCompare class. For position like targets
ids ("t1", "t2", etc..) it is string equality function. For coordinate
positions ([1,
2] or [[1,
2], 15]) it is coordinate_positions_compare
positions ([1,
2] or [[1,
2], 15]) it is coordinate_positions_compare
function (see docstrings in PositionsCompare class)
Args:
...
...
@@ -352,7 +352,7 @@ class DragAndDrop(object):
# correct_answer entries. If the draggable is mentioned in at least one
# correct_answer entry, the value is False.
# default to consider every user answer excess until proven otherwise.
self
.
excess_draggables
=
dict
((
users_draggable
.
keys
()[
0
],
True
)
self
.
excess_draggables
=
dict
((
users_draggable
.
keys
()[
0
],
True
)
for
users_draggable
in
user_answer
)
# Convert nested `user_answer` to flat format.
...
...
@@ -414,8 +414,8 @@ def grade(user_input, correct_answer):
'rule': 'anyof'
},
{
'draggables': ['l1_c','l8_c'],
'targets': ['t5_c','t6_c'],
'draggables': ['l1_c',
'l8_c'],
'targets': ['t5_c',
't6_c'],
'rule': 'anyof'
}
]
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/peer_grading_service.py
View file @
500499b6
...
...
@@ -103,7 +103,7 @@ class PeerGradingService(GradingService):
self
.
_record_result
(
'get_problem_list'
,
result
)
dog_stats_api
.
histogram
(
self
.
_metric_name
(
'get_problem_list.result.length'
),
len
(
result
.
get
(
'problem_list'
,
[]))
len
(
result
.
get
(
'problem_list'
,
[])),
)
return
result
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/self_assessment_module.py
View file @
500499b6
...
...
@@ -198,7 +198,7 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild):
'success'
:
success
,
'rubric_html'
:
self
.
get_rubric_html
(
system
),
'error'
:
error_message
,
'student_response'
:
data
[
'student_answer'
]
.
replace
(
"
\n
"
,
"<br/>"
)
'student_response'
:
data
[
'student_answer'
]
.
replace
(
"
\n
"
,
"<br/>"
),
}
def
save_assessment
(
self
,
data
,
_system
):
...
...
lms/djangoapps/courseware/features/high-level-tabs.py
View file @
500499b6
...
...
@@ -7,5 +7,5 @@ def i_click_on_the_tab_and_check(step):
tab_text
=
tab_title
[
'TabName'
]
title
=
tab_title
[
'PageTitle'
]
world
.
click_link
(
tab_text
)
world
.
wait_for
(
lambda
_driver
:
title
in
world
.
browser
.
title
)
world
.
wait_for
(
lambda
_driver
:
title
in
world
.
browser
.
title
)
assert
(
title
in
world
.
browser
.
title
)
lms/djangoapps/notification_prefs/tests.py
View file @
500499b6
...
...
@@ -67,7 +67,7 @@ class NotificationPrefViewTest(UrlResetMixin, TestCase):
request
.
user
=
self
.
user
response
=
ajax_status
(
request
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
json
.
loads
(
response
.
content
),
{
"status"
:
0
})
self
.
assertEqual
(
json
.
loads
(
response
.
content
),
{
"status"
:
0
})
def
test_ajax_status_get_1
(
self
):
self
.
create_prefs
()
...
...
@@ -75,7 +75,7 @@ class NotificationPrefViewTest(UrlResetMixin, TestCase):
request
.
user
=
self
.
user
response
=
ajax_status
(
request
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
json
.
loads
(
response
.
content
),
{
"status"
:
1
})
self
.
assertEqual
(
json
.
loads
(
response
.
content
),
{
"status"
:
1
})
def
test_ajax_status_post
(
self
):
request
=
self
.
request_factory
.
post
(
"dummy"
)
...
...
lms/djangoapps/notification_prefs/views.py
View file @
500499b6
...
...
@@ -149,7 +149,7 @@ def ajax_status(request):
key
=
NOTIFICATION_PREF_KEY
)
return
HttpResponse
(
json
.
dumps
({
"status"
:
len
(
qs
)}),
content_type
=
"application/json"
)
return
HttpResponse
(
json
.
dumps
({
"status"
:
len
(
qs
)}),
content_type
=
"application/json"
)
@require_GET
...
...
lms/djangoapps/open_ended_grading/staff_grading_service.py
View file @
500499b6
...
...
@@ -321,7 +321,7 @@ def get_problem_list(request, course_id):
u'If not, please do so and return to this page.'
)
valid_problem_list
=
[]
for
i
in
xrange
(
0
,
len
(
problem_list
)):
for
i
in
xrange
(
0
,
len
(
problem_list
)):
# Needed to ensure that the 'location' key can be accessed.
try
:
problem_list
[
i
]
=
json
.
loads
(
problem_list
[
i
])
...
...
lms/djangoapps/staticbook/views.py
View file @
500499b6
...
...
@@ -110,7 +110,7 @@ def pdf_index(request, course_id, book_index, chapter=None, page=None):
if
page
is
not
None
:
viewer_params
+=
'&page={}'
.
format
(
page
)
if
request
.
GET
.
get
(
'viewer'
,
''
)
==
'true'
:
if
request
.
GET
.
get
(
'viewer'
,
''
)
==
'true'
:
template
=
'pdf_viewer.html'
else
:
template
=
'static_pdfbook.html'
...
...
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