attempts=Integer(help="Number of attempts taken by the student on this problem",default=0,scope=Scope.user_state)
"""
Define the possible fields for a Capa problem
"""
attempts=Integer(help="Number of attempts taken by the student on this problem",
default=0,scope=Scope.user_state)
max_attempts=Integer(
display_name="Maximum Attempts",
help="Defines the number of times a student can try to answer this problem. If the value is not set, infinite attempts are allowed.",
help=("Defines the number of times a student can try to answer this problem. "
"If the value is not set, infinite attempts are allowed."),
values={"min":0},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(
display_name="Show Answer",
help="Defines when to show the answer to the problem. A default value can be set in Advanced Settings.",
help=("Defines when to show the answer to the problem. "
"A default value can be set in Advanced Settings."),
scope=Scope.settings,default="closed",
values=[
{"display_name":"Always","value":"always"},
...
...
@@ -86,23 +104,33 @@ class CapaFields(object):
{"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)
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="Defines how often inputs are randomized when a student loads the problem. This setting only applies to problems that can have randomly generated numeric values. A default value can be set in Advanced Settings.",