Skip to content
Snippets Groups Projects

Resolve "Script trains"

Files

docs/ScriptApi.md 0 → 100644
+ 44
0
# Script API
Submit can be configured to send student submissions to scripts to be automatically graded.
Anyone can create one of these scripts using the script API.
### Receiving data from Submit
Submit sends the following information:
##### Multipart Form Data
| field | type | note |
| ----- | ---- | ---- |
| file | MultiPartFile | |
| submissionId | Long | |
| scriptId | Long | |
| key | String | 512 byte unique key, valid for one hour, can be used to send multiple feedbacks |
| grade | Boolean | True if the script is allowed to send grades |
#### Sending feedback to Submit
Submit accepts feedback in the following format:
Endpoint: `/script/feedback`
##### JSON
| field | type | note |
| ----- | ---- | ---- |
| submissionId | Long | Needs to match with the id sent |
| scriptId | Long | Needs to match with the id sent |
| key | String | Needs to match with the key sent |
| visibleFor | String | STUDENT, HEAD_TA, TA, or TEACHER, will be visible for specified role and above |
| textualFeedback | String | |
| scoreType | String | Applies only when allowed to grade, see below for allowed values |
| score | Int | Applies only when allowed to grade, see below for allowed scores |
##### Allowed scores
| type | range | note |
| ---- | ----- | ---- |
| PASS_FAIL | 0, 1 | 0 = FAIL, 1 = PASS |
| DUTCH_GRADE | 10 - 100 | 10 = 1.0, 100 = 10.0 |
| DUTCH_GRADE_1000 | 100 - 1000 | 100 = 1.00, 1000 = 10.00 |
| SCORE_OUT_OF_10 | 0 - 10 | |
| SCORE_OUT_OF_100 | 0 - 100 | |
| SCORE_OUT_OF_1000 | 0 - 1000 | |
| SCORE_OUT_OF_10000 | 0 - 10000 | |
| UNLIMITED | 0 - 2,147,483,647 | |
\ No newline at end of file
Loading