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
SRCT
advisor
Commits
521ca2e7
Commit
521ca2e7
authored
Mar 02, 2014
by
Daniel W Bond
Browse files
custom assigned weights-- much faster way than reworking everything every time
parent
b0a2ee5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
advisor/mainapp/utils.py
View file @
521ca2e7
...
...
@@ -21,9 +21,9 @@ def programCourses(program):
### automatically building a trajectory
def
assignWeights
(
weightedCourse
,
programCourses
):
assignWeights
=
{}
def
assign
ed
Weights
(
weightedCourse
,
programCourses
):
""" assign weights to all courses in a program for automation """
assign
ed
Weights
=
{}
for
weightedCourse
in
programCourses
:
weightedCourseCounter
=
0
...
...
@@ -38,12 +38,25 @@ def assignWeights(weightedCourse, programCourses):
if
req
is
course
:
weightedCourseCounter
+=
1
childReqList
.
append
(
course
)
assignWeights
(
course
,
childReqList
)
assign
ed
Weights
(
course
,
childReqList
)
assignWeights
[
weighedCourse
]
=
coursecounter
assign
ed
Weights
[
weighedCourse
]
=
coursecounter
return
assignWeights
def
customAssignedWeights
(
assignedWeights
,
selectedCourses
):
""" remove courses that a student has not selected from the weighted
courses """
customAssignedWeights
=
assignedWeights
for
course
in
selectedCourses
:
del
customAssignedWeights
[
course
]
return
customAssignedWeights
def
shortestPath
(
assignedWeights
):
return
True
### editing a trajectory
def
requirementsFulfilled
(
alreadyTaken
,
program
):
...
...
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