What are the instructions for creating a custom course completion certificate in Nutmeg?

Past guides like this one are out of date and inaccurate as they were written for a pre-tutor world, and the cited Django admin pages don’t appear to exist anymore.

I attempted this on Nutmeg, with tutor, version 14.0.3, and the indigo theme.

I created a tutor plugin .local/share/tutor-plugins/custom_certificate.yml like:

---
name: custom_certificate
version: 0.1.0
patches:
    lms-env: |
      "CUSTOM_CERTIFICATE_TEMPLATES_ENABLED": True

did tutor plugins enable custom_certificate, and did tutor config save

I did cp -r edx-platform/lms/templates/certificates/ indigo/theme/lms/templates/ as directed here to include the baseline certificate information into the custom theme (since it’s not there by default).

I then edited indigo/theme/lms/templates/certificates/_about-accomplishments.html (and some other files) to have a <h1>CAN YOU SEE THIS 1</h1> line embedded in it

Then I ran

tutor plugins enable indigo
(even though it was already enabled)
time tutor images build openedx
tutor local quickstart

Note: The indigo instructions say to do tutor local do settheme indigo but I just get Error: No such command 'do'., But apparently tutor local settheme indigo seems to work.

However, at the end of all this, I don’t see my change anywhere in the certificate when I preview it for a class. It still just looks like the default. So what’s the right way to set a custom theme these days?

Hello @ABC,

Your steps/commands seem to be correct except for one: tutor local quickstart.

I don’t understand why you are doing quickstart after build creation. If you want to apply changes of your latest build you just need to do the following:

tutor local stop
tutor local start -d

And I have also created a public GitHub Gist to set up a theme in the Tutor Open edX world. You can take a look here: Useful command of Tutor Open edX · GitHub

Hard lessons with tutor have taught me that quickstart is universally more likely to yield success than just a stop and start, as it appears to do a superset of things, including restarting services that may have issues.

Yes, I have learned the same lessons for the quickstart but it is not always necessary. Just stop & start is sufficient to get your latest changes applied.

Anyone else have any ideas of how to customize course creation certificates?

Here’s my update now that I finally got it to work:

The correct tutor plugin to enable certificate customizations is:

name: enable_custom_certs
version: 0.1.0
patches:
  openedx-lms-common-settings: |
    FEATURES["CUSTOM_CERTIFICATE_TEMPLATES_ENABLED"] = True

After reading this thread I learned a useful trick to confirm whether a plugin is setting a value correctly or not:

$ tutor local run lms ./manage.py lms shell
>>> from django.conf import settings
>>> settings.FEATURES["CUSTOM_CERTIFICATE_TEMPLATES_ENABLED"]
True

So I’m pretty sure that was the main issue why it wasn’t working before. But for completeness, I also did the following:

git clone https://github.com/myusername/edx-platform.git
cd edx-platform
git checkout my_custom_palm_branch
cd ..
cp -r edx-platform/lms/templates/certificates/ indigo_mine_palm/tutorindigo/templates/indigo_mine_palm/lms/templates/
nano indigo_mine_palm/tutorindigo/templates/indigo_mine_palm/lms/templates/certificates/_about-accomplishments.html
	Insert a <h1>BIG TEST 1</h1>
nano indigo_mine_palm/tutorindigo/templates/indigo_mine_palm/lms/templates/certificates/accomplishment-base.html
	Insert a <h1>BIG TEST 2</h1>
tutor plugins enable indigo
	(even though it was already enabled
tutor config save
tutor local quickstart
	I confirmed they changes *didn't* apply if I only did a `tutor local restart`

Both of those changes showed up.

Another thing I did for good measure was I edited lms/djangoapps/certificates/views/webview.py in my_custom_palm_branch of edx-platform like this:

diff --git a/lms/djangoapps/certificates/views/webview.py b/lms/djangoapps/certificates/views/webview.py
index b859cfe92c..fad5c0bf91 100644
--- a/lms/djangoapps/certificates/views/webview.py
+++ b/lms/djangoapps/certificates/views/webview.py
@@ -144,7 +144,7 @@ def _update_certificate_context(context, course, course_overview, user_certifica
 
     # Translators:  This text fragment appears after the student's name (displayed in a large font) on the certificate
     # screen.  The text describes the accomplishment represented by the certificate information displayed to the user
-    context['accomplishment_copy_description_full'] = _("successfully completed, received a passing grade, and was "
+    context['accomplishment_copy_description_full'] = _("successfully completed this class, and was "
                                                         "awarded this {platform_name} {certificate_type} "
                                                         "Certificate of Completion in ").format(

And then I build openedx with:

tutor images build openedx --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/myusername/edx-platform.git --build-arg EDX_PLATFORM_VERSION=my_custom_palm_branch

So @JS777 if you’re still around, that’s how I was able to do what you were shooting for in your thread.