Commit 66f0426a authored by Daniel W Bond's avatar Daniel W Bond
Browse files

rethinking how trajectory processing will work

parent 70be733a
......@@ -6,6 +6,7 @@ def remainingReqCourses(requiredCourses, coursesTaken):
for course in requiredCourses:
if course not in coursesTaken:
remainingReqCourses.append(course)
def allPrereqCoreq(course, remainingReqCourses):
""" returns required courses that have course as a prereq or coreq """
allPrereqCoreq = []
......
......@@ -17,7 +17,9 @@ def newTrajectory(LoginRequiredMixin, CreateView):
# PROGRAM: check if the student is Honors, and overwrite default degreeType to relevant Honors option -- fix 'getGenEds' in utils
# TRAJECTORY: with the name of the user and the name of the majors and minors, create a name
# TRAJECTORY: create the slug from the name of the majors and minors
# TRAJECTORY: set owner as user, and pull user's previous trajectories
# TRAJECTORY: set owner as user
# TRAJECTORY: set user's completedCourses as Trajectory's completedCourses(?)
# ^^ that seems unnecessary
# TRAJECTORY: set whichPrograms to the programs passed in
# TRAJECTORY: set semester as user's current semester
# (?) where is catalogYear being set?
......@@ -29,6 +31,22 @@ def buildTrajectory(LoginRequiredMixin, UpdateView):
form = BuildTrajectoryForm
# form processing
# rewrite utils as necessary
# -- if all CourseCollections of a Program are completed, mark program as completed
# BLEH-- I feel like the original logic in utils might be a bit better: figure out what I was thinking -->> get all courses that have prereqs in the same list of already completed courses (lightbulb?), and if there are coreqs, that course must also have its prereqs fulfilled
# remainingReqCourses-- Program's courseReqs (only iterate over completed=False-- add fulfilledReq to models.py) and Trajectory's completedCourses
# allPrereqCoreq-- retrieve a list of all prereqs and coreqs of those courses
# continue on until
# courses is the non-duplicated list of prereqs and coreqs
# do this for each section (multiple forms??? D-:)
# get gen eds-- gen eds are a separate category
# if a section is completed, return a value to allow the template to display as such
# enoughCourses-- if all requirements are fulfilled, check that there are 120 credits
# submit, save as trajectory, and create a new trajectory with the new information-- the next node down on the tree-- saving completed courses **within** the trajectory, NOT back to student
# (this information is cycled over until a student has completed all programs)
# student's page; shows saved trajectories
def studentDetail(LoginRequiredMixin, DetailView):
......@@ -39,6 +57,12 @@ def studentUpdate(LoginRequiredMixin, UpdateView):
models = Student
form = StudentUpdateForm
# form processing
# note: show merely the names of the trajectories-- pulling up the end nodes shouldn't actually be necessary, as thought earlier
# save the new information
# note for the future-- how does this impact already created trajectories?
# details of a course
def courseDetail(DetailView):
model = Course
......
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