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

General: Fix exercise archival for courses and exams #8527

Merged
merged 15 commits into from
May 12, 2024

Conversation

julian-christl
Copy link
Member

@julian-christl julian-christl commented May 2, 2024

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I strictly followed the server coding and design guidelines.

Motivation and Context

Fixes #8521

Description

  • I ensured that the exercise detail configurations get loaded on export to prevent the initialization error.
  • I fixed some minor code issues along the way.
  • I added the team config to the export for consistency.
  • I added two tests covering the issue, I confirmed that they fail on develop.
  • While fixing tests, I had to fix the issue that the plagiarism detection config wasn't transferred on import

Steps for Testing

Prerequisites:

  • 1 Course with each type of exercise, activate plagiarism control wherever possible. Set one exercise as team exercise
  • 1 Instructor
  • 1+ Student
  1. Participate in all exercises
  2. Wait for the course to end/set end date
  3. Navigate to the course detail view
  4. Hit "Archive Course" on the right; expect no error and success alert
  5. Download the archive, expect no issues

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 Exam with each type of exercise spread over exercise groups
  1. Participate in the exam as a student
  2. Wait for the exam to end as an instructor
  3. Go to the exam detail page and export the exam; expect no error and a success alert
  4. Download the archive; expect no issues

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked






Review Progress

Performance Review

  • 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

Exam Mode Test

  • Test 1
  • Test 2

Test Coverage

Only significant change coverage-wise was an auto-transformation if-else to switch-case.

@julian-christl julian-christl self-assigned this May 2, 2024
@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) labels May 2, 2024
Copy link

github-actions bot commented May 2, 2024

⚠️ Unable to deploy to test servers ⚠️

The docker build needs to run through before deploying.

@github-actions github-actions bot added the deployment-error Added by deployment workflows if an error occured label May 2, 2024
@julian-christl julian-christl added deploy:artemis-test4 and removed deployment-error Added by deployment workflows if an error occured labels May 2, 2024
@julian-christl julian-christl temporarily deployed to artemis-test4.artemis.cit.tum.de May 2, 2024 11:54 — with GitHub Actions Inactive
coderabbitai[bot]
coderabbitai bot previously approved these changes May 6, 2024
BaumiCoder
BaumiCoder previously approved these changes May 7, 2024
Copy link
Member

@BaumiCoder BaumiCoder left a comment

Choose a reason for hiding this comment

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

Re-tested on my local machine after changes.

laadvo
laadvo previously approved these changes May 10, 2024
Copy link
Contributor

@laadvo laadvo left a comment

Choose a reason for hiding this comment

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

Tested the exam mode on ts2, exporting the finished exam with partitipations in all exercises worked without any problems. I was able to download the archive 👍

Copy link
Contributor

@JohannesStoehr JohannesStoehr 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

@JohannesWt JohannesWt 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 👍

Copy link
Contributor

@laadvo laadvo left a comment

Choose a reason for hiding this comment

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

Reapprove exam mode test

Copy link
Contributor

@DominikRemo DominikRemo left a comment

Choose a reason for hiding this comment

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

Thank you for addressing my comments

Copy link
Member

@BBesrour BBesrour left a comment

Choose a reason for hiding this comment

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

Exam mode:
Tested on TS3: Created exam

  • Created exam with 5 exercise groups each with a different exercise type
  • Participated with a student
  • end exam
  • Archive Exam -> No errors
  • Archive file downloadable

Normal mode:
Tested locally:

  • Created 5 exercises (programming, modeling, and text exercise with plagiarism / Text exercise in teams)
  • Create a team for text exercise
  • Participated with a student in all exercises
  • end course
  • Archive Exam -> No errors
  • Archive file downloadable

@krusche krusche merged commit 2611bcd into develop May 12, 2024
44 of 48 checks passed
@krusche krusche deleted the bugfix/export/fix-exercise-archival branch May 12, 2024 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Programming exercises: Archiving a course is not possible
8 participants