Moodle

Allow an option in "Online Users" block to just show the number online not the names

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.3, 1.9
  • Fix Version/s: 1.9.4
  • Component/s: Blocks
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

In some cases a list of users online (potentially) on the front page of the site is inappropriate for privacy reasons. However, it would be good to have an indication along the lines of "nn users online" as an option.

Activity

Hide
Séverin Terrier added a comment -

It would also be good to (be able to, as an option) show numbers of connected user, even if the names are shown.

Because online users are limited to 50 (fixed value) users...

Show
Séverin Terrier added a comment - It would also be good to (be able to, as an option) show numbers of connected user, even if the names are shown. Because online users are limited to 50 (fixed value) users...
Hide
Petr Škoda (skodak) added a comment -

new capability block/online_users:viewlist which may be used to restrict viewing of list of online users, if cap not allowed only number of users dispalyed, I hope this will be also faster because only one query used now (insetad of two); for BC reasons enabled by default in all legacy roles; also if number of users is >= 50 the number is displayed

thanks for the report, please test

Show
Petr Škoda (skodak) added a comment - new capability block/online_users:viewlist which may be used to restrict viewing of list of online users, if cap not allowed only number of users dispalyed, I hope this will be also faster because only one query used now (insetad of two); for BC reasons enabled by default in all legacy roles; also if number of users is >= 50 the number is displayed thanks for the report, please test
Hide
Chris Potter added a comment -

Just a report... I am testing this on 1.8, not 1.9, however... I noticed that the only way to get the role to work is to assign a site-wide role. I was looking at this to assign someone in particular (one student) this role. Is it the fact that I "copied/pasted" it or is this intended behavior?

Show
Chris Potter added a comment - Just a report... I am testing this on 1.8, not 1.9, however... I noticed that the only way to get the role to work is to assign a site-wide role. I was looking at this to assign someone in particular (one student) this role. Is it the fact that I "copied/pasted" it or is this intended behavior?
Hide
Petr Škoda (skodak) added a comment -

This will not be backported into 1.8.x, in fact 1.8.x is getting only critical and security fixes, please upgrade to latest 1.9.x if possible.

Show
Petr Škoda (skodak) added a comment - This will not be backported into 1.8.x, in fact 1.8.x is getting only critical and security fixes, please upgrade to latest 1.9.x if possible.
Hide
Chris Potter added a comment -

Thanks for the info Petr. I'd upgrade if my faculty were ready. Keep up the good work!

Show
Chris Potter added a comment - Thanks for the info Petr. I'd upgrade if my faculty were ready. Keep up the good work!
Hide
Tim Hunt added a comment -

Reviewed code and tested.

(Note, if you want to test this, you need to remove the block/online_users:viewlist capability from both the Student and Authenticated users roles.

Show
Tim Hunt added a comment - Reviewed code and tested. (Note, if you want to test this, you need to remove the block/online_users:viewlist capability from both the Student and Authenticated users roles.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: