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: Refactor Course Dashboard Filtering #10365

Draft
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

chrisknedl
Copy link
Contributor

@chrisknedl chrisknedl commented Feb 18, 2025

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the server 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.

Motivation and Context

There is a bug related to the data that is shown on the course dashboard (#9086). Those pieces of code were so convoluted that a fix without refactoring would have been very difficult to understand for reviewers, and would have further decreased the code's readability and maintainability.

Fixes #9086.

Description

Most importantly, the code assumed that for a singular student, multiple participations are possible for the same exercise, which is not true. Therefore, the ordering based on the initialization state has been removed, and the corresponding logic has been reduced to the relevant parts. Since only rated exercises are relevant for the course dashboard, practice programming exercise submissions are not considered any more.

The logic for submission filtering has been moved from the Exercise Entities to a new SubmissionFilterService, where instead of polymorphism, a case distinction is used to determine the relevant filter logic for the type of exercise. The filtering of submissions for the course dashboard has nothing to do with the exercise entity, anyway.

The relevant result for the course dashboard now always comes with the connected submission. Previously, it was theoretically possible to return a result as part of a submission to which it previously did not belong.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  1. Log in to Artemis
  2. Navigate to Course Administration
  3. ...

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 2 Students
  • 1 Exam with a Programming Exercise
  1. Log in to Artemis
  2. Participate in the exam as a student
  3. Make sure that the UI of the programming exercise in the exam mode stays unchanged. You can use the exam mode documentation as reference.
  4. ...

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

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 even for very large courses with more than 2000 students.
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Performance Tests

  • Test 1
  • Test 2

Test Coverage

Screenshots

@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) assessment Pull requests that affect the corresponding module communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module iris Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assessment Pull requests that affect the corresponding module communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module iris Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Work In Progress
Development

Successfully merging this pull request may close these issues.

Programing exercise: Student does not see the results from the latest submission in the overview
1 participant