{"version":3,"file":"userpreferences.min.js","sources":["https:\/\/leren.vluchtelingenwerk.nl\/admin\/tool\/catalogue\/amd\/src\/local\/repository\/userpreferences.js"],"sourcesContent":["\/\/ This file is part of Moodle Workplace https:\/\/moodle.com\/workplace based on Moodle\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 .\n\/\/\n\/\/ Moodle Workplace\u2122 Code is the collection of software scripts\n\/\/ (plugins and modifications, and any derivations thereof) that are\n\/\/ exclusively owned and licensed by Moodle under the terms of this\n\/\/ proprietary Moodle Workplace License (\"MWL\") alongside Moodle's open\n\/\/ software package offering which itself is freely downloadable at\n\/\/ \"download.moodle.org\" and which is provided by Moodle under a single\n\/\/ GNU General Public License version 3.0, dated 29 June 2007 (\"GPL\").\n\/\/ MWL is strictly controlled by Moodle Pty Ltd and its certified\n\/\/ premium partners. Wherever conflicting terms exist, the terms of the\n\/\/ MWL are binding and shall prevail.\n\n\/**\n * Module to handle user preferences\n *\n * @module tool_catalogue\/local\/repository\/userpreferences\n * @copyright 2022 Moodle Pty Ltd \n * @author 2022 Bas Brands \n * @license Moodle Workplace License, distribution is restricted, contact support@moodle.com\n *\/\n\nimport Ajax from 'core\/ajax';\n\n\/**\n * Set user preferences.\n *\n * @param {object} preferences The preferences to set.\n * @return {Promise} Promise when the preferences have been set\n *\/\nexport const setUserPreferences = (preferences) => {\n const request = {\n methodname: 'core_user_set_user_preferences',\n args: {\n preferences: preferences\n }\n };\n return Ajax.call([request])[0];\n};\n"],"names":["preferences","request","methodname","args","Ajax","call"],"mappings":";;;;;;;;gLA2CmCA,oBACzBC,QAAU,CACZC,WAAY,iCACZC,KAAM,CACFH,YAAaA,qBAGdI,cAAKC,KAAK,CAACJ,UAAU"}