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
Daniel W Bond
advisor
Commits
a08c194b
Commit
a08c194b
authored
Dec 07, 2013
by
Daniel W Bond
Browse files
every day I'm modelling
parent
05a9613a
Changes
2
Hide whitespace changes
Inline
Side-by-side
advisor/trajectories/models.py
View file @
a08c194b
...
...
@@ -8,29 +8,11 @@ class BaseModel(models.Model):
class
Meta
:
abstract
=
True
class
Program
(
BaseModel
):
# major or minor or gened
programType
=
models
.
CharField
()
# is BA, there are these geneds, if BA, those
degreeType
=
models
.
CharField
()
# unless they're in the honors program
# and then there are separate geneds
honors
=
models
.
BooleanField
()
class
Meta
:
ordering
=
(
'name'
,)
def
__unicode__
(
self
):
return
self
.
name
class
Course
(
BaseModel
):
# ordering
prerequisites
=
models
.
ManyToManyField
()
corequisites
=
models
.
ManyToManyField
()
prerequisites
=
models
.
ManyToManyField
(
'Course'
)
corequisites
=
models
.
ManyToManyField
(
'Course'
)
# basic course information
department
=
models
.
CharField
(
max_length
=
150
)
...
...
@@ -56,14 +38,38 @@ class Course(BaseModel):
def
get_absolute_url
(
self
):
return
'/courses/%s/'
%
self
.
slug
class
Trajectory
(
BaseModel
):
# gen eds are coursecollections in programs
class
CourseCollection
(
BaseModel
):
# a number of courses
courses
=
ManyToManyField
(
'Course'
)
# Unsure how to represent this
# how many of those are required
numberOfCoursesReq
=
IntegerField
()
class
Program
(
BaseModel
):
# courseCollections
courseReqs
=
ManyToManyField
(
'CourseCollection'
)
# major or minor or gened
programType
=
models
.
CharField
()
# is BA, BS, Honors
degreeType
=
models
.
CharField
()
class
Meta
:
ordering
=
(
'name'
,)
def
__unicode__
(
self
):
return
self
.
name
class
Trajectory
(
BaseModel
):
# Kind of want to overwrite "name" as optional
# Takes courses
potentialTrajectory
=
models
.
ManyToManyField
()
potentialTrajectory
=
models
.
ManyToManyField
(
'Course'
)
def
get_absolute_url
(
self
):
return
'my-trajectories/%s/'
%
self
.
slug
...
...
@@ -71,7 +77,7 @@ class Trajectory(BaseModel):
# should inherit from the standard Django User Model
class
Student
(
BaseModel
):
alreadyTaken
=
models
.
ManyToManyField
()
alreadyTaken
=
models
.
ManyToManyField
(
'Course'
)
trajectory
=
models
.
ManyToField
()
slug
=
models
.
SlugField
(
max_length
=
50
)
...
...
advisor/trajectories/sample-io.txt
View file @
a08c194b
...
...
@@ -111,4 +111,18 @@ UX
User arrives on homepage, selects program, (Honors College?) and is prompted to select
already-completed courses.
User then is then displayed a list of courses for their major that they are able to take next.
Also displayed is are rectangles indicating whether or not each of the gen-ed requirements
have been completed.
If a gen-ed has not been completed, then they can select that button, which will retrieve all of
the gen-eds that they could concievably take for that particular instance.
The user then selects the classes that they intend to take for that semester.
This is then completed for each subsequent semester, until there are no more classes to select.
The user can save this trajectory.
What if a user wants to modify their trajectory? They can select to go back to any semester, but
it will delete their progress thus far for something.
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