Skip to content

Commit

Permalink
fix: removed unecessary event param
Browse files Browse the repository at this point in the history
- Also changed user_id to student_user
  • Loading branch information
ilee2u committed Sep 21, 2023
1 parent e9f3fab commit d3f0bcc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
13 changes: 6 additions & 7 deletions openedx_events/learning/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,14 @@ class ExamAttemptData:
Attributes defined for the Open edX Exam downstream effects.
Arguments:
user_id (int): identifier of the user to which the grade override belongs
course_key (CourseKey): identifier of the course to which the grade override belongs
usage_key (UsageKey): identifier of the content that will get a grade override
requesting_user (UserData): user triggering event, sent only when instructor modifies an exam attempt
credit_requirement_status (str): status to change the student's CreditRequirement to
student_user (UserData): User object for the student to whom the exam attempt belongs
course_key (CourseKey): identifier of the course to which the exam attempt belongs
usage_key (UsageKey): identifier of the content that will get a exam attempt
requesting_user (UserData): user triggering the event (sometimes a non-learner, e.g. an instructor)
credit_requirement_status (str): what to change the student's CreditRequirement status to
"""

user_id = attr.ib(type=int)
student_user = attr.ib(type=UserData)
course_key = attr.ib(type=CourseKey)
usage_key = attr.ib(type=UsageKey)
requesting_user = attr.ib(type=UserData, default=None)
credit_requirement_status = attr.ib(type=str, default=None)
10 changes: 5 additions & 5 deletions openedx_events/learning/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
EXAM_ATTEMPT_SUBMITTED = OpenEdxPublicSignal(
event_type="org.openedx.learning.exam.attempt.submitted.v1",
data={
"exam_attempt_data": ExamAttemptData,
"exam_attempt": ExamAttemptData,
}
)

Expand All @@ -216,7 +216,7 @@
EXAM_ATTEMPT_REJECTED = OpenEdxPublicSignal(
event_type="org.openedx.learning.exam.attempt.rejected.v1",
data={
"exam_attempt_data": ExamAttemptData,
"exam_attempt": ExamAttemptData,
}
)

Expand All @@ -227,7 +227,7 @@
EXAM_ATTEMPT_VERIFIED = OpenEdxPublicSignal(
event_type="org.openedx.learning.exam.attempt.verified.v1",
data={
"exam_attempt_data": ExamAttemptData,
"exam_attempt": ExamAttemptData,
}
)

Expand All @@ -238,7 +238,7 @@
EXAM_ATTEMPT_ERRORED = OpenEdxPublicSignal(
event_type="org.openedx.learning.exam.attempt.errored.v1",
data={
"exam_attempt_data": ExamAttemptData,
"exam_attempt": ExamAttemptData,
}
)

Expand All @@ -249,6 +249,6 @@
EXAM_ATTEMPT_RESET = OpenEdxPublicSignal(
event_type="org.openedx.learning.exam.attempt.reset.v1",
data={
"exam_attempt_data": ExamAttemptData,
"exam_attempt": ExamAttemptData,
}
)

0 comments on commit d3f0bcc

Please sign in to comment.