diff --git a/backend/api/fixtures/small/small.json b/backend/api/fixtures/small/small.json index 19e3347e..e3519224 100644 --- a/backend/api/fixtures/small/small.json +++ b/backend/api/fixtures/small/small.json @@ -1 +1,73 @@ -[{"model": "api.dockerimage", "pk": 1, "fields": {"name": "edge.jpeg", "file": "/without/dinner/learn/eight/show/sure", "owner": "12", "public": true}}, {"model": "api.dockerimage", "pk": 2, "fields": {"name": "perhaps.jpg", "file": "/heart", "owner": "13", "public": true}}, {"model": "api.dockerimage", "pk": 3, "fields": {"name": "beat.gif", "file": "/American/order", "owner": "3", "public": true}}, {"model": "api.dockerimage", "pk": 4, "fields": {"name": "score.png", "file": "/same", "owner": "1", "public": true}}, {"model": "api.dockerimage", "pk": 5, "fields": {"name": "measure.tiff", "file": "/decade/worry/southern/despite/visit", "owner": "13", "public": true}}, {"model": "api.fileextension", "pk": 1, "fields": {"extension": "odp"}}, {"model": "api.fileextension", "pk": 2, "fields": {"extension": "csv"}}, {"model": "api.fileextension", "pk": 3, "fields": {"extension": "key"}}, {"model": "api.fileextension", "pk": 4, "fields": {"extension": "avi"}}, {"model": "api.fileextension", "pk": 5, "fields": {"extension": "mp4"}}, {"model": "api.course", "pk": 1, "fields": {"name": "Advanced value-added knowledge user", "academic_startyear": 2023, "excerpt": "Trade simply senior money address drop.", "description": "Word tell authority recently Mrs experience. Alone write dog customer vote see most. Time girl idea through hundred.", "faculty": "Letteren_Wijsbegeerte", "parent_course": null}}, {"model": "api.course", "pk": 2, "fields": {"name": "Face-to-face secondary contingency", "academic_startyear": 2024, "excerpt": "Throughout home fight hot brother.", "description": "Might natural if star. Half a measure billion agree week. Computer difference less unit stage attorney themselves company.", "faculty": "Geneeskunde_Gezondheidswetenschappen", "parent_course": null}}, {"model": "api.course", "pk": 3, "fields": {"name": "Networked actuating Internet solution", "academic_startyear": 2022, "excerpt": "Party development respond.", "description": "Two black public gun would. Song structure light teach.", "faculty": "Bio-ingenieurswetenschappen", "parent_course": null}}, {"model": "api.project", "pk": 1, "fields": {"name": "Cloned national emulation", "description": "Night debate knowledge president. Activity represent sense including way already everyone.", "visible": false, "archived": false, "locked_groups": true, "start_date": "2024-03-18T10:14:42.820Z", "deadline": "2024-05-09T10:14:42.820Z", "max_score": 64, "score_visible": false, "group_size": 11, "course": 3}}, {"model": "api.project", "pk": 2, "fields": {"name": "Reduced reciprocal alliance", "description": "Age light nature table huge arm. Perhaps serve administration. Process somebody hand put late.", "visible": false, "archived": false, "locked_groups": false, "start_date": "2024-06-04T10:14:42.821Z", "deadline": "2024-09-09T10:14:42.821Z", "max_score": 6, "score_visible": false, "group_size": 9, "course": 1}}, {"model": "api.project", "pk": 3, "fields": {"name": "Universal real-time methodology", "description": "Evening relationship really ability upon one wind. Language glass fly significant executive result.", "visible": true, "archived": false, "locked_groups": false, "start_date": "2024-05-25T10:14:42.821Z", "deadline": "2024-05-31T10:14:42.821Z", "max_score": 88, "score_visible": true, "group_size": 2, "course": 1}}, {"model": "api.project", "pk": 4, "fields": {"name": "Cross-platform 3rdgeneration success", "description": "Capital whose store involve everyone move maybe. Particular author line movement wear large back. Media move analysis. Recent concern particular several.", "visible": true, "archived": false, "locked_groups": true, "start_date": "2024-02-25T10:14:42.821Z", "deadline": "2024-05-31T10:14:42.821Z", "max_score": 66, "score_visible": false, "group_size": 15, "course": 1}}, {"model": "api.structurecheck", "pk": 0, "fields": {"name": "/pass/management/apply", "project": 2, "obligated_extensions": [3, 5], "blocked_extensions": [2]}}, {"model": "api.structurecheck", "pk": 1, "fields": {"name": "/old/reduce/Republican/many/trial", "project": 1, "obligated_extensions": [3, 4], "blocked_extensions": [1, 2, 4]}}, {"model": "api.extracheck", "pk": 1, "fields": {"project": 2, "docker_image": 1, "file": "/type/subject/fine/more", "timeout": 104, "show_log": false}}, {"model": "api.student", "pk": "0", "fields": {"is_active": true, "student_id": "0", "courses": [1]}}, {"model": "api.student", "pk": "1", "fields": {"is_active": true, "student_id": "1", "courses": [1]}}, {"model": "api.student", "pk": "2", "fields": {"is_active": true, "student_id": "2", "courses": [1]}}, {"model": "api.student", "pk": "3", "fields": {"is_active": true, "student_id": "3", "courses": [1]}}, {"model": "api.student", "pk": "4", "fields": {"is_active": true, "student_id": "4", "courses": [1]}}, {"model": "api.student", "pk": "5", "fields": {"is_active": true, "student_id": "5", "courses": [1]}}, {"model": "api.student", "pk": "6", "fields": {"is_active": true, "student_id": "6", "courses": [1]}}, {"model": "api.student", "pk": "7", "fields": {"is_active": true, "student_id": "7", "courses": [1]}}, {"model": "api.student", "pk": "8", "fields": {"is_active": true, "student_id": "8", "courses": [1]}}, {"model": "api.student", "pk": "9", "fields": {"is_active": true, "student_id": "9", "courses": [1]}}, {"model": "api.group", "pk": 1, "fields": {"project": 1, "score": 46.0, "students": ["0", "1", "3", "4"]}}, {"model": "api.group", "pk": 2, "fields": {"project": 1, "score": 22.0, "students": ["2", "5", "6", "7", "8"]}}, {"model": "api.group", "pk": 3, "fields": {"project": 3, "score": 81.0, "students": []}}, {"model": "api.group", "pk": 4, "fields": {"project": 4, "score": 44.0, "students": []}}, {"model": "api.group", "pk": 5, "fields": {"project": 1, "score": 55.0, "students": ["9"]}}, {"model": "api.group", "pk": 6, "fields": {"project": 1, "score": 21.0, "students": []}}, {"model": "api.group", "pk": 7, "fields": {"project": 1, "score": 31.0, "students": []}}, {"model": "api.submission", "pk": 1, "fields": {"group": 7, "submission_number": null, "submission_time": "2024-04-13T00:00:00Z", "is_valid": true}}, {"model": "api.submission", "pk": 2, "fields": {"group": 4, "submission_number": null, "submission_time": "2024-04-18T00:00:00Z", "is_valid": false}}, {"model": "api.submission", "pk": 3, "fields": {"group": 4, "submission_number": null, "submission_time": "2024-04-09T00:00:00Z", "is_valid": true}}, {"model": "api.submission", "pk": 4, "fields": {"group": 4, "submission_number": null, "submission_time": "2024-04-06T00:00:00Z", "is_valid": true}}, {"model": "api.submission", "pk": 5, "fields": {"group": 7, "submission_number": null, "submission_time": "2024-04-01T00:00:00Z", "is_valid": false}}, {"model": "api.submission", "pk": 6, "fields": {"group": 5, "submission_number": null, "submission_time": "2024-04-02T00:00:00Z", "is_valid": true}}, {"model": "api.submission", "pk": 7, "fields": {"group": 6, "submission_number": null, "submission_time": "2024-04-14T00:00:00Z", "is_valid": false}}, {"model": "api.submission", "pk": 8, "fields": {"group": 4, "submission_number": null, "submission_time": "2024-04-10T00:00:00Z", "is_valid": false}}, {"model": "api.submission", "pk": 9, "fields": {"group": 4, "submission_number": null, "submission_time": "2024-04-03T00:00:00Z", "is_valid": true}}, {"model": "api.submission", "pk": 10, "fields": {"group": 7, "submission_number": null, "submission_time": "2024-04-04T00:00:00Z", "is_valid": true}}, {"model": "api.submissionfile", "pk": 1, "fields": {"submission": 6, "file": "/occur/scene/south.html"}}, {"model": "api.checkresult", "pk": 172395, "fields": {"polymorphic_ctype": null, "submission": 5, "result": "RUNNING", "error_message": null}}, {"model": "api.checkresult", "pk": 259011, "fields": {"polymorphic_ctype": null, "submission": 6, "result": "QUEUED", "error_message": null}}, {"model": "api.checkresult", "pk": 556015, "fields": {"polymorphic_ctype": null, "submission": 1, "result": "SUCCESS", "error_message": null}}, {"model": "api.checkresult", "pk": 736657, "fields": {"polymorphic_ctype": null, "submission": 10, "result": "FAILED", "error_message": "OBLIGATED_DIRECTORY_NOT_FOUND"}}, {"model": "api.checkresult", "pk": 979550, "fields": {"polymorphic_ctype": null, "submission": 7, "result": "RUNNING", "error_message": null}}, {"model": "api.structurecheckresult", "pk": 172395, "fields": {"structure_check": 1}}, {"model": "api.structurecheckresult", "pk": 259011, "fields": {"structure_check": 1}}, {"model": "api.structurecheckresult", "pk": 556015, "fields": {"structure_check": 1}}, {"model": "api.structurecheckresult", "pk": 736657, "fields": {"structure_check": 1}}, {"model": "api.structurecheckresult", "pk": 979550, "fields": {"structure_check": 1}}, {"model": "api.assistant", "pk": "10", "fields": {"is_active": true, "courses": []}}, {"model": "api.assistant", "pk": "11", "fields": {"is_active": true, "courses": [1]}}, {"model": "api.assistant", "pk": "12", "fields": {"is_active": true, "courses": [2]}}, {"model": "api.assistant", "pk": "13", "fields": {"is_active": true, "courses": [3]}}, {"model": "api.assistant", "pk": "14", "fields": {"is_active": true, "courses": [1]}}, {"model": "api.teacher", "pk": "15", "fields": {"is_active": true, "courses": [1]}}, {"model": "api.teacher", "pk": "16", "fields": {"is_active": true, "courses": [1]}}, {"model": "api.teacher", "pk": "17", "fields": {"is_active": true, "courses": [1]}}] \ No newline at end of file +[{"model": "api.dockerimage", "pk": 1, "fields": {"name": "situation.gif", "file": "/single/institution/man/approach/war/trouble", "owner": "2", "public": true}},{"model": "api.dockerimage", "pk": 2, "fields": {"name": "deep.jpg", "file": "/material", "owner": "4", "public": true}}, +{"model": "api.dockerimage", "pk": 3, "fields": {"name": "apply.png", "file": "/Democrat", "owner": "3", "public": true}}, +{"model": "api.dockerimage", "pk": 4, "fields": {"name": "serve.jpeg", "file": "/gun/offer", "owner": "4", "public": true}}, +{"model": "api.dockerimage", "pk": 5, "fields": {"name": "discover.jpeg", "file": "/happen/building/TV", "owner": "15", "public": true}}, +{"model": "api.fileextension", "pk": 1, "fields": {"extension": "flac"}}, +{"model": "api.fileextension", "pk": 2, "fields": {"extension": "wav"}}, +{"model": "api.fileextension", "pk": 3, "fields": {"extension": "avi"}}, +{"model": "api.fileextension", "pk": 4, "fields": {"extension": "doc"}}, +{"model": "api.fileextension", "pk": 5, "fields": {"extension": "pptx"}}, +{"model": "api.course", "pk": 1, "fields": {"name": "Front-line bandwidth-monitored success", "academic_startyear": 2023, "excerpt": "Stop population itself positive activity address.", "description": "Rate professor under rule. Me season say president fight without like. Opportunity have music no brother.", "faculty": "Bio-ingenieurswetenschappen", "parent_course": null}}, +{"model": "api.course", "pk": 2, "fields": {"name": "Open-architected asynchronous algorithm", "academic_startyear": 2023, "excerpt": "Land bar subject either worry maybe young.", "description": "Which claim dark much. Involve technology attorney produce.", "faculty": "Psychologie_PedagogischeWetenschappen", "parent_course": null}}, +{"model": "api.course", "pk": 3, "fields": {"name": "Front-line even-keeled concept", "academic_startyear": 2023, "excerpt": "Guess shoulder step training everyone.", "description": "Because eye push it knowledge. Environmental room north area sport beat.", "faculty": "Letteren_Wijsbegeerte", "parent_course": null}}, +{"model": "api.project", "pk": 1, "fields": {"name": "Intuitive bi-directional knowledgebase", "description": "Activity word film including its. Gun its carry future. Recently fact trouble civil and firm.", "visible": true, "archived": false, "locked_groups": false, "start_date": "2024-03-07T08:35:49.346Z", "deadline": "2025-03-15T08:35:49.346Z", "max_score": 75, "score_visible": false, "group_size": 15, "course": 1}}, +{"model": "api.project", "pk": 2, "fields": {"name": "Virtual full-range knowledgebase", "description": "Less senior media answer.", "visible": false, "archived": false, "locked_groups": false, "start_date": "2024-04-22T08:35:49.346Z", "deadline": "2024-05-20T08:35:49.346Z", "max_score": 76, "score_visible": false, "group_size": 14, "course": 3}}, +{"model": "api.project", "pk": 3, "fields": {"name": "Self-enabling zero tolerance forecast", "description": "Mean answer whether type fact. Drive whose stop production wish successful task.", "visible": false, "archived": false, "locked_groups": false, "start_date": "2024-03-05T08:35:49.346Z", "deadline": "2024-04-14T08:35:49.346Z", "max_score": 65, "score_visible": false, "group_size": 6, "course": 2}}, +{"model": "api.project", "pk": 4, "fields": {"name": "Advanced logistical software", "description": "None at worry easy cell director. Us environmental from point sometimes.", "visible": true, "archived": false, "locked_groups": false, "start_date": "2024-02-03T08:35:49.346Z", "deadline": "2024-03-05T08:35:49.346Z", "max_score": 47, "score_visible": false, "group_size": 14, "course": 3}}, +{"model": "api.structurecheck", "pk": 0, "fields": {"name": "/effect/morning/back/reality", "project": 1, "obligated_extensions": [1, 3], "blocked_extensions": [2]}}, +{"model": "api.structurecheck", "pk": 1, "fields": {"name": "/political/ball", "project": 2, "obligated_extensions": [3, 4], "blocked_extensions": [1, 2, 5]}}, +{"model": "api.extracheck", "pk": 1, "fields": {"project": 1, "docker_image": 4, "file": "/able/environmental", "timeout": 736, "show_log": false}}, +{"model": "api.student", "pk": "0", "fields": {"is_active": true, "student_id": "0", "courses": [1]}}, +{"model": "api.student", "pk": "1", "fields": {"is_active": true, "student_id": "1", "courses": [1]}}, +{"model": "api.student", "pk": "2", "fields": {"is_active": true, "student_id": "2", "courses": [1]}}, +{"model": "api.student", "pk": "3", "fields": {"is_active": true, "student_id": "3", "courses": [1]}}, +{"model": "api.student", "pk": "4", "fields": {"is_active": true, "student_id": "4", "courses": [1]}}, +{"model": "api.student", "pk": "5", "fields": {"is_active": true, "student_id": "5", "courses": [1]}}, +{"model": "api.student", "pk": "6", "fields": {"is_active": true, "student_id": "6", "courses": [1]}}, +{"model": "api.student", "pk": "7", "fields": {"is_active": true, "student_id": "7", "courses": [1]}}, +{"model": "api.student", "pk": "8", "fields": {"is_active": true, "student_id": "8", "courses": [1]}}, +{"model": "api.student", "pk": "9", "fields": {"is_active": true, "student_id": "9", "courses": [1]}}, +{"model": "api.group", "pk": 1, "fields": {"project": 1, "score": 0.0, "students": ["0"]}}, +{"model": "api.group", "pk": 2, "fields": {"project": 1, "score": 28.0, "students": ["1"]}}, +{"model": "api.group", "pk": 3, "fields": {"project": 1, "score": 53.0, "students": ["2"]}}, +{"model": "api.group", "pk": 4, "fields": {"project": 1, "score": 1.0, "students": ["3"]}}, +{"model": "api.group", "pk": 5, "fields": {"project": 1, "score": 61.0, "students": ["4"]}}, +{"model": "api.group", "pk": 6, "fields": {"project": 1, "score": 33.0, "students": ["5"]}}, +{"model": "api.group", "pk": 7, "fields": {"project": 1, "score": 12.0, "students": ["6"]}}, +{"model": "api.group", "pk": 8, "fields": {"project": 1, "score": 12.0, "students": ["7"]}}, +{"model": "api.group", "pk": 9, "fields": {"project": 1, "score": 12.0, "students": ["8"]}}, +{"model": "api.group", "pk": 10, "fields": {"project": 1, "score": 12.0, "students": ["9"]}}, +{"model": "api.submission", "pk": 1, "fields": {"group": 6, "submission_number": null, "submission_time": "2024-04-15T00:00:00Z", "is_valid": true}}, +{"model": "api.submission", "pk": 2, "fields": {"group": 6, "submission_number": null, "submission_time": "2024-04-25T00:00:00Z", "is_valid": false}}, +{"model": "api.submission", "pk": 3, "fields": {"group": 4, "submission_number": null, "submission_time": "2024-04-07T00:00:00Z", "is_valid": true}}, +{"model": "api.submission", "pk": 4, "fields": {"group": 3, "submission_number": null, "submission_time": "2024-04-18T00:00:00Z", "is_valid": true}}, +{"model": "api.submission", "pk": 5, "fields": {"group": 4, "submission_number": null, "submission_time": "2024-04-06T00:00:00Z", "is_valid": true}}, +{"model": "api.submission", "pk": 6, "fields": {"group": 1, "submission_number": null, "submission_time": "2024-04-07T00:00:00Z", "is_valid": true}}, +{"model": "api.submission", "pk": 7, "fields": {"group": 3, "submission_number": null, "submission_time": "2024-04-01T00:00:00Z", "is_valid": true}}, +{"model": "api.submission", "pk": 8, "fields": {"group": 2, "submission_number": null, "submission_time": "2024-04-23T00:00:00Z", "is_valid": true}}, +{"model": "api.submission", "pk": 9, "fields": {"group": 5, "submission_number": null, "submission_time": "2024-04-09T00:00:00Z", "is_valid": true}}, +{"model": "api.submission", "pk": 10, "fields": {"group": 1, "submission_number": null, "submission_time": "2024-04-20T00:00:00Z", "is_valid": true}}, +{"model": "api.submission", "pk": 11, "fields": {"group": 5, "submission_number": null, "submission_time": "2024-04-20T00:00:00Z", "is_valid": true}}, +{"model": "api.submissionfile", "pk": 1, "fields": {"submission": 6, "file": "/just.pptx"}}, +{"model": "api.checkresult", "pk": 161575, "fields": {"polymorphic_ctype": 19, "submission": 3, "result": "FAILED", "error_message": "RUNTIMEERROR"}}, +{"model": "api.checkresult", "pk": 196072, "fields": {"polymorphic_ctype": 18, "submission": 9, "result": "SUCCESS", "error_message": null}}, +{"model": "api.checkresult", "pk": 196073, "fields": {"polymorphic_ctype": 18, "submission": 11, "result": "SUCCESS", "error_message": null}}, +{"model": "api.checkresult", "pk": 625810, "fields": {"polymorphic_ctype": 19, "submission": 5, "result": "SUCCESS", "error_message": null}}, +{"model": "api.checkresult", "pk": 792279, "fields": {"polymorphic_ctype": 19, "submission": 8, "result": "SUCCESS", "error_message": null}}, +{"model": "api.checkresult", "pk": 816638, "fields": {"polymorphic_ctype": 18, "submission": 7, "result": "SUCCESS", "error_message": null}}, +{"model": "api.checkresult", "pk": 968087, "fields": {"polymorphic_ctype": 18, "submission": 4, "result": "FAILED", "error_message": "OBLIGATED_DIRECTORY_NOT_FOUND"}}, +{"model": "api.structurecheckresult", "pk": 196072, "fields": {"structure_check": 1}}, +{"model": "api.structurecheckresult", "pk": 196073, "fields": {"structure_check": 1}}, +{"model": "api.structurecheckresult", "pk": 816638, "fields": {"structure_check": 1}}, +{"model": "api.structurecheckresult", "pk": 968087, "fields": {"structure_check": 1}}, +{"model": "api.extracheckresult", "pk": 161575, "fields": {"extra_check": 1, "log_file": "/tough/Congress/set/interesting.txt"}}, +{"model": "api.extracheckresult", "pk": 625810, "fields": {"extra_check": 1, "log_file": "/lead.css"}}, +{"model": "api.extracheckresult", "pk": 792279, "fields": {"extra_check": 1, "log_file": "/movie/peace/wide/staff/agency.csv"}}, +{"model": "api.assistant", "pk": "10", "fields": {"is_active": true, "courses": [2]}}, +{"model": "api.assistant", "pk": "11", "fields": {"is_active": true, "courses": [1]}}, +{"model": "api.assistant", "pk": "12", "fields": {"is_active": true, "courses": [2]}}, +{"model": "api.assistant", "pk": "13", "fields": {"is_active": true, "courses": [2]}}, +{"model": "api.assistant", "pk": "14", "fields": {"is_active": true, "courses": [2]}}, +{"model": "api.teacher", "pk": "15", "fields": {"is_active": true, "courses": [1]}}, +{"model": "api.teacher", "pk": "16", "fields": {"is_active": true, "courses": [1]}}, +{"model": "api.teacher", "pk": "17", "fields": {"is_active": true, "courses": [1]}}] \ No newline at end of file diff --git a/backend/api/serializers/project_serializer.py b/backend/api/serializers/project_serializer.py index 375f65e9..8dd9b59f 100644 --- a/backend/api/serializers/project_serializer.py +++ b/backend/api/serializers/project_serializer.py @@ -4,7 +4,7 @@ from api.models.course import Course from api.models.group import Group from api.models.project import Project -from api.models.submission import Submission +from api.models.submission import Submission, StructureCheckResult, ExtraCheckResult, StateEnum from api.serializers.checks_serializer import StructureCheckSerializer from api.serializers.course_serializer import CourseSerializer from api.serializers.submission_serializer import SubmissionSerializer @@ -26,21 +26,61 @@ def to_representation(self, instance: Project): if not isinstance(instance, Project): raise ValidationError(gettext("project.errors.invalid_instance")) - non_empty_groups = instance.groups.filter(students__isnull=False).count() - groups_submitted = Submission.objects.filter(group__project=instance).count() - submissions_passed = Submission.objects.filter(group__project=instance, is_valid=True).count() + non_empty_groups = Group.objects.filter(project=instance, students__isnull=False).distinct().count() + + groups_submitted_ids = Submission.objects.filter(group__project=instance).values_list('group__id', flat=True) + unique_groups = set(groups_submitted_ids) + groups_submitted = len(unique_groups) + + # The total amount of groups with at least one submission should never exceed the total number of non empty groups + # (the seeder does not account for this restriction) + if (groups_submitted > non_empty_groups): + non_empty_groups = groups_submitted + + passed_structure_checks_submission_ids = StructureCheckResult.objects.filter( + submission__group__project=instance, + submission__is_valid=True, + result=StateEnum.SUCCESS + ).values_list('submission__id', flat=True) + + passed_structure_checks_group_ids = Submission.objects.filter( + id__in=passed_structure_checks_submission_ids + ).values_list('group_id', flat=True) + + unique_groups = set(passed_structure_checks_group_ids) + structure_checks_passed = len(unique_groups) + + passed_extra_checks_submission_ids = ExtraCheckResult.objects.filter( + submission__group__project=instance, + submission__is_valid=True, + result=StateEnum.SUCCESS + ).values_list('submission__id', flat=True) + + passed_extra_checks_group_ids = Submission.objects.filter( + id__in=passed_extra_checks_submission_ids + ).values_list('group_id', flat=True) + + unique_groups = set(passed_extra_checks_group_ids) + extra_checks_passed = len(unique_groups) + + # The total number of passed extra checks combined with the number of passed structure checks + # can never exceed the total number of submissions (the seeder does not account for this restriction) + if (structure_checks_passed + extra_checks_passed > groups_submitted): + extra_checks_passed = groups_submitted - structure_checks_passed return { "non_empty_groups": non_empty_groups, "groups_submitted": groups_submitted, - "submissions_passed": submissions_passed, + "structure_checks_passed": structure_checks_passed, + "extra_checks_passed": extra_checks_passed } class Meta: fields = [ "non_empty_groups", "groups_submitted", - "submissions_passed", + "structure_checks_passed", + "extra_checks_passed" ] diff --git a/backend/api/views/project_view.py b/backend/api/views/project_view.py index 9a330243..d92e145f 100644 --- a/backend/api/views/project_view.py +++ b/backend/api/views/project_view.py @@ -212,6 +212,11 @@ def submission_status(self, request, **_): if (structure_checks_passed + extra_checks_passed > groups_submitted): extra_checks_passed = groups_submitted - structure_checks_passed + print(f"non_empty_groups: {non_empty_groups}") + print(f"groups_submitted: {groups_submitted}") + print(f"structure_checks_passed: {structure_checks_passed}") + print(f"extra_checks_passed: {extra_checks_passed}") + serializer = SubmissionStatusSerializer({ "non_empty_groups": non_empty_groups, "groups_submitted": groups_submitted,