Skip to content

Commit

Permalink
feat: improved docstrings pt 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ilee2u committed Sep 19, 2023
1 parent 4cfff65 commit 423b066
Showing 1 changed file with 14 additions and 64 deletions.
78 changes: 14 additions & 64 deletions openedx_events/learning/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,14 @@ class GradeOverrideData:
"""
Attributes defined for the Open edX Grades Override data object.
user_id (int): identifier of the user to which the grade override belongs
course_key_or_id (str): identifier of the course to which the grade override belongs
usage_key_or_id (str): identifier of the content that will get a grade override
earned_all (float): the value that the subsection grade will be changed to
earned_graded (float): the value that the subsection grade will be changed to
overrider (str): the user creating the override
comment (str): reason for the override
Arguments:
user_id (int): identifier of the user to which the grade override belongs
course_key_or_id (str): identifier of the course to which the grade override belongs
usage_key_or_id (str): identifier of the content that will get a grade override
earned_all (float): the value that the subsection grade will be changed to
earned_graded (float): the value that the subsection grade will be changed to
overrider (str): the user creating the override
comment (str): reason for the override
"""
used_id = attr.ib(type=int)
course_key_or_id = attr.ib(type=str)
Expand All @@ -339,64 +340,13 @@ class GradeOverrideData:
class InstructorCompletionData:
# TODO: These docstrings!!!
"""
Attributes defined for the
"""
username = attr.ib(type=str)
content_id = attr.ib(type=str)
course_id = attr.ib(type=str, default=None)
requesting_user = attr.ib(type=UserData, default=None)

Attributes defined for Open edX Instructor service functions
that handle the completion state of xblocks within a course.
attr.s(frozen=True)
class CreditRequirementStatusData:
"""
"""
user_id = attr.id(type=int)
course_key_or_id = attr.id(type=str)
req_namespace = attr.id(type=str)
req_name = attr.id(type=str)
status = attr.id(type=str, default=None)


attr.s(frozen=True)
class InvalidateCertificateData:
"""
Attributes for
This is separate from ceritificate data because of how diff the params are
"""
user_id = attr.id(type=int)
course_id = attr.ib(type=str)
>>>>>>> 216b643 (feat: signals complete)


attr.s(frozen=True)
class GradeOverrideData:
"""
Attributes defined for the Open edX Grades Override data object.
user_id (int): identifier of the user to which the grade override belongs
course_key_or_id (str): identifier of the course to which the grade override belongs
usage_key_or_id (str): identifier of the content that will get a grade override
earned_all (float): the value that the subsection grade will be changed to
earned_graded (float): the value that the subsection grade will be changed to
overrider (str): the user creating the override
comment (str): reason for the override
"""
used_id = attr.ib(type=int)
course_key_or_id = attr.ib(type=str)
usage_key_or_id = attr.ib(type=str)
earned_all = attr.ib(type=float, default=None)
earned_graded = attr.ib(type=float, default=None)
overrider = attr.ib(type=str, default=None)
comment = attr.ib(type=str, default=None)


attr.s(frozen=True)
class InstructorCompletionData:
# TODO: These docstrings!!!
"""
Attributes defined for the
Arguments:
username (str):
content_id (str):
course_id (str):
"""
username = attr.ib(type=str)
content_id = attr.ib(type=str)
Expand Down

0 comments on commit 423b066

Please sign in to comment.