Personal Profile Block

Personal Profile Block

by Miriam Laidlaw -
Number of replies: 2

Moodle 2.0.1

If I add the personal profile block to a course page, it displays for an administrator, but not for teachers and students. However, if a teacher or student adds it to their "My home" page it displays for them. So why will it not display for them in their course? Why only administrators?

I can't find any documentation about this block. I can't find any settings in Site Administration --> Users --> Permissions --> Define Roles that specify who can see this block. There is nothing under Plugins --> Blocks that I can see (except to disable the block itself).

Help? sad

Average of ratings: -
In reply to Miriam Laidlaw

Re: Personal Profile Block

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers

Miriam - I took a quick look at the code in /blocks/myprofile/block_myprofile.php which call /lib/accesslib.php's is_viewing function to check that the users have the permission to view the course. The is_viewing function checks for the 'moodle/course:view' capability; however, in Moodle 2.0 enrolment and viewing are distinct - see Capabilities/moodle/course:view for a description of the differences. So I would consider the behavior you are describing to be a bug. I have created MDL-26023 in the tracker and suggested a possible fix at https://github.com/arborrow/moodle/commit/ce5b925ccdf08d633e0b618b44b3ea0d3344a9a1 which adds an additional check to see if the user is enrolled. Hopefully we can get this patched up pretty quickly so that it works for your site but if you want to try the patch in the meantime please feel free to give it a test. Peace - Anthony

In reply to Anthony Borrow

Re: Personal Profile Block

by dave drink -
This is a problem for me too ... I'm sure most people who want the personal profile block would want that for all course members and not admins. I wand to be able to add this block for a course just like comments block etc ... Am I missing something or is this a bug? David D