{{!
    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 tool_courserating/course_ratings_popup_reviews

    Example context (json):
    {
        "courseid": 12
    }

}}
{{^offset}}
    {{#withrating}}
        <p class="w-100">Showing reviews with rating {{withrating}}.
            <a href="#" class="btn btn-secondary w-100" data-for="tool_courserating-resetwithrating">{{#str}}showallratings, tool_courserating{{/str}}</a></p>
    {{/withrating}}
{{/offset}}
{{#ratings}}
    {{> tool_courserating/rating}}
{{/ratings}}
{{#hasmore}}
    <div class="mdl-align reviews-showmore-wrapper" data-for="tool_courserating-showmore">
        <button type="button" class="btn btn-secondary w-100" data-action="showmore"
                data-nextoffset="{{nextoffset}}">{{#str}}showmorereviews, tool_courserating{{/str}}</button>
    </div>
{{/hasmore}}
