{"version":3,"file":"studyplan-report-components.min.js","sources":["../src/studyplan-report-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 {load_strings} from './util/string-helper';\nimport {call} from 'core/ajax';\nimport notification from 'core/notification';\nimport Debugger from './util/debugger';\nimport Config from 'core/config';\nimport TSComponents from './treestudyplan-components';\nimport FitTextVue from './util/fittext-vue';\nimport {format_datetime} from \"./util/date-helper\";\n\nconst debug = new Debugger(\"treestudyplan-viewer\");\n\n\n// Make π available as a constant\nconst π = Math.PI;\n// Gravity value for arrow lines - determines how much a line is pulled in the direction of the start/end before changing direction\nconst LINE_GRAVITY = 1.3;\n\n/**\n * Strip tags from html\n * @param {*} html \n * @returns \n */\nfunction striptags(html) {\n const tmp = document.createElement(\"DIV\");\n tmp.innerHTML = html;\n const text = tmp.textContent || tmp.innerText;\n tmp.remove();\n return text;\n}\n\n/**\n * Retrieve condition headers\n * @param {Object} item\n */\nfunction conditionHeaders(item) {\n const course = item.course;\n const list = [];\n if (course.competency) {\n for (const cmp of course.competency.competencies) {\n list.push({\n name: (cmp.details?`${cmp.title} - ${cmp.details}`:cmp.title),\n tooltip: cmp.description,\n });\n }\n } else if(course.completion) {\n for (const cnd of course.completion.conditions) {\n for (const itm of cnd.items) {\n list.push({\n name: itm.title,\n tooltip: `${itm.details.type}: ${itm.details.requirement}`,\n });\n }\n }\n } else if(course.grades) {\n for(const g of course.grades) {\n if (g.selected) {\n list.push({\n name: g.name,\n tooltip: `${g.typename}: ${striptags(g.name)}`,\n });\n }\n }\n }\n return list;\n}\n\n/**\n * Retrieve conditions\n * @param {Object} item\n */\nfunction conditions(item) {\n const course = item.course;\n const list = [];\n if (course.competency) {\n for (const cmp of course.competency.competencies) {\n list.push(cmp);\n }\n } else if(course.completion) {\n for (const cnd of course.completion.conditions) {\n for (const itm of cnd.items) {\n list.push(itm);\n }\n }\n } else if(course.grades) {\n for(const g of course.grades) {\n if (g.selected) {\n list.push(g);\n }\n }\n }\n return list;\n}\n\n\nexport default {\n install(Vue/*,options*/){\n Vue.use(TSComponents);\n Vue.use(FitTextVue);\n\n let strings = load_strings({\n report: {\n loading: \"loadinghelp@core\",\n studyplan_past: \"studyplan_past\",\n studyplan_present: \"studyplan_present\",\n studyplan_future: \"studyplan_future\",\n back: \"back\",\n },\n \n invalid: {\n error: 'error',\n },\n header: {\n overall: 'overall',\n students: 'students@core',\n firstname: 'firstname@core',\n lastname: 'lastname@core',\n email: 'email@core',\n lastaccess: 'lastaccess@core',\n },\n studentresults: {\n completion_incomplete: \"completion_incomplete\",\n completion_failed: \"completion_failed\",\n completion_pending: \"completion_pending\",\n completion_progress: \"completion_progress\",\n completion_completed: \"completion_completed\",\n completion_good: \"completion_good\",\n completion_excellent: \"completion_excellent\",\n student_not_tracked: \"student_not_tracked\",\n never: \"never@core\",\n }\n });\n\n /************************************\n * *\n * Treestudyplan Viewer components *\n * *\n ************************************/\n\n Vue.component('q-studyplanreport', {\n props: {\n structure: {\n type: Object,\n },\n },\n data() {\n return {\n students: [],\n studentresults: {},\n studentsloading: true,\n expansioninfo: {\n periods: {},\n lines: {},\n items: {},\n },\n groupinfo: {},\n\n sorting: {\n header: 'lastname',\n asc: true,\n }\n };\n },\n created() {\n },\n watch:{\n structure: {\n immediate: true,\n handler (structure) {\n this.loadStudents(); // reload the student list\n \n // (Re)build expansion info structure\n let firstperiod = true;\n for (const period of structure.periods) {\n const pid = period.period.id;\n if (!this.expansioninfo.periods[pid]) {\n // Use this.$set to make sure the properties are reactive.\n this.$set(\n this.expansioninfo.periods, \n pid, \n {\n expanded: ((firstperiod && period.lines.length > 0)?true:false),\n }\n );\n this.$set(\n this.expansioninfo.lines, \n period.period.id, \n {}\n );\n }\n for (const line of period.lines) {\n const lid = line.line.id;\n if (!this.expansioninfo.lines[lid]) {\n // Use this.$set to make sure the properties are reactive.\n this.$set(\n this.expansioninfo.lines[pid],\n lid, \n {\n expanded: true,\n }\n );\n }\n for (const item of line.items) {\n if (!this.expansioninfo.items[item.id]) {\n // Use this.$set to make sure the properties are reactive.\n this.$set(\n this.expansioninfo.items,\n item.id,\n {\n expanded: false,\n }\n );\n }\n }\n }\n firstperiod = false;\n }\n }\n }\n },\n computed: {\n sortedstudents(){\n const self=this;\n // Probably could make a deep copy for purity's sake, but this works just as well and is probably more efficient.\n const students = this.students;\n for (const group of this.students) {\n group.users.sort((a,b) => {\n let d = a;\n let e = b;\n if (!this.sorting.asc) {\n d = b;\n e = a;\n } \n if (this.sorting.header == \"lastaccess\") {\n const dvalue = (d[this.sorting.header]?d[this.sorting.header]:0);\n const evalue = (e[this.sorting.header]?e[this.sorting.header]:0);\n return dvalue - evalue;\n } else {\n return String(d[this.sorting.header]).localeCompare(String(e[this.sorting.header]));\n }\n });\n }\n \n return students;\n },\n resultColCount(){\n let count = 0;\n for (const period of this.structure.periods) {\n const pid = period.period.id;\n if (!this.expansioninfo.periods[pid].expanded) {\n // This period is not expanded. Make it 3 units wide \n count += 2;\n } else {\n for (const line of period.lines) {\n const lid = line.line.id;\n if (!this.expansioninfo.lines[pid][lid].expanded) {\n count +=1;\n } else { \n for (const item of line.items) {\n if (!this.expansioninfo.items[item.id].expanded) {\n count += 1;\n } else {\n count += 1 + conditions(item).length;\n }\n }\n }\n }\n }\n }\n return count; \n }\n },\n methods: {\n loadStudents() {\n const self = this;\n self.studentsloading=true;\n call([{\n methodname: 'local_treestudyplan_all_associated_grouped',\n args: { studyplan_id: this.structure.studyplan.id}\n }])[0].then(function(response){\n self.students = response;\n for(const group of self.students) {\n self.$set(\n self.groupinfo,\n group.id,\n {\n expanded: true,\n }\n );\n\n for(const student of group.users){\n self.$set(\n self.studentresults,\n student.id, \n {\n loading: true,\n results: [],\n }\n );\n call([{\n methodname: 'local_treestudyplan_get_report_data',\n args: { pageid: self.structure.page.id, \n userid: student.id,\n firstperiod: self.structure.firstperiod,\n lastperiod: self.structure.lastperiod,\n }\n }])[0].then(function(response){\n self.studentresults[student.id].loading = false;\n self.studentresults[student.id].results = response;\n }).catch(notification.exception);\n }\n }\n self.studentsloading=false;\n }).catch(notification.exception);\n },\n expansionChanged(parm, id, val) {\n if(parm[0] == 'p') {\n parm = 'periods';\n } else if(parm[0] == 'l') {\n parm = 'lines';\n } else {\n parm = 'items';\n }\n\n if (parm == 'lines') {\n this.expansioninfo[parm][id[0]][id[1]].expanded = val;\n } else {\n this.expansioninfo[parm][id].expanded = val;\n }\n },\n groupExpansionChanged(group) {\n this.groupinfo[group.id].expanded = !this.groupinfo[group.id].expanded;\n },\n toggleSort(header) {\n if (this.sorting.header == header) {\n this.sorting.asc = !this.sorting.asc;\n } else {\n this.sorting.header = header;\n this.sorting.asc = true;\n }\n }\n },\n template: `\n \n \n \n \n \n \n \n \n \n \n
\n
\n `,\n });\n\n Vue.component('q-header', {\n props: {\n structure: {\n type: Object,\n },\n sorting: {\n type: Object,\n },\n expansion: {\n type: Object\n },\n },\n data() {\n return {\n text: strings.header,\n };\n },\n computed: {\n },\n methods: {\n conditions(item) {\n return conditionHeaders(item);\n },\n colspanPeriod(period) {\n const pid = period.period.id;\n if (this.expansion.periods[pid].expanded) {\n let sum = 0;\n for (const l of period.lines) {\n sum += this.colspanLine(period,l);\n }\n return sum;\n } else {\n return 2;\n }\n },\n colspanLine(period,line) {\n const pid = period.period.id;\n const lid = line.line.id;\n\n if (this.expansion.lines[pid][lid].expanded) {\n let sum = 0;\n for (const i of line.items) {\n sum += this.colspanItem(i);\n }\n return sum;\n } else {\n return 1;\n }\n },\n colspanItem(item) {\n if (this.expansion.items[item.id].expanded) {\n const cs = this.conditions(item);\n return 1+cs.length;\n } else {\n return 1;\n }\n },\n togglePeriod(period,val) {\n if ( val === undefined) {\n val = !(this.expansion.periods[period.id].expanded);\n }\n this.$emit('expansion','periods',period.id,val);\n },\n toggleLine(period,line,val) {\n if ( val === undefined) {\n val = !(this.expansion.lines[period.id][line.id].expanded);\n }\n this.$emit('expansion','lines',[period.id,line.id],val);\n },\n toggleItem(item,val) {\n if ( val === undefined) {\n val = !(this.expansion.items[item.id].expanded);\n }\n this.$emit('expansion','items',item.id,val);\n },\n toggleSort(heading) {\n this.$emit('togglesort',heading);\n }\n },\n mounted() {\n \n },\n updated() {\n },\n /* TODO: https://css-tricks.com/position-sticky-and-table-headers/ */\n template: `\n \n \n {{text.students}}\n  {{ p.period.fullname}}{{ p.period.fullname}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{text.firstname}}\n / {{text.lastname}}\n \n \n {{text.lastaccess}}\n \n \n \n `,\n });\n\n Vue.component('q-groupheading', {\n props: {\n group: {\n type: Object,\n },\n resultcolumns: {\n type: Number,\n default: 1\n },\n studentinfocolumns: {\n type: Number,\n default: 1\n },\n expanded: {\n type: Boolean,\n }\n },\n data() {\n return {\n\n };\n },\n computed: {\n },\n methods: {\n toggleGroup(){\n this.$emit('togglegroup',this.group);\n }\n },\n template: `\n \n  {{group.label}}\n \n \n `,\n });\n\n Vue.component('q-inforow', {\n props: {\n resultcolumns: {\n type: Number,\n default: 1\n },\n studentinfocolumns: {\n type: Number,\n default: 1\n },\n },\n data() {\n return {\n };\n },\n computed: {\n },\n methods: {\n },\n template: `\n \n \n \n \n `,\n });\n\n\n Vue.component('q-studentresults', {\n props: {\n student: {\n type: Object,\n },\n structure: {\n type: Object,\n },\n results: {\n type: Array,\n },\n loading: {\n type: Boolean,\n default: false\n },\n expansion: {\n type: Object,\n },\n even: {\n type: Boolean,\n default: false,\n }\n },\n data() {\n return {\n text: strings.studentresults,\n };\n },\n computed: {\n lastaccess() {\n if (this.student.lastaccess) {\n return format_datetime(this.student.lastaccess); // Takes date in milliseconds\n } else {\n return this.text.never;\n }\n }\n },\n methods: {\n useritems(line) {\n const list = [];\n for (const item of line.items) {\n let newitm = item;\n for (const itm of this.results) {\n if (item.id == itm.id) {\n newitm = itm;\n break;\n }\n }\n list.push(newitm);\n }\n return list;\n },\n conditions(item) {\n return conditions(item);\n },\n },\n /* https://css-tricks.com/position-sticky-and-table-headers/ */\n /* TODO: Rework below to make use of tables. Use as main element. Then create multiple as needed for the headers.\n This should create a much better view than using divs overal.\n */\n template: `\n \n {{student.firstname}} {{student.lastname}}\n {{lastaccess}}\n \n \n `,\n });\n\n Vue.component('q-courseresult', {\n props: {\n student: {\n type: Object,\n },\n item: {\n type: Object,\n },\n loading: {\n type: Boolean,\n default: false\n },\n },\n data() {\n return {\n text: strings.studentresults,\n };\n },\n computed: {\n hasprogressinfo() {\n const course = this.item.course;\n if (!course.enrolled) {\n return false;\n } else {\n return (course.completion || course.competency || course.grades)?true:false;\n }\n },\n completion_icon() {\n const completion = this.item.completion;\n switch(completion){\n default: // case \"incomplete\"\n return \"circle-o\";\n case \"pending\":\n return \"question-circle\";\n case \"failed\":\n return \"times-circle\";\n case \"progress\":\n return \"exclamation-circle\";\n case \"completed\":\n return \"check-circle\";\n case \"good\":\n return \"check-circle\";\n case \"excellent\":\n return \"check-circle\";\n }\n },\n },\n methods: {\n },\n template: `\n \n \n \n \n \n `,\n });\n\n Vue.component('q-conditionresult', {\n props: {\n student: {\n type: Object,\n },\n item: {\n type: Object,\n },\n loading: {\n type: Boolean,\n default: false\n },\n conditionidx: {\n type: Number,\n }\n },\n data() {\n return {\n text: strings.studentresults,\n };\n },\n computed: {\n conditions() {\n return conditions(this.item);\n },\n condition() {\n if (this.conditionidx >= 0 && this.conditionidx < this.conditions.length) {\n return this.conditions[this.conditionidx];\n } else {\n return null;\n }\n },\n hasprogressinfo() {\n const course = this.item.course;\n if (!course.enrolled) {\n return false;\n } else {\n return (course.completion || course.competency || course.grades);\n }\n },\n completion_icon() {\n const completion = this.condition_completion();\n switch(completion){\n default: // case \"incomplete\"\n return \"circle-o\";\n case \"pending\":\n return \"question-circle\";\n case \"failed\":\n return \"times-circle\";\n case \"progress\":\n return \"exclamation-circle\";\n case \"completed\":\n return \"check-circle\";\n case \"good\":\n return \"check-circle\";\n case \"excellent\":\n return \"check-circle\";\n }\n },\n condition_value() {\n const course = this.item.course;\n if (course.competency) {\n if (this.condition.grade) {\n // Return grade if possible.\n return this.condition.grade;\n } \n } else if(course.completion) {\n if (this.condition.grade) {\n // Return grade if possible.\n return this.condition.grade;\n } \n } else if(course.grades) {\n return this.condition.grade;\n }\n // Fallback to completion icon.\n const icon = this.completion_icon();\n return ``;\n },\n condition_completion() {\n // Unify completion information\n const course = this.item.course;\n if (course.competency) {\n const competency = this.condition;\n if (competency.proficient && competency.courseproficient) {\n return \"completed\";\n } else if (competency.proficient) {\n return \"completed\";\n } else if (competency.proficient === false) {\n return \"failed\";\n } else if (competency.progress) {\n return \"progress\";\n } else {\n return \"incomplete\";\n }\n } else if(course.completion) {\n return this.condition.status;\n } else if(course.grades) {\n return this.condition.completion;\n }\n }\n\n },\n methods: {\n },\n // TODO: Show actual grades when relevant at all (don;t forget the grade point completion requirement)\n template: `\n \n \n \n \n \n \n \n `,\n });\n\n\n\n },\n};"],"names":["Debugger","Math","PI","striptags","html","tmp","document","createElement","innerHTML","text","textContent","innerText","remove","conditions","item","course","list","competency","cmp","competencies","push","completion","cnd","itm","items","grades","g","selected","install","Vue","use","TSComponents","FitTextVue","strings","report","loading","studyplan_past","studyplan_present","studyplan_future","back","invalid","error","header","overall","students","firstname","lastname","email","lastaccess","studentresults","completion_incomplete","completion_failed","completion_pending","completion_progress","completion_completed","completion_good","completion_excellent","student_not_tracked","never","component","props","structure","type","Object","data","studentsloading","expansioninfo","periods","lines","groupinfo","sorting","asc","created","watch","immediate","handler","loadStudents","firstperiod","period","pid","id","this","$set","expanded","length","line","lid","computed","sortedstudents","group","users","sort","a","b","d","e","String","localeCompare","resultColCount","count","methods","self","methodname","args","studyplan_id","studyplan","then","response","student","results","pageid","page","userid","lastperiod","catch","notification","exception","expansionChanged","parm","val","groupExpansionChanged","toggleSort","template","expansion","name","details","title","tooltip","description","requirement","typename","conditionHeaders","colspanPeriod","sum","l","colspanLine","i","colspanItem","togglePeriod","undefined","$emit","toggleLine","toggleItem","heading","mounted","updated","resultcolumns","Number","default","studentinfocolumns","Boolean","toggleGroup","Array","even","useritems","newitm","hasprogressinfo","enrolled","completion_icon","conditionidx","condition","condition_completion","condition_value","grade","proficient","courseproficient","progress","status"],"mappings":"gwBAiBc,IAAIA,kBAAS,wBAIjBC,KAAKC,YASNC,UAAUC,YACTC,IAAMC,SAASC,cAAc,OACnCF,IAAIG,UAAYJ,WACVK,KAAOJ,IAAIK,aAAeL,IAAIM,iBACpCN,IAAIO,SACGH,cA2CFI,WAAWC,YACVC,OAASD,KAAKC,OACdC,KAAO,MACTD,OAAOE,eACF,MAAMC,OAAOH,OAAOE,WAAWE,aAChCH,KAAKI,KAAKF,UAEX,GAAGH,OAAOM,eACR,MAAMC,OAAOP,OAAOM,WAAWR,eAC3B,MAAMU,OAAOD,IAAIE,MAClBR,KAAKI,KAAKG,UAGf,GAAGR,OAAOU,WACT,MAAMC,KAAKX,OAAOU,OACdC,EAAEC,UACFX,KAAKI,KAAKM,UAIfV,kBAII,CACXY,QAAQC,KACJA,IAAIC,IAAIC,kCACRF,IAAIC,IAAIE,yBAEJC,SAAU,8BAAa,CACvBC,OAAQ,CACJC,QAAS,mBACTC,eAAgB,iBAChBC,kBAAmB,oBACnBC,iBAAkB,mBAClBC,KAAM,QAGVC,QAAS,CACLC,MAAO,SAEXC,OAAQ,CACJC,QAAS,UACTC,SAAU,gBACVC,UAAW,iBACXC,SAAU,gBACVC,MAAO,aACPC,WAAY,mBAEhBC,eAAgB,CACZC,sBAAuB,wBACvBC,kBAAmB,oBACnBC,mBAAoB,qBACpBC,oBAAqB,sBACrBC,qBAAsB,uBACtBC,gBAAiB,kBACjBC,qBAAsB,uBACtBC,oBAAqB,sBACrBC,MAAO,gBAUf7B,IAAI8B,UAAU,oBAAqB,CAC/BC,MAAO,CACHC,UAAW,CACPC,KAAMC,SAGdC,KAAI,KACO,CACHpB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