"""Django Template Context Processor for LMS Online Contextual Help"""importConfigParserfromdjango.confimportsettingsfromutil.help_context_processorimportcommon_doc_url# Open and parse the configuration file when the module is initializedCONFIG_FILE=open(settings.REPO_ROOT/"docs"/"lms_config.ini")CONFIG=ConfigParser.ConfigParser()CONFIG.readfp(CONFIG_FILE)defdoc_url(request=None):# pylint: disable=unused-argument""" This function is added in the list of TEMPLATES 'context_processors' OPTION, which is a django setting for a tuple of callables that take a request object as their argument and return a dictionary of items to be merged into the RequestContext. This function returns a dict with get_online_help_info, making it directly available to all mako templates. Args: request: Currently not used, but is passed by django to context processors. May be used in the future for determining the language of choice. """returncommon_doc_url(request,CONFIG)