Commit f6e7a1a2 authored by Chris Reffett's avatar Chris Reffett

Cleanup, fix some syntax errors

parent c31b09d7
......@@ -39,10 +39,10 @@ def assignedWeights(weightedCourse, programCourses):
weightedCourseCounter += 1
assignedWeights(course, childReqList)
assignedWeights[weighedCourse] = coursecounter
return assignWeights
assignedWeights[weightedCourse] = weightedCourseCounter
return assignedWeights
def customAssignedWeights(assignedWeights, selectedCourses):
""" remove courses that a student has not selected from the weighted
......@@ -69,8 +69,8 @@ def requirementsFulfilled(alreadyTaken, program):
for requirement in requirements:
for coursegroup in requirement.coursegroup:
courseRequirements = set(
requirementCoursesTaken = intersection(courseRequirements, alreadyTaken)
requirementCoursesTaken = courseRequirements.intersection(alreadyTaken)
if len(requirementCoursesTaken) is requirement.coursegroup.numneeded:
......@@ -86,9 +86,9 @@ def remainingReqCourses(alreadyTaken, program):
the already taken courses """
alreadyTaken = set(alreadyTaken)
programCourses = set( programCourses(program) )
programCourses = set(programCourses(program))
remainingReqCourses = intersection(alreadyTaken, programCourses)
remainingReqCourses = alreadyTaken.intersection(programCourses)
return remainingReqCourses
......@@ -120,11 +120,11 @@ def findDependencies(deletedCourse, semester):
for suspectCourse in
reqs = set()
for prereq in suspectCourse.preq:
if req is deletedCourse:
if prereq is deletedCourse:
for coreq in suspectCourse.coreq:
if req is deletedCourse:
if coreq is deletedCourse:
findDependencies(deletedCourse, semester.nextSemester)
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