Filters#
This is the list of Open edX Filters found in this repository.
Note
Filters can be created in other projects and plugins as well, but these default filters are guaranteed to exist.
Package where filters related to the learning architectural subdomain are implemented.
- class openedx_filters.learning.filters.AccountSettingsRenderStarted#
Filter used to modify the rendering of the account settings page in the LMS.
This filter is triggered when a user visits the account settings page, just before the page is rendered allowing the filter to modify the context and the template used to render the page.
- Filter Type:
org.openedx.learning.student.settings.render.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: openedx/core/djangoapps/user_api/accounts/settings_views.py
Function or Method: account_settings
- Additional Information:
This filter doesn’t work alongside the account MFE, only with the legacy account settings page.
- exception RedirectToPage(message: str, redirect_to: str)#
Raise to trigger a redirect before the account settings page is rendered.
This exception is propagated to the account settings view and handled by the view to redirect the user to a new page.
- Arguments:
message (str): error message for the exception.
redirect_to (str): URL to redirect to.
- exception RenderCustomResponse(message: str, response: HttpResponse | None = None)#
Raise to return a custom response instead of the usual account settings page.
This exception is propagated to the account settings view and handled by the view to return a custom response instead.
- Arguments:
message (str): error message for the exception.
response (HttpResponse): custom response which will be returned by the account settings view.
- exception RenderInvalidAccountSettings(message: str, account_settings_template: str = '', template_context: dict | None = None)#
Raise to render a different template instead of the account settings page.
This exception is propagated to the account settings view and handled by the view to render a different template instead.
- Arguments:
message (str): error message for the exception.
account_settings_template (str): template path rendered instead.
template_context (dict): context used to the new account settings template.
- classmethod run_filter(context: dict, template_name: str) tuple[dict, str] #
Process the input context and template_name using the configured pipeline steps to modify the account settings.
- Arguments:
context (dict): template context for the account settings page.
template_name (str): template path used to render the account settings page.
- Returns:
- tuple[dict, str]:
dict: context dictionary for the account settings page, possibly modified.
str: template name to be rendered by the account settings page, possibly modified.
- class openedx_filters.learning.filters.CertificateCreationRequested#
Filter used to modify the certificate creation process.
This filter is triggered when a user requests a certificate, just before the certificate is created allowing the filter to act on the user, course key, mode, status, grade, and generation mode.
- Usage:
Modify certificate parameters in runtime.
Stop the certificate creation given a specific condition.
Etc.
- Filter Type:
org.openedx.learning.certificate.creation.requested.v1
- Trigger:
Repository: openedx/edx-platform
Path: lms/djangoapps/certificates/generated_certificate.py
Function or Method: _generate_certificate_task
- exception PreventCertificateCreation(message='', redirect_to=None, status_code=None, **kwargs)#
Raise to prevent the certificate creation process to continue.
This exception is propagated from the certificate generation function and handled by the caller to stop the certificate creation process before starting the async task.
- classmethod run_filter(user: Any, course_key: CourseKey, mode: str, status: str, grade: float, generation_mode: str) tuple[Any, CourseKey, str, str, float, str] #
Process the inputs using the configured pipeline steps to modify the certificate creation process.
- Arguments:
user (User): Django User object.
course_key (CourseKey): course key associated with the certificate.
mode (str): specifies what kind of certificate.
status (str): specifies the status of the certificate.
grade (float): grade of the certificate.
generation_mode (str): specifies the mode of generation.
- Returns:
User: Django User object.
CourseKey: course key associated with the certificate.
str: mode of the certificate.
str: status of the certificate.
float: grade of the certificate.
str: mode of generation.
- class openedx_filters.learning.filters.CertificateRenderStarted#
Filter used to modify the certificate rendering process.
This filter is triggered when a user requests to view the certificate, just before the certificate is rendered allowing the filter to act on the context and the template used to render the certificate.
- Filter Type:
org.openedx.learning.certificate.render.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: lms/djangoapps/certificates/views/webview.py
Function or Method: render_html_view
- exception RedirectToPage(message: str, redirect_to: str = '')#
Raise to redirect to a different page instead of rendering the certificate.
This exception is propagated to the certificate view and handled by the view to redirect the user to a new page.
- Arguments:
message (str): error message for the exception.
redirect_to (str): URL to redirect to.
- exception RenderAlternativeInvalidCertificate(message: str, template_name: str = '')#
Raise to render a different certificate template instead of the default one.
This exception is propagated to the certificate view and handled by the view to render a different template instead.
- Arguments:
message (str): error message for the exception.
template_name (str): template path of the new certificate.
- exception RenderCustomResponse(message: str, response: HttpResponse)#
Raise to stop the certificate rendering process and return a custom response.
This exception is propagated to the certificate view and handled by the view to return a custom response instead.
- Arguments:
message (str): error message for the exception.
response (HttpResponse): custom response which will be returned by the certificate view.
- classmethod run_filter(context: dict, custom_template: Any) tuple[dict, Any] #
Process the context and custom_template using the configured pipeline steps to modify the certificate rendering.
- Arguments:
context (dict): context dictionary for certificate template.
custom_template (CertificateTemplate): custom web certificate template.
- Returns:
- tuple[dict, CertificateTemplate]:
dict: context dictionary for the certificate template, possibly modified.
CertificateTemplate: custom web certificate template, possibly modified.
- class openedx_filters.learning.filters.CohortAssignmentRequested#
Filter used to modify the cohort assignment process.
This filter is triggered when a user is assigned to a cohort, just before the assignment is completed allowing the filter to act on the user and the target cohort.
- Filter Type:
org.openedx.learning.cohort.assignment.requested.v1
- Trigger:
Repository: openedx/edx-platform
Path: openedx/core/djangoapps/course_groups/models.py
Function or Method: assign
- exception PreventCohortAssignment(message='', redirect_to=None, status_code=None, **kwargs)#
Raise to prevent the cohort assignment process to continue.
This exception is propagated to the assign method and handled by it to stop the cohort assignment process.
- classmethod run_filter(user: Any, target_cohort: Any) tuple[Any, Any] #
Process the user and target_cohort using the configured pipeline steps to modify the cohort assignment process.
- Arguments:
user (User): Django User object representing the user.
target_cohort (CourseUserGroup): CourseUserGroup instance representing the new user’s cohort.
- Returns:
- tuple[User, CourseUserGroup]:
User: Django User object representing the user.
CourseUserGroup: CourseUserGroup instance representing the new user’s cohort.
- class openedx_filters.learning.filters.CohortChangeRequested#
Filter used to modify the cohort change process.
This filter is triggered when a user’s cohort is changed, just before the change is completed allowing the filter to act on the user and the target cohort.
- Filter Type:
org.openedx.learning.cohort.change.requested.v1
- Trigger:
Repository: openedx/edx-platform
Path: openedx/core/djangoapps/course_groups/models.py
Function or Method: assign
- exception PreventCohortChange(message='', redirect_to=None, status_code=None, **kwargs)#
Raise to prevent the cohort change process to continue.
This exception is propagated to the assign method and handled by it to stop the cohort change process.
- classmethod run_filter(current_membership: Any, target_cohort: Any) tuple[Any, Any] #
Process the inputs using the configured pipeline steps to modify the cohort change process.
- Arguments:
current_membership (CohortMembership): CohortMembership instance representing the current user’s cohort.
target_cohort (CourseUserGroup): CourseUserGroup instance representing the new user’s cohort.
- Returns:
- tuple[CohortMembership, CourseUserGroup]:
CohortMembership: CohortMembership instance representing the current user’s cohort.
CourseUserGroup: CourseUserGroup instance representing the new user’s cohort.
- class openedx_filters.learning.filters.CourseAboutPageURLRequested#
Filter used to act on course about page URL requests.
This filter is triggered when a user requests to view the course about page, just before the page is rendered allowing the filter to act on the URL of the page and the course org.
- Filter Type:
org.openedx.learning.course_about.page.url.requested.v1
- Trigger:
Repository: openedx/edx-platform
Path: common/djangoapps/util/course.py
Function or Method: get_link_for_about_page
- classmethod run_filter(url: str, org: str) tuple[str, str] #
Process the URL and org using the configured pipeline steps to modify the course about page URL.
- Arguments:
url (str): the URL of the page to be modified.
org (str): Course org filter used as context data to get LMS configurations.
- Returns:
- tuple[str, str]:
str: the modified URL of the page.
str: Course org filter used as context data to get LMS configurations.
- class openedx_filters.learning.filters.CourseAboutRenderStarted#
Filter used to modify the course about rendering process.
This filter is triggered when a user requests to view the course about page, just before the page is rendered allowing the filter to act on the context and the template used to render the page.
- Filter Type:
org.openedx.learning.course_about.render.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: lms/djangoapps/courseware/views/views.py
Function or Method: course_about
- exception RedirectToPage(message: str, redirect_to: str = '')#
Raise to redirect to a different page instead of rendering the course about.
This exception is propagated to the course about view and handled by the view to redirect the user to a new page.
- Arguments:
message (str): error message for the exception.
redirect_to (str): URL to redirect to.
- exception RenderCustomResponse(message: str, response: HttpResponse)#
Raise to stop the course about rendering process and return a custom response.
This exception is propagated to the course about view and handled by the view to return a custom response instead.
- Arguments:
message (str): error message for the exception.
response (HttpResponse): custom response which will be returned by the course about view.
- exception RenderInvalidCourseAbout(message: str, course_about_template: str = '', template_context: dict | None = None)#
Raise to render a different course about template instead of the default one.
This exception is propagated to the course about view and handled by the view to render a different template instead.
- Arguments:
message (Str): error message for the exception.
course_about_template (str): template path rendered instead.
template_context (dict): context used to the new course_about_template.
- classmethod run_filter(context: dict, template_name: str) tuple[dict, str] #
Process the context and template_name using the configured pipeline steps to modify the course about rendering.
- Arguments:
context (dict): context dictionary for course about template.
template_name (str): template name to be rendered by the course about.
- Returns:
- tuple[dict, str]:
dict: context dictionary for the course about template, possibly modified.
str: template name to be rendered by the course about, possibly modified.
- class openedx_filters.learning.filters.CourseEnrollmentAPIRenderStarted#
Filter used to modify the course enrollment API rendering process.
This filter is triggered when a user requests to view the course enrollment API, just before the API is rendered allowing the filter to act on the course key and serialized enrollment data.
- Filter Type:
org.openedx.learning.home.enrollment.api.rendered.v1
- Trigger:
Repository: openedx/edx-platform
Path: lms/djangoapps/learner_home/serializers.py
Function or Method: EnrollmentSerializer.to_representation
- classmethod run_filter(course_key: CourseKey, serialized_enrollment: dict) tuple[CourseKey, dict] #
Process the inputs using the configured pipeline steps to modify the course enrollment data.
- Arguments:
course_key (CourseKey): The course key for which isStarted is being modify.
serialized_enrollment (dict): enrollment data.
- Returns:
- tuple[CourseKey, dict]:
CourseKey: The course key for which isStarted is being modify.
dict: enrollment data.
- class openedx_filters.learning.filters.CourseEnrollmentQuerysetRequested#
Filter used to modify the QuerySet of course enrollments.
- Filter Type:
org.openedx.learning.course_enrollment_queryset.requested.v1
Trigger: NA
- Additional Information:
This filter is not currently triggered by any specific function or method in any codebase. It should be marked to be removed if it’s not used. See openedx-filters#245 for more information.
- exception PreventEnrollmentQuerysetRequest(message='', redirect_to=None, status_code=None, **kwargs)#
Raise to prevent the course enrollment queryset request to continue.
- classmethod run_filter(enrollments: QuerySet) QuerySet #
Process the enrollments QuerySet using the configured pipeline steps to modify the course enrollment data.
- Arguments:
enrollments (QuerySet): data with all user’s course enrollments.
- Returns:
QuerySet: data with all user’s course enrollments, possibly modified.
- class openedx_filters.learning.filters.CourseEnrollmentStarted#
Filter used to modify the course enrollment process.
This filter is triggered when a user initiates the enrollment process, just before the enrollment is completed allowing the filter to act on the user, course key, and mode.
- Filter Type:
org.openedx.learning.course.enrollment.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: common/djangoapps/student/models/course_enrollment.py
Function or Method: enroll
- exception PreventEnrollment(message='', redirect_to=None, status_code=None, **kwargs)#
Raise to prevent the enrollment process to continue.
This exception is propagated to the course enrollment model and handled by the model to stop the enrollment process. All components using the enroll method handle this exception in the appropriate way.
- classmethod run_filter(user: Any, course_key: CourseKey, mode: str) tuple[Any, CourseKey, str] #
Process the user, course_key, and mode using the configured pipeline steps to modify the enrollment process.
- Arguments:
user (User): Django User enrolling in the course.
course_key (CourseKey): course key associated with the enrollment.
mode (str): specifies what kind of enrollment.
- Returns:
User: Django User object.
CourseKey: course key associated with the enrollment.
str: mode of the enrollment.
- class openedx_filters.learning.filters.CourseHomeUrlCreationStarted#
Filter used to modify the course home url creation process.
This filter is triggered when a course home url is being generated, just before the generation process is completed allowing the filter to act on the course key and course home url.
- Filter Type:
org.openedx.learning.course.homepage.url.creation.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: openedx/features/course_experience/__init__.py
Function or Method: course_home_url
- classmethod run_filter(course_key: CourseKey, course_home_url: str) tuple[CourseKey, str] #
Process the course_key and course_home_url using the configured pipeline steps to modify the course home url.
- Arguments:
course_key (CourseKey): The course key for which the home url is being requested. course_home_url (str): The url string for the course home.
- Returns:
- tuple[CourseKey, str]:
CourseKey: The course key for which the home url is being requested. str: The url string for the course home.
- class openedx_filters.learning.filters.CourseRunAPIRenderStarted#
Filter used to modify the course run API rendering process.
This filter is triggered when a user requests to view the course run API, just before the API is rendered allowing the filter to act on the serialized course run data.
- Filter Type:
org.openedx.learning.home.courserun.api.rendered.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: lms/djangoapps/learner_home/serializers.py
Function or Method: CourseRunSerializer.to_representation
- classmethod run_filter(serialized_courserun: dict) dict #
Process the serialized_courserun using the configured pipeline steps to modify the course run data.
- Arguments:
serialized_courserun (dict): courserun data.
- Returns:
dict: courserun data.
- class openedx_filters.learning.filters.CourseUnenrollmentStarted#
Filter used to modify the course unenrollment process.
This filter is triggered when a user initiates the unenrollment process, just before the unenrollment is completed allowing the filter to act on the user’s enrollment in the course.
- Filter Type:
org.openedx.learning.course.unenrollment.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: common/djangoapps/student/models/course_enrollment.py
Function or Method: unenroll
- exception PreventUnenrollment(message='', redirect_to=None, status_code=None, **kwargs)#
Raised to prevent the unenrollment process to continue.
This exception is propagated to the course enrollment model and handled by the model to stop the unenrollment process. All components using the unenroll method handle this exception in the appropriate way.
- classmethod run_filter(enrollment: Any) Any #
Process the enrollment object using the configured pipeline steps to modify the unenrollment process.
- Arguments:
enrollment (CourseEnrollment): user’s enrollment in the course.
- Returns:
CourseEnrollment: user’s enrollment in the course.
- class openedx_filters.learning.filters.DashboardRenderStarted#
Filter used to modify the dashboard rendering process.
This filter is triggered when a user requests to view the dashboard, just before the page is rendered allowing the filter to act on the context and the template used to render the page.
- Filter Type:
org.openedx.learning.dashboard.render.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: common/djangoapps/student/views/dashboard.py
Function or Method: student_dashboard
- Additional Information:
This filter doesn’t work alongside the dashboard MFE, only with the legacy student dashboard.
- exception RedirectToPage(message: str, redirect_to: str = '')#
Raise to redirect to a different page instead of rendering the dashboard.
This exception is propagated to the dashboard view and handled by the view to redirect the user to a new page.
- Arguments:
message (str): error message for the exception.
redirect_to (str): URL to redirect to.
- exception RenderCustomResponse(message: str, response: HttpResponse | None = None)#
Raise to stop the dashboard rendering process and return a custom response.
This exception is propagated to the dashboard view and handled by the view to return a custom response instead.
- Arguments:
message (str): error message for the exception.
response (HttpResponse): custom response which will be returned by the dashboard view.
- exception RenderInvalidDashboard(message: str, dashboard_template: str = '', template_context: dict | None = None)#
Raise to render a different dashboard template instead of the default one.
This exception is propagated to the dashboard view and handled by the view to render a different template instead.
- Arguments:
message (str): error message for the exception.
dashboard_template (str): template path rendered instead.
template_context (dict): context used to the new dashboard_template.
- classmethod run_filter(context: dict, template_name: str) tuple[dict, str] #
Process the context and template_name using the configured pipeline steps to modify the dashboard rendering.
- Arguments:
context (dict): context dictionary for student’s dashboard template.
template_name (str): template name to be rendered by the student’s dashboard.
- Returns:
- tuple[dict, str]:
dict: context dictionary for the student’s dashboard template, possibly modified.
str: template name to be rendered by the student’s dashboard, possibly modified.
- class openedx_filters.learning.filters.IDVPageURLRequested#
Filter used to act on ID verification page URL requests.
This filter is triggered when a user requests to view the ID verification page, just before the page is rendered allowing the filter to act on the URL of the page.
- Filter Type:
org.openedx.learning.idv.page.url.requested.v1
- Trigger:
Repository: openedx/edx-platform
Path: lms/djangoapps/verify_student/services.py
Function or Method: XBlockVerificationService.get_verify_location
- classmethod run_filter(url: str) str #
Process the URL using the configured pipeline steps to modify the ID verification page URL.
- Arguments:
url (str): The url for the ID verification page to be modified.
- Returns:
str: The modified URL for the ID verification page.
- class openedx_filters.learning.filters.InstructorDashboardRenderStarted#
Filter used to modify the instructor dashboard rendering process.
This filter is triggered when an instructor requests to view the dashboard, just before the page is rendered allowing the filter to act on the context and the template used to render the page.
- Filter Type:
org.openedx.learning.instructor.dashboard.render.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: lms/djangoapps/instructor/views/instructor_dashboard.py
Function or Method: instructor_dashboard_2
- exception RedirectToPage(message: str, redirect_to: str = '')#
Raise to redirect to a different page instead of rendering the instructor dashboard.
This exception is propagated to the instructor dashboard view and handled by the view to redirect the user to a new page.
- Arguments:
message (str): error message for the exception.
redirect_to (str): URL to redirect to.
- exception RenderCustomResponse(message: str, response: HttpResponse | None = None)#
Raise to stop the instructor dashboard rendering process and return a custom response.
This exception is propagated to the instructor dashboard view and handled by the view to return a custom response instead.
- Arguments:
message (str): error message for the exception.
response (HttpResponse): custom response which will be returned by the dashboard view.
- exception RenderInvalidDashboard(message: str, instructor_template: str = '', template_context: dict | None = None)#
Raise to render a different instructor dashboard template instead of the default one.
This exception is propagated to the instructor dashboard view and handled by the view to render a different template instead.
- Arguments:
message (str): error message for the exception.
instructor_template (str): template path rendered instead.
template_context (dict): context used to the new instructor_template.
- classmethod run_filter(context: dict, template_name: str) tuple[dict, str] #
Process the context and template_name using the configured pipeline steps to modify the instructor dashboard.
- Arguments:
context (dict): context dictionary for instructor’s tab template.
template_name (str): template name to be rendered by the instructor’s tab.
- Returns:
- tuple[dict, str]:
dict: context dictionary for the instructor’s tab template, possibly modified.
str: template name to be rendered by the instructor’s tab, possibly modified.
- class openedx_filters.learning.filters.ORASubmissionViewRenderStarted#
Filter used to modify the submission view rendering process.
This filter is triggered when a user requests to view the submission, just before the page is rendered allowing the filter to act on the context and the template used to render the page.
- Filter Type:
org.openedx.learning.ora.submission_view.render.started.v1
- Trigger:
Repository: openedx/edx-ora2
Path: openassessment/xblock/ui_mixins/legacy/views/submission.py
Function or Method: render_submission
- exception RenderInvalidTemplate(message: str, context: dict | None = None, template_name: str = '')#
Raise to render a different submission view template instead of the default one.
This exception is propagated to the submission view and handled by the view to render a different template instead.
- Arguments:
message (str): error message for the exception.
context (dict): context used to the submission view template.
template_name (str): template path rendered instead.
- classmethod run_filter(context: dict, template_name: str) tuple[dict, str] #
Process the context and template_name using the configured pipeline steps to modify the submission view.
- Arguments:
context (dict): context dictionary for submission view template.
template_name (str): template name to be rendered by the student’s dashboard.
- Returns:
- tuple[dict, str]:
dict: context dictionary for the submission view template, possibly modified.
str: template name to be rendered by the submission view, possibly modified.
- class openedx_filters.learning.filters.RenderXBlockStarted#
Filter in between context generation and rendering of XBlock scope.
This filter is triggered when an XBlock is about to be rendered, just before the rendering process is completed allowing the filter to act on the context and student_view_context used to render the XBlock.
- Filter Type:
org.openedx.learning.xblock.render.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: lms/djangoapps/courseware/views/views.py
Function or Method: render_xblock
- exception PreventXBlockBlockRender(message='', redirect_to=None, status_code=None, **kwargs)#
Raise to prevent the XBlock from rendering for the user.
This exception is propagated to the XBlock render view and handled by the view to stop the rendering of the XBlock.
- exception RenderCustomResponse(message: str, response: HttpResponse | None = None)#
Raise to stop the XBlock rendering process by returning a custom response.
This exception is propagated to the XBlock render view and handled by the view to return a custom response instead.
- Arguments:
message (str): error message for the exception.
response (HttpResponse): custom response which will be returned by the XBlock render view.
- classmethod run_filter(context: dict, student_view_context: dict)#
Process the inputs using the configured pipeline steps to modify the rendering of an XBlock.
- Arguments:
context (dict): rendering context values like is_mobile_app, show_title, etc.
student_view_context (dict): context passed to the student_view of the block context.
- Returns:
- tuple[dict, dict]:
dict: rendering context values like is_mobile_app, show_title, etc.
dict: context passed to the student_view of the block context.
- class openedx_filters.learning.filters.ScheduleQuerySetRequested#
Filter used to apply additional filtering to a given QuerySet of Schedules.
- If you want to know more about the Schedules feature, please refer:
- Filter Type:
org.openedx.learning.schedule.queryset.requested.v1
- Trigger:
Repository: openedx/edx-platform
Path: openedx/core/djangoapps/schedules/resolvers.py
Function or Method: BinnedSchedulesBaseResolver.get_schedules_with_target_date_by_bin_and_orgs
- classmethod run_filter(schedules: QuerySet) QuerySet #
Process the schedules QuerySet using the configured pipeline steps to modify the schedules data.
- Arguments:
schedules (QuerySet): The original QuerySet of schedules to be filtered.
- Returns:
QuerySet: A refined QuerySet of schedules after applying the filter.
- class openedx_filters.learning.filters.StudentLoginRequested#
Filter used to modify the login process.
This filter is triggered when a user tries to log in, just before the login process is completed allowing the filter to act on the user object.
- Filter Type:
org.openedx.learning.student.login.requested.v1
- Trigger:
Repository: openedx/edx-platform
Path: openedx/core/djangoapps/user_authn/views/login.py
Function or Method: login_user
- exception PreventLogin(message: str, redirect_to: str = '', error_code: str = '', context: dict | None = None)#
Raise to prevent the login process to continue.
This exception is propagated to the login view and handled by the view to stop the login process.
- Arguments:
message (str): error message for the exception.
redirect_to (str): URL to redirect to.
error_code (str): error code for the exception.
context (dict): context dictionary to be used in the exception.
- classmethod run_filter(user: Any) Any #
Process the user object using the configured pipeline steps to modify the login process.
- Arguments:
user (User): Django User object trying to log in.
- Returns:
User: Django User object, possibly modified.
- class openedx_filters.learning.filters.StudentRegistrationRequested#
Filter used to modify the registration process, triggered when a user begins registration in the LMS.
- Filter Type:
org.openedx.learning.student.registration.requested.v1
- Trigger:
Repository: openedx/edx-platform
Path: openedx/core/djangoapps/user_authn/views/register.py
Function or Method: RegistrationView.post
- exception PreventRegistration(message='', redirect_to=None, status_code=None, **kwargs)#
Raise to prevent the registration process to continue.
This exception is propagated to the registration view and handled by the view to stop the registration process.
- classmethod run_filter(form_data: QueryDict) QueryDict #
Process the registration form data using the configured pipeline steps to modify the registration process.
- Arguments:
form_data (QueryDict): contains the request.data submitted by the registration form.
- Returns:
QueryDict: form data dictionary, possibly modified.
- class openedx_filters.learning.filters.VerticalBlockChildRenderStarted#
Filter used to modify the rendering of a child block within a vertical block.
This filter is triggered when a child block is about to be rendered within a vertical block, allowing the filter to act on the block and the context used to render the child block.
- Filter Type:
org.openedx.learning.vertical_block_child.render.started.v1
- Trigger:
Repository: openedx/edx-platform
Path: xmodule/vertical_block.py
Function or Method: VerticalBlock._student_or_public_view
- exception PreventChildBlockRender(message='', redirect_to=None, status_code=None, **kwargs)#
Raise to prevent a child block from rendering.
This exception is propagated to the vertical block view and handled by the view to stop the rendering of the child block.
- classmethod run_filter(block: Any, context: dict) tuple[Any, dict] #
Process the block and context using the configured pipeline steps to modify the rendering of a child block.
- Arguments:
block (XBlock): the XBlock that is about to be rendered into HTML
context (dict): rendering context values like is_mobile_app, show_title..etc
- Returns:
- tuple[XBlock, dict]:
XBlock: the XBlock that is about to be rendered into HTML
dict: rendering context values like is_mobile_app, show_title..etc
- class openedx_filters.learning.filters.VerticalBlockRenderCompleted#
Filter used to act on vertical block rendering completed.
This filter is triggered when a vertical block is rendered, just after the rendering process is completed allowing the filter to act on the block, fragment, context, and view used to render the vertical block.
- Filter Type:
org.openedx.learning.vertical_block.render.completed.v1
- Trigger:
Repository: openedx/edx-platform
Path: xmodule/vertical_block.py
Function or Method: VerticalBlock._student_or_public_view
- exception PreventVerticalBlockRender(message='', redirect_to=None, status_code=None, **kwargs)#
Raise to prevent the vertical block from rendering for the user.
This exception is propagated to the vertical block view and handled by the view to stop the rendering of the vertical block.
- classmethod run_filter(block: Any, fragment: Any, context: dict, view: str) tuple[Any, Any, dict, str] #
Process the inputs using the configured pipeline steps to modify the rendering of a vertical block.
- Arguments:
block (VerticalBlock): The VeriticalBlock instance which is being rendered.
fragment (web_fragments.Fragment): The web-fragment containing the rendered content of VerticalBlock.
context (dict): rendering context values like is_mobile_app, show_title..etc.
view (str): the rendering view. Can be either ‘student_view’, or ‘public_view’.
- Returns:
VerticalBlock: The VeriticalBlock instance which is being rendered.
web_fragments.Fragment: The web-fragment containing the rendered content of VerticalBlock.
dict: rendering context values like is_mobile_app, show_title..etc.
str: the rendering view. Can be either ‘student_view’, or ‘public_view’.