{{!
    This file is part of Moodle - http://moodle.org/
    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template mod_offlinequiz/question_slot_grading

    This template renders the question slot content.

    Example context (json):
    {
        "questionnumber" : "<span class='slotnumber'><span class='accesshide'>Question</span> 1</span>",
        "questionname" : "This is a test question",
        "questionpreviewicon" : "<i class='icon fa fa-search-plus fa-fw' title='Preview question'></i>",
        "questionmarkicon" :  "<i class='icon fa fa-search-plus fa-fw' title='Mark question'></i>",
        "canbeedited" : false,
        "bankurl": "https://moodle.org/question/edit.php?cmid=8",
        "bankname": "course questionbank 1"
    }
}}
<div>
    <div class="mod-indent-outer" id="mod-indent-outer-slot-{{slotid}}">
        {{{questionnumber}}}
        <div class="mod-indent"></div>
        <div class="activityinstance">
            {{{questionname}}}
        </div>
        <div class="sharedbank">
            {{#bankname}}
                <a href="{{{bankurl}}}">
                    <span class="badge bg-primary text-light ms-2 mt-1">{{bankname}}</span>
                </a>
            {{/bankname}}
        </div>
        <span class="actions">
            {{#versionselection}}
                <label for="version-{{slotid}}"> </label>
                <select autocomplete="off" id="version-{{slotid}}" name="version" class="form-control mr-2 h-auto version-selection"
                data-action="mod_offlinequiz-select_slot" data-slot-id="{{slotid}}">
                    {{#versionoption}}
                        <option value="{{version}}" {{#selected}}selected="selected"{{/selected}}>{{versionvalue}}</option>
                    {{/versionoption}}
                </select>
            {{/versionselection}}
            {{{questionpreviewicon}}}
            {{{questionmarkicon}}}
        </span>
    </div>
</div>