-
Notifications
You must be signed in to change notification settings - Fork 346
Description
Describe the bug
I wanted to add an external submission for project. Therefore, I've created an exam and with one text exercise. In my script, I've used the following endpoint /api/assessment/exercises/%d/external-submission-results
where %d
is the respective exercise ID and authenticated myself as an instructor via the JWT token.
The request looks like this:
Sending request to API url="https://artemis.tum.de/api/assessment/exercises/17445/external-submission-results?studentLogin=do25stu" method=POST payload="{\"completionDate\":\"2025-10-10T17:06:50.650669+02:00\",\"successful\":true,\"score\":110,\"rated\":true,\"feedbacks\":[{\"text\":\"Great job!\",\"detailedText\":\"You have successfully completed the exercise.\",\"credits\":100,\"positive\":true},{\"text\":\"Bonus\",\"detailedText\":\"Please review the material and try again.\",\"credits\":4,\"positive\":false}]}"
Following the request, I get an 500 Internal server error. However, the Participation is still created and visible via the web interface:
ERROR Failed to create external submission error="API request failed with status code: 500 Internal Server Error, response: {\"type\":\"https://www.jhipster.tech/problem/problem-with-message\",\"title\":\"Internal Server Error\",\"status\":500,\"detail\":\"No student exam found for student participation 9093072\",\"path\":\"/api/assessment/exercises/17445/external-submission-results\",\"message\":\"error.http.500\"}"
To Reproduce
- Create a Course
- Create an Exam
- Add exercise group with one text exercise
- Run the respective command with the ExerciseID, studentLogin and JWT token (use the provided Go script - see Additional Context)
- Go into the Participation Overview of this specific exercise -> you should see the participation and submission
Expected behavior
There are two possible behaviors:
- The server returns code 500 (as it does currently). But then also does not create any resources
- The server creates the submission automatically and then also the participation. In this case it would return successful
Regarding, the WebView, it is expected to have the feedback visible when the external submission was created.
Bonus: When you now try to add manual feedback, this feedback is not being saved too (not sure why, because there is not error message in console or Sentry)
Screenshots
Here is a screenshot of the respective submission. One can see that the score is correctly displayed. The feedback, however, is not visible at all.



Which version of Artemis are you seeing the problem on?
8.4.1
What browsers are you seeing the problem on?
Other (specify in "Additional context")
Additional context
You can use this Golang script to test the process after you have created the respective course, exam and exercise.
Just copy the .env.example
file and fill it with your information.
- The exercise id can be spotted in the URL once you visit the exercise
- The JWT token can be copied from your DevTools and just inserted into the env variable
- The Student Login is the one for the student, for who you want to create the submission (e.g. ge12lol)
Once you've filled all the information, just run DEBUG=true go run .
inside the directory to start the script
devops-external-submission.zip
Relevant log output
From Sentry, I can see that this is the exception raised:
IllegalStateException
No student exam found for student participation 9093078