if (StringHelper.containsNonWhitespace(scoreExp)) {
/*
* not empty, now test precondition syntax and for existing soft references
*/
CourseEditorEnv cev = euce.getCourseEditorEnv();
ConditionExpression ce = new ConditionExpression("score",scoreExp);
ConditionErrorMessage[] cerrmsgs = cev.validateConditionExpression(ce);
/*
* display any error detected in the condition expression testing.
*/
if (cerrmsgs != null && cerrmsgs.length>0) {
//the error message
tscoreexpr.setErrorKeyWithParams(cerrmsgs[0].errorKey, cerrmsgs[0].errorKeyParams);
if (cerrmsgs[0].solutionMsgKey != null && !"".equals(cerrmsgs[0].solutionMsgKey)) {
//and a hint or example to clarify the error message
tscoreexpr.setExample(translate(cerrmsgs[0].solutionMsgKey, cerrmsgs[0].errorKeyParams));
}
return false;
}
testElemWithNoResource = getInvalidNodeDescriptions(ce);
}
if (StringHelper.containsNonWhitespace(passedExp)) {
/*
* not empty, now test precondition syntax and for existing soft references
*/
CourseEditorEnv cev = euce.getCourseEditorEnv();
ConditionExpression ce = new ConditionExpression("passed",passedExp);
ConditionErrorMessage[] cerrmsgs = cev.validateConditionExpression(ce);
/*
* display any error detected in the condition expression testing.
*/
if (cerrmsgs != null && cerrmsgs.length>0) {
//the error message