by Yerko Zuñiga. ![]()
![]()
Same problem here in moodle 3.5.8+, when restoring a course.

This capability was removed on moodle 3.1, so why it appears in upper versions?
this capability does not come in DB table "capabilities", but when you query "role_capabilities" table, you might found registers with "moodle/blog:associatemodule" in capability column, then those registers had to be inherited from older versions (pre moodle 3.1).
So to fix that issue, you can delete registers from "role_capabilities" table filtering by capability='moodle/blog:associatemodule' and validate those contextid doesn't exists in "context" DB table.
Yerko Zúñiga