import os
import django

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mavAgenda.settings")
django.setup()

from landing.models import *

####################
# General Education
####################

# English - except English 1050, 1090, and 1100

english = Course.objects.filter(course_subject='ENGL')
eng_req = Requirement.objects.filter(req_name='English Composition')
for e in english:
    if e.course_num != '1050' and e.course_num != '1090' and e.course_num != '1100':
        e.course_counts_toward.add(eng_req[0])
        e.save()

# Math - except Math 1000
math = Course.objects.filter(course_subject='MATH')
math_req = Requirement.objects.filter(req_name='Mathematics')
for m in math:
    if m.course_num != '1000':
        m.course_counts_toward.add(math_req[0])
        m.save()

# Public Speaking
ps = Course.objects.filter(course_subject='CMST')
ps_req = Requirement.objects.filter(req_name='Public Speaking')
for p in ps:
    p.course_counts_toward.add(ps_req[0])
    p.save()

#############################################
# Non-Required Courses
#############################################

counts_toward_courses = {
    'Humanities': {
        'ART 1010',
        'ART 1040',
        'ART 2050',
        'ART 2060',
        'ART 2610',
        'BIOL 3660',
        'BLST 2260',
        'BLST 2410',
        'BLST 2420',
        'BLST 2430',
        'BMCH 1100',
        'CFAM 1000',
        'CIST 3110',
        'CMST 1710',
        'ENGL 1010',
        'ENGL 1020',
        'ENGL 1200',
        'ENGL 2110',
        'ENGL 2230',
        'ENGL 2250',
        'ENGL 2260',
        'ENGL 2310',
        'ENGL 2320',
        'ENGL 2450',
        'ENGL 2460',
        'ENGL 2470',
        'ENGL 2490',
        'ENGL 2500',
        'ENGL 2510',
        'ENGL 3130',
        'ENGL 3150',
        'ENGL 3280',
        'ENVN 2000',
        'ENVN 3660',
        'FREN 1110',
        'GERM 1110',
        'HIST 1000',
        'HIST 1010',
        'HIST 1110',
        'HIST 1120',
        'HIST 2040',
        'HIST 2050',
        'HIST 2060',
        'HIST 2510',
        'HONR 3020',
        'HUMN 1110',
        'HUMN 1200',
        'JAPN 1110',
        'JMC 1050',
        'JMC 3700',
        'LLS 1020',
        'LLS 2800',
        'MUS 1050',
        'MUS 1070',
        'MUS 1080',
        'MUS 1090',
        'MUS 1100',
        'MUS 2700',
        'MUS 2760',
        'NAMS 1100',
        'PHIL 1010',
        'PHIL 1020',
        'PHIL 1210',
        'PHIL 2030',
        'PHIL 2040',
        'PSCI 2310',
        'RELI 1010',
        'RELI 2020',
        'RELI 2150',
        'RELI 2170',
        'RUSS 1110',
        'SPAN 1110',
        'THEA 1010',
        'THEA 1050',
        'THEA 1090',
        'THEA 1210',
        'THEA 2310',
        'WGST 2020',
        'WRWS 1500',
        'WRWS 2400',
        'WRWS 3500'
    },
    'Computer Science Humanities': {
        'ART 1010',
        'ART 1040',
        'ART 2050',
        'ART 2060',
        'ART 2610',
        'BIOL 3660',
        'BLST 2260',
        'BLST 2410',
        'BLST 2420',
        'BLST 2430',
        'BMCH 1100',
        'CFAM 1000',
        'CIST 3110',
        'CMST 1710',
        'ENGL 1010',
        'ENGL 1020',
        'ENGL 1200',
        'ENGL 2110',
        'ENGL 2230',
        'ENGL 2250',
        'ENGL 2260',
        'ENGL 2310',
        'ENGL 2320',
        'ENGL 2450',
        'ENGL 2460',
        'ENGL 2470',
        'ENGL 2490',
        'ENGL 2500',
        'ENGL 2510',
        'ENGL 3130',
        'ENGL 3150',
        'ENGL 3280',
        'ENVN 2000',
        'ENVN 3660',
        'FREN 1110',
        'GERM 1110',
        'HIST 1000',
        'HIST 1010',
        'HIST 1110',
        'HIST 1120',
        'HIST 2040',
        'HIST 2050',
        'HIST 2060',
        'HIST 2510',
        'HONR 3020',
        'HUMN 1110',
        'HUMN 1200',
        'JAPN 1110',
        'JMC 1050',
        'JMC 3700',
        'LLS 1020',
        'LLS 2800',
        'MUS 1050',
        'MUS 1070',
        'MUS 1080',
        'MUS 1090',
        'MUS 1100',
        'MUS 2700',
        'MUS 2760',
        'NAMS 1100',
        'PHIL 1010',
        'PHIL 1020',
        'PHIL 1210',
        'PHIL 2030',
        'PHIL 2040',
        'PSCI 2310',
        'RELI 1010',
        'RELI 2020',
        'RELI 2150',
        'RELI 2170',
        'RUSS 1110',
        'SPAN 1110',
        'THEA 1010',
        'THEA 1050',
        'THEA 1090',
        'THEA 1210',
        'THEA 2310',
        'WGST 2020',
        'WRWS 1500',
        'WRWS 2400',
        'WRWS 3500'
    },
    'Management Information Systems Humanities': {
        'ART 1010',
        'ART 1040',
        'ART 2050',
        'ART 2060',
        'ART 2610',
        'BIOL 3660',
        'BLST 2260',
        'BLST 2410',
        'BLST 2420',
        'BLST 2430',
        'BMCH 1100',
        'CFAM 1000',
        'CIST 3110',
        'CMST 1710',
        'ENGL 1010',
        'ENGL 1020',
        'ENGL 1200',
        'ENGL 2110',
        'ENGL 2230',
        'ENGL 2250',
        'ENGL 2260',
        'ENGL 2310',
        'ENGL 2320',
        'ENGL 2450',
        'ENGL 2460',
        'ENGL 2470',
        'ENGL 2490',
        'ENGL 2500',
        'ENGL 2510',
        'ENGL 3130',
        'ENGL 3150',
        'ENGL 3280',
        'ENVN 2000',
        'ENVN 3660',
        'FREN 1110',
        'GERM 1110',
        'HIST 1000',
        'HIST 1010',
        'HIST 1110',
        'HIST 1120',
        'HIST 2040',
        'HIST 2050',
        'HIST 2060',
        'HIST 2510',
        'HONR 3020',
        'HUMN 1110',
        'HUMN 1200',
        'JAPN 1110',
        'JMC 1050',
        'JMC 3700',
        'LLS 1020',
        'LLS 2800',
        'MUS 1050',
        'MUS 1070',
        'MUS 1080',
        'MUS 1090',
        'MUS 1100',
        'MUS 2700',
        'MUS 2760',
        'NAMS 1100',
        'PHIL 1010',
        'PHIL 1020',
        'PHIL 1210',
        'PHIL 2030',
        'PHIL 2040',
        'PSCI 2310',
        'RELI 1010',
        'RELI 2020',
        'RELI 2150',
        'RELI 2170',
        'RUSS 1110',
        'SPAN 1110',
        'THEA 1010',
        'THEA 1050',
        'THEA 1090',
        'THEA 1210',
        'THEA 2310',
        'WGST 2020',
        'WRWS 1500',
        'WRWS 2400',
        'WRWS 3500'
    },
    'Bioinformatics Humanities': {
        'ART 1010',
        'ART 1040',
        'ART 2050',
        'ART 2060',
        'ART 2610',
        'BIOL 3660',
        'BLST 2260',
        'BLST 2410',
        'BLST 2420',
        'BLST 2430',
        'BMCH 1100',
        'CFAM 1000',
        'CIST 3110',
        'CMST 1710',
        'ENGL 1010',
        'ENGL 1020',
        'ENGL 1200',
        'ENGL 2110',
        'ENGL 2230',
        'ENGL 2250',
        'ENGL 2260',
        'ENGL 2310',
        'ENGL 2320',
        'ENGL 2450',
        'ENGL 2460',
        'ENGL 2470',
        'ENGL 2490',
        'ENGL 2500',
        'ENGL 2510',
        'ENGL 3130',
        'ENGL 3150',
        'ENGL 3280',
        'ENVN 2000',
        'ENVN 3660',
        'FREN 1110',
        'GERM 1110',
        'HIST 1000',
        'HIST 1010',
        'HIST 1110',
        'HIST 1120',
        'HIST 2040',
        'HIST 2050',
        'HIST 2060',
        'HIST 2510',
        'HONR 3020',
        'HUMN 1110',
        'HUMN 1200',
        'JAPN 1110',
        'JMC 1050',
        'JMC 3700',
        'LLS 1020',
        'LLS 2800',
        'MUS 1050',
        'MUS 1070',
        'MUS 1080',
        'MUS 1090',
        'MUS 1100',
        'MUS 2700',
        'MUS 2760',
        'NAMS 1100',
        'PHIL 1010',
        'PHIL 1020',
        'PHIL 1210',
        'PHIL 2030',
        'PHIL 2040',
        'PSCI 2310',
        'RELI 1010',
        'RELI 2020',
        'RELI 2150',
        'RELI 2170',
        'RUSS 1110',
        'SPAN 1110',
        'THEA 1010',
        'THEA 1050',
        'THEA 1090',
        'THEA 1210',
        'THEA 2310',
        'WGST 2020',
        'WRWS 1500',
        'WRWS 2400',
        'WRWS 3500'
    },
    'Cyber Security Humanities': {
        'ART 1010',
        'ART 1040',
        'ART 2050',
        'ART 2060',
        'ART 2610',
        'BIOL 3660',
        'BLST 2260',
        'BLST 2410',
        'BLST 2420',
        'BLST 2430',
        'BMCH 1100',
        'CFAM 1000',
        'CIST 3110',
        'CMST 1710',
        'ENGL 1010',
        'ENGL 1020',
        'ENGL 1200',
        'ENGL 2110',
        'ENGL 2230',
        'ENGL 2250',
        'ENGL 2260',
        'ENGL 2310',
        'ENGL 2320',
        'ENGL 2450',
        'ENGL 2460',
        'ENGL 2470',
        'ENGL 2490',
        'ENGL 2500',
        'ENGL 2510',
        'ENGL 3130',
        'ENGL 3150',
        'ENGL 3280',
        'ENVN 2000',
        'ENVN 3660',
        'FREN 1110',
        'GERM 1110',
        'HIST 1000',
        'HIST 1010',
        'HIST 1110',
        'HIST 1120',
        'HIST 2040',
        'HIST 2050',
        'HIST 2060',
        'HIST 2510',
        'HONR 3020',
        'HUMN 1110',
        'HUMN 1200',
        'JAPN 1110',
        'JMC 1050',
        'JMC 3700',
        'LLS 1020',
        'LLS 2800',
        'MUS 1050',
        'MUS 1070',
        'MUS 1080',
        'MUS 1090',
        'MUS 1100',
        'MUS 2700',
        'MUS 2760',
        'NAMS 1100',
        'PHIL 1010',
        'PHIL 1020',
        'PHIL 1210',
        'PHIL 2030',
        'PHIL 2040',
        'PSCI 2310',
        'RELI 1010',
        'RELI 2020',
        'RELI 2150',
        'RELI 2170',
        'RUSS 1110',
        'SPAN 1110',
        'THEA 1010',
        'THEA 1050',
        'THEA 1090',
        'THEA 1210',
        'THEA 2310',
        'WGST 2020',
        'WRWS 1500',
        'WRWS 2400',
        'WRWS 3500'
    },
    'IT Innovation Humanities': {
        'ART 1010',
        'ART 1040',
        'ART 2050',
        'ART 2060',
        'ART 2610',
        'BIOL 3660',
        'BLST 2260',
        'BLST 2410',
        'BLST 2420',
        'BLST 2430',
        'BMCH 1100',
        'CFAM 1000',
        'CIST 3110',
        'CMST 1710',
        'ENGL 1010',
        'ENGL 1020',
        'ENGL 1200',
        'ENGL 2110',
        'ENGL 2230',
        'ENGL 2250',
        'ENGL 2260',
        'ENGL 2310',
        'ENGL 2320',
        'ENGL 2450',
        'ENGL 2460',
        'ENGL 2470',
        'ENGL 2490',
        'ENGL 2500',
        'ENGL 2510',
        'ENGL 3130',
        'ENGL 3150',
        'ENGL 3280',
        'ENVN 2000',
        'ENVN 3660',
        'FREN 1110',
        'GERM 1110',
        'HIST 1000',
        'HIST 1010',
        'HIST 1110',
        'HIST 1120',
        'HIST 2040',
        'HIST 2050',
        'HIST 2060',
        'HIST 2510',
        'HONR 3020',
        'HUMN 1110',
        'HUMN 1200',
        'JAPN 1110',
        'JMC 1050',
        'JMC 3700',
        'LLS 1020',
        'LLS 2800',
        'MUS 1050',
        'MUS 1070',
        'MUS 1080',
        'MUS 1090',
        'MUS 1100',
        'MUS 2700',
        'MUS 2760',
        'NAMS 1100',
        'PHIL 1010',
        'PHIL 1020',
        'PHIL 1210',
        'PHIL 2030',
        'PHIL 2040',
        'PSCI 2310',
        'RELI 1010',
        'RELI 2020',
        'RELI 2150',
        'RELI 2170',
        'RUSS 1110',
        'SPAN 1110',
        'THEA 1010',
        'THEA 1050',
        'THEA 1090',
        'THEA 1210',
        'THEA 2310',
        'WGST 2020',
        'WRWS 1500',
        'WRWS 2400',
        'WRWS 3500'
    },
    'Social Science': {
        'ACCT 2000',
        'ANTH 1050',
        'AVN 1000',
        'AVN 1040',
        'AVN 2510',
        'BLST 1000',
        'BMCH 1000',
        'BSAD 2100',
        'BSAD 2600',
        'BSAD 2700',
        'CRCJ 1010',
        'CIST 2100',
        'CMST 1310',
        'CMST 2010',
        'CMST 2410',
        'ECON 1200',
        'ECON 2200',
        'ECON 2220',
        'EMGT 1000',
        'EMGT 1150',
        'EMGT 2500',
        'ENGL 2280',
        'ENGL 3610',
        'GDRH 2110',
        'GDRH 2120',
        'GEOG 1000',
        'GEOG 1020',
        'GERO 2000',
        'HONR 3030',
        'INST 2130',
        'ITIN 1010',
        'JMC 1500',
        'LLS 1000',
        'LLS 1010',
        'LLS 2900',
        'MGMT 1500',
        'PSCI 1000',
        'PSCI 1100',
        'PSCI 2110',
        'PSCI 2120',
        'PSCI 2180',
        'PSCI 2210',
        'PSCI 2500',
        'PSYC 1010',
        'SOC 1010',
        'SOC 2100',
        'SOC 2150',
        'SOWK 1000',
        'SPED 1400',
        'SPED 1500',
        'SUST 1000',
        'WGST 2010'
    },
    'Computer Science Social Science': {
        'ACCT 2000',
        'ANTH 1050',
        'AVN 1000',
        'AVN 1040',
        'AVN 2510',
        'BLST 1000',
        'BMCH 1000',
        'BSAD 2100',
        'BSAD 2600',
        'BSAD 2700',
        'CRCJ 1010',
        'CIST 2100',
        'CMST 1310',
        'CMST 2010',
        'CMST 2410',
        'ECON 1200',
        'ECON 2200',
        'ECON 2220',
        'EMGT 1000',
        'EMGT 1150',
        'EMGT 2500',
        'ENGL 2280',
        'ENGL 3610',
        'GDRH 2110',
        'GDRH 2120',
        'GEOG 1000',
        'GEOG 1020',
        'GERO 2000',
        'HONR 3030',
        'INST 2130',
        'ITIN 1010',
        'JMC 1500',
        'LLS 1000',
        'LLS 1010',
        'LLS 2900',
        'MGMT 1500',
        'PSCI 1000',
        'PSCI 1100',
        'PSCI 2110',
        'PSCI 2120',
        'PSCI 2180',
        'PSCI 2210',
        'PSCI 2500',
        'PSYC 1010',
        'SOC 1010',
        'SOC 2100',
        'SOC 2150',
        'SOWK 1000',
        'SPED 1400',
        'SPED 1500',
        'SUST 1000',
        'WGST 2010'
    },
    'Management Information Systems Social Science': {
        'ACCT 2000',
        'ANTH 1050',
        'AVN 1000',
        'AVN 1040',
        'AVN 2510',
        'BLST 1000',
        'BMCH 1000',
        'BSAD 2100',
        'BSAD 2600',
        'BSAD 2700',
        'CRCJ 1010',
        'CIST 2100',
        'CMST 1310',
        'CMST 2010',
        'CMST 2410',
        'ECON 1200',
        'ECON 2200',
        'ECON 2220',
        'EMGT 1000',
        'EMGT 1150',
        'EMGT 2500',
        'ENGL 2280',
        'ENGL 3610',
        'GDRH 2110',
        'GDRH 2120',
        'GEOG 1000',
        'GEOG 1020',
        'GERO 2000',
        'HONR 3030',
        'INST 2130',
        'ITIN 1010',
        'JMC 1500',
        'LLS 1000',
        'LLS 1010',
        'LLS 2900',
        'MGMT 1500',
        'PSCI 1000',
        'PSCI 1100',
        'PSCI 2110',
        'PSCI 2120',
        'PSCI 2180',
        'PSCI 2210',
        'PSCI 2500',
        'PSYC 1010',
        'SOC 1010',
        'SOC 2100',
        'SOC 2150',
        'SOWK 1000',
        'SPED 1400',
        'SPED 1500',
        'SUST 1000',
        'WGST 2010'
    },
    'Cyber Security Social Science': {
        'ACCT 2000',
        'ANTH 1050',
        'AVN 1000',
        'AVN 1040',
        'AVN 2510',
        'BLST 1000',
        'BMCH 1000',
        'BSAD 2100',
        'BSAD 2600',
        'BSAD 2700',
        'CRCJ 1010',
        'CIST 2100',
        'CMST 1310',
        'CMST 2010',
        'CMST 2410',
        'ECON 1200',
        'ECON 2200',
        'ECON 2220',
        'EMGT 1000',
        'EMGT 1150',
        'EMGT 2500',
        'ENGL 2280',
        'ENGL 3610',
        'GDRH 2110',
        'GDRH 2120',
        'GEOG 1000',
        'GEOG 1020',
        'GERO 2000',
        'HONR 3030',
        'INST 2130',
        'ITIN 1010',
        'JMC 1500',
        'LLS 1000',
        'LLS 1010',
        'LLS 2900',
        'MGMT 1500',
        'PSCI 1000',
        'PSCI 1100',
        'PSCI 2110',
        'PSCI 2120',
        'PSCI 2180',
        'PSCI 2210',
        'PSCI 2500',
        'PSYC 1010',
        'SOC 1010',
        'SOC 2100',
        'SOC 2150',
        'SOWK 1000',
        'SPED 1400',
        'SPED 1500',
        'SUST 1000',
        'WGST 2010'
    },
    'IT Innovation Social Science': {
        'ACCT 2000',
        'ANTH 1050',
        'AVN 1000',
        'AVN 1040',
        'AVN 2510',
        'BLST 1000',
        'BMCH 1000',
        'BSAD 2100',
        'BSAD 2600',
        'BSAD 2700',
        'CRCJ 1010',
        'CIST 2100',
        'CMST 1310',
        'CMST 2010',
        'CMST 2410',
        'ECON 1200',
        'ECON 2200',
        'ECON 2220',
        'EMGT 1000',
        'EMGT 1150',
        'EMGT 2500',
        'ENGL 2280',
        'ENGL 3610',
        'GDRH 2110',
        'GDRH 2120',
        'GEOG 1000',
        'GEOG 1020',
        'GERO 2000',
        'HONR 3030',
        'INST 2130',
        'ITIN 1010',
        'JMC 1500',
        'LLS 1000',
        'LLS 1010',
        'LLS 2900',
        'MGMT 1500',
        'PSCI 1000',
        'PSCI 1100',
        'PSCI 2110',
        'PSCI 2120',
        'PSCI 2180',
        'PSCI 2210',
        'PSCI 2500',
        'PSYC 1010',
        'SOC 1010',
        'SOC 2100',
        'SOC 2150',
        'SOWK 1000',
        'SPED 1400',
        'SPED 1500',
        'SUST 1000',
        'WGST 2010'
    },
    'Natural/Physical Science': {
        'ANTH 3910',
        'BIOI 1000',
        'BIOL 1020',
        'BIOL 1330',
        'BIOL 1450',
        'BIOL 2120',
        'BMCH 2400',
        'CHEM 1010',
        'CHEM 1014',
        'CHEM 1140',
        'CHEM 1144',
        'CHEM 1180',
        'CHEM 1184',
        'CSCI 1200',
        'CSCI 1204',
        'ENVN 2120',
        'FSMT 1600',
        'GEOG 1030',
        'GEOG 1050',
        'GEOG 1090',
        'GEOG 3510',
        'GEOG 3514',
        'GEOL 1010',
        'GEOL 1100',
        'GEOL 1104',
        'GEOL 1170',
        'GEOL 2100',
        'GEOL 2500',
        'NSCI 1050',
        'PHYS 1030',
        'PHYS 1034',
        'PHYS 1050',
        'PHYS 1054',
        'PHYS 1110',
        'PHYS 1154',
        'PHYS 1350',
        'PHYS 1354',
        'PHYS 2110',
        'TED 1100',
        'TED 280'
    },
    'Global Diversity': {
        'ART 1040',
        'ART 2050',
        'ART 2060',
        'ART 2610',
        'BSAD 2700',
        'CMST 4570',
        'CRCJ 4750',
        'CRCJ 4760',
        'CYBR 1100',
        'ENGL 2470',
        'ENGL 2510',
        'ENGL 3280',
        'ENGL 3290',
        'FREN 1110',
        'GEOG 1000',
        'GEOG 1020',
        'GERM 1110',
        'HED 4650',
        'HIST 1000',
        'HIST 1010',
        'HIST 2510',
        'INST 2130',
        'ISQA 3420',
        'JAPN 1110',
        'LLS 1000',
        'LLS 2800',
        'LLS 2900',
        'LLS 3680',
        'LLS 4280',
        'MUS 1080',
        'PHIL 2040',
        'PSCI 1000',
        'PSCI 2210',
        'PSCI 2500',
        'PSCI 3230',
        'PSCI 3500',
        'PSCI 3580',
        'PSCI 3640',
        'PSCI 3680',
        'PSCI 3700',
        'PSCI 4200',
        'PSCI 4210',
        'PSCI 4280',
        'PSCI 4520',
        'PSCI 4620',
        'RELI 1010',
        'RELI 2020',
        'RELI 2150',
        'RELI 2170',
        'RUSS 1110',
        'SPAN 1110',
        'SUST 1000',
        'WGST 3230'
    },
    'US Diversity': {
        'ART 1010',
        'BLST 1000',
        'BLST 2100',
        'BLST 2260',
        'BLST 2410',
        'BLST 2420',
        'BLST 2430',
        'BLST 3410',
        'BLST 3510',
        'BLST 4580',
        'CMST 3510',
        'CMST 3750',
        'CMST 4530',
        'CMST 4580',
        'CRCJ 3380',
        'CRCJ 3390',
        'EMGT 1150',
        'EMGT 2500',
        'ENGL 2230',
        'ENGL 2260',
        'ENGL 2490',
        'ENGL 3610',
        'ENGL 4240',
        'GERO 2000',
        'HIST 1110',
        'HIST 1120',
        'HIST 2040',
        'HIST 2050',
        'HIST 2060',
        'HUMN 1110',
        'LLS 1010',
        'LLS 1020',
        'LLS 3140',
        'MUS 1070',
        'MUS 1100',
        'NAMS 1100',
        'PSCI 3100',
        'PSCI 3130',
        'PSCI 3140',
        'SOC 2150',
        'SOC 3300',
        'SOC 3700',
        'SOC 3820',
        'SOC 3900',
        'SOC 4150',
        'SOC 4310',
        'SOWK 1000',
        'SOWK 2120',
        'SPED 1400',
        'SPED 1500',
        'SPED 2200',
        'TED 2200',
        'WGST 2010',
        'WGST 2020',
        'WGST 3100',
        'WGST 3130',
        'WGST 3390',
        'WGST 3750'
    },
    'Computer Science Elective (3000 level)': {
        'CSCI 3100',
        'CSCI 3300',
        'CSCI 3320',
        'CSCI 3510',
        'CSCI 3550',
        'CSCI 3660',
        'CSCI 3710',
        'CSCI 3830',
        'CSCI 4150',
        'CSCI 4220',
        'CSCI 4250',
        'CSCI 4260',
        'CSCI 4300',
        'CSCI 4310',
        'CSCI 4350',
        'CSCI 4440',
        'CSCI 4450',
        'CSCI 4470',
        'CSCI 4480',
        'CSCI 4500',
        'CSCI 4510',
        'CSCI 4560',
        'CSCI 4620',
        'CSCI 4660',
        'CSCI 4700',
        'CSCI 4760',
        'CSCI 4830',
        'CSCI 4850',
        'CSCI 4890',
        'CSCI 4900',
        'CSCI 4950',
        'CSCI 4980',
        'CSCI 4990',
    },
    'Computer Science Elective (2000 level)': {

        'CSCI 2030',
        'CSCI 2240',
        'CSCI 2510',
        'CSCI 2840',
        'CSCI 2850',
        'CIST 2910',
        'CSCI 2980',
    },
    'Computer Science Game Programming Elective': {
        'CSCI 2310',
        'CSCI 4250',
        'CSCI 4260',
        'CSCI 4450',
        'CSCI 4480',
        'CSCI 4660',
        'CSCI 4850',
        'ART 3140',
        'ART 3160',
    },
    'Computer Science Cyber Security Elective': {
        'IASC 4540',
        'CIST 4540',
        'CSCI 4560',
        'IASC 3570',
        'IASC 3350',
        'IASC 3370',
        'IASC 4450',
        'IASC 4460',
    },
    'Computer Science Internet Technologies Elective': {
        'CIST 2910',
        'CSCI 4380',
        'CSCI 4850',
        'IASC 3350',
        'IASC 3370',
    },
    'Management Information Systems Co-Req Topic': {
        'ACCT 3080',
        'ECON 3200',
        'ECON 3220',
        'FNBK 3250',
        'MGMT 3510',
        'MGMT 3710',
        'MGMT 4090',
        'MRKT 3310',
    },
    'Management Information Systems i-Business Application/Development/Management Elective': {
        'CIST 3600',
        'ISQA 3520',
        'ISQA 4000',
        'ISQA 4100',
        'ISQA 4190',
    },
    'Management Information Systems Internet Technologies Elective': {
        'CIST 2910',
        'ISQA 3310',
        'ISQA 3400',
        'ISQA 3520',
        'CIST 3600',
        'ISQA 4000',
        'ISQA 4180',
        'ISQA 4300',
        'ISQA 4730',
        'ISQA 4880',
        'ISQA 4890',
    },
    'Management Information Systems IT Audit & Control Elective': {
        'ISQA 3910',
        'ISQA 4000',
        'ACCT 4000',
        'ACCT 4060',
        'ACCT 4090',
        'ISQA 4190',
        'ISQA 4500',
        'ISQA 4510',
    },
    'Management Information Systems Data Management Elective': {
        'ISQA 4380',
        'ISQA 4730',
        'ISQA 4890',
    },
    'Management Information Systems Systems Development Elective': {
        'ISQA 3300',
        'ISQA 4100',
    },
    'IT Innovation Major Elective': {
        'CSCI 1200',
        'CIST 1300',
    },
    'IT Innovation Minor Elective': {
        'ITIN 2150',
        'ITIN 3100',
        'ITIN 3330',
        'ITIN 4090',
        'ITIN 4440',
        'ART 3140',
        'ART 3150',
        'ART 3160',
        'ART 3170',
        'ART 4180',
        'CSCI 2850',
        'CSCI 4260',
        'ISQA 3310',
        'ISQA 3400',
        'CSCI 3550',
        'ISQA 3520',
        'MGMT 3710',
        'MGMT 3720',
        'MUS 3170',
        'MUS 3180',
        'MUS 4200',
        'MUS 4210',
    },
    'Cyber Security Minor Elective': {
        'IASC 2980',
        'IASC 3570',
        'IASC 3350',
        'IASC 3370',
        'IASC 4380',
        'CSCI 4380',
        'IASC 4450',
        'IASC 4460',
        'IASC 4540',
        'CSCI 4560',
        'IASC 4950',
        'IASC 4990',
    },
}

