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):
### automatically building a trajectory
def assignWeights(weightedCourse, programCourses):
assignWeights = {}
def assignedWeights(weightedCourse, programCourses):
""" assign weights to all courses in a program for automation """
assignedWeights = {}
for weightedCourse in programCourses:
weightedCourseCounter = 0
......@@ -38,12 +38,25 @@ def assignWeights(weightedCourse, programCourses):
if req is course:
weightedCourseCounter += 1
assignWeights(course, childReqList)
assignedWeights(course, childReqList)
assignWeights[weighedCourse] = coursecounter
assignedWeights[weighedCourse] = coursecounter
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
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