feat: Improve robust score rendering with event-based architecture

This commit implements a comprehensive solution for test score integration in the
enhancement system along with improvements to the score rendering mechanism. Key
changes include:

- Add event handler for rendering blocks with edx-submissions scores
- Implement event-based mechanism to render XBlocks with scoring data
- Create signal handlers in handlers.py to process external grader scores
- Develop specialized XBlock loader for rendering without HTTP requests
- Add queue_key propagation across the submission pipeline
- Register submission URLs in LMS routing configuration
- Add complete docstrings to score render module for better code maintainability
- Add ADR for XBlock rendering with external grader integration
- Add openedx-events fork branch as a dependency in testing.in
- Upgrade edx submission dependency

These changes support the migration from traditional XQueue callback HTTP requests
to a more robust event-based architecture, improving performance and reliability
when processing submission scores. The included ADR documents the architectural
decision and implementation approach for this significant improvement to the
external grading workflow.
This commit is contained in:
Leonardo Beroes
2025-04-14 08:28:28 -04:00
committed by David Ormsbee
parent e1747f3844
commit 70ea641c99
15 changed files with 790 additions and 51 deletions

View File

@@ -183,10 +183,12 @@ class XQueueInterface:
return self._http_post(self.url + "/xqueue/submit/", payload, files=files)
course_key = self.block.scope_ids.usage_id.context_key
header_info = json.loads(header)
queue_key = header_info['lms_key']
if use_edx_submissions_for_xqueue(course_key):
submission = self.submission.send_to_submission(header, body, files)
return None, ""
submission = self.submission.send_to_submission(header, body, queue_key, files)
return None, ''
return self._http_post(self.url + "/xqueue/submit/", payload, files=files)