From 565564a46ee88667756af34cb3d668f3b1cd3a26 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Mon, 22 Jul 2013 20:31:50 -0400 Subject: [PATCH] add input/output information in doc strings --- common/djangoapps/static_replace/__init__.py | 9 +++++++++ common/djangoapps/xmodule_modifiers.py | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index 4a4a3fe576..9e50d73b26 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -53,6 +53,15 @@ def replace_jump_to_id_urls(text, course_id, jump_to_id_base_url): course author provides. This is much more helpful when using Studio authored courses since they don't need to know the path. This is also durable with respect to item moves. + + text: The content over which to perform the subtitutions + course_id: The course_id in which this rewrite happens + jump_to_id_base_url: + A app-tier (e.g. LMS) absolute path to the base of the handler that will perform the + redirect. e.g. /courses////jump_to_id. NOTE the will be appended to + the end of this URL at re-write time + + output: after the link rewriting rules are applied """ def replace_jump_to_id_url(match): diff --git a/common/djangoapps/xmodule_modifiers.py b/common/djangoapps/xmodule_modifiers.py index b0fa557c5d..dd40b5139d 100644 --- a/common/djangoapps/xmodule_modifiers.py +++ b/common/djangoapps/xmodule_modifiers.py @@ -48,6 +48,15 @@ def replace_jump_to_id_urls(get_html, course_id, jump_to_id_base_url): /jump_to/ with a URL for a page that will correctly redirect This is similar to replace_course_urls, but much more flexible and durable for Studio authored courses. See more comments in static_replace.replace_jump_to_urls + + course_id: The course_id in which this rewrite happens + jump_to_id_base_url: + A app-tier (e.g. LMS) absolute path to the base of the handler that will perform the + redirect. e.g. /courses////jump_to_id. NOTE the will be appended to + the end of this URL at re-write time + + output: a wrapped get_html() function pointer, which, when called, will apply the + rewrite rules """ @wraps(get_html) def _get_html():