Set default weights
This commit is contained in:
@@ -51,47 +51,85 @@ class CombinedOpenEndedFields(object):
|
||||
display_name = String(
|
||||
display_name="Display Name",
|
||||
help="This name appears in the horizontal navigation at the top of the page.",
|
||||
default="Open Ended Grading", scope=Scope.settings
|
||||
default="Open Ended Grading",
|
||||
scope=Scope.settings
|
||||
)
|
||||
current_task_number = Integer(
|
||||
help="Current task that the student is on.",
|
||||
default=0,
|
||||
scope=Scope.user_state
|
||||
)
|
||||
task_states = List(
|
||||
help="List of state dictionaries of each task within this module.",
|
||||
scope=Scope.user_state
|
||||
)
|
||||
state = String(
|
||||
help="Which step within the current task that the student is on.",
|
||||
default="initial",
|
||||
scope=Scope.user_state
|
||||
)
|
||||
student_attempts = Integer(
|
||||
help="Number of attempts taken by the student on this problem",
|
||||
default=0,
|
||||
scope=Scope.user_state
|
||||
)
|
||||
current_task_number = Integer(help="Current task that the student is on.", default=0, scope=Scope.user_state)
|
||||
task_states = List(help="List of state dictionaries of each task within this module.", scope=Scope.user_state)
|
||||
state = String(help="Which step within the current task that the student is on.", default="initial",
|
||||
scope=Scope.user_state)
|
||||
student_attempts = Integer(help="Number of attempts taken by the student on this problem", default=0,
|
||||
scope=Scope.user_state)
|
||||
ready_to_reset = Boolean(
|
||||
help="If the problem is ready to be reset or not.", default=False,
|
||||
help="If the problem is ready to be reset or not.",
|
||||
default=False,
|
||||
scope=Scope.user_state
|
||||
)
|
||||
attempts = Integer(
|
||||
display_name="Maximum Attempts",
|
||||
help="The number of times the student can try to answer this problem.", default=1,
|
||||
help="The number of times the student can try to answer this problem.",
|
||||
default=1,
|
||||
scope=Scope.settings, values={"min" : 1 }
|
||||
)
|
||||
is_graded = Boolean(display_name="Graded", help="Whether or not the problem is graded.", default=False, scope=Scope.settings)
|
||||
is_graded = Boolean(
|
||||
display_name="Graded",
|
||||
help="Whether or not the problem is graded.",
|
||||
default=False,
|
||||
scope=Scope.settings
|
||||
)
|
||||
accept_file_upload = Boolean(
|
||||
display_name="Allow File Uploads",
|
||||
help="Whether or not the student can submit files as a response.", default=False, scope=Scope.settings
|
||||
help="Whether or not the student can submit files as a response.",
|
||||
default=False,
|
||||
scope=Scope.settings
|
||||
)
|
||||
skip_spelling_checks = Boolean(
|
||||
display_name="Disable Quality Filter",
|
||||
help="If False, the Quality Filter is enabled and submissions with poor spelling, short length, or poor grammar will not be peer reviewed.",
|
||||
default=False, scope=Scope.settings
|
||||
)
|
||||
due = Date(help="Date that this problem is due by", default=None, scope=Scope.settings)
|
||||
due = Date(
|
||||
help="Date that this problem is due by",
|
||||
default=None,
|
||||
scope=Scope.settings
|
||||
)
|
||||
graceperiod = String(
|
||||
help="Amount of time after the due date that submissions will be accepted",
|
||||
default=None,
|
||||
scope=Scope.settings
|
||||
)
|
||||
version = VersionInteger(help="Current version number", default=DEFAULT_VERSION, scope=Scope.settings)
|
||||
data = String(help="XML data for the problem", scope=Scope.content)
|
||||
version = VersionInteger(
|
||||
help="Current version number",
|
||||
default=DEFAULT_VERSION,
|
||||
scope=Scope.settings
|
||||
)
|
||||
data = String(
|
||||
help="XML data for the problem",
|
||||
scope=Scope.content
|
||||
)
|
||||
weight = Float(
|
||||
display_name="Problem Weight",
|
||||
help="Defines the number of points each problem is worth. If the value is not set, each problem is worth one point.",
|
||||
scope=Scope.settings, values={"min" : 0 , "step": ".1"}
|
||||
scope=Scope.settings, values={"min" : 0 , "step": ".1"},
|
||||
default=1
|
||||
)
|
||||
markdown = String(
|
||||
help="Markdown source of this module",
|
||||
scope=Scope.settings
|
||||
)
|
||||
markdown = String(help="Markdown source of this module", scope=Scope.settings)
|
||||
|
||||
|
||||
class CombinedOpenEndedModule(CombinedOpenEndedFields, XModule):
|
||||
|
||||
@@ -32,23 +32,35 @@ class PeerGradingFields(object):
|
||||
display_name="Show Single Problem",
|
||||
help='When True, only the single problem specified by "Link to Problem Location" is shown. '
|
||||
'When False, a panel is displayed with all problems available for peer grading.',
|
||||
default=USE_FOR_SINGLE_LOCATION, scope=Scope.settings
|
||||
default=USE_FOR_SINGLE_LOCATION,
|
||||
scope=Scope.settings
|
||||
)
|
||||
link_to_location = String(
|
||||
display_name="Link to Problem Location",
|
||||
help='The location of the problem being graded. Only used when "Show Single Problem" is True.',
|
||||
default=LINK_TO_LOCATION, scope=Scope.settings
|
||||
default=LINK_TO_LOCATION,
|
||||
scope=Scope.settings
|
||||
)
|
||||
is_graded = Boolean(
|
||||
display_name="Graded",
|
||||
help='Defines whether the student gets credit for grading this problem. Only used when "Show Single Problem" is True.',
|
||||
default=IS_GRADED, scope=Scope.settings
|
||||
default=IS_GRADED,
|
||||
scope=Scope.settings
|
||||
)
|
||||
due_date = Date(
|
||||
help="Due date that should be displayed.",
|
||||
default=None,
|
||||
scope=Scope.settings)
|
||||
grace_period_string = String(
|
||||
help="Amount of grace to give on the due date.",
|
||||
default=None,
|
||||
scope=Scope.settings
|
||||
)
|
||||
due_date = Date(help="Due date that should be displayed.", default=None, scope=Scope.settings)
|
||||
grace_period_string = String(help="Amount of grace to give on the due date.", default=None, scope=Scope.settings)
|
||||
max_grade = Integer(
|
||||
help="The maximum grade that a student can receive for this problem.", default=MAX_SCORE,
|
||||
scope=Scope.settings, values={"min": 0}
|
||||
help="The maximum grade that a student can receive for this problem.",
|
||||
default=MAX_SCORE,
|
||||
scope=Scope.settings,
|
||||
values={"min": 0}
|
||||
)
|
||||
student_data_for_location = Dict(
|
||||
help="Student data for a given peer grading problem.",
|
||||
@@ -57,7 +69,8 @@ class PeerGradingFields(object):
|
||||
weight = Float(
|
||||
display_name="Problem Weight",
|
||||
help="Defines the number of points each problem is worth. If the value is not set, each problem is worth one point.",
|
||||
scope=Scope.settings, values={"min": 0, "step": ".1"}
|
||||
scope=Scope.settings, values={"min": 0, "step": ".1"},
|
||||
default=1
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user