From 4a7bf83561850c5839a8685a9d01a1be96a2d137 Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Fri, 22 Jul 2022 15:27:42 -0400 Subject: Add `email` property to `PeerTeacher` --- src/util/parser.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/util/parser.ts') diff --git a/src/util/parser.ts b/src/util/parser.ts index 7e062e1..c466525 100644 --- a/src/util/parser.ts +++ b/src/util/parser.ts @@ -51,7 +51,8 @@ interface DatabaseFile { start: number, end: number }[], - labs: number[] + labs: number[], + email: string }[] } @@ -73,7 +74,9 @@ export function parsePTSchedule(schedule: string) { } const [, firstname, lastname, uin] = nameLine.match(namePattern) as RegExpMatchArray; - const peerTeacher = new PeerTeacher(uin, firstname, lastname); + // TODO email should be parsed from the student's file too I guess, or just end up changing the parser to use survey results for everything, then parse schedules separately. + const email = "undefined" + const peerTeacher = new PeerTeacher(uin, firstname, lastname, email); const events = lines .filter(line => line.match(eventPattern)) -- cgit v1.2.3