Hello everyone. I’m a longtime-listener (lurker, really), first-time caller!
I’m trying to customize the certificates on my Open edX instance, but have been unsuccessful so far.
There’s a lot of forum posts about this (but apparently as a newbie I’m only allowed to add 5 links, so I deleted them from here!), but most of them are either old enough to not be relevant anymore (e.g. ironwood release), aren’t applicable to tutor, or are just incomplete with no answers.
So let me break down what I’ve tried so far:
I made sure to create a plugin, named “$(tutor plugins printroot)/custom_certs.py”, which is set as follows (in following the https://docs.tutor.overhang.io/plugins/examples.html example from the tutor examples page:
from tutor import hooks hooks.Filters.ENV_PATCHES.add_item( ( "lms-env-features", """ "CUSTOM_CERTIFICATE_TEMPLATES_ENABLED": true """ ) )
And then per this thread I do
$ tutor local run lms ./manage.py lms shell >>> from django.conf import settings >>> settings.FEATURES["CUSTOM_CERTIFICATE_TEMPLATES_ENABLED"] True
to confirm it’s really set.
I then made a custom indigo theme following these instructions. (I just named mine indigo_custom, and confirmed it applied successfully.)
I thought the way things worked with themes, is that whatever files you put into them would ultimately just overwrite whatever files were in the tutor docker containers? (Am I incorrect here?)
So as a test, I wanted to change the wording of the certificate from
"successfully completed, received a passing grade, and was awarded this " to just
"was awarded this ".
That text is found in
So I cloned edx-platform, checked out the open-release/olive.3 branch, and did
cd ~/indigo_custom/tutorindigo/templates/indigo_custom/lms/ mkdir djangoapps; mkdir djangoapps/certificates; mkdir djangoapps/certificates/views cp ~/edx-platform/lms/djangoapps/certificates/views/webview.py ./djangoapps/certificates/views/webview.py
Then I edited
webview.py to change the text to my liking. (Note: I’m ultimately trying to do CSS changes, so this is just a simple sanity check test.)
Then I did
tutor config save tutor images build openedx tutor local launch
However, no change appeared in the text
So, why am I not seeing any change to the text from
custom_certs.py in my site’s certificates?
Did I place the webview.py in the wrong directory? Am I enabling CUSTOM_CERTIFICATE_TEMPLATES_ENABLED incorrectly? Do I need to rebuild some other container other than openedx?
Thanks in advance y’all!