testmycode / testmycode/tmc-server

Add support for callback hooks for when submission is graded

Open
#383 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Ruby
Stars
51
Forks
42
Avg merge
1h 27m
Merged PRs (30d)
1

Description

Initial draft/idea

Ideally we could have 2 places to list multiple callback urls.

  1. Per course setting, configured among other course parameters
  2. Callback url given when submission is created, persisted into db (array?)

And after submission is graded and saved here: https://github.com/testmycode/tmc-server/blob/master/lib/sandbox_results_saver.rb#L59 we would call all of the callback urls provided.

This would make the callbacks to take place during the the http post received from tmc-sandbox, but it shouldn't be a problem tmc-sandbox won't really mind if it takes any longer.

Other option would be to store the callbacks in db and extend the current background tasker to make these callbacks. Eventually this would better allow to retry failing callbacks. But the

Use case

Integration with various services, e.g. A+ and Artos random web apps.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/sandbox_results_saver.rb around line 59, where the submission is graded and saved. Compare the proposed per-course callback setting with callback URLs supplied at submission creation, then resolve whether callbacks run during the HTTP request or through the background tasker; the work is done when both configuration paths and callback execution behavior are defined and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.