uce.getScoreAccounting().evaluateAll();
AssessmentManager am = course.getCourseEnvironment().getAssessmentManager();
Iterator iterNodes = myNodes.iterator();
while (iterNodes.hasNext()) {
AssessableCourseNode acnode = (AssessableCourseNode) iterNodes.next();
boolean scoreOk = acnode.hasScoreConfigured();
boolean passedOk = acnode.hasPassedConfigured();
boolean attemptsOk = acnode.hasAttemptsConfigured();
boolean commentOk = acnode.hasCommentConfigured();
if (scoreOk || passedOk || commentOk || attemptsOk) {
ScoreEvaluation se = uce.getScoreAccounting().getScoreEvaluation(acnode);
boolean nodeColumnOk = false;
StringBuilder tabs = new StringBuilder();
if (scoreOk) {
Float score = se.getScore();
nodeColumnOk = true;
tabs.append("\t"); // tabulators for header1 after node title
if (firstIteration) {
tableHeader2.append(sc);
tableHeader2.append("\t");
}
if (score != null) {
tableContent.append(AssessmentHelper.getRoundedScore(score));
tableContent.append("\t");
} else { // score == null
tableContent.append(mi);
tableContent.append("\t");
}
}
if (passedOk) {
Boolean passed = se.getPassed();
nodeColumnOk = true;
tabs.append("\t"); // tabulators for header1 after node title
if (firstIteration) {
tableHeader2.append(pa);
tableHeader2.append("\t");
}
if (passed != null) {
String yesno;
if (passed.booleanValue()) {
yesno = yes;
} else {
yesno = no;
}
tableContent.append(yesno);
tableContent.append("\t");
} else { // passed == null
tableContent.append(mi);
tableContent.append("\t");
}
}
if (attemptsOk) {
Integer attempts = am.getNodeAttempts(acnode, identity);
int a = attempts.intValue();
nodeColumnOk = true;
tabs.append("\t"); // tabulators for header1 after node title
if (firstIteration) {
tableHeader2.append(at);
tableHeader2.append("\t");
}
tableContent.append(a);
tableContent.append("\t");
}
if (commentOk) {
// Comments for user
String comment = am.getNodeComment(acnode, identity);
nodeColumnOk = true;
tabs.append("\t"); // tabulators for header1 after node title
if (firstIteration) {
tableHeader2.append(co);
tableHeader2.append("\t");
}
if (comment != null) {
// put comment between double quote in order to prevent that
// '\t','\r' or '\n' destroy the excel table
tableContent.append("\"");
tableContent.append(comment);
tableContent.append("\"\t");
} else {
tableContent.append(mi);
tableContent.append("\t");
}
// Comments for tutors
String coachComment = am.getNodeCoachComment(acnode, identity);
tabs.append("\t"); // tabulators for header1 after node title
if (firstIteration) {
tableHeader2.append(cco);
tableHeader2.append("\t");
}
if (coachComment != null) {
// put coachComment between double quote in order to prevent that
// '\t','\r' or '\n' destroy the excel table
tableContent.append("\"");
tableContent.append(coachComment);
tableContent.append("\"\t");
} else {
tableContent.append(mi);
tableContent.append("\t");
}
}
if (firstIteration && nodeColumnOk) {
String shortTitle = acnode.getShortTitle();
tableHeader1.append(shortTitle);
tableHeader1.append(tabs.toString());
}