mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-66958 core_grade: Correct documentation in normalise js
This commit is contained in:
parent
f9db5892ec
commit
80dcc83400
@ -1 +1 @@
|
||||
{"version":3,"sources":["../../../../src/grades/grader/gradingpanel/normalise.js"],"names":["normaliseResult","result","failed","warnings","length","success","error","invalidResult","failedUpdate"],"mappings":"2NA8B+B,QAAlBA,CAAAA,eAAkB,CAAAC,CAAM,CAAI,CACrC,MAAO,CACHA,MAAM,CAANA,CADG,CAEHC,MAAM,CAAE,CAAC,CAACD,CAAM,CAACE,QAAP,CAAgBC,MAFvB,CAGHC,OAAO,CAAE,CAACJ,CAAM,CAACE,QAAP,CAAgBC,MAHvB,CAIHE,KAAK,CAAE,IAJJ,CAMV,C,iBAO4B,QAAhBC,CAAAA,aAAgB,EAAM,CAC/B,MAAO,CACHF,OAAO,GADJ,CAEHH,MAAM,GAFH,CAGHD,MAAM,CAAE,EAHL,CAIHK,KAAK,CAAE,IAJJ,CAMV,C,gBAQ2B,QAAfE,CAAAA,YAAe,CAAAF,CAAK,CAAI,CACjC,MAAO,CACHD,OAAO,GADJ,CAEHH,MAAM,GAFH,CAGHD,MAAM,CAAE,EAHL,CAIHK,KAAK,CAALA,CAJG,CAMV,C","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 * Repository for simple direct grading panel.\n *\n * @module core_grades/grades/grader/gradingpanel/repository\n * @package core_grades\n * @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * Normalise a resultset for consumption by the grader.\n *\n * @param {Object} result The result returned from a grading web service\n * @return {Object}\n */\nexport const normaliseResult = result => {\n return {\n result,\n failed: !!result.warnings.length,\n success: !result.warnings.length,\n error: null,\n };\n};\n\n/**\n * Return the resultset used to describe an invalid result.\n *\n * @return {Object}\n */\nexport const invalidResult = () => {\n return {\n success: false,\n failed: false,\n result: {},\n error: null,\n };\n};\n\n/**\n * Return the resultset used to describe a failed update.\n *\n * @param {Object} error\n * @return {Object}\n */\nexport const failedUpdate = error => {\n return {\n success: false,\n failed: true,\n result: {},\n error,\n };\n};\n"],"file":"normalise.min.js"}
|
||||
{"version":3,"sources":["../../../../src/grades/grader/gradingpanel/normalise.js"],"names":["normaliseResult","result","failed","warnings","length","success","error","invalidResult","failedUpdate"],"mappings":"2NA8B+B,QAAlBA,CAAAA,eAAkB,CAAAC,CAAM,CAAI,CACrC,MAAO,CACHA,MAAM,CAANA,CADG,CAEHC,MAAM,CAAE,CAAC,CAACD,CAAM,CAACE,QAAP,CAAgBC,MAFvB,CAGHC,OAAO,CAAE,CAACJ,CAAM,CAACE,QAAP,CAAgBC,MAHvB,CAIHE,KAAK,CAAE,IAJJ,CAMV,C,iBAO4B,QAAhBC,CAAAA,aAAgB,EAAM,CAC/B,MAAO,CACHF,OAAO,GADJ,CAEHH,MAAM,GAFH,CAGHD,MAAM,CAAE,EAHL,CAIHK,KAAK,CAAE,IAJJ,CAMV,C,gBAQ2B,QAAfE,CAAAA,YAAe,CAAAF,CAAK,CAAI,CACjC,MAAO,CACHD,OAAO,GADJ,CAEHH,MAAM,GAFH,CAGHD,MAAM,CAAE,EAHL,CAIHK,KAAK,CAALA,CAJG,CAMV,C","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 * Error handling and normalisation of provided data.\n *\n * @module core_grades/grades/grader/gradingpanel/normalise\n * @package core_grades\n * @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * Normalise a resultset for consumption by the grader.\n *\n * @param {Object} result The result returned from a grading web service\n * @return {Object}\n */\nexport const normaliseResult = result => {\n return {\n result,\n failed: !!result.warnings.length,\n success: !result.warnings.length,\n error: null,\n };\n};\n\n/**\n * Return the resultset used to describe an invalid result.\n *\n * @return {Object}\n */\nexport const invalidResult = () => {\n return {\n success: false,\n failed: false,\n result: {},\n error: null,\n };\n};\n\n/**\n * Return the resultset used to describe a failed update.\n *\n * @param {Object} error\n * @return {Object}\n */\nexport const failedUpdate = error => {\n return {\n success: false,\n failed: true,\n result: {},\n error,\n };\n};\n"],"file":"normalise.min.js"}
|
@ -14,9 +14,9 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Repository for simple direct grading panel.
|
||||
* Error handling and normalisation of provided data.
|
||||
*
|
||||
* @module core_grades/grades/grader/gradingpanel/repository
|
||||
* @module core_grades/grades/grader/gradingpanel/normalise
|
||||
* @package core_grades
|
||||
* @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
|
Loading…
x
Reference in New Issue
Block a user