pub async fn set_assignment_config(
__arg0: State<AppState>,
__arg1: Path<(i64, i64)>,
__arg2: Json<Value>,
) -> impl IntoResponse
Expand description
POST /api/modules/{module_id}/assignments/{assignment_id}/config
Save or replace the JSON execution configuration object for a specific assignment.
Accessible to users with Lecturer or Admin roles assigned to the module. The config is persisted
to disk as a JSON file under the module’s assignment directory. This currently uses the
[ExecutionConfig
] structure, which will be expanded in the future.
§Path Parameters
module_id
(i64): The ID of the moduleassignment_id
(i64): The ID of the assignment
§Request Body
A JSON object matching the shape of ExecutionConfig
:
{
"execution": {
"timeout_secs": 10,
"max_cpus": 2,
"max_processes": 256
},
"marking": {
"marking_scheme": "exact",
"feedback_scheme": "auto",
"deliminator": "&-=-&"
}
}
§Success Response (200 OK)
{
"success": true,
"message": "Assignment configuration saved",
"data": null
}
§Error Responses
- 400 – Invalid JSON structure
- 404 – Assignment not found
- 500 – Internal error saving the file
§Notes
- Configuration is saved to disk under
ASSIGNMENT_STORAGE_ROOT/module_{id}/assignment_{id}/config/config.json
. - Only valid
ExecutionConfig
objects are accepted.