diff --git a/.travis.yml b/.travis.yml index f8368d0c89904556a2ceb3af06bde7907d19f5ce..0742af978fb143d19ae8e5194d99a4ee0769f8ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ php: env: global: - - MOODLE_BRANCH=MOODLE_37_STABLE + - MOODLE_BRANCH=MOODLE_38_STABLE matrix: - DB=pgsql - DB=mysqli diff --git a/CHANGES.md b/CHANGES.md index 28e8a9ea1ae4ec95ff97bd81839c5297ea26ad57..ff14733fdee8adf9961d9bf975e85e5941bdcfd2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,10 @@ moodle-theme_boost_campus Changes ------- +### Unreleased + +* 2020-03-05 - Prepare compatibility for Moodle 3.8. + ### Release v3.7-r4 * 2020-02-11 - Re-ordered in course course settings to be displayed within the course header. diff --git a/README.md b/README.md index a8a86b0595a6a13d1c3c37e8d7c26377538b7dab..12157785e70d52763865601001cf181efba14c93 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Moodle Boost child theme which is intended to meet the needs of university campu Requirements ------------ -This plugin requires Moodle 3.7+ +This plugin requires Moodle 3.8+ Motivation for this theme diff --git a/amd/build/backtotop.min.js b/amd/build/backtotop.min.js index 4ee413bf8ea8955d4cf18b333bcba547f44fe261..b60d4b9565452432bbbc10fbf433a028f34518f8 100644 --- a/amd/build/backtotop.min.js +++ b/amd/build/backtotop.min.js @@ -1 +1,2 @@ -define(["jquery"],function(a){"use strict";function b(){a("#page-footer").after('<i class="fa fa-chevron-up fa-2x d-print-none" id="back-to-top"></i>'),a(window).scroll(function(){a(document).scrollTop()>220?a("#back-to-top").fadeIn(300):a("#back-to-top").fadeOut(100)}),a("#back-to-top").click(function(b){b.preventDefault(),a("html, body").animate({scrollTop:0},500)})}return{init:function(){b()}}}); \ No newline at end of file +define ("theme_boost_campus/backtotop",["jquery"],function(a){"use strict";function b(){a("#page-footer").after("<i class=\"fa fa-chevron-up fa-2x d-print-none\" id=\"back-to-top\"></i>");a(window).scroll(function(){if(220<a(document).scrollTop()){a("#back-to-top").fadeIn(300)}else{a("#back-to-top").fadeOut(100)}});a("#back-to-top").click(function(b){b.preventDefault();a("html, body").animate({scrollTop:0},500)})}return{init:function init(){b()}}}); +//# sourceMappingURL=backtotop.min.js.map diff --git a/amd/build/backtotop.min.js.map b/amd/build/backtotop.min.js.map new file mode 100644 index 0000000000000000000000000000000000000000..79029df892bca681d4dfab9546e0df7e5ab3d536 --- /dev/null +++ b/amd/build/backtotop.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/backtotop.js"],"names":["define","$","initBackToTop","after","window","scroll","document","scrollTop","fadeIn","fadeOut","click","event","preventDefault","animate","init"],"mappings":"AAuBAA,OAAM,gCAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAC3B,aAKA,QAASC,CAAAA,CAAT,EAAyB,CAErBD,CAAC,CAAC,cAAD,CAAD,CAAkBE,KAAlB,CAAwB,0EAAxB,EAIAF,CAAC,CAACG,MAAD,CAAD,CAAUC,MAAV,CAAiB,UAAW,CACxB,GAA8B,GAA1B,CAAAJ,CAAC,CAACK,QAAD,CAAD,CAAYC,SAAZ,EAAJ,CAAmC,CAC/BN,CAAC,CAAC,cAAD,CAAD,CAAkBO,MAAlB,CAAyB,GAAzB,CACH,CAFD,IAEO,CACHP,CAAC,CAAC,cAAD,CAAD,CAAkBQ,OAAlB,CAA0B,GAA1B,CACH,CACJ,CAND,EASAR,CAAC,CAAC,cAAD,CAAD,CAAkBS,KAAlB,CAAwB,SAASC,CAAT,CAAgB,CACpCA,CAAK,CAACC,cAAN,GACAX,CAAC,CAAC,YAAD,CAAD,CAAgBY,OAAhB,CAAwB,CAACN,SAAS,CAAE,CAAZ,CAAxB,CAAwC,GAAxC,CACH,CAHD,CAIH,CAED,MAAO,CACHO,IAAI,CAAE,eAAW,CACbZ,CAAa,EAChB,CAHE,CAKV,CAhCK,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'], function($) {\n \"use strict\";\n\n /**\n * Initialising.\n */\n function initBackToTop() {\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\" id=\"back-to-top\"></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\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 b/amd/build/catchshortcuts.min.js index 3ff0a0282ac17320349b80cead07cb613b160753..d76ad393ede8a032455a63b1756cc708977d6c39 100644 --- a/amd/build/catchshortcuts.min.js +++ b/amd/build/catchshortcuts.min.js @@ -1 +1,2 @@ -define(["jquery"],function(a){"use strict";function b(b){"end"==b&&a(document).keydown(function(a){35==a.keyCode&&1!=d()&&c(a)}),navigator.appVersion.indexOf("Mac")!=-1&&"cmdarrowdown"==b&&a(document).keydown(function(a){40==a.keyCode&&a.metaKey&&1!=d()&&c(a)}),navigator.appVersion.indexOf("Win")!=-1&&"ctrlarrowdown"==b&&a(document).keydown(function(a){40==a.keyCode&&a.ctrlKey&&1!=d()&&c(a)})}function c(b){b.preventDefault(),a("html, body").animate({scrollTop:a("#page-footer").offset().top-a(window).height()+50},500)}function d(){var a=document.activeElement,b=!1;return"INPUT"!=a.tagName&&"TEXTAREA"!=a.tagName&&1!=a.isContentEditable||(b=!0),b}return{init:function(a){for(var c=0,d=a.length;c<d;c++)b(a[c])}}}); \ No newline at end of file +define ("theme_boost_campus/catchshortcuts",["jquery"],function(a){"use strict";function b(b){if("end"==b){a(document).keydown(function(a){if(35==a.keyCode){if(!0!=d()){c(a)}}})}if(-1!=navigator.appVersion.indexOf("Mac")&&"cmdarrowdown"==b){a(document).keydown(function(a){if(40==a.keyCode&&a.metaKey){if(!0!=d()){c(a)}}})}if(-1!=navigator.appVersion.indexOf("Win")&&"ctrlarrowdown"==b){a(document).keydown(function(a){if(40==a.keyCode&&a.ctrlKey){if(!0!=d()){c(a)}}})}}function c(b){b.preventDefault();a("html, body").animate({scrollTop:a("#page-footer").offset().top-a(window).height()+50},500)}function d(){var a=document.activeElement,b=!1;if("INPUT"==a.tagName||"TEXTAREA"==a.tagName||!0==a.isContentEditable){b=!0}return b}return{init:function init(a){for(var c=0,d=a.length;c<d;c++){b(a[c])}}}}); +//# sourceMappingURL=catchshortcuts.min.js.map diff --git a/amd/build/catchshortcuts.min.js.map b/amd/build/catchshortcuts.min.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a2d35a22313d2fd4a407e344f2d9b8bffad4048c --- /dev/null +++ b/amd/build/catchshortcuts.min.js.map @@ -0,0 +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,CAAC,CAACC,OAAF,EAAmBD,CAAC,CAACO,OAAzB,CAAkC,CAE9B,GAAI,IAAAL,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,eAAT,EAAAT,CAAjD,CAA2E,CAEvEF,CAAC,CAACG,QAAD,CAAD,CAAYC,OAAZ,CAAoB,SAASC,CAAT,CAAY,CAC5B,GAAiB,EAAb,EAAAA,CAAC,CAACC,OAAF,EAAmBD,CAAC,CAACQ,OAAzB,CAAkC,CAE9B,GAAI,IAAAN,CAAyB,EAA7B,CAAyC,CAErCC,CAAsB,CAACH,CAAD,CACzB,CACJ,CACJ,CARD,CASH,CACJ,CAOD,QAASG,CAAAA,CAAT,CAAgCM,CAAhC,CAAuC,CAEnCA,CAAK,CAACC,cAAN,GAEAf,CAAC,CAAC,YAAD,CAAD,CAAgBgB,OAAhB,CAAwB,CACpBC,SAAS,CAAEjB,CAAC,CAAC,cAAD,CAAD,CAAkBkB,MAAlB,GAA2BC,GAA3B,CAAiCnB,CAAC,CAACoB,MAAD,CAAD,CAAUC,MAAV,EAAjC,CAAsD,EAD7C,CAAxB,CAEG,GAFH,CAGH,CAOD,QAASd,CAAAA,CAAT,EAAqC,IAE7Be,CAAAA,CAAa,CAAGnB,QAAQ,CAACmB,aAFI,CAG7BC,CAAW,GAHkB,CAKjC,GAA6B,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 * @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 diff --git a/amd/build/incoursesettings.min.js b/amd/build/incoursesettings.min.js index ac43aeff002548b0f1b78dac8cba00510f5a6174..529f4fee3dfa7e5d20311477ab093810a43f5c7b 100644 --- a/amd/build/incoursesettings.min.js +++ b/amd/build/incoursesettings.min.js @@ -1 +1,2 @@ -define(["jquery"],function(a){"use strict";function b(){var b=a("#boost-campus-course-settings"),c=a("#boost-campus-activity-settings"),d=a("body").hasClass("pagelayout-frontpage"),e=a("#page-header .card").css("border-bottom");d||(a("#page-header .context-header-settings-menu").on("click",function(d){d.stopPropagation(),b.is(":visible")?(b.hide(400),setTimeout(function(){a("#page-header .card").css("border-bottom",e),a("#page-header > div").addClass("pb-3")},300)):(b.show(400),a("#page-header div").removeClass("pb-3"),a("#page-header .card").css("border-bottom","none"),b.css("border-top","none"),c.is(":visible")&&c.hide(400))}),a("#region-main-settings-menu .action-menu .dropdown-toggle").on("click",function(d){d.stopPropagation(),c.is(":visible")?c.hide(400):(c.show(400),setTimeout(function(){a("#page-header .card").css("border-bottom",e),a("#page-header > div").addClass("pb-3")},300),b.is(":visible")&&b.hide(400))}))}return{init:function(){b()}}}); \ No newline at end of file +define ("theme_boost_campus/incoursesettings",["jquery"],function(a){"use strict";function b(){var b=a("#boost-campus-course-settings"),c=a("#boost-campus-activity-settings"),d=a("body").hasClass("pagelayout-frontpage"),e=a("#page-header .card").css("border-bottom");if(!d){a("#page-header .context-header-settings-menu").on("click",function(d){d.stopPropagation();if(b.is(":visible")){b.hide(400);setTimeout(function(){a("#page-header .card").css("border-bottom",e);a("#page-header > div").addClass("pb-3")},300)}else{b.show(400);a("#page-header div").removeClass("pb-3");a("#page-header .card").css("border-bottom","none");b.css("border-top","none");if(c.is(":visible")){c.hide(400)}}});a("#region-main-settings-menu .action-menu .dropdown-toggle").on("click",function(d){d.stopPropagation();if(c.is(":visible")){c.hide(400)}else{c.show(400);setTimeout(function(){a("#page-header .card").css("border-bottom",e);a("#page-header > div").addClass("pb-3")},300);if(b.is(":visible")){b.hide(400)}}})}}return{init:function init(){b()}}}); +//# sourceMappingURL=incoursesettings.min.js.map diff --git a/amd/build/incoursesettings.min.js.map b/amd/build/incoursesettings.min.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c7444ca690f420ddc6240317efa50d722f7bb862 --- /dev/null +++ b/amd/build/incoursesettings.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../src/incoursesettings.js"],"names":["define","$","initInCourseSettings","courseSettings","activitySettings","frontpage","hasClass","headerCardBorderBottom","css","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,IACxBC,CAAAA,CAAc,CAAGF,CAAC,CAAC,+BAAD,CADM,CAExBG,CAAgB,CAAGH,CAAC,CAAC,iCAAD,CAFI,CAGxBI,CAAS,CAAGJ,CAAC,CAAC,MAAD,CAAD,CAAUK,QAAV,CAAmB,sBAAnB,CAHY,CAIxBC,CAAsB,CAAGN,CAAC,CAAC,oBAAD,CAAD,CAAwBO,GAAxB,CAA4B,eAA5B,CAJD,CAQ5B,GAAI,CAACH,CAAL,CAAgB,CACZJ,CAAC,CAAC,4CAAD,CAAD,CAAgDQ,EAAhD,CAAmD,OAAnD,CAA4D,SAASC,CAAT,CAAgB,CACxEA,CAAK,CAACC,eAAN,GACA,GAAIR,CAAc,CAACS,EAAf,CAAkB,UAAlB,CAAJ,CAAmC,CAC/BT,CAAc,CAACU,IAAf,CAAoB,GAApB,EACAC,UAAU,CAAC,UAAW,CAClBb,CAAC,CAAC,oBAAD,CAAD,CAAwBO,GAAxB,CAA4B,eAA5B,CAA6CD,CAA7C,EACAN,CAAC,CAAC,oBAAD,CAAD,CAAwBc,QAAxB,CAAiC,MAAjC,CACH,CAHS,CAGP,GAHO,CAIb,CAND,IAMO,CACHZ,CAAc,CAACa,IAAf,CAAoB,GAApB,EACAf,CAAC,CAAC,kBAAD,CAAD,CAAsBgB,WAAtB,CAAkC,MAAlC,EACAhB,CAAC,CAAC,oBAAD,CAAD,CAAwBO,GAAxB,CAA4B,eAA5B,CAA6C,MAA7C,EACAL,CAAc,CAACK,GAAf,CAAmB,YAAnB,CAAiC,MAAjC,EAEA,GAAIJ,CAAgB,CAACQ,EAAjB,CAAoB,UAApB,CAAJ,CAAqC,CACjCR,CAAgB,CAACS,IAAjB,CAAsB,GAAtB,CACH,CACJ,CACJ,CAlBD,EAmBAZ,CAAC,CAAC,0DAAD,CAAD,CAA8DQ,EAA9D,CAAiE,OAAjE,CAA0E,SAASC,CAAT,CAAgB,CACtFA,CAAK,CAACC,eAAN,GACA,GAAIP,CAAgB,CAACQ,EAAjB,CAAoB,UAApB,CAAJ,CAAqC,CACjCR,CAAgB,CAACS,IAAjB,CAAsB,GAAtB,CACH,CAFD,IAEO,CACHT,CAAgB,CAACY,IAAjB,CAAsB,GAAtB,EACAF,UAAU,CAAC,UAAW,CAClBb,CAAC,CAAC,oBAAD,CAAD,CAAwBO,GAAxB,CAA4B,eAA5B,CAA6CD,CAA7C,EACAN,CAAC,CAAC,oBAAD,CAAD,CAAwBc,QAAxB,CAAiC,MAAjC,CACH,CAHS,CAGP,GAHO,CAAV,CAKA,GAAIZ,CAAc,CAACS,EAAf,CAAkB,UAAlB,CAAJ,CAAmC,CAC/BT,CAAc,CAACU,IAAf,CAAoB,GAApB,CACH,CACJ,CACJ,CAfD,CAgBH,CACJ,CAED,MAAO,CACHK,IAAI,CAAE,eAAW,CACbhB,CAAoB,EACvB,CAHE,CAKV,CA1DK,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 courseSettings = $('#boost-campus-course-settings');\n var activitySettings = $('#boost-campus-activity-settings');\n var frontpage = $('body').hasClass('pagelayout-frontpage');\n var headerCardBorderBottom = $('#page-header .card').css(\"border-bottom\");\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 $('#page-header .context-header-settings-menu').on('click', function(event) {\n event.stopPropagation();\n if (courseSettings.is(\":visible\")) {\n courseSettings.hide(400);\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 // Additionally close activity settings if they are currently open.\n if (activitySettings.is(\":visible\")) {\n activitySettings.hide(400);\n }\n }\n });\n $('#region-main-settings-menu .action-menu .dropdown-toggle').on('click', function(event) {\n event.stopPropagation();\n if (activitySettings.is(\":visible\")) {\n activitySettings.hide(400);\n } else {\n activitySettings.show(400);\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 }\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/version.php b/version.php index 158a399837f7b3f9b360391bfa116598d2cd7abe..2137cfd808f106242fa66a7c68035ecef929b859 100644 --- a/version.php +++ b/version.php @@ -27,6 +27,6 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'theme_boost_campus'; $plugin->version = 2020021200; $plugin->release = 'v3.7-r4'; -$plugin->requires = 2019052000.05; +$plugin->requires = 2019111800; $plugin->maturity = MATURITY_STABLE; -$plugin->dependencies = array('theme_boost' => 2019052000); +$plugin->dependencies = array('theme_boost' => 2019111800);