WIP
This commit is contained in:
parent
e1c6d07b2c
commit
8f6d48b981
2
amd/build/studyplan-report-components.min.js
vendored
2
amd/build/studyplan-report-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
|
@ -163,10 +163,14 @@ export default {
|
||||||
);
|
);
|
||||||
|
|
||||||
for(const student of group.users){
|
for(const student of group.users){
|
||||||
self.studentresults[student.id] = {
|
self.$set(
|
||||||
loading: true,
|
self.studentresults,
|
||||||
results: [],
|
student.id,
|
||||||
};
|
{
|
||||||
|
loading: true,
|
||||||
|
results: [],
|
||||||
|
}
|
||||||
|
);
|
||||||
call([{
|
call([{
|
||||||
methodname: 'local_treestudyplan_get_report_data',
|
methodname: 'local_treestudyplan_get_report_data',
|
||||||
args: { pageid: self.structure.page.id,
|
args: { pageid: self.structure.page.id,
|
||||||
|
@ -215,7 +219,8 @@ export default {
|
||||||
<q-studentresults v-for="student in group.users"
|
<q-studentresults v-for="student in group.users"
|
||||||
:student='student'
|
:student='student'
|
||||||
:structure='structure'
|
:structure='structure'
|
||||||
:results='studentresults[student.id]'
|
:results='studentresults[student.id].results'
|
||||||
|
:loading='studentresults[student.id].loading'
|
||||||
:expansion='expansioninfo'
|
:expansion='expansioninfo'
|
||||||
></q-studentresults>
|
></q-studentresults>
|
||||||
</template>
|
</template>
|
||||||
|
@ -355,10 +360,14 @@ export default {
|
||||||
type: Object,
|
type: Object,
|
||||||
},
|
},
|
||||||
results: {
|
results: {
|
||||||
type: Object
|
type: Array,
|
||||||
},
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
expansion: {
|
expansion: {
|
||||||
type: Object
|
type: Object,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -440,7 +449,7 @@ export default {
|
||||||
const list = [];
|
const list = [];
|
||||||
for (const item of line.items) {
|
for (const item of line.items) {
|
||||||
let newitm = item;
|
let newitm = item;
|
||||||
for (const itm of this.results.results) {
|
for (const itm of this.results) {
|
||||||
if (item.id == itm.id) {
|
if (item.id == itm.id) {
|
||||||
newitm = itm;
|
newitm = itm;
|
||||||
break;
|
break;
|
||||||
|
@ -451,6 +460,7 @@ export default {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/* https://css-tricks.com/position-sticky-and-table-headers/ */
|
||||||
template: `
|
template: `
|
||||||
<div class='q-student-results'>
|
<div class='q-student-results'>
|
||||||
<div class='q-studentname '><span>{{student.firstname}} {{student.lastname}}</span></div>
|
<div class='q-studentname '><span>{{student.firstname}} {{student.lastname}}</span></div>
|
||||||
|
@ -461,21 +471,16 @@ export default {
|
||||||
<div class='q-item-results' v-for='item in useritems(l)'>
|
<div class='q-item-results' v-for='item in useritems(l)'>
|
||||||
<div v-if="expansion.items[item.id].expanded" class='q-result-details'>
|
<div v-if="expansion.items[item.id].expanded" class='q-result-details'>
|
||||||
<div class='q-result q-overviewresult'>
|
<div class='q-result q-overviewresult'>
|
||||||
<template v-if='!item.course.enrolled'>
|
<template v-if="loading">
|
||||||
|
<div class="spinner-border spinner-border-sm text-info" role="status"></div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if='!item.course.enrolled'>
|
||||||
<i v-b-popover.top
|
<i v-b-popover.top
|
||||||
class="r-course-result fa fa-exclamation-triangle t-not-enrolled-alert"
|
class="r-course-result fa fa-exclamation-triangle t-not-enrolled-alert"
|
||||||
:title="text.student_not_tracked"></i>
|
:title="text.student_not_tracked"></i>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if='hasprogressinfo(item)'>
|
<template v-else-if='hasprogressinfo(item)'>
|
||||||
<r-progress-circle v-if='["failed", "progress","incomplete"].includes(item.completion)'
|
<i v-b-popover.top
|
||||||
:value='courseprogress(item)'
|
|
||||||
:max='1'
|
|
||||||
:min='0'
|
|
||||||
:class="'r-course-result r-completion-'+item.completion"
|
|
||||||
:icon='circle_icon(item.completion)'
|
|
||||||
:title="text['completion_'+item.completion]"
|
|
||||||
></r-progress-circle>
|
|
||||||
<i v-else v-b-popover.top
|
|
||||||
:class="'r-course-result fa fa-'+completion_icon(item.completion)+
|
:class="'r-course-result fa fa-'+completion_icon(item.completion)+
|
||||||
' r-completion-'+item.completion"
|
' r-completion-'+item.completion"
|
||||||
:title="text['completion_'+item.completion]"></i>
|
:title="text['completion_'+item.completion]"></i>
|
||||||
|
@ -494,21 +499,16 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class='q-result q-overviewresult'>
|
<div v-else class='q-result q-overviewresult'>
|
||||||
<template v-if='!item.course.enrolled'>
|
<template v-if="loading">
|
||||||
|
<div class="spinner-border spinner-border-sm text-info" role="status"></div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if='!item.course.enrolled'>
|
||||||
<i v-b-popover.top
|
<i v-b-popover.top
|
||||||
class="r-course-result fa fa-exclamation-triangle t-not-enrolled-alert"
|
class="r-course-result fa fa-exclamation-triangle t-not-enrolled-alert"
|
||||||
:title="text.student_not_tracked"></i>
|
:title="text.student_not_tracked"></i>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if='hasprogressinfo(item)'>
|
<template v-else-if='hasprogressinfo(item)'>
|
||||||
<r-progress-circle v-if='["failed", "progress","incomplete"].includes(item.completion)'
|
<i v-b-popover.top
|
||||||
:value='courseprogress(item)'
|
|
||||||
:max='1'
|
|
||||||
:min='0'
|
|
||||||
:class="'r-course-result r-completion-'+item.completion"
|
|
||||||
:icon='circle_icon(item.completion)'
|
|
||||||
:title="text['completion_'+item.completion]"
|
|
||||||
></r-progress-circle>
|
|
||||||
<i v-else v-b-popover.top
|
|
||||||
:class="'r-course-result fa fa-'+completion_icon(item.completion)+
|
:class="'r-course-result fa fa-'+completion_icon(item.completion)+
|
||||||
' r-completion-'+item.completion"
|
' r-completion-'+item.completion"
|
||||||
:title="text['completion_'+item.completion]"></i>
|
:title="text['completion_'+item.completion]"></i>
|
||||||
|
|
|
@ -1681,6 +1681,9 @@ body.path-local-treestudyplan .editmode-switch-form > * {
|
||||||
.path-local-treestudyplan .q-header .q-result,
|
.path-local-treestudyplan .q-header .q-result,
|
||||||
.path-local-treestudyplan .q-student-results .q-result {
|
.path-local-treestudyplan .q-student-results .q-result {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding-top: 0.25rem;
|
||||||
}
|
}
|
||||||
.path-local-treestudyplan .q-header,
|
.path-local-treestudyplan .q-header,
|
||||||
.path-local-treestudyplan .q-student-results {
|
.path-local-treestudyplan .q-student-results {
|
||||||
|
|
|
@ -38,7 +38,9 @@
|
||||||
|
|
||||||
.q-result {
|
.q-result {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding-top: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1681,6 +1681,9 @@ body.path-local-treestudyplan .editmode-switch-form > * {
|
||||||
.path-local-treestudyplan .q-header .q-result,
|
.path-local-treestudyplan .q-header .q-result,
|
||||||
.path-local-treestudyplan .q-student-results .q-result {
|
.path-local-treestudyplan .q-student-results .q-result {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding-top: 0.25rem;
|
||||||
}
|
}
|
||||||
.path-local-treestudyplan .q-header,
|
.path-local-treestudyplan .q-header,
|
||||||
.path-local-treestudyplan .q-student-results {
|
.path-local-treestudyplan .q-student-results {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user