Skip to content

Commit

Permalink
SAK-33768 update submittee field value (sakaiproject#5147)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgarciaentornos authored and ern committed Dec 20, 2017
1 parent a6c4836 commit 701ffe4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5971,7 +5971,9 @@ private void post_save_submission(RunData data, boolean post) {
submission.setHonorPledge(Boolean.valueOf(honorPledgeYes));
submission.setDateSubmitted(Instant.now());
submission.setSubmitted(post);
submission.setUserSubmission(true);
String currentUser = sessionManager.getCurrentSessionUserId();
// identify who the submittee is using the session
submission.getSubmitters().stream().filter(s -> s.getSubmitter().equals(currentUser)).findFirst().ifPresent(s -> s.setSubmittee(true));

// decrease the allow_resubmit_number, if this submission has been submitted.
if (submission.getSubmitted() && isPreviousSubmissionTime && properties.get(AssignmentConstants.ALLOW_RESUBMIT_NUMBER) != null) {
Expand Down

0 comments on commit 701ffe4

Please sign in to comment.