String msg = getWarningMessage(testElemWithNoResource);
if(msg!=null) {
getWindowControl().setWarning(msg);
}
ScoreCalculator sc = scoreExpertForm.getScoreCalulator();
/*
* OLAT-1144 bug fix if a ScoreCalculator == NULL !
*/
if (sc != null) {
sc.clearEasyMode();
}
// ..setScoreCalculator(sc) can handle NULL values!
stNode.setScoreCalculator(sc);
fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
} else if (event == Form.EVNT_FORM_CANCELLED) { // reload form
initScoreExpertForm();
}
} else if (source == scoreEasyForm) {
if (event == Form.EVNT_VALIDATION_OK) {
//show warning if the score might be wrong because of the invalid nodes used for calculation
List<String> testElemWithNoResource = scoreEasyForm.getInvalidNodeDescriptions();
String msg = getWarningMessage(testElemWithNoResource);
if(msg!=null) {
getWindowControl().setWarning(msg);
}
ScoreCalculator sc = scoreEasyForm.getScoreCalulator();
/*
* OLAT-1144 bug fix if Calculation Score -> NO and Calculate passing
* score -> NO we get a ScoreCalculator == NULL !
*/
if (sc != null) {
sc.setPassedExpression(sc.getPassedExpressionFromEasyModeConfiguration());
sc.setScoreExpression(sc.getScoreExpressionFromEasyModeConfiguration());
}
// ..setScoreCalculator(sc) can handle NULL values!
stNode.setScoreCalculator(sc);
initScoreEasyForm(); // reload form, remove deleted nodes
fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);