{{!
    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-ranking-cm" class="cm-ranking {{#cm.parameters.restricted }}restricted{{/cm.parameters.restricted }}">
    <div data-for="ludilearn-cm-groupviewtemplate">
        {{#parameters.noscore}}
            <img class="ludilearn-img img-responsive d-block mx-auto" src="{{config.wwwroot}}/course/format/ludilearn/pix/{{ world }}/none.svg" alt="Image no score">
        {{/parameters.noscore}}
        {{^parameters.noscore}}
            {{#parameters.gamified }}
                {{#school}}
                    {{> format_ludilearn/ranking/school/group_view}}
                {{/school}}
                {{#professional}}
                    {{> format_ludilearn/ranking/professional/group_view}}
                {{/professional}}
                {{#highschool}}
                    {{> format_ludilearn/ranking/highschool/group_view}}
                {{/highschool}}
            {{/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 score">
            {{/parameters.gamified }}
        {{/parameters.noscore}}
    </div>
    {{#parameters.gamified }}
        <p class="text-center ranking-text">
            <span class="playerscore" data-for="ludilearn-cm-score">{{ cm.parameters.score }} pts</span>
        </p>
    {{/parameters.gamified }}
</div>
{{> format_ludilearn/components/cm }}