diff --git a/djangoapps/courseware/capa/responsetypes.py b/djangoapps/courseware/capa/responsetypes.py index 380ab85c56..3159b70d5c 100644 --- a/djangoapps/courseware/capa/responsetypes.py +++ b/djangoapps/courseware/capa/responsetypes.py @@ -66,10 +66,8 @@ class GenericResponse(object): #----------------------------------------------------------------------------- class MultipleChoiceResponse(GenericResponse): - ''' - Example: - - + # TODO: handle direction and randomize + snippets = [{'snippet': ''' `a+b`
a+b^2
@@ -77,10 +75,7 @@ class MultipleChoiceResponse(GenericResponse): a+b+d
- - TODO: handle direction and randomize - - ''' + '''}] def __init__(self, xml, context, system=None): self.xml = xml self.correct_choices = xml.xpath('//*[@id=$id]//choice[@correct="true"]', @@ -218,8 +213,9 @@ class NumericalResponse(GenericResponse): class CustomResponse(GenericResponse): ''' Custom response. The python code to be run should be in .... Example: + ''' - + snippets = [{'snippet': '''
Suppose that \(I(t)\) rises from \(0\) to \(I_S\) at a time \(t_0 \neq 0\) @@ -237,9 +233,10 @@ class CustomResponse(GenericResponse): if not(r=="IS*u(t-t0)"): correct[0] ='incorrect' -
+
'''}] - Alternatively, the check function can be defined in Example: + + '''Footnote: the check function can also be defined in Example: