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
ee017985
Commit
ee017985
authored
Jul 18, 2013
by
Lyla Fischer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #404 from edx/lyla/templates
Adding a template for drag-and-drop.
parents
ddb7c6e5
3f8246f0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
6 deletions
+47
-6
common/lib/xmodule/xmodule/templates/problem/drag_and_drop.yaml
+41
-0
common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml
+6
-6
No files found.
common/lib/xmodule/xmodule/templates/problem/drag_and_drop.yaml
0 → 100644
View file @
ee017985
---
metadata
:
display_name
:
Drag and Drop
markdown
:
!!null
data
:
|
<problem>
Here's an example of a "Drag and Drop" question set. Click and drag each word in the scrollbar below, up to the numbered bucket which matches the number of letters in the word.
<customresponse>
<drag_and_drop_input img="https://studio.edx.org/c4x/edX/DemoX/asset/L9_buckets.png">
<draggable id="1" label="a"/>
<draggable id="2" label="cat"/>
<draggable id="3" label="there"/>
<draggable id="4" label="pear"/>
<draggable id="5" label="kitty"/>
<draggable id="6" label="in"/>
<draggable id="7" label="them"/>
<draggable id="8" label="za"/>
<draggable id="9" label="dog"/>
<draggable id="10" label="slate"/>
<draggable id="11" label="few"/>
</drag_and_drop_input>
<answer type="loncapa/python">
correct_answer = {
'1': [[70, 150], 121],
'6': [[190, 150], 121],
'8': [[190, 150], 121],
'2': [[310, 150], 121],
'9': [[310, 150], 121],
'11': [[310, 150], 121],
'4': [[420, 150], 121],
'7': [[420, 150], 121],
'3': [[550, 150], 121],
'5': [[550, 150], 121],
'10': [[550, 150], 121]}
if draganddrop.grade(submission[0], correct_answer):
correct = ['correct']
else:
correct = ['incorrect']
</answer>
</customresponse>
</problem>
common/lib/xmodule/xmodule/templates/problem/imageresponse.yaml
View file @
ee017985
...
...
@@ -5,18 +5,18 @@ metadata:
data
:
|
<problem>
<p>
An image mapped input problem presents an image for the student. Input is
given by the location of mouse clicks on the image. Correctness of input can be evaluated based on expected dimensions of a rectangle.
An image mapped input problem presents an image for the student.
Input is given by the location of mouse clicks on the image.
Correctness of input can be evaluated based on expected dimensions of a rectangle.
</p>
<p>Which object in this image is required by the fire code?</p>
<p>Which animal shown below is a kitten?</p>
<imageresponse>
<imageinput src="/static/images/firecode.jpg" width="640" height="480" rectangle="(365,42)-(423,66)"
/>
<imageinput src="https://studio.edx.org/c4x/edX/DemoX/asset/Dog-and-Cat.jpg" width="640" height="400" rectangle="(385,98)-(600,337)"
/>
</imageresponse>
<solution>
<div class="detailed-solution">
<p>Explanation</p>
<p>The fire code requires that all exits be clearly marked, so the red exit sign is the correct answer
.</p>
<p>The animal on the right is a kitten. The animal on the left is a puppy, not a kitten
.</p>
</div>
</solution>
</problem>
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