{% extends "staff/staff_layout.html" %}
{% block staff_content %}

    <figure class="text-center">
        <h2 class="display-5">{{ exam_info[1] }}</h2>
    </figure>
    <small>
        {{ exam_info[2] }} <br>
        <strong>Time limit:</strong> {{exam_info[3]}} <br>
        <strong>Total Number of Questions:</strong> {{exam_info[4]}} <br>
        <strong>Total Marks:</strong> {{exam_info[5]}} <br>
        <strong>Date created:</strong> {{exam_info[6]}} <br>
        <strong>End Date:</strong> {{exam_info[7]}} <br>
    </small>

    
    <br>
    {% for question in questions %}
    <div class="card">
        <div class="card-body">
            <div class="card-title bg-light p-3">{{question[1]|safe}}</div>
            {% if question[2] == 'O' %}
                <ul class="list-group list-group-flush">
                    {% for option in options %}
                    {% if option[3] == question[0] %}
                    <div class="list-group-item borderless">
                        {{ option[1] }}
                    </div>
                    {% endif %}
                    {% endfor %}
                </ul>
            {% elif question[2] == 'S' %}
                {% for sub_sol in subjective_solutions %}
                    {% if question[0] == sub_sol[2] %}
                        <embed src="/static/staff_uploads/{{sub_sol[1]}}" width="100%" height="500px"/>
                    {% endif %}
                {% endfor %}
            {% endif %}
        </div>

    </div>
    <br>
    {% endfor %}


{% endblock %}