Scope: chats
/api/v2/todos/:todo_id/submissions
Gibt alle Abgaben (inkl. noch ausstehenden) für eine Hausaufgabe zurück. Um alle Abgaben für eine Hausaufgabe einsehen zu können, benötigt der Benutzer Rechte zum Bearbeiten für die Hausaufgabe. Siehe Permissions.
Antwort:
[
{
"user": {
"id": 3,
"name": "Max Mustermann",
"badges": [],
"presence": {
"is_online": false,
"expires_in": null
},
"profile_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTI1NTcwODYsInN1YiI6IjMiLCJpYXQiOjE2MTI1NTUyMjYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGkifQ.ELE9_k797p8V19Q10f3GbrVu8ytzecKjECtNIsCXTIg",
"avatar_url": "https://www.gravatar.com/avatar/226ef2be0bd9b4648f5b8b1758376c9d?s=200&d=mp"
},
"submission": {
"todo_id": 1,
"user_id": 3,
"acknowledged_at": "2021-02-05T20:58:58+01:00",
"comment": "Bei der Aufgabe c) hatte ich kleine Probleme",
"submitted_at": "2021-02-05T21:01:10+01:00",
"teacher_correction": null,
"points": null,
"corrected_at": null,
"corrected_by_user_id": null,
"files": [
{
"id": 2,
"hash": "f7fb8ab6fd2f0e5fe3fcdfefdb48daaf",
"sha1_checksum": "df767545dd4142345f27df547a577f216cca967d",
"name": "Test.pdf",
"content_type": "application/pdf",
"size": 43413,
"is_public": false,
"related_to": "todo.1.user.3.submission",
"uploaded": "2021-02-05T21:01:02+01:00",
"url": "https://homeworker.li/document/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkb2N1bWVudF9pZCI6Miwic3ViIjoiZG9jdW1lbnQuYWNjZXNzX3Rva2VuIiwiaWF0IjoxNjEyNTU1MjI2LCJleHAiOjE2MTI1NTg4ODYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGlcL2RvY3VtZW50In0.wle-HqOssDmNAWgdwyWs5Uo2H5hN0kh1RP0Wvmz841I/2",
"url_by_hash": "https://homeworker.li/document/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkb2N1bWVudF9pZCI6Miwic3ViIjoiZG9jdW1lbnQuYWNjZXNzX3Rva2VuIiwiaWF0IjoxNjEyNTU1MjI2LCJleHAiOjE2MTI1NTg4ODYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGlcL2RvY3VtZW50In0.wle-HqOssDmNAWgdwyWs5Uo2H5hN0kh1RP0Wvmz841I/2",
"preview_url": "https://homeworker.li/document/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkb2N1bWVudF9pZCI6Miwic3ViIjoiZG9jdW1lbnQuYWNjZXNzX3Rva2VuIiwiaWF0IjoxNjEyNTU1MjI2LCJleHAiOjE2MTI1NTg4ODYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGlcL2RvY3VtZW50In0.wle-HqOssDmNAWgdwyWs5Uo2H5hN0kh1RP0Wvmz841I/2/preview",
"download_url": "https://redirect.homeworker.li/redirect?to=https%3A%2F%2Fhomeworker.li%2Fdocument%2FeyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkb2N1bWVudF9pZCI6Miwic3ViIjoiZG9jdW1lbnQuYWNjZXNzX3Rva2VuIiwiaWF0IjoxNjEyNTU1MjI2LCJleHAiOjE2MTI1NTg4ODYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGlcL2RvY3VtZW50In0.wle-HqOssDmNAWgdwyWs5Uo2H5hN0kh1RP0Wvmz841I%2F2%2Fdownload",
"can_delete": false,
"human_size": "43.41kB",
"type": "pdf",
"alphanumeric_id": "2"
}
],
"correction_files": [],
"document_relation": "todo.1.user.3.submission",
"correction_files_document_relation": "todo.1.user.3.correction",
"user_can_submit": true,
"comment_formatted": "Bei der Aufgabe c) hatte ich kleine Probleme",
"comment_basic": "Bei der Aufgabe c) hatte ich kleine Probleme",
"teacher_correction_formatted": null,
"teacher_correction_basic": null,
"is_acknowledged": true,
"is_submitted": true,
"is_corrected": false,
"is_uncorrected": true
}
},
...truncated
]
/api/v2/todos/:todo_id/submissions/:user_id
Erstellt eine neue Hausaufgabe. Der Benutzer welche die Hausaufgabe erstellt hat wird automatisch als Admin/Eigentümr für die Hausaufgabe hinzugefügt. Siehe Permissions.
Dateien für der Korrektur können einfach übermittelt werden indem sie mit der
Relation correction_files_document_relation
hochgeladen werden.
Attribut | Typ | Erforderlich | Beschreibung |
---|---|---|---|
teacher_correction |
String | Ja | Korrektur / Kommentar des Lehrers |
points |
Float | Nein | Punktanzahl welche die Abgabe erreicht hat |
Anfrage:
{
"teacher_correction": "Das war schon sehr gut.\nIn der Teilaufgabe c) kannst du jedoch mehr auf den vorherigen Teil eingehen",
"points": 17.5
}
Antwort:
{
"user": {
"id": 3,
"name": "Max Mustermann",
"badges": [],
"presence": {
"is_online": false,
"expires_in": null
},
"profile_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTI1NTcwODYsInN1YiI6IjMiLCJpYXQiOjE2MTI1NTUyMjYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGkifQ.ELE9_k797p8V19Q10f3GbrVu8ytzecKjECtNIsCXTIg",
"avatar_url": "https://www.gravatar.com/avatar/226ef2be0bd9b4648f5b8b1758376c9d?s=200&d=mp"
},
"submission": {
"todo_id": 1,
"user_id": 3,
"acknowledged_at": "2021-02-05T20:58:58+01:00",
"comment": "Bei der Aufgabe c) hatte ich kleine Probleme",
"submitted_at": "2021-02-05T21:01:10+01:00",
"teacher_correction": "Das war schon sehr gut.\nIn der Teilaufgabe c) kannst du jedoch mehr auf den vorherigen Teil eingehen",
"points": 17.5,
"corrected_at": "2021-02-05T21:42:21+01:00",
"corrected_by_user_id": 1,
"files": [
{
"id": 2,
"hash": "f7fb8ab6fd2f0e5fe3fcdfefdb48daaf",
"sha1_checksum": "df767545dd4142345f27df547a577f216cca967d",
"name": "Test.pdf",
"content_type": "application/pdf",
"size": 43413,
"is_public": false,
"related_to": "todo.1.user.3.submission",
"uploaded": "2021-02-05T21:01:02+01:00",
"url": "https://homeworker.li/document/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkb2N1bWVudF9pZCI6Miwic3ViIjoiZG9jdW1lbnQuYWNjZXNzX3Rva2VuIiwiaWF0IjoxNjEyNTU1MjI2LCJleHAiOjE2MTI1NTg4ODYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGlcL2RvY3VtZW50In0.wle-HqOssDmNAWgdwyWs5Uo2H5hN0kh1RP0Wvmz841I/2",
"url_by_hash": "https://homeworker.li/document/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkb2N1bWVudF9pZCI6Miwic3ViIjoiZG9jdW1lbnQuYWNjZXNzX3Rva2VuIiwiaWF0IjoxNjEyNTU1MjI2LCJleHAiOjE2MTI1NTg4ODYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGlcL2RvY3VtZW50In0.wle-HqOssDmNAWgdwyWs5Uo2H5hN0kh1RP0Wvmz841I/2",
"preview_url": "https://homeworker.li/document/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkb2N1bWVudF9pZCI6Miwic3ViIjoiZG9jdW1lbnQuYWNjZXNzX3Rva2VuIiwiaWF0IjoxNjEyNTU1MjI2LCJleHAiOjE2MTI1NTg4ODYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGlcL2RvY3VtZW50In0.wle-HqOssDmNAWgdwyWs5Uo2H5hN0kh1RP0Wvmz841I/2/preview",
"download_url": "https://redirect.homeworker.li/redirect?to=https%3A%2F%2Fhomeworker.li%2Fdocument%2FeyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkb2N1bWVudF9pZCI6Miwic3ViIjoiZG9jdW1lbnQuYWNjZXNzX3Rva2VuIiwiaWF0IjoxNjEyNTU1MjI2LCJleHAiOjE2MTI1NTg4ODYsImlzcyI6Imh0dHBzOlwvXC9ob21ld29ya2VyLmxpXC9hdXRoIiwiYXVkIjoiaHR0cHM6XC9cL2hvbWV3b3JrZXIubGlcL2RvY3VtZW50In0.wle-HqOssDmNAWgdwyWs5Uo2H5hN0kh1RP0Wvmz841I%2F2%2Fdownload",
"can_delete": false,
"human_size": "43.41kB",
"type": "pdf",
"alphanumeric_id": "2"
}
],
"correction_files": [],
"document_relation": "todo.1.user.3.submission",
"correction_files_document_relation": "todo.1.user.3.correction",
"user_can_submit": false,
"comment_formatted": "Bei der Aufgabe c) hatte ich kleine Probleme",
"comment_basic": "Bei der Aufgabe c) hatte ich kleine Probleme",
"teacher_correction_formatted": "Das war schon sehr gut.\nIn der Teilaufgabe c) kannst du jedoch mehr auf den vorherigen Teil eingehen",
"teacher_correction_basic": "Das war schon sehr gut.\nIn der Teilaufgabe c) kannst du jedoch mehr auf den vorherigen Teil eingehen",
"is_acknowledged": true,
"is_submitted": true,
"is_corrected": true,
"is_uncorrected": false
}
}