{{!
    This file is part of Moodle - https://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 format_ludilearn/filename

    Example context (json):
    {}
}}

<div id="ludilearn-course-avatar-section-{{id}}" class="course-avatar">
    <div class="row">
        <div class="col-12">
            <div class="position-relative {{#parameters.restricted }}restricted{{/parameters.restricted}} {{^url}} nourl {{/url}}">
                <div class="row">
                    {{#parameters.gamified}}
                    <div class="{{#parameters.lastaccess}}col-6{{/parameters.lastaccess}}
                        {{^parameters.lastaccess}}col-12{{/parameters.lastaccess}} block_section block_section_avatar">
                        {{#parameters.lastaccess}}

                            <div class="avatar-image"
                                 style="background-image: url({{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/backgrounds/background-1.svg)">
                                <img class="avatar-character" src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/avatar.svg" style="z-index:0;" alt="Image avatar">
                                {{#parameters.item-equiped-1 }}
                                    <img class="avatar-slot slot-1 item-equiped"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/items/images/image-01-{{ parameters.item-equiped-1 }}.svg" alt="Image equiment 1"
                                         data-for="ludilearn-course-section-itemequiped1" data-id="{{id}}">
                                {{/parameters.item-equiped-1 }}
                                {{^parameters.item-equiped-1 }}
                                    <img class="avatar-slot slot-1"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/item_img_default.svg"  alt="Image equiment 1"
                                         data-for="ludilearn-course-section-itemequiped1" data-id="{{id}}">
                                {{/parameters.item-equiped-1 }}
                                {{#parameters.item-equiped-2 }}
                                    <img class="avatar-slot slot-2 item-equiped"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/items/images/image-02-{{ parameters.item-equiped-2 }}.svg" alt="Image equiment 2"
                                         data-for="ludilearn-course-section-itemequiped2" data-id="{{id}}">
                                {{/parameters.item-equiped-2 }}
                                {{^parameters.item-equiped-2 }}
                                    <img class="avatar-slot slot-2"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/item_img_default.svg"  alt="Image equiment 2"
                                         data-for="ludilearn-course-section-itemequiped2" data-id="{{id}}">
                                {{/parameters.item-equiped-2 }}
                                {{#parameters.item-equiped-3 }}
                                    <img class="avatar-slot slot-3 item-equiped"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/items/images/image-03-{{ parameters.item-equiped-3 }}.svg" alt="Image equiment 3"
                                         data-for="ludilearn-course-section-itemequiped3" data-id="{{id}}">
                                {{/parameters.item-equiped-3 }}
                                {{^parameters.item-equiped-3 }}
                                    <img class="avatar-slot slot-3"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/item_img_default.svg"  alt="Image equiment 3"
                                         data-for="ludilearn-course-section-itemequiped3" data-id="{{id}}">
                                {{/parameters.item-equiped-3 }}
                                {{#parameters.item-equiped-4 }}
                                    <img class="avatar-slot slot-4 item-equiped"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/items/images/image-04-{{ parameters.item-equiped-4 }}.svg" alt="Image equiment 4"
                                         data-for="ludilearn-course-section-itemequiped4" data-id="{{id}}">
                                {{/parameters.item-equiped-4 }}
                                {{^parameters.item-equiped-4 }}
                                    <img class="avatar-slot slot-4"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/item_img_default.svg"  alt="Image equiment 4"
                                         data-for="ludilearn-course-section-itemequiped4" data-id="{{id}}">
                                {{/parameters.item-equiped-4 }}
                                {{#parameters.item-equiped-5 }}
                                    <img class="avatar-slot slot-5 item-equiped"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/items/images/image-05-{{ parameters.item-equiped-5 }}.svg" alt="Image equiment 5"
                                         data-for="ludilearn-course-section-itemequiped5" data-id="{{id}}">
                                {{/parameters.item-equiped-5 }}
                                {{^parameters.item-equiped-5 }}
                                    <img class="avatar-slot slot-5"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/item_img_default.svg"  alt="Image equiment 5"
                                         data-for="ludilearn-course-section-itemequiped5" data-id="{{id}}">
                                {{/parameters.item-equiped-5 }}
                                {{#parameters.item-equiped-6 }}
                                    <img class="avatar-slot slot-6 item-equiped"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/items/images/image-06-{{ parameters.item-equiped-6 }}.svg" alt="Image equiment 6"
                                         data-for="ludilearn-course-section-itemequiped6" data-id="{{id}}">
                                {{/parameters.item-equiped-6 }}
                                {{^parameters.item-equiped-6 }}
                                    <img class="avatar-slot slot-6"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/item_img_default.svg"  alt="Image equiment 6"
                                         data-for="ludilearn-course-section-itemequiped6" data-id="{{id}}">
                                {{/parameters.item-equiped-6 }}
                                {{#parameters.item-equiped-7 }}
                                    <img class="avatar-slot slot-7 item-equiped"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/items/images/image-07-{{ parameters.item-equiped-7 }}.svg" alt="Image equiment 7"
                                         data-for="ludilearn-course-section-itemequiped7" data-id="{{id}}">
                                {{/parameters.item-equiped-7 }}
                                {{^parameters.item-equiped-7 }}
                                    <img class="avatar-slot slot-7"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/item_img_default.svg"  alt="Image equiment 7"
                                         data-for="ludilearn-course-section-itemequiped7" data-id="{{id}}">
                                {{/parameters.item-equiped-7 }}
                                {{#parameters.item-equiped-8 }}
                                    <img class="avatar-slot slot-8 item-equiped"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/items/images/image-08-{{ parameters.item-equiped-8 }}.svg" alt="Image equiment 8"
                                         data-for="ludilearn-course-section-itemequiped8" data-id="{{id}}">
                                {{/parameters.item-equiped-8 }}
                                {{^parameters.item-equiped-8 }}
                                    <img class="avatar-slot slot-8"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/item_img_default.svg"  alt="Image equiment 8"
                                         data-for="ludilearn-course-section-itemequiped8" data-id="{{id}}">
                                {{/parameters.item-equiped-8 }}
                                {{#parameters.item-equiped-9 }}
                                    <img class="avatar-slot slot-9 item-equiped"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/items/images/image-09-{{ parameters.item-equiped-9 }}.svg" alt="Image equiment 9"
                                         data-for="ludilearn-course-section-itemequiped9" data-id="{{id}}">
                                {{/parameters.item-equiped-9 }}
                                {{^parameters.item-equiped-9 }}
                                    <img class="avatar-slot slot-9"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/avatar/item_img_default.svg"  alt="Image equiment 9"
                                         data-for="ludilearn-course-section-itemequiped9" data-id="{{id}}">
                                {{/parameters.item-equiped-9 }}
                            </div>
                        {{/parameters.lastaccess}}
                        {{^parameters.lastaccess}}
                        <div class="col-12 block_section">
                            <img class="ludilearn-img img-responsive d-block mx-auto" src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/unkown.svg" alt="Image not viewed">
                        </div>
                        {{/parameters.lastaccess}}
                    </div>
                    {{/parameters.gamified}}
                    {{^parameters.gamified}}
                    <div class="col-12 block_section">
                        <img class="ludilearn-img img-responsive d-block mx-auto" src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/none.svg" alt="Image no gamified">
                    </div>
                    {{/parameters.gamified}}
                    {{#parameters.lastaccess}}
                        {{#parameters.gamified}}
                        <div class="col-6 block_section">
                            <div class="count-items">
                                <span class="numerator {{#parameters.itemsownedcounttwodigits}} two-digits {{/parameters.itemsownedcounttwodigits}}"
                                      data-for="ludilearn-course-section-itemsownedcount" data-id="{{id}}">
                                    {{ parameters.itemsownedcount }}
                                </span>
                                <span class="fraction">/</span>
                                <span class="denumerator" data-for="ludilearn-course-section-itemsownablecount" data-id="{{id}}">
                                    {{ parameters.itemsownablecount }}
                                    <span class="items-label">
                                        {{#str}} items, format_ludilearn {{/str}}
                                    </span>
                                </span>
                            </div>
                        </div>
                        {{/parameters.gamified}}
                    {{/parameters.lastaccess}}
                </div>
                <p class="text-center">
                    <span class="sectionname"><a href="{{ url }}" class="stretched-link">{{{ name }}}</a> </span>
                </p>
                {{#parameters.restricted }}
                    <div class="sectionrestrictedinfo small text-center"><i class="fa fa-lock"></i> {{{ parameters.restrictedinfo }}}</div>
                {{/parameters.restricted }}
                {{^visible}}
                    <div class="section-hidden text-center">
                        <span class="badge badge-info">{{#str}} hiddenfromstudents {{/str}}</span>
                    </div>
                {{/visible}}
            </div>
        </div>
    </div>
</div>
{{> format_ludilearn/components/course }}
