'new_subsection_template':Location('i4x','edx','templates','sequential','Empty'),# for now they are the same, but the could be different at some point...
@@ -6,12 +6,37 @@ from pkg_resources import resource_string
...
@@ -6,12 +6,37 @@ from pkg_resources import resource_string
fromxmodule.x_moduleimportXModule
fromxmodule.x_moduleimportXModule
fromxmodule.raw_moduleimportRawDescriptor
fromxmodule.raw_moduleimportRawDescriptor
fromxblock.coreimportScope,String
fromxblock.coreimportScope,String
importtextwrap
log=logging.getLogger(__name__)
log=logging.getLogger(__name__)
classAnnotatableFields(object):
classAnnotatableFields(object):
data=String(help="XML data for the annotation",scope=Scope.content)
data=String(help="XML data for the annotation",scope=Scope.content,
default=textwrap.dedent(
"""\
<annotatable>
<instructions>
<p>Enter your (optional) instructions for the exercise in HTML format.</p>
<p>Annotations are specified by an <code><annotation></code> tag which may may have the following attributes:</p>
<ul class="instructions-template">
<li><code>title</code> (optional). Title of the annotation. Defaults to <i>Commentary</i> if omitted.</li>
<li><code>body</code> (<b>required</b>). Text of the annotation.</li>
<li><code>problem</code> (optional). Numeric index of the problem associated with this annotation. This is a zero-based index, so the first problem on the page would have <code>problem="0"</code>.</li>
<li><code>highlight</code> (optional). Possible values: yellow, red, orange, green, blue, or purple. Defaults to yellow if this attribute is omitted.</li>
</ul>
</instructions>
<p>Add your HTML with annotation spans here.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <annotation title="My title" body="My comment" highlight="yellow" problem="0">Ut sodales laoreet est, egestas gravida felis egestas nec.</annotation> Aenean at volutpat erat. Cras commodo viverra nibh in aliquam.</p>
<p>Nulla facilisi. <annotation body="Basic annotation example." problem="1">Pellentesque id vestibulum libero.</annotation> Suspendisse potenti. Morbi scelerisque nisi vitae felis dictum mattis. Nam sit amet magna elit. Nullam volutpat cursus est, sit amet sagittis odio vulputate et. Curabitur euismod, orci in vulputate imperdiet, augue lorem tempor purus, id aliquet augue turpis a est. Aenean a sagittis libero. Praesent fringilla pretium magna, non condimentum risus elementum nec. Pellentesque faucibus elementum pharetra. Pellentesque vitae metus eros.</p>
advanced_modules=List(help="Beta modules used in your course",scope=Scope.settings)
advanced_modules=List(help="Beta modules used in your course",scope=Scope.settings)
has_children=True
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",
"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",
"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 & Schedule",
"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",
"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",
"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",
"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",
"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",
"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",
"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",
"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",
"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",
"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",
"long_description":"Register for edX 101, edX's primer for course creation.",
{"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 & Details",
"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 & Details",
"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 & Details",
"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 & Details",
<p>Enter your (optional) instructions for the exercise in HTML format.</p>
<p>Annotations are specified by an <code><annotation></code> tag which may may have the following attributes:</p>
<ul class="instructions-template">
<li><code>title</code> (optional). Title of the annotation. Defaults to <i>Commentary</i> if omitted.</li>
<li><code>body</code> (<b>required</b>). Text of the annotation.</li>
<li><code>problem</code> (optional). Numeric index of the problem associated with this annotation. This is a zero-based index, so the first problem on the page would have <code>problem="0"</code>.</li>
<li><code>highlight</code> (optional). Possible values: yellow, red, orange, green, blue, or purple. Defaults to yellow if this attribute is omitted.</li>
</ul>
</instructions>
<p>Add your HTML with annotation spans here.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. <annotation title="My title" body="My comment" highlight="yellow" problem="0">Ut sodales laoreet est, egestas gravida felis egestas nec.</annotation> Aenean at volutpat erat. Cras commodo viverra nibh in aliquam.</p>
<p>Nulla facilisi. <annotation body="Basic annotation example." problem="1">Pellentesque id vestibulum libero.</annotation> Suspendisse potenti. Morbi scelerisque nisi vitae felis dictum mattis. Nam sit amet magna elit. Nullam volutpat cursus est, sit amet sagittis odio vulputate et. Curabitur euismod, orci in vulputate imperdiet, augue lorem tempor purus, id aliquet augue turpis a est. Aenean a sagittis libero. Praesent fringilla pretium magna, non condimentum risus elementum nec. Pellentesque faucibus elementum pharetra. Pellentesque vitae metus eros.</p>
<p>This is a paragraph. It will take care of line breaks for you.</p><p>HTML only parses the location
of tags for inserting line breaks into your doc, not
line
breaks
you
add
yourself.
</p>
<h2>Links</h2>
<p>You can refer to other parts of the internet with a <a href="http://www.wikipedia.org/"> link</a>, to other parts of your course by prepending your link with <a href="/course/Week_0">/course/</a></p>
<p>Now a list:</p>
<ul>
<li>An item</li>
<li>Another item</li>
<li>And yet another</li>
</ul>
<p>This list has an ordering </p>
<ol>
<li>An item</li>
<li>Another item</li>
<li>Yet another item</li>
</ol>
<p> Note, we have a lot of standard edX styles, so please try to avoid any custom styling, and make sure that you make a note of any custom styling that you do yourself so that we can incorporate it into
"""Fields for `VideoModule` and `VideoDescriptor`."""
"""Fields for `VideoModule` and `VideoDescriptor`."""
display_name=String(
display_name="Display Name",
help="This name appears in the horizontal navigation at the top of the page.",
scope=Scope.settings,
# it'd be nice to have a useful default but it screws up other things; so,
# use display_name_with_default for those
default="Video Title"
)
data=String(help="XML data for the problem",
default='',
scope=Scope.content)
position=Integer(help="Current position in the video",scope=Scope.user_state,default=0)
position=Integer(help="Current position in the video",scope=Scope.user_state,default=0)
show_captions=Boolean(help="This controls whether or not captions are shown by default.",display_name="Show Captions",scope=Scope.settings,default=True)
show_captions=Boolean(help="This controls whether or not captions are shown by default.",display_name="Show Captions",scope=Scope.settings,default=True)
youtube_id_1_0=String(help="This is the Youtube ID reference for the normal speed video.",display_name="Default Speed",scope=Scope.settings,default="OEoXaMPEzfM")
youtube_id_1_0=String(help="This is the Youtube ID reference for the normal speed video.",display_name="Default Speed",scope=Scope.settings,default="OEoXaMPEzfM")
...
@@ -86,7 +97,6 @@ class VideoDescriptor(VideoFields,
...
@@ -86,7 +97,6 @@ class VideoDescriptor(VideoFields,