drag-n-drop-demo.xml 20.4 KB
Newer Older
1 2
<problem display_name="Drag and drop demos: drag and drop icons or labels
    to proper positions." >
3

4 5
<customresponse>
    <text>
6 7 8
        <h4>[Anyof rule example]</h4><br/>
        <h4>Please label hydrogen  atoms connected with left carbon atom.</h4>
        <br/>
9 10
    </text>

11 12
    <drag_and_drop_input img="/static/images/images_list/ethglycol.jpg" target_outline="true"
        one_per_target="true" no_labels="true" label_bg_color="rgb(222, 139, 238)">
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
        <draggable id="1" label="Hydrogen" />
        <draggable id="2" label="Hydrogen" />

        <target id="t1_o" x="10" y="67" w="100" h="100"/>
        <target id="t2" x="133" y="3" w="70" h="70"/>
        <target id="t3" x="2" y="384" w="70" h="70"/>
        <target id="t4" x="95" y="386" w="70" h="70"/>
        <target id="t5_c" x="94" y="293" w="91" h="91"/>
        <target id="t6_c" x="328" y="294" w="91" h="91"/>
        <target id="t7" x="393" y="463" w="70" h="70"/>
        <target id="t8" x="344" y="214" w="70" h="70"/>
        <target id="t9_o" x="445" y="162" w="100" h="100"/>
        <target id="t10" x="591" y="132" w="70" h="70"/>

    </drag_and_drop_input>

    <answer type="loncapa/python"><![CDATA[
correct_answer = [
{'draggables': ['1', '2'],
'targets': ['t2', 't3', 't4' ],
'rule':'anyof'
}]
if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']
]]></answer>
</customresponse>

<customresponse>
    <text>
44 45 46
        <h4>[Complex grading example]</h4><br/>
        <h4>Describe carbon molecule in LCAO-MO.</h4>
        <br/>
47 48
    </text>

49
    <drag_and_drop_input img="/static/images/images_list/lcao-mo/lcao-mo.jpg" target_outline="true" >
50 51

        <!-- filled bond -->
52 53 54 55 56 57
        <draggable id="1" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="2" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="3" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="4" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="5" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="6" icon="/static/images/images_list/lcao-mo/u_d.png" />
58 59

        <!-- up bond -->
60 61 62 63
        <draggable id="7"  icon="/static/images/images_list/lcao-mo/up.png"/>
        <draggable id="8"  icon="/static/images/images_list/lcao-mo/up.png"/>
        <draggable id="9"  icon="/static/images/images_list/lcao-mo/up.png"/>
        <draggable id="10" icon="/static/images/images_list/lcao-mo/up.png"/>
64 65

        <!-- sigma -->
66 67
        <draggable id="11" icon="/static/images/images_list/lcao-mo/sigma.png"/>
        <draggable id="12" icon="/static/images/images_list/lcao-mo/sigma.png"/>
68 69

        <!-- sigma* -->
70 71
        <draggable id="13" icon="/static/images/images_list/lcao-mo/sigma_s.png"/>
        <draggable id="14" icon="/static/images/images_list/lcao-mo/sigma_s.png"/>
72 73

        <!-- pi -->
74
        <draggable id="15" icon="/static/images/images_list/lcao-mo/pi.png" />
75 76

        <!-- pi* -->
77
        <draggable id="16" icon="/static/images/images_list/lcao-mo/pi_s.png" />
78 79

        <!-- images that should not be dragged -->
