SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 2831a35c authored by George Katsikas's avatar George Katsikas :goat:
Browse files

collect anonymous info for appraisals / offers

fixes #338
parent dc5362d6
No related branches found
No related tags found
No related merge requests found
...@@ -11,18 +11,18 @@ class QualificationQuerySet(models.QuerySet): ...@@ -11,18 +11,18 @@ class QualificationQuerySet(models.QuerySet):
Filter for Fellows which are at least marginally qualified. Filter for Fellows which are at least marginally qualified.
""" """
return self.filter( return self.filter(
status__in=[ expertise_level__in=[
self.model.STATUS_EXPERT, self.model.EXPERT,
self.model.STATUS_VERY_KNOWLEDGEABLE, self.model.VERY_KNOWLEDGEABLE,
self.model.STATUS_KNOWLEDGEABLE, self.model.KNOWLEDGEABLE,
self.model.STATUS_MARGINALLY_QUALIFIED, self.model.MARGINALLY_QUALIFIED,
] ]
) )
def not_qualified(self): def not_qualified(self):
return self.filter( return self.filter(
status__in=[ expertise_level__in=[
self.model.STATUS_NOT_REALLY_QUALIFIED, self.model.NOT_REALLY_QUALIFIED,
self.model.STATUS_NOT_AT_ALL_QUALIFIED, self.model.NOT_AT_ALL_QUALIFIED,
] ]
) )
<ul>
<li>
Your submission has examined by {{ submission.qualification_set.all|length }} fellow{{ submission.qualification_set.all|pluralize }}, of which {{ submission.qualification_set.all|length }} are sufficiently qualified on the subject matter to take charge.
</li>
</ul>
{% regroup offers|dictsort:"offered_on" by condition_details as offers_by_type %}
<ul>
{% for offers in offers_by_type %}
{% with offer=offers.list.0 %}
<li>
{{ offers.list|length }} offers for {{ offer.condition }}, accept first {{ offer.id }}
</li>
{% endwith %}
{% endfor %}
</ul>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment