From 423b0666b8b73d61c477792517ca88960aa6822b Mon Sep 17 00:00:00 2001 From: ilee2u Date: Tue, 19 Sep 2023 17:02:42 -0400 Subject: [PATCH] feat: improved docstrings pt 1 --- openedx_events/learning/data.py | 78 ++++++--------------------------- 1 file changed, 14 insertions(+), 64 deletions(-) diff --git a/openedx_events/learning/data.py b/openedx_events/learning/data.py index 4de822db..91ff052c 100644 --- a/openedx_events/learning/data.py +++ b/openedx_events/learning/data.py @@ -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) @@ -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)