Skip to content

Commit

Permalink
SAM-2589 Fix for the PR 1181 related to wrong check marks in Question…
Browse files Browse the repository at this point in the history
… Scores
  • Loading branch information
Jose Rabal Sastre committed Feb 19, 2016
1 parent 7e52fdd commit 15c519d
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
package org.sakaiproject.tool.assessment.ui.listener.evaluation;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
Expand Down Expand Up @@ -528,7 +530,14 @@ public boolean questionScores(String publishedId, QuestionScoresBean bean,
// row
ArrayList answerList = (ArrayList) iter.next();
results.setItemGradingArrayList(answerList);

// The list is sorted by answer id so that it will come back from the student in a
// predictable order. This is also required by the getCalcQResult method.
Collections.sort(answerList, new Comparator<ItemGradingData>() {
public int compare(ItemGradingData i1, ItemGradingData i2) {
return i1.getPublishedAnswerId().compareTo(
i2.getPublishedAnswerId());
}
});
Iterator iter2 = answerList.iterator();
ArrayList itemGradingAttachmentList = new ArrayList();
HashMap<Long, Set<String>> fibmap = new HashMap<Long, Set<String>>();
Expand Down

0 comments on commit 15c519d

Please sign in to comment.