From 2dde1fe53c7198b607633f2adf95c3e5bd7ceb5b Mon Sep 17 00:00:00 2001 From: Bram Meir <159529490+BramMeir@users.noreply.github.com> Date: Mon, 13 May 2024 18:50:02 +0200 Subject: [PATCH] Layout changes extra checks selector (#420) * fix: make project creation working again after backend changes * chore: init layout extra checks * chore: data table for docker images * chore: possibility to add private docker image * chore: display list of extra checks that were made * fix: refix code for sharing course link * chore: backend requests for extra checks creation * chore: working creation of extra check * fix: translations + empty checks list * fix: linting * chore: extra checks services + edit project functionality * fix: linting * fix: fixes after review lander * fix: linting * fix: try fix margin --- backend/api/serializers/project_serializer.py | 3 ++- frontend/src/assets/lang/app/en.json | 3 +-- frontend/src/assets/lang/app/nl.json | 2 +- .../components/projects/ExtraChecksUpload.vue | 21 ++++++++++--------- .../src/views/projects/CreateProjectView.vue | 4 ++-- .../src/views/projects/UpdateProjectView.vue | 4 ++-- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/backend/api/serializers/project_serializer.py b/backend/api/serializers/project_serializer.py index 087fa6f6..274d4e55 100644 --- a/backend/api/serializers/project_serializer.py +++ b/backend/api/serializers/project_serializer.py @@ -81,7 +81,8 @@ def validate(self, attrs): raise ValidationError(gettext("project.errors.context")) # Check if start date of the project is not in the past - if "start_date" in attrs and attrs["start_date"] < timezone.now().replace(hour=0, minute=0, second=0): + if "start_date" in attrs and not self.partial and \ + attrs["start_date"] < timezone.now().replace(hour=0, minute=0, second=0): raise ValidationError(gettext("project.errors.start_date_in_past")) # Set the start date depending on if it is a partial update and whether it was given by the user diff --git a/frontend/src/assets/lang/app/en.json b/frontend/src/assets/lang/app/en.json index 06f944fb..a76b97fc 100644 --- a/frontend/src/assets/lang/app/en.json +++ b/frontend/src/assets/lang/app/en.json @@ -69,7 +69,6 @@ "max_score": "Maximum score that can be achieved", "visibility": "Make project visible to students", "scoreVisibility": "Make score, when uploaded, automatically visible to students", - "bashUpload": "Upload a bash script for automatic testing", "submissionStructure": "Structure of how a submission should be made", "noStudents": "No students in this group", "locked": "Closed", @@ -83,7 +82,7 @@ "dockerImage": "Docker image", "timeLimit": "Time limit for execution (in seconds)", "memoryLimit": "Memory limit for execution (in MB)", - "showLog": "Show logfile to students" + "showLog": "Making the extra logs of the docker container visible to the students" } }, "submissions": { diff --git a/frontend/src/assets/lang/app/nl.json b/frontend/src/assets/lang/app/nl.json index 57840b93..f403b20d 100644 --- a/frontend/src/assets/lang/app/nl.json +++ b/frontend/src/assets/lang/app/nl.json @@ -80,7 +80,7 @@ "dockerImage": "Docker image", "timeLimit": "Tijdslimiet voor de uitvoering (in seconden)", "memoryLimit": "Geheugenlimiet voor de uitvoering (in MB)", - "showLog": "Toon logbestand aan studenten" + "showLog": "Maak de extra logs van de docker container zichtbaar voor de studenten" } }, "submissions": { diff --git a/frontend/src/components/projects/ExtraChecksUpload.vue b/frontend/src/components/projects/ExtraChecksUpload.vue index b1aecb9e..aa96f0ae 100644 --- a/frontend/src/components/projects/ExtraChecksUpload.vue +++ b/frontend/src/components/projects/ExtraChecksUpload.vue @@ -178,14 +178,15 @@ onMounted(async () => { @@ -277,8 +278,8 @@ onMounted(async () => {
-
- +
+
diff --git a/frontend/src/views/projects/CreateProjectView.vue b/frontend/src/views/projects/CreateProjectView.vue index c72a41d7..a5a07015 100644 --- a/frontend/src/views/projects/CreateProjectView.vue +++ b/frontend/src/views/projects/CreateProjectView.vue @@ -250,8 +250,8 @@ async function submitProject(): Promise {
-
- +
+ {
-
- +
+