Commit aba9b3b9 by stv

Fix PEP8: E124 closing bracket does not match

visual indentation
parent 5a69fead
......@@ -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>
......
......@@ -14,7 +14,8 @@ 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',
FILTERED_LIST = [
'xml_attributes',
'start',
'end',
'enrollment_start',
......@@ -30,7 +31,7 @@ class CourseMetadata(object):
'user_partitions',
'name', # from xblock
'tags', # from xblock
'visible_to_staff_only'
'visible_to_staff_only',
]
@classmethod
......
......@@ -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
......
......@@ -328,121 +328,174 @@ class CourseFields(object):
scope=Scope.settings
)
has_children = True
checklists = List(scope=Scope.settings,
checklists = List(
scope=Scope.settings,
default=[
{"short_description": _("Getting Started With Studio"),
"items": [{"short_description": _("Add Course Team Members"),
{
"short_description": _("Getting Started With Studio"),
"items": [
{
"short_description": _("Add Course Team Members"),
"long_description": _("Grant your collaborators permission to edit your course so you can work together."),
"is_checked": False,
"action_url": "ManageUsers",
"action_text": _("Edit Course Team"),
"action_external": False},
{"short_description": _("Set Important Dates for Your Course"),
"action_external": False,
},
{
"short_description": _("Set Important Dates for Your Course"),
"long_description": _("Establish your course's student enrollment and launch dates on the Schedule and Details page."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Details &amp; Schedule"),
"action_external": False},
{"short_description": _("Draft Your Course's Grading Policy"),
"action_external": False,
},
{
"short_description": _("Draft Your Course's Grading Policy"),
"long_description": _("Set up your assignment types and grading policy even if you haven't created all your assignments."),
"is_checked": False,
"action_url": "SettingsGrading",
"action_text": _("Edit Grading Settings"),
"action_external": False},
{"short_description": _("Explore the Other Studio Checklists"),
"action_external": False,
},
{
"short_description": _("Explore the Other Studio Checklists"),
"long_description": _("Discover other available course authoring tools, and find help when you need it."),
"is_checked": False,
"action_url": "",
"action_text": "",
"action_external": False}]},
{"short_description": _("Draft a Rough Course Outline"),
"items": [{"short_description": _("Create Your First Section and Subsection"),
"action_external": False,
},
],
},
{
"short_description": _("Draft a Rough Course Outline"),
"items": [
{
"short_description": _("Create Your First Section and Subsection"),
"long_description": _("Use your course outline to build your first Section and Subsection."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Set Section Release Dates"),
"action_external": False,
},
{
"short_description": _("Set Section Release Dates"),
"long_description": _("Specify the release dates for each Section in your course. Sections become visible to students on their release dates."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Designate a Subsection as Graded"),
"action_external": False,
},
{
"short_description": _("Designate a Subsection as Graded"),
"long_description": _("Set a Subsection to be graded as a specific assignment type. Assignments within graded Subsections count toward a student's final grade."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Reordering Course Content"),
"action_external": False,
},
{
"short_description": _("Reordering Course Content"),
"long_description": _("Use drag and drop to reorder the content in your course."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Renaming Sections"),
"action_external": False,
},
{
"short_description": _("Renaming Sections"),
"long_description": _("Rename Sections by clicking the Section name from the Course Outline."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Deleting Course Content"),
"action_external": False,
},
{
"short_description": _("Deleting Course Content"),
"long_description": _("Delete Sections, Subsections, or Units you don't need anymore. Be careful, as there is no Undo function."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False},
{"short_description": _("Add an Instructor-Only Section to Your Outline"),
"action_external": False,
},
{
"short_description": _("Add an Instructor-Only Section to Your Outline"),
"long_description": _("Some course authors find using a section for unsorted, in-progress work useful. To do this, create a section and set the release date to the distant future."),
"is_checked": False,
"action_url": "CourseOutline",
"action_text": _("Edit Course Outline"),
"action_external": False}]},
{"short_description": _("Explore edX's Support Tools"),
"items": [{"short_description": _("Explore the Studio Help Forum"),
"action_external": False,
},
],
},
{
"short_description": _("Explore edX's Support Tools"),
"items": [
{
"short_description": _("Explore the Studio Help Forum"),
"long_description": _("Access the Studio Help forum from the menu that appears when you click your user name in the top right corner of Studio."),
"is_checked": False,
"action_url": "http://help.edge.edx.org/",
"action_text": _("Visit Studio Help"),
"action_external": True},
{"short_description": _("Enroll in edX 101"),
"action_external": True,
},
{
"short_description": _("Enroll in edX 101"),
"long_description": _("Register for edX 101, edX's primer for course creation."),
"is_checked": False,
"action_url": "https://edge.edx.org/courses/edX/edX101/How_to_Create_an_edX_Course/about",
"action_text": _("Register for edX 101"),
"action_external": True},
{"short_description": _("Download the Studio Documentation"),
"action_external": True,
},
{
"short_description": _("Download the Studio Documentation"),
"long_description": _("Download the searchable Studio reference documentation in PDF form."),
"is_checked": False,
"action_url": "http://files.edx.org/Getting_Started_with_Studio.pdf",
"action_text": _("Download Documentation"),
"action_external": True}]},
{"short_description": _("Draft Your Course About Page"),
"items": [{"short_description": _("Draft a Course Description"),
"action_external": True,
},
],
},
{
"short_description": _("Draft Your Course About Page"),
"items": [
{
"short_description": _("Draft a Course Description"),
"long_description": _("Courses on edX have an About page that includes a course video, description, and more. Draft the text students will read before deciding to enroll in your course."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Schedule &amp; Details"),
"action_external": False},
{"short_description": _("Add Staff Bios"),
"action_external": False,
},
{
"short_description": _("Add Staff Bios"),
"long_description": _("Showing prospective students who their instructor will be is helpful. Include staff bios on the course About page."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Schedule &amp; Details"),
"action_external": False},
{"short_description": _("Add Course FAQs"),
"action_external": False,
},
{
"short_description": _("Add Course FAQs"),
"long_description": _("Include a short list of frequently asked questions about your course."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Schedule &amp; Details"),
"action_external": False},
{"short_description": _("Add Course Prerequisites"),
"action_external": False,
},
{
"short_description": _("Add Course Prerequisites"),
"long_description": _("Let students know what knowledge and/or skills they should have before they enroll in your course."),
"is_checked": False,
"action_url": "SettingsDetails",
"action_text": _("Edit Course Schedule &amp; Details"),
"action_external": False}]}
]
"action_external": False,
},
],
},
],
)
info_sidebar_name = String(
display_name=_("Course Info Sidebar Name"),
......
......@@ -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({
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},
}
}
})]
'edit_info.update_version': {
'$exists': True,
},
},
},
})
]
def insert_structure(self, structure):
"""
......
......@@ -54,7 +54,8 @@ 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'),
DONE_TYPES = (
('na', 'NOT_APPLICABLE'),
('f', 'FINISHED'),
('i', 'INCOMPLETE'),
)
......
......@@ -115,7 +115,8 @@ 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,
eamap = ExternalAuthMap(
external_id=email,
external_email=email,
external_domain=mit_domain,
external_name=name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment