MarkUsProject / Markus

Git repository of MarkUs
MIT License
255 stars 242 forks source link

en-mass set-to-complete and set-to-incomplete buttons; either that, or API #3921

Closed treblacy closed 5 years ago

treblacy commented 5 years ago

Feature request: On the per-assignment "Submissions" page visible to instructors (admins), buttons to set-to-complete or set-to-incomplete all checkboxed submissions. Either that, or an API route that changes these states.

Why: I use the API to upload autotesting mark components. A technical glitch discovered after releasing marks required me to re-run autotesting and upload new marks. Well this is forbidden unless the state is "incomplete" or "re-mark requested".

I am now manually clicking 70 links and entering 70 numbers by hand.

mishaschwartz commented 5 years ago

Hi @treblacy,

There is an API call to set a submission to 'incomplete'. The API documentation is a little behind so I'll link you to the source code directly for now:

https://github.com/MarkUsProject/markus-api/blob/a73c4d11f52a555534b173cf1d8cc49d084161c9/markusapi/markusapi.py#L233

We're working on updating the documentation for the API so I apologize if this went unnoticed.

If you want to use this API not through the markus-api python package you can call it on the command line like:

curl -H "Authorization: MarkUsAuth YourAuthKey" -X PUT --data "marking_state=incomplete" "http://example.com/api/assignments/1/groups/1/update_marking_state"

To set the marking state to incomplete for the group with id=1 for assignment with id=1