Capability moodle/user:viewalldetails and telephone number visibility

Capability moodle/user:viewalldetails and telephone number visibility

από Sergio Comerón -
Αριθμός απαντήσεων: 6
Φωτογραφία Core developers Φωτογραφία Plugin developers

The literal definition of the viewalldetails capability is "This allows a user to see all the information about another user that is on their profile page."

(see: https://docs.moodle.org/35/en/Capabilities/moodle/user:viewalldetails)

but at v3.3, v3.4, v3.5 (among other versions) when a user with this capability don't see the phone number for example. 

Why? It's a bug? or this permission doesn't work for this?


Thanks!!!

Μέσος όρος βαθμολογίας: -
Σε απάντηση σε Sergio Comerón

Re: Capability moodle/user:viewalldetails and telephone number visibility

από Sergio Comerón -
Φωτογραφία Core developers Φωτογραφία Plugin developers

Sorry, 

in the fourth line I wanted to say:

"A user with this capability never see the phone number for example".


Σε απάντηση σε Sergio Comerón

Re: Capability moodle/user:viewalldetails and telephone number visibility

από Helen Foster -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers Φωτογραφία Translators

Hello Sergio,

I tried on https://demo.moodle.net (using 3.5.1) and found the same as you - that certain profile fields such as phone are not displayed on the profile page. I reported the problem as MDL-63296 for developers to investigate.

Σε απάντηση σε Helen Foster

Re: Capability moodle/user:viewalldetails and telephone number visibility

από Sergio Comerón -
Φωτογραφία Core developers Φωτογραφία Plugin developers

Ohhh thanks Helen! 

I have contributed in the tracker the solution that we have implemented to solve this issue. I do not know if it will be the most appropriate, they will tell us about it.


Again thanks for open  MDL-63296

χαμόγελο

Σε απάντηση σε Sergio Comerón

Re: Capability moodle/user:viewalldetails and telephone number visibility

από Helen Foster -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers Φωτογραφία Translators

Wow, thanks Sergio for providing a patch for the issue - very cool! χαμόγελο

Hopefully it will be peer reviewed before too long, though in the meantime your patch is there for anyone to try.

Σε απάντηση σε Sergio Comerón

Re: Capability moodle/user:viewalldetails and telephone number visibility

από Luca Bösch -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Peer reviewers Φωτογραφία Plugin developers Φωτογραφία Testers

Hi Helen and Sergio

I believe users see the fields which are chosen in the "Show user identity" setting under admin/settings.php?section=userpolicies, or am I mistaken?


I noticed "Address" was not there and neither under "Hide user fields" so I put up a patch fixing that.

Concerning your patch, if I understand i correctly, you alter the settings as if the given showuseridentity fields were chosen, and so they appear, right?

$identityfields = array('idnumber' => 0, 'phone1' => 1, 'phone2' => 2, 'department' => 3, 'institution' => 4);

Best,

Luca

Σε απάντηση σε Luca Bösch

Re: Capability moodle/user:viewalldetails and telephone number visibility

από Helen Foster -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Moodle HQ Φωτογραφία Particularly helpful Moodlers Φωτογραφία Plugin developers Φωτογραφία Testers Φωτογραφία Translators

Hi Luca,

Thanks for your help with MDL-63296. χαμόγελο

The 'Show user identity' setting controls which fields are displayed when selecting or searching for users, and when displaying lists of users, such as in reports. (See the documentation User policies for a list of locations.)

MDL-63296 is about fields not being shown on a user's full profile page. An admin should be able to view everything, regardless of capability settings. Also, I think a user should be able to view all the information they they have added, otherwise it is confusing for them.