Skip to content

Collapse XQueueInterface into XQueueInterfaceSubmission and let get_score() own the learner messages #345

Backlog

Description

@feanil

Since #338, edx-submissions is the only backend for external grader submissions, but the code still has the shape it had when there were two. CodeResponse.get_score() builds a header dict and serializes it to JSON with make_xheader(), then XQueueInterface.send_to_queue() and XQueueInterfaceSubmission.get_submission_params() each parse it again to pull out the queue key and the queue name.

We should collapse XQueueInterface and XQueueInterfaceSubmission into one class that takes the queue name and the queue key as plain arguments, and drop the JSON header.

While we're in there, get_score() should own the whole learner-facing sentence for each failure case. Today send_to_queue() returns a short reason that gets dropped into "Unable to deliver your submission to grader (Reason: ...). Please try again later." which has two problems:

  • When the answer is over the edx-submissions size limit the learner is told to try again later, which won't help. That case should tell them their answer is too long.
  • The reasons ("the grading queue is unavailable", "the submission was rejected") aren't translated.

Both came out of @ormsbee's review on #338:

The runtime's xqueue service and openedx-platform construct XQueueInterface, so this is a breaking change and needs a matching platform PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions