Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development: Delete old files properly when updating file submissions #6849

Merged
merged 26 commits into from
Jul 26, 2023

Conversation

MarkusPaulsen
Copy link
Contributor

@MarkusPaulsen MarkusPaulsen commented Jul 7, 2023

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I followed the coding and design guidelines.
  • I documented the Java code using JavaDoc style.

Motivation and Context

The parameter fileUploadSubmission is currently getting used for getting the last submission in FileUploadSubmissionService. The data of this parameter is under the control of the user, which may pose certain risks.

Description

Instead of FileUploadSubmission fileUploadSubmission, we now use StudentParticipation participation for getting the last submission in FileUploadSubmissionService, as the data of this parameter is not under the control of the user.

Steps for Testing

We just want to make sure that I didn't accidentally break the implementation.

Prerequisites:

  • 1 Instructor
  • 1 Student

Fileupload Exercise (Instructor, Student):

  1. Create a file upload exercise with a description. Upload an image to the description
  2. Start the exercise, the image should show up properly as well as the rest of the description
  3. Participate in the exercise
  4. Upload another file
  5. View/Download the image
  6. No issues should occur

Review Progress

Performance Review

  • I confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

@MarkusPaulsen MarkusPaulsen requested a review from a team as a code owner July 7, 2023 05:24
@MarkusPaulsen MarkusPaulsen self-assigned this Jul 7, 2023
@github-actions github-actions bot added the server Pull requests that update Java code. (Added Automatically!) label Jul 7, 2023
@julian-christl julian-christl self-assigned this Jul 8, 2023
Copy link
Contributor

@Strohgelaender Strohgelaender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server style action is currently failing, please run spotlessApply to fix the reported issues.

@MarkusPaulsen MarkusPaulsen changed the title Development: Load participation from DB with file-upload submissions Development: Use participation from DB with file-upload submissions Jul 26, 2023
@MarkusPaulsen MarkusPaulsen changed the title Development: Use participation from DB with file-upload submissions Development: Use participation to get file-upload submissions from DB Jul 26, 2023
Copy link
Contributor

@RY997 RY997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reapprove

@krusche krusche changed the title Development: Use participation to get file-upload submissions from DB Development: Delete old files properly when updating file submissions Jul 26, 2023
Copy link
Member

@krusche krusche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me and makes sense 👍

Copy link
Contributor

@dearjasmina dearjasmina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reapprove

Copy link
Contributor

@Strohgelaender Strohgelaender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good.

@krusche krusche added this to the 6.3.8 milestone Jul 26, 2023
@krusche krusche merged commit d5ccc42 into develop Jul 26, 2023
30 of 32 checks passed
@krusche krusche deleted the chore/utiliseStudentParticipation branch July 26, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:FileUpload ready to merge server Pull requests that update Java code. (Added Automatically!) small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants