-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat: [FC-86] extend courseware api with new fields #36845
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
Changes from all commits
c43e1be
ca43788
3c47f1c
722c73f
42d3060
fa2eddb
3a8366e
b0ecbdf
577ef63
ed69cb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,10 +73,20 @@ def get_progress(self, program): | |
| } | ||
|
|
||
|
|
||
| class PrerequisiteCourseSerializer(serializers.Serializer): | ||
| """ | ||
| Serializer for prerequisite course data with the serialized course key and display name. | ||
| """ | ||
| key = serializers.CharField() | ||
| display = serializers.CharField() | ||
|
|
||
|
|
||
| class CourseInfoSerializer(serializers.Serializer): # pylint: disable=abstract-method | ||
| """ | ||
| Serializer for Course objects providing minimal data about the course. | ||
|
feanil marked this conversation as resolved.
|
||
| Compare this with CourseDetailSerializer. | ||
|
|
||
| For detailed information about what each field is for, see the docstring of the | ||
| CoursewareInformation class. | ||
| """ | ||
|
|
||
| access_expiration = serializers.DictField() | ||
|
|
@@ -115,6 +125,40 @@ class CourseInfoSerializer(serializers.Serializer): # pylint: disable=abstract- | |
| is_integrity_signature_enabled = serializers.BooleanField() | ||
| user_needs_integrity_signature = serializers.BooleanField() | ||
| learning_assistant_enabled = serializers.BooleanField() | ||
| show_courseware_link = serializers.BooleanField() | ||
|
feanil marked this conversation as resolved.
|
||
| is_course_full = serializers.BooleanField() | ||
| can_enroll = serializers.BooleanField() | ||
| invitation_only = serializers.BooleanField() | ||
| is_shib_course = serializers.BooleanField() | ||
| allow_anonymous = serializers.BooleanField() | ||
|
feanil marked this conversation as resolved.
|
||
| ecommerce_checkout = serializers.BooleanField() | ||
| single_paid_mode = serializers.DictField() | ||
| ecommerce_checkout_link = AbsoluteURLField() | ||
| course_image_urls = serializers.ListField( | ||
| child=serializers.CharField(), | ||
| allow_empty=True, | ||
| default=list, | ||
| ) | ||
| start_date_is_still_default = serializers.BooleanField() | ||
| advertised_start = serializers.CharField() | ||
| course_price = serializers.CharField() | ||
| pre_requisite_courses = serializers.ListField( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After some investigation, I can confirm that there is no BE logic that would populate these two fields. I left a reply in the DEPR and updated this PR accordingly. |
||
| child=PrerequisiteCourseSerializer(), | ||
| allow_empty=True, | ||
| default=list, | ||
| ) | ||
| about_sidebar_html = serializers.CharField( | ||
| allow_blank=True, | ||
| allow_null=True, | ||
| default=None, | ||
| ) | ||
| display_number_with_default = serializers.CharField() | ||
| display_org_with_default = serializers.CharField() | ||
| overview = serializers.CharField( | ||
| allow_blank=True, | ||
| allow_null=True, | ||
| default=None, | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a new field
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved |
||
|
|
||
| def __init__(self, *args, **kwargs): | ||
| """ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.