Function get_assignment_readiness

Source
pub async fn get_assignment_readiness(
    __arg0: State<AppState>,
    __arg1: Path<(i64, i64)>,
) -> (StatusCode, Json<ApiResponse<AssignmentReadiness>>)
Expand description

GET /api/modules/:module_id/assignments/:assignment_id/readiness

Retrieve a detailed readiness report for a specific assignment. The report includes boolean flags indicating whether each required component of the assignment is present on disk or in the database.

This endpoint is useful to check if an assignment is fully set up and eligible to transition from Setup to Ready state.

§Path Parameters

  • module_id (i64): The ID of the module containing the assignment.
  • assignment_id (i64): The ID of the assignment to check readiness for.

§Responses

  • 200 OK
{
  "success": true,
  "message": "Assignment readiness checked successfully",
  "data": {
    "config_present": true,
    "tasks_present": true,
    "main_present": true,
    "memo_present": true,
    "makefile_present": true,
    "memo_output_present": true,
    "mark_allocator_present": true,
    "is_ready": true
  }
}
  • 500 Internal Server Error
{
  "success": false,
  "message": "Failed to compute readiness: <error details>"
}