From 848457e7ccf014af66f3c4f38f81d7300ed33dee Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Mon, 27 Nov 2023 20:55:08 +0100 Subject: [PATCH] Merge --- amd/src/block_mytreestudyplan.js | 49 -------------------------------- 1 file changed, 49 deletions(-) diff --git a/amd/src/block_mytreestudyplan.js b/amd/src/block_mytreestudyplan.js index b319c48..76d594c 100644 --- a/amd/src/block_mytreestudyplan.js +++ b/amd/src/block_mytreestudyplan.js @@ -50,56 +50,7 @@ let strings = load_strings({ el: '#block_mytreestudyplan', data: { "studyplans": [], -<<<<<<< HEAD "type" : type, -======= - }, - mounted() { - let call_method; - let call_args; - if(type == "teacher"){ - call_method = 'local_treestudyplan_get_teacher_studyplan'; - call_args = {}; - } - else if(type == "teaching"){ - call_method = 'local_treestudyplan_get_teaching_studyplans'; - call_args = {}; - } - else{ - call_method = 'local_treestudyplan_get_own_studyplan'; - call_args = {}; - } - call([{ - methodname: call_method, - args: call_args - }])[0].done(function(response){ - debug.info("Studyplans:",response); - const timingval = { future: 0, present: 1, past: 2, }; - response.sort((a,b) => { - const timinga = TSComponents.studyplanTiming(a); - const timingb = TSComponents.studyplanTiming(b); - - let t = timingval[timinga] - timingval[timingb]; - if(t == 0){ - // sort by start date if timing is equal - t = new Date(b.startdate).getTime() - new Date(a.startdate).getTime(); - - if (t == 0) { - // sort by name if timing is equal - t = a.name.localeCompare(b.name); - } - } - return t; - }); - app.studyplans = ProcessStudyplans(response); - }).fail(notification.exception); - - }, - created() { - - }, - updated() { ->>>>>>> 449618ef9ae1767120a083f3bd263448c5957fb1 }, methods: {