Commit 2856971b by Chris Dodge

update templates to include attemps and weight values. Also update…

update templates to include attemps and weight values. Also update capa_module.py to accept empty strings ('') to mean 'default value'
parent 2ed5fdf7
......@@ -116,9 +116,11 @@ class CapaModule(XModule):
self.grace_period = None
self.close_date = self.display_due_date
self.max_attempts = self.metadata.get('attempts', None)
if self.max_attempts is not None:
self.max_attempts = int(self.max_attempts)
max_attempts = self.metadata.get('attempts', None)
if max_attempts:
self.max_attempts = int(max_attempts)
else:
self.max_attempts = None
self.show_answer = self.metadata.get('showanswer', 'closed')
......
......@@ -3,6 +3,8 @@ metadata:
display_name: Circuit Schematic
rerandomize: never
showanswer: always
weight: ""
attempts: ""
data: |
<problem >
Please make a voltage divider that splits the provided voltage evenly.
......
......@@ -3,6 +3,8 @@ metadata:
display_name: Custom Grader
rerandomize: never
showanswer: always
weight: ""
attempts: ""
data: |
<problem>
<p>
......
......@@ -4,6 +4,8 @@ metadata:
rerandomize: never
showanswer: always
markdown: ""
weight: ""
attempts: ""
data: |
<problem>
</problem>
......
......@@ -3,6 +3,8 @@ metadata:
display_name: Formula Response
rerandomize: never
showanswer: always
weight: ""
attempts: ""
data: |
<problem>
<p>
......
......@@ -3,6 +3,8 @@ metadata:
display_name: Image Response
rerandomize: never
showanswer: always
weight: ""
attempts: ""
data: |
<problem>
<p>
......
......@@ -3,6 +3,8 @@ metadata:
display_name: Multiple Choice
rerandomize: never
showanswer: always
weight: ""
attempts: ""
markdown:
"A multiple choice problem presents radio buttons for student input. Students can only select a single
option presented. Multiple Choice questions have been the subject of many areas of research due to the early
......
......@@ -3,6 +3,8 @@ metadata:
display_name: Numerical Response
rerandomize: never
showanswer: always
weight: ""
attempts: ""
markdown:
"A numerical response problem accepts a line of text input from the
student, and evaluates the input for correctness based on its
......
......@@ -3,6 +3,8 @@ metadata:
display_name: Option Response
rerandomize: never
showanswer: always
weight: ""
attempts: ""
markdown:
"OptionResponse gives a limited set of options for students to respond with, and presents those options
in a format that encourages them to search for a specific answer rather than being immediately presented
......
......@@ -3,6 +3,8 @@ metadata:
display_name: String Response
rerandomize: never
showanswer: always
weight: ""
attempts: ""
# Note, the extra newlines are needed to make the yaml parser add blank lines instead of folding
markdown:
"A string response problem accepts a line of text input from the
......
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