consolidate code that truncates long strings in __unicode__ functions,
use it for the Course representation