Skip to content

Commit

Permalink
SAK-45458: SAMIGO: Error when republish and regrade on Calculated Que…
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusmmp authored Oct 22, 2021
1 parent 6b8997f commit b4cfd62
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ private double getScoreByQuestionType(ItemGradingData itemGrading, ItemDataIfc i
case 11: // FIN
try {
if (type == 15) { // CALCULATED_QUESTION
Map<Integer, String> calculatedAnswersMap = getCalculatedAnswersMap(itemGrading, item);
Map<Integer, String> calculatedAnswersMap = getCalculatedAnswersMap(itemGrading, item, calcQuestionAnswerSequence);
int numAnswers = calculatedAnswersMap.size();
autoScore = getCalcQScore(itemGrading, item, calculatedAnswersMap, calcQuestionAnswerSequence ) / (double) numAnswers;
} else {
Expand Down Expand Up @@ -2768,9 +2768,9 @@ public boolean getHasGradingData(Long publishedAssessmentId) {
* @param item
* @return map of calc answers
*/
private Map<Integer, String> getCalculatedAnswersMap(ItemGradingData itemGrading, ItemDataIfc item) {
private Map<Integer, String> getCalculatedAnswersMap(ItemGradingData itemGrading, ItemDataIfc item, int calcQuestionAnswerSequence ) {
// return value from extractCalcQAnswersArray is not used, calculatedAnswersMap is populated by this call
if (answersMap.isEmpty()) {
if (calcQuestionAnswerSequence == 1) {
extractCalcQAnswersArray(answersMap, item, itemGrading.getAssessmentGradingId(), itemGrading.getAgentId());
}
return answersMap;
Expand Down

0 comments on commit b4cfd62

Please sign in to comment.