Skip to content

Commit

Permalink
chore: do todo's
Browse files Browse the repository at this point in the history
  • Loading branch information
Topvennie committed Apr 6, 2024
1 parent 9fcc0f6 commit 9b1c7c7
Show file tree
Hide file tree
Showing 17 changed files with 176 additions and 107 deletions.
60 changes: 34 additions & 26 deletions backend/api/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-04 15:08+0200\n"
"POT-Creation-Date: 2024-04-06 10:59+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -18,58 +18,66 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: helpers/check_folder_structure.py:141
#: logic/check_folder_structure.py:142
msgid "zip.errors.invalid_structure.blocked_extension_found"
msgstr "The submitted zip file contains a file with a non-allowed extension."

#: helpers/check_folder_structure.py:145 helpers/check_folder_structure.py:196
#: logic/check_folder_structure.py:146 logic/check_folder_structure.py:197
msgid "zip.success"
msgstr "The submitted zip file succeeds in all checks."

#: helpers/check_folder_structure.py:148
#: logic/check_folder_structure.py:149
msgid "zip.errors.invalid_structure.obligated_extension_not_found"
msgstr ""
"The submitted zip file doesn't have any file with a certain file extension "
"that's obligated."

#: helpers/check_folder_structure.py:175
#: logic/check_folder_structure.py:176
msgid "zip.errors.invalid_structure.directory_not_defined"
msgstr "An obligated directory was not found in the submitted zip file."

#: helpers/check_folder_structure.py:195
#: logic/check_folder_structure.py:196
msgid "zip.errors.invalid_structure.directory_not_found_in_template"
msgstr ""
"There was a directory found in the submitted zip file, which was not asked "
"for."

#: serializers/course_serializer.py:54 serializers/course_serializer.py:73
#: serializers/course_serializer.py:92 serializers/course_serializer.py:111
#: serializers/checks_serializer.py:61
msgid "extra_check.error.docker_image"
msgstr "The field 'docker_image' is required."

#: serializers/checks_serializer.py:65
msgid "extra_check.error.timeout"
msgstr "The field 'timeout' cannot be greater than 1000."

#: serializers/course_serializer.py:59 serializers/course_serializer.py:78
#: serializers/course_serializer.py:97 serializers/course_serializer.py:116
msgid "courses.error.context"
msgstr "The course is not supplied in the context."

#: serializers/course_serializer.py:60 tests/test_locale.py:28
#: serializers/course_serializer.py:65 tests/test_locale.py:28
#: tests/test_locale.py:38
msgid "courses.error.students.already_present"
msgstr "The student is already present in the course."

#: serializers/course_serializer.py:64 serializers/course_serializer.py:83
#: serializers/course_serializer.py:102 serializers/course_serializer.py:121
#: serializers/course_serializer.py:69 serializers/course_serializer.py:88
#: serializers/course_serializer.py:107 serializers/course_serializer.py:126
msgid "courses.error.past_course"
msgstr "The course is from a past year, thus cannot be manipulated."

#: serializers/course_serializer.py:79
#: serializers/course_serializer.py:84
msgid "courses.error.students.not_present"
msgstr "The student is not present in the course."

#: serializers/course_serializer.py:98
#: serializers/course_serializer.py:103
msgid "courses.error.teachers.already_present"
msgstr "The teacher is already present in the course."

#: serializers/course_serializer.py:117
#: serializers/course_serializer.py:122
msgid "courses.error.teachers.not_present"
msgstr "The teacher is not present in the course."

#: serializers/docker_serializer.py:21
#: serializers/docker_serializer.py:19
msgid "docker.errors.custom"
msgstr "User is not allowed to create public images"

Expand Down Expand Up @@ -142,35 +150,35 @@ msgstr "The submission was successfully added to the group."
msgid "admins.success.add"
msgstr "The admin was successfully added."

#: views/course_view.py:45
#: views/course_view.py:48
msgid "courses.success.create"
msgstr "The course was successfully created."

#: views/course_view.py:80
#: views/course_view.py:112
msgid "courses.success.assistants.add"
msgstr "The assistant was successfully added to the course."

#: views/course_view.py:100
#: views/course_view.py:132
msgid "courses.success.assistants.remove"
msgstr "The assistant was successfully removed from the course."

#: views/course_view.py:135
#: views/course_view.py:167
msgid "courses.success.students.add"
msgstr "The student was successfully added to the course."

#: views/course_view.py:156
#: views/course_view.py:188
msgid "courses.success.students.remove"
msgstr "The student was successfully removed from the course."

#: views/course_view.py:191
#: views/course_view.py:223
msgid "courses.success.teachers.add"
msgstr "The teacher was successfully added to the course."

