clean function course-enrolbyname, add documentation