From 947bb7574e808cd7b8f34706d8a317d63ea76c71 Mon Sep 17 00:00:00 2001 From: Alexander Bias <bias@alexanderbias.de> Date: Wed, 22 Dec 2021 21:34:32 +0100 Subject: [PATCH] Fix JSDoc flaw which used the @Package tag in the wrong way --- amd/build/backtotop.min.js.map | 2 +- amd/build/catchshortcuts.min.js.map | 2 +- amd/build/incoursesettings.min.js.map | 2 +- amd/build/infobanner.min.js.map | 2 +- amd/src/backtotop.js | 2 +- amd/src/catchshortcuts.js | 2 +- amd/src/incoursesettings.js | 2 +- amd/src/infobanner.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/amd/build/backtotop.min.js.map b/amd/build/backtotop.min.js.map index 178e0f9..186a139 100644 --- a/amd/build/backtotop.min.js.map +++ b/amd/build/backtotop.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/backtotop.js"],"names":["define","$","str","Notification","initBackToTop","stringsPromise","get_string","when","then","string","after","window","scroll","document","scrollTop","fadeIn","fadeOut","click","event","preventDefault","animate","fail","exception","init"],"mappings":"AAuBAA,OAAM,gCAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,mBAAvB,CAAD,CAA8C,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA+B,CAC/E,aAKA,QAASC,CAAAA,CAAT,EAAyB,CAErB,GAAIC,CAAAA,CAAc,CAAGH,CAAG,CAACI,UAAJ,CAAe,WAAf,CAA4B,oBAA5B,CAArB,CAGAL,CAAC,CAACM,IAAF,CAAOF,CAAP,EAAuBG,IAAvB,CAA4B,SAASC,CAAT,CAAiB,CAEzCR,CAAC,CAAC,cAAD,CAAD,CAAkBS,KAAlB,CAAwB,mFACcD,CADd,CACuB,SAD/C,EAKAR,CAAC,CAACU,MAAD,CAAD,CAAUC,MAAV,CAAiB,UAAW,CACxB,GAA8B,GAA1B,CAAAX,CAAC,CAACY,QAAD,CAAD,CAAYC,SAAZ,EAAJ,CAAmC,CAC/Bb,CAAC,CAAC,cAAD,CAAD,CAAkBc,MAAlB,CAAyB,GAAzB,CACH,CAFD,IAEO,CACHd,CAAC,CAAC,cAAD,CAAD,CAAkBe,OAAlB,CAA0B,GAA1B,CACH,CACJ,CAND,EASAf,CAAC,CAAC,cAAD,CAAD,CAAkBgB,KAAlB,CAAwB,SAASC,CAAT,CAAgB,CACpCA,CAAK,CAACC,cAAN,GACAlB,CAAC,CAAC,YAAD,CAAD,CAAgBmB,OAAhB,CAAwB,CAACN,SAAS,CAAE,CAAZ,CAAxB,CAAwC,GAAxC,CACH,CAHD,EAKA,QACH,CAtBD,EAsBGO,IAtBH,CAsBQlB,CAAY,CAACmB,SAtBrB,CAuBH,CAED,MAAO,CACHC,IAAI,CAAE,eAAW,CACbnB,CAAa,EAChB,CAHE,CAKV,CAzCK,CAAN","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 * Theme Boost Campus - JS code back to top button\n *\n * @package theme_boost_campus\n * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/str', 'core/notification'], function($, str, Notification) {\n \"use strict\";\n\n /**\n * Initialising.\n */\n function initBackToTop() {\n // Get the string backtotop from language file.\n var stringsPromise = str.get_string('backtotop', 'theme_boost_campus');\n\n // Add backtotop button to DOM and add scroll and click handlers.\n $.when(stringsPromise).then(function(string) {\n // Add a fontawesome icon after the footer as the back to top button.\n $('#page-footer').after('<i class=\"fa fa-chevron-up fa-2x d-print-none\"' +\n 'id=\"back-to-top\" aria-label=\"' + string + '\"></i>');\n\n // This function fades the button in when the page is scrolled down or fades it out\n // if the user is at the top of the page.\n $(window).scroll(function() {\n if ($(document).scrollTop() > 220) {\n $('#back-to-top').fadeIn(300);\n } else {\n $('#back-to-top').fadeOut(100);\n }\n });\n\n // This function scrolls the page to top with a duration of 500ms.\n $('#back-to-top').click(function(event) {\n event.preventDefault();\n $('html, body').animate({scrollTop: 0}, 500);\n });\n\n return true;\n }).fail(Notification.exception);\n }\n\n return {\n init: function() {\n initBackToTop();\n }\n };\n});\n"],"file":"backtotop.min.js"} \ No newline at end of file +{"version":3,"sources":["../src/backtotop.js"],"names":["define","$","str","Notification","initBackToTop","stringsPromise","get_string","when","then","string","after","window","scroll","document","scrollTop","fadeIn","fadeOut","click","event","preventDefault","animate","fail","exception","init"],"mappings":"AAuBAA,OAAM,gCAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,mBAAvB,CAAD,CAA8C,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA+B,CAC/E,aAKA,QAASC,CAAAA,CAAT,EAAyB,CAErB,GAAIC,CAAAA,CAAc,CAAGH,CAAG,CAACI,UAAJ,CAAe,WAAf,CAA4B,oBAA5B,CAArB,CAGAL,CAAC,CAACM,IAAF,CAAOF,CAAP,EAAuBG,IAAvB,CAA4B,SAASC,CAAT,CAAiB,CAEzCR,CAAC,CAAC,cAAD,CAAD,CAAkBS,KAAlB,CAAwB,mFACcD,CADd,CACuB,SAD/C,EAKAR,CAAC,CAACU,MAAD,CAAD,CAAUC,MAAV,CAAiB,UAAW,CACxB,GAA8B,GAA1B,CAAAX,CAAC,CAACY,QAAD,CAAD,CAAYC,SAAZ,EAAJ,CAAmC,CAC/Bb,CAAC,CAAC,cAAD,CAAD,CAAkBc,MAAlB,CAAyB,GAAzB,CACH,CAFD,IAEO,CACHd,CAAC,CAAC,cAAD,CAAD,CAAkBe,OAAlB,CAA0B,GAA1B,CACH,CACJ,CAND,EASAf,CAAC,CAAC,cAAD,CAAD,CAAkBgB,KAAlB,CAAwB,SAASC,CAAT,CAAgB,CACpCA,CAAK,CAACC,cAAN,GACAlB,CAAC,CAAC,YAAD,CAAD,CAAgBmB,OAAhB,CAAwB,CAACN,SAAS,CAAE,CAAZ,CAAxB,CAAwC,GAAxC,CACH,CAHD,EAKA,QACH,CAtBD,EAsBGO,IAtBH,CAsBQlB,CAAY,CAACmB,SAtBrB,CAuBH,CAED,MAAO,CACHC,IAAI,CAAE,eAAW,CACbnB,CAAa,EAChB,CAHE,CAKV,CAzCK,CAAN","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 * Theme Boost Campus - JS code back to top button\n *\n * @module theme_boost_campus/backtotop\n * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/str', 'core/notification'], function($, str, Notification) {\n \"use strict\";\n\n /**\n * Initialising.\n */\n function initBackToTop() {\n // Get the string backtotop from language file.\n var stringsPromise = str.get_string('backtotop', 'theme_boost_campus');\n\n // Add backtotop button to DOM and add scroll and click handlers.\n $.when(stringsPromise).then(function(string) {\n // Add a fontawesome icon after the footer as the back to top button.\n $('#page-footer').after('<i class=\"fa fa-chevron-up fa-2x d-print-none\"' +\n 'id=\"back-to-top\" aria-label=\"' + string + '\"></i>');\n\n // This function fades the button in when the page is scrolled down or fades it out\n // if the user is at the top of the page.\n $(window).scroll(function() {\n if ($(document).scrollTop() > 220) {\n $('#back-to-top').fadeIn(300);\n } else {\n $('#back-to-top').fadeOut(100);\n }\n });\n\n // This function scrolls the page to top with a duration of 500ms.\n $('#back-to-top').click(function(event) {\n event.preventDefault();\n $('html, body').animate({scrollTop: 0}, 500);\n });\n\n return true;\n }).fail(Notification.exception);\n }\n\n return {\n init: function() {\n initBackToTop();\n }\n };\n});\n"],"file":"backtotop.min.js"} \ No newline at end of file diff --git a/amd/build/catchshortcuts.min.js.map b/amd/build/catchshortcuts.min.js.map index a2d35a2..6bb0e10 100644 --- a/amd/build/catchshortcuts.min.js.map +++ b/amd/build/catchshortcuts.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/catchshortcuts.js"],"names":["define","$","initcatchshortcuts","value","document","keydown","e","keyCode","checkForActiveFormElement","scrollToBottomOfCourse","navigator","appVersion","indexOf","metaKey","ctrlKey","event","preventDefault","animate","scrollTop","offset","top","window","height","activeElement","returnvalue","tagName","isContentEditable","init","params","i","len","length"],"mappings":"AAuBAA,OAAM,qCAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAC3B,aAOA,QAASC,CAAAA,CAAT,CAA4BC,CAA5B,CAAmC,CAC/B,GAAa,KAAT,EAAAA,CAAJ,CAAoB,CAEhBF,CAAC,CAACG,QAAD,CAAD,CAAYC,OAAZ,CAAoB,SAASC,CAAT,CAAY,CAC5B,GAAiB,EAAb,EAAAA,CAAC,CAACC,OAAN,CAAqB,CAEjB,GAAI,IAAAC,CAAyB,EAA7B,CAAyC,CAErCC,CAAsB,CAACH,CAAD,CACzB,CACJ,CACJ,CARD,CASH,CAED,GAA2C,CAAC,CAAxC,EAAAI,SAAS,CAACC,UAAV,CAAqBC,OAArB,CAA6B,KAA7B,GAAsD,cAAT,EAAAT,CAAjD,CAA0E,CAEtEF,CAAC,CAACG,QAAD,CAAD,CAAYC,OAAZ,CAAoB,SAASC,CAAT,CAAY,CAC5B,GAAiB,EAAb,EAAAA,CAA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qCF,CAAC,CAAGC,CAAzC,CAA8CD,CAAC,EAA/C,CAAmD,CAC/C3B,CAAkB,CAAC0B,CAAM,CAACC,CAAD,CAAP,CACrB,CACJ,CALE,CAOV,CAtFK,CAAN","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 * Theme Boost Campus - JS code for catching pressed keys.\n *\n * @package theme_boost_campus\n * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery'], function($) {\n \"use strict\";\n\n /**\n * Initialising.\n *\n * @param {string} value\n */\n function initcatchshortcuts(value) {\n if (value == 'end') {\n // Catch the end key to be able to change the behavior.\n $(document).keydown(function(e) {\n if (e.keyCode == 35) {\n // Additionally check no active focus in form elements.\n if (checkForActiveFormElement() != true) {\n // Scroll only to the bottom of the course content.\n scrollToBottomOfCourse(e);\n }\n }\n });\n }\n // This shortcut is only relevant for users operating on MacOS.\n if (navigator.appVersion.indexOf(\"Mac\") != -1 && value == 'cmdarrowdown') {\n // Bind the cmd + arrow down shortcut to be able to change the behavior.\n $(document).keydown(function(e) {\n if (e.keyCode == 40 && e.metaKey) {\n // Additionally check no active focus in form elements.\n if (checkForActiveFormElement() != true) {\n // Scroll only to the bottom of the course content.\n scrollToBottomOfCourse(e);\n }\n }\n });\n }\n // This shortcut is only relevant for users operating on Windows.\n if (navigator.appVersion.indexOf(\"Win\") != -1 && value == 'ctrlarrowdown') {\n // Bind the ctrl + arrow down shortcut to be able to change the behavior.\n $(document).keydown(function(e) {\n if (e.keyCode == 40 && e.ctrlKey) {\n // Additionally check no active focus in form elements.\n if (checkForActiveFormElement() != true) {\n // Scroll only to the bottom of the course content.\n scrollToBottomOfCourse(e);\n }\n }\n });\n }\n }\n\n /**\n * Function to scroll only to the bottom of the course and not the bottom of the whole page.\n *\n * @param {object} event\n */\n function scrollToBottomOfCourse(event) {\n // Prevent default behavior.\n event.preventDefault();\n // Scroll only to the bottom of the course content.\n $('html, body').animate({\n scrollTop: $('#page-footer').offset().top - $(window).height() + 50\n }, 500);\n }\n\n /**\n * Function to check for an active form element.\n *\n * @return {boolean}\n */\n function checkForActiveFormElement() {\n // Get the active Element for the current page.\n var activeElement = document.activeElement;\n var returnvalue = false;\n // Check if the given active element is type of input field, textarea or editable content.\n if (activeElement.tagName == 'INPUT' || activeElement.tagName == 'TEXTAREA' || activeElement.isContentEditable == true) {\n returnvalue = true;\n }\n return returnvalue;\n }\n\n return {\n init: function(params) {\n for (var i = 0, len = params.length; i < len; i++) {\n initcatchshortcuts(params[i]);\n }\n }\n };\n});\n"],"file":"catchshortcuts.min.js"} \ No newline at end of file +{"version":3,"sources":["../src/catchshortcuts.js"],"names":["define","$","initcatchshortcuts","value","document","keydown","e","keyCode","checkForActiveFormElement","scrollToBottomOfCourse","navigator","appVersion","indexOf","metaKey","ctrlKey","event","preventDefault","animate","scrollTop","offset","top","window","height","activeElement","returnvalue","tagName","isContentEditable","init","params","i","len","length"],"mappings":"AAuBAA,OAAM,qCAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAC3B,aAOA,QAASC,CAAAA,CAAT,CAA4BC,CAA5B,CAAmC,CAC/B,GAAa,KAAT,EAAAA,CAAJ,CAAoB,CAEhBF,CAAC,CAACG,QAAD,CAAD,CAAYC,OAAZ,CAAoB,SAASC,CAAT,CAAY,CAC5B,GAAiB,EAAb,EAAAA,CAAC,CAACC,OAAN,CAAqB,CAEjB,GAAI,IAA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6B,OAAzB,EAAAD,CAAa,CAACE,OAAd,EAA6D,UAAzB,EAAAF,CAAa,CAACE,OAAlD,EAA2E,IAAAF,CAAa,CAACG,iBAA7F,CAAwH,CACpHF,CAAW,GACd,CACD,MAAOA,CAAAA,CACV,CAED,MAAO,CACHG,IAAI,CAAE,cAASC,CAAT,CAAiB,CACnB,IAAK,GAAIC,CAAAA,CAAC,CAAG,CAAR,CAAWC,CAAG,CAAGF,CAAM,CAACG,MAA7B,CAAqCF,CAAC,CAAGC,CAAzC,CAA8CD,CAAC,EAA/C,CAAmD,CAC/C3B,CAAkB,CAAC0B,CAAM,CAACC,CAAD,CAAP,CACrB,CACJ,CALE,CAOV,CAtFK,CAAN","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 * Theme Boost Campus - JS code for catching pressed keys.\n *\n * @module theme_boost_campus/catchshortcuts\n * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery'], function($) {\n \"use strict\";\n\n /**\n * Initialising.\n *\n * @param {string} value\n */\n function initcatchshortcuts(value) {\n if (value == 'end') {\n // Catch the end key to be able to change the behavior.\n $(document).keydown(function(e) {\n if (e.keyCode == 35) {\n // Additionally check no active focus in form elements.\n if (checkForActiveFormElement() != true) {\n // Scroll only to the bottom of the course content.\n scrollToBottomOfCourse(e);\n }\n }\n });\n }\n // This shortcut is only relevant for users operating on MacOS.\n if (navigator.appVersion.indexOf(\"Mac\") != -1 && value == 'cmdarrowdown') {\n // Bind the cmd + arrow down shortcut to be able to change the behavior.\n $(document).keydown(function(e) {\n if (e.keyCode == 40 && e.metaKey) {\n // Additionally check no active focus in form elements.\n if (checkForActiveFormElement() != true) {\n // Scroll only to the bottom of the course content.\n scrollToBottomOfCourse(e);\n }\n }\n });\n }\n // This shortcut is only relevant for users operating on Windows.\n if (navigator.appVersion.indexOf(\"Win\") != -1 && value == 'ctrlarrowdown') {\n // Bind the ctrl + arrow down shortcut to be able to change the behavior.\n $(document).keydown(function(e) {\n if (e.keyCode == 40 && e.ctrlKey) {\n // Additionally check no active focus in form elements.\n if (checkForActiveFormElement() != true) {\n // Scroll only to the bottom of the course content.\n scrollToBottomOfCourse(e);\n }\n }\n });\n }\n }\n\n /**\n * Function to scroll only to the bottom of the course and not the bottom of the whole page.\n *\n * @param {object} event\n */\n function scrollToBottomOfCourse(event) {\n // Prevent default behavior.\n event.preventDefault();\n // Scroll only to the bottom of the course content.\n $('html, body').animate({\n scrollTop: $('#page-footer').offset().top - $(window).height() + 50\n }, 500);\n }\n\n /**\n * Function to check for an active form element.\n *\n * @return {boolean}\n */\n function checkForActiveFormElement() {\n // Get the active Element for the current page.\n var activeElement = document.activeElement;\n var returnvalue = false;\n // Check if the given active element is type of input field, textarea or editable content.\n if (activeElement.tagName == 'INPUT' || activeElement.tagName == 'TEXTAREA' || activeElement.isContentEditable == true) {\n returnvalue = true;\n }\n return returnvalue;\n }\n\n return {\n init: function(params) {\n for (var i = 0, len = params.length; i < len; i++) {\n initcatchshortcuts(params[i]);\n }\n }\n };\n});\n"],"file":"catchshortcuts.min.js"} \ No newline at end of file diff --git a/amd/build/incoursesettings.min.js.map b/amd/build/incoursesettings.min.js.map index 08fc77d..d667d6b 100644 --- a/amd/build/incoursesettings.min.js.map +++ b/amd/build/incoursesettings.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/incoursesettings.js"],"names":["define","$","initInCourseSettings","frontpage","hasClass","courseSettings","activitySettings","headerCardBorderBottom","css","courseSettingsDropdownToggle","activitySettingsDropdownToggle","removeAttr","attr","on","event","stopPropagation","is","hide","setTimeout","addClass","show","removeClass","init"],"mappings":"AAuBAA,OAAM,uCAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAC3B,aAKA,QAASC,CAAAA,CAAT,EAAgC,CAC5B,GAAIC,CAAAA,CAAS,CAAGF,CAAC,CAAC,MAAD,CAAD,CAAUG,QAAV,CAAmB,sBAAnB,CAAhB,CAIA,GAAI,CAACD,CAAL,CAAgB,IAERE,CAAAA,CAAc,CAAGJ,CAAC,CAAC,+BAAD,CAFV,CAGRK,CAAgB,CAAGL,CAAC,CAAC,iCAAD,CAHZ,CAIRM,CAAsB,CAAGN,CAAC,CAAC,oBAAD,CAAD,CAAwBO,GAAxB,CAA4B,eAA5B,CAJjB,CAKRC,CAA4B,CAAGR,CAAC,CAAC,6DAAD,CALxB,CAMRS,CAA8B,CAAGT,CAAC,CAAC,0DAAD,CAN1B,CAUZQ,CAA4B,CAACE,UAA7B,CAAwC,eAAxC,EAAyDC,IAAzD,CAA8D,eAA9D,CAA+E,8BAA/E,EAIAF,CAA8B,CAACC,UAA/B,CAA0C,eAA1C,EAA2DC,IAA3D,CAAgE,eAAhE,CAAiF,gCAAjF,EAEAH,CAA4B,CAACI,EAA7B,CAAgC,OAAhC,CAAyC,SAASC,CAAT,CAAgB,CACrDA,CAAK,CAACC,eAAN,GACA,GAAIV,CAAc,CAACW,EAAf,CAAkB,UAAlB,CAAJ,CAAmC,CAC/BX,CAAc,CAACY,IAAf,CAAoB,GAApB,EACAR,CAA4B,CAACG,IAA7B,CAAkC,eAAlC,CAAmD,OAAnD,EACAM,UAAU,CAAC,UAAW,CAClBjB,CAAC,CAAC,oBAAD,CAAD,CAAwBO,GAAxB,CAA4B,eAA5B,CAA6CD,CAA7C,EACAN,CAAC,CAAC,oBAAD,CAAD,CAAwBkB,QAAxB,CAAiC,MAAjC,CACH,CAHS,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BH,CACJ,CAED,MAAO,CACHU,IAAI,CAAE,eAAW,CACbpB,CAAoB,EACvB,CAHE,CAKV,CA5EK,CAAN","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 * Theme Boost Campus - JS code for displaying course setting within the course.\n *\n * @package theme_boost_campus\n * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery'], function($) {\n \"use strict\";\n\n /**\n * Initialising.\n */\n function initInCourseSettings() {\n var frontpage = $('body').hasClass('pagelayout-frontpage');\n\n // Only change the behaviour if the setting is enabled and we are not on the frontpage,\n // because we did not change the settings menu there. So we need the default propagation here.\n if (!frontpage) {\n\n var courseSettings = $('#boost-campus-course-settings');\n var activitySettings = $('#boost-campus-activity-settings');\n var headerCardBorderBottom = $('#page-header .card').css(\"border-bottom\");\n var courseSettingsDropdownToggle = $('#page-header .context-header-settings-menu .dropdown-toggle');\n var activitySettingsDropdownToggle = $('#region-main-settings-menu .action-menu .dropdown-toggle');\n\n // Remove attribute aria-haspopup because we are replacing this with the in-course course settings and\n // set the new in-course course settings for the aria-controls attribute\n courseSettingsDropdownToggle.removeAttr('aria-haspopup').attr('aria-controls', 'boost-campus-course-settings');\n\n // Remove attribute aria-haspopup because we are replacing this with the in-course activity settings\n // set the new in-course activity settings for the aria-controls attribute\n activitySettingsDropdownToggle.removeAttr('aria-haspopup').attr('aria-controls', 'boost-campus-activity-settings');\n\n courseSettingsDropdownToggle.on('click', function(event) {\n event.stopPropagation();\n if (courseSettings.is(\":visible\")) {\n courseSettings.hide(400);\n courseSettingsDropdownToggle.attr('aria-expanded', 'false');\n setTimeout(function() {\n $('#page-header .card').css('border-bottom', headerCardBorderBottom);\n $('#page-header > div').addClass('pb-3');\n }, 300);\n } else {\n courseSettings.show(400);\n $('#page-header div').removeClass('pb-3');\n $('#page-header .card').css('border-bottom', 'none');\n courseSettings.css('border-top', 'none');\n courseSettingsDropdownToggle.attr('aria-expanded', 'true');\n // Additionally close activity settings if they are currently open.\n if (activitySettings.is(\":visible\")) {\n activitySettings.hide(400);\n activitySettingsDropdownToggle.attr('aria-expanded', 'false');\n }\n }\n });\n activitySettingsDropdownToggle.on('click', function(event) {\n event.stopPropagation();\n if (activitySettings.is(\":visible\")) {\n activitySettings.hide(400);\n activitySettingsDropdownToggle.attr('aria-expanded', 'false');\n } else {\n activitySettings.show(400);\n activitySettingsDropdownToggle.attr('aria-expanded', 'true');\n setTimeout(function() {\n $('#page-header .card').css('border-bottom', headerCardBorderBottom);\n $('#page-header > div').addClass('pb-3');\n }, 300);\n // Additionally close course settings if they are currently open.\n if (courseSettings.is(\":visible\")) {\n courseSettings.hide(400);\n courseSettingsDropdownToggle.attr('aria-expanded', 'false');\n }\n }\n });\n }\n }\n\n return {\n init: function() {\n initInCourseSettings();\n }\n };\n});\n"],"file":"incoursesettings.min.js"} \ No newline at end of file +{"version":3,"sources":["../src/incoursesettings.js"],"names":["define","$","initInCourseSettings","frontpage","hasClass","courseSettings","activitySettings","headerCardBorderBottom","css","courseSettingsDropdownToggle","activitySettingsDropdownToggle","removeAttr","attr","on","event","stopPropagation","is","hide","setTimeout","addClass","show","removeClass","init"],"mappings":"AAuBAA,OAAM,uCAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAC3B,aAKA,QAASC,CAAAA,CAAT,EAAgC,CAC5B,GAAIC,CAAAA,CAAS,CAAGF,CAAC,CAAC,MAAD,CAAD,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7B,CAAkC,eAAlC,CAAmD,MAAnD,EAEA,GAAIN,CAAgB,CAACU,EAAjB,CAAoB,UAApB,CAAJ,CAAqC,CACjCV,CAAgB,CAACW,IAAjB,CAAsB,GAAtB,EACAP,CAA8B,CAACE,IAA/B,CAAoC,eAApC,CAAqD,OAArD,CACH,CACJ,CACJ,CArBD,EAsBAF,CAA8B,CAACG,EAA/B,CAAkC,OAAlC,CAA2C,SAASC,CAAT,CAAgB,CACvDA,CAAK,CAACC,eAAN,GACA,GAAIT,CAAgB,CAACU,EAAjB,CAAoB,UAApB,CAAJ,CAAqC,CACjCV,CAAgB,CAACW,IAAjB,CAAsB,GAAtB,EACAP,CAA8B,CAACE,IAA/B,CAAoC,eAApC,CAAqD,OAArD,CACH,CAHD,IAGO,CACHN,CAAgB,CAACc,IAAjB,CAAsB,GAAtB,EACAV,CAA8B,CAACE,IAA/B,CAAoC,eAApC,CAAqD,MAArD,EACAM,UAAU,CAAC,UAAW,CAClBjB,CAAC,CAAC,oBAAD,CAAD,CAAwBO,GAAxB,CAA4B,eAA5B,CAA6CD,CAA7C,EACAN,CAAC,CAAC,oBAAD,CAAD,CAAwBkB,QAAxB,CAAiC,MAAjC,CACH,CAHS,CAGP,GAHO,CAAV,CAKA,GAAId,CAAc,CAACW,EAAf,CAAkB,UAAlB,CAAJ,CAAmC,CAC/BX,CAAc,CAACY,IAAf,CAAoB,GAApB,EACAR,CAA4B,CAACG,IAA7B,CAAkC,eAAlC,CAAmD,OAAnD,CACH,CACJ,CACJ,CAlBD,CAmBH,CACJ,CAED,MAAO,CACHU,IAAI,CAAE,eAAW,CACbpB,CAAoB,EACvB,CAHE,CAKV,CA5EK,CAAN","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 * Theme Boost Campus - JS code for displaying course setting within the course.\n *\n * @module theme_boost_campus/incoursesettings\n * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery'], function($) {\n \"use strict\";\n\n /**\n * Initialising.\n */\n function initInCourseSettings() {\n var frontpage = $('body').hasClass('pagelayout-frontpage');\n\n // Only change the behaviour if the setting is enabled and we are not on the frontpage,\n // because we did not change the settings menu there. So we need the default propagation here.\n if (!frontpage) {\n\n var courseSettings = $('#boost-campus-course-settings');\n var activitySettings = $('#boost-campus-activity-settings');\n var headerCardBorderBottom = $('#page-header .card').css(\"border-bottom\");\n var courseSettingsDropdownToggle = $('#page-header .context-header-settings-menu .dropdown-toggle');\n var activitySettingsDropdownToggle = $('#region-main-settings-menu .action-menu .dropdown-toggle');\n\n // Remove attribute aria-haspopup because we are replacing this with the in-course course settings and\n // set the new in-course course settings for the aria-controls attribute\n courseSettingsDropdownToggle.removeAttr('aria-haspopup').attr('aria-controls', 'boost-campus-course-settings');\n\n // Remove attribute aria-haspopup because we are replacing this with the in-course activity settings\n // set the new in-course activity settings for the aria-controls attribute\n activitySettingsDropdownToggle.removeAttr('aria-haspopup').attr('aria-controls', 'boost-campus-activity-settings');\n\n courseSettingsDropdownToggle.on('click', function(event) {\n event.stopPropagation();\n if (courseSettings.is(\":visible\")) {\n courseSettings.hide(400);\n courseSettingsDropdownToggle.attr('aria-expanded', 'false');\n setTimeout(function() {\n $('#page-header .card').css('border-bottom', headerCardBorderBottom);\n $('#page-header > div').addClass('pb-3');\n }, 300);\n } else {\n courseSettings.show(400);\n $('#page-header div').removeClass('pb-3');\n $('#page-header .card').css('border-bottom', 'none');\n courseSettings.css('border-top', 'none');\n courseSettingsDropdownToggle.attr('aria-expanded', 'true');\n // Additionally close activity settings if they are currently open.\n if (activitySettings.is(\":visible\")) {\n activitySettings.hide(400);\n activitySettingsDropdownToggle.attr('aria-expanded', 'false');\n }\n }\n });\n activitySettingsDropdownToggle.on('click', function(event) {\n event.stopPropagation();\n if (activitySettings.is(\":visible\")) {\n activitySettings.hide(400);\n activitySettingsDropdownToggle.attr('aria-expanded', 'false');\n } else {\n activitySettings.show(400);\n activitySettingsDropdownToggle.attr('aria-expanded', 'true');\n setTimeout(function() {\n $('#page-header .card').css('border-bottom', headerCardBorderBottom);\n $('#page-header > div').addClass('pb-3');\n }, 300);\n // Additionally close course settings if they are currently open.\n if (courseSettings.is(\":visible\")) {\n courseSettings.hide(400);\n courseSettingsDropdownToggle.attr('aria-expanded', 'false');\n }\n }\n });\n }\n }\n\n return {\n init: function() {\n initInCourseSettings();\n }\n };\n});\n"],"file":"incoursesettings.min.js"} \ No newline at end of file diff --git a/amd/build/infobanner.min.js.map b/amd/build/infobanner.min.js.map index df58802..cc429dc 100644 --- a/amd/build/infobanner.min.js.map +++ b/amd/build/infobanner.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/infobanner.js"],"names":["define","$","str","ModalFactory","ModalEvents","Notification","initInfoBanner","showconfirmationdialogue","stringsPromise","get_strings","key","component","modalPromise","create","type","types","SAVE_CANCEL","click","event","stopPropagation","when","then","strings","modal","setTitle","setBody","setSaveButtonText","getRoot","on","save","M","util","set_user_preference","alert","show","fail","exception","init"],"mappings":"AAuBAA,OAAM,iCAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,oBAAvB,CAA6C,mBAA7C,CAAkE,mBAAlE,CAAD,CACF,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA+BC,CAA/B,CAA4CC,CAA5C,CAA0D,CAC1D,aAOA,QAASC,CAAAA,CAAT,CAAwBC,CAAxB,CAAkD,IAgB1CC,CAAAA,CAAc,CAAGN,CAAG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CACJ,CAvBD,CAwBH,CAED,MAAO,CACHI,IAAI,CAAE,cAAS9B,CAAT,CAAmC,CACrCD,CAAc,CAACC,CAAD,CACjB,CAHE,CAKV,CA5DK,CAAN","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 * Theme Boost Campus - JS code for feature information banner\n *\n * @package theme_boost_campus\n * @copyright 2020 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/str', 'core/modal_factory', 'core/modal_events', 'core/notification'],\n function($, str, ModalFactory, ModalEvents, Notification) {\n \"use strict\";\n\n /**\n * Initialising.\n *\n * @param {string} showconfirmationdialogue\n */\n function initInfoBanner(showconfirmationdialogue) {\n\n var stringsforInfoBannerJS = [\n {\n key: 'confirmation',\n component: 'theme_boost_campus'\n }, {\n key: 'closingperpetualinfobanner',\n component: 'theme_boost_campus'\n }, {\n key: 'yes_close',\n component: 'theme_boost_campus'\n }\n ];\n\n // Load the strings and modal before clicking on the button so that the confirmation dialogue can pop up faster.\n var stringsPromise = str.get_strings(stringsforInfoBannerJS);\n var modalPromise = ModalFactory.create({type: ModalFactory.types.SAVE_CANCEL});\n\n // With this we store the dismissing of the info banner as a user preference to persist this decision.\n $('#themeboostcampusperpinfobanner .close').click(function(event) {\n // Stop propagation to keep the info banner there until the decision in the confirmation dialogue has been made.\n event.stopPropagation();\n\n if (showconfirmationdialogue == '1') {\n $.when(stringsPromise, modalPromise).then(function(strings, modal) {\n modal.setTitle(strings[0]);\n modal.setBody(strings[1]);\n modal.setSaveButtonText(strings[2]);\n // Saved clicked - the dismissing of the info banner is confirmed.\n modal.getRoot().on(ModalEvents.save, function() {\n M.util.set_user_preference('theme_boost_campus_infobanner_dismissed', true);\n // Now close the alert.\n $('#themeboostcampusperpinfobanner').alert('close');\n });\n modal.show();\n return modal;\n }).fail(Notification.exception);\n } else {\n M.util.set_user_preference('theme_boost_campus_infobanner_dismissed', true);\n // Now close the alert.\n $('#themeboostcampusperpinfobanner').alert('close');\n }\n });\n }\n\n return {\n init: function(showconfirmationdialogue) {\n initInfoBanner(showconfirmationdialogue);\n }\n };\n});\n"],"file":"infobanner.min.js"} \ No newline at end of file +{"version":3,"sources":["../src/infobanner.js"],"names":["define","$","str","ModalFactory","ModalEvents","Notification","initInfoBanner","showconfirmationdialogue","stringsPromise","get_strings","key","component","modalPromise","create","type","types","SAVE_CANCEL","click","event","stopPropagation","when","then","strings","modal","setTitle","setBody","setSaveButtonText","getRoot","on","save","M","util","set_user_preference","alert","show","fail","exception","init"],"mappings":"AAuBAA,OAAM,iCAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,oBAAvB,CAA6C,mBAA7C,CAAkE,mBAAlE,CAAD,CACF,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA+BC,CAA/B,CAA4CC,CAA5C,CAA0D,CAC1D,aAOA,QAASC,CAAAA,CAAT,CAAwBC,CAAxB,CAAkD,IAgB1CC,CAAAA,CAAc,CAAGN,CAAG,CAACO,WAAJ,CAdQ,CACzB,CACIC,GAAG,CAAE,cADT,CAEIC,SAAS,CAAE,oBAFf,CADyB,CAItB,CACCD,GAAG,CAAE,4BADN,CAECC,SAAS,CAAE,oBAFZ,CAJsB,CAOtB,CACCD,GAAG,CAAE,WADN,CAECC,SAAS,CAAE,oBAFZ,CAPsB,CAcR,CAhByB,CAiB1CC,CAAY,CAAGT,CAAY,CAACU,MAAb,CAAoB,CAACC,IAAI,CAAEX,CAAY,CAACY,KAAb,CAAmBC,WAA1B,CAApB,CAjB2B,CAoB9Cf,CAAC,CAAC,wCAAD,CAAD,CAA4CgB,KAA5C,CAAkD,SAASC,CAAT,CAAgB,CAE9DA,CAAK,CAACC,eAAN,GAEA,GAAgC,GAA5B,EAAAZ,CAAJ,CAAqC,CACjCN,CAAC,CAACmB,IAAF,CAAOZ,CAAP,CAAuBI,CAAvB,EAAqCS,IAArC,CAA0C,SAASC,CAAT,CAAkBC,CAAlB,CAAyB,CAC/DA,CAAK,CAACC,QAAN,CAAeF,CAAO,CAAC,CAAD,CAAtB,EACAC,CAAK,CAACE,OAAN,CAAcH,CAAO,CAAC,CAAD,CAArB,EACAC,CAAK,CAACG,iBAAN,CAAwBJ,CAAO,CAAC,CAAD,CAA/B,EAEAC,CAAK,CAACI,OAAN,GAAgBC,EAAhB,CAAmBxB,CAAW,CAACyB,IAA/B,CAAqC,UAAW,CAC5CC,CAAC,CAACC,IAAF,CAAOC,mBAAP,CAA2B,yCAA3B,KAEA/B,CAAC,CAAC,iCAAD,CAAD,CAAqCgC,KAArC,CAA2C,OAA3C,CACH,CAJD,EAKAV,CAAK,CAACW,IAAN,GACA,MAAOX,CAAAA,CACV,CAZD,EAYGY,IAZH,CAYQ9B,CAAY,CAAC+B,SAZrB,CAaH,CAdD,IAcO,CACHN,CAAC,CAACC,IAAF,CAAOC,mBAAP,CAA2B,yCAA3B,KAEA/B,CAAC,CAAC,iCAAD,CAAD,CAAqCgC,KAArC,CAA2C,OAA3C,CACH,CACJ,CAvBD,CAwBH,CAED,MAAO,CACHI,IAAI,CAAE,cAAS9B,CAAT,CAAmC,CACrCD,CAAc,CAACC,CAAD,CACjB,CAHE,CAKV,CA5DK,CAAN","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 * Theme Boost Campus - JS code for feature information banner\n *\n * @module theme_boost_campus/infobanner\n * @copyright 2020 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/str', 'core/modal_factory', 'core/modal_events', 'core/notification'],\n function($, str, ModalFactory, ModalEvents, Notification) {\n \"use strict\";\n\n /**\n * Initialising.\n *\n * @param {string} showconfirmationdialogue\n */\n function initInfoBanner(showconfirmationdialogue) {\n\n var stringsforInfoBannerJS = [\n {\n key: 'confirmation',\n component: 'theme_boost_campus'\n }, {\n key: 'closingperpetualinfobanner',\n component: 'theme_boost_campus'\n }, {\n key: 'yes_close',\n component: 'theme_boost_campus'\n }\n ];\n\n // Load the strings and modal before clicking on the button so that the confirmation dialogue can pop up faster.\n var stringsPromise = str.get_strings(stringsforInfoBannerJS);\n var modalPromise = ModalFactory.create({type: ModalFactory.types.SAVE_CANCEL});\n\n // With this we store the dismissing of the info banner as a user preference to persist this decision.\n $('#themeboostcampusperpinfobanner .close').click(function(event) {\n // Stop propagation to keep the info banner there until the decision in the confirmation dialogue has been made.\n event.stopPropagation();\n\n if (showconfirmationdialogue == '1') {\n $.when(stringsPromise, modalPromise).then(function(strings, modal) {\n modal.setTitle(strings[0]);\n modal.setBody(strings[1]);\n modal.setSaveButtonText(strings[2]);\n // Saved clicked - the dismissing of the info banner is confirmed.\n modal.getRoot().on(ModalEvents.save, function() {\n M.util.set_user_preference('theme_boost_campus_infobanner_dismissed', true);\n // Now close the alert.\n $('#themeboostcampusperpinfobanner').alert('close');\n });\n modal.show();\n return modal;\n }).fail(Notification.exception);\n } else {\n M.util.set_user_preference('theme_boost_campus_infobanner_dismissed', true);\n // Now close the alert.\n $('#themeboostcampusperpinfobanner').alert('close');\n }\n });\n }\n\n return {\n init: function(showconfirmationdialogue) {\n initInfoBanner(showconfirmationdialogue);\n }\n };\n});\n"],"file":"infobanner.min.js"} \ No newline at end of file diff --git a/amd/src/backtotop.js b/amd/src/backtotop.js index 068407e..d28fd84 100644 --- a/amd/src/backtotop.js +++ b/amd/src/backtotop.js @@ -16,7 +16,7 @@ /** * Theme Boost Campus - JS code back to top button * - * @package theme_boost_campus + * @module theme_boost_campus/backtotop * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/amd/src/catchshortcuts.js b/amd/src/catchshortcuts.js index 3f9359a..60527b1 100644 --- a/amd/src/catchshortcuts.js +++ b/amd/src/catchshortcuts.js @@ -16,7 +16,7 @@ /** * Theme Boost Campus - JS code for catching pressed keys. * - * @package theme_boost_campus + * @module theme_boost_campus/catchshortcuts * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/amd/src/incoursesettings.js b/amd/src/incoursesettings.js index 29a7ecc..2deaa3d 100644 --- a/amd/src/incoursesettings.js +++ b/amd/src/incoursesettings.js @@ -16,7 +16,7 @@ /** * Theme Boost Campus - JS code for displaying course setting within the course. * - * @package theme_boost_campus + * @module theme_boost_campus/incoursesettings * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ diff --git a/amd/src/infobanner.js b/amd/src/infobanner.js index daf1b16..137665e 100644 --- a/amd/src/infobanner.js +++ b/amd/src/infobanner.js @@ -16,7 +16,7 @@ /** * Theme Boost Campus - JS code for feature information banner * - * @package theme_boost_campus + * @module theme_boost_campus/infobanner * @copyright 2020 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -- GitLab