Merge branch 'dev' into chore/logging
This commit is contained in:
commit
f82668148c
122 changed files with 6026 additions and 14446 deletions
28
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
28
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!-- Beschrijf wat deze pull request doet. Voeg een samenvatting van de wijzigingen en de reden voor de wijzigingen toe. -->
|
||||
|
||||
## Context
|
||||
|
||||
<!-- Geef extra context en uitleg waarom bepaalde keuzes zijn gemaakt in deze pull request. -->
|
||||
|
||||
## Screenshots
|
||||
|
||||
<!-- Voeg indien van toepassing screenshots toe om je wijzigingen uit te leggen. -->
|
||||
|
||||
## Aanvullende opmerkingen
|
||||
|
||||
<!-- Voeg eventuele andere informatie toe waarvan reviewers op de hoogte moeten zijn. -->
|
||||
|
||||
<!-- Lijst eventuele gerelateerde issues. Gebruik het formaat `Fixes #<issue_number>` om het issue automatisch te sluiten wanneer de PR wordt gemerged. -->
|
||||
- Fixes #
|
||||
|
||||
<!--
|
||||
## Richtlijnen
|
||||
|
||||
Zorg ervoor dat het volgende in orde is voordat je de pull request indient:
|
||||
|
||||
- De code volgt de stijlrichtlijnen van dit project.
|
||||
- Je hebt een zelfreview van de code uitgevoerd.
|
||||
- Je hebt de documentatie bijgewerkt waar nodig.
|
||||
- Alle nieuwe en bestaande unittests slagen (lokaal).
|
||||
- Je hebt de juiste labels ingesteld op deze pull request.
|
||||
-->
|
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -43,6 +43,9 @@ build/Release
|
|||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# package-lock.json
|
||||
backend/package-lock.json
|
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
web_modules/
|
||||
|
||||
|
@ -641,7 +644,8 @@ FodyWeavers.xsd
|
|||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
|
104
CONTRIBUTING.md
104
CONTRIBUTING.md
|
@ -1,40 +1,67 @@
|
|||
# Hoe bijdragen aan Dwengo-1?
|
||||
|
||||
Bedankt dat je wil bijdragen aan Dwengo-1!
|
||||
Hieronder vind je enkele richtlijnen om je op weg te helpen.
|
||||
|
||||
Over het algemeen bestaat de workflow uit de volgende stappen:
|
||||
|
||||
1. [Een issue aanmaken](#issues)
|
||||
2. [Een branch maken](#workflow)
|
||||
3. [Code schrijven](#coding-conventions)
|
||||
4. [Werk committen](#commits)
|
||||
5. [Een pull request maken](#pull-request)
|
||||
|
||||
## Issues
|
||||
|
||||
Maak gebruik van de [label set](https://github.com/SELab-2/Dwengo-1/labels).
|
||||
Als je een issue aanmaakt is het belangrijk om zo veel mogelijk (relevante) informatie te geven.
|
||||
Om je op weg te helpen zijn er [templates](.github/ISSUE_TEMPLATE) voorzien.
|
||||
Gebruik deze om alle nodige informatie te verzamelen.
|
||||
|
||||
Voor bug reports:
|
||||
Gebruik de juiste [labels](https://github.com/SELab-2/Dwengo-1/labels) om te helpen een onderscheid te maken tussen verschillende categorieën issues.
|
||||
|
||||
Geef zo veel mogelijk informatie. Als er error berichten zijn, graag in tekst bijvoegen. Geen screenshots van error
|
||||
messages, enkel van visuele bugs.
|
||||
|
||||
Ken jezelf toe aan een issue als je eraan werkt, zodat iedereen een overzicht heeft van waar aan gewerkt wordt en door
|
||||
wie. Zo wordt onnodig werk vermeden.
|
||||
Ken jezelf toe aan een issue als je eraan werkt, zodat er beter een overzicht bewaard kan worden.
|
||||
Op die manier vermijd je onnodig werk.
|
||||
|
||||
## Workflow
|
||||
|
||||
We zullen [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) gebruiken
|
||||
Dit project maakt gebruik van (een minder strenge versie van) [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
|
||||
Dat betekent dat verschillende branches een verschillende rol hebben.
|
||||
Nieuwe branches worden aangemaakt vanuit `dev` en worden gemerged naar `dev`.
|
||||
|
||||
Lees [hier](wiki) meer over deze beslissing
|
||||
Een overzicht:
|
||||
|
||||
Concreet:
|
||||
|
||||
- `main`
|
||||
- Incl. tags (`v1.2.3`)
|
||||
- `dev`
|
||||
- `main`: Hier worden enkel de releases gemerged. Elke merge naar `main` moet een release zijn, aangeduid met een tag (`v1.2.3`).
|
||||
- `dev`: Jouw branch hoort hiervan af te takken.
|
||||
- `feat/my-feat`: Voor features die uit geen of meer dan 1 issue bestaan
|
||||
- `feat/this-#x`: Voor features die aan een issue gelinkt kunnen worden
|
||||
- `fix/something-#x`: Voor (minder dringende) bug fixes. Bug fixes worden aan een issue gelinkt.
|
||||
- `release/x.y.z`: Release prep branch
|
||||
- `release/x.y.z`: Voorbereidingen voor een release. Hier worden enkel bug fixes en hotfixes gemerged.
|
||||
|
||||
Lees [hier](https://github.com/SELab-2/Dwengo-1/wiki/Developmentstrategie-keuzes#gitflow) meer over de beslissing om Gitflow te gebruiken.
|
||||
|
||||
We hebben ervoor gekozen om `main` en `dev` te beschermen.
|
||||
Zie ook [pull request](#pull-request).
|
||||
|
||||
## Coding conventions
|
||||
|
||||
Om de code consistent te houden, maken dit project gebruik van enkele tools:
|
||||
|
||||
- Formatting: [Prettier](https://prettier.io/), zorgt ervoor dat de code consistent geformatteerd is.
|
||||
- Linting: [ESLint](https://typescript-eslint.io/), zorgt er o.a. voor dat de code geen "slechte" constructies bevat.
|
||||
|
||||
Je kan ze handmatig uitvoeren met `npm run lint` en `npm run format`.
|
||||
|
||||
Deze tools worden niet standaard automatisch uitgevoerd bij een commit.
|
||||
Automatisch uitvoeren bij een commit kan met [git hooks](https://git-scm.com/docs/githooks).
|
||||
|
||||
## Commits
|
||||
|
||||
Maken gebruik van [conventional commits](https://www.conventionalcommits.org/)
|
||||
**Conventionele commits**
|
||||
|
||||
Lees [hier](wiki) meer over deze beslissing
|
||||
Dit project maakt gebruik van [conventional commits](https://www.conventionalcommits.org/).
|
||||
|
||||
Concreet:
|
||||
Dit betekent dat elke commit een duidelijke boodschap moet hebben, die volgens een bepaald formaat is opgesteld.
|
||||
In het kort ziet dat er zo uit:
|
||||
|
||||
```
|
||||
<type>(<optional scope>): <description>
|
||||
|
@ -43,29 +70,36 @@ type options:
|
|||
feat, fix, refactor, test, docs, build, ci, chore, ...
|
||||
```
|
||||
|
||||
Als je een commit 'fixt', gebruik dan [
|
||||
`git commit --fixup`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---fixupamendrewordltcommitgt)
|
||||
Lees [hier](https://github.com/SELab-2/Dwengo-1/wiki/Developmentstrategie-keuzes#conventionele-commits) meer over de beslissing om conventionele commits te gebruiken.
|
||||
|
||||
Als je een commit niet alleen hebt geschreven, maak dan
|
||||
een [commit met meerdere auteurs](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors).
|
||||
**Andere tips**
|
||||
|
||||
## Pull request...
|
||||
Als je een commit 'fixt', gebruik dan [`git commit --fixup`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---fixupamendrewordltcommitgt)
|
||||
|
||||
Als je aan visuele features werkt, voeg dan een screenshot van de omgeving van de feature toe, voor en nadat de feature
|
||||
geïmplementeerd werd.
|
||||
Als je een commit niet alleen hebt geschreven, maak dan een [commit met meerdere auteurs](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors).
|
||||
|
||||
Start een draft pull request vanaf je een nieuwe feature branch pusht naar de server.
|
||||
## Pull request
|
||||
|
||||
Policies
|
||||
Eens je code hebt geschreven en gecommit, is het tijd om een pull request te maken.
|
||||
Het is fijn als je meteen ([draft](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests)) pull requests maakt, zodat anderen kunnen meekijken en feedback kunnen geven.
|
||||
|
||||
- naar `main`: kan enkel vanuit `release/x.y.z`
|
||||
- naar `dev`: wordt nagekeken alvorens te mergen
|
||||
- elders: vrije keuze
|
||||
Om je op weg te helpen is er een [template](.github/PULL_REQUEST_TEMPLATE.md) voorzien.
|
||||
Door deze in te vullen, zorg je ervoor dat de reviewer een duidelijk beeld heeft van wat je hebt gedaan.
|
||||
|
||||
## Coding conventions
|
||||
Als je aan visuele features werkt, voeg dan een screenshot van de omgeving van de feature toe, voor en na dat de feature geïmplementeerd werd.
|
||||
|
||||
- Formatting: [Prettier](https://prettier.io/)
|
||||
- Linting: Maak gebruik van [ESLint](https://typescript-eslint.io/) of aan de hand van de [
|
||||
`npm` commando's](package.json).
|
||||
**Branch protection**
|
||||
|
||||
Voel je vrij om zelf commit hooks te installeren, maar we dwingen dit niet af.
|
||||
Je zult merken dat sommige branches [beschermd](https://docs.github.com/en/github/administering-a-repository/about-protected-branches) zijn.
|
||||
Dit betekent dat je niet zomaar kan mergen naar deze branches:
|
||||
|
||||
- `main`: kan enkel vanuit `release/x.y.z`
|
||||
- `dev`: wordt nagekeken alvorens te mergen
|
||||
|
||||
Elders kan je vrij mergen.
|
||||
|
||||
Het zou kunnen dat je code bepaalde checks moet doorstaan alvorens te mergen.
|
||||
Dit kan gaan van een simpele lint check tot een volledige test suite die moet slagen.
|
||||
Tag gerust een maintainer als je denkt dat je code klaar is om gemerged te worden.
|
||||
|
||||
## Dankjewel!
|
||||
|
|
31
README.md
31
README.md
|
@ -5,15 +5,15 @@
|
|||
OneDrive</a></span>
|
||||
<span><a href="https://www.figma.com/files/project/339220191" alt="Figma sjabloon">
|
||||
Figma</a></span>
|
||||
<span><a href="../Dwengo-opgave" alt="projectopgave">
|
||||
<span><a href="https://github.com/SELab-2/Dwengo-opgave" alt="projectopgave">
|
||||
Projectopgave</a></span>
|
||||
</p>
|
||||
|
||||
<ul align="center" style="list-style-type: none">
|
||||
<li>Projectleider: Fransisco Van Langenhove (@Gabriellvl)</li>
|
||||
<li>Technische lead: Tibo De Peuter (@tdpeuter)</li>
|
||||
<li>Systeembeheerder: Timo De Meyst (@kloep1)</li>
|
||||
<li>Customer relations officer: Adriaan Jacquet (@WhisperinCheetah)</li>
|
||||
<li>Projectleider: Fransisco Van Langenhove (<a href="https://github.com/Gabriellvl">@Gabriellvl</a>)</li>
|
||||
<li>Technische lead: Tibo De Peuter (<a href="https://github.com/tdpeuter">@tdpeuter</a>)</li>
|
||||
<li>Systeembeheerder: Timo De Meyst (<a href="https://github.com/kloep1">@kloep1</a>)</li>
|
||||
<li>Customer relations officer: Adriaan Jacquet (<a href="https://github.com/WhisperinCheetah">@WhisperinCheetah</a>)</li>
|
||||
</ul>
|
||||
|
||||
Dit is de monorepo voor [Dwengo-1](https://sel2-1.ugent.be), een interactief leerplatform waar leerkrachten opdrachten
|
||||
|
@ -23,28 +23,31 @@ en lessen kunnen samenstellen hun leerlingen en hun vooruitgang kunnen opvolgen.
|
|||
|
||||
### Quick start
|
||||
|
||||
1. Installeer Docker en Docker Compose op je systeem (zie [Docker](https://docs.docker.com/get-docker/)).
|
||||
2. Clone de repository.
|
||||
3. Voer `docker-compose up` uit in de root van de repository.
|
||||
1. Installeer Docker en Docker Compose op je systeem (zie [Docker](https://docs.docker.com/get-docker/) en [Docker Compose](https://docs.docker.com/compose/)).
|
||||
2. Clone deze repository.
|
||||
3. Voer `docker compose up` uit in de root van de repository.
|
||||
|
||||
```bash
|
||||
docker compose version
|
||||
git clone https://github.com/SELab-2/Dwengo-1.git
|
||||
cd Dwengo-1
|
||||
docker-compose up
|
||||
docker compose up
|
||||
```
|
||||
|
||||
### Handmatige installatie
|
||||
|
||||
Zie de submappen voor de installatie-instructies van de verschillende services.
|
||||
Zie de submappen voor de installatie-instructies van de [frontend](./frontend/README.md) en [backend](./backend/README.md).
|
||||
|
||||
## Architectuur
|
||||
|
||||
```
|
||||
hier overzichtsdiagram invoegen
|
||||
```
|
||||

|
||||
|
||||
We maken gebruik van ... Meer informatie over deze ontwerpsbeslissingen kan je vinden in de [architectuurdocumentatie](./architectuur).
|
||||
De tech-stack bestaat uit:
|
||||
|
||||
- **Frontend**: TypeScript + Vue.js + Vuetify
|
||||
- **Backend**: TypeScript + Node.js + Express.js + TypeORM + PostgreSQL
|
||||
|
||||
Voor meer informatie over de keuze van deze tech-stack, zie [designkeuzes](https://github.com/SELab-2/Dwengo-1/wiki/Design-keuzes).
|
||||
|
||||
## Bijdragen aan Dwengo-1
|
||||
|
||||
|
|
BIN
assets/img/dwengo-groen-zwart.png
Normal file
BIN
assets/img/dwengo-groen-zwart.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
61
assets/img/dwengo-groen-zwart.svg
Normal file
61
assets/img/dwengo-groen-zwart.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 9 KiB |
6
backend/.env.development.example
Normal file
6
backend/.env.development.example
Normal file
|
@ -0,0 +1,6 @@
|
|||
DWENGO_PORT=3000
|
||||
DWENGO_DB_HOST=localhost
|
||||
DWENGO_DB_PORT=5431
|
||||
DWENGO_DB_USERNAME=postgres
|
||||
DWENGO_DB_PASSWORD=postgres
|
||||
DWENGO_DB_UPDATE=true
|
3
backend/.env.test
Normal file
3
backend/.env.test
Normal file
|
@ -0,0 +1,3 @@
|
|||
PORT=3000
|
||||
DWENGO_DB_UPDATE=true
|
||||
DWENGO_DB_NAME=":memory:"
|
22
backend/README.md
Normal file
22
backend/README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# dwengo-1-backend
|
||||
|
||||
## Project setup
|
||||
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
Setup the environment variables in a `.env` file in the root of the project. You can use the `.env.example` file as a template.
|
||||
|
||||
### Development
|
||||
|
||||
```shell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Production
|
||||
|
||||
```shell
|
||||
npm run build
|
||||
npm run start
|
||||
```
|
326
backend/_i18n/de.yml
Normal file
326
backend/_i18n/de.yml
Normal file
|
@ -0,0 +1,326 @@
|
|||
# translate theme pages
|
||||
|
||||
curricula_page:
|
||||
title: Unsere Unterrichtsthemen
|
||||
read_more: Lees meer
|
||||
curricula_files: Bestanden
|
||||
algorithms:
|
||||
title: Algorithmen
|
||||
sub_title: Algorithmen
|
||||
description: "Schüler der zweiten und dritten Klasse (Sekundarstufe) lernen, wie sie Algorithmen verwenden können, um Probleme zu lösen. Sie lernen, wie sie Algorithmen entwerfen und die Effizienz von Algorithmen analysieren können. Sie lernen auch, wie sie Algorithmen zur Problemlösung einsetzen können."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/2B6gZ9HdQ1Y
|
||||
basics_ai:
|
||||
title: Basisprincipes van AI
|
||||
sub_title: Basisprincipes van AI
|
||||
description: "Onder dit lesthema bundelen we verschillende activiteiten waarin de basisprincipes van artificiële intelligentie (AI) aan bod komen. Leerlingen leren wat AI is, hoe het werkt en hoe het kan worden toegepast in verschillende domeinen."
|
||||
contact: ""
|
||||
kiks:
|
||||
title: KI und Klima
|
||||
sub_title: KIKS
|
||||
description: "Schülerinnen und Schüler der dritten Klasse (SO) erforschen, wie Pflanzen sich über ihre Spaltöffnungen an den Klimawandel anpassen. Dazu zählen sie diese Spaltöffnungen mit künstlicher Intelligenz und Bilderkennung."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
curricula_files:
|
||||
- file_title: "Projektblatt KIKS"
|
||||
file_info: "Dies ist ein kurzer Überblick über das KIKS-Projekt mit Projektstruktur und -merkmalen."
|
||||
file_location: "/assets/files/kiks/projectfiche_kiks.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Die Anleitung - auch in gedruckter Version erhältlich"
|
||||
file_info: "Wir möchten den Lehrern Hintergrundwissen über den Inhalt dieses Projekts vermitteln: den Klimawandel, die Biologie der Spaltöffnungen und die Art und Weise, wie Pflanzen sich über die Spaltöffnungen an den Klimawandel anpassen, die wissenschaftliche Forschung der UGent und des Plantentuin Meise, die Bürgerwissenschaft, was künstliche Intelligenz (KI) ist, die Geschichte von KI, ihre Anwendung und Ethik, die Prinzipien digitaler Bilder, die Mathematik hinter den Algorithmen und die Grundlagen der derzeit am häufigsten verwendeten KI-Techniken. Wir zeigen auch, wie wir mit KIKS im Unterricht gearbeitet haben."
|
||||
file_location: "/assets/files/kiks/KIKS_handleiding_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Ein Schülerkurs"
|
||||
file_info: "Mit dem Schülerkurs geben wir ein Beispiel für einen möglichen, umfassenden Weg, den ein Lehrer mit den Schülern gehen kann. Der Weg umfasst den Klimawandel, die Biologie der Spaltöffnungen mit einer Mikroskopie-Aufgabe, die Art und Weise, wie Pflanzen sich über die Spaltöffnungen an den Klimawandel anpassen, die wissenschaftliche Forschung der UGent und des Plantentuin Meise, das Sammeln von Daten zur Schulung eines neuronalen Netzwerks, was künstliche Intelligenz (KI) ist, die Geschichte von KI, ihre Anwendung und Ethik, die Prinzipien digitaler Bilder, das Arbeiten mit Convolutional Neural Networks, die Mathematik hinter dem Perceptron-Algorithmus, das lineare und nicht-lineare Klassifizieren von Daten und die Grundlagen des maschinellen Lernens."
|
||||
file_location: "/assets/files/kiks/KIKS_leerlingencursus_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Die Lehrziele"
|
||||
file_info: "Im Rahmen des KIKS-Projekts können viele Lehrziele erreicht werden. Der Lehrer entscheidet selbst, welche Lehrziele mit dem Projekt in Verbindung gebracht werden. Darüber hinaus bietet das Projekt viele Möglichkeiten, die Schüler aktiv und selbstständig lernen zu lassen und ICT-Kenntnisse zu vermitteln. KIKS kann auch verwendet werden, um eine Forschungsaufgabe zu entwickeln. In den Endzielen und Lehrplänen der verschiedenen Verbände finden sich viele Lehrziele, die KIKS mit Biologie, Geografie und Mathematik verknüpfen."
|
||||
file_location: "/assets/files/kiks/Leerdoelen-KIKS.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Das Erstellen eines Nagellaktabdrucks eines Blattteils"
|
||||
file_info: "Um die Anzahl der Spaltöffnungen auf einem Teil eines Blattes einer Pflanze zu kennen, betrachten wir die Blattoberfläche unter dem Mikroskop. Wir können dazu einen Teil der dünnen Cuticula des Blattes entfernen, aber bei einigen Pflanzen gelingt das nicht so gut, zum Beispiel aufgrund der Steifheit des Blattes. Dies kann jedoch aufgefangen werden, indem die gleiche Methode verwendet wird wie die Forscher des Plantentuin Meise, nämlich einen Abdruck eines Teils der Blattoberfläche mit transparentem Nagellack zu machen. Das mikroskopische Bild kann mit einem Smartphone fotografiert werden."
|
||||
file_location: "https://vimeo.com/467062270"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Ansehen"
|
||||
socialrobot:
|
||||
title: Sozialer Roboter
|
||||
sub_title: Robotik im Klassenzimmer
|
||||
description: "Während Schülerinnen und Schüler der ersten Klasse (SO) einen sozialen Roboter basteln und programmieren, lernen sie komplexe Probleme durch computational thinking zu lösen. Auf spielerische Weise arbeiten sie an den neuen Endzielen für digitale Kompetenzen."
|
||||
contact: Fragen? Kontaktieren Sie uns unter team@aiopschool.be. Die Presse kann sich an Francis Wyffels wenden unter Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Projektblatt Sozialer Roboter"
|
||||
file_info: "Dies ist ein kurzer Überblick über das Projekt 'Sozialer Roboter' mit Projektstruktur und -merkmalen."
|
||||
file_location: "/assets/files/socialrobot/projectfiche_socialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Collage sozialer Roboter"
|
||||
file_info: "Die Roboter auf diesem Foto sind Arbeiten von Schülern der ersten Klasse der Sekundarstufe oder Prototypen."
|
||||
file_location: "/assets/files/socialrobot/collage.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Bausatz für das 'Sozialer Roboter'-Projekt"
|
||||
file_info: "Möchten Sie, dass Ihre Schülerinnen und Schüler auch einen sozialen Roboter entwerfen und bauen? Das geht mit dem Bausatz von Dwengo vzw. Auf der Abbildung sehen Sie die aktuelle Zusammensetzung des Bausatzes. Interessiert? Kontaktieren Sie uns per E-Mail oder finden Sie weitere Informationen auf dieser Projektseite."
|
||||
file_location: "/assets/files/socialrobot/constructiekit_socialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Vom Projekt zu den Endzielen"
|
||||
file_info: "Die Endziele, an denen gearbeitet werden kann, werden mit den verschiedenen Phasen des Projekts 'Sozialer Roboter' verknüpft."
|
||||
file_location: "/assets/files/socialrobot/EindtermenAStroomSsocialeRobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotionsmaschine (unvollständig) - Computational Thinking (unplugged Aktivität)"
|
||||
file_info: "Unplugged Aktivität"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_gewoon_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotionsmaschine (Aufgabe) - Computational Thinking (unplugged Aktivität)"
|
||||
file_info: "Unplugged Aktivität"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_gids.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotionsmaschine (vollständig) - Computational Thinking (unplugged Aktivität)"
|
||||
file_info: "Unplugged Aktivität"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_ingevuld_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotionsmaschine mit LED-Matrix - Computational Thinking (unplugged Aktivität)"
|
||||
file_info: "Unplugged Aktivität"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_matrices_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Lehrerhandbuch"
|
||||
file_info: "Die gebündelten Handbücher, in denen die Verwendung des Dwenguino und der Sensoren und Aktuatoren erklärt wird."
|
||||
file_location: "/assets/files/socialrobot/ficheboekje_lkn.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Handbücher für Schülerinnen und Schüler"
|
||||
file_info: "In diesen Handbüchern wird die Verwendung des Dwenguino und der Sensoren und Aktuatoren erklärt."
|
||||
file_location: "/assets/files/socialrobot/fichesSocialeRobot_lln.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Erstelle ein Gesicht - Computational Thinking (unplugged Aktivität)"
|
||||
file_info: "Unplugged Aktivität"
|
||||
file_location: "/assets/files/socialrobot/maakeengezicht_activiteit.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Aufgaben der Übungen im MOOC"
|
||||
file_info: "Eine Übersicht über die Programmieraufgaben im MOOC."
|
||||
file_location: "/assets/files/socialrobot/Opgaven_MOOC.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Poster 'Sozialer Roboter'-Projekt"
|
||||
file_info: "Das Poster zeigt die verschiedenen Aspekte des Projekts."
|
||||
file_location: "/assets/files/socialrobot/posterSocialeRobot_nl_Qo4ANmV.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Handbuch 'Hallo Roboter!'"
|
||||
file_info: "Mit diesem Lehrbuch bringen Sie Ihren eigenen sozialen Roboter zum Leben."
|
||||
file_location: "/assets/files/socialrobot/handleiding_hallo_robot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
chatbot:
|
||||
title: Sprachtechnologie in der Schule
|
||||
sub_title: Mit einem Chatbot arbeiten
|
||||
description: "Wo Sprache und Technologie aufeinandertreffen, entsteht das Gebiet des Natural Language Processing. Kann ein Computer Texte verstehen, übersetzen oder sogar schreiben? Kann ein Computer Emotionen erkennen? Schülerinnen und Schüler der zweiten und dritten Klasse (SO) lernen in diesem Paket alles darüber."
|
||||
contact: Fragen? Kontaktieren Sie uns unter team@aiopschool.be. Die Presse kann sich an Francis Wyffels wenden unter Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Projektblatt Chatbot"
|
||||
file_info: "Dies ist ein kurzer Überblick über das Chatbot-Projekt mit Projektstruktur und -merkmalen."
|
||||
file_location: "/assets/files/chatbot/projectfiche_chatbot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "BrAInfood Chatbots"
|
||||
file_info: "In diesem brAInfood - für Jugendliche konzipiert - gibt das Zentrum für Daten & Gesellschaft weitere Informationen zu Chatbots. Das brAInfood enthält eine fiktive Geschichte über Lotte, die mit einem Chatbot spricht und vermutlich Informationen über sie an Unternehmen weitergibt. Es werden auch einige Punkte zu Chatbots erläutert sowie einige Tipps für Jugendliche, um ihre (personenbezogenen) Daten besser zu schützen. Auf diese Weise möchten wir Jugendliche für die Funktionsweise von Chatbots sensibilisieren und sie dazu anregen, über die gesammelten Daten nachzudenken."
|
||||
file_location: "/assets/files/chatbot/Brainfood13_Chatbots_NL.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "BrAInfood Personalisierte Nachrichten"
|
||||
file_info: "In diesem brAInfood des Zentrums für Daten & Gesellschaft werden Tipps gegeben, wie Sie die Kontrolle über Ihren Nachrichten-Feed behalten können."
|
||||
file_location: "/assets/files/chatbot/brainfoodaanbevelingnieuws.jpg"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Handbuch 'Chatbot' - Auch in gedruckter Form erhältlich"
|
||||
file_info: "Lehrkräfte erhalten über dieses Handbuch ausreichend Hintergrundinformationen, um mit (einem Teil des) Projekts 'Chatbot' im Klassenzimmer zu arbeiten. Das Buch behandelt verschiedene Aspekte der Sprachtechnologie, wie die Geschichte der künstlichen Intelligenz, ethische Aspekte, Sentimentanalyse und Cybermobbingerkennung, Chatbots, sprechende digitale Assistenten und Autorenerkennung. Es wird auch auf die STEM-Endziele sowie die Endziele zu digitaler Kompetenz und Medienkompetenz eingegangen."
|
||||
file_location: "/assets/files/chatbot/Chatbot_handleiding_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Improbotics - Lehrermappe - Lehrerfassung"
|
||||
file_info: "In der Theateraufführung Improbotics improvisiert ein sozialer Roboter in den Szenen mit. In der Mappe für Lehrkräfte finden Sie Informationen zu den verwendeten Technologien."
|
||||
file_location: "/assets/files/chatbot/Improbotics_lesmap_Leerkracht.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Improbotics - Lehrermappe - Schülerinnen und Schüler"
|
||||
file_info: "In der Theateraufführung Improbotics improvisiert ein sozialer Roboter in den Szenen mit. In der Mappe finden Sie Informationen zu den verwendeten Technologien."
|
||||
file_location: "/assets/files/chatbot/Improbotics_lesmap_Leerling.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
care:
|
||||
title: KI im Gesundheitswesen
|
||||
sub_title: KI-Systeme, die im Gesundheitswesen helfen
|
||||
description: "Krankenhäuser machen bereits heute Gebrauch von künstlicher Intelligenz. Schülerinnen und Schüler der zweiten und dritten Klasse (SO) entdecken, welche Systeme existieren und wie sie Ärzte bei Entscheidungen unterstützen. Auf diese Weise lernen die Schülerinnen und Schüler die Prinzipien des Entscheidungsbaums, einer weit verbreiteten Technik im maschinellen Lernen."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
curricula_files:
|
||||
- file_title: "Projektblatt KI im Gesundheitswesen"
|
||||
file_info: "Dies ist ein kurzer Überblick über das Projekt KI im Gesundheitswesen mit Projektstruktur und -merkmalen."
|
||||
file_location: "/assets/files/care/projectfiche_aiindezorg.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Sprouts"
|
||||
file_info: "Ein Spiel zur Einführung in 'Graphen'."
|
||||
file_location: "/assets/files/care/Sprouts.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Download"
|
||||
- file_title: "Erklärung zu Übungen mit Graphen aus dem Schülerkurs"
|
||||
file_info: "Welche Figuren repräsentieren denselben Graphen? Eine formalere Methode."
|
||||
file_location: "/assets/files/care/dezelfdegraafFormeel.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Download"
|
||||
- file_title: "Erklärung zu Übungen mit Graphen aus dem Schülerkurs"
|
||||
file_info: "Welche Figuren repräsentieren denselben Graphen? Eine Methode mit Farben."
|
||||
file_location: "/assets/files/care/dezelfdeGraaf.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Download"
|
||||
- file_title: "Der Schülerkurs - Ziel Durchfluss"
|
||||
file_info: "Schülerkurs"
|
||||
file_location: "/assets/files/care/AIindeZorg_doorstroom_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Kartenset - Auch in gedruckter Form erhältlich"
|
||||
file_info: "Mit diesem Kartenset können Lehrer die Schüler über ethische Aspekte neuer Technologien nachdenken lassen. Wie steht es um die Privatsphäre? Werden soziale Kontakte beeinträchtigt? Welche Technologien werden begeistert aufgenommen? Was ist nicht wünschenswert? Sind die neuen Technologien für alle erschwinglich?"
|
||||
file_location: "/assets/files/care/Kaartset_AIIndeZorg_AIOpSchool_Dwengo.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Anleitung für das Kartenset"
|
||||
file_info: "Diese Anleitung bietet zusätzliche Erläuterungen zum Kartenset."
|
||||
file_location: "/assets/files/care/AIIndeZorgKaartenset_UitlegVoorLeerkracht.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Entscheidungsbaum 'mBrAIn'-Projekt in nicht kompakter Form"
|
||||
file_info: "Im Forschungsprojekt 'mBrain', das die Entwicklung einer App zum Vorhersagen eines Migräneanfalls zum Ziel hat, wurde ein Entscheidungsbaum erstellt. Mit diesem Entscheidungsbaum wird ein Problem der binären Klassifikation angegangen: Es gibt nur zwei Klassen: 'Migräne' und 'Keine Migräne'. (Quellen: Femke Ongenae. (2021), UGent; Van Hoecke, S., Ongenae, F., Paemeleire, K., & Vandenbussche, N. (2020). App muss Kopfschmerzen vorhersagen. EOS Wissenschaftsspezial, Technologie und Gesundheit, 25.) Wir haben die Form dieses Entscheidungsbaums in einen binären Entscheidungsbaum umgewandelt, um zu zeigen, dass diese Form nicht immer benutzerfreundlich ist. Weitere Informationen finden Sie im vierten Kapitel des Schülerkurses dieses Projekts."
|
||||
file_location: "/assets/files/care/MBrainBeslissingsboom.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Suche nach Sprache - Computerdenken (unplugged Aktivität)"
|
||||
file_info: "Das Locked-In-Syndrom ist eine der schlimmsten medizinischen Erkrankungen. Man ist vollständig gelähmt, außer dass man vielleicht noch mit einem Auge blinzeln kann. Der intelligente Geist ist in einem nutzlosen Körper eingesperrt: Man kann alles fühlen, aber nicht kommunizieren. Es kann jedem passieren, aus dem Nichts, als Folge eines Schlaganfalls. Wenn Sie Menschen mit dem Locked-In-Syndrom helfen möchten, ist es besser, Arzt oder Krankenschwester zu werden? Oder kann man als Informatiker auch helfen?"
|
||||
file_location: "/assets/files/care/ZoektochtNaarSpraak.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
stem:
|
||||
title: Python in MINT
|
||||
sub_title: Datavisualisierungen mit Python
|
||||
description: "In diesem Paket lernen Sie, komplexe Probleme einfacher und schneller mit der Programmiersprache Python zu lösen. Programmieren kann nämlich eine verbindende Rolle zwischen Wissenschaft, Technik, Design und angewandter Mathematik spielen. Kurz gesagt, dank Python holen wir das Beste aus MINT heraus."
|
||||
contact: Fragen? Kontaktieren Sie uns unter team@aiopschool.be. Die Presse kann sich an Francis Wyffels unter Francis@dwengo.org wenden.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
agriculture:
|
||||
title: KI in der Landwirtschaft
|
||||
sub_title: KI in der Landwirtschaft
|
||||
description: "Verfaulte Tomaten während der Ernte entfernen? Künstliche Intelligenz kann dabei helfen. Aber wie? Schülerinnen und Schüler der zweiten und dritten Klasse (SO) setzen KI ein. Vielleicht kann ein vibrierendes Laufband das System noch verbessern?"
|
||||
contact: Fragen? Kontaktieren Sie uns unter team@aiopschool.be. Die Presse kann sich an Francis Wyffels unter Francis@dwengo.org wenden.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Design"
|
||||
file_info: "Design des Laufbands"
|
||||
file_location: "/assets/files/art/Transportband_InnoVET_RCH.zip"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
art:
|
||||
title: KI in der Kunst
|
||||
sub_title: Zeichenroboter im Unterricht
|
||||
description: "Können wir Kunst mit künstlicher Intelligenz schaffen? Schülerinnen und Schüler der zweiten und dritten Klasse (SO) setzen sich kreativ mit KI auseinander und reflektieren über das Ergebnis. Ist das Kunst? Sie entdecken auch, wie KI unser kulturelles Erbe schützen kann."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
wegostem:
|
||||
title: WeGoSTEM
|
||||
sub_title: Zeichenroboter im Unterricht
|
||||
description: "Wir fordern Kinder der dritten Klasse (GS) heraus, einen zeichnenden Kunstroboter zu programmieren. Spielerisch lernen die Kinder viele MINT-Fähigkeiten, von Technik bis zum algorithmischen Denken."
|
||||
contact: Fragen? Kontaktieren Sie uns unter team@aiopschool.be. Die Presse kann sich an Francis Wyffels unter Francis@dwengo.org wenden.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
computational_thinking:
|
||||
title: Algorithmisches Denken
|
||||
sub_title: Algorithmisches Denken im Unterricht
|
||||
description: "Wie können wir komplexe Probleme mithilfe eines Computers lösen? Dank algorithmischem Denken! Das können Sie durch verschiedene Aktivitäten mit oder ohne Computer lernen. Wir helfen Ihnen gerne auf dem Weg."
|
||||
contact: Fragen? Kontaktieren Sie uns unter team@aiopschool.be. Die Presse kann sich an Francis Wyffels unter Francis@dwengo.org wenden.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Konzepte und Ansätze des algorithmischen Denkens"
|
||||
file_info: "Poster"
|
||||
file_location: "/assets/files/computational_thinking/CDposterDwengo2.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Erklärung der vier Konzepte des algorithmischen Denkens"
|
||||
file_info: "Präsentation über die vier Konzepte des algorithmischen Denkens: Dekomposition, Mustererkennung, Abstraktion und Algorithmus. Sie können die PDF herunterladen > öffnen > präsentieren über CTRL-L und mit den Pfeiltasten navigieren."
|
||||
file_location: "/assets/files/computational_thinking/CD4concepten_33V3gBg.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Konzepte und Prinzipien"
|
||||
file_info: "Übersicht"
|
||||
file_location: "/assets/files/computational_thinking/Icoontjes.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged-Aktivität - Emotionsmaschine (Aufgabe)"
|
||||
file_info: "Wie können Sie Emotionen bei einem Roboter fördern?"
|
||||
file_location: "/assets/files/computational_thinking/emotiemachine_gids.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged-Aktivität - Emotionsmaschine"
|
||||
file_info: "Wie können Sie Emotionen bei einem Roboter fördern?"
|
||||
file_location: "/assets/files/computational_thinking/emotiemachine_gewoon_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged-Aktivität - Farben nach Zahlen"
|
||||
file_info: "Bilder können auf verschiedene Weisen dargestellt werden. Bei diesem Farben-nach-Zahlen-Rätsel müssen Sie ein Bild rekonstruieren, indem Sie die gegebene Liste von Zahlen verwenden. Diese Liste sagt Ihnen, welche Farbe Sie jedem Quadrat ('Pixel') zuordnen."
|
||||
file_location: "/assets/files/computational_thinking/kleurenopnummer1.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged-Aktivität - Ein menschliches Computernetzwerk"
|
||||
file_info: "In dieser Aktivität lernen die Schülerinnen und Schüler, wie die Datenübertragung im Internet funktioniert. Computer, Smartphones und andere Geräte, die über das Internet miteinander verbunden sind, können kommunizieren. Um sich gegenseitig zu verstehen, muss diese Kommunikation nach bestimmten Regeln erfolgen. Diese Regeln nennen wir Protokoll."
|
||||
file_location: "/assets/files/computational_thinking/menselijkComputernetwerk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged-Aktivität - Komprimierung"
|
||||
file_info: "Um Bilder über Netzwerke zu senden, möchten wir die Informationen mit möglichst wenig Daten darstellen. Hier kommt die Komprimierung ins Spiel. Mit Hilfe von Algorithmen werden Bilder mit möglichst wenigen Zahlen dargestellt, aber so, dass Sie das ursprüngliche Bild immer noch wiederherstellen können. Andere Algorithmen stellen das ursprüngliche Bild wieder her, wenn die Informationen ihr Ziel erreicht haben."
|
||||
file_location: "/assets/files/computational_thinking/puzzel-gecomprimeerdepixel11.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged-Aktivität - Programmieren Sie einmal einen Menschen"
|
||||
file_info: "Computer können nicht interpretieren und führen daher buchstäblich jede Anweisung aus, die Sie ihnen geben. Die Herausforderung für den Programmierer besteht darin, Probleme in kleine, vom Computer ausführbare Schritte zu zerlegen und dem Computer die Anweisungen auf die richtige Weise zu geben."
|
||||
file_location: "/assets/files/computational_thinking/programmeerEensEenMens.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged-Aktivität - Suche nach Sprache"
|
||||
file_info: "Das Locked-In-Syndrom ist eine der schlimmsten medizinischen Erkrankungen. Sie sind vollständig gelähmt, außer dass Sie vielleicht noch mit einem Auge blinzeln können. Ihr intelligenter Geist ist in einem nutzlosen Körper gefangen: Sie können alles fühlen, aber nicht kommunizieren. Es kann jedem passieren, aus dem Nichts, als Folge eines Schlaganfalls. Wenn Sie Menschen mit dem Locked-In-Syndrom helfen möchten, werden Sie am besten Arzt oder Krankenschwester? Oder kann Ihnen auch ein Informatiker helfen?"
|
||||
file_location: "/assets/files/computational_thinking/ZoektochtNaarSpraak.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
math_with_python:
|
||||
title: Python im Mathematikunterricht
|
||||
sub_title: Python in der Mathematik
|
||||
description: "Die Programmiersprache Python bietet interessante Möglichkeiten, den Mathematikunterricht zu bereichern. Von der Pythagoras-Theorie bis zur Erstellung eigener Grafiken, digitalen Bildverarbeitung und linearer Regression wird alles mit Python klarer."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
python_programming:
|
||||
title: Programmieren mit Python
|
||||
sub_title: Grundlagen des Programmierens in Python
|
||||
description: "Die Grundprinzipien des Programmierens erlernen? Das ist perfekt möglich mit diesem Paket. Wir verwenden Python und lernen alles über Sequenzen, Wiederholungsstrukturen und Auswahlstrukturen. Genau das steht in den Endzielen. Und noch mehr!"
|
||||
contact: Fragen? Kontaktieren Sie uns unter team@aiopschool.be. Die Presse kann sich an Francis Wyffels unter Francis@dwengo.org wenden.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
physical_computing:
|
||||
title: Physical Computing
|
||||
sub_title: Programmieren von Robotern im Unterricht
|
||||
description: "Ein Musikinstrument, Auto oder Wetterstation bauen? Das geht mit Dwenguino, einer Mikrocontroller-Plattform mit einer eigenen Programmierumgebung. Schülerinnen und Schüler der Grundschule und der Sekundarstufe können sofort damit arbeiten. Echt oder in unserem Simulator, blockbasiert oder textuell."
|
||||
contact: Fragen? Kontaktieren Sie uns unter team@aiopschool.be. Die Presse kann sich an Francis Wyffels unter Francis@dwengo.org wenden.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Bouw jouw eigen robot"
|
||||
file_info: "Baue deinen eigenen fahrenden Roboter."
|
||||
file_location: "/assets/files/physical_computing/bouwjouweigenrobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
327
backend/_i18n/en.yml
Normal file
327
backend/_i18n/en.yml
Normal file
|
@ -0,0 +1,327 @@
|
|||
# translate theme pages
|
||||
|
||||
curricula_page:
|
||||
title: Our teaching topics
|
||||
read_more: Read more
|
||||
curricula_files: Files
|
||||
algorithms:
|
||||
title: Algorithms
|
||||
sub_title: Algorithms
|
||||
description: "Students in the second and third grade (secondary education) learn how to use algorithms to solve problems. They learn how to design algorithms and analyze the efficiency of algorithms. They also learn how to use algorithms to solve problems."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/2B6gZ9HdQ1Y
|
||||
basics_ai:
|
||||
title: Basisprincipes van AI
|
||||
sub_title: Basisprincipes van AI
|
||||
description: "Onder dit lesthema bundelen we verschillende activiteiten waarin de basisprincipes van artificiële intelligentie (AI) aan bod komen. Leerlingen leren wat AI is, hoe het werkt en hoe het kan worden toegepast in verschillende domeinen."
|
||||
contact: ""
|
||||
kiks:
|
||||
title: AI and Climate
|
||||
sub_title: KIKS
|
||||
description: "Students in the third grade (SO) investigate how plants adapt to climate change through their stomata. They use artificial intelligence and image recognition to count these stomata."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
curricula_files:
|
||||
- file_title: "Project Sheet KIKS"
|
||||
file_info: "This is a brief overview of the KIKS project with project structure and characteristics."
|
||||
file_location: "/assets/files/kiks/projectfiche_kiks.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "The manual - also available in print"
|
||||
file_info: "We want to provide teachers with background knowledge about the content of this project: climate change, the biology of stomata, how plants adapt to climate change through stomata, the scientific research of UGent and Plantentuin Meise underlying this project, citizen science, what artificial intelligence (AI) is, the history of AI, its use and ethics, principles of digital images, mathematics behind algorithms, and foundations of currently most-used AI techniques. We also explain how we implemented KIKS in the classroom."
|
||||
file_location: "/assets/files/kiks/KIKS_handleiding_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Student Course"
|
||||
file_info: "With the student course, we provide an example of a possible, comprehensive trajectory that a teacher can go through with students. The trajectory includes climate change, the biology of stomata with a microscopy assignment, how plants adapt to climate change through stomata, the scientific research of UGent and Plantentuin Meise, collecting data to train a neural network, what artificial intelligence (AI) is, the history of AI, its use and ethics, principles of digital images, working with convolutions, mathematics behind the Perceptron algorithm, linear and non-linear classification of data, and foundations of machine learning."
|
||||
file_location: "/assets/files/kiks/KIKS_leerlingencursus_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Curriculum Goals"
|
||||
file_info: "Within the KIKS project, many curriculum goals can be addressed. The teacher determines which goals are related to the project. Moreover, the project offers many opportunities to actively engage and let students learn independently, as well as teach ICT skills. KIKS can also be used for a research assignment. In the final objectives and curricula of various educational bodies, many goals can be found linking KIKS with biology, geography, and mathematics."
|
||||
file_location: "/assets/files/kiks/Leerdoelen-KIKS.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Making a Nail Polish Impression of a Leaf Part"
|
||||
file_info: "To know the number of stomata on a part of a plant leaf, we examine the leaf surface under the microscope. We can remove a piece of the thin cuticle of the leaf for this, but for some plants, it is not so successful, for example, due to the stiffness of the leaf. However, this can be compensated by using the same method as the researchers at Plantentuin Meise, namely, taking an impression of a part of the leaf surface with transparent nail polish. The microscopic image can be photographed with a smartphone."
|
||||
file_location: "https://vimeo.com/467062270"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Watch"
|
||||
socialrobot:
|
||||
title: Social Robot
|
||||
sub_title: Robotics in the classroom
|
||||
description: "While first-year students (secondary education) build and program a social robot, they learn to solve complex problems through computational thinking. They playfully work on the new end terms for digital competencies."
|
||||
contact: Questions? Contact us at team@aiopschool.be. The press can contact Francis Wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Project Sheet Social Robot"
|
||||
file_info: "This is a brief overview of the 'Social Robot' project with project structure and characteristics."
|
||||
file_location: "/assets/files/socialrobot/projectfiche_socialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Collage of Social Robots"
|
||||
file_info: "The robots in this photo are creations of first-year secondary education students or prototypes."
|
||||
file_location: "/assets/files/socialrobot/collage.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Construction Kit for 'Social Robot' Project"
|
||||
file_info: "Do you want your students to design and build a social robot too? This is possible via the construction kit of Dwengovzw. The figure shows the current composition of the construction kit. Interested? Contact us by email or find more information on this project page."
|
||||
file_location: "/assets/files/socialrobot/constructiekit_socialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "From Project to End Terms"
|
||||
file_info: "The end terms that can be worked on are linked to the different phases of the 'Social Robot' project."
|
||||
file_location: "/assets/files/socialrobot/EindtermenAStroomSsocialeRobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotion Machine (Incomplete) - Computational Thinking (Unplugged Activity)"
|
||||
file_info: "Unplugged activity"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_gewoon_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotion Machine (Task) - Computational Thinking (Unplugged Activity)"
|
||||
file_info: "Unplugged activity"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_gids.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotion Machine (Complete) - Computational Thinking (Unplugged Activity)"
|
||||
file_info: "Unplugged activity"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_ingevuld_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotion Machine with LED Matrix - Computational Thinking (Unplugged Activity)"
|
||||
file_info: "Unplugged activity"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_matrices_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Teacher's Guide"
|
||||
file_info: "The bundled sheets explain the use of the Dwenguino and the sensors and actuators."
|
||||
file_location: "/assets/files/socialrobot/ficheboekje_lkn.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Information Sheets for Students"
|
||||
file_info: "These information sheets explain the use of the Dwenguino and sensors and actuators."
|
||||
file_location: "/assets/files/socialrobot/fichesSocialeRobot_lln.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Create a Face - Computational Thinking (Unplugged Activity)"
|
||||
file_info: "Unplugged activity"
|
||||
file_location: "/assets/files/socialrobot/maakeengezicht_activiteit.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Tasks for Exercises in the MOOC"
|
||||
file_info: "An overview of programming exercises in the MOOC"
|
||||
file_location: "/assets/files/socialrobot/Opgaven_MOOC.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Poster 'Social Robot' Project"
|
||||
file_info: "The poster displays the different aspects of the project."
|
||||
file_location: "/assets/files/socialrobot/posterSocialeRobot_nl_Qo4ANmV.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Manual 'Hello Robot!'"
|
||||
file_info: "With this lesson booklet, you bring your own social robot to life."
|
||||
file_location: "/assets/files/socialrobot/handleiding_hallo_robot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
chatbot:
|
||||
title: Language Technology at School
|
||||
sub_title: Getting Started with a Chatbot
|
||||
description: "Where language and technology come together, the domain of Natural Language Processing emerges. Can a computer understand, translate, or even write texts? Can a computer recognize emotions? Students in the second and third grades (SO) learn all about it in this package."
|
||||
contact: Questions? Contact us at team@aiopschool.be. The press can contact Francis Wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Project Sheet Chatbot"
|
||||
file_info: "This is a brief overview of the Chatbot project with project structure and characteristics."
|
||||
file_location: "/assets/files/chatbot/projectfiche_chatbot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "BrAInfood Chatbots"
|
||||
file_info: "In this BrAInfood - aimed at young people - the Knowledge Center Data & Society provides more information about chatbots. The BrAInfood includes a fictional story about Lotte talking to a chatbot and presumably providing information about her to companies. Further, some points related to chatbots are explained, along with some tips for young people to better protect their (personal) data. In this way, we aim to make young people more aware of how chatbots work and encourage them to reflect on the data collected about them."
|
||||
file_location: "/assets/files/chatbot/Brainfood13_Chatbots_NL.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "BrAInfood Personalized Newsfeeds"
|
||||
file_info: "In this BrAInfood from the Knowledge Center Data & Society, tips are given on how to keep control over your newsfeed."
|
||||
file_location: "/assets/files/chatbot/brainfoodaanbevelingnieuws.jpg"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Manual 'Chatbot' - Also available in print"
|
||||
file_info: "Teachers acquire sufficient background information through this manual to work with (a part of) the 'Chatbot' project in the classroom. The book covers various aspects of language technology, such as the history of artificial intelligence, its ethical aspects, sentiment analysis, and cyberbullying detection, chatbots, speaking digital assistants, and author recognition. It also addresses the STEM objectives and the objectives related to digital competence and media literacy."
|
||||
file_location: "/assets/files/chatbot/Chatbot_handleiding_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Improbotics - Lesson Plan - Teacher's Version"
|
||||
file_info: "In the theater performance Improbotics, a social robot improvises in the scenes. The lesson plan provides information about the technologies used."
|
||||
file_location: "/assets/files/chatbot/Improbotics_lesmap_Leerkracht.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Improbotics - Lesson Plan - Students"
|
||||
file_info: "In the theater performance Improbotics, a social robot improvises in the scenes. The lesson plan provides information about the technologies used."
|
||||
file_location: "/assets/files/chatbot/Improbotics_lesmap_Leerling.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
care:
|
||||
title: AI in Healthcare
|
||||
sub_title: AI Systems Assisting in Healthcare
|
||||
description: "Hospitals are already using artificial intelligence today. Students in the second and third grades (SO) discover the existing systems and how they help doctors make decisions. This way, students learn the principles of the decision tree, a commonly used technique in machine learning."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
curricula_files:
|
||||
- file_title: "Project Sheet AI in Healthcare"
|
||||
file_info: "This is a brief overview of the AI in Healthcare project with project structure and characteristics."
|
||||
file_location: "/assets/files/care/projectfiche_aiindezorg.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Sprouts"
|
||||
file_info: "A game as an introduction to 'Graphs'."
|
||||
file_location: "/assets/files/care/Sprouts.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Download"
|
||||
- file_title: "Explanation of Exercises on Graphs from the Student Course"
|
||||
file_info: "Which figures represent the same graph? A more formal approach."
|
||||
file_location: "/assets/files/care/dezelfdegraafFormeel.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Download"
|
||||
- file_title: "Explanation of Exercises on Graphs from the Student Course"
|
||||
file_info: "Which figures represent the same graph? An approach with colors."
|
||||
file_location: "/assets/files/care/dezelfdeGraaf.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Download"
|
||||
- file_title: "Student Course - Finality Throughflow"
|
||||
file_info: "Student course."
|
||||
file_location: "/assets/files/care/AIinHealthcare_throughflow_firstedition.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Card Set - Also available in print"
|
||||
file_info: "With this card set, you can make students reflect on the ethical aspects of new technologies. What about privacy? Are social contacts not at risk? Which technologies are welcomed? What is undesirable? Are the new technologies affordable for everyone?"
|
||||
file_location: "/assets/files/care/Cardset_AIinHealthcare_AIOpSchool_Dwengo.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Manual for Card Set"
|
||||
file_info: "This manual provides additional explanation for the card set."
|
||||
file_location: "/assets/files/care/AIinHealthcareCardset_InstructionForTeacher.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Decision Tree 'mBrAIn' Project in Non-compact Form"
|
||||
file_info: "In the research project 'mBrain,' which aims to develop an app predicting a migraine attack, a decision tree was constructed. This decision tree addresses a binary classification problem: there are only two classes, 'Migraine' and 'No Migraine.' (Sources: Femke Ongenae. (2021), UGent; Van Hoecke, S., Ongenae, F., Paemeleire, K., & Vandenbussche, N. (2020). App moet hoofdpijn voorspellen. EOS Wetenschap Special, Technologie en gezondheid, 25.) We have transformed the shape of this decision tree into a binary decision tree to demonstrate that this form is not always user-friendly. For more explanation, see chapter 4 of the student course of this project."
|
||||
file_location: "/assets/files/care/MBrainBeslissingsboom.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Search for Speech - Computational Thinking (unplugged activity)"
|
||||
file_info: "Locked-in syndrome is one of the worst medical conditions. You are completely paralyzed, except that you might still be able to blink with one eye. Your intelligent mind is trapped in a useless body: you can feel everything but cannot communicate. It can happen to anyone, out of nowhere, as a result of a stroke. If you want to help people with the locked-in syndrome, is it best to become a doctor or a nurse? Or can you also help as a computer scientist?"
|
||||
file_location: "/assets/files/care/ZoektochtNaarSpraak.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
stem:
|
||||
title: Python in STEM
|
||||
sub_title: Data Visualizations with Python
|
||||
description: "In this package, you'll learn to tackle complex problems more easily and quickly with the programming language Python. Programming can indeed play a connecting role between science, technology, design, and applied mathematics. In short, thanks to Python, we get the best out of STEM."
|
||||
contact: Questions? Contact us at team@aiopschool.be. The press can contact Francis Wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
agriculture:
|
||||
title: AI in Agriculture
|
||||
sub_title: AI in agriculture
|
||||
description: "Removing rotten tomatoes during harvest? Artificial intelligence can help with that. But how? Students in the second and third grades (SO) get hands-on experience with AI. Perhaps a vibrating conveyor belt can improve the system even more?"
|
||||
contact: Questions? Contact us at team@aiopschool.be. The press can contact Francis Wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Design"
|
||||
file_info: "Design of the conveyor belt"
|
||||
file_location: "/assets/files/art/Transportband_InnoVET_RCH.zip"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
art:
|
||||
title: AI in Art
|
||||
sub_title: Drawing Robots in the Classroom
|
||||
description: "Can we create art with artificial intelligence? Students in the second and third grades (SO) express their creativity with AI and reflect on the result. Is this art? They also discover how AI can protect our cultural heritage."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
wegostem:
|
||||
title: WeGoSTEM
|
||||
sub_title: Drawing Robots in the Classroom
|
||||
description: "We challenge third-grade (BO) children to program a drawing robot. Through play, children learn a lot of STEM skills, from technology to computational thinking."
|
||||
contact: Questions? Contact us at team@aiopschool.be. The press can contact Francis Wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
|
||||
computational_thinking:
|
||||
title: Computational Thinking
|
||||
sub_title: Computational Thinking in the Classroom
|
||||
description: "How can we solve complex problems with the help of a computer? Thanks to computational thinking! You can learn this through various activities with or without a computer. We'll help you get started."
|
||||
contact: Questions? Contact us at team@aiopschool.be. The press can contact Francis Wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Concepts and Approach to Computational Thinking"
|
||||
file_info: "poster"
|
||||
file_location: "/assets/files/computational_thinking/CDposterDwengo2.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Explaining Four Concepts of Computational Thinking"
|
||||
file_info: "Presentation on four concepts of computational thinking: decomposition, pattern recognition, abstraction, and algorithm. You can download the PDF, open it, present it using CTRL-L, and navigate with the arrow keys."
|
||||
file_location: "/assets/files/computational_thinking/CD4concepten_33V3gBg.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Concepts and Principles"
|
||||
file_info: "Overview"
|
||||
file_location: "/assets/files/computational_thinking/Icoontjes.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged Activity - Emotion Machine (Assignment)"
|
||||
file_info: "How can you stimulate emotions in a robot?"
|
||||
file_location: "/assets/files/computational_thinking/emotiemachine_gids.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged Activity - Emotion Machine"
|
||||
file_info: "How can you stimulate emotions in a robot?"
|
||||
file_location: "/assets/files/computational_thinking/emotiemachine_gewoon_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged Activity - Color by Number"
|
||||
file_info: "Images can be represented in many ways. In this color by number puzzle, you have to reconstruct an image using the given list of numbers; this list tells you which color to fill in each square ('pixel')."
|
||||
file_location: "/assets/files/computational_thinking/kleurenopnummer1.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged Activity - Human Computer Network"
|
||||
file_info: "In this activity, students learn how data transfer over the Internet works. Computers, smartphones, and other devices connected via the Internet can communicate with each other. To understand each other, this communication must follow certain agreements. We call these agreements a protocol."
|
||||
file_location: "/assets/files/computational_thinking/menselijkComputernetwerk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged Activity - Compression"
|
||||
file_info: "To send images over networks, we want to represent information with as little data as possible. Compression comes into play here. Using algorithms, images are represented with as few numbers as possible, but in a way that you can still recover the original figure. Other algorithms restore the original image when the information reaches its destination."
|
||||
file_location: "/assets/files/computational_thinking/puzzel-gecomprimeerdepixel11.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged Activity - Program a Human"
|
||||
file_info: "Computers cannot interpret, so they literally execute every instruction you give them. The programmer's challenge is to solve problems by breaking them down into small steps that the computer can execute and giving the instructions to the computer correctly."
|
||||
file_location: "/assets/files/computational_thinking/programmeerEensEenMens.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged Activity - Search for Speech"
|
||||
file_info: "Locked-in syndrome is one of the worst medical conditions. You are completely paralyzed, except that you may still be able to blink with one eye. Your intelligent mind is trapped in a useless body: you can feel everything but cannot communicate. It can happen to anyone, out of nowhere, as a result of a stroke. If you wanted to help people with locked-in syndrome, would you be better off as a doctor or nurse? Or can you help as a computer scientist?"
|
||||
file_location: "/assets/files/computational_thinking/ZoektochtNaarSpraak.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
math_with_python:
|
||||
title: Python in Math Class
|
||||
sub_title: Python in Mathematics
|
||||
description: "The programming language Python offers great possibilities to enrich the math class. From the Pythagorean theorem to creating your own graphs, digital image processing, and linear regression, everything becomes clearer with Python."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
python_programming:
|
||||
title: Programming with Python
|
||||
sub_title: Basic Programming in Python
|
||||
description: "Want to learn the basic principles of programming? You can do it perfectly with this package. We use Python and learn all about sequences, repetition structure, and decision structure. That's exactly what's in the end terms. And more!"
|
||||
contact: Questions? Contact us at team@aiopschool.be. The press can contact Francis Wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
physical_computing:
|
||||
title: Physical Computing
|
||||
sub_title: Program Robots in the Classroom
|
||||
description: "Build a musical instrument, car, or weather station? You can do that with Dwenguino, a microcontroller platform with its own programming environment. Students from both primary and secondary education can get started with it right away. In real life or in our simulator, block-based or textual."
|
||||
contact: Questions? Contact us at team@aiopschool.be. The press can contact Francis Wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Bouw jouw eigen robot"
|
||||
file_info: "Build your own driving robot."
|
||||
file_location: "/assets/files/physical_computing/bouwjouweigenrobot.pdf"
|
||||
file_icon_name: "link"
|
||||
link_name: "Download"
|
334
backend/_i18n/fr.yml
Normal file
334
backend/_i18n/fr.yml
Normal file
|
@ -0,0 +1,334 @@
|
|||
# translate theme pages
|
||||
|
||||
curricula_page:
|
||||
title: Notre sujets d'enseignement
|
||||
read_more: "Lees meer"
|
||||
curricula_files: "Bestanden"
|
||||
algorithms:
|
||||
title: Algorithmes
|
||||
sub_title: Algorithmes
|
||||
description: "Les élèves de la troisième à la sixième année (enseignement secondaire) apprennent comment utiliser des algorithmes pour résoudre des problèmes. Ils apprennent à concevoir des algorithmes et à analyser l'efficacité de ces derniers. Ils apprennent également à utiliser des algorithmes pour résoudre des problèmes."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/2B6gZ9HdQ1Y
|
||||
basics_ai:
|
||||
title: Basisprincipes van AI
|
||||
sub_title: Basisprincipes van AI
|
||||
description: "Onder dit lesthema bundelen we verschillende activiteiten waarin de basisprincipes van artificiële intelligentie (AI) aan bod komen. Leerlingen leren wat AI is, hoe het werkt en hoe het kan worden toegepast in verschillende domeinen."
|
||||
contact: ""
|
||||
kiks:
|
||||
title: "IA et changement climatique"
|
||||
sub_title: "KIKS"
|
||||
description: "Les élèves de la troisième année du secondaire explorent comment les plantes s'adaptent au changement climatique via leurs stomates. Ils utilisent l'intelligence artificielle et la reconnaissance d'image pour compter ces stomates."
|
||||
contact: ""
|
||||
teaser: "https://www.youtube.com/embed/dO-E33G20co"
|
||||
curricula_files:
|
||||
- file_title: "Fiche de projet KIKS"
|
||||
file_info: "Il s'agit d'un bref aperçu du projet KIKS avec la structure et les caractéristiques du projet."
|
||||
file_location: "/assets/files/kiks/projectfiche_kiks.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Le manuel - également disponible en version imprimée"
|
||||
file_info: "Nous voulons donner aux enseignants des connaissances de base sur le contenu de ce projet : le changement climatique, la biologie des stomates et la manière dont les plantes s'adaptent à ce changement climatique via les stomates, la recherche scientifique de l'UGent et du Jardin botanique de Meise à l'origine de ce projet, la science citoyenne, ce qu'est l'intelligence artificielle (IA), l'histoire de l'IA, son utilisation et l'éthique qui l'entoure, les principes des images numériques, les mathématiques derrière les algorithmes et les fondements des techniques d'IA actuellement les plus utilisées. Nous expliquons également comment nous avons utilisé KIKS en classe."
|
||||
file_location: "/assets/files/kiks/KIKS_handleiding_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Un cours pour les élèves"
|
||||
file_info: "Avec le cours pour les élèves, nous donnons un exemple d'un parcours possible que l'enseignant peut suivre avec les élèves. Le parcours inclut le changement climatique, la biologie des stomates avec une tâche de microscopie, la manière dont les plantes s'adaptent au changement climatique via les stomates, la recherche scientifique de l'UGent et du Jardin botanique de Meise, la collecte de données pour entraîner un réseau neuronal, ce qu'est l'intelligence artificielle (IA), l'histoire de l'IA, son utilisation et l'éthique qui l'entoure, les principes des images numériques, le travail avec les convolutions, les mathématiques derrière l'algorithme du Perceptron, la classification linéaire et non linéaire des données, et les fondements de l'apprentissage machine."
|
||||
file_location: "/assets/files/kiks/KIKS_leerlingencursus_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Les objectifs d'apprentissage"
|
||||
file_info: "Dans le projet KIKS, de nombreux objectifs d'apprentissage peuvent être abordés. L'enseignant décide lui-même des objectifs d'apprentissage liés au projet. De plus, le projet offre de nombreuses possibilités pour permettre aux élèves d'apprendre de manière active et autonome, et pour enseigner les compétences en TIC. KIKS peut également être utilisé pour développer une mission de recherche. Les objectifs d'apprentissage et les plans de cours des différentes institutions contiennent de nombreux objectifs d'apprentissage liés à la biologie, à la géographie et aux mathématiques."
|
||||
file_location: "/assets/files/kiks/Leerdoelen-KIKS.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "La réalisation d'une empreinte de vernis à ongles d'une partie d'une feuille"
|
||||
file_info: "Pour connaître le nombre de stomates sur une partie d'une feuille d'une plante, nous examinons la surface de la feuille sous le microscope. Pour ce faire, nous pouvons retirer une partie de la cuticule très fine de la feuille, mais cela ne fonctionne pas aussi bien pour certaines plantes en raison de la rigidité de la feuille. Cela peut cependant être compensé en utilisant la même méthode que les chercheurs du Jardin botanique de Meise, à savoir prendre une empreinte d'une partie de la surface de la feuille avec du vernis à ongles transparent. L'image microscopique peut être photographiée avec un smartphone."
|
||||
file_location: "https://vimeo.com/467062270"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Voir"
|
||||
socialrobot:
|
||||
title: "Robot social"
|
||||
sub_title: "Robotique en classe"
|
||||
description: "Alors que les élèves de la première année du secondaire bricolent et programment un robot social, ils apprennent à résoudre des problèmes complexes grâce à la pensée computationnelle. Ils travaillent de manière ludique sur les nouvelles compétences finales en compétences numériques."
|
||||
contact: "Questions ? Contactez-nous via team@aiopschool.be. La presse peut contacter Francis Wyffels via Francis@dwengo.org."
|
||||
teaser: "https://www.youtube.com/embed/tqSnpAKLsu8"
|
||||
curricula_files:
|
||||
- file_title: "Fiche de projet Robot social"
|
||||
file_info: "Il s'agit d'un bref aperçu du projet 'Robot social' avec la structure et les caractéristiques du projet."
|
||||
file_location: "/assets/files/socialrobot/projectfiche_socialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Collage des robots sociaux"
|
||||
file_info: "Les robots sur cette photo sont des réalisations d'élèves de la première année du secondaire ou des prototypes."
|
||||
file_location: "/assets/files/socialrobot/collage.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Kit de construction pour le projet 'Robot social'"
|
||||
file_info: "Vous souhaitez que vos élèves conçoivent et construisent également un robot social ? Cela peut se faire avec le kit de construction de Dwengovzw. Sur la figure, vous découvrirez la composition actuelle du kit de construction. Intéressé ? Contactez-nous par e-mail ou trouvez plus d'informations sur cette page du projet."
|
||||
file_location: "/assets/files/socialrobot/constructiekit_socialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "De la mission aux compétences finales"
|
||||
file_info: "Les compétences finales qui peuvent être travaillées sont liées aux différentes phases du projet 'Robot social'."
|
||||
file_location: "/assets/files/socialrobot/EindtermenAStroomSsocialeRobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Machine à émotions (incomplète) - Pensée computationnelle (activité débranchée)"
|
||||
file_info: "Activité débranchée"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_gewoon_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Machine à émotions (mission) - Pensée computationnelle (activité débranchée)"
|
||||
file_info: "Activité débranchée"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_gids.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Machine à émotions (complète) - Pensée computationnelle (activité débranchée)"
|
||||
file_info: "Activité débranchée"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_ingevuld_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Machine à émotions avec matrice de LED - Pensée computationnelle (activité débranchée)"
|
||||
file_info: "Activité débranchée"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_matrices_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Guide pour les enseignants"
|
||||
file_info: "Les fiches regroupées détaillant l'utilisation du Dwenguino et des capteurs et actionneurs."
|
||||
file_location: "/assets/files/socialrobot/ficheboekje_lkn.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Fiches pour les élèves"
|
||||
file_info: "Ces fiches expliquent l'utilisation du Dwenguino et des capteurs et actionneurs."
|
||||
file_location: "/assets/files/socialrobot/fichesSocialeRobot_lln.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Créer un visage - Pensée computationnelle (activité débranchée)"
|
||||
file_info: "Activité débranchée"
|
||||
file_location: "/assets/files/socialrobot/maakeengezicht_activiteit.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Exercices de la MOOC"
|
||||
file_info: "Aperçu des exercices de programmation dans le MOOC."
|
||||
file_location: "/assets/files/socialrobot/Opgaven_MOOC.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Affiche du projet 'Robot social'"
|
||||
file_info: "L'affiche représente les différents aspects du projet."
|
||||
file_location: "/assets/files/socialrobot/posterSocialeRobot_nl_Qo4ANmV.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Guide 'Bonjour robot!'"
|
||||
file_info: "Avec ce livret, donnez vie à votre propre robot social."
|
||||
file_location: "/assets/files/socialrobot/handleiding_hallo_robot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
chatbot:
|
||||
title: "Technologie du langage à l'école"
|
||||
sub_title: "Se mettre au travail avec un chatbot"
|
||||
description: "Là où le langage et la technologie se rencontrent, naît le domaine du Traitement du Langage Naturel. Un ordinateur peut-il comprendre, traduire ou même écrire des textes ? Peut-il reconnaître les émotions ? Les élèves de la deuxième et de la troisième année (enseignement secondaire) en apprennent davantage dans ce programme."
|
||||
contact: "Questions ? Contactez-nous via team@aiopschool.be. La presse peut contacter Francis Wyffels via Francis@dwengo.org."
|
||||
teaser: "https://www.youtube.com/embed/tqSnpAKLsu8"
|
||||
curricula_files:
|
||||
- file_title: "Fiche de projet Chatbot"
|
||||
file_info: "Il s'agit d'un bref aperçu du projet Chatbot avec la structure et les caractéristiques du projet."
|
||||
file_location: "/assets/files/chatbot/projectfiche_chatbot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "BrAInfood Chatbots"
|
||||
file_info: "Dans ce BrAInfood destiné aux jeunes, le Centre de connaissances Data & Société donne plus d'informations sur les chatbots. Le BrAInfood contient une histoire fictive sur Lotte qui discute avec un chatbot et transmet potentiellement des informations à des entreprises. En outre, quelques points d'attention concernant les chatbots sont expliqués, ainsi que quelques conseils pour les jeunes afin de mieux protéger leurs données personnelles. De cette manière, nous voulons sensibiliser les jeunes au fonctionnement des chatbots et les encourager à réfléchir aux données qui sont collectées à leur sujet."
|
||||
file_location: "/assets/files/chatbot/Brainfood13_Chatbots_FR.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "BrAInfood Nouvelles personnalisées"
|
||||
file_info: "Dans ce BrAInfood du Centre de connaissances Data & Société, des conseils sont donnés sur la façon de garder le contrôle sur votre fil d'actualité."
|
||||
file_location: "/assets/files/chatbot/brainfoodrecommendationnews.jpg"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Manuel 'Chatbot' - Également disponible en version imprimée"
|
||||
file_info: "Les enseignants acquièrent, via ce manuel, des informations de base suffisantes pour aborder (une partie du) projet 'Chatbot' en classe. Le livre aborde différents aspects de la technologie du langage, tels que l'histoire de l'intelligence artificielle, ses aspects éthiques, l'analyse des sentiments et la détection du cyberharcèlement, les chatbots, les assistants numériques parlants et la reconnaissance d'auteur. Il aborde également les compétences finales STEM et les compétences finales en compétences numériques et en éducation aux médias."
|
||||
file_location: "/assets/files/chatbot/Chatbot_handleiding_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Improbotics - Livret - Version enseignant"
|
||||
file_info: "Dans la pièce de théâtre Improbotics, un robot social improvise dans les scènes. Le livret contient des informations sur les technologies utilisées."
|
||||
file_location: "/assets/files/chatbot/Improbotics_lesmap_Enseignant.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Improbotics - Livret - Élèves"
|
||||
file_info: "Dans la pièce de théâtre Improbotics, un robot social improvise dans les scènes. Le livret contient des informations sur les technologies utilisées."
|
||||
file_location: "/assets/files/chatbot/Improbotics_lesmap_Eleve.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
|
||||
care:
|
||||
title: "IA dans les soins de santé"
|
||||
sub_title: "Systèmes d'IA aidant dans les soins de santé"
|
||||
description: "Les hôpitaux utilisent déjà l'intelligence artificielle aujourd'hui. Les élèves de la deuxième et de la troisième année (enseignement secondaire) découvrent quels systèmes existent et comment ils aident les médecins à prendre des décisions. Ainsi, les élèves apprennent les principes de l'arbre de décision, une technique couramment utilisée dans l'apprentissage automatique."
|
||||
contact: ""
|
||||
teaser: "https://www.youtube.com/embed/dO-E33G20co"
|
||||
curricula_files:
|
||||
- file_title: "Fiche de projet IA dans les soins de santé"
|
||||
file_info: "Il s'agit d'un bref aperçu du projet IA dans les soins de santé avec la structure et les caractéristiques du projet."
|
||||
file_location: "/assets/files/care/projectfiche_aiindezorg.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Sprouts"
|
||||
file_info: "Un jeu d'introduction aux 'Graphes'."
|
||||
file_location: "/assets/files/care/Sprouts.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Explication des exercices de graphes du cours des élèves"
|
||||
file_info: "Quels dessins représentent le même graphe ? Une approche plus formelle."
|
||||
file_location: "/assets/files/care/dezelfdegraafFormeel.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Explication des exercices de graphes du cours des élèves"
|
||||
file_info: "Quels dessins représentent le même graphe ? Une approche avec des couleurs."
|
||||
file_location: "/assets/files/care/dezelfdeGraaf.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Le cours des élèves - Finalité Générale"
|
||||
file_info: "Cours des élèves"
|
||||
file_location: "/assets/files/care/AIindeZorg_doorstroom_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Ensemble de cartes - Également disponible en version imprimée"
|
||||
file_info: "À l'aide de cet ensemble de cartes, vous pouvez amener les élèves à réfléchir aux aspects éthiques des nouvelles technologies. Qu'en est-il de la vie privée ? Les contacts sociaux ne sont-ils pas compromis ? Quelles technologies sont bien accueillies ? Qu'est-ce qui n'est pas souhaitable ? Les nouvelles technologies sont-elles abordables pour tous ?"
|
||||
file_location: "/assets/files/care/Kaartset_AIIndeZorg_AIOpSchool_Dwengo.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Manuel de l'ensemble de cartes"
|
||||
file_info: "Ce manuel fournit des explications supplémentaires sur l'ensemble de cartes."
|
||||
file_location: "/assets/files/care/AIIndeZorgKaartenset_UitlegVoorLeerkracht.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Arbre de décision du projet 'mBrAIn' sous forme non compacte"
|
||||
file_info: "Dans le projet de recherche 'mBrain', qui vise le développement d'une application prédisant une crise de migraine, une arborescence de décision a été construite. Cette arborescence de décision aborde un problème de classification binaire : il n'y a que deux classes, 'Migraine' et 'Pas de migraine'. (Sources : Femke Ongenae. (2021), UGent ; Van Hoecke, S., Ongenae, F., Paemeleire, K., & Vandenbussche, N. (2020). App doit prédire les maux de tête. EOS Wetenschap Special, Technologie en gezondheid, 25.) Nous avons transformé la forme de cette arborescence de décision en une arborescence de décision binaire pour montrer que cette forme n'est pas toujours conviviale. Pour plus d'explications, voir le chapitre 4 du cours des élèves de ce projet."
|
||||
file_location: "/assets/files/care/MBrainBeslissingsboom.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Recherche de la parole - Pensée computationnelle (activité débranchée)"
|
||||
file_info: "Le syndrome d'enfermement est l'une des pires conditions médicales. Vous êtes complètement paralysé, sauf peut-être pour cligner des yeux. Votre esprit intelligent est enfermé dans un corps inutile : vous pouvez tout ressentir, mais pas communiquer. Cela peut arriver à n'importe qui, à tout moment, suite à un AVC. Si vous voulez aider les personnes atteintes du syndrome d'enfermement, vaut-il mieux être médecin ou infirmier ? Ou en tant qu'informaticien, pouvez-vous aussi aider ?"
|
||||
file_location: "/assets/files/care/ZoektochtNaarSpraak.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
stem:
|
||||
title: "Python en STEM"
|
||||
sub_title: "Visualisations de données avec Python"
|
||||
description: "Dans ce programme, vous apprendrez à aborder des problèmes complexes de manière plus simple et plus rapide avec le langage de programmation Python. La programmation peut jouer un rôle de liaison entre la science, la technologie, la conception et les mathématiques appliquées. En bref, grâce à Python, nous tirons le meilleur parti de STEM."
|
||||
contact: "Des questions ? Contactez-nous via team@aiopschool.be. La presse peut contacter Francis Wyffels via Francis@dwengo.org."
|
||||
teaser: "https://www.youtube.com/embed/tqSnpAKLsu8"
|
||||
|
||||
agriculture:
|
||||
title: "IA dans l'Agriculture"
|
||||
sub_title: "IA dans l'agriculture"
|
||||
description: "Retirer les tomates pourries pendant la récolte ? L'intelligence artificielle peut aider. Mais comment ? Les élèves de la deuxième et de la troisième année (enseignement secondaire) travaillent avec l'IA. Peut-être qu'un tapis roulant vibrant pourrait améliorer le système encore davantage ?"
|
||||
contact: "Des questions ? Contactez-nous via team@aiopschool.be. La presse peut contacter Francis Wyffels via Francis@dwengo.org."
|
||||
teaser: "https://www.youtube.com/embed/tqSnpAKLsu8"
|
||||
curricula_files:
|
||||
- file_title: "Conception"
|
||||
file_info: "Conception du tapis roulant"
|
||||
file_location: "/assets/files/art/Transportband_InnoVET_RCH.zip"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
|
||||
art:
|
||||
title: "IA dans l'Art"
|
||||
sub_title: "Robots de dessin en classe"
|
||||
description: "Peut-on créer de l'art avec l'intelligence artificielle ? Les élèves de la deuxième et de la troisième année (enseignement secondaire) expriment leur créativité avec l'IA et réfléchissent au résultat. Est-ce de l'art ? Ils découvrent également comment l'IA peut protéger notre patrimoine culturel."
|
||||
contact: ""
|
||||
teaser: "https://www.youtube.com/embed/dO-E33G20co"
|
||||
|
||||
wegostem:
|
||||
title: "WeGoSTEM"
|
||||
sub_title: "Robots de dessin en classe"
|
||||
description: "Nous mettons au défi les enfants de la troisième année (enseignement primaire) de programmer un robot artistique capable de dessiner. Les enfants apprennent de manière ludique de nombreuses compétences STEM, de la technologie à la pensée informatique."
|
||||
contact: "Des questions ? Contactez-nous via team@aiopschool.be. La presse peut contacter Francis Wyffels via Francis@dwengo.org."
|
||||
teaser: "https://www.youtube.com/embed/tqSnpAKLsu8"
|
||||
|
||||
computational_thinking:
|
||||
title: "Pensée informatique"
|
||||
sub_title: "Pensée informatique en classe"
|
||||
description: "Comment pouvons-nous résoudre des problèmes complexes à l'aide d'un ordinateur ? Grâce à la pensée informatique ! Vous pouvez apprendre cela grâce à diverses activités avec ou sans ordinateur. Nous vous aidons déjà à démarrer."
|
||||
contact: "Des questions ? Contactez-nous via team@aiopschool.be. La presse peut contacter Francis Wyffels via Francis@dwengo.org."
|
||||
teaser: "https://www.youtube.com/embed/tqSnpAKLsu8"
|
||||
curricula_files:
|
||||
- file_title: "Concepts et approches de la pensée informatique"
|
||||
file_info: "poster"
|
||||
file_location: "/assets/files/computational_thinking/CDposterDwengo2.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Explication des quatre concepts de la pensée informatique"
|
||||
file_info: "Présentation des quatre concepts de la pensée informatique : décomposition, reconnaissance de motifs, abstraction et algorithme. Vous pouvez télécharger le PDF > ouvrir > présenter avec CTRL-L et naviguer avec les touches fléchées."
|
||||
file_location: "/assets/files/computational_thinking/CD4concepten_33V3gBg.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Concepts et principes"
|
||||
file_info: "Aperçu"
|
||||
file_location: "/assets/files/computational_thinking/Icoontjes.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Activité sans ordinateur - Machine émotionnelle (tâche)"
|
||||
file_info: "Comment stimuler les émotions chez un robot ?"
|
||||
file_location: "/assets/files/computational_thinking/emotiemachine_gids.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Activité sans ordinateur - Machine émotionnelle"
|
||||
file_info: "Comment stimuler les émotions chez un robot ?"
|
||||
file_location: "/assets/files/computational_thinking/emotiemachine_gewoon_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Activité sans ordinateur - Coloriage par numéro"
|
||||
file_info: "Les images peuvent être représentées de nombreuses manières. Dans ce casse-tête de coloriage par numéro, vous devez reconstruire une image en utilisant la liste donnée de numéros ; cette liste vous dit dans quelle couleur remplir chaque carré ('pixel')."
|
||||
file_location: "/assets/files/computational_thinking/kleurenopnummer1.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Activité sans ordinateur - Un réseau informatique humain"
|
||||
file_info: "Dans cette activité, les élèves découvrent comment fonctionne le transfert de données sur Internet. Les ordinateurs, les smartphones et d'autres appareils connectés par Internet peuvent communiquer entre eux. Pour se comprendre, cette communication doit suivre certaines règles. Nous appelons ces règles un protocole."
|
||||
file_location: "/assets/files/computational_thinking/menselijkComputernetwerk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Activité sans ordinateur - Compression"
|
||||
file_info: "Pour envoyer des images sur des réseaux, nous voulons représenter l'information avec le moins de données possible. C'est là qu'intervient la compression. À l'aide d'algorithmes, les images sont représentées avec le moins de nombres possible, mais de manière à ce que vous puissiez récupérer la figure originale. D'autres algorithmes restaurent l'image d'origine une fois que l'information a atteint sa destination."
|
||||
file_location: "/assets/files/computational_thinking/puzzel-gecomprimeerdepixel11.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Activité sans ordinateur - Programmez un être humain"
|
||||
file_info: "Les ordinateurs ne peuvent pas interpréter et exécutent donc littéralement chaque instruction que vous leur donnez. Le défi du programmeur consiste à résoudre des problèmes en les divisant en petites étapes exécutables par l'ordinateur, et à donner les instructions à l'ordinateur de la bonne manière."
|
||||
file_location: "/assets/files/computational_thinking/programmeerEensEenMens.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
- file_title: "Activité sans ordinateur - Recherche de la parole"
|
||||
file_info: "Le locked-in syndrome est l'une des pires affections médicales. Vous êtes complètement paralysé, sauf peut-être que vous pouvez cligner des yeux. Votre esprit intelligent est emprisonné dans un corps inutile : vous pouvez tout ressentir, mais pas communiquer. Cela peut arriver à n'importe qui, sans avertissement, à la suite d'une attaque. Si vous voulez aider les personnes atteintes du locked-in syndrome, vaut-il mieux être médecin ou infirmier ? Ou un informaticien peut-il aussi aider ?"
|
||||
file_location: "/assets/files/computational_thinking/ZoektochtNaarSpraak.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Télécharger"
|
||||
|
||||
math_with_python:
|
||||
title: "Python dans le cours de mathématiques"
|
||||
sub_title: "Python en mathématiques"
|
||||
description: "Le langage de programmation Python offre des possibilités intéressantes pour enrichir le cours de mathématiques. De la théorie de Pythagore à la création de graphiques personnalisés, en passant par le traitement d'images numériques et la régression linéaire, tout devient plus clair avec Python."
|
||||
contact: ""
|
||||
teaser: "https://www.youtube.com/embed/dO-E33G20co"
|
||||
|
||||
python_programming:
|
||||
title: "Programmation avec Python"
|
||||
sub_title: "Programmation de base en Python"
|
||||
description: "Apprendre les principes de base de la programmation ? C'est possible avec ce programme. Nous utilisons Python et apprenons tout sur les séquences, les structures de répétition et les structures de choix. C'est exactement ce qui est stipulé dans les objectifs finaux. Et plus encore !"
|
||||
contact: "Des questions ? Contactez-nous via team@aiopschool.be. La presse peut contacter Francis Wyffels via Francis@dwengo.org."
|
||||
teaser: "https://www.youtube.com/embed/tqSnpAKLsu8"
|
||||
|
||||
physical_computing:
|
||||
title: "Informatique physique"
|
||||
sub_title: "Programmer des robots en classe"
|
||||
description: "Construire un instrument de musique, une voiture ou une station météorologique ? C'est possible avec Dwenguino, une plateforme de microcontrôleurs avec son propre environnement de programmation. Les élèves du primaire et du secondaire peuvent commencer à l'utiliser immédiatement. En vrai ou dans notre simulateur, en mode blocs ou textuel."
|
||||
contact: "Des questions ? Contactez-nous via team@aiopschool.be. La presse peut contacter Francis Wyffels via Francis@dwengo.org."
|
||||
teaser: "https://www.youtube.com/embed/tqSnpAKLsu8"
|
||||
curricula_files:
|
||||
- file_title: "Bouw jouw eigen robot"
|
||||
file_info: "Construisez votre propre robot de conduite."
|
||||
file_location: "/assets/files/physical_computing/bouwjouweigenrobot.pdf"
|
||||
file_icon_name: "link"
|
||||
link_name: "Download"
|
364
backend/_i18n/nl.yml
Normal file
364
backend/_i18n/nl.yml
Normal file
|
@ -0,0 +1,364 @@
|
|||
# translate theme pages
|
||||
|
||||
curricula_page:
|
||||
title: Onze lesthema's
|
||||
read_more: Lees meer
|
||||
curricula_files: Bestanden
|
||||
|
||||
algorithms:
|
||||
title: Algoritmes
|
||||
sub_title: Algoritmes
|
||||
description: "Leerlingen uit de tweede en de derde graad (SO) leren hoe ze algoritmes kunnen gebruiken om problemen op te lossen. Ze leren hoe ze algoritmes kunnen ontwerpen en hoe ze de efficiëntie van algoritmes kunnen analyseren. Ze leren ook hoe ze algoritmes kunnen gebruiken om problemen op te lossen."
|
||||
contact: ""
|
||||
|
||||
basics_ai:
|
||||
title: Basisprincipes van AI
|
||||
sub_title: Basisprincipes van AI
|
||||
description: "Onder dit lesthema bundelen we verschillende activiteiten waarin de basisprincipes van artificiële intelligentie (AI) aan bod komen. Leerlingen leren wat AI is, hoe het werkt en hoe het kan worden toegepast in verschillende domeinen."
|
||||
contact: ""
|
||||
|
||||
kiks:
|
||||
title: AI en Klimaat
|
||||
sub_title: KIKS
|
||||
description: "Leerlingen uit de derde graad (SO) onderzoeken hoe planten zich via hun huidmondjes aanpassen aan de klimaatverandering. Daarvoor tellen ze deze huidmondjes met artificiële intelligentie en beeldherkenning."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
curricula_files:
|
||||
- file_title: "Projectfiche KIKS"
|
||||
file_info: "Dit is een kort overzicht van het KIKS-project met projectstructuur- en kenmerken."
|
||||
file_location: "/assets/files/kiks/projectfiche_kiks.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "De handleiding - ook verkrijgbaar in gedrukte versie"
|
||||
file_info: "We willen de leerkrachten achtergrondkennis geven over de inhoud van dit project: de klimaatverandering, de biologie van de huidmondjes en de manier waarop planten zich via de huidmondjes aan die klimaatverandering aanpassen, het wetenschappelijk onderzoek van de UGent en de Plantentuin Meise dat aan de grondslag ligt van dit project, burgerwetenschap, wat is artificiële intelligentie (AI), de geschiedenis van AI, het gebruik ervan en de ethiek errond, de principes van digitale beelden, de wiskunde achter de algoritmen en de fundamenten van de momenteel meest gebruikte AI-technieken. We geven ook aan hoe wij met KIKS aan de slag gegaan zijn in de klas."
|
||||
file_location: "/assets/files/kiks/KIKS_handleiding_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Een leerlingencursus"
|
||||
file_info: "Met de leerlingencursus geven we een voorbeeld van een mogelijk, uitgebreid traject dat een leerkracht met leerlingen kan doorlopen. Het traject omvat de klimaatverandering, de biologie van de huidmondjes met een microscopie-opdracht, de manier waarop planten zich via de huidmondjes aan die klimaatverandering aanpassen, het wetenschappelijk onderzoek van de UGent en de Plantentuin Meise, het verzamelen van de data om een neuraal netwerk te trainen, wat is artificiële intelligentie (AI), de geschiedenis van AI, het gebruik ervan en de ethiek errond, de principes van digitale beelden, het werken met convoluties, de wiskunde achter het Perceptron-algoritme, het lineaire en niet-lineaire classificeren van data, en de fundamenten van machinaal leren."
|
||||
file_location: "/assets/files/kiks/KIKS_leerlingencursus_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "De leerplandoelen"
|
||||
file_info: "Binnen het KIKS-project kunnen behoorlijk veel leerdoelen aan bod komen. De leerkracht bepaalt zelf welke leerdoelen in verband gebracht worden met het project. Bovendien biedt het project heel wat mogelijkheden om de leerlingen actief en zelfstandig te laten leren en om ICT-vaardigheden bij te brengen. KIKS kan ook gebruikt worden om een onderzoeksopdracht uit te werken.\n In de minimumdoelen en leerplannen van de verschillende koepels zijn heel wat leerdoelen te vinden die KIKS linken met biologie, aardrijkskunde en wiskunde."
|
||||
file_location: "/assets/files/kiks/Leerdoelen-KIKS.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Het maken van een nagellakafdruk van een deel van een blad"
|
||||
file_info: "Om het aantal huidmondjes op een deel van een blad van een plant te kennen, bekijken we het bladoppervlak onder de microscoop. We kunnen daarvoor een stuk van de flinterdunne cuticula van het blad verwijderen, maar bij sommige planten lukt dat niet zo goed, bijvoorbeeld door de stugheid van het blad.\nDit kan echter opgevangen worden door dezelfde methode te gebruiken als de onderzoekers van de Plantentuin Meise, nl. een afdruk nemen van een deel van het bladoppervlak met doorzichtige nagellak.\nHet miscroscopische beeld kan met een smartphone gefotografeerd worden."
|
||||
file_location: "https://www.youtube.com/watch?v=JptF3jhOV5k"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Kijk"
|
||||
|
||||
socialrobot:
|
||||
title: Sociale robot
|
||||
sub_title: Robotica in de klas
|
||||
description: "Terwijl leerlingen uit de eerste graad (SO) een sociale robot knutselen en programmeren, leren ze complexe problemen oplossen via computationeel denken. Spelenderwijs werken ze aan de nieuwe eindtermen rond digitale competenties."
|
||||
contact: Vragen? Contacteer ons via team@aiopschool.be. De pers kan contact opnemen met Francis wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Projectfiche Sociale Robot"
|
||||
file_info: "Dit is een kort overzicht van het 'Sociale Robot'-project met projectstructuur en -kenmerken."
|
||||
file_location: "/assets/files/socialrobot/projectfiche_socialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Collage sociale robots"
|
||||
file_info: "De robots op deze foto zijn realisaties van leerlingen van de eerste graad van het secundair onderwijs of zijn prototypes."
|
||||
file_location: "/assets/files/socialrobot/collage.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Constructiekit voor 'Sociale Robot'-project"
|
||||
file_info: "Wil jij dat jouw leerlingen ook een sociale robot ontwerpen en bouwen? Dat kan via de constructiekit van Dwengo vzw. Op de figuur ontdek je de huidige samenstelling van de constructiekit. Geïnteresseerd? Contacteer ons via e-mail, bekijk de kit in de shop, of vind meer informatie op deze projectpagina."
|
||||
file_location: "/assets/files/socialrobot/constructiekit_socialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Van project naar minimumdoelen eerste graad A-stroom"
|
||||
file_info: "De minimumdoelen waaraan gewerkt kan worden, worden gelinkt aan de verschillende fasen van het 'Sociale Robot'-project."
|
||||
file_location: "/assets/files/socialrobot/MinimumdoelenA-stroomSocialeRobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Van project naar minimumdoelen eerste graad B-stroom"
|
||||
file_info: "De minimumdoelen waaraan gewerkt kan worden, worden gelinkt aan de verschillende fasen van het 'Sociale Robot'-project."
|
||||
file_location: "/assets/files/socialrobot/minimumdoelenBstroomsocialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Van project naar minimumdoelen tweede graad"
|
||||
file_info: "De minimumdoelen waaraan gewerkt kan worden, worden gelinkt aan de verschillende fasen van het 'Sociale Robot'-project."
|
||||
file_location: "/assets/files/socialrobot/minimumdoelentweedegraadsocialerobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotiemachine (onvolledig) - Computationeel denken (unplugged activiteit)"
|
||||
file_info: "Unplugged activiteit"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_gewoon_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotiemachine (opdracht) - Computationeel denken (unplugged activiteit)"
|
||||
file_info: "Unplugged activiteit"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_gids.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotiemachine (volledig) - Computationeel denken (unplugged activiteit)"
|
||||
file_info: "Unplugged activiteit"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_ingevuld_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Emotiemachine met ledmatrix - Computationeel denken (unplugged activiteit)"
|
||||
file_info: "Unplugged activiteit"
|
||||
file_location: "/assets/files/socialrobot/emotiemachine_matrices_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Ficheboekje voor leerkrachten"
|
||||
file_info: "De gebundelde fiches waarin het gebruik van de Dwenguino en van de sensoren en actuatoren uit de doeken wordt gedaan."
|
||||
file_location: "/assets/files/socialrobot/ficheboekje_lkr.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Fiches voor de leerlingen"
|
||||
file_info: "In deze fiches wordt het gebruik van de Dwenguino en van de sensoren en actuatoren uit de doeken gedaan."
|
||||
file_location: "/assets/files/socialrobot/fiches_lln.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Maak een gezicht - Computationeel denken (unplugged activiteit)"
|
||||
file_info: "Unplugged activiteit"
|
||||
file_location: "/assets/files/socialrobot/maakeengezicht_activiteit.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Opgaven van opdrachten in de MOOC"
|
||||
file_info: "Een overzicht van de programmeeroefeningen in de MOOC"
|
||||
file_location: "/assets/files/socialrobot/Opgaven_MOOC.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Poster 'Sociale Robot'-project"
|
||||
file_info: "De poster geeft de verschillende aspecten van het project weer."
|
||||
file_location: "/assets/files/socialrobot/posterSocialeRobot_nl_Qo4ANmV.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Handleiding 'Hallo robot!'"
|
||||
file_info: "Met dit lesboekje breng je je eigen sociale robot tot leven."
|
||||
file_location: "/assets/files/socialrobot/handleiding_hallo_robot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
|
||||
agriculture:
|
||||
title: AI in de Landbouw
|
||||
sub_title: AI in de landbouw
|
||||
description: "Rotte tomaten weghalen tijdens de oogst? Daar kan artificiële intelligentie bij helpen. Maar hoe? Leerlingen uit de tweede en derde graad (SO) gaan met AI aan de slag. Misschien kan een trillende lopende band het systeem nog beter maken?"
|
||||
contact: Vragen? Contacteer ons via team@aiopschool.be. De pers kan contact opnemen met Francis wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Ontwerp"
|
||||
file_info: "Ontwerp van de lopende band"
|
||||
file_location: "/assets/files/art/Transportband_InnoVET_RCH.zip"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "De lopende band"
|
||||
file_info: "Video van de detectie van tomaten"
|
||||
file_location: "https://www.youtube.com/watch?v=6TSqY4ECMU04"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Kijk"
|
||||
|
||||
art:
|
||||
title: AI in de Kunst
|
||||
sub_title: Tekenrobots in de klas
|
||||
description: "Kunnen we kunst maken met artificiële intelligentie? Leerlingen uit de tweede en derde graad (SO) leven zich creatief uit met AI en reflecteren over het resultaat. Is dit kunst? Ook ontdekken ze hoe AI ons cultureel erfgoed kan beschermen."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
|
||||
wegostem:
|
||||
title: WeGoSTEM
|
||||
sub_title: Tekenrobots in de klas
|
||||
description: "We dagen kinderen van de derde graad (BO) uit om een kunstrobot die kan tekenen te programmeren. Spelenderwijs leren de kinderen heel wat STEM-vaardigheden, van techniek tot computationeel denken."
|
||||
contact: Vragen? Contacteer ons via team@aiopschool.be. De pers kan contact opnemen met Francis wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
|
||||
computational_thinking:
|
||||
title: Computationeel denken
|
||||
sub_title: Computationeel denken in de klas
|
||||
description: "Hoe kunnen we complexe problemen oplossen met behulp van een computer? Dankzij computationeel denken! Dat kan je leren via allerlei activiteiten met óf zonder computer. Wij helpen je alvast op weg."
|
||||
contact: Vragen? Contacteer ons via team@aiopschool.be. De pers kan contact opnemen met Francis wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Computationeel denken en programmeren in een STEM context"
|
||||
file_info: "Informatievideo over het project"
|
||||
file_location: "https://www.youtube.com/watch?v=Nifa0vooyKg"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Kijk"
|
||||
- file_title: "Concepten en aanpak computationeel denken"
|
||||
file_info: "Poster"
|
||||
file_location: "/assets/files/computational_thinking/CDposterDwengo2.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Vier concepten van Computationeel denken uitgelegd"
|
||||
file_info: "Presentatie over vier concepten van computationeel denken: decompositie, patroonherkenning, abstractie en algoritme. Je kan de pdf downloaden > openen > presenteren via CTRL-L en navigeren met de pijltjestoetsen."
|
||||
file_location: "/assets/files/computational_thinking/CD4concepten_33V3gBg.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Concepten en principes"
|
||||
file_info: "Overzicht"
|
||||
file_location: "/assets/files/computational_thinking/Icoontjes.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged activiteit - Emotiemachine (opdracht)"
|
||||
file_info: "Hoe kan je emoties stimuleren bij een robot?"
|
||||
file_location: "/assets/files/computational_thinking/emotiemachine_gids.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged activiteit - Emotiemachine"
|
||||
file_info: "Hoe kan je emoties stimuleren bij een robot?"
|
||||
file_location: "/assets/files/computational_thinking/emotiemachine_gewoon_nl.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged activiteit - Kleuren op nummer"
|
||||
file_info: "Afbeeldingen kunnen op veel manieren worden gerepresenteerd. In deze kleuren op nummer puzzel moet je een afbeelding reconstrueren, gebruikmakend van de gegeven lijst van nummers; deze lijst vertelt je in welke kleur je elk vierkant (‘pixel’) inkleurt."
|
||||
file_location: "/assets/files/computational_thinking/kleurenopnummer1.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged activiteit - Een menselijk computernetwerk"
|
||||
file_info: "In deze activiteit maken de leerlingen kennis met hoe overdracht van gegevens over het internet werkt. Computers, smartphones en andere toestellen die met elkaar verbonden zijn via het internet, kunnen met elkaar communiceren. Om elkaar te kunnen begrijpen, dient die communicatie volgens bepaalde afspraken te verlopen. We noemen deze afspraken een protocol."
|
||||
file_location: "/assets/files/computational_thinking/menselijkComputernetwerk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged activiteit - Comprimeren"
|
||||
file_info: "Om afbeeldingen te verzenden over netwerken, willen we de informatie met zo weinig mogelijk data representeren. Daar komt compressie aan te pas. Met behulp van algoritmes worden afbeeldingen met zo weinig mogelijk getallen gerepresenteerd, maar wel op zo’n manier dat je de oorspronkelijke figuur nog kunt terugkrijgen. Andere algoritmes herstellen de oorspronkelijke afbeelding als de informatie de bestemming bereikt heeft."
|
||||
file_location: "/assets/files/computational_thinking/puzzel-gecomprimeerdepixel11.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged activiteit - Programmeer eens een mens"
|
||||
file_info: "Computers kunnen niet interpreteren en voeren dus letterlijk iedere instructie uit die je ze geeft. De uitdaging van de programmeur bestaat erin problemen op te lossen door ze op te delen in kleine stappen die uitvoerbaar zijn door de computer, en de instructies op de juiste manier aan de computer te geven."
|
||||
file_location: "/assets/files/computational_thinking/programmeerEensEenMens.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Unplugged activiteit - Zoektocht naar spraak"
|
||||
file_info: "Het locked-in syndroom is een van de ergste medische aandoeningen. Je bent volledig verlamd, behalve dat je misschien nog kunt knipperen met een oog. Je intelligente geest zit opgesloten in een nutteloos lichaam: je kan alles voelen, maar niet communiceren. Het kan iedereen overkomen, uit het niets, als gevolg van een beroerte. Als je mensen met het locked-in syndroom zou willen helpen, word je dan best arts of verpleegkundige? Of kan je als computerwetenschapper ook helpen?"
|
||||
file_location: "/assets/files/computational_thinking/ZoektochtNaarSpraak.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
|
||||
math_with_python:
|
||||
title: Python in de Wiskundeles
|
||||
sub_title: Python in wiskunde
|
||||
description: "De programmeertaal Python biedt toffe mogelijkheden om de wiskundeles te verrijken. Van de stelling van Pythagoras tot de opmaak van eigen grafieken, digitale beeldverwerking en lineaire regressie, alles wordt duidelijker met Python."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
|
||||
python_programming:
|
||||
title: Programmeren met Python
|
||||
sub_title: Basis programmeren in Python
|
||||
description: "De basisprincipes van programmeren aanleren? Dat kan perfect via dit pakket. We gaan aan de slag met Python en leren alles over sequenties, herhalingsstructuur en keuzestructuur. Dat is precies wat er in de eindtermen staat. En meer!"
|
||||
contact: Vragen? Contacteer ons via team@aiopschool.be. De pers kan contact opnemen met Francis wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
|
||||
stem:
|
||||
title: Python in STEM
|
||||
sub_title: Datavisualisaties met Python
|
||||
description: "In dit pakket leer je complexe problemen eenvoudiger én sneller aanpakken met de programmeertaal Python. Programmeren kan immers een verbindende rol spelen tussen wetenschap, techniek, ontwerp en toegepaste wiskunde. Kortom, dankzij Python halen we het beste uit STEM."
|
||||
contact: Vragen? Contacteer ons via team@aiopschool.be. De pers kan contact opnemen met Francis wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
|
||||
care:
|
||||
title: AI in de Zorg
|
||||
sub_title: AI systemen die helpen in de zorg
|
||||
description: "Ziekenhuizen maken vandaag al gebruik van artificiële intelligentie. Leerlingen uit de tweede en derde graad (SO) ontdekken welke systemen er bestaan en hoe ze dokters helpen om beslissingen te nemen. Zo leren leerlingen de principes van de beslissingsboom, een veelgebruikte techniek in machine learning."
|
||||
contact: ""
|
||||
teaser: https://www.youtube.com/embed/dO-E33G20co
|
||||
curricula_files:
|
||||
- file_title: "Projectfiche AI in de Zorg"
|
||||
file_info: "Dit is een kort overzicht van project AI in de Zorg met projectstructuur- en kenmerken."
|
||||
file_location: "/assets/files/care/projectfiche_aiindezorg.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Sprouts"
|
||||
file_info: "Een spel ter inleiding op 'Grafen'."
|
||||
file_location: "/assets/files/care/Sprouts.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Download"
|
||||
- file_title: "Uitleg bij oefeningen grafen uit de leerlingencursus"
|
||||
file_info: "Welke figuren stellen er dezelfde graaf voor? Een meer formele werkwijze."
|
||||
file_location: "/assets/files/care/dezelfdegraafFormeel.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Download"
|
||||
- file_title: "Uitleg bij oefeningen grafen uit de leerlingencursus"
|
||||
file_info: "Welke figuren stellen er dezelfde graaf voor? Een werkwijze met kleuren."
|
||||
file_location: "/assets/files/care/dezelfdeGraaf.mov"
|
||||
file_icon_name: "play_arrow"
|
||||
link_name: "Download"
|
||||
- file_title: "De leerlingencursus - Finaliteit Doorstroom"
|
||||
file_info: "Leerlingencursus"
|
||||
file_location: "/assets/files/care/AIindeZorg_doorstroom_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Kaartenset (unplugged activiteit) - Ook verkrijgbaar in gedrukte versie"
|
||||
file_info: "Aan de hand van deze kaartenset kan je de leerlingen laten stilstaan bij de ethische aspecten van nieuwe technologieën. Hoe zit het met privacy? Komen de sociale contacten niet in het gedrang? Welke technologieën worden met open armen ontvangen? Wat is niet wenselijk? Zijn de nieuwe technologieën voor iedereen betaalbaar?"
|
||||
file_location: "/assets/files/care/Kaartset_AIIndeZorg_AIOpSchool_Dwengo.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Handleiding kaartenset"
|
||||
file_info: "Deze handleiding voorziet extra uitleg bij de kaartenset."
|
||||
file_location: "/assets/files/care/AIIndeZorgKaartenset_UitlegVoorLeerkracht.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Beslissingsboom 'mBrAIn'-project in niet-compacte vorm"
|
||||
file_info: "In het onderzoeksproject 'mBrain', dat de ontwikkeling van een app die een migraineaanval voorspelt, als doel heeft, werd een beslissingsboom geconstrueerd. Met deze beslissingsboom wordt een probleem van binaire classificatie aangepakt: er zijn slechts twee klassen: ‘Migraine’ en ‘Geen migraine’. (Bronnen: Femke Ongenae. (2021), UGent; Van Hoecke, S., Ongenae, F., Paemeleire, K., & Vandenbussche, N. (2020). App moet hoofdpijn voorspellen. EOS Wetenschap Special, Technologie en gezondheid, 25.) Wij hebben de vorm van deze beslissingsboom omgevormd tot een binaire beslissingsboom om aan te tonen dat deze vorm niet altijd gebruiksvriendelijk is. Voor meer uitleg zie hoofdstuk 4 van de leerlingencursus van dit project."
|
||||
file_location: "/assets/files/care/MBrainBeslissingsboom.png"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Zoektocht naar spraak - Computationeel denken (unplugged activiteit)"
|
||||
file_info: "Het locked-in syndroom is een van de ergste medische aandoeningen. Je bent volledig verlamd, behalve dat je misschien nog kunt knipperen met een oog. Je intelligente geest zit opgesloten in een nutteloos lichaam: je kan alles voelen, maar niet communiceren. Het kan iedereen overkomen, uit het niets, als gevolg van een beroerte. Als je mensen met het locked-in syndroom zou willen helpen, word je dan best arts of verpleegkundige? Of kan je als computerwetenschapper ook helpen?"
|
||||
file_location: "/assets/files/care/ZoektochtNaarSpraak.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Sociale robots en stellingenspel (unplugged activiteit)"
|
||||
file_info: "In deze presentatie maken leerlingen eerst kennis met sociale robots. Nadien worden de leerlingen aan de hand van enkele stellingen uitgedaagd om stil te staan bij de ethische aspecten van nieuwe technologieën. Hoe zit het met privacy? Komen de sociale contacten niet in het gedrang? Welke technologieën worden met open armen ontvangen? Wat is niet wenselijk? Zijn de nieuwe technologieën voor iedereen betaalbaar?"
|
||||
file_location: "/assets/files/care/StellingenspelByDwengo.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
|
||||
chatbot:
|
||||
title: Taaltechnologie
|
||||
sub_title: Aan de slag met een chatbot
|
||||
description: "Waar taal en technologie samenkomen, ontstaat het domein van Natural Language Processing. Kan een computer teksten begrijpen, vertalen of zelfs schrijven? Kan een computer emoties herkennen? Leerlingen uit de tweede en derde graad (SO) leren er alles over in dit pakket."
|
||||
contact: Vragen? Contacteer ons via team@aiopschool.be. De pers kan contact opnemen met Francis wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Projectfiche Chatbot"
|
||||
file_info: "Dit is een kort overzicht van Chatbot-project met projectstructuur- en kenmerken."
|
||||
file_location: "/assets/files/chatbot/projectfiche_chatbot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "BrAInfood Chatbots"
|
||||
file_info: "In deze brAInfood - gericht naar jongeren - geeft het Kenniscentrum Data & Maatschappij meer informatie over chatbots. De brAInfood bevat een fictief verhaal over Lotte die praat met een chatbot, en vermoedelijk informatie over haar doorgeeft aan bedrijven. Verder worden enkele aandachtspunten met betrekking tot chatbots toegelicht, alsook enkele tips voor jongeren om hun (persoons)gegevens beter te beschermen. Op die manier willen we jongeren bewuster maken van de werking van chatbots en hen stimuleren te reflecteren over de gegevens die van hen worden verzameld."
|
||||
file_location: "/assets/files/chatbot/Brainfood13_Chatbots_NL.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "BrAInfood Gepersonaliseerde nieuwsberichten"
|
||||
file_info: "In deze brAInfood van het Kenniscentrum Data & Maatschappij worden tips gegeven over hoe je de controle houdt over je newsfeed."
|
||||
file_location: "/assets/files/chatbot/brainfoodaanbevelingnieuws.jpg"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Handleiding 'Chatbot' - Ook verkrijgbaar in gedrukte versie"
|
||||
file_info: "Leerkrachten verwerven via deze handleiding voldoende achtergrondinformatie om met (een deel van) het 'Chatbot'-project aan de slag te gaan in de klas. Het boek behandelt verschillende aspecten van taaltechnologie, zoals de geschiedenis van de artificiële intelligentie, de ethische aspecten ervan, sentimentanalyse en cyberpestdetectie, chatbots, sprekende digitale assistenten, en auteursherkenning. Er wordt ook ingegaan op de STEM-eindtermen en de eindtermen rond digitale competentie en mediawijsheid."
|
||||
file_location: "/assets/files/chatbot/Chatbot_handleiding_eerstedruk.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Improbotics - Lesmap - Leerkrachtenversie"
|
||||
file_info: "In de theatervoorstelling Improbotics improviseert een sociale robot mee in de scènes. In de lesmap vind je informatie over de gebruikte technologieën."
|
||||
file_location: "/assets/files/chatbot/Improbotics_lesmap_Leerkracht.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
- file_title: "Improbotics - Lesmap - Leerlingen"
|
||||
file_info: "In de theatervoorstelling Improbotics improviseert een sociale robot mee in de scènes. In de lesmap vind je informatie over de gebruikte technologieën."
|
||||
file_location: "/assets/files/chatbot/Improbotics_lesmap_Leerling.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
||||
|
||||
physical_computing:
|
||||
title: Physical computing
|
||||
sub_title: Programmeer robots in de klas
|
||||
description: "Een muziekinstrument, auto of weerstation bouwen? Dat kan met Dwenguino, een microcontrollerplatform met een eigen programmeeromgeving. Leerlingen uit zowel basis- als secundair onderwijs kunnen er meteen mee aan de slag. In het echt of in onze simulator, blokgebaseerd of tekstueel. "
|
||||
contact: Vragen? Contacteer ons via team@aiopschool.be. De pers kan contact opnemen met Francis wyffels via Francis@dwengo.org.
|
||||
teaser: https://www.youtube.com/embed/tqSnpAKLsu8
|
||||
curricula_files:
|
||||
- file_title: "Bouw jouw eigen robot"
|
||||
file_info: "Bouw je eigen rijdende robot."
|
||||
file_location: "/assets/files/physical_computing/bouwjouweigenrobot.pdf"
|
||||
file_icon_name: "description"
|
||||
link_name: "Download"
|
|
@ -1,2 +0,0 @@
|
|||
-- Create the database
|
||||
CREATE DATABASE dwengo;
|
4447
backend/package-lock.json
generated
4447
backend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -11,15 +11,21 @@
|
|||
"format": "prettier --write src/",
|
||||
"format-check": "prettier --check src/",
|
||||
"lint": "eslint . --fix",
|
||||
"test:unit": "vitest --run"
|
||||
"test:unit": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mikro-orm/core": "^6.4.6",
|
||||
"@mikro-orm/postgresql": "^6.4.6",
|
||||
"@mikro-orm/reflection": "^6.4.6",
|
||||
"@mikro-orm/sqlite": "6.4.6",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"axios": "^1.8.1",
|
||||
"dotenv": "^16.4.7",
|
||||
"express": "^5.0.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"loki-logger-ts": "^1.0.2",
|
||||
"response-time": "^2.3.3",
|
||||
"uuid": "^11.1.0",
|
||||
"winston": "^3.17.0",
|
||||
"winston-loki": "^6.1.3"
|
||||
},
|
||||
|
|
|
@ -1,14 +1,28 @@
|
|||
import express, { Express, Response } from 'express';
|
||||
import initORM from './orm.js';
|
||||
import { initORM } from './orm.js';
|
||||
|
||||
import themeRoutes from './routes/themes.js';
|
||||
import learningPathRoutes from './routes/learningPaths.js';
|
||||
import learningObjectRoutes from './routes/learningObjects.js';
|
||||
|
||||
import studentRouter from './routes/student.js';
|
||||
import groupRouter from './routes/group.js';
|
||||
import assignmentRouter from './routes/assignment.js';
|
||||
import submissionRouter from './routes/submission.js';
|
||||
import classRouter from './routes/class.js';
|
||||
import questionRouter from './routes/question.js';
|
||||
import loginRouter from './routes/login.js';
|
||||
import { getLogger } from './logging/initalize.js';
|
||||
import { responseTimeLogger } from './logging/responseTimeLogger.js';
|
||||
import responseTime from 'response-time';
|
||||
import { Logger } from 'winston';
|
||||
import { EnvVars, getNumericEnvVar } from './util/envvars.js';
|
||||
|
||||
const logger: Logger = getLogger();
|
||||
|
||||
const app: Express = express();
|
||||
const port: string | number = process.env.PORT || 3000;
|
||||
const port: string | number = getNumericEnvVar(EnvVars.Port);
|
||||
|
||||
|
||||
app.use(express.json());
|
||||
app.use(responseTime(responseTimeLogger));
|
||||
|
@ -17,10 +31,22 @@ app.use(responseTime(responseTimeLogger));
|
|||
app.get('/', (_, res: Response) => {
|
||||
logger.debug('GET /');
|
||||
res.json({
|
||||
message: 'Hello Dwengo!',
|
||||
message: 'Hello Dwengo!🚀',
|
||||
});
|
||||
});
|
||||
|
||||
app.use('/student', studentRouter);
|
||||
app.use('/group', groupRouter);
|
||||
app.use('/assignment', assignmentRouter);
|
||||
app.use('/submission', submissionRouter);
|
||||
app.use('/class', classRouter);
|
||||
app.use('/question', questionRouter);
|
||||
app.use('/login', loginRouter);
|
||||
|
||||
app.use('/theme', themeRoutes);
|
||||
app.use('/learningPath', learningPathRoutes);
|
||||
app.use('/learningObject', learningObjectRoutes);
|
||||
|
||||
async function startServer() {
|
||||
await initORM();
|
||||
|
||||
|
@ -29,4 +55,4 @@ async function startServer() {
|
|||
});
|
||||
}
|
||||
|
||||
startServer();
|
||||
await startServer();
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
export const FALLBACK_LANG: string = 'nl';
|
||||
|
||||
// API
|
||||
|
||||
export const DWENGO_API_BASE: string = 'https://dwengo.org/backend/api';
|
||||
|
||||
// Logging
|
||||
|
||||
export const LOG_LEVEL: string =
|
||||
'development' === process.env.NODE_ENV ? 'debug' : 'info';
|
||||
'development' === process.env.NODE_ENV ? 'debug' : 'info';
|
||||
export const LOKI_HOST: string =
|
||||
process.env.LOKI_HOST || 'http://localhost:3102';
|
||||
process.env.LOKI_HOST || 'http://localhost:3102';
|
||||
|
|
60
backend/src/controllers/learningObjects.ts
Normal file
60
backend/src/controllers/learningObjects.ts
Normal file
|
@ -0,0 +1,60 @@
|
|||
import { Request, Response } from 'express';
|
||||
import {
|
||||
getLearningObjectById,
|
||||
getLearningObjectIdsFromPath,
|
||||
getLearningObjectsFromPath,
|
||||
} from '../services/learningObjects.js';
|
||||
import { FALLBACK_LANG } from '../config.js';
|
||||
import { FilteredLearningObject } from '../interfaces/learningPath';
|
||||
|
||||
export async function getAllLearningObjects(
|
||||
req: Request,
|
||||
res: Response
|
||||
): Promise<void> {
|
||||
try {
|
||||
const hruid = req.query.hruid as string;
|
||||
const full = req.query.full === 'true';
|
||||
const language = (req.query.language as string) || FALLBACK_LANG;
|
||||
|
||||
if (!hruid) {
|
||||
res.status(400).json({ error: 'HRUID query is required.' });
|
||||
return;
|
||||
}
|
||||
|
||||
let learningObjects: FilteredLearningObject[] | string[];
|
||||
if (full) {
|
||||
learningObjects = await getLearningObjectsFromPath(hruid, language);
|
||||
} else {
|
||||
learningObjects = await getLearningObjectIdsFromPath(
|
||||
hruid,
|
||||
language
|
||||
);
|
||||
}
|
||||
|
||||
res.json(learningObjects);
|
||||
} catch (error) {
|
||||
console.error('Error fetching learning objects:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
|
||||
export async function getLearningObject(
|
||||
req: Request,
|
||||
res: Response
|
||||
): Promise<void> {
|
||||
try {
|
||||
const { hruid } = req.params;
|
||||
const language = (req.query.language as string) || FALLBACK_LANG;
|
||||
|
||||
if (!hruid) {
|
||||
res.status(400).json({ error: 'HRUID parameter is required.' });
|
||||
return;
|
||||
}
|
||||
|
||||
const learningObject = await getLearningObjectById(hruid, language);
|
||||
res.json(learningObject);
|
||||
} catch (error) {
|
||||
console.error('Error fetching learning object:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
62
backend/src/controllers/learningPaths.ts
Normal file
62
backend/src/controllers/learningPaths.ts
Normal file
|
@ -0,0 +1,62 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { themes } from '../data/themes.js';
|
||||
import { FALLBACK_LANG } from '../config.js';
|
||||
import {
|
||||
fetchLearningPaths,
|
||||
searchLearningPaths,
|
||||
} from '../services/learningPaths.js';
|
||||
/**
|
||||
* Fetch learning paths based on query parameters.
|
||||
*/
|
||||
export async function getLearningPaths(
|
||||
req: Request,
|
||||
res: Response
|
||||
): Promise<void> {
|
||||
try {
|
||||
const hruids = req.query.hruid;
|
||||
const themeKey = req.query.theme as string;
|
||||
const searchQuery = req.query.search as string;
|
||||
const language = (req.query.language as string) || FALLBACK_LANG;
|
||||
|
||||
let hruidList;
|
||||
|
||||
if (hruids) {
|
||||
hruidList = Array.isArray(hruids)
|
||||
? hruids.map(String)
|
||||
: [String(hruids)];
|
||||
} else if (themeKey) {
|
||||
const theme = themes.find((t) => {
|
||||
return t.title === themeKey;
|
||||
});
|
||||
if (theme) {
|
||||
hruidList = theme.hruids;
|
||||
} else {
|
||||
res.status(404).json({
|
||||
error: `Theme "${themeKey}" not found.`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else if (searchQuery) {
|
||||
const searchResults = await searchLearningPaths(
|
||||
searchQuery,
|
||||
language
|
||||
);
|
||||
res.json(searchResults);
|
||||
return;
|
||||
} else {
|
||||
hruidList = themes.flatMap((theme) => {
|
||||
return theme.hruids;
|
||||
});
|
||||
}
|
||||
|
||||
const learningPaths = await fetchLearningPaths(
|
||||
hruidList,
|
||||
language,
|
||||
`HRUIDs: ${hruidList.join(', ')}`
|
||||
);
|
||||
res.json(learningPaths.data);
|
||||
} catch (error) {
|
||||
console.error('❌ Unexpected error fetching learning paths:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
58
backend/src/controllers/themes.ts
Normal file
58
backend/src/controllers/themes.ts
Normal file
|
@ -0,0 +1,58 @@
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import yaml from 'js-yaml';
|
||||
import { Request, Response } from 'express';
|
||||
import { themes } from '../data/themes.js';
|
||||
import { FALLBACK_LANG } from '../config.js';
|
||||
|
||||
interface Translations {
|
||||
curricula_page: {
|
||||
[key: string]: { title: string; description?: string }; // Optioneel veld description
|
||||
};
|
||||
}
|
||||
|
||||
function loadTranslations(language: string): Translations {
|
||||
try {
|
||||
const filePath = path.join(process.cwd(), '_i18n', `${language}.yml`);
|
||||
const yamlFile = fs.readFileSync(filePath, 'utf8');
|
||||
return yaml.load(yamlFile) as Translations;
|
||||
} catch (error) {
|
||||
console.error(
|
||||
`Cannot load translation for: ${language}, fallen back to Dutch`
|
||||
);
|
||||
console.error(error);
|
||||
const fallbackPath = path.join(process.cwd(), '_i18n', 'nl.yml');
|
||||
return yaml.load(fs.readFileSync(fallbackPath, 'utf8')) as Translations;
|
||||
}
|
||||
}
|
||||
|
||||
export function getThemes(req: Request, res: Response) {
|
||||
const language =
|
||||
(req.query.language as string)?.toLowerCase() || FALLBACK_LANG;
|
||||
const translations = loadTranslations(language);
|
||||
|
||||
const themeList = themes.map((theme) => {
|
||||
return {
|
||||
key: theme.title,
|
||||
title:
|
||||
translations.curricula_page[theme.title]?.title || theme.title,
|
||||
description: translations.curricula_page[theme.title]?.description,
|
||||
image: `https://dwengo.org/images/curricula/logo_${theme.title}.png`,
|
||||
};
|
||||
});
|
||||
|
||||
res.json(themeList);
|
||||
}
|
||||
|
||||
export function getThemeByTitle(req: Request, res: Response) {
|
||||
const themeKey = req.params.theme;
|
||||
const theme = themes.find((t) => {
|
||||
return t.title === themeKey;
|
||||
});
|
||||
|
||||
if (theme) {
|
||||
res.json(theme.hruids);
|
||||
} else {
|
||||
res.status(404).json({ error: 'Theme not found' });
|
||||
}
|
||||
}
|
18
backend/src/data/assignments/assignment-repository.ts
Normal file
18
backend/src/data/assignments/assignment-repository.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Assignment } from '../../entities/assignments/assignment.entity.js';
|
||||
import { Class } from '../../entities/classes/class.entity.js';
|
||||
|
||||
export class AssignmentRepository extends DwengoEntityRepository<Assignment> {
|
||||
public findByClassAndId(
|
||||
within: Class,
|
||||
id: number
|
||||
): Promise<Assignment | null> {
|
||||
return this.findOne({ within: within, id: id });
|
||||
}
|
||||
public findAllAssignmentsInClass(within: Class): Promise<Assignment[]> {
|
||||
return this.findAll({ where: { within: within } });
|
||||
}
|
||||
public deleteByClassAndId(within: Class, id: number): Promise<void> {
|
||||
return this.deleteWhere({ within: within, id: id });
|
||||
}
|
||||
}
|
29
backend/src/data/assignments/group-repository.ts
Normal file
29
backend/src/data/assignments/group-repository.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Group } from '../../entities/assignments/group.entity.js';
|
||||
import { Assignment } from '../../entities/assignments/assignment.entity.js';
|
||||
|
||||
export class GroupRepository extends DwengoEntityRepository<Group> {
|
||||
public findByAssignmentAndGroupNumber(
|
||||
assignment: Assignment,
|
||||
groupNumber: number
|
||||
): Promise<Group | null> {
|
||||
return this.findOne({
|
||||
assignment: assignment,
|
||||
groupNumber: groupNumber,
|
||||
});
|
||||
}
|
||||
public findAllGroupsForAssignment(
|
||||
assignment: Assignment
|
||||
): Promise<Group[]> {
|
||||
return this.findAll({ where: { assignment: assignment } });
|
||||
}
|
||||
public deleteByAssignmentAndGroupNumber(
|
||||
assignment: Assignment,
|
||||
groupNumber: number
|
||||
) {
|
||||
return this.deleteWhere({
|
||||
assignment: assignment,
|
||||
groupNumber: groupNumber,
|
||||
});
|
||||
}
|
||||
}
|
61
backend/src/data/assignments/submission-repository.ts
Normal file
61
backend/src/data/assignments/submission-repository.ts
Normal file
|
@ -0,0 +1,61 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Group } from '../../entities/assignments/group.entity.js';
|
||||
import { Submission } from '../../entities/assignments/submission.entity.js';
|
||||
import { LearningObjectIdentifier } from '../../entities/content/learning-object-identifier.js';
|
||||
import { Student } from '../../entities/users/student.entity.js';
|
||||
|
||||
export class SubmissionRepository extends DwengoEntityRepository<Submission> {
|
||||
public findSubmissionByLearningObjectAndSubmissionNumber(
|
||||
loId: LearningObjectIdentifier,
|
||||
submissionNumber: number
|
||||
): Promise<Submission | null> {
|
||||
return this.findOne({
|
||||
learningObjectHruid: loId.hruid,
|
||||
learningObjectLanguage: loId.language,
|
||||
learningObjectVersion: loId.version,
|
||||
submissionNumber: submissionNumber,
|
||||
});
|
||||
}
|
||||
|
||||
public findMostRecentSubmissionForStudent(
|
||||
loId: LearningObjectIdentifier,
|
||||
submitter: Student
|
||||
): Promise<Submission | null> {
|
||||
return this.findOne(
|
||||
{
|
||||
learningObjectHruid: loId.hruid,
|
||||
learningObjectLanguage: loId.language,
|
||||
learningObjectVersion: loId.version,
|
||||
submitter: submitter,
|
||||
},
|
||||
{ orderBy: { submissionNumber: 'DESC' } }
|
||||
);
|
||||
}
|
||||
|
||||
public findMostRecentSubmissionForGroup(
|
||||
loId: LearningObjectIdentifier,
|
||||
group: Group
|
||||
): Promise<Submission | null> {
|
||||
return this.findOne(
|
||||
{
|
||||
learningObjectHruid: loId.hruid,
|
||||
learningObjectLanguage: loId.language,
|
||||
learningObjectVersion: loId.version,
|
||||
onBehalfOf: group,
|
||||
},
|
||||
{ orderBy: { submissionNumber: 'DESC' } }
|
||||
);
|
||||
}
|
||||
|
||||
public deleteSubmissionByLearningObjectAndSubmissionNumber(
|
||||
loId: LearningObjectIdentifier,
|
||||
submissionNumber: number
|
||||
): Promise<void> {
|
||||
return this.deleteWhere({
|
||||
learningObjectHruid: loId.hruid,
|
||||
learningObjectLanguage: loId.language,
|
||||
learningObjectVersion: loId.version,
|
||||
submissionNumber: submissionNumber,
|
||||
});
|
||||
}
|
||||
}
|
16
backend/src/data/classes/class-join-request-repository.ts
Normal file
16
backend/src/data/classes/class-join-request-repository.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Class } from '../../entities/classes/class.entity.js';
|
||||
import { ClassJoinRequest } from '../../entities/classes/class-join-request.entity.js';
|
||||
import { Student } from '../../entities/users/student.entity.js';
|
||||
|
||||
export class ClassJoinRequestRepository extends DwengoEntityRepository<ClassJoinRequest> {
|
||||
public findAllRequestsBy(requester: Student): Promise<ClassJoinRequest[]> {
|
||||
return this.findAll({ where: { requester: requester } });
|
||||
}
|
||||
public findAllOpenRequestsTo(clazz: Class): Promise<ClassJoinRequest[]> {
|
||||
return this.findAll({ where: { class: clazz } });
|
||||
}
|
||||
public deleteBy(requester: Student, clazz: Class): Promise<void> {
|
||||
return this.deleteWhere({ requester: requester, class: clazz });
|
||||
}
|
||||
}
|
11
backend/src/data/classes/class-repository.ts
Normal file
11
backend/src/data/classes/class-repository.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Class } from '../../entities/classes/class.entity.js';
|
||||
|
||||
export class ClassRepository extends DwengoEntityRepository<Class> {
|
||||
public findById(id: string): Promise<Class | null> {
|
||||
return this.findOne({ classId: id });
|
||||
}
|
||||
public deleteById(id: string): Promise<void> {
|
||||
return this.deleteWhere({ classId: id });
|
||||
}
|
||||
}
|
31
backend/src/data/classes/teacher-invitation-repository.ts
Normal file
31
backend/src/data/classes/teacher-invitation-repository.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Class } from '../../entities/classes/class.entity.js';
|
||||
import { TeacherInvitation } from '../../entities/classes/teacher-invitation.entity.js';
|
||||
import { Teacher } from '../../entities/users/teacher.entity.js';
|
||||
|
||||
export class TeacherInvitationRepository extends DwengoEntityRepository<TeacherInvitation> {
|
||||
public findAllInvitationsForClass(
|
||||
clazz: Class
|
||||
): Promise<TeacherInvitation[]> {
|
||||
return this.findAll({ where: { class: clazz } });
|
||||
}
|
||||
public findAllInvitationsBy(sender: Teacher): Promise<TeacherInvitation[]> {
|
||||
return this.findAll({ where: { sender: sender } });
|
||||
}
|
||||
public findAllInvitationsFor(
|
||||
receiver: Teacher
|
||||
): Promise<TeacherInvitation[]> {
|
||||
return this.findAll({ where: { receiver: receiver } });
|
||||
}
|
||||
public deleteBy(
|
||||
clazz: Class,
|
||||
sender: Teacher,
|
||||
receiver: Teacher
|
||||
): Promise<void> {
|
||||
return this.deleteWhere({
|
||||
sender: sender,
|
||||
receiver: receiver,
|
||||
class: clazz,
|
||||
});
|
||||
}
|
||||
}
|
16
backend/src/data/content/attachment-repository.ts
Normal file
16
backend/src/data/content/attachment-repository.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Attachment } from '../../entities/content/attachment.entity.js';
|
||||
import { LearningObject } from '../../entities/content/learning-object.entity.js';
|
||||
|
||||
export class AttachmentRepository extends DwengoEntityRepository<Attachment> {
|
||||
public findByLearningObjectAndNumber(
|
||||
learningObject: LearningObject,
|
||||
sequenceNumber: number
|
||||
) {
|
||||
return this.findOne({
|
||||
learningObject: learningObject,
|
||||
sequenceNumber: sequenceNumber,
|
||||
});
|
||||
}
|
||||
// This repository is read-only for now since creating own learning object is an extension feature.
|
||||
}
|
16
backend/src/data/content/learning-object-repository.ts
Normal file
16
backend/src/data/content/learning-object-repository.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { LearningObject } from '../../entities/content/learning-object.entity.js';
|
||||
import { LearningObjectIdentifier } from '../../entities/content/learning-object-identifier.js';
|
||||
|
||||
export class LearningObjectRepository extends DwengoEntityRepository<LearningObject> {
|
||||
public findByIdentifier(
|
||||
identifier: LearningObjectIdentifier
|
||||
): Promise<LearningObject | null> {
|
||||
return this.findOne({
|
||||
hruid: identifier.hruid,
|
||||
language: identifier.language,
|
||||
version: identifier.version,
|
||||
});
|
||||
}
|
||||
// This repository is read-only for now since creating own learning object is an extension feature.
|
||||
}
|
13
backend/src/data/content/learning-path-repository.ts
Normal file
13
backend/src/data/content/learning-path-repository.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { LearningPath } from '../../entities/content/learning-path.entity.js';
|
||||
import { Language } from '../../entities/content/language.js';
|
||||
|
||||
export class LearningPathRepository extends DwengoEntityRepository<LearningPath> {
|
||||
public findByHruidAndLanguage(
|
||||
hruid: string,
|
||||
language: Language
|
||||
): Promise<LearningPath | null> {
|
||||
return this.findOne({ hruid: hruid, language: language });
|
||||
}
|
||||
// This repository is read-only for now since creating own learning object is an extension feature.
|
||||
}
|
19
backend/src/data/dwengo-entity-repository.ts
Normal file
19
backend/src/data/dwengo-entity-repository.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { EntityRepository, FilterQuery } from '@mikro-orm/core';
|
||||
|
||||
export abstract class DwengoEntityRepository<
|
||||
T extends object,
|
||||
> extends EntityRepository<T> {
|
||||
public async save(entity: T) {
|
||||
const em = this.getEntityManager();
|
||||
em.persist(entity);
|
||||
await em.flush();
|
||||
}
|
||||
public async deleteWhere(query: FilterQuery<T>) {
|
||||
const toDelete = await this.findOne(query);
|
||||
const em = this.getEntityManager();
|
||||
if (toDelete) {
|
||||
em.remove(toDelete);
|
||||
await em.flush();
|
||||
}
|
||||
}
|
||||
}
|
33
backend/src/data/questions/answer-repository.ts
Normal file
33
backend/src/data/questions/answer-repository.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Answer } from '../../entities/questions/answer.entity.js';
|
||||
import { Question } from '../../entities/questions/question.entity.js';
|
||||
import { Teacher } from '../../entities/users/teacher.entity.js';
|
||||
|
||||
export class AnswerRepository extends DwengoEntityRepository<Answer> {
|
||||
public createAnswer(answer: {
|
||||
toQuestion: Question;
|
||||
author: Teacher;
|
||||
content: string;
|
||||
}): Promise<Answer> {
|
||||
const answerEntity = new Answer();
|
||||
answerEntity.toQuestion = answer.toQuestion;
|
||||
answerEntity.author = answer.author;
|
||||
answerEntity.content = answer.content;
|
||||
return this.insert(answerEntity);
|
||||
}
|
||||
public findAllAnswersToQuestion(question: Question): Promise<Answer[]> {
|
||||
return this.findAll({
|
||||
where: { toQuestion: question },
|
||||
orderBy: { sequenceNumber: 'ASC' },
|
||||
});
|
||||
}
|
||||
public removeAnswerByQuestionAndSequenceNumber(
|
||||
question: Question,
|
||||
sequenceNumber: number
|
||||
): Promise<void> {
|
||||
return this.deleteWhere({
|
||||
toQuestion: question,
|
||||
sequenceNumber: sequenceNumber,
|
||||
});
|
||||
}
|
||||
}
|
45
backend/src/data/questions/question-repository.ts
Normal file
45
backend/src/data/questions/question-repository.ts
Normal file
|
@ -0,0 +1,45 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Question } from '../../entities/questions/question.entity.js';
|
||||
import { LearningObjectIdentifier } from '../../entities/content/learning-object-identifier.js';
|
||||
import { Student } from '../../entities/users/student.entity.js';
|
||||
|
||||
export class QuestionRepository extends DwengoEntityRepository<Question> {
|
||||
public createQuestion(question: {
|
||||
loId: LearningObjectIdentifier;
|
||||
author: Student;
|
||||
content: string;
|
||||
}): Promise<Question> {
|
||||
const questionEntity = new Question();
|
||||
questionEntity.learningObjectHruid = question.loId.hruid;
|
||||
questionEntity.learningObjectLanguage = question.loId.language;
|
||||
questionEntity.learningObjectVersion = question.loId.version;
|
||||
questionEntity.author = question.author;
|
||||
questionEntity.content = question.content;
|
||||
return this.insert(questionEntity);
|
||||
}
|
||||
public findAllQuestionsAboutLearningObject(
|
||||
loId: LearningObjectIdentifier
|
||||
): Promise<Question[]> {
|
||||
return this.findAll({
|
||||
where: {
|
||||
learningObjectHruid: loId.hruid,
|
||||
learningObjectLanguage: loId.language,
|
||||
learningObjectVersion: loId.version,
|
||||
},
|
||||
orderBy: {
|
||||
sequenceNumber: 'ASC',
|
||||
},
|
||||
});
|
||||
}
|
||||
public removeQuestionByLearningObjectAndSequenceNumber(
|
||||
loId: LearningObjectIdentifier,
|
||||
sequenceNumber: number
|
||||
): Promise<void> {
|
||||
return this.deleteWhere({
|
||||
learningObjectHruid: loId.hruid,
|
||||
learningObjectLanguage: loId.language,
|
||||
learningObjectVersion: loId.version,
|
||||
sequenceNumber: sequenceNumber,
|
||||
});
|
||||
}
|
||||
}
|
119
backend/src/data/repositories.ts
Normal file
119
backend/src/data/repositories.ts
Normal file
|
@ -0,0 +1,119 @@
|
|||
import {
|
||||
AnyEntity,
|
||||
EntityManager,
|
||||
EntityName,
|
||||
EntityRepository,
|
||||
} from '@mikro-orm/core';
|
||||
import { forkEntityManager } from '../orm.js';
|
||||
import { StudentRepository } from './users/student-repository.js';
|
||||
import { Student } from '../entities/users/student.entity.js';
|
||||
import { User } from '../entities/users/user.entity.js';
|
||||
import { UserRepository } from './users/user-repository.js';
|
||||
import { Teacher } from '../entities/users/teacher.entity.js';
|
||||
import { TeacherRepository } from './users/teacher-repository.js';
|
||||
import { Class } from '../entities/classes/class.entity.js';
|
||||
import { ClassRepository } from './classes/class-repository.js';
|
||||
import { ClassJoinRequest } from '../entities/classes/class-join-request.entity.js';
|
||||
import { ClassJoinRequestRepository } from './classes/class-join-request-repository.js';
|
||||
import { TeacherInvitationRepository } from './classes/teacher-invitation-repository.js';
|
||||
import { TeacherInvitation } from '../entities/classes/teacher-invitation.entity.js';
|
||||
import { Assignment } from '../entities/assignments/assignment.entity.js';
|
||||
import { AssignmentRepository } from './assignments/assignment-repository.js';
|
||||
import { GroupRepository } from './assignments/group-repository.js';
|
||||
import { Group } from '../entities/assignments/group.entity.js';
|
||||
import { Submission } from '../entities/assignments/submission.entity.js';
|
||||
import { SubmissionRepository } from './assignments/submission-repository.js';
|
||||
import { Question } from '../entities/questions/question.entity.js';
|
||||
import { QuestionRepository } from './questions/question-repository.js';
|
||||
import { Answer } from '../entities/questions/answer.entity.js';
|
||||
import { AnswerRepository } from './questions/answer-repository.js';
|
||||
import { LearningObject } from '../entities/content/learning-object.entity.js';
|
||||
import { LearningObjectRepository } from './content/learning-object-repository.js';
|
||||
import { LearningPath } from '../entities/content/learning-path.entity.js';
|
||||
import { LearningPathRepository } from './content/learning-path-repository.js';
|
||||
import { AttachmentRepository } from './content/attachment-repository.js';
|
||||
import { Attachment } from '../entities/content/attachment.entity.js';
|
||||
|
||||
let entityManager: EntityManager | undefined;
|
||||
|
||||
/**
|
||||
* Execute all the database operations within the function f in a single transaction.
|
||||
*/
|
||||
export function transactional<T>(f: () => Promise<T>) {
|
||||
entityManager?.transactional(f);
|
||||
}
|
||||
|
||||
function repositoryGetter<T extends AnyEntity, R extends EntityRepository<T>>(
|
||||
entity: EntityName<T>
|
||||
): () => R {
|
||||
let cachedRepo: R | undefined;
|
||||
return (): R => {
|
||||
if (!cachedRepo) {
|
||||
if (!entityManager) {
|
||||
entityManager = forkEntityManager();
|
||||
}
|
||||
cachedRepo = entityManager.getRepository(entity) as R;
|
||||
}
|
||||
return cachedRepo;
|
||||
};
|
||||
}
|
||||
|
||||
/* Users */
|
||||
export const getUserRepository = repositoryGetter<User, UserRepository>(User);
|
||||
export const getStudentRepository = repositoryGetter<
|
||||
Student,
|
||||
StudentRepository
|
||||
>(Student);
|
||||
export const getTeacherRepository = repositoryGetter<
|
||||
Teacher,
|
||||
TeacherRepository
|
||||
>(Teacher);
|
||||
|
||||
/* Classes */
|
||||
export const getClassRepository = repositoryGetter<Class, ClassRepository>(
|
||||
Class
|
||||
);
|
||||
export const getClassJoinRequestRepository = repositoryGetter<
|
||||
ClassJoinRequest,
|
||||
ClassJoinRequestRepository
|
||||
>(ClassJoinRequest);
|
||||
export const getTeacherInvitationRepository = repositoryGetter<
|
||||
TeacherInvitation,
|
||||
TeacherInvitationRepository
|
||||
>(TeacherInvitationRepository);
|
||||
|
||||
/* Assignments */
|
||||
export const getAssignmentRepository = repositoryGetter<
|
||||
Assignment,
|
||||
AssignmentRepository
|
||||
>(Assignment);
|
||||
export const getGroupRepository = repositoryGetter<Group, GroupRepository>(
|
||||
Group
|
||||
);
|
||||
export const getSubmissionRepository = repositoryGetter<
|
||||
Submission,
|
||||
SubmissionRepository
|
||||
>(Submission);
|
||||
|
||||
/* Questions and answers */
|
||||
export const getQuestionRepository = repositoryGetter<
|
||||
Question,
|
||||
QuestionRepository
|
||||
>(Question);
|
||||
export const getAnswerRepository = repositoryGetter<Answer, AnswerRepository>(
|
||||
Answer
|
||||
);
|
||||
|
||||
/* Learning content */
|
||||
export const getLearningObjectRepository = repositoryGetter<
|
||||
LearningObject,
|
||||
LearningObjectRepository
|
||||
>(LearningObject);
|
||||
export const getLearningPathRepository = repositoryGetter<
|
||||
LearningPath,
|
||||
LearningPathRepository
|
||||
>(LearningPath);
|
||||
export const getAttachmentRepository = repositoryGetter<
|
||||
Attachment,
|
||||
AttachmentRepository
|
||||
>(Assignment);
|
196
backend/src/data/themes.ts
Normal file
196
backend/src/data/themes.ts
Normal file
|
@ -0,0 +1,196 @@
|
|||
export interface Theme {
|
||||
title: string;
|
||||
hruids: string[];
|
||||
}
|
||||
|
||||
export const themes: Theme[] = [
|
||||
{
|
||||
title: 'kiks',
|
||||
hruids: [
|
||||
'pn_werking',
|
||||
'un_artificiele_intelligentie',
|
||||
'pn_klimaatverandering',
|
||||
'kiks1_microscopie',
|
||||
'kiks2_practicum',
|
||||
'pn_digitalebeelden',
|
||||
'kiks3_dl_basis',
|
||||
'kiks4_dl_gevorderd',
|
||||
'kiks5_classificatie',
|
||||
'kiks6_regressie',
|
||||
'kiks7_ethiek',
|
||||
'kiks8_eindtermen',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'art',
|
||||
hruids: [
|
||||
'pn_werking',
|
||||
'un_artificiele_intelligentie',
|
||||
'art1',
|
||||
'art2',
|
||||
'art3',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'socialrobot',
|
||||
hruids: ['sr0_lkr', 'sr0_lln', 'sr1', 'sr2', 'sr3', 'sr4'],
|
||||
},
|
||||
{
|
||||
title: 'agriculture',
|
||||
hruids: [
|
||||
'pn_werking',
|
||||
'un_artificiele_intelligentie',
|
||||
'agri_landbouw',
|
||||
'agri_lopendeband',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'wegostem',
|
||||
hruids: ['wegostem'],
|
||||
},
|
||||
{
|
||||
title: 'computational_thinking',
|
||||
hruids: [
|
||||
'ct1_concepten',
|
||||
'ct2_concreet',
|
||||
'ct3_voorbeelden',
|
||||
'ct6_cases',
|
||||
'ct9_impact',
|
||||
'ct10_bebras',
|
||||
'ct8_eindtermen',
|
||||
'ct7_historiek',
|
||||
'ct5_kijkwijzer',
|
||||
'ct4_evaluatiekader',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'math_with_python',
|
||||
hruids: [
|
||||
'pn_werking',
|
||||
'maths_pythagoras',
|
||||
'maths_spreidingsdiagrammen',
|
||||
'maths_rechten',
|
||||
'maths_lineaireregressie',
|
||||
'maths_epidemie',
|
||||
'pn_digitalebeelden',
|
||||
'maths_logica',
|
||||
'maths_parameters',
|
||||
'maths_parabolen',
|
||||
'pn_regressie',
|
||||
'maths7_grafen',
|
||||
'maths8_statistiek',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'python_programming',
|
||||
hruids: [
|
||||
'pn_werking',
|
||||
'pn_datatypes',
|
||||
'pn_operatoren',
|
||||
'pn_structuren',
|
||||
'pn_functies',
|
||||
'art2',
|
||||
'stem_insectbooks',
|
||||
'un_algoenprog',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'stem',
|
||||
hruids: [
|
||||
'pn_werking',
|
||||
'maths_spreidingsdiagrammen',
|
||||
'pn_digitalebeelden',
|
||||
'maths_epidemie',
|
||||
'stem_ipadres',
|
||||
'pn_klimaatverandering',
|
||||
'stem_rechten',
|
||||
'stem_lineaireregressie',
|
||||
'stem_insectbooks',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'care',
|
||||
hruids: [
|
||||
'pn_werking',
|
||||
'un_artificiele_intelligentie',
|
||||
'aiz1_zorg',
|
||||
'aiz2_grafen',
|
||||
'aiz3_unplugged',
|
||||
'aiz4_eindtermen',
|
||||
'aiz5_triage',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'chatbot',
|
||||
hruids: [
|
||||
'pn_werking',
|
||||
'un_artificiele_intelligentie',
|
||||
'cb5_chatbotunplugged',
|
||||
'cb1_chatbot',
|
||||
'cb2_sentimentanalyse',
|
||||
'cb3_vervoegmachine',
|
||||
'cb4_eindtermen',
|
||||
'cb6',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'physical_computing',
|
||||
hruids: [
|
||||
'pc_starttodwenguino',
|
||||
'pc_rijdenderobot',
|
||||
'pc_theremin',
|
||||
'pc_leerlijn_introductie',
|
||||
'pc_leerlijn_invoer_verwerking_uitvoer',
|
||||
'pc_leerlijn_basisprincipes_digitale_elektronica',
|
||||
'pc_leerlijn_grafisch_naar_tekstueel',
|
||||
'pc_leerlijn_basis_programmeren',
|
||||
'pc_leerlijn_van_µc_naar_plc',
|
||||
'pc_leerlijn_fiches_dwenguino',
|
||||
'pc_leerlijn_seriele_monitor',
|
||||
'pc_leerlijn_bus_protocollen',
|
||||
'pc_leerlijn_wifi',
|
||||
'pc_leerlijn_fiches_arduino',
|
||||
'pc_leerlijn_project_lijnvolger',
|
||||
'pc_leerlijn_project_bluetooth',
|
||||
'pc_leerlijn_hddclock',
|
||||
'pc_leerlijn_fysica_valbeweging',
|
||||
'pc_leerlijn_luchtkwaliteit',
|
||||
'pc_leerlijn_weerstation',
|
||||
'pc_leerlijn_g0',
|
||||
'pc_leerlijn_g1',
|
||||
'pc_leerlijn_g3',
|
||||
'pc_leerlijn_g4',
|
||||
'pc_leerlijn_g5',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'algorithms',
|
||||
hruids: [
|
||||
'art2',
|
||||
'anm1',
|
||||
'anm2',
|
||||
'anm3',
|
||||
'anm4',
|
||||
'anm11',
|
||||
'anm12',
|
||||
'anm13',
|
||||
'anm14',
|
||||
'anm15',
|
||||
'anm16',
|
||||
'anm17',
|
||||
'maths_epidemie',
|
||||
'stem_insectbooks',
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'basics_ai',
|
||||
hruids: [
|
||||
'un_artificiele_intelligentie',
|
||||
'org-dwengo-waisda-taal-murder-mistery',
|
||||
'art1',
|
||||
'org-dwengo-waisda-beelden-emoties-herkennen',
|
||||
'org-dwengo-waisda-beelden-unplugged-fax-lp',
|
||||
'org-dwengo-waisda-beelden-teachable-machine',
|
||||
],
|
||||
},
|
||||
];
|
11
backend/src/data/users/student-repository.ts
Normal file
11
backend/src/data/users/student-repository.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Student } from '../../entities/users/student.entity.js';
|
||||
|
||||
export class StudentRepository extends DwengoEntityRepository<Student> {
|
||||
public findByUsername(username: string): Promise<Student | null> {
|
||||
return this.findOne({ username: username });
|
||||
}
|
||||
public deleteByUsername(username: string): Promise<void> {
|
||||
return this.deleteWhere({ username: username });
|
||||
}
|
||||
}
|
11
backend/src/data/users/teacher-repository.ts
Normal file
11
backend/src/data/users/teacher-repository.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Teacher } from '../../entities/users/teacher.entity.js';
|
||||
|
||||
export class TeacherRepository extends DwengoEntityRepository<Teacher> {
|
||||
public findByUsername(username: string): Promise<Teacher | null> {
|
||||
return this.findOne({ username: username });
|
||||
}
|
||||
public deleteByUsername(username: string): Promise<void> {
|
||||
return this.deleteWhere({ username: username });
|
||||
}
|
||||
}
|
11
backend/src/data/users/user-repository.ts
Normal file
11
backend/src/data/users/user-repository.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { User } from '../../entities/users/user.entity.js';
|
||||
|
||||
export class UserRepository extends DwengoEntityRepository<User> {
|
||||
public findByUsername(username: string): Promise<User | null> {
|
||||
return this.findOne({ username: username });
|
||||
}
|
||||
public deleteByUsername(username: string): Promise<void> {
|
||||
return this.deleteWhere({ username: username });
|
||||
}
|
||||
}
|
35
backend/src/entities/assignments/assignment.entity.ts
Normal file
35
backend/src/entities/assignments/assignment.entity.ts
Normal file
|
@ -0,0 +1,35 @@
|
|||
import {
|
||||
Entity,
|
||||
Enum,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
} from '@mikro-orm/core';
|
||||
import { Class } from '../classes/class.entity.js';
|
||||
import { Group } from './group.entity.js';
|
||||
import { Language } from '../content/language.js';
|
||||
|
||||
@Entity()
|
||||
export class Assignment {
|
||||
@ManyToOne({ entity: () => {return Class}, primary: true })
|
||||
within!: Class;
|
||||
|
||||
@PrimaryKey({ type: 'number' })
|
||||
id!: number;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
title!: string;
|
||||
|
||||
@Property({ type: 'text' })
|
||||
description!: string;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
learningPathHruid!: string;
|
||||
|
||||
@Enum({ items: () => {return Language} })
|
||||
learningPathLanguage!: Language;
|
||||
|
||||
@OneToMany({ entity: () => {return Group}, mappedBy: 'assignment' })
|
||||
groups!: Group[];
|
||||
}
|
15
backend/src/entities/assignments/group.entity.ts
Normal file
15
backend/src/entities/assignments/group.entity.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { Entity, ManyToMany, ManyToOne, PrimaryKey } from '@mikro-orm/core';
|
||||
import { Assignment } from './assignment.entity.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class Group {
|
||||
@ManyToOne({ entity: () => {return Assignment}, primary: true })
|
||||
assignment!: Assignment;
|
||||
|
||||
@PrimaryKey({ type: 'integer' })
|
||||
groupNumber!: number;
|
||||
|
||||
@ManyToMany({ entity: () => {return Student} })
|
||||
members!: Student[];
|
||||
}
|
31
backend/src/entities/assignments/submission.entity.ts
Normal file
31
backend/src/entities/assignments/submission.entity.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { Student } from '../users/student.entity.js';
|
||||
import { Group } from './group.entity.js';
|
||||
import { Entity, Enum, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Language } from '../content/language.js';
|
||||
|
||||
@Entity()
|
||||
export class Submission {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectHruid!: string;
|
||||
|
||||
@Enum({ items: () => {return Language}, primary: true })
|
||||
learningObjectLanguage!: Language;
|
||||
|
||||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectVersion: string = '1';
|
||||
|
||||
@PrimaryKey({ type: 'integer' })
|
||||
submissionNumber!: number;
|
||||
|
||||
@ManyToOne({ entity: () => {return Student} })
|
||||
submitter!: Student;
|
||||
|
||||
@Property({ type: 'datetime' })
|
||||
submissionTime!: Date;
|
||||
|
||||
@ManyToOne({ entity: () => {return Group}, nullable: true })
|
||||
onBehalfOf?: Group;
|
||||
|
||||
@Property({ type: 'json' })
|
||||
content!: string;
|
||||
}
|
21
backend/src/entities/classes/class-join-request.entity.ts
Normal file
21
backend/src/entities/classes/class-join-request.entity.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Entity, Enum, ManyToOne } from '@mikro-orm/core';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import { Class } from './class.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class ClassJoinRequest {
|
||||
@ManyToOne({ entity: () => {return Student}, primary: true })
|
||||
requester!: Student;
|
||||
|
||||
@ManyToOne({ entity: () => {return Class}, primary: true })
|
||||
class!: Class;
|
||||
|
||||
@Enum(() => {return ClassJoinRequestStatus})
|
||||
status!: ClassJoinRequestStatus;
|
||||
}
|
||||
|
||||
export enum ClassJoinRequestStatus {
|
||||
Open = 'open',
|
||||
Accepted = 'accepted',
|
||||
Declined = 'declined',
|
||||
}
|
25
backend/src/entities/classes/class.entity.ts
Normal file
25
backend/src/entities/classes/class.entity.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import {
|
||||
Collection,
|
||||
Entity,
|
||||
ManyToMany,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
} from '@mikro-orm/core';
|
||||
import { v4 } from 'uuid';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class Class {
|
||||
@PrimaryKey()
|
||||
classId = v4();
|
||||
|
||||
@Property({ type: 'string' })
|
||||
displayName!: string;
|
||||
|
||||
@ManyToMany(() => {return Teacher})
|
||||
teachers!: Collection<Teacher>;
|
||||
|
||||
@ManyToMany(() => {return Student})
|
||||
students!: Collection<Student>;
|
||||
}
|
18
backend/src/entities/classes/teacher-invitation.entity.ts
Normal file
18
backend/src/entities/classes/teacher-invitation.entity.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { Entity, ManyToOne } from '@mikro-orm/core';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import { Class } from './class.entity.js';
|
||||
|
||||
/**
|
||||
* Invitation of a teacher into a class (in order to teach it).
|
||||
*/
|
||||
@Entity()
|
||||
export class TeacherInvitation {
|
||||
@ManyToOne({ entity: () => {return Teacher}, primary: true })
|
||||
sender!: Teacher;
|
||||
|
||||
@ManyToOne({ entity: () => {return Teacher}, primary: true })
|
||||
receiver!: Teacher;
|
||||
|
||||
@ManyToOne({ entity: () => {return Class}, primary: true })
|
||||
class!: Class;
|
||||
}
|
17
backend/src/entities/content/attachment.entity.ts
Normal file
17
backend/src/entities/content/attachment.entity.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { LearningObject } from './learning-object.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class Attachment {
|
||||
@ManyToOne({ entity: () => {return LearningObject}, primary: true })
|
||||
learningObject!: LearningObject;
|
||||
|
||||
@PrimaryKey({ type: 'integer' })
|
||||
sequenceNumber!: number;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
mimeType!: string;
|
||||
|
||||
@Property({ type: 'blob' })
|
||||
content!: Buffer;
|
||||
}
|
6
backend/src/entities/content/language.ts
Normal file
6
backend/src/entities/content/language.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
export enum Language {
|
||||
Dutch = 'nl',
|
||||
French = 'fr',
|
||||
English = 'en',
|
||||
Germany = 'de',
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import { Language } from './language.js';
|
||||
|
||||
export class LearningObjectIdentifier {
|
||||
constructor(
|
||||
public hruid: string,
|
||||
public language: Language,
|
||||
public version: string
|
||||
) {}
|
||||
}
|
106
backend/src/entities/content/learning-object.entity.ts
Normal file
106
backend/src/entities/content/learning-object.entity.ts
Normal file
|
@ -0,0 +1,106 @@
|
|||
import {
|
||||
Embeddable,
|
||||
Embedded,
|
||||
Entity,
|
||||
Enum,
|
||||
ManyToMany,
|
||||
OneToMany,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
} from '@mikro-orm/core';
|
||||
import { Language } from './language.js';
|
||||
import { Attachment } from './attachment.entity.js';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class LearningObject {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
hruid!: string;
|
||||
|
||||
@Enum({ items: () => {return Language}, primary: true })
|
||||
language!: Language;
|
||||
|
||||
@PrimaryKey({ type: 'string' })
|
||||
version: string = '1';
|
||||
|
||||
@ManyToMany({ entity: () => {return Teacher} })
|
||||
admins!: Teacher[];
|
||||
|
||||
@Property({ type: 'string' })
|
||||
title!: string;
|
||||
|
||||
@Property({ type: 'text' })
|
||||
description!: string;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
contentType!: string;
|
||||
|
||||
@Property({ type: 'array' })
|
||||
keywords: string[] = [];
|
||||
|
||||
@Property({ type: 'array', nullable: true })
|
||||
targetAges?: number[];
|
||||
|
||||
@Property({ type: 'bool' })
|
||||
teacherExclusive: boolean = false;
|
||||
|
||||
@Property({ type: 'array' })
|
||||
skosConcepts!: string[];
|
||||
|
||||
@Embedded({ entity: () => {return EducationalGoal}, array: true })
|
||||
educationalGoals: EducationalGoal[] = [];
|
||||
|
||||
@Property({ type: 'string' })
|
||||
copyright: string = '';
|
||||
|
||||
@Property({ type: 'string' })
|
||||
license: string = '';
|
||||
|
||||
@Property({ type: 'smallint', nullable: true })
|
||||
difficulty?: number;
|
||||
|
||||
@Property({ type: 'integer' })
|
||||
estimatedTime!: number;
|
||||
|
||||
@Embedded({ entity: () => {return ReturnValue} })
|
||||
returnValue!: ReturnValue;
|
||||
|
||||
@Property({ type: 'bool' })
|
||||
available: boolean = true;
|
||||
|
||||
@Property({ type: 'string', nullable: true })
|
||||
contentLocation?: string;
|
||||
|
||||
@OneToMany({ entity: () => {return Attachment}, mappedBy: 'learningObject' })
|
||||
attachments: Attachment[] = [];
|
||||
|
||||
@Property({ type: 'blob' })
|
||||
content!: Buffer;
|
||||
}
|
||||
|
||||
@Embeddable()
|
||||
export class EducationalGoal {
|
||||
@Property({ type: 'string' })
|
||||
source!: string;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
id!: string;
|
||||
}
|
||||
|
||||
@Embeddable()
|
||||
export class ReturnValue {
|
||||
@Property({ type: 'string' })
|
||||
callbackUrl!: string;
|
||||
|
||||
@Property({ type: 'json' })
|
||||
callbackSchema!: string;
|
||||
}
|
||||
|
||||
export enum ContentType {
|
||||
Markdown = 'text/markdown',
|
||||
Image = 'image/image',
|
||||
Mpeg = 'audio/mpeg',
|
||||
Pdf = 'application/pdf',
|
||||
Extern = 'extern',
|
||||
Blockly = 'Blockly',
|
||||
}
|
66
backend/src/entities/content/learning-path.entity.ts
Normal file
66
backend/src/entities/content/learning-path.entity.ts
Normal file
|
@ -0,0 +1,66 @@
|
|||
import {
|
||||
Embeddable,
|
||||
Embedded,
|
||||
Entity,
|
||||
Enum,
|
||||
ManyToMany,
|
||||
OneToOne,
|
||||
PrimaryKey,
|
||||
Property,
|
||||
} from '@mikro-orm/core';
|
||||
import { Language } from './language.js';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class LearningPath {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
hruid!: string;
|
||||
|
||||
@Enum({ items: () => {return Language}, primary: true })
|
||||
language!: Language;
|
||||
|
||||
@ManyToMany({ entity: () => {return Teacher} })
|
||||
admins!: Teacher[];
|
||||
|
||||
@Property({ type: 'string' })
|
||||
title!: string;
|
||||
|
||||
@Property({ type: 'text' })
|
||||
description!: string;
|
||||
|
||||
@Property({ type: 'blob' })
|
||||
image!: string;
|
||||
|
||||
@Embedded({ entity: () => {return LearningPathNode}, array: true })
|
||||
nodes: LearningPathNode[] = [];
|
||||
}
|
||||
|
||||
@Embeddable()
|
||||
export class LearningPathNode {
|
||||
@Property({ type: 'string' })
|
||||
learningObjectHruid!: string;
|
||||
|
||||
@Enum({ items: () => {return Language} })
|
||||
language!: Language;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
version!: string;
|
||||
|
||||
@Property({ type: 'longtext' })
|
||||
instruction!: string;
|
||||
|
||||
@Property({ type: 'bool' })
|
||||
startNode!: boolean;
|
||||
|
||||
@Embedded({ entity: () => {return LearningPathTransition}, array: true })
|
||||
transitions!: LearningPathTransition[];
|
||||
}
|
||||
|
||||
@Embeddable()
|
||||
export class LearningPathTransition {
|
||||
@Property({ type: 'string' })
|
||||
condition!: string;
|
||||
|
||||
@OneToOne({ entity: () => {return LearningPathNode} })
|
||||
next!: LearningPathNode;
|
||||
}
|
21
backend/src/entities/questions/answer.entity.ts
Normal file
21
backend/src/entities/questions/answer.entity.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Question } from './question.entity';
|
||||
import { Teacher } from '../users/teacher.entity';
|
||||
|
||||
@Entity()
|
||||
export class Answer {
|
||||
@ManyToOne({ entity: () => {return Teacher}, primary: true })
|
||||
author!: Teacher;
|
||||
|
||||
@ManyToOne({ entity: () => {return Question}, primary: true })
|
||||
toQuestion!: Question;
|
||||
|
||||
@PrimaryKey({ type: 'integer' })
|
||||
sequenceNumber!: number;
|
||||
|
||||
@Property({ type: 'datetime' })
|
||||
timestamp: Date = new Date();
|
||||
|
||||
@Property({ type: 'text' })
|
||||
content!: string;
|
||||
}
|
27
backend/src/entities/questions/question.entity.ts
Normal file
27
backend/src/entities/questions/question.entity.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
import { Entity, Enum, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Language } from '../content/language.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class Question {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectHruid!: string;
|
||||
|
||||
@Enum({ items: () => {return Language}, primary: true })
|
||||
learningObjectLanguage!: Language;
|
||||
|
||||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectVersion: string = '1';
|
||||
|
||||
@PrimaryKey({ type: 'integer' })
|
||||
sequenceNumber!: number;
|
||||
|
||||
@ManyToOne({ entity: () => {return Student} })
|
||||
author!: Student;
|
||||
|
||||
@Property({ type: 'datetime' })
|
||||
timestamp: Date = new Date();
|
||||
|
||||
@Property({ type: 'text' })
|
||||
content!: string;
|
||||
}
|
22
backend/src/entities/users/student.entity.ts
Normal file
22
backend/src/entities/users/student.entity.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { User } from './user.entity.js';
|
||||
import { Collection, Entity, ManyToMany } from '@mikro-orm/core';
|
||||
import { Class } from '../classes/class.entity.js';
|
||||
import { Group } from '../assignments/group.entity.js';
|
||||
import { StudentRepository } from '../../data/users/student-repository.js';
|
||||
|
||||
@Entity({ repository: () => {return StudentRepository} })
|
||||
export class Student extends User {
|
||||
@ManyToMany(() => {return Class})
|
||||
classes!: Collection<Class>;
|
||||
|
||||
@ManyToMany(() => {return Group})
|
||||
groups!: Collection<Group>;
|
||||
|
||||
constructor(
|
||||
public username: string,
|
||||
public firstName: string,
|
||||
public lastName: string
|
||||
) {
|
||||
super();
|
||||
}
|
||||
}
|
9
backend/src/entities/users/teacher.entity.ts
Normal file
9
backend/src/entities/users/teacher.entity.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import { Collection, Entity, ManyToMany } from '@mikro-orm/core';
|
||||
import { User } from './user.entity.js';
|
||||
import { Class } from '../classes/class.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class Teacher extends User {
|
||||
@ManyToMany(() => {return Class})
|
||||
classes!: Collection<Class>;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
import { Entity, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
|
||||
@Entity()
|
||||
export class User {
|
||||
@PrimaryKey({ type: 'number' })
|
||||
id!: number;
|
||||
@Entity({ abstract: true })
|
||||
export abstract class User {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
username!: string;
|
||||
|
||||
@Property()
|
||||
firstName: string = '';
|
98
backend/src/interfaces/learningPath.ts
Normal file
98
backend/src/interfaces/learningPath.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
export interface Transition {
|
||||
default: boolean;
|
||||
_id: string;
|
||||
next: {
|
||||
_id: string;
|
||||
hruid: string;
|
||||
version: number;
|
||||
language: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface LearningObjectNode {
|
||||
_id: string;
|
||||
learningobject_hruid: string;
|
||||
version: number;
|
||||
language: string;
|
||||
start_node?: boolean;
|
||||
transitions: Transition[];
|
||||
created_at: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface LearningPath {
|
||||
_id: string;
|
||||
language: string;
|
||||
hruid: string;
|
||||
title: string;
|
||||
description: string;
|
||||
image?: string; // Image might be missing, so it's optional
|
||||
num_nodes: number;
|
||||
num_nodes_left: number;
|
||||
nodes: LearningObjectNode[];
|
||||
keywords: string;
|
||||
target_ages: number[];
|
||||
min_age: number;
|
||||
max_age: number;
|
||||
__order: number;
|
||||
}
|
||||
|
||||
export interface EducationalGoal {
|
||||
source: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface ReturnValue {
|
||||
callback_url: string;
|
||||
callback_schema: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface LearningObjectMetadata {
|
||||
_id: string;
|
||||
uuid: string;
|
||||
hruid: string;
|
||||
version: number;
|
||||
language: string;
|
||||
title: string;
|
||||
description: string;
|
||||
difficulty: number;
|
||||
estimated_time: number;
|
||||
available: boolean;
|
||||
teacher_exclusive: boolean;
|
||||
educational_goals: EducationalGoal[];
|
||||
keywords: string[];
|
||||
target_ages: number[];
|
||||
content_type: string; // Markdown, image, etc.
|
||||
content_location?: string;
|
||||
skos_concepts?: string[];
|
||||
return_value?: ReturnValue;
|
||||
}
|
||||
|
||||
export interface FilteredLearningObject {
|
||||
key: string;
|
||||
_id: string;
|
||||
uuid: string;
|
||||
version: number;
|
||||
title: string;
|
||||
htmlUrl: string;
|
||||
language: string;
|
||||
difficulty: number;
|
||||
estimatedTime: number;
|
||||
available: boolean;
|
||||
teacherExclusive: boolean;
|
||||
educationalGoals: EducationalGoal[];
|
||||
keywords: string[];
|
||||
description: string;
|
||||
targetAges: number[];
|
||||
contentType: string;
|
||||
contentLocation?: string;
|
||||
skosConcepts?: string[];
|
||||
returnValue?: ReturnValue;
|
||||
}
|
||||
|
||||
export interface LearningPathResponse {
|
||||
success: boolean;
|
||||
source: string;
|
||||
data: LearningPath[] | null;
|
||||
message?: string;
|
||||
}
|
|
@ -1,20 +1,45 @@
|
|||
import { LoggerOptions, Options } from '@mikro-orm/core';
|
||||
import { PostgreSqlDriver } from '@mikro-orm/postgresql';
|
||||
import { EnvVars, getEnvVar, getNumericEnvVar } from './util/envvars.js';
|
||||
import { SqliteDriver } from '@mikro-orm/sqlite';
|
||||
import { MikroOrmLogger } from './logging/mikroOrmLogger.js';
|
||||
import { LOG_LEVEL } from './config.js';
|
||||
|
||||
const config: Options = {
|
||||
driver: PostgreSqlDriver,
|
||||
dbName: 'dwengo',
|
||||
password: 'postgres',
|
||||
entities: ['dist/**/*.entity.js'],
|
||||
entitiesTs: ['src/**/*.entity.ts'],
|
||||
const entities = ['dist/**/*.entity.js'];
|
||||
const entitiesTs = ['src/**/*.entity.ts'];
|
||||
|
||||
// Logging
|
||||
debug: LOG_LEVEL === 'debug',
|
||||
loggerFactory: (options: LoggerOptions) => {
|
||||
return new MikroOrmLogger(options);
|
||||
},
|
||||
};
|
||||
function config(testingMode: boolean = false): Options {
|
||||
if (testingMode) {
|
||||
return {
|
||||
driver: SqliteDriver,
|
||||
dbName: getEnvVar(EnvVars.DbName),
|
||||
entities: entities,
|
||||
entitiesTs: entitiesTs,
|
||||
|
||||
// Workaround: vitest: `TypeError: Unknown file extension ".ts"` (ERR_UNKNOWN_FILE_EXTENSION)
|
||||
// (see https://mikro-orm.io/docs/guide/project-setup#testing-the-endpoint)
|
||||
dynamicImportProvider: (id) => {
|
||||
return import(id);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
driver: PostgreSqlDriver,
|
||||
host: getEnvVar(EnvVars.DbHost),
|
||||
port: getNumericEnvVar(EnvVars.DbPort),
|
||||
dbName: getEnvVar(EnvVars.DbName),
|
||||
user: getEnvVar(EnvVars.DbUsername),
|
||||
password: getEnvVar(EnvVars.DbPassword),
|
||||
entities: entities,
|
||||
entitiesTs: entitiesTs,
|
||||
|
||||
// Logging
|
||||
debug: LOG_LEVEL === 'debug',
|
||||
loggerFactory: (options: LoggerOptions) => {
|
||||
return new MikroOrmLogger(options);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default config;
|
||||
|
|
|
@ -1,13 +1,37 @@
|
|||
import { MikroORM } from '@mikro-orm/core';
|
||||
import { EntityManager, MikroORM } from '@mikro-orm/core';
|
||||
import config from './mikro-orm.config.js';
|
||||
import { EnvVars, getEnvVar } from './util/envvars.js';
|
||||
import { getLogger } from './logging/initalize.js';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
export default async function initORM() {
|
||||
let orm: MikroORM | undefined;
|
||||
export async function initORM(testingMode: boolean = false) {
|
||||
const logger: Logger = getLogger();
|
||||
|
||||
logger.info('Initializing ORM');
|
||||
logger.debug('MikroORM config is', config);
|
||||
|
||||
await MikroORM.init(config);
|
||||
orm = await MikroORM.init(config(testingMode));
|
||||
// Update the database scheme if necessary and enabled.
|
||||
if (getEnvVar(EnvVars.DbUpdate)) {
|
||||
await orm.schema.updateSchema();
|
||||
} else {
|
||||
const diff = await orm.schema.getUpdateSchemaSQL();
|
||||
if (diff) {
|
||||
throw Error(
|
||||
'The database structure needs to be updated in order to fit the new database structure ' +
|
||||
'of the app. In order to do so automatically, set the environment variable DWENGO_DB_UPDATE to true. ' +
|
||||
'The following queries will then be executed:\n' +
|
||||
diff
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
export function forkEntityManager(): EntityManager {
|
||||
if (!orm) {
|
||||
throw Error(
|
||||
'Accessing the Entity Manager before the ORM is fully initialized.'
|
||||
);
|
||||
}
|
||||
return orm.em.fork();
|
||||
}
|
||||
|
|
54
backend/src/routes/assignment.ts
Normal file
54
backend/src/routes/assignment.ts
Normal file
|
@ -0,0 +1,54 @@
|
|||
import express from 'express'
|
||||
const router = express.Router();
|
||||
|
||||
// Root endpoint used to search objects
|
||||
router.get('/', (req, res) => {
|
||||
res.json({
|
||||
assignments: [
|
||||
'0',
|
||||
'1',
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
// Information about an assignment with id 'id'
|
||||
router.get('/:id', (req, res) => {
|
||||
res.json({
|
||||
id: req.params.id,
|
||||
title: 'Dit is een test assignment',
|
||||
description: 'Een korte beschrijving',
|
||||
groups: [ '0' ],
|
||||
learningPath: '0',
|
||||
class: '0',
|
||||
links: {
|
||||
self: `${req.baseUrl}/${req.params.id}`,
|
||||
submissions: `${req.baseUrl}/${req.params.id}`,
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
router.get('/:id/submissions', (req, res) => {
|
||||
res.json({
|
||||
submissions: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/:id/groups', (req, res) => {
|
||||
res.json({
|
||||
groups: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/:id/questions', (req, res) => {
|
||||
res.json({
|
||||
questions: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
export default router
|
55
backend/src/routes/class.ts
Normal file
55
backend/src/routes/class.ts
Normal file
|
@ -0,0 +1,55 @@
|
|||
import express from 'express'
|
||||
const router = express.Router();
|
||||
|
||||
// Root endpoint used to search objects
|
||||
router.get('/', (req, res) => {
|
||||
res.json({
|
||||
classes: [
|
||||
'0',
|
||||
'1',
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
// Information about an class with id 'id'
|
||||
router.get('/:id', (req, res) => {
|
||||
res.json({
|
||||
id: req.params.id,
|
||||
displayName: 'Klas 4B',
|
||||
teachers: [ '0' ],
|
||||
students: [ '0' ],
|
||||
joinRequests: [ '0' ],
|
||||
links: {
|
||||
self: `${req.baseUrl}/${req.params.id}`,
|
||||
classes: `${req.baseUrl}/${req.params.id}/invitations`,
|
||||
questions: `${req.baseUrl}/${req.params.id}/assignments`,
|
||||
students: `${req.baseUrl}/${req.params.id}/students`,
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
router.get('/:id/invitations', (req, res) => {
|
||||
res.json({
|
||||
invitations: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
})
|
||||
|
||||
router.get('/:id/assignments', (req, res) => {
|
||||
res.json({
|
||||
assignments: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
})
|
||||
|
||||
router.get('/:id/students', (req, res) => {
|
||||
res.json({
|
||||
students: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
})
|
||||
|
||||
export default router
|
34
backend/src/routes/group.ts
Normal file
34
backend/src/routes/group.ts
Normal file
|
@ -0,0 +1,34 @@
|
|||
import express from 'express'
|
||||
const router = express.Router();
|
||||
|
||||
// Root endpoint used to search objects
|
||||
router.get('/', (req, res) => {
|
||||
res.json({
|
||||
groups: [
|
||||
'0',
|
||||
'1',
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
// Information about a group (members, ... [TODO DOC])
|
||||
router.get('/:id', (req, res) => {
|
||||
res.json({
|
||||
id: req.params.id,
|
||||
assignment: '0',
|
||||
students: [ '0' ],
|
||||
submissions: [ '0' ],
|
||||
// Reference to other endpoint
|
||||
// Should be less hardcoded
|
||||
questions: `/group/${req.params.id}/question`,
|
||||
});
|
||||
})
|
||||
|
||||
// The list of questions a group has made
|
||||
router.get('/:id/question', (req, res) => {
|
||||
res.json({
|
||||
questions: [ '0' ],
|
||||
});
|
||||
})
|
||||
|
||||
export default router
|
27
backend/src/routes/learningObjects.ts
Normal file
27
backend/src/routes/learningObjects.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
import express from 'express';
|
||||
import {
|
||||
getAllLearningObjects,
|
||||
getLearningObject,
|
||||
} from '../controllers/learningObjects.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
// DWENGO learning objects
|
||||
|
||||
// Queries: hruid(path), full, language
|
||||
// Route to fetch list of learning objects based on hruid of learning path
|
||||
|
||||
// Route 1: list of object hruids
|
||||
// Example 1: http://localhost:3000/learningObject?hruid=un_artificiele_intelligentie
|
||||
|
||||
// Route 2: list of object data
|
||||
// Example 2: http://localhost:3000/learningObject?full=true&hruid=un_artificiele_intelligentie
|
||||
router.get('/', getAllLearningObjects);
|
||||
|
||||
// Parameter: hruid of learning object
|
||||
// Query: language
|
||||
// Route to fetch data of one learning object based on its hruid
|
||||
// Example: http://localhost:3000/learningObject/un_ai7
|
||||
router.get('/:hruid', getLearningObject);
|
||||
|
||||
export default router;
|
27
backend/src/routes/learningPaths.ts
Normal file
27
backend/src/routes/learningPaths.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
import express from 'express';
|
||||
import { getLearningPaths } from '../controllers/learningPaths.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
// DWENGO learning paths
|
||||
|
||||
// Route 1: no query
|
||||
// Fetch all learning paths
|
||||
// Example 1: http://localhost:3000/learningPath
|
||||
|
||||
// Unified route for fetching learning paths
|
||||
// Route 2: Query: hruid (list), language
|
||||
// Fetch learning paths based on hruid list
|
||||
// Example 2: http://localhost:3000/learningPath?hruid=pn_werking&hruid=art1
|
||||
|
||||
// Query: search, language
|
||||
// Route to fetch learning paths based on a searchterm
|
||||
// Example 3: http://localhost:3000/learningPath?search=robot
|
||||
|
||||
// Query: theme, anguage
|
||||
// Route to fetch learning paths based on a theme
|
||||
// Example: http://localhost:3000/learningPath?theme=kiks
|
||||
|
||||
router.get('/', getLearningPaths);
|
||||
|
||||
export default router;
|
14
backend/src/routes/login.ts
Normal file
14
backend/src/routes/login.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import express from 'express'
|
||||
const router = express.Router();
|
||||
|
||||
// Returns login paths for IDP
|
||||
router.get('/', (req, res) => {
|
||||
res.json({
|
||||
// Dummy variables, needs to be changed
|
||||
// With IDP endpoints
|
||||
leerkracht: '/login-leerkracht',
|
||||
leerling: '/login-leerling',
|
||||
});
|
||||
})
|
||||
|
||||
export default router
|
38
backend/src/routes/question.ts
Normal file
38
backend/src/routes/question.ts
Normal file
|
@ -0,0 +1,38 @@
|
|||
import express from 'express'
|
||||
const router = express.Router();
|
||||
|
||||
// Root endpoint used to search objects
|
||||
router.get('/', (req, res) => {
|
||||
res.json({
|
||||
questions: [
|
||||
'0',
|
||||
'1',
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
// Information about an question with id 'id'
|
||||
router.get('/:id', (req, res) => {
|
||||
res.json({
|
||||
id: req.params.id,
|
||||
student: '0',
|
||||
group: '0',
|
||||
time: new Date(2025, 1, 1),
|
||||
content: 'Zijn alle gehele getallen groter dan 2 gelijk aan de som van 2 priemgetallen????',
|
||||
learningObject: '0',
|
||||
links: {
|
||||
self: `${req.baseUrl}/${req.params.id}`,
|
||||
answers: `${req.baseUrl}/${req.params.id}/answers`,
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
router.get('/:id/answers', (req, res) => {
|
||||
res.json({
|
||||
answers: [
|
||||
'0'
|
||||
],
|
||||
})
|
||||
})
|
||||
|
||||
export default router
|
59
backend/src/routes/student.ts
Normal file
59
backend/src/routes/student.ts
Normal file
|
@ -0,0 +1,59 @@
|
|||
import express from 'express'
|
||||
const router = express.Router();
|
||||
|
||||
// Root endpoint used to search objects
|
||||
router.get('/', (req, res) => {
|
||||
res.json({
|
||||
students: [
|
||||
'0',
|
||||
'1',
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
// Information about a student's profile
|
||||
router.get('/:id', (req, res) => {
|
||||
res.json({
|
||||
id: req.params.id,
|
||||
firstName: 'Jimmy',
|
||||
lastName: 'Faster',
|
||||
username: 'JimmyFaster2',
|
||||
endpoints: {
|
||||
classes: `/student/${req.params.id}/classes`,
|
||||
questions: `/student/${req.params.id}/submissions`,
|
||||
invitations: `/student/${req.params.id}/assignments`,
|
||||
groups: `/student/${req.params.id}/groups`,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
// The list of classes a student is in
|
||||
router.get('/:id/classes', (req, res) => {
|
||||
res.json({
|
||||
classes: [ '0' ],
|
||||
});
|
||||
})
|
||||
|
||||
// The list of submissions a student has made
|
||||
router.get('/:id/submissions', (req, res) => {
|
||||
res.json({
|
||||
submissions: [ '0' ],
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
// The list of assignments a student has
|
||||
router.get('/:id/assignments', (req, res) => {
|
||||
res.json({
|
||||
assignments: [ '0' ],
|
||||
});
|
||||
})
|
||||
|
||||
// The list of groups a student is in
|
||||
router.get('/:id/groups', (req, res) => {
|
||||
res.json({
|
||||
groups: [ '0' ],
|
||||
});
|
||||
})
|
||||
|
||||
export default router
|
26
backend/src/routes/submission.ts
Normal file
26
backend/src/routes/submission.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import express from 'express'
|
||||
const router = express.Router();
|
||||
|
||||
// Root endpoint used to search objects
|
||||
router.get('/', (req, res) => {
|
||||
res.json({
|
||||
submissions: [
|
||||
'0',
|
||||
'1',
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
// Information about an submission with id 'id'
|
||||
router.get('/:id', (req, res) => {
|
||||
res.json({
|
||||
id: req.params.id,
|
||||
student: '0',
|
||||
group: '0',
|
||||
time: new Date(2025, 1, 1),
|
||||
content: 'Wortel 2 is rationeel',
|
||||
learningObject: '0',
|
||||
});
|
||||
})
|
||||
|
||||
export default router
|
58
backend/src/routes/teacher.ts
Normal file
58
backend/src/routes/teacher.ts
Normal file
|
@ -0,0 +1,58 @@
|
|||
import express from 'express'
|
||||
const router = express.Router();
|
||||
|
||||
// Root endpoint used to search objects
|
||||
router.get('/', (req, res) => {
|
||||
res.json({
|
||||
teachers: [
|
||||
'0',
|
||||
'1',
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
// Information about a teacher
|
||||
router.get('/:id', (req, res) => {
|
||||
res.json({
|
||||
id: req.params.id,
|
||||
firstName: 'John',
|
||||
lastName: 'Doe',
|
||||
username: 'JohnDoe1',
|
||||
links: {
|
||||
self: `${req.baseUrl}/${req.params.id}`,
|
||||
classes: `${req.baseUrl}/${req.params.id}/classes`,
|
||||
questions: `${req.baseUrl}/${req.params.id}/questions`,
|
||||
invitations: `${req.baseUrl}/${req.params.id}/invitations`,
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
// The questions students asked a teacher
|
||||
router.get('/:id/questions', (req, res) => {
|
||||
res.json({
|
||||
questions: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
// Invitations to other classes a teacher received
|
||||
router.get('/:id/invitations', (req, res) => {
|
||||
res.json({
|
||||
invitations: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
// A list with ids of classes a teacher is in
|
||||
router.get('/:id/classes', (req, res) => {
|
||||
res.json({
|
||||
classes: [
|
||||
'0'
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
export default router
|
14
backend/src/routes/themes.ts
Normal file
14
backend/src/routes/themes.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import express from 'express';
|
||||
import { getThemes, getThemeByTitle } from '../controllers/themes.js';
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
// Query: language
|
||||
// Route to fetch list of {key, title, description, image} themes in their respective language
|
||||
router.get('/', getThemes);
|
||||
|
||||
// Arg: theme (key)
|
||||
// Route to fetch list of hruids based on theme
|
||||
router.get('/:theme', getThemeByTitle);
|
||||
|
||||
export default router;
|
134
backend/src/services/learningObjects.ts
Normal file
134
backend/src/services/learningObjects.ts
Normal file
|
@ -0,0 +1,134 @@
|
|||
import { DWENGO_API_BASE } from '../config.js';
|
||||
import { fetchWithLogging } from '../util/apiHelper.js';
|
||||
import {
|
||||
FilteredLearningObject,
|
||||
LearningObjectMetadata,
|
||||
LearningObjectNode,
|
||||
LearningPathResponse,
|
||||
} from '../interfaces/learningPath.js';
|
||||
import { fetchLearningPaths } from './learningPaths.js';
|
||||
|
||||
function filterData(
|
||||
data: LearningObjectMetadata,
|
||||
htmlUrl: string
|
||||
): FilteredLearningObject {
|
||||
return {
|
||||
key: data.hruid, // Hruid learningObject (not path)
|
||||
_id: data._id,
|
||||
uuid: data.uuid,
|
||||
version: data.version,
|
||||
title: data.title,
|
||||
htmlUrl, // Url to fetch html content
|
||||
language: data.language,
|
||||
difficulty: data.difficulty,
|
||||
estimatedTime: data.estimated_time,
|
||||
available: data.available,
|
||||
teacherExclusive: data.teacher_exclusive,
|
||||
educationalGoals: data.educational_goals, // List with learningObjects
|
||||
keywords: data.keywords, // For search
|
||||
description: data.description, // For search (not an actual description)
|
||||
targetAges: data.target_ages,
|
||||
contentType: data.content_type, // Markdown, image, audio, etc.
|
||||
contentLocation: data.content_location, // If content type extern
|
||||
skosConcepts: data.skos_concepts,
|
||||
returnValue: data.return_value, // Callback response information
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a single learning object by its HRUID
|
||||
*/
|
||||
export async function getLearningObjectById(
|
||||
hruid: string,
|
||||
language: string
|
||||
): Promise<FilteredLearningObject | null> {
|
||||
const metadataUrl = `${DWENGO_API_BASE}/learningObject/getMetadata?hruid=${hruid}&language=${language}`;
|
||||
const metadata = await fetchWithLogging<LearningObjectMetadata>(
|
||||
metadataUrl,
|
||||
`Metadata for Learning Object HRUID "${hruid}" (language ${language})`
|
||||
);
|
||||
|
||||
if (!metadata) {
|
||||
console.error(`⚠️ WARNING: Learning object "${hruid}" not found.`);
|
||||
return null;
|
||||
}
|
||||
|
||||
const htmlUrl = `${DWENGO_API_BASE}/learningObject/getRaw?hruid=${hruid}&language=${language}`;
|
||||
return filterData(metadata, htmlUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic function to fetch learning objects (full data or just HRUIDs)
|
||||
*/
|
||||
async function fetchLearningObjects(
|
||||
hruid: string,
|
||||
full: boolean,
|
||||
language: string
|
||||
): Promise<FilteredLearningObject[] | string[]> {
|
||||
try {
|
||||
const learningPathResponse: LearningPathResponse =
|
||||
await fetchLearningPaths(
|
||||
[hruid],
|
||||
language,
|
||||
`Learning path for HRUID "${hruid}"`
|
||||
);
|
||||
|
||||
if (
|
||||
!learningPathResponse.success ||
|
||||
!learningPathResponse.data?.length
|
||||
) {
|
||||
console.error(
|
||||
`⚠️ WARNING: Learning path "${hruid}" exists but contains no learning objects.`
|
||||
);
|
||||
return [];
|
||||
}
|
||||
|
||||
const nodes: LearningObjectNode[] = learningPathResponse.data[0].nodes;
|
||||
|
||||
if (!full) {
|
||||
return nodes.map((node) => {
|
||||
return node.learningobject_hruid;
|
||||
});
|
||||
}
|
||||
|
||||
return await Promise.all(
|
||||
nodes.map(async (node) => {
|
||||
return getLearningObjectById(
|
||||
node.learningobject_hruid,
|
||||
language
|
||||
);
|
||||
})
|
||||
).then((objects) => {
|
||||
return objects.filter((obj): obj is FilteredLearningObject => {
|
||||
return obj !== null;
|
||||
});
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('❌ Error fetching learning objects:', error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch full learning object data (metadata)
|
||||
*/
|
||||
export async function getLearningObjectsFromPath(
|
||||
hruid: string,
|
||||
language: string
|
||||
): Promise<FilteredLearningObject[]> {
|
||||
return (await fetchLearningObjects(
|
||||
hruid,
|
||||
true,
|
||||
language
|
||||
)) as FilteredLearningObject[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch only learning object HRUIDs
|
||||
*/
|
||||
export async function getLearningObjectIdsFromPath(
|
||||
hruid: string,
|
||||
language: string
|
||||
): Promise<string[]> {
|
||||
return (await fetchLearningObjects(hruid, false, language)) as string[];
|
||||
}
|
61
backend/src/services/learningPaths.ts
Normal file
61
backend/src/services/learningPaths.ts
Normal file
|
@ -0,0 +1,61 @@
|
|||
import { fetchWithLogging } from '../util/apiHelper.js';
|
||||
import { DWENGO_API_BASE } from '../config.js';
|
||||
import {
|
||||
LearningPath,
|
||||
LearningPathResponse,
|
||||
} from '../interfaces/learningPath.js';
|
||||
|
||||
export async function fetchLearningPaths(
|
||||
hruids: string[],
|
||||
language: string,
|
||||
source: string
|
||||
): Promise<LearningPathResponse> {
|
||||
if (hruids.length === 0) {
|
||||
return {
|
||||
success: false,
|
||||
source,
|
||||
data: null,
|
||||
message: `No HRUIDs provided for ${source}.`,
|
||||
};
|
||||
}
|
||||
|
||||
const apiUrl = `${DWENGO_API_BASE}/learningPath/getPathsFromIdList`;
|
||||
const params = { pathIdList: JSON.stringify({ hruids }), language };
|
||||
|
||||
const learningPaths = await fetchWithLogging<LearningPath[]>(
|
||||
apiUrl,
|
||||
`Learning paths for ${source}`,
|
||||
params
|
||||
);
|
||||
|
||||
if (!learningPaths || learningPaths.length === 0) {
|
||||
console.error(`⚠️ WARNING: No learning paths found for ${source}.`);
|
||||
return {
|
||||
success: false,
|
||||
source,
|
||||
data: [],
|
||||
message: `No learning paths found for ${source}.`,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
source,
|
||||
data: learningPaths,
|
||||
};
|
||||
}
|
||||
|
||||
export async function searchLearningPaths(
|
||||
query: string,
|
||||
language: string
|
||||
): Promise<LearningPath[]> {
|
||||
const apiUrl = `${DWENGO_API_BASE}/learningPath/search`;
|
||||
const params = { all: query, language };
|
||||
|
||||
const searchResults = await fetchWithLogging<LearningPath[]>(
|
||||
apiUrl,
|
||||
`Search learning paths with query "${query}"`,
|
||||
params
|
||||
);
|
||||
return searchResults ?? [];
|
||||
}
|
43
backend/src/util/apiHelper.ts
Normal file
43
backend/src/util/apiHelper.ts
Normal file
|
@ -0,0 +1,43 @@
|
|||
import axios, { AxiosRequestConfig } from 'axios';
|
||||
|
||||
// !!!! when logger is done -> change
|
||||
|
||||
/**
|
||||
* Utility function to fetch data from an API endpoint with error handling.
|
||||
* Logs errors but does NOT throw exceptions to keep the system running.
|
||||
*
|
||||
* @param url The API endpoint to fetch from.
|
||||
* @param description A short description of what is being fetched (for logging).
|
||||
* @param params
|
||||
* @returns The response data if successful, or null if an error occurs.
|
||||
*/
|
||||
export async function fetchWithLogging<T>(
|
||||
url: string,
|
||||
description: string,
|
||||
params?: Record<string, any>
|
||||
): Promise<T | null> {
|
||||
try {
|
||||
const config: AxiosRequestConfig = params ? { params } : {};
|
||||
|
||||
const response = await axios.get<T>(url, config);
|
||||
return response.data;
|
||||
} catch (error: any) {
|
||||
if (error.response) {
|
||||
if (error.response.status === 404) {
|
||||
console.error(
|
||||
`❌ ERROR: ${description} not found (404) at "${url}".`
|
||||
);
|
||||
} else {
|
||||
console.error(
|
||||
`❌ ERROR: Failed to fetch ${description}. Status: ${error.response.status} - ${error.response.statusText} (URL: "${url}")`
|
||||
);
|
||||
}
|
||||
} else {
|
||||
console.error(
|
||||
`❌ ERROR: Network or unexpected error when fetching ${description}:`,
|
||||
error.message
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
45
backend/src/util/envvars.ts
Normal file
45
backend/src/util/envvars.ts
Normal file
|
@ -0,0 +1,45 @@
|
|||
const PREFIX = 'DWENGO_';
|
||||
const DB_PREFIX = PREFIX + 'DB_';
|
||||
|
||||
type EnvVar = { key: string; required?: boolean; defaultValue?: any };
|
||||
|
||||
export const EnvVars: { [key: string]: EnvVar } = {
|
||||
Port: { key: PREFIX + 'PORT', defaultValue: 3000 },
|
||||
DbHost: { key: DB_PREFIX + 'HOST', required: true },
|
||||
DbPort: { key: DB_PREFIX + 'PORT', defaultValue: 5432 },
|
||||
DbName: { key: DB_PREFIX + 'NAME', defaultValue: 'dwengo' },
|
||||
DbUsername: { key: DB_PREFIX + 'USERNAME', required: true },
|
||||
DbPassword: { key: DB_PREFIX + 'PASSWORD', required: true },
|
||||
DbUpdate: { key: DB_PREFIX + 'UPDATE', defaultValue: false },
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Returns the value of the given environment variable if it is set.
|
||||
* Otherwise,
|
||||
* - throw an error if the environment variable was required,
|
||||
* - return the default value if there is one and it was not required,
|
||||
* - return an empty string if the environment variable is not required and there is also no default.
|
||||
* @param envVar The properties of the environment variable (from the EnvVar object).
|
||||
*/
|
||||
export function getEnvVar(envVar: EnvVar): string {
|
||||
const value: string | undefined = process.env[envVar.key];
|
||||
if (value) {
|
||||
return value;
|
||||
} else if (envVar.required) {
|
||||
throw new Error(`Missing environment variable: ${envVar.key}`);
|
||||
} else {
|
||||
return envVar.defaultValue || '';
|
||||
}
|
||||
}
|
||||
|
||||
export function getNumericEnvVar(envVar: EnvVar): number {
|
||||
const valueString = getEnvVar(envVar);
|
||||
const value = parseInt(valueString);
|
||||
if (isNaN(value)) {
|
||||
throw new Error(
|
||||
`Invalid value for environment variable ${envVar.key}: ${valueString}. Expected a number.`
|
||||
);
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
33
backend/tests/data/users.test.ts
Normal file
33
backend/tests/data/users.test.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import {setupTestApp} from "../setup-tests.js"
|
||||
import {Student} from "../../src/entities/users/student.entity.js";
|
||||
import {describe, it, expect, beforeAll} from "vitest";
|
||||
import {StudentRepository} from "../../src/data/users/student-repository.js";
|
||||
import {getStudentRepository} from "../../src/data/repositories.js";
|
||||
|
||||
const username = "teststudent";
|
||||
const firstName = "John";
|
||||
const lastName = "Doe";
|
||||
describe("StudentRepository", () => {
|
||||
let studentRepository: StudentRepository;
|
||||
|
||||
beforeAll(async () => {
|
||||
await setupTestApp();
|
||||
studentRepository = getStudentRepository();
|
||||
});
|
||||
|
||||
it("should return the queried student after he was added", async () => {
|
||||
await studentRepository.insert(new Student(username, firstName, lastName));
|
||||
|
||||
const retrievedStudent = await studentRepository.findByUsername(username);
|
||||
expect(retrievedStudent).toBeTruthy();
|
||||
expect(retrievedStudent?.firstName).toBe(firstName);
|
||||
expect(retrievedStudent?.lastName).toBe(lastName);
|
||||
});
|
||||
|
||||
it("should no longer return the queried student after he was removed again", async () => {
|
||||
await studentRepository.deleteByUsername(username);
|
||||
|
||||
const retrievedStudent = await studentRepository.findByUsername(username);
|
||||
expect(retrievedStudent).toBeNull();
|
||||
});
|
||||
});
|
|
@ -4,6 +4,6 @@ describe("Sample test", () => {
|
|||
it("should sum to 2", () => {
|
||||
const expected = 2;
|
||||
const result = 1 + 1;
|
||||
expect(result).toBe(expected);
|
||||
expect(result).equals(expected);
|
||||
});
|
||||
})
|
||||
|
|
7
backend/tests/setup-tests.ts
Normal file
7
backend/tests/setup-tests.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import {initORM} from "../src/orm.js";
|
||||
import dotenv from "dotenv";
|
||||
|
||||
export async function setupTestApp() {
|
||||
dotenv.config({path: ".env.test"});
|
||||
await initORM(true);
|
||||
}
|
8
backend/vitest.config.ts
Normal file
8
backend/vitest.config.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
environment: 'node',
|
||||
globals: true
|
||||
}
|
||||
});
|
|
@ -6,10 +6,9 @@ services:
|
|||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: postgres
|
||||
ports:
|
||||
- '5432:5432'
|
||||
- '5431:5432'
|
||||
volumes:
|
||||
- dwengo_postgres_data:/var/lib/postgresql/data
|
||||
- ./backend/config/db/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
|
||||
logging:
|
||||
image: grafana/loki:latest
|
||||
|
|
BIN
docs/architecture/schema.png
Normal file
BIN
docs/architecture/schema.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 105 KiB |
30
docs/architecture/schema.py
Normal file
30
docs/architecture/schema.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
from diagrams import Cluster, Diagram
|
||||
from diagrams.custom import Custom
|
||||
from diagrams.onprem.certificates import LetsEncrypt
|
||||
from diagrams.onprem.container import Docker
|
||||
from diagrams.onprem.database import PostgreSQL
|
||||
from diagrams.onprem.logging import Loki
|
||||
from diagrams.onprem.monitoring import Grafana
|
||||
from diagrams.onprem.network import Nginx
|
||||
from diagrams.programming.framework import Vue
|
||||
from diagrams.programming.language import Nodejs
|
||||
from diagrams.programming.flowchart import InputOutput
|
||||
|
||||
with Diagram("Dwengo-1 architectuur", filename="docs/architecture/schema", show=False):
|
||||
reverse_proxy = Nginx("reverse proxy")
|
||||
reverse_proxy >> LetsEncrypt("SSL")
|
||||
|
||||
with Cluster("Docker"):
|
||||
Docker()
|
||||
|
||||
frontend = Vue("/")
|
||||
backend = Nodejs("/api")
|
||||
reverse_proxy >> frontend
|
||||
frontend >> backend >> InputOutput("MikroORM") >> PostgreSQL()
|
||||
|
||||
backend >> Loki("logging") >> Grafana("monitoring")
|
||||
|
||||
with Cluster("Dwengo"):
|
||||
dwengo = Custom("Dwengo", "../../assets/img/dwengo-groen-zwart.png")
|
||||
|
||||
backend >> dwengo
|
1
docs/requirements.txt
Normal file
1
docs/requirements.txt
Normal file
|
@ -0,0 +1 @@
|
|||
diagrams==0.24.1
|
|
@ -6,6 +6,8 @@ This template should help get you started developing with Vue 3 in Vite.
|
|||
|
||||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
||||
|
||||
Webstorm should work out of the box.
|
||||
|
||||
## Type Support for `.vue` Imports in TS
|
||||
|
||||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
||||
|
|
6825
frontend/package-lock.json
generated
6825
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,91 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { RouterLink, RouterView } from "vue-router";
|
||||
import HelloWorld from "./components/HelloWorld.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header>
|
||||
<img
|
||||
alt="Vue logo"
|
||||
class="logo"
|
||||
src="@/assets/logo.svg"
|
||||
width="125"
|
||||
height="125"
|
||||
/>
|
||||
|
||||
<div class="wrapper">
|
||||
<HelloWorld msg="You did it!" />
|
||||
|
||||
<nav>
|
||||
<RouterLink to="/">Home</RouterLink>
|
||||
<RouterLink to="/about">About</RouterLink>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<RouterView />
|
||||
<router-view/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
header {
|
||||
line-height: 1.5;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: block;
|
||||
margin: 0 auto 2rem;
|
||||
}
|
||||
|
||||
nav {
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
nav a.router-link-exact-active {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
nav a.router-link-exact-active:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
nav a {
|
||||
display: inline-block;
|
||||
padding: 0 1rem;
|
||||
border-left: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
nav a:first-of-type {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
header {
|
||||
display: flex;
|
||||
place-items: center;
|
||||
padding-right: calc(var(--section-gap) / 2);
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin: 0 2rem 0 0;
|
||||
}
|
||||
|
||||
header .wrapper {
|
||||
display: flex;
|
||||
place-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
nav {
|
||||
text-align: left;
|
||||
margin-left: -1rem;
|
||||
font-size: 1rem;
|
||||
|
||||
padding: 1rem 0;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
11
frontend/src/components/BrowseThemes.vue
Normal file
11
frontend/src/components/BrowseThemes.vue
Normal file
|
@ -0,0 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
// This component contains a list with all themes and will be shown on a student's and teacher's homepage.
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main></main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
11
frontend/src/components/LearningPath.vue
Normal file
11
frontend/src/components/LearningPath.vue
Normal file
|
@ -0,0 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main></main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
186
frontend/src/components/MenuBar.vue
Normal file
186
frontend/src/components/MenuBar.vue
Normal file
|
@ -0,0 +1,186 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import dwengoLogo from "../../../assets/img/dwengo-groen-zwart.svg";
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
// Instantiate variables to use in html to render right
|
||||
// Links and content dependent on the role (student or teacher)
|
||||
const isTeacher = route.path.includes("teacher");
|
||||
|
||||
const userId = route.params.id as string;
|
||||
|
||||
const role = isTeacher ? "teacher" : "student";
|
||||
const name = "Kurt Cobain";
|
||||
const initials = name
|
||||
.split(" ")
|
||||
.map((n) => {
|
||||
return n[0];
|
||||
})
|
||||
.join("");
|
||||
|
||||
const languages = ref([
|
||||
{ name: "English", code: "en" },
|
||||
{ name: "Nederlands", code: "nl" },
|
||||
]);
|
||||
|
||||
// Logic to change the language of the website to the selected language
|
||||
const changeLanguage = (langCode: string) => {
|
||||
console.log(langCode);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<nav class="menu">
|
||||
<div class="left">
|
||||
<ul>
|
||||
<li>
|
||||
<router-link
|
||||
:to="`/${role}/${userId}`"
|
||||
class="dwengo_home"
|
||||
>
|
||||
<img
|
||||
class="dwengo_logo"
|
||||
:src="dwengoLogo"
|
||||
/>
|
||||
<p class="caption">
|
||||
{{ role }}
|
||||
</p>
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<router-link
|
||||
:to="`/${role}/${userId}/assignment`"
|
||||
class="menu_item"
|
||||
>
|
||||
assignments
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<router-link
|
||||
:to="`/${role}/${userId}/class`"
|
||||
class="menu_item"
|
||||
>classes</router-link
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<router-link
|
||||
:to="`/${role}/${userId}/discussion`"
|
||||
class="menu_item"
|
||||
>discussions</router-link
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<v-menu open-on-hover>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-btn
|
||||
v-bind="props"
|
||||
icon
|
||||
variant="text"
|
||||
>
|
||||
<v-icon
|
||||
icon="mdi-translate"
|
||||
size="small"
|
||||
color="#0e6942"
|
||||
></v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item
|
||||
v-for="(language, index) in languages"
|
||||
:key="index"
|
||||
@click="changeLanguage(language.code)"
|
||||
>
|
||||
<v-list-item-title>{{ language.name }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="right">
|
||||
<li>
|
||||
<router-link :to="`/login`">
|
||||
<v-tooltip
|
||||
text="log out"
|
||||
location="bottom"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-icon
|
||||
v-bind="props"
|
||||
icon="mdi-logout"
|
||||
size="x-large"
|
||||
color="#0e6942"
|
||||
></v-icon>
|
||||
</template>
|
||||
</v-tooltip>
|
||||
</router-link>
|
||||
</li>
|
||||
<li>
|
||||
<v-avatar
|
||||
size="large"
|
||||
color="#0e6942"
|
||||
style="font-size: large; font-weight: bold"
|
||||
>{{ initials }}</v-avatar
|
||||
>
|
||||
</li>
|
||||
</div>
|
||||
</nav>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.menu {
|
||||
background-color: #f6faf2;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.right {
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.right li {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
display: flex;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
gap: 15px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.dwengo_home {
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.dwengo_logo {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.caption {
|
||||
color: black;
|
||||
margin-top: -25px;
|
||||
}
|
||||
|
||||
.menu_item {
|
||||
color: #0e6942;
|
||||
text-decoration: none;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
nav a.router-link-active {
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
|
@ -1,178 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import WelcomeItem from "./WelcomeItem.vue";
|
||||
import DocumentationIcon from "./icons/IconDocumentation.vue";
|
||||
import ToolingIcon from "./icons/IconTooling.vue";
|
||||
import EcosystemIcon from "./icons/IconEcosystem.vue";
|
||||
import CommunityIcon from "./icons/IconCommunity.vue";
|
||||
import SupportIcon from "./icons/IconSupport.vue";
|
||||
|
||||
function openReadmeInEditor() {
|
||||
return fetch("/__open-in-editor?file=README.md");
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<WelcomeItem>
|
||||
<template #icon>
|
||||
<DocumentationIcon />
|
||||
</template>
|
||||
<template #heading>Documentation</template>
|
||||
|
||||
Vue’s
|
||||
<a
|
||||
href="https://vuejs.org/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>official documentation</a
|
||||
>
|
||||
provides you with all information you need to get started.
|
||||
</WelcomeItem>
|
||||
|
||||
<WelcomeItem>
|
||||
<template #icon>
|
||||
<ToolingIcon />
|
||||
</template>
|
||||
<template #heading>Tooling</template>
|
||||
|
||||
This project is served and bundled with
|
||||
<a
|
||||
href="https://vite.dev/guide/features.html"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Vite</a
|
||||
>. The recommended IDE setup is
|
||||
<a
|
||||
href="https://code.visualstudio.com/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>VSCode</a
|
||||
>
|
||||
+
|
||||
<a
|
||||
href="https://github.com/johnsoncodehk/volar"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Volar</a
|
||||
>. If you need to test your components and web pages, check out
|
||||
<a
|
||||
href="https://vitest.dev/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Vitest</a
|
||||
>
|
||||
and
|
||||
<a
|
||||
href="https://www.cypress.io/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Cypress</a
|
||||
>
|
||||
/
|
||||
<a
|
||||
href="https://playwright.dev/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Playwright</a
|
||||
>.
|
||||
|
||||
<br />
|
||||
|
||||
More instructions are available in
|
||||
<a
|
||||
href="javascript:void(0)"
|
||||
@click="openReadmeInEditor"
|
||||
><code>README.md</code></a
|
||||
>.
|
||||
</WelcomeItem>
|
||||
|
||||
<WelcomeItem>
|
||||
<template #icon>
|
||||
<EcosystemIcon />
|
||||
</template>
|
||||
<template #heading>Ecosystem</template>
|
||||
|
||||
Get official tools and libraries for your project:
|
||||
<a
|
||||
href="https://pinia.vuejs.org/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Pinia</a
|
||||
>,
|
||||
<a
|
||||
href="https://router.vuejs.org/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Vue Router</a
|
||||
>,
|
||||
<a
|
||||
href="https://test-utils.vuejs.org/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Vue Test Utils</a
|
||||
>, and
|
||||
<a
|
||||
href="https://github.com/vuejs/devtools"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Vue Dev Tools</a
|
||||
>. If you need more resources, we suggest paying
|
||||
<a
|
||||
href="https://github.com/vuejs/awesome-vue"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Awesome Vue</a
|
||||
>
|
||||
a visit.
|
||||
</WelcomeItem>
|
||||
|
||||
<WelcomeItem>
|
||||
<template #icon>
|
||||
<CommunityIcon />
|
||||
</template>
|
||||
<template #heading>Community</template>
|
||||
|
||||
Got stuck? Ask your question on
|
||||
<a
|
||||
href="https://chat.vuejs.org"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>Vue Land</a
|
||||
>
|
||||
(our official Discord server), or
|
||||
<a
|
||||
href="https://stackoverflow.com/questions/tagged/vue.js"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>StackOverflow</a
|
||||
>. You should also follow the official
|
||||
<a
|
||||
href="https://bsky.app/profile/vuejs.org"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>@vuejs.org</a
|
||||
>
|
||||
Bluesky account or the
|
||||
<a
|
||||
href="https://x.com/vuejs"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>@vuejs</a
|
||||
>
|
||||
X account for latest news in the Vue world.
|
||||
</WelcomeItem>
|
||||
|
||||
<WelcomeItem>
|
||||
<template #icon>
|
||||
<SupportIcon />
|
||||
</template>
|
||||
<template #heading>Support Vue</template>
|
||||
|
||||
As an independent project, Vue relies on community backing for its sustainability. You can help us by
|
||||
<a
|
||||
href="https://vuejs.org/sponsor/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>becoming a sponsor</a
|
||||
>.
|
||||
</WelcomeItem>
|
||||
</template>
|
|
@ -1,87 +0,0 @@
|
|||
<template>
|
||||
<div class="item">
|
||||
<i>
|
||||
<slot name="icon"></slot>
|
||||
</i>
|
||||
<div class="details">
|
||||
<h3>
|
||||
<slot name="heading"></slot>
|
||||
</h3>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.item {
|
||||
margin-top: 2rem;
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.details {
|
||||
flex: 1;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
i {
|
||||
display: flex;
|
||||
place-items: center;
|
||||
place-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.4rem;
|
||||
color: var(--color-heading);
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.item {
|
||||
margin-top: 0;
|
||||
padding: 0.4rem 0 1rem calc(var(--section-gap) / 2);
|
||||
}
|
||||
|
||||
i {
|
||||
top: calc(50% - 25px);
|
||||
left: -26px;
|
||||
position: absolute;
|
||||
border: 1px solid var(--color-border);
|
||||
background: var(--color-background);
|
||||
border-radius: 8px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.item:before {
|
||||
content: " ";
|
||||
border-left: 1px solid var(--color-border);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: calc(50% + 25px);
|
||||
height: calc(50% - 25px);
|
||||
}
|
||||
|
||||
.item:after {
|
||||
content: " ";
|
||||
border-left: 1px solid var(--color-border);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: calc(50% + 25px);
|
||||
height: calc(50% - 25px);
|
||||
}
|
||||
|
||||
.item:first-of-type:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.item:last-of-type:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,7 +1,7 @@
|
|||
import { describe, it, expect } from "vitest";
|
||||
|
||||
import { mount } from "@vue/test-utils";
|
||||
import HelloWorld from "../HelloWorld.vue";
|
||||
import HelloWorld from "./HelloWorld.vue";
|
||||
|
||||
describe("HelloWorld", () => {
|
||||
it("renders properly", () => {
|
||||
|
|
11
frontend/src/components/errors/NotFound.vue
Normal file
11
frontend/src/components/errors/NotFound.vue
Normal file
|
@ -0,0 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<b>404 - Page Not Found</b>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -1,12 +0,0 @@
|
|||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path
|
||||
d="M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
|
@ -1,12 +0,0 @@
|
|||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="17"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path
|
||||
d="M11 2.253a1 1 0 1 0-2 0h2zm-2 13a1 1 0 1 0 2 0H9zm.447-12.167a1 1 0 1 0 1.107-1.666L9.447 3.086zM1 2.253L.447 1.42A1 1 0 0 0 0 2.253h1zm0 13H0a1 1 0 0 0 1.553.833L1 15.253zm8.447.833a1 1 0 1 0 1.107-1.666l-1.107 1.666zm0-14.666a1 1 0 1 0 1.107 1.666L9.447 1.42zM19 2.253h1a1 1 0 0 0-.447-.833L19 2.253zm0 13l-.553.833A1 1 0 0 0 20 15.253h-1zm-9.553-.833a1 1 0 1 0 1.107 1.666L9.447 14.42zM9 2.253v13h2v-13H9zm1.553-.833C9.203.523 7.42 0 5.5 0v2c1.572 0 2.961.431 3.947 1.086l1.107-1.666zM5.5 0C3.58 0 1.797.523.447 1.42l1.107 1.666C2.539 2.431 3.928 2 5.5 2V0zM0 2.253v13h2v-13H0zm1.553 13.833C2.539 15.431 3.928 15 5.5 15v-2c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM5.5 15c1.572 0 2.961.431 3.947 1.086l1.107-1.666C9.203 13.523 7.42 13 5.5 13v2zm5.053-11.914C11.539 2.431 12.928 2 14.5 2V0c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM14.5 2c1.573 0 2.961.431 3.947 1.086l1.107-1.666C18.203.523 16.421 0 14.5 0v2zm3.5.253v13h2v-13h-2zm1.553 12.167C18.203 13.523 16.421 13 14.5 13v2c1.573 0 2.961.431 3.947 1.086l1.107-1.666zM14.5 13c-1.92 0-3.703.523-5.053 1.42l1.107 1.666C11.539 15.431 12.928 15 14.5 15v-2z"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
|
@ -1,12 +0,0 @@
|
|||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="18"
|
||||
height="20"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path
|
||||
d="M11.447 8.894a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm0 1.789a1 1 0 1 0 .894-1.789l-.894 1.789zM7.447 7.106a1 1 0 1 0-.894 1.789l.894-1.789zM10 9a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0H8zm9.447-5.606a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm2 .789a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zM18 5a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0h-2zm-5.447-4.606a1 1 0 1 0 .894-1.789l-.894 1.789zM9 1l.447-.894a1 1 0 0 0-.894 0L9 1zm-2.447.106a1 1 0 1 0 .894 1.789l-.894-1.789zm-6 3a1 1 0 1 0 .894 1.789L.553 4.106zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zm-2-.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 2.789a1 1 0 1 0 .894-1.789l-.894 1.789zM2 5a1 1 0 1 0-2 0h2zM0 7.5a1 1 0 1 0 2 0H0zm8.553 12.394a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 1a1 1 0 1 0 .894 1.789l-.894-1.789zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zM8 19a1 1 0 1 0 2 0H8zm2-2.5a1 1 0 1 0-2 0h2zm-7.447.394a1 1 0 1 0 .894-1.789l-.894 1.789zM1 15H0a1 1 0 0 0 .553.894L1 15zm1-2.5a1 1 0 1 0-2 0h2zm12.553 2.606a1 1 0 1 0 .894 1.789l-.894-1.789zM17 15l.447.894A1 1 0 0 0 18 15h-1zm1-2.5a1 1 0 1 0-2 0h2zm-7.447-5.394l-2 1 .894 1.789 2-1-.894-1.789zm-1.106 1l-2-1-.894 1.789 2 1 .894-1.789zM8 9v2.5h2V9H8zm8.553-4.894l-2 1 .894 1.789 2-1-.894-1.789zm.894 0l-2-1-.894 1.789 2 1 .894-1.789zM16 5v2.5h2V5h-2zm-4.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zm-2.894-1l-2 1 .894 1.789 2-1L8.553.106zM1.447 5.894l2-1-.894-1.789-2 1 .894 1.789zm-.894 0l2 1 .894-1.789-2-1-.894 1.789zM0 5v2.5h2V5H0zm9.447 13.106l-2-1-.894 1.789 2 1 .894-1.789zm0 1.789l2-1-.894-1.789-2 1 .894 1.789zM10 19v-2.5H8V19h2zm-6.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zM2 15v-2.5H0V15h2zm13.447 1.894l2-1-.894-1.789-2 1 .894 1.789zM18 15v-2.5h-2V15h2z"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
|
@ -1,12 +0,0 @@
|
|||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="20"
|
||||
height="20"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path
|
||||
d="M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.666.105 5.5 5.5 0 0 0-.114 7.665L10 18.78l8.39-8.4a5.5 5.5 0 0 0-.114-7.665 5.5 5.5 0 0 0-7.666-.105l-.61.61z"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
|
@ -1,19 +0,0 @@
|
|||
<!-- This icon is from <https://github.com/Templarian/MaterialDesign>, distributed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) license-->
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
aria-hidden="true"
|
||||
role="img"
|
||||
class="iconify iconify--mdi"
|
||||
width="24"
|
||||
height="24"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M20 18v-4h-3v1h-2v-1H9v1H7v-1H4v4h16M6.33 8l-1.74 4H7v-1h2v1h6v-1h2v1h2.41l-1.74-4H6.33M9 5v1h6V5H9m12.84 7.61c.1.22.16.48.16.8V18c0 .53-.21 1-.6 1.41c-.4.4-.85.59-1.4.59H4c-.55 0-1-.19-1.4-.59C2.21 19 2 18.53 2 18v-4.59c0-.32.06-.58.16-.8L4.5 7.22C4.84 6.41 5.45 6 6.33 6H7V5c0-.55.18-1 .57-1.41C7.96 3.2 8.44 3 9 3h6c.56 0 1.04.2 1.43.59c.39.41.57.86.57 1.41v1h.67c.88 0 1.49.41 1.83 1.22l2.34 5.39z"
|
||||
fill="currentColor"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
|
@ -1,4 +1,3 @@
|
|||
import "./assets/main.css";
|
||||
import { createApp } from "vue";
|
||||
|
||||
// Vuetify
|
||||
|
@ -15,6 +14,11 @@ const app = createApp(App);
|
|||
|
||||
app.use(router);
|
||||
|
||||
const link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.href = "https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css";
|
||||
document.head.appendChild(link);
|
||||
|
||||
const vuetify = createVuetify({
|
||||
components,
|
||||
directives,
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
import { createRouter, createWebHistory } from "vue-router";
|
||||
import HomeView from "../views/HomeView.vue";
|
||||
import {createRouter, createWebHistory} from "vue-router";
|
||||
import MenuBar from "@/components/MenuBar.vue";
|
||||
import StudentHomepage from "@/views/StudentHomepage.vue";
|
||||
import StudentAssignments from "@/views/assignments/StudentAssignments.vue";
|
||||
import StudentClasses from "@/views/classes/StudentClasses.vue";
|
||||
import StudentDiscussions from "@/views/discussions/StudentDiscussions.vue";
|
||||
import TeacherHomepage from "@/views/TeacherHomepage.vue";
|
||||
import TeacherAssignments from "@/views/assignments/TeacherAssignments.vue";
|
||||
import TeacherClasses from "@/views/classes/TeacherClasses.vue";
|
||||
import TeacherDiscussions from "@/views/discussions/TeacherDiscussions.vue";
|
||||
import SingleAssignment from "@/views/assignments/SingleAssignment.vue";
|
||||
import SingleClass from "@/views/classes/SingleClass.vue";
|
||||
import SingleDiscussion from "@/views/discussions/SingleDiscussion.vue";
|
||||
import NotFound from "@/components/errors/NotFound.vue";
|
||||
import CreateClass from "@/views/classes/CreateClass.vue";
|
||||
import CreateAssignment from "@/views/assignments/CreateAssignment.vue";
|
||||
import CreateDiscussion from "@/views/discussions/CreateDiscussion.vue";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
|
@ -7,17 +22,102 @@ const router = createRouter({
|
|||
{
|
||||
path: "/",
|
||||
name: "home",
|
||||
component: HomeView,
|
||||
component: () => {return import("../views/HomePage.vue")},
|
||||
},
|
||||
{
|
||||
path: "/about",
|
||||
name: "about",
|
||||
// Route level code-splitting
|
||||
// This generates a separate chunk (About.[hash].js) for this route
|
||||
// Which is lazy-loaded when the route is visited.
|
||||
component: () => {
|
||||
return import("../views/AboutView.vue");
|
||||
},
|
||||
path: "/login",
|
||||
name: "LoginPage",
|
||||
component: () => {return import("../views/LoginPage.vue")}
|
||||
},
|
||||
{
|
||||
path: "/student/:id",
|
||||
component: MenuBar,
|
||||
children: [
|
||||
{
|
||||
path: "home",
|
||||
name: "StudentHomePage",
|
||||
component: StudentHomepage
|
||||
},
|
||||
{
|
||||
path: "assignment",
|
||||
name: "StudentAssignments",
|
||||
component: StudentAssignments
|
||||
},
|
||||
{
|
||||
path: "class",
|
||||
name: "StudentClasses",
|
||||
component: StudentClasses
|
||||
},
|
||||
{
|
||||
path: "discussion",
|
||||
name: "StudentDiscussions",
|
||||
component: StudentDiscussions
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: "/teacher/:id",
|
||||
component: MenuBar,
|
||||
children: [
|
||||
{
|
||||
path: "home",
|
||||
name: "TeacherHomepage",
|
||||
component: TeacherHomepage
|
||||
},
|
||||
{
|
||||
path: "assignment",
|
||||
name: "TeacherAssignments",
|
||||
component: TeacherAssignments
|
||||
},
|
||||
{
|
||||
path: "class",
|
||||
name: "TeacherClasses",
|
||||
component: TeacherClasses
|
||||
},
|
||||
{
|
||||
path: "discussion",
|
||||
name: "TeacherDiscussions",
|
||||
component: TeacherDiscussions
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/assignment/create",
|
||||
name: "CreateAssigment",
|
||||
component: CreateAssignment
|
||||
|
||||
},
|
||||
{
|
||||
path: "/assignment/:id",
|
||||
name: "SingleAssigment",
|
||||
component: SingleAssignment
|
||||
|
||||
},
|
||||
{
|
||||
path: "/class/create",
|
||||
name: "CreateClass",
|
||||
component: CreateClass
|
||||
},
|
||||
{
|
||||
path: "/class/:id",
|
||||
name: "SingleClass",
|
||||
component: SingleClass
|
||||
},
|
||||
{
|
||||
path: "/discussion/create",
|
||||
name: "CreateDiscussion",
|
||||
component: CreateDiscussion
|
||||
},
|
||||
{
|
||||
path: "/discussion/:id",
|
||||
name: "SingleDiscussion",
|
||||
component: SingleDiscussion
|
||||
},
|
||||
{
|
||||
path: "/:catchAll(.*)",
|
||||
name: "NotFound",
|
||||
component: NotFound,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
20
frontend/src/utils/base64ToImage.ts
Normal file
20
frontend/src/utils/base64ToImage.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Converts a Base64 string to a valid image source URL.
|
||||
*
|
||||
* @param base64String - The "image" field from the learning path JSON response.
|
||||
* @returns A properly formatted data URL for use in an <img> tag.
|
||||
*
|
||||
* @example
|
||||
* // Fetch the learning path data and extract the image
|
||||
* const response = await fetch( learning path route );
|
||||
* const data = await response.json();
|
||||
* const base64String = data.image;
|
||||
*
|
||||
* // Use in an <img> element
|
||||
* <img :src="convertBase64ToImageSrc(base64String)" alt="Learning Path Image" />
|
||||
*/
|
||||
export function convertBase64ToImageSrc(base64String: string): string {
|
||||
return base64String.startsWith("data:image")
|
||||
? base64String
|
||||
: `data:image/png;base64,${base64String}`;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
<template>
|
||||
<div class="about">
|
||||
<h1>This is an about page</h1>
|
||||
<v-slider></v-slider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@media (min-width: 1024px) {
|
||||
.about {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue