Advertisement
Guest User

XML de drag and drop 1

a guest
Aug 31st, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.54 KB | None | 0 0
  1. <problem>
  2.     <customresponse>
  3.         <p>Drag each word in the scrollbar to the bucket that matches the number of
  4.         letters in the word.</p>
  5.         <drag_and_drop_input img="https://studio.edx.org/c4x/edX/DemoX/asset/L9_buckets.png">
  6.             <draggable id="1" label="a"/>
  7.             <draggable id="2" label="bog"/>
  8.             <draggable id="3" label="droll"/>
  9.             <draggable id="4" label="oboe"/>
  10.             <draggable id="5" label="swain"/>
  11.             <draggable id="6" label="in"/>
  12.             <draggable id="7" label="onyx"/>
  13.             <draggable id="8" label="of"/>
  14.             <draggable id="9" label="tap"/>
  15.             <draggable id="10" label="strop"/>
  16.             <draggable id="11" label="few"/>
  17.         </drag_and_drop_input>
  18.         <answer type="loncapa/python">
  19.             correct_answer = {
  20.                 '1':      [[70, 150], 121],
  21.                 '6':      [[190, 150], 121],
  22.                 '8':      [[190, 150], 121],
  23.                 '2':      [[310, 150], 121],
  24.                 '9':      [[310, 150], 121],
  25.                 '11':     [[310, 150], 121],
  26.                 '4':      [[420, 150], 121],
  27.                 '7':      [[420, 150], 121],
  28.                 '3':      [[550, 150], 121],
  29.                 '5':      [[550, 150], 121],
  30.                 '10':     [[550, 150], 121]}
  31.             if draganddrop.grade(submission[0], correct_answer):
  32.                 correct = ['correct']
  33.             else:
  34.                 correct = ['incorrect']
  35.         </answer>
  36.     </customresponse>
  37. </problem>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement