MDL-36600 user: improve course messaging checks