80 81
        <draggable id="17" icon="/static/images/images_list/lcao-mo/d.png" />
        <draggable id="18" icon="/static/images/images_list/lcao-mo/d.png" />
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117

        <!-- positions of electrons and electron pairs -->
        <target id="s_left"       x="130" y="360"    w="32" h="32"/>
        <target id="s_right"      x="505" y="360"    w="32" h="32"/>
        <target id="s_sigma"      x="320" y="425"    w="32" h="32"/>
        <target id="s_sigma_star" x="320" y="290"    w="32" h="32"/>
        <target id="p_left_1"     x="80"  y="100"    w="32" h="32"/>
        <target id="p_left_2"     x="125" y="100"    w="32" h="32"/>
        <target id="p_left_3"     x="175" y="100"    w="32" h="32"/>
        <target id="p_right_1"    x="465" y="100"    w="32" h="32"/>
        <target id="p_right_2"    x="515" y="100"    w="32" h="32"/>
        <target id="p_right_3"    x="560" y="100"    w="32" h="32"/>
        <target id="p_pi_1"       x="290" y="220"    w="32" h="32"/>
        <target id="p_pi_2"       x="335" y="220"    w="32" h="32"/>
        <target id="p_sigma"      x="315" y="170"    w="32" h="32"/>
        <target id="p_pi_star_1"  x="290" y="40"     w="32" h="32"/>
        <target id="p_pi_star_2"  x="340" y="40"     w="32" h="32"/>
        <target id="p_sigma_star" x="315" y="0"      w="32" h="32"/>

        <!-- positions of names of energy levels -->
        <target id="s_sigma_name"      x="400" y="425"  w="32" h="32"/>
        <target id="s_sigma_star_name" x="400" y="290"  w="32" h="32"/>
        <target id="p_pi_name"         x="400" y="220"  w="32" h="32"/>
        <target id="p_sigma_name"      x="400" y="170"  w="32" h="32"/>
        <target id="p_pi_star_name"    x="400" y="40"   w="32" h="32"/>
        <target id="p_sigma_star_name" x="400" y="0"    w="32" h="32"/>

  </drag_and_drop_input>

    <answer type="loncapa/python"><![CDATA[
correct_answer = [
{
  'draggables': ['1', '2', '3', '4', '5', '6'],
  'targets': [
    's_left', 's_right', 's_sigma', 's_sigma_star', 'p_pi_1', 'p_pi_2'
  ],
118
  'rule': 'unordered_equal'
119 120 121
}, {
  'draggables': ['7','8', '9', '10'],
  'targets': ['p_left_1', 'p_left_2', 'p_right_1','p_right_2'],
122
  'rule': 'unordered_equal'
123 124 125
}, {
  'draggables': ['11', '12'],
  'targets': ['s_sigma_name', 'p_sigma_name'],
126
  'rule': 'unordered_equal'
127 128 129
}, {
  'draggables': ['13', '14'],
  'targets': ['s_sigma_star_name', 'p_sigma_star_name'],
130
  'rule': 'unordered_equal'
131 132 133
}, {
  'draggables': ['15'],
  'targets': ['p_pi_name'],
134
  'rule': 'unordered_equal'
135 136 137
}, {
  'draggables': ['16'],
  'targets': ['p_pi_star_name'],
138
  'rule': 'unordered_equal'
139 140 141 142 143 144 145 146 147 148 149
}]

if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']
]]></answer>
</customresponse>

<customresponse>
    <text>
150 151 152
        <h4>[Another complex grading example]</h4><br/>
        <h4>Describe oxygen molecule in LCAO-MO</h4>
        <br/>
153 154
    </text>

155
    <drag_and_drop_input img="/static/images/images_list/lcao-mo/lcao-mo.jpg" target_outline="true" one_per_target="true">
156
        <!-- filled bond -->
157 158 159 160 161 162 163 164 165
        <draggable id="1" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="2" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="3" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="4" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="5" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="6" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="v_fb_1" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="v_fb_2" icon="/static/images/images_list/lcao-mo/u_d.png" />
        <draggable id="v_fb_3" icon="/static/images/images_list/lcao-mo/u_d.png" />
166 167

        <!-- up bond -->
