From 14d965b6023c95c47c282ab4ddcd4ee125c5b8a0 Mon Sep 17 00:00:00 2001 From: Nicholas Couillard Date: Mon, 9 Oct 2023 19:48:41 -0400 Subject: [PATCH] added prereq --- DynamoDB.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DynamoDB.py b/DynamoDB.py index 78916c1..f3b00ff 100644 --- a/DynamoDB.py +++ b/DynamoDB.py @@ -5,7 +5,7 @@ course_table = resource('dynamodb').Table('Courses') # NOTE: another table for users and professors may be necessary. In order to do this we might need functionality to introduce salt and hashing for security -def courseInsert(courseId, courseSection, courseLevel, courseDepartment, courseProfessor, courseEnrolledStudents, courseMaxStudents, courseIsOpen, courseFormat, courseStartTime=0, courseEndTime=0, courseScheduledDays='None', courseLocation='None'): +def courseInsert(courseId, courseSection, courseLevel, courseDepartment, courseProfessor, courseEnrolledStudents, courseMaxStudents, courseIsOpen, courseFormat, prerequisites, courseStartTime=0, courseEndTime=0, courseScheduledDays='None', courseLocation='None'): courseInsertion = course_table.put_item( Item = { 'CourseId' : courseId, # partition key @@ -20,6 +20,7 @@ def courseInsert(courseId, courseSection, courseLevel, courseDepartment, courseP 'OpenStatus' : courseIsOpen, # this attribute could be useful for hiding unavailable courses 'CourseFormat' : courseFormat, 'CourseScheduledDays' : courseScheduledDays, # this will likely be a list, but im lazy so for now it's a string + 'PreRequisites' : prerequisites, # this will be a list of courses 'CourseLocation' : courseLocation # could increase functionality by separating into building and room number, to allow searching by building } )