Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Added Exam Table and changed Exam types
Browse files Browse the repository at this point in the history
  • Loading branch information
cnoss committed Jan 22, 2024
1 parent ee9c43b commit 13769ea
Show file tree
Hide file tree
Showing 30 changed files with 305 additions and 116 deletions.
135 changes: 129 additions & 6 deletions src/_layouts/components/curriculumTools.11ty.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,121 @@ exports.getCurriculumList = (obj) => {
`;
};

/* Tabelle der Module eines Studiengangs im Curriculum mit Prüfungsleistungen
############################################################################ */

exports.getCurriculumVerlaufsplanExamTable = (obj) => {

const { moduls } = obj;
const { data } = obj;
const { eleventy } = obj;
const { studienverlauf } = obj;

const modulTypMap = {
"pm": "Pflichtmodul",
"wpf": "Wahlpflichtmodul",
"wf": "Wahlmodul",
};

if(!studienverlauf) return '';

const tableHeader = `
<thead>
<tr>
<th colspan=3>Module / Lehrveranstaltungen</th>
<th>Pflicht- / Wahlmodule</th>
<th colspan=2>ECTS - Leistungspunkte</th>
<th colspan=3>Anwesenheitspflicht als Zulassungsvoraussetzung zur (Teil) Modulprüfung</th>
<th colspan=3>Prüfungsvorleistung als Zulassungsvoraussetzung zur Modulprüfung</th>
<th>Prüfungsform</th>
<th colspan=2>Anzahl</th>
<th>Summe</th>
</tr>
<tr>
<th>Semester</th>
<th>Modul</th>
<th>Teilmodul / Lehrveranstaltung (optional)</th>
<th>Pflichtmodul (PF) Wahlpflichtmodul (WPF) Wahlmodul (WF)</th>
<th>Teilmodul</th>
<th>Gesamt</th>
<th>ja / nein</th>
<th>wenn ja, Mindestpräsenzzeit angeben</th>
<th>wenn ja, bitte begründen</th>
<th>ja / nein?</th>
<th>wenn ja, welche(s) (Teil)Modul(e)</th>
<th>wenn ja, bitte begründen</th>
<th></th>
<th>Prüfungs-leistungen pro (Teil)Modul</th>
<th>Mindest-anzahl zu belegender WPF, WF</th>
<th>Prüfungen</th>
<tr>
</thead>
`;

const tableBodyByTerm = studienverlauf.map((row) => {

const termModuls = row.semester.module.map((kuerzel) => {
const modul = moduls.filter((modul) => modul.data.kuerzel === kuerzel)[0];
if(!modul) return null;
return modul;
});

const termModulsList = termModuls.map((modul) => {

const examInfo = modul.data.studienleistungen === null
? ''
: moduleTools.resolveExamInfoSimple(modul.data.studienleistungen);

const status = modul.data.meta && modul.data.meta.status ? `is-${modul.data.meta.status}` : '';

const vorleistung = modul.data.pvl === true ? "ja" : "nein";
const vorleistungModul = modul.data.pvl === true ? "begleitendes Praktikum" : "";
const vorleistungAddOnSum = modul.data.pvl === true ? 1 : 0;

const examSum = modul.data.studienleistungen === null
? 'keine'
: moduleTools.getExamSum(modul.data.studienleistungen, modul.data.pvl) + vorleistungAddOnSum;

return `
<tr class="${status}">
<td>${row.semester.fachsemester}</td>
<td class="is-left"><a href="${ modul.url}">${modul.data.title}</a></td>
<td>-</td>
<td>${modulTypMap[modul.data.typ]}</td>
<td>-</td>
<td>${modul.data.kreditpunkte}</td>
<td>nein</td>
<td>-</td>
<td>-</td>
<td>${vorleistung}</td>
<td>${vorleistungModul}</td>
<td>-</td>
<td class="is-left">${examInfo}</td>
<td>${examSum}</td>
<td>-</td>
<td>${examSum}</td>
</tr>
`;
});

return termModulsList.join("\n");

});

return `
<div class="modulmatrix-wrap">
<table class="table-exams is-striped is-narrow ">
${tableHeader}
<tbody>
${tableBodyByTerm.join("\n")}
</tbody>
</table>
</div>
`;

};


/* Tabelle der Module eines Studiengangs
############################################################################ */

Expand Down Expand Up @@ -487,12 +602,15 @@ exports.getModulMatrix = (obj) => {
<!-- Modul -->
<th class="module-name"><a href="${ modulItem.url}">${modul.title}</a></th>
<td>${modul.typ === 'pm' ? check : ''}</td>
<td>${modul.kreditpunkte}</td>
<td>${(modul.angebotImWs && modul.angebotImSs) ? "immer" : ""}${(modul.angebotImWs && !modul.angebotImSs) ? "WiSe" : ""}${(!modul.angebotImWs && modul.angebotImSs) ? "SoSe" : ""}</td>
<!-- Prüfungen -->
<td>${getExams(modul)}</td>
<!--td>${getExams(modul)}</td-->
<td>1</td>
<td></td>
<td></td>
<td>${modul.kreditpunkte}</td>
<!-- Handlungsfelder -->
<td>${checkImpactHandlungsfeld('DUX')}</td>
<td>${checkImpactHandlungsfeld('DEV')}</td>
Expand Down Expand Up @@ -543,18 +661,23 @@ exports.getModulMatrix = (obj) => {
<table class="table-modulmatrix is-narrow">
<thead>
<tr>
<th colspan=5>Modul</th>
<th colspan=8>Modul</th>
<th colspan=5>Handlungsfelder</th>
<th colspan=16>Zuordnung Kompetenzen</th>
<th colspan=4>Zuordnung Studiengangkriterien</th>
</tr>
<tr>
<!-- Modul -->
<th class="module-name"></th>
<th class="is-vertical"><div><span>Pflicht</span></div></th>
<th class="is-vertical"><div><span>ECTS</span></div></th>
<th class="is-vertical"><div><span>Semester</span></div></th>
<th class="is-vertical"><div><span>Prüfungen</span></div></th>
<!--th class="is-vertical"><div><span>Prüfungen</span></div></th-->
<th></th>
<th></th>
<th></th>
<th class="is-vertical"><div><span>ECTS</span></div></th>
<!-- Handlungsfelder -->
<th class="is-vertical"><div><span>DUX</span></div></th>
Expand Down
22 changes: 22 additions & 0 deletions src/_layouts/components/moduleTools.11ty.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,28 @@ exports.resolveExamInfoSimple = (examInfo) => {
return extractExamInfo(examInfo);
};

/* Summe der Prüfungsleistungen
############################################################################ */

exports.getExamSum = (examInfo) => {

if(!examInfo || examInfo === undefined) return 1;

const extractExamInfo = (examInfo) => {

const einzelleistung = examInfo['Einzelleistung']
? examInfo['Einzelleistung'].anzahl ? examInfo['Einzelleistung'].anzahl : 1
: 0;
const teamleistung = examInfo['Teamleistung']
? examInfo['Teamleistung'].anzahl ? examInfo['Teamleistung'].anzahl : 1
: 0;

return einzelleistung + teamleistung;
};

return extractExamInfo(examInfo);
};


/* Häufigkeit des Angebots
############################################################################ */
Expand Down
18 changes: 17 additions & 1 deletion src/_layouts/verlaufsplan.11ty.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
},
render(data) {
const { collection } = data;
const { studyProgramme } = data;
const curriculumTools = require('./components/curriculumTools.11ty.js');

const curriculumList = curriculumTools.getCurriculumList({
Expand All @@ -26,12 +27,23 @@ module.exports = {
eleventy: this
});

const curriculumVerlaufExamTable = curriculumTools.getCurriculumVerlaufsplanExamTable({
moduls: data.collections[collection],
terms: data.terms,
groups: data.groups,
maxCPS: data.maxCPS,
studienverlauf: data.studienverlauf,
data,
eleventy: this
});

const allModuls = curriculumTools.getAllModuls({
moduls: data.collections[collection],
data,
eleventy: this
});


const curriculumVerlaufList = data.showModuleList && data.showModuleList === true
? `<section>${curriculumList}</section>` : '';

Expand Down Expand Up @@ -63,12 +75,16 @@ module.exports = {
${curriculumVerlaufList}
</section>
<section class="has-seperator" ${data.hideAllModules ? "hidden" : ""}>
<h2>Alle Module</h2>
${allModuls}
</section>
<section class="has-seperator" ${data.hideDetailsFachsemester ? "hidden" : ""}>
<h2>Tabelle Prüfungslast</h2>
${curriculumVerlaufExamTable}
</section>
</main>
`;
}
Expand Down
99 changes: 98 additions & 1 deletion src/assets/styles/scss/components/tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ table {
position: relative;
z-index: var(--z-level-front);
min-width: 120ch;
background-color: var(--lighter);
border-spacing: 0;
line-height: var(--lh-tight);
background-color: var(--lighter);

thead {
position: sticky;
Expand Down Expand Up @@ -221,8 +221,105 @@ table {

.is-checked{
position: absolute;
background-color: color-mix(in srgb, var(--mi-gruen), var(--lightest) 80%);
inset: 0;

&::before{
line-height: 2ch;
}
}

tr:nth-child(even) {
background-color: var(--lighten);
}
}

/* Table Exams
########################################################################### */

.table-exams {
position: relative;
z-index: var(--z-level-front);
min-width: 120ch;
background-color: var(--lighter);
border-spacing: 0;
line-height: var(--lh-tight);

thead {
position: sticky;
z-index: 1;
top: 0;
background-color: var(--lightest);

* {
color: var(--darkest);
font-size: var(--s);
}

tr:last-child{
th{
border-bottom: solid var(--border-width-m) var(--mi-lila);
}
}

}

tbody{
z-index: 0;
}

th {
border-left: dotted var(--border-width-s) var(--dark);
vertical-align: top;
}

th, td{
border-top: solid var(--border-width-s) var(--darken);
font-size: var(--xs);
line-height: var(--lh-normal);

&:first-child{
border-left: none;
}
}

td {
position: relative;
height: 2em;
border-left: dotted var(--border-width-s) var(--dark);
text-align: center;

&.is-left{
text-align: left;
}
}

th.is-vertical {
position: relative;
width: 3ch;

/* Something you can count on */
height: 34ch;
white-space: nowrap;

& > div {
position: absolute;
bottom: 1ch;
left: 0;
width: 30px;
transform: rotate(-90deg);
}
}

th.module-name{
width: fit-content;
text-align: left;
}

.is-checked{
position: absolute;
background-color: color-mix(in srgb, var(--mi-gruen), var(--lightest) 80%);
inset: 0;

&::before{
line-height: 2ch;
Expand Down
1 change: 1 addition & 0 deletions src/curricula/bpo5-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ groups: ['Grundlagen', 'Vertiefung', 'Spezialisierung']
maxCPS: 210
showModuleList: true

studyProgramme: 'bachelor'
studienverlauf:
- semester:
label: "1. Semester"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ veranstaltungsform: vor Ort
infourl: https://ilias.th-koeln.de/goto.php?target=crs_1164711&client_id=ILIAS_FH_Koeln
studienleistungen:
Teamleistung:
art: Projektarbeit, Fachvortrag mit Diskussion
art: Projektarbeit und Referat
erstpruefer: mbluemm
zweitpruefer: cn
datum: ende
Expand All @@ -29,7 +29,7 @@ besonderheiten:
praesenzZeit: 40
selbstStudium: 110
angebotImWs: true
angebotImSs: true
angebotImSs: false
weitereStudiengaenge:
lehrmethoden:
- Flippeed Classroom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ infourl: https://ilias.th-koeln.de/ilias.php?ref_id=19830&cmdClass=ilrepositoryg
pvl: true
studienleistungen:
Einzelleistung:
art: Schriftliche Prüfung, sowie erfolgreiche Teilnahme am Praktikum als Prüfungsvorleistung
art: Klausurarbeit, sowie erfolgreiche Teilnahme am Praktikum als Prüfungsvorleistung
erstpruefer: fv
zweitpruefer: ck
datum: ws-1
Expand Down
Loading

0 comments on commit 13769ea

Please sign in to comment.