168 169 170 171 172 173
        <draggable id="7"  icon="/static/images/images_list/lcao-mo/up.png"/>
        <draggable id="8"  icon="/static/images/images_list/lcao-mo/up.png"/>
        <draggable id="9"  icon="/static/images/images_list/lcao-mo/up.png"/>
        <draggable id="10" icon="/static/images/images_list/lcao-mo/up.png"/>
        <draggable id="v_ub_1" icon="/static/images/images_list/lcao-mo/up.png"/>
        <draggable id="v_ub_2" icon="/static/images/images_list/lcao-mo/up.png"/>
174 175

        <!-- sigma -->
176 177
        <draggable id="11" icon="/static/images/images_list/lcao-mo/sigma.png"/>
        <draggable id="12" icon="/static/images/images_list/lcao-mo/sigma.png"/>
178 179

        <!-- sigma* -->
180 181
        <draggable id="13" icon="/static/images/images_list/lcao-mo/sigma_s.png"/>
        <draggable id="14" icon="/static/images/images_list/lcao-mo/sigma_s.png"/>
182 183

        <!-- pi -->
184
        <draggable id="15" icon="/static/images/images_list/lcao-mo/pi.png" />
185 186

        <!-- pi* -->
187
        <draggable id="16" icon="/static/images/images_list/lcao-mo/pi_s.png" />
188 189

        <!-- images that should not be dragged -->
190 191
        <draggable id="17" icon="/static/images/images_list/lcao-mo/d.png" />
        <draggable id="18" icon="/static/images/images_list/lcao-mo/d.png" />
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261

        <!-- positions of electrons and electron pairs -->
        <target id="s_left"       x="130" y="360"    w="32" h="32"/>
        <target id="s_right"      x="505" y="360"    w="32" h="32"/>
        <target id="s_sigma"      x="320" y="425"    w="32" h="32"/>
        <target id="s_sigma_star" x="320" y="290"   w="32" h="32"/>
        <target id="p_left_1"     x="80"  y="100"   w="32" h="32"/>
        <target id="p_left_2"     x="125" y="100"   w="32" h="32"/>
        <target id="p_left_3"     x="175" y="100"   w="32" h="32"/>
        <target id="p_right_1"    x="465" y="100"   w="32" h="32"/>
        <target id="p_right_2"    x="515" y="100"   w="32" h="32"/>
        <target id="p_right_3"    x="560" y="100"   w="32" h="32"/>
        <target id="p_pi_1"       x="290" y="220"  w="32" h="32"/>
        <target id="p_pi_2"       x="335" y="220"  w="32" h="32"/>
        <target id="p_sigma"      x="315" y="170"  w="32" h="32"/>
        <target id="p_pi_star_1"  x="290" y="40"  w="32" h="32"/>
        <target id="p_pi_star_2"  x="340" y="40"  w="32" h="32"/>
        <target id="p_sigma_star" x="315" y="0"  w="32" h="32"/>

        <!-- positions of names of energy levels -->
        <target id="s_sigma_name" x="400" y="425"  w="32" h="32"/>
        <target id="s_sigma_star_name" x="400" y="290"  w="32" h="32"/>
        <target id="p_pi_name" x="400" y="220"  w="32" h="32"/>
        <target id="p_pi_star_name" x="400" y="40"  w="32" h="32"/>
        <target id="p_sigma_name" x="400" y="170"  w="32" h="32"/>
        <target id="p_sigma_star_name" x="400" y="0"  w="32" h="32"/>

    </drag_and_drop_input>

    <answer type="loncapa/python"><![CDATA[
correct_answer = [{
  'draggables': ['1', '2', '3', '4', '5', '6', 'v_fb_1', 'v_fb_2', 'v_fb_3'],
  'targets': [
    's_left', 's_right', 's_sigma', 's_sigma_star', 'p_pi_1', 'p_pi_2',
    'p_sigma', 'p_left_1', 'p_right_3'
  ],
  'rule': 'anyof'
}, {
  'draggables': ['7', '8', '9', '10', 'v_ub_1', 'v_ub_2'],
  'targets': [
    'p_left_2', 'p_left_3', 'p_right_1', 'p_right_2', 'p_pi_star_1',
    'p_pi_star_2'
  ],
  'rule': 'anyof'
}, {
  'draggables': ['11', '12'],
  'targets': ['s_sigma_name', 'p_sigma_name'],
  'rule': 'anyof'
}, {
  'draggables': ['13', '14'],
  'targets': ['s_sigma_star_name', 'p_sigma_star_name'],
  'rule': 'anyof'
}, {
  'draggables': ['15'],
  'targets': ['p_pi_name'],
  'rule': 'anyof'
}, {
  'draggables': ['16'],
  'targets': ['p_pi_star_name'],
  'rule': 'anyof'
}]

if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']

]]></answer>
</customresponse>

