Skip to content

Commit

Permalink
SAK-44226 Use sort name in new grader (sakaiproject#8609)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish authored Sep 22, 2020
1 parent 38d16a8 commit 9e1b553
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,13 +443,15 @@ public SimpleAssignment getAssignment(EntityView view, Map<String, Object> param
public class GraderUser {

private String displayName;
private String sortName;
private String id;

public GraderUser(User sakaiUser) {

super();

this.displayName = sakaiUser.getDisplayName();
this.sortName = sakaiUser.getSortName();
this.id = sakaiUser.getId();
}
}
Expand Down Expand Up @@ -1235,6 +1237,7 @@ public class SimpleSubmitter {

private String id;
private String displayName;
private String sortName;

public SimpleSubmitter(AssignmentSubmissionSubmitter ass, boolean anonymousGrading) {

Expand All @@ -1243,7 +1246,9 @@ public SimpleSubmitter(AssignmentSubmissionSubmitter ass, boolean anonymousGradi
this.id = ass.getSubmitter();
try {
if (!anonymousGrading) {
this.displayName = userDirectoryService.getUser(this.id).getDisplayName();
User user = userDirectoryService.getUser(this.id);
this.displayName = user.getDisplayName();
this.sortName = user.getSortName();
} else {
this.displayName = ass.getSubmission().getId() + " " + rb.getString("grading.anonymous.title");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class Submission {
this.submitters = init.submitters;

if (init.submitters) {
this.firstSubmitterName = init.submitters[0].displayName;
this.firstSubmitterName = init.submitters[0].sortName;
this.firstSubmitterId = init.submitters[0].id;
}
this.late = init.late;
Expand Down

0 comments on commit 9e1b553

Please sign in to comment.