{{!
    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-progress-section-{{id}}" class="course-progress" data-sectionid="{{id}}">
    <div class="row">
        <div class="col-12">
            <div class="position-relative {{#parameters.restricted }}restricted{{/parameters.restricted}} {{^url}} nourl {{/url}}">
                <div class="row">
                    <div class="{{#parameters.gamified}}{{#parameters.lastaccess}}col-9{{/parameters.lastaccess}}{{/parameters.gamified}}
                        {{^parameters.lastaccess}}col-12{{/parameters.lastaccess}} {{^parameters.gamified}}col-12{{/parameters.gamified}} block_section">
                        {{#parameters.lastaccess}}
                            {{#parameters.gamified}}
                                {{#parameters.completed}}
                                    <img data-for="ludilearn-course-section-img-planet" data-id="{{id}}" class="ludilearn-img img-responsive mb-1 d-block mx-auto progression-planet progression-planet-max"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/progress/course-planet-max-0{{ parameters.planetenumber }}.svg" alt="Image planet progress">
                                {{/parameters.completed}}
                                {{^parameters.completed}}
                                    <img data-for="ludilearn-course-section-img-planet" data-id="{{id}}" class="ludilearn-img img-responsive mb-1 d-block mx-auto progression-planet progression-planet-inprogress"
                                         src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/progress/course-planet-0{{ parameters.planetenumber }}.svg" alt="Image planet progress">
                                {{/parameters.completed}}
                            {{/parameters.gamified}}
                            {{^parameters.gamified}}
                                <img class="ludilearn-img img-responsive d-block mx-auto" src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/none.svg" alt="Image no gamified">
                            {{/parameters.gamified}}
                        {{/parameters.lastaccess}}
                        {{^parameters.lastaccess}}
                            <img class="ludilearn-img img-responsive d-block mx-auto" src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/unkown.svg" alt="Image not viewed">
                        {{/parameters.lastaccess}}
                    </div>
                    {{#parameters.lastaccess}}
                        {{#parameters.gamified}}
                    <div class="col-3 block_section">
                        <p class="text-center">
                            <span class="progression" data-for="ludilearn-course-section-progression" data-id="{{id}}">{{ parameters.progression }}%</span>
                        </p>
                    </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 }}