{{!
    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 comments.

    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/course_completion_status_manager
}}
<div class="course-completion-status-manager oveerview">
    {{#ishide}}
        <div class="alert alert-info w-100">{{#str}}
            nocoursesavailable, block_ned_teacher_tools{{/str}}</div>
    {{/ishide}}
    {{^ishide}}
        <div class="px-3 row">
            <div class="col-12 p-0 p-b-1">{{{inactivecheckbox}}}</div>
            <table class="nedtable fullwidth col-12 p-0">
                <thead>
                <tr>
                    <th scope="col" rowspan="2">{{#str}}coursename, block_ned_teacher_tools{{/str}}</th>
                    <th scope="col" rowspan="2">{{#str}}coursecode, block_ned_teacher_tools{{/str}}</th>
                    <th scope="col" rowspan="2">{{#str}}csm, block_ned_teacher_tools{{/str}}</th>
                    <th scope="col" rowspan="2">{{#str}}badge,block_ned_teacher_tools{{/str}}</th>
                    <th scope="col" rowspan="2">{{#str}}type, block_ned_teacher_tools{{/str}}</th>
                    <th class="text-center" scope="col" colspan="3">
                        {{#str}}completioncriteria, block_ned_teacher_tools{{/str}}
                    </th>
                    <th class="text-center" scope="col" colspan="5">
                        {{#str}}completionstatus, block_ned_teacher_tools{{/str}}
                    </th>
                </tr>
                <tr>
                    <th scope="col">{{#str}}ccsm_grade, block_ned_teacher_tools{{/str}}</th>
                    <th scope="col">{{#str}}activities, block_ned_teacher_tools{{/str}}</th>
                    <th scope="col">{{#str}}roles{{/str}}</th>
                    <th class="text-center" scope="col">
                        <span class="large-icon-container">
                            <div class="fa tt-status-icon tt-si-inprogress"></div>
                        </span>
                    </th>
                    <th class="text-center" scope="col">
                        <span class="large-icon-container">
                            <div class="fa tt-status-icon tt-si-waitingforinternalreview"></div>
                        </span>
                    </th>
                    <th class="text-center" scope="col">
                        <span class="large-icon-container">
                            <div class="fa tt-status-icon tt-si-waitingfinalgrade"></div>
                        </span>
                    </th>
                    <th class="text-center" scope="col">
                        <span class="large-icon-container">
                            <div class="fa tt-status-icon tt-si-pass"></div>
                        </span>
                    </th>
                    <th class="text-center" scope="col">
                        <span class="large-icon-container">
                            <div class="fa tt-status-icon tt-si-fail"></div>
                        </span>
                    </th>
                </tr>
                </thead>
                <tbody>
                {{#courses}}
                    <tr class="{{^csmon}}csmoff{{/csmon}}">
                        {{! it's for compatibility with deadline_manager_report_overview_all }}
                        <td><a href="{{url}}" title="{{fullname}}">{{fullname}}</a></td>
                        <td><a href="{{url}}" title="{{fullname}}">{{shortname}}</a></td>
                        <td class="text-center">
                            {{#csmon}}{{#str}}yes, block_ned_teacher_tools{{/str}}{{/csmon}}
                            {{^csmon}}{{#str}}no, block_ned_teacher_tools{{/str}}{{/csmon}}
                        </td>
                        <td>{{#badgeurl}}<a href="{{{badgeurl}}}" target="_blank">{{/badgeurl}}
                            {{#badgecode}}{{badgecode}}{{/badgecode}}
                            {{#badgeurl}}</a>{{/badgeurl}}
                            {{^badgecode}}{{#str}}none, block_ned_teacher_tools{{/str}}{{/badgecode}}
                        </td>
                        <td>{{#coursetype}}{{coursetype}}{{/coursetype}}</td>
                        {{#completioncriteria}}
                            <td>
                                {{#csmon}}
                                    {{#completioncriteriaurl}}<a href="{{{completioncriteriaurl}}}" target="_blank">{{/completioncriteriaurl}}
                                        {{grade}}
                                    {{#completioncriteriaurl}}</a>{{/completioncriteriaurl}}
                                {{/csmon}}
                                {{^csmon}}{{#str}}ccsm_na,block_ned_teacher_tools{{/str}}{{/csmon}}
                            </td>
                            <td>
                                {{#csmon}}
                                    {{#completioncriteriaurl}}<a href="{{{completioncriteriaurl}}}" target="_blank">{{/completioncriteriaurl}}
                                        {{activity}}
                                    {{#completioncriteriaurl}}</a>{{/completioncriteriaurl}}
                                {{/csmon}}
                                {{^csmon}}{{#str}}ccsm_na,block_ned_teacher_tools{{/str}}{{/csmon}}
                            </td>
                            <td>
                                {{#csmon}}
                                    {{#completioncriteriaurl}}<a href="{{{completioncriteriaurl}}}" target="_blank">{{/completioncriteriaurl}}
                                        {{role}}
                                    {{#completioncriteriaurl}}</a>{{/completioncriteriaurl}}
                                {{/csmon}}
                                {{^csmon}}{{#str}}ccsm_na,block_ned_teacher_tools{{/str}}{{/csmon}}
                            </td>
                        {{/completioncriteria}}
                        {{#countusersstatuses}}
                            <td>
                                {{#csmon}}<a href="{{{countusersstatusesurl}}}" target="_blank">{{in_progress}}</a>{{/csmon}}
                                {{^csmon}}{{#str}}ccsm_na,block_ned_teacher_tools{{/str}}{{/csmon}}
                            </td>
                            <td>
                                {{#csmon}}<a href="{{{countusersstatusesurl}}}" target="_blank">{{waiting_for_internal_review}}</a>{{/csmon}}
                                {{^csmon}}{{#str}}ccsm_na,block_ned_teacher_tools{{/str}}{{/csmon}}
                            </td>
                            <td>
                                {{#csmon}}<a href="{{{countusersstatusesurl}}}" target="_blank">{{waiting_for_final_grade}}</a>{{/csmon}}
                                {{^csmon}}{{#str}}ccsm_na,block_ned_teacher_tools{{/str}}{{/csmon}}
                            </td>
                            <td>
                                {{#csmon}}<a href="{{{countusersstatusesurl}}}" target="_blank">{{pass}}</a>{{/csmon}}
                                {{^csmon}}{{#str}}ccsm_na,block_ned_teacher_tools{{/str}}{{/csmon}}
                            </td>
                            <td>
                                {{#csmon}}<a href="{{{countusersstatusesurl}}}" target="_blank">{{fail}}</a>{{/csmon}}
                                {{^csmon}}{{#str}}ccsm_na,block_ned_teacher_tools{{/str}}{{/csmon}}
                            </td>
                        {{/countusersstatuses}}
                    </tr>
                {{/courses}}
                </tbody>
            </table>
        </div>
    {{/ishide}}
</div>