#############################################
# Required Courses
#############################################

enforced_for_courses = {
    'Computer Science English Composition': {
        'ENGL 1150',
        'ENGL 2160',
        'CIST 3000',
    },
    'Management Information Systems English Composition': {
        'ENGL 1150',
        'ENGL 2160',
        'CIST 3000',
    },
    'Bioinformatics English Composition': {
        'ENGL 1150',
        'ENGL 2160',
        'CIST 3000',
    },
    'Cyber Security English Composition': {
        'ENGL 1150',
        'ENGL 2160',
        'CIST 3000',
    },
    'IT Innovation English Composition': {
        'ENGL 1150',
        'ENGL 2160',
        'CIST 3000',
    },
    'Computer Science IS&T Core': {
        'CIST 1400',
        'CSCI 1620',
        'CSCI 2240',
        'CIST 2100',
        'CIST 2500',
        'CIST 3110'
    },
    'Computer Science Mathematics': {
        'MATH 1950',
        'MATH 1960',
        'CSCI 2030',
        'MATH 2050',
    },
    'Computer Science Major Core': {
        'CSCI 3320',
        'CSCI 3710',
        'CSCI 3550',
        'CIST 2100',
        'CSCI 4220',
        'CSCI 4350',
        'CSCI 4500',
        'CSCI 4830',
        'CSCI 4970',
        'CSCI 4000'
    },
    'Computer Science Minor Core': {
        'CIST 1400',
        'CIST 1404',
        'CSCI 1620',
        'CIST 2100',
        'CIST 2500'
    },
    'Computer Science Game Programming Core': {
        'CSCI 2510',
        'CSCI 3510',
        'CSCI 4620',
    },
    'Computer Science Cyber Security Core': {
        'IASC 3600',
        'IASC 4360',
        'IASC 4380',
        'CSCI 4380',
    },
    'Computer Science Internet Technologies Core': {
        'CSCI 2850',
        'CSCI 3830',
        'CSCI 4900',
    },
    'Management Information Systems IS&T Core': {
        'IASC 1100',
        'CIST 1300',
        'CIST 1400',
        'CIST 1404',
        'CSCI 1620',
        'CIST 2100',
        'CIST 2500',
        'CIST 3110',
    },
    'Management Information Systems Mathematics': {
        'MATH 1930',
        'MATH 2030',
    },
    'Management Information Systems Co-Req Topic': {
        'ACCT 2010',
        'ACCT 2020',
        'ECON 2200',
        'ECON 2220',
    },
    'Management Information Systems Major Core': {
        'ISQA 3300',
        'ISQA 3310',
        'ISQA 3400',
        'ISQA 3420',
        'ISQA 3910',
        'ISQA 4110',
        'ISQA 4120',
    },
    'Management Information Systems Minor Core': {
        'ISQA 3310',
        'ISQA 3910',
        'ISQA 4110',
    },
    'Management Information Systems i-Business Application/Development/Management Prerequisites': {
        'CIST 2100',
        'ISQA 3310',
        'ISQA 4110',
        'ISQA 4120',
    },
    'Management Information Systems i-Business Application/Development/Management Core': {
        'ISQA 3910',
        'ISQA 4180',
    },
    'Management Information Systems i-Business Application/Development/Management Capstone': {
        'ISQA 4380'
    },
    'Management Information Systems Cyber Security Prerequisites': {
        'CIST 1400',
        'CSCI 1620',
        'CIST 2100',
        'CSCI 2240',
        'ISQA 3300',
        'CSCI 3320',
        'MATH 1930',
        'MATH 2030',
    },
    'Management Information Systems Cyber Security Core': {
        'CIST 3110',
        'IASC 3350',
        'IASC 3370',
        'CSCI 3550',
        'ISQA 3400',
        'CIST 3600',
        'IASC 4360',
        'CIST 4540',
    },
    'Management Information Systems Internet Technologies Core': {
        'CSCI 2850',
        'CSCI 3830'
    },
    'Management Information Systems Internet Technologies Capstone': {
        'ISQA 4900',
    },
    'Management Information Systems IT Audit & Control Core': {
        'CIST 3110',
        'CIST 3600',
        'ACCT 4080',
    },
    'Management Information Systems IT Audit & Control Capstone': {
        'ISQA 4590'
    },
    'Management Information Systems Global IT Leadership Prerequisites': {
        'CIST 1400',
        'CIST 2100',
        'ENGL 1160',
        'ECON 2200',
        'ECON 2220',
        'GEOG 1020',
        'INST 2130',
        'PSCI 2210',
    },
    'Management Information Systems Global IT Leadership Core': {
        'ISQA 3310',
        'ISQA 3420',
        'ISQA 3910',
        'ISQA 4380',
        'CIST 3200',
        'ISQA 4130',
    },
    'Management Information Systems Global IT Leadership Capstone': {
        'ISQA 4950',
    },
    'Management Information Systems Data Management Core': {
        'ISQA 3300',
        'ISQA 3310',
        'ISQA 4200',
        'ISQA 4300',
    },
    'Management Information Systems Systems Development Core': {
        'ISQA 3310',
        'ISQA 3910',
        'ISQA 4110',
        'ISQA 4120',
    },
    'Management Information Systems IT Administration Core': {
        'IS 204 (UiA)',
        'IS 209 (UiA)',
        'ISQA 3350',
        'IASC 3370',
        'IS 203 (UiA)',
        'ISQA 4300',
        'ISQA 4380',
    },
    'Bioinformatics IS&T Core': {
        'CIST 1400',
        'CSCI 1620',
        'CIST 2500',
        'CIST 3110',
        'CSCI 3320',
        'CSCI 4830',
        'CSCI 4850',
        'CSCI 4150',
        'ISQA 4890',
    },
    'Bioinformatics Mathematics': {
        'MATH 1950',
        'CSCI 2030',
        'MATH 2030',
        'BIOI 4150',
        'ISQA 4150',
    },
    'Bioinformatics Biology': {
        'BIOL 1450',
        'BIOL 2140',
        'BIOL 3020',
        'BIOL 4130',
        'BIOL 4140',
    },
    'Bioinformatics Chemistry': {
        'CHEM 1180',
        'CHEM 1184',
        'CHEM 1190',
        'CHEM 1194',
        'CHEM 2210',
        'CHEM 2214',
        'CHEM 3650',
        'CHEM 3654',
    },
    'Bioinformatics Bioinformatics': {
        'BIOI 1000',
        'BIOI 2000',
        'BIOI 3000',
        'BIOI 3500',
        'BIOI 4860',
        'BIOI 4870',
        'BIOI 4890',
        'BIOI 4970',
        'BIOI 4980',
    },
    'Cyber Security IS&T Core': {
        'CIST 1400',
        'CIST 2100',
        'CIST 3110',
    },
    'Cyber Security Mathematics': {
        'MATH 1950',
        'MATH 2030',
    },
    'Cyber Security Computer Science Core': {
        'CSCI 1620',
        'CSCI 2240',
        'CSCI 3320',
        'CSCI 3550',
        'CSCI 3710',
        'CSCI 4350',
        'CSCI 4500',
    },
    'Cyber Security Cyber Security Core': {
        'IASC 1100',
        'IASC 3350',
        'IASC 3370',
        'IASC 3570',
        'IASC 3600',
        'IASC 4360',
        'IASC 4380',
        'CIST 4540',
        'IASC 4580',
    },
    'Cyber Security Elective': {
        'CSCI 1200',
        'CIST 1300',
    },
    'Cyber Security Cyber Security Elective': {
        'ISQA 3910',
        'CSCI 4220',
        'ISQA 4380',
        'IASC 4450',
        'IASC 4460',
        'CSCI 4560',
        'CSCI 4830',
        'CSCI 4900',
        'IASC 4950',
        'IASC 4980',
        'IASC 4990',
    },
    'Cyber Security Co-Requisite': {
        'ISQA 3310',
        'CRCJ 1010',
        'CRCJ 3510',
        'CRCJ 4780',
        'CRCJ 4130',
    },
    'Cyber Security Prerequisites': {
        'MATH 2030',
        'CSCI 2030',
        'CSCI 2240',
        'ISQA 3300',
        'CSCI 3320',
    },
    'Cyber Security Minor Core': {
        'IASC 1100',
        'IASC 3600',
        'IASC 4360',
    },
    'IT Innovation IS&T Core': {
        'ITIN 1110',
        'IASC 1100',
        'CIST 1400',
        'CIST 1404',
        'CSCI 1620',
        'CIST 2100',
        'ITIN 2220',
        'CSCI 2240',
        'CIST 2500',
        'CIST 3110',
        'ITIN 3330',
        'ISQA 3310',
        'ITIN 4440',
        'ITIN 4880',
        'ITIN 4980',
        'ITIN 4990',
    },
    'IT Innovation Mathematics': {
        'MATH 1930',
        'MATH 1950',
        'MATH 2030',
    },
    'IT Innovation Minor Core': {
        'ITIN 1110',
        'ITIN 2220',
        'CIST 1400',
        'CIST 1404',
        'CIST 3110',
    },
    'Computer Science Humanities': {
        'CIST 3110',
    },
    'Computer Science Social Science': {
        'CIST 2100',
    },
    'Management Information Systems Humanities': {
        'CIST 3110',
    },
    'Management Information Systems Social Science': {
        'CIST 2100',
        'ECON 2200',
        'ECON 2220',
    },
    'Management Information Systems Global Diversity': {
        'ISQA 3420',
    },
    'Bioinformatics Humanities': {
        'CIST 3110',
    },
    'Bioinformatics Natural/Physical Science': {
        'BIOI 1000',
        'CHEM 1180',
        'CHEM 1184',
    },
    'Cyber Security Humanities': {
        'CIST 3110',
    },
    'Cyber Security Social Science': {
        'CIST 2100',
        'CRCJ 1010',
    },
    'Cyber Security Global Diversity': {
        'IASC 1100'
    },
    'IT Innovation Humanities': {
        'CIST 3110',
    },
    'IT Innovation Social Science': {
        'CIST 3110',
    },
    'IT Innovation Global Diversity': {
        'IASC 1100'
    },
}

# update courses' requirement fields, (enforced_for and counts_toward)
for section, c in enforced_for_courses.items():
    for item in c:
        subject = item.split(' ')[0]
        number = item.split(' ')[1]
        course = Course.objects.filter(course_subject=subject, course_num=number)
        course_req = Requirement.objects.filter(req_name=section)
        if course:
            course[0].course_enforced_for.add(course_req[0])
            course[0].save()

for section, c in counts_toward_courses.items():
    for item in c:
        subject = item.split(' ')[0]
        number = item.split(' ')[1]
        course = Course.objects.filter(course_subject=subject, course_num=number)
        course_req = Requirement.objects.filter(req_name=section)
        if course:
            course[0].course_counts_toward.add(course_req[0])
            course[0].save()
