Skip to content

Commit a0b8034

Browse files
committed
VITable-backend: Fix up '25 course detection
Signed-off-by: Gagan Malvi <[email protected]>
1 parent 48de683 commit a0b8034

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

slots.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2737,12 +2737,12 @@ def fetch_info(text):
27372737
"""Get slot data"""
27382738
data, slots = [], []
27392739
slots += re.findall(
2740-
r"[A-Z]{1,3}[0-9]{1,2}[\D]{1}[A-Z]{3}[0-9]{4}[\D]{1}[A-Z]{2,3}[\D]{1}[A-Z]{2,4}[0-9]{2,4}[A-Z]{0,1}[\D]{1}[A-Z]{3}",
2740+
r"[A-Z]{1,3}[0-9]{1,2}[\D]{1}[A-Z]{3,4}[0-9]{1,4}[A-Z]{0,1}[\D]{1}[A-Z]{2,3}[\D]{1}[A-Z]{2,4}[0-9]{2,4}[A-Z]{0,1}[\D]{1}[A-Z]{3}",
27412741
text,
27422742
)
27432743
for single_slot in slots:
27442744
slot = re.findall(r"[A-Z]{1,3}[0-9]{1,2}\b", single_slot)[0]
2745-
course_name = re.findall(r"[A-Z]{3}[0-9]{4}\b", single_slot)[0]
2745+
course_name = re.findall(r"[A-Z]{3,4}[0-9]{1,4}[A-Z]{0,1}\b", single_slot)[0]
27462746
course_fullname = courseDict[course_name]
27472747
course_code = re.findall(r"[ETH,SS,ELA,LO]{2,3}\b", single_slot)
27482748
course_type = "Lab" if course_code[0] in ("ELA", "LO") else "Theory"

0 commit comments

Comments
 (0)