eduardoperezl

XML de drag and drop 2

Aug 31st, 2016
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.46 KB | None | 0 0
  1. <problem>
  2.     <customresponse>
  3.         <p>Label the hydrogen atoms connected with the left carbon atom.</p>
  4.         <drag_and_drop_input img="https://studio.edx.org/c4x/edX/DemoX/asset/ethglycol.jpg"
  5.        target_outline="true" one_per_target="true" no_labels="true"
  6.        label_bg_color="rgb(222, 139, 238)">
  7.             <draggable id="1" label="Hydrogen" />
  8.             <draggable id="2" label="Hydrogen" />
  9.             <target id="t1_o" x="10" y="67" w="100" h="100"/>
  10.             <target id="t2" x="133" y="3" w="70" h="70"/>
  11.             <target id="t3" x="2" y="384" w="70" h="70"/>
  12.             <target id="t4" x="95" y="386" w="70" h="70"/>
  13.             <target id="t5_c" x="94" y="293" w="91" h="91"/>
  14.             <target id="t6_c" x="328" y="294" w="91" h="91"/>
  15.             <target id="t7" x="393" y="463" w="70" h="70"/>
  16.             <target id="t8" x="344" y="214" w="70" h="70"/>
  17.             <target id="t9_o" x="445" y="162" w="100" h="100"/>
  18.             <target id="t10" x="591" y="132" w="70" h="70"/>
  19.         </drag_and_drop_input>
  20.         <answer type="loncapa/python">
  21.             correct_answer = [{
  22.                 'draggables': ['1', '2'],
  23.                 'targets': ['t2', 't3', 't4' ],
  24.                 'rule':'anyof'
  25.             }]
  26.             if draganddrop.grade(submission[0], correct_answer):
  27.                 correct = ['correct']
  28.             else:
  29.                 correct = ['incorrect']
  30.         </answer>
  31.     </customresponse>
  32. </problem>
Add Comment
Please, Sign In to add comment