Commit e29c940e by cahrens

Add display_names, update help, remove unnecessary things from templates.

parent 5edbf3d8
...@@ -62,23 +62,28 @@ class ComplexEncoder(json.JSONEncoder): ...@@ -62,23 +62,28 @@ class ComplexEncoder(json.JSONEncoder):
class CapaFields(object): class CapaFields(object):
attempts = StringyInteger(help="Number of attempts taken by the student on this problem", default=0, scope=Scope.user_state) attempts = StringyInteger(help="Number of attempts taken by the student on this problem", default=0, scope=Scope.user_state)
max_attempts = StringyInteger(help="Maximum number of attempts that a student is allowed", scope=Scope.settings) max_attempts = StringyInteger(display_name="Maximum Attempts",
help="When set, this specifies the number of times the student can try to answer this problem.", scope=Scope.settings)
due = Date(help="Date that this problem is due by", scope=Scope.settings) due = Date(help="Date that this problem is due by", scope=Scope.settings)
graceperiod = Timedelta(help="Amount of time after the due date that submissions will be accepted", scope=Scope.settings) graceperiod = Timedelta(help="Amount of time after the due date that submissions will be accepted", scope=Scope.settings)
showanswer = String(help="When to show the problem answer to the student", scope=Scope.settings, default="closed", showanswer = String(display_name="Show Answer",
values=["answered", "always", "attempted", "closed", "never"]) help="Specifies when to show the answer to this problem. A default value can be set course-wide in Advanced Settings.",
scope=Scope.settings, default="closed", values=["answered", "always", "attempted", "closed", "never"])
force_save_button = Boolean(help="Whether to force the save button to appear on the page", scope=Scope.settings, default=False) force_save_button = Boolean(help="Whether to force the save button to appear on the page", scope=Scope.settings, default=False)
rerandomize = Randomization(help="When to rerandomize the problem", default="always", scope=Scope.settings, rerandomize = Randomization(display_name="Randomization", help="Specifies whether variable inputs for this problem are randomized each time a student loads the problem. This only applies to problems that have randomly generated numeric variables. A default value can be set course-wide in Advanced Settings.",
values=["always", "onreset", "never", "per_student"]) default="always", scope=Scope.settings, values=["always", "onreset", "never", "per_student"])
data = String(help="XML data for the problem", scope=Scope.content) data = String(help="XML data for the problem", scope=Scope.content)
correct_map = Object(help="Dictionary with the correctness of current student answers", scope=Scope.user_state, default={}) correct_map = Object(help="Dictionary with the correctness of current student answers", scope=Scope.user_state, default={})
input_state = Object(help="Dictionary for maintaining the state of inputtypes", scope=Scope.user_state) input_state = Object(help="Dictionary for maintaining the state of inputtypes", scope=Scope.user_state)
student_answers = Object(help="Dictionary with the current student responses", scope=Scope.user_state) student_answers = Object(help="Dictionary with the current student responses", scope=Scope.user_state)
done = Boolean(help="Whether the student has answered the problem", scope=Scope.user_state) done = Boolean(help="Whether the student has answered the problem", scope=Scope.user_state)
seed = StringyInteger(help="Random seed for this student", scope=Scope.user_state) seed = StringyInteger(help="Random seed for this student", scope=Scope.user_state)
weight = StringyFloat(help="How much to weight this problem by", scope=Scope.settings) weight = StringyFloat(display_name="Problem Weight",
help="Specifies the number of points the problem is worth. By default, each response field in the problem is worth one point.",
scope=Scope.settings)
markdown = String(help="Markdown source of this module", scope=Scope.settings) markdown = String(help="Markdown source of this module", scope=Scope.settings)
source_code = String(help="Source code for LaTeX and Word problems. This feature is not well-supported.", scope=Scope.settings) source_code = String(help="Source code for LaTeX and Word problems. This feature is not well-supported.",
scope=Scope.settings)
class CapaModule(CapaFields, XModule): class CapaModule(CapaFields, XModule):
......
...@@ -8,8 +8,12 @@ from xblock.core import String, Scope ...@@ -8,8 +8,12 @@ from xblock.core import String, Scope
class DiscussionFields(object): class DiscussionFields(object):
discussion_id = String(scope=Scope.settings) discussion_id = String(scope=Scope.settings)
discussion_category = String(scope=Scope.settings) discussion_category = String(display_name="Category",
discussion_target = String(scope=Scope.settings) help="Specifies a category name for this discussion. This name appears in the left pane of the discussion forum for your course.",
scope=Scope.settings)
discussion_target = String(display_name="Subcategory",
help="Specifies a subcategory name for this discussion. This name appears in the left pane of the discussion forum for your course.",
scope=Scope.settings)
sort_key = String(scope=Scope.settings) sort_key = String(scope=Scope.settings)
......
--- ---
metadata: metadata:
display_name: Blank HTML Page display_name: Blank HTML Page
empty: True
data: | data: |
......
...@@ -4,8 +4,6 @@ metadata: ...@@ -4,8 +4,6 @@ metadata:
display_name: Circuit Schematic Builder display_name: Circuit Schematic Builder
rerandomize: never rerandomize: never
showanswer: always showanswer: always
weight: ""
attempts: ""
data: | data: |
<problem > <problem >
Please make a voltage divider that splits the provided voltage evenly. Please make a voltage divider that splits the provided voltage evenly.
......
...@@ -3,8 +3,6 @@ metadata: ...@@ -3,8 +3,6 @@ metadata:
display_name: Custom Python-Evaluated Input display_name: Custom Python-Evaluated Input
rerandomize: never rerandomize: never
showanswer: always showanswer: always
weight: ""
attempts: ""
data: | data: |
<problem> <problem>
<p> <p>
......
...@@ -4,9 +4,6 @@ metadata: ...@@ -4,9 +4,6 @@ metadata:
rerandomize: never rerandomize: never
showanswer: always showanswer: always
markdown: "" markdown: ""
weight: ""
empty: True
attempts: ""
data: | data: |
<problem> <problem>
</problem> </problem>
......
...@@ -3,9 +3,6 @@ metadata: ...@@ -3,9 +3,6 @@ metadata:
display_name: Blank Advanced Problem display_name: Blank Advanced Problem
rerandomize: never rerandomize: never
showanswer: always showanswer: always
weight: ""
attempts: ""
empty: True
data: | data: |
<problem> <problem>
</problem> </problem>
......
...@@ -3,8 +3,6 @@ metadata: ...@@ -3,8 +3,6 @@ metadata:
display_name: Math Expression Input display_name: Math Expression Input
rerandomize: never rerandomize: never
showanswer: always showanswer: always
weight: ""
attempts: ""
data: | data: |
<problem> <problem>
<p> <p>
......
...@@ -3,8 +3,6 @@ metadata: ...@@ -3,8 +3,6 @@ metadata:
display_name: Image Mapped Input display_name: Image Mapped Input
rerandomize: never rerandomize: never
showanswer: always showanswer: always
weight: ""
attempts: ""
data: | data: |
<problem> <problem>
<p> <p>
......
...@@ -3,8 +3,6 @@ metadata: ...@@ -3,8 +3,6 @@ metadata:
display_name: Numerical Input display_name: Numerical Input
rerandomize: never rerandomize: never
showanswer: always showanswer: always
weight: ""
attempts: ""
markdown: markdown:
"A numerical input problem accepts a line of text input from the "A numerical input problem accepts a line of text input from the
student, and evaluates the input for correctness based on its student, and evaluates the input for correctness based on its
......
...@@ -3,8 +3,6 @@ metadata: ...@@ -3,8 +3,6 @@ metadata:
display_name: Dropdown display_name: Dropdown
rerandomize: never rerandomize: never
showanswer: always showanswer: always
weight: ""
attempts: ""
markdown: markdown:
"Dropdown problems give a limited set of options for students to respond with, and present those options "Dropdown problems give a limited set of options for students to respond with, and present those options
in a format that encourages them to search for a specific answer rather than being immediately presented in a format that encourages them to search for a specific answer rather than being immediately presented
......
...@@ -3,8 +3,6 @@ metadata: ...@@ -3,8 +3,6 @@ metadata:
display_name: Text Input display_name: Text Input
rerandomize: never rerandomize: never
showanswer: always showanswer: always
weight: ""
attempts: ""
# Note, the extra newlines are needed to make the yaml parser add blank lines instead of folding # Note, the extra newlines are needed to make the yaml parser add blank lines instead of folding
markdown: markdown:
"A text input problem accepts a line of text from the "A text input problem accepts a line of text from the
......
...@@ -80,7 +80,8 @@ class HTMLSnippet(object): ...@@ -80,7 +80,8 @@ class HTMLSnippet(object):
class XModuleFields(object): class XModuleFields(object):
display_name = String( display_name = String(
help="Display name for this module", display_name="Display Name",
help="Specifies the name for this component. The name appears as a tooltip in the course ribbon at the top of the page.",
scope=Scope.settings, scope=Scope.settings,
default=None default=None
) )
......
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