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
6763c5dd
Commit
6763c5dd
authored
Nov 08, 2014
by
stv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PEP8: E126 continuation line over-indented
for hanging indent
parent
2ce5a6ce
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
44 deletions
+58
-44
cms/djangoapps/contentstore/features/component.py
+5
-11
cms/djangoapps/contentstore/views/assets.py
+2
-2
cms/djangoapps/contentstore/views/course.py
+12
-6
common/djangoapps/student/middleware.py
+7
-9
common/lib/capa/capa/registry.py
+11
-6
common/lib/sandbox-packages/verifiers/draganddrop.py
+2
-1
lms/djangoapps/open_ended_grading/staff_grading_service.py
+19
-9
No files found.
cms/djangoapps/contentstore/features/component.py
View file @
6763c5dd
...
...
@@ -52,19 +52,13 @@ def see_a_multi_step_component(step, category):
world
.
wait_for
(
lambda
_
:
len
(
world
.
css_find
(
selector
))
==
len
(
step
.
hashes
))
for
idx
,
step_hash
in
enumerate
(
step
.
hashes
):
if
category
==
'HTML'
:
html_matcher
=
{
'Text'
:
'
\n
\n
'
,
'Announcement'
:
'<p> Words of encouragement! This is a short note that most students will read. </p>'
,
'Zooming Image'
:
'<h2>ZOOMING DIAGRAMS</h2>'
,
'E-text Written in LaTeX'
:
'<h2>Example: E-text page</h2>'
,
'Raw HTML'
:
'<p>This template is similar to the Text template. The only difference is'
,
'Text'
:
'
\n
\n
'
,
'Announcement'
:
'<p> Words of encouragement! This is a short note that most students will read. </p>'
,
'Zooming Image'
:
'<h2>ZOOMING DIAGRAMS</h2>'
,
'E-text Written in LaTeX'
:
'<h2>Example: E-text page</h2>'
,
'Raw HTML'
:
'<p>This template is similar to the Text template. The only difference is'
,
}
actual_html
=
world
.
css_html
(
selector
,
index
=
idx
)
assert_in
(
html_matcher
[
step_hash
[
'Component'
]],
actual_html
)
...
...
cms/djangoapps/contentstore/views/assets.py
View file @
6763c5dd
...
...
@@ -190,8 +190,8 @@ def _upload_asset(request, course_key):
# first let's see if a thumbnail can be created
(
thumbnail_content
,
thumbnail_location
)
=
contentstore
()
.
generate_thumbnail
(
content
,
tempfile_path
=
tempfile_path
content
,
tempfile_path
=
tempfile_path
,
)
# delete cached thumbnail even if one couldn't be created this time (else
...
...
cms/djangoapps/contentstore/views/course.py
View file @
6763c5dd
...
...
@@ -387,10 +387,13 @@ def course_listing(request):
'run'
:
uca
.
course_key
.
run
,
'is_failed'
:
True
if
uca
.
state
==
CourseRerunUIStateManager
.
State
.
FAILED
else
False
,
'is_in_progress'
:
True
if
uca
.
state
==
CourseRerunUIStateManager
.
State
.
IN_PROGRESS
else
False
,
'dismiss_link'
:
reverse_course_url
(
'course_notifications_handler'
,
uca
.
course_key
,
kwargs
=
{
'dismiss_link'
:
reverse_course_url
(
'course_notifications_handler'
,
uca
.
course_key
,
kwargs
=
{
'action_state_id'
:
uca
.
id
,
})
if
uca
.
state
==
CourseRerunUIStateManager
.
State
.
FAILED
else
''
},
)
if
uca
.
state
==
CourseRerunUIStateManager
.
State
.
FAILED
else
''
}
# remove any courses in courses that are also in the in_process_course_actions list
...
...
@@ -456,10 +459,13 @@ def course_index(request, course_key):
'rerun_notification_id'
:
current_action
.
id
if
current_action
else
None
,
'course_release_date'
:
course_release_date
,
'settings_url'
:
settings_url
,
'notification_dismiss_url'
:
reverse_course_url
(
'course_notifications_handler'
,
current_action
.
course_key
,
kwargs
=
{
'notification_dismiss_url'
:
reverse_course_url
(
'course_notifications_handler'
,
current_action
.
course_key
,
kwargs
=
{
'action_state_id'
:
current_action
.
id
,
})
if
current_action
else
None
,
},
)
if
current_action
else
None
,
})
...
...
common/djangoapps/student/middleware.py
View file @
6763c5dd
...
...
@@ -24,15 +24,13 @@ class UserStandingMiddleware(object):
else
:
if
user_account
.
account_status
==
UserStanding
.
ACCOUNT_DISABLED
:
msg
=
_
(
'Your account has been disabled. If you believe '
'this was done in error, please contact us at '
'{link_start}{support_email}{link_end
}'
'Your account has been disabled. If you believe '
'this was done in error, please contact us at '
'{support_email
}'
)
.
format
(
support_email
=
settings
.
DEFAULT_FEEDBACK_EMAIL
,
link_start
=
u'<a href="mailto:{address}?subject={subject_line}">'
.
format
(
address
=
settings
.
DEFAULT_FEEDBACK_EMAIL
,
subject_line
=
_
(
'Disabled Account'
),
),
link_end
=
u'</a>'
support_email
=
u'<a href="mailto:{address}?subject={subject_line}">{address}</a>'
.
format
(
address
=
settings
.
DEFAULT_FEEDBACK_EMAIL
,
subject_line
=
_
(
'Disabled Account'
),
),
)
return
HttpResponseForbidden
(
msg
)
common/lib/capa/capa/registry.py
View file @
6763c5dd
...
...
@@ -24,15 +24,20 @@ class TagRegistry(object):
if
len
(
cls
.
tags
)
==
0
:
raise
ValueError
(
"No tags specified for class {0}"
.
format
(
cls
.
__name__
))
for
t
in
cls
.
tags
:
if
t
in
self
.
_mapping
:
other_cls
=
self
.
_mapping
[
t
]
for
t
ag
in
cls
.
tags
:
if
t
ag
in
self
.
_mapping
:
other_cls
=
self
.
_mapping
[
t
ag
]
if
cls
==
other_cls
:
# registering the same class multiple times seems silly, but ok
continue
raise
ValueError
(
"Tag {0} already registered by class {1}."
" Can't register for class {2}"
.
format
(
t
,
other_cls
.
__name__
,
cls
.
__name__
))
raise
ValueError
(
"Tag {0} already registered by class {1}."
" Can't register for class {2}"
.
format
(
tag
,
other_cls
.
__name__
,
cls
.
__name__
,
)
)
# Ok, should be good to change state now.
for
t
in
cls
.
tags
:
...
...
common/lib/sandbox-packages/verifiers/draganddrop.py
View file @
6763c5dd
...
...
@@ -368,7 +368,8 @@ class DragAndDrop(object):
if
draggable_name
in
answer
[
'draggables'
]:
user_groups_data
.
append
(
draggable_name
)
user_positions_data
.
append
(
draggable_dict
[
draggable_name
])
draggable_dict
[
draggable_name
]
)
# proved that this is not excess
self
.
excess_draggables
[
draggable_name
]
=
False
...
...
lms/djangoapps/open_ended_grading/staff_grading_service.py
View file @
6763c5dd
...
...
@@ -57,15 +57,25 @@ class MockStaffGradingService(object):
def
get_problem_list
(
self
,
course_id
,
grader_id
):
self
.
cnt
+=
1
return
{
'success'
:
True
,
'problem_list'
:
[
json
.
dumps
({
'location'
:
'i4x://MITx/3.091x/problem/open_ended_demo1'
,
'problem_name'
:
"Problem 1"
,
'num_graded'
:
3
,
'num_pending'
:
5
,
'min_for_ml'
:
10
}),
json
.
dumps
({
'location'
:
'i4x://MITx/3.091x/problem/open_ended_demo2'
,
'problem_name'
:
"Problem 2"
,
'num_graded'
:
1
,
'num_pending'
:
5
,
'min_for_ml'
:
10
})
]}
return
{
'success'
:
True
,
'problem_list'
:
[
json
.
dumps
({
'location'
:
'i4x://MITx/3.091x/problem/open_ended_demo1'
,
'problem_name'
:
"Problem 1"
,
'num_graded'
:
3
,
'num_pending'
:
5
,
'min_for_ml'
:
10
,
}),
json
.
dumps
({
'location'
:
'i4x://MITx/3.091x/problem/open_ended_demo2'
,
'problem_name'
:
"Problem 2"
,
'num_graded'
:
1
,
'num_pending'
:
5
,
'min_for_ml'
:
10
,
}),
],
}
def
save_grade
(
self
,
course_id
,
grader_id
,
submission_id
,
score
,
feedback
,
skipped
,
rubric_scores
,
submission_flagged
):
...
...
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