Skip to content

Commit

Permalink
VITable-backend: Fix up '25 course detection
Browse files Browse the repository at this point in the history
Signed-off-by: Gagan Malvi <[email protected]>
  • Loading branch information
gaganmalvi committed Nov 9, 2021
1 parent 48de683 commit a0b8034
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2737,12 +2737,12 @@ def fetch_info(text):
"""Get slot data"""
data, slots = [], []
slots += re.findall(
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}",
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}",
text,
)
for single_slot in slots:
slot = re.findall(r"[A-Z]{1,3}[0-9]{1,2}\b", single_slot)[0]
course_name = re.findall(r"[A-Z]{3}[0-9]{4}\b", single_slot)[0]
course_name = re.findall(r"[A-Z]{3,4}[0-9]{1,4}[A-Z]{0,1}\b", single_slot)[0]
course_fullname = courseDict[course_name]
course_code = re.findall(r"[ETH,SS,ELA,LO]{2,3}\b", single_slot)
course_type = "Lab" if course_code[0] in ("ELA", "LO") else "Theory"
Expand Down

0 comments on commit a0b8034

Please sign in to comment.