HTML (on profile field selector)

Blocks ::: block_profileselectorhtml
Maintained by Valery Fremaux
This block is a combined variant of the profilespecifichtml block and the editablecontenthtml block. It provides way to distribute specific content to several classes of users splitted by matching rules upon one or two profile fields (standard or customized).
Latest release:
21 sites
3 fans
Current versions available: 1


Valery Fremaux (Lead maintainer)
Wafa Adham: Co-developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Anthony Borrow
    Tue, Sep 10, 2013, 3:23 AM
    Valery - Many thanks for sharing this block with the Moodle community. Consider adding a screenshot (perhaps of the page to configure a blcok showing the conditions). The block installs and functions well. The only thing that surprised me was that I expected the text for all students to appear below the text for those that meet the criteria (only because that information is entered second. Consider moving the order in the edit_form so that config_text_all comes before config_text_nomatch to be consistent in the display order. Also, I noticed that the block did not seem to be dockable or have the normal block actions that I would have expected. This could be because of the jquery css you have. I think it would be nice if the block behaved exactly as other blocks (including the core HTML block). Also, there was a validation warning about multiple readme files. When you get a chance, you will probaby want to remove either or readme.txt. I'm going to approve this plugin and let you or Wafa fix up these issues when you have a moment. Peace - Anthony
  • Anthony Borrow
    Tue, Sep 10, 2013, 3:24 AM
    p.s. - It would be nice if we could create a documentation page too when time permits
  • Wed, Feb 25, 2015, 12:54 AM
    Hello - Any plans to make this available on 2.7?
  • Wed, Feb 25, 2015, 5:59 AM
    Hi, at firsdt glance i do not see any drastic reason those blocks would not work on 2.7, By the way, let me time to do a simple check and commit reviewed 2.7 version...
  • Lewis Carr
    Sat, Nov 14, 2015, 4:30 AM
    To get this work in newer version of Moodle you need to change line 27 in block_profileselectorhtml.php
    from :

    if (!$context = get_context_instance_by_id($this->instance->parentcontextid)) {


    if (!$context = context::instance_by_id($this->instance->parentcontextid)) {
  • Lewis Carr
    Thu, Feb 11, 2016, 3:47 AM
    And I forgot, also needs doing in li.php around line 58.

    Change :

    if ($parentcontext = get_context_instance_by_id($birecord_or_cm->parentcontextid)) {


    if ($parentcontext = context::instance_by_id($birecord_or_cm->parentcontextid)) {
  • Thu, Oct 27, 2016, 11:49 PM
    Will there be an updated version for 3.1? Or is there another plugin for an HTML block for dashboard that can be restricted by profile fields?
Please login to post comments