【问题标题】:How to fix problem with this certificate in open edx如何在 open edx 中解决此证书的问题
【发布时间】:2020-08-24 17:33:43
【问题描述】:

我正在打开的 edX 中设置证书。当我预览证书时,我们在 LMS 中遇到错误。

要解决此问题,您的合作伙伴经理应验证以下信息是否正确。

机构的标志。

与课程相关联的机构。

课程管理工具中的课程信息。

如果所有信息都正确且问题仍然存在,请联系技术支持。

我的错误日志 /edx/var/log/lms/edx.log

Apr 26 14:47:13 ubuntu [service_variant=lms][util.views][env:sandbox] ERROR [ubuntu  17907] [views.py:154] - Error in django view.
Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/common/djangoapps/util/views.py", line 145, in inner
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/certificates/views/webview.py", line 614, in render_html_view
    return _render_valid_certificate(request, context, custom_template)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/certificates/views/webview.py", line 680, in _render_valid_certificate
    return render_to_response("certificates/valid.html", context)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 169, in render_to_response
    return HttpResponse(render_to_string(template_name, dictionary, namespace, request), **kwargs)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 159, in render_to_string
    return template.render(dictionary, request)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/template.py", line 59, in render
    return self.mako_template.render_unicode(**context_dictionary)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 454, in render_unicode
    as_unicode=True)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 829, in _render
    **_kwargs_for_callable(callable_, data))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 864, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 890, in _exec_template
    callable_(context, *args, **kwargs)
  File "/tmp/mako_lms/39ae603da0f29d1cb182b9ecdbe643a6/certificates/accomplishment-base.html.py", line 79, in render_body
    runtime._include_file(context, u'_accomplishment-footer.html', _template_uri)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 752, in _include_file
    callable_(ctx, **_kwargs_for_include(callable_, context._data, **kwargs))
  File "/tmp/mako_lms/39ae603da0f29d1cb182b9ecdbe643a6/certificates/_accomplishment-footer.html.py", line 29, in render_body
    __M_writer(filters.html_escape(filters.decode.utf8(company_tos_url)))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/filters.py", line 78, in decode
    return decode(str(x))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 226, in __str__
    raise NameError("Undefined")
NameError: Undefined


【问题讨论】:

  • 打开 edx 的 slack 频道可能会有所帮助,社区在 SO 中不太活跃。

标签: openedx


【解决方案1】:

出现此问题是因为您尚未启用 HTML 视图配置。

  1. 进入管理页面 http://localhost/admin/certificates/certificatehtmlviewconfiguration/
  2. 单击添加证书 html 视图配置。
  3. 然后您需要选中启用复选框。

【讨论】:

    猜你喜欢
    • 2012-07-04
    • 1970-01-01
    • 2021-01-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-08
    • 2020-02-16
    • 2019-10-26
    相关资源
    最近更新 更多