openedx.features.course_experience.api.v1 package#
Submodules#
openedx.features.course_experience.api.v1.serializers module#
Serializer for Course Deadlines (Mobile)
- class openedx.features.course_experience.api.v1.serializers.CourseDeadlinesMobileSerializer(*args, **kwargs)#
Bases:
DatesBannerSerializerSerializer for course deadlines
- get_has_ended(_)#
openedx.features.course_experience.api.v1.urls module#
Contains URLs for the Course Experience API
openedx.features.course_experience.api.v1.views module#
Views for Course Experience API.
- class openedx.features.course_experience.api.v1.views.CourseDeadlinesMobileView(**kwargs)#
Bases:
RetrieveAPIViewUse Cases
Request course deadline info for mobile
Example Requests
GET api/course_experience/v1/course_deadlines_info/{course_key}
Response Values
Body consists of the following fields:
- dates_banner_info: (obj)
missed_deadlines: (bool) Whether the user has missed any graded content deadlines for the given course. missed_gated_content: (bool) Whether the user has missed any gated content for the given course. content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. verified_upgrade_link: (str) The URL to ecommerce IDA for purchasing the verified upgrade.
Returns
200 on success with above fields.
401 if the user is not authenticated.
404 if the course is not available or cannot be seen.
- authentication_classes = (<class 'edx_rest_framework_extensions.auth.jwt.authentication.JwtAuthentication'>, <class 'openedx.core.lib.api.authentication.BearerAuthenticationAllowInactiveUser'>, <class 'edx_rest_framework_extensions.auth.session.authentication.SessionAuthenticationAllowInactiveUser'>)#
- get(request, *args, **kwargs)#
- permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)#
- serializer_class#
alias of
CourseDeadlinesMobileSerializer
- exception openedx.features.course_experience.api.v1.views.UnableToResetDeadlines(detail=None, code=None)#
Bases:
APIException- default_code = 'unable_to_reset_deadlines'#
- default_detail = 'Unable to reset deadlines.'#
- status_code = 400#
- openedx.features.course_experience.api.v1.views.reset_course_deadlines(request, *args, **kwargs)#
Set the start_date of a schedule to today, which in turn will adjust due dates for sequentials belonging to a self paced course
- Request Parameters:
course_key: course key research_event_data: any data that should be included in the research tracking event
Example: sending the location of where the reset deadlines banner (i.e. outline-tab)
IMPORTANT NOTE: If updates are happening to the logic here, ALSO UPDATE the reset_course_deadlines function in common/djangoapps/util/views.py as well.