fixed issues with Moodle 3.11 compatibility
This commit is contained in:
parent
d225d82038
commit
88744c2b66
File diff suppressed because one or more lines are too long
2
amd/build/page-edit-plan.min.js
vendored
2
amd/build/page-edit-plan.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -12,6 +12,21 @@ import {replaceNodeContents} from 'core/templates';
|
|||
//import {markFormSubmitted} from 'core_form/changechecker'; // Moodle 4.00+ only
|
||||
//import {notifyFormSubmittedByJavascript} from 'core_form/events'; // Moodle 4.00+ only
|
||||
|
||||
/* Moodle 3.11 safe import for when needed
|
||||
let markFormSubmitted = () => {};
|
||||
let notifyFormSubmittedByJavascript = () => {};
|
||||
|
||||
import('core_form/changechecker').then((ns) => {
|
||||
debug.info(ns);
|
||||
if(ns.markFormSubmitted) {
|
||||
markFormSubmitted = ns.markFormSubmitted;
|
||||
}
|
||||
if(ns.notifyFormSubmittedByJavascript) {
|
||||
notifyFormSubmittedByJavascript = ns.notifyFormSubmittedByJavascript;
|
||||
}
|
||||
}).catch(()=>{});
|
||||
*/
|
||||
|
||||
export default {
|
||||
install(Vue/*,options*/){
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
import {get_string,get_strings} from 'core/str';
|
||||
import {call} from 'core/ajax';
|
||||
import notification from 'core/notification';
|
||||
import {resetAllFormDirtyStates} from 'core_form/changechecker';
|
||||
|
||||
//import {resetAllFormDirtyStates} from 'core_form/changechecker'; // Moodle 4.00+ only
|
||||
|
||||
import Vue from './vue/vue';
|
||||
|
||||
|
@ -36,6 +37,16 @@ Vue.use(BootstrapVue);
|
|||
|
||||
const debug = new Debugger("treestudyplan");
|
||||
|
||||
let resetAllFormDirtyStates = () => {};
|
||||
import('core_form/changechecker').then((ns) => {
|
||||
debug.info(ns);
|
||||
if(ns.resetAllFormDirtyStates) {
|
||||
resetAllFormDirtyStates = ns.resetAllFormDirtyStates;
|
||||
}
|
||||
}).catch(()=>{});
|
||||
|
||||
|
||||
|
||||
let strings = load_strings({
|
||||
studyplan: {
|
||||
studyplan_select_placeholder: 'studyplan_select_placeholder',
|
||||
|
|
|
@ -14,6 +14,21 @@ import Debugger from './debugger';
|
|||
//import {markFormSubmitted} from 'core_form/changechecker'; // Moodle 4.00+ only
|
||||
//import {notifyFormSubmittedByJavascript} from 'core_form/events'; // Moodle 4.00+ only
|
||||
|
||||
/* Moodle 3.11 safe import for when needed
|
||||
let markFormSubmitted = () => {};
|
||||
let notifyFormSubmittedByJavascript = () => {};
|
||||
|
||||
import('core_form/changechecker').then((ns) => {
|
||||
debug.info(ns);
|
||||
if(ns.markFormSubmitted) {
|
||||
markFormSubmitted = ns.markFormSubmitted;
|
||||
}
|
||||
if(ns.notifyFormSubmittedByJavascript) {
|
||||
notifyFormSubmittedByJavascript = ns.notifyFormSubmittedByJavascript;
|
||||
}
|
||||
}).catch(()=>{});
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a random UUID in both secure and insecure contexts
|
||||
* @returns UUID
|
||||
|
|
Loading…
Reference in New Issue
Block a user