Skip to content

Commit

Permalink
update to add gradedComment when comparing by note
Browse files Browse the repository at this point in the history
  • Loading branch information
barais committed Jul 25, 2023
1 parent 74334e8 commit b9db746
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/fr/istic/web/rest/ExtendedAPI.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package fr.istic.web.rest;

import fr.istic.config.JHipsterProperties;
import fr.istic.domain.Comments;
import fr.istic.domain.Course;
import fr.istic.domain.CourseGroup;
import fr.istic.domain.Exam;
Expand All @@ -13,7 +12,6 @@
import fr.istic.domain.StudentResponse;
import fr.istic.domain.TextComment;
import fr.istic.domain.User;
import fr.istic.domain.Zone;
import fr.istic.domain.enumeration.GradeType;
import fr.istic.security.AuthoritiesConstants;
import fr.istic.service.CacheUploadService;
Expand Down Expand Up @@ -45,7 +43,6 @@
import fr.istic.service.customdto.correctexamstate.MarkingExamStateDTO;
import fr.istic.service.customdto.correctexamstate.QuestionStateDTO;
import fr.istic.service.customdto.correctexamstate.SheetStateDTO;
import fr.istic.service.dto.CommentsDTO;
import fr.istic.service.dto.CourseDTO;
import fr.istic.service.dto.ExamDTO;
import fr.istic.service.dto.GradedCommentDTO;
Expand All @@ -58,7 +55,6 @@
import fr.istic.service.mapper.TextCommentMapper;
import fr.istic.service.mapper.ZoneMapper;
import fr.istic.web.util.HeaderUtil;
import io.quarkus.cache.CacheInvalidateAll;

import javax.annotation.security.RolesAllowed;
import javax.enterprise.context.ApplicationScoped;
Expand Down Expand Up @@ -1622,6 +1618,9 @@ public Response getZone4Mark(@PathParam("examId") final long examId, @PathParam(
answerdto.setComments(commentsMapper.toDto(new ArrayList<>(studentResponse.comments)));
answerdto.setTextComments(
studentResponse.textcomments.stream().map(gc -> gc.id).collect(Collectors.toList()));
answerdto.setGradedComments(
studentResponse.gradedcomments.stream().map(gc -> gc.id).collect(Collectors.toList()));

for (TextComment gc : studentResponse.textcomments) {
if (!textcomments.containsKey(gc.id)) {
textcomments.put(gc.id, textCommentMapper.toDto(gc));
Expand Down

0 comments on commit b9db746

Please sign in to comment.