lms.djangoapps.learner_dashboard package#
Subpackages#
Submodules#
lms.djangoapps.learner_dashboard.program_views module#
Learner dashboard views
- class lms.djangoapps.learner_dashboard.program_views.ProgramDiscussionIframeView(**kwargs)#
Bases:
APIView,ProgramSpecificViewMixinA view for retrieving Program Discussion IFrame .
Path:
/dashboard/programs/{program_uuid}/discussion/Accepts: [GET]
GET#
Returns
200: OK - Contains a program discussion iframe.
401: The requesting user is not authenticated.
403: The requesting user lacks access to the program.
404: The requested program does not exist.
Response
In the case of a 200 response code, the response will be iframe HTML and status if discussion is configured for the program.
Example
- {
‘tab_view_enabled’: True, ‘discussion’: {
- “iframe”: “
- <iframe
id=’lti-tab-embed’ style=’width: 100%; min-height: 800px; border: none’ srcdoc=’{srcdoc}’
>
</iframe> “,
“configured”: false
}
}
- authentication_classes = (<class 'edx_rest_framework_extensions.auth.jwt.authentication.JwtAuthentication'>, <class 'openedx.core.lib.api.authentication.BearerAuthentication'>, <class 'rest_framework.authentication.SessionAuthentication'>)#
- get(request, program_uuid)#
GET handler
- permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)#
- class lms.djangoapps.learner_dashboard.program_views.ProgramLiveIframeView(**kwargs)#
Bases:
APIView,ProgramSpecificViewMixinA view for retrieving Program live IFrame .
Path:
/dashboard/programs/{program_uuid}/live/Accepts: [GET]
GET#
Returns
200: OK - Contains a program live zoom iframe.
401: The requesting user is not authenticated.
403: The requesting user lacks access to the program.
404: The requested program does not exist.
Response
In the case of a 200 response code, the response will be iframe HTML and status if discussion is configured for the program.
Example
- {
‘tab_view_enabled’: True, ‘live’: {
- “iframe”: “
- <iframe
id=’lti-tab-embed’ style=’width: 100%; min-height: 800px; border: none’ srcdoc=’{srcdoc}’
>
</iframe> “,
“configured”: false
}
}
- authentication_classes = (<class 'edx_rest_framework_extensions.auth.jwt.authentication.JwtAuthentication'>, <class 'openedx.core.lib.api.authentication.BearerAuthentication'>, <class 'rest_framework.authentication.SessionAuthentication'>)#
- get(request, program_uuid)#
GET handler
- permission_classes = (<class 'rest_framework.permissions.IsAuthenticated'>,)#
- lms.djangoapps.learner_dashboard.program_views.program_details(request, program_uuid)#
View details about a specific program.
- lms.djangoapps.learner_dashboard.program_views.program_listing(request)#
View a list of programs in which the user is engaged.
lms.djangoapps.learner_dashboard.programs module#
Fragments for rendering programs.
- class lms.djangoapps.learner_dashboard.programs.ProgramDetailsFragmentView(**kwargs)#
Bases:
EdxFragmentViewRender the program details fragment.
- render_to_fragment(request, program_uuid, **kwargs)#
View details about a specific program.
- standalone_page_title(request, fragment, **kwargs)#
Return page title for the standalone page.
- class lms.djangoapps.learner_dashboard.programs.ProgramDiscussionLTI(program_uuid, request)#
Bases:
ProgramLTI- get_configuration()#
- class lms.djangoapps.learner_dashboard.programs.ProgramLTI(program_uuid, request)#
Bases:
ABCEncapsulates methods for program LTI iframe rendering.
- ADMIN_ROLE = 'Administrator'#
- DEFAULT_ROLE = 'Student,Learner'#
- abstractmethod get_configuration()#
- get_user_roles() str#
Returns comma-separated roles for the given user
- property is_configured#
Returns a boolean indicating if the program configuration is enabled or not.
- render_iframe() str#
Returns the program LTI iframe if program Lti configuration exists for a program uuid
- class lms.djangoapps.learner_dashboard.programs.ProgramLiveLTI(program_uuid, request)#
Bases:
ProgramLTI- get_configuration()#
- class lms.djangoapps.learner_dashboard.programs.ProgramsFragmentView(**kwargs)#
Bases:
EdxFragmentViewA fragment to program listing.
- render_to_fragment(request, **kwargs)#
Render the program listing fragment.
- standalone_page_title(request, fragment, **kwargs)#
Return page title for the standalone page.
lms.djangoapps.learner_dashboard.urls module#
Learner dashboard URL routing configuration
lms.djangoapps.learner_dashboard.utils module#
The utility methods and functions to help the djangoapp logic
- lms.djangoapps.learner_dashboard.utils.is_enrolled_or_staff(request, program_uuid)#
Returns true if the user is enrolled in the program or staff
- lms.djangoapps.learner_dashboard.utils.masters_program_tab_view_is_enabled() bool#
check if masters program discussion is enabled.
- lms.djangoapps.learner_dashboard.utils.program_tab_view_is_enabled() bool#
check if program discussion is enabled.
- lms.djangoapps.learner_dashboard.utils.strip_course_id(path)#
The utility function to help remove the fake course ID from the url path