It may be safer to avoid irrelevant instructional humour (even when course-related) because of the risk of a detrimental seductive details effect. Further research is needed with respect to the cognitive and affective-motivational effectiveness of relevant instructional humour.
Bender et al. (Sun,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: