tutor icon indicating copy to clipboard operation
tutor copied to clipboard

Course Certificate view error

Open dannielarriola opened this issue 7 years ago • 4 comments

Steps to reproduce

I ve enabled course certificate following this docs: https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/enable_certificates.html

Unexpected behavior

the certificates are listed correctly on the user's profile page but when one of them are clicked an error are triggered

lms_1              | 2019-02-28 19:27:24,325 INFO 10 [tracking] logger.py:50 - {"username": "rafa", "event_type": "/certificates/user/2/course/course-v1:edX+DemoX+Demo_Course", "ip": "179.36.180.57", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36", "host": "lms.develapp.ml", "referer": "https://studio.lms.develapp.ml/certificates/course-v1:edX+DemoX+Demo_Course", "accept_language": "es-AR,es;q=0.9,en;q=0.8", "event": "{\"POST\": {}, \"GET\": {\"preview\": [\"honor\"]}}", "event_source": "server", "context": {"user_id": 2, "org_id": "", "course_id": "", "path": "/certificates/user/2/course/course-v1:edX+DemoX+Demo_Course"}, "time": "2019-02-28T19:27:24.325336+00:00", "page": null}
lms_1              | 2019-02-28 19:27:24,406 ERROR 10 [openedx.core.djangoapps.catalog.utils] utils.py:451 - Unable to retrieve details about course_run course-v1:edX+DemoX+Demo_Course because Catalog Integration is not enabled
lms_1              | 2019-02-28 19:27:24,472 ERROR 10 [util.views] views.py:155 - Error in django view.
lms_1              | Traceback (most recent call last):
lms_1              |   File "/openedx/edx-platform/common/djangoapps/util/views.py", line 146, in inner
lms_1              |     return func(request, *args, **kwargs)
lms_1              |   File "/openedx/edx-platform/lms/djangoapps/certificates/views/webview.py", line 614, in render_html_view
lms_1              |     return _render_valid_certificate(request, context, custom_template)
lms_1              |   File "/openedx/edx-platform/lms/djangoapps/certificates/views/webview.py", line 680, in _render_valid_certificate
lms_1              |     return render_to_response("certificates/valid.html", context)
lms_1              |   File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 169, in render_to_response
lms_1              |     return HttpResponse(render_to_string(template_name, dictionary, namespace, request), **kwargs)
lms_1              |   File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 159, in render_to_string
lms_1              |     return template.render(dictionary, request)
lms_1              |   File "/openedx/edx-platform/common/djangoapps/edxmako/template.py", line 59, in render
lms_1              |     return self.mako_template.render_unicode(**context_dictionary)
lms_1              |   File "/usr/local/lib/python2.7/dist-packages/mako/template.py", line 454, in render_unicode
lms_1              |     as_unicode=True)
lms_1              |   File "/usr/local/lib/python2.7/dist-packages/mako/runtime.py", line 829, in _render
lms_1              |     **_kwargs_for_callable(callable_, data))
lms_1              |   File "/usr/local/lib/python2.7/dist-packages/mako/runtime.py", line 864, in _render_context
lms_1              |     _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
lms_1              |   File "/usr/local/lib/python2.7/dist-packages/mako/runtime.py", line 890, in _exec_template
lms_1              |     callable_(context, *args, **kwargs)
lms_1              |   File "/tmp/mako_lms/f1543ed24543a70de2c17ebfc03bb76a/certificates/accomplishment-base.html.py", line 79, in render_body
lms_1              |     runtime._include_file(context, u'_accomplishment-footer.html', _template_uri)
lms_1              |   File "/usr/local/lib/python2.7/dist-packages/mako/runtime.py", line 752, in _include_file
lms_1              |     callable_(ctx, **_kwargs_for_include(callable_, context._data, **kwargs))
lms_1              |   File "/tmp/mako_lms/f1543ed24543a70de2c17ebfc03bb76a/certificates/_accomplishment-footer.html.py", line 29, in render_body
lms_1              |     __M_writer(filters.html_escape(filters.decode.utf8(company_tos_url)))
lms_1              |   File "/usr/local/lib/python2.7/dist-packages/mako/filters.py", line 78, in decode
lms_1              |     return decode(str(x))
lms_1              |   File "/usr/local/lib/python2.7/dist-packages/mako/runtime.py", line 226, in __str__
lms_1              |     raise NameError("Undefined")
lms_1              | NameError: Undefined`

dannielarriola avatar Feb 28 '19 20:02 dannielarriola

Hi @dannielarriola! Can you please describe the exact changes you made to the platform following https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/enable_certificates.html#enable-course-certificates-in-studio-and-the-lms? Also, are you using a theme different than the default?

regisb avatar Mar 01 '19 07:03 regisb

@dannielarriola did you manage to fix this?

regisb avatar Mar 09 '19 16:03 regisb

Sorry for delaying anwer. I dont manage to fix this but I discovered that it is not related with tutor. Thanks

dannielarriola avatar Mar 16 '19 22:03 dannielarriola

Awesome, thanks for the update :)

regisb avatar Mar 17 '19 20:03 regisb