{{!
    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 format_remuiformat/card_all_sections_summary

    Example context (json):
    {
        "editing: "1/0",
        "defaultview: "1/0",
        "expanded: "1/0",
        "collapsed: "1/0",
        "user_id: "1",
        "courseid: "1",
        "generalsection": [
         {
            "generalsectiontitle": "General Section Title",
            "activities": [
                {
                    "index": "index",
                    "id": "id",
                    "completion": "completion",
                    "viewurl": "viewurl",
                    "title": "title",
                    "modulename": "modulename",
                    "summary": "summary",
                    "completed": "completed",
                    "hidden": "hidden",
                    "availstatus": "availstatus",
                    "modicons": "modicons",
                }
            ],
            "generalsectionsummary": "General Section Summary",
            "sections": [
                {
                    "index": "1",
                    "title": "Section Title",
                    "singlepageurl": "Single Page URL",
                    "hiddenmessage": "Hidden message",
                    "hidden": "1/0",
                    "summary": "Summary",
                    "activityinfostring": "2 Files, 2 Quizzes"
                    "sectionactivities" [
                        {
                        }
                    ]
                }
            ]
         }
        ],
    }
}}
<style>
.read-more-state ~ .read-more-trigger:before {
    content: '{{#str}} showfullsummary, format_remuiformat{{/str}}';
}
.read-more-state:checked ~ .read-more-trigger:before {
    content: '{{#str}} showless, format_remuiformat{{/str}}';
}
</style>
{{#editing}}
<div id="card-container" class="remui-format-card all-section-format theme-{{theme}}  ">
    <ul class="sections row generalsection-container">
        {{! Display General Section }}
        {{#generalsection}}
        {{> format_remuiformat/card_general_section_edit }}
        {{/generalsection}}
    </ul>
  </div>
    <div id="card-editing-container" class="remui-format-card all-section-format theme-{{theme}} ">
        {{! Display General Section }}
        <ul class="sections row">
            {{! Display Remaining Section }}
            {{#sections}}
                {{> format_remuiformat/card_section_summary_edit }}
            {{/sections}}
            {{{ addsection }}}
        </ul>
    </div>
{{/editing}}
{{^editing}}
<div id="card-container" class="remui-format-card all-section-format theme-{{theme}}">
    <ul class="sections row generalsection-container">
        {{! Display General Section }}
        {{#generalsection}}
        {{> format_remuiformat/card_general_section }}
        {{/generalsection}}
    </ul>
  </div>
    <div id="card-container" class="remui-format-card all-section-format theme-{{theme}}">
        {{! Display General Section }}
        <ul class="sections row">
            {{! Display Remaining Section }}
            {{#sections}}
                {{> format_remuiformat/card_section_summary }}
            {{/sections}}
        </ul>
    </div>
{{/editing}}
