{{!
    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 mod_forum/local/grades/view_grade

    Classes required for JS:
    * none

    Data attributes required for JS:
    * data-region="grade-template"

    Context variables required for this template:
    * none

    Example context (json):
    {
        "templatename": "core_grades/grades/grader/gradingpanel/point",
        "grade": {
            "usergrade": 55,
            "maxgrade": 100,
            "timemodified": 1573543598
        },
        "hasgrade": true
    }
}}
<div class="container-fluid grade-display" data-region="view-grade">
    {{#grade}}
        <div class="d-flex flex-wrap px-3">
            <h5 class="fw-bold description">{{#str}}gradenoun{{/str}}:</h5>
            <p class="ms-auto">{{usergrade}}</p>
        </div>
        <div class="d-flex flex-wrap px-3">
            <h5 class="fw-bold description">{{#str}}gradedby, forum{{/str}}:</h5>
            <p class="ms-auto">
                {{#gradedby}}
                    {{gradedby}}
                {{/gradedby}}
                {{^gradedby}}
                    -
                {{/gradedby}}
            </p>
        </div>
        <div class="d-flex flex-wrap px-3">
            <h5 class="fw-bold description">{{#str}}date{{/str}}:</h5>
            <p class="ms-auto">{{#userdate}}{{timemodified}}, {{#str}} strftimedate, langconfig {{/str}}{{/userdate}}</p>
        </div>
    {{/grade}}
    <div class="d-flex flex-wrap px-3">
        <h5 class="fw-bold description">
            {{#str}}gradingstatus, forum{{/str}}
        </h5>
        <p class="ms-auto">
            {{#hasgrade}}
                {{#str}}graded, forum{{/str}}
            {{/hasgrade}}
            {{^hasgrade}}
                {{#str}}notgraded, forum{{/str}}
            {{/hasgrade}}
        </p>
    </div>
    <div class="d-flex flex-wrap p-3">
        <fieldset class="w-100" disabled="disabled">
            <div class="w-100" data-region="grade-template"></div>
        </fieldset>
    </div>
</div>
