From 919ec571c8a30efcc574b2508334fcdfd378f89f Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Fri, 8 Sep 2023 09:03:30 +0200 Subject: [PATCH] Library reference and css reference update --- amd/src/block_mytreestudyplan.js | 2 +- block_mytreestudyplan.php | 14 ++++++++++++-- templates/block.mustache | 2 +- version.php | 4 ++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/amd/src/block_mytreestudyplan.js b/amd/src/block_mytreestudyplan.js index e246dee..1070f19 100644 --- a/amd/src/block_mytreestudyplan.js +++ b/amd/src/block_mytreestudyplan.js @@ -18,7 +18,7 @@ import {load_strings} from 'local_treestudyplan/util/string-helper'; import {ProcessStudyplans} from 'local_treestudyplan/studyplan-processor'; import PortalVue from 'local_treestudyplan/portal-vue/portal-vue.esm'; -import BootstrapVue from 'local_treestudyplan/bootstrap-vue/bootstrap-vue.esm'; +import BootstrapVue from 'local_treestudyplan/bootstrap-vue/bootstrap-vue'; Vue.use(TSComponents); Vue.use(RVComponents); Vue.use(PortalVue); diff --git a/block_mytreestudyplan.php b/block_mytreestudyplan.php index b958e26..155dce9 100644 --- a/block_mytreestudyplan.php +++ b/block_mytreestudyplan.php @@ -46,8 +46,11 @@ class block_mytreestudyplan extends \block_base { // Load CSS files from treestudyplan. try { - $this->page->requires->css(new \moodle_url($CFG->wwwroot.'/local/treestudyplan/css/bootstrap-vue.min.css')); - $this->page->requires->css(new \moodle_url($CFG->wwwroot.'/local/treestudyplan/css/devstyles.css')); + $this->page->requires->css(new \moodle_url($CFG->wwwroot.'/local/treestudyplan/css/bootstrap-vue/bootstrap-vue.min.css')); + if($CFG->debugdeveloper){ + $this->page->requires->css(new moodle_url($CFG->wwwroot.'/local/treestudyplan/css/devstyles.css')); + } + $this->page->add_body_class("features-treestudyplan"); // Mark body as containing treestudyplan content. // Include javascript and run studyplan renderer when page loading is complete. $this->page->requires->js_call_amd('block_mytreestudyplan/block_mytreestudyplan', 'init', @@ -125,4 +128,11 @@ class block_mytreestudyplan extends \block_base { public function has_config() { return false; } + + /** + * Return true to avoid broken self-test message + */ + function _self_test() { + return true; + } } diff --git a/templates/block.mustache b/templates/block.mustache index af83c85..7bcc047 100644 --- a/templates/block.mustache +++ b/templates/block.mustache @@ -33,7 +33,7 @@ } }} -
+
Loading... diff --git a/version.php b/version.php index fb614cd..e3aa938 100644 --- a/version.php +++ b/version.php @@ -22,7 +22,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'block_mytreestudyplan'; // Recommended since 2.0.2 (MDL-26035). Required since 3.0 (MDL-48494). -$plugin->version = 2023081800; // YYYYMMDDHH (year, month, day, iteration). +$plugin->version = 2023090800; // YYYYMMDDHH (year, month, day, iteration). $plugin->requires = 2021051700; // YYYYMMDDHH (This is the release version for Moodle 3.11). $plugin->release = "1.0.0"; @@ -31,5 +31,5 @@ $plugin->maturity = MATURITY_RC; $plugin->supported = [ 311, 401 ]; $plugin->dependencies = [ - 'local_treestudyplan' => 2023082101, + 'local_treestudyplan' => 2023090700, ];