use of org.olat.course.editor.StatusDescription in project openolat by klemens.
the class EditScoreCalculationEasyForm method getInvalidNodeDescriptions.
/**
* @return Returns a list with the invalid node descriptions,
* ("invalid" is a node that is not associated with a test resource)
*/
public List<String> getInvalidNodeDescriptions() {
List<String> testElemWithNoResource = new ArrayList<String>();
List<String> selectedNodesIds = new ArrayList<String>(scoreNodeIdents.getSelectedKeys());
for (Iterator<CourseNode> nodeIter = assessableNodesList.iterator(); nodeIter.hasNext(); ) {
CourseNode node = nodeIter.next();
if (selectedNodesIds.contains(node.getIdent())) {
StatusDescription isConfigValid = node.isConfigValid();
if (isConfigValid != null && isConfigValid.isError()) {
String nodeDescription = node.getShortName() + " (Id:" + node.getIdent() + ")";
if (!testElemWithNoResource.contains(nodeDescription)) {
testElemWithNoResource.add(nodeDescription);
}
}
}
}
return testElemWithNoResource;
}
use of org.olat.course.editor.StatusDescription in project openolat by klemens.
the class CourseEditorTreeNode method getIconDecorator1CssClass.
@Override
public String getIconDecorator1CssClass() {
StatusDescription sd = cn.isConfigValid();
String cssClass = null;
if (deleted) {
cssClass = "o_middel";
} else if (sd.isError()) {
cssClass = "o_miderr";
} else if (!sd.isError() && dirty) {
cssClass = "o_midpub";
}
return cssClass;
}
Aggregations