/
githubmirror
/
edx-platform
Обзор
Документация
Войти
/
githubmirror
/
edx-platform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
release-ulmo
openedx/core/lib/license/wrapper.py
14 строк
475 B
Jillian Vogel
[BD-13] Deprecate ModuleSystem.render_template (fixed) (#29354)
29 ноя 2021, 22:42
Не верифицирован
29 ноя 2021, 22:42
ad5ad72
Код
Авторство
О чём код?
""" Code to wrap web fragments with a license. """ def wrap_with_license(block, view, frag, context, mako_service): # pylint: disable=unused-argument """ In the LMS, display the custom license underneath the XBlock. """ license = getattr(block, "license", None) # pylint: disable=redefined-builtin if license: context = {"license": license} frag.content += mako_service.render_template('license_wrapper.html', context) return frag