nodeData.put(KEY_TITLE_LONG, courseNode.getLongTitle());
nodeData.put(KEY_IDENTIFYER, courseNode.getIdent());
if (courseNode instanceof AssessableCourseNode) {
AssessableCourseNode assessableCourseNode = (AssessableCourseNode) courseNode;
ScoreEvaluation scoreEvaluation = userCourseEnv.getScoreAccounting().getScoreEvaluation(courseNode);
// details
if (assessableCourseNode.hasDetails()) {
hasDisplayableValuesConfigured = true;
String detailValue = assessableCourseNode.getDetailsListView(userCourseEnv);
if (detailValue == null) {
// ignore unset details in discardEmptyNodes mode
nodeData.put(KEY_DETAILS, AssessmentHelper.DETAILS_NA_VALUE);
} else {
nodeData.put(KEY_DETAILS, detailValue);
hasDisplayableUserValues = true;
}
}
// attempts
if (assessableCourseNode.hasAttemptsConfigured()) {
hasDisplayableValuesConfigured = true;
Integer attemptsValue = assessableCourseNode.getUserAttempts(userCourseEnv);
if (attemptsValue != null) {
nodeData.put(KEY_ATTEMPTS, attemptsValue);
if (attemptsValue.intValue() > 0) {
// ignore attempts = 0 in discardEmptyNodes mode
hasDisplayableUserValues = true;
}
}
}
// score
if (assessableCourseNode.hasScoreConfigured()) {
hasDisplayableValuesConfigured = true;
Float score = scoreEvaluation.getScore();
if (score != null) {
nodeData.put(KEY_SCORE, AssessmentHelper.getRoundedScore(score));
hasDisplayableUserValues = true;
}
}
// passed
if (assessableCourseNode.hasPassedConfigured()) {
hasDisplayableValuesConfigured = true;
Boolean passed = scoreEvaluation.getPassed();
if (passed != null) {
nodeData.put(KEY_PASSED, passed);
hasDisplayableUserValues = true;
}
}