HTML (per role)

Blocks ::: block_rolespecifichtml
Maintained by Valery Fremaux
Allows distinct roles to get differetn content within an HTML bloc at the same layout location.
Latest release:
67 sites
16 fans
Current versions available: 10

This simple block allows to display distinct information for each role involved within a course workplace. 

The Moodle 2.x versions are the result of the French state level project "ENTLibre 2.0" Of the National Funding program "Investissement d'Avenir"


Valery Fremaux (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Tue, Aug 19, 2014, 4:10 PM
    i think this essentially means that the role name is comming blank. this can happen if the plugin is misversionned. PLease tell me what moodle version u are using and which plugin version is installed.... thanks
  • Sun, Dec 7, 2014, 4:44 PM
    i'm using moodle 2.7 ..and i think it's 2.2 plugin.
  • Thu, Sep 10, 2015, 4:08 AM
    Any plans to make this compatible with Moodle 2.9?
  • Thu, Sep 29, 2016, 6:10 AM
    This block cannot be added to My Dashboard (moodle/my/index.php).
  • Thu, Sep 29, 2016, 5:09 PM
    Actually ! the major use of role are in course or activities. May we think it would be usefull to grab site level roles in this situation ?
  • Sat, Oct 22, 2016, 2:43 AM
    This is definitely a great plugin. We'd definitely like to see the functionality expanded to the site level. That's be tremendously useful when posting messages to faculty and students.
  • Thu, Nov 17, 2016, 1:39 PM
    Hi Valery,
    This is a great tool! I also would like to see this used on the MOODLE Dashboard. Is there something that I could change in order to get it working there as well?
  • Tue, Feb 14, 2017, 10:37 PM
    Hello Valery,

    I am just wondering - an it might nog be possible - but we are trying to place an image in this block and the image doesn't want to appear.
    The block only seems to show text. Is that right?

    We have it installed on Moodle 2.9 and maybe I am missing something.

    Thank you very much.
  • Tue, Feb 21, 2017, 5:46 AM
    Hi Gemma, Hi all

    As i need tracking around 140 plugins now, and has not yet an automated gate for pushing plugin updates. I may advise you to track the last state of the plugins at vfremaux. All plugins are daily worked with now an industrial process and continuous integration effort. Consider STABLE branchs as version reference. We hope the on day open a remote push for Zips that can close the chain, but at the moment we have not.

  • Tue, Feb 21, 2017, 5:47 AM
    My all works repository is (without space)
  • Wed, Aug 2, 2017, 3:52 PM
    Hi Valery, can you confirm if the plugin works with 3.3.1. We upgraded and it seems like HTML (per role) plugin stopped working (content not showing). I am not sure what has changed.
  • Thu, Aug 3, 2017, 8:23 AM
    Update to my previous post.
    It turns out that the plugin works fine. There is, however, a drop-down menu that controls the 'Context to check'. The options are system level or course level. If you have problems with roles not seeing their content please adjust that setting to enable it for your users. Cheers!
  • Thu, Sep 24, 2020, 2:40 AM
    Does anyone know if it's possible to have the block NOT show for any of the roles that don't have content? I tried entering content for only two of the roles and they show as expected. However, all the other roles see an empty block. I would like it so that the block is only visible to the roles that have actual content.
  • Sat, Nov 7, 2020, 3:41 PM
    Blair, if you are able to edit the code, the easiest thing to do is to remove or comment out this line:
    if (empty($this->content->text)) $this->content->text = ' ';
    Found in block_rolespecifichtml.php, which is currently on line 104.
  • Sat, Feb 13, 2021, 3:17 AM
    Thank you, Jeffrey! Believe it or not, I'm only getting back to this now!!!! Your tip helped, for sure. I've found a few other buggy behaviours that I'm currently testing before implementing it in our production system. It looks as though this plugin doesn't get a lot of attention.
1 2
Please login to post comments