diff --git a/castellum/castellum_auth/fixtures/groups.json b/castellum/castellum_auth/fixtures/groups.json index f88cdf32a15d3710799d0dd4d08fd87a9db21fc5..2f03370724b2e60ed45e3398f9f4806e591b30cd 100644 --- a/castellum/castellum_auth/fixtures/groups.json +++ b/castellum/castellum_auth/fixtures/groups.json @@ -89,19 +89,19 @@ "contact" ], [ - "add_participationrequest", + "add_participation", "recruitment", - "participationrequest" + "participation" ], [ - "change_participationrequest", + "change_participation", "recruitment", - "participationrequest" + "participation" ], [ - "view_participationrequest", + "view_participation", "recruitment", - "participationrequest" + "participation" ] ] } @@ -115,7 +115,7 @@ [ "view_participation_pseudonyms", "recruitment", - "participationrequest" + "participation" ] ] } @@ -132,14 +132,14 @@ "contact" ], [ - "delete_participationrequest", + "delete_participation", "recruitment", - "participationrequest" + "participation" ], [ "view_participation_pseudonyms", "recruitment", - "participationrequest" + "participation" ], [ "view_subject", @@ -188,7 +188,7 @@ [ "search_execution", "recruitment", - "participationrequest" + "participation" ] ] } diff --git a/castellum/data_protection/helpers.py b/castellum/data_protection/helpers.py index bb01c32f28e4585c50d78e8477953cf468298819..2d6388f476b1c255408170022ede14d9ecfe3120 100644 --- a/castellum/data_protection/helpers.py +++ b/castellum/data_protection/helpers.py @@ -24,7 +24,7 @@ from django.db import models from castellum.contacts.models import Contact from castellum.recruitment import filter_queries -from castellum.recruitment.models import ParticipationRequest +from castellum.recruitment.models import Participation from castellum.subjects.models import Subject @@ -54,8 +54,8 @@ def get_no_legal_basis(limit_by): # this query has the biggest potential to shrink down # the number of matches, so it is done first subjects = Subject.objects\ - .annotate(pr_count=models.Count('participationrequest', filter=~models.Q( - participationrequest__status=ParticipationRequest.UNSUITABLE + .annotate(pr_count=models.Count('participation', filter=~models.Q( + participation__status=Participation.UNSUITABLE )))\ .filter(~filter_queries.has_consent(include_waiting=True), pr_count=0) subject_pks = subjects.values_list('pk', flat=True) diff --git a/castellum/execution/feeds.py b/castellum/execution/feeds.py index 20fb893e3b2811b7cca2d2a9333062606ab58395..2bdaa9d0aac082a2db05815d5a5a165a99a93bf6 100644 --- a/castellum/execution/feeds.py +++ b/castellum/execution/feeds.py @@ -38,14 +38,14 @@ class AppointmentFeed(BaseAppointmentFeed): def items(self, study): return super().items(study)\ .filter(session__study=study)\ - .select_related('participant__subject', 'session__study') + .select_related('participation__subject', 'session__study') def item_title(self, item): - return '{} - {}'.format(item.participant.subject.contact.full_name, item.session.name) + return '{} - {}'.format(item.participation.subject.contact.full_name, item.session.name) def item_link(self, item): - return reverse('execution:participationrequest-detail', args=[ - item.session.study.pk, item.participant.pk + return reverse('execution:participation-detail', args=[ + item.session.study.pk, item.participation.pk ]) def item_description(self, item): diff --git a/castellum/execution/templates/execution/base.html b/castellum/execution/templates/execution/base.html index 3d90bb3b3189d4133ab916cccaafe8e0848c0ace..ae65af6b10e2fd8960b7fef0196fdef962a4694e 100644 --- a/castellum/execution/templates/execution/base.html +++ b/castellum/execution/templates/execution/base.html @@ -7,8 +7,8 @@ {% if study %} {% endif %} - {% if participationrequest %} - + {% if participation %} + {% endif %} {% endblock %} diff --git a/castellum/execution/templates/execution/participationrequest_detail.html b/castellum/execution/templates/execution/participation_detail.html similarity index 100% rename from castellum/execution/templates/execution/participationrequest_detail.html rename to castellum/execution/templates/execution/participation_detail.html diff --git a/castellum/execution/templates/execution/reception.html b/castellum/execution/templates/execution/reception.html index 462df18344c7e038ccfdbdb2c79b18387b9cb536..0c9be0cbaafb98b1ef57579b2ca5411a2a61aa78 100644 --- a/castellum/execution/templates/execution/reception.html +++ b/castellum/execution/templates/execution/reception.html @@ -14,9 +14,9 @@ {% for appointment in object_list %}
  • {{ appointment.start|time }} - {{ appointment.participant.subject.contact.full_name }} - {{ appointment.participant.study }} - {{ appointment.participant.study.contact_person }} + {{ appointment.participation.subject.contact.full_name }} + {{ appointment.participation.study }} + {{ appointment.participation.study.contact_person }}
  • {% empty %}
  • {% trans 'No appointments today' %}
  • diff --git a/castellum/execution/templates/execution/study_detail.html b/castellum/execution/templates/execution/study_detail.html index baf34bb9840335c4097f313521cac17011aac697..b41dc81228c7ea6c6984a4df6ce565113945d44c 100644 --- a/castellum/execution/templates/execution/study_detail.html +++ b/castellum/execution/templates/execution/study_detail.html @@ -7,17 +7,17 @@

    {{ object }}