Skip to content

Commit

Permalink
SAK-44001 samigo > late submissions auto submitted by job or at due/l…
Browse files Browse the repository at this point in the history
…ate date not marked as late (sakaiproject#8602)
  • Loading branch information
bjones86 authored Sep 22, 2020
1 parent 95a0ff2 commit 972b123
Showing 1 changed file with 14 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2307,32 +2307,24 @@ public double getTotalCorrectScore(ItemGradingData data, Map publishedAnswerHash
}

private void setIsLate(AssessmentGradingData data, PublishedAssessmentIfc pub){
// If submit from timeout popup, we don't record LATE
if (data.getSubmitFromTimeoutPopup()) {
data.setIsLate(false);
}
else {
Boolean isLate = false;
AssessmentAccessControlIfc a = pub.getAssessmentAccessControl();
if (a.getDueDate() != null && a.getDueDate().before(new Date())) {
isLate = Boolean.TRUE;
} else {
isLate = Boolean.FALSE;
}
Boolean isLate = Boolean.FALSE;
AssessmentAccessControlIfc a = pub.getAssessmentAccessControl();
if (a.getDueDate() != null && a.getDueDate().before(new Date())) {
isLate = Boolean.TRUE;
}

if (isLate) {
ExtendedTimeDeliveryService assessmentExtended = new ExtendedTimeDeliveryService((PublishedAssessmentFacade) pub, data.getAgentId());
if (assessmentExtended.hasExtendedTime() && assessmentExtended.getDueDate() != null && assessmentExtended.getDueDate().after(new Date())) {
isLate = Boolean.FALSE;
}
}
if (isLate) {
ExtendedTimeDeliveryService assessmentExtended = new ExtendedTimeDeliveryService((PublishedAssessmentFacade) pub, data.getAgentId());
if (assessmentExtended.hasExtendedTime() && assessmentExtended.getDueDate() != null && assessmentExtended.getDueDate().after(new Date())) {
isLate = Boolean.FALSE;
}
}

data.setIsLate(isLate);

data.setIsLate(isLate);
}

if (data.getForGrade())
data.setStatus(1);

data.setTotalOverrideScore(Double.valueOf(0));
}

Expand Down

0 comments on commit 972b123

Please sign in to comment.