Skip to content
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

fix: [ACI-152] fix ci failure #12

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@
}
}
],
"namespace": "org.openedx.learning.ccx.course.passing.status.v1"
"namespace": "org.openedx.learning.ccx.course.passing.status.updated.v1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@
}
}
],
"namespace": "org.openedx.learning.course.passing.status.v1"
"namespace": "org.openedx.learning.course.passing.status.updated.v1"
}
4 changes: 3 additions & 1 deletion openedx_events/event_bus/avro/tests/test_avro.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import List
from unittest import TestCase

from ccx_keys.locator import CCXLocator
from fastavro import schemaless_reader, schemaless_writer
from fastavro.repository.base import SchemaRepositoryError
from fastavro.schema import load_schema
Expand Down Expand Up @@ -97,7 +98,7 @@ def generate_test_event_data_for_data_type(data_type): # pragma: no cover
defaults_per_type = {
int: 1,
bool: True,
str: "default",
str: "passing",
float: 1.0,
CourseKey: CourseKey.from_string("course-v1:edX+DemoX.1+2014"),
UsageKey: UsageKey.from_string(
Expand All @@ -107,6 +108,7 @@ def generate_test_event_data_for_data_type(data_type): # pragma: no cover
LibraryUsageLocatorV2: LibraryUsageLocatorV2.from_string('lb:MITx:reallyhardproblems:problem:problem1'),
List[int]: [1, 2, 3],
datetime: datetime.now(),
CCXLocator: CCXLocator(org='edx', course='DemoX', run='Demo_course', ccx='1'),
}
data_dict = {}
for attribute in data_type.__attrs_attrs__:
Expand Down
14 changes: 10 additions & 4 deletions openedx_events/learning/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ class CcxCourseData:
coach_email (str): The email address of the coach (instructor) for the CCX course.
start (str, optional): The start date of the CCX course. Defaults to None, indicating no specific start date.
end (str, optional): The end date of the CCX course. Defaults to None, indicating no specific end date.
max_students_allowed (int, optional): The maximum number of students that can enroll in the CCX course. Defaults to None, indicating no limit.
max_students_allowed (int, optional): The maximum number of students that can enroll in the CCX course.
Defaults to None, indicating no limit.
"""

ccx_course_key = attr.ib(type=CCXLocator)
Expand Down Expand Up @@ -510,10 +511,13 @@ class CoursePassingStatusData:
Represents the event data when a user's grade is updated, indicates if current grade is enough for course passing.

Attributes:
status (str): A string containing information about user's current course grade value in comparison to the grading policy threshold.
status (str): A string containing information about user's current course grade value
in comparison to the grading policy threshold.
user (UserData): An instance of UserData containing information about the user whose grade was updated.
course (CourseData): An instance of CourseData containing details about the course in which the grade was updated.
course (CourseData): An instance of CourseData containing details about the course
in which the grade was updated.
"""

PASSING = 'passing'
FAILING = 'failing'
STATUSES = [PASSING, FAILING]
Expand All @@ -532,9 +536,11 @@ class CcxCoursePassingStatusData(CoursePassingStatusData):
providing a custom course attribute suited for CCX course instances.

Attributes:
course (CcxCourseData): An instance of CcxCourseData containing details about the CCX course in which the grade threshold was crossed.
course (CcxCourseData): An instance of CcxCourseData containing details about the CCX course
in which the grade threshold was crossed.
All other attributes are inherited from CoursePassingStatusData.
"""

course = attr.ib(type=CcxCourseData)


Expand Down
4 changes: 2 additions & 2 deletions openedx_events/learning/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
CourseAccessRoleData,
CourseDiscussionConfigurationData,
CourseEnrollmentData,
CoursePassingStatusData,
CourseNotificationData,
CoursePassingStatusData,
DiscussionThreadData,
ExamAttemptData,
ORASubmissionData,
Expand Down Expand Up @@ -400,4 +400,4 @@
data={
"badge": BadgeData,
}
)
)
Loading