Skip to content

Commit

Permalink
SAK-41309 SAK-40650 Grading issue where linked gradebook title is num…
Browse files Browse the repository at this point in the history
…eric (#6544)

(cherry picked from commit 67f1685)
  • Loading branch information
ern committed Feb 12, 2019
1 parent 6b67469 commit b5f8645
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2338,11 +2338,15 @@ public String getAssignmentScoreStringByNameOrId(final String gradebookUid, fina
return null;
}

if (score == null && !isAssignmentDefined(gradebookUid, assignmentName)) {
if (score == null) {
// Try to get the assignment by id
if (NumberUtils.isCreatable(assignmentName)) {
final Long assignmentId = NumberUtils.toLong(assignmentName, -1L);
score = getAssignmentScoreString(gradebookUid, assignmentId, studentUid);
try {
score = getAssignmentScoreString(gradebookUid, assignmentId, studentUid);
} catch (AssessmentNotFoundException anfe) {
log.debug("Assessment could not be found for gradebook id {} and assignment id {} and student id {}", gradebookUid, assignmentName, studentUid);
}
}
}
return score;
Expand Down

0 comments on commit b5f8645

Please sign in to comment.