diff --git a/lib/cadet_web/admin_controllers/admin_grading_controller.ex b/lib/cadet_web/admin_controllers/admin_grading_controller.ex index 5f349edb0..aa93cd30f 100644 --- a/lib/cadet_web/admin_controllers/admin_grading_controller.ex +++ b/lib/cadet_web/admin_controllers/admin_grading_controller.ex @@ -58,6 +58,17 @@ defmodule CadetWeb.AdminGradingController do index(conn, %{"group" => "false"}) end + def index_all_submissions(conn, _) do + index( + conn, + %{ + "group" => "false", + "pageSize" => "100000000000", + "offset" => "0" + } + ) + end + def show(conn, %{"submissionid" => submission_id}) when is_ecto_id(submission_id) do case Assessments.get_answers_in_submission(submission_id) do {:ok, {answers, assessment}} -> diff --git a/lib/cadet_web/router.ex b/lib/cadet_web/router.ex index 9c73f21da..1ee304c01 100644 --- a/lib/cadet_web/router.ex +++ b/lib/cadet_web/router.ex @@ -144,6 +144,8 @@ defmodule CadetWeb.Router do post("/assessments/:assessmentid", AdminAssessmentsController, :update) delete("/assessments/:assessmentid", AdminAssessmentsController, :delete) + get("/grading/all_submissions", AdminGradingController, :index_all_submissions) + post( "/grading/:assessmentid/publish_all_grades", AdminGradingController,