Commit c31b09d7 authored by Daniel W Bond's avatar Daniel W Bond

Merge branch 'master' of

parents 5afe8b83 b16a6728
......@@ -113,23 +113,22 @@ def nextCourses(remainingReqCourses, alreadyTaken):
# """ the maximum credits allowed for a semester-- returns different values
# to warn or disallow if maximum credits are touched or exceeded """
def findDependancies(deletedCourse, semester):
def findDependencies(deletedCourse, semester):
""" if a student removes a course while editing, find all courses
that have require the removed courses """
foundDependancies = []
foundDependencies = []
for suspectCourse in
reqs = set()
for prereq in suspectCourse.preq:
if req is deletedCourse:
for coreq in suspectCourse.coreq:
for req in reqs:
if req is deletedCourse:
if req is deletedCourse:
findDependancies(deletedCourse, semester.nextSemester)
findDependencies(deletedCourse, semester.nextSemester)
return foundDependancies
return foundDependencies
def enoughCredits(previousCourses, numRequired):
""" checks if enough credits have been taken to graduate """
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment