make imageinput work with dogfood, fix typo in responsetypes.imageresponse

This commit is contained in:
ichuang
2012-05-29 17:06:15 -04:00
parent e5a7d811d7
commit 87cda4c282
2 changed files with 4 additions and 1 deletions

View File

@@ -635,7 +635,7 @@ class ImageResponse(GenericResponse):
# parse given answer
m = re.match('\[([0-9]+),([0-9]+)]',given.strip().replace(' ',''))
if not m:
raise Exception,'[capamodule.capa.responsetypes.imageinput] error grading %s (input=%s)' % (err,aid,given)
raise Exception,'[capamodule.capa.responsetypes.imageinput] error grading %s (input=%s)' % (aid,given)
(gx,gy) = [int(x) for x in m.groups()]
# answer is correct if (x,y) is within the specified rectangle

View File

@@ -102,6 +102,9 @@
<script type="text/javascript" src="${static.url('js/schematic.js')}"></script>
<script type="text/javascript" src="${static.url('js/cktsim.js')}"></script>
## image input: for clicking on images (see imageinput.html)
<script type="text/javascript" src="/static/js/imageinput.js"></script>
<%block name="js_extra"/>
</body>