{"version":3,"file":"attempt_administration_chart_output_htmltable.min.js","sources":["../src/attempt_administration_chart_output_htmltable.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 * Customized output for the attempt administration chart data.\n *\n * @module mod_adaptivequiz/attempt_administration_chart_output_htmltable\n * @copyright 2024 Vitaly Potenko <potenkov@gmail.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([\n 'jquery',\n 'core/chart_output_htmltable',\n 'mod_adaptivequiz/attempt_administration_chart_dataset_config'\n], function (\n $,\n OutputTable,\n DatasetConfig\n) {\n\n /**\n * Output for the attempt administration chart data.\n *\n * @class\n * @extends {module:core/chart_output_htmltable}\n */\n function AttemptAdministrationChartOutputTable() {\n OutputTable.apply(this, arguments);\n }\n AttemptAdministrationChartOutputTable.prototype = Object.create(OutputTable.prototype);\n\n /**\n * Overrides building the table.\n *\n * @override\n * @protected\n * @return {Object} Modified table node.\n */\n AttemptAdministrationChartOutputTable.prototype._makeTable = function() {\n let tbl = OutputTable.prototype._makeTable.apply(this, arguments);\n\n // Remove columns with standard error min/max.\n const dataIndicesToRemove = [DatasetConfig.indices.STANDARD_ERROR_MAX, DatasetConfig.indices.STANDARD_ERROR_MIN];\n\n const selectorsToRemove = dataIndicesToRemove.flatMap(\n (dataIndexToRemove) => [`th:nth-child(${dataIndexToRemove + 2})`, `td:nth-child(${dataIndexToRemove + 2})`]\n );\n\n tbl.find(selectorsToRemove.join()).remove();\n\n return tbl;\n };\n\n return AttemptAdministrationChartOutputTable;\n});\n"],"names":["define","$","OutputTable","DatasetConfig","AttemptAdministrationChartOutputTable","apply","this","arguments","prototype","Object","create","_makeTable","tbl","dataIndicesToRemove","indices","STANDARD_ERROR_MAX","STANDARD_ERROR_MIN","selectorsToRemove","flatMap","dataIndexToRemove","find","join","remove"],"mappings":";;;;;;;AAsBAA,wEAAO,CACH,SACA,8BACA,iEACD,SACCC,EACAC,YACAC,wBASSC,wCACLF,YAAYG,MAAMC,KAAMC,kBAE5BH,sCAAsCI,UAAYC,OAAOC,OAAOR,YAAYM,WAS5EJ,sCAAsCI,UAAUG,WAAa,eACrDC,IAAMV,YAAYM,UAAUG,WAAWN,MAAMC,KAAMC,iBAGjDM,oBAAsB,CAACV,cAAcW,QAAQC,mBAAoBZ,cAAcW,QAAQE,oBAEvFC,kBAAoBJ,oBAAoBK,SACzCC,mBAAsB,wBAAiBA,kBAAoB,8BAAsBA,kBAAoB,iBAG1GP,IAAIQ,KAAKH,kBAAkBI,QAAQC,SAE5BV,KAGJR"}