MDL-41179 is_user_access_restricted_by_capability() must look at specified user and not current
MDL-41192 course: Can not write to the read-only properties of cm_info
MDL-41192 course: Properties of cm_info are read-only and calculated on request

Also added phpdocs
MDL-41192 course: Added property-read cm_info::effectivegroupmode