-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events for exams IDA #268
Merged
Merged
Events for exams IDA #268
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
a6bbecd
feat: add/remove course staff role events
ilee2u 7379a41
fix: generated avro schemas
ilee2u 0084f13
fix: quality
ilee2u d3fe305
feat: fixed language of signal
ilee2u 382ca93
fix: avro.
ilee2u ef56279
fix: corrected signal descriptions
ilee2u f99c3b3
feat: signals complete
ilee2u 8e858fa
feat: improved docstrings pt 1
ilee2u e39f330
feat: improved event defs + avro
ilee2u 3ed95a5
fix: rebasing off main only
ilee2u e148d0f
fix: made signal purpose broader
ilee2u e61f729
fix: removed unecessary event param
ilee2u 0615aaf
fix: avro
ilee2u 0f31223
fix: removed unecessary docstring
ilee2u 2e3de7a
chore: version bump
ilee2u 6a2647f
feat: added exam_type to ExamAttemptData
ilee2u 121f6ba
fix: corrected exam_type attr.ib
ilee2u c3074b8
feat: Added "Special" to data name
ilee2u 8917946
chore: avro
ilee2u d3dbf5a
chore: move data import
ilee2u 2de9b4a
chore: changelog correction
ilee2u d9f9e1b
chore: 8.70 -> 8.7.0
ilee2u 2a2299a
docs: clarified signal name prefix EXAM_
ilee2u 918a641
feat: removed "Special" from data name
ilee2u d3c6581
docs: Added ADR Draft
ilee2u c1a196d
chore: quality
ilee2u d7ce2e5
docs: removed non-event related decision info
ilee2u 9e4744c
fix: improved ADR
ilee2u 6304946
chore: nit
ilee2u 80629ce
chore: Add ADR link to exam event data
ilee2u File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
docs/decisions/0013-special-exam-submission-and-review-events.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
12. Event definitions for special exam post-submission and review | ||
################################################################# | ||
|
||
Status | ||
****** | ||
|
||
**Draft** 2023-10-02 | ||
|
||
Context | ||
******* | ||
|
||
About Special Exams: | ||
==================== | ||
* Course subsections that have an `exam_type` have additional logic that governs completion, grading, credit requirements, and more based on the `exam_type` value (e.g. timed, proctored, etc). | ||
* These subsections are also known as **Special Exams**. | ||
* NOTE: The events described in this document will only be produced/consumed in the context of **Special Exams**. | ||
* Course subsections that do not have an `exam_type` configured may still have a grading policy named 'Exam'. This type of content does not have the exam user experience and is not governed by any exam specific logic. | ||
|
||
The New Exams IDA: | ||
================== | ||
* A new backend for exams called `edx-exams` is being developed (See the `exams IDA ADR <https://github.com/openedx/edx-proctoring/blob/master/docs/decisions/0004-exam-ida.rst>`_ for more info). | ||
* We are currently working to use the event bus to trigger the downstream effects whenever an exam attempt is submitted or reviewed. | ||
* For example, when an exam attempt is submitted, we will want to make sure `edx-platform` knows to mark the exam subsection as completed. | ||
|
||
|
||
Decision | ||
******** | ||
|
||
Where these events will be produced/consumed: | ||
============================================= | ||
|
||
* `edx-exams` will produce these events. | ||
* NOTE: There is no plan to have the legacy exams backend, `edx-proctoring`, produce these events. | ||
* `edx-platform` will consumed these events in order to handle all behavior as it pertains to the state of an exam subsection. | ||
ilee2u marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Event Definitions: | ||
================== | ||
* We will define the events that as planned in `the ADR for events in edx-exams <https://github.com/edx/edx-exams/blob/main/docs/decisions/0004-downstream-effect-events.rst>`_. | ||
|
||
Note on the Event Data/Signal Names: | ||
==================================== | ||
We are using the prefix "Exam" as opposed to the prefix "Special_Exam" for these events because **Special Exams** will likely be the only type of exam that will be of concern to developers in the context of events for the forseeable future. | ||
|
||
|
||
Consequences | ||
************ | ||
|
||
* `Edx-exams` will emit events via the event bus to send information without needing a response. | ||
* Since, `edx-exams` already recieves and responds to REST requests, we will avoid creating circular dependencies because `edx-exams` will not need to send REST requests itself. | ||
* These events are dynamic, in that they can also be consumed by other services/applications as needed in the future. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
more information about the project. | ||
""" | ||
|
||
__version__ = "8.6.0" | ||
__version__ = "8.7.0" |
75 changes: 75 additions & 0 deletions
75
...nts/event_bus/avro/tests/schemas/org+openedx+learning+exam+attempt+errored+v1_schema.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"name": "CloudEvent", | ||
"type": "record", | ||
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema", | ||
"fields": [ | ||
{ | ||
"name": "exam_attempt", | ||
"type": { | ||
"name": "ExamAttemptData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "student_user", | ||
"type": { | ||
"name": "UserData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "is_active", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"name": "pii", | ||
"type": { | ||
"name": "UserPersonalData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "username", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "email", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "course_key", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "usage_key", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "exam_type", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "requesting_user", | ||
"type": [ | ||
"null", | ||
"UserData" | ||
], | ||
"default": null | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"namespace": "org.openedx.learning.exam.attempt.errored.v1" | ||
} |
75 changes: 75 additions & 0 deletions
75
...ts/event_bus/avro/tests/schemas/org+openedx+learning+exam+attempt+rejected+v1_schema.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"name": "CloudEvent", | ||
"type": "record", | ||
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema", | ||
"fields": [ | ||
{ | ||
"name": "exam_attempt", | ||
"type": { | ||
"name": "ExamAttemptData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "student_user", | ||
"type": { | ||
"name": "UserData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "is_active", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"name": "pii", | ||
"type": { | ||
"name": "UserPersonalData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "username", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "email", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "course_key", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "usage_key", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "exam_type", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "requesting_user", | ||
"type": [ | ||
"null", | ||
"UserData" | ||
], | ||
"default": null | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"namespace": "org.openedx.learning.exam.attempt.rejected.v1" | ||
} |
75 changes: 75 additions & 0 deletions
75
...vents/event_bus/avro/tests/schemas/org+openedx+learning+exam+attempt+reset+v1_schema.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"name": "CloudEvent", | ||
"type": "record", | ||
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema", | ||
"fields": [ | ||
{ | ||
"name": "exam_attempt", | ||
"type": { | ||
"name": "ExamAttemptData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "student_user", | ||
"type": { | ||
"name": "UserData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "is_active", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"name": "pii", | ||
"type": { | ||
"name": "UserPersonalData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "username", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "email", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "course_key", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "usage_key", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "exam_type", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "requesting_user", | ||
"type": [ | ||
"null", | ||
"UserData" | ||
], | ||
"default": null | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"namespace": "org.openedx.learning.exam.attempt.reset.v1" | ||
} |
75 changes: 75 additions & 0 deletions
75
...s/event_bus/avro/tests/schemas/org+openedx+learning+exam+attempt+submitted+v1_schema.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"name": "CloudEvent", | ||
"type": "record", | ||
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema", | ||
"fields": [ | ||
{ | ||
"name": "exam_attempt", | ||
"type": { | ||
"name": "ExamAttemptData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "student_user", | ||
"type": { | ||
"name": "UserData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "is_active", | ||
"type": "boolean" | ||
}, | ||
{ | ||
"name": "pii", | ||
"type": { | ||
"name": "UserPersonalData", | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"name": "username", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "email", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "name", | ||
"type": "string" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "course_key", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "usage_key", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "exam_type", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "requesting_user", | ||
"type": [ | ||
"null", | ||
"UserData" | ||
], | ||
"default": null | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"namespace": "org.openedx.learning.exam.attempt.submitted.v1" | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the context section might be a good place to explain the meaning of exam / special exam.
Rough points to hit
exam_type
have additional logic that governs completion, grading, credit requirements, and more based on the type of exam.