Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MnC #218

Merged
merged 7 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion backend/src/ingestJSON.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { QueryRunner } from "typeorm";
import { sectionTypeEnum } from "../../lib/src/index.js";
import { Course, Section, Timetable } from "./entity/entities.js";
import { addCourse, addTimetable, removeCourse, removeTimetable } from "./utils/search.js";
import {
addCourse,
addTimetable,
removeCourse,
removeTimetable,
} from "./utils/search.js";

interface ExamJSON {
midsem: string | null;
Expand Down
215 changes: 215 additions & 0 deletions frontend/CDCs.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,45 @@
"3-1": ["PHA F311", "PHA F312", "PHA F244", "PHA F315"],
"3-2": ["PHA F341", "PHA F342", "PHA F343", "PHA F344"]
},
"AD": {
"1-1": [
"CHEM F110",
"CHEM F111",
"EEE F111",
"ME F112",
"PHY F110",
"PHY F111",
"MATH F111"
],
"1-2": [
"BIO F110",
"BIO F111",
"BITS F110",
"BITS F111",
"BITS F112",
"CS F111",
"MATH F112",
"MATH F113"
],
"2-1": [
"MATH F211",
"MAC F211",
"MAC F212",
"MAC F213",
"MAC F214",
"BITS F225"
],
"2-2": [
"MAC F241",
"MAC F242",
"MAC F243",
"MAC F244",
"MAC F245",
"ECON/MGTS F211/F211"
],
"3-1": ["MAC F311", "MAC F312", "MAC F313", "MAC F314"],
"3-2": ["MAC F341", "MAC F342"]
},
"B1": {
"1-1": [
"BIO F110",
Expand Down Expand Up @@ -521,6 +560,44 @@
"4-1": ["ECE F311", "ECE F314", "ECE F434"],
"4-2": ["ECE F341", "ECE F343", "ECE F344"]
},
"B1AD": {
"2-1": [
"MATH F211",
"BIO F211",
"BIO F212",
"BIO F213",
"BIO F214",
"BITS F225"
],
"2-2": [
"BIO F241",
"BIO F242",
"BIO F243",
"BIO F244",
"ECON/MGTS F211/F211"
],
"3-1": [
"BIO F311",
"BIO F312",
"BIO F313",
"MAC F211",
"MAC F212",
"MAC F213",
"MAC F214"
],
"3-2": [
"BIO F341",
"BIO F342",
"BIO F215",
"MAC F241",
"MAC F242",
"MAC F243",
"MAC F244",
"MAC F245"
],
"4-1": ["MAC F311", "MAC F312", "MAC F313", "MAC F314"],
"4-2": ["MAC F341", "MAC F342"]
},
"B2": {
"1-1": [
"BIO F110",
Expand Down Expand Up @@ -776,6 +853,45 @@
"4-1": ["ECE F311", "ECE F314", "ECE F434"],
"4-2": ["ECE F341", "ECE F343", "ECE F344"]
},
"B2AD": {
"2-1": [
"MATH F211",
"CHEM F211",
"CHEM F212",
"CHEM F213",
"CHEM F214",
"PHY F212"
],
"2-2": [
"ECON/MGTS F211/F211",
"CHEM F241",
"CHEM F242",
"CHEM F243",
"CHEM F244",
"BITS F225"
],
"3-1": [
"CHEM F313",
"CHEM F311",
"CHEM F312",
"MAC F211",
"MAC F212",
"MAC F213",
"MAC F214"
],
"3-2": [
"CHEM F341",
"CHEM F342",
"CHEM F343",
"MAC F241",
"MAC F242",
"MAC F243",
"MAC F244",
"MAC F245"
],
"4-1": ["MAC F311", "MAC F312", "MAC F313", "MAC F314"],
"4-2": ["MAC F341", "MAC F342"]
},
"B3": {
"1-1": [
"CHEM F110",
Expand Down Expand Up @@ -1024,6 +1140,38 @@
"4-1": ["ECE F311", "ECE F314", "ECE F434"],
"5-2": ["ECE F341", "ECE F343", "ECE F344"]
},
"B3AD": {
"2-1": [
"MATH F211",
"ECON F211",
"ECON F212",
"ECON F213",
"ECON F214",
"BITS F225"
],
"2-2": ["MGTS F211", "ECON F241", "ECON F242", "ECON F243", "ECON F244"],
"3-1": [
"ECON F311",
"ECON F312",
"ECON F313",
"MAC F211",
"MAC F212",
"MAC F213",
"MAC F214"
],
"3-2": [
"ECON F341",
"ECON F342",
"ECON F343",
"MAC F241",
"MAC F242",
"MAC F243",
"MAC F244",
"MAC F245"
],
"4-1": ["MAC F311", "MAC F312", "MAC F313", "MAC F314"],
"4-2": ["MAC F341", "MAC F342"]
},
"B4": {
"1-1": [
"CHEM F110",
Expand Down Expand Up @@ -1271,6 +1419,35 @@
"4-1": ["ECE F311", "ECE F314", "ECE F434"],
"4-2": ["ECE F341", "ECE F343", "ECE F344"]
},
"B4AD": {
"2-1": [
"MATH F211",
"MATH F212",
"MATH F213",
"MATH F214",
"MATH F215",
"BITS F225"
],
"2-2": [
"ECON/MGTS F211/F211",
"MATH F241",
"MATH F242",
"MATH F243",
"MATH F244"
],
"3-1": ["MATH F311", "MATH F312", "MATH F313", "MAC F211", "MAC F212"],
"3-2": [
"MATH F341",
"MATH F342",
"MATH F343",
"MAC F242",
"MAC F243",
"MAC F244",
"MAC F245"
],
"4-1": ["MAC F312", "MAC F313", "MAC F314"],
"4-2": ["MAC F341", "MAC F342"]
},
"B5": {
"1-1": [
"BIO F110",
Expand Down Expand Up @@ -1566,5 +1743,43 @@
],
"4-1": ["ECE F311", "ECE F314", "ECE F434"],
"4-2": ["ECE F341", "ECE F343", "ECE F344", "PHY F344"]
},
"B5AD": {
"2-1": [
"MATH F211",
"PHY F211",
"PHY F212",
"PHY F213",
"PHY F214",
"BITS F225"
],
"2-2": [
"ECON/MGTS F211/F211",
"PHY F241",
"PHY F242",
"PHY F243",
"PHY F244"
],
"3-1": [
"PHY F311",
"PHY F312",
"PHY F313",
"MAC F211",
"MAC F212",
"MAC F213",
"MAC F214"
],
"3-2": [
"PHY F341",
"PHY F342",
"PHY F343",
"PHY F344",
"MAC F242",
"MAC F243",
"MAC F244",
"MAC F245"
],
"4-1": ["MAC F311", "MAC F312", "MAC F313", "MAC F314"],
"4-2": ["MAC F341", "MAC F342"]
}
}
6 changes: 6 additions & 0 deletions frontend/src/EditUserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ function EditUserProfile() {
<SelectItem value="AA">
AA: B.E. Electronics & Communication
</SelectItem>
<SelectItem value="AD">
AD: B.E. Mathematics & Computing
</SelectItem>
</SelectGroup>
<SelectGroup>
<SelectLabel>Dual Degrees</SelectLabel>
Expand Down Expand Up @@ -358,6 +361,9 @@ function EditUserProfile() {
<SelectItem value="AA">
AA: B.E. Electronics & Communication
</SelectItem>
<SelectItem value="AD">
AD: B.E. Mathematics & Computing
</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
Expand Down
10 changes: 8 additions & 2 deletions frontend/src/GetDegrees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ function GetDegrees() {
<SelectItem value="AA">
AA: B.E. Electronics & Communication
</SelectItem>
<SelectItem value="AD">
AD: B.E. Mathematics & Computing
</SelectItem>
</SelectGroup>
<SelectGroup>
<SelectLabel>Dual Degrees</SelectLabel>
Expand Down Expand Up @@ -297,16 +300,19 @@ function GetDegrees() {
<SelectItem value="AA">
AA: B.E. Electronics & Communication
</SelectItem>
<SelectItem value="AD">
AD: B.E. Mathematics & Computing
</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
)}
</div>
<div className="scroll-m-20 text-lg tracking-tight text-foreground text-center w-2/3 pt-4">
{/* <div className="scroll-m-20 text-lg tracking-tight text-foreground text-center w-2/3 pt-4">
<b>Note:</b> If your branch is Mathematics & Computing, please
select A7 (Computer Science) as a temporary fix since both of these
branches will have the same courses for this semester.
</div>
</div> */}
<Button
className="w-fit mt-6 bg-muted font-bold hover:bg-primary-foreground transition ease-in-out text-foreground"
onClick={handleSubmit}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export function NavBar() {
const stateRouter = useRouter();
const isCMSPage =
stateRouter.state.resolvedLocation.pathname.includes("/CMS");
const isEditPage = stateRouter.state.resolvedLocation.pathname.includes(
"/edit/" || "/finalize/",
);
const isEditPage =
stateRouter.state.resolvedLocation.pathname.includes("/edit/") ||
stateRouter.state.resolvedLocation.pathname.includes("/finalize/");

const [_cookies, _setCookie, removeCookie] = useCookies(["session"]);
const userQueryResult = useQuery(userQueryOptions);
Expand Down
2 changes: 2 additions & 0 deletions lib/src/degrees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const approvedDegreeList = [
"A7",
"A8",
"AA",
"AD",
"B1",
"B2",
"B3",
Expand All @@ -26,6 +27,7 @@ export const approvedBEDegreeList = [
"A7",
"A8",
"AA",
"AD",
] as const;

export const approvedMScDegreeList = ["B1", "B2", "B3", "B4", "B5"] as const;
Expand Down