Skip to content
Kamoorjdocs
Documentation

Expression Conditions

Nested conditions, priority, testing and status results.

On this page

Purpose

Expression Conditions is a submodule of Bulletin expressions. Open a saved node in the editor and click Manage conditions, or use that action in a root’s library row menu. There is no separate conditions URL; the editor opens in a dialog. Conditions apply to a specific node and can return a result instead of its main expression.

Working with the cascade

  1. Add the first If rule.
  2. Set the left and right expressions. For each, open the builder to select factors from the node’s expression, constants and related nodes.
  3. Choose a comparison: =, !=, >, >=, <, <=. Use AND/OR for multiple comparisons.
  4. Set a branch result: numeric expression or supported status. For more complex logic, add a nested branch instead of a regular result.
  5. Add another If or an Otherwise. Drag normal rules to reorder. Otherwise acts as a fallback. The editor supports nesting up to a depth of 16.
  6. Test with representative input. Click Save or Save and close.

Use the rule navigator to move between branches. Additions, deletions and order persist when saving the whole condition tree. Saving an empty set clears previous conditions, leaving the main node expression. Closing without saving does not update the server.

Evaluation priorities

  • Ordinary branches are evaluated from top to bottom; the first true one is selected.
  • When that branch has nested rules, evaluate those first.
  • Otherwise use its selected status, or, if no status, its numeric expression.
  • If no branch yields a result, use the main expression. If the first true branch contains a nested group that has no result, the evaluator falls back to the main expression rather than checking a later matching sibling. Otherwise is optional; without it, falling back to the main expression is normal.
  • Blank or erroneous conditions do not match. Invalid arithmetic may evaluate to zero.

Supported performance-level results: not-attended, not-permitted, unchecked, checked, need-clarification, excused-not-permitted, excused-not-attended. These are special statuses, not numeric marks. The evaluator returns a separate status field; keep this distinction in mind if another formula expects a number.

Example

The primary expression combines two components. Suppose, for illustration, the institution requires a zero final mark when the exam is zero and continuous assessment is below 8. When the exam has the special Not attended status, return that status instead. Otherwise calculate the main formula.

Put the special status check first and the two numeric comparisons second. For ordinary marks 12 and 18 weighted 0.4/0.6, the main formula returns 15.6. With Not attended, the first branch should apply. Verify that Require all factors does not block calculation when a status input has no numeric value: that gate runs before conditions.

These are illustrative thresholds and statuses, not a prescribed grading policy.

Testing

The live test panel takes example marks and shows the evaluated path and result. Test boundary values, recorded zero, missing values, status branches and Otherwise. Compare with a test bulletin because local testing does not replace server interpretation of context and grading scale.

Permissions, dependencies and limits

Conditions are managed through the bulletin-expression-conditions module. Reading requires bulletin-expression-conditions.index and expression/factor/constant data. Saving the tree binds to bulletin-expression-conditions.update. Individual condition operations also have module CRUD permissions. There are no organizational scopes, but root approval locks still apply. The server rejects broken references and cycles. The conditions editor in journal transfer looks similar but uses different tokens and error handling; see journal transfer rules.

Implementation references

Updated Nov 27, 2026