Commit 4602624
committed
feat: Add event emission for external grader scores
This commit adds the EXTERNAL_GRADER_SCORE_SUBMITTED event emission to the
put_result endpoint in the XQueueViewSet. When a grader submits a result and
the score is successfully saved, the system now emits an event with all the
necessary information for the LMS to render the graded XBlock.
Key changes:
- Add queue_key field to ExternalGraderDetail model
- Include queue_key in create_external_grader_detail method
- Emit EXTERNAL_GRADER_SCORE_SUBMITTED event after successful score update
- Implement robust false to propagate error and put submission in pending queue again
- Add migration for the new queue_key field
- Add openedx-events dependency
This enables the event-driven approach for updating XBlocks with scoring data
from the edx-submissions service, supporting the gradual migration away from
HTTP-based XQueue callbacks.1 parent e198d56 commit 4602624
17 files changed
Lines changed: 160 additions & 634 deletions
File tree
- docs/source/decisions
- requirements
- submissions
- migrations
- tests
- views
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 9 | | |
18 | | - | |
19 | 10 | | |
20 | | - | |
21 | 11 | | |
22 | | - | |
23 | 12 | | |
24 | | - | |
25 | 13 | | |
26 | | - | |
27 | 14 | | |
28 | | - | |
29 | 15 | | |
30 | | - | |
31 | 16 | | |
32 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 8 | | |
12 | | - | |
13 | 9 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 10 | | |
18 | | - | |
19 | 11 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 12 | | |
24 | | - | |
25 | 13 | | |
26 | | - | |
27 | 14 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 15 | | |
32 | | - | |
33 | 16 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 17 | | |
39 | | - | |
40 | 18 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 19 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 20 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 21 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 22 | | |
59 | | - | |
60 | 23 | | |
61 | | - | |
62 | 24 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 25 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
6 | 16 | | |
7 | 17 | | |
8 | 18 | | |
| |||
0 commit comments