#### [Anyof rule example]

#### Please label hydrogen atoms connected with left carbon atom.

correct_answer = [ {'draggables': ['1', '2'], 'targets': ['t2', 't3', 't4' ], 'rule':'anyof' }] 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', '2', '3', '4', '5', '6'], 'targets': [ 's_left', 's_right', 's_sigma', 's_sigma_star', 'p_pi_1', 'p_pi_2' ], 'rule': 'unordered_equal' }, { 'draggables': ['7','8', '9', '10'], 'targets': ['p_left_1', 'p_left_2', 'p_right_1','p_right_2'], 'rule': 'unordered_equal' }, { 'draggables': ['11', '12'], 'targets': ['s_sigma_name', 'p_sigma_name'], 'rule': 'unordered_equal' }, { 'draggables': ['13', '14'], 'targets': ['s_sigma_star_name', 'p_sigma_star_name'], 'rule': 'unordered_equal' }, { 'draggables': ['15'], 'targets': ['p_pi_name'], 'rule': 'unordered_equal' }, { 'draggables': ['16'], 'targets': ['p_pi_star_name'], 'rule': 'unordered_equal' }]

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

#### [Another complex grading example]

#### Describe oxygen molecule in LCAO-MO

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']

#### [Individual targets with outlines, One draggable per target]

#### Drag -Ant- to first position and -Star- to third position

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

#### [SMALL IMAGE, Individual targets WITHOUT outlines, One draggable per target]

#### Move -Star- to the volcano opening, and -Label3- on to the right ear of the cow.

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

#### [Many draggables per target]

#### Move -Star- and -Ant- to most left target and -Label3- and -Label2- to most right target.

correct_answer = {'name4': 't1', 'name_with_icon': 't1', '5': 't2', '7':'t2'} 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', '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']

#### [Again another anyof example]

#### If the element appears in this molecule, drag the label onto it

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']

#### [Wrong base image url example]

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