{{!
    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/>.

    Project implemented by the "Recovery, Transformation and Resilience Plan.
    Funded by the European Union - Next GenerationEU".
    Produced by the UNIMOODLE University Group: Universities of
    Valladolid, Complutense de Madrid, UPV/EHU, León, Salamanca,
    Illes Balears, Valencia, Rey Juan Carlos, La Laguna, Zaragoza, Málaga,
    Córdoba, Extremadura, Vigo, Las Palmas de Gran Canaria y Burgos
}}
{{!
    @template mod_certifygen/activity

    Activity

    Classes required for JS:
    * None

    Data attibutes required for JS:
    * None

    Context variables required for this template:
    * none

    Example context (json):
    {
    }
}}
<div data-region="activity-view" {{#isstudent}} class="student"{{/isstudent}}>
    {{#haserror}}
        <div class="alert alert-warning">
            {{#str}} templatenotfound, mod_certifygen {{/str}}
        </div>
        <div class="hidden">
            {{error}}
        </div>
    {{/haserror}}
    {{^haserror}}
    <h3 class="mt-5 mb-5">
        {{#isstudent}}
            {{#str}} mycertificate, mod_certifygen {{/str}}
        {{/isstudent}}
        {{^isstudent}}
            {{#str}} certificatelist, mod_certifygen {{/str}}
        {{/isstudent}}
    </h3>
    {{#form}}
        <div>
            {{{ form }}}
        </div>
    {{/form}}
    <div>
        {{{ table }}}
    </div>
    {{/haserror}}
</div>

{{#js}}
    require(['mod_certifygen/activitymanager'], (module) => module.init());
{{/js}}

<style>

    [data-region="activity-view"].student .c0 {
        display: none;
    }
    [data-region="activity-view"] .likelink {
        cursor: pointer;
        color: #0f6cbf;
        text-decoration: none;
    }
    [data-region="activity-view"] .likelink:hover {
        color: #094478;
        text-decoration: underline;
    }
</style>