AutorÃa | Ultima modificación | Ver Log |
define("mod_quiz/question_slot",["exports","core/ajax","core/notification"],(function(_exports,_ajax,_notification){var obj;
/**
* Render the question slot template for each question in the quiz edit view.
*
* @module mod_quiz/question_slot
* @copyright 2021 Catalyst IT Australia Pty Ltd
* @author Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_notification=(obj=_notification)&&obj.__esModule?obj:{default:obj};const registerEventListeners=()=>{document.addEventListener("change",(e=>{if(!e.target.matches('[data-action="mod_quiz-select_slot"][data-slot-id]'))return;((slotId,newVersion)=>(0,_ajax.call)([{methodname:"mod_quiz_set_question_version",args:{slotid:slotId,newversion:newVersion}}])[0])(e.target.dataset.slotId,parseInt(e.target.value)).then((()=>{location.reload()})).catch(_notification.default.exception)}))};_exports.init=()=>{registerEventListeners()}}));
//# sourceMappingURL=question_slot.min.js.map