Skip to content

Commit

Permalink
docs: [FC-0074] enrich docstrings following a template with more deta…
Browse files Browse the repository at this point in the history
…ils (#246)
  • Loading branch information
mariajgrimaldi authored Jan 15, 2025
1 parent 8753eb7 commit 460aae8
Show file tree
Hide file tree
Showing 8 changed files with 846 additions and 311 deletions.
26 changes: 21 additions & 5 deletions openedx_filters/course_authoring/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,35 @@

class LMSPageURLRequested(OpenEdxPublicFilter):
"""
Custom class used to get lms page url filters and its custom methods.
Filter used to modify the URL of the page requested by the user.
This filter is triggered when a user loads a page in Studio that references an LMS page, allowing the filter to
modify the URL of the page requested by the user.
Filter Type:
org.openedx.course_authoring.lms.page.url.requested.v1
Trigger:
- Repository: openedx/edx-platform
- Path: cms/djangoapps/contentstore/asset_storage_handler.py
- Function or Method: get_asset_json
"""

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

@classmethod
def run_filter(cls, url, org):
def run_filter(cls, url: str, org: str) -> tuple[str, str]:
"""
Execute a filter with the signature specified.
Process the inputs using the configured pipeline steps to modify the URL of the page requested by the user.
Arguments:
url (str): the URL of the page to be modified.
org (str): Course org filter used as context data to get LMS configurations.
- 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 requested by the user.
- str: the course org.
"""
data = super().run_pipeline(url=url, org=org)
return data.get("url"), data.get("org")
Loading

0 comments on commit 460aae8

Please sign in to comment.