ilios / moodle-block-ilios

DEPRECATED: Ilios/Moodle integration
GNU General Public License v3.0
2 stars 6 forks source link

Update usage call code snippet in readme/code #2

Closed saschaben closed 10 years ago

saschaben commented 11 years ago

The iframe call should not be using fixed width pixel sizing; it should be set as a percentage in all cases. So

<iframe
    width="1316"
    height="816"
    frameborder="0"
    src="https://your_moodle_base_url/blocks/ilios/calendar.php?iframe_width=1300&iframe_height=800">
    Ilios Calendar
</iframe>

should be replaced with

<iframe 
   width="100%"
   height="100%" 
   frameborder="0" 
   src="https://your_moodle_base_url/blocks/ilios/calendar.php?iframe_width=100%&amp;iframe_height=100%">
   Ilios Calendar 
</iframe>

This provides a far more effective and responsive user experience.

Trott commented 10 years ago

Might even be able to get away with this:

<iframe 
   width="100%"
   height="100%" 
   frameborder="0" 
   src="https://your_moodle_base_url/blocks/ilios/calendar.php">
   Ilios Calendar 
</iframe>

@saschaben This is a documentation issue, right? No code needs to change, just the README?

Trott commented 10 years ago

Testing your snippet and mine, @saschaben, neither actually work, at least in my test Moodle course. You can't scroll down far enough to actually see anything.

Trott commented 10 years ago

This seems to be the simplest that works, of the things I've tried. There may be a better solution. The mixture of pixel units and percentages might be unfortunate.

<iframe 
    width="100%" 
    height="816" frameborder="0" 
    src="https://courses.ucsf.edu/blocks/ilios/calendar.php">
       Ilios Calendar
</iframe>
Trott commented 10 years ago

@ctam's original, though, has the virtue of avoiding the dreaded dual vertical scrollbar issue.

Trott commented 10 years ago

This bit of loopiness seems to get it done without the double scroll bar problem. The key is that height needs to be 16 greater than iframe_height. I did not look to see if this is an issue due to our UCSF theme, the standard Moodle theme, Ilios CSS, something specific to Chrome on the Mac (which is the only browser I tested), etc.

<div>
    <iframe width="100%" height="816" frameborder="0" 
        src="https://courses.ucsf.edu/blocks/ilios/calendar.php?iframe_height=800"> 
            Ilios Calendar
    </iframe>
</div>
saschaben commented 10 years ago

@Trott, this snippet will be entirely dependent on the moodle deployment: version, current theme, etc. The original snippets were designed for 1.9.x, not surprised they now are problematic, what with the updates to moodle over the last six months here.

On the plus side, it is just a documentation and training issue. On the less plus side, we still are nowhere near being able to pass ilios info directly to moodle via api as would be desired.

ctam commented 10 years ago

I think we can close this.