AutorÃa | Ultima modificación | Ver Log |
{"version":3,"file":"grade.min.js","sources":["../src/grade.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Allow the user to search for grades within the singleview report.\n *\n * @module gradereport_singleview/grade\n * @copyright 2023 Mathew May <mathew.solutions>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or la
ter\n */\nimport GradeItemSearch from 'core_grades/comboboxsearch/grade';\nimport Url from 'core/url';\n\n// Define our standard lookups.\nconst selectors = {\n component: '.grade-search',\n courseid: '[data-region=\"courseid\"]',\n};\nconst component = document.querySelector(selectors.component);\n\nexport default class GradeItems extends GradeItemSearch {\n\n courseID = component.querySelector(selectors.courseid).dataset.courseid;\n\n constructor() {\n super();\n }\n\n static init() {\n return new GradeItems();\n }\n\n /**\n * Build up the link that is dedicated to a particular result.\n *\n * @param {Number} gradeID The ID of the grade item selected.\n * @returns {string|*}\n */\n selectOneLink(gradeID) {\n return Url.relativeUrl('/grade/report/singleview/index.php', {\n id: this.courseID,\n gradesearchvalue: this.getSearchTerm(),\n item: 'grade',\n itemid: gradeID,\n }, false);\n }\n}
\n"],"names":["selectors","component","document","querySelector","GradeItems","GradeItemSearch","constructor","dataset","courseid","selectOneLink","gradeID","Url","relativeUrl","id","this","courseID","gradesearchvalue","getSearchTerm","item","itemid"],"mappings":"gXA0BMA,oBACS,gBADTA,mBAEQ,2BAERC,UAAYC,SAASC,cAAcH,2BAEpBI,mBAAmBC,eAIpCC,sEAFWL,UAAUE,cAAcH,oBAAoBO,QAAQC,+IAOpD,IAAIJ,WASfK,cAAcC,gBACHC,aAAIC,YAAY,qCAAsC,CACzDC,GAAIC,KAAKC,SACTC,iBAAkBF,KAAKG,gBACvBC,KAAM,QACNC,OAAQT,UACT"}