Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Submit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
Submit
Merge requests
!101
Resolve "Script trains"
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "Script trains"
72-script-trains
into
development
Overview
2
Commits
1
Pipelines
0
Changes
44
Merged
Resolve "Script trains"
Ruben Backx
requested to merge
72-script-trains
into
development
Jul 5, 2021
Overview
2
Commits
1
Pipelines
0
Changes
44
Closes
#72 (closed)
#91 (closed)
What does this MR do (summary)?
Adds script train functionality back
Adds an API for scripts to check submissions
Makes feedback only visible to the appropriate roles
Does this MR meet the acceptance criteria?
The main application was run to make sure the server still runs without errors.
Tests were written to verify the behaviour of this code.
Javadoc and other comments were added to make the code understandable.
The code adheres to the style guidelines.
Edited
Jul 7, 2021
by
Ruben Backx
0
0
Merge request reports
Compare
development
version 10
98db0df0
Aug 11, 2021
version 9
cbafb7f8
Jul 7, 2021
version 8
9f93cb32
Jul 7, 2021
version 7
0d0f7d3b
Jul 7, 2021
version 6
f2162bd3
Jul 7, 2021
version 5
3817d95a
Jul 7, 2021
version 4
0d3d2317
Jul 7, 2021
version 3
f99fba2a
Jul 7, 2021
version 2
424c1e15
Jul 7, 2021
version 1
1c9deddc
Jul 7, 2021
development (base)
and
latest version
latest version
684cae53
1 commit,
Aug 11, 2021
version 10
98db0df0
1 commit,
Aug 11, 2021
version 9
cbafb7f8
1 commit,
Jul 7, 2021
version 8
9f93cb32
1 commit,
Jul 7, 2021
version 7
0d0f7d3b
1 commit,
Jul 7, 2021
version 6
f2162bd3
1 commit,
Jul 7, 2021
version 5
3817d95a
1 commit,
Jul 7, 2021
version 4
0d3d2317
1 commit,
Jul 7, 2021
version 3
f99fba2a
1 commit,
Jul 7, 2021
version 2
424c1e15
1 commit,
Jul 7, 2021
version 1
1c9deddc
1 commit,
Jul 7, 2021
44 files
+
2171
−
228
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
44
docs/ScriptApi.md
0 → 100644
+
44
−
0
View file @ 684cae53
Edit in single-file editor
Open in Web IDE
# 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