Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
pal03377 committed Nov 13, 2023
1 parent 89e7047 commit ca93e34
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions module_text_cofee/module_text_cofee/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ def send_submissions(exercise: Exercise, submissions: List[Submission]):
"""Send submissions to old Athena-CoFee server."""
logger.info("Sending %d submissions to CoFee", len(submissions))
module_url = os.environ.get("MODULE_URL", f"http://localhost:{get_module_config().port}")
print("json:")
print({
"callbackUrl": f"{module_url}/cofee_callback/{exercise.id}",
"submissions": [
{
"id": submission.id,
"text": submission.text,
}
for submission in submissions
],
})
resp = requests.post(
f"{get_cofee_url()}/submit",
json={
Expand Down

0 comments on commit ca93e34

Please sign in to comment.