Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
// This file is part of Moodle - http://moodle.org/
2
//
3
// Moodle is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, either version 3 of the License, or
6
// (at your option) any later version.
7
//
8
// Moodle is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
// GNU General Public License for more details.
12
//
13
// You should have received a copy of the GNU General Public License
14
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
 
16
/**
17
 * Define all of the selectors we will be using on the grading interface.
18
 *
19
 * @module     mod_forum/local/grades/local/grader/selectors
20
 * @copyright  2019 Mathew May <mathew.solutions>
21
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22
 */
23
 
24
/**
25
 * A small helper function to build queryable data selectors.
26
 * @param {String} name
27
 * @param {String} value
28
 * @return {string}
29
 */
30
const getDataSelector = (name, value) => {
31
    return `[data-${name}="${value}"]`;
32
};
33
 
34
export default {
35
    buttons: {
36
        toggleFullscreen: getDataSelector('action', 'togglefullscreen'),
37
        closeGrader: getDataSelector('action', 'closegrader'),
38
        collapseGradingDrawer: getDataSelector('action', 'collapse-grading-drawer'),
39
        saveGrade: getDataSelector('action', 'savegrade'),
40
        selectUser: getDataSelector('action', 'select-user'),
41
        toggleSearch: getDataSelector('action', 'toggle-search')
42
    },
43
    regions: {
44
        bodyContainer: getDataSelector('region', 'body-container'),
45
        moduleContainer: getDataSelector('region', 'module_content_container'),
46
        moduleReplace: getDataSelector('region', 'module_content'),
47
        pickerRegion: getDataSelector('region', 'user_picker'),
48
        gradingInfoContainer: getDataSelector('region', 'grading-info-container'),
49
        gradingPanel: getDataSelector('region', 'grade'),
50
        gradingPanelContainer: getDataSelector('region', 'grading-panel-container'),
51
        gradingPanelErrors: getDataSelector('region', 'grade-errors'),
52
        searchResultsContainer: getDataSelector('region', 'search-results-container'),
53
        statusContainer: getDataSelector('region', 'status-container'),
54
        userSearchContainer: getDataSelector('region', 'user-search-container'),
55
        userSearchInput: getDataSelector('region', 'user-search-input')
56
    },
57
    values: {
58
        sendStudentNotifications: '[data-region="notification"] input[type="radio"]:checked',
59
    }
60
};
61