Bugfix in report view
This commit is contained in:
parent
5352b64919
commit
9bd0f2002e
2
amd/build/report-viewer-components.min.js
vendored
2
amd/build/report-viewer-components.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -239,6 +239,9 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
selectstudyplan(plan) {
|
||||
this.selectedstudyplan = plan;
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<div class='t-studyplan-container'>
|
||||
|
@ -249,7 +252,7 @@ export default {
|
|||
:key="studyplan.id"
|
||||
:active="displayedstudyplan && studyplan.id == displayedstudyplan.id"
|
||||
button
|
||||
@click="selectedstudyplan = studyplan"
|
||||
@click="selectstudyplan(studyplan)"
|
||||
>{{studyplan.name}}</b-list-group-item>
|
||||
</b-list-group>
|
||||
<r-studyplan v-if='displayedstudyplan' v-model='displayedstudyplan' :guestmode='guestmode' :teachermode='teachermode'></r-studyplan>
|
||||
|
@ -347,6 +350,8 @@ export default {
|
|||
},
|
||||
updated() {
|
||||
scrollCurrentIntoView(this.value.id);
|
||||
ItemEventBus.$emit('lineHeightChange', null);
|
||||
|
||||
},
|
||||
template: `
|
||||
<div class='r-studyplan-content'>
|
||||
|
@ -450,11 +455,11 @@ export default {
|
|||
|
||||
},
|
||||
methods: {
|
||||
onLineHeightChange(lineid,layerid,newheight){
|
||||
onLineHeightChange(lineid){
|
||||
// All layers for this line have the first slot send an update message on layer height change.
|
||||
// When one of those updates is received, record the height and recalculate the total height of the
|
||||
// header
|
||||
if(this.$refs.mainEl && lineid == this.value.id){
|
||||
if(this.$refs.mainEl && (lineid == this.value.id || lineid === null)){
|
||||
const items = document.querySelectorAll(
|
||||
`.r-studyline-slot-0[data-studyline='${this.value.id}']`);
|
||||
// determine the height of all the lines and add them up.
|
||||
|
@ -644,12 +649,7 @@ export default {
|
|||
let lineinfo = this.lines[conn.to_id];
|
||||
if(lineinfo){
|
||||
if(lineinfo.line){
|
||||
if(lineinfo.lineElm ){
|
||||
lineinfo.lineElm.parentNode.removeChild(lineinfo.lineElm);
|
||||
lineinfo.lineElm = undefined;
|
||||
} else {
|
||||
lineinfo.line.remove();
|
||||
}
|
||||
lineinfo.line.remove();
|
||||
lineinfo.line = undefined;
|
||||
}
|
||||
} else {
|
||||
|
@ -668,16 +668,19 @@ export default {
|
|||
end: LINE_GRAVITY,
|
||||
},
|
||||
});
|
||||
|
||||
let elmWrapper = (this.plan.id >=0)?document.getElementById('studyplan-linewrapper-'+this.plan.id):null;
|
||||
if(elmWrapper !== null){
|
||||
let elmLine = document.querySelector('body > .leader-line:last-child');
|
||||
elmWrapper.appendChild(elmLine);
|
||||
lineinfo.lineElm = elmLine; // store line element so it can more easily be removed from the dom
|
||||
}
|
||||
}
|
||||
},
|
||||
redrawLines(){
|
||||
// Clean all old lines
|
||||
for(let ix in this.lines){
|
||||
let lineinfo = this.lines[ix];
|
||||
if(lineinfo && lineinfo.line){
|
||||
lineinfo.line.remove();
|
||||
lineinfo.line = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
// Create new lines
|
||||
for(let i in this.value.connections.out){
|
||||
let conn = this.value.connections.out[i];
|
||||
this.redrawLine(conn);
|
||||
|
@ -1583,10 +1586,7 @@ export default {
|
|||
return this.determine_grading_icon(this.is_grading_needed(grade));
|
||||
},
|
||||
is_grading_needed(grade){
|
||||
debug.info("Grade: ", grade.name);
|
||||
debug.info(grade.grading);
|
||||
if(grade.grading){
|
||||
debug.info("Ping");
|
||||
if(grade.grading.ungraded){
|
||||
return 'ungraded';
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$plugin->component = 'local_treestudyplan'; // Recommended since 2.0.2 (MDL-26035). Required since 3.0 (MDL-48494)
|
||||
$plugin->version = 2023081600; // YYYYMMDDHH (year, month, day, iteration)
|
||||
$plugin->version = 2023081602; // YYYYMMDDHH (year, month, day, iteration)
|
||||
$plugin->requires = 2021051700; // YYYYMMDDHH (This is the release version for Moodle 3.11)
|
||||
|
||||
$plugin->dependencies = [
|
||||
|
|
Loading…
Reference in New Issue
Block a user