Commit e2872e4c authored by Chris Reffett's avatar Chris Reffett

more stuff

parent 9f7b2716
...@@ -5,11 +5,10 @@ from mainapp.models import Course, Semester, Trajectory # import more ...@@ -5,11 +5,10 @@ from mainapp.models import Course, Semester, Trajectory # import more
def programCourses(program): def programCourses(program):
courses = [] courses = []
requirements = program.requirements.all() requirements = program.requirements
for requirement in requirements: for requirement in requirements.all():
for coursegroup in requirement.courses.all(): for course in requirement.courses.all():
for course in coursegroup.courses.all(): courses.append(course)
courses.append(course)
return courses return courses
...@@ -132,7 +131,7 @@ def nextCourses(remainingReqCourses, taken): ...@@ -132,7 +131,7 @@ def nextCourses(remainingReqCourses, taken):
nextcourses = [] nextcourses = []
for course in remainingReqCourses: for course in remainingReqCourses:
reqs = set() reqs = set()
for prereq in course.preq: for prereq in course.prerequisites:
reqs.add(prereq) reqs.add(prereq)
#for coreq in course.coreq: #for coreq in course.coreq:
# reqs.add(coreq) # reqs.add(coreq)
......
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