The method should not cause errors when a course with activities
that the user has visited no longer exists.
Ensuring that we only get records for courses still in the database
will stop any course not found erros from get_fast_modinfo()
Also fixed the provider interface type. This is self contained, so is
not a subsystem provider. It was also already set up as a plugin
provider, just not defined as such.
Updated the provider::get_contexts_for_userid method, to prevent false
positives. Previously, the user context would always be returned, now
the method checks data exists for the block first.