From 11cdf41399cf03c8391c47bcb04e8231283eae52 Mon Sep 17 00:00:00 2001 From: tant2 Date: Sat, 13 Jun 2020 19:48:48 -0400 Subject: [PATCH 01/22] creating readme and data storage folder --- rpi_data/Degree-works/README.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 rpi_data/Degree-works/README.txt diff --git a/rpi_data/Degree-works/README.txt b/rpi_data/Degree-works/README.txt new file mode 100644 index 000000000..f273fa7b1 --- /dev/null +++ b/rpi_data/Degree-works/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 From 1c0ab386950819af819319105cf547e447f4ec84 Mon Sep 17 00:00:00 2001 From: tant2 Date: Sun, 14 Jun 2020 18:34:55 -0400 Subject: [PATCH 02/22] Ddegree Requirment for CSCI-2022 --- rpi_data/Degree-works/CSCI-2022.json | 82 ++++++++++++++++++++++++++++ rpi_data/Degree-works/class : 2022 | 51 +++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 rpi_data/Degree-works/CSCI-2022.json create mode 100644 rpi_data/Degree-works/class : 2022 diff --git a/rpi_data/Degree-works/CSCI-2022.json b/rpi_data/Degree-works/CSCI-2022.json new file mode 100644 index 000000000..e77ab0d9d --- /dev/null +++ b/rpi_data/Degree-works/CSCI-2022.json @@ -0,0 +1,82 @@ +{ + "class": 2022, + "major": "csci", + "totalCredits": 128, + "requirments": [ + { + "option": "Science Option", + "Filed": ["ASTR", "BIOL", "CHEM", "ERTH", "ENVI" , "PHYC"], + "PnC": "NA", + "Exceptions": "ERTH 1030", + "Number of classes": 1 + }, + { + "option": "Mathematics Option I", + "Filed": ["MATH 2010", "MATH 4030", "MATH 4040", "MATH 4100", "MATP 4600"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + }, + { + "option": "Mathematics Option II", + "Filed": ["MATH 2xxx", "MATH 4xxx"], + "PnC": "NA", + "Exceptions": "MATH 2800", + "Number of classes": 1 + }, + { + "option": "Computer Science(CS) Options", + "Filed": ["CSCI 4xxx"], + "PnC": "NA", + "Exceptions": "Reading and independent study courses", + "Number of classes": 4 + }, + { + "option": "Computer Science Capstone", + "Filed": ["URP 4xxx"], + "PnC": "NA", + "Exceptions": "NA", + "Number of classes": 1 + } + ], + + "Concentrations": + { + "Courese": 3, + "options": + [ + { + "name" :"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"] + }, + { + "name" :"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"] + }, + { + "name": "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"] + }, + { + "name" :"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"] + } + ] + } +} \ No newline at end of file diff --git a/rpi_data/Degree-works/class : 2022 b/rpi_data/Degree-works/class : 2022 new file mode 100644 index 000000000..83ebad447 --- /dev/null +++ b/rpi_data/Degree-works/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 From 5a6095e4a8efba15c565d8c9ec9cf6172a425b33 Mon Sep 17 00:00:00 2001 From: tant2 Date: Tue, 16 Jun 2020 15:05:26 -0400 Subject: [PATCH 03/22] Update CSCI-2022.json --- rpi_data/Degree-works/CSCI-2022.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpi_data/Degree-works/CSCI-2022.json b/rpi_data/Degree-works/CSCI-2022.json index e77ab0d9d..8e8fbf3e2 100644 --- a/rpi_data/Degree-works/CSCI-2022.json +++ b/rpi_data/Degree-works/CSCI-2022.json @@ -5,10 +5,10 @@ "requirments": [ { "option": "Science Option", - "Filed": ["ASTR", "BIOL", "CHEM", "ERTH", "ENVI" , "PHYC"], + "Field": ["ASTRxxxx", "BIOLxxxx", "CHEMxxxx", "ERTHxxxx", "ENVIxxxx" , "PHYCxxxx"], "PnC": "NA", "Exceptions": "ERTH 1030", - "Number of classes": 1 + "Number of classes": 2 }, { "option": "Mathematics Option I", From ff06e8b80d14561f37e11d527f94ad2a52b1d18d Mon Sep 17 00:00:00 2001 From: tant2 Date: Sat, 20 Jun 2020 15:00:57 -0400 Subject: [PATCH 04/22] Basic ITWS requirements --- rpi_data/Degree-works/CSCI-2022.json | 20 ++-- rpi_data/Degree-works/ITWS-2022.json | 147 +++++++++++++++++++++++++++ 2 files changed, 157 insertions(+), 10 deletions(-) create mode 100644 rpi_data/Degree-works/ITWS-2022.json diff --git a/rpi_data/Degree-works/CSCI-2022.json b/rpi_data/Degree-works/CSCI-2022.json index 8e8fbf3e2..3f7eb2d33 100644 --- a/rpi_data/Degree-works/CSCI-2022.json +++ b/rpi_data/Degree-works/CSCI-2022.json @@ -5,35 +5,35 @@ "requirments": [ { "option": "Science Option", - "Field": ["ASTRxxxx", "BIOLxxxx", "CHEMxxxx", "ERTHxxxx", "ENVIxxxx" , "PHYCxxxx"], + "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", - "Filed": ["MATH 2010", "MATH 4030", "MATH 4040", "MATH 4100", "MATP 4600"], + "Field": ["MATH 2010", "MATH 4030", "MATH 4040", "MATH 4100", "MATP 4600"], "PnC": "NA", "Exceptions": "NA", "Number of classes": 1 }, { "option": "Mathematics Option II", - "Filed": ["MATH 2xxx", "MATH 4xxx"], + "Field": ["MATH 2xxx", "MATH 4xxx"], "PnC": "NA", "Exceptions": "MATH 2800", "Number of classes": 1 }, { "option": "Computer Science(CS) Options", - "Filed": ["CSCI 4xxx"], + "Field": ["CSCI 4xxx"], "PnC": "NA", "Exceptions": "Reading and independent study courses", "Number of classes": 4 }, { "option": "Computer Science Capstone", - "Filed": ["URP 4xxx"], + "Field": ["URP 4xxx"], "PnC": "NA", "Exceptions": "NA", "Number of classes": 1 @@ -46,8 +46,8 @@ "options": [ { - "name" :"Theory and Algorithms", - "Filed": ["CSCI 4020/6020", "CSCI 4030/6220", "CSCI 4040/6040", "CSCI 4100/6100", + "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", @@ -57,14 +57,14 @@ }, { "name" :"Systems and Software", - "Filed": ["CSCI 4220", "CSCI 4310/6310", "CSCI 4320/6360", "CSCI 4380", "CSCI 4440", + "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", - "Filed": ["CSCI 4100/6100","CSCI 4110/6110","CSCI 4130/6130","CSCI 4150","CSCI 4270/6270", + "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", @@ -72,7 +72,7 @@ }, { "name" :"Vision, Graphics, Robotics, and Games", - "Filed": ["CSCI 4270/6270","CSCI 4320/6360","CSCI 4480","ECSE 4480","CSCI 4490/6490", + "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"] diff --git a/rpi_data/Degree-works/ITWS-2022.json b/rpi_data/Degree-works/ITWS-2022.json new file mode 100644 index 000000000..0055271cf --- /dev/null +++ b/rpi_data/Degree-works/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 From c1f47d60474ebb2bfd42b25e353bc963b800f22e Mon Sep 17 00:00:00 2001 From: tant2 Date: Sat, 20 Jun 2020 15:10:05 -0400 Subject: [PATCH 05/22] Change the name of folder --- rpi_data/{Degree-works => graduation-requirement}/CSCI-2022.json | 0 rpi_data/{Degree-works => graduation-requirement}/ITWS-2022.json | 0 rpi_data/{Degree-works => graduation-requirement}/README.txt | 0 rpi_data/{Degree-works => graduation-requirement}/class : 2022 | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename rpi_data/{Degree-works => graduation-requirement}/CSCI-2022.json (100%) rename rpi_data/{Degree-works => graduation-requirement}/ITWS-2022.json (100%) rename rpi_data/{Degree-works => graduation-requirement}/README.txt (100%) rename rpi_data/{Degree-works => graduation-requirement}/class : 2022 (100%) diff --git a/rpi_data/Degree-works/CSCI-2022.json b/rpi_data/graduation-requirement/CSCI-2022.json similarity index 100% rename from rpi_data/Degree-works/CSCI-2022.json rename to rpi_data/graduation-requirement/CSCI-2022.json diff --git a/rpi_data/Degree-works/ITWS-2022.json b/rpi_data/graduation-requirement/ITWS-2022.json similarity index 100% rename from rpi_data/Degree-works/ITWS-2022.json rename to rpi_data/graduation-requirement/ITWS-2022.json diff --git a/rpi_data/Degree-works/README.txt b/rpi_data/graduation-requirement/README.txt similarity index 100% rename from rpi_data/Degree-works/README.txt rename to rpi_data/graduation-requirement/README.txt diff --git a/rpi_data/Degree-works/class : 2022 b/rpi_data/graduation-requirement/class : 2022 similarity index 100% rename from rpi_data/Degree-works/class : 2022 rename to rpi_data/graduation-requirement/class : 2022 From c1735c666b4605a4f7daad6ad9090bda7a2812ae Mon Sep 17 00:00:00 2001 From: tant2 Date: Sat, 27 Jun 2020 17:15:25 -0400 Subject: [PATCH 06/22] Create CIVL-2022.json --- .../graduation-requirement/CIVL-2022.json | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 rpi_data/graduation-requirement/CIVL-2022.json 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 From e8bea560896568844b4a37902791727bfea70f4a Mon Sep 17 00:00:00 2001 From: tant2 Date: Sat, 27 Jun 2020 18:35:06 -0400 Subject: [PATCH 07/22] Create IntergratedPathWay.json 4 different Intergrated Pathway --- .../IntergratedPathWay.json | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 rpi_data/graduation-requirement/IntergratedPathWay.json 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 From d5454263c72cade490c63ea7bf24380a8766b24d Mon Sep 17 00:00:00 2001 From: tant2 Date: Sat, 27 Jun 2020 18:40:54 -0400 Subject: [PATCH 08/22] 4 Intergrated Pathway Example and 2 helper functions One for SIS DegreeWorks and one for Intergraeted PathWay --- .../DegreeParser/DegreepParser.pde | 23 +++++++++++++++++++ .../IntergretedPathWay/IntergretedPathWay.pde | 8 +++++++ .../IntergretedPathWay/info.txt | 5 ++++ 3 files changed, 36 insertions(+) create mode 100644 rpi_data/graduation-requirement/DegreeParser/DegreepParser.pde create mode 100644 rpi_data/graduation-requirement/IntergretedPathWay/IntergretedPathWay.pde create mode 100644 rpi_data/graduation-requirement/IntergretedPathWay/info.txt 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/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 From 9e24928ec81976c6d1ccfd70b2ff5aa75dbc47a9 Mon Sep 17 00:00:00 2001 From: tant2 Date: Fri, 17 Jul 2020 14:22:13 -0400 Subject: [PATCH 09/22] Sample for CSCI template --- .../graduation-requirement/Template/Course { | 37 ++ .../Template/Template-CSCI-2019.json | 325 ++++++++++++++++++ 2 files changed, 362 insertions(+) create mode 100644 rpi_data/graduation-requirement/Template/Course { create mode 100644 rpi_data/graduation-requirement/Template/Template-CSCI-2019.json 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/Template-CSCI-2019.json b/rpi_data/graduation-requirement/Template/Template-CSCI-2019.json new file mode 100644 index 000000000..8e16d0743 --- /dev/null +++ b/rpi_data/graduation-requirement/Template/Template-CSCI-2019.json @@ -0,0 +1,325 @@ +{ + "id": "UN-CSCI-2019", + "degree": "UN", + "major": "CSCI", + "year": 2019, + "semesters": + [ + { + "semester-nmae":"Semester One", + "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-nmae":"Semester Two", + "courses": + [ + { + "type": "Course", + "name": "CSCI-1200", + "department": "CSCI", + "creditHours": 4, + "description": "", + "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-nmae":"Semester Three", + "courses": + [ + { + "type": "Course", + "name": "CSCI-2200", + "department": "CSCI", + "creditHours": 4, + "description": "", + "pre-requsit-of": [] + }, + { + "type": "Course", + "name": "CSCI-2500", + "department": "CSCI", + "creditHours": 4, + "description": "", + "pre-requsit-of": [] + }, + { + "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-nmae":"Semester Four", + "courses": + [ + { + "type": "Course", + "name": "CSCI-2300", + "department": "CSCI", + "creditHours": 4, + "description": "", + "pre-requsit-of": [] + }, + { + "type": "Course", + "name": "CSCI-2600", + "department": "CSCI", + "creditHours": 4, + "description": "", + "pre-requsit-of": [] + }, + { + "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)", + "pre-requsit-of": [] + }, + { + "type": "Option-Departments", + "name":"HASS ELECTIVE", + "creditHours": 16, + "description": "Non", + "Departments":["HASS"] + } + ] + }, + + { + "semester-nmae":"Semester Five", + "courses": + [ + { + "type": "Course", + "name": "CSCI-4210", + "department": "CSCI", + "creditHours": 4, + "description": "", + "pre-requsit-of": [] + }, + { + "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.", + "pre-requsit-of": [] + }, + { + "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-nmae":"Semester Six", + "courses": + [ + { + "type": "Course", + "name": "CSCI-4430", + "department": "CSCI", + "creditHours": 4, + "description": "", + "pre-requsit-of": [] + }, + { + "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.", + "pre-requsit-of": [] + }, + { + "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-nmae":"Semester Seven", + "courses": + [ + { + "type": "Course", + "name": "CSCI-4430", + "department": "CSCI", + "creditHours": 4, + "description": "", + "pre-requsit-of": [] + }, + { + "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.", + "pre-requsit-of": [] + }, + { + "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-nmae":"Semester Eight", + "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.", + "pre-requsit-of": [] + }, + { + "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.", + "pre-requsit-of": [] + }, + { + "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"] + } + ] + } + + ] +} \ No newline at end of file From d38badd935b3e583040918e0b03af445b31287ca Mon Sep 17 00:00:00 2001 From: tant2 Date: Fri, 24 Jul 2020 14:14:19 -0400 Subject: [PATCH 10/22] Create 12_degree_templates.sql --- src/data/schema/12_degree_templates.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/data/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..095b6f4dc --- /dev/null +++ b/src/data/schema/12_degree_templates.sql @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS degree_templates; +CREATE TABLE degree_templates ( + id varchar(9), + degree varchar(255), + major varchar(4), + year int, + semesters semester, + PRIMARY KEY (id) +); From 045fcc916d15510fd3e65c13f1ce6edbc23da7a8 Mon Sep 17 00:00:00 2001 From: tant2 Date: Tue, 4 Aug 2020 22:44:06 -0400 Subject: [PATCH 11/22] Changing the schema Adepting the fact the sql cannot store array in its tables. --- src/data/schema/12_degree_templates.sql | 45 ++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/data/schema/12_degree_templates.sql b/src/data/schema/12_degree_templates.sql index 095b6f4dc..77709795c 100644 --- a/src/data/schema/12_degree_templates.sql +++ b/src/data/schema/12_degree_templates.sql @@ -4,6 +4,49 @@ CREATE TABLE degree_templates ( degree varchar(255), major varchar(4), year int, - semesters semester, + semesters1 varchar(255), + semesters2 varchar(255), + semesters3 varchar(255), + semesters4 varchar(255), + semesters5 varchar(255), + semesters6 varchar(255), + semesters7 varchar(255), + semesters8 varchar(255), PRIMARY KEY (id) ); + +CREATE TABLE degree_templates_semester ( + id varchar(9), + degree varchar(255), + major varchar(4), + year int, + 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 ( + id varchar(9), + degree varchar(255), + major varchar(4), + year int, + name varchar(255), + description varchar(255), + id varchar(255), + PRIMARY KEY (name) +); + +CREATE TABLE degree_option_department ( + id varchar(9), + degree varchar(255), + major varchar(4), + year int, + name varchar(255), + description varchar(255), + id varchar(255), + PRIMARY KEY (name) +); \ No newline at end of file From e3a12c742834db7992c65da31f40da5945eb6828 Mon Sep 17 00:00:00 2001 From: tant2 Date: Wed, 5 Aug 2020 14:40:45 -0400 Subject: [PATCH 12/22] Update 12_degree_templates.sql --- src/data/schema/12_degree_templates.sql | 26 ++++--------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/src/data/schema/12_degree_templates.sql b/src/data/schema/12_degree_templates.sql index 77709795c..c6bb84a12 100644 --- a/src/data/schema/12_degree_templates.sql +++ b/src/data/schema/12_degree_templates.sql @@ -1,10 +1,11 @@ DROP TABLE IF EXISTS degree_templates; + CREATE TABLE degree_templates ( - id varchar(9), + id varchar(255), degree varchar(255), - major varchar(4), + major varchar(255), year int, - semesters1 varchar(255), + semesters1 varchar(255),/*ITWS_2018_sm1 */ semesters2 varchar(255), semesters3 varchar(255), semesters4 varchar(255), @@ -16,10 +17,6 @@ CREATE TABLE degree_templates ( ); CREATE TABLE degree_templates_semester ( - id varchar(9), - degree varchar(255), - major varchar(4), - year int, course1 varchar(255), course2 varchar(255), course3 varchar(255), @@ -30,21 +27,6 @@ CREATE TABLE degree_templates_semester ( ); CREATE TABLE degree_option_course ( - id varchar(9), - degree varchar(255), - major varchar(4), - year int, - name varchar(255), - description varchar(255), - id varchar(255), - PRIMARY KEY (name) -); - -CREATE TABLE degree_option_department ( - id varchar(9), - degree varchar(255), - major varchar(4), - year int, name varchar(255), description varchar(255), id varchar(255), From 6c697d2da61aeaafd58218415b867625a428e8d5 Mon Sep 17 00:00:00 2001 From: tant2 Date: Wed, 5 Aug 2020 14:48:39 -0400 Subject: [PATCH 13/22] Create degree_templates.py --- src/api/db/degree_templates.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/api/db/degree_templates.py diff --git a/src/api/db/degree_templates.py b/src/api/db/degree_templates.py new file mode 100644 index 000000000..3319088dc --- /dev/null +++ b/src/api/db/degree_templates.py @@ -0,0 +1,20 @@ +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 DegreeTemplates: + def __init__(self, db_wrapper, cache): + self.db = db_wrapper + self.cache = cache + + \ No newline at end of file From 17d8d2b16b05c7a2ebfe9545b970df8548597bd5 Mon Sep 17 00:00:00 2001 From: tant2 Date: Sun, 9 Aug 2020 15:07:25 -0400 Subject: [PATCH 14/22] small changes --- .../Template/Template-CSCI-2019.json | 18 +++---- src/api/db/degree_templates.py | 54 ++++++++++++++++++- src/data/schema/12_degree_templates.sql | 13 ++--- 3 files changed, 65 insertions(+), 20 deletions(-) diff --git a/rpi_data/graduation-requirement/Template/Template-CSCI-2019.json b/rpi_data/graduation-requirement/Template/Template-CSCI-2019.json index 8e16d0743..4820517eb 100644 --- a/rpi_data/graduation-requirement/Template/Template-CSCI-2019.json +++ b/rpi_data/graduation-requirement/Template/Template-CSCI-2019.json @@ -1,12 +1,12 @@ { - "id": "UN-CSCI-2019", + "id": "UN_CSCI_2019", "degree": "UN", "major": "CSCI", "year": 2019, "semesters": [ { - "semester-nmae":"Semester One", + "semester-name":"SemesterOne", "courses": [ { @@ -44,7 +44,7 @@ }, { - "semester-nmae":"Semester Two", + "semester-name":"SemesterTwo", "courses": [ { @@ -90,7 +90,7 @@ }, { - "semester-nmae":"Semester Three", + "semester-name":"SemesterThree", "courses": [ { @@ -127,7 +127,7 @@ }, { - "semester-nmae":"Semester Four", + "semester-name":"SemesterFour", "courses": [ { @@ -165,7 +165,7 @@ }, { - "semester-nmae":"Semester Five", + "semester-name":"SemesterFive", "courses": [ { @@ -202,7 +202,7 @@ }, { - "semester-nmae":"Semester Six", + "semester-name":"SemesterSix", "courses": [ { @@ -248,7 +248,7 @@ }, { - "semester-nmae":"Semester Seven", + "semester-name":"SemesterSeven", "courses": [ { @@ -285,7 +285,7 @@ }, { - "semester-nmae":"Semester Eight", + "semester-name":"SemesterEight", "courses": [ { diff --git a/src/api/db/degree_templates.py b/src/api/db/degree_templates.py index 3319088dc..9e5c12caa 100644 --- a/src/api/db/degree_templates.py +++ b/src/api/db/degree_templates.py @@ -15,6 +15,56 @@ class DegreeTemplates: def __init__(self, db_wrapper, cache): self.db = db_wrapper - self.cache = cache + self.cache = cache + + def parse(self, data): + self.id = degree + "_" + major + "_" + year + self.degree = data["degree"] + self.major = data["major"] + self.year = data["year"] + self.template = str(data["semesters"]) - \ No newline at end of file + def insert_into_db(self, transaction): + #convert json as text and insert it as text type instead of varchar + transaction.execute(""" + INSERT INTO degree_template( + 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.info + + }); + + + # taking in degree template json file and inserting into database + def import_degree_template(data: str): + # taking in raw data, parsing it into objects + degree_template_JSON = json.load(data) + degreeTemplate = DegreeTemplate.parse(degree_template_JSON) + # after parsing all the parts into objects, insert objects into database + db_conn = self.db.connection() + with conn.cursor(cursor_factory=RealDictCursor) as transaction: + DegreeTemplate.insert_into_db(transaction) + +if __name__ == "__main__": + # os.chdir(os.path.abspath("../rpi_data")) + # fileNames = glob.glob("*.csv") + json_text = open('../../../rpi_data/fall-2020.csv', 'r') + courses = Courses(connection.db) + courses.insert_into_db(json_text) \ No newline at end of file diff --git a/src/data/schema/12_degree_templates.sql b/src/data/schema/12_degree_templates.sql index c6bb84a12..ac3209e9b 100644 --- a/src/data/schema/12_degree_templates.sql +++ b/src/data/schema/12_degree_templates.sql @@ -5,17 +5,11 @@ CREATE TABLE degree_templates ( degree varchar(255), major varchar(255), year int, - semesters1 varchar(255),/*ITWS_2018_sm1 */ - semesters2 varchar(255), - semesters3 varchar(255), - semesters4 varchar(255), - semesters5 varchar(255), - semesters6 varchar(255), - semesters7 varchar(255), - semesters8 varchar(255), + information json,/*ITWS_2018_sm1 */ PRIMARY KEY (id) ); +/* CREATE TABLE degree_templates_semester ( course1 varchar(255), course2 varchar(255), @@ -31,4 +25,5 @@ CREATE TABLE degree_option_course ( description varchar(255), id varchar(255), PRIMARY KEY (name) -); \ No newline at end of file +); +*/ \ No newline at end of file From 1b767f7f58041cb2567a05abcfb2e690dd86106a Mon Sep 17 00:00:00 2001 From: tant2 Date: Sun, 9 Aug 2020 17:00:17 -0400 Subject: [PATCH 15/22] Finshing API ready to test --- src/api/app.py | 18 ++++++ src/api/db/degree_templates.py | 86 ++++++++++++++++--------- src/data/schema/12_degree_templates.sql | 2 +- 3 files changed, 73 insertions(+), 33 deletions(-) diff --git a/src/api/app.py b/src/api/app.py index 69f42c68f..9ff516afc 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.DegreeTemplates(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(): + templates, error = degree_templates.get_template() + return jsonify(templates) if not error else Response(error, status=500) + +@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 index 9e5c12caa..9bf798ed1 100644 --- a/src/api/db/degree_templates.py +++ b/src/api/db/degree_templates.py @@ -22,49 +22,71 @@ def parse(self, data): self.degree = data["degree"] self.major = data["major"] self.year = data["year"] - self.template = str(data["semesters"]) + self.template = json.dumps(data["semesters"]) + def insert_into_db(self, transaction): - #convert json as text and insert it as text type instead of varchar - transaction.execute(""" - INSERT INTO degree_template( - 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.info - - }); - + try: + #convert json as text and insert it as text type instead of varchar + transaction.execute(""" + INSERT INTO degree_template( + 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) + conn.rollback() + return (False, e) # taking in degree template json file and inserting into database - def import_degree_template(data: str): + + def import_degree_template(self, data): # taking in raw data, parsing it into objects - degree_template_JSON = json.load(data) - degreeTemplate = DegreeTemplate.parse(degree_template_JSON) + #degree_template_JSON = json.load(data) + degreeTemplate = DegreeTemplate.parse(data) # after parsing all the parts into objects, insert objects into database db_conn = self.db.connection() with conn.cursor(cursor_factory=RealDictCursor) as transaction: DegreeTemplate.insert_into_db(transaction) + + 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 + template + from + degree_templates + """, None, True) if __name__ == "__main__": # os.chdir(os.path.abspath("../rpi_data")) # fileNames = glob.glob("*.csv") - json_text = open('../../../rpi_data/fall-2020.csv', 'r') + json_text = open('../../../rpi_data/graduation-requirement/Template/Template-CSCI-2019.json', 'r') courses = Courses(connection.db) - courses.insert_into_db(json_text) \ No newline at end of file + courses.import_degree_template(json_text) + \ No newline at end of file diff --git a/src/data/schema/12_degree_templates.sql b/src/data/schema/12_degree_templates.sql index ac3209e9b..08e46a07f 100644 --- a/src/data/schema/12_degree_templates.sql +++ b/src/data/schema/12_degree_templates.sql @@ -5,7 +5,7 @@ CREATE TABLE degree_templates ( degree varchar(255), major varchar(255), year int, - information json,/*ITWS_2018_sm1 */ + template text,/*ITWS_2018_sm1 */ PRIMARY KEY (id) ); From 7b2d9d9d3a521cb4a9f891cbd77384bd8b0bab00 Mon Sep 17 00:00:00 2001 From: tant2 Date: Sun, 9 Aug 2020 18:07:34 -0400 Subject: [PATCH 16/22] API debugging might have to ignore remove for now --- ...plate-CSCI-2019.json => UN-CSCI-2019.json} | 0 src/api/app.py | 2 +- src/api/db/degree_templates.py | 79 +++++++++---------- src/data/build.sh | 1 + 4 files changed, 41 insertions(+), 41 deletions(-) rename rpi_data/graduation-requirement/Template/{Template-CSCI-2019.json => UN-CSCI-2019.json} (100%) diff --git a/rpi_data/graduation-requirement/Template/Template-CSCI-2019.json b/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json similarity index 100% rename from rpi_data/graduation-requirement/Template/Template-CSCI-2019.json rename to rpi_data/graduation-requirement/Template/UN-CSCI-2019.json diff --git a/src/api/app.py b/src/api/app.py index 9ff516afc..8e34793df 100644 --- a/src/api/app.py +++ b/src/api/app.py @@ -45,7 +45,7 @@ course_select = CourseSelect.student_course_selection(db_conn) semester_info = SemesterInfo.semester_info(db_conn) -degree_templates = DegreeTemplates.DegreeTemplates(db_conn) +degree_templates = DegreeTemplates.DegreeTemplate(db_conn) users = UserModel.User() diff --git a/src/api/db/degree_templates.py b/src/api/db/degree_templates.py index 9bf798ed1..633339a33 100644 --- a/src/api/db/degree_templates.py +++ b/src/api/db/degree_templates.py @@ -12,13 +12,12 @@ else: from . import connection -class DegreeTemplates: - def __init__(self, db_wrapper, cache): - self.db = db_wrapper - self.cache = cache +class DegreeTemplate: + def __init__(self, db_wrapper): + self.db_conn = db_wrapper def parse(self, data): - self.id = degree + "_" + major + "_" + year + self.id = data["degree"] + "-" + data["major"] + "-" + str(data["year"]) self.degree = data["degree"] self.major = data["major"] self.year = data["year"] @@ -26,51 +25,51 @@ def parse(self, data): def insert_into_db(self, transaction): - try: + print ("!!!!!!!!LOOK" + self.template) + #try: #convert json as text and insert it as text type instead of varchar - transaction.execute(""" - INSERT INTO degree_template( - 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) - conn.rollback() - return (False, e) + 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 = DegreeTemplate.parse(data) + degreeTemplate = self.parse(data) # after parsing all the parts into objects, insert objects into database - db_conn = self.db.connection() - with conn.cursor(cursor_factory=RealDictCursor) as transaction: - DegreeTemplate.insert_into_db(transaction) + db_conn = self.db_conn.get_connection() + with db_conn.cursor(cursor_factory=RealDictCursor) as transaction: + self.insert_into_db(transaction) - conn.commit() + db_conn.commit() # invalidate cache so we can get new classes - self.cache.clear() + #self.cache.clear() return (True, None) 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 From c046cd5702dd47fa024501492ec4f18203d6dc3e Mon Sep 17 00:00:00 2001 From: tant2 Date: Wed, 12 Aug 2020 15:56:06 -0400 Subject: [PATCH 17/22] commit --- src/api/app.py | 6 +++--- src/api/db/degree_templates.py | 10 ++++++++-- src/web/src/pages/DegreeTemplates.vue | 16 +++++++++++++++- src/web/src/services/YacsService.js | 12 ++++++++++++ 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/api/app.py b/src/api/app.py index 8e34793df..82b789796 100644 --- a/src/api/app.py +++ b/src/api/app.py @@ -266,9 +266,9 @@ def get_student_courses(): return jsonify(courses) if not error else Response(error, status=500) @app.route('/api/degreeTemplate', methods=['GET']) -def get_degree_template(): - templates, error = degree_templates.get_template() - return jsonify(templates) if not error else Response(error, status=500) +def get_degree_template_demo(): + templates = degree_templates.get_template_demo() + return jsonify(templates) @app.route('/api/degreeTemplate', methods=['POST']) def add_degree_template(): diff --git a/src/api/db/degree_templates.py b/src/api/db/degree_templates.py index 633339a33..e15003254 100644 --- a/src/api/db/degree_templates.py +++ b/src/api/db/degree_templates.py @@ -77,15 +77,21 @@ def import_degree_template(self, data): def get_template(self): return self.db_conn.execute(""" select - template + * 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/Template-CSCI-2019.json', 'r') + 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/web/src/pages/DegreeTemplates.vue b/src/web/src/pages/DegreeTemplates.vue index 982e4d3ca..c36a8e8df 100644 --- a/src/web/src/pages/DegreeTemplates.vue +++ b/src/web/src/pages/DegreeTemplates.vue @@ -1,10 +1,24 @@ diff --git a/src/web/src/services/YacsService.js b/src/web/src/services/YacsService.js index 7985acecf..ce4a65a25 100644 --- a/src/web/src/services/YacsService.js +++ b/src/web/src/services/YacsService.js @@ -122,3 +122,15 @@ export const getStudentCourses = (user_info) => params: user_info, }) .then((res) => res.data); + +export const getDegreeTemplate = () => + client.get("/degreeTemplate").then(({ data }) => { + return data; + }); + +/* +export const addDegreeTemplate = () => + client.post("/degreeTemplate").then(({ data }) => { + return data; + }); +*/ \ No newline at end of file From c23ed2834630daf45be6b3f5f5cf7723da02b8fc Mon Sep 17 00:00:00 2001 From: tant2 Date: Wed, 12 Aug 2020 19:26:25 -0400 Subject: [PATCH 18/22] Completing front-end --- .../Template/UN-CSCI-2019.json | 117 +++++++++--------- src/web/package-lock.json | 13 ++ src/web/package.json | 3 +- src/web/src/pages/DegreeTemplates.vue | 63 +++++++++- 4 files changed, 134 insertions(+), 62 deletions(-) diff --git a/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json b/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json index 4820517eb..53b7416f7 100644 --- a/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json +++ b/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json @@ -3,12 +3,10 @@ "degree": "UN", "major": "CSCI", "year": 2019, - "semesters": - [ + "semesters": [ { - "semester-name":"SemesterOne", - "courses": - [ + "semester-name": "SemesterOne", + "courses": [ { "type": "Course", "name": "CSCI-1100", @@ -35,25 +33,24 @@ }, { "type": "Option-Departments", - "name":"HASS ELECTIVE", + "name": "HASS ELECTIVE", "creditHours": 16, "description": "Non", - "Departments":["HASS"] + "Departments": ["HASS"] } ] }, { - "semester-name":"SemesterTwo", - "courses": - [ + "semester-name": "SemesterTwo", + "courses": [ { "type": "Course", "name": "CSCI-1200", "department": "CSCI", "creditHours": 4, "description": "", - "pre-requsit-of": ["CSCI-2200","CSCI-2500"] + "pre-requsit-of": ["CSCI-2200", "CSCI-2500"] }, { "type": "Course", @@ -81,18 +78,17 @@ }, { "type": "Option-Departments", - "name":"HASS ELECTIVE", + "name": "HASS ELECTIVE", "creditHours": 16, "description": "Non", - "Departments":["HASS"] + "Departments": ["HASS"] } ] }, { - "semester-name":"SemesterThree", - "courses": - [ + "semester-name": "SemesterThree", + "courses": [ { "type": "Course", "name": "CSCI-2200", @@ -112,24 +108,29 @@ { "type": "Option-Courses", "name": "Mathematics Option I", - "courses": ["MATH 2010", "MATH 4030", "MATH 4040", "MATH 4100", "MATP 4600"], + "courses": [ + "MATH 2010", + "MATH 4030", + "MATH 4040", + "MATH 4100", + "MATP 4600" + ], "creditHours": 4, "description": "Non" }, { "type": "Option-Departments", - "name":"HASS ELECTIVE", + "name": "HASS ELECTIVE", "creditHours": 16, "description": "Non", - "Departments":["HASS"] + "Departments": ["HASS"] } ] }, { - "semester-name":"SemesterFour", - "courses": - [ + "semester-name": "SemesterFour", + "courses": [ { "type": "Course", "name": "CSCI-2300", @@ -156,18 +157,17 @@ }, { "type": "Option-Departments", - "name":"HASS ELECTIVE", + "name": "HASS ELECTIVE", "creditHours": 16, "description": "Non", - "Departments":["HASS"] + "Departments": ["HASS"] } ] }, { - "semester-name":"SemesterFive", - "courses": - [ + "semester-name": "SemesterFive", + "courses": [ { "type": "Course", "name": "CSCI-4210", @@ -186,25 +186,24 @@ }, { "type": "Option-Departments", - "name":"HASS ELECTIVE", + "name": "HASS ELECTIVE", "creditHours": 16, "description": "Non", - "Departments":["HASS"] + "Departments": ["HASS"] }, { "type": "Option-Departments", - "name":"Free ELECTIVE", + "name": "Free ELECTIVE", "creditHours": 4, "description": "Non", - "Departments":["ALL-XXXX"] + "Departments": ["ALL-XXXX"] } ] }, { - "semester-name":"SemesterSix", - "courses": - [ + "semester-name": "SemesterSix", + "courses": [ { "type": "Course", "name": "CSCI-4430", @@ -223,34 +222,38 @@ }, { "type": "Option-Departments", - "name":"HASS ELECTIVE", + "name": "HASS ELECTIVE", "creditHours": 16, "description": "Non", - "Departments":["HASS"] + "Departments": ["HASS"] }, { "type": "Option-Departments", - "name":"Free ELECTIVE", + "name": "Free ELECTIVE", "creditHours": 4, "description": "Non", - "Departments":["ALL-XXXX"] + "Departments": ["ALL-XXXX"] }, { "type": "Option-Departments", - "name":"Science Option", + "name": "Science Option", "creditHours": 4, "description": "Non", - "Departments":["ASTR-XXXX", "BIOL-XXXX", "CHEM-XXXX", "ERTH-XXXX", "ENVI-XXXX" , "PHYS-XXXX"] + "Departments": [ + "ASTR-XXXX", + "BIOL-XXXX", + "CHEM-XXXX", + "ERTH-XXXX", + "ENVI-XXXX", + "PHYS-XXXX" + ] } - - ] }, { - "semester-name":"SemesterSeven", - "courses": - [ + "semester-name": "SemesterSeven", + "courses": [ { "type": "Course", "name": "CSCI-4430", @@ -269,25 +272,24 @@ }, { "type": "Option-Departments", - "name":"Free ELECTIVE", + "name": "Free ELECTIVE", "creditHours": 4, "description": "Non", - "Departments":["ALL-XXXX"] + "Departments": ["ALL-XXXX"] }, { "type": "Option-Departments", - "name":"Free ELECTIVE", + "name": "Free ELECTIVE", "creditHours": 4, "description": "Non", - "Departments":["ALL-XXXX"] + "Departments": ["ALL-XXXX"] } ] }, { - "semester-name":"SemesterEight", - "courses": - [ + "semester-name": "SemesterEight", + "courses": [ { "type": "Option-Courses", "name": "CS Option/Capstone", @@ -306,20 +308,19 @@ }, { "type": "Option-Departments", - "name":"Free ELECTIVE", + "name": "Free ELECTIVE", "creditHours": 4, "description": "Non", - "Departments":["ALL-XXXX"] + "Departments": ["ALL-XXXX"] }, { "type": "Option-Departments", - "name":"Free ELECTIVE", + "name": "Free ELECTIVE", "creditHours": 4, "description": "Non", - "Departments":["ALL-XXXX"] + "Departments": ["ALL-XXXX"] } ] } - ] -} \ 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 c36a8e8df..ce2b81609 100644 --- a/src/web/src/pages/DegreeTemplates.vue +++ b/src/web/src/pages/DegreeTemplates.vue @@ -1,25 +1,82 @@ - + From 89d0e9e603b2d2249e4eb395f499f748f9a5d874 Mon Sep 17 00:00:00 2001 From: tant2 Date: Thu, 13 Aug 2020 12:01:23 -0400 Subject: [PATCH 19/22] Changing formats --- .../Template/UN-CSCI-2019.json | 41 +++++++------------ src/web/src/pages/DegreeTemplates.vue | 17 ++++++-- 2 files changed, 28 insertions(+), 30 deletions(-) diff --git a/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json b/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json index 53b7416f7..0ae787d9c 100644 --- a/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json +++ b/rpi_data/graduation-requirement/Template/UN-CSCI-2019.json @@ -49,7 +49,7 @@ "name": "CSCI-1200", "department": "CSCI", "creditHours": 4, - "description": "", + "description": "Non", "pre-requsit-of": ["CSCI-2200", "CSCI-2500"] }, { @@ -94,16 +94,14 @@ "name": "CSCI-2200", "department": "CSCI", "creditHours": 4, - "description": "", - "pre-requsit-of": [] + "description": "Non" }, { "type": "Course", "name": "CSCI-2500", "department": "CSCI", "creditHours": 4, - "description": "", - "pre-requsit-of": [] + "description": "Non" }, { "type": "Option-Courses", @@ -136,24 +134,21 @@ "name": "CSCI-2300", "department": "CSCI", "creditHours": 4, - "description": "", - "pre-requsit-of": [] + "description": "Non" }, { "type": "Course", "name": "CSCI-2600", "department": "CSCI", "creditHours": 4, - "description": "", - "pre-requsit-of": [] + "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)", - "pre-requsit-of": [] + "description": "Mathematics Option II must be any course in MATH/MATP at the 2000 level or above (excluding MATH 2800)" }, { "type": "Option-Departments", @@ -173,16 +168,14 @@ "name": "CSCI-4210", "department": "CSCI", "creditHours": 4, - "description": "", - "pre-requsit-of": [] + "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.", - "pre-requsit-of": [] + "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", @@ -209,16 +202,14 @@ "name": "CSCI-4430", "department": "CSCI", "creditHours": 4, - "description": "", - "pre-requsit-of": [] + "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.", - "pre-requsit-of": [] + "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", @@ -259,16 +250,14 @@ "name": "CSCI-4430", "department": "CSCI", "creditHours": 4, - "description": "", - "pre-requsit-of": [] + "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.", - "pre-requsit-of": [] + "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", @@ -295,16 +284,14 @@ "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.", - "pre-requsit-of": [] + "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.", - "pre-requsit-of": [] + "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", diff --git a/src/web/src/pages/DegreeTemplates.vue b/src/web/src/pages/DegreeTemplates.vue index ce2b81609..7b0fb5a29 100644 --- a/src/web/src/pages/DegreeTemplates.vue +++ b/src/web/src/pages/DegreeTemplates.vue @@ -2,8 +2,19 @@

Graduatation Requirements

-
-

{{ modelShowing }}

+
+

{{ modelShowing.name }}

+

Required credits: {{ modelShowing.creditHours }}

+

Description: {{ modelShowing.description }}

+

+ Possible courses: {{ modelShowing.courses }} +

+

+ Possible categories: {{ modelShowing.Departments }} +

+

+ Prerequsit of: {{ modelShowing["pre-requsit-of"] }} +

@@ -27,7 +38,7 @@ v-for="course in semester.courses" :key="course" > - {{ course.name }} + {{ course.name }} | {{ course.creditHours }} From 1bef14c78e392e84f1db71bbb03b4ad22664f11b Mon Sep 17 00:00:00 2001 From: tant2 Date: Thu, 13 Aug 2020 14:08:36 -0400 Subject: [PATCH 20/22] Update DegreeTemplates.vue --- src/web/src/pages/DegreeTemplates.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/web/src/pages/DegreeTemplates.vue b/src/web/src/pages/DegreeTemplates.vue index 7b0fb5a29..208b782f7 100644 --- a/src/web/src/pages/DegreeTemplates.vue +++ b/src/web/src/pages/DegreeTemplates.vue @@ -7,7 +7,13 @@

Required credits: {{ modelShowing.creditHours }}

Description: {{ modelShowing.description }}

- Possible courses: {{ modelShowing.courses }} + + {{ courseName }} | {{ modelShowing.creditHours }} +

Possible categories: {{ modelShowing.Departments }} @@ -59,8 +65,12 @@ export default { methods: { showModal(course) { this.modelShowing = course; + this.modelShowing.subName = null; this.$refs["my-modal"].show(); }, + changeTitle(courseName) { + this.modelShowing.name = courseName; + }, }, data() { return { From 6f84bc70d330858850c585a9e10b0dce3eb6a098 Mon Sep 17 00:00:00 2001 From: tant2 Date: Thu, 13 Aug 2020 19:22:19 -0400 Subject: [PATCH 21/22] Update DegreeTemplates.vue --- src/web/src/pages/DegreeTemplates.vue | 72 +++++++++++++++++---------- 1 file changed, 46 insertions(+), 26 deletions(-) diff --git a/src/web/src/pages/DegreeTemplates.vue b/src/web/src/pages/DegreeTemplates.vue index 208b782f7..34961ce76 100644 --- a/src/web/src/pages/DegreeTemplates.vue +++ b/src/web/src/pages/DegreeTemplates.vue @@ -1,4 +1,4 @@ -