Skip to content
Kamoorjdocs
Documentation

Bulletin expression editor

Formula tree, factors, inheritance and calculation testing.

On this page

Purpose

/bulletins/settings/expressions/:id opens the bulletin expression tree editor. Open a working expression from the library or create a new one (new). The tree defines nodes that can become connected bulletins during batch generation and each node’s calculation.

Workspace and saving

The left tree shows the root, children and order. The selected node's editor on the right has formula builder and test values tabs. On narrow screens the tree is a separate panel. Each node has a localized name, its own expression and settings. Switching nodes preserves local edits but does not save to the server.

  1. Name the root in RU/EN/HY. Add necessary children from the tree and name them.
  2. Select each node and build its formula from catalog elements and operators.
  3. To reorder siblings, drag them into the intended sequence. Order persists with formula saving.
  4. Click Save formula. The selected root and its entire subtree are saved as one operation; temporary IDs are replaced with saved IDs. A new record receives its permanent URL.
  5. To configure conditions, save the node first, then open Manage conditions. Conditions save separately.

Select a template at the top of the editor if blueprints exist. It replaces the local tree; when editing an existing root its ID is retained. Reset before saving restores the user's previous draft. Saving a replacement removes omitted children according to dependency checks. Template cloning does not automatically copy conditions. Deletion of a saved node requires confirmation; if the server rejects it, the node remains.

Node settings

Setting Purpose
Liquidation (retake) The node is a retake of its parent rather than an ordinary formula component
Calculate only when all factors are entered Result remains blank while any numeric factor referenced in the formula or conditions has no value
Inherit parent factors A child can select factors present in both its own formula and an ancestor’s formula
Conditions Separate cascade editor available for a saved node

An inherited factor uses the nearest ancestor's entered value; its own entered value is a fallback if none is found. Inheritance selects specific factors, not all marks. Avoid duplicating the same assessment across levels without planning precedence.

Ordinary nodes calculate from the deepest node up to the root so a parent can use its child result. A node's entered own factor takes precedence; remaining values come from the applicable tree context. Retake branch values override the common context within the retake. A retake does not overwrite the parent's stored grade: external consumers may use the deepest graded retake instead, while an empty retake does not replace an existing grade.

Operands

Insert operands from the builder's catalog. Labels are localized; technical tokens shown below explain the stored expression.

Token Value
{factor:F} Mark of factor F
{factor:F}.status Factor status for conditions, empty string if absent
{coeff:F} Numeric coefficient for the relevant program and subject
{const:C} Shared constant C
{child:E}, {parent:E} Calculated value of the related node E
{child_factor:E:F}, {parent_factor:E:F} Factor F of a specific child/parent node E
{child_coeff:E:F}, {parent_coeff:E:F} Coefficient of the specified factor; the server supports these variants

Arithmetic operations, parentheses and sum, avg, min, max, round, floor, ceil and abs are supported. Function capitalization is normalized on the server. Foreign-tree references, wrong-direction factor references and cyclic expression dependencies are invalid. Do not make a parent's result depend on a child that also requests the parent’s result.

Formula example

An illustrative course has continuous assessment 12 and exam 18. Create a root called Final and two regular children. Use the corresponding factors in the children. In the final formula, insert child results through the catalog and multiply by constants 0.4 and 0.6:

12 × 0.4 + 18 × 0.6 = 15.6.

This is an example, not an institutional grading policy. The grade scale determines the performance level. If weights vary by subject, use factor coefficients instead of shared constants.

Empty values and errors

Without Require all factors, an absent numeric factor, constant or coefficient usually evaluates to zero. With the setting enabled, any missing, null or empty numeric factor referenced in the formula or conditions blocks the result: computed value and level remain null. Entered zero counts as a value. A status without a numeric value may also fail this requirement.

The normal bulletin evaluator returns 0 for malformed DSL or arithmetic errors such as division by zero; an invalid condition evaluates false. This differs from journal transfer, in which formatting errors cause failed transfer rows. Resolve reference errors shown at save rather than substituting arbitrary marks. A manually assigned performance level on the bulletin is not overwritten by ordinary recalculation. An absence of grades is not the same as an established failing grade.

Testing and use

The test values tab supplies inputs for factors, coefficients and connected nodes. Enter example values, select a supported pass/fail input where appropriate and inspect the expression and result. Numeric output can be absent until the required test inputs are provided. This is a local formula test, not an actual bulletin calculation. Test conditions in their separate editor.

Save the tree, check root approval if configured and select it in a bulletin body template. Expression edits may reconcile factor columns of already linked templates. Added or removed nodes also trigger synchronization of the bulletins already generated from sheets using this root, including grade remapping. Check existing operational bulletins and test results before modifying active formulas.

Permissions and scopes

Configuration is global, with no organizational scopes. Read access requires bulletin-expressions.show, bulletin-expressions.index, examination-factors.index and bulletin-constants.index. Tree saving binds to bulletin-expressions.update; creation/deletion are also subject to module permissions. Conditions use separate permissions. A locked or approved root is read-only according to the approval workflow.

Implementation references

Updated Nov 27, 2026