Block Visibility

Block Visibility

by Philip Templeton -
Number of replies: 8

Hello,

I have a couple blocks that only show when editing on.  How do I set the block so it always show's with out turning editing on?  

I am using the clean theme, in moodle 2.5.3

Thanks!

Phil

Average of ratings: -
In reply to Philip Templeton

Re: Block Visibility

by Christian Herman -

A couple of things could be happening.  The blocks could be hidden.  If so, click on the eye icon to re-enable the block.  It may also depend on the block type.  The Add a Block block, for example, is only visible when editing is on.

In reply to Christian Herman

Re: Block Visibility

by Philip Templeton -

Thanks for posting Christian.  The block isnt hidden.  Do you or anyone reading this, know what method dictates when a block is only visible when editing is turned on?

Thanks!

In reply to Philip Templeton

Re: Block Visibility

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Which blocks are they?

In reply to Mary Cooch

Re: Block Visibility

by Philip Templeton -

The navigation and activity block.  

Here is some additional info about the activity block:

I added it to the site home set the permissions so only instructors can view it.   Went to the course and modified the setting so it displays on any course home page.  At that point as an administrator the block displays with or without editing.  As an instructor I have to turn editing on.

Phil

In reply to Philip Templeton

Re: Block Visibility

by Christian Herman -

That opens some questions.

Are both blocks visible to admin but hidden to instructors unless editing is turned on?
Is the Navigation block hidden to instructors on the frontpage as well?
What modifications have you made to the Navigation block permissions and view settings?
On what page was the Activity block first added?

In reply to Christian Herman

Re: Block Visibility

by Philip Templeton -

Are both blocks visible to admin but hidden to instructors unless editing is turned on?

Yes.

Is the Navigation block hidden to instructors on the frontpage as well?

Yes.

What modifications have you made to the Navigation block permissions and view settings?

 

I prohibited the authenticated user, user and student. 

On what page was the Activity block first added?

System

Phil

In reply to Philip Templeton

Re: Block Visibility

by Christian Herman -

Bingo.

The Authenticated User role undergirds all users all the time (except admins).  Other roles are stacked on top of it. Prohibiting a capability prevents access completely, even if allowed by another role in a more specific context.  So if you prohibit a capability in the Auth User role, it's super-duper-gold-star-no-no prohibited.

So, edit the permissions on the blocks to allow viewing to the Auth User.  That should clear it up for your instructors.  If you still want to hide the Nav block on the frontpage, instead prohibit View Block for Authenticated User on the Frontpage in the block's Permissions and assign that role to your instructors on the frontpage.  As far as your Activity block, on the frontpage you'll have to pick between showing it to everyone or noone. As long as you don't prohibit the Auth User, the roles at the course level will properly control visibility.

In reply to Christian Herman

Re: Block Visibility

by Philip Templeton -

Awesome!

I am getting it now.  So, is it possible in the code to affect the activity block?  I have my system set up where students cant see the activities in future weeks.  The block circumvents that.  However the teachers could find the block handy with moderating their discussions.  It's looking like modifying the code or, telling them they need to turn on the editing button to get to the activity block is the route to take.  Thank you so much for your help.