Merge branch 'MDL-53170_master' of git://github.com/dmonllao/moodle
[moodle.git] / mod / assign / templates / grading_actions.mustache
blobab4e365dfb2a1fd6c822bbf8745b1a2d7067342a
1 {{!
2     This file is part of Moodle - http://moodle.org/
4     Moodle is free software: you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation, either version 3 of the License, or
7     (at your option) any later version.
9     Moodle is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
14     You should have received a copy of the GNU General Public License
15     along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
17 {{!
18     @template mod_assign/grading_actions
20     Actions panel at the bottom of the assignment grading UI.
22     Classes required for JS:
23     * none
25     Data attributes required for JS:
26     * data-region
28     Context variables required for this template:
29     * see mod/assign/classes/output/grading_app.php
31     Example context (json):
32     This template is initially hidden, and is only displayed after the current user info has been loaded.
34 <form data-region="grading-actions-form" class="hide">
35     <label>{{#str}}sendstudentnotifications, mod_assign{{/str}}
36            <input type="checkbox" name="sendstudentnotifications"
37                   {{#defaultsendnotifications}}checked="checked"{{/defaultsendnotifications}} />
38     </label>
39     <button type="submit" class="btn btn-primary" name="savechanges">{{#str}}savechanges{{/str}}</button>
40     <button type="submit" class="btn" name="resetbutton">{{#str}}reset{{/str}}</button>
41 </form>
42 {{#js}}
43 require(['mod_assign/grading_actions'], function(GradingActions) {
44     new GradingActions('[data-region="grade-actions"]');
45 });
46 {{/js}}