Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nathan R Lapierre
advisor
Commits
9286755c
Commit
9286755c
authored
Jan 26, 2014
by
Daniel W Bond
Browse files
finish cleaning up and annotating the models
parent
aa38d8f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
advisor/trajectories/models.py
View file @
9286755c
...
...
@@ -25,6 +25,12 @@ class Course(BaseModel):
courseDescription
=
models
.
TextField
()
credits
=
models
.
IntegerField
()
# catalog year for the course
catalogYear
=
models
.
DateField
()
# needs to be associated with a student, may not belong here
isCompleted
=
models
.
BooleanField
(
False
)
def
isUpperClass
:
if
courseNumber
>
300
:
return
True
:
...
...
@@ -59,6 +65,12 @@ class CourseCollection(BaseModel):
# how many of those are required
numReq
=
models
.
IntegerField
()
# function to determine if there is a difference between this and last year
# not everything changes-- should be able to multiple reference to one thing
# catalog year for the coursecollection
catalogYear
=
models
.
DateField
()
# if the course collection's numreq is met
isCompleted
=
models
.
BooleanField
(
False
)
...
...
@@ -77,6 +89,9 @@ class Program(BaseModel):
# CHECK VIEWS, MAKE SURE I DIDN'T ALREADY SOMEHOW ACCOUNT FOR THIS
degreeType
=
models
.
ManyToManyField
(
'Program'
,
null
=
True
)
# catalog year for the Program
catalogYear
=
models
.
DateField
()
# if all coursecollections' and gened requirements are satisfied, then the
# program is completed
isCompleted
=
models
.
BooleanField
(
False
)
...
...
@@ -92,9 +107,6 @@ class Student(models.Model):
user
=
models
.
OneToOneField
(
User
)
# the student's already-completed classes, the root of the trajectory tree
alreadyTaken
=
models
.
ManyToManyField
(
'Course'
,
null
=
True
)
# all of the student's trajectories
trajectory
=
models
.
ManyToManyField
(
'Trajectory'
,
null
=
True
)
...
...
@@ -126,6 +138,8 @@ class Trajectory(BaseModel):
# CHECK VIEWS, MAKE SURE I DIDN'T ALREADY SOMEHOW ACCOUNT FOR THIS
forPrograms
=
models
.
ManyToManyField
(
'Program'
,)
# function returns if it is an end node on the tree
# whether or not the trajectory can be seen by others
isPublic
=
models
.
BooleanField
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment