diff --git a/amd/build/enrolments.min.js b/amd/build/enrolments.min.js index 61884cf..be20928 100644 --- a/amd/build/enrolments.min.js +++ b/amd/build/enrolments.min.js @@ -1,3 +1,3 @@ -define("local_solent/enrolments",["exports","core/notification"],(function(_exports,_notification){var obj;Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.deleteContent=void 0,_notification=(obj=_notification)&&obj.__esModule?obj:{default:obj};_exports.deleteContent=()=>{const main=document.querySelector('body.courserole-none div[role="main"]');main&&(main.querySelector(".onetopic-tab-body").innerHTML="",_notification.default.addNotification({message:M.util.get_string("noroleerror","local_solent"),closebutton:!1,type:"error"}))}})); +define("local_solent/enrolments",["exports","core/notification"],(function(_exports,_notification){var obj;Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.deleteContent=void 0,_notification=(obj=_notification)&&obj.__esModule?obj:{default:obj};_exports.deleteContent=()=>{const main=document.querySelector('body.courserole-none div[role="main"]');main&&(main.querySelector(".course-content").innerHTML="",_notification.default.addNotification({message:M.util.get_string("noroleerror","local_solent"),closebutton:!1,type:"error"}))}})); //# sourceMappingURL=enrolments.min.js.map \ No newline at end of file diff --git a/amd/build/enrolments.min.js.map b/amd/build/enrolments.min.js.map index 7604341..20bdd57 100644 --- a/amd/build/enrolments.min.js.map +++ b/amd/build/enrolments.min.js.map @@ -1 +1 @@ -{"version":3,"file":"enrolments.min.js","sources":["../src/enrolments.js"],"sourcesContent":["import Notification from 'core/notification';\n\n/**\n * Delete course content if the current user has no role.\n */\nexport const deleteContent = () => {\n const main = document.querySelector('body.courserole-none div[role=\"main\"]');\n if (main) {\n main.querySelector('.onetopic-tab-body').innerHTML = '';\n Notification.addNotification({\n message: M.util.get_string('noroleerror', 'local_solent'),\n closebutton: false,\n type: 'error'\n });\n }\n};"],"names":["main","document","querySelector","innerHTML","addNotification","message","M","util","get_string","closebutton","type"],"mappings":"4RAK6B,WACnBA,KAAOC,SAASC,cAAc,yCAChCF,OACAA,KAAKE,cAAc,sBAAsBC,UAAY,yBACxCC,gBAAgB,CACzBC,QAASC,EAAEC,KAAKC,WAAW,cAAe,gBAC1CC,aAAa,EACbC,KAAM"} \ No newline at end of file +{"version":3,"file":"enrolments.min.js","sources":["../src/enrolments.js"],"sourcesContent":["import Notification from 'core/notification';\n\n/**\n * Delete course content if the current user has no role.\n */\nexport const deleteContent = () => {\n const main = document.querySelector('body.courserole-none div[role=\"main\"]');\n if (main) {\n main.querySelector('.course-content').innerHTML = '';\n Notification.addNotification({\n message: M.util.get_string('noroleerror', 'local_solent'),\n closebutton: false,\n type: 'error'\n });\n }\n};"],"names":["main","document","querySelector","innerHTML","addNotification","message","M","util","get_string","closebutton","type"],"mappings":"4RAK6B,WACnBA,KAAOC,SAASC,cAAc,yCAChCF,OACAA,KAAKE,cAAc,mBAAmBC,UAAY,yBACrCC,gBAAgB,CACzBC,QAASC,EAAEC,KAAKC,WAAW,cAAe,gBAC1CC,aAAa,EACbC,KAAM"} \ No newline at end of file diff --git a/amd/src/enrolments.js b/amd/src/enrolments.js index 1798c22..22d9d45 100644 --- a/amd/src/enrolments.js +++ b/amd/src/enrolments.js @@ -6,7 +6,7 @@ import Notification from 'core/notification'; export const deleteContent = () => { const main = document.querySelector('body.courserole-none div[role="main"]'); if (main) { - main.querySelector('.onetopic-tab-body').innerHTML = ''; + main.querySelector('.course-content').innerHTML = ''; Notification.addNotification({ message: M.util.get_string('noroleerror', 'local_solent'), closebutton: false,