{% set sidx = loop.index0 %}
{% set schema = step.config_schema | default({}) %}
{% if step.content_md %}
{{ step.content_md | safe }}
{% endif %}
◆ Knowledge Check
{% if schema.question %}
{{ schema.question }}
{# aca-int-03: each choice used to carry the answer key as a data attribute,
and the same boolean went into the onclick handler, so the right answer was
readable in page source before answering. Only the option INDEX is emitted
now; the server compares it against the stored schema and returns the
verdict. Keep it that way — tests assert the key never appears here. #}
{% for opt in schema.options | default([]) %}
{% endfor %}
{% elif schema.fields %}
{# The authored reflection questions live in `fields`; they were never rendered,
so a lesson saying "answer three questions" offered nowhere to answer. #}
{% else %}
Reflect on what you've learned, then continue.
{# No authored questions: offer one optional notes box so the reflection the
lesson asks for has somewhere to go. Saved with the acknowledgement. #}
{% endif %}