Skip to content
Snippets Groups Projects
Commit f9e3e1c8 authored by uhensler's avatar uhensler
Browse files

OO-4605: Show progress if it is a decimal

parent efb22e19
No related branches found
No related tags found
No related merge requests found
...@@ -105,12 +105,12 @@ public class AssessmentCourseStatisticsSmallController extends BasicController { ...@@ -105,12 +105,12 @@ public class AssessmentCourseStatisticsSmallController extends BasicController {
int total = memberStatistics.getTotal(); int total = memberStatistics.getTotal();
int percentPassed = total == 0 ? 0 : int percentPassed = total == 0 ? 0 :
Math.round(100.0f * (stats.getCountPassed() / total)); Math.round(100.0f * ((float)stats.getCountPassed() / total));
mainVC.contextPut("percentPassed", percentPassed); mainVC.contextPut("percentPassed", percentPassed);
numOfFailed = stats.getCountFailed(); numOfFailed = stats.getCountFailed();
mainVC.contextPut("numOfFailed", numOfFailed); mainVC.contextPut("numOfFailed", numOfFailed);
int percentFailed = total == 0 ? 0 : int percentFailed = total == 0 ? 0 :
Math.round(100.0f * (stats.getCountFailed() / total)); Math.round(100.0f * ((float)stats.getCountFailed() / total));
mainVC.contextPut("percentFailed", percentFailed); mainVC.contextPut("percentFailed", percentFailed);
int numOfParticipantLaunches = memberStatistics.getNumOfParticipantsLoggedIn(); int numOfParticipantLaunches = memberStatistics.getNumOfParticipantsLoggedIn();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment