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
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import de.tum.in.www1.artemis.domain.participation.Participation;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public record ParticipationDTO(Long id, boolean testRun, String type) {
public record ParticipationDTO(Long id, boolean testRun, String type, Integer submissionCount) {

public static ParticipationDTO of(Participation participation) {
return new ParticipationDTO(participation.getId(), participation.isTestRun(), participation.getType());
return new ParticipationDTO(participation.getId(), participation.isTestRun(), participation.getType(), participation.getSubmissionCount());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ public record ResultDTO(Long id, ZonedDateTime completionDate, Boolean successfu
Integer codeIssueCount) {

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public record FeedbackDTO(String text, String detailText, boolean hasLongFeedbackText, String reference, Double credits, Boolean positive, FeedbackType type,
public record FeedbackDTO(Long id, String text, String detailText, boolean hasLongFeedbackText, String reference, Double credits, Boolean positive, FeedbackType type,
Visibility visibility) {

public static FeedbackDTO of(Feedback feedback) {
return new FeedbackDTO(feedback.getText(), feedback.getDetailText(), feedback.getHasLongFeedbackText(), feedback.getReference(), feedback.getCredits(),
feedback.isPositive(), feedback.getType(), feedback.getVisibility());
return new FeedbackDTO(feedback.getId(), feedback.getText(), feedback.getDetailText(), feedback.getHasLongFeedbackText(), feedback.getReference(),
feedback.getCredits(), feedback.isPositive(), feedback.getType(), feedback.getVisibility());

}
}
Expand Down
Loading