Commit f1d4096b by Calen Pennington

Mark snippets as raw strings to avoid having to escape backslashes

parent 10de617d
...@@ -870,7 +870,7 @@ class CustomResponse(LoncapaResponse): ...@@ -870,7 +870,7 @@ class CustomResponse(LoncapaResponse):
Custom response. The python code to be run should be in <answer>...</answer> Custom response. The python code to be run should be in <answer>...</answer>
or in a <script>...</script> or in a <script>...</script>
''' '''
snippets = [{'snippet': """<customresponse> snippets = [{'snippet': r"""<customresponse>
<text> <text>
<br/> <br/>
Suppose that \(I(t)\) rises from \(0\) to \(I_S\) at a time \(t_0 \neq 0\) Suppose that \(I(t)\) rises from \(0\) to \(I_S\) at a time \(t_0 \neq 0\)
...@@ -1195,7 +1195,7 @@ class SymbolicResponse(CustomResponse): ...@@ -1195,7 +1195,7 @@ class SymbolicResponse(CustomResponse):
""" """
Symbolic math response checking, using symmath library. Symbolic math response checking, using symmath library.
""" """
snippets = [{'snippet': '''<problem> snippets = [{'snippet': r'''<problem>
<text>Compute \[ \exp\left(-i \frac{\theta}{2} \left[ \begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix} \right] \right) \] <text>Compute \[ \exp\left(-i \frac{\theta}{2} \left[ \begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix} \right] \right) \]
and give the resulting \(2\times 2\) matrix: <br/> and give the resulting \(2\times 2\) matrix: <br/>
<symbolicresponse answer=""> <symbolicresponse answer="">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment