Skip to content

Commit 44e043b

Browse files
fix: update data attrb
1 parent c2b325b commit 44e043b

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

openedx_events/learning/data.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Data attributes for events within the architecture subdomain `learning`. These
33
attributes follow the form of attr objects specified in OEP-49 data pattern.
44
"""
5-
6-
from datetime import datetime
75
from typing import Dict
86

97
import attr
@@ -41,37 +39,40 @@ class RegistrationData:
4139

4240

4341
@attr.s(frozen=True)
44-
class CourseData:
42+
class CourseOverviewData:
4543
"""
46-
Attributes defined for Open edX course object.
44+
Attributes defined for Open edX Course Overview object.
4745
"""
4846
course_key = attr.ib(type=CourseKey)
49-
display_name = attr.ib(type=CourseKey, factory='')
47+
display_name = attr.ib(type=CourseKey, factory=str)
5048

5149

5250
@attr.s(frozen=True)
53-
class EnrollmentData:
51+
class CourseEnrollmentData:
5452
"""
5553
Attributes defined for Open edX Course Enrollment object.
5654
"""
5755
user = attr.ib(type=StudentData)
58-
course = attr.ib(type=CourseData)
56+
course = attr.ib(type=CourseOverviewData)
5957
mode = attr.ib(type=str)
58+
is_active = attr.ib(type=bool)
6059

6160

6261
@attr.s(frozen=True)
63-
class CertificateData(EnrollmentData):
62+
class CertificateData(CourseEnrollmentData):
6463
"""
65-
Attributes defined for Open edX Course Enrollment object.
64+
Attributes defined for Open edX Certificate data object.
6665
"""
66+
grade = attr.ib(type=str)
6767
status = attr.ib(type=str)
68-
available_date = attr.ib(type=datetime)
68+
download_url = attr.ib(type=str)
69+
name = attr.ib(type=str)
6970

7071

7172
@attr.s(frozen=True)
7273
class CohortData:
7374
"""
74-
Attributes defined for Open edX Course Enrollment object.
75+
Attributes defined for Open edX Cohort Membership object.
7576
"""
7677
user = attr.ib(type=StudentData)
77-
course = attr.ib(type=CourseData)
78+
course = attr.ib(type=CourseOverviewData)

0 commit comments

Comments
 (0)