Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Master Project Assignment Software
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Odin Johan Vatne
Master Project Assignment Software
Commits
d690fd2f
Commit
d690fd2f
authored
3 years ago
by
Odin Johan Vatne
Browse files
Options
Downloads
Patches
Plain Diff
Improve accepted offer automation
parent
fa7e26d2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pasapp/utils.py
+9
-7
9 additions, 7 deletions
pasapp/utils.py
with
9 additions
and
7 deletions
pasapp/utils.py
+
9
−
7
View file @
d690fd2f
...
...
@@ -23,18 +23,20 @@ def get_next(request, fallback='/'):
def
student_accepted
(
application
):
student
=
application
.
student
student_accepted_recur
(
student
,
application
,
True
)
student_accepted_helper
(
student
)
group_students
=
application
.
group_members
.
all
()
for
groupmate
in
group_students
:
student_accepted_helper
(
groupmate
)
def
student_accepted_
recu
r
(
student
,
application
,
allowRecursion
=
False
):
def
student_accepted_
helpe
r
(
student
):
other_applications
=
Application
.
objects
.
filter
(
student
=
student
).
exclude
(
student_status
=
'
ACC
'
)
for
app
in
other_applications
:
app
.
student_status
=
'
RETR
'
if
app
.
professor_status
!=
'
OFFR
'
else
'
DECL
'
app
.
priority
=
None
app
.
save
()
if
allowRecursion
:
group_students
=
application
.
group_members
.
all
()
for
groupmate
in
group_students
:
student_accepted_recur
(
groupmate
,
application
)
other_member_applications
=
student
.
member_projects
.
exclude
(
student_status
=
'
ACC
'
)
for
app
in
other_member_applications
:
app
.
group_members
.
remove
(
student
)
def
project_closed
(
project
):
open_applications
=
Application
.
objects
.
filter
(
project
=
project
).
exclude
(
student_status
=
'
ACC
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment