{{!
    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 block_ned_teacher_tools/cta_tracker_render

    ned_grade_controller_render layout template.

    Context variables required for this template:
    {
        "notifications":        []html,
        "control_panel1":       []html,
        "control_panel2":       []html,
        "control_panel3":       []html,
        "buttons":              []html,
        "pager":                html,
        "has_data":             bool,
        "table_class":          sring,
        "show_class":           bool,
    }
}}
<div class="notifications {{^notifications}}empty{{/notifications}}">
    {{#notifications}}
        {{{.}}}
    {{/notifications}}
</div>
{{#show_data}}
<div class="ned-base-table-page-render cta-tracker-render">
    <div class="control-panel control-panel1 {{^control_panel1}}empty{{/control_panel1}}">
        {{#control_panel1}}
            {{{.}}}
        {{/control_panel1}}
    </div>
    <div class="control-panel control-panel3">
        {{#buttons}}
            {{{.}}}
        {{/buttons}}
        <div class="control-panel-elements">
            {{#control_panel3}}
                {{{.}}}
            {{/control_panel3}}
        </div>
        {{#pager}}
            <div class="pager">
                {{{pager}}}
            </div>
        {{/pager}}
    </div>
    <div class="table-container">
        <div class="table-div">
            {{#has_data}}
                <table class="cta-table generaltable nedtable {{{table_class}}}">
                    <thead>
                    <tr>
                        {{#show_class}}
                            <th scope="col" class="text-center">{{#str}}class, local_ned_controller{{/str}}</th>
                        {{/show_class}}
                        <th scope="col" class="text-center">{{#str}}activity, local_ned_controller{{/str}}</th>
                        <th scope="col" class="text-center">{{#str}}classroomteacher, block_ned_teacher_tools{{/str}}</th>
                        <th scope="col" class="text-center">{{#str}}student, block_ned_teacher_tools{{/str}}</th>
                        <th scope="col" class="text-center">{{#str}}submissionstatus, block_ned_teacher_tools{{/str}}</th>
                        <th scope="col" class="text-center">{{#str}}approvedby, block_ned_teacher_tools{{/str}}</th>
                        <th scope="col" class="text-center">{{#str}}comment, block_ned_teacher_tools{{/str}}</th>
                    </tr>
                    </thead>
                    <tbody>
                    {{#data}}
                        <tr>
                            {{#show_class}}
                                <td>{{{classname}}}</td>
                            {{/show_class}}
                            <td >{{{cm}}}</td>
                            <td >{{{ct}}}</td>
                            <td>{{{student}}}</td>
                            <td class="{{status_class}}">{{{status}}}</td>
                            <td>{{{grader}}}</td>
                            <td>{{{comment}}}</td>
                        </tr>
                    {{/data}}
                    </tbody>
                </table>
            {{/has_data}}
            {{^has_data}}
                <div class="no-records">
                    {{#str}}norecords, local_ned_controller{{/str}}
                </div>
            {{/has_data}}
        </div>
    </div>
    {{#pager}}
        <div class="pager">
            {{{pager}}}
        </div>
    {{/pager}}
</div>
{{/show_data}}