From d4d38827b4344110e9f0c25076db1ec310e9dcef Mon Sep 17 00:00:00 2001 From: cahrens Date: Wed, 15 May 2013 10:35:40 -0400 Subject: [PATCH] Updates for showanswer. --- common/lib/xmodule/xmodule/capa_module.py | 13 ++++++++----- .../xmodule/templates/problem/circuitschematic.yaml | 2 +- .../xmodule/templates/problem/customgrader.yaml | 2 +- .../xmodule/xmodule/templates/problem/empty.yaml | 2 +- .../xmodule/templates/problem/emptyadvanced.yaml | 2 +- .../xmodule/templates/problem/forumularesponse.yaml | 2 +- .../xmodule/templates/problem/imageresponse.yaml | 2 +- .../xmodule/templates/problem/multiplechoice.yaml | 2 +- .../templates/problem/numericalresponse.yaml | 2 +- .../xmodule/templates/problem/optionresponse.yaml | 2 +- .../xmodule/templates/problem/string_response.yaml | 2 +- 11 files changed, 18 insertions(+), 15 deletions(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 3433e6c88b..5d2fffe895 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -70,11 +70,14 @@ class CapaFields(object): showanswer = String(display_name="Show Answer", 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=[{"display_name": "Always", "value": "always"}, - {"display_name": "Answered", "value": "answered"}, - {"display_name": "Attempted", "value": "attempted"}, - {"display_name": "Closed", "value": "closed"}, - {"display_name": "Never", "value": "never"}]) + values=[ + {"display_name": "Always", "value": "always"}, + {"display_name": "Answered", "value": "answered"}, + {"display_name": "Attempted", "value": "attempted"}, + {"display_name": "Closed", "value": "closed"}, + {"display_name": "Finished", "value": "finished"}, + {"display_name": "Past Due", "value": "past_due"}, + {"display_name": "Never", "value": "never"}]) force_save_button = Boolean(help="Whether to force the save button to appear on the page", scope=Scope.settings, default=False) 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.", default="always", scope=Scope.settings, values=[{"display_name": "Always", "value": "always"}, diff --git a/common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml b/common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml index 841bd5afcd..56f802a6a3 100644 --- a/common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/circuitschematic.yaml @@ -3,7 +3,7 @@ metadata: display_name: Circuit Schematic Builder rerandomize: never - showanswer: always + showanswer: finished data: | Please make a voltage divider that splits the provided voltage evenly. diff --git a/common/lib/xmodule/xmodule/templates/problem/customgrader.yaml b/common/lib/xmodule/xmodule/templates/problem/customgrader.yaml index 6fa1779918..b5b0d71f4d 100644 --- a/common/lib/xmodule/xmodule/templates/problem/customgrader.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/customgrader.yaml @@ -2,7 +2,7 @@ metadata: display_name: Custom Python-Evaluated Input rerandomize: never - showanswer: always + showanswer: finished data: |

diff --git a/common/lib/xmodule/xmodule/templates/problem/empty.yaml b/common/lib/xmodule/xmodule/templates/problem/empty.yaml index d372048ee5..97a2aef423 100644 --- a/common/lib/xmodule/xmodule/templates/problem/empty.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/empty.yaml @@ -2,7 +2,7 @@ metadata: display_name: Blank Common Problem rerandomize: never - showanswer: always + showanswer: finished markdown: "" data: | diff --git a/common/lib/xmodule/xmodule/templates/problem/emptyadvanced.yaml b/common/lib/xmodule/xmodule/templates/problem/emptyadvanced.yaml index 902b08e252..3d696ec2fd 100644 --- a/common/lib/xmodule/xmodule/templates/problem/emptyadvanced.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/emptyadvanced.yaml @@ -2,7 +2,7 @@ metadata: display_name: Blank Advanced Problem rerandomize: never - showanswer: always + showanswer: finished data: | diff --git a/common/lib/xmodule/xmodule/templates/problem/forumularesponse.yaml b/common/lib/xmodule/xmodule/templates/problem/forumularesponse.yaml index 890260d381..0401a01c31 100644 --- a/common/lib/xmodule/xmodule/templates/problem/forumularesponse.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/forumularesponse.yaml @@ -2,7 +2,7 @@ metadata: display_name: Math Expression Input rerandomize: never - showanswer: always + showanswer: finished data: |

diff --git a/common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml b/common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml index 9086dd7426..ab1f22e3b2 100644 --- a/common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml @@ -2,7 +2,7 @@ metadata: display_name: Image Mapped Input rerandomize: never - showanswer: always + showanswer: finished data: |

diff --git a/common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml b/common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml index 3a35a35199..df3eafc4a5 100644 --- a/common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/multiplechoice.yaml @@ -2,7 +2,7 @@ metadata: display_name: Multiple Choice rerandomize: never - showanswer: always + showanswer: finished weight: "" attempts: "" markdown: diff --git a/common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml b/common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml index 4623e53e00..548fd94fab 100644 --- a/common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/numericalresponse.yaml @@ -2,7 +2,7 @@ metadata: display_name: Numerical Input rerandomize: never - showanswer: always + showanswer: finished markdown: "A numerical input problem accepts a line of text input from the student, and evaluates the input for correctness based on its diff --git a/common/lib/xmodule/xmodule/templates/problem/optionresponse.yaml b/common/lib/xmodule/xmodule/templates/problem/optionresponse.yaml index a87885594a..c2edfb1cbc 100644 --- a/common/lib/xmodule/xmodule/templates/problem/optionresponse.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/optionresponse.yaml @@ -2,7 +2,7 @@ metadata: display_name: Dropdown rerandomize: never - showanswer: always + showanswer: finished markdown: "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 diff --git a/common/lib/xmodule/xmodule/templates/problem/string_response.yaml b/common/lib/xmodule/xmodule/templates/problem/string_response.yaml index 9519c192ac..64e3dc062f 100644 --- a/common/lib/xmodule/xmodule/templates/problem/string_response.yaml +++ b/common/lib/xmodule/xmodule/templates/problem/string_response.yaml @@ -2,7 +2,7 @@ metadata: display_name: Text Input rerandomize: never - showanswer: always + showanswer: finished # Note, the extra newlines are needed to make the yaml parser add blank lines instead of folding markdown: "A text input problem accepts a line of text from the