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
aba9b3b9
Commit
aba9b3b9
authored
Nov 08, 2014
by
stv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PEP8: E124 closing bracket does not match
visual indentation
parent
5a69fead
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
41 deletions
+52
-41
cms/djangoapps/contentstore/features/course-export.py
+2
-1
cms/djangoapps/models/settings/course_metadata.py
+18
-17
common/lib/capa/capa/responsetypes.py
+4
-2
common/lib/xmodule/xmodule/course_module.py
+0
-0
common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py
+15
-10
lms/djangoapps/courseware/models.py
+5
-4
lms/djangoapps/lms_migration/management/commands/create_user.py
+8
-7
No files found.
cms/djangoapps/contentstore/features/course-export.py
View file @
aba9b3b9
...
...
@@ -24,7 +24,8 @@ def i_export_the_course(step):
@step
(
'I edit and enter bad XML$'
)
def
i_enter_bad_xml
(
step
):
enter_xml_in_advanced_problem
(
step
,
enter_xml_in_advanced_problem
(
step
,
"""<problem><h1>Smallest Canvas</h1>
<p>You want to make the smallest canvas you can.</p>
<multiplechoiceresponse>
...
...
cms/djangoapps/models/settings/course_metadata.py
View file @
aba9b3b9
...
...
@@ -14,23 +14,24 @@ class CourseMetadata(object):
# The list of fields that wouldn't be shown in Advanced Settings.
# Should not be used directly. Instead the filtered_list method should be used if the field needs to be filtered
# depending on the feature flag.
FILTERED_LIST
=
[
'xml_attributes'
,
'start'
,
'end'
,
'enrollment_start'
,
'enrollment_end'
,
'tabs'
,
'graceperiod'
,
'checklists'
,
'show_timezone'
,
'format'
,
'graded'
,
'hide_from_toc'
,
'pdf_textbooks'
,
'user_partitions'
,
'name'
,
# from xblock
'tags'
,
# from xblock
'visible_to_staff_only'
FILTERED_LIST
=
[
'xml_attributes'
,
'start'
,
'end'
,
'enrollment_start'
,
'enrollment_end'
,
'tabs'
,
'graceperiod'
,
'checklists'
,
'show_timezone'
,
'format'
,
'graded'
,
'hide_from_toc'
,
'pdf_textbooks'
,
'user_partitions'
,
'name'
,
# from xblock
'tags'
,
# from xblock
'visible_to_staff_only'
,
]
@classmethod
...
...
common/lib/capa/capa/responsetypes.py
View file @
aba9b3b9
...
...
@@ -2120,8 +2120,10 @@ class CodeResponse(LoncapaResponse):
parsed
=
False
if
not
parsed
:
log
.
error
(
"Unable to parse external grader message as valid"
" XML: score_msg['msg']=
%
s"
,
msg
log
.
error
(
"Unable to parse external grader message as valid"
" XML: score_msg['msg']=
%
s"
,
msg
,
)
return
fail
...
...
common/lib/xmodule/xmodule/course_module.py
View file @
aba9b3b9
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py
View file @
aba9b3b9
...
...
@@ -152,16 +152,21 @@ class MongoConnection(object):
original_version (str or ObjectID): The id of a structure
block_key (BlockKey): The id of the block in question
"""
return
[
structure_from_mongo
(
structure
)
for
structure
in
self
.
structures
.
find
({
'original_version'
:
original_version
,
'blocks'
:
{
'$elemMatch'
:
{
'block_id'
:
block_key
.
id
,
'block_type'
:
block_key
.
type
,
'edit_info.update_version'
:
{
'$exists'
:
True
},
}
}
})]
return
[
structure_from_mongo
(
structure
)
for
structure
in
self
.
structures
.
find
({
'original_version'
:
original_version
,
'blocks'
:
{
'$elemMatch'
:
{
'block_id'
:
block_key
.
id
,
'block_type'
:
block_key
.
type
,
'edit_info.update_version'
:
{
'$exists'
:
True
,
},
},
},
})
]
def
insert_structure
(
self
,
structure
):
"""
...
...
lms/djangoapps/courseware/models.py
View file @
aba9b3b9
...
...
@@ -54,10 +54,11 @@ class StudentModule(models.Model):
## Grade, and are we done?
grade
=
models
.
FloatField
(
null
=
True
,
blank
=
True
,
db_index
=
True
)
max_grade
=
models
.
FloatField
(
null
=
True
,
blank
=
True
)
DONE_TYPES
=
((
'na'
,
'NOT_APPLICABLE'
),
(
'f'
,
'FINISHED'
),
(
'i'
,
'INCOMPLETE'
),
)
DONE_TYPES
=
(
(
'na'
,
'NOT_APPLICABLE'
),
(
'f'
,
'FINISHED'
),
(
'i'
,
'INCOMPLETE'
),
)
done
=
models
.
CharField
(
max_length
=
8
,
choices
=
DONE_TYPES
,
default
=
'na'
,
db_index
=
True
)
created
=
models
.
DateTimeField
(
auto_now_add
=
True
,
db_index
=
True
)
...
...
lms/djangoapps/lms_migration/management/commands/create_user.py
View file @
aba9b3b9
...
...
@@ -115,13 +115,14 @@ class Command(BaseCommand):
if
make_eamap
:
credentials
=
"/C=US/ST=Massachusetts/O=Massachusetts Institute of Technology/OU=Client CA v1/CN=
%
s/emailAddress=
%
s"
%
(
name
,
email
)
eamap
=
ExternalAuthMap
(
external_id
=
email
,
external_email
=
email
,
external_domain
=
mit_domain
,
external_name
=
name
,
internal_password
=
password
,
external_credentials
=
json
.
dumps
(
credentials
),
)
eamap
=
ExternalAuthMap
(
external_id
=
email
,
external_email
=
email
,
external_domain
=
mit_domain
,
external_name
=
name
,
internal_password
=
password
,
external_credentials
=
json
.
dumps
(
credentials
),
)
eamap
.
user
=
user
eamap
.
dtsignup
=
datetime
.
datetime
.
now
(
UTC
)
eamap
.
save
()
...
...
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