Have you see this plugin which shows different HTML blocks based on the users Cohort?
In Moodle the HTML Block allows you to add HTML content to courses. The content of these blocks is shown to all users that are allowed to access the page it is placed on.
In some scenarios you may wish to restrict the visibility of the HTML block to members of specific Cohorts. This plugin does just that, and means that the block behaves much like any other HTML block, only with the feature that the visibility of the block is restricted to defined Cohorts.
It goes without saying that your site must be using Cohorts to take advantage of this feature 😉