Commit 521ca2e7 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

custom assigned weights-- much faster way than reworking everything every time

parent b0a2ee5c
...@@ -21,9 +21,9 @@ def programCourses(program): ...@@ -21,9 +21,9 @@ def programCourses(program):
### automatically building a trajectory ### automatically building a trajectory
def assignWeights(weightedCourse, programCourses): def assignedWeights(weightedCourse, programCourses):
""" assign weights to all courses in a program for automation """
assignWeights = {} assignedWeights = {}
for weightedCourse in programCourses: for weightedCourse in programCourses:
weightedCourseCounter = 0 weightedCourseCounter = 0
...@@ -38,12 +38,25 @@ def assignWeights(weightedCourse, programCourses): ...@@ -38,12 +38,25 @@ def assignWeights(weightedCourse, programCourses):
if req is course: if req is course:
weightedCourseCounter += 1 weightedCourseCounter += 1
childReqList.append(course) childReqList.append(course)
assignWeights(course, childReqList) assignedWeights(course, childReqList)
assignWeights[weighedCourse] = coursecounter assignedWeights[weighedCourse] = coursecounter
return assignWeights return assignWeights
def customAssignedWeights(assignedWeights, selectedCourses):
""" remove courses that a student has not selected from the weighted
courses """
customAssignedWeights = assignedWeights
for course in selectedCourses:
del customAssignedWeights[course]
return customAssignedWeights
def shortestPath(assignedWeights):
return True
### editing a trajectory ### editing a trajectory
def requirementsFulfilled(alreadyTaken, program): def requirementsFulfilled(alreadyTaken, program):
......
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