making iframe block visible only after login

making iframe block visible only after login

by Matt Kors -
Number of replies: 2

Moodle 2.6.1

Firstly, I think I'm using the term "block" incorrectly. I don't want a box on the side of the page, I'm referring to wanting an iframe on the main body page...

I've been working on a mockup Moodle for the school I work at, mainly to provide a refreshed UI as their current layout is a bit outdated. One of the changes that I've put in involves loading an iframe in the Page Summary to display the an external daily notices html page generated by the admin staff. This works great as it means this is the first thing students see in Moodle.


There's now a privacy concern (student names and whatnot) as those who aren't logged in see this iframe (as it's in the page summary). So now I need something that will load an iframe in the front page, but only for logged in users.

Below is a the layout that I'm working with. The big red block is where the iframe is loading.

http://imgur.com/uRMfesY


I had a play with the built in News plugin, but this would mean that someone would have to maintain the news each day. My solution involved doing a scheduled copy of the external html to the moodle server, meaning it was all relatively automated.


What are my options?


Cheers

Average of ratings: -
In reply to Matt Kors

Re: making iframe block visible only after login

by Torsten Händler -

maybe you can hide the iframe with css for users wich are not logged in but it depands on your theme you schould check if the body has a class for none logged users.