#### [Draggable is reusable example]

#### Please label all hydrogen atoms.

correct_answer = [{ 'draggables': ['1'], 'targets': ['t2', 't3', 't4', 't7', 't8', 't10'], 'rule': 'exact' }] if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']

#### [Complex grading example]

#### Describe carbon molecule in LCAO-MO.

correct_answer = [ { 'draggables': ['1'], 'targets': [ 's_left', 's_right', 's_sigma', 's_sigma_star', 'p_pi_1', 'p_pi_2' ], 'rule': 'exact' }, { 'draggables': ['7'], 'targets': ['p_left_1', 'p_left_2', 'p_right_1','p_right_2'], 'rule': 'exact' }, { 'draggables': ['11'], 'targets': ['s_sigma_name', 'p_sigma_name'], 'rule': 'exact' }, { 'draggables': ['13'], 'targets': ['s_sigma_star_name', 'p_sigma_star_name'], 'rule': 'exact' }, { 'draggables': ['15'], 'targets': ['p_pi_name'], 'rule': 'exact' }, { 'draggables': ['16'], 'targets': ['p_pi_star_name'], 'rule': 'exact' }]

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

#### [Many draggables per target]

#### Move two Stars and three Ants to most left target and one Label3 and four Label2 to most right target.

correct_answer = [ { 'draggables': ['name4'], 'targets': [ 't1', 't1' ], 'rule': 'exact' }, { 'draggables': ['name_with_icon'], 'targets': [ 't1', 't1', 't1' ], 'rule': 'exact' }, { 'draggables': ['5'], 'targets': [ 't2', 't2', 't2', 't2' ], 'rule': 'exact' }, { 'draggables': ['7'], 'targets': [ 't2' ], 'rule': 'exact' } ] if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']

#### [Draggables can be placed anywhere on base image]

#### Place -Grass- in the middle of the image and -Ant- in the right upper corner.

correct_answer = { 'grass': [[300, 200], 200], 'ant': [[500, 0], 200] } if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']

#### [Another anyof example]

#### Please identify the Carbon and Oxygen atoms in the molecule.

correct_answer = [ { 'draggables': ['l3_o'], 'targets': ['t1_o', 't9_o'], 'rule': 'exact' }, { 'draggables': ['l1_c'], 'targets': ['t5_c', 't6_c'], 'rule': 'exact' } ] if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']

#### [Exact number of draggables for a set of targets.]

#### Drag two Grass and one Star to first or second positions, and three Cloud to any of the three positions.

correct_answer = [ { 'draggables': ['name_label_icon3', 'name_label_icon3'], 'targets': ['t1', 't3'], 'rule': 'unordered_equal+number' }, { 'draggables': ['name4'], 'targets': ['t1', 't3'], 'rule': 'anyof+number' }, { 'draggables': ['with_icon', 'with_icon', 'with_icon'], 'targets': ['t1', 't2', 't3'], 'rule': 'anyof+number' } ] if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']

#### [As many as you like draggables for a set of targets.]

#### Drag some Grass to any of the targets, and some Stars to either first or last target.

correct_answer = [ { 'draggables': ['name_label_icon3'], 'targets': ['t1', 't2', 't3'], 'rule': 'anyof' }, { 'draggables': ['name4'], 'targets': ['t1', 't2'], 'rule': 'anyof' } ] if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']