Skip to content

Commit

Permalink
SAK-45809 Resubmission count always -1 from expected (sakaiproject#9561)
Browse files Browse the repository at this point in the history
  • Loading branch information
plukasew authored Aug 18, 2021
1 parent ccbf9e6 commit 607843a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6327,7 +6327,8 @@ private void post_save_submission(RunData data, boolean post) {

if (NumberUtils.isParsable(properties.get(AssignmentConstants.ALLOW_RESUBMIT_NUMBER))) {
// if this submission has been already been submitted previously.
if (submission.getSubmitted() && submission.getDateSubmitted() != null) {
boolean isResub = properties.entrySet().stream().anyMatch(e -> e.getKey().startsWith("log") && e.getValue().contains("submitted"));
if (submission.getSubmitted() && isResub) {
// decrease the allow_resubmit_number,
int number = Integer.parseInt(properties.get(AssignmentConstants.ALLOW_RESUBMIT_NUMBER));
// minus 1 from the submit number, if the number is not -1 (not unlimited)
Expand Down

0 comments on commit 607843a

Please sign in to comment.