Getting TestRun in _editor.output #2677
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Dear @seemantTUI, many thanks for reaching out again. I fully understand your use case and think it makes sense to support learners with AI-generated feedback. Regarding the implementation, different approaches can be chosen. Depending on these, the steps to implement the solution might differ. In the current state, the result of the testruns are shared with the frontend (including the actual error messages and the feedback) through the active web socket connection between the browser and the server ( If you don't want to mingle with the different ID and filenames, you should also be able to access the latest testrun of a learner for a given exercise. This is easier to implement (and might be sufficient for a spike), but at the cost that potentially a learner using multiple tabs (which is neither recommended nor officially supported anyway) would only get feedback on the current status but not the older version potentially still open. The view file you referenced is only used as a dummy to populate the scoring and linter cards through JavaScript (function Either way, you would achieve the desired result and only perform an API call to ChatGPT if initiated by the user. Good luck with the implementation; looking forward to see your results! Best, |
Beta Was this translation helpful? Give feedback.
Dear @seemantTUI,
many thanks for reaching out again. I fully understand your use case and think it makes sense to support learners with AI-generated feedback.
Regarding the implementation, different approaches can be chosen. Depending on these, the steps to implement the solution might differ. In the current state, the result of the testruns are shared with the frontend (including the actual error messages and the feedback) through the active web socket connection between the browser and the server (
wss://<host>/submissions/<submission ID>/score
). However, this is done before the testruns are persisted (methodSubmissionsController#save_testrun_output
). Hence, when the testruns are sent …