Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

define("tiny_aiplacement/options",["exports","editor_tiny/options","tiny_aiplacement/common"],(function(_exports,_options,_common){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.register=_exports.isTextAllowed=_exports.isPolicyAgreed=_exports.isImageAllowed=_exports.getUserId=_exports.getContextId=void 0;
/**
   * Options helper for Tiny AI plugin.
   *
   * @module      tiny_aiplacement/options
   * @copyright   2023 Matt Porritt <matt.porritt@moodle.com>
   * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
   */
const contextIdName=(0,_options.getPluginOptionName)(_common.pluginName,"contextid"),userIdName=(0,_options.getPluginOptionName)(_common.pluginName,"userid"),textAllowedName=(0,_options.getPluginOptionName)(_common.pluginName,"generate_text"),imageAllowedName=(0,_options.getPluginOptionName)(_common.pluginName,"generate_image"),policyAgreedName=(0,_options.getPluginOptionName)(_common.pluginName,"policyagreed");_exports.register=editor=>{const registerOption=editor.options.register;registerOption(contextIdName,{processor:"number",default:0}),registerOption(userIdName,{processor:"number",default:0}),registerOption(textAllowedName,{processor:"boolean",default:!1}),registerOption(imageAllowedName,{processor:"boolean",default:!1}),registerOption(policyAgreedName,{processor:"boolean",default:!1})};_exports.getContextId=editor=>editor.options.get(contextIdName);_exports.getUserId=editor=>editor.options.get(userIdName);_exports.isTextAllowed=editor=>editor.options.get(textAllowedName);_exports.isImageAllowed=editor=>editor.options.get(imageAllowedName);_exports.isPolicyAgreed=editor=>editor.options.get(policyAgreedName)}));

//# sourceMappingURL=options.min.js.map