I have successfully used the 'core-link' directive with capture set to "true" to do this. But if the user is not currently enrolled in the course, it requires them to jump out to a browser. Not sure why.
So, my template has this:
<a href="<%url%>" core-link capture="true"><%fullname%></a>