From ca93e34ee8e577b16e68b56e8ed70ec83ea645ed Mon Sep 17 00:00:00 2001 From: Paul Schwind Date: Mon, 13 Nov 2023 22:42:22 +0100 Subject: [PATCH] add log --- module_text_cofee/module_text_cofee/adapter.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/module_text_cofee/module_text_cofee/adapter.py b/module_text_cofee/module_text_cofee/adapter.py index 19230bddd..e1f7f9bac 100644 --- a/module_text_cofee/module_text_cofee/adapter.py +++ b/module_text_cofee/module_text_cofee/adapter.py @@ -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={