1441 |
ariadna |
1 |
{"version":3,"file":"repository.min.js","sources":["../src/repository.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 * AI Subsystem policy functions.\n *\n * @module core_ai/repository\n * @copyright Matt Porritt <matt.porritt@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 4.5\n */\n\nimport Ajax from 'core/ajax';\n\n/**\n * Get the policy status for a user.\n *\n * @param {Number} userid The user ID.\n * @return {Promise<Object>} The policy status.\n */\nexport const getPolicyStatus = (userid) => Ajax.call([{\n methodname: 'core_ai_get_policy_status',\n args: {userid},\n}])[0];\n\n/**\n * Set the policy status for a user.\n *\n * @param {Number} contextId The context ID.\n * @return {Promise<Object>} Promise resolved with the policy set status.\n */\nexport const setPolicyStatus = (contextId) => Ajax.call([{\n methodname: 'core_ai_set_policy_status',\n args: {contextid: contextId},\n}])[0];\n"],"names":["userid","Ajax","call","methodname","args","contextId","contextid"],"mappings":";;;;;;;;mMAgCgCA,QAAWC,cAAKC,KAAK,CAAC,CAClDC,WAAY,4BACZC,KAAM,CAACJ,OAAAA,WACP,4BAQ4BK,WAAcJ,cAAKC,KAAK,CAAC,CACrDC,WAAY,4BACZC,KAAM,CAACE,UAAWD,cAClB"}
|