Merge pull request #115 from SELab-2/release/0.1.0
Milestone 1 (Release 0.1.0)
This commit is contained in:
commit
9492caa34b
306 changed files with 29940 additions and 9 deletions
7
.dockerignore
Normal file
7
.dockerignore
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
**/node_modules/
|
||||
**/dist
|
||||
.git
|
||||
npm-debug.log
|
||||
.coverage
|
||||
.coverage.*
|
||||
.env
|
||||
12
.editorconfig
Normal file
12
.editorconfig
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = tab
|
||||
tab_width = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 120
|
||||
16
.github/ISSUE_TEMPLATE/bug-report.md
vendored
16
.github/ISSUE_TEMPLATE/bug-report.md
vendored
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
name: Bug rapport
|
||||
about: Maak een bug rapport om fouten te signaleren
|
||||
title: "`error message` of beschrijving"
|
||||
title: '`error message` of beschrijving'
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Beschrijf de bug**
|
||||
|
|
@ -12,6 +11,7 @@ Een duidelijke, beknopte beschrijving van de bug.
|
|||
|
||||
**Reproductie**
|
||||
Stappen om het gedrag te reproduceren:
|
||||
|
||||
1. Ga naar '...'
|
||||
2. Klik op '....'
|
||||
3. Scroll naar beneden tot '....'
|
||||
|
|
@ -24,6 +24,14 @@ Een duidelijke, beknopte beschrijving van wat je verwacht dat er gebeurt.
|
|||
Indien van toepassing, voeg een screenshot toe die het probleem duidelijk maakt.
|
||||
|
||||
**Extra context**
|
||||
Voeg extra context over het probleem toe. Was je ergens bijzonder mee bezig of naar op zoek?
|
||||
Was je ergens bijzonder mee bezig of naar op zoek? Welke documentatie of links heb je (al) geraadpleegd?
|
||||
|
||||
- [ ] Ik heb aan deze issue het juiste label toegekend, afhankelijk van frontend, backend, ...
|
||||
<!--
|
||||
## Richtlijnen
|
||||
|
||||
Zorg ervoor dat het volgende in orde is voordat je de issue aanmaakt:
|
||||
|
||||
- Het is duidelijk waar de bug vandaan komt.
|
||||
- Ik heb aan deze issue het juiste label toegekend, afhankelijk van frontend, backend, ...
|
||||
- Ik heb de issue toegekend aan de juiste milestone.
|
||||
-->
|
||||
|
|
|
|||
14
.github/ISSUE_TEMPLATE/feature-request.md
vendored
14
.github/ISSUE_TEMPLATE/feature-request.md
vendored
|
|
@ -1,13 +1,12 @@
|
|||
---
|
||||
name: Feature aanvragen
|
||||
about: Stel een feature voor
|
||||
title: "Korte beschrijving of naam"
|
||||
title: 'Korte beschrijving of naam'
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
**Is jouw feature request gerelateerd tot een probleem? Beschrijf.**
|
||||
Een duidelijke, beknopte beschrijving van het probleem. Wat mist er? Wat kan beter?
|
||||
|
||||
**Beschrijf de oplossing die je zou willen**
|
||||
|
|
@ -16,4 +15,11 @@ Een duidelijke, beknopte beschrijving van wat je zou willen dat er gebeurt.
|
|||
**Extra context**
|
||||
Extra context of screenshots bij de feature.
|
||||
|
||||
- [ ] Ik heb aan deze issue het juiste label toegekend, afhankelijk van frontend, backend, ...
|
||||
<!--
|
||||
## Richtlijnen
|
||||
|
||||
Zorg ervoor dat het volgende in orde is voordat je de issue aanmaakt:
|
||||
|
||||
- Ik heb aan deze issue het juiste label toegekend, afhankelijk van frontend, backend, ...
|
||||
- Ik heb de issue toegekend aan de juiste milestone.
|
||||
-->
|
||||
|
|
|
|||
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.
|
||||
-->
|
||||
45
.github/workflows/lint-action.yml
vendored
Normal file
45
.github/workflows/lint-action.yml
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: Lint
|
||||
|
||||
on:
|
||||
# Trigger the workflow on push or pull request,
|
||||
# but only for the main branch
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
# Replace pull_request with pull_request_target if you
|
||||
# plan to use this action with forks, see the Limitations section
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
# Down scope as necessary via https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
|
||||
permissions:
|
||||
checks: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-linters:
|
||||
name: Run linters
|
||||
runs-on: [self-hosted, Linux, X64]
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
# ESLint and Prettier must be in `package.json`
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run linters
|
||||
uses: rkuykendall/lint-action@master
|
||||
with:
|
||||
auto_fix: true
|
||||
eslint: true
|
||||
eslint_args: '--config eslint.config.ts'
|
||||
prettier: true
|
||||
commit_message: 'style: fix linting issues met ${linter}'
|
||||
740
.gitignore
vendored
Normal file
740
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,740 @@
|
|||
# ---> Node
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# package-lock.json
|
||||
backend/package-lock.json
|
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
web_modules/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# vuepress v2.x temp and cache directory
|
||||
.temp
|
||||
.cache
|
||||
|
||||
# Docusaurus cache and generated files
|
||||
.docusaurus
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v2
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
# ---> Vue
|
||||
# gitignore template for Vue.js projects
|
||||
#
|
||||
# Recommended template: Node.gitignore
|
||||
|
||||
# TODO: where does this rule come from?
|
||||
docs/_book
|
||||
|
||||
# TODO: where does this rule come from?
|
||||
test/
|
||||
|
||||
# ---> JetBrains
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
# ---> VisualStudio
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||
*.vbp
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
*.ncb
|
||||
*.aps
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
# ---> VisualStudioCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
|
||||
# ---> macOS
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# ---> Vim
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
!*.svg # comment out if you don't need vector files
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-rt-v][a-z]
|
||||
[._]ss[a-gi-z]
|
||||
[._]sw[a-p]
|
||||
|
||||
# Session
|
||||
Session.vim
|
||||
Sessionx.vim
|
||||
|
||||
# Temporary
|
||||
.netrwhist
|
||||
*~
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
# Persistent undo
|
||||
[._]*.un~
|
||||
|
||||
# ---> Emacs
|
||||
# -*- mode: gitignore; -*-
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
auto-save-list
|
||||
tramp
|
||||
.\#*
|
||||
|
||||
# Org-mode
|
||||
.org-id-locations
|
||||
*_archive
|
||||
|
||||
# flymake-mode
|
||||
*_flymake.*
|
||||
|
||||
# eshell files
|
||||
/eshell/history
|
||||
/eshell/lastdir
|
||||
|
||||
# elpa packages
|
||||
/elpa/
|
||||
|
||||
# reftex files
|
||||
*.rel
|
||||
|
||||
# AUCTeX auto folder
|
||||
/auto/
|
||||
|
||||
# cask packages
|
||||
.cask/
|
||||
dist/
|
||||
|
||||
# Flycheck
|
||||
flycheck_*.el
|
||||
|
||||
# server auth directory
|
||||
/server/
|
||||
|
||||
# projectiles files
|
||||
.projectile
|
||||
|
||||
# directory configuration
|
||||
.dir-locals.el
|
||||
|
||||
# network security
|
||||
/network-security.data
|
||||
|
||||
|
||||
742
.prettierignore
Normal file
742
.prettierignore
Normal file
|
|
@ -0,0 +1,742 @@
|
|||
#Ignore .github files
|
||||
**/.github/**
|
||||
|
||||
# ---> Node
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# package-lock.json
|
||||
backend/package-lock.json
|
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
web_modules/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# vuepress v2.x temp and cache directory
|
||||
.temp
|
||||
.cache
|
||||
|
||||
# Docusaurus cache and generated files
|
||||
.docusaurus
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v2
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
# ---> Vue
|
||||
# gitignore template for Vue.js projects
|
||||
#
|
||||
# Recommended template: Node.gitignore
|
||||
|
||||
# TODO: where does this rule come from?
|
||||
docs/_book
|
||||
|
||||
# TODO: where does this rule come from?
|
||||
test/
|
||||
|
||||
# ---> JetBrains
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
# ---> VisualStudio
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||
*.vbp
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
*.ncb
|
||||
*.aps
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
# ---> VisualStudioCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
|
||||
# ---> macOS
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# ---> Vim
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
!*.svg # comment out if you don't need vector files
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-rt-v][a-z]
|
||||
[._]ss[a-gi-z]
|
||||
[._]sw[a-p]
|
||||
|
||||
# Session
|
||||
Session.vim
|
||||
Sessionx.vim
|
||||
|
||||
# Temporary
|
||||
.netrwhist
|
||||
*~
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
# Persistent undo
|
||||
[._]*.un~
|
||||
|
||||
# ---> Emacs
|
||||
# -*- mode: gitignore; -*-
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
auto-save-list
|
||||
tramp
|
||||
.\#*
|
||||
|
||||
# Org-mode
|
||||
.org-id-locations
|
||||
*_archive
|
||||
|
||||
# flymake-mode
|
||||
*_flymake.*
|
||||
|
||||
# eshell files
|
||||
/eshell/history
|
||||
/eshell/lastdir
|
||||
|
||||
# elpa packages
|
||||
/elpa/
|
||||
|
||||
# reftex files
|
||||
*.rel
|
||||
|
||||
# AUCTeX auto folder
|
||||
/auto/
|
||||
|
||||
# cask packages
|
||||
.cask/
|
||||
dist/
|
||||
|
||||
# Flycheck
|
||||
flycheck_*.el
|
||||
|
||||
# server auth directory
|
||||
/server/
|
||||
|
||||
# projectiles files
|
||||
.projectile
|
||||
|
||||
# directory configuration
|
||||
.dir-locals.el
|
||||
|
||||
# network security
|
||||
/network-security.data
|
||||
|
||||
10
.vscode/extensions.json
vendored
Normal file
10
.vscode/extensions.json
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"Vue.volar",
|
||||
"vitest.explorer",
|
||||
"ms-playwright.playwright",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"EditorConfig.EditorConfig",
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
||||
13
.vscode/settings.json
vendored
Normal file
13
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"explorer.fileNesting.enabled": true,
|
||||
"explorer.fileNesting.patterns": {
|
||||
"tsconfig.json": "tsconfig.*.json, env.d.ts",
|
||||
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
|
||||
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*, .editorconfig"
|
||||
},
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"editor.formatOnSave": false,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
105
CONTRIBUTING.md
Executable file
105
CONTRIBUTING.md
Executable file
|
|
@ -0,0 +1,105 @@
|
|||
# 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
|
||||
|
||||
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.
|
||||
|
||||
Gebruik de juiste [labels](https://github.com/SELab-2/Dwengo-1/labels) om te helpen een onderscheid te maken tussen verschillende categorieën issues.
|
||||
|
||||
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
|
||||
|
||||
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`.
|
||||
|
||||
Een overzicht:
|
||||
|
||||
- `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`: 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
|
||||
|
||||
**Conventionele commits**
|
||||
|
||||
Dit project maakt gebruik van [conventional commits](https://www.conventionalcommits.org/).
|
||||
|
||||
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>
|
||||
|
||||
type options:
|
||||
feat, fix, refactor, test, docs, build, ci, chore, ...
|
||||
```
|
||||
|
||||
Lees [hier](https://github.com/SELab-2/Dwengo-1/wiki/Developmentstrategie-keuzes#conventionele-commits) meer over de beslissing om conventionele commits te gebruiken.
|
||||
|
||||
**Andere tips**
|
||||
|
||||
Als je een commit 'fixt', gebruik dan [`git commit --fixup`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---fixupamendrewordltcommitgt)
|
||||
|
||||
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).
|
||||
|
||||
## Pull request
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
**Branch protection**
|
||||
|
||||
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!
|
||||
88
README.md
88
README.md
|
|
@ -1 +1,87 @@
|
|||
# Dwengo-1
|
||||
<h1 align="center">Dwengo-1</h1>
|
||||
|
||||
<p align="center">
|
||||
<span><a href="https://ugentbe-my.sharepoint.com/:f:/r/personal/bart_mesuere_ugent_be/Documents/Onderwijs/SELab2/2024-2025/mappen%20studenten/groep1" alt="OneDrive">
|
||||
OneDrive</a></span>
|
||||
<span><a href="https://www.figma.com/files/project/339220191" alt="Figma sjabloon">
|
||||
Figma</a></span>
|
||||
<span><a href="https://github.com/SELab-2/Dwengo-opgave" alt="projectopgave">
|
||||
Projectopgave</a></span>
|
||||
</p>
|
||||
|
||||
Dit is de monorepo voor [Dwengo-1](https://sel2-1.ugent.be), een interactief leerplatform waar leerkrachten opdrachten
|
||||
en lessen kunnen samenstellen hun leerlingen en hun vooruitgang kunnen opvolgen.
|
||||
|
||||
## Installatie
|
||||
|
||||
Om de applicatie in te stellen voor een productieomgeving, volg
|
||||
de [installatiehandleiding](https://github.com/SELab-2/Dwengo-1/wiki/Administrator:-Productie-omgeving).
|
||||
|
||||
Alternatief kan je één van de volgende methodes gebruiken om de applicatie lokaal te draaien.
|
||||
|
||||
### Quick start
|
||||
|
||||
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. In de backend, kopieer `.env.example` (of `.env.development.example`) naar `.env` en pas de variabelen aan waar
|
||||
nodig.
|
||||
4. Voer `docker compose up` uit in de root van de repository.
|
||||
5. Optioneel: Configureer de applicatie aan de hand van
|
||||
de [configuratiehandleiding](https://github.com/SELab-2/Dwengo-1/wiki/Administrator:-Productie-omgeving#dwengo-1-configuratie).
|
||||
|
||||
```bash
|
||||
docker compose version
|
||||
git clone https://github.com/SELab-2/Dwengo-1.git
|
||||
cd Dwengo-1/backend
|
||||
cp .env.example .env
|
||||
# Pas .env aan
|
||||
nano .env
|
||||
cd ..
|
||||
docker compose up
|
||||
# Configureer de applicatie
|
||||
```
|
||||
|
||||
### Handmatige installatie
|
||||
|
||||
Zie de submappen voor de installatie-instructies van de [frontend](./frontend/README.md)
|
||||
en [backend](./backend/README.md).
|
||||
|
||||
## Architectuur
|
||||
|
||||

|
||||
|
||||
De tech-stack bestaat uit:
|
||||
|
||||
- **Frontend**: TypeScript + Vue.js + Vuetify
|
||||
- **Backend**: TypeScript + Node.js + Express.js + TypeORM + PostgreSQL
|
||||
- **Identity provider**: Keycloak
|
||||
|
||||
Voor meer informatie over de keuze van deze tech-stack,
|
||||
zie [designkeuzes](https://github.com/SELab-2/Dwengo-1/wiki/Developer:-Design-keuzes).
|
||||
|
||||
## Testen
|
||||
|
||||
Voer volgende commando's uit om de <frontend/backend> te testen:
|
||||
|
||||
```
|
||||
npm run test:unit
|
||||
```
|
||||
|
||||
## Bijdragen aan Dwengo-1
|
||||
|
||||
Zie [CONTRIBUTING.md](./CONTRIBUTING.md) voor meer informatie over hoe je kan bijdragen aan Dwengo-1.
|
||||
|
||||
Deze rocksterren hebben bijgedragen aan Dwengo-1:
|
||||
|
||||
| Naam | Functie |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
|
||||
| [<img src="https://github.com/WhisperinCheetah.png" width="100px"/><br/><sub><b>Adriaan Jacquet</b></sub>](https://github.com/WhisperinCheetah) | Backend Lead |
|
||||
| [<img src="https://github.com/Gabriellvl.png" width="100px"/><br/><sub><b>Francisco Gabriel Van Langenhove</b></sub>](https://github.com/Gabriellvl) | Team Lead |
|
||||
| [<img src="https://github.com/geraldschmittinger.png" width="100px"/><br/><sub><b>Gerald Schmittinger</b></sub>](https://github.com/geraldschmittinger) | Database Administrator |
|
||||
| [<img src="https://github.com/joyelle436.png" width="100px"/><br/><sub><b>Joyelle Ndagijimana</b></sub>](https://github.com/joyelle436) | Frontend Lead |
|
||||
| [<img src="https://github.com/laurejablonski.png" width="100px"/><br><sub><b>Laure Jablonski</b></sub>](https://github.com/laurejablonski) | Documentatie- en Test Lead |
|
||||
| [<img src="https://github.com/tdpeuter.png" width="100px"/><br/><sub><b>Tibo De Peuter</b></sub>](https://github.com/tdpeuter) | Technische Lead |
|
||||
| [<img src="https://github.com/kloep1.png" width="100px"/><br/><sub><b>Timo De Meyst</b></sub>](https://github.com/kloep1) | System Administrator |
|
||||
|
||||
En in de toekomst misschien jij ook?
|
||||
|
|
|
|||
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 |
BIN
assets/img/keycloak.png
Normal file
BIN
assets/img/keycloak.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
28
backend/.env.development.example
Normal file
28
backend/.env.development.example
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# Basic configuration
|
||||
#
|
||||
|
||||
DWENGO_PORT=3000 # The port the backend will listen on
|
||||
DWENGO_DB_HOST=localhost
|
||||
DWENGO_DB_PORT=5431
|
||||
DWENGO_DB_USERNAME=postgres
|
||||
DWENGO_DB_PASSWORD=postgres
|
||||
DWENGO_DB_UPDATE=true
|
||||
|
||||
# Auth
|
||||
|
||||
DWENGO_AUTH_STUDENT_URL=http://localhost:7080/realms/student
|
||||
DWENGO_AUTH_STUDENT_CLIENT_ID=dwengo
|
||||
DWENGO_AUTH_STUDENT_JWKS_ENDPOINT=http://localhost:7080/realms/student/protocol/openid-connect/certs
|
||||
DWENGO_AUTH_TEACHER_URL=http://localhost:7080/realms/teacher
|
||||
DWENGO_AUTH_TEACHER_CLIENT_ID=dwengo
|
||||
DWENGO_AUTH_TEACHER_JWKS_ENDPOINT=http://localhost:7080/realms/teacher/protocol/openid-connect/certs
|
||||
|
||||
# Allow Vite dev-server to access the backend (for testing purposes). Don't forget to remove this in production!
|
||||
DWENGO_CORS_ALLOWED_ORIGINS=http://localhost:5173
|
||||
|
||||
#
|
||||
# Advanced configuration
|
||||
#
|
||||
|
||||
# LOKI_HOST=http://localhost:9001 # The address of the Loki instance, used for logging
|
||||
27
backend/.env.example
Normal file
27
backend/.env.example
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#
|
||||
# Basic configuration
|
||||
#
|
||||
|
||||
DWENGO_PORT=3000 # The port the backend will listen on
|
||||
DWENGO_DB_HOST=domain-or-ip-of-database
|
||||
DWENGO_DB_PORT=5431
|
||||
|
||||
# Change this to the actual credentials of the user Dwengo should use in the backend
|
||||
DWENGO_DB_USERNAME=postgres
|
||||
DWENGO_DB_PASSWORD=postgres
|
||||
|
||||
# Set this to true when the database scheme needs to be updated. In that case, take a backup first.
|
||||
DWENGO_DB_UPDATE=false
|
||||
|
||||
# Data for the identity provider via which the students authenticate.
|
||||
DWENGO_AUTH_STUDENT_URL=http://localhost:7080/realms/student
|
||||
DWENGO_AUTH_STUDENT_CLIENT_ID=dwengo
|
||||
DWENGO_AUTH_STUDENT_JWKS_ENDPOINT=http://localhost:7080/realms/student/protocol/openid-connect/certs
|
||||
|
||||
# Data for the identity provider via which the teachers authenticate.
|
||||
DWENGO_AUTH_TEACHER_URL=http://localhost:7080/realms/teacher
|
||||
DWENGO_AUTH_TEACHER_CLIENT_ID=dwengo
|
||||
DWENGO_AUTH_TEACHER_JWKS_ENDPOINT=http://localhost:7080/realms/teacher/protocol/openid-connect/certs
|
||||
|
||||
# The address of the Lokiinstance, used for logging
|
||||
# LOKI_HOST=http://localhost:3102
|
||||
28
backend/.env.production.example
Normal file
28
backend/.env.production.example
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
DWENGO_PORT=3000 # The port the backend will listen on
|
||||
DWENGO_DB_HOST=db # Name of the database container
|
||||
DWENGO_DB_PORT=5431
|
||||
|
||||
# Change this to the actual credentials of the user Dwengo should use in the backend
|
||||
DWENGO_DB_NAME=postgres
|
||||
DWENGO_DB_USERNAME=postgres
|
||||
DWENGO_DB_PASSWORD=postgres
|
||||
|
||||
# Set this to true when the database scheme needs to be updated. In that case, take a backup first.
|
||||
DWENGO_DB_UPDATE=false
|
||||
|
||||
# Data for the identity provider via which the students authenticate.
|
||||
DWENGO_AUTH_STUDENT_URL=https://sel2-1.ugent.be/idp/realms/student
|
||||
DWENGO_AUTH_STUDENT_CLIENT_ID=dwengo
|
||||
DWENGO_AUTH_STUDENT_JWKS_ENDPOINT=http://idp:7080/idp/realms/student/protocol/openid-connect/certs # Name of the idp container
|
||||
# Data for the identity provider via which the teachers authenticate.
|
||||
DWENGO_AUTH_TEACHER_URL=https://sel2-1.ugent.be/idp/realms/teacher
|
||||
DWENGO_AUTH_TEACHER_CLIENT_ID=dwengo
|
||||
DWENGO_AUTH_TEACHER_JWKS_ENDPOINT=http://idp:7080/idp/realms/teacher/protocol/openid-connect/certs # Name of the idp container
|
||||
|
||||
#
|
||||
# Advanced configuration
|
||||
#
|
||||
|
||||
# Logging and monitoring
|
||||
|
||||
# LOKI_HOST=http://logging:3102 # The address of the Loki instance, used for logging
|
||||
3
backend/.env.test.example
Normal file
3
backend/.env.test.example
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
PORT=3000
|
||||
DWENGO_DB_UPDATE=true
|
||||
DWENGO_DB_NAME=":memory:"
|
||||
42
backend/Dockerfile
Normal file
42
backend/Dockerfile
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
FROM node:22 AS build-stage
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
|
||||
COPY package*.json ./
|
||||
COPY backend/package.json ./backend/
|
||||
|
||||
RUN npm install --silent
|
||||
|
||||
# Build the backend
|
||||
|
||||
# Root tsconfig.json
|
||||
COPY tsconfig.json ./
|
||||
|
||||
WORKDIR /app/docs
|
||||
|
||||
COPY docs ./
|
||||
|
||||
RUN npm run swagger
|
||||
|
||||
WORKDIR /app/backend
|
||||
|
||||
COPY backend ./
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM node:22 AS production-stage
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package-lock.json backend/package.json ./
|
||||
|
||||
RUN npm install --silent --only=production
|
||||
|
||||
COPY --from=build-stage /app/backend/dist ./dist/
|
||||
COPY --from=build-stage /app/docs/api ./docs/swagger
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "--env-file=.env", "dist/app.js"]
|
||||
37
backend/README.md
Normal file
37
backend/README.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# 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
|
||||
```
|
||||
|
||||
### Tests
|
||||
|
||||
Voer volgend commando uit om de unit tests uit te voeren:
|
||||
|
||||
```
|
||||
npm run test:unit
|
||||
```
|
||||
|
||||
## Keycloak configuratie
|
||||
|
||||
Tijdens development is het voldoende om gebruik te maken van de keycloak configuratie die automatisch ingeladen wordt.
|
||||
|
||||
Voor productie is het ten sterkste aangeraden om keycloak manueel te configureren.
|
||||
Voor meer informatie, zie de [administrator-handleiding](https://github.com/SELab-2/Dwengo-1/wiki/Administrator:-Productie-omgeving#installatie-en-server-configuratie).
|
||||
343
backend/_i18n/de.yml
Normal file
343
backend/_i18n/de.yml
Normal file
|
|
@ -0,0 +1,343 @@
|
|||
# translate theme pages
|
||||
|
||||
strengths:
|
||||
title: Unsere Stärken
|
||||
innovative: Innovativ
|
||||
research_based: Forschungsbasiert
|
||||
inclusive: Inclusiv
|
||||
socially_relevant: Gesellschaftlich relevant
|
||||
innovative_text: Wir fügen ständig neue Projekte hinzu und gebrauchen neue Methoden für alle unsere Projekte.
|
||||
research_based_text: Alle Lernpakete basieren auf fundierter wissenschaftlicher Forschung.
|
||||
inclusive_text: Wir konzentrieren uns darauf, alle Kinder zu erreichen, mit besonderem Augenmerk auf die Geschlechterinklusion und die soziale Inklusion.
|
||||
socially_relevant_text: Wir suchen Projekte, die zu aktuellen Ereignissen und gesellschaftlichen Themen passen.
|
||||
summary: We develop innovative workshops and educational resources, and we provide them to students around the globe in collaboration with teachers and volunteers. Our train-the-trainer sessions enable them to bring our hands-on workshops to the students.
|
||||
main: Wir fügen kontinuierlich neue Projekte und Methoden zu all unseren Projekten hinzu. Für diese Projekte suchen wir immer nach einem gesellschaftlich relevanten Thema. Darüber hinaus stellen wir sicher, dass unser didaktisches Material auf wissenschaftlicher Forschung basiert, und wir achten immer auf Inklusivität.
|
||||
quote:
|
||||
text: Du machst etwas Praktisches, du lernst mit Hardware zu arbeiten und du kannst etwas Neues schaffen.
|
||||
name: Matthias und Bruno
|
||||
affiliation: 4. Jahr der weiterführenden Schule
|
||||
|
||||
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'
|
||||
344
backend/_i18n/en.yml
Normal file
344
backend/_i18n/en.yml
Normal file
|
|
@ -0,0 +1,344 @@
|
|||
# translate theme pages
|
||||
|
||||
strengths:
|
||||
title: Our strengths
|
||||
innovative: Innovative
|
||||
research_based: Research-based
|
||||
inclusive: Inclusive
|
||||
socially_relevant: Socially relevant
|
||||
innovative_text: We continuously add new projects and apply new methodologies in our projects.
|
||||
research_based_text: All learning materials of Dwengo are based on profound scientific research.
|
||||
inclusive_text: We target all children, making gender inclusion and accessibility for disadvantaged children a priority.
|
||||
socially_relevant_text: We look for projects that fit current events and are socially relevant.
|
||||
summary: We develop innovative workshops and educational resources, and we provide them to students around the globe in collaboration with teachers and volunteers. Our train-the-trainer sessions enable them to bring our hands-on workshops to the students.
|
||||
main: We continuously add new projects and methodologies to all our projects. For these projects, we always look for a socially relevant theme. Additionally, we ensure that our didactic material is based on scientific research and always keep an eye on inclusivity.
|
||||
quote:
|
||||
text: You make something practical, learn how to use the hardware and create something new.
|
||||
name: Matthias and Bruno
|
||||
affiliation: Grade 10
|
||||
|
||||
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'
|
||||
351
backend/_i18n/fr.yml
Normal file
351
backend/_i18n/fr.yml
Normal file
|
|
@ -0,0 +1,351 @@
|
|||
# translate theme pages
|
||||
|
||||
strengths:
|
||||
title: Nos atouts
|
||||
innovative: Innovatif
|
||||
research_based: Fondé sur la recherche
|
||||
inclusive: Inclusif
|
||||
socially_relevant: Socialement pertinent
|
||||
innovative_text: On ajoute fréquemment de nouveaux projets et utilise de nouvelles méthodologies dans les projets.
|
||||
research_based_text: Tout le matériel de cours de Dwengo ASBL est fondé sur la recherche scientifique profonde.
|
||||
inclusive_text: On se concentre à atteindre tous les enfants avec une attention particulière pour l'égalite de genre et l'inclusion sociale.
|
||||
socially_relevant_text: Nous recherchons des projects qui s'inscrivent dans l'actualité et les thèmes sociaux.
|
||||
summary: Nous développons des ateliers innovants et des ressources éducatives, et nous les fournissons aux étudiants du monde entier en collaboration avec les enseignants et les bénévoles.Nos séances de train-Trainer leur permettent d'amener nos ateliers pratiques aux étudiants.
|
||||
main: Nous ajoutons toujours de nouveaux projets et méthodologies à tous nos projets.Nous recherchons toujours un thème socialement pertinent pour ces projets.De plus, nous nous assurons toujours que notre matériel didactique est basé sur la recherche scientifique et nous gardons également un œil sur l'inclusivité.
|
||||
quote:
|
||||
text: Vous faites quelque chose de pratique, vous apprenez à travailler avec du matériel et vous pouvez exécuter quelque chose de nouveau Cre & Euml;
|
||||
name: Matthias en Bruno
|
||||
affiliation: 4e milieu
|
||||
|
||||
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'
|
||||
381
backend/_i18n/nl.yml
Normal file
381
backend/_i18n/nl.yml
Normal file
|
|
@ -0,0 +1,381 @@
|
|||
# translate theme pages
|
||||
|
||||
strengths:
|
||||
title: Verrijk je lessen met AI en robotica!
|
||||
innovative: Innovatief
|
||||
research_based: Onderzoeksgedreven
|
||||
inclusive: Inclusief
|
||||
socially_relevant: Maatschappelijk relevant
|
||||
innovative_text: We voegen steeds nieuwe projecten en methodieken toe aan onze projecten.
|
||||
research_based_text: Alle lespakketten van Dwengo vzw zijn gebaseerd op gedegen wetenschappelijk onderzoek.
|
||||
inclusive_text: We richten ons op alle kinderen en jongeren met een specifieke aandacht voor het evenwicht tussen meisjes en jongens en leerlingen uit kansengroepen.
|
||||
socially_relevant_text: We zoeken projecten uit die passen binnen de actualiteit en maatschappelijke thema's.
|
||||
summary: ''
|
||||
main: Al onze pakketten zijn gebruiksvriendelijk, maatschappelijk relevant, wetenschappelijk onderbouwd, én inclusief. Leerkrachten over de hele wereld gingen hiermee reeds aan de slag. Jij ook? Verken de lesthema's op onze website!
|
||||
quote:
|
||||
text: Je maakt iets praktisch, je leert werken met hardware en je kan zelf iets nieuws creëren.
|
||||
name: Matthias en Bruno
|
||||
affiliation: 4e middelbaar
|
||||
|
||||
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'
|
||||
7
backend/config.js
Normal file
7
backend/config.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// Can be placed in dotenv but found it redundant
|
||||
// Import dotenv from "dotenv";
|
||||
// Load .env file
|
||||
// Dotenv.config();
|
||||
export const DWENGO_API_BASE = 'https://dwengo.org/backend/api';
|
||||
export const FALLBACK_LANG = 'nl';
|
||||
export const FALLBACK_SEQ_NUM = 1;
|
||||
21
backend/eslint.config.ts
Normal file
21
backend/eslint.config.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import globals from 'globals';
|
||||
import rootConfig from '../eslint.config';
|
||||
|
||||
export default [
|
||||
...rootConfig,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: globals.node,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
files: ['tests/**/*.ts'],
|
||||
languageOptions: {
|
||||
globals: globals.node,
|
||||
},
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
56
backend/package.json
Normal file
56
backend/package.json
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"name": "dwengo-1-backend",
|
||||
"version": "0.0.1",
|
||||
"description": "Backend for Dwengo-1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production tsc --project tsconfig.json",
|
||||
"dev": "cross-env NODE_ENV=development tsx watch --env-file=.env.development.local src/app.ts",
|
||||
"start": "cross-env NODE_ENV=production node --env-file=.env dist/app.js",
|
||||
"format": "prettier --write src/",
|
||||
"format-check": "prettier --check src/",
|
||||
"lint": "eslint . --fix",
|
||||
"test:unit": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mikro-orm/core": "6.4.9",
|
||||
"@mikro-orm/knex": "6.4.9",
|
||||
"@mikro-orm/postgresql": "6.4.9",
|
||||
"@mikro-orm/reflection": "6.4.9",
|
||||
"@mikro-orm/sqlite": "6.4.9",
|
||||
"axios": "^1.8.2",
|
||||
"cors": "^2.8.5",
|
||||
"cross": "^1.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"dotenv": "^16.4.7",
|
||||
"express": "^5.0.1",
|
||||
"express-jwt": "^8.5.1",
|
||||
"gift-pegjs": "^1.0.2",
|
||||
"isomorphic-dompurify": "^2.22.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsonpath-plus": "^10.3.0",
|
||||
"jwks-rsa": "^3.1.0",
|
||||
"loki-logger-ts": "^1.0.2",
|
||||
"marked": "^15.0.7",
|
||||
"response-time": "^2.3.3",
|
||||
"swagger-ui-express": "^5.0.1",
|
||||
"uuid": "^11.1.0",
|
||||
"winston": "^3.17.0",
|
||||
"winston-loki": "^6.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mikro-orm/cli": "6.4.9",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^22.13.4",
|
||||
"@types/response-time": "^2.3.8",
|
||||
"@types/swagger-ui-express": "^4.1.8",
|
||||
"globals": "^15.15.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsx": "^4.19.3",
|
||||
"typescript": "^5.7.3",
|
||||
"vitest": "^3.0.6"
|
||||
}
|
||||
}
|
||||
37
backend/src/app.ts
Normal file
37
backend/src/app.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import express, { Express } from 'express';
|
||||
import { initORM } from './orm.js';
|
||||
import { authenticateUser } from './middleware/auth/auth.js';
|
||||
import cors from './middleware/cors.js';
|
||||
import { getLogger, Logger } from './logging/initalize.js';
|
||||
import { responseTimeLogger } from './logging/responseTimeLogger.js';
|
||||
import responseTime from 'response-time';
|
||||
import { EnvVars, getNumericEnvVar } from './util/envvars.js';
|
||||
import apiRouter from './routes/router.js';
|
||||
import swaggerMiddleware from './swagger.js';
|
||||
import swaggerUi from 'swagger-ui-express';
|
||||
|
||||
const logger: Logger = getLogger();
|
||||
|
||||
const app: Express = express();
|
||||
const port: string | number = getNumericEnvVar(EnvVars.Port);
|
||||
|
||||
app.use(express.json());
|
||||
app.use(cors);
|
||||
app.use(authenticateUser);
|
||||
// Add response time logging
|
||||
app.use(responseTime(responseTimeLogger));
|
||||
|
||||
// Swagger
|
||||
app.get('/api', apiRouter);
|
||||
|
||||
app.use('/api-docs', swaggerUi.serve, swaggerMiddleware);
|
||||
|
||||
async function startServer() {
|
||||
await initORM();
|
||||
|
||||
app.listen(port, () => {
|
||||
logger.info(`Server is running at http://localhost:${port}/api`);
|
||||
});
|
||||
}
|
||||
|
||||
await startServer();
|
||||
12
backend/src/config.ts
Normal file
12
backend/src/config.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { EnvVars, getEnvVar } from './util/envvars.js';
|
||||
import { Language } from './entities/content/language.js';
|
||||
|
||||
// API
|
||||
export const DWENGO_API_BASE = getEnvVar(EnvVars.LearningContentRepoApiBaseUrl);
|
||||
export const FALLBACK_LANG = getEnvVar(EnvVars.FallbackLanguage);
|
||||
|
||||
// Logging
|
||||
export const LOG_LEVEL: string = 'development' === process.env.NODE_ENV ? 'debug' : 'info';
|
||||
export const LOKI_HOST: string = process.env.LOKI_HOST || 'http://localhost:3102';
|
||||
|
||||
export const FALLBACK_SEQ_NUM = 1;
|
||||
76
backend/src/controllers/assignments.ts
Normal file
76
backend/src/controllers/assignments.ts
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { createAssignment, getAllAssignments, getAssignment, getAssignmentsSubmissions } from '../services/assignments.js';
|
||||
import { AssignmentDTO } from '../interfaces/assignment.js';
|
||||
|
||||
// Typescript is annoy with with parameter forwarding from class.ts
|
||||
interface AssignmentParams {
|
||||
classid: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export async function getAllAssignmentsHandler(req: Request<AssignmentParams>, res: Response): Promise<void> {
|
||||
const classid = req.params.classid;
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
const assignments = await getAllAssignments(classid, full);
|
||||
|
||||
res.json({
|
||||
assignments: assignments,
|
||||
});
|
||||
}
|
||||
|
||||
export async function createAssignmentHandler(req: Request<AssignmentParams>, res: Response): Promise<void> {
|
||||
const classid = req.params.classid;
|
||||
const assignmentData = req.body as AssignmentDTO;
|
||||
|
||||
if (!assignmentData.description || !assignmentData.language || !assignmentData.learningPath || !assignmentData.title) {
|
||||
res.status(400).json({
|
||||
error: 'Missing one or more required fields: title, description, learningPath, language',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const assignment = await createAssignment(classid, assignmentData);
|
||||
|
||||
if (!assignment) {
|
||||
res.status(500).json({ error: 'Could not create assignment ' });
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(201).json({ assignment: assignment });
|
||||
}
|
||||
|
||||
export async function getAssignmentHandler(req: Request<AssignmentParams>, res: Response): Promise<void> {
|
||||
const id = +req.params.id;
|
||||
const classid = req.params.classid;
|
||||
|
||||
if (isNaN(id)) {
|
||||
res.status(400).json({ error: 'Assignment id must be a number' });
|
||||
return;
|
||||
}
|
||||
|
||||
const assignment = await getAssignment(classid, id);
|
||||
|
||||
if (!assignment) {
|
||||
res.status(404).json({ error: 'Assignment not found' });
|
||||
return;
|
||||
}
|
||||
|
||||
res.json(assignment);
|
||||
}
|
||||
|
||||
export async function getAssignmentsSubmissionsHandler(req: Request<AssignmentParams>, res: Response): Promise<void> {
|
||||
const classid = req.params.classid;
|
||||
const assignmentNumber = +req.params.id;
|
||||
|
||||
if (isNaN(assignmentNumber)) {
|
||||
res.status(400).json({ error: 'Assignment id must be a number' });
|
||||
return;
|
||||
}
|
||||
|
||||
const submissions = await getAssignmentsSubmissions(classid, assignmentNumber);
|
||||
|
||||
res.json({
|
||||
submissions: submissions,
|
||||
});
|
||||
}
|
||||
33
backend/src/controllers/auth.ts
Normal file
33
backend/src/controllers/auth.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { EnvVars, getEnvVar } from '../util/envvars.js';
|
||||
|
||||
type FrontendIdpConfig = {
|
||||
authority: string;
|
||||
clientId: string;
|
||||
scope: string;
|
||||
responseType: string;
|
||||
};
|
||||
|
||||
type FrontendAuthConfig = {
|
||||
student: FrontendIdpConfig;
|
||||
teacher: FrontendIdpConfig;
|
||||
};
|
||||
|
||||
const SCOPE = 'openid profile email';
|
||||
const RESPONSE_TYPE = 'code';
|
||||
|
||||
export function getFrontendAuthConfig(): FrontendAuthConfig {
|
||||
return {
|
||||
student: {
|
||||
authority: getEnvVar(EnvVars.IdpStudentUrl),
|
||||
clientId: getEnvVar(EnvVars.IdpStudentClientId),
|
||||
scope: SCOPE,
|
||||
responseType: RESPONSE_TYPE,
|
||||
},
|
||||
teacher: {
|
||||
authority: getEnvVar(EnvVars.IdpTeacherUrl),
|
||||
clientId: getEnvVar(EnvVars.IdpTeacherClientId),
|
||||
scope: SCOPE,
|
||||
responseType: RESPONSE_TYPE,
|
||||
},
|
||||
};
|
||||
}
|
||||
77
backend/src/controllers/classes.ts
Normal file
77
backend/src/controllers/classes.ts
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { createClass, getAllClasses, getClass, getClassStudents, getClassStudentsIds, getClassTeacherInvitations } from '../services/class.js';
|
||||
import { ClassDTO } from '../interfaces/class.js';
|
||||
|
||||
export async function getAllClassesHandler(req: Request, res: Response): Promise<void> {
|
||||
const full = req.query.full === 'true';
|
||||
const classes = await getAllClasses(full);
|
||||
|
||||
res.json({
|
||||
classes: classes,
|
||||
});
|
||||
}
|
||||
|
||||
export async function createClassHandler(req: Request, res: Response): Promise<void> {
|
||||
const classData = req.body as ClassDTO;
|
||||
|
||||
if (!classData.displayName) {
|
||||
res.status(400).json({
|
||||
error: 'Missing one or more required fields: displayName',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const cls = await createClass(classData);
|
||||
|
||||
if (!cls) {
|
||||
res.status(500).json({ error: 'Something went wrong while creating class' });
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(201).json({ class: cls });
|
||||
}
|
||||
|
||||
export async function getClassHandler(req: Request, res: Response): Promise<void> {
|
||||
try {
|
||||
const classId = req.params.id;
|
||||
const cls = await getClass(classId);
|
||||
|
||||
if (!cls) {
|
||||
res.status(404).json({ error: 'Class not found' });
|
||||
return;
|
||||
}
|
||||
cls.endpoints = {
|
||||
self: `${req.baseUrl}/${req.params.id}`,
|
||||
invitations: `${req.baseUrl}/${req.params.id}/invitations`,
|
||||
assignments: `${req.baseUrl}/${req.params.id}/assignments`,
|
||||
students: `${req.baseUrl}/${req.params.id}/students`,
|
||||
};
|
||||
|
||||
res.json(cls);
|
||||
} catch (error) {
|
||||
console.error('Error fetching learning objects:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
|
||||
export async function getClassStudentsHandler(req: Request, res: Response): Promise<void> {
|
||||
const classId = req.params.id;
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
const students = full ? await getClassStudents(classId) : await getClassStudentsIds(classId);
|
||||
|
||||
res.json({
|
||||
students: students,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getTeacherInvitationsHandler(req: Request, res: Response): Promise<void> {
|
||||
const classId = req.params.id;
|
||||
const full = req.query.full === 'true'; // TODO: not implemented yet
|
||||
|
||||
const invitations = await getClassTeacherInvitations(classId, full);
|
||||
|
||||
res.json({
|
||||
invitations: invitations,
|
||||
});
|
||||
}
|
||||
95
backend/src/controllers/groups.ts
Normal file
95
backend/src/controllers/groups.ts
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { createGroup, getAllGroups, getGroup, getGroupSubmissions } from '../services/groups.js';
|
||||
import { GroupDTO } from '../interfaces/group.js';
|
||||
|
||||
// Typescript is annoywith with parameter forwarding from class.ts
|
||||
interface GroupParams {
|
||||
classid: string;
|
||||
assignmentid: string;
|
||||
groupid?: string;
|
||||
}
|
||||
|
||||
export async function getGroupHandler(req: Request<GroupParams>, res: Response): Promise<void> {
|
||||
const classId = req.params.classid;
|
||||
const full = req.query.full === 'true';
|
||||
const assignmentId = +req.params.assignmentid;
|
||||
|
||||
if (isNaN(assignmentId)) {
|
||||
res.status(400).json({ error: 'Assignment id must be a number' });
|
||||
return;
|
||||
}
|
||||
|
||||
const groupId = +req.params.groupid!; // Can't be undefined
|
||||
|
||||
if (isNaN(groupId)) {
|
||||
res.status(400).json({ error: 'Group id must be a number' });
|
||||
return;
|
||||
}
|
||||
|
||||
const group = await getGroup(classId, assignmentId, groupId, full);
|
||||
|
||||
res.json(group);
|
||||
}
|
||||
|
||||
export async function getAllGroupsHandler(req: Request, res: Response): Promise<void> {
|
||||
const classId = req.params.classid;
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
const assignmentId = +req.params.assignmentid;
|
||||
|
||||
if (isNaN(assignmentId)) {
|
||||
res.status(400).json({ error: 'Assignment id must be a number' });
|
||||
return;
|
||||
}
|
||||
|
||||
const groups = await getAllGroups(classId, assignmentId, full);
|
||||
|
||||
res.json({
|
||||
groups: groups,
|
||||
});
|
||||
}
|
||||
|
||||
export async function createGroupHandler(req: Request, res: Response): Promise<void> {
|
||||
const classid = req.params.classid;
|
||||
const assignmentId = +req.params.assignmentid;
|
||||
|
||||
if (isNaN(assignmentId)) {
|
||||
res.status(400).json({ error: 'Assignment id must be a number' });
|
||||
return;
|
||||
}
|
||||
|
||||
const groupData = req.body as GroupDTO;
|
||||
const group = await createGroup(groupData, classid, assignmentId);
|
||||
|
||||
if (!group) {
|
||||
res.status(500).json({ error: 'Something went wrong while creating group' });
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(201).json({ group: group });
|
||||
}
|
||||
|
||||
export async function getGroupSubmissionsHandler(req: Request, res: Response): Promise<void> {
|
||||
const classId = req.params.classid;
|
||||
// Const full = req.query.full === 'true';
|
||||
|
||||
const assignmentId = +req.params.assignmentid;
|
||||
|
||||
if (isNaN(assignmentId)) {
|
||||
res.status(400).json({ error: 'Assignment id must be a number' });
|
||||
return;
|
||||
}
|
||||
|
||||
const groupId = +req.params.groupid!; // Can't be undefined
|
||||
|
||||
if (isNaN(groupId)) {
|
||||
res.status(400).json({ error: 'Group id must be a number' });
|
||||
return;
|
||||
}
|
||||
|
||||
const submissions = await getGroupSubmissions(classId, assignmentId, groupId);
|
||||
|
||||
res.json({
|
||||
submissions: submissions,
|
||||
});
|
||||
}
|
||||
69
backend/src/controllers/learning-objects.ts
Normal file
69
backend/src/controllers/learning-objects.ts
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { FALLBACK_LANG } from '../config.js';
|
||||
import { FilteredLearningObject, LearningObjectIdentifier, LearningPathIdentifier } from '../interfaces/learning-content.js';
|
||||
import learningObjectService from '../services/learning-objects/learning-object-service.js';
|
||||
import { EnvVars, getEnvVar } from '../util/envvars.js';
|
||||
import { Language } from '../entities/content/language.js';
|
||||
import { BadRequestException } from '../exceptions.js';
|
||||
import attachmentService from '../services/learning-objects/attachment-service.js';
|
||||
import { NotFoundError } from '@mikro-orm/core';
|
||||
|
||||
function getLearningObjectIdentifierFromRequest(req: Request): LearningObjectIdentifier {
|
||||
if (!req.params.hruid) {
|
||||
throw new BadRequestException('HRUID is required.');
|
||||
}
|
||||
return {
|
||||
hruid: req.params.hruid as string,
|
||||
language: (req.query.language || getEnvVar(EnvVars.FallbackLanguage)) as Language,
|
||||
version: parseInt(req.query.version as string),
|
||||
};
|
||||
}
|
||||
|
||||
function getLearningPathIdentifierFromRequest(req: Request): LearningPathIdentifier {
|
||||
if (!req.query.hruid) {
|
||||
throw new BadRequestException('HRUID is required.');
|
||||
}
|
||||
return {
|
||||
hruid: req.params.hruid as string,
|
||||
language: (req.query.language as Language) || FALLBACK_LANG,
|
||||
};
|
||||
}
|
||||
|
||||
export async function getAllLearningObjects(req: Request, res: Response): Promise<void> {
|
||||
const learningPathId = getLearningPathIdentifierFromRequest(req);
|
||||
const full = req.query.full;
|
||||
|
||||
let learningObjects: FilteredLearningObject[] | string[];
|
||||
if (full) {
|
||||
learningObjects = await learningObjectService.getLearningObjectsFromPath(learningPathId);
|
||||
} else {
|
||||
learningObjects = await learningObjectService.getLearningObjectIdsFromPath(learningPathId);
|
||||
}
|
||||
|
||||
res.json(learningObjects);
|
||||
}
|
||||
|
||||
export async function getLearningObject(req: Request, res: Response): Promise<void> {
|
||||
const learningObjectId = getLearningObjectIdentifierFromRequest(req);
|
||||
|
||||
const learningObject = await learningObjectService.getLearningObjectById(learningObjectId);
|
||||
res.json(learningObject);
|
||||
}
|
||||
|
||||
export async function getLearningObjectHTML(req: Request, res: Response): Promise<void> {
|
||||
const learningObjectId = getLearningObjectIdentifierFromRequest(req);
|
||||
|
||||
const learningObject = await learningObjectService.getLearningObjectHTML(learningObjectId);
|
||||
res.send(learningObject);
|
||||
}
|
||||
|
||||
export async function getAttachment(req: Request, res: Response): Promise<void> {
|
||||
const learningObjectId = getLearningObjectIdentifierFromRequest(req);
|
||||
const name = req.params.attachmentName;
|
||||
const attachment = await attachmentService.getAttachment(learningObjectId, name);
|
||||
|
||||
if (!attachment) {
|
||||
throw new NotFoundError(`Attachment ${name} not found`);
|
||||
}
|
||||
res.setHeader('Content-Type', attachment.mimeType).send(attachment.content);
|
||||
}
|
||||
64
backend/src/controllers/learning-paths.ts
Normal file
64
backend/src/controllers/learning-paths.ts
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { themes } from '../data/themes.js';
|
||||
import { FALLBACK_LANG } from '../config.js';
|
||||
import learningPathService from '../services/learning-paths/learning-path-service.js';
|
||||
import { BadRequestException, NotFoundException } from '../exceptions.js';
|
||||
import { Language } from '../entities/content/language.js';
|
||||
import {
|
||||
PersonalizationTarget,
|
||||
personalizedForGroup,
|
||||
personalizedForStudent,
|
||||
} from '../services/learning-paths/learning-path-personalization-util.js';
|
||||
|
||||
/**
|
||||
* Fetch learning paths based on query parameters.
|
||||
*/
|
||||
export async function getLearningPaths(req: Request, res: Response): Promise<void> {
|
||||
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;
|
||||
|
||||
const forStudent = req.query.forStudent as string;
|
||||
const forGroupNo = req.query.forGroup as string;
|
||||
const assignmentNo = req.query.assignmentNo as string;
|
||||
const classId = req.query.classId as string;
|
||||
|
||||
let personalizationTarget: PersonalizationTarget | undefined;
|
||||
|
||||
if (forStudent) {
|
||||
personalizationTarget = await personalizedForStudent(forStudent);
|
||||
} else if (forGroupNo) {
|
||||
if (!assignmentNo || !classId) {
|
||||
throw new BadRequestException('If forGroupNo is specified, assignmentNo and classId must also be specified.');
|
||||
}
|
||||
personalizationTarget = await personalizedForGroup(classId, parseInt(assignmentNo), parseInt(forGroupNo));
|
||||
}
|
||||
|
||||
let hruidList;
|
||||
|
||||
if (hruids) {
|
||||
hruidList = Array.isArray(hruids) ? hruids.map(String) : [String(hruids)];
|
||||
} else if (themeKey) {
|
||||
const theme = themes.find((t) => t.title === themeKey);
|
||||
if (theme) {
|
||||
hruidList = theme.hruids;
|
||||
} else {
|
||||
throw new NotFoundException(`Theme "${themeKey}" not found.`);
|
||||
}
|
||||
} else if (searchQuery) {
|
||||
const searchResults = await learningPathService.searchLearningPaths(searchQuery, language as Language, personalizationTarget);
|
||||
res.json(searchResults);
|
||||
return;
|
||||
} else {
|
||||
hruidList = themes.flatMap((theme) => theme.hruids);
|
||||
}
|
||||
|
||||
const learningPaths = await learningPathService.fetchLearningPaths(
|
||||
hruidList,
|
||||
language as Language,
|
||||
`HRUIDs: ${hruidList.join(', ')}`,
|
||||
personalizationTarget
|
||||
);
|
||||
res.json(learningPaths.data);
|
||||
}
|
||||
119
backend/src/controllers/questions.ts
Normal file
119
backend/src/controllers/questions.ts
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { createQuestion, deleteQuestion, getAllQuestions, getAnswersByQuestion, getQuestion } from '../services/questions.js';
|
||||
import { QuestionDTO, QuestionId } from '../interfaces/question.js';
|
||||
import { FALLBACK_LANG, FALLBACK_SEQ_NUM } from '../config.js';
|
||||
import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js';
|
||||
import { Language } from '../entities/content/language.js';
|
||||
|
||||
function getObjectId(req: Request, res: Response): LearningObjectIdentifier | null {
|
||||
const { hruid, version } = req.params;
|
||||
const lang = req.query.lang;
|
||||
|
||||
if (!hruid || !version) {
|
||||
res.status(400).json({ error: 'Missing required parameters.' });
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
hruid,
|
||||
language: (lang as Language) || FALLBACK_LANG,
|
||||
version: +version,
|
||||
};
|
||||
}
|
||||
|
||||
function getQuestionId(req: Request, res: Response): QuestionId | null {
|
||||
const seq = req.params.seq;
|
||||
const learningObjectIdentifier = getObjectId(req, res);
|
||||
|
||||
if (!learningObjectIdentifier) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
learningObjectIdentifier,
|
||||
sequenceNumber: seq ? Number(seq) : FALLBACK_SEQ_NUM,
|
||||
};
|
||||
}
|
||||
|
||||
export async function getAllQuestionsHandler(req: Request, res: Response): Promise<void> {
|
||||
const objectId = getObjectId(req, res);
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
if (!objectId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const questions = await getAllQuestions(objectId, full);
|
||||
|
||||
if (!questions) {
|
||||
res.status(404).json({ error: `Questions not found.` });
|
||||
} else {
|
||||
res.json(questions);
|
||||
}
|
||||
}
|
||||
|
||||
export async function getQuestionHandler(req: Request, res: Response): Promise<void> {
|
||||
const questionId = getQuestionId(req, res);
|
||||
|
||||
if (!questionId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const question = await getQuestion(questionId);
|
||||
|
||||
if (!question) {
|
||||
res.status(404).json({ error: `Question not found.` });
|
||||
} else {
|
||||
res.json(question);
|
||||
}
|
||||
}
|
||||
|
||||
export async function getQuestionAnswersHandler(req: Request, res: Response): Promise<void> {
|
||||
const questionId = getQuestionId(req, res);
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
if (!questionId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const answers = getAnswersByQuestion(questionId, full);
|
||||
|
||||
if (!answers) {
|
||||
res.status(404).json({ error: `Questions not found.` });
|
||||
} else {
|
||||
res.json(answers);
|
||||
}
|
||||
}
|
||||
|
||||
export async function createQuestionHandler(req: Request, res: Response): Promise<void> {
|
||||
const questionDTO = req.body as QuestionDTO;
|
||||
|
||||
if (!questionDTO.learningObjectIdentifier || !questionDTO.author || !questionDTO.content) {
|
||||
res.status(400).json({ error: 'Missing required fields: identifier and content' });
|
||||
return;
|
||||
}
|
||||
|
||||
const question = await createQuestion(questionDTO);
|
||||
|
||||
if (!question) {
|
||||
res.status(400).json({ error: 'Could not add question' });
|
||||
} else {
|
||||
res.json(question);
|
||||
}
|
||||
}
|
||||
|
||||
export async function deleteQuestionHandler(req: Request, res: Response): Promise<void> {
|
||||
const questionId = getQuestionId(req, res);
|
||||
|
||||
if (!questionId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const question = await deleteQuestion(questionId);
|
||||
|
||||
if (!question) {
|
||||
res.status(400).json({ error: 'Could not find nor delete question' });
|
||||
} else {
|
||||
res.json(question);
|
||||
}
|
||||
}
|
||||
146
backend/src/controllers/students.ts
Normal file
146
backend/src/controllers/students.ts
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
import { Request, Response } from 'express';
|
||||
import {
|
||||
createStudent,
|
||||
deleteStudent,
|
||||
getAllStudents,
|
||||
getStudent,
|
||||
getStudentAssignments,
|
||||
getStudentClasses,
|
||||
getStudentGroups,
|
||||
getStudentSubmissions,
|
||||
} from '../services/students.js';
|
||||
import { ClassDTO } from '../interfaces/class.js';
|
||||
import { getAllAssignments } from '../services/assignments.js';
|
||||
import { getUserHandler } from './users.js';
|
||||
import { Student } from '../entities/users/student.entity.js';
|
||||
import { StudentDTO } from '../interfaces/student.js';
|
||||
import { getStudentRepository } from '../data/repositories.js';
|
||||
import { UserDTO } from '../interfaces/user.js';
|
||||
|
||||
// TODO: accept arguments (full, ...)
|
||||
// TODO: endpoints
|
||||
export async function getAllStudentsHandler(req: Request, res: Response): Promise<void> {
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
const studentRepository = getStudentRepository();
|
||||
|
||||
const students: StudentDTO[] | string[] = full ? await getAllStudents() : await getAllStudents();
|
||||
|
||||
if (!students) {
|
||||
res.status(404).json({ error: `Student not found.` });
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(201).json(students);
|
||||
}
|
||||
|
||||
export async function getStudentHandler(req: Request, res: Response): Promise<void> {
|
||||
const username = req.params.username;
|
||||
|
||||
if (!username) {
|
||||
res.status(400).json({ error: 'Missing required field: username' });
|
||||
return;
|
||||
}
|
||||
|
||||
const user = await getStudent(username);
|
||||
|
||||
if (!user) {
|
||||
res.status(404).json({
|
||||
error: `User with username '${username}' not found.`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(201).json(user);
|
||||
}
|
||||
|
||||
export async function createStudentHandler(req: Request, res: Response) {
|
||||
const userData = req.body as StudentDTO;
|
||||
|
||||
if (!userData.username || !userData.firstName || !userData.lastName) {
|
||||
res.status(400).json({
|
||||
error: 'Missing required fields: username, firstName, lastName',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const newUser = await createStudent(userData);
|
||||
res.status(201).json(newUser);
|
||||
}
|
||||
|
||||
export async function deleteStudentHandler(req: Request, res: Response) {
|
||||
const username = req.params.username;
|
||||
|
||||
if (!username) {
|
||||
res.status(400).json({ error: 'Missing required field: username' });
|
||||
return;
|
||||
}
|
||||
|
||||
const deletedUser = await deleteStudent(username);
|
||||
if (!deletedUser) {
|
||||
res.status(404).json({
|
||||
error: `User with username '${username}' not found.`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(200).json(deletedUser);
|
||||
}
|
||||
|
||||
export async function getStudentClassesHandler(req: Request, res: Response): Promise<void> {
|
||||
try {
|
||||
const full = req.query.full === 'true';
|
||||
const username = req.params.id;
|
||||
|
||||
const classes = await getStudentClasses(username, full);
|
||||
|
||||
res.json({
|
||||
classes: classes,
|
||||
endpoints: {
|
||||
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`,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Error fetching learning objects:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
// Might not be fully correct depending on if
|
||||
// A class has an assignment, that all students
|
||||
// Have this assignment.
|
||||
export async function getStudentAssignmentsHandler(req: Request, res: Response): Promise<void> {
|
||||
const full = req.query.full === 'true';
|
||||
const username = req.params.id;
|
||||
|
||||
const assignments = getStudentAssignments(username, full);
|
||||
|
||||
res.json({
|
||||
assignments: assignments,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getStudentGroupsHandler(req: Request, res: Response): Promise<void> {
|
||||
const full = req.query.full === 'true';
|
||||
const username = req.params.id;
|
||||
|
||||
const groups = await getStudentGroups(username, full);
|
||||
|
||||
res.json({
|
||||
groups: groups,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getStudentSubmissionsHandler(req: Request, res: Response): Promise<void> {
|
||||
const username = req.params.id;
|
||||
|
||||
const submissions = await getStudentSubmissions(username);
|
||||
|
||||
res.json({
|
||||
submissions: submissions,
|
||||
});
|
||||
}
|
||||
59
backend/src/controllers/submissions.ts
Normal file
59
backend/src/controllers/submissions.ts
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { createSubmission, deleteSubmission, getSubmission } from '../services/submissions.js';
|
||||
import { Language, languageMap } from '../entities/content/language.js';
|
||||
import { SubmissionDTO } from '../interfaces/submission';
|
||||
|
||||
interface SubmissionParams {
|
||||
hruid: string;
|
||||
id: number;
|
||||
}
|
||||
|
||||
export async function getSubmissionHandler(req: Request<SubmissionParams>, res: Response): Promise<void> {
|
||||
const lohruid = req.params.hruid;
|
||||
const submissionNumber = +req.params.id;
|
||||
|
||||
if (isNaN(submissionNumber)) {
|
||||
res.status(400).json({ error: 'Submission number is not a number' });
|
||||
return;
|
||||
}
|
||||
|
||||
const lang = languageMap[req.query.language as string] || Language.Dutch;
|
||||
const version = (req.query.version || 1) as number;
|
||||
|
||||
const submission = await getSubmission(lohruid, lang, version, submissionNumber);
|
||||
|
||||
if (!submission) {
|
||||
res.status(404).json({ error: 'Submission not found' });
|
||||
return;
|
||||
}
|
||||
|
||||
res.json(submission);
|
||||
}
|
||||
|
||||
export async function createSubmissionHandler(req: Request, res: Response) {
|
||||
const submissionDTO = req.body as SubmissionDTO;
|
||||
|
||||
const submission = await createSubmission(submissionDTO);
|
||||
|
||||
if (!submission) {
|
||||
res.status(404).json({ error: 'Submission not added' });
|
||||
} else {
|
||||
res.json(submission);
|
||||
}
|
||||
}
|
||||
|
||||
export async function deleteSubmissionHandler(req: Request, res: Response) {
|
||||
const hruid = req.params.hruid;
|
||||
const submissionNumber = +req.params.id;
|
||||
|
||||
const lang = languageMap[req.query.language as string] || Language.Dutch;
|
||||
const version = (req.query.version || 1) as number;
|
||||
|
||||
const submission = await deleteSubmission(hruid, lang, version, submissionNumber);
|
||||
|
||||
if (!submission) {
|
||||
res.status(404).json({ error: 'Submission not found' });
|
||||
} else {
|
||||
res.json(submission);
|
||||
}
|
||||
}
|
||||
144
backend/src/controllers/teachers.ts
Normal file
144
backend/src/controllers/teachers.ts
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
import { Request, Response } from 'express';
|
||||
import {
|
||||
createTeacher,
|
||||
deleteTeacher,
|
||||
getAllTeachers,
|
||||
getClassesByTeacher,
|
||||
getClassIdsByTeacher,
|
||||
getQuestionIdsByTeacher,
|
||||
getQuestionsByTeacher,
|
||||
getStudentIdsByTeacher,
|
||||
getStudentsByTeacher,
|
||||
getTeacher,
|
||||
} from '../services/teachers.js';
|
||||
import { ClassDTO } from '../interfaces/class.js';
|
||||
import { StudentDTO } from '../interfaces/student.js';
|
||||
import { QuestionDTO, QuestionId } from '../interfaces/question.js';
|
||||
import { Teacher } from '../entities/users/teacher.entity.js';
|
||||
import { TeacherDTO } from '../interfaces/teacher.js';
|
||||
import { getTeacherRepository } from '../data/repositories.js';
|
||||
|
||||
export async function getAllTeachersHandler(req: Request, res: Response): Promise<void> {
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
const teacherRepository = getTeacherRepository();
|
||||
|
||||
const teachers: TeacherDTO[] | string[] = full ? await getAllTeachers() : await getAllTeachers();
|
||||
|
||||
if (!teachers) {
|
||||
res.status(404).json({ error: `Teacher not found.` });
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(201).json(teachers);
|
||||
}
|
||||
|
||||
export async function getTeacherHandler(req: Request, res: Response): Promise<void> {
|
||||
const username = req.params.username;
|
||||
|
||||
if (!username) {
|
||||
res.status(400).json({ error: 'Missing required field: username' });
|
||||
return;
|
||||
}
|
||||
|
||||
const user = await getTeacher(username);
|
||||
|
||||
if (!user) {
|
||||
res.status(404).json({
|
||||
error: `User with username '${username}' not found.`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(201).json(user);
|
||||
}
|
||||
|
||||
export async function createTeacherHandler(req: Request, res: Response) {
|
||||
const userData = req.body as TeacherDTO;
|
||||
|
||||
if (!userData.username || !userData.firstName || !userData.lastName) {
|
||||
res.status(400).json({
|
||||
error: 'Missing required fields: username, firstName, lastName',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const newUser = await createTeacher(userData);
|
||||
res.status(201).json(newUser);
|
||||
}
|
||||
|
||||
export async function deleteTeacherHandler(req: Request, res: Response) {
|
||||
const username = req.params.username;
|
||||
|
||||
if (!username) {
|
||||
res.status(400).json({ error: 'Missing required field: username' });
|
||||
return;
|
||||
}
|
||||
|
||||
const deletedUser = await deleteTeacher(username);
|
||||
if (!deletedUser) {
|
||||
res.status(404).json({
|
||||
error: `User with username '${username}' not found.`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(200).json(deletedUser);
|
||||
}
|
||||
|
||||
export async function getTeacherClassHandler(req: Request, res: Response): Promise<void> {
|
||||
try {
|
||||
const username = req.params.username as string;
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
if (!username) {
|
||||
res.status(400).json({ error: 'Missing required field: username' });
|
||||
return;
|
||||
}
|
||||
|
||||
const classes: ClassDTO[] | string[] = full ? await getClassesByTeacher(username) : await getClassIdsByTeacher(username);
|
||||
|
||||
res.status(201).json(classes);
|
||||
} catch (error) {
|
||||
console.error('Error fetching classes by teacher:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
|
||||
export async function getTeacherStudentHandler(req: Request, res: Response): Promise<void> {
|
||||
try {
|
||||
const username = req.params.username as string;
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
if (!username) {
|
||||
res.status(400).json({ error: 'Missing required field: username' });
|
||||
return;
|
||||
}
|
||||
|
||||
const students: StudentDTO[] | string[] = full ? await getStudentsByTeacher(username) : await getStudentIdsByTeacher(username);
|
||||
|
||||
res.status(201).json(students);
|
||||
} catch (error) {
|
||||
console.error('Error fetching students by teacher:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
|
||||
export async function getTeacherQuestionHandler(req: Request, res: Response): Promise<void> {
|
||||
try {
|
||||
const username = req.params.username as string;
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
if (!username) {
|
||||
res.status(400).json({ error: 'Missing required field: username' });
|
||||
return;
|
||||
}
|
||||
|
||||
const questions: QuestionDTO[] | QuestionId[] = full ? await getQuestionsByTeacher(username) : await getQuestionIdsByTeacher(username);
|
||||
|
||||
res.status(201).json(questions);
|
||||
} catch (error) {
|
||||
console.error('Error fetching questions by teacher:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
33
backend/src/controllers/themes.ts
Normal file
33
backend/src/controllers/themes.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { themes } from '../data/themes.js';
|
||||
import { loadTranslations } from '../util/translation-helper.js';
|
||||
|
||||
interface Translations {
|
||||
curricula_page: {
|
||||
[key: string]: { title: string; description?: string };
|
||||
};
|
||||
}
|
||||
|
||||
export function getThemes(req: Request, res: Response) {
|
||||
const language = (req.query.language as string)?.toLowerCase() || 'nl';
|
||||
const translations = loadTranslations<Translations>(language);
|
||||
const themeList = themes.map((theme) => ({
|
||||
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) => t.title === themeKey);
|
||||
|
||||
if (theme) {
|
||||
res.json(theme.hruids);
|
||||
} else {
|
||||
res.status(404).json({ error: 'Theme not found' });
|
||||
}
|
||||
}
|
||||
91
backend/src/controllers/users.ts
Normal file
91
backend/src/controllers/users.ts
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { UserService } from '../services/users.js';
|
||||
import { UserDTO } from '../interfaces/user.js';
|
||||
import { User } from '../entities/users/user.entity.js';
|
||||
|
||||
export async function getAllUsersHandler<T extends User>(req: Request, res: Response, service: UserService<T>): Promise<void> {
|
||||
try {
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
const users: UserDTO[] | string[] = full ? await service.getAllUsers() : await service.getAllUserIds();
|
||||
|
||||
if (!users) {
|
||||
res.status(404).json({ error: `Users not found.` });
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(201).json(users);
|
||||
} catch (error) {
|
||||
console.error('❌ Error fetching users:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
|
||||
export async function getUserHandler<T extends User>(req: Request, res: Response, service: UserService<T>): Promise<void> {
|
||||
try {
|
||||
const username = req.params.username as string;
|
||||
|
||||
if (!username) {
|
||||
res.status(400).json({ error: 'Missing required field: username' });
|
||||
return;
|
||||
}
|
||||
|
||||
const user = await service.getUserByUsername(username);
|
||||
|
||||
if (!user) {
|
||||
res.status(404).json({
|
||||
error: `User with username '${username}' not found.`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(201).json(user);
|
||||
} catch (error) {
|
||||
console.error('❌ Error fetching users:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
|
||||
export async function createUserHandler<T extends User>(req: Request, res: Response, service: UserService<T>, UserClass: new () => T) {
|
||||
try {
|
||||
console.log('req', req);
|
||||
const userData = req.body as UserDTO;
|
||||
|
||||
if (!userData.username || !userData.firstName || !userData.lastName) {
|
||||
res.status(400).json({
|
||||
error: 'Missing required fields: username, firstName, lastName',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const newUser = await service.createUser(userData, UserClass);
|
||||
res.status(201).json(newUser);
|
||||
} catch (error) {
|
||||
console.error('❌ Error creating user:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
|
||||
export async function deleteUserHandler<T extends User>(req: Request, res: Response, service: UserService<T>) {
|
||||
try {
|
||||
const username = req.params.username;
|
||||
|
||||
if (!username) {
|
||||
res.status(400).json({ error: 'Missing required field: username' });
|
||||
return;
|
||||
}
|
||||
|
||||
const deletedUser = await service.deleteUser(username);
|
||||
if (!deletedUser) {
|
||||
res.status(404).json({
|
||||
error: `User with username '${username}' not found.`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
res.status(200).json(deletedUser);
|
||||
} catch (error) {
|
||||
console.error('❌ Error deleting user:', error);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
}
|
||||
}
|
||||
15
backend/src/data/assignments/assignment-repository.ts
Normal file
15
backend/src/data/assignments/assignment-repository.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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 });
|
||||
}
|
||||
}
|
||||
31
backend/src/data/assignments/group-repository.ts
Normal file
31
backend/src/data/assignments/group-repository.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Group } from '../../entities/assignments/group.entity.js';
|
||||
import { Assignment } from '../../entities/assignments/assignment.entity.js';
|
||||
import { Student } from '../../entities/users/student.entity.js';
|
||||
|
||||
export class GroupRepository extends DwengoEntityRepository<Group> {
|
||||
public findByAssignmentAndGroupNumber(assignment: Assignment, groupNumber: number): Promise<Group | null> {
|
||||
return this.findOne(
|
||||
{
|
||||
assignment: assignment,
|
||||
groupNumber: groupNumber,
|
||||
},
|
||||
{ populate: ['members'] }
|
||||
);
|
||||
}
|
||||
public findAllGroupsForAssignment(assignment: Assignment): Promise<Group[]> {
|
||||
return this.findAll({
|
||||
where: { assignment: assignment },
|
||||
populate: ['members'],
|
||||
});
|
||||
}
|
||||
public findAllGroupsWithStudent(student: Student): Promise<Group[]> {
|
||||
return this.find({ members: student }, { populate: ['members'] });
|
||||
}
|
||||
public deleteByAssignmentAndGroupNumber(assignment: Assignment, groupNumber: number) {
|
||||
return this.deleteWhere({
|
||||
assignment: assignment,
|
||||
groupNumber: groupNumber,
|
||||
});
|
||||
}
|
||||
}
|
||||
57
backend/src/data/assignments/submission-repository.ts
Normal file
57
backend/src/data/assignments/submission-repository.ts
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
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 findAllSubmissionsForGroup(group: Group): Promise<Submission[]> {
|
||||
return this.find({ onBehalfOf: group });
|
||||
}
|
||||
|
||||
public findAllSubmissionsForStudent(student: Student): Promise<Submission[]> {
|
||||
return this.find({ submitter: student });
|
||||
}
|
||||
|
||||
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 });
|
||||
}
|
||||
}
|
||||
23
backend/src/data/classes/class-repository.ts
Normal file
23
backend/src/data/classes/class-repository.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Class } from '../../entities/classes/class.entity.js';
|
||||
import { Student } from '../../entities/users/student.entity.js';
|
||||
import { Teacher } from '../../entities/users/teacher.entity';
|
||||
|
||||
export class ClassRepository extends DwengoEntityRepository<Class> {
|
||||
public findById(id: string): Promise<Class | null> {
|
||||
return this.findOne({ classId: id }, { populate: ['students', 'teachers'] });
|
||||
}
|
||||
public deleteById(id: string): Promise<void> {
|
||||
return this.deleteWhere({ classId: id });
|
||||
}
|
||||
public findByStudent(student: Student): Promise<Class[]> {
|
||||
return this.find(
|
||||
{ students: student },
|
||||
{ populate: ['students', 'teachers'] } // Voegt student en teacher objecten toe
|
||||
);
|
||||
}
|
||||
|
||||
public findByTeacher(teacher: Teacher): Promise<Class[]> {
|
||||
return this.find({ teachers: teacher }, { populate: ['students', 'teachers'] });
|
||||
}
|
||||
}
|
||||
23
backend/src/data/classes/teacher-invitation-repository.ts
Normal file
23
backend/src/data/classes/teacher-invitation-repository.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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,
|
||||
});
|
||||
}
|
||||
}
|
||||
37
backend/src/data/content/attachment-repository.ts
Normal file
37
backend/src/data/content/attachment-repository.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { Attachment } from '../../entities/content/attachment.entity.js';
|
||||
import { Language } from '../../entities/content/language';
|
||||
import { LearningObjectIdentifier } from '../../entities/content/learning-object-identifier';
|
||||
|
||||
export class AttachmentRepository extends DwengoEntityRepository<Attachment> {
|
||||
public findByLearningObjectIdAndName(learningObjectId: LearningObjectIdentifier, name: string): Promise<Attachment | null> {
|
||||
return this.findOne({
|
||||
learningObject: {
|
||||
hruid: learningObjectId.hruid,
|
||||
language: learningObjectId.language,
|
||||
version: learningObjectId.version,
|
||||
},
|
||||
name: name,
|
||||
});
|
||||
}
|
||||
|
||||
public findByMostRecentVersionOfLearningObjectAndName(hruid: string, language: Language, attachmentName: string): Promise<Attachment | null> {
|
||||
return this.findOne(
|
||||
{
|
||||
learningObject: {
|
||||
hruid: hruid,
|
||||
language: language,
|
||||
},
|
||||
name: attachmentName,
|
||||
},
|
||||
{
|
||||
orderBy: {
|
||||
learningObject: {
|
||||
version: 'DESC',
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
// This repository is read-only for now since creating own learning object is an extension feature.
|
||||
}
|
||||
42
backend/src/data/content/learning-object-repository.ts
Normal file
42
backend/src/data/content/learning-object-repository.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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';
|
||||
import { Language } from '../../entities/content/language.js';
|
||||
import { Teacher } from '../../entities/users/teacher.entity.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,
|
||||
},
|
||||
{
|
||||
populate: ['keywords'],
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public findLatestByHruidAndLanguage(hruid: string, language: Language) {
|
||||
return this.findOne(
|
||||
{
|
||||
hruid: hruid,
|
||||
language: language,
|
||||
},
|
||||
{
|
||||
populate: ['keywords'],
|
||||
orderBy: {
|
||||
version: 'DESC',
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public findAllByTeacher(teacher: Teacher): Promise<LearningObject[]> {
|
||||
return this.find(
|
||||
{ admins: teacher },
|
||||
{ populate: ['admins'] } // Make sure to load admin relations
|
||||
);
|
||||
}
|
||||
}
|
||||
26
backend/src/data/content/learning-path-repository.ts
Normal file
26
backend/src/data/content/learning-path-repository.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
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 }, { populate: ['nodes', 'nodes.transitions'] });
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all learning paths which have the given language and whose title OR description contains the
|
||||
* query string.
|
||||
*
|
||||
* @param query The query string we want to seach for in the title or description.
|
||||
* @param language The language of the learning paths we want to find.
|
||||
*/
|
||||
public async findByQueryStringAndLanguage(query: string, language: Language): Promise<LearningPath[]> {
|
||||
return this.findAll({
|
||||
where: {
|
||||
language: language,
|
||||
$or: [{ title: { $like: `%${query}%` } }, { description: { $like: `%${query}%` } }],
|
||||
},
|
||||
populate: ['nodes', 'nodes.transitions'],
|
||||
});
|
||||
}
|
||||
}
|
||||
17
backend/src/data/dwengo-entity-repository.ts
Normal file
17
backend/src/data/dwengo-entity-repository.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
28
backend/src/data/questions/answer-repository.ts
Normal file
28
backend/src/data/questions/answer-repository.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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 = this.create({
|
||||
toQuestion: answer.toQuestion,
|
||||
author: answer.author,
|
||||
content: answer.content,
|
||||
timestamp: new Date(),
|
||||
});
|
||||
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,
|
||||
});
|
||||
}
|
||||
}
|
||||
57
backend/src/data/questions/question-repository.ts
Normal file
57
backend/src/data/questions/question-repository.ts
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
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';
|
||||
import { LearningObject } from '../../entities/content/learning-object.entity.js';
|
||||
|
||||
export class QuestionRepository extends DwengoEntityRepository<Question> {
|
||||
public createQuestion(question: { loId: LearningObjectIdentifier; author: Student; content: string }): Promise<Question> {
|
||||
const questionEntity = this.create({
|
||||
learningObjectHruid: question.loId.hruid,
|
||||
learningObjectLanguage: question.loId.language,
|
||||
learningObjectVersion: question.loId.version,
|
||||
author: question.author,
|
||||
content: question.content,
|
||||
timestamp: new Date(),
|
||||
});
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
||||
public async findAllByLearningObjects(learningObjects: LearningObject[]): Promise<Question[]> {
|
||||
const objectIdentifiers = learningObjects.map((lo) => ({
|
||||
learningObjectHruid: lo.hruid,
|
||||
learningObjectLanguage: lo.language,
|
||||
learningObjectVersion: lo.version,
|
||||
}));
|
||||
|
||||
return this.findAll({
|
||||
where: { $or: objectIdentifiers },
|
||||
orderBy: { timestamp: 'ASC' },
|
||||
});
|
||||
}
|
||||
}
|
||||
79
backend/src/data/repositories.ts
Normal file
79
backend/src/data/repositories.ts
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
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';
|
||||
import { LearningPathNode } from '../entities/content/learning-path-node.entity.js';
|
||||
import { LearningPathTransition } from '../entities/content/learning-path-transition.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 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>(TeacherInvitation);
|
||||
|
||||
/* 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 getLearningPathNodeRepository = repositoryGetter(LearningPathNode);
|
||||
export const getLearningPathTransitionRepository = repositoryGetter(LearningPathTransition);
|
||||
export const getAttachmentRepository = repositoryGetter<Attachment, AttachmentRepository>(Attachment);
|
||||
168
backend/src/data/themes.ts
Normal file
168
backend/src/data/themes.ts
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
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',
|
||||
],
|
||||
},
|
||||
];
|
||||
15
backend/src/data/users/student-repository.ts
Normal file
15
backend/src/data/users/student-repository.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { Student } from '../../entities/users/student.entity.js';
|
||||
import { User } from '../../entities/users/user.entity.js';
|
||||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
// Import { UserRepository } from './user-repository.js';
|
||||
|
||||
// Export class StudentRepository extends UserRepository<Student> {}
|
||||
|
||||
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 });
|
||||
}
|
||||
}
|
||||
12
backend/src/data/users/teacher-repository.ts
Normal file
12
backend/src/data/users/teacher-repository.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { Teacher } from '../../entities/users/teacher.entity.js';
|
||||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { UserRepository } from './user-repository.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<T extends User> extends DwengoEntityRepository<T> {
|
||||
public findByUsername(username: string): Promise<T | null> {
|
||||
return this.findOne({ username } as Partial<T>);
|
||||
}
|
||||
public deleteByUsername(username: string): Promise<void> {
|
||||
return this.deleteWhere({ username } as Partial<T>);
|
||||
}
|
||||
}
|
||||
39
backend/src/entities/assignments/assignment.entity.ts
Normal file
39
backend/src/entities/assignments/assignment.entity.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import { Collection, 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';
|
||||
import { AssignmentRepository } from '../../data/assignments/assignment-repository.js';
|
||||
|
||||
@Entity({
|
||||
repository: () => AssignmentRepository,
|
||||
})
|
||||
export class Assignment {
|
||||
@ManyToOne({
|
||||
entity: () => Class,
|
||||
primary: true,
|
||||
})
|
||||
within!: Class;
|
||||
|
||||
@PrimaryKey({ type: 'number', autoincrement: true })
|
||||
id?: number;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
title!: string;
|
||||
|
||||
@Property({ type: 'text' })
|
||||
description!: string;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
learningPathHruid!: string;
|
||||
|
||||
@Enum({
|
||||
items: () => Language,
|
||||
})
|
||||
learningPathLanguage!: Language;
|
||||
|
||||
@OneToMany({
|
||||
entity: () => Group,
|
||||
mappedBy: 'assignment',
|
||||
})
|
||||
groups!: Group[];
|
||||
}
|
||||
23
backend/src/entities/assignments/group.entity.ts
Normal file
23
backend/src/entities/assignments/group.entity.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { Collection, Entity, ManyToMany, ManyToOne, PrimaryKey } from '@mikro-orm/core';
|
||||
import { Assignment } from './assignment.entity.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import { GroupRepository } from '../../data/assignments/group-repository.js';
|
||||
|
||||
@Entity({
|
||||
repository: () => GroupRepository,
|
||||
})
|
||||
export class Group {
|
||||
@ManyToOne({
|
||||
entity: () => Assignment,
|
||||
primary: true,
|
||||
})
|
||||
assignment!: Assignment;
|
||||
|
||||
@PrimaryKey({ type: 'integer', autoincrement: true })
|
||||
groupNumber?: number;
|
||||
|
||||
@ManyToMany({
|
||||
entity: () => Student,
|
||||
})
|
||||
members!: Student[];
|
||||
}
|
||||
40
backend/src/entities/assignments/submission.entity.ts
Normal file
40
backend/src/entities/assignments/submission.entity.ts
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
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';
|
||||
import { SubmissionRepository } from '../../data/assignments/submission-repository.js';
|
||||
|
||||
@Entity({ repository: () => SubmissionRepository })
|
||||
export class Submission {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectHruid!: string;
|
||||
|
||||
@Enum({
|
||||
items: () => Language,
|
||||
primary: true,
|
||||
})
|
||||
learningObjectLanguage!: Language;
|
||||
|
||||
@PrimaryKey({ type: 'numeric' })
|
||||
learningObjectVersion: number = 1;
|
||||
|
||||
@PrimaryKey({ type: 'integer', autoincrement: true })
|
||||
submissionNumber!: number;
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Student,
|
||||
})
|
||||
submitter!: Student;
|
||||
|
||||
@Property({ type: 'datetime' })
|
||||
submissionTime!: Date;
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Group,
|
||||
nullable: true,
|
||||
})
|
||||
onBehalfOf?: Group;
|
||||
|
||||
@Property({ type: 'json' })
|
||||
content!: string;
|
||||
}
|
||||
30
backend/src/entities/classes/class-join-request.entity.ts
Normal file
30
backend/src/entities/classes/class-join-request.entity.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { Entity, Enum, ManyToOne } from '@mikro-orm/core';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import { Class } from './class.entity.js';
|
||||
import { ClassJoinRequestRepository } from '../../data/classes/class-join-request-repository.js';
|
||||
|
||||
@Entity({
|
||||
repository: () => ClassJoinRequestRepository,
|
||||
})
|
||||
export class ClassJoinRequest {
|
||||
@ManyToOne({
|
||||
entity: () => Student,
|
||||
primary: true,
|
||||
})
|
||||
requester!: Student;
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Class,
|
||||
primary: true,
|
||||
})
|
||||
class!: Class;
|
||||
|
||||
@Enum(() => ClassJoinRequestStatus)
|
||||
status!: ClassJoinRequestStatus;
|
||||
}
|
||||
|
||||
export enum ClassJoinRequestStatus {
|
||||
Open = 'open',
|
||||
Accepted = 'accepted',
|
||||
Declined = 'declined',
|
||||
}
|
||||
22
backend/src/entities/classes/class.entity.ts
Normal file
22
backend/src/entities/classes/class.entity.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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';
|
||||
import { ClassRepository } from '../../data/classes/class-repository.js';
|
||||
|
||||
@Entity({
|
||||
repository: () => ClassRepository,
|
||||
})
|
||||
export class Class {
|
||||
@PrimaryKey()
|
||||
classId? = v4();
|
||||
|
||||
@Property({ type: 'string' })
|
||||
displayName!: string;
|
||||
|
||||
@ManyToMany(() => Teacher)
|
||||
teachers!: Collection<Teacher>;
|
||||
|
||||
@ManyToMany(() => Student)
|
||||
students!: Collection<Student>;
|
||||
}
|
||||
28
backend/src/entities/classes/teacher-invitation.entity.ts
Normal file
28
backend/src/entities/classes/teacher-invitation.entity.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { Entity, ManyToOne } from '@mikro-orm/core';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import { Class } from './class.entity.js';
|
||||
import { TeacherInvitationRepository } from '../../data/classes/teacher-invitation-repository.js';
|
||||
|
||||
/**
|
||||
* Invitation of a teacher into a class (in order to teach it).
|
||||
*/
|
||||
@Entity({ repository: () => TeacherInvitationRepository })
|
||||
export class TeacherInvitation {
|
||||
@ManyToOne({
|
||||
entity: () => Teacher,
|
||||
primary: true,
|
||||
})
|
||||
sender!: Teacher;
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Teacher,
|
||||
primary: true,
|
||||
})
|
||||
receiver!: Teacher;
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Class,
|
||||
primary: true,
|
||||
})
|
||||
class!: Class;
|
||||
}
|
||||
23
backend/src/entities/content/attachment.entity.ts
Normal file
23
backend/src/entities/content/attachment.entity.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { LearningObject } from './learning-object.entity.js';
|
||||
import { AttachmentRepository } from '../../data/content/attachment-repository.js';
|
||||
|
||||
@Entity({
|
||||
repository: () => AttachmentRepository,
|
||||
})
|
||||
export class Attachment {
|
||||
@ManyToOne({
|
||||
entity: () => LearningObject,
|
||||
primary: true,
|
||||
})
|
||||
learningObject!: LearningObject;
|
||||
|
||||
@PrimaryKey({ type: 'string' })
|
||||
name!: string;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
mimeType!: string;
|
||||
|
||||
@Property({ type: 'blob' })
|
||||
content!: Buffer;
|
||||
}
|
||||
193
backend/src/entities/content/language.ts
Normal file
193
backend/src/entities/content/language.ts
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
export enum Language {
|
||||
Afar = 'aa',
|
||||
Abkhazian = 'ab',
|
||||
Afrikaans = 'af',
|
||||
Akan = 'ak',
|
||||
Albanian = 'sq',
|
||||
Amharic = 'am',
|
||||
Arabic = 'ar',
|
||||
Aragonese = 'an',
|
||||
Armenian = 'hy',
|
||||
Assamese = 'as',
|
||||
Avaric = 'av',
|
||||
Avestan = 'ae',
|
||||
Aymara = 'ay',
|
||||
Azerbaijani = 'az',
|
||||
Bashkir = 'ba',
|
||||
Bambara = 'bm',
|
||||
Basque = 'eu',
|
||||
Belarusian = 'be',
|
||||
Bengali = 'bn',
|
||||
Bihari = 'bh',
|
||||
Bislama = 'bi',
|
||||
Bosnian = 'bs',
|
||||
Breton = 'br',
|
||||
Bulgarian = 'bg',
|
||||
Burmese = 'my',
|
||||
Catalan = 'ca',
|
||||
Chamorro = 'ch',
|
||||
Chechen = 'ce',
|
||||
Chinese = 'zh',
|
||||
ChurchSlavic = 'cu',
|
||||
Chuvash = 'cv',
|
||||
Cornish = 'kw',
|
||||
Corsican = 'co',
|
||||
Cree = 'cr',
|
||||
Czech = 'cs',
|
||||
Danish = 'da',
|
||||
Divehi = 'dv',
|
||||
Dutch = 'nl',
|
||||
Dzongkha = 'dz',
|
||||
English = 'en',
|
||||
Esperanto = 'eo',
|
||||
Estonian = 'et',
|
||||
Ewe = 'ee',
|
||||
Faroese = 'fo',
|
||||
Fijian = 'fj',
|
||||
Finnish = 'fi',
|
||||
French = 'fr',
|
||||
Frisian = 'fy',
|
||||
Fulah = 'ff',
|
||||
Georgian = 'ka',
|
||||
German = 'de',
|
||||
Gaelic = 'gd',
|
||||
Irish = 'ga',
|
||||
Galician = 'gl',
|
||||
Manx = 'gv',
|
||||
Greek = 'el',
|
||||
Guarani = 'gn',
|
||||
Gujarati = 'gu',
|
||||
Haitian = 'ht',
|
||||
Hausa = 'ha',
|
||||
Hebrew = 'he',
|
||||
Herero = 'hz',
|
||||
Hindi = 'hi',
|
||||
HiriMotu = 'ho',
|
||||
Croatian = 'hr',
|
||||
Hungarian = 'hu',
|
||||
Igbo = 'ig',
|
||||
Icelandic = 'is',
|
||||
Ido = 'io',
|
||||
SichuanYi = 'ii',
|
||||
Inuktitut = 'iu',
|
||||
Interlingue = 'ie',
|
||||
Interlingua = 'ia',
|
||||
Indonesian = 'id',
|
||||
Inupiaq = 'ik',
|
||||
Italian = 'it',
|
||||
Javanese = 'jv',
|
||||
Japanese = 'ja',
|
||||
Kalaallisut = 'kl',
|
||||
Kannada = 'kn',
|
||||
Kashmiri = 'ks',
|
||||
Kanuri = 'kr',
|
||||
Kazakh = 'kk',
|
||||
Khmer = 'km',
|
||||
Kikuyu = 'ki',
|
||||
Kinyarwanda = 'rw',
|
||||
Kirghiz = 'ky',
|
||||
Komi = 'kv',
|
||||
Kongo = 'kg',
|
||||
Korean = 'ko',
|
||||
Kuanyama = 'kj',
|
||||
Kurdish = 'ku',
|
||||
Lao = 'lo',
|
||||
Latin = 'la',
|
||||
Latvian = 'lv',
|
||||
Limburgan = 'li',
|
||||
Lingala = 'ln',
|
||||
Lithuanian = 'lt',
|
||||
Luxembourgish = 'lb',
|
||||
LubaKatanga = 'lu',
|
||||
Ganda = 'lg',
|
||||
Macedonian = 'mk',
|
||||
Marshallese = 'mh',
|
||||
Malayalam = 'ml',
|
||||
Maori = 'mi',
|
||||
Marathi = 'mr',
|
||||
Malay = 'ms',
|
||||
Malagasy = 'mg',
|
||||
Maltese = 'mt',
|
||||
Mongolian = 'mn',
|
||||
Nauru = 'na',
|
||||
Navajo = 'nv',
|
||||
SouthNdebele = 'nr',
|
||||
NorthNdebele = 'nd',
|
||||
Ndonga = 'ng',
|
||||
Nepali = 'ne',
|
||||
NorwegianNynorsk = 'nn',
|
||||
NorwegianBokmal = 'nb',
|
||||
Norwegian = 'no',
|
||||
Chichewa = 'ny',
|
||||
Occitan = 'oc',
|
||||
Ojibwa = 'oj',
|
||||
Oriya = 'or',
|
||||
Oromo = 'om',
|
||||
Ossetian = 'os',
|
||||
Punjabi = 'pa',
|
||||
Persian = 'fa',
|
||||
Pali = 'pi',
|
||||
Polish = 'pl',
|
||||
Portuguese = 'pt',
|
||||
Pashto = 'ps',
|
||||
Quechua = 'qu',
|
||||
Romansh = 'rm',
|
||||
Romanian = 'ro',
|
||||
Rundi = 'rn',
|
||||
Russian = 'ru',
|
||||
Sango = 'sg',
|
||||
Sanskrit = 'sa',
|
||||
Sinhala = 'si',
|
||||
Slovak = 'sk',
|
||||
Slovenian = 'sl',
|
||||
NorthernSami = 'se',
|
||||
Samoan = 'sm',
|
||||
Shona = 'sn',
|
||||
Sindhi = 'sd',
|
||||
Somali = 'so',
|
||||
Sotho = 'st',
|
||||
Spanish = 'es',
|
||||
Sardinian = 'sc',
|
||||
Serbian = 'sr',
|
||||
Swati = 'ss',
|
||||
Sundanese = 'su',
|
||||
Swahili = 'sw',
|
||||
Swedish = 'sv',
|
||||
Tahitian = 'ty',
|
||||
Tamil = 'ta',
|
||||
Tatar = 'tt',
|
||||
Telugu = 'te',
|
||||
Tajik = 'tg',
|
||||
Tagalog = 'tl',
|
||||
Thai = 'th',
|
||||
Tibetan = 'bo',
|
||||
Tigrinya = 'ti',
|
||||
Tonga = 'to',
|
||||
Tswana = 'tn',
|
||||
Tsonga = 'ts',
|
||||
Turkmen = 'tk',
|
||||
Turkish = 'tr',
|
||||
Twi = 'tw',
|
||||
Uighur = 'ug',
|
||||
Ukrainian = 'uk',
|
||||
Urdu = 'ur',
|
||||
Uzbek = 'uz',
|
||||
Venda = 've',
|
||||
Vietnamese = 'vi',
|
||||
Volapuk = 'vo',
|
||||
Welsh = 'cy',
|
||||
Walloon = 'wa',
|
||||
Wolof = 'wo',
|
||||
Xhosa = 'xh',
|
||||
Yiddish = 'yi',
|
||||
Yoruba = 'yo',
|
||||
Zhuang = 'za',
|
||||
Zulu = 'zu',
|
||||
}
|
||||
|
||||
export const languageMap: Record<string, Language> = {
|
||||
nl: Language.Dutch,
|
||||
fr: Language.French,
|
||||
en: Language.English,
|
||||
de: Language.German,
|
||||
};
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { Language } from './language.js';
|
||||
|
||||
export class LearningObjectIdentifier {
|
||||
constructor(
|
||||
public hruid: string,
|
||||
public language: Language,
|
||||
public version: number
|
||||
) {}
|
||||
}
|
||||
107
backend/src/entities/content/learning-object.entity.ts
Normal file
107
backend/src/entities/content/learning-object.entity.ts
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
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';
|
||||
import { DwengoContentType } from '../../services/learning-objects/processing/content-type.js';
|
||||
import { v4 } from 'uuid';
|
||||
import { LearningObjectRepository } from '../../data/content/learning-object-repository.js';
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
@Entity({ repository: () => LearningObjectRepository })
|
||||
export class LearningObject {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
hruid!: string;
|
||||
|
||||
@Enum({
|
||||
items: () => Language,
|
||||
primary: true,
|
||||
})
|
||||
language!: Language;
|
||||
|
||||
@PrimaryKey({ type: 'number' })
|
||||
version: number = 1;
|
||||
|
||||
@Property({ type: 'uuid', unique: true })
|
||||
uuid = v4();
|
||||
|
||||
@ManyToMany({
|
||||
entity: () => Teacher,
|
||||
})
|
||||
admins!: Teacher[];
|
||||
|
||||
@Property({ type: 'string' })
|
||||
title!: string;
|
||||
|
||||
@Property({ type: 'text' })
|
||||
description!: string;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
contentType!: DwengoContentType;
|
||||
|
||||
@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: () => 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', nullable: true })
|
||||
estimatedTime?: number;
|
||||
|
||||
@Embedded({
|
||||
entity: () => ReturnValue,
|
||||
})
|
||||
returnValue!: ReturnValue;
|
||||
|
||||
@Property({ type: 'bool' })
|
||||
available: boolean = true;
|
||||
|
||||
@Property({ type: 'string', nullable: true })
|
||||
contentLocation?: string;
|
||||
|
||||
@OneToMany({
|
||||
entity: () => Attachment,
|
||||
mappedBy: 'learningObject',
|
||||
})
|
||||
attachments: Attachment[] = [];
|
||||
|
||||
@Property({ type: 'blob' })
|
||||
content!: Buffer;
|
||||
}
|
||||
37
backend/src/entities/content/learning-path-node.entity.ts
Normal file
37
backend/src/entities/content/learning-path-node.entity.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import { Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property, Rel } from '@mikro-orm/core';
|
||||
import { Language } from './language.js';
|
||||
import { LearningPath } from './learning-path.entity.js';
|
||||
import { LearningPathTransition } from './learning-path-transition.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class LearningPathNode {
|
||||
@ManyToOne({ entity: () => LearningPath, primary: true })
|
||||
learningPath!: Rel<LearningPath>;
|
||||
|
||||
@PrimaryKey({ type: 'integer', autoincrement: true })
|
||||
nodeNumber!: number;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
learningObjectHruid!: string;
|
||||
|
||||
@Enum({ items: () => Language })
|
||||
language!: Language;
|
||||
|
||||
@Property({ type: 'number' })
|
||||
version!: number;
|
||||
|
||||
@Property({ type: 'text', nullable: true })
|
||||
instruction?: string;
|
||||
|
||||
@Property({ type: 'bool' })
|
||||
startNode!: boolean;
|
||||
|
||||
@OneToMany({ entity: () => LearningPathTransition, mappedBy: 'node' })
|
||||
transitions: LearningPathTransition[] = [];
|
||||
|
||||
@Property({ length: 3 })
|
||||
createdAt: Date = new Date();
|
||||
|
||||
@Property({ length: 3, onUpdate: () => new Date() })
|
||||
updatedAt: Date = new Date();
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
import { Entity, ManyToOne, PrimaryKey, Property, Rel } from '@mikro-orm/core';
|
||||
import { LearningPathNode } from './learning-path-node.entity.js';
|
||||
|
||||
@Entity()
|
||||
export class LearningPathTransition {
|
||||
@ManyToOne({ entity: () => LearningPathNode, primary: true })
|
||||
node!: Rel<LearningPathNode>;
|
||||
|
||||
@PrimaryKey({ type: 'numeric' })
|
||||
transitionNumber!: number;
|
||||
|
||||
@Property({ type: 'string' })
|
||||
condition!: string;
|
||||
|
||||
@ManyToOne({ entity: () => LearningPathNode })
|
||||
next!: Rel<LearningPathNode>;
|
||||
}
|
||||
29
backend/src/entities/content/learning-path.entity.ts
Normal file
29
backend/src/entities/content/learning-path.entity.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import { Entity, Enum, ManyToMany, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Language } from './language.js';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import { LearningPathRepository } from '../../data/content/learning-path-repository.js';
|
||||
import { LearningPathNode } from './learning-path-node.entity.js';
|
||||
|
||||
@Entity({ repository: () => LearningPathRepository })
|
||||
export class LearningPath {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
hruid!: string;
|
||||
|
||||
@Enum({ items: () => Language, primary: true })
|
||||
language!: Language;
|
||||
|
||||
@ManyToMany({ entity: () => Teacher })
|
||||
admins!: Teacher[];
|
||||
|
||||
@Property({ type: 'string' })
|
||||
title!: string;
|
||||
|
||||
@Property({ type: 'text' })
|
||||
description!: string;
|
||||
|
||||
@Property({ type: 'blob', nullable: true })
|
||||
image: Buffer | null = null;
|
||||
|
||||
@OneToMany({ entity: () => LearningPathNode, mappedBy: 'learningPath' })
|
||||
nodes: LearningPathNode[] = [];
|
||||
}
|
||||
28
backend/src/entities/questions/answer.entity.ts
Normal file
28
backend/src/entities/questions/answer.entity.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Question } from './question.entity.js';
|
||||
import { Teacher } from '../users/teacher.entity.js';
|
||||
import { AnswerRepository } from '../../data/questions/answer-repository.js';
|
||||
|
||||
@Entity({ repository: () => AnswerRepository })
|
||||
export class Answer {
|
||||
@ManyToOne({
|
||||
entity: () => Teacher,
|
||||
primary: true,
|
||||
})
|
||||
author!: Teacher;
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Question,
|
||||
primary: true,
|
||||
})
|
||||
toQuestion!: Question;
|
||||
|
||||
@PrimaryKey({ type: 'integer', autoincrement: true })
|
||||
sequenceNumber?: number;
|
||||
|
||||
@Property({ type: 'datetime' })
|
||||
timestamp: Date = new Date();
|
||||
|
||||
@Property({ type: 'text' })
|
||||
content!: string;
|
||||
}
|
||||
33
backend/src/entities/questions/question.entity.ts
Normal file
33
backend/src/entities/questions/question.entity.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { Entity, Enum, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
import { Language } from '../content/language.js';
|
||||
import { Student } from '../users/student.entity.js';
|
||||
import { QuestionRepository } from '../../data/questions/question-repository.js';
|
||||
|
||||
@Entity({ repository: () => QuestionRepository })
|
||||
export class Question {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
learningObjectHruid!: string;
|
||||
|
||||
@Enum({
|
||||
items: () => Language,
|
||||
primary: true,
|
||||
})
|
||||
learningObjectLanguage!: Language;
|
||||
|
||||
@PrimaryKey({ type: 'number' })
|
||||
learningObjectVersion: number = 1;
|
||||
|
||||
@PrimaryKey({ type: 'integer', autoincrement: true })
|
||||
sequenceNumber?: number;
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => Student,
|
||||
})
|
||||
author!: Student;
|
||||
|
||||
@Property({ type: 'datetime' })
|
||||
timestamp: Date = new Date();
|
||||
|
||||
@Property({ type: 'text' })
|
||||
content!: string;
|
||||
}
|
||||
24
backend/src/entities/users/student.entity.ts
Normal file
24
backend/src/entities/users/student.entity.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
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: () => StudentRepository,
|
||||
})
|
||||
export class Student extends User {
|
||||
@ManyToMany(() => Class)
|
||||
classes!: Collection<Class>;
|
||||
|
||||
@ManyToMany(() => Group)
|
||||
groups!: Collection<Group>;
|
||||
|
||||
constructor(
|
||||
public username: string,
|
||||
public firstName: string,
|
||||
public lastName: string
|
||||
) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
18
backend/src/entities/users/teacher.entity.ts
Normal file
18
backend/src/entities/users/teacher.entity.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Collection, Entity, ManyToMany } from '@mikro-orm/core';
|
||||
import { User } from './user.entity.js';
|
||||
import { Class } from '../classes/class.entity.js';
|
||||
import { TeacherRepository } from '../../data/users/teacher-repository.js';
|
||||
|
||||
@Entity({ repository: () => TeacherRepository })
|
||||
export class Teacher extends User {
|
||||
@ManyToMany(() => Class)
|
||||
classes!: Collection<Class>;
|
||||
|
||||
constructor(
|
||||
public username: string,
|
||||
public firstName: string,
|
||||
public lastName: string
|
||||
) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
13
backend/src/entities/users/user.entity.ts
Normal file
13
backend/src/entities/users/user.entity.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { Entity, PrimaryKey, Property } from '@mikro-orm/core';
|
||||
|
||||
@Entity({ abstract: true })
|
||||
export abstract class User {
|
||||
@PrimaryKey({ type: 'string' })
|
||||
username!: string;
|
||||
|
||||
@Property()
|
||||
firstName: string = '';
|
||||
|
||||
@Property()
|
||||
lastName: string = '';
|
||||
}
|
||||
42
backend/src/exceptions.ts
Normal file
42
backend/src/exceptions.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Exception for HTTP 400 Bad Request
|
||||
*/
|
||||
export class BadRequestException extends Error {
|
||||
public status = 400;
|
||||
|
||||
constructor(error: string) {
|
||||
super(error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception for HTTP 401 Unauthorized
|
||||
*/
|
||||
export class UnauthorizedException extends Error {
|
||||
status = 401;
|
||||
constructor(message: string = 'Unauthorized') {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception for HTTP 403 Forbidden
|
||||
*/
|
||||
export class ForbiddenException extends Error {
|
||||
status = 403;
|
||||
|
||||
constructor(message: string = 'Forbidden') {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception for HTTP 404 Not Found
|
||||
*/
|
||||
export class NotFoundException extends Error {
|
||||
public status = 404;
|
||||
|
||||
constructor(error: string) {
|
||||
super(error);
|
||||
}
|
||||
}
|
||||
38
backend/src/interfaces/answer.ts
Normal file
38
backend/src/interfaces/answer.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { mapToUserDTO, UserDTO } from './user.js';
|
||||
import { mapToQuestionDTO, mapToQuestionId, QuestionDTO, QuestionId } from './question.js';
|
||||
import { Answer } from '../entities/questions/answer.entity.js';
|
||||
|
||||
export interface AnswerDTO {
|
||||
author: UserDTO;
|
||||
toQuestion: QuestionDTO;
|
||||
sequenceNumber: number;
|
||||
timestamp: string;
|
||||
content: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a Question entity to a DTO format.
|
||||
*/
|
||||
export function mapToAnswerDTO(answer: Answer): AnswerDTO {
|
||||
return {
|
||||
author: mapToUserDTO(answer.author),
|
||||
toQuestion: mapToQuestionDTO(answer.toQuestion),
|
||||
sequenceNumber: answer.sequenceNumber!,
|
||||
timestamp: answer.timestamp.toISOString(),
|
||||
content: answer.content,
|
||||
};
|
||||
}
|
||||
|
||||
export interface AnswerId {
|
||||
author: string;
|
||||
toQuestion: QuestionId;
|
||||
sequenceNumber: number;
|
||||
}
|
||||
|
||||
export function mapToAnswerId(answer: AnswerDTO): AnswerId {
|
||||
return {
|
||||
author: answer.author.username,
|
||||
toQuestion: mapToQuestionId(answer.toQuestion),
|
||||
sequenceNumber: answer.sequenceNumber,
|
||||
};
|
||||
}
|
||||
52
backend/src/interfaces/assignment.ts
Normal file
52
backend/src/interfaces/assignment.ts
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
import { FALLBACK_LANG } from '../config.js';
|
||||
import { Assignment } from '../entities/assignments/assignment.entity.js';
|
||||
import { Class } from '../entities/classes/class.entity.js';
|
||||
import { languageMap } from '../entities/content/language.js';
|
||||
import { GroupDTO, mapToGroupDTO } from './group.js';
|
||||
|
||||
export interface AssignmentDTO {
|
||||
id: number;
|
||||
class: string; // Id of class 'within'
|
||||
title: string;
|
||||
description: string;
|
||||
learningPath: string;
|
||||
language: string;
|
||||
groups?: GroupDTO[] | string[]; // TODO
|
||||
}
|
||||
|
||||
export function mapToAssignmentDTOId(assignment: Assignment): AssignmentDTO {
|
||||
return {
|
||||
id: assignment.id!,
|
||||
class: assignment.within.classId!,
|
||||
title: assignment.title,
|
||||
description: assignment.description,
|
||||
learningPath: assignment.learningPathHruid,
|
||||
language: assignment.learningPathLanguage,
|
||||
// Groups: assignment.groups.map(group => group.groupNumber),
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToAssignmentDTO(assignment: Assignment): AssignmentDTO {
|
||||
return {
|
||||
id: assignment.id!,
|
||||
class: assignment.within.classId!,
|
||||
title: assignment.title,
|
||||
description: assignment.description,
|
||||
learningPath: assignment.learningPathHruid,
|
||||
language: assignment.learningPathLanguage,
|
||||
// Groups: assignment.groups.map(mapToGroupDTO),
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToAssignment(assignmentData: AssignmentDTO, cls: Class): Assignment {
|
||||
const assignment = new Assignment();
|
||||
assignment.title = assignmentData.title;
|
||||
assignment.description = assignmentData.description;
|
||||
assignment.learningPathHruid = assignmentData.learningPath;
|
||||
assignment.learningPathLanguage = languageMap[assignmentData.language] || FALLBACK_LANG;
|
||||
assignment.within = cls;
|
||||
|
||||
console.log(assignment);
|
||||
|
||||
return assignment;
|
||||
}
|
||||
37
backend/src/interfaces/class.ts
Normal file
37
backend/src/interfaces/class.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import { Collection } from '@mikro-orm/core';
|
||||
import { Class } from '../entities/classes/class.entity.js';
|
||||
import { Student } from '../entities/users/student.entity.js';
|
||||
import { Teacher } from '../entities/users/teacher.entity.js';
|
||||
|
||||
export interface ClassDTO {
|
||||
id: string;
|
||||
displayName: string;
|
||||
teachers: string[];
|
||||
students: string[];
|
||||
joinRequests: string[];
|
||||
endpoints?: {
|
||||
self: string;
|
||||
invitations: string;
|
||||
assignments: string;
|
||||
students: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToClassDTO(cls: Class): ClassDTO {
|
||||
return {
|
||||
id: cls.classId!,
|
||||
displayName: cls.displayName,
|
||||
teachers: cls.teachers.map((teacher) => teacher.username),
|
||||
students: cls.students.map((student) => student.username),
|
||||
joinRequests: [], // TODO
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToClass(classData: ClassDTO, students: Collection<Student>, teachers: Collection<Teacher>): Class {
|
||||
const cls = new Class();
|
||||
cls.displayName = classData.displayName;
|
||||
cls.students = students;
|
||||
cls.teachers = teachers;
|
||||
|
||||
return cls;
|
||||
}
|
||||
25
backend/src/interfaces/group.ts
Normal file
25
backend/src/interfaces/group.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { Group } from '../entities/assignments/group.entity.js';
|
||||
import { AssignmentDTO, mapToAssignmentDTO } from './assignment.js';
|
||||
import { mapToStudentDTO, StudentDTO } from './student.js';
|
||||
|
||||
export interface GroupDTO {
|
||||
assignment: number | AssignmentDTO;
|
||||
groupNumber: number;
|
||||
members: string[] | StudentDTO[];
|
||||
}
|
||||
|
||||
export function mapToGroupDTO(group: Group): GroupDTO {
|
||||
return {
|
||||
assignment: mapToAssignmentDTO(group.assignment), // ERROR: , group.assignment.within),
|
||||
groupNumber: group.groupNumber!,
|
||||
members: group.members.map(mapToStudentDTO),
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToGroupDTOId(group: Group): GroupDTO {
|
||||
return {
|
||||
assignment: group.assignment.id!,
|
||||
groupNumber: group.groupNumber!,
|
||||
members: group.members.map((member) => member.username),
|
||||
};
|
||||
}
|
||||
112
backend/src/interfaces/learning-content.ts
Normal file
112
backend/src/interfaces/learning-content.ts
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
import { Language } from '../entities/content/language';
|
||||
|
||||
export interface Transition {
|
||||
default: boolean;
|
||||
_id: string;
|
||||
next: {
|
||||
_id: string;
|
||||
hruid: string;
|
||||
version: number;
|
||||
language: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface LearningObjectIdentifier {
|
||||
hruid: string;
|
||||
language: Language;
|
||||
version?: number;
|
||||
}
|
||||
|
||||
export interface LearningObjectNode {
|
||||
_id: string;
|
||||
learningobject_hruid: string;
|
||||
version: number;
|
||||
language: Language;
|
||||
start_node?: boolean;
|
||||
transitions: Transition[];
|
||||
created_at: string;
|
||||
updatedAt: string;
|
||||
done?: boolean; // True if a submission exists for this node by the user for whom the learning path is customized.
|
||||
}
|
||||
|
||||
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 LearningPathIdentifier {
|
||||
hruid: string;
|
||||
language: Language;
|
||||
}
|
||||
|
||||
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: Language;
|
||||
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: Language;
|
||||
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;
|
||||
}
|
||||
5
backend/src/interfaces/list.ts
Normal file
5
backend/src/interfaces/list.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// TODO: implement something like this but with named endpoints
|
||||
export interface List<T> {
|
||||
items: T[];
|
||||
endpoints?: string[];
|
||||
}
|
||||
44
backend/src/interfaces/question.ts
Normal file
44
backend/src/interfaces/question.ts
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import { Question } from '../entities/questions/question.entity.js';
|
||||
import { UserDTO } from './user.js';
|
||||
import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js';
|
||||
import { mapToStudentDTO, StudentDTO } from './student.js';
|
||||
import { TeacherDTO } from './teacher.js';
|
||||
|
||||
export interface QuestionDTO {
|
||||
learningObjectIdentifier: LearningObjectIdentifier;
|
||||
sequenceNumber?: number;
|
||||
author: StudentDTO;
|
||||
timestamp?: string;
|
||||
content: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a Question entity to a DTO format.
|
||||
*/
|
||||
export function mapToQuestionDTO(question: Question): QuestionDTO {
|
||||
const learningObjectIdentifier = {
|
||||
hruid: question.learningObjectHruid,
|
||||
language: question.learningObjectLanguage,
|
||||
version: question.learningObjectVersion,
|
||||
};
|
||||
|
||||
return {
|
||||
learningObjectIdentifier,
|
||||
sequenceNumber: question.sequenceNumber!,
|
||||
author: mapToStudentDTO(question.author),
|
||||
timestamp: question.timestamp.toISOString(),
|
||||
content: question.content,
|
||||
};
|
||||
}
|
||||
|
||||
export interface QuestionId {
|
||||
learningObjectIdentifier: LearningObjectIdentifier;
|
||||
sequenceNumber: number;
|
||||
}
|
||||
|
||||
export function mapToQuestionId(question: QuestionDTO): QuestionId {
|
||||
return {
|
||||
learningObjectIdentifier: question.learningObjectIdentifier,
|
||||
sequenceNumber: question.sequenceNumber!,
|
||||
};
|
||||
}
|
||||
29
backend/src/interfaces/student.ts
Normal file
29
backend/src/interfaces/student.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import { Student } from '../entities/users/student.entity.js';
|
||||
|
||||
export interface StudentDTO {
|
||||
id: string;
|
||||
username: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
endpoints?: {
|
||||
classes: string;
|
||||
questions: string;
|
||||
invitations: string;
|
||||
groups: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToStudentDTO(student: Student): StudentDTO {
|
||||
return {
|
||||
id: student.username,
|
||||
username: student.username,
|
||||
firstName: student.firstName,
|
||||
lastName: student.lastName,
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToStudent(studentData: StudentDTO): Student {
|
||||
const student = new Student(studentData.username, studentData.firstName, studentData.lastName);
|
||||
|
||||
return student;
|
||||
}
|
||||
47
backend/src/interfaces/submission.ts
Normal file
47
backend/src/interfaces/submission.ts
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import { Submission } from '../entities/assignments/submission.entity.js';
|
||||
import { Language } from '../entities/content/language.js';
|
||||
import { GroupDTO, mapToGroupDTO } from './group.js';
|
||||
import { mapToStudent, mapToStudentDTO, StudentDTO } from './student.js';
|
||||
import { mapToUser } from './user';
|
||||
import { Student } from '../entities/users/student.entity';
|
||||
|
||||
export interface SubmissionDTO {
|
||||
learningObjectHruid: string;
|
||||
learningObjectLanguage: Language;
|
||||
learningObjectVersion: number;
|
||||
|
||||
submissionNumber?: number;
|
||||
submitter: StudentDTO;
|
||||
time?: Date;
|
||||
group?: GroupDTO;
|
||||
content: string;
|
||||
}
|
||||
|
||||
export function mapToSubmissionDTO(submission: Submission): SubmissionDTO {
|
||||
return {
|
||||
learningObjectHruid: submission.learningObjectHruid,
|
||||
learningObjectLanguage: submission.learningObjectLanguage,
|
||||
learningObjectVersion: submission.learningObjectVersion,
|
||||
|
||||
submissionNumber: submission.submissionNumber,
|
||||
submitter: mapToStudentDTO(submission.submitter),
|
||||
time: submission.submissionTime,
|
||||
group: submission.onBehalfOf ? mapToGroupDTO(submission.onBehalfOf) : undefined,
|
||||
content: submission.content,
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToSubmission(submissionDTO: SubmissionDTO): Submission {
|
||||
const submission = new Submission();
|
||||
submission.learningObjectHruid = submissionDTO.learningObjectHruid;
|
||||
submission.learningObjectLanguage = submissionDTO.learningObjectLanguage;
|
||||
submission.learningObjectVersion = submissionDTO.learningObjectVersion;
|
||||
// Submission.submissionNumber = submissionDTO.submissionNumber;
|
||||
submission.submitter = mapToStudent(submissionDTO.submitter);
|
||||
// Submission.submissionTime = submissionDTO.time;
|
||||
// Submission.onBehalfOf = submissionDTO.group!;
|
||||
// TODO fix group
|
||||
submission.content = submissionDTO.content;
|
||||
|
||||
return submission;
|
||||
}
|
||||
25
backend/src/interfaces/teacher-invitation.ts
Normal file
25
backend/src/interfaces/teacher-invitation.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { TeacherInvitation } from '../entities/classes/teacher-invitation.entity.js';
|
||||
import { ClassDTO, mapToClassDTO } from './class.js';
|
||||
import { mapToUserDTO, UserDTO } from './user.js';
|
||||
|
||||
export interface TeacherInvitationDTO {
|
||||
sender: string | UserDTO;
|
||||
receiver: string | UserDTO;
|
||||
class: string | ClassDTO;
|
||||
}
|
||||
|
||||
export function mapToTeacherInvitationDTO(invitation: TeacherInvitation): TeacherInvitationDTO {
|
||||
return {
|
||||
sender: mapToUserDTO(invitation.sender),
|
||||
receiver: mapToUserDTO(invitation.receiver),
|
||||
class: mapToClassDTO(invitation.class),
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToTeacherInvitationDTOIds(invitation: TeacherInvitation): TeacherInvitationDTO {
|
||||
return {
|
||||
sender: invitation.sender.username,
|
||||
receiver: invitation.receiver.username,
|
||||
class: invitation.class.classId!,
|
||||
};
|
||||
}
|
||||
29
backend/src/interfaces/teacher.ts
Normal file
29
backend/src/interfaces/teacher.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import { Teacher } from '../entities/users/teacher.entity.js';
|
||||
|
||||
export interface TeacherDTO {
|
||||
id: string;
|
||||
username: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
endpoints?: {
|
||||
classes: string;
|
||||
questions: string;
|
||||
invitations: string;
|
||||
groups: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToTeacherDTO(teacher: Teacher): TeacherDTO {
|
||||
return {
|
||||
id: teacher.username,
|
||||
username: teacher.username,
|
||||
firstName: teacher.firstName,
|
||||
lastName: teacher.lastName,
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToTeacher(TeacherData: TeacherDTO): Teacher {
|
||||
const teacher = new Teacher(TeacherData.username, TeacherData.firstName, TeacherData.lastName);
|
||||
|
||||
return teacher;
|
||||
}
|
||||
30
backend/src/interfaces/user.ts
Normal file
30
backend/src/interfaces/user.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { User } from '../entities/users/user.entity.js';
|
||||
|
||||
export interface UserDTO {
|
||||
id?: string;
|
||||
username: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
endpoints?: {
|
||||
self: string;
|
||||
classes: string;
|
||||
questions: string;
|
||||
invitations: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToUserDTO(user: User): UserDTO {
|
||||
return {
|
||||
id: user.username,
|
||||
username: user.username,
|
||||
firstName: user.firstName,
|
||||
lastName: user.lastName,
|
||||
};
|
||||
}
|
||||
|
||||
export function mapToUser<T extends User>(userData: UserDTO, userInstance: T): T {
|
||||
userInstance.username = userData.username;
|
||||
userInstance.firstName = userData.firstName;
|
||||
userInstance.lastName = userData.lastName;
|
||||
return userInstance;
|
||||
}
|
||||
53
backend/src/logging/initalize.ts
Normal file
53
backend/src/logging/initalize.ts
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import { createLogger, format, Logger as WinstonLogger, transports } from 'winston';
|
||||
import LokiTransport from 'winston-loki';
|
||||
import { LokiLabels } from 'loki-logger-ts';
|
||||
import { LOG_LEVEL, LOKI_HOST } from '../config.js';
|
||||
|
||||
export class Logger extends WinstonLogger {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
const Labels: LokiLabels = {
|
||||
source: 'Dwengo-Backend',
|
||||
service: 'API',
|
||||
host: 'localhost',
|
||||
};
|
||||
|
||||
let logger: Logger;
|
||||
|
||||
function initializeLogger(): Logger {
|
||||
if (logger !== undefined) {
|
||||
return logger;
|
||||
}
|
||||
|
||||
const lokiTransport: LokiTransport = new LokiTransport({
|
||||
host: LOKI_HOST,
|
||||
labels: Labels,
|
||||
level: LOG_LEVEL,
|
||||
json: true,
|
||||
format: format.combine(format.timestamp(), format.json()),
|
||||
onConnectionError: (err) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(`Connection error: ${err}`);
|
||||
},
|
||||
});
|
||||
|
||||
const consoleTransport = new transports.Console({
|
||||
level: LOG_LEVEL,
|
||||
format: format.combine(format.cli(), format.colorize()),
|
||||
});
|
||||
|
||||
logger = createLogger({
|
||||
transports: [lokiTransport, consoleTransport],
|
||||
});
|
||||
|
||||
logger.debug(`Logger initialized with level ${LOG_LEVEL}, Loki host ${LOKI_HOST}`);
|
||||
return logger;
|
||||
}
|
||||
|
||||
export function getLogger(): Logger {
|
||||
logger ||= initializeLogger();
|
||||
return logger;
|
||||
}
|
||||
69
backend/src/logging/mikroOrmLogger.ts
Normal file
69
backend/src/logging/mikroOrmLogger.ts
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
import { DefaultLogger, LogContext, LoggerNamespace } from '@mikro-orm/core';
|
||||
import { getLogger, Logger } from './initalize.js';
|
||||
import { LokiLabels } from 'loki-logger-ts';
|
||||
|
||||
export class MikroOrmLogger extends DefaultLogger {
|
||||
private logger: Logger = getLogger();
|
||||
|
||||
log(namespace: LoggerNamespace, message: string, context?: LogContext) {
|
||||
if (!this.isEnabled(namespace, context)) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (namespace) {
|
||||
case 'query':
|
||||
this.logger.debug(this.createMessage(namespace, message, context));
|
||||
break;
|
||||
case 'query-params':
|
||||
// TODO Which log level should this be?
|
||||
this.logger.info(this.createMessage(namespace, message, context));
|
||||
break;
|
||||
case 'schema':
|
||||
this.logger.info(this.createMessage(namespace, message, context));
|
||||
break;
|
||||
case 'discovery':
|
||||
this.logger.debug(this.createMessage(namespace, message, context));
|
||||
break;
|
||||
case 'info':
|
||||
this.logger.info(this.createMessage(namespace, message, context));
|
||||
break;
|
||||
case 'deprecated':
|
||||
this.logger.warn(this.createMessage(namespace, message, context));
|
||||
break;
|
||||
default:
|
||||
switch (context?.level) {
|
||||
case 'info':
|
||||
this.logger.info(this.createMessage(namespace, message, context));
|
||||
break;
|
||||
case 'warning':
|
||||
this.logger.warn(message);
|
||||
break;
|
||||
case 'error':
|
||||
this.logger.error(message);
|
||||
break;
|
||||
default:
|
||||
this.logger.debug(message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private createMessage(namespace: LoggerNamespace, messageArg: string, context?: LogContext) {
|
||||
const labels: LokiLabels = {
|
||||
service: 'ORM',
|
||||
};
|
||||
|
||||
let message: string;
|
||||
if (context?.label) {
|
||||
message = `[${namespace}] (${context?.label}) ${messageArg}`;
|
||||
} else {
|
||||
message = `[${namespace}] ${messageArg}`;
|
||||
}
|
||||
|
||||
return {
|
||||
message: message,
|
||||
labels: labels,
|
||||
context: context,
|
||||
};
|
||||
}
|
||||
}
|
||||
21
backend/src/logging/responseTimeLogger.ts
Normal file
21
backend/src/logging/responseTimeLogger.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { getLogger, Logger } from './initalize.js';
|
||||
import { Request, Response } from 'express';
|
||||
|
||||
export function responseTimeLogger(req: Request, res: Response, time: number) {
|
||||
const logger: Logger = getLogger();
|
||||
|
||||
const method = req.method;
|
||||
const url = req.url;
|
||||
const status = res.statusCode;
|
||||
|
||||
logger.info({
|
||||
message: 'Request completed',
|
||||
method: method,
|
||||
url: url,
|
||||
status: status,
|
||||
responseTime: Number(time),
|
||||
labels: {
|
||||
type: 'responseTime',
|
||||
},
|
||||
});
|
||||
}
|
||||
141
backend/src/middleware/auth/auth.ts
Normal file
141
backend/src/middleware/auth/auth.ts
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
import { EnvVars, getEnvVar } from '../../util/envvars.js';
|
||||
import { expressjwt } from 'express-jwt';
|
||||
import { JwtPayload } from 'jsonwebtoken';
|
||||
import jwksClient from 'jwks-rsa';
|
||||
import * as express from 'express';
|
||||
import * as jwt from 'jsonwebtoken';
|
||||
import { AuthenticatedRequest } from './authenticated-request.js';
|
||||
import { AuthenticationInfo } from './authentication-info.js';
|
||||
import { ForbiddenException, UnauthorizedException } from '../../exceptions.js';
|
||||
|
||||
const JWKS_CACHE = true;
|
||||
const JWKS_RATE_LIMIT = true;
|
||||
const REQUEST_PROPERTY_FOR_JWT_PAYLOAD = 'jwtPayload';
|
||||
const JWT_ALGORITHM = 'RS256'; // Not configurable via env vars since supporting other algorithms would
|
||||
// Require additional libraries to be added.
|
||||
|
||||
const JWT_PROPERTY_NAMES = {
|
||||
username: 'preferred_username',
|
||||
firstName: 'given_name',
|
||||
lastName: 'family_name',
|
||||
name: 'name',
|
||||
email: 'email',
|
||||
};
|
||||
|
||||
function createJwksClient(uri: string): jwksClient.JwksClient {
|
||||
return jwksClient({
|
||||
cache: JWKS_CACHE,
|
||||
rateLimit: JWKS_RATE_LIMIT,
|
||||
jwksUri: uri,
|
||||
});
|
||||
}
|
||||
|
||||
const idpConfigs = {
|
||||
student: {
|
||||
issuer: getEnvVar(EnvVars.IdpStudentUrl),
|
||||
jwksClient: createJwksClient(getEnvVar(EnvVars.IdpStudentJwksEndpoint)),
|
||||
},
|
||||
teacher: {
|
||||
issuer: getEnvVar(EnvVars.IdpTeacherUrl),
|
||||
jwksClient: createJwksClient(getEnvVar(EnvVars.IdpTeacherJwksEndpoint)),
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Express middleware which verifies the JWT Bearer token if one is given in the request.
|
||||
*/
|
||||
const verifyJwtToken = expressjwt({
|
||||
secret: async (_: express.Request, token: jwt.Jwt | undefined) => {
|
||||
if (!token?.payload || !(token.payload as JwtPayload).iss) {
|
||||
throw new Error('Invalid token');
|
||||
}
|
||||
|
||||
const issuer = (token.payload as JwtPayload).iss;
|
||||
|
||||
const idpConfig = Object.values(idpConfigs).find((config) => config.issuer === issuer);
|
||||
if (!idpConfig) {
|
||||
throw new Error('Issuer not accepted.');
|
||||
}
|
||||
|
||||
const signingKey = await idpConfig.jwksClient.getSigningKey(token.header.kid);
|
||||
if (!signingKey) {
|
||||
throw new Error('Signing key not found.');
|
||||
}
|
||||
return signingKey.getPublicKey();
|
||||
},
|
||||
audience: getEnvVar(EnvVars.IdpAudience),
|
||||
algorithms: [JWT_ALGORITHM],
|
||||
credentialsRequired: false,
|
||||
requestProperty: REQUEST_PROPERTY_FOR_JWT_PAYLOAD,
|
||||
});
|
||||
|
||||
/**
|
||||
* Get an object with information about the authenticated user from a given authenticated request.
|
||||
*/
|
||||
function getAuthenticationInfo(req: AuthenticatedRequest): AuthenticationInfo | undefined {
|
||||
if (!req.jwtPayload) {
|
||||
return;
|
||||
}
|
||||
const issuer = req.jwtPayload.iss;
|
||||
let accountType: 'student' | 'teacher';
|
||||
|
||||
if (issuer === idpConfigs.student.issuer) {
|
||||
accountType = 'student';
|
||||
} else if (issuer === idpConfigs.teacher.issuer) {
|
||||
accountType = 'teacher';
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
return {
|
||||
accountType: accountType,
|
||||
username: req.jwtPayload[JWT_PROPERTY_NAMES.username]!,
|
||||
name: req.jwtPayload[JWT_PROPERTY_NAMES.name],
|
||||
firstName: req.jwtPayload[JWT_PROPERTY_NAMES.firstName],
|
||||
lastName: req.jwtPayload[JWT_PROPERTY_NAMES.lastName],
|
||||
email: req.jwtPayload[JWT_PROPERTY_NAMES.email],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the AuthenticationInfo object with the information about the current authentication to the request in order
|
||||
* to avoid that the routers have to deal with the JWT token.
|
||||
*/
|
||||
const addAuthenticationInfo = (req: AuthenticatedRequest, res: express.Response, next: express.NextFunction) => {
|
||||
req.auth = getAuthenticationInfo(req);
|
||||
next();
|
||||
};
|
||||
|
||||
export const authenticateUser = [verifyJwtToken, addAuthenticationInfo];
|
||||
|
||||
/**
|
||||
* Middleware which rejects unauthenticated users (with HTTP 401) and authenticated users which do not fulfill
|
||||
* the given access condition.
|
||||
* @param accessCondition Predicate over the current AuthenticationInfo. Access is only granted when this evaluates
|
||||
* to true.
|
||||
*/
|
||||
export const authorize =
|
||||
(accessCondition: (auth: AuthenticationInfo) => boolean) =>
|
||||
(req: AuthenticatedRequest, res: express.Response, next: express.NextFunction): void => {
|
||||
if (!req.auth) {
|
||||
throw new UnauthorizedException();
|
||||
} else if (!accessCondition(req.auth)) {
|
||||
throw new ForbiddenException();
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Middleware which rejects all unauthenticated users, but accepts all authenticated users.
|
||||
*/
|
||||
export const authenticatedOnly = authorize((_) => true);
|
||||
|
||||
/**
|
||||
* Middleware which rejects requests from unauthenticated users or users that aren't students.
|
||||
*/
|
||||
export const studentsOnly = authorize((auth) => auth.accountType === 'student');
|
||||
|
||||
/**
|
||||
* Middleware which rejects requests from unauthenticated users or users that aren't teachers.
|
||||
*/
|
||||
export const teachersOnly = authorize((auth) => auth.accountType === 'teacher');
|
||||
9
backend/src/middleware/auth/authenticated-request.d.ts
vendored
Normal file
9
backend/src/middleware/auth/authenticated-request.d.ts
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { Request } from 'express';
|
||||
import { JwtPayload } from 'jsonwebtoken';
|
||||
import { AuthenticationInfo } from './authentication-info.js';
|
||||
|
||||
export interface AuthenticatedRequest extends Request {
|
||||
// Properties are optional since the user is not necessarily authenticated.
|
||||
jwtPayload?: JwtPayload;
|
||||
auth?: AuthenticationInfo;
|
||||
}
|
||||
11
backend/src/middleware/auth/authentication-info.d.ts
vendored
Normal file
11
backend/src/middleware/auth/authentication-info.d.ts
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Object with information about the user who is currently logged in.
|
||||
*/
|
||||
export type AuthenticationInfo = {
|
||||
accountType: 'student' | 'teacher';
|
||||
username: string;
|
||||
name?: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
email?: string;
|
||||
};
|
||||
7
backend/src/middleware/cors.ts
Normal file
7
backend/src/middleware/cors.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import cors from 'cors';
|
||||
import { EnvVars, getEnvVar } from '../util/envvars.js';
|
||||
|
||||
export default cors({
|
||||
origin: getEnvVar(EnvVars.CorsAllowedOrigins).split(','),
|
||||
allowedHeaders: getEnvVar(EnvVars.CorsAllowedHeaders).split(','),
|
||||
});
|
||||
77
backend/src/mikro-orm.config.ts
Normal file
77
backend/src/mikro-orm.config.ts
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
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';
|
||||
|
||||
// Import alle entity-bestanden handmatig
|
||||
import { User } from './entities/users/user.entity.js';
|
||||
import { Student } from './entities/users/student.entity.js';
|
||||
import { Teacher } from './entities/users/teacher.entity.js';
|
||||
|
||||
import { Assignment } from './entities/assignments/assignment.entity.js';
|
||||
import { Group } from './entities/assignments/group.entity.js';
|
||||
import { Submission } from './entities/assignments/submission.entity.js';
|
||||
|
||||
import { Class } from './entities/classes/class.entity.js';
|
||||
import { ClassJoinRequest } from './entities/classes/class-join-request.entity.js';
|
||||
import { TeacherInvitation } from './entities/classes/teacher-invitation.entity.js';
|
||||
|
||||
import { Attachment } from './entities/content/attachment.entity.js';
|
||||
import { LearningObject } from './entities/content/learning-object.entity.js';
|
||||
import { LearningPath } from './entities/content/learning-path.entity.js';
|
||||
|
||||
import { Answer } from './entities/questions/answer.entity.js';
|
||||
import { Question } from './entities/questions/question.entity.js';
|
||||
import { SqliteAutoincrementSubscriber } from './sqlite-autoincrement-workaround.js';
|
||||
|
||||
const entities = [
|
||||
User,
|
||||
Student,
|
||||
Teacher,
|
||||
Assignment,
|
||||
Group,
|
||||
Submission,
|
||||
Class,
|
||||
ClassJoinRequest,
|
||||
TeacherInvitation,
|
||||
Attachment,
|
||||
LearningObject,
|
||||
LearningPath,
|
||||
Answer,
|
||||
Question,
|
||||
];
|
||||
|
||||
function config(testingMode: boolean = false): Options {
|
||||
if (testingMode) {
|
||||
return {
|
||||
driver: SqliteDriver,
|
||||
dbName: getEnvVar(EnvVars.DbName),
|
||||
subscribers: [new SqliteAutoincrementSubscriber()],
|
||||
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) => 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) => new MikroOrmLogger(options),
|
||||
};
|
||||
}
|
||||
|
||||
export default config;
|
||||
34
backend/src/orm.ts
Normal file
34
backend/src/orm.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { EntityManager, MikroORM } from '@mikro-orm/core';
|
||||
import config from './mikro-orm.config.js';
|
||||
import { EnvVars, getEnvVar } from './util/envvars.js';
|
||||
import { getLogger, Logger } from './logging/initalize.js';
|
||||
|
||||
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);
|
||||
|
||||
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();
|
||||
}
|
||||
30
backend/src/routes/assignments.ts
Normal file
30
backend/src/routes/assignments.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import express from 'express';
|
||||
import {
|
||||
createAssignmentHandler,
|
||||
getAllAssignmentsHandler,
|
||||
getAssignmentHandler,
|
||||
getAssignmentsSubmissionsHandler,
|
||||
} from '../controllers/assignments.js';
|
||||
import groupRouter from './groups.js';
|
||||
|
||||
const router = express.Router({ mergeParams: true });
|
||||
|
||||
// Root endpoint used to search objects
|
||||
router.get('/', getAllAssignmentsHandler);
|
||||
|
||||
router.post('/', createAssignmentHandler);
|
||||
|
||||
// Information about an assignment with id 'id'
|
||||
router.get('/:id', getAssignmentHandler);
|
||||
|
||||
router.get('/:id/submissions', getAssignmentsSubmissionsHandler);
|
||||
|
||||
router.get('/:id/questions', (req, res) => {
|
||||
res.json({
|
||||
questions: ['0'],
|
||||
});
|
||||
});
|
||||
|
||||
router.use('/:assignmentid/groups', groupRouter);
|
||||
|
||||
export default router;
|
||||
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue