Monday, August 28, 2017

Prevent automatic linking in Moodle

Do you (1) have auto-linking enabled on your Moodle site, (2) want to keep it enabled for a given resource or activity, and (3) want to prevent the auto-linking in specific places within this resource/activity?

I use Moodle 3.1 and the advice on this page about adding a span element with the nolink tag did not work for me: https://docs.moodle.org/31/en/Autolinking

Sadly, the additional tips given here also did not work: https://docs.moodle.org/31/en/Nolink_tags

The web address that I wanted to display as plain text rather than as a link kept appearing as a link. Argh!

So I looked for a generic HTML way (not Moodle specific) to prevent auto-linking and came upon this thread: https://meta.stackexchange.com/questions/119801/allow-suppression-of-automatic-linking-of-web-addresses

Phew, problem solved.

You just have to add the <nolink> tag after the http bit of a web address, eg, http<nolink>://www.google.com/

No comments:

Post a Comment