|
7 | 7 |
|
8 | 8 | class LMSPageURLRequested(OpenEdxPublicFilter):
|
9 | 9 | """
|
10 |
| - Custom class used to get lms page url filters and its custom methods. |
| 10 | + Filter used to modify the URL of the page requested by the user. |
| 11 | +
|
| 12 | + This filter is triggered when a user loads a page in Studio that references an LMS page, allowing the filter to |
| 13 | + modify the URL of the page requested by the user. |
| 14 | +
|
| 15 | + Filter Type: |
| 16 | + org.openedx.course_authoring.lms.page.url.requested.v1 |
| 17 | +
|
| 18 | + Trigger: |
| 19 | + - Repository: openedx/edx-platform |
| 20 | + - Path: cms/djangoapps/contentstore/asset_storage_handler.py |
| 21 | + - Function or Method: get_asset_json |
11 | 22 | """
|
12 | 23 |
|
13 | 24 | filter_type = "org.openedx.course_authoring.lms.page.url.requested.v1"
|
14 | 25 |
|
15 | 26 | @classmethod
|
16 |
| - def run_filter(cls, url, org): |
| 27 | + def run_filter(cls, url: str, org: str) -> tuple[str, str]: |
17 | 28 | """
|
18 |
| - Execute a filter with the signature specified. |
| 29 | + Process the inputs using the configured pipeline steps to modify the URL of the page requested by the user. |
19 | 30 |
|
20 | 31 | Arguments:
|
21 |
| - url (str): the URL of the page to be modified. |
22 |
| - org (str): Course org filter used as context data to get LMS configurations. |
| 32 | + - url (str): the URL of the page to be modified. |
| 33 | + - org (str): Course org filter used as context data to get LMS configurations. |
| 34 | +
|
| 35 | + Returns: |
| 36 | + tuple[str, str]: |
| 37 | + - str: the modified URL of the page requested by the user. |
| 38 | + - str: the course org. |
23 | 39 | """
|
24 | 40 | data = super().run_pipeline(url=url, org=org)
|
25 | 41 | return data.get("url"), data.get("org")
|
0 commit comments