make imageinput work with dogfood, fix typo in responsetypes.imageresponse
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user