done Module#

Show a toggle which lets students mark things as done.

class done.done.DoneXBlock(runtime, field_data=None, scope_ids=<object object>, *args, **kwargs)#

Bases: XBlock

Show a toggle which lets students mark things as done.

align#

A field class for representing a string.

The value, as loaded or enforced, can either be None or a basestring instance.

children: ReferenceList#
display_name#

A field class for representing a string.

The value, as loaded or enforced, can either be None or a basestring instance.

done#

A field class for representing a boolean.

The value, as loaded or enforced, can be either a Python bool, a string, or any value that will then be converted to a bool in the from_json method.

Examples:

True -> True
'true' -> True
'TRUE' -> True
'any other string' -> False
[] -> False
['123'] -> True
None - > False
due#

A field for representing a datetime.

The value, as loaded or enforced, can either be an ISO-formatted date string, a native datetime, a timedelta (for a time relative to course start), or None.

has_children: bool = False#
has_dynamic_children()#

Do we dynamically determine our children? No, we don’t have any.

has_score = True#
max_score()#

The maximum raw score of our problem.

start#

A field for representing a datetime.

The value, as loaded or enforced, can either be an ISO-formatted date string, a native datetime, a timedelta (for a time relative to course start), or None.

student_view(context=None)#

The primary view of the DoneXBlock, shown to students when viewing courses.

studio_view(_context=None)#

Minimal view with no configuration options giving some help text.

toggle_button(data, suffix='')#

Ajax call when the button is clicked. Input is a JSON dictionary with one boolean field: done. This will save this in the XBlock field, and then issue an appropriate grade.

weight#

A field that contains a float.

The value, as loaded or enforced, can be None, ‘’ (which will be treated as None), a Python float, or a value that will parse as an float, ie., something for which float(value) does not throw an error.

static workbench_scenarios()#

A canned scenario for display in the workbench.

done.done.resource_string(path)#

Handy helper for getting resources from our kit.