pub async fn get_task_details(
__arg0: State<AppState>,
__arg1: Path<(i64, i64, i64)>,
) -> impl IntoResponse
Expand description
GET /api/modules/{module_id}/assignments/{assignment_id}/tasks/{task_id}
Retrieve detailed information about a specific task within an assignment. Only accessible by lecturers or admins assigned to the module.
§Path Parameters
module_id
(i64): The ID of the module containing the assignmentassignment_id
(i64): The ID of the assignment containing the tasktask_id
(i64): The ID of the task to retrieve details for
§Responses
200 OK
{
"success": true,
"message": "Task details retrieved successfully",
"data": {
"id": 123,
"task_id": 123,
"command": "java -cp . Main",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"subsections": [
{
"name": "Compilation",
"value": 10,
"memo_output": "Code compiles successfully without errors."
},
{
"name": "Output",
"value": 15,
"memo_output": "Program produces correct output for all test cases."
}
]
}
}
404 Not Found
{
"success": false,
"message": "Module not found" // or "Assignment not found" or "Task not found" or "Assignment does not belong to this module" or "Task does not belong to this assignment" or "Task not found in allocator"
}
500 Internal Server Error
{
"success": false,
"message": "Database error retrieving module" // or "Database error retrieving assignment" or "Database error retrieving task" or "Failed to load mark allocator"
}