Fixed bugs caused by code style optimising
This commit is contained in:
		
							parent
							
								
									848457e7cc
								
							
						
					
					
						commit
						428ea13551
					
				
					 2 changed files with 12 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -1,8 +1,8 @@
 | 
			
		|||
/*eslint no-var: "error" */
 | 
			
		||||
/*eslint no-unused-vars: "off" */
 | 
			
		||||
/*eslint linebreak-style: "off" */
 | 
			
		||||
/*eslint no-trailing-spaces: "off" */
 | 
			
		||||
/*eslint-env es6*/
 | 
			
		||||
/* eslint no-var: "error" */
 | 
			
		||||
/* eslint no-unused-vars: "off" */
 | 
			
		||||
/* eslint linebreak-style: "off" */
 | 
			
		||||
/* eslint no-trailing-spaces: "off" */
 | 
			
		||||
/* eslint-env es6*/
 | 
			
		||||
// Put this file in path/to/plugin/amd/src
 | 
			
		||||
// You can call it anything you like
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@ import RVComponents from 'local_treestudyplan/report-viewer-components';
 | 
			
		|||
import TSComponents from 'local_treestudyplan/treestudyplan-components';
 | 
			
		||||
import Debugger from 'local_treestudyplan/util/debugger';
 | 
			
		||||
 | 
			
		||||
import {load_strings} from 'local_treestudyplan/util/string-helper';
 | 
			
		||||
import {loadStrings} from 'local_treestudyplan/util/string-helper';
 | 
			
		||||
import {ProcessStudyplans} from 'local_treestudyplan/studyplan-processor';
 | 
			
		||||
 | 
			
		||||
import PortalVue from 'local_treestudyplan/portal-vue/portal-vue.esm';
 | 
			
		||||
| 
						 | 
				
			
			@ -28,7 +28,7 @@ Vue.use(BootstrapVue);
 | 
			
		|||
let debug = new Debugger("mytreestudyplan");
 | 
			
		||||
debug.enable();
 | 
			
		||||
 | 
			
		||||
let strings = load_strings({
 | 
			
		||||
let strings = loadStrings({
 | 
			
		||||
    studyplan: {
 | 
			
		||||
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			@ -42,15 +42,15 @@ let strings = load_strings({
 | 
			
		|||
 * @param {string} type Type of page to show
 | 
			
		||||
 * @param {Object} arg Arguments passed
 | 
			
		||||
 */
 | 
			
		||||
 export function init(type="own",arg) {
 | 
			
		||||
 export function init(type = "own", arg) {
 | 
			
		||||
    // Save time by only starting up the Vue app if the required block element is present
 | 
			
		||||
    const blockelement = document.getElementById('block_mytreestudyplan');
 | 
			
		||||
    if(blockelement){
 | 
			
		||||
    if (blockelement) {
 | 
			
		||||
        const app = new Vue({
 | 
			
		||||
            el: '#block_mytreestudyplan',
 | 
			
		||||
            data: {
 | 
			
		||||
                "studyplans": [],
 | 
			
		||||
                "type" : type,
 | 
			
		||||
                "type": type,
 | 
			
		||||
            },
 | 
			
		||||
            methods: {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 = 2023112700;  // YYYYMMDDHH (year, month, day, iteration).
 | 
			
		||||
$plugin->version = 2024062800;  // 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' => 2023112400,
 | 
			
		||||
    'local_treestudyplan' => 2024062800,
 | 
			
		||||
];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue