Commit f6e7a1a2 authored by Chris Reffett's avatar Chris Reffett

Cleanup, fix some utils.py syntax errors

parent c31b09d7
......@@ -39,10 +39,10 @@ def assignedWeights(weightedCourse, programCourses):
weightedCourseCounter += 1
childReqList.append(course)
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(coursegroup.courses)
requirementCoursesTaken = intersection(courseRequirements, alreadyTaken)
requirementCoursesTaken = courseRequirements.intersection(alreadyTaken)
if len(requirementCoursesTaken) is requirement.coursegroup.numneeded:
requirementsFulfilled.append(requirement)
......@@ -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 semester.nextSemester.courses:
reqs = set()
for prereq in suspectCourse.preq:
if req is deletedCourse:
req.append(foundDependencies)
if prereq is deletedCourse:
reqs.append(foundDependencies)
for coreq in suspectCourse.coreq:
if req is deletedCourse:
req.append(foundDependencies)
if coreq is deletedCourse:
reqs.append(foundDependencies)
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