262 263
<customresponse>
    <text>
264 265 266
        <h4>[Individual targets with outlines, One draggable per target]</h4><br/>
        <h4>
        Drag -Ant- to first position and -Star- to third position </h4><br/>
267 268
    </text>

269
    <drag_and_drop_input img="/static/images/cow.png" target_outline="true">
270
        <draggable id="1" label="Label 1"/>
271 272
        <draggable id="name_with_icon" label="Ant" icon="/static/images/images_list/ant.jpg"/>
        <draggable id="with_icon" label="Cloud" icon="/static/images/images_list/cloud.jpg" />
273
        <draggable id="5" label="Label2" />
274 275 276
        <draggable id="2" label="Drop" icon="/static/images/images_list/drop.jpg" />
        <draggable id="name_label_icon3" label="Grass" icon="/static/images/images_list/grass.jpg" />
        <draggable id="name4" label="Star" icon="/static/images/images_list/star.png" />
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
        <draggable id="7" label="Label3" />

        <target id="t1" x="20" y="20" w="90" h="90"/>
        <target id="t2" x="300" y="100" w="90" h="90"/>
        <target id="t3" x="150" y="40" w="50" h="50"/>

    </drag_and_drop_input>

    <answer type="loncapa/python"><![CDATA[
correct_answer = {'name_with_icon': 't1', 'name4': 't2'}
if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']
]]></answer>
</customresponse>

<customresponse>
    <text>
296 297 298 299 300 301
        <h4>[SMALL IMAGE,  Individual targets WITHOUT outlines, One draggable
            per target]</h4><br/>
        <h4>
            Move -Star- to the volcano opening, and -Label3- on to
            the right ear of the cow.
        </h4><br/>
302 303
    </text>

304
    <drag_and_drop_input img="/static/images/cow3.png" target_outline="false">
305
        <draggable id="1" label="Label 1"/>
306 307
        <draggable id="name_with_icon" label="Ant" icon="/static/images/images_list/ant.jpg"/>
        <draggable id="with_icon" label="Cloud" icon="/static/images/images_list/cloud.jpg" />
308
        <draggable id="5" label="Label2" />
309 310 311
        <draggable id="2" label="Drop" icon="/static/images/images_list/drop.jpg" />
        <draggable id="name_label_icon3" label="Grass" icon="/static/images/images_list/grass.jpg" />
        <draggable id="name4" label="Star" icon="/static/images/images_list/star.png" />
312 313
        <draggable id="7" label="Label3" />

314 315
        <target id="t1" x="111" y="58" w="90" h="90"/>
        <target id="t2" x="212" y="90" w="90" h="90"/>
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330

    </drag_and_drop_input>

    <answer type="loncapa/python"><![CDATA[
correct_answer = {'name4': 't1',
                '7': 't2'}
if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']
]]></answer>
</customresponse>

<customresponse>
    <text>
331 332 333
        <h4>[Many draggables per target]</h4><br/>
        <h4>Move -Star- and -Ant- to most left target
            and -Label3- and -Label2- to most right target.</h4><br/>
334 335
    </text>

