diff --git a/backend/data/final_data/conditions.pkl b/backend/data/final_data/conditions.pkl
index 5673a3a96..7eae34cfa 100644
Binary files a/backend/data/final_data/conditions.pkl and b/backend/data/final_data/conditions.pkl differ
diff --git a/backend/data/final_data/conditionsProcessed.json b/backend/data/final_data/conditionsProcessed.json
index 2ba7c26c3..fc37549ae 100644
--- a/backend/data/final_data/conditionsProcessed.json
+++ b/backend/data/final_data/conditionsProcessed.json
@@ -3663,7 +3663,7 @@
},
"COMP4920": {
"original": "Prerequisite: (COMP2511 or COMP2911) and completion of 96 UOC in Computer Science.
",
- "processed": "(COMP2511 || COMP2911) && 96UOC && COMP?1"
+ "processed": "(COMP2511 || COMP2911) && 96UOC && (COMP?1 || COMP?H)"
},
"COMP4951": {
"original": "Prerequisite: Enrolled in a CSE BE (Hons) programs, completion of 126 UOC and completion of 3rd year core.
",
@@ -3680,7 +3680,7 @@
},
"COMP4961": {
"original": "Prerequisite: Students enrolled in program 4515 Bachelor of Computer Science (Hons) or program 3648.
",
- "processed": "4515 || 3648"
+ "processed": "4515 || 3779"
},
"COMP4962": {
"original": "COMP4962 Prerequisite: Students must successfully complete COMP4951
",
@@ -12696,4 +12696,4 @@
"original": "",
"processed": ""
}
-}
+}
\ No newline at end of file
diff --git a/backend/data/final_data/conditionsTokens.json b/backend/data/final_data/conditionsTokens.json
index 3f17d3e6f..0c352d57f 100644
--- a/backend/data/final_data/conditionsTokens.json
+++ b/backend/data/final_data/conditionsTokens.json
@@ -8112,7 +8112,11 @@
"&&",
"96UOC",
"&&",
+ "(",
"COMP?1",
+ "||",
+ "COMP?H",
+ ")",
")"
],
"COMP4951": [
@@ -8142,7 +8146,7 @@
"(",
"4515",
"||",
- "3648",
+ "3779",
")"
],
"COMP4962": [
diff --git a/backend/data/final_data/specialisationsProcessed.json b/backend/data/final_data/specialisationsProcessed.json
index 2112e4990..870af968c 100644
--- a/backend/data/final_data/specialisationsProcessed.json
+++ b/backend/data/final_data/specialisationsProcessed.json
@@ -2755,9 +2755,9 @@
},
{
"courses": {
- "any Level 9 Computer Science course": 1,
- "any Level 6 Computer Science course": 1,
- "any Level 4 Computer Science course": 1
+ "COMP9": "any Level 9 Computer Science course",
+ "COMP6": "any Level 6 Computer Science course",
+ "COMP4": "any Level 4 Computer Science course"
},
"title": "Advanced Computing Electives",
"credits_to_complete": 30,
@@ -2767,13 +2767,13 @@
},
{
"courses": {
- "any Level 9 Computer Science course": 1,
- "any Level 6 Computer Science course": 1,
- "any Level 3 Computer Science course": 1,
+ "COMP9": "any Level 9 Computer Science course",
+ "COMP6": "any Level 6 Computer Science course",
+ "COMP3": "any Level 3 Computer Science course",
"ENGG3600": "Engineering Vertically Integrated Project",
"ENGG4600": "Engineering Vertically Integrated Project",
"ENGG2600": "Engineering Vertically Integrated Project",
- "any Level 4 Computer Science course": 1
+ "COMP4": "any Level 4 Computer Science course"
},
"title": "Computing Electives",
"credits_to_complete": 30,
@@ -3021,10 +3021,10 @@
},
{
"courses": {
- "any Level 4 Computer Science course": 1,
- "any Level 3 Computer Science course": 1,
- "any Level 9 Computer Science course": 1,
- "any Level 6 Computer Science course": 1,
+ "COMP4": "any Level 4 Computer Science course",
+ "COMP3": "any Level 3 Computer Science course",
+ "COMP9": "any Level 9 Computer Science course",
+ "COMP6": "any Level 6 Computer Science course",
"ENGG2600": "Engineering Vertically Integrated Project",
"ENGG4600": "Engineering Vertically Integrated Project",
"ENGG3600": "Engineering Vertically Integrated Project"
@@ -3047,9 +3047,9 @@
},
{
"courses": {
- "any Level 6 Computer Science course": 1,
- "any Level 9 Computer Science course": 1,
- "any Level 4 Computer Science course": 1
+ "COMP6": "any Level 6 Computer Science course",
+ "COMP9": "any Level 9 Computer Science course",
+ "COMP4": "any Level 4 Computer Science course"
},
"title": "Advanced Computing Electives",
"credits_to_complete": 12,
@@ -3430,9 +3430,9 @@
},
{
"courses": {
- "any Level 4 Computer Science course": 1,
- "any Level 9 Computer Science course": 1,
- "any Level 6 Computer Science course": 1
+ "COMP4": "any Level 4 Computer Science course",
+ "COMP9": "any Level 9 Computer Science course",
+ "COMP6": "any Level 6 Computer Science course"
},
"title": "Advanced Computing Electives",
"credits_to_complete": 12,
@@ -3473,13 +3473,13 @@
},
{
"courses": {
- "any Level 6 Computer Science course": 1,
+ "COMP6": "any Level 6 Computer Science course",
"ENGG4600": "Engineering Vertically Integrated Project",
"ENGG3600": "Engineering Vertically Integrated Project",
"ENGG2600": "Engineering Vertically Integrated Project",
- "any Level 3 Computer Science course": 1,
- "any Level 4 Computer Science course": 1,
- "any Level 9 Computer Science course": 1
+ "COMP3": "any Level 3 Computer Science course",
+ "COMP4": "any Level 4 Computer Science course",
+ "COMP9": "any Level 9 Computer Science course"
},
"title": "Computing Electives",
"credits_to_complete": 24,
diff --git a/backend/data/processors/manual_fixes/COMPFixes.py b/backend/data/processors/manual_fixes/COMPFixes.py
index ac731696d..fa6ac2739 100644
--- a/backend/data/processors/manual_fixes/COMPFixes.py
+++ b/backend/data/processors/manual_fixes/COMPFixes.py
@@ -132,7 +132,7 @@ def COMP_4920():
"original": "Prerequisite: (COMP2511 or COMP2911) and completion of 96 UOC in Computer Science.
",
"processed": "(COMP2511 || COMP2911) && 96UOC in Computer Science"
"""
- return "(COMP2511 || COMP2911) && 96UOC && COMP?1"
+ return "(COMP2511 || COMP2911) && 96UOC && (COMP?1 || COMP?H)"
def COMP_4951(conditions):
"""
@@ -170,11 +170,11 @@ def COMP_4953():
def COMP_4961():
"""
- "original": "Prerequisite: Students enrolled in program 4515 Bachelor of Computer Science (Hons) or program 3648.
",
+ "original": "Prerequisite: Enrolment in 4515 Computer Science (Hons) or 3779 Advanced Computer Science (Hons)
",
- "processed": "4515 || 3648"
+ "processed": "4515 || 3779"
"""
- return "4515 || 3648"
+ return "4515 || 3779"
def COMP_6445():
diff --git a/backend/data/processors/specialisations_processing.py b/backend/data/processors/specialisations_processing.py
index 5d0d1f102..b560637b2 100644
--- a/backend/data/processors/specialisations_processing.py
+++ b/backend/data/processors/specialisations_processing.py
@@ -231,9 +231,9 @@ def get_courses(
for course, title in container_courses.items():
description = description + "" # prevent unused variable error
- if "any course" in course:
+ if "any course" in course.lower():
course_processed = {"any course": "1"}
- elif "any level" in course:
+ elif "any level" in course.lower():
# e.g. modify "any level 4 COMP course" to "COMP4"
course_processed = process_any_level(course)
else:
@@ -247,7 +247,7 @@ def process_any_level(unprocessed_course: str) -> dict[str, str]:
# group 1 contains level number and group 2 contains program title
# Note '?:' means inner parentheses is non-capturing group
# COMP4XXx
- res = re.search(r"level (\d) ((?:[^ ]+ )+)(course)?", unprocessed_course)
+ res = re.search(r"[lL]evel (\d) ((?:[^ ]+ )+)(course)?", unprocessed_course)
if not res:
print("ERRR BY: ", unprocessed_course)
# TODO: THIS IS BROKEN by `any level 1/2 ...`
diff --git a/backend/server/routers/programs.py b/backend/server/routers/programs.py
index f635fa36b..d92d642f8 100644
--- a/backend/server/routers/programs.py
+++ b/backend/server/routers/programs.py
@@ -68,7 +68,7 @@ def get_programs() -> dict[str, dict[str, str]]:
return {
"programs": {
"3778": "Computer Science",
- # "3779": "Advanced Computer Science (Honours)", # TODO: Fix the electives
+ "3779": "Advanced Computer Science (Honours)",
"3502": "Commerce",
"3970": "Science",
"3543": "Economics",