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
b6ecffb5
Commit
b6ecffb5
authored
Mar 02, 2014
by
Ben Waters
Browse files
Merge branch 'master' of
https://github.com/srct/advisor
parents
5c09c6a4
6e6472b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
advisor/mainapp/utils.py
View file @
b6ecffb5
...
...
@@ -98,8 +98,10 @@ def nextCourses(remainingReqCourses, alreadyTaken):
nextCourses
=
[]
for
course
in
remainingReqCourses
:
reqs
=
set
()
course
.
prereq
.
append
(
reqs
)
course
.
coreq
.
append
(
reqs
)
for
prereq
in
course
.
preq
:
reqs
.
add
(
prereq
)
for
coreq
in
course
.
coreq
:
reqs
.
add
(
coreq
)
for
req
in
reqs
:
if
req
in
previousCourses
:
nextCourses
.
append
(
course
)
...
...
@@ -117,8 +119,10 @@ def findDependancies(deletedCourse, semester):
foundDependancies
=
[]
for
suspectCourse
in
semester
.
nextSemester
.
courses
:
reqs
=
set
()
suspectCourse
.
prereq
.
append
(
reqs
)
suspectCourse
.
coreq
.
append
(
reqs
)
for
prereq
in
suspectCourse
.
preq
:
reqs
.
add
(
prereq
)
for
coreq
in
suspectCourse
.
coreq
:
reqs
.
add
(
coreq
)
for
req
in
reqs
:
if
req
is
deletedCourse
:
req
.
append
(
foundDependancies
)
...
...
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