336
    <drag_and_drop_input img="/static/images/cow.png" target_outline="true" one_per_target="false">
337
        <draggable id="1" label="Label 1"/>
338 339
        <draggable id="name_with_icon" label="Ant" icon="/static/images/images_list/ant.jpg"/>
        <draggable id="with_icon" label="Cloud" icon="/static/images/images_list/cloud.jpg" />
340
        <draggable id="5" label="Label2" />
341 342 343
        <draggable id="2" label="Drop" icon="/static/images/images_list/drop.jpg" />
        <draggable id="name_label_icon3" label="Grass" icon="/static/images/images_list/grass.jpg" />
        <draggable id="name4" label="Star" icon="/static/images/images_list/star.png" />
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
        <draggable id="7" label="Label3" />

        <target id="t1" x="20" y="20" w="90" h="90"/>
        <target id="t2" x="300" y="100" w="90" h="90"/>
        <target id="t3" x="150" y="40" w="50" h="50"/>

    </drag_and_drop_input>

    <answer type="loncapa/python"><![CDATA[
correct_answer = {'name4': 't1',
                'name_with_icon': 't1',
                '5': 't2',
                '7':'t2'}
if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']
]]></answer>
</customresponse>

<customresponse>
    <text>
366 367 368 369
        <h4>[Draggables can be placed anywhere on base image]</h4><br/>
        <h4>
            Place -Grass- in the middle of the image and -Ant- in the
            right upper corner.</h4><br/>
370 371
    </text>

372
    <drag_and_drop_input img="/static/images/cow.png" >
373
        <draggable id="1" label="Label 1"/>
374 375
        <draggable id="ant" label="Ant" icon="/static/images/images_list/ant.jpg"/>
        <draggable id="with_icon" label="Cloud" icon="/static/images/images_list/cloud.jpg" />
376
        <draggable id="5" label="Label2" />
377 378 379
        <draggable id="2" label="Drop" icon="/static/images/images_list/drop.jpg" />
        <draggable id="grass" label="Grass" icon="/static/images/images_list/grass.jpg" />
        <draggable id="name4" label="Star" icon="/static/images/images_list/star.png" />
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395
        <draggable id="7" label="Label3" />

    </drag_and_drop_input>

    <answer type="loncapa/python"><![CDATA[
correct_answer = {'grass':     [[300, 200], 200],
                  'ant': [[500, 0], 200]}
if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']
]]></answer>
</customresponse>

<customresponse>
    <text>
396 397
        <h4>[Another anyof example]</h4><br/>
        <h4>Please identify the Carbon and Oxygen atoms in the molecule.</h4><br/>
398 399
    </text>

400
    <drag_and_drop_input img="/static/images/images_list/ethglycol.jpg" target_outline="true" one_per_target="true">
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
        <draggable id="l1_c" label="Carbon" />
        <draggable id="l2" label="Methane"/>
        <draggable id="l3_o" label="Oxygen" />
        <draggable id="l4" label="Calcium" />
        <draggable id="l5" label="Methane"/>
        <draggable id="l6" label="Calcium" />
        <draggable id="l7" label="Hydrogen" />
        <draggable id="l8_c" label="Carbon" />
        <draggable id="l9" label="Hydrogen" />
        <draggable id="l10_o" label="Oxygen" />

        <target id="t1_o" x="10" y="67" w="100" h="100"/>
        <target id="t2" x="133" y="3" w="70" h="70"/>
        <target id="t3" x="2" y="384" w="70" h="70"/>
        <target id="t4" x="95" y="386" w="70" h="70"/>
        <target id="t5_c" x="94" y="293" w="91" h="91"/>
        <target id="t6_c" x="328" y="294" w="91" h="91"/>
        <target id="t7" x="393" y="463" w="70" h="70"/>
        <target id="t8" x="344" y="214" w="70" h="70"/>
        <target id="t9_o" x="445" y="162" w="100" h="100"/>
        <target id="t10" x="591" y="132" w="70" h="70"/>

    </drag_and_drop_input>

    <answer type="loncapa/python"><![CDATA[
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
correct_answer = [
{
    'draggables':  ['l3_o', 'l10_o'],
    'targets':  ['t1_o', 't9_o'],
    'rule': 'anyof'
},
{
    'draggables': ['l1_c','l8_c'],
    'targets': ['t5_c','t6_c'],
    'rule': 'anyof'
}
]
if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']
]]></answer>
</customresponse>

