MDL-40830 Clear course cache in mod_assign generator
MDL-41179 is_user_access_restricted_by_capability() must look at specified user and not current
MDL-36789 Quick course cache integrity check for deleted modules
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