-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from correctexam/develop
update timestamp also for hybrid comment
- Loading branch information
Showing
2 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
import fr.istic.service.QuestionService; | ||
import fr.istic.service.ScanService; | ||
import fr.istic.service.SecurityService; | ||
import fr.istic.service.StudentResponseService; | ||
|
||
import org.apache.commons.io.IOUtils; | ||
import org.eclipse.microprofile.config.inject.ConfigProperty; | ||
|
@@ -126,6 +127,10 @@ public class ExtendedAPI { | |
|
||
private final Logger log = LoggerFactory.getLogger(ExtendedAPI.class); | ||
|
||
|
||
@Inject | ||
StudentResponseService studentResponseService; | ||
|
||
@Inject | ||
CourseGroupService courseGroupService; | ||
|
||
|
@@ -669,7 +674,7 @@ public Response sendResultToStudent(MailResultDTO dto, @PathParam("examId") long | |
|
||
} else { | ||
if (count > 0 && sheet == null){ | ||
mailService.sendEmail("[email protected]", " FinalResult but no sheet for studentId: " + student.id + ", studentname: " + student.name + ", exam.id: " +ex.id, "[CorrectExam] strange behavior", "[email protected]"); | ||
// mailService.sendEmail("[email protected]", " FinalResult but no sheet for studentId: " + student.id + ", studentname: " + student.name + ", exam.id: " +ex.id, "[CorrectExam] strange behavior", "[email protected]"); | ||
} | ||
if (dto.isMailabi() && dto.getSheetuuid() == null) { | ||
String body = dto.getBodyabi(); | ||
|
@@ -2652,6 +2657,7 @@ public Response updateAnswerHybridCommentWithStepValue(@PathParam("responseId") | |
if (!securityService.canAccess(ctx, responseId, StudentResponse.class)) { | ||
return Response.status(403, "Current user cannot access this ressource").build(); | ||
} | ||
this.studentResponseService.updateCorrectedBy(responseId,this.securityService.getCurrentLoggedUser(ctx)); | ||
Answer2HybridGradedCommentDTO result = this.answer2HybridGradedCommentService | ||
.setStepValueWithResponseIdAndHybridCommentId(responseId, hybridCommentId, stepValue); | ||
return Response.ok().entity(result).build(); | ||
|
@@ -2669,6 +2675,7 @@ public Response updateAnswerHybridCommentWith(@PathParam("responseId") final lon | |
if (!securityService.canAccess(ctx, responseId, StudentResponse.class)) { | ||
return Response.status(403, "Current user cannot access this ressource").build(); | ||
} | ||
this.studentResponseService.updateCorrectedBy(responseId,this.securityService.getCurrentLoggedUser(ctx)); | ||
Answer2HybridGradedCommentDTO result = this.answer2HybridGradedCommentService | ||
.incrementWithResponseIdAndHybridCommentId(responseId, hybridCommentId); | ||
return Response.ok().entity(result).build(); | ||
|