Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
2650d591
Commit
2650d591
authored
5 years ago
by
Josh McLaughlin
Committed by
Braden MacDonald
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
feat: Use pluggable override for certificate html view
parent
24f9568c
No related branches found
Branches containing commit
Tags
release-2021-05-19-17.13
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/certificates/views/webview.py
+3
-0
3 additions, 0 deletions
lms/djangoapps/certificates/views/webview.py
with
3 additions
and
0 deletions
lms/djangoapps/certificates/views/webview.py
+
3
−
0
View file @
2650d591
...
...
@@ -19,6 +19,7 @@ from eventtracking import tracker
from
opaque_keys
import
InvalidKeyError
from
opaque_keys.edx.keys
import
CourseKey
from
organizations
import
api
as
organizations_api
from
edx_django_utils.plugins
import
pluggable_override
from
common.djangoapps.edxmako.shortcuts
import
render_to_response
from
common.djangoapps.edxmako.template
import
Template
...
...
@@ -474,10 +475,12 @@ def render_cert_by_uuid(request, certificate_uuid):
template_path
=
"
certificates/server-error.html
"
,
test_func
=
lambda
request
:
request
.
GET
.
get
(
'
preview
'
,
None
)
)
@pluggable_override
(
'
OVERRIDE_RENDER_CERTIFICATE_VIEW
'
)
def
render_html_view
(
request
,
course_id
,
certificate
=
None
):
"""
This public view generates an HTML representation of the specified user and course
If a certificate is not available, we display a
"
Sorry!
"
screen instead
It can be overridden by setting `OVERRIDE_RENDER_CERTIFICATE_VIEW` to an alternative implementation.
"""
user
=
certificate
.
user
if
certificate
else
request
.
user
user_id
=
user
.
id
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment