use of uk.ac.ed.ph.jqtiplus.node.expression.general.BaseValue in project openolat by klemens.
the class TestFeedbackBuilder method findFeedbackRuleInExpression.
private boolean findFeedbackRuleInExpression(Expression expression, Identifier feedbackIdentifier) {
if (expression instanceof BaseValue) {
BaseValue bValue = (BaseValue) expression;
SingleValue sValue = bValue.getSingleValue();
if (sValue instanceof IdentifierValue) {
IdentifierValue iValue = (IdentifierValue) sValue;
if (feedbackIdentifier.equals(iValue.identifierValue())) {
return true;
}
}
} else {
List<Expression> childExpressions = expression.getExpressions();
for (Expression childExpression : childExpressions) {
if (findFeedbackRuleInExpression(childExpression, feedbackIdentifier)) {
return true;
}
}
}
return false;
}
Aggregations