Commit 136a1596 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

still on creation-- ooh first void function

parent 848530e2
......@@ -6,6 +6,8 @@ GMU Advisor | Create
{% block content %}
{% for program in programs %}
# remaining classes for program 1
<p>Returns the student's possible courses after their post from index</p>
......@@ -16,18 +18,16 @@ GMU Advisor | Create
<p>Save buttons-- save buttons everywhere.</p>
<p>Save your trajectory semester by semester.</p>
# remaining classes for program 2
{% endfor %}
# remaining classes for minor 1
{% for minor in minors %}
# remaining classes for minor 2, etc
{% endfor %}
# remaining classes for gened program
<h4>Gen Eds</h4>
{{ collection.name }}
<p><h1>We still have the corequisite problem unresolved</h1></p>
{% endblock %}
......@@ -49,7 +49,9 @@ class CourseCollection(BaseModel):
courses = models.ManyToManyField('Course',)
# how many of those are required
numberOfCoursesReq = models.IntegerField()
numReq = models.IntegerField()
isCompleted = models.BooleanField(False)
class Program(BaseModel):
......@@ -64,6 +66,8 @@ class Program(BaseModel):
# is BA, BS, Honors
degreeType = models.CharField(max_length = 25)
isCompleted = models.BooleanField(False)
class Meta:
ordering = ('name',)
......
......@@ -22,7 +22,8 @@ boolean isHonors
--> getGenEds
def maxProgramsAllowed(programList, maxProgramNumber):
OTHER THOUGHTS
#############################################
......
......@@ -55,6 +55,24 @@ def getGenEds(programs, isHonors):
except:
return genEdList
def maxProgramsAllowed(programList, maxProgramNumber):
if (len(programList) + 1) > maxProgramNumer:
return False
else:
return True
def fulfilledReq(coursesTaken, courseCollection, numReq):
""" makes CourseCollection.isCompleted True if completed
should only use where isCompleted is False
can also be used for Program.isCompleted """
finished = 0
for reqCourse in courseCollection:
if reqCourse in coursesTaken:
finished += 1
if finished >= numReq:
courseCollection.isCompleted = True
break
# how does one deal with "you have to take the coreq at the same time?"
def topTrajectories(trajectories):
......@@ -64,10 +82,6 @@ def topTrajectories(trajectories):
# find the one on the top of the pile
return topTrajectories
def getGenEds(programList, honorsBoolean):
# page render functions
# homepage, sign in to save or compare multiple options
......
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