如何在打开的edx中解决此证书的问题

时间:2019-04-26 09:34:22

标签: openedx

我正在打开的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


1 个答案:

答案 0 :(得分:1)

之所以发生此问题,是因为您尚未启用HTML视图配置。

  1. 转到管理页面 http://localhost/admin/certificates/certificatehtmlviewconfiguration/
  2. 单击“添加证书html”视图配置。
  3. 然后,您将需要选择已启用复选框。