-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathXML_Example.xml
More file actions
executable file
·33 lines (28 loc) · 878 Bytes
/
XML_Example.xml
File metadata and controls
executable file
·33 lines (28 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<problem>
<script type="loncapa/python">
<![CDATA[
from python_lib import simpleFunctions
def test_add(expect, ans):
try:
a1=int(ans[0])
return simpleFunctions.returnTrue()
except ValueError:
return False
def hint_fn(answer_ids, student_answers, new_cmap, old_cmap):
aid = answer_ids[0]
hint = str(simpleFunctions.returnTrue())
new_cmap.set_hint_and_mode(aid,hint,'always')
]]>
</script>
<customresponse cfn="test_add" expect="3">
<label>Type in anything.</label>
<textline size="40" correct_answer="3" label="Enter something" /><br/>
<hintgroup hintfn="hint_fn"/>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>Seriously, anything. This is Celebrity-Jeopardy-level easy here.</p>
</div>
</solution>
</customresponse>
</problem>