blob: 26bd1b2aaad142da1b7976f80b7b71cb77fd819e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Graduation
## Table
There exist a single table called `Graduation` to hold all graduation information.
A single table is used to reduce the amount of requests required to load the data.
It is important that only teachers are allowed to read from the table.
## Graduation Changes
Graduation changes are unique and the systems ensures that no duplicates are entered.
Changes can be active or archived.
The state of a particular change is derived from subsequent changes.
Currently multiple changes have to be retrieved to determine their state.
This decision allows us to write data once and not modify changes in the future.
The assumption is that a single person does not acquire that much changes, that this would be a performance issue.
### Database format
Note that the database is a Moodle database activity and thus does not allow access using SQL.
The below scheme uses a SQL like syntax.
```sql
TABLE Change(
Date: Date,
Coach: String,
Json: STRING,
)
```
The author of the change and the creation time are tracked by Moodle.
### Data format
Each stored change is represented as JSON and has the following fields:
(Fields marked by `?` are optional.)
* `studentId` - the id of the student
* `change` - the type of the change
* `?reason` - the type of the change
* `?context` - arbitrary data used to handle the type of change
### Changes
Valid changes are:
* `Grün` - sign for wanted behavior
* `Orange` - sign for unwanted behavior
* `Rot` - sign for unacceptable behavior
* `LevelChange` - the student's level changed
#### Mandatory Changes
Changes can be marked as mandatory by adding `mandatory: true` to its context.
#### Green Mark
Green marks are collectables.
#### Orange Mark
Orange marks highlight the need for a pedagogical session and are rendered archived by any subsequent `Gespräch` change.
#### Red Mark
Red Marks track unacceptable behavior and are only archived by consequence explicitly doing so with a `Änderung` change.
|