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

Programming exercises: Fix display of long feedback details and submission count in exams #7348

Merged
merged 8 commits into from
Oct 11, 2023

Conversation

b-fein
Copy link
Contributor

@b-fein b-fein commented Oct 10, 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.

Motivation and Context

The FeedbackDTO did not contain the ID of the feedback. This causes that in the feedback detail view a potential long feedback can no longer be fetched, since the ID of the feedback it belongs to is required to construct the URL and know on the server which feedback should be fetched.
Currently it tries to fetch the long feedback from an URL like
https://ARTEMIS/api/results/123456789/feedbacks/undefined/long-feedback
which fails since undefined is not a valid id.

Description

Adds the ID of the feedback to the DTO.
Then the feedback can be fetched from the server again.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Programming exercise
  1. Add a test case in the exercise test repository that contains a long feedback, e.g. by placing a fail("abc".repeat(10_000)) method call inside.
  2. Instructor view of the exercise: ‘Edit in Editor’ to open the online editor, select the solution repository.
  3. Submit this solution, the ‘Building and Testing’ spinner is started.
  4. When the result from the CI system is returned, open the feedback details and then the ‘See more’ for the test case with the long feedback.
  5. The additional text should be loaded without error.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

@b-fein b-fein added the bugfix label Oct 10, 2023
@github-actions github-actions bot added the server Pull requests that update Java code. (Added Automatically!) label Oct 10, 2023
@b-fein b-fein marked this pull request as ready for review October 10, 2023 12:20
@b-fein b-fein requested a review from a team as a code owner October 10, 2023 12:20
@b-fein b-fein requested a review from chrisknedl October 10, 2023 12:20
@b-fein b-fein added this to the 6.5.5 milestone Oct 10, 2023
Strohgelaender
Strohgelaender previously approved these changes Oct 10, 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 (I included the same fix in #7015 :) )

chrisknedl
chrisknedl previously approved these changes Oct 10, 2023
Copy link
Contributor

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

@b-fein b-fein changed the title General: Fix fetching of long feedback General: Fix display of long feedback details Oct 10, 2023
tobias-lippert
tobias-lippert previously approved these changes Oct 10, 2023
Copy link
Contributor

@tobias-lippert tobias-lippert left a comment

Choose a reason for hiding this comment

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

Code LGTM

@Strohgelaender Strohgelaender dismissed stale reviews from tobias-lippert, chrisknedl, and themself via 4ef6376 October 10, 2023 18:30
Strohgelaender
Strohgelaender previously approved these changes Oct 10, 2023
@github-actions github-actions bot added the tests label Oct 10, 2023
@krusche krusche changed the title General: Fix display of long feedback details Programming exercises: Fix display of long feedback details and submission count in exams Oct 10, 2023
@krusche krusche modified the milestones: 6.5.5, 6.6.0 Oct 10, 2023
@Strohgelaender Strohgelaender self-assigned this Oct 11, 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 👍

@krusche
Copy link
Member

krusche commented Oct 11, 2023

Thanks for @Strohgelaender for the new tests

@krusche krusche merged commit acc30ba into develop Oct 11, 2023
14 of 18 checks passed
@krusche krusche deleted the fix/long-feedback-fetch branch October 11, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix priority:high ready for review server Pull requests that update Java code. (Added Automatically!) small tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants