A quick check of the existing threads on this tells me I'm not the only one confused by the new way of making blocks "sticky" (in the 1.9 parlance). However, I seem to have a different issue to others.
We are in the preparation stages of moving from 1.9 to 2.2 and my colleagues and I have been tasked with setting the configuration. We want to keep our settings as similar as possible to our current 1.9 instance to minimise confusion and, therefore, training required. We currently have a number of sticky blocks on course pages (e.g. Calendar, Activities, Administration, People) and I can find no way of replicating this setup without adding these blocks to a level above the main course page. It seems to do this I must add the blocks to a category or the site home (if I want them to appear in *every* course), but firstly this does not compare well with our current setup and secondly many of those blocks are not relevant outside of the course context.
Can anyone tell me how to do this without changing core code? I should also note that we don't want users to be able to move or delete these blocks.
Any advice much appreciated. Steve
Yes, you have to add the block at a level above the course page to get it to appear on all courses. However, that does not necessarily mean that is appears on every page, becuase you can also set the type of page that the block should appear on. So, try setting the block to appear on
- System context, and all subcontexts; and
- page type course-veiw-*
Thanks Tim, but that's not what I'm seeing. When I add a block onto the site home (front page) and edit the settings the options I have for page contexts are:
- Display on the front page only.
- Display on the front page and any pages added to the front page.
- Display throughout the entire site.
There is no separate "page type" option. When adding the block to a category instead (which would necessitate the creation of a top-level category simply for this purpose) I have the following contexts:
- Display on [this category] and any pages within it.
- Display on [this category] only.
...along with "Display on page types":
- Any site administration page.
- The current site administration page.
- Any page.
So I'm not given the option of just adding to course main pages from there either. The only place this option appears to me is when adding a block to a course page which then, as expected, doesn't proliferate to all other courses.
Could it be a config option that I've missed, or could our Moodle instance be broken?
I've also noticed another issue, in that even when a block is added to the front page and deletion is prevented in the Blocks admin page, the cascaded block in the course page can still be moved and hidden by the teacher. I've tried prohibiting this using role overrides at the site context but this makes no difference. I assume I'd have to add a role override in each course, which obviously isn't possible (we have several thousand courses each year). The alternative would be to prevent teachers from editing blocks at all but that's not reasonable; we currently (in 1.9) have sticky blocks on the left, for continuity of the student experience, and allow teachers to add blocks below them on the left or in their own hierarchy on the right. Our developers want to avoid core code changes but I don't see an alternative in this case.
Thanks Tim, that worked perfectly. Very confusing!
I was hoping that would work for the role override as well but alas no. Looks like a core code change, or "local plugin", is the way forward for that then.
Thanks again. You are truly the Moodle Sensei [bows in awed respect]. Steve
I've also noticed that when you make the change in the course page it removes the block from the front page. Keeps things nicely tidy but confuses the hell out of me
When I'm logged in as an administrator and I add a block to the front page I get the option "Display on page types: Any site administration page" or "the current site administration page" and not "throughout the entire site".
Any ideas why or what I need to do?
I just tried on http://demo.moodle.net logging in as an admin and adding different blocks to the front page then editing them. In each case I could select 'Display throughout the entire site'. Thus I'm mystified as to why you can't see this option. Can you try and see whether you can reproduce the problem on http://demo.moodle.net.
Gus - I think you are looking at site admin pages and trying to add your block from there (for instance I tried adding a block on the notifications page and I got the same as you, but when I went to the actual front page to add my block I got the same as Helen. ) By the way I am sure previously you could add sitewide blocks via admin pages but perhaps it has now changed.
Is there way to make the blocks added as you indicate not removable by teachers? I want to create a standard template with certain blocks in certain locations. I can set it up so the blocks and block locations are default but I cannot see how to make them 'stick' as I could with 1.9.
Any help appreciated.
Thank you for your reply.
Yes, I agree, however as best as I can tell a teacher can still hide and move these site wide blocks.
I am hoping there is some way to remove the option to hide and move certain blocks while still allowing for other non-sticky/frozen blocks to be added and located by teachers.
I'm afraid I found that too, and I can't see a way around it without some development work. We need the "sticky blocks" to be in the same location (and visible) in all courses so that the students have a unified experience, whilst allowing teachers to add their own blocks around them to allow for personalisation and innovative use. I'm going to ask our developers to look into it and hopefully they'll share their solution.
I was wondering if you have you been able to find a solution to this? Until I can set up a course template in Moodle 2.2 as I could with 1.9 and sticky blocks I am reluctant to move to 2.2.
Not sure if I got confused on this, but that wasn't my experience. I found that teachers could delete the blocks in their own courses. What I had to do was prevent block deletion using the padlock icons on the "manage blocks" admin page. This stops teachers from deleting any block added to the site home page, with the aforementioned caveat that they can still move and hide them.
This new system is incredibly frustrating and very, very unintuitive. Tim, you gave a great explanation of how to make this work here, but as another user mentioned, what about blocks that only work in a specific context? We have blocks that we want to appear on every course page, but they just don't belong at site level. It would be even better if we could set them at category level, but we're having issues with that as well. Every time we set the block (at category level) to "Display on 'Category: This Category' and any pages within it", it never saves this setting and always reverts back to "Display on 'Category: This Category' only. Thoughts?
Do you happen to know if it relies on another setting somewhere else?
Agreed, Graeme. If I'm able to figure this out on my own, I'll be happy to post back what I find. As it stands, though, I'm running out of ideas and hoping someone here will be able to fill in the gaps for me.
Thanks to Tim Hunt for this post, it is still useful to admins who tinker on their servers after all these years.