{{!
    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 core_courseformat/local/content/section/cmitem

    Displays the course module list inside a course section.

    Example context (json):
    {
        "cmformat": {
            "cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Activity example</span></a>",
            "hasname": "true",
            "moveicon": "<i>[Move]</i>",
            "indent": 2,
            "afterlink": "<span class=\"badge badge-primary\">30 unread messages</span>",
            "hasextras": true,
            "extras": ["<span class=\"badge badge-secondary\">[extras]</span>"],
            "completion": "<span class=\"badge badge-success\">Completed!</span>"
        },
        "id": 3,
        "anchor": "module-3",
        "module": "forum",
        "extraclasses": "newmessages"
    }
}}
<li
    class="activity activity-wrapper {{module}} modtype_{{module}} {{#hasinfo}}hasinfo{{/hasinfo}}
        {{^clickable}} unclickable {{/clickable}} modtype_{{modname}} {{modResourceType}}{{extraclasses}}"
    id="{{anchor}}"
    data-for="cmitem"
    data-id="{{id}}"
    data-cmid="{{cmid}}"
    data-modinstance="{{modinstance}}"
    data-modtype="{{modname}}{{#modResourceType}}_{{{modResourceType}}}{{/modResourceType}}"
    {{#pluginfileUrl}}data-url="{{{pluginfileUrl}}}"{{/pluginfileUrl}}
    {{#secondaryurl}}data-url-secondary="{{{secondaryurl}}}"{{/secondaryurl}}
    data-title="{{{activityname}}}"
    {{#hascompletion}}data-completion-state="{{completionstate}}"{{/hascompletion}}
>
{{#cmformat}}
    {{$ format_tiles/local/content/cm}}
        {{> format_tiles/local/content/cm}}
    {{/ format_tiles/local/content/cm}}
{{/cmformat}}
</li>
