SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
SciPost
SciPost
Commits
c559e78a
Commit
c559e78a
authored
8 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Debug submissions/views.py
parent
e087636c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
submissions/utils.py
+1
-1
1 addition, 1 deletion
submissions/utils.py
submissions/views.py
+8
-4
8 additions, 4 deletions
submissions/views.py
with
9 additions
and
5 deletions
submissions/utils.py
+
1
−
1
View file @
c559e78a
...
...
@@ -72,7 +72,7 @@ class SubmissionUtils(object):
'
\n\n
has successfully passed the pre-screening stage.
'
'
\n\n
A Submission Page has been activated at
'
'
https://scipost.org/submission/
'
+
str
(
cls
.
assignment
.
submission
.
id
)
+
'
and a refereeing round has been started, with deadline
'
'
and a refereeing round has been started, with deadline
'
'
currently set at
'
+
datetime
.
datetime
.
strftime
(
cls
.
assignment
.
submission
.
reporting_deadline
,
"
%Y-%m-%d
"
)
+
'
.
'
'
\n\n
We thank you very much for your contribution.
'
...
...
This diff is collapsed.
Click to expand it.
submissions/views.py
+
8
−
4
View file @
c559e78a
...
...
@@ -235,10 +235,14 @@ def submission_detail(request, submission_id):
except
Comment
.
DoesNotExist
:
author_replies
=
()
# To check in template whether the user can submit a report:
is_author
=
request
.
user
.
contributor
in
submission
.
authors
.
all
()
is_author_unchecked
=
(
not
is_author
and
not
(
request
.
user
.
contributor
in
submission
.
authors_false_claims
.
all
())
and
(
request
.
user
.
last_name
in
submission
.
author_list
))
try
:
is_author
=
request
.
user
.
contributor
in
submission
.
authors
.
all
()
is_author_unchecked
=
(
not
is_author
and
not
(
request
.
user
.
contributor
in
submission
.
authors_false_claims
.
all
())
and
(
request
.
user
.
last_name
in
submission
.
author_list
))
except
AttributeError
:
is_author
=
False
is_author_unchecked
=
False
context
=
{
'
submission
'
:
submission
,
'
comments
'
:
comments
.
filter
(
status__gte
=
1
,
is_author_reply
=
False
).
order_by
(
'
-date_submitted
'
),
'
invited_reports
'
:
reports
.
filter
(
status__gte
=
1
,
invited
=
True
),
'
contributed_reports
'
:
reports
.
filter
(
status__gte
=
1
,
invited
=
False
),
...
...
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