lms.djangoapps.course_home_api.dates package#

Submodules#

lms.djangoapps.course_home_api.dates.serializers module#

Dates Tab Serializers. Represents the relevant dates for a Course.

class lms.djangoapps.course_home_api.dates.serializers.DateSummarySerializer(*args, **kwargs)#

Bases: Serializer

Serializer for Date Summary Objects.

get_first_component_block_id(block)#
get_learner_has_access(block)#

Whether the learner is blocked (gated) from this content or not

class lms.djangoapps.course_home_api.dates.serializers.DatesTabSerializer(*args, **kwargs)#

Bases: DatesBannerSerializer

Serializer for the Dates Tab

lms.djangoapps.course_home_api.dates.views module#

Dates Tab Views

class lms.djangoapps.course_home_api.dates.views.DatesTabView(**kwargs)#

Bases: RetrieveAPIView

Use Cases

Request details for the Dates Tab

Example Requests

GET api/course_home/v1/dates/{course_key}

Response Values

Body consists of the following fields:

course_date_blocks: List of serialized DateSummary objects. Each serialization has the following fields:
complete: (bool) Meant to only be used by assignments. Indicates completeness for an

assignment.

date: (datetime) The date time corresponding for the event date_type: (str) The type of date (ex. course-start-date, assignment-due-date, etc.) description: (str) The description for the date event learner_has_access: (bool) Indicates if the learner has access to the date event link: (str) An absolute link to content related to the date event

(ex. verified link or link to assignment)

title: (str) The title of the date event

dates_banner_info: (obj)

content_type_gating_enabled: (bool) Whether content type gating is enabled for this enrollment. missed_deadlines: (bool) Indicates whether the user missed any graded content deadlines missed_gated_content: (bool) Indicates whether the user missed gated content verified_upgrade_link: (str) The link for upgrading to the Verified track in a course

has_ended: (bool) Indicates whether course has ended learner_is_full_access: (bool) Indicates if the user is verified in the course user_timezone: (str) The user’s preferred timezone

Returns

  • 200 on success with above fields.

  • 401 if the user is not authenticated.

  • 403 if the user does not have access to the course.

  • 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 DatesTabSerializer

Module contents#