def replace_course_urls(course_id, block, view, frag, context):
 return wrap_fragment(frag, static_replace.replace_course_urls(frag.content, course_id))

def replace_course_urls ( course_id , block , view , frag , context ) : return wrap_fragment ( frag , static_replace . replace_course_urls ( frag . content , course_id ) )
replace /course/$stuff urls with /courses/$course_id/$stuff urls text: the text to replace course_module: a coursedescriptor returns: text with the links replaced .