1 line
217 KiB
Plaintext
1 line
217 KiB
Plaintext
{"version":3,"file":"studyplan-editor-components.min.js","sources":["../src/studyplan-editor-components.js"],"sourcesContent":["/*eslint no-var: \"error\"*/\n/*eslint no-console: \"off\"*/\n/*eslint no-unused-vars: warn */\n/*eslint max-len: [\"error\", { \"code\": 160 }] */\n/*eslint-disable no-trailing-spaces */\n/*eslint-env es6*/\n// Put this file in path/to/plugin/amd/src\n\nimport {SimpleLine} from \"./simpleline/simpleline\";\nimport {call} from 'core/ajax';\nimport notification from 'core/notification';\nimport {get_strings} from 'core/str';\nimport {load_stringkeys, load_strings, strformat } from './util/string-helper';\nimport {format_date, add_days, datespaninfo } from './util/date-helper';\nimport {objCopy,transportItem} from './studyplan-processor';\nimport Debugger from './util/debugger';\nimport {download,upload} from './downloader';\nimport {ProcessStudyplan, ProcessStudyplanPage} from './studyplan-processor';\nimport {eventTypes as editSwEventTypes} from 'core/edit_switch';\n\nimport TSComponents from './treestudyplan-components';\nimport mFormComponents from \"./util/mform-helper\";\n\n\nconst STUDYPLAN_EDITOR_FIELDS =\n['name','shortname','description','idnumber','context_id', 'aggregation','aggregation_config'];\nconst STUDYPLAN_EDITOR_PAGE_FIELDS = //TODO: Add 'fullname', 'shortname' and 'description' when implementing proper page management\n['context_id', 'periods','startdate','enddate'];\nconst PERIOD_EDITOR_FIELDS =\n['fullname','shortname','startdate','enddate'];\n\nconst LINE_GRAVITY = 1.3;\n\nconst datechanger_globals = {\n default: false,\n defaultchoice: false,\n hidewarn: false,\n};\n\nexport default {\n STUDYPLAN_EDITOR_FIELDS: STUDYPLAN_EDITOR_FIELDS, // make copy available in plugin\n install(Vue/*,options*/){\n Vue.use(TSComponents);\n Vue.use(mFormComponents);\n let debug = new Debugger(\"treestudyplan-editor\");\n /************************************\n * *\n * Treestudyplan Editor components *\n * *\n ************************************/\n\n /**\n * Check if element is visible\n * @param {Object} elem The element to check\n * @returns {boolean} True if visible\n */\n function isVisible(elem){\n return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n }\n\n // Create new eventbus for interaction between item components\n const ItemEventBus = new Vue();\n\n // Add event listener for the edit mode event so we can react to it, or at the very least ignore it\n document.addEventListener(editSwEventTypes.editModeSet,(e) => {\n e.preventDefault();\n ItemEventBus.$emit('editModeSet', e.detail.editMode);\n });\n\n let string_keys = load_stringkeys({\n conditions: [\n { value: 'ALL', textkey: 'condition_all'},\n { value: 'ANY', textkey: 'condition_any'},\n ],\n });\n\n let strings = load_strings({\n studyplan_text: {\n studyline_editmode: 'studyline_editmode',\n toolbox_toggle: 'toolbox_toggle',\n editmode_modules_hidden:'editmode_modules_hidden',\n studyline_add: 'studyline_add',\n add$core: 'add$core',\n edit$core: 'edit$core',\n studyline_name: 'studyline_name',\n studyline_name_ph: 'studyline_name_ph',\n studyline_shortname: 'studyline_shortname',\n studyline_shortname_ph: 'studyline_shortname_ph',\n studyline_color: 'studyline_color',\n associations: 'associations',\n associated_cohorts: 'associated_cohorts',\n associated_users: 'associated_users',\n studyline_edit: 'studyline_edit',\n studyplan_name: 'studyplan_name',\n studyplan_name_ph: 'studyplan_name_ph',\n studyplan_shortname: 'studyplan_shortname',\n studyplan_shortname_ph: 'studyplan_shortname_ph',\n studyplan_description: 'studyplan_description',\n studyplan_description_ph: 'studyplan_description_ph',\n studyplan_idnumber: 'studyplan_idnumber',\n studyplan_idnumber_ph: 'studyplan_idnumber_ph',\n studyplan_slots: 'studyplan_slots',\n studyplan_startdate: 'studyplan_startdate',\n studyplan_enddate: 'studyplan_enddate',\n },\n studyplan_advanced: {\n advanced_tools: 'advanced_tools',\n confirm_cancel: 'confirm_cancel',\n confirm_ok: 'confirm_ok',\n success$core: 'success$core',\n error$core: 'failed$core',\n advanced_converted: 'advanced_converted',\n advanced_skipped: 'advanced_skipped',\n advanced_failed: 'advanced_failed',\n advanced_locked: 'advanced_locked',\n advanced_multiple: 'advanced_multiple',\n advanced_error: 'advanced_error',\n advanced_tools_heading: 'advanced_tools_heading',\n advanced_warning_title: 'advanced_warning_title',\n advanced_warning: 'advanced_warning',\n advanced_pick_scale: 'advanced_pick_scale',\n advanced_course_manipulation_title: 'advanced_course_manipulation_title',\n advanced_bulk_course_timing: 'advanced_bulk_course_timing', \n advanced_bulk_course_timing_desc: 'advanced_bulk_course_timing_desc', \n advanced_force_scale_title: 'advanced_force_scale_title',\n advanced_force_scale_desc: 'advanced_force_scale_desc',\n advanced_force_scale_button: 'advanced_force_scale_button',\n advanced_confirm_header: 'advanced_confirm_header',\n advanced_force_scale_confirm: 'advanced_force_scale_confirm',\n advanced_backup_restore: 'advanced_backup_restore',\n advanced_restore: 'advanced_restore',\n advanced_backup: 'advanced_backup',\n advanced_restore_pages: 'advanced_restore_pages',\n advanced_restore_lines: 'advanced_restore_lines',\n advanced_backup_plan: 'advanced_backup_plan',\n advanced_backup_page: 'advanced_backup_page',\n advanced_export: 'advanced_export',\n advanced_export_csv_plan: 'advanced_export_csv_plan',\n advanced_export_csv_page: 'advanced_export_csv_page',\n advanced_import_from_file: 'advanced_import_from_file',\n advanced_purge: \"advanced_purge\",\n advanced_purge_plan: \"advanced_purge_plan\",\n advanced_purge_plan_expl: \"advanced_purge_plan_expl\",\n advanced_purge_page: \"advanced_purge_page\",\n advanced_purge_page_expl: \"advanced_purge_page_expl\",\n advanced_cascade_cohortsync_title: \"advanced_cascade_cohortsync_title\",\n advanced_cascade_cohortsync_desc: \"advanced_cascade_cohortsync_desc\",\n advanced_cascade_cohortsync: \"advanced_cascade_cohortsync\",\n currentpage: \"currentpage\",\n },\n studyplan_edit: {\n studyplan_edit: 'studyplan_edit',\n studyplan_add: 'studyplan_add',\n studyplanpage_add: 'studyplanpage_add',\n studyplanpage_edit: 'studyplanpage_edit',\n info_periodsextended: 'studyplanpage_info_periodsextended',\n warning: 'warning@core',\n },\n period_edit: {\n edit: 'period_edit',\n fullname: 'studyplan_name',\n shortname: 'studyplan_shortname',\n startdate: 'studyplan_startdate',\n enddate: 'studyplan_enddate',\n },\n course_timing: {\n title: 'course_timing_title',\n desc: 'course_timing_desc',\n question: 'course_timing_question',\n warning: 'course_timing_warning',\n timing_ok: 'course_timing_ok',\n timing_off: 'course_timing_off',\n course: 'course@core',\n period: 'period',\n yes: 'yes$core',\n no: 'no$core',\n duration: 'duration',\n years: 'years$core',\n year: 'year$core',\n weeks: 'weeks$core',\n week: 'week$core',\n days: 'days$core',\n day: 'day$core',\n rememberchoice: 'course_timing_rememberchoice',\n hidewarning: 'course_timing_hidewarning',\n periodspan: 'course_period_span',\n periods: 'periods',\n periodspan_desc: 'course_period_span_desc',\n },\n studyplan_associate: {\n associations: 'associations',\n associated_cohorts: 'associated_cohorts',\n associated_users: 'associated_users',\n associate_cohorts: 'associate_cohorts',\n associate_users: 'associate_users',\n add_association: 'add_association',\n delete_association: 'delete_association',\n associations_empty: 'associations_empty',\n associations_search: 'associations_search',\n cohorts: 'cohorts',\n users: 'users',\n selected: 'selected',\n name: 'name',\n context: 'context',\n },\n item_text: {\n select_conditions: \"select_conditions\",\n item_configuration: \"item_configuration\",\n ok: \"ok@core\",\n delete: \"delete@core\",\n item_delete_message: \"item_delete_message\",\n type_course: \"course@core\",\n type_junction: \"tool-junction\",\n type_start: \"tool-start\",\n type_finish: \"tool-finish\",\n type_badge: \"tool-badge\",\n type_invalid: \"course-invalid\",\n },\n item_course_text: {\n select_conditions: \"select_conditions\",\n select_grades: \"select_grades\",\n coursetiming_past: \"coursetiming_past\",\n coursetiming_present: \"coursetiming_present\",\n coursetiming_future: \"coursetiming_future\",\n grade_include: \"grade_include\",\n grade_require: \"grade_require\",\n ok: \"ok@core\",\n cancel: \"cancel@core\",\n delete: \"delete@core\",\n },\n invalid: {\n error: 'error',\n },\n completion: {\n completion_completed: \"completion_completed\",\n completion_incomplete: \"completion_incomplete\",\n aggregation_all: \"aggregation_all\",\n aggregation_any: \"aggregation_any\",\n aggregation_overall_all: \"aggregation_overall_all\",\n aggregation_overall_any: \"aggregation_overall_any\",\n completion_not_configured: \"completion_not_configured\",\n configure_completion: \"configure_completion\",\n },\n competency: {\n competency_not_configured: \"competency_not_configured\",\n configure_competency: \"configure_competency\",\n when: \"when\",\n required: \"required\",\n points: \"points@core_grades\",\n heading: \"competency_heading\",\n details: \"competency_details\",\n },\n badge: {\n share_badge: \"share_badge\",\n dateissued: \"dateissued\",\n dateexpire: \"dateexpire\",\n badgeinfo: \"badgeinfo\",\n },\n });\n\n /*\n * T-STUDYPLAN-ADVANCED\n */\n Vue.component('t-studyplan-advanced', {\n props: {\n value: {\n type: Object,\n default(){ return null;},\n },\n selectedpage: {\n type: Object,\n default(){ return null;},\n }\n\n },\n data() {\n return {\n force_scales: {\n selected_scale: null,\n result: [],\n },\n text: strings.studyplan_advanced,\n };\n },\n created() {\n },\n mounted() {\n },\n updated() {\n },\n computed: {\n scales(){\n return [{\n id: null,\n disabled: true,\n name: this.text.advanced_pick_scale,\n }].concat(this.value.advanced.force_scales.scales);\n },\n },\n methods: {\n force_scales_start(){\n // set confirmation box\n const self=this;\n this.$bvModal.msgBoxConfirm(this.text.advanced_force_scale_confirm,{\n title: this.text.advanced_force_scale_confirm,\n okVariant: 'danger',\n okTitle: this.text.confirm_ok,\n cancelTitle: this.text.confirm_cancel,\n }).then( value => {\n if(value == true){\n call([{\n methodname: 'local_treestudyplan_force_studyplan_scale',\n args: {\n studyplan_id: this.value.id,\n scale_id: this.force_scales.selected_scale,\n }\n }])[0].then(function(response){\n self.force_scales.result = response;\n }).catch(notification.exception);\n }\n });\n },\n export_page(format){\n const self = this;\n if(format == undefined || ![\"json\",\"csv\"].includes(format)){\n format = \"json\";\n }\n call([{\n methodname: 'local_treestudyplan_export_page',\n args: {\n page_id: this.selectedpage.id,\n format: format,\n },\n }])[0].then(function(response){\n\n download(self.value.shortname+\".page.\"+format,response.content,response.format);\n }).catch(notification.exception);\n },\n export_plan(){\n const self = this;\n call([{\n methodname: 'local_treestudyplan_export_plan',\n args: {\n studyplan_id: this.value.id,\n format: \"json\",\n },\n }])[0].then(function(response){\n download(self.value.shortname+\".plan.json\",response.content,response.format);\n }).catch(notification.exception);\n },\n bulk_course_timing() {\n const self = this;\n call([{\n methodname: 'local_treestudyplan_bulk_course_timing',\n args: {\n page_id: this.selectedpage.id,\n },\n }])[0].then(function(response){\n if(response.success){\n // Reloading the webpage saves trouble reloading the specific page updated.\n location.reload();\n } else {\n this.$bvModal.msgBoxOk(response.msg, {title: \"Could not set bulk course timing\"} );\n debug.error(\"Could not set bulk course timing: \",response.msg);\n }\n }).catch(notification.exception);\n },\n import_studylines(){\n //const self = this;\n upload((filename,content)=>{\n call([{\n methodname: 'local_treestudyplan_import_studylines',\n args: {\n page_id: this.selectedpage.id,\n content: content,\n format: \"application/json\",\n },\n }])[0].then(function(response){\n if(response.success){\n location.reload();\n } else {\n this.$bvModal.msgBoxOk(response.msg, {title: \"Import failed\"} );\n debug.error(\"Import failed: \",response.msg);\n }\n }).catch(notification.exception);\n }, \"application/json\");\n },\n import_pages(){\n //const self = this;\n upload((filename,content)=>{\n call([{\n methodname: 'local_treestudyplan_import_pages',\n args: {\n studyplan_id: this.value.id,\n content: content,\n format: \"application/json\",\n },\n }])[0].then(function(response){\n if(response.success){\n location.reload();\n } else {\n this.$bvModal.msgBoxOk(response.msg, {title: \"Import failed\"} );\n debug.error(\"Import failed: \",response.msg);\n }\n }).catch(notification.exception);\n }, \"application/json\");\n },\n purge_studyplan(){\n call([{\n methodname: 'local_treestudyplan_delete_studyplan',\n args: {\n id: this.value.id,\n force: true,\n },\n }])[0].then(function(response){\n if(response.success){\n location.reload();\n } else {\n this.$bvModal.msgBoxOk(response.msg, {title: \"Could not delete plan \"} );\n debug.error(\"Could not delete plan: \",response.msg);\n }\n }).catch(notification.exception);\n },\n purge_studyplanpage(){\n if (this.selectedpage) {\n call([{\n methodname: 'local_treestudyplan_delete_studyplanpage',\n args: {\n id: this.selectedpage.id,\n force: true,\n },\n }])[0].then(function(response){\n if(response.success){\n location.reload();\n } else {\n this.$bvModal.msgBoxOk(response.msg, {title: \"Could not delete page\"} );\n debug.error(\"Could not delete page: \",response.msg);\n }\n }).catch(notification.exception);\n }\n },\n cascade_cohortsync(){\n const self = this;\n call([{\n methodname: 'local_treestudyplan_cascade_cohortsync',\n args: {\n studyplan_id: this.value.id,\n },\n }])[0].then(function(response){\n self.$bvModal.msgBoxOk(response.success?self.text.success$core:self.text.error$core,\n { title: self.text.advanced_cascade_cohortsync});\n }).catch(notification.exception);\n },\n modal_close(){\n this.force_scales.result = [];\n }\n },\n template:\n `\n <span>\n <a v-if=\"value.advanced\"\n href='#'\n @click.prevent=''\n class='text-danger'\n v-b-modal=\"'t-studyplan-'+value.id+'-advanced'\"\n ><i class='fa fa-wrench'></i> {{text.advanced_tools}}</a>\n <b-modal v-if=\"value.advanced\"\n :id=\"'t-studyplan-'+value.id+'-advanced'\"\n size=\"lg\"\n :title=\"text.advanced_tools_heading\"\n ok-only\n @hide=\"modal_close\"\n body-class=\"p-0\"\n >\n <b-tabs card>\n <b-tab :title=\"text.advanced_warning_title\" active>\n {{ text.advanced_warning}}\n </b-tab>\n <b-tab :title=\"text.advanced_course_manipulation_title\" >\n <h3>{{ text.advanced_cascade_cohortsync_title}}</h3>\n <p>{{ text.advanced_cascade_cohortsync_desc}}</p>\n <p class=\"mt-2\"><b-button\n variant=\"info\"\n @click=\"cascade_cohortsync\"\n >{{ text.advanced_cascade_cohortsync}}</b-button></p>\n <h3>{{ text.advanced_bulk_course_timing}}</h3>\n <p>{{ text.advanced_bulk_course_timing_desc}}</p>\n <p>{{text.currentpage}} <i>{{selectedpage.fullname}}</i></p>\n <p class=\"mt-2\"><b-button\n variant=\"info\"\n @click=\"bulk_course_timing\"\n >{{ text.advanced_bulk_course_timing}}</b-button></p>\n <template v-if=\"['bistate','tristate'].includes(value.aggregation)\">\n <h3>{{ text.advanced_force_scale_title}}</h3>\n {{ text.advanced_force_scale_desc}}\n <p class=\"mt-2\"><b-form-select v-model=\"force_scales.selected_scale\"\n :options=\"scales\" text-field=\"name\" value-field=\"id\"\n ></b-form-select>\n <b-button\n variant=\"danger\"\n :disabled=\"force_scales.selected_scale == null\"\n @click=\"force_scales_start\"\n >{{ text.advanced_force_scale_button}}</b-button>\n </p>\n <p class=\"mt-2\">\n <ul class='t-advanced-scrollable' v-if=\"force_scales.result.length > 0\">\n <li v-for=\"c in force_scales.result\">\n <span class='t-advanced-coursename'>{{c.course.fullname}}</span>\n <ul v-if=\"c.grades.length > 0\">\n <li v-for='g in c.grades'\n ><span class='t-advanced-gradename'><span v-html=\"g.name\"></span></span>\n <span v-if=\"g.changed == 'converted'\" class='t-advanced-status changed'\n >{{text.advanced_converted}}</span\n ><span v-else-if=\"g.changed == 'skipped'\" class='t-advanced-status skipped'\n >{{text.advanced_skipped}}</span\n ><span v-else class='t-advanced-status skipped'\n >{{text.advanced_error}}</span\n ></li>\n </ul>\n </li>\n </ul>\n </p>\n </template>\n </b-tab>\n <b-tab :title='text.advanced_backup_restore'>\n <h3>{{ text.advanced_backup }}</h3>\n <p><b-button\n variant=\"primary\"\n @click=\"export_page('json')\"\n >{{ text.advanced_backup_page }}</b-button>\n {{text.currentpage}} <i>{{selectedpage.fullname}}</i></p>\n <p><b-button\n variant=\"primary\"\n @click=\"export_plan('json')\"\n >{{ text.advanced_backup_plan }}</b-button></p>\n <h3>{{ text.advanced_restore }}</h3>\n <p><b-button\n variant=\"danger\"\n @click=\"import_studylines\"\n >{{ text.advanced_restore_lines}}</b-button></p>\n <p><b-button\n variant=\"danger\"\n @click=\"import_pages\"\n >{{ text.advanced_restore_pages }}</b-button></p>\n <h3>{{ text.advanced_export }}</h3>\n <p><b-button\n variant=\"primary\"\n @click=\"export_page('csv')\"\n >{{ text.advanced_export_csv_page }}</b-button>\n {{text.currentpage}} <i>{{selectedpage.fullname}}</i></p>\n </b-tab>\n <b-tab :title='text.advanced_purge'>\n <p>{{text.advanced_purge_page_expl}}</p>\n <p>{{text.currentpage}} <i>{{selectedpage.fullname}}</i></p>\n <p><b-button\n variant=\"danger\"\n @click=\"purge_studyplanpage\"\n >{{ text.advanced_purge_page}}</b-button></p>\n <p>{{text.advanced_purge_plan_expl}}</p>\n <p><b-button\n variant=\"danger\"\n @click=\"purge_studyplan\"\n >{{ text.advanced_purge_plan}}</b-button></p>\n </b-tab>\n </b-tabs>\n </b-modal>\n </span>\n `\n });\n\n\n /*\n * T-STUDYPLAN-EDIT\n */\n Vue.component('t-studyplan-edit', {\n props: {\n 'value' :{\n type: Object,\n default(){ return null;},\n },\n 'mode' :{\n type: String,\n default() { return \"edit\";},\n },\n 'type' :{\n type: String,\n default() { return \"link\";},\n },\n 'variant' : {\n type: String,\n default() { return \"\";},\n },\n 'contextid': {\n type: Number,\n default: 1\n },\n },\n data() {\n return {\n text: strings.studyplan_edit,\n };\n },\n computed: {\n },\n methods: {\n planSaved(updatedplan){\n const self = this;\n debug.info(\"Got new plan data\",updatedplan);\n\n if(self.mode == 'create'){\n // Inform parent of the details of the newly created plan\n self.$emit(\"created\",updatedplan);\n }\n else {\n // determine if the plan moved context...\n const moved_from = self.value.context_id;\n const moved_to = updatedplan.context_id;\n const moved = (moved_from != moved_to);\n\n if(updatedplan.pages[0].periods != self.value.pages[0].periods){\n // If the pages changed, just reload the entire model for the plan\n call([{\n methodname: 'local_treestudyplan_get_studyplan_map',\n args: { id: self.value.id}\n }])[0].then(function(response){\n self.value = ProcessStudyplan(response,true);\n debug.info('studyplan processed');\n self.$emit('input',self.value);\n }).catch(function(error){\n notification.exception(error);\n });\n } else {\n // Copy updated fields and trigger update\n objCopy(self.value,updatedplan,STUDYPLAN_EDITOR_FIELDS);\n self.$emit('input',self.value);\n if(moved){\n self.$emit('moved',self.value, moved_from, moved_to);\n }\n }\n }\n },\n }\n ,\n template:\n `\n <span class='s-studyplan-edit'>\n <mform \n name=\"studyplan_editform\" \n :params=\"{studyplan_id: value.id, mode: mode, contextid: contextid }\" \n @saved=\"planSaved\"\n :variant=\"variant\"\n :type=\"type\"\n :title=\"(mode == 'create')?text.studyplan_add:text.studyplan_edit\"\n ><slot><i class='fa fa-gear'></i></slot></mform>\n </span>\n `\n });\n\n /*\n * T-STUDYPLAN-EDIT\n */\n Vue.component('t-studyplan-page-edit', {\n props: {\n 'value' :{\n type: Object,\n default(){ return null;},\n },\n 'mode' :{\n type: String,\n default() { return \"edit\";},\n },\n 'type' :{\n type: String,\n default() { return \"link\";},\n },\n 'variant' : {\n type: String,\n default() { return \"\";},\n },\n 'studyplan': {\n type: Object,\n },\n },\n data() {\n return {\n text: strings.studyplan_edit,\n };\n },\n computed: {\n },\n methods: {\n planSaved(updatedpage){\n const self = this;\n debug.info(\"Got new page data\",updatedpage);\n\n if(self.mode == 'create'){\n // Inform parent of the details of the newly created plan\n self.$emit(\"created\",updatedpage);\n }\n else {\n const page = ProcessStudyplanPage(updatedpage);\n debug.info('studyplan page processed');\n\n if (self.value.periods < page.periods) {\n this.$bvModal.msgBoxOk(this.text.info_periodsextended, {\n title: this.text.warning,\n okVariant: 'success',\n centered: true\n });\n }\n self.$emit('input',page);\n\n }\n },\n }\n ,\n template:\n `\n <span class='s-studyplan-page-edit'>\n <mform \n name=\"studyplanpage_editform\" \n :params=\"{page_id: value.id, studyplan_id: studyplan.id, mode: mode }\" \n @saved=\"planSaved\"\n :variant=\"variant\"\n :type=\"type\"\n :title=\"(mode == 'create')?text.studyplanpage_add:text.studyplanpage_edit\"\n ><slot><i class='fa fa-gear'></i></slot></mform>\n </span>\n `\n });\n\n\n /*\n * T-STUDYPLAN-ASSOCIATE\n */\n Vue.component('t-studyplan-associate', {\n props: ['value',],\n data() {\n return {\n show: false,\n config: {\n userfields: [\n { key: \"selected\",},\n { key: \"firstname\", \"sortable\": true,},\n { key: \"lastname\", \"sortable\": true,},\n ],\n cohortfields:[\n { key: \"selected\",},\n { key: \"name\", \"sortable\": true,},\n { key: \"context\", \"sortable\": true,},\n ]\n },\n association: {\n cohorts: [],\n users: [],\n },\n loading: {\n cohorts: false,\n users: false,\n },\n search: {users: [], cohorts:[]},\n selected: {\n search: {users: [] , cohorts:[]},\n associated: {users: [] , cohorts:[]}\n },\n text: strings.studyplan_associate,\n };\n },\n created() {\n\n },\n mounted() {\n },\n updated() {\n\n },\n methods: {\n showModal(){\n this.show = true;\n this.loadAssociations();\n },\n cohortOptionModel(c){\n return {\n value: c.id,\n text: c.name + ' (' + c.context.path.join(' / ') + ')',\n };\n },\n userOptionModel(u){\n return {\n value: u.id,\n text: u.firstname + ' ' + u.lastname,\n };\n },\n loadAssociations(){\n const self = this;\n self.loading.cohorts = true;\n self.loading.users = true;\n call([{\n methodname: 'local_treestudyplan_associated_users',\n args: { studyplan_id: self.value.id,}\n }])[0].then(function(response){\n self.association.users = response.map(self.userOptionModel);\n self.loading.users = false;\n }).catch(notification.exception);\n\n call([{\n methodname: 'local_treestudyplan_associated_cohorts',\n args: { studyplan_id: self.value.id,}\n }])[0].then(function(response){\n self.association.cohorts = response.map(self.cohortOptionModel);\n self.loading.cohorts = false;\n }).catch(notification.exception);\n },\n searchCohorts(searchtext){\n const self = this;\n\n if(searchtext.length > 0)\n {\n call([{\n methodname: 'local_treestudyplan_list_cohort',\n args: { like: searchtext, exclude_id: self.value.id}\n }])[0].then(function(response){\n self.search.cohorts = response.map(self.cohortOptionModel);\n }).catch(notification.exception);\n }\n else {\n self.search.cohorts = [];\n }\n },\n cohortAssociate(){\n const self = this;\n let requests = [];\n const associated = self.association.cohorts;\n const search = self.search.cohorts;\n const searchselected = self.selected.search.cohorts;\n for(const i in searchselected){\n const r = searchselected[i];\n requests.push({\n methodname: 'local_treestudyplan_connect_cohort',\n args: {studyplan_id: self.value.id, cohort_id: r},\n fail: notification.exception,\n done: function(response){\n if(response.success){\n transportItem(associated,search,r);\n }\n }\n });\n }\n call(requests);\n },\n cohortDisassociate(){\n const self = this;\n let requests = [];\n const associatedselected = self.selected.associated.cohorts;\n const associated = self.association.cohorts;\n const search = self.search.cohorts;\n for(const i in associatedselected){\n const r = associatedselected[i];\n requests.push({\n methodname: 'local_treestudyplan_disconnect_cohort',\n args: {studyplan_id: self.value.id, cohort_id: r},\n fail: notification.exception,\n done: function(response){\n if(response.success){\n transportItem(search,associated,r);\n }\n }\n });\n }\n call(requests);\n },\n searchUsers(searchtext){\n const self = this;\n if(searchtext.length > 0)\n {\n call([{\n methodname: 'local_treestudyplan_find_user',\n args: { like: searchtext, exclude_id: self.value.id}\n }])[0].then(function(response){\n self.search.users = response.map(self.userOptionModel);\n }).catch(notification.exception);\n }\n else {\n self.search.users = [];\n }\n },\n userAssociate(){\n const self = this;\n let requests = [];\n const associated = self.association.users;\n const search = self.search.users;\n const searchselected = self.selected.search.users;\n for(const i in searchselected){\n const r = searchselected[i];\n\n requests.push({\n methodname: 'local_treestudyplan_connect_user',\n args: {studyplan_id: self.value.id, user_id: r},\n fail: notification.exception,\n done: function(response){\n if(response.success){\n transportItem(associated,search,r);\n }\n }\n });\n }\n call(requests);\n },\n userDisassociate(){\n const self = this;\n let requests = [];\n const associated = self.association.users;\n const associatedselected = self.selected.associated.users;\n const search = self.search.users;\n for(const i in associatedselected){\n const r = associatedselected[i];\n\n requests.push({\n methodname: 'local_treestudyplan_disconnect_user',\n args: {studyplan_id: self.value.id, user_id: r},\n fail: notification.exception,\n done: function(response){\n if(response.success){\n transportItem(search,associated,r);\n }\n }\n });\n }\n call(requests);\n },\n }\n ,\n template:\n`\n<span class='s-studyplan-associate'\n ><a href='#' @click.prevent=\"showModal\" ><slot><i class='fa fa-users'></i></slot></a>\n <b-modal\n v-model=\"show\"\n size=\"lg\"\n ok-variant=\"primary\"\n :title=\"text.associations + ' - ' + value.name\"\n ok-only>\n <b-tabs class='s-studyplan-associate-window'>\n <b-tab :title=\"text.cohorts\">\n <b-container>\n <b-row class='mb-2 mt-2'>\n <b-col>{{text.associated_cohorts}}</b-col>\n <b-col>{{text.associate_cohorts}}</b-col>\n </b-row>\n <b-row class='mb-2'>\n <b-col>\n </b-col>\n <b-col>\n <b-form-input\n type=\"text\" @input=\"searchCohorts($event)\"\n :placeholder=\"text.search\"></b-form-input>\n </b-col>\n </b-row>\n <b-row>\n <b-col>\n <b-form-select\n multiple\n v-model=\"selected.associated.cohorts\"\n :options=\"association.cohorts\"\n :select-size=\"10\"\n ></b-form-select>\n </b-col>\n <b-col>\n <b-form-select\n multiple\n v-model=\"selected.search.cohorts\"\n :options=\"search.cohorts\"\n :select-size=\"10\"\n ></b-form-select>\n </b-col>\n </b-row>\n <b-row class='mt-2'>\n <b-col>\n <b-button variant='danger' @click=\"cohortDisassociate()\"\n ><i class='fa fa-chain-broken'></i> {{text.delete_association}}</b-button>\n </b-col>\n <b-col>\n <b-button variant='success' @click=\"cohortAssociate()\"\n ><i class='fa fa-link'></i> {{text.add_association}}</b-button>\n </b-col>\n </b-row>\n </b-container>\n </b-tab>\n <b-tab :title=\"text.users\">\n <b-container>\n <b-row class='mb-2 mt-2'>\n <b-col>{{text.associated_users}}</b-col>\n <b-col>{{text.associate_users}}</b-col>\n </b-row>\n <b-row class='mb-2'>\n <b-col>\n </b-col>\n <b-col>\n <b-form-input\n type=\"text\"\n @input=\"searchUsers($event)\"\n placeholder=\"Search users\"></b-form-input>\n </b-col>\n </b-row>\n <b-row>\n <b-col>\n <b-form-select\n multiple\n v-model=\"selected.associated.users\"\n :options=\"association.users\"\n :select-size=\"10\"\n ></b-form-select>\n </b-col>\n <b-col>\n <b-form-select\n multiple\n v-model=\"selected.search.users\"\n :options=\"search.users\"\n :select-size=\"10\"\n ></b-form-select>\n </b-col>\n </b-row>\n <b-row class='mt-2'>\n <b-col>\n <b-button variant='danger' @click=\"userDisassociate()\"\n ><i class='fa fa-chain-broken'></i> {{text.delete_association}}</b-button>\n </b-col>\n <b-col>\n <b-button variant='success' @click=\"userAssociate()\"\n ><i class='fa fa-link'></i> {{text.add_association}}</b-button>\n </b-col>\n </b-row>\n </b-container>\n </b-tab>\n </b-tabs>\n </b-modal>\n</span>\n`\n });\n\n /*******************\n *\n * Period editor\n *\n *************/\n\n Vue.component('t-period-edit', {\n props: {\n 'value' :{\n type: Object,\n default(){ return null;},\n },\n 'type' :{\n type: String,\n default() { return \"link\";},\n },\n 'variant' : {\n type: String,\n default() { return \"\";},\n },\n 'minstart' : {\n type: String,\n default() { return null;},\n },\n 'maxend' : {\n type: String,\n default() { return null;},\n }\n },\n data() {\n return {\n show: false,\n editdata: {\n fullname: '',\n shortname: '',\n startdate: (new Date()).getFullYear() + '-08-01',\n enddate: ((new Date()).getFullYear()+1) + '-08-01',\n },\n text: strings.period_edit,\n };\n },\n created() {\n },\n mounted() {\n },\n updated() {\n\n },\n computed: {\n },\n methods: {\n editStart(){\n objCopy(this.editdata,this.value,PERIOD_EDITOR_FIELDS);\n this.show = true;\n },\n editFinish(){\n const self = this;\n let args = { 'id': this.value.id };\n\n objCopy(args,this.editdata,PERIOD_EDITOR_FIELDS);\n\n call([{\n methodname: 'local_treestudyplan_edit_period',\n args: args\n }])[0].then(function(response){\n objCopy(self.value,response,PERIOD_EDITOR_FIELDS);\n self.$emit('input',self.value);\n self.$emit('edited',self.value);\n }).catch(notification.exception);\n },\n refresh(){\n const self = this;\n call([{\n methodname: 'local_treestudyplan_get_period',\n args: { 'id': this.value.id },\n }])[0].then(function(response){\n objCopy(self.value,response,PERIOD_EDITOR_FIELDS);\n self.$emit('input',self.value);\n }).catch(notification.exception);\n },\n add_day(date,days) {\n if( days === undefined ){\n days = 1;\n }\n return add_days(date,days);\n },\n sub_day(date,days) {\n if( days === undefined ){\n days = 1;\n }\n return add_days(date,0 - days);\n },\n }\n ,\n template:\n `\n <span class='t-period-edit'>\n <b-button :variant=\"variant\" v-if='type == \"button\"' @click.prevent='editStart()'\n ><slot><i class='fa fa-gear'></i></slot></b-button>\n <a variant=\"variant\" v-else href='#' @click.prevent='editStart()'\n ><slot><i class='fa fa-gear'></i></slot></a>\n <b-modal\n v-model=\"show\"\n size=\"lg\"\n ok-variant=\"primary\"\n :title=\"text.edit\"\n @ok=\"editFinish()\"\n :ok-disabled=\"Math.min(editdata.fullname.length,editdata.shortname.length) == 0\"\n >\n <b-container>\n <b-row>\n <b-col cols=\"4\">{{ text.fullname}}</b-col>\n <b-col cols=\"8\">\n <b-form-input v-model=\"editdata.fullname\"\n :state='editdata.fullname.length>0'\n ></b-form-input>\n </b-col>\n </b-row>\n <b-row>\n <b-col cols=\"4\">{{ text.shortname}}</b-col>\n <b-col cols=\"8\">\n <b-form-input v-model=\"editdata.shortname\"\n :state='editdata.shortname.length>0'\n ></b-form-input>\n </b-col>\n </b-row>\n <b-row>\n <b-col cols=\"4\">{{ text.studyplan_startdate}}</b-col>\n <b-col cols=\"8\">\n <b-form-datepicker\n start-weekday=\"1\"\n v-model=\"editdata.startdate\"\n :min=\"(minstart ? minstart : '')\"\n :max=\"sub_day(value.enddate)\"\n ></b-form-datepicker>\n </b-col>\n </b-row>\n <b-row>\n <b-col cols=\"4\">{{ text.studyplan_enddate}}</b-col>\n <b-col cols=\"8\">\n <b-form-datepicker\n start-weekday=\"1\"\n v-model=\"editdata.enddate\"\n :min=\"add_day(value.startdate)\"\n :max=\"(maxend ? maxend : '')\"\n ></b-form-datepicker>\n </b-col>\n </b-row>\n </b-container>\n </b-modal>\n </span>\n `\n });\n\n // TAG: Start studyplan component\n /*\n * T-STUDYPLAN\n */\n Vue.component('t-studyplan', {\n props: [ 'value', 'index', 'initeditmode'],\n data() {\n return {\n config: {\n userfields: [\n { key: \"selected\",},\n { key: \"firstname\", \"sortable\": true,},\n { key: \"lastname\", \"sortable\": true,},\n ],\n cohortfields:[\n { key: \"selected\",},\n { key: \"name\", \"sortable\": true,},\n { key: \"context\", \"sortable\": true,},\n ]\n },\n create: {\n studyline: {\n 'name': '',\n 'shortname': '',\n 'color': '#DDDDDD',\n },\n page: {\n 'id': -1,\n 'name' : '',\n 'shortname' : ''\n }\n },\n edit: {\n toolbox_shown: false,\n studyline: {\n editmode: false,\n data: {\n name: '',\n shortname: '',\n color: '#DDDDDD',\n },\n original: {},\n },\n studyplan: {\n data: {\n name: '',\n shortname: '',\n description: '',\n slots : 4,\n startdate: '2020-08-01',\n enddate: '',\n aggregation: '',\n aggregation_config: '',\n aggregation_info: {\n useRequiredGrades: true,\n useItemCondition: false,\n },\n\n },\n original: {},\n }\n },\n text: strings.studyplan_text,\n cache: {\n linelayers: {},\n },\n selectedpageindex: 0,\n emptyline: {\n id: -1,\n name: '<No study lines defined>',\n shortname: '<No study lines>',\n color: '#FF0000',\n filterslots: [{}],\n courseslots: [{}]\n }\n };\n },\n created() {\n const self = this;\n // Listener for the signal that a new connection was made and needs to be drawn\n // Sent by the incoming item - By convention, outgoing items are responsible for drawing the lines\n ItemEventBus.$on('editModeSet', this.onMoodleEditModeChanged);\n ItemEventBus.$on('coursechange', () => {\n self.$emit('pagechanged',this.selectedpage);\n });\n },\n mounted() {\n /*if(this.value.pages[0].studylines.length == 0){\n // start in editmode if studylines on first page are empty\n this.edit.studyline.editmode = true;\n }*/\n this.edit.studyline.editmode = this.initeditmode;\n this.$root.$emit('redrawLines');\n this.$emit('pagechanged',this.selectedpage);\n },\n updated() {\n this.$root.$emit('redrawLines');\n ItemEventBus.$emit('redrawLines');\n },\n computed: {\n selectedpage() {\n return this.value.pages[this.selectedpageindex];\n }\n },\n methods: {\n onMoodleEditModeChanged(mode){\n this.edit.studyline.editmode = mode;\n },\n columns(page) {\n return 1+ (page.periods * 2);\n },\n columns_stylerule(page) {\n // Uses css variables, so width for slots and filters can be configured in css\n let s = \"grid-template-columns: var(--studyplan-filter-width)\"; // use css variable here\n for(let i=0; i<page.periods;i++){\n s+= \" var(--studyplan-course-width) var(--studyplan-filter-width)\";\n }\n return s+\";\";\n },\n trashbin_accepts(type){\n if(type.item){\n return true;\n } else {\n return false;\n }\n },\n countLineLayers(line,page){\n // For some optimization, we cache the value of this calculation for about a second\n // Would be a lot nicer if we could use a computed property for this.....\n if( this.cache.linelayers[line.id]\n && ((new Date()) - this.cache.linelayers[line.id].timestamp < 1000 )\n ){\n return this.cache.linelayers[line.id].value;\n }\n else\n {\n let maxLayer = -1;\n for(let i = 0; i <= page.periods; i++){\n if(line.slots[i]){\n const slot = line.slots[i];\n // Determine the amount of used layers in a studyline slit\n for(const ix in line.slots[i].courses){\n const item = line.slots[i].courses[ix];\n if(item.layer > maxLayer){\n maxLayer = item.layer;\n }\n }\n for(const ix in line.slots[i].filters){\n const item = line.slots[i].filters[ix];\n if(item.layer > maxLayer){\n maxLayer = item.layer;\n }\n }\n\n }\n }\n this.cache.linelayers[line.id] = {\n value: (maxLayer + 1),\n timestamp: (new Date()),\n };\n return maxLayer+1;\n }\n },\n slotsempty(slots) {\n if(Array.isArray(slots)){\n let count = 0;\n for(let i = 0; i < slots.length; i++) {\n if(Array.isArray(slots[i].courses)){\n count += slots[i].courses.length;\n }\n if(Array.isArray(slots[i].filters)){\n count += slots[i].filters.length;\n }\n }\n return (count == 0);\n } else {\n return false;\n }\n },\n movedStudyplan(plan,from,to) {\n this.$emit('moved',plan,from,to); // Throw the event up....\n },\n addStudyLine(page,newlineinfo) {\n call([{\n methodname: 'local_treestudyplan_add_studyline',\n args: {\n 'page_id': page.id,\n 'name': newlineinfo.name,\n 'shortname': newlineinfo.shortname,\n 'color': newlineinfo.color,\n 'sequence': page.studylines.length,\n }\n }])[0].then(function(response){\n page.studylines.push(response);\n newlineinfo.name = '';\n newlineinfo.shortname = '';\n newlineinfo.color = \"#dddddd\";\n }).catch(notification.exception);\n },\n editLineStart(line) {\n Object.assign(this.edit.studyline.data,line);\n this.edit.studyline.original = line;\n this.$bvModal.show('modal-edit-studyline-'+this.value.id);\n },\n editLineFinish() {\n let editedline = this.edit.studyline.data;\n let originalline = this.edit.studyline.original;\n call([{\n methodname: 'local_treestudyplan_edit_studyline',\n args: { 'id': editedline.id,\n 'name': editedline.name,\n 'shortname': editedline.shortname,\n 'color': editedline.color,}\n }])[0].then(function(response){\n originalline['name'] = response['name'];\n originalline['shortname'] = response['shortname'];\n originalline['color'] = response['color'];\n }).catch(notification.exception);\n },\n deleteLine(page,line) {\n const self=this;\n get_strings([\n {key: 'studyline_confirm_remove', param: line.name, component: 'local_treestudyplan' },\n {key: 'delete', component: 'core' },\n ]).then(function(s){\n self.$bvModal.msgBoxConfirm(s[0], {\n okTitle: s[1],\n okVariant: 'danger',\n }).then(function(modalresponse){\n if(modalresponse){\n call([{\n methodname: 'local_treestudyplan_delete_studyline',\n args: { 'id': line.id, }\n }])[0].then(function(response){\n if(response.success == true){\n let index = page.studylines.indexOf(line);\n page.studylines.splice(index, 1);\n }\n }).catch(notification.exception);\n }\n });\n });\n },\n reorderLines(event,lines){\n\n // apply reordering\n event.apply(lines);\n // send the new sequence to the server\n let sequence = [];\n for(let idx in lines)\n {\n sequence.push({'id': lines[idx].id,'sequence': idx});\n }\n call([{\n methodname: 'local_treestudyplan_reorder_studylines',\n args: { 'sequence': sequence }\n }])[0].then(function(response){\n }).catch(notification.exception);\n },\n deletePlan(studyplan){\n const self=this;\n get_strings([\n {key: 'studyplan_confirm_remove', param: studyplan.name, component: 'local_treestudyplan' },\n {key: 'delete', component: 'core' },\n ]).then(function(s){\n self.$bvModal.msgBoxConfirm(s[0], {\n okTitle: s[1],\n okVariant: 'danger',\n }).then(function(modalresponse){\n if(modalresponse){\n call([{\n methodname: 'local_treestudyplan_delete_studyplan',\n args: { 'id': studyplan.id, force: true}\n }])[0].then(function(response){\n if(response.success == true){\n self.$root.$emit(\"studyplanRemoved\",studyplan);\n }\n }).catch(notification.exception);\n }\n });\n });\n },\n deleteStudyItem(event){\n //const self = this;\n let item = event.data;\n call([{\n methodname: 'local_treestudyplan_delete_studyitem',\n args: { 'id': item.id, }\n }])[0].then(function(response){\n if(response.success == true){\n event.source.$emit('cut',event);\n }\n }).catch(notification.exception);\n\n },\n showslot(page,line,index, layeridx, type){\n // check if the slot should be hidden because a previous slot has an item with a span\n // so big that it hides this slot\n const forGradable = (type == 'gradable')?true:false;\n const periods = page.periods;\n let show = true;\n for(let i = 0; i < periods; i++){\n if(line.slots[index-i] && line.slots[index-i].courses){\n const list = line.slots[index-i].courses;\n for(const ix in list){ // Really wish that 'for of' would work with the minifier moodle uses\n const item = list[ix];\n if(item.layer == layeridx){\n if(forGradable){\n if(i > 0 && (item.span - i) > 0){\n show = false;\n }\n } else {\n if((item.span - i) > 1){\n show = false;\n }\n }\n }\n }\n }\n }\n\n return show;\n },\n periodEdited(pi) {\n const prev = this.$refs[\"periodeditor-\" + (pi.period - 1)][0];\n if(prev) {\n prev.refresh();\n }\n const next = this.$refs[\"periodeditor-\" + (pi.period + 1)][0];\n if(next) {\n next.refresh();\n }\n },\n add_day(date,days) {\n if( days === undefined ){\n days = 1;\n }\n return add_days(date,days);\n },\n sub_day(date,days) {\n if( days === undefined ){\n days = 1;\n }\n return add_days(date,0 - days);\n },\n toolbox_switched(event){\n this.$emit('toggletoolbox',event);\n },\n pagecreated(page) {\n this.value.pages.push(page);\n },\n selectedpageChanged(newTabIndex,prevTabIndex) {\n const page = this.value.pages[newTabIndex];\n this.$emit('pagechanged',page);\n }\n }\n ,\n template:\n `\n <div>\n <div class='controlbox t-studyplan-controlbox'>\n <div class=\"controlbox-group\">\n <b-form-checkbox v-model=\"edit.studyline.editmode\" class=\"sw-studyplan-toolbar\" switch\n @change=\"toolbox_switched(edit.toolbox_shown && !edit.studyline.editmode); \"\n >{{ text.studyline_editmode }}</b-form-checkbox>\n <b-form-checkbox v-if=\"!edit.studyline.editmode\" v-model=\"edit.toolbox_shown\" class=\"sw-studyplan-toolbar\" switch\n @change=\"toolbox_switched\"\n >{{ text.toolbox_toggle}}</b-form-checkbox>\n <drop\n mode='copy'\n class='t-item-deletebox text-danger border-danger'\n @drop='deleteStudyItem'\n :accepts-type=\"trashbin_accepts\"\n ><i class='fa fa-trash'></i>\n </drop>\n </div>\n <div class=\"controlbox-group\">\n <span class='control editable'>\n <t-studyplan-advanced v-model=\"value\" :selectedpage=\"selectedpage\"></t-studyplan-advanced>\n </span>\n <span class='control editable'>\n <t-studyplan-associate\n v-model=\"value\"><i class='fa fa-users'></i> {{text.associations}}</t-studyplan-associate>\n </span>\n <span class='control editable'>\n <t-studyplan-edit v-model=\"value\" @moved=\"movedStudyplan\" \n ><i class='fa fa-gear'></i> {{text.edit$core}}</t-studyplan-edit>\n </span>\n <span class='control deletable'>\n <a v-if='value.pages.length == 0' href='#' @click='deletePlan(value)'\n ><i class='text-danger fa fa-trash'></i></a>\n </span>\n </div>\n </div>\n <b-card no-body>\n <b-tabs \n v-model='selectedpageindex' \n @activate-tab='selectedpageChanged'\n content-class=\"mt-1\">\n <!-- New Tab Button (Using tabs-end slot) -->\n <template #tabs-end>\n <t-studyplan-page-edit \n :studyplan=\"value\"\n v-model=\"create.page\"\n type=\"link\"\n mode=\"create\"\n @created=\"pagecreated\"\n ><i class='fa fa-plus'></i></t-studyplan-page-edit>\n </template>\n <b-tab\n v-for=\"(page,pageindex) in value.pages\"\n :key=\"page.id\"\n >\n <template #title>\n {{page.shortname}}\n <t-studyplan-page-edit \n v-if=\"pageindex == selectedpageindex\"\n v-model=\"value.pages[pageindex]\"\n :studyplan=\"value\"\n type=\"link\"\n ></t-studyplan-page-edit>\n </template>\n <div class='t-studyplan-content-edit' \n v-if=\"edit.studyline.editmode\">\n <drop-list\n :items=\"page.studylines\"\n class=\"t-slot-droplist\"\n :accepts-type=\"'studyline-'+page.id\"\n xreorder=\"$event.apply(page.studylines)\"\n @reorder=\"reorderLines($event,page.studylines)\"\n mode=\"copy\"\n row\n >\n <template v-slot:item=\"{item}\">\n <drag\n :key=\"item.id\"\n class='t-studyline-drag'\n :data=\"item\"\n :type=\"'studyline-'+page.id\"\n >\n <template v-slot:drag-image>\n <i class=\"fa fa-arrows text-primary\"></i>\n </template>\n <t-studyline-edit\n v-model=\"item\"\n @edit='editLineStart(item)'\n @delete='deleteLine(page,item)'\n >\n <div v-if=\"!slotsempty(item.slots)\"> {{ text.editmode_modules_hidden}} </div>\n </t-studyline-edit>\n </drag>\n </template>\n </drop-list>\n </div>\n <div class='t-studyplan-content' v-else>\n <!-- Now paint the headings column -->\n <div class='t-studyplan-headings'>\n <s-studyline-header-heading :identifier='Number(page.id)'></s-studyline-header-heading>\n <template v-if=\"page.studylines.length > 0\">\n <t-studyline-heading v-for=\"(line,lineindex) in page.studylines\"\n :key=\"line.id\"\n @resize=\"headingresized(lineindex,$event)\"\n v-model=\"page.studylines[lineindex]\"\n :layers='countLineLayers(line,page)+1'\n :class=\" 't-studyline' + ((lineindex%2==0)?' odd ' :' even ' )\n + ((lineindex==0)?' first ':' ')\n + ((lineindex==page.studylines.length-1)?' last ':' ')\"\n ></t-studyline-heading>\n </template>\n <t-studyline-heading v-else\n @resize=\"headingresized(0,$event)\"\n \n :layers=\"1\"\n :class=\"'odd first last'\"\n ></t-studyline-heading>\n </div>\n <!-- Next, paint all the cells in the scrollable -->\n <div class=\"t-studyplan-scrollable\" >\n <div class=\"t-studyplan-timeline\" :style=\"columns_stylerule(page)\">\n <!-- add period information --> \n <template v-for=\"(n,index) in (page.periods+1)\">\n <s-studyline-header-period\n :identifier='Number(page.id)'\n v-if=\"index > 0\"\n v-model=\"page.perioddesc[index-1]\"\n ><t-period-edit\n :ref=\"'periodeditor-'+index\"\n @edited=\"periodEdited\"\n v-model=\"page.perioddesc[index-1]\"\n :minstart=\"(index > 1) ? add_day(page.perioddesc[index-2].startdate,2) : null\"\n :maxend=\"(index < page.periods) ? sub_day(page.perioddesc[index].enddate,2) : null\"\n ></t-period-edit\n ></s-studyline-header-period>\n <div class=\"s-studyline-header-filter\"></div>\n </template>\n\n <!-- Line by line add the items -->\n <!-- The grid layout handles putting it in rows and columns -->\n <template v-for=\"(line,lineindex) in page.studylines\"\n ><template v-for=\"(layernr,layeridx) in countLineLayers(line,page)+1\"\n ><template v-for=\"(n,index) in (page.periods+1)\"\n >\n <t-studyline-slot\n v-if=\"index > 0 && showslot(page,line, index, layeridx, 'gradable')\"\n type='gradable'\n v-model=\"line.slots[index].courses\"\n :key=\"'c-'+lineindex+'-'+index+'-'+layernr\"\n :slotindex=\"index\"\n :line=\"line\"\n :plan=\"value\"\n :page=\"page\"\n :period=\"page.perioddesc[index-1]\"\n :layer=\"layeridx\"\n :class=\"'t-studyline ' + ((lineindex%2==0)?' odd ':' even ')\n + ((lineindex==0 && layernr==1)?' first ':' ')\n + ((lineindex==page.studylines.length-1)?' last ':' ')\n + ((layernr == countLineLayers(line,page))?' lastlyr ':' ')\n + ((layernr == countLineLayers(line,page)+1)?' newlyr ':' ')\"\n ></t-studyline-slot\n ><t-studyline-slot\n type='filter'\n v-if=\"showslot(page,line, index, layeridx, 'filter')\"\n v-model=\"line.slots[index].filters\"\n :key=\"'f-'+lineindex+'-'+index+'-'+layernr\"\n :slotindex=\"index\"\n :line=\"line\"\n :plan=\"value\"\n :page=\"page\"\n :layer=\"layeridx\"\n :class=\"'t-studyline ' + ((lineindex%2==0)?' odd ':' even ')\n + ((lineindex==0 && layernr==1)?' first ':'')\n + ((lineindex==page.studylines.length-1)?' last ':' ')\n + ((index==page.periods)?' rightmost':'')\n + ((layernr == countLineLayers(line,page))?' lastlyr ':' ')\n + ((layernr == countLineLayers(line,page)+1)?' newlyr ':' ')\"\n ></t-studyline-slot\n ></template\n ></template\n ></template\n ></div>\n </div>\n </div>\n <div v-if=\"edit.studyline.editmode\" class='t-studyline-add ml-2 mt-1'>\n <a href=\"#\" v-b-modal=\"'modal-add-studyline-'+page.id\" @click=\"false;\"\n ><i class='fa fa-plus'></i>{{ text.studyline_add }}</a>\n </div>\n <b-modal\n :id=\"'modal-add-studyline-'+page.id\"\n size=\"lg\"\n :ok-title=\"text.add$core\"\n ok-variant=\"primary\"\n :title=\"text.studyline_add\"\n @ok=\"addStudyLine(page,create.studyline)\"\n :ok-disabled=\"Math.min(create.studyline.name.length,create.studyline.shortname.length) == 0\"\n >\n <b-container>\n <b-row>\n <b-col cols=\"3\">{{text.studyline_name}}</b-col>\n <b-col>\n <b-form-input v-model=\"create.studyline.name\" :placeholder=\"text.studyline_name_ph\"></b-form-input>\n </b-col>\n </b-row>\n <b-row>\n <b-col cols=\"3\">{{text.studyline_shortname}}</b-col>\n <b-col>\n <b-form-input\n v-model=\"create.studyline.shortname\"\n :placeholder=\"text.studyline_shortname_ph\"></b-form-input>\n </b-col>\n </b-row>\n <b-row>\n <b-col cols=\"3\">{{text.studyline_color}}</b-col>\n <b-col>\n <input type=\"color\" v-model=\"create.studyline.color\" />\n <!-- hsluv-picker v-model=\"create.studyline.color\" horizontal displaysize=\"175\" ></hsluv-picker -->\n </b-col>\n </b-row>\n </b-container>\n </b-modal>\n <b-modal\n :id=\"'modal-edit-studyline-'+page.id\"\n size=\"lg\"\n ok-variant=\"primary\"\n :title=\"text.studyline_edit\"\n @ok=\"editLineFinish()\"\n :ok-disabled=\"Math.min(edit.studyline.data.name.length,edit.studyline.data.shortname.length) == 0\"\n >\n <b-container>\n <b-row>\n <b-col cols=\"3\">{{ text.studyline_name}}</b-col>\n <b-col>\n <b-form-input\n v-model=\"edit.studyline.data.name\"\n :placeholder=\"text.studyline_name_ph\"></b-form-input>\n </b-col>\n </b-row>\n <b-row>\n <b-col cols=\"3\">{{ text.studyline_shortname}}</b-col>\n <b-col>\n <b-form-input\n v-model=\"edit.studyline.data.shortname\"\n :placeholder=\"text.studyline_shortname_ph\"></b-form-input>\n </b-col>\n </b-row>\n <b-row>\n <b-col cols=\"3\">{{ text.studyline_color}}</b-col>\n <b-col>\n <input type=\"color\" v-model=\"edit.studyline.data.color\" />\n </b-col>\n </b-row>\n </b-container>\n </b-modal>\n </b-tab>\n </b-tabs>\n </b-card>\n </div>\n `\n });\n\n\n /*\n * T-STUDYLINE-HEADER\n */\n Vue.component('t-studyline-heading', {\n props: {\n value : {\n type: Object, // Studyline\n default: function(){ return {};},\n },\n layers: {\n type: Number,\n default: 1,\n },\n },\n data() {\n return {\n layerHeights: {}\n };\n },\n created() {\n // Listener for the signal that a new connection was made and needs to be drawn\n // Sent by the incoming item - By convention, outgoing items are responsible for drawing the lines\n ItemEventBus.$on('lineHeightChange', this.onLineHeightChange);\n },\n computed: {\n\n },\n methods: {\n onLineHeightChange(lineid,layerid,newheight){\n // All layers for this line have the first slot send an update message on layer height change.\n // When one of those updates is received, record the height and recalculate the total height of the\n // header\n if(this.$refs.main && lineid == this.value.id){\n const items = document.querySelectorAll(\n `.t-studyline-slot-0[data-studyline='${this.value.id}']`);\n\n // determine the height of all the lines and add them up.\n let heightSum = 0;\n items.forEach((el) => {\n // getBoundingClientRect() Gets the actual fractional height instead of rounded to integer pixels\n const r = el.getBoundingClientRect();\n const height = r.height;\n heightSum += height;\n });\n\n const heightStyle=`${heightSum}px`;\n this.$refs.main.style.height = heightStyle;\n }\n }\n },\n template: `\n <div class=\"t-studyline t-studyline-heading \"\n :data-studyline=\"value.id\" ref=\"main\"\n ><div class=\"t-studyline-handle\" :style=\"'background-color: ' + value.color\"></div>\n <div class=\"t-studyline-title\">\n <abbr v-b-tooltip.hover.right :title=\"value.name\">{{ value.shortname }}</abbr>\n </div>\n </div>\n `,\n });\n\n /*\n * T-STUDYLINE (Used only for study line edit mode)\n */\n Vue.component('t-studyline-edit', {\n props: {\n value : {\n type: Object, // Studyline\n default: function(){ return {};},\n }\n },\n data() {\n return {\n };\n },\n computed: {\n deletable() {\n // Check if all the slots are empty\n const slots = this.value.slots;\n if(Array.isArray(slots)){\n let count = 0;\n for(let i = 0; i < slots.length; i++) {\n if(Array.isArray(slots[i].courses)){\n count += slots[i].courses.length;\n }\n if(Array.isArray(slots[i].filters)){\n count += slots[i].filters.length;\n }\n }\n return (count == 0);\n } else {\n return false;\n }\n },\n editable() {\n return true;\n }\n },\n methods: {\n onEdit() {\n this.$emit('edit',this.value);\n },\n onDelete() {\n this.$emit('delete',this.value);\n },\n\n },\n template: `\n <div :class=\"'t-studyline '\" >\n <div class=\"t-studyline-handle\" :style=\"'background-color: ' + value.color\"></div>\n <div class=\"t-studyline-title\">\n <div>\n <i class='fa fa-arrows text-primary'></i>\n <abbr v-b-tooltip.hover :title=\"value.name\">{{ value.shortname }}</abbr>\n </div>\n </div>\n <div class='t-studyline-editmode-content'>\n <slot></slot>\n </div>\n <div class='controlbox'>\n <template v-if='editable || deletable'>\n <span class='control editable' v-if='editable'>\n <a href='#' @click='onEdit'><i class='fa fa-pencil'></i></a>\n </span>\n <span class='control deletable' v-if='deletable'>\n <a v-if='deletable' href='#' @click='onDelete'><i class='text-danger fa fa-trash'></i></a>\n </span>\n </template>\n </div>\n </div>\n `,\n });\n\n /*\n * During a redisign it was decided to have the studyline still get the entire array as a value,\n * even though it only shows one drop slot for the layer it is in. This is to make repainting easier,\n * since we modify the array for the layer we handle. FIXME: Make this less weird\n */\n Vue.component('t-studyline-slot', {\n props: {\n type : {\n type: String,\n default: 'gradable',\n },\n slotindex : {\n type: Number,\n default: '',\n },\n line : {\n type: Object,\n default(){ return null;},\n },\n layer : {\n type: Number,\n },\n value: {\n type: Array, // dict with layer as index\n default(){ return [];},\n },\n plan: {\n type: Object, // Studyplan data\n default(){ return null;},\n },\n page: {\n type: Object, // Studyplan data\n default(){ return null;},\n },\n period: {\n type: Object, // Studyplan data\n default(){ return null;},\n },\n },\n mounted() {\n const self=this;\n if(self.type == \"gradable\" && self.slotindex == 1){\n self.resizeListener = new ResizeObserver(() => {\n if(self.$refs.main){\n const size = self.$refs.main.getBoundingClientRect();\n\n ItemEventBus.$emit('lineHeightChange', self.line.id, self.layer, size.height);\n }\n }).observe(self.$refs.main);\n }\n },\n unmounted() {\n if(this.resizeListener) {\n this.resizeListener.disconnect();\n }\n },\n computed: {\n slotkey(){\n return `${this.type}'-'${this.line.id}-${this.slotindex}-${this.layer}`;\n },\n itemidx(){\n for(const ix in this.value){\n const itm = this.value[ix];\n if(itm.layer == this.layer){\n return ix;\n }\n }\n return null;\n },\n item(){\n for(const ix in this.value){\n const itm = this.value[ix];\n if(itm.layer == this.layer){\n return itm;\n }\n }\n return null;\n },\n listtype() {\n return this.type;\n },\n dragacceptlist(){\n if(this.type == \"gradable\"){\n return [\"course\", \"gradable-item\"];\n } else {\n return [\"filter\", \"filter-item\"];\n }\n },\n courseHoverDummy(){\n return {course: this.hover.component};\n },\n current(){\n if( this.period && this.period.startdate && this.period.enddate){\n const now = new Date();\n const pstart = new Date(this.period.startdate);\n const pend = new Date(this.period.enddate);\n return (now >= pstart && now < pend);\n }\n else {\n return false;\n }\n },\n spanCss(){\n if(this.item && this.item.span > 1){\n const span = (2 * this.item.span) - 1;\n return `width: 100%; grid-column: span ${span};`;\n } else {\n return \"\";\n }\n }\n },\n data() {\n return {\n text: strings.course_timing,\n resizeListener: null,\n hover: {\n component:null,\n type: null,\n },\n datechanger: {\n coursespan: null,\n periodspan: null,\n default: false,\n defaultchoice: false,\n hidewarn: false,\n }\n };\n },\n methods: {\n onDrop(event) {\n this.hover.component = null;\n this.hover.type = null;\n debug.info(event);\n const self = this;\n if(event.type.item) {\n let item = event.data;\n\n // To avoid weird visuals with the lines,\n // we add the item to the proper place in the front-end first\n item.layer = this.layer;\n item.slot = this.slotindex;\n self.value.push(item);\n self.$emit(\"input\",self.value);\n\n // then on the next tick, we inform the back end\n // Since moving things around has never been unsuccessful, unless you have other problems,\n // it's better to have nice visuals.\n self.relocateStudyItem(item).done(()=>{\n if(this.$refs.timingChecker){\n this.$refs.timingChecker.validate_course_period();\n }\n });\n }\n else if(event.type.component){\n debug.info(\"Adding new component\");\n if(event.type.type == \"gradable\"){\n call([{\n methodname: 'local_treestudyplan_add_studyitem',\n args: {\n \"line_id\": self.line.id,\n \"slot\" : self.slotindex,\n \"layer\" : self.layer,\n \"type\": 'course',\n \"details\": {\n \"competency_id\": null,\n 'conditions':'',\n 'course_id':event.data.id,\n 'badge_id':null,\n 'continuation_id':null,\n }\n }\n }])[0].then((response) => {\n let item = response;\n self.relocateStudyItem(item).done(()=>{\n self.value.push(item);\n self.$emit(\"input\",self.value);\n\n // call the validate period function on next tick,\n // since it paints the item in the slot first\n this.$nextTick(() => {\n if(this.$refs.timingChecker){\n this.$refs.timingChecker.validate_course_period();\n }\n });\n ItemEventBus.$emit('coursechange');\n });\n }).catch(notification.exception);\n }\n else if(event.type.type == \"filter\") {\n debug.info(\"Adding new filter compenent\");\n call([{\n methodname: 'local_treestudyplan_add_studyitem',\n args: {\n \"line_id\": self.line.id,\n \"slot\" : self.slotindex,\n \"type\": event.data.type,\n \"details\":{\n \"badge_id\": event.data.badge?event.data.badge.id:undefined,\n }\n }\n }])[0].then((response) => {\n let item = response;\n self.relocateStudyItem(item).done(()=>{\n item.layer = this.layer;\n self.value.push(item);\n self.$emit(\"input\",self.value);\n });\n }).catch(notification.exception);\n }\n }\n },\n onCut(event) {\n const self=this;\n let id = event.data.id;\n for(let i = 0; i < self.value.length; i++){\n if(self.value[i].id == id){\n self.value.splice(i, 1); i--;\n break; // just remove one\n }\n }\n // Do something to signal that this item has been removed\n this.$emit(\"input\",this.value);\n ItemEventBus.$emit('coursechange');\n },\n relocateStudyItem(item){\n const iteminfo = {'id': item.id, 'layer': this.layer, 'slot': this.slotindex, 'line_id': this.line.id};\n return call([{\n methodname: 'local_treestudyplan_reorder_studyitems',\n args: { 'items': [iteminfo] } // function was designed to relocate multiple items at once, hence the array\n }])[0].catch(notification.exception);\n },\n onDragEnter(event){\n this.hover.component = event.data;\n this.hover.type = event.type;\n },\n onDragLeave(){\n this.hover.component = null;\n this.hover.type = null;\n },\n maxSpan(){\n // Determine the maximum span for components in this slot\n // Used for setting the max in the timing adjustment screen(s)\n // And for checking the filter types\n\n // Assume this slot is first one available\n let freeIndex = this.slotindex;\n // Determine last free slot following this one in the layer\n for(let i = this.slotindex + 1; i <= this.page.periods; i++){\n if(this.line.slots && this.line.slots[i] && this.line.slots[i].courses){\n const clist = this.line.slots[i].courses;\n const flist = this.line.slots[i-1].filters; // next filter is in the same slot\n let busy = false;\n for(const ix in clist) {\n if( clist[ix].layer == this.layer) {\n busy = true; // slot is busy in this layer.\n break;\n }\n }\n for(const ix in flist) {\n if( flist[ix].layer == this.layer) {\n busy = true; // slot is busy in this layer.\n break;\n }\n }\n\n if(! busy) {\n // slot is free in this layer\n freeIndex = i;\n } else {\n break; // stop checking next slots\n }\n\n } else {\n break; // stop processing\n }\n }\n // calculate span from that\n return freeIndex - this.slotindex + 1;\n\n },\n makeType(item){\n return {\n item: true,\n component: false,\n span: item.span,\n type: this.type,\n };\n },\n checkType(type) {\n if(type.type == this.type){\n if(type == 'filter'){\n return true;\n } else if(type.span <= this.maxSpan()){\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }\n },\n template: `\n <div :class=\"'t-studyline-slot '+type + ' t-studyline-slot-'+slotindex + ' ' + ((slotindex==0)?' t-studyline-firstcolumn ':' ')\n + (current?'current ':' ')\"\n :data-studyline=\"line.id\" ref=\"main\"\n :style='spanCss'\n ><drag v-if=\"item\"\n :key=\"item.id\"\n class=\"t-slot-item\"\n :data=\"item\"\n :type=\"makeType(item)\"\n @cut=\"onCut\"\n ><t-item\n @deleted=\"onCut\"\n v-model=\"value[itemidx]\"\n :plan=\"plan\"\n :line='line'\n :page='page'\n :period='period'\n :maxspan='maxSpan()'\n ></t-item\n ></drag\n ><drop v-else\n :class=\"'t-slot-drop '+type + (layer > 0?' secondary':' primary')\"\n :accepts-type=\"checkType\"\n @drop=\"onDrop\"\n mode=\"cut\"\n @dragenter=\"onDragEnter\"\n @dragleave=\"onDragLeave\"\n ><template v-if=\"hover.component\">\n <div v-if=\"hover.type.item\"\n class=\"t-slot-item feedback\"\n :key=\"hover.component.id\"\n ><t-item v-model=\"hover.component\" dummy></t-item\n ></div\n ><div v-else-if=\"hover.type.type == 'gradable'\"\n class=\"t-slot-item feedback\"\n :key=\"'course-'+hover.component.id\"\n ><t-item-course v-model=\"courseHoverDummy\"></t-item-course></div\n ><div v-else-if=\"hover.type.type == 'filter'\"\n class=\"t-slot-item feedback\"\n key=\"tooldrop\"\n ><t-item-junction v-if=\"hover.component.type == 'junction'\" ></t-item-junction\n ><t-item-start v-else-if=\"hover.component.type == 'start'\" ></t-item-start\n ><t-item-finish v-else-if=\"hover.component.type == 'finish'\" ></t-item-finish\n ><t-item-badge v-else-if=\"hover.component.type == 'badge'\" ></t-item-badge\n ></div\n ><div v-else\n class=\"t-slot-item feedback\"\n :key=\"hover.type\">--{{ hover.type }}--</div\n ></template\n ></drop>\n <t-item-timing-checker hidden\n v-if=\"value && value[itemidx] && value[itemidx].course\"\n ref=\"timingChecker\"\n :maxspan=\"maxSpan()\"\n :page=\"page\"\n :period=\"period\"\n v-model=\"value[itemidx]\"\n ></t-item-timing-checker>\n </div>\n `,\n });\n\n\n Vue.component('t-item-timing-checker', {\n props: {\n value: {\n type: Object, // t-item model\n },\n page: {\n type: Object, // Studyplan data\n },\n period: {\n type: Object, // Studyplan data\n },\n maxspan: {\n type: Number,\n },\n hidden: {\n type: Boolean,\n default: false,\n }\n },\n computed: {\n endperiod() {\n const endperiodnr = Math.min(this.page.periods,this.period.period + (this.value.span - 1));\n return this.page.perioddesc[endperiodnr-1];\n },\n course_period_matches() {\n const self=this;\n if(self.value && self.value.type == 'course'){\n self.datechanger.coursespan = datespaninfo(self.value.course.startdate,self.value.course.enddate);\n self.datechanger.periodspan = datespaninfo(self.period.startdate,self.endperiod.enddate);\n if( self.datechanger.coursespan.first.getTime() == self.datechanger.periodspan.first.getTime()\n && self.datechanger.coursespan.last.getTime() == self.datechanger.periodspan.last.getTime() ){\n return true;\n }\n else {\n return false;\n }\n } else {\n debug.warn(\"Timing thing not proper configured\",self.value,self.period,self.maxspan);\n return false;\n }\n },\n },\n data() {\n return {\n // Create random id to avoid opening the wrong modals\n id: Math.floor(Math.random() * Date.now()).toString(16),\n text: strings.course_timing,\n datechanger: {\n coursespan: null,\n periodspan: null,\n globals: datechanger_globals,\n }\n };\n },\n methods: {\n\n validate_course_period(force) {\n const self = this;\n\n debug.info(\"Validating course and period\");\n if(!(self.course_period_matches)){\n debug.info(\"Course timing does not match period timing\");\n\n if(self.value.course.canupdatecourse){\n if(!self.hidden || !self.datechanger.globals.default){\n // Periods do not match, pop up the date change request\n this.$bvModal.show('t-course-timing-matching-'+this.id);\n } else if (self.datechanger.globals.defaultvalue){\n // go for it without asking\n self.change_course_period();\n }\n }\n else {\n // user is not able to change course timing - show a warning\n if(!self.hidden || !self.datechanger.globals.hidewarn){\n this.$bvModal.show('t-course-timing-warning-'+this.id);\n }\n }\n }\n else {\n debug.info(\"Course timing matches period\",self.datechanger);\n }\n },\n change_course_period() {\n const self=this;\n // Save the state\n if(self.datechanger.globals.default){\n self.datechanger.globals.defaultvalue = true;\n }\n return call([{\n methodname: 'local_treestudyplan_course_period_timing',\n args: { period_id: self.period.id,\n course_id: this.value.course.id,\n span: this.value.span,\n }\n }])[0].catch(notification.exception).done((response) => {\n self.value.course.startdate = response.startdate;\n self.value.course.enddate = response.enddate;\n self.value.course.timing = response.timing;\n self.$emit(\"input\",self.value);\n });\n },\n change_span(span) {\n const self=this;\n return call([{\n methodname: 'local_treestudyplan_set_studyitem_span',\n args: { id: self.value.id,\n span: span\n }\n }])[0].catch(notification.exception).done((response) => {\n self.value.span = response.span;\n self.$emit('input',self.value);\n self.$nextTick(() => {\n self.validate_course_period();\n });\n } );\n },\n format_duration(dsi){\n let s = \"\";\n if(dsi.years == 1){ s += `1 ${this.text.year}, `;}\n else if(dsi.years > 1){ s += `${dsi.years} ${this.text.years}, `;}\n if(dsi.weeks == 1){ s += `1 ${this.text.week}, `;}\n else if(dsi.weeks > 1){ s += `${dsi.weeks} ${this.text.weeks}, `;}\n if(dsi.days == 1){ s += `1 ${this.text.day}, `;}\n else if(dsi.days > 1){ s += `${dsi.days} ${this.text.days}, `;}\n\n return s.toLocaleLowerCase();\n },\n },\n // To avoid the span creeping in the dom where it shouldn't, set display to none if it is hidden\n // This does not affect the modals, which are rendered outside of this element when needed\n template: `\n <div :class=\"'t-item-timing-checker'\" :style=\"hidden?'display: none ':''\">\n <template v-if=\"!hidden\" >\n <span class=\"mr-1\" v-if=\"course_period_matches\">\n <i class=\"text-success fa fa-calendar-check-o\"\n v-b-tooltip.hover.topright :title=\"text.timing_ok\"\n ></i>\n </span>\n <span class=\"mr-1\" v-else>\n <a href='#' @click=\"validate_course_period()\" class=\"text-warning\"\n v-b-tooltip.hover.bottomleft :title=\"text.timing_off\"\n ><i class=\"fa fa-calendar-times-o\"\n ></i\n ><i class=\"fa fa-question-circle text-black-50\"\n style=\"font-size: 0.8em; top: -0.3em; position: relative;\"\n\n ></i\n ></a>\n </span>\n <span class=\"ml-1\" v-b-tooltip.hover.bottomleft :title=\"text.periodspan_desc\"\n >{{ text.periodspan\n }} <b-form-select\n class=\"\"\n size=\"sm\" @change=\"change_span\" v-model=\"value.span\">\n <b-form-select-option v-for=\"(n,i) in maxspan\" :value='n' :key='i'\n >{{ n }}</b-form-select-option>\n </b-form-select\n > {{\n (value.span == 1)?text.period.toLowerCase():text.periods.toLowerCase()\n }}<i\n class=\"fa fa-question-circle text-black-50\"\n style=\"font-size: 0.8em; top: -0.3em; position: relative;\"\n ></i>\n </span>\n </template>\n <b-modal\n :id=\"'t-course-timing-matching-'+this.id\"\n size=\"lg\"\n :title=\"text.title\"\n @ok=\"change_course_period\"\n :ok-title=\"text.yes\"\n ok-variant=\"danger\"\n :cancel-title=\"text.no\"\n cancel-variant=\"primary\"\n >\n <b-container v-if=\"datechanger.coursespan && datechanger.periodspan && value && value.course\">\n <b-row><b-col cols=\"12\">{{ text.desc }}</b-col></b-row>\n <b-row><b-col cols=\"12\"><div class=\"generalbox alert alert-warning\">{{ text.question }}</div></b-col></b-row>\n <b-row>\n <b-col cols=\"6\">\n <h3> {{ text.course }} </h3>\n <p class=\"mb-0\"><b>{{ value.course.fullname }}</b></p>\n <p class=\"mb-1\"><b>{{ value.course.shortname }}</b></p>\n <p class=\"mb-1\">{{ datechanger.coursespan.formatted.first}} - {{ datechanger.coursespan.formatted.last}}</p>\n <p class=\"mb-0\"><b>{{ text.duration }}</b><br>\n {{ format_duration(datechanger.coursespan)}}</p>\n </b-col>\n <b-col cols=\"6\">\n <h3> {{ text.period }} </h3>\n <p class=\"mb-0\"><b>{{ period.fullname }}</b><b v-if=\"value.span > 1\"> - {{ endperiod.fullname }}</b></p>\n <p class=\"mb-1\"><b>{{ period.shortname }}</b><b v-if=\"value.span > 1\"> - {{ endperiod.shortname }}</b></p>\n <p class=\"mb-1\">{{ datechanger.periodspan.formatted.first}} - {{ datechanger.periodspan.formatted.last}}</p>\n <p class=\"mb-0\"><b>{{ text.duration }}</b><br>\n {{ format_duration(datechanger.periodspan)}}</p>\n </b-col>\n </b-row>\n <b-row v-if='hidden' class=\"pt-2\"><b-col cols=\"12\">\n <b-form-checkbox type=\"checkbox\" v-model=\"datechanger.globals.default\">{{ text.rememberchoice }}</b-form-checkbox>\n </b-col></b-row>\n </b-container>\n </b-modal>\n <b-modal\n :id=\"'t-course-timing-warning-'+this.id\"\n size=\"lg\"\n ok-variant=\"primary\"\n :title=\"text.title\"\n :ok-title=\"text.yes\"\n ok-only\n >\n <b-container v-if=\"datechanger.coursespan && datechanger.periodspan && value && value.course\">\n <b-row><b-col cols=\"12\">{{ text.desc }}</b-col></b-row>\n <b-row><b-col cols=\"12\"><div class=\"generalbox alert alert-warning\">{{ text.warning }}</div></b-col></b-row>\n <b-row>\n <b-col cols=\"6\">\n <h3> {{ text.course }} </h3>\n <p class=\"mb-0\"><b>{{ value.course.fullname }}</b></p>\n <p class=\"mb-1\"><b>{{ value.course.shortname }}</b></p>\n <p class=\"mb-1\">{{ datechanger.coursespan.formatted.first}} - {{ datechanger.coursespan.formatted.last}}</p>\n <p class=\"mb-0\"><b>{{ text.duration }}</b><br>\n {{ format_duration(datechanger.coursespan)}}</p>\n </b-col>\n <b-col cols=>\"6\">\n <h3> {{ text.period }} </h3>\n <p class=\"mb-0\"><b>{{ period.fullname }}</b><b v-if=\"value.span > 1\"> - {{ endperiod.fullname }}</b></p>\n <p class=\"mb-1\"><b>{{ period.shortname }}</b><b v-if=\"value.span > 1\"> - {{ endperiod.shortname }}</b></p>\n <p class=\"mb-1\">{{ datechanger.periodspan.formatted.first}} - {{ datechanger.periodspan.formatted.last}}</p>\n <p class=\"mb-0\"><b>{{ text.duration }}</b><br>\n {{ format_duration(datechanger.periodspan)}}</p>\n </b-col>\n </b-row>\n <b-row v-if='hidden' class=\"pt-2\"><b-col cols=\"12\">\n <b-form-checkbox type=\"checkbox\" v-model=\"datechanger.globals.hidewarn\">{{ text.hidewarning }}</b-form-checkbox>\n </b-col></b-row>\n </b-container>\n </b-modal>\n </div>\n `,\n });\n\n\n Vue.component('t-item', {\n props: {\n value :{\n type: Object,\n default(){ return null;},\n },\n dummy :{\n type: Boolean,\n default() { return false;},\n },\n plan: {\n type: Object, // Studyplan page\n default() { return null;},\n },\n line: {\n type: Object, // Studyplan page\n default() { return null;},\n },\n page: {\n type: Object, // Studyplan page\n default() { return null;},\n },\n period: {\n type: Object, // Studyplan page\n default() { return null;},\n },\n maxspan: {\n type: Number,\n default() { return 0;},\n },\n },\n data() {\n return {\n dragLine: null,\n dragEventListener: null,\n deleteMode: false,\n condition_options: string_keys.conditions,\n text: strings.item_text,\n showContext: false,\n lines: [],\n };\n },\n methods: {\n dragStart(event){\n // Add line between start point and drag image\n this.deleteMode = false;\n let start = document.getElementById('studyitem-'+this.value.id);\n let dragelement= document.getElementById('t-item-cdrag-'+this.value.id);\n dragelement.style.position = 'fixed';\n dragelement.style.left = event.position.x+'px';\n dragelement.style.top = event.position.y+'px';\n this.dragLine = new SimpleLine(start,dragelement,{\n color: \"#777\",\n gravity: {\n start: LINE_GRAVITY,\n end: LINE_GRAVITY,\n },\n });\n // Add separate event listener to reposition mouse move\n document.addEventListener(\"mousemove\",this.onMouseMove);\n },\n dragEnd(){\n if(this.dragLine !== null) {\n this.dragLine.remove();\n }\n let dragelement = document.getElementById('t-item-cdrag-'+this.value.id);\n dragelement.style.removeProperty('left');\n dragelement.style.removeProperty('top');\n dragelement.style.removeProperty('position');\n document.removeEventListener(\"mousemove\",this.onMouseMove);\n },\n onMouseMove: function(event){\n let dragelement = document.getElementById('t-item-cdrag-'+this.value.id);\n dragelement.style.position = 'fixed';\n dragelement.style.left = event.clientX+'px';\n dragelement.style.top = event.clientY+'px';\n // line will follow automatically\n },\n onDrop(event){\n let from_id = event.data.id;\n let to_id = this.value.id;\n this.redrawLines();\n call([{\n methodname: 'local_treestudyplan_connect_studyitems',\n args: { 'from_id': from_id, 'to_id': to_id }\n }])[0].then((response)=>{\n let conn = {'id': response.id, 'from_id': response.from_id, 'to_id': response.to_id};\n ItemEventBus.$emit(\"createdConnection\",conn);\n this.value.connections.in.push(conn);\n }).catch(notification.exception);\n },\n redrawLine(conn){\n const lineColor = \"var(--success)\";\n const start = document.getElementById(`studyitem-${conn.from_id}`);\n const end = document.getElementById(`studyitem-${conn.to_id}`);\n\n // delete old line\n if(this.lines[conn.to_id]){\n this.lines[conn.to_id].remove();\n delete this.lines[conn.to_id];\n }\n // create a new line if the start and finish items are visible\n if(start !== null && end !== null && isVisible(start) && isVisible(end)){\n this.lines[conn.to_id] = new SimpleLine( start,end,{\n color: lineColor,\n gravity: {\n start: LINE_GRAVITY,\n end: LINE_GRAVITY,\n },\n });\n }\n\n },\n deleteLine(conn){\n const self = this;\n call([{\n methodname: 'local_treestudyplan_disconnect_studyitems',\n args: { 'from_id': conn.from_id, 'to_id': conn.to_id }\n }])[0].then((response)=>{\n if(response.success){\n this.removeLine(conn);\n // send disconnect event on message bus, so the connection on the other end can delete it too\n ItemEventBus.$emit(\"connectionDisconnected\",conn);\n // Remove connection from our outgoing list\n let index = self.value.connections.out.indexOf(conn);\n self.value.connections.out.splice(index, 1);\n }\n }).catch(notification.exception);\n },\n highlight(conn){\n if(this.lines[conn.to_id]){\n this.lines[conn.to_id].setConfig({color:\"var(--danger)\",});\n }\n },\n normalize(conn){\n if(this.lines[conn.to_id]){\n this.lines[conn.to_id].setConfig({color:\"var(--success)\",});\n }\n },\n updateItem() {\n call([{\n methodname: 'local_treestudyplan_edit_studyitem',\n args: { 'id': this.value.id,\n 'conditions': this.value.conditions,\n 'continuation_id': this.value.continuation_id,}\n }])[0].catch(notification.exception);\n },\n doShowContext(event) {\n if(this.hasContext){\n this.showContext=true;\n event.preventDefault();\n }\n },\n redrawLines(){\n if(this.value.connections && this.value.connections.out){\n for(let i in this.value.connections.out){\n let conn = this.value.connections.out[i];\n this.redrawLine(conn);\n }\n }\n },\n\n // EVENT LISTENERS\n onCreatedConnection(conn){\n if(conn.from_id == this.value.id){\n this.value.connections.out.push(conn);\n this.redrawLine(conn);\n }\n },\n // Listener for the signal that a connection was removed by the outgoing item\n onRemovedConnection(conn){\n if(this.value.connections && this.value.connections.out){\n for(let i in this.value.connections.in){\n let c_in = this.value.connections.in[i];\n if(conn.id == c_in.id){\n self.value.connections.out.splice(i, 1);\n }\n }\n }\n },\n // Listener for reposition events\n // When an item in the list is repositioned, all lines need to be redrawn\n onRePositioned(){\n this.redrawLines();\n },\n // When an item is disPositioned - (temporarily) removed from the list,\n // all connections need to be deleted.\n onDisPositioned(re_id){\n if(this.value.connections && this.value.connections.out){\n for(let i in this.value.connections.out){\n let conn = this.value.connections.out[i];\n if(conn.to_id == re_id){\n this.removeLine(conn);\n }\n }\n }\n },\n\n // When an item is deleted\n // all connections to/from that item need to be cleaned up\n onItemDeleted(item_id){\n const self = this;\n if(this.value.connections && this.value.connections.out){\n for(const i in this.value.connections.out){\n let conn = this.value.connections.out[i];\n if(conn.to_id == item_id){\n self.removeLine(conn);\n self.value.connections.out.splice(i, 1);\n }\n }\n }\n if(this.value.connections && this.value.connections.in){\n for(const i in this.value.connections.in){\n let conn = this.value.connections.in[i];\n if(conn.from_id == item_id){\n self.value.connections.out.splice(i, 1);\n }\n }\n }\n },\n\n onRedrawLines(){\n this.redrawLines();\n },\n\n removeLine(conn){\n if(this.lines[conn.to_id]){\n this.lines[conn.to_id].remove();\n delete this.lines[conn.to_id];\n }\n },\n deleteItem(){\n const self = this;\n const msgparams = {\n item: this.text['type_' + this.value.type].toLocaleLowerCase(),\n name: (this.value.type=='course')?this.value.course.displayname:\"\",\n line: (this.line) ? this.line.name : \"\",\n period: (this.period) ? this.period.fullname : this.plan.name,\n };\n\n this.$bvModal.msgBoxConfirm(strformat(this.text.item_delete_message, msgparams), {\n okVariant : 'danger',\n okTitle : this.text.ok,\n cancelTitle: this.text.cancel,\n }).then(value => {\n if ( value ) {\n // Confirmed to delete.\n call([{\n methodname: 'local_treestudyplan_delete_studyitem',\n args: { 'id': self.value.id, }\n }])[0].then(function(response){\n if(response.success == true){\n self.$emit(\"deleted\",{ data: self.value });\n }\n }).catch(notification.exception);\n }\n }).catch(err => {\n debug.console.error(err);\n });\n }\n\n\n },\n computed: {\n hasConnectionsOut() {\n return !([\"finish\",].includes(this.value.type));\n },\n hasConnectionsIn() {\n return !([\"start\",].includes(this.value.type));\n },\n hasContext() {\n return ['start','junction','finish'].includes(this.value.type);\n }\n },\n created(){\n // Add event listeners on the message bus\n // But only if not in \"dummy\" mode - mode which is used for droplist placeholders\n // Since an item is \"fully made\" with all references, not specifying dummy mode really messes things up\n if(!this.dummy){\n\n // Listener for the signal that a new connection was made and needs to be drawn\n // Sent by the incoming item - By convention, outgoing items are responsible for drawing the lines\n ItemEventBus.$on('createdConnection', this.onCreatedConnection);\n // Listener for the signal that a connection was removed by the outgoing item\n ItemEventBus.$on('removedConnection', this.onRemovedConnection);\n // Listener for reposition events\n // When an item in the list is repositioned, all lines need to be redrawn\n ItemEventBus.$on('rePositioned', this.onRePositioned);\n // When an item is disPositioned - (temporarily) removed from the list,\n // all connections need to be deleted.\n ItemEventBus.$on('disPositioned', this.onDisPositioned);\n // When an item is deleted\n // all connections to/from that item need to be cleaned up\n ItemEventBus.$on('itemDeleted', this.onItemDeleted);\n ItemEventBus.$on('redrawLines', this.onRedrawLines);\n\n\n }\n },\n mounted(){\n // Initialize connection lines when mounting\n // But only if not in \"dummy\" mode - mode which is used for droplist placeholders\n // Since an item is \"fully made\" with all references, not specifying dummy mode really messes things up\n\n if(!this.dummy)\n {\n this.redrawLines();\n setTimeout(()=>{\n ItemEventBus.$emit(\"rePositioned\",this.value.id);\n },10);\n }\n },\n beforeDestroy(){\n if(!this.dummy) {\n for(let i in this.value.connections.out){\n let conn = this.value.connections.out[i];\n this.removeLine(conn);\n }\n ItemEventBus.$emit(\"disPositioned\",this.value.id);\n\n // Remove event listeners\n ItemEventBus.$off('createdConnection', this.onCreatedConnection);\n ItemEventBus.$off('removedConnection', this.onRemovedConnection);\n ItemEventBus.$off('rePositioned', this.onRePositioned);\n ItemEventBus.$off('disPositioned', this.onDisPositioned);\n ItemEventBus.$off('itemDeleted', this.onItemDeleted);\n ItemEventBus.$off('redrawLines', this.onRedrawLines);\n }\n },\n beforeUpdate(){\n },\n updated(){\n if(!this.dummy) {\n this.redrawLines();\n }\n },\n template: `\n <div class=\"t-item-base\" :id=\"'studyitem-'+value.id\">\n <t-item-course\n v-if=\"value.type == 'course'\"\n @deleterq=\"deleteItem\"\n v-model=\"value\"\n :plan='plan'\n :page='page'\n :period='period'\n :maxspan='maxspan'\n ></t-item-course>\n <t-item-junction\n v-if=\"value.type == 'junction'\"\n @deleterq=\"deleteItem\"\n v-model=\"value\"\n ></t-item-junction>\n <t-item-start\n v-if=\"value.type == 'start'\"\n @deleterq=\"deleteItem\"\n v-model=\"value\"\n ></t-item-start>\n <t-item-finish\n v-if=\"value.type == 'finish'\"\n @deleterq=\"deleteItem\"\n v-model=\"value\"\n ></t-item-finish>\n <t-item-badge\n v-if=\"value.type == 'badge'\"\n @deleterq=\"deleteItem\"\n v-model=\"value\"\n ></t-item-badge>\n <t-item-invalid\n v-if=\"value.type == 'invalid'\"\n @deleterq=\"deleteItem\"\n v-model=\"value\"\n ></t-item-invalid>\n <drop v-if='!dummy && hasConnectionsIn' accepts-type=\"linestart\"\n :id=\"'t-item-cend-'+value.id\"\n class=\"t-item-connector-end\"\n mode=\"copy\"\n @drop=\"onDrop\"\n ><svg width='5px' height='10px'><rect ry=\"1px\" rx=\"1px\" y=\"0px\" x=\"0px\" height=\"10px\" width=\"5px\"/></svg></drop>\n <drag v-if='!dummy && hasConnectionsOut' type=\"linestart\"\n :id=\"'t-item-cstart-'+value.id\"\n :class=\"'t-item-connector-start ' + ((deleteMode&&value.connections.out.length)?'deleteMode':'')\"\n :data=\"value\"\n @dragstart=\"dragStart\"\n @dragend=\"dragEnd\"\n @click=\"deleteMode = (value.connections.out.length)?(!deleteMode):false\"\n >\n <svg width='5px' height='10px'><rect ry=\"1px\" rx=\"1px\" y=\"0px\" x=\"0px\" height=\"10px\" width=\"5px\"/></svg>\n <template v-slot:drag-image=\"{data}\"> <i :id=\"'t-item-cdrag-'+value.id\" class=\"fa\"></i>\n </template>\n </drag>\n <div class=\"deletebox\" v-if=\"deleteMode && value.connections.out.length > 0\"\n >\n <a v-for=\"conn in value.connections.out\"\n @click=\"deleteLine(conn)\"\n @mouseenter=\"highlight(conn)\"\n @mouseleave=\"normalize(conn)\"\n class=\"t-connection-delete text-danger\"\n :title=\"conn.id\">\n <i class=\"fa fa-trash\"></i>\n </a>\n </div>\n <a v-if=\"hasContext\" class=\"t-item-config\"\n v-b-modal=\"'t-item-config-'+value.id\" href=\"#\" @click.prevent=\"\"><i class=\"fa fa-gear\"></i></a>\n <b-modal no-body class=\"\"\n :id=\"'t-item-config-'+value.id\"\n :title=\"text['item_configuration']\"\n scrollable\n ok-only\n class=\"t-item-contextview b-modal-justify-footer-between\"\n >\n <b-form-group\n v-if=\"value.type != 'start'\"\n :label=\"text.select_conditions\"\n >\n <b-form-select size=\"sm\"\n @input=\"updateItem\"\n v-model=\"value.conditions\"\n :options=\"condition_options\"\n ></b-form-select>\n </b-form-group>\n\n <template #modal-footer=\"{ ok, cancel, hide }\" >\n <a href='#' @click='deleteItem()' class=\"text-danger\"\n ><i class=\"fa fa-trash\"></i>\n {{ text.delete }}\n </a>\n <b-button size=\"sm\" variant=\"primary\" @click=\"ok()\">\n {{ text.ok }}\n </b-button>\n </template>\n\n </b-modal>\n </div>\n `,\n });\n\n Vue.component('t-item-invalid', {\n props: {\n 'value' :{\n type: Object,\n default: function(){ return null;},\n },\n },\n data() {\n return {\n text: strings.invalid,\n };\n },\n methods: {\n },\n template: `\n <div class=\"t-item-invalid\">\n <b-card no-body >\n <b-row no-gutters>\n <b-col md=\"1\">\n <span class=\"t-timing-indicator timing-invalid\"></span>\n </b-col>\n <b-col md=\"11\">\n <b-card-body class=\"align-items-center\">\n <i class=\"fa fa-exclamation\"></i> {{text.error}}\n <a href='#' @click='$emit(\"deleterq\")' class=\"text-danger\"\n ><i class=\"fa fa-trash\"></i></a>\n </b-card-body>\n </b-col>\n </b-row>\n </b-card>\n </div>\n `,\n });\n\n //TAG: Course item\n Vue.component('t-item-course', {\n props: {\n value:{\n type: Object,\n default(){ return null;},\n },\n plan:{\n type: Object,\n default(){ return null;},\n },\n page: {\n type: Object, // PAge data\n default() { return null;}\n },\n period: {\n type: Object, // Period data\n default() { return null;}\n },\n maxspan: {\n type: Number,\n default() { return 0;}\n },\n },\n data() {\n return {\n condition_options: string_keys.conditions,\n text: strings.item_course_text,\n };\n },\n computed: {\n useItemConditions() {\n if(this.plan && this.plan.aggregation_info && this.plan.aggregation_info.useItemConditions !== undefined){\n return this.plan.aggregation_info.useItemConditions;\n }\n else {\n return false;\n }\n },\n\n configurationState(){\n if(this.hasGrades() || this.hasCompletions() || this.hasCompetencies()) {\n return \"t-configured-ok\";\n } else {\n return \"t-configured-alert\";\n }\n },\n\n configurationIcon(){\n if(this.hasGrades() || this.hasCompletions() || this.hasCompetencies()) {\n return \"check\";\n } else {\n return \"exclamation-circle\";\n }\n },\n startdate(){\n return format_date(this.value.course.startdate);\n },\n enddate(){\n if(this.value.course.enddate){\n return format_date(this.value.course.enddate);\n }\n else {\n return this.text.noenddate;\n }\n }\n\n },\n methods: {\n hasGrades() {\n if(this.value.course.grades && this.value.course.grades.length > 0){\n for(const g of this.value.course.grades){\n if(g.selected){\n return true;\n }\n }\n }\n return false;\n },\n hasCompletions() {\n if(this.value.course.completion && this.value.course.completion.conditions) {\n for(const cgroup of this.value.course.completion.conditions){\n if(cgroup.items && cgroup.items.length > 0){\n return true;\n }\n }\n }\n return false;\n },\n hasCompetencies() {\n if(this.value.course.competency && this.value.course.competency.competencies) {\n return (this.value.course.competency.competencies.length > 0);\n }\n return false;\n },\n includeChanged(newValue,g){\n call([{\n methodname: 'local_treestudyplan_include_grade',\n args: { 'grade_id': g.id,\n 'item_id': this.value.id,\n 'include': newValue,\n 'required': g.required,\n }\n }])[0].catch(notification.exception);\n },\n requiredChanged(newValue,g){\n call([{\n methodname: 'local_treestudyplan_include_grade',\n args: { 'grade_id': g.id,\n 'item_id': this.value.id,\n 'include': g.selected,\n 'required': newValue,\n }\n }])[0].catch(notification.exception);\n },\n updateConditions() {\n call([{\n methodname: 'local_treestudyplan_edit_studyitem',\n args: { 'id': this.value.id,\n 'conditions': this.value.conditions,\n }\n }])[0].catch(notification.exception);\n },\n },\n created() {\n\n },\n template: `\n <div class=\"t-item-course\">\n <b-card no-body >\n <div class='d-flex flex-wrap mr-0 ml-0'>\n <div>\n <span\n :title=\"text['coursetiming_'+value.course.timing]\"\n v-b-popover.hover.top=\"startdate+' - '+enddate\"\n :class=\"'t-timing-indicator timing-'+value.course.timing\"></span>\n </div>\n <div class=\"flex-fill align-items-center\">\n <b-card-body >\n <a class=\"t-item-course-config\"\n v-b-modal=\"'t-item-course-config-'+value.id\"\n href=\"#\" @click.prevent=\"\"\n ><i :class=\"'fa fa-'+configurationIcon+' ' + configurationState\"></i></a>\n <a v-b-modal=\"'t-item-course-config-'+value.id\"\n :id=\"'t-item-course-details-'+value.id\"\n :href=\"'/course/view.php?id='+value.course.id\"\n @click.prevent.stop=\"\">{{ value.course.displayname }}</a>\n </b-card-body>\n </div>\n </div>\n <b-modal class=\"\"\n :id=\"'t-item-course-config-'+value.id\"\n :title=\"value.course.displayname + ' - ' + value.course.fullname\"\n ok-only\n size=\"lg\"\n scrollable\n class=\"b-modal-justify-footer-between\"\n >\n <template #modal-header>\n <div>\n <h1><a :href=\"'/course/view.php?id='+value.course.id\" target=\"_blank\"\n ><i class=\"fa fa-graduation-cap\"></i> {{ value.course.fullname }}</a>\n <a v-if='!!value.course.completion'\n :href=\"'/course/completion.php?id='+value.course.id\" target=\"_blank\"\n :title=\"text.configure_completion\"><i class=\"fa fa-gear\"></i></a>\n </h1>\n {{ value.course.context.path.join(\" / \")}} / {{value.course.shortname}}\n </div>\n <div class=\"r-course-detail-header-right\">\n <div :class=\"'r-timing-'+value.course.timing\">\n {{text['coursetiming_'+value.course.timing]}}<br>\n {{ startdate }} - {{ enddate }}\n </div>\n <t-item-timing-checker\n class=\"mt-1\"\n :maxspan=\"maxspan\"\n :page=\"page\"\n :period=\"period\"\n v-model=\"value\"\n ></t-item-timing-checker>\n </div>\n </template>\n\n <s-course-extrafields \n v-if=\"value.course.extrafields\" \n v-model=\"value.course.extrafields\"\n position=\"above\"\n ></s-course-extrafields>\n <t-item-course-grades\n v-if='!!value.course.grades && value.course.grades.length > 0'\n v-model='value' :plan=\"plan\"\n ></t-item-course-grades>\n <t-item-course-completion\n v-if='!!value.course.completion'\n v-model='value.course.completion'\n :course='value.course'\n ></t-item-course-completion>\n <t-item-course-competency\n v-if='!!value.course.competency'\n v-model='value.course.competency'\n :item='value'\n ></t-item-course-competency>\n <s-course-extrafields \n v-if=\"value.course.extrafields\" \n v-model=\"value.course.extrafields\"\n position=\"below\"\n ></s-course-extrafields>\n <template #modal-footer=\"{ ok, cancel, hide }\" >\n <a href='#' @click='$emit(\"deleterq\")' class=\"text-danger\"\n ><i class=\"fa fa-trash\"></i>\n {{ text.delete }}\n </a>\n <b-button size=\"sm\" variant=\"primary\" @click=\"ok()\">\n {{ text.ok }}\n </b-button>\n </template>\n </b-modal>\n </b-card></div>\n `,\n });\n\n\n Vue.component('t-item-course-grades', {\n props: {\n 'value' :{\n type: Object,\n default(){ return null;},\n },\n 'plan' :{\n type: Object,\n default(){ return null;},\n },\n },\n data() {\n return {\n condition_options: string_keys.conditions,\n text: strings.item_course_text,\n };\n },\n computed: {\n useRequiredGrades() {\n if(this.plan && this.plan.aggregation_info && this.plan.aggregation_info.useRequiredGrades !== undefined){\n return this.plan.aggregation_info.useRequiredGrades;\n }\n else {\n return false;\n }\n },\n selectedgrades(){\n let list = [];\n for(let ix in this.value.course.grades){\n let g = this.value.course.grades[ix];\n if(g.selected){\n list.push(g);\n }\n }\n return list;\n },\n },\n methods: {\n includeChanged(newValue,g){\n call([{\n methodname: 'local_treestudyplan_include_grade',\n args: { 'grade_id': g.id,\n 'item_id': this.value.id,\n 'include': newValue,\n 'required': g.required,\n }\n }])[0].catch(notification.exception);\n },\n requiredChanged(newValue,g){\n call([{\n methodname: 'local_treestudyplan_include_grade',\n args: { 'grade_id': g.id,\n 'item_id': this.value.id,\n 'include': g.selected,\n 'required': newValue,\n }\n }])[0].catch(notification.exception);\n },\n },\n created() {\n\n },\n template: `\n <div>\n <b-form-group\n :label=\"text.select_grades\"\n ><ul class=\"t-item-module-children\">\n <li class=\"t-item-course-gradeinfo\">\n <span class='t-item-course-chk-lbl'>{{text.grade_include}}</span\n ><span v-if=\"useRequiredGrades\" class='t-item-course-chk-lbl'>{{text.grade_require}}</span>\n </li>\n <li class=\"t-item-course-gradeinfo\" v-for=\"g in value.course.grades\">\n <b-form-checkbox inline\n @change=\"includeChanged($event,g)\" v-model=\"g.selected\"\n ></b-form-checkbox>\n <b-form-checkbox v-if=\"useRequiredGrades\" inline :disabled=\"!g.selected\"\n @change=\"requiredChanged($event,g)\" v-model=\"g.required\"\n ></b-form-checkbox>\n <span :title=\"g.typename\" v-html=\"g.icon\"></span>\n <s-edit-mod\n :title=\"value.course.fullname\"\n @saved=\"(fd) => g.name = fd.get('name')\"\n v-if=\"g.cmid > 0\"\n :cmid=\"g.cmid\"\n :coursectxid=\"value.course.ctxid\"\n genericonly><span v-html=\"g.name\"></span></s-edit-mod>\n </li>\n </ul>\n </b-form-group>\n </div>\n `,\n });\n\n Vue.component('t-item-course-completion',{\n props: {\n value : {\n type: Object,\n default: function(){ return {};},\n },\n guestmode: {\n type: Boolean,\n default: false,\n },\n course: {\n type: Object,\n default: function(){ return {};},\n },\n },\n data() {\n return {\n text: strings.completion,\n };\n },\n created(){\n const self = this;\n // Get text strings for condition settings\n let stringkeys = [];\n for(const key in this.text){\n stringkeys.push({ key: key, component: 'local_treestudyplan'});\n }\n get_strings(stringkeys).then(function(strings){\n let i = 0;\n for(const key in self.text){\n self.text[key] = strings[i];\n i++;\n }\n });\n },\n computed: {\n hasCompletions() {\n if(this.value.conditions) {\n for(const cgroup of this.value.conditions){\n if(cgroup.items && cgroup.items.length > 0){\n return true;\n }\n }\n }\n return false;\n },\n },\n methods: {\n completion_icon(completion) {\n switch(completion){\n case \"progress\":\n return \"exclamation-circle\";\n case \"complete\":\n return \"check-circle\";\n case \"complete-pass\":\n return \"check-circle\";\n case \"complete-fail\":\n return \"times-circle\";\n default: // case \"incomplete\"\n return \"circle-o\";\n }\n },\n\n completion_tag(cgroup){\n return cgroup.completion?'completed':'incomplete';\n }\n },\n template: `\n <table class=\"r-item-course-grade-details\">\n <tr v-if=\"hasCompletions\">\n <td colspan='2'><span v-if=\"value.aggregation == 'all'\">{{ text.aggregation_overall_all}}</span\n ><span v-else>{{ text.aggregation_overall_any}}</span></td>\n </tr>\n <tr v-else>\n <td colspan='2'>{{text.completion_not_configured}}!\n <br/><a :href=\"'/course/completion.php?id='+course.id\" target='_blank'>{{text.configure_completion}}</a>\n </td>\n </tr>\n <template v-for='cgroup in value.conditions'>\n <tr>\n <th colspan='2'><span v-if=\"cgroup.items.length > 1\"\n ><span v-if=\"cgroup.aggregation == 'all'\">{{ text.aggregation_all}}</span\n ><span v-else>{{ text.aggregation_any}}</span></span>\n {{cgroup.title}}</th>\n </tr>\n <tr v-for='ci in cgroup.items'>\n <td><span v-html='ci.details.criteria'></span>\n </td>\n <td v-if=\"ci.details.requirement\" class=\"font-italic\">\n {{ci.details.requirement}}\n </td>\n </tr>\n </template>\n </table>\n `,\n });\n\n //TAG: Course competency\n Vue.component('t-item-course-competency',{\n props: {\n value : {\n type: Object,\n default: function(){ return {};},\n },\n guestmode: {\n type: Boolean,\n default: false,\n },\n item: {\n type: Object,\n default: function(){ return { id: null};},\n }\n },\n data() {\n return {\n text: strings.competency,\n };\n },\n created(){\n\n },\n computed: {\n hasCompletions() {\n if(this.value.conditions) {\n for(const cgroup of this.value.conditions){\n if(cgroup.items && cgroup.items.length > 0){\n return true;\n }\n }\n }\n return false;\n },\n },\n methods: {\n pathtags(competency) {\n const path = competency.path;\n let s = \"\";\n for (const ix in path) {\n const p = path[ix];\n if ( ix > 0) {\n s += \" / \";\n }\n let url;\n if (p.type =='competency') { \n url = `/admin/tool/lp/competencies.php?competencyid=${p.id}`;\n } else {\n url = `/admin/tool/lp/competencies.php?competencyframeworkid=${p.id}&pagecontextid=${p.contextid}`;\n }\n \n s += `<a href=\"${url}\">${p.title}</a>`;\n }\n return s;\n },\n requiredChanged(newValue,c){\n call([{\n methodname: 'local_treestudyplan_require_competency',\n args: { 'competency_id': c.id,\n 'item_id': this.item.id,\n 'required': newValue,\n }\n }])[0].catch(notification.exception);\n },\n },\n template: `\n <table class=\"t-item-course-competency-list\">\n <tr v-if=\"value.competencies.length == 0\">\n <td colspan='2'>{{text.competencies_not_configured}}!\n <br><a :href=\"'/admin/tool/lp/coursecompetencies.php?courseid='+item.course.id\" target='_blank'>{{text.configure_competencies}}</a>\n </td>\n </tr>\n <template v-else>\n <tr class='t-item-course-competency-headers'>\n <th>{{text.heading}}</th>\n <th></th>\n <th>{{text.required}}</th>\n </tr>\n <tr v-for='c in value.competencies'>\n <td :colspan=\"(c.details)?1:2\"><a href='#' v-b-modal=\"'modal-competency-id-'+c.id\"><span v-html='c.title'></span></a></td>\n <td class='details' v-if=\"c.details\">\n <a href='#' v-b-modal=\"'modal-competency-id-'+c.id\"><span v-html='c.details'></span></a>\n </td>\n <td>\n <b-form-checkbox inline\n @change=\"requiredChanged($event,c)\"\n v-model=\"c.required\"\n >{{ text.required }}</b-form-checkbox>\n </td>\n <b-modal :id=\"'modal-competency-id-'+c.id\"\n size=\"lg\"\n ok-only\n centered\n scrollable\n >\n <template #modal-header>\n <div>\n <h1><i class=\"fa fa-puzzle-piece\"></i>\n <a :href=\"'/admin/tool/lp/competencies.php?competencyid='+c.id\" target=\"_blank\"\n >{{c.title}} {{c.details}} </a\n ></h1>\n <div><span v-html=\"pathtags(c)\"></span></div>\n </div>\n </template>\n <div class=\"mb-2\" v-if=\"c.description\"><span v-html='c.description'></span></div>\n\n <template v-if=\"c.rule && c.children\">\n <div>{{ c.ruleoutcome }} {{ text.when}} <span v-html=\"c.rule.toLocaleLowerCase()\"></span></div>\n <table v-if=\"c.children\" class='t-item-course-competency-list'>\n <tr class='t-item-course-competency-headers'>\n <th>{{text.heading}}</th>\n <th></th>\n <th>{{text.required}}</th>\n </tr>\n <tr v-for=\"cc in c.children\">\n <td :colspan=\"(c.details)?1:2\" ><span v-html='cc.title'></span></td>\n <td class='details' v-if=\"cc.details\"><span v-html='cc.details'></span></td>\n <td><span class=\"text-info\">{{ cc.points }} {{ text.points }}</span></td>\n <td><span class=\"text-danger\" v-if='cc.required'>{{ text.required }}</span></td>\n </tr>\n </table>\n </template>\n </b-modal>\n </tr>\n </template>\n </table>\n `,\n });\n /************************************\n * *\n * Toolbox list components *\n * *\n ************************************/\n Vue.component('t-item-junction',{\n props: {\n value : {\n type: Object,\n default: function(){ return {};},\n },\n },\n data() {\n return {\n condition_options: string_keys.conditions,\n };\n },\n methods: {\n\n },\n template: `\n <div class='t-item-junction t-item-filter'>\n <i class=\"fa fa-check-circle\"></i>\n </div>\n `,\n });\n\n Vue.component('t-item-finish',{\n props: {\n value : {\n type: Object,\n default: function(){ return {};},\n },\n },\n data() {\n return {\n };\n },\n methods: {\n },\n template: `\n <div class='t-item-finish t-item-filter'>\n <i class=\"fa fa-stop-circle\"></i>\n </div>\n `,\n });\n\n Vue.component('t-item-start',{\n props: {\n value : {\n type: Object,\n default: function(){ return {};},\n },\n },\n data() {\n return {\n };\n },\n created(){\n\n },\n methods: {\n },\n template: `\n <div class='t-item-start t-item-filter'>\n <i class=\"fa fa-play-circle\"></i>\n </div>\n `,\n });\n\n Vue.component('t-item-badge',{\n props: {\n value : {\n type: Object,\n default: function(){ return { badge: {}};},\n },\n },\n data() {\n return {\n txt: strings,\n text: strings.item_text,\n };\n },\n methods: {\n },\n template: `\n <div class='t-item-badge t-item-filter' v-b-tooltip.hover :title=\"value.badge.name\">\n <svg class=\"t-badge-backdrop \" width='50px' height='50px' viewBox=\"0 0 100 100\">\n <title>{{value.badge.name}}</title>\n <circle cx=\"50\" cy=\"50\" r=\"46\"\n style=\"stroke: currentcolor; stroke-width: 4; fill: currentcolor; fill-opacity: 0.5;\"/>\n <image class=\"badge-image\" clip-path=\"circle() fill-box\"\n :href=\"value.badge.imageurl\" x=\"12\" y=\"12\" width=\"76\" height=\"76\"/>\n </svg>\n <a class=\"t-item-config badge\"\n v-b-modal=\"'t-item-badge-details-'+value.id\" href=\"#\" @click.prevent=\"\"><i class=\"fa fa-gear\"></i></a>\n <b-modal class=\"\"\n :id=\"'t-item-badge-details-'+value.id\"\n :title=\"value.badge.name\"\n size=\"lg\"\n ok-only\n centered\n scrollable\n class=\"b-modal-justify-footer-between\"\n >\n <template #modal-header>\n <div>\n <h1><i class=\"fa fa-certificate\"></i>\n <a :href=\"value.badge.infolink\" target=\"_blank\"\n >{{ value.badge.name }}</a\n ></h1>\n </div>\n </template>\n <b-container fluid>\n <b-row><b-col cols=\"3\">\n <img :src=\"value.badge.imageurl\"/>\n </b-col><b-col cols=\"9\">\n <p>{{value.badge.description}}</p>\n <ul class=\"list-unstyled w-100 border-grey border-top border-bottom pt-1 pb-1 mb-1\"\n v-if=\"value.badge.criteria\"><li v-for=\"crit in value.badge.criteria\"\n ><span v-html='crit'></span></li></ul>\n <p><strong><i class=\"fa fa-link\"></i>\n <a :href=\"value.badge.infolink\">{{ txt.badge.badgeinfo }}</a></strong></p>\n </b-col></b-row>\n </b-container>\n <template #modal-footer=\"{ ok, cancel, hide }\" >\n <a href='#' @click='$emit(\"deleterq\")' class=\"text-danger\"\n ><i class=\"fa fa-trash\"></i>\n {{ text.delete }}\n </a>\n <b-button size=\"sm\" variant=\"primary\" @click=\"ok()\">\n {{ text.ok }}\n </b-button>\n </template>\n </b-modal>\n\n </div>\n `,\n });\n\n Vue.component('t-coursecat-list',{\n props: {\n value : {\n type: Array,\n default: function(){ return {};},\n },\n },\n data() {\n return {\n };\n },\n methods: {\n },\n template: `\n <ul class=\"t-coursecat-list\">\n <t-coursecat-list-item\n v-for=\"coursecat,idx in value\"\n v-model=\"value[idx]\"\n :key=\"coursecat.id\"></t-coursecat-list-item>\n </ul>\n `,\n });\n\n Vue.component('t-coursecat-list-item',{\n props: {\n value : {\n type: Object,\n default: function(){ return {};},\n },\n },\n data() {\n return {\n loading: false,\n\n };\n },\n computed: {\n showSpinner() {\n return this.canLoadMore();\n },\n hasDetails() {\n return (this.value.haschildren || this.value.hascourses);\n }\n\n },\n methods: {\n canLoadMore() {\n return (this.value.haschildren && (!this.value.children || this.value.children.length == 0)) ||\n (this.value.hascourses && (!this.value.courses || this.value.courses.length == 0));\n },\n onShowDetails(){\n const self = this;\n if(this.canLoadMore()) {\n call([{\n methodname: 'local_treestudyplan_get_category',\n args: { \"id\": this.value.id}\n }])[0].then(function(response){\n self.$emit('input', response);\n }).catch(notification.exception);\n }\n }\n },\n template: `\n <li class=\"t-coursecat-list-item\">\n <span v-if=\"hasDetails\" v-b-toggle=\"'coursecat-'+value.id\">\n <i class=\"when-closed fa fa-caret-right\"></i>\n <i class=\"when-open fa fa-caret-down\"></i>\n <span class=\"t-coursecat-heading\">\n <i class=\"t-coursecat-list-item fa fa-tasks\"></i>\n {{ value.category.name }}\n </span>\n </span>\n <span v-else>\n <span class=\"t-coursecat-heading\">\n <i class=\"t-coursecat-list-item fa fa-tasks\"></i>\n {{ value.category.name }}\n </span>\n </span>\n <b-collapse v-if=\"hasDetails\" :id=\"'coursecat-'+value.id\"\n @show=\"onShowDetails\" :visible=\"!!(value.children) || !!(value.courses)\">\n <b-spinner class=\"ml-4\" v-if=\"showSpinner\" small variant=\"primary\"></b-spinner>\n <t-coursecat-list v-if=\"value.children\" v-model=\"value.children\"></t-coursecat-list>\n <t-course-list v-if=\"value.courses\" v-model=\"value.courses\"></t-course-list>\n </b-collapse>\n </li>\n `,\n });\n\n Vue.component('t-course-list',{\n props: {\n value : {\n type: Array,\n default: function(){ return {};},\n },\n },\n data() {\n return {\n };\n },\n methods: {\n makeType(){\n return {\n item: false,\n component: true,\n span: 1, //TODO: Detect longer courses and give them an appropriate span\n type: 'gradable',\n };\n },\n },\n template: `\n <ul class=\"t-course-list\">\n <li class=\"t-course-list-item\" v-for=\"course in value\" :key=\"course.id\">\n <drag\n class=\"draggable-course\"\n :data=\"course\"\n :type=\"makeType()\"\n @cut=\"\"\n >\n <i class=\"t-course-list-item fa fa-book\"></i> {{ course.shortname }} - {{ course.fullname }}\n </drag>\n </li>\n </ul>\n `,\n });\n\n },\n};\n"],"names":["STUDYPLAN_EDITOR_FIELDS","PERIOD_EDITOR_FIELDS","datechanger_globals","default","defaultchoice","hidewarn","install","Vue","use","TSComponents","mFormComponents","debug","Debugger","isVisible","elem","offsetWidth","offsetHeight","getClientRects","length","ItemEventBus","document","addEventListener","editSwEventTypes","editModeSet","e","preventDefault","$emit","detail","editMode","string_keys","conditions","value","textkey","strings","studyplan_text","studyline_editmode","toolbox_toggle","editmode_modules_hidden","studyline_add","add$core","edit$core","studyline_name","studyline_name_ph","studyline_shortname","studyline_shortname_ph","studyline_color","associations","associated_cohorts","associated_users","studyline_edit","studyplan_name","studyplan_name_ph","studyplan_shortname","studyplan_shortname_ph","studyplan_description","studyplan_description_ph","studyplan_idnumber","studyplan_idnumber_ph","studyplan_slots","studyplan_startdate","studyplan_enddate","studyplan_advanced","advanced_tools","confirm_cancel","confirm_ok","success$core","error$core","advanced_converted","advanced_skipped","advanced_failed","advanced_locked","advanced_multiple","advanced_error","advanced_tools_heading","advanced_warning_title","advanced_warning","advanced_pick_scale","advanced_course_manipulation_title","advanced_bulk_course_timing","advanced_bulk_course_timing_desc","advanced_force_scale_title","advanced_force_scale_desc","advanced_force_scale_button","advanced_confirm_header","advanced_force_scale_confirm","advanced_backup_restore","advanced_restore","advanced_backup","advanced_restore_pages","advanced_restore_lines","advanced_backup_plan","advanced_backup_page","advanced_export","advanced_export_csv_plan","advanced_export_csv_page","advanced_import_from_file","advanced_purge","advanced_purge_plan","advanced_purge_plan_expl","advanced_purge_page","advanced_purge_page_expl","advanced_cascade_cohortsync_title","advanced_cascade_cohortsync_desc","advanced_cascade_cohortsync","currentpage","studyplan_edit","studyplan_add","studyplanpage_add","studyplanpage_edit","info_periodsextended","warning","period_edit","edit","fullname","shortname","startdate","enddate","course_timing","title","desc","question","timing_ok","timing_off","course","period","yes","no","duration","years","year","weeks","week","days","day","rememberchoice","hidewarning","periodspan","periods","periodspan_desc","studyplan_associate","associate_cohorts","associate_users","add_association","delete_association","associations_empty","associations_search","cohorts","users","selected","name","context","item_text","select_conditions","item_configuration","ok","delete","item_delete_message","type_course","type_junction","type_start","type_finish","type_badge","type_invalid","item_course_text","select_grades","coursetiming_past","coursetiming_present","coursetiming_future","grade_include","grade_require","cancel","invalid","error","completion","completion_completed","completion_incomplete","aggregation_all","aggregation_any","aggregation_overall_all","aggregation_overall_any","completion_not_configured","configure_completion","competency","competency_not_configured","configure_competency","when","required","points","heading","details","badge","share_badge","dateissued","dateexpire","badgeinfo","component","props","type","Object","selectedpage","data","force_scales","selected_scale","result","text","created","mounted","updated","computed","scales","id","disabled","this","concat","advanced","methods","force_scales_start","self","$bvModal","msgBoxConfirm","okVariant","okTitle","cancelTitle","then","methodname","args","studyplan_id","scale_id","response","catch","notification","exception","export_page","format","undefined","includes","page_id","content","export_plan","bulk_course_timing","success","location","reload","msgBoxOk","msg","import_studylines","filename","import_pages","purge_studyplan","force","purge_studyplanpage","cascade_cohortsync","modal_close","template","String","Number","planSaved","updatedplan","info","mode","moved_from","context_id","moved_to","moved","pages","updatedpage","page","centered","show","config","userfields","key","cohortfields","association","loading","search","associated","showModal","loadAssociations","cohortOptionModel","c","path","join","userOptionModel","u","firstname","lastname","map","searchCohorts","searchtext","like","exclude_id","cohortAssociate","requests","searchselected","i","r","push","cohort_id","fail","done","cohortDisassociate","associatedselected","searchUsers","userAssociate","user_id","userDisassociate","editdata","Date","getFullYear","editStart","editFinish","refresh","add_day","date","sub_day","create","studyline","toolbox_shown","editmode","color","original","studyplan","description","slots","aggregation","aggregation_config","aggregation_info","useRequiredGrades","useItemCondition","cache","linelayers","selectedpageindex","emptyline","filterslots","courseslots","$on","onMoodleEditModeChanged","initeditmode","$root","columns","columns_stylerule","s","trashbin_accepts","item","countLineLayers","line","timestamp","maxLayer","ix","courses","layer","filters","slotsempty","Array","isArray","count","movedStudyplan","plan","from","to","addStudyLine","newlineinfo","studylines","editLineStart","assign","editLineFinish","editedline","originalline","deleteLine","param","modalresponse","index","indexOf","splice","reorderLines","event","lines","apply","sequence","idx","deletePlan","deleteStudyItem","source","showslot","layeridx","forGradable","list","span","periodEdited","pi","prev","$refs","next","toolbox_switched","pagecreated","selectedpageChanged","newTabIndex","prevTabIndex","layers","layerHeights","onLineHeightChange","lineid","layerid","newheight","main","items","querySelectorAll","heightSum","forEach","el","height","getBoundingClientRect","heightStyle","style","deletable","editable","onEdit","onDelete","slotindex","resizeListener","ResizeObserver","size","observe","unmounted","disconnect","slotkey","itemidx","itm","listtype","dragacceptlist","courseHoverDummy","hover","current","now","pstart","pend","spanCss","datechanger","coursespan","onDrop","slot","relocateStudyItem","timingChecker","validate_course_period","$nextTick","onCut","iteminfo","onDragEnter","onDragLeave","maxSpan","freeIndex","clist","flist","busy","makeType","checkType","maxspan","hidden","Boolean","endperiod","endperiodnr","Math","min","perioddesc","course_period_matches","first","getTime","last","warn","floor","random","toString","globals","canupdatecourse","defaultvalue","change_course_period","period_id","course_id","timing","change_span","format_duration","dsi","toLocaleLowerCase","dummy","dragLine","dragEventListener","deleteMode","condition_options","showContext","dragStart","start","getElementById","dragelement","position","left","x","top","y","SimpleLine","gravity","end","onMouseMove","dragEnd","remove","removeProperty","removeEventListener","clientX","clientY","from_id","to_id","redrawLines","conn","connections","in","redrawLine","removeLine","out","highlight","setConfig","normalize","updateItem","continuation_id","doShowContext","hasContext","onCreatedConnection","onRemovedConnection","c_in","onRePositioned","onDisPositioned","re_id","onItemDeleted","item_id","onRedrawLines","deleteItem","msgparams","displayname","err","console","hasConnectionsOut","hasConnectionsIn","setTimeout","beforeDestroy","$off","beforeUpdate","useItemConditions","configurationState","hasGrades","hasCompletions","hasCompetencies","configurationIcon","noenddate","grades","g","cgroup","competencies","includeChanged","newValue","requiredChanged","updateConditions","selectedgrades","guestmode","stringkeys","completion_icon","completion_tag","pathtags","p","url","contextid","txt","showSpinner","canLoadMore","hasDetails","haschildren","hascourses","children","onShowDetails"],"mappings":"y2BAwBMA,wBACN,CAAC,OAAO,YAAY,cAAc,WAAW,aAAc,cAAc,sBAGnEC,qBACN,CAAC,WAAW,YAAY,YAAY,WAI9BC,oBAAsB,CACxBC,SAAS,EACTC,eAAe,EACfC,UAAU,gBAGC,CACXL,wBAAyBA,wBACzBM,QAAQC,KACJA,IAAIC,IAAIC,kCACRF,IAAIC,IAAIE,0BACJC,MAAQ,IAAIC,kBAAS,iCAYhBC,UAAUC,eACJA,KAAKC,aAAeD,KAAKE,cAAgBF,KAAKG,iBAAiBC,cAIxEC,aAAe,IAAIZ,IAGzBa,SAASC,iBAAiBC,wBAAiBC,aAAaC,IACpDA,EAAEC,iBACFN,aAAaO,MAAM,cAAeF,EAAEG,OAAOC,iBAG3CC,aAAc,iCAAgB,CAC9BC,WAAY,CACR,CAAEC,MAAO,MAAOC,QAAS,iBACzB,CAAED,MAAO,MAAOC,QAAS,oBAI7BC,SAAU,8BAAa,CACvBC,eAAgB,CACZC,mBAAoB,qBACpBC,eAAgB,iBAChBC,wBAAwB,0BACxBC,cAAe,gBACfC,SAAU,WACVC,UAAW,YACXC,eAAgB,iBAChBC,kBAAmB,oBACnBC,oBAAqB,sBACrBC,uBAAwB,yBACx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