MDL-36600 Add sesskey checks for course messaging