Merge branch 'feature-69105/CIS4_MeineLVs_AnzeigeZeugnisnote_Und_Durchschnitt' into cis40_2026-02_rc

This commit is contained in:
Harald Bamberger
2026-04-23 11:24:37 +02:00
4 changed files with 245 additions and 5 deletions
@@ -1,9 +1,11 @@
import MylvSemesterStudiengangLv from "./Studiengang/Lv.js";
import MylvSemesterStudiengangAverageGrade from "./Studiengang/AverageGrade.js";
import Phrasen from "../../../../mixins/Phrasen.js";
export default {
components: {
MylvSemesterStudiengangLv
MylvSemesterStudiengangLv,
MylvSemesterStudiengangAverageGrade
},
mixins: [
Phrasen
@@ -29,9 +31,10 @@ export default {
methods: {
note(lv) {
return lv.benotung ? lv.znote || lv.lvnote || null : null;
}
},
},
template: `<div class="card mb-3">
<div class="card-body">
<h4 class="card-title mb-3">{{$p.user_language.value === 'English' ? sg_bezeichnung_eng : bezeichnung}} - {{kuerzel}}
<small>{{semester}}.{{$p.t('lehre/semester')}}</small>
@@ -41,6 +44,7 @@ export default {
<mylv-semester-studiengang-lv v-bind="lv" class="text-center h-100"></mylv-semester-studiengang-lv>
</div>
</div>
<mylv-semester-studiengang-average-grade :lvs="lvs" />
</div>
</div>`
};
@@ -0,0 +1,94 @@
import Phrasen from "../../../../../mixins/Phrasen.js";
export default {
mixins: [
Phrasen
],
props: {
lvs: Array,
},
data: ( ) =>{
return {
gradeAverage: null,
gradeWeightedAverage: null,
existingGrades: false
}
},
methods: {
calculateAverages(){
let sum = 0;
let count = 0;
let sumWeighted = 0;
let sumEcts = 0;
this.lvs.forEach((lv) => {
if ((lv.znote >= 1 && lv.znote <= 5) && lv.znote!= null) {
this.existingGrades = true;
sum+= lv.znote;
count++;
sumWeighted += lv.znote * Number(lv.ects);
sumEcts += Number(lv.ects);
}
});
this.gradeAverage = (sum/count).toFixed(2);
this.gradeWeightedAverage = (sumWeighted/sumEcts).toFixed(2);
}
},
watch: {
lvs: {
handler() {
this.calculateAverages();
},
deep: true,
immediate: true
}
},
mounted(){
this.calculateAverages();
},
template: /*html*/`
<div class="card mylv-semester-studiengang-grades">
<div class="card-header text-center">
<h6>{{$p.t('lehre/notenstatistik')}}</h6>
</div>
<div v-if="existingGrades">
<table class="card-body table w-auto mx-auto">
<tbody>
<tr>
<td class="text-end">
{{$p.t('lehre/headerAverage')}}
</td>
<td class="text-start">
{{ gradeAverage }}
</td>
</tr>
<tr>
<td class="text-end">
{{$p.t('lehre/headerWeightedAverage')}}
</td>
<td class="text-start">
{{ gradeWeightedAverage }}
</td>
</tr>
</tbody>
</table>
</div>
<div v-else class="card-body text-center">
<p>{{$p.t('lehre/info_noGradesYet')}}</p>
</div>
<div v-if="existingGrades" class="card-footer d-flex align-items-start text-muted small">
<i class="fa fa-circle-info me-2 mt-1"></i>
<div>
<strong>{{$p.t('ui', 'hinweis')}}</strong><br>
* {{$p.t('lehre/noticeAverage')}}
<br>
** {{$p.t('lehre/noticeWeightedAverage')}}
</div>
</div>
</div>
`
}
@@ -73,11 +73,11 @@ export default {
},
grade() {
const languageIndex = this.$p.user_language.value === 'English' ? 1 : 0
// no more showing of grade LV, if grade Zeugnis is not existing yet
if(this.benotung && this.znotebez?.length) {
return this.znotebez[languageIndex]
} else if(this.benotung && this.lvnotebez?.length) {
return this.lvnotebez[languageIndex]
} else return null
}
else return null
},
LvHasPruefungenInformation(){
return this.pruefungenData && this.pruefungenData.length > 0;
+142
View File
@@ -58764,6 +58764,148 @@ I have been informed that I am under no obligation to consent to the transmissio
)
),
// DMS-Link Phrasen End
// ### Start Notenstatistik
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'hinweis',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Hinweis',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Notice',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'lehre',
'phrase' => 'noticeAverage',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bitte beachten Sie, dass außercurriculare Lehrveranstaltungen (zB Freifächer) den errechneten Notendurchschnitt verfälschen können.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Please note that extracurricular courses (e.g., electives) can distort the calculated grade point average.',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'lehre',
'phrase' => 'noticeWeightedAverage',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Der gewichtete Notendurchschnitt errechnet sich aus der Note der Lehrveranstaltung, multipliziert mit deren ECTS, dividiert durch die Summe aller ECTS.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'The weighted average grade is calculated by multiplying the grade of the course by its ECTS credits and dividing by the sum of all ECTS credits.',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'lehre',
'phrase' => 'headerAverage',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Notendurchschnitt* der Zeugnisnote',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Average grade* of report card grade',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'lehre',
'phrase' => 'headerWeightedAverage',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Gewichteter** Notendurchschnitt* der Zeugnisnote',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Weighted** average grade* of report card grade',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'lehre',
'phrase' => 'notenstatistik',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Leistungsübersicht',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Performance overview',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'lehre',
'phrase' => 'info_noGradesYet',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Es wurden noch keine Beurteilungen eingetragen.',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'No grades have been entered yet.',
'description' => '',
'insertvon' => 'system'
)
)
),
// ### End Notenstatistik
);