Visible Everywhere Block

Visible Everywhere Block

by David Shields -
Number of replies: 5

I've been tasked to create a block to display school-wide alerts, and I've been successful so far (yaay, go me!), pulling alerts from a table with ajax auto-refreshing. Moodle 1.8 by the way.

But I want the block to be always visible, every page, every course, every possible moodle context. How do I get a block to automagically appear in all courses etc ? Cannot have to add it in each course, as this would be too much effort and prone to user cock-ups.

Many thanks

David

Average of ratings: -
In reply to David Shields

Re: Visible Everywhere Block

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Go to 'Admin / Appearance / Sticky blocks'. On this screen you can define blocks that will always appear on course pages.

mike
In reply to Mike Churchward

Re: Visible Everywhere Block

by David Shields -

Yeah, I got that far, but I want the block to appear *everywhere* - in course resources, news/forums, yadda yadda yadda ...

I wonder if I would be better not using a block, but hacking it into the page header code ?

The reason it's for everywhere is that it is a global school alert messaging system, popping urgent messages (e.g. "The headmaster has absconded AGAIN", or "The Chemistry block is on fire", and allowing teachers a panic button (Year 6 English rioting again, that kind of thing)) so we cannot have the circumstance that messages would be missed.

Cheers, David

In reply to David Shields

Re: Visible Everywhere Block

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Yes, i really think if you want to be sure that your information will be shown everywhere, modifying the header is the best thing you can do smile
In reply to David Shields

Re: Visible Everywhere Block

by Matt Campbell -
ABSOLUTELY no idea how to do this, but another way to get attention would be to force a theme change in some way - cutting over to a blinking red theme would be quite eye-catching!

Thanks,

Matt
In reply to David Shields

Re: Visible Everywhere Block

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Many (but not all) of the activities allow for blocks to be displayed on their pages now as well.

If they need to be on every page, you would have to create a fairly complex theme to do it.

mike