40 lines
2.5 KiB
HTML
40 lines
2.5 KiB
HTML
<div id="inputtype_{{ id }}"
|
|
{% if do_math and inline %} class="text-input-dynamath capa_inputtype inline textline" {% elif do_math %} class="text-input-dynamath capa_inputtype textline" {% elif inline %} class=" capa_inputtype inline textline" {% else %} class=" capa_inputtype textline" {% endif %}>
|
|
{% if preprocessor is not None %}
|
|
<div class="text-input-dynamath_data {% if inline %}inline{% endif %}"
|
|
data-preprocessor="{{ preprocessor.class_name }}" />
|
|
<div class="script_placeholder" data-src="{{ preprocessor.script_src }}" />
|
|
{% endif %}
|
|
{% if status == 'unsubmitted' or status == 'submitted' or status == 'correct' or status == 'incorrect' or status == 'partially-correct' or status == 'incomplete' %}
|
|
<div class="{{ status.classname }} {% if inline %}inline{% endif %}">
|
|
{% endif %}
|
|
{% if hidden %}<div style="display:none;" name="{{ hidden }}" inputid="input_{{ id }}" />{% endif %}
|
|
{% if response_data.label %}
|
|
<label class="problem-group-label" for="input_{{ id }}" id="label_{{ id }}">{{ response_data.label }}</label>
|
|
{% endif %}
|
|
{% for description_id, description_text in response_data.descriptions.items %}
|
|
<p class="question-description" id="{{ description_id }}">{{ description_text|safe }}</p>
|
|
{% endfor %}
|
|
<input type="text"
|
|
class="mw-100 {% if do_math %}math{% endif %}"
|
|
name="input_{{ id }}"
|
|
id="input_{{ id }}"
|
|
{{ describedby_html }}
|
|
value="{{ value }}"
|
|
{% if size %}size="{{ size }}"{% endif %}
|
|
{% if hidden %}style="display:none;"{% endif %} />
|
|
<span class="trailing_text" id="trailing_text_{{ id }}">{{ trailing_text }}</span>
|
|
{% include "status_span.html" with status=status status_id=id %}
|
|
<p id="answer_{{ id }}" class="answer"></p>
|
|
{% if do_math %}
|
|
<div id="display_{{ id }}" class="equation">`{::}`</div>
|
|
<textarea style="display:none"
|
|
id="input_{{ id }}_dynamath"
|
|
name="input_{{ id }}_dynamath"></textarea>
|
|
{% endif %}
|
|
{% if status == 'unsubmitted' or status == 'submitted' or status == 'correct' or status == 'incorrect' or status == 'partially-correct' or status == 'incomplete' %}
|
|
</div>
|
|
{% endif %}
|
|
{% if msg %}<span class="message" aria-describedby="label_{{ id }}" tabindex="-1">{{ msg|safe }}</span>{% endif %}
|
|
</div>
|