{{!
    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.

    Learner Course Progress report page.

    @package   local_edwiserreports/reports
    @author    Yogesh Shirsath
    @copyright (c) 2022 WisdmLabs (https://wisdmlabs.com/)
    @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

}}
{{!
    @template local_edwiserreports/reports/learnercourseprogress

    Context variables required for this template:

    Example context (json):
    {
    }
}}
{{> local_edwiserreports/navigation }}
{{> local_edwiserreports/report-page-header }}
<div class="report-content" id="learnercourseprogress" data-sesskey="{{sesskey}}">
    <div id="userfilter" class="h-auto mt-2">
        <div class="row">
            {{^learner}}
                <div class="filter-selector col-12 col-lg-3 col-md-6 mb-3">
                    <label>{{#str}} learner, local_edwiserreports {{/str}}</label>
                    {{> local_edwiserreports/filters/students_filter }}
                </div>
            {{/learner}}

        </div>
    </div>

    {{> local_edwiserreports/summary/summary-card }}

    <div id="userfilter" class="h-auto mt-2 mb-2">
        <div class="row">
            <div class="filter-selector col-12 col-lg-3 col-md-6 mb-3">
                <label>{{#str}} search, local_edwiserreports {{/str}}</label>
                {{> local_edwiserreports/datatable/search }}
            </div>
            <div class="filter-selector col-12 table-length-input ml-auto mb-3">
                <label>{{#str}} show, local_edwiserreports {{/str}}</label>
                {{> local_edwiserreports/datatable/length }}
            </div>
            {{# export }}
                {{> local_edwiserreports/exportreports }}
            {{/ export }}
        </div>
    </div>
    <table class="table">
        <thead>
            <tr>
                <th>
                    <div class="text-left">{{#str}} course {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} status {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} enrolledon, local_edwiserreports {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} completedon, local_edwiserreports {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} lastaccess, local_edwiserreports {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} progress, core_search {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} grade, local_edwiserreports {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} totalactivities, local_edwiserreports {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} completedactivities, local_edwiserreports {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} attemptedactivities, local_edwiserreports {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} visits, local_edwiserreports {{/str}} </div>
                </th>
                <th>
                    <div class="text-left">{{#str}} timespent, local_edwiserreports {{/str}} </div>
                </th>
            </tr>
        </thead>
    </table>
</div>

{{#setactive}}
    {{> local_edwiserreports/setactivenav }}
{{/setactive}}

{{#js}}
M.local_edwiserreports = {
    secret: '{{{secret}}}'
};

M.util.js_pending('local_edwiserreports/reports/learnercourseprogress');
require(['local_edwiserreports/reports/learnercourseprogress'], function(amd) {
    amd.init();
    M.util.js_complete('local_edwiserreports/reports/learnercourseprogress');
});
{{/js}}
