Your IP : 216.73.216.95


Current Path : /var/www/ljmtc/cbt/course/amd/build/
Upload File :
Current File : /var/www/ljmtc/cbt/course/amd/build/recommendations.min.js.map

{"version":3,"sources":["../src/recommendations.js"],"names":["toggleRecommendation","e","data","methodname","args","area","currentTarget","dataset","id","Ajax","call","fail","Notification","exception","init","checkboxelements","document","querySelectorAll","forEach","checkbox","addEventListener"],"mappings":"8KAuBA,OACA,O,sDAQMA,CAAAA,CAAoB,CAAG,SAACC,CAAD,CAAO,CAChC,GAAIC,CAAAA,CAAI,CAAG,CACPC,UAAU,CAAE,4CADL,CAEPC,IAAI,CAAE,CACFC,IAAI,CAAEJ,CAAC,CAACK,aAAF,CAAgBC,OAAhB,CAAwBF,IAD5B,CAEFG,EAAE,CAAEP,CAAC,CAACK,aAAF,CAAgBC,OAAhB,CAAwBC,EAF1B,CAFC,CAAX,CAOAC,UAAKC,IAAL,CAAU,CAACR,CAAD,CAAV,EAAkB,CAAlB,EAAqBS,IAArB,CAA0BC,UAAaC,SAAvC,CACH,C,QAOmB,QAAPC,CAAAA,IAAO,EAAM,CACtB,GAAMC,CAAAA,CAAgB,CAAGC,QAAQ,CAACC,gBAAT,CAA0B,aAA1B,CAAzB,CACAF,CAAgB,CAACG,OAAjB,CAAyB,SAACC,CAAD,CAAc,CACnCA,CAAQ,CAACC,gBAAT,CAA0B,QAA1B,CAAoCpB,CAApC,CACH,CAFD,CAGH,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 * A javascript module to handle toggling activity chooser recommendations.\n *\n * @module     core_course/recommendations\n * @copyright  2020 Adrian Greeve <adrian@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport Ajax from 'core/ajax';\nimport Notification from 'core/notification';\n\n/**\n * Do an ajax call to toggle the recommendation\n *\n * @param  {object} e The event\n * @return {void}\n */\nconst toggleRecommendation = (e) => {\n    let data = {\n        methodname: 'core_course_toggle_activity_recommendation',\n        args: {\n            area: e.currentTarget.dataset.area,\n            id: e.currentTarget.dataset.id\n        }\n    };\n    Ajax.call([data])[0].fail(Notification.exception);\n};\n\n/**\n * Initialisation function\n *\n * @return {void}\n */\nexport const init = () => {\n    const checkboxelements = document.querySelectorAll(\"[data-area]\");\n    checkboxelements.forEach((checkbox) => {\n        checkbox.addEventListener('change', toggleRecommendation);\n    });\n};\n"],"file":"recommendations.min.js"}