Skip to content

Commit

Permalink
added prereq
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Couillard authored and Nicholas Couillard committed Oct 9, 2023
1 parent 6064488 commit 14d965b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DynamoDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
)
Expand Down

0 comments on commit 14d965b

Please sign in to comment.