Files
edx-platform/lms/djangoapps/support/views/certificate.py
Feanil Patel 9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00

39 lines
1.3 KiB
Python

"""
Certificate tool in the student support app.
"""
from six.moves.urllib.parse import unquote, quote_plus # pylint: disable=import-error
from django.utils.decorators import method_decorator
from django.views.generic import View
from edxmako.shortcuts import render_to_response
from support.decorators import require_support_permission
class CertificatesSupportView(View):
"""
View for viewing and regenerating certificates for users.
This is used by the support team to re-issue certificates
to users if something went wrong during the initial certificate generation,
such as:
* The user's name was spelled incorrectly.
* The user later earned a higher grade and wants it on his/her certificate and dashboard.
* The user accidentally received an honor code certificate because his/her
verification expired before certs were generated.
Most of the heavy lifting is performed client-side through API
calls directly to the certificates app.
"""
@method_decorator(require_support_permission)
def get(self, request):
"""Render the certificates support view. """
context = {
"user_filter": unquote(quote_plus(request.GET.get("user", ""))),
"course_filter": request.GET.get("course_id", "")
}
return render_to_response("support/certificates.html", context)