#: views/course_view.py:212
#: views/course_view.py:244
msgid "courses.success.teachers.remove"
msgstr "The teacher was successfully removed from the course."

#: views/course_view.py:248
#: views/course_view.py:280
msgid "course.success.project.add"
msgstr "The project was successfully added to the course."

Expand All @@ -182,14 +190,14 @@ msgstr "The student was successfully added to the group."
msgid "group.success.students.remove"
msgstr "The student was successfully removed from the group."

#: views/project_view.py:86
#: views/project_view.py:87
msgid "project.success.groups.created"
msgstr "A group was successfully created for the project."

#: views/project_view.py:124
#: views/project_view.py:125
msgid "project.success.structure_check.add"
msgstr "A strucure check was successfully created for the project."

#: views/project_view.py:159
#: views/project_view.py:161
msgid "project.success.extra_check.add"
msgstr "The extra check check was successfully added to the project."
60 changes: 34 additions & 26 deletions backend/api/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-04 15:08+0200\n"
"POT-Creation-Date: 2024-04-06 10:59+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -18,58 +18,66 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: helpers/check_folder_structure.py:141
#: logic/check_folder_structure.py:142
msgid "zip.errors.invalid_structure.blocked_extension_found"
msgstr ""
"Bestanden met een verboden extensie zijn gevonden in het ingediende zip-"
"bestand."

#: helpers/check_folder_structure.py:145 helpers/check_folder_structure.py:196
#: logic/check_folder_structure.py:146 logic/check_folder_structure.py:197
msgid "zip.success"
msgstr "Het zip-bestand van de indiening bevat alle benodigde bestanden."

#: helpers/check_folder_structure.py:148
#: logic/check_folder_structure.py:149
msgid "zip.errors.invalid_structure.obligated_extension_not_found"
msgstr ""
"Er is geen enkel bestand met een bepaalde extensie die verplicht is in het "
"ingediende zip-bestand."

#: helpers/check_folder_structure.py:175
#: logic/check_folder_structure.py:176
msgid "zip.errors.invalid_structure.directory_not_defined"
msgstr "Een verplichte map is niet aanwezig in het ingediende zip-bestand."

#: helpers/check_folder_structure.py:195
#: logic/check_folder_structure.py:196
msgid "zip.errors.invalid_structure.directory_not_found_in_template"
msgstr "Het ingediende zip-bestand bevat een map die niet gevraagd is."

#: serializers/course_serializer.py:54 serializers/course_serializer.py:73
#: serializers/course_serializer.py:92 serializers/course_serializer.py:111
#: serializers/checks_serializer.py:61
msgid "extra_check.error.docker_image"
msgstr "Het veld 'docker_image' is vereist."

#: serializers/checks_serializer.py:65
msgid "extra_check.error.timeout"
msgstr "Het veld 'timeout' mag niet groter zijn dan 1000"

#: serializers/course_serializer.py:59 serializers/course_serializer.py:78
#: serializers/course_serializer.py:97 serializers/course_serializer.py:116
msgid "courses.error.context"
msgstr "De opleiding is niet meegeleverd als context."

#: serializers/course_serializer.py:60 tests/test_locale.py:28
#: serializers/course_serializer.py:65 tests/test_locale.py:28
#: tests/test_locale.py:38
msgid "courses.error.students.already_present"
msgstr "De student bevindt zich al in de opleiding."

#: serializers/course_serializer.py:64 serializers/course_serializer.py:83
#: serializers/course_serializer.py:102 serializers/course_serializer.py:121
#: serializers/course_serializer.py:69 serializers/course_serializer.py:88
#: serializers/course_serializer.py:107 serializers/course_serializer.py:126
msgid "courses.error.past_course"
msgstr "De opleiding die men probeert te manipuleren is van een vorig jaar."

#: serializers/course_serializer.py:79
#: serializers/course_serializer.py:84
msgid "courses.error.students.not_present"
msgstr "De student bevindt zich niet in de opleiding."

#: serializers/course_serializer.py:98
#: serializers/course_serializer.py:103
msgid "courses.error.teachers.already_present"
msgstr "De lesgever bevindt zich al in de opleiding."

#: serializers/course_serializer.py:117
#: serializers/course_serializer.py:122
msgid "courses.error.teachers.not_present"
msgstr "De lesgever bevindt zich niet in de opleiding."

#: serializers/docker_serializer.py:21
#: serializers/docker_serializer.py:19
msgid "docker.errors.custom"
msgstr "Gebruiker is niet toegelaten om publieke afbeeldingen te maken"

