Block permission vs Authenticated User

Block permission vs Authenticated User

by Peter Eliyahu Kornfeld -
Number of replies: 2

Hi,

I want to show a specific block on quiz page (mod-quiz-view) for those with 'Teacher' role but hide it from those with 'Student' role.

However 'Teacher' can not see the block if I do not add 'Authenticated User', but if I add 'Authenticated User', also 'Student' can see the block even I add the role to the Prohibited area...

It creates a breach where 'Student' can see content not intended to...


Both 'Student' and 'Teacher' can see the block!!!


Neither 'Student' nor 'Teacher' can see the block!!!


Average of ratings: -
In reply to Peter Eliyahu Kornfeld

Re: Block permission vs Authenticated User

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Where does this block instance exist? Specifically, what is the parent context id?
In reply to Tim Hunt

Re: Block permission vs Authenticated User

by Peter Eliyahu Kornfeld -
Actually there are 3 instances...

mdl_block_instances
blockname  pagetypepattern  defaultregion  defaultweight
link_rashim  mod-quiz-view side-post 1
link_rashim  mod-assign-view side-post 1
link_rashim  mod-scorm-view side-post 1

So it shows on the page of quiz/assign/scorm... Which probably sets the contex to that quiz/assign/scorm...

I do have access to the code of this block - so I can look into it if you tell me where...