Moodle

[Diff Patch Included] - Expanded Participants block to allow selection of which roles to show and customise the icons

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.4
  • Fix Version/s: None
  • Component/s: Blocks, Roles / Access
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

I have expanded the existing participants block. The current way of working is still there and is the default option, but you can enable to choose which roles are shown.

You can also change the icons per role by adding icons to the pix/i/ folder with the name of roleX.gif

Activity

Hide
Anthony Borrow added a comment -

Red - Rather than creating rolxX.gif files, I might consider using the role name which would be more readable so you would have student, teacher, etc. I would also include some default images as part of the patch. Also would you be willing and able to to create a proper patch file against Moodle 1.9? Peace - Anthony

Show
Anthony Borrow added a comment - Red - Rather than creating rolxX.gif files, I might consider using the role name which would be more readable so you would have student, teacher, etc. I would also include some default images as part of the patch. Also would you be willing and able to to create a proper patch file against Moodle 1.9? Peace - Anthony
Hide
Red Morris added a comment -

This was how I had it working, but then I thought if someone renamed a role, e.g., a change in policy decides Students should now be referred to as Learners, means the icon would break, without any explanation.

That was my thinking on it anyway. I don't know if you'd thought of that, so I point it out and wait to see if you think it's still better to change it. Or come up with a way I haven't thought of that makes it more readable but still stable.

Show
Red Morris added a comment - This was how I had it working, but then I thought if someone renamed a role, e.g., a change in policy decides Students should now be referred to as Learners, means the icon would break, without any explanation. That was my thinking on it anyway. I don't know if you'd thought of that, so I point it out and wait to see if you think it's still better to change it. Or come up with a way I haven't thought of that makes it more readable but still stable.
Hide
Anthony Borrow added a comment -

I've chatted with Red that while users may find this additional functionality helpful, it might be considered a little feature bloat-ish but I think it is still worth consideration and taking a look at for CORE. If it is decided that it is not suitable for CORE (for whatever reason) we can move this issue to CONTRIB and assign to me. Peace - Anthony

Show
Anthony Borrow added a comment - I've chatted with Red that while users may find this additional functionality helpful, it might be considered a little feature bloat-ish but I think it is still worth consideration and taking a look at for CORE. If it is decided that it is not suitable for CORE (for whatever reason) we can move this issue to CONTRIB and assign to me. Peace - Anthony
Hide
Red Morris added a comment -

Diff file

Show
Red Morris added a comment - Diff file
Hide
Red Morris added a comment -

I've attached a diff file now which should make it easier to test.

Andrew, the block uses the standard Moodle icon if there is no custom icon, so a custom icon for each role is an option

Show
Red Morris added a comment - I've attached a diff file now which should make it easier to test. Andrew, the block uses the standard Moodle icon if there is no custom icon, so a custom icon for each role is an option

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: