Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
e65805b5
Commit
e65805b5
authored
May 29, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make imageinput work with dogfood, fix typo in responsetypes.imageresponse
parent
e2e79c96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
djangoapps/courseware/capa/responsetypes.py
+1
-1
templates/dogfood.html
+3
-0
No files found.
djangoapps/courseware/capa/responsetypes.py
View file @
e65805b5
...
@@ -635,7 +635,7 @@ class ImageResponse(GenericResponse):
...
@@ -635,7 +635,7 @@ class ImageResponse(GenericResponse):
# parse given answer
# parse given answer
m
=
re
.
match
(
'
\
[([0-9]+),([0-9]+)]'
,
given
.
strip
()
.
replace
(
' '
,
''
))
m
=
re
.
match
(
'
\
[([0-9]+),([0-9]+)]'
,
given
.
strip
()
.
replace
(
' '
,
''
))
if
not
m
:
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
()]
(
gx
,
gy
)
=
[
int
(
x
)
for
x
in
m
.
groups
()]
# answer is correct if (x,y) is within the specified rectangle
# answer is correct if (x,y) is within the specified rectangle
...
...
templates/dogfood.html
View file @
e65805b5
...
@@ -102,6 +102,9 @@
...
@@ -102,6 +102,9 @@
<script
type=
"text/javascript"
src=
"${static.url('js/schematic.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/schematic.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/cktsim.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"
/>
<
%
block
name=
"js_extra"
/>
</body>
</body>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment