ajout de maxValues pour chaque rating
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<c:forEach items="${OneRatings}" var="rating" varStatus="i">
|
||||
<tr>
|
||||
<td>The average for <b>${rating.criterion.name}</b> is
|
||||
<font color="green">${listMoyenne[i.index]}</font></td>
|
||||
<font color="green">${listMoyenne[i.index]}</font>/${maxValues[i.index]}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ public class ListReportController extends SimpleFormController {
|
||||
|
||||
//init liste moyenne
|
||||
|
||||
|
||||
for (int j=0; j < ratings.size(); j++)
|
||||
listMoyenne.add(new Double(0));
|
||||
|
||||
@@ -116,8 +117,15 @@ public class ListReportController extends SimpleFormController {
|
||||
listMoyenne.set(j, listMoyenne.get(j) / new Double(listReport.size()));
|
||||
}
|
||||
|
||||
int[] maxValues =new int[ratings.size()];
|
||||
for (int idx=0; idx<ratings.size();idx++)
|
||||
{
|
||||
maxValues[idx]=ratings.get(idx).getCriterion().getMax_rating();
|
||||
}
|
||||
|
||||
model.put("container", container);
|
||||
model.put("listMoyenne", listMoyenne);
|
||||
model.put("maxValues",maxValues);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user