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 15 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). The related 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 should not be included in the exercise entities, so it 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 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
  • Best to have a course with different types of exercises and submissions/results.

For the linked issue

  1. Create a Programming exercise with online code editor and manual assessment. Set the due date one day in the future, and the assessment due date 2 days in the future.
  2. Create an assignment repository, submit once.
  3. Make some changes so that some of the tests pass, e.g. by creating and implementing the SortStrategy interface. Submit again.
  4. Change the exercise due date to two minutes in the future and wait for it to pass.
  5. Start assessing the submission. Add some feedback that slightly changes the score.

General

View the scores and statistics section in the course dashboard. The values should be the same on this branch as they are on develop. The statistics page should also show the same statistics.

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 exercises: Student does not see the results from the latest submission in the overview
1 participant