{# If the question is mandatory, the asterisk will be shown  #}
{% if aQuestion.mandatory != '' %}
    <!-- Add a visual information + just Mandatory string for aria : can be improved -->
    <div id="question-asterisk-{{ aQuestion.qid }}" class="{{ aSurveyInfo.class.questionasterix }} pull-left" {{ aSurveyInfo.attr.questionasterix }} >
        <small class="{{ aSurveyInfo.class.questionasterixsmall }} text-danger fa fa-asterisk small" {{ aSurveyInfo.attr.questionasterixsmall }}></small>
        <span class="{{ aSurveyInfo.class.questionasterixspan }} sr-only text-danger" {{ aSurveyInfo.attr.questionasterixspan }} id="ls-question-mandatory-{{ aQuestion.SGQ }}" >
            {{ gT("(This question is mandatory)") }}
        </span>
    </div>
{% endif %}
{# If the question number is to be shown (set in survey settings) #}
{% if (aShow.question_number) %}
    <span class='label label-default question-number pull-left' {{ aSurveyInfo.attr.questionnumber }} >
        {{ aQuestion.number }}
    </span>
{% endif %}

{# If the question code is to be shown (set in survey settings) #}
{% if (aShow.question_code) %}
    <span class='label label-info question-number pull-left' {{ aSurveyInfo.attr.questioncode }}>
        {{ aQuestion.code }}
    </span>
{% endif %}
{% set tagQuestion = 'div' %}
{% if ( aSurveyInfo.options.questionhtag == 'on' ) %}
    {% if ( (aGroup.showgroupinfo == 'N' or aGroup.showgroupinfo == 'B') and aGroup.name ) %}
        {% set tagQuestion = 'h3' %}
    {% else %}
        {% set tagQuestion = 'h2' %}
    {% endif %}
{% endif %}

{# The question text as entered by the survey creator in question editing #}
<div class="{{ aSurveyInfo.class.questiontext }} {{ aSurveyInfo.options.questionsize }}" {{ aSurveyInfo.attr.questiontext }}>
    <{{ tagQuestion }} id="ls-question-text-{{ aQuestion.SGQ }}" class="{{ aSurveyInfo.class.lsquestiontext }} accessible-question-text {{ questioncolor }}" {{ aSurveyInfo.attr.lsquestiontext }}>
        {{ aQuestion.text | raw }}
    </{{ tagQuestion }}>
</div>