<customresponse>
    <text>
447 448 449
        <h4>[Again another anyof example]</h4><br/>
        <h4>If the element appears in this molecule, drag the label onto it</h4>
        <br/>
450 451
    </text>

452 453
    <drag_and_drop_input img="/static/images/images_list/ethglycol.jpg" target_outline="true"
        one_per_target="true" no_labels="true" label_bg_color="rgb(222, 139, 238)">
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496
        <draggable id="1" label="Hydrogen" />
        <draggable id="2" label="Hydrogen" />
        <draggable id="3" label="Nytrogen" />
        <draggable id="4" label="Nytrogen" />
        <draggable id="5" label="Boron" />
        <draggable id="6" label="Boron" />
        <draggable id="7" label="Carbon" />
        <draggable id="8" label="Carbon" />

        <target id="t1_o" x="10" y="67" w="100" h="100"/>
        <target id="t2_h" x="133" y="3" w="70" h="70"/>
        <target id="t3_h" x="2" y="384" w="70" h="70"/>
        <target id="t4_h" x="95" y="386" w="70" h="70"/>
        <target id="t5_c" x="94" y="293" w="91" h="91"/>
        <target id="t6_c" x="328" y="294" w="91" h="91"/>
        <target id="t7_h" x="393" y="463" w="70" h="70"/>
        <target id="t8_h" x="344" y="214" w="70" h="70"/>
        <target id="t9_o" x="445" y="162" w="100" h="100"/>
        <target id="t10_h" x="591" y="132" w="70" h="70"/>

    </drag_and_drop_input>

    <answer type="loncapa/python"><![CDATA[
correct_answer = [
{
    'draggables':   ['7', '8'],
    'targets':  ['t5_c', 't6_c'],
    'rule': 'anyof'
},
{
    'draggables': ['1', '2'],
    'targets': ['t2_h', 't3_h', 't4_h', 't7_h', 't8_h', 't10_h'],
    'rule': 'anyof'
}]
if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']
]]></answer>
</customresponse>

<customresponse>
    <text>
497 498
        <h4>[Wrong base image url example]
        </h4><br/>
499 500
    </text>

501
    <drag_and_drop_input img="/static/images/cow3_bad.png" target_outline="false">
502
        <draggable id="1" label="Label 1"/>
503 504
        <draggable id="name_with_icon" label="Ant" icon="/static/images/images_list/ant.jpg"/>
        <draggable id="with_icon" label="Cloud" icon="/static/images/images_list/cloud.jpg" />
505
        <draggable id="5" label="Label2" />
506 507 508
        <draggable id="2" label="Drop" icon="/static/images/images_list/drop.jpg" />
        <draggable id="name_label_icon3" label="Grass" icon="/static/images/images_list/grass.jpg" />
        <draggable id="name4" label="Star" icon="/static/images/images_list/star.png" />
509 510 511 512 513 514
        <draggable id="7" label="Label3" />

        <target id="t1" x="111" y="58" w="90" h="90"/>
        <target id="t2" x="212" y="90" w="90" h="90"/>

    </drag_and_drop_input>
515

516 517 518
    <answer type="loncapa/python"><![CDATA[
correct_answer = {'name4': 't1',
                '7': 't2'}
519 520 521 522 523 524 525 526
if draganddrop.grade(submission[0], correct_answer):
    correct = ['correct']
else:
    correct = ['incorrect']
]]></answer>
</customresponse>

</problem>