diff --git a/rpi_data/graduation-requirement/CIVL-2022.json b/rpi_data/graduation-requirement/CIVL-2022.json new file mode 100644 index 000000000..3d03b9e73 --- /dev/null +++ b/rpi_data/graduation-requirement/CIVL-2022.json @@ -0,0 +1,150 @@ +{ + "class": 2022, + "major": "CIVL", + "totalCredits": 128, + "requirments": [ + { + "option": "Mathematics Core", + "Field": ["MATH 1010", "MATH 1020", "MATH 2400"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 3 + }, + { + "option": "Physics Option I", + "Field": ["PHYS 1100"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Chemistry Option I", + "Field": ["CHEM 1100", "CHEM 1110"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Physics Option II", + "Field": ["PHYS 1200", "PHYS1250"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Communication-Intensive", + "Field": ["COMM xxxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 2 + }, + { + "option": "HASS-Social science elective", + "Field": ["xxxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 2 + }, + { + "option": "HASS-Humanity elective", + "Field": ["HASS xxxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 2 + }, + { + "option": "HASS-4000 level elective", + "Field": ["HASS 4xxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "HASS - Professional development", + "Field": ["HASS 4xxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Free Elective", + "Field": ["xxxx"], + "PnC": "Yes", + "Exceptions": "NA", + "Number of classes": 3 + }, + { + "option": "Engineering Core - Required", + "Field": ["ENGR 1100", "ENGR 2600", "ENGR 4010"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 3 + }, + { + "option": "Engineering Core - Engineering Graphics & CAD", + "Field": ["CIVL 1200", "ENGR 1200" , "ENGR 1400"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Engineering Core - 1-Credit Engineering Introductory Course", + "Field": ["ENGR 1300", "CHME 1010", "CIVL 1100", "ISYE 1100", "MANE 1100", "MTLE 1200"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Engineering Core - Intro to Engineering Design", + "Field": ["ENGR 2050"], + "PnC": "NA", + "Exceptions": "( 4 Credits in ENGR 2050* ) or ( 3 Credits in ENGR 2050* and 1010 )", + "Number of classes": 1 + }, + { + "option": "Engineering Core - Beginning Programming for Engineering or Comp Sci I", + "Field": ["CSCI 1190","CSCI 1100"], + "PnC": "NA", + "Exceptions": "( 4 Credits in ENGR 2050* ) or ( 3 Credits in ENGR 2050* and 1010 )", + "Number of classes": 1 + }, + { + "option": "Civil Engineering Major Requirements - Required", + "Field": ["ENGR 2090*", "ENGR 2250*", "ENGR 2530*", "CIVL 2030", "CIVL 2630*", + "CIVL 2670*", "ENVE 2110*"," MATH 2010", "CIVL 4920"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 9 + }, + { + "option": "Civil Engineering Major Requirements - CE Design Elective ", + "Field": [ "CIVL 4010*", "CIVL 4070*", "CIVL 4080*", "CIVL 4140", "CIVL 4150", "CIVL 4620*", + "CIVL 4640*", "CIVL 4660*", "CIVL 4670", "ENVE 4200", "ENVE 4330*", "ENVE 4340*", "ENVE 4350*"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 2 + }, + { + "option": "Civil Engineering Major Requirements - CE Technical Elective ", + "Field": [ "CIVL 2040", "CIVL 4010*", "CIVL 4070*", "CIVL 4080*", "CIVL 4140", "CIVL 4150", + "CIVL 4240*", "CIVL 4270", "CIVL 4440*", "CIVL 4620*", "CIVL 4640*", "CIVL 4660*", + "CIVL 4670", "CIVL 4110", "ENEV 4200", "ENEV 4330*", "ENEV 4340*", "ENEV 4350*", + "ENEV 2120*", "ERTH 2330*", "ERTH 4710*", "ERTH 4800*"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Civil Engineering Major Requirements - Math & Science Elective", + "Field": ["MATH xxxx", "HASS xxxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + } + ], + + "Concentrations": + { + "exist": "NA" + } +} \ No newline at end of file diff --git a/rpi_data/graduation-requirement/CSCI-2022.json b/rpi_data/graduation-requirement/CSCI-2022.json new file mode 100644 index 000000000..3f7eb2d33 --- /dev/null +++ b/rpi_data/graduation-requirement/CSCI-2022.json @@ -0,0 +1,82 @@ +{ + "class": 2022, + "major": "csci", + "totalCredits": 128, + "requirments": [ + { + "option": "Science Option", + "Field": ["ASTR xxxx", "BIOL xxxx", "CHEM xxxx", "ERTH xxxx", "ENVI xxxx" , "PHYS xxxx"], + "PnC": "NA", + "Exceptions": "ERTH 1030", + "Number of classes": 2 + }, + { + "option": "Mathematics Option I", + "Field": ["MATH 2010", "MATH 4030", "MATH 4040", "MATH 4100", "MATP 4600"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Mathematics Option II", + "Field": ["MATH 2xxx", "MATH 4xxx"], + "PnC": "NA", + "Exceptions": "MATH 2800", + "Number of classes": 1 + }, + { + "option": "Computer Science(CS) Options", + "Field": ["CSCI 4xxx"], + "PnC": "NA", + "Exceptions": "Reading and independent study courses", + "Number of classes": 4 + }, + { + "option": "Computer Science Capstone", + "Field": ["URP 4xxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + } + ], + + "Concentrations": + { + "Courese": 3, + "options": + [ + { + "option" :"Theory and Algorithms", + "Field": ["CSCI 4020/6020", "CSCI 4030/6220", "CSCI 4040/6040", "CSCI 4100/6100", + "CSCI 4110/6110", "CSCI 4120/6120", "CSCI 4150", "CSCI 4230/6230", "CSCI 4240/6240", + "CSCI 4250/6250", "CSCI 4260", "MATH 4150", "CSCI 4420", "PHIL 4420", "MATH 4030", + "CSCI 4510/6510", "CSCI 4800", "MATH 4800", "CSCI 4820", "MATH 4820", "CSCI 496x/696x", + "COGS 4410", "CSCI 6800", "MATH 6800", "CSCI 6820", "MATH 6820", "CSCI 6840", + "MATH 6840", "CSCI 6860", "MATH 6860", "CSCI696x", "ECSE 4170/6170", "ECSE 4850", + "ECSE 496x/696x", "ECSE 6610", "MATH 4840", "MATP 4820/6610", "MATP 6640"] + }, + { + "name" :"Systems and Software", + "Field": ["CSCI 4220", "CSCI 4310/6310", "CSCI 4320/6360", "CSCI 4380", "CSCI 4440", + "CSCI 4450/6450", "CSCI 4460/6460","CSCI 4500/6500","CSCI 4510/6510","CSCI 496x", + "CSCI 496x/696x", "ITWS 496x","ITWS 4500","ECSE 4670","CSCI 4470", + "ECSE 4740","ECSE 4770","ECSE 4780","ECSE 4790","ECSE 496x"] + }, + { + "name": "Artificial Intelligence and Data", + "Field": ["CSCI 4100/6100","CSCI 4110/6110","CSCI 4130/6130","CSCI 4150","CSCI 4270/6270", + "CSCI 4340/6340","CSCI 4350/6350","ITWS 4350/6350","CSCI 4370/6370","CSCI 4380", + "CSCI 4390/6390","CSCI 4400/6400","CSCI 4420" ,"PHIL 4420 ","MATH 4030","CSCI 4480", + "ECSE 4480","CSCI 4490/6490","ECSE 4490/6490","CSCI 496x/696x","COGS 4410", + "ECSE 4850/496x","ECSE 496x","ECSE 6610"] + }, + { + "name" :"Vision, Graphics, Robotics, and Games", + "Field": ["CSCI 4270/6270","CSCI 4320/6360","CSCI 4480","ECSE 4480","CSCI 4490/6490", + "ECSE 4490/6490","CSCI 4520","CSCI 4530/6530","CSCI 4540","CSCI 4550/6550", + "CSCI 496x/696x","ECSE 4740","ECSE 4750/696x","ECSE4620/6620","ECSE 6650", + "ECSE 696x","GSAS 4550"] + } + ] + } +} \ No newline at end of file diff --git a/rpi_data/graduation-requirement/DegreeParser/DegreepParser.pde b/rpi_data/graduation-requirement/DegreeParser/DegreepParser.pde new file mode 100644 index 000000000..159dfb991 --- /dev/null +++ b/rpi_data/graduation-requirement/DegreeParser/DegreepParser.pde @@ -0,0 +1,23 @@ +void setup(){ + String raw = "or 4010* or 4070* or 4080* or 4140 or 4150 or 4240* or 4270 or 4440* or 4620* or 4640* or 4660* or 4670 or 4110 or 4200 or 4330* or 4340* or 4350* or 2120* or 2330* or 4710* or 4800*"; + String[] list = split(raw, ' '); + String[] term = {"CIVL ", "ENEV ", "ERTH ", "MATH"}; + int[] sizes = {13, 5, 3, 1}; + int count = 0; + for(int i = 0; i< list.length; i++) + { + if( list[i].equals("or")) + { + print( ", \""); + if(sizes[count] == 0) + { + count++; + } + sizes[count]--; + print(term[count]); + }else + { + print(list[i] + "\""); + } + } +} \ No newline at end of file diff --git a/rpi_data/graduation-requirement/ITWS-2022.json b/rpi_data/graduation-requirement/ITWS-2022.json new file mode 100644 index 000000000..0055271cf --- /dev/null +++ b/rpi_data/graduation-requirement/ITWS-2022.json @@ -0,0 +1,147 @@ +{ + "class": 2022, + "major": "itws", + "totalCredits": 128, + "requirments": [ + { + "Option": "Physical Science Elective", + "Field": ["PHYS xxxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "Option": "Life Science Elective", + "Field": ["BIOL xxxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "Option": "Mathematics/Science Required", + "Field": ["MATH 1010", "CSCI 1200", "CSCI 1100"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 3 + }, + { + "Option": "Mathematics Option II", + "Field": ["MATH xxxx"], + "PnC": "NA", + "Exceptions": "MATH 1010", + "Number of classes": 1 + }, + { + "Option": "HASS Required", + "Field": ["ITWS-1220", "ITWS-2210"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 2 + }, + { + "Option": "HASS Elective: Humanities", + "Field": [""], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "Option": "HASS Elective: Social Science", + "Field": [""], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "Option": "HASS Elective: HASS", + "Field": [""], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 2 + }, + { + "Option": "Free Elective", + "Field": ["xxxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 2 + }, + { + "Option": "ITWS Core", + "Field": ["CSCI-4380 ", "MGMT-4170 "], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 4 + }, + { + "Option": "ITWS Elective", + "Field": ["ITWS-1100", "ITWS-2110", "ITWS-4500", "ITWS-4310"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 4 + }, + { + "Option": "Capstone/Thesis", + "Field": ["ITWS-4100", "ITWS-4990"], + "PnC": "NA", + "Exceptions": "NA", + "Note": "TWS-4100 Information Technology and Web Science Capstone (Professional Track) or ITWS-4990 Senior Thesis (Research Track – Two Semesters)" , + "Number of classes": 1 + }, + { + "Option": "Technical Tracks", + "Field": [""], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 3 + }, + { + "Option": "Student-Selected Concentration courses", + "Field": [""], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 6 + }, + { + "Option": "Student-Selected Concentration Elective", + "Field": [""], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + } + ], + "Technical Tracks": + [ + { + "Track Title" : "Computer Engineering Track", + "Course I": ["ECSE-2610"], + "Course II": ["ENGR-2350"], + "Course III": ["ECSE-2660"] + }, + { + "Track Title" : "Computer Science Track", + "Course I": ["CSCI-2200"], + "Course II": ["CSCI-2300"], + "Course III": ["CSCI-2500"] + }, + { + "Track Title" : "Information Systems Track", + "Course I": ["CSCI-2200"], + "Course II": ["CSCI-2500"], + "Course III": ["MGMT-2100", "BIOL-4200", "CSCI-2300"] + }, + { + "Track Title" : "Web Science Track", + "Course I": ["ECSE-2610"], + "Course II": ["ENGR-2350"], + "Course III": ["ECSE-2660"] + } + ], + "Concentrations": + [{ + "Title": "Arts", + "Options": + [ + ] + }] +} \ No newline at end of file diff --git a/rpi_data/graduation-requirement/IntergratedPathWay.json b/rpi_data/graduation-requirement/IntergratedPathWay.json new file mode 100644 index 000000000..4eaa77a7d --- /dev/null +++ b/rpi_data/graduation-requirement/IntergratedPathWay.json @@ -0,0 +1,86 @@ +{ + "Topics": + [ + { + "Topic" :"Artificial Intelligence", + "requirments": [ + { + "option": "Pathway Course I", + "Field": ["IHSS 1140", "IHSS 1972", "IHSS 1235"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Pathway Course II", + "Field": ["COGS 2120"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Pathway Course III", + "Field": ["COGS 4210","COGS 4410","COGS 4420","COGS 4640", "COGS 4880" ,"COGS 4960", + "COGS 4960","PHIL 4960" ], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + } + ], + "Compatible minors": ["Cognitive Science of Artificial Intelligence"] + }, + { + "Topic" :"Arts History, Theory, and Criticism", + "requirments": [ + { + "option": "Pathway Course I", + "Field": ["ARTS 1050","IHSS 1080","IHSS 1300","IHSS 1170","IHSS 1700","IHSS 1965","IHSS 1960"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Pathway Course II", + "Field": ["ARTS 2500","ARTS 2540","ARTS 4130"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 2 + } + ], + "Compatible minors": ["NA"] + }, + { + "Topic" :"Artificial Intelligence", + "requirments": [ + { + "option": "Pathway Course I", + "Field": ["PSYC 1200"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Pathway Course II", + "Field": ["IHSS 19XX","PSYC 4320/COGS","PSYC 4330/COGS","PSYC 4500","PSYC 4600/COGS","PSYC 4610/COGS","PSYC 4700/COGS"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 2 + } + ], + "Compatible minors": ["Behavioral and Cognitive Neuroscience"] + }, + { + "Topic" :"Artificial Intelligence", + "requirments": [ + { + "option": "Pathway Course I", + "Field": ["LANG 1010","LANG 2340","LANG 4420","LANG 4430","LANG 4470"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 3 + } + ], + "Compatible minors": ["Chinese Language"] + } + ] +} \ No newline at end of file diff --git a/rpi_data/graduation-requirement/IntergretedPathWay/IntergretedPathWay.pde b/rpi_data/graduation-requirement/IntergretedPathWay/IntergretedPathWay.pde new file mode 100644 index 000000000..1d0daa4e1 --- /dev/null +++ b/rpi_data/graduation-requirement/IntergretedPathWay/IntergretedPathWay.pde @@ -0,0 +1,8 @@ +void setup(){ + String[] lines = loadStrings("info.txt"); + for (int i = 0 ; i < lines.length; i++) { + String[] list = split(lines[i], ' '); + print(",\"" + list[0] + ' ' + list[1] + "\""); + } + print("."); +} \ No newline at end of file diff --git a/rpi_data/graduation-requirement/IntergretedPathWay/info.txt b/rpi_data/graduation-requirement/IntergretedPathWay/info.txt new file mode 100644 index 000000000..f2b8ef09f --- /dev/null +++ b/rpi_data/graduation-requirement/IntergretedPathWay/info.txt @@ -0,0 +1,5 @@ +LANG 1010 – Chinese I +LANG 2340 – Chinese II +LANG 4420 – Chinese III +LANG 4430 – Chinese IV +LANG 4470 – Chinese V \ No newline at end of file diff --git a/rpi_data/graduation-requirement/README.txt b/rpi_data/graduation-requirement/README.txt new file mode 100644 index 000000000..f273fa7b1 --- /dev/null +++ b/rpi_data/graduation-requirement/README.txt @@ -0,0 +1,2 @@ +This folder will be holding data for different degree requirment. +They will be following class-major-concentration format. \ No newline at end of file diff --git a/rpi_data/graduation-requirement/Template/Course { b/rpi_data/graduation-requirement/Template/Course { new file mode 100644 index 000000000..fb6068e70 --- /dev/null +++ b/rpi_data/graduation-requirement/Template/Course { @@ -0,0 +1,37 @@ +Course { + type: "Course", + name: str, + department: str, + creditHours: int, + description?: str, + pre-requsit-of: str +} + +Options-Courses : Course { + creditHours: int + type: "Options", + name: str, + description: str, + options: Course[] +} + +Options-Department : Course { + creditHours: int + type: "Options", + name: str, + description: str, + Departments: str[] +} + +Semester { + name: str + courses: (Course|Options-Courses|Options-Department) [] +} + +Template { + id: str, + degree: str, + major: str, + year: int, + semesters: Semester[] +} \ No newline at end of file diff --git a/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json b/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json new file mode 100644 index 000000000..0ae787d9c --- /dev/null +++ b/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json @@ -0,0 +1,313 @@ +{ + "id": "UN_CSCI_2019", + "degree": "UN", + "major": "CSCI", + "year": 2019, + "semesters": [ + { + "semester-name": "SemesterOne", + "courses": [ + { + "type": "Course", + "name": "CSCI-1100", + "department": "CSCI", + "creditHours": 4, + "description": "Students with sufficient background in computer science may skip CSCI 1100 and replace it with four credits of other CSCI course(s) at the 2000 level or above", + "pre-requsit-of": ["CSCI-1200"] + }, + { + "type": "Course", + "name": "MATH-1100", + "department": "MATH", + "creditHours": 4, + "description": "Non", + "pre-requsit-of": ["CSCI-1020"] + }, + { + "type": "Course", + "name": "PHYS-1100", + "department": "PHYS", + "creditHours": 4, + "description": "If no prior experience in MATH1010, we recommend taking BIOL 1010and BIOL 1015 in the fall semesterof the first year; otherwise, we recommend taking PHYS 1100 in the fall semesterof the first year", + "pre-requsit-of": ["PHYS-1020"] + }, + { + "type": "Option-Departments", + "name": "HASS ELECTIVE", + "creditHours": 16, + "description": "Non", + "Departments": ["HASS"] + } + ] + }, + + { + "semester-name": "SemesterTwo", + "courses": [ + { + "type": "Course", + "name": "CSCI-1200", + "department": "CSCI", + "creditHours": 4, + "description": "Non", + "pre-requsit-of": ["CSCI-2200", "CSCI-2500"] + }, + { + "type": "Course", + "name": "MATH-1020", + "department": "MATH", + "creditHours": 4, + "description": "Non", + "pre-requsit-of": ["MATH-2XXX"] + }, + { + "type": "Course", + "name": "BIOL-1010", + "department": "BIOL", + "creditHours": 3, + "description": "If no prior experience in MATH1010, we recommend taking BIOL 1010and BIOL 1015 in the fall semesterof the first year; otherwise, we recommend taking PHYS 1100 in the fall semesterof the first year", + "pre-requsit-of": ["PHYS-1020"] + }, + { + "type": "Course", + "name": "BIOL-1015", + "department": "BIOL", + "creditHours": 1, + "description": "If no prior experience in MATH1010, we recommend taking BIOL 1010and BIOL 1015 in the fall semesterof the first year; otherwise, we recommend taking PHYS 1100 in the fall semesterof the first year", + "pre-requsit-of": ["PHYS-1020"] + }, + { + "type": "Option-Departments", + "name": "HASS ELECTIVE", + "creditHours": 16, + "description": "Non", + "Departments": ["HASS"] + } + ] + }, + + { + "semester-name": "SemesterThree", + "courses": [ + { + "type": "Course", + "name": "CSCI-2200", + "department": "CSCI", + "creditHours": 4, + "description": "Non" + }, + { + "type": "Course", + "name": "CSCI-2500", + "department": "CSCI", + "creditHours": 4, + "description": "Non" + }, + { + "type": "Option-Courses", + "name": "Mathematics Option I", + "courses": [ + "MATH 2010", + "MATH 4030", + "MATH 4040", + "MATH 4100", + "MATP 4600" + ], + "creditHours": 4, + "description": "Non" + }, + { + "type": "Option-Departments", + "name": "HASS ELECTIVE", + "creditHours": 16, + "description": "Non", + "Departments": ["HASS"] + } + ] + }, + + { + "semester-name": "SemesterFour", + "courses": [ + { + "type": "Course", + "name": "CSCI-2300", + "department": "CSCI", + "creditHours": 4, + "description": "Non" + }, + { + "type": "Course", + "name": "CSCI-2600", + "department": "CSCI", + "creditHours": 4, + "description": "Non" + }, + { + "type": "Option-Courses", + "name": "Mathematics Option II", + "courses": ["MATH-2XXX"], + "creditHours": 4, + "description": "Mathematics Option II must be any course in MATH/MATP at the 2000 level or above (excluding MATH 2800)" + }, + { + "type": "Option-Departments", + "name": "HASS ELECTIVE", + "creditHours": 16, + "description": "Non", + "Departments": ["HASS"] + } + ] + }, + + { + "semester-name": "SemesterFive", + "courses": [ + { + "type": "Course", + "name": "CSCI-4210", + "department": "CSCI", + "creditHours": 4, + "description": "Non" + }, + { + "type": "Option-Courses", + "name": "CS Option/Capstone", + "courses": ["CSCI-4XXX"], + "creditHours": 16, + "description": "Reading and independent study coursescannot be used for these courses. Note that of the required 16 credits, any missing credits due to 3-credit courses may be made up as free elective credits." + }, + { + "type": "Option-Departments", + "name": "HASS ELECTIVE", + "creditHours": 16, + "description": "Non", + "Departments": ["HASS"] + }, + { + "type": "Option-Departments", + "name": "Free ELECTIVE", + "creditHours": 4, + "description": "Non", + "Departments": ["ALL-XXXX"] + } + ] + }, + + { + "semester-name": "SemesterSix", + "courses": [ + { + "type": "Course", + "name": "CSCI-4430", + "department": "CSCI", + "creditHours": 4, + "description": "Non" + }, + { + "type": "Option-Courses", + "name": "CS Option/Capstone", + "courses": ["CSCI-4XXX"], + "creditHours": 16, + "description": "Reading and independent study coursescannot be used for these courses. Note that of the required 16 credits, any missing credits due to 3-credit courses may be made up as free elective credits." + }, + { + "type": "Option-Departments", + "name": "HASS ELECTIVE", + "creditHours": 16, + "description": "Non", + "Departments": ["HASS"] + }, + { + "type": "Option-Departments", + "name": "Free ELECTIVE", + "creditHours": 4, + "description": "Non", + "Departments": ["ALL-XXXX"] + }, + { + "type": "Option-Departments", + "name": "Science Option", + "creditHours": 4, + "description": "Non", + "Departments": [ + "ASTR-XXXX", + "BIOL-XXXX", + "CHEM-XXXX", + "ERTH-XXXX", + "ENVI-XXXX", + "PHYS-XXXX" + ] + } + ] + }, + + { + "semester-name": "SemesterSeven", + "courses": [ + { + "type": "Course", + "name": "CSCI-4430", + "department": "CSCI", + "creditHours": 4, + "description": "Non" + }, + { + "type": "Option-Courses", + "name": "CS Option/Capstone", + "courses": ["CSCI-4XXX"], + "creditHours": 16, + "description": "Reading and independent study coursescannot be used for these courses. Note that of the required 16 credits, any missing credits due to 3-credit courses may be made up as free elective credits." + }, + { + "type": "Option-Departments", + "name": "Free ELECTIVE", + "creditHours": 4, + "description": "Non", + "Departments": ["ALL-XXXX"] + }, + { + "type": "Option-Departments", + "name": "Free ELECTIVE", + "creditHours": 4, + "description": "Non", + "Departments": ["ALL-XXXX"] + } + ] + }, + + { + "semester-name": "SemesterEight", + "courses": [ + { + "type": "Option-Courses", + "name": "CS Option/Capstone", + "courses": ["CSCI-4XXX"], + "creditHours": 16, + "description": "Reading and independent study coursescannot be used for these courses. Note that of the required 16 credits, any missing credits due to 3-credit courses may be made up as free elective credits." + }, + { + "type": "Option-Courses", + "name": "CS Option/Capstone", + "courses": ["CSCI-4XXX"], + "creditHours": 16, + "description": "Reading and independent study coursescannot be used for these courses. Note that of the required 16 credits, any missing credits due to 3-credit courses may be made up as free elective credits." + }, + { + "type": "Option-Departments", + "name": "Free ELECTIVE", + "creditHours": 4, + "description": "Non", + "Departments": ["ALL-XXXX"] + }, + { + "type": "Option-Departments", + "name": "Free ELECTIVE", + "creditHours": 4, + "description": "Non", + "Departments": ["ALL-XXXX"] + } + ] + } + ] +} diff --git a/rpi_data/graduation-requirement/class : 2022 b/rpi_data/graduation-requirement/class : 2022 new file mode 100644 index 000000000..83ebad447 --- /dev/null +++ b/rpi_data/graduation-requirement/class : 2022 @@ -0,0 +1,51 @@ +class: 2022 +major : csci +total credits: 128 +requirments: + Science Option: + Filed: astronomy, biology, chemistry, earth and environmental science, and physics + PnC: NA + Exceptions: ERTH 1030 + Number of classes: 1 + Mathematics Option I: + Filed: MATH 2010, MATH 4030, MATH 4040, MATH 4100, or MATP 4600 + PnC: NA + Exceptions: NA + Number of classes: 1 + Mathematics Option II: + Filed: MATH 2xxx + PnC: NA + Exceptions: MATH 2800 + Number of classes: 1 + Computer Science(CS) Options: + Filed: CSCI 4xxx + PnC: NA + Exceptions: Reading and independent study courses + Number of classes: 4 + Computer Science Capstone: + Filed: URP 4xxx + PnC: NA + Exceptions: NA + Number of classes: 1 +Concentrations: + different concentrations: 4 + Number of Required Courese: 3 + Theory and Algorithms: + Filed: CSCI 4020/6020, CSCI 4030/6220, CSCI 4040/6040, CSCI 4100/6100, CSCI 4110/6110, CSCI 4120/6120, + CSCI 4150, CSCI 4230/6230, CSCI 4240/6240, CSCI 4250/6250, CSCI 4260, MATH 4150, + CSCI 4420, PHIL 4420, MATH 4030, CSCI 4510/6510, CSCI 4800, MATH 4800, CSCI 4820, MATH 4820, CSCI 496x/696x, + COGS 4410, CSCI 6800, MATH 6800, CSCI 6820, MATH 6820, CSCI 6840, MATH 6840, CSCI 6860, MATH 6860, CSCI696x, + ECSE 4170/6170, ECSE 4850, ECSE 496x/696x, ECSE 6610, MATH 4840, MATP 4820/6610, MATP 6640 + Systems and Software: + Filed: CSCI 4220, CSCI 4310/6310, CSCI 4320/6360, CSCI 4380, CSCI 4440, CSCI 4450/6450, CSCI 4460/6460,CSCI 4500/6500, + CSCI 4510/6510,CSCI 496x,CSCI 496x/696x, ITWS 496x,ITWS 4500,ECSE 4670,CSCI 4470, + ECSE 4740,ECSE 4770,ECSE 4780,ECSE 4790,ECSE 496x + Artificial Intelligence and Data: + Filed: CSCI 4100/6100,CSCI 4110/6110,CSCI 4130/6130,CSCI 4150,CSCI 4270/6270,CSCI 4340/6340,CSCI 4350/6350, + ITWS 4350/6350,CSCI 4370/6370,CSCI 4380,CSCI 4390/6390,CSCI 4400/6400,CSCI 4420 ,PHIL 4420 ,MATH 4030, + CSCI 4480,ECSE 4480,CSCI 4490/6490,ECSE 4490/6490,CSCI 496x/696x,COGS 4410,ECSE 4850/496x,ECSE 496x, + ECSE 6610 + Vision, Graphics, Robotics, and Games: + Filed: CSCI 4270/6270,CSCI 4320/6360,CSCI 4480,ECSE 4480,CSCI 4490/6490,ECSE 4490/6490,CSCI 4520, + CSCI 4530/6530,CSCI 4540,CSCI 4550/6550,CSCI 496x/696x,ECSE 4740,ECSE 4750/696x,ECSE4620/6620, + ECSE 6650,ECSE 696x,GSAS 4550 diff --git a/src/api/app.py b/src/api/app.py index 69f42c68f..82b789796 100644 --- a/src/api/app.py +++ b/src/api/app.py @@ -16,6 +16,7 @@ import db.admin as AdminInfo import db.student_course_selection as CourseSelect import db.user as UserModel +import db.degree_templates as DegreeTemplates import controller.user as user_controller import controller.session as session_controller import controller.userevent as event_controller @@ -43,6 +44,9 @@ admin_info = AdminInfo.Admin(db_conn) course_select = CourseSelect.student_course_selection(db_conn) semester_info = SemesterInfo.semester_info(db_conn) + +degree_templates = DegreeTemplates.DegreeTemplate(db_conn) + users = UserModel.User() def is_admin_user(): @@ -261,5 +265,19 @@ def get_student_courses(): courses, error = course_select.get_selection(info['uid']) return jsonify(courses) if not error else Response(error, status=500) +@app.route('/api/degreeTemplate', methods=['GET']) +def get_degree_template_demo(): + templates = degree_templates.get_template_demo() + return jsonify(templates) + +@app.route('/api/degreeTemplate', methods=['POST']) +def add_degree_template(): + template = request.get_json() + resp, error = degree_templates.import_degree_template(template) + return Response(status=204) if not error else Response(error, status=500) + + if __name__ == '__main__': app.run(debug=os.environ.get('DEBUG', 'True'), host='0.0.0.0', port=5000) + + diff --git a/src/api/db/degree_templates.py b/src/api/db/degree_templates.py new file mode 100644 index 000000000..e15003254 --- /dev/null +++ b/src/api/db/degree_templates.py @@ -0,0 +1,97 @@ +import glob +import os +import csv +import re +import json +from psycopg2.extras import RealDictCursor +from ast import literal_eval + +# https://stackoverflow.com/questions/54839933/importerror-with-from-import-x-on-simple-python-files +if __name__ == "__main__": + import connection +else: + from . import connection + +class DegreeTemplate: + def __init__(self, db_wrapper): + self.db_conn = db_wrapper + + def parse(self, data): + self.id = data["degree"] + "-" + data["major"] + "-" + str(data["year"]) + self.degree = data["degree"] + self.major = data["major"] + self.year = data["year"] + self.template = json.dumps(data["semesters"]) + + + def insert_into_db(self, transaction): + print ("!!!!!!!!LOOK" + self.template) + #try: + #convert json as text and insert it as text type instead of varchar + transaction.execute(""" + INSERT INTO degree_templates( + id, + degree, + major, + year, + template + ) VALUES ( + %(id)s, + %(degree)s, + %(major)s, + %(year)d, + %(template)s, + ) + ON CONFLICT DO NOTHING; + """, + { + "id": self.id, + "degree": self.degree, + "major": self.major, + "year" : self.year, + "template" : self.template + + }); + #except Exception as e: + # print(e) + #return (False, e) + + # taking in degree template json file and inserting into database + + def import_degree_template(self, data): + # taking in raw data, parsing it into objects + #degree_template_JSON = json.load(data) + degreeTemplate = self.parse(data) + # after parsing all the parts into objects, insert objects into database + db_conn = self.db_conn.get_connection() + with db_conn.cursor(cursor_factory=RealDictCursor) as transaction: + self.insert_into_db(transaction) + + db_conn.commit() + # invalidate cache so we can get new classes + #self.cache.clear() + return (True, None) + + + + def get_template(self): + return self.db_conn.execute(""" + select + * + from + degree_templates + """, None, True) + + def get_template_demo(self): + json_file = open('../../rpi_data/graduation-requirement/Template/UN-CSCI-2019.json', 'r') + json_text = json.load(json_file) + json_file.close() + return [json_text] + +if __name__ == "__main__": + # os.chdir(os.path.abspath("../rpi_data")) + # fileNames = glob.glob("*.csv") + json_text = open('../../../rpi_data/graduation-requirement/Template/UN-CSCI-2019.json', 'r') + courses = Courses(connection.db) + courses.import_degree_template(json_text) + \ No newline at end of file diff --git a/src/data/build.sh b/src/data/build.sh index cb80d94cb..c0db9da48 100755 --- a/src/data/build.sh +++ b/src/data/build.sh @@ -11,3 +11,4 @@ psql -d yacs < $SCRIPTDIR/schema/08_user_session.sql psql -d yacs < $SCRIPTDIR/schema/09_user_event.sql psql -d yacs < $SCRIPTDIR/schema/10_student_course_selection.sql psql -d yacs < $SCRIPTDIR/schema/11_semester_info.sql +psql -d yacs < $SCRIPTDIR/schema/12_degree_templates.sql diff --git a/src/data/schema/12_degree_templates.sql b/src/data/schema/12_degree_templates.sql new file mode 100644 index 000000000..08e46a07f --- /dev/null +++ b/src/data/schema/12_degree_templates.sql @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS degree_templates; + +CREATE TABLE degree_templates ( + id varchar(255), + degree varchar(255), + major varchar(255), + year int, + template text,/*ITWS_2018_sm1 */ + PRIMARY KEY (id) +); + +/* +CREATE TABLE degree_templates_semester ( + course1 varchar(255), + course2 varchar(255), + course3 varchar(255), + course4 varchar(255), + course5 varchar(255), + semestersName varchar(255), + PRIMARY KEY (semestersName) +); + +CREATE TABLE degree_option_course ( + name varchar(255), + description varchar(255), + id varchar(255), + PRIMARY KEY (name) +); +*/ \ No newline at end of file diff --git a/src/web/package-lock.json b/src/web/package-lock.json index e7ed78452..f9e872190 100644 --- a/src/web/package-lock.json +++ b/src/web/package-lock.json @@ -10635,6 +10635,11 @@ "is-plain-obj": "^1.0.0" } }, + "sortablejs": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz", + "integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A==" + }, "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", @@ -11840,6 +11845,14 @@ "vue-resize": "^0.4.5" } }, + "vuedraggable": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.0.tgz", + "integrity": "sha512-IlslPpc+iZ2zPNSJbydFZIDrE+don5u+Nc/bjT2YaF+Azidc+wxxJKfKT0NwE68AKk0syb0YbZneAcnynqREZQ==", + "requires": { + "sortablejs": "^1.10.1" + } + }, "watchpack": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz", diff --git a/src/web/package.json b/src/web/package.json index f0324066e..38a656e2d 100644 --- a/src/web/package.json +++ b/src/web/package.json @@ -22,7 +22,8 @@ "vue": "^2.6.11", "vue-cookies": "^1.7.0", "vue-router": "^3.1.6", - "vue-virtual-scroller": "^1.0.10" + "vue-virtual-scroller": "^1.0.10", + "vuedraggable": "^2.24.0" }, "devDependencies": { "@babel/polyfill": "^7.8.7", diff --git a/src/web/src/pages/DegreeTemplates.vue b/src/web/src/pages/DegreeTemplates.vue index 982e4d3ca..cf9818cb6 100644 --- a/src/web/src/pages/DegreeTemplates.vue +++ b/src/web/src/pages/DegreeTemplates.vue @@ -1,11 +1,123 @@ -