{{!
    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 offlinequiz_overview/downloadoptions

    Displays the download options of the result overview

    Example context (json):
    {
        "cmid": "5",
        "offlinequizid": "1",
        "groupid": "1",
        "noresults": "true",
        "optionshmtl": "<option value=\"Excel\">Excel spreadsheet (XLSX)</option><option value=\"ODS\">OpenDocument spreadsheet (ODS)</option><option value=\"CSV\">Comma separated values text file (CSV)</option>"
    }
}}
<div>
  <form id="download-options" action="report.php" method="get" class="d-flex justify-content-center align-items-center gap-2 mt-3">
    <input type="hidden" name="id" value="{{cmid}}" />
    <input type="hidden" name="q" value="{{offlinequizid}}" />
    <input type="hidden" name="mode" value="overview" />
    <input type="hidden" name="group" value="{{groupid}}" />
    <input type="hidden" name="noresults" value="{{noresults}}" />
    <input type="hidden" name="noheader" value="yes" />
    {{#str}} downloadresultsas, mod_offlinequiz {{/str}}
    {{{optionshtml}}}
    <button type="submit" class="btn btn-primary" > {{#str}} download {{/str}}</button>
  </form>
</div>