pub async fn remark_submissions(
__arg0: State<AppState>,
__arg1: Path<(i64, i64)>,
__arg2: Json<RemarkRequest>,
) -> impl IntoResponse
Expand description
POST /api/modules/{module_id}/assignments/{assignment_id}/submissions/remark
Regrade (remark) assignment submissions. Accessible to lecturers, assistant lecturers, and admins.
This endpoint allows authorized users to re-run marking logic on either:
- Specific submissions (via
submission_ids
) - All submissions in an assignment (via
all: true
)
§Path Parameters
module_id
(i64): The ID of the module containing the assignmentassignment_id
(i64): The ID of the assignment containing the submissions
§Request Body
Either:
{ "submission_ids": [123, 124, 125] }
or
{ "all": true }
§Success Response (200 OK)
{
"success": true,
"message": "Regraded 3/4 submissions",
"data": {
"regraded": 3,
"failed": [
{ "id": 125, "error": "Submission not found" }
]
}
}
§Error Responses
400 Bad Request - Invalid request parameters
{ "success": false, "message": "Must provide either submission_ids or all=true" }
403 Forbidden - User not authorized for operation
{ "success": false, "message": "Not authorized to remark submissions" }
404 Not Found - Assignment not found
{ "success": false, "message": "Assignment not found" }
500 Internal Server Error - Regrading failure
{ "success": false, "message": "Failed to load mark allocator" }