MDL-41179 is_user_access_restricted_by_capability() must look at specified user and not current
MDL-36690 Do not cache objects inside course.modinfo as they may fail to serialize

convert moodle_url (all other fields are numbers or strings) to string before caching and then back to moodle_url when restoring.
Otherwise serialized modinfo can contain \0 byte which cause problems in Postgres DB
MDL-41181 function moveto_module does not modify properties of object

instead it returns the new value for module visibility
MDL-41181 No need to reset modinfo cache after moveto_module()

it is already reset inside the function
MDL-34397 course: Can not write to the read-only properties of cm_info
MDL-34397 Properties of cm_info are read-only and calculated on request
cm_info improvements
temp