I’m a fan of this idea, and as you can see from this topic, I am here because I once used Discourse as an LMS (but it’s been a long while!).
You can just change this in admin → customize → text content
This doesn’t need a plugin, just enable badges as described in Enable Badge SQL. Developing the SQL for them is a good idea, though.
At the risk of being pedantic, I think you mean “topics”.
I always look for the no-plugin solution, which may be inappropriate here, but how is this different from just adding these links to the beginning/end of the topic post?