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: Fix issues in the user data export #7084

Merged
merged 40 commits into from
Sep 15, 2023

Conversation

tobias-lippert
Copy link
Contributor

@tobias-lippert tobias-lippert commented Aug 18, 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 added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I documented the Java code using JavaDoc style.

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
  • I followed the coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes (not really applicable)
  • I translated all newly inserted strings into English and German.

Motivation and Context

I still had a couple of small things to improve for the data export on my list and I wanted to address them.
Additionally, while testing this feature on production, it turned out that the current download solution is not viable because the export can become quite large and the download fails because it runs into timeouts.
Moreover, this PR fixes a small issue that we no longer include exam information whether an exam was passed and with which grade if no gradingscale for this exam is defined.

Description

  • Added additional subdirectories to separate exams and exercises in a course
  • Added an exercise prefix to exercise directories to be consistent with exams and courses
  • Do no longer download the file from the server using the client and then hand it over to the browser but instead hand it over directly to the browser.
  • Checks if an grading scale for an exam exists and only if it does, add information about grades and passed/not passed
  • Add general exam information only if it is available.
  • Use an executor service to create exports in parallel. We allow 60 minutes to create the data exports. Afterward, all creation processes in progress are cancelled and will be started again the next time the cron job is run.
  • Only include automatic results for programming exercises before the assessment due date if user is not at least a tutor in the course
  • consider due date instead of assessment due for quiz exercises

Steps for Testing

For testing purposes, data exports are created every 5 min, after ~ 5 minutes just reload the page again. You also receive a webapp notification and also an email (but most likely you do not have access to the email address of the user)

You can only request a data export if there has not been requested one for your user in the last 14 days.

Prerequisites:

  • 1 User
  • Make sure the user has at least participated in one exam without a grading scale and in one exam with a grading scale and has at least participated in one programming exercise with manual assessment with an assessment due date in the future and participated in a quiz that has not yet ended.
  1. Log in to Artemis
  2. Navigate to Privacy Statement
  3. Navigate to Data Export
  4. Request a data export
  5. Once created, download it
  6. Make sure that the browser shows the progress
  7. Open the data export and verify that the new subdirectories exist
  8. Verify that exercise directories have an exercise_ prefix
  9. Verify that for an exam without grading scale the exam_results.csv file has no information/columns about passed and grade
  10. Verfiy that for an exam with a grading scale the columns are included.
  11. Verify that no columns in the general_exam_Information.csv file exist without content
  12. Verify that for the programming exercise no manual correction feedback or a new score is leaked
  13. Verify that for the quiz exercise no results are included.

Review Progress

Performance Review

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance
  • I (as a reviewer) 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

Server

Class/File Line Coverage Confirmation (assert/expect)
DataExportExerciseCreationService 93%
DataExportExamCreationService 95%
DataExportResource 97%
DataExportQuizExerciseCreationService 100%

Client

Class/File Line Coverage Confirmation (assert/expect)
data-export.component.ts 100%
data-export.service.ts 100%

…assed and grade information in exam results if no grading scale exists and use exercise prefix for exercise directories to be consistent with exams
@tobias-lippert tobias-lippert requested a review from a team as a code owner August 18, 2023 09:58
@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) labels Aug 18, 2023
@tobias-lippert tobias-lippert added this to the 6.4.1 milestone Aug 18, 2023
lennart-keller
lennart-keller previously approved these changes Aug 18, 2023
Copy link
Contributor

@lennart-keller lennart-keller 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 very good to me. Just two very minor things.

Copy link
Collaborator

@MaximilianAnzinger MaximilianAnzinger left a comment

Choose a reason for hiding this comment

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

In general code looks good to me.

I left one comment and I've one suggestion: I would appreciate JavaDocs for Services. Although many of your services don't do this consistently, it would make sense to help other developers by including documentation.

Strohgelaender
Strohgelaender previously approved these changes Aug 25, 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.

lgtm

Copy link
Collaborator

@MaximilianAnzinger MaximilianAnzinger left a comment

Choose a reason for hiding this comment

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

Overall code looks good. Found some inconsistencies in the doc comments.

pal03377
pal03377 previously approved these changes Sep 3, 2023
Copy link
Contributor

@pal03377 pal03377 left a comment

Choose a reason for hiding this comment

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

Good improvements! Especially well done with all the new comments

pal03377
pal03377 previously approved these changes Sep 3, 2023
Copy link
Contributor

@pal03377 pal03377 left a comment

Choose a reason for hiding this comment

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

code

@krusche krusche modified the milestones: 6.4.2, 6.4.3 Sep 4, 2023
pal03377
pal03377 previously approved these changes Sep 8, 2023
@krusche krusche modified the milestones: 6.4.3, 6.5.0 Sep 9, 2023
Copy link
Collaborator

@MaximilianAnzinger MaximilianAnzinger left a comment

Choose a reason for hiding this comment

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

Code

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.

new changes lgtm

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.

good changes

Copy link
Contributor

@pal03377 pal03377 left a comment

Choose a reason for hiding this comment

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

Reapprove code after cronjob was changed to value for production

@krusche krusche changed the title Development: Small improvements for the data export Development: Fix issues in the user data export Sep 15, 2023
@krusche krusche merged commit d95613d into develop Sep 15, 2023
@krusche krusche deleted the enhancement/improve-data-export-download branch September 15, 2023 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) ready to merge server Pull requests that update Java code. (Added Automatically!) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants