Skip to content

Commit 460aae8

Browse files
docs: [FC-0074] enrich docstrings following a template with more details (#246)
1 parent 8753eb7 commit 460aae8

File tree

8 files changed

+846
-311
lines changed

8 files changed

+846
-311
lines changed

openedx_filters/course_authoring/filters.py

+21-5
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,35 @@
77

88
class LMSPageURLRequested(OpenEdxPublicFilter):
99
"""
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
1122
"""
1223

1324
filter_type = "org.openedx.course_authoring.lms.page.url.requested.v1"
1425

1526
@classmethod
16-
def run_filter(cls, url, org):
27+
def run_filter(cls, url: str, org: str) -> tuple[str, str]:
1728
"""
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.
1930
2031
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.
2339
"""
2440
data = super().run_pipeline(url=url, org=org)
2541
return data.get("url"), data.get("org")

0 commit comments

Comments
 (0)