use of org.olat.course.assessment.model.SearchAssessedIdentityParams in project openolat by klemens.
the class AssessmentStatisticsSmallController method updateStatistics.
public void updateStatistics() {
SearchAssessedIdentityParams params = new SearchAssessedIdentityParams(testEntry, null, testEntry, assessmentCallback);
numOfAssessedIdentities = assessmentToolManager.getNumberOfAssessedIdentities(getIdentity(), params);
mainVC.contextPut("numOfAssessedIdentities", numOfAssessedIdentities);
membersStatistics = assessmentToolManager.getNumberOfParticipants(getIdentity(), params);
mainVC.contextPut("numOfParticipants", membersStatistics.getNumOfParticipants());
if (assessmentCallback.canAssessNonMembers()) {
mainVC.contextPut("numOfOtherUsers", membersStatistics.getNumOfOtherUsers());
}
AssessmentStatistics stats = assessmentToolManager.getStatistics(getIdentity(), params);
mainVC.contextPut("scoreAverage", AssessmentHelper.getRoundedScore(stats.getAverageScore()));
numOfPassed = stats.getCountPassed();
mainVC.contextPut("numOfPassed", numOfPassed);
int total = membersStatistics.getTotal();
int percentPassed = total <= 0 ? 0 : Math.round(100.0f * (stats.getCountPassed() / total));
mainVC.contextPut("percentPassed", percentPassed);
numOfFailed = stats.getCountFailed();
mainVC.contextPut("numOfFailed", numOfFailed);
int percentFailed = total <= 0 ? 0 : Math.round(100.0f * (stats.getCountFailed() / total));
mainVC.contextPut("percentFailed", percentFailed);
int numOfParticipantLaunches = membersStatistics.getNumOfParticipantsLoggedIn();
mainVC.contextPut("numOfParticipantLaunches", numOfParticipantLaunches);
if (assessmentCallback.canAssessNonMembers()) {
mainVC.contextPut("numOfOtherUserLaunches", membersStatistics.getLoggedIn());
}
}
use of org.olat.course.assessment.model.SearchAssessedIdentityParams in project openolat by klemens.
the class AssessmentToReviewSmallController method loadModel.
private void loadModel() {
SearchAssessedIdentityParams params = new SearchAssessedIdentityParams(testEntry, null, testEntry, assessmentCallback);
List<AssessmentEntry> entries = assessmentToolManager.getAssessmentEntries(getIdentity(), params, AssessmentEntryStatus.inReview);
List<UserToReviewRow> rows = new ArrayList<>();
Map<Long, UserToReviewRow> identityKeyToRow = new HashMap<>();
for (AssessmentEntry entry : entries) {
Identity assessedIdentity = entry.getIdentity();
if (identityKeyToRow.containsKey(assessedIdentity.getKey())) {
identityKeyToRow.get(assessedIdentity.getKey()).getSubIndents().add(entry.getSubIdent());
} else {
UserToReviewRow row = new UserToReviewRow(entry.getIdentity(), userPropertyHandlers, getLocale());
row.getSubIndents().add(entry.getSubIdent());
rows.add(row);
identityKeyToRow.put(assessedIdentity.getKey(), row);
}
}
usersTableModel.setObjects(rows);
tableEl.reset();
}
Aggregations