Course Display Name

Hi everyone.

I am a teacher, and my institution uses open edx as LMS in my institution. I am developing my course. At the end of my course, I want to congratulate my students for completing the course.

but I want to make the congratulations using text component and my course name appears automatically in the congratulations.

is there a way to do it without writing the course name manually.?

Hi @Musowwir_Lubis_ICE_I ,

Welcome to the Open edX community!

Currently, it’s not possible to dynamically display the course name using the standard text components in Open edX. However, for this kind of requirement, you can develop a custom XBlock that allows dynamic text to be inserted.

For example, with a custom XBlock, you could create a message like:

Congratulations, <<Student Name>>!
You have achieved a grade of <<Score>> in <<Course Name>> and successfully completed the course!

This would automatically pull in the student’s name, their score, and the course name, providing a personalized congratulatory message.

If you’re comfortable with development or have access to technical resources, this approach gives you full flexibility. Feel free to reach out if you need more details on how to get started with building custom XBlocks!

Hai @Mahendra

Thank you for your explanation.

I thought it could be done using certain codes using “Raw HTML”.

to create custom XBlocks, can I do it myself without contacting the IT Team at my institution?

To create custom Xblock basic python and Django technical knowledge is required. You can get help from your tech/IT team to build Xblock.

Hai @Mahendra

Thank you for your suggestion, I will try to communicate this to my institution’s IT team.

Hi @Musowwir_Lubis_ICE_I!

In addition to Mahendra’s reply, I would like to share this article I found that you might find helpful. It explains how XBlocks work, as well as the prerequisites for developing custom XBlocks.

Try this in an HTML block:

Congratulations for approving <span id="title"></span>.
<script>$('#title').text($('.course-name')[0].innerText);</script>  

(It will not work in Studio, only in the LMS)