Skip to content

Commit

Permalink
SAM-3163 Comments (from the Tests & Quizzes Total Scores page) are no…
Browse files Browse the repository at this point in the history
…t being removed from GradeBook (sakaiproject#4024)
  • Loading branch information
alejandrogj authored and ottenhoff committed Mar 6, 2017
1 parent b02b4d2 commit 15fe13e
Showing 1 changed file with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Random;
import java.util.Set;
import java.util.StringTokenizer;
Expand Down Expand Up @@ -352,18 +353,12 @@ private List getListForGradebookNotification(List newList, List oldList) {
l.add(a);
}
// if scores are not modified but comments are added, include it for update
else if (a.getComments()!=null)
{
if (b.getComments()!=null)
{
if (!a.getComments().equals(b.getComments())) {
l.add(a);
}
}
else {
l.add(a);
}
}
Optional<String> commentsA = Optional.ofNullable(a.getComments());
Optional<String> commentsB = Optional.ofNullable(b.getComments());

if ( !commentsA.orElse("").equals(commentsB.orElse("")) ){
l.add(a);
}
}
}
return l;
Expand Down

0 comments on commit 15fe13e

Please sign in to comment.