Skip to content

Commit

Permalink
Merge branch 'main' into rsgraber/20230926-update-publish-via-config
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebecca Graber authored Oct 4, 2023
2 parents 4c9578e + 7e6e924 commit 5d7e609
Show file tree
Hide file tree
Showing 19 changed files with 764 additions and 20 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ Unreleased
* Re-licensed this repository from AGPL 3.0 to Apache 2.0
* **Breaking change**: Restructured EVENT_BUS_PRODUCER_CONFIG

[8.8.0] - 2023-10-02
--------------------
Added
~~~~~
* Added new ``MANAGE_STUDENTS_PERMISSION_ADDED`` and ``MANAGE_STUDENTS_PERMISSION_REMOVED`` events in learning

[8.7.0] - 2023-09-29
--------------------
Added
~~~~~
* Added new ``EXAM_ATTEMPT_SUBMITTED``, ``EXAM_ATTEMPT_REJECTED``, ``EXAM_ATTEMPT_VERIFIED``, ``EXAM_ATTEMPT_RESET``, and ``EXAM_ATTEMPT_ERRORED`` events in learning.

[8.6.0] - 2023-08-28
--------------------
Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
11. Enable producing to event bus via settings
12. Enable producing to event bus via settings
##############################################

Status
Expand Down
51 changes: 51 additions & 0 deletions docs/decisions/0013-special-exam-submission-and-review-events.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
13. 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 consume these events in order to handle all behavior as it pertains to the state of an exam subsection.

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.

1 change: 1 addition & 0 deletions docs/decisions/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Architectural Decision Records (ADRs)
0011-depending-on-multiple-event-bus-implementations
0012-producing-to-event-bus-via-settings
0013-new-event-bus-producer-config
0013-special-exam-submission-and-review-events
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"
}
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"
}
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"
}
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"
}
Loading

0 comments on commit 5d7e609

Please sign in to comment.