Refactored courses.show_certificates,
in favor of cleaner code