Expand Down Expand Up @@ -143,35 +151,35 @@ msgstr "De indiening is succesvol toegevoegd aan de groep."
msgid "admins.success.add"
msgstr "De admin is successvol toegevoegd."

#: views/course_view.py:45
#: views/course_view.py:48
msgid "courses.success.create"
msgstr "het vak is succesvol aangemaakt."

#: views/course_view.py:80
#: views/course_view.py:112
msgid "courses.success.assistants.add"
msgstr "De assistent is succesvol toegevoegd aan de opleiding."

#: views/course_view.py:100
#: views/course_view.py:132
msgid "courses.success.assistants.remove"
msgstr "De assistent is succesvol verwijderd uit de opleiding."

#: views/course_view.py:135
#: views/course_view.py:167
msgid "courses.success.students.add"
msgstr "De student is succesvol toegevoegd aan de opleiding."

#: views/course_view.py:156
#: views/course_view.py:188
msgid "courses.success.students.remove"
msgstr "De student is succesvol verwijderd uit de opleiding."

#: views/course_view.py:191
#: views/course_view.py:223
msgid "courses.success.teachers.add"
msgstr "De lesgever is succesvol toegevoegd aan de opleiding."

#: views/course_view.py:212
#: views/course_view.py:244
msgid "courses.success.teachers.remove"
msgstr "De lesgever is succesvol verwijderd uit de opleiding."

#: views/course_view.py:248
#: views/course_view.py:280
msgid "course.success.project.add"
msgstr "Het project is succesvol toegevoegd aan de opleiding."

Expand All @@ -183,14 +191,14 @@ msgstr "De student is succesvol toegevoegd aan de groep."
msgid "group.success.students.remove"
msgstr "De student is succesvol verwijderd uit de groep."

#: views/project_view.py:86
#: views/project_view.py:87
msgid "project.success.groups.created"
msgstr "De groep is succesvol toegevoegd aan het project."

#: views/project_view.py:124
#: views/project_view.py:125
msgid "project.success.structure_check.add"
msgstr "De structuur check is succesvol toegevoegd aan het project."

#: views/project_view.py:159
#: views/project_view.py:161
msgid "project.success.extra_check.add"
msgstr "De extra check is succesvol toegevoegd aan het project."
32 changes: 7 additions & 25 deletions backend/api/migrations/0008_add_extra_checks.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
from api.logic.get_file_path import (get_docker_image_file_path,
get_extra_check_file_path,
get_extra_check_result_file_path,
get_submission_file_path)
from django.db import migrations, models


# TODO: Move changes to new file, ER, db
class Migration(migrations.Migration):

dependencies = [
Expand All @@ -18,10 +13,8 @@ class Migration(migrations.Migration):
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256, blank=False, null=False)),
('file', models.FileField(upload_to=get_docker_image_file_path, max_length=256, blank=False, null=False)),
('owner', models.ForeignKey(to="authentication.user", on_delete=models.SET_NULL,
related_name="docker_images", blank=False, null=True)),
('public', models.BooleanField(default=False, blank=False, null=False)),
('file_path', models.FileField(upload_to="docker_images", max_length=256, blank=False, null=False)),
('custom', models.BooleanField(default=False, blank=False, null=False)),
]
),
migrations.CreateModel(
Expand All @@ -37,14 +30,13 @@ class Migration(migrations.Migration):
),
migrations.AddField(
model_name="extracheck",
name="docker_image",
field=models.ForeignKey(to="api.dockerimage", on_delete=models.CASCADE,
related_name="extra_checks", blank=False, null=False),
name="docker_image_id",
field=models.ForeignKey(to="api.dockerimage", on_delete=models.CASCADE, related_name="extra_checks"),
),
migrations.AddField(
model_name="extracheck",
name="file",
field=models.FileField(upload_to=get_extra_check_file_path, max_length=256, blank=False, null=False)
name="file_path",
field=models.CharField(max_length=256, blank=False, null=False)
),
migrations.AddField(
model_name="extracheck",
Expand All @@ -65,16 +57,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="extrachecksresult",
name="log_file",
field=models.FileField(upload_to=get_extra_check_result_file_path, max_length=256, blank=False, null=True)
),
migrations.AddField(
model_name="extrachecksresult",
name="is_valid",
field=models.BooleanField(default=True, blank=False, null=False)
),
migrations.AlterField(
model_name="submissionfile",
name="file",
field=models.FileField(upload_to=get_submission_file_path, max_length=265, blank=False, null=False)
field=models.CharField(max_length=256, blank=False, null=True)
)
]
Loading

0 comments on commit 9b1c7c7

Please